From 26f4e3e0fb3c80810ab6d4161f60640addcdcdfc Mon Sep 17 00:00:00 2001
From: ScuffedNewt
Date: Mon, 30 Oct 2023 15:06:15 +0000
Subject: [PATCH] run lint(s)
---
.bladeformatterrc.json | 6 +
.bladeignore | 1 +
app/Console/Commands/AddSiteSettings.php | 64 +-
app/Console/Commands/AddTextPages.php | 37 +-
app/Console/Commands/CheckNews.php | 13 +-
app/Console/Commands/CheckSales.php | 13 +-
.../ClearDeletedCharacterAttachments.php | 17 +-
app/Console/Commands/CopyDefaultImages.php | 22 +-
app/Console/Commands/FixCharItemNotifs.php | 13 +-
app/Console/Commands/MigrateAliases.php | 190 +-
app/Console/Commands/SetupAdminUser.php | 121 +-
.../Commands/UpdateExtensionTracker.php | 44 +-
app/Console/Commands/UpdateLorekeeperV2.php | 33 +-
app/Console/Kernel.php | 21 +-
app/Events/CommentCreated.php | 10 +-
app/Events/CommentDeleted.php | 10 +-
app/Events/CommentUpdated.php | 10 +-
app/Exceptions/Handler.php | 19 +-
app/Facades/Notifications.php | 8 +-
app/Facades/Settings.php | 8 +-
app/Helpers/AssetHelpers.php | 292 +-
app/Helpers/Helpers.php | 166 +-
app/Helpers/Notifications.php | 23 +-
app/Helpers/Settings.php | 16 +-
.../Admin/Characters/CharacterController.php | 578 +-
.../Characters/CharacterImageController.php | 324 +-
.../Admin/Characters/GrantController.php | 52 +-
.../Data/CharacterCategoryController.php | 107 +-
.../Admin/Data/CriterionController.php | 417 +-
.../Admin/Data/CurrencyController.php | 121 +-
.../Admin/Data/FeatureController.php | 240 +-
.../Admin/Data/GalleryController.php | 96 +-
.../Controllers/Admin/Data/ItemController.php | 307 +-
.../Admin/Data/LootTableController.php | 121 +-
.../Admin/Data/PromptController.php | 213 +-
.../Admin/Data/RarityController.php | 110 +-
.../Controllers/Admin/Data/ShopController.php | 140 +-
.../Admin/Data/SpeciesController.php | 217 +-
.../Admin/Data/SublistController.php | 129 +-
.../Controllers/Admin/DesignController.php | 99 +-
app/Http/Controllers/Admin/FileController.php | 209 +-
.../Controllers/Admin/GalleryController.php | 149 +-
app/Http/Controllers/Admin/HomeController.php | 46 +-
.../Admin/InvitationController.php | 49 +-
app/Http/Controllers/Admin/NewsController.php | 95 +-
app/Http/Controllers/Admin/PageController.php | 94 +-
.../Controllers/Admin/RaffleController.php | 215 +-
.../Controllers/Admin/ReportController.php | 69 +-
.../Controllers/Admin/SalesController.php | 96 +-
.../Controllers/Admin/SettingsController.php | 26 +-
.../Admin/SubmissionController.php | 148 +-
.../Admin/Users/GrantController.php | 96 +-
.../Admin/Users/RankController.php | 101 +-
.../Admin/Users/UserController.php | 221 +-
.../Auth/ForgotPasswordController.php | 8 +-
app/Http/Controllers/Auth/LoginController.php | 13 +-
.../Controllers/Auth/RegisterController.php | 77 +-
.../Auth/ResetPasswordController.php | 8 +-
.../Auth/VerificationController.php | 8 +-
app/Http/Controllers/BrowseController.php | 529 +-
.../Characters/CharacterController.php | 456 +-
.../Characters/DesignController.php | 321 +-
.../Controllers/Characters/MyoController.php | 251 +-
.../Comments/CommentController.php | 132 +-
.../Comments/CommentControllerInterface.php | 7 +-
app/Http/Controllers/Controller.php | 9 +-
app/Http/Controllers/CriterionController.php | 95 +-
app/Http/Controllers/GalleryController.php | 343 +-
app/Http/Controllers/HomeController.php | 27 +-
app/Http/Controllers/NewsController.php | 32 +-
app/Http/Controllers/PageController.php | 30 +-
app/Http/Controllers/PermalinkController.php | 68 +-
app/Http/Controllers/PromptsController.php | 49 +-
app/Http/Controllers/RaffleController.php | 46 +-
app/Http/Controllers/SalesController.php | 30 +-
app/Http/Controllers/ShopController.php | 104 +-
.../Controllers/Users/AccountController.php | 214 +-
app/Http/Controllers/Users/BankController.php | 39 +-
.../Controllers/Users/BookmarkController.php | 95 +-
.../Controllers/Users/CharacterController.php | 90 +-
.../Controllers/Users/InventoryController.php | 280 +-
.../Controllers/Users/ReportController.php | 71 +-
.../Users/SubmissionController.php | 194 +-
.../Controllers/Users/TradeController.php | 276 +-
app/Http/Controllers/Users/UserController.php | 264 +-
app/Http/Controllers/WorldController.php | 222 +-
app/Http/Kernel.php | 27 +-
app/Http/Middleware/Authenticate.php | 11 +-
app/Http/Middleware/CheckAdmin.php | 11 +-
app/Http/Middleware/CheckAlias.php | 18 +-
.../Middleware/CheckForMaintenanceMode.php | 3 +-
app/Http/Middleware/CheckPower.php | 12 +-
app/Http/Middleware/CheckStaff.php | 11 +-
app/Http/Middleware/EncryptCookies.php | 3 +-
.../Middleware/RedirectIfAuthenticated.php | 12 +-
app/Http/Middleware/TrimStrings.php | 3 +-
app/Http/Middleware/TrustProxies.php | 5 +-
app/Http/Middleware/VerifyCsrfToken.php | 3 +-
app/Models/Character/Character.php | 300 +-
app/Models/Character/CharacterBookmark.php | 36 +-
app/Models/Character/CharacterCategory.php | 74 +-
app/Models/Character/CharacterCurrency.php | 27 +-
.../Character/CharacterDesignUpdate.php | 141 +-
app/Models/Character/CharacterFeature.php | 23 +-
app/Models/Character/CharacterImage.php | 116 +-
.../Character/CharacterImageCreator.php | 47 +-
app/Models/Character/CharacterItem.php | 44 +-
app/Models/Character/CharacterLog.php | 31 +-
app/Models/Character/CharacterProfile.php | 14 +-
app/Models/Character/CharacterTransfer.php | 52 +-
app/Models/Character/Sublist.php | 31 +-
app/Models/Comment.php | 62 +-
app/Models/Criteria/Criterion.php | 63 +-
app/Models/Criteria/CriterionStep.php | 74 +-
app/Models/Criteria/CriterionStepOption.php | 34 +-
app/Models/Currency/Currency.php | 95 +-
app/Models/Currency/CurrencyLog.php | 28 +-
app/Models/Feature/Feature.php | 124 +-
app/Models/Feature/FeatureCategory.php | 54 +-
app/Models/Gallery/Gallery.php | 94 +-
app/Models/Gallery/GalleryCharacter.php | 19 +-
app/Models/Gallery/GalleryCollaborator.php | 34 +-
app/Models/Gallery/GalleryCriterion.php | 44 +-
app/Models/Gallery/GalleryFavorite.php | 17 +-
app/Models/Gallery/GallerySubmission.php | 233 +-
app/Models/Invitation.php | 18 +-
app/Models/Item/Item.php | 209 +-
app/Models/Item/ItemCategory.php | 52 +-
app/Models/Item/ItemLog.php | 29 +-
app/Models/Item/ItemTag.php | 68 +-
app/Models/Loot/Loot.php | 33 +-
app/Models/Loot/LootTable.php | 119 +-
app/Models/Model.php | 3 +-
app/Models/News.php | 50 +-
app/Models/Notification.php | 153 +-
app/Models/Prompt/Prompt.php | 132 +-
app/Models/Prompt/PromptCategory.php | 54 +-
app/Models/Prompt/PromptCriterion.php | 44 +-
app/Models/Prompt/PromptReward.php | 29 +-
app/Models/Raffle/Raffle.php | 51 +-
app/Models/Raffle/RaffleGroup.php | 18 +-
app/Models/Raffle/RaffleTicket.php | 43 +-
app/Models/Rank/Rank.php | 88 +-
app/Models/Rank/RankPower.php | 6 +-
app/Models/Rarity.php | 67 +-
app/Models/Report/Report.php | 81 +-
app/Models/Sales/Sales.php | 41 +-
app/Models/Sales/SalesCharacter.php | 53 +-
app/Models/Shop/Shop.php | 61 +-
app/Models/Shop/ShopLog.php | 41 +-
app/Models/Shop/ShopStock.php | 23 +-
app/Models/SitePage.php | 26 +-
app/Models/Species/Species.php | 81 +-
app/Models/Species/Subtype.php | 90 +-
app/Models/Submission/Submission.php | 128 +-
app/Models/Submission/SubmissionCharacter.php | 33 +-
app/Models/Trade.php | 88 +-
app/Models/User/User.php | 339 +-
app/Models/User/UserAlias.php | 45 +-
app/Models/User/UserCharacterLog.php | 30 +-
app/Models/User/UserCurrency.php | 25 +-
app/Models/User/UserItem.php | 92 +-
app/Models/User/UserProfile.php | 21 +-
app/Models/User/UserSettings.php | 27 +-
app/Models/User/UserUpdateLog.php | 35 +-
app/Policies/CommentPolicy.php | 52 +-
app/Providers/AppServiceProvider.php | 12 +-
app/Providers/AuthServiceProvider.php | 9 +-
app/Providers/BroadcastServiceProvider.php | 10 +-
app/Providers/CommentProvider.php | 49 +-
app/Providers/EventServiceProvider.php | 14 +-
app/Providers/NotificationsProvider.php | 18 +-
app/Providers/RouteServiceProvider.php | 35 +-
app/Providers/SettingsProvider.php | 18 +-
app/Providers/Socialite/ToyhouseProvider.php | 15 +-
app/Services/BookmarkManager.php | 121 +-
app/Services/CharacterCategoryService.php | 135 +-
app/Services/CharacterManager.php | 2863 +--
app/Services/CriterionService.php | 312 +-
app/Services/CurrencyManager.php | 386 +-
app/Services/CurrencyService.php | 247 +-
app/Services/ExtensionService.php | 25 +-
app/Services/FeatureService.php | 329 +-
app/Services/FileManager.php | 152 +-
app/Services/GalleryManager.php | 837 +-
app/Services/GalleryService.php | 105 +-
app/Services/InventoryManager.php | 596 +-
app/Services/InvitationService.php | 58 +-
app/Services/Item/BoxService.php | 130 +-
app/Services/Item/SlotService.php | 139 +-
app/Services/ItemService.php | 397 +-
app/Services/LinkService.php | 99 +-
app/Services/LootService.php | 171 +-
app/Services/NewsService.php | 80 +-
app/Services/PageService.php | 83 +-
app/Services/PromptService.php | 316 +-
app/Services/RaffleManager.php | 170 +-
app/Services/RaffleService.php | 104 +-
app/Services/RankService.php | 125 +-
app/Services/RarityService.php | 148 +-
app/Services/ReportManager.php | 129 +-
app/Services/SalesService.php | 244 +-
app/Services/Service.php | 252 +-
app/Services/ShopManager.php | 145 +-
app/Services/ShopService.php | 177 +-
app/Services/SpeciesService.php | 273 +-
app/Services/SublistService.php | 96 +-
app/Services/SubmissionManager.php | 585 +-
app/Services/TradeManager.php | 702 +-
app/Services/UserService.php | 234 +-
app/Traits/Commentable.php | 44 +-
app/Traits/Commenter.php | 13 +-
composer.json | 35 +-
config/app.php | 78 +-
config/auth.php | 14 +-
config/broadcasting.php | 12 +-
config/cache.php | 20 +-
config/database.php | 76 +-
config/filesystems.php | 12 +-
config/hashing.php | 4 +-
config/logging.php | 38 +-
config/lorekeeper/admin_sidebar.php | 100 +-
config/lorekeeper/comments.php | 12 +-
config/lorekeeper/extension_tracker.php | 6 +-
config/lorekeeper/extensions.php | 10 +-
config/lorekeeper/image_files.php | 40 +-
config/lorekeeper/item_tags.php | 14 +-
config/lorekeeper/notifications.php | 234 +-
config/lorekeeper/powers.php | 43 +-
config/lorekeeper/settings.php | 20 +-
config/lorekeeper/text_pages.php | 9 +-
config/mail.php | 2 +-
config/queue.php | 28 +-
database/factories/UserFactory.php | 10 +-
.../2014_10_12_000000_create_users_table.php | 26 +-
...12_100000_create_password_resets_table.php | 17 +-
...018_06_30_113500_create_comments_table.php | 27 +-
.../2019_02_27_075638_create_game_tables.php | 68 +-
.../2019_04_07_130129_add_site_settings.php | 25 +-
...019_04_09_090831_create_user_log_table.php | 25 +-
...19_04_09_095513_create_currency_tables.php | 29 +-
...019_04_12_123405_fix_data_descriptions.php | 159 +-
...2019_04_13_094613_add_owned_currencies.php | 17 +-
...14_120732_add_image_to_item_categories.php | 17 +-
...4_14_121447_add_transfer_flag_to_items.php | 17 +-
.../2019_04_15_122508_add_prompts_table.php | 23 +-
...6_062617_add_parsed_text_to_site_pages.php | 17 +-
.../2019_04_16_080112_add_invitation_keys.php | 19 +-
...2019_04_19_125212_fix_inventory_tables.php | 26 +-
.../2019_04_20_140827_fix_user_item_log.php | 21 +-
...4_29_080228_fix_inventory_tables_again.php | 17 +-
...019_04_30_070721_add_notification_data.php | 17 +-
.../migrations/2019_05_04_091240_add_news.php | 17 +-
...9_05_11_045038_update_character_tables.php | 34 +-
..._05_12_064538_add_species_id_to_images.php | 21 +-
...9_05_12_100722_make_features_nonunique.php | 19 +-
...54413_make_character_image_id_nullable.php | 23 +-
.../2019_05_20_075936_add_character_sort.php | 17 +-
...1701_add_changed_data_to_character_log.php | 17 +-
...83954_create_character_transfer_tables.php | 17 +-
.../2019_07_09_063021_create_raffles.php | 17 +-
.../2019_07_13_095608_create_loot_tables.php | 23 +-
..._07_13_101743_create_prompt_categories.php | 21 +-
.../2019_07_15_090200_add_prompt_rewards.php | 19 +-
...19_07_21_161720_add_prompt_submissions.php | 23 +-
..._add_submission_count_to_user_settings.php | 17 +-
...451_make_submission_prompt_id_nullable.php | 17 +-
.../2019_08_10_120818_add_myo_slots.php | 25 +-
.../2019_08_24_101751_add_design_updates.php | 45 +-
...1303_drop_images_character_foreign_key.php | 20 +-
...400_drop_character_images_foreign_keys.php | 21 +-
...923_add_submitted_at_to_design_updates.php | 17 +-
...7_110010_rename_design_approval_status.php | 15 +-
.../2019_09_28_040911_create_shops.php | 25 +-
..._10_02_085738_add_shop_purchase_limits.php | 17 +-
.../migrations/2019_10_12_095632_add_bans.php | 17 +-
.../2019_10_21_081343_add_secure_trades.php | 22 +-
...062623_modify_trade_confirmation_flags.php | 17 +-
...19_12_02_090542_add_staff_id_to_trades.php | 17 +-
.../2019_12_23_062730_add_item_tags.php | 21 +-
...3_135512_make_prompt_category_nullable.php | 18 +-
.../2020_03_07_065050_add_bookmarks.php | 17 +-
...241_make_character_log_sender_nullable.php | 17 +-
.../2020_03_14_124534_add_subtypes.php | 33 +-
...020_03_23_075539_add_images_to_prompts.php | 17 +-
...0_03_27_113928_add_subtype_to_features.php | 21 +-
...020_04_25_114747_drop_log_foreign_keys.php | 21 +-
...05_02_152118_drop_character_myo_counts.php | 26 +-
...204920_change_user_items_count_default.php | 15 +-
...163751_add_holding_count_to_user_items.php | 17 +-
..._23_112548_change_item_tracking_system.php | 17 +-
..._124250_add_parsed_submission_comments.php | 17 +-
...2020_06_06_194000_add_submission_count.php | 17 +-
...06_12_155213_add_character_items_table.php | 19 +-
...cter_transfer_perms_to_item_categories.php | 17 +-
...15_205604_fix_character_item_log_table.php | 18 +-
..._recipient_type_to_character_items_log.php | 17 +-
...6_adjust_item_logs_for_character_items.php | 19 +-
...tems_log_sender_recipient_default_null.php | 19 +-
...2020_06_19_142842_item_entry_extension.php | 17 +-
.../2020_07_27_153640_user_icon_expansion.php | 19 +-
...7_31_185640_add_type_to_design_updates.php | 17 +-
..._31_193235_set_design_update_type_null.php | 15 +-
...dd_stack_name_to_character_items_table.php | 17 +-
...8_10_211220_raise_items_log_char_limit.php | 17 +-
..._13_173324_add_votes_to_design_updates.php | 17 +-
..._add_fullsize_hash_to_character_images.php | 17 +-
.../2020_08_27_181445_char-link-addon.php | 17 +-
.../2020_09_01_122320_add_sales.php | 17 +-
.../2020_09_11_181218_add_is_featured.php | 19 +-
.../2020_09_12_181218_add_rank_icon.php | 17 +-
..._add_toggle_for_comments_on_site_pages.php | 17 +-
.../2020_09_16_190405_make_gallery_tables.php | 22 +-
.../2020_09_17_185436_fix_gallery_tables.php | 17 +-
.../2020_09_18_194615_re_add_gallery_sort.php | 17 +-
...rejected_status_to_gallery_submissions.php | 15 +-
...23205_add_title_to_gallery_submissions.php | 17 +-
.../2020_09_21_205840_transfer_reason.php | 17 +-
...3_set_gallery_submission_hash_nullable.php | 17 +-
..._26_140543_add_gallery_favorites_table.php | 17 +-
..._staff_comments_to_gallery_submissions.php | 17 +-
...d_valued_status_to_gallery_submissions.php | 17 +-
...pe_to_gallery_submission_collaborators.php | 17 +-
...020_10_03_211413_add_prefix_to_prompts.php | 17 +-
...ise_currencies_log_log_character_limit.php | 17 +-
.../2020_10_08_081102_add_sub_masterlist.php | 21 +-
.../2020_10_15_143857_add_user_reports.php | 19 +-
...020_10_15_185536_add_bug_report_option.php | 17 +-
...2020_10_19_144506_add_type_to_comments.php | 19 +-
...content_warning_to_gallery_submissions.php | 17 +-
..._add_gift_writing_status_to_characters.php | 17 +-
...2_204925_add_delayed_comments_to_sales.php | 17 +-
...dd_user_id_to_character_image_creators.php | 17 +-
...2020_11_13_180553_create_aliases_table.php | 17 +-
...13_184820_add_has_alias_to_users_table.php | 17 +-
...020_11_17_001602_add_url_to_characters.php | 17 +-
...11_17_181454_add_url_to_character_logs.php | 17 +-
...1215_add_visibility_toggles_to_prompts.php | 17 +-
...11_23_152732_add_site_extensions_table.php | 17 +-
...20_11_25_192234_add_artist_id_to_items.php | 17 +-
...6_060832_make_submissions_url_nullable.php | 16 +-
..._04_181214_add_scheduling_to_galleries.php | 17 +-
...2020_12_05_165316_index_gallery_tables.php | 17 +-
...021_01_08_230640_add_released_to_items.php | 13 +-
..._012947_add_select_prompt_to_galleries.php | 13 +-
...1530_change_character_value_to_decimal.php | 13 +-
...172111_add_item_category_info_to_loots.php | 13 +-
...1_04_22_230225_create_sales_characters.php | 13 +-
.../2021_04_29_175640_add_user_birthday.php | 21 +-
..._19_123518_change_birthday_column_type.php | 17 +-
.../2022_10_03_165700_create_calculators.php | 23 +-
...09_203539_add_calculator_relationships.php | 15 +-
..._11_21_170405_add_rounding_to_criteria.php | 4 -
database/seeds/DatabaseSeeder.php | 19 +-
package-lock.json | 18449 ++++++++++++++++
package.json | 34 +-
pint.json | 188 +
public/index.php | 4 +-
resources/lang/en/auth.php | 2 +-
resources/lang/en/pagination.php | 2 +-
resources/lang/en/passwords.php | 8 +-
resources/lang/en/validation.php | 156 +-
.../galleries/_archive_submission.blade.php | 13 +-
.../views/galleries/_character.blade.php | 4 +-
.../galleries/_character_select.blade.php | 8 +-
.../_character_select_entry.blade.php | 8 +-
.../galleries/_character_select_js.blade.php | 4 +-
.../galleries/_queue_submission.blade.php | 38 +-
resources/views/galleries/_sidebar.blade.php | 14 +-
.../galleries/_submission_favorites.blade.php | 12 +-
.../galleries/_submission_totals.blade.php | 30 +-
resources/views/galleries/_thumb.blade.php | 69 +-
.../create_edit_submission.blade.php | 556 +-
resources/views/galleries/gallery.blade.php | 107 +-
resources/views/galleries/index.blade.php | 120 +-
resources/views/galleries/layout.blade.php | 6 +-
.../views/galleries/submission.blade.php | 364 +-
.../views/galleries/submission_log.blade.php | 277 +-
.../views/galleries/submissions.blade.php | 70 +-
resources/views/home/_character.blade.php | 4 +-
.../views/home/_inventory_stack.blade.php | 90 +-
resources/views/home/_prompt.blade.php | 10 +-
resources/views/home/_report.blade.php | 14 +-
.../views/home/_report_content.blade.php | 62 +-
resources/views/home/_sidebar.blade.php | 2 +-
resources/views/home/_submission.blade.php | 4 +-
.../views/home/_submission_content.blade.php | 186 +-
resources/views/home/_transfer.blade.php | 32 +-
resources/views/home/account_search.blade.php | 170 +-
resources/views/home/bank.blade.php | 73 +-
.../views/home/bug_report_index.blade.php | 67 +-
.../views/home/character_transfers.blade.php | 46 +-
resources/views/home/characters.blade.php | 58 +-
resources/views/home/create_report.blade.php | 80 +-
.../views/home/create_submission.blade.php | 296 +-
resources/views/home/home.blade.php | 1 +
resources/views/home/inventory.blade.php | 95 +-
resources/views/home/layout.blade.php | 8 +-
resources/views/home/myos.blade.php | 36 +-
resources/views/home/report.blade.php | 21 +-
resources/views/home/reports.blade.php | 66 +-
resources/views/home/submission.blade.php | 9 +-
resources/views/home/submissions.blade.php | 116 +-
.../views/home/submissions_closed.blade.php | 80 +-
resources/views/welcome.blade.php | 6 +-
routes/lorekeeper/admin.php | 122 +-
routes/lorekeeper/browse.php | 39 +-
routes/lorekeeper/members.php | 36 +-
routes/web.php | 20 +-
server.php | 4 +-
tests/CreatesApplication.php | 6 +-
tests/Feature/ExampleTest.php | 9 +-
tests/TestCase.php | 3 +-
tests/Unit/ExampleTest.php | 9 +-
yarn.lock | 11388 +++++-----
415 files changed, 41448 insertions(+), 21954 deletions(-)
create mode 100644 .bladeformatterrc.json
create mode 100644 .bladeignore
create mode 100644 package-lock.json
create mode 100644 pint.json
diff --git a/.bladeformatterrc.json b/.bladeformatterrc.json
new file mode 100644
index 0000000000..7d72ac635b
--- /dev/null
+++ b/.bladeformatterrc.json
@@ -0,0 +1,6 @@
+{
+ "indentSize": 4,
+ "wrapLineLength": 250,
+ "endWithNewLine": true,
+ "useTabs": false
+}
diff --git a/.bladeignore b/.bladeignore
new file mode 100644
index 0000000000..140fada73f
--- /dev/null
+++ b/.bladeignore
@@ -0,0 +1 @@
+vendor/*
diff --git a/app/Console/Commands/AddSiteSettings.php b/app/Console/Commands/AddSiteSettings.php
index 17f1ad20ce..d750905bbf 100644
--- a/app/Console/Commands/AddSiteSettings.php
+++ b/app/Console/Commands/AddSiteSettings.php
@@ -2,12 +2,10 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
-
use DB;
+use Illuminate\Console\Command;
-class AddSiteSettings extends Command
-{
+class AddSiteSettings extends Command {
/**
* The name and signature of the console command.
*
@@ -24,45 +22,17 @@ class AddSiteSettings extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
- /**
- * Add a site setting.
- *
- * Example usage:
- * $this->addSiteSetting("site_setting_key", 1, "0: does nothing. 1: does something.");
- *
- * @param string $key
- * @param int $value
- * @param string $description
- */
- private function addSiteSetting($key, $value, $description) {
- if(!DB::table('site_settings')->where('key', $key)->exists()) {
- DB::table('site_settings')->insert([
- [
- 'key' => $key,
- 'value' => $value,
- 'description' => $description,
- ],
- ]);
- $this->info( "Added: ".$key." / Default: ".$value);
- }
- else $this->line("Skipped: ".$key);
- }
-
/**
* Execute the console command.
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
$this->info('*********************');
$this->info('* ADD SITE SETTINGS *');
$this->info('*********************'."\n");
@@ -96,12 +66,36 @@ public function handle()
$this->addSiteSetting('admin_user', 1, 'ID of the site\'s admin user.');
$this->addSiteSetting('gallery_submissions_open', 1, '0: Gallery submissions closed, 1: Gallery submissions open.');
-
+
$this->addSiteSetting('gallery_rewards_divided', 1, '0: Gallery criteria rewards will be rewarded to each collaborator, 1: Gallery criteria rewards will be divided between collaborators.');
$this->addSiteSetting('gallery_submissions_require_approval', 1, '0: Gallery submissions do not require approval, 1: Gallery submissions require approval.');
$this->line("\nSite settings up to date!");
+ }
+ /**
+ * Add a site setting.
+ *
+ * Example usage:
+ * $this->addSiteSetting("site_setting_key", 1, "0: does nothing. 1: does something.");
+ *
+ * @param string $key
+ * @param int $value
+ * @param string $description
+ */
+ private function addSiteSetting($key, $value, $description) {
+ if (!DB::table('site_settings')->where('key', $key)->exists()) {
+ DB::table('site_settings')->insert([
+ [
+ 'key' => $key,
+ 'value' => $value,
+ 'description' => $description,
+ ],
+ ]);
+ $this->info('Added: '.$key.' / Default: '.$value);
+ } else {
+ $this->line('Skipped: '.$key);
+ }
}
}
diff --git a/app/Console/Commands/AddTextPages.php b/app/Console/Commands/AddTextPages.php
index 7446f3f6a8..a0d6959022 100644
--- a/app/Console/Commands/AddTextPages.php
+++ b/app/Console/Commands/AddTextPages.php
@@ -2,13 +2,12 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
+use Carbon\Carbon;
use Config;
use DB;
-use Carbon\Carbon;
+use Illuminate\Console\Command;
-class AddTextPages extends Command
-{
+class AddTextPages extends Command {
/**
* The name and signature of the console command.
*
@@ -25,11 +24,8 @@ class AddTextPages extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -38,34 +34,33 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
//
$pages = Config::get('lorekeeper.text_pages');
-
$this->info('******************');
$this->info('* ADD SITE PAGES *');
$this->info('******************'."\n");
$this->line("Adding site pages...existing entries will be skipped.\n");
- foreach($pages as $key => $page) {
- if(!DB::table('site_pages')->where('key', $key)->exists()) {
+ foreach ($pages as $key => $page) {
+ if (!DB::table('site_pages')->where('key', $key)->exists()) {
DB::table('site_pages')->insert([
[
- 'key' => $key,
- 'title' => $page['title'],
- 'text' => $page['text'],
+ 'key' => $key,
+ 'title' => $page['title'],
+ 'text' => $page['text'],
'parsed_text' => $page['text'],
- 'created_at' => Carbon::now(),
- 'updated_at' => Carbon::now(),
- ]
+ 'created_at' => Carbon::now(),
+ 'updated_at' => Carbon::now(),
+ ],
]);
- $this->info("Added: ".$page['title']);
+ $this->info('Added: '.$page['title']);
+ } else {
+ $this->line('Skipped: '.$page['title']);
}
- else $this->line("Skipped: ".$page['title']);
}
}
}
diff --git a/app/Console/Commands/CheckNews.php b/app/Console/Commands/CheckNews.php
index f9f63cd7d9..ee1456b626 100644
--- a/app/Console/Commands/CheckNews.php
+++ b/app/Console/Commands/CheckNews.php
@@ -2,11 +2,10 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
use App\Services\NewsService;
+use Illuminate\Console\Command;
-class CheckNews extends Command
-{
+class CheckNews extends Command {
/**
* The name and signature of the console command.
*
@@ -23,11 +22,8 @@ class CheckNews extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -36,8 +32,7 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
//
(new NewsService)->updateQueue();
}
diff --git a/app/Console/Commands/CheckSales.php b/app/Console/Commands/CheckSales.php
index a2e8176ca8..4d015699e3 100644
--- a/app/Console/Commands/CheckSales.php
+++ b/app/Console/Commands/CheckSales.php
@@ -2,11 +2,10 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
use App\Services\SalesService;
+use Illuminate\Console\Command;
-class CheckSales extends Command
-{
+class CheckSales extends Command {
/**
* The name and signature of the console command.
*
@@ -23,11 +22,8 @@ class CheckSales extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -36,8 +32,7 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
//
(new SalesService)->updateQueue();
}
diff --git a/app/Console/Commands/ClearDeletedCharacterAttachments.php b/app/Console/Commands/ClearDeletedCharacterAttachments.php
index daeb1f98d9..af57bf6df3 100644
--- a/app/Console/Commands/ClearDeletedCharacterAttachments.php
+++ b/app/Console/Commands/ClearDeletedCharacterAttachments.php
@@ -2,17 +2,14 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
-
-use DB;
-
use App\Models\Character\Character;
use App\Models\Character\CharacterCurrency;
use App\Models\Character\CharacterFeature;
use App\Models\Character\CharacterImage;
+use DB;
+use Illuminate\Console\Command;
-class ClearDeletedCharacterAttachments extends Command
-{
+class ClearDeletedCharacterAttachments extends Command {
/**
* The name and signature of the console command.
*
@@ -29,11 +26,8 @@ class ClearDeletedCharacterAttachments extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -42,8 +36,7 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
// Get deleted character IDs
$deletedCharacterIds = DB::table('characters')->whereNotNull('deleted_at')->pluck('id');
diff --git a/app/Console/Commands/CopyDefaultImages.php b/app/Console/Commands/CopyDefaultImages.php
index 78cb8f798c..b13700f9af 100644
--- a/app/Console/Commands/CopyDefaultImages.php
+++ b/app/Console/Commands/CopyDefaultImages.php
@@ -5,8 +5,7 @@
use Config;
use Illuminate\Console\Command;
-class CopyDefaultImages extends Command
-{
+class CopyDefaultImages extends Command {
/**
* The name and signature of the console command.
*
@@ -23,11 +22,8 @@ class CopyDefaultImages extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -36,8 +32,7 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
//
$this->info('***********************');
$this->info('* COPY DEFAULT IMAGES *');
@@ -45,13 +40,12 @@ public function handle()
$images = Config::get('lorekeeper.image_files');
- $sourceDir = base_path() . '/data/images/';
- $destDir = public_path() . '/images/';
+ $sourceDir = base_path().'/data/images/';
+ $destDir = public_path().'/images/';
- foreach($images as $image)
- {
- $this->line("Copying image: ".$image['filename'] . "\n");
- copy($sourceDir . $image['filename'], $destDir . $image['filename']);
+ foreach ($images as $image) {
+ $this->line('Copying image: '.$image['filename']."\n");
+ copy($sourceDir.$image['filename'], $destDir.$image['filename']);
}
$this->line('Done!');
}
diff --git a/app/Console/Commands/FixCharItemNotifs.php b/app/Console/Commands/FixCharItemNotifs.php
index f66d7e8703..0a149f36b9 100644
--- a/app/Console/Commands/FixCharItemNotifs.php
+++ b/app/Console/Commands/FixCharItemNotifs.php
@@ -2,11 +2,10 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
use App\Services\ExtensionService;
+use Illuminate\Console\Command;
-class FixCharItemNotifs extends Command
-{
+class FixCharItemNotifs extends Command {
/**
* The name and signature of the console command.
*
@@ -23,11 +22,8 @@ class FixCharItemNotifs extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -36,8 +32,7 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
//
(new ExtensionService)->updateNotifications(39, 501);
(new ExtensionService)->updateNotifications(40, 502);
diff --git a/app/Console/Commands/MigrateAliases.php b/app/Console/Commands/MigrateAliases.php
index 9d6fa89033..1e41bf9c80 100644
--- a/app/Console/Commands/MigrateAliases.php
+++ b/app/Console/Commands/MigrateAliases.php
@@ -2,22 +2,19 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
-
-use DB;
-use Illuminate\Support\Facades\Schema;
-use Illuminate\Database\Schema\Blueprint;
-
-use App\Models\User\User;
-use App\Models\User\UserAlias;
use App\Models\Character\Character;
use App\Models\Character\CharacterImageCreator;
use App\Models\Character\CharacterLog;
-use App\Models\User\UserCharacterLog;
use App\Models\Item\Item;
+use App\Models\User\User;
+use App\Models\User\UserAlias;
+use App\Models\User\UserCharacterLog;
+use DB;
+use Illuminate\Console\Command;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
-class MigrateAliases extends Command
-{
+class MigrateAliases extends Command {
/**
* The name and signature of the console command.
*
@@ -34,11 +31,8 @@ class MigrateAliases extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -47,200 +41,205 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
$this->info('*****************************');
$this->info('* MIGRATE ALIAS INFORMATION *');
$this->info('*****************************'."\n");
$this->line("Migrating aliases...\n");
- /** MOVE USER ALIASES */
- if(Schema::hasColumn('users', 'alias')) {
+ /* MOVE USER ALIASES */
+ if (Schema::hasColumn('users', 'alias')) {
// Get users with a set alias
$aliasUsers = User::whereNotNull('alias')->get();
- if($aliasUsers->count()) {
- foreach($aliasUsers as $user) {
- if(!DB::table('user_aliases')->where('user_id', $user->id)->where('site', 'deviantart')->where('alias', $user->alias)->exists()) {
+ if ($aliasUsers->count()) {
+ foreach ($aliasUsers as $user) {
+ if (!DB::table('user_aliases')->where('user_id', $user->id)->where('site', 'deviantart')->where('alias', $user->alias)->exists()) {
// Create a new row for the user's current dA alias
DB::table('user_aliases')->insert([
[
- 'user_id' => $user->id,
- 'site' => 'deviantart',
- 'alias' => $user->alias,
- 'is_visible' => 1,
+ 'user_id' => $user->id,
+ 'site' => 'deviantart',
+ 'alias' => $user->alias,
+ 'is_visible' => 1,
'is_primary_alias' => 1,
- ]
+ ],
]);
// Clear the user's alias in the users table and set the has_alias bool in its place
$user->update([
- 'alias' => null,
- 'has_alias' => 1
+ 'alias' => null,
+ 'has_alias' => 1,
]);
}
}
- $this->info("Migrated: User aliases");
+ $this->info('Migrated: User aliases');
+ } else {
+ $this->line('Skipped: User aliases (nothing to migrate)');
}
- else $this->line("Skipped: User aliases (nothing to migrate)");
+ } else {
+ $this->line('Skipped: User aliases (column no longer exists)');
}
- else $this->line("Skipped: User aliases (column no longer exists)");
$daAliases = UserAlias::where('site', 'dA')->get();
- if($daAliases->count()) {
+ if ($daAliases->count()) {
$this->line('Updating '.$daAliases->count().' deviantArt aliases...');
- foreach($daAliases as $alias) {
+ foreach ($daAliases as $alias) {
$alias->site = 'deviantart';
$alias->save();
}
$this->info('deviantArt aliases updated!');
+ } else {
+ $this->line('No deviantArt aliases to update!');
}
- else $this->line('No deviantArt aliases to update!');
- /** MOVE CHARACTER OWNER ALIASES */
- if(Schema::hasColumn('characters', 'owner_alias')) {
+ /* MOVE CHARACTER OWNER ALIASES */
+ if (Schema::hasColumn('characters', 'owner_alias')) {
// This and the following section operate on the assumption that all aliases to this point have been dA accounts
// Get characters with an owner identified by alias
$aliasCharacters = Character::whereNotNull('owner_alias')->get();
- if($aliasCharacters->count()) {
- foreach($aliasCharacters as $character) {
+ if ($aliasCharacters->count()) {
+ foreach ($aliasCharacters as $character) {
// Just in case, check to update character ownership
$userAlias = UserAlias::where('site', 'deviantart')->where('alias', $character->owner_alias)->first();
- if($userAlias) {
+ if ($userAlias) {
$character->update(['owner_alias' => null, 'user_id' => $userAlias->user_id]);
- }
- elseif(!$userAlias) {
+ } elseif (!$userAlias) {
$alias = $character->owner_alias;
$character->update(['owner_alias' => null, 'owner_url' => 'https://deviantart.com/'.$alias]);
}
}
- $this->info("Migrated: Character owner aliases");
+ $this->info('Migrated: Character owner aliases');
+ } else {
+ $this->line('Skipped: Character owner aliases (nothing to migrate)');
}
- else $this->line("Skipped: Character owner aliases (nothing to migrate)");
+ } else {
+ $this->line('Skipped: Character owner aliases (column no longer exists)');
}
- else $this->line("Skipped: Character owner aliases (column no longer exists)");
- if(Schema::hasColumn('character_image_creators', 'alias')) {
+ if (Schema::hasColumn('character_image_creators', 'alias')) {
/** MOVE CHARACTER IMAGE CREATOR ALIASES */
// Get character image creators with a set alias
$aliasImageCreators = CharacterImageCreator::whereNotNull('alias')->get();
- if($aliasImageCreators->count()){
- foreach($aliasImageCreators as $creator) {
+ if ($aliasImageCreators->count()) {
+ foreach ($aliasImageCreators as $creator) {
$userAlias = UserAlias::where('site', 'deviantart')->where('alias', $creator->alias)->first();
- if($userAlias) {
+ if ($userAlias) {
$creator->update(['alias' => null, 'user_id' => $userAlias->user_id]);
- }
- elseif(!$userAlias) {
+ } elseif (!$userAlias) {
$alias = $creator->alias;
$creator->update(['alias' => null, 'url' => 'https://deviantart.com/'.$alias]);
}
}
- $this->info("Migrated: Character image creator aliases");
+ $this->info('Migrated: Character image creator aliases');
+ } else {
+ $this->line('Skipped: Character image creator aliases (nothing to migrate)');
}
- else $this->line("Skipped: Character image creator aliases (nothing to migrate)");
+ } else {
+ $this->line('Skipped: Character image creator aliases (column no longer exists)');
}
- else $this->line("Skipped: Character image creator aliases (column no longer exists)");
- /** MOVE CHARACTER LOG ALIASES */
+ /* MOVE CHARACTER LOG ALIASES */
- if(Schema::hasColumn('character_log', 'recipient_alias') || Schema::hasColumn('character_log', 'sender_alias')) {
+ if (Schema::hasColumn('character_log', 'recipient_alias') || Schema::hasColumn('character_log', 'sender_alias')) {
// Get character logs with a set recipient alias
$aliasCharacterLogs = CharacterLog::whereNotNull('recipient_alias')->get();
$aliasCharacterLogsSender = CharacterLog::whereNotNull('sender_alias')->get();
- if($aliasCharacterLogs->count()) {
- foreach($aliasCharacterLogs as $characterLog) {
+ if ($aliasCharacterLogs->count()) {
+ foreach ($aliasCharacterLogs as $characterLog) {
$userAlias = UserAlias::where('site', 'deviantart')->where('alias', $characterLog->recipient_alias)->first();
- if($userAlias) {
+ if ($userAlias) {
$characterLog->update(['recipient_alias' => null, 'recipient_id' => $userAlias->user_id]);
- }
- elseif(!$userAlias) {
+ } elseif (!$userAlias) {
$alias = $characterLog->recipient_alias;
$characterLog->update(['recipient_alias' => null, 'recipient_url' => 'https://deviantart.com/'.$alias]);
}
}
- foreach($aliasCharacterLogsSender as $characterLog) {
+ foreach ($aliasCharacterLogsSender as $characterLog) {
$userAlias = UserAlias::where('site', 'deviantart')->where('alias', $characterLog->sender_alias)->first();
- if($userAlias) {
+ if ($userAlias) {
$characterLog->update(['sender_alias' => null, 'sender_id' => $userAlias->user_id]);
- }
- elseif(!$userAlias) {
+ } elseif (!$userAlias) {
$alias = $characterLog->sender_alias;
$characterLog->update(['sender_alias' => null, 'sender_url' => 'https://deviantart.com/'.$alias]);
}
}
- $this->info("Migrated: Character log aliases");
+ $this->info('Migrated: Character log aliases');
+ } else {
+ $this->line('Skipped: Character log aliases (nothing to migrate)');
}
- else $this->line("Skipped: Character log aliases (nothing to migrate)");
+ } else {
+ $this->line('Skipped: Character log aliases (column no longer exists)');
}
- else $this->line("Skipped: Character log aliases (column no longer exists)");
- if(Schema::hasColumn('user_character_log', 'recipient_alias') || Schema::hasColumn('user_character_log', 'sender_alias')) {
+ if (Schema::hasColumn('user_character_log', 'recipient_alias') || Schema::hasColumn('user_character_log', 'sender_alias')) {
// Get character logs with a set recipient alias
$aliasUserCharacterLogs = UserCharacterLog::whereNotNull('recipient_alias')->get();
$aliasUserCharacterLogsSender = UserCharacterLog::whereNotNull('sender_alias')->get();
- if($aliasUserCharacterLogs->count() || $aliasUserCharacterLogsSender->count()) {
- foreach($aliasUserCharacterLogs as $characterLog) {
+ if ($aliasUserCharacterLogs->count() || $aliasUserCharacterLogsSender->count()) {
+ foreach ($aliasUserCharacterLogs as $characterLog) {
$userAlias = UserAlias::where('site', 'deviantart')->where('alias', $characterLog->recipient_alias)->first();
- if($userAlias) {
+ if ($userAlias) {
$characterLog->update(['recipient_alias' => null, 'recipient_id' => $userAlias->user_id]);
- }
- elseif(!$userAlias) {
+ } elseif (!$userAlias) {
$alias = $characterLog->recipient_alias;
$characterLog->update(['recipient_alias' => null, 'recipient_url' => 'https://deviantart.com/'.$alias]);
}
}
- foreach($aliasUserCharacterLogsSender as $characterLog) {
+ foreach ($aliasUserCharacterLogsSender as $characterLog) {
$userAlias = UserAlias::where('site', 'deviantart')->where('alias', $characterLog->sender_alias)->first();
- if($userAlias) {
+ if ($userAlias) {
$characterLog->update(['sender_alias' => null, 'sender_id' => $userAlias->user_id]);
- }
- elseif(!$userAlias) {
+ } elseif (!$userAlias) {
$alias = $characterLog->sender_alias;
$characterLog->update(['sender_alias' => null, 'sender_url' => 'https://deviantart.com/'.$alias]);
}
}
- $this->info("Migrated: User character log aliases");
+ $this->info('Migrated: User character log aliases');
+ } else {
+ $this->line('Skipped: User character log aliases (nothing to migrate)');
}
- else $this->line("Skipped: User character log aliases (nothing to migrate)");
+ } else {
+ $this->line('Skipped: User character log aliases (column no longer exists)');
}
- else $this->line("Skipped: User character log aliases (column no longer exists)");
- if(Schema::hasColumn('items', 'artist_alias')) {
+ if (Schema::hasColumn('items', 'artist_alias')) {
// Get character logs with a set recipient alias
$aliasItemArtists = Item::whereNotNull('artist_alias')->get();
- if($aliasItemArtists->count()) {
- foreach($aliasItemArtists as $itemArtist) {
+ if ($aliasItemArtists->count()) {
+ foreach ($aliasItemArtists as $itemArtist) {
$userAlias = UserAlias::where('site', 'deviantart')->where('alias', $itemArtist->artist_alias)->first();
- if($userAlias) {
+ if ($userAlias) {
$itemArtist->update(['artist_alias' => null, 'artist_id' => $userAlias->user_id]);
- }
- elseif(!$userAlias) {
+ } elseif (!$userAlias) {
$alias = $itemArtist->artist_alias;
$itemArtist->update(['artist_alias' => null, 'artist_url' => 'https://deviantart.com/'.$alias]);
}
}
- $this->info("Migrated: Item artist aliases");
+ $this->info('Migrated: Item artist aliases');
+ } else {
+ $this->line('Skipped: Item artist aliases (nothing to migrate)');
}
- else $this->line("Skipped: Item artist aliases (nothing to migrate)");
+ } else {
+ $this->line('Skipped: Item artist aliases (column no longer exists)');
}
- else $this->line("Skipped: Item artist aliases (column no longer exists)");
- if($this->option('drop-columns')) {
+ if ($this->option('drop-columns')) {
// Drop alias columns from the impacted tables.
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('alias');
@@ -265,11 +264,14 @@ public function handle()
//
$table->dropColumn('artist_alias');
});
- $this->info("Dropped alias columns");
+ $this->info('Dropped alias columns');
+ } else {
+ $this->line('Skipped: Dropping alias columns');
}
- else $this->line("Skipped: Dropping alias columns");
$this->line("\nAlias information migrated!");
- if(!$this->option('drop-columns')) $this->line("After checking that all data has been moved from them,\nrun again with --drop-columns to drop alias columns if desired.");
+ if (!$this->option('drop-columns')) {
+ $this->line("After checking that all data has been moved from them,\nrun again with --drop-columns to drop alias columns if desired.");
+ }
}
}
diff --git a/app/Console/Commands/SetupAdminUser.php b/app/Console/Commands/SetupAdminUser.php
index 096f8ec963..7418703691 100644
--- a/app/Console/Commands/SetupAdminUser.php
+++ b/app/Console/Commands/SetupAdminUser.php
@@ -2,17 +2,15 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
-
use App;
-use Carbon\Carbon;
-use App\Services\UserService;
+use App\Models\Rank\Rank;
use App\Models\User\User;
use App\Models\User\UserAlias;
-use App\Models\Rank\Rank;
+use App\Services\UserService;
+use Carbon\Carbon;
+use Illuminate\Console\Command;
-class SetupAdminUser extends Command
-{
+class SetupAdminUser extends Command {
/**
* The name and signature of the console command.
*
@@ -29,11 +27,8 @@ class SetupAdminUser extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -42,28 +37,26 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
$this->info('********************');
$this->info('* ADMIN USER SETUP *');
$this->info('********************'."\n");
// First things first, check if user ranks exist...
- if(!Rank::count()) {
-
+ if (!Rank::count()) {
// These need to be created even if the seeder isn't run for the site to work correctly.
$adminRank = Rank::create([
- 'name' => 'Admin',
+ 'name' => 'Admin',
'description' => 'The site admin. Has the ability to view/edit any data on the site.',
- 'sort' => 1
+ 'sort' => 1,
]);
Rank::create([
- 'name' => 'Member',
+ 'name' => 'Member',
'description' => 'A regular member of the site.',
- 'sort' => 0
+ 'sort' => 0,
]);
- $this->line("User ranks not found. Default user ranks (admin and basic member) created.");
+ $this->line('User ranks not found. Default user ranks (admin and basic member) created.');
}
// Otherwise, grab the rank with the highest "sort" value. (This is the admin rank.)
else {
@@ -72,128 +65,126 @@ public function handle()
// Check if the admin user exists...
$user = User::where('rank_id', $adminRank->id)->first();
- if(!$user) {
-
+ if (!$user) {
$this->line('Setting up admin account. This account will have access to all site data, please make sure to keep the email and password secret!');
$name = $this->anticipate('Username', ['Admin', 'System']);
$email = $this->ask('Email Address');
$password = $this->secret('Password (hidden)');
$this->line("\nUsername: ".$name);
- $this->line("Email: ".$email);
- $confirm = $this->confirm("Proceed to create account with this information?");
+ $this->line('Email: '.$email);
+ $confirm = $this->confirm('Proceed to create account with this information?');
// If env variables indicate a local instance, double-check
// and then if so, help them set up verified email and alias
- if(App::environment('local')) {
- if($this->confirm('Are you on a local/testing instance and not a live site?')) {
- if($this->confirm('Would you like to mark your email address as verified and enter an alias now?')) {
+ if (App::environment('local')) {
+ if ($this->confirm('Are you on a local/testing instance and not a live site?')) {
+ if ($this->confirm('Would you like to mark your email address as verified and enter an alias now?')) {
$verifiedAt = Carbon::now();
$this->line('Provide an alias. By default, this will be entered as a deviantArt account name, but (assuming a local/testing environment) you may use any username.');
$alias = $this->ask('What alias would you like to use?');
}
- }
- else {
+ } else {
$this->info('Please adjust your APP_ENV to Production and APP_DEBUG to false in your .env file before continuing set-up!');
+
return;
}
}
- if($confirm) {
+ if ($confirm) {
$service = new UserService;
$user = $service->createUser([
- 'name' => $name,
- 'email' => $email,
- 'rank_id' => $adminRank->id,
+ 'name' => $name,
+ 'email' => $email,
+ 'rank_id' => $adminRank->id,
'password' => $password,
- 'dob' => [
- 'day' => '01',
+ 'dob' => [
+ 'day' => '01',
'month' => '01',
- 'year' => '1970'
+ 'year' => '1970',
],
- 'has_alias' => isset($alias) ? 1 : 0
+ 'has_alias' => isset($alias) ? 1 : 0,
]);
- if(isset($verifiedAt)) {
+ if (isset($verifiedAt)) {
$user->email_verified_at = $verifiedAt;
$user->save();
}
- if(isset($alias)) {
+ if (isset($alias)) {
UserAlias::create([
- 'user_id' => $user->id,
- 'site' => 'deviantart',
- 'alias' => $alias,
+ 'user_id' => $user->id,
+ 'site' => 'deviantart',
+ 'alias' => $alias,
'is_primary_alias' => 1,
- 'is_visible' => 1
+ 'is_visible' => 1,
]);
}
$this->line('Admin account created. You can now log in with the registered email and password.');
$this->line('If necessary, you can run this command again to change the email address and password of the admin account.');
+
return;
}
- }
- else {
+ } else {
// Change the admin email/password. Honestly you can do this with the forgotten password feature...
- $this->line('Admin account [' . $user->name . '] already exists.');
- if($this->confirm("Reset email address and password for this account?")) {
+ $this->line('Admin account ['.$user->name.'] already exists.');
+ if ($this->confirm('Reset email address and password for this account?')) {
$email = $this->ask('Email Address');
$password = $this->secret('Password (hidden)');
$this->line("\nEmail: ".$email);
- if($this->confirm("Proceed to change email address and password?")) {
+ if ($this->confirm('Proceed to change email address and password?')) {
$service = new UserService;
$service->updateUser([
- 'id' => $user->id,
- 'email' => $email,
- 'password' => $password
+ 'id' => $user->id,
+ 'email' => $email,
+ 'password' => $password,
]);
$this->line('Admin account email and password changed.');
-
}
}
// If env variables indicate a local instance, double-check
// and then if so, help them set up verified email and alias
- if(App::environment('local')) {
- if($this->confirm('Are you on a local/testing instance and not a live site?')) {
- if($this->confirm('Would you like to mark your email address as verified?')) {
+ if (App::environment('local')) {
+ if ($this->confirm('Are you on a local/testing instance and not a live site?')) {
+ if ($this->confirm('Would you like to mark your email address as verified?')) {
$verifiedAt = Carbon::now();
}
- if(!$user->has_alias && $this->confirm('Would you like to enter an alias now?')) {
+ if (!$user->has_alias && $this->confirm('Would you like to enter an alias now?')) {
$this->line('Provide an alias. By default, this will be entered as a deviantArt account name, but (assuming a local/testing environment) you may use any username.');
$alias = $this->ask('What alias would you like to use?');
}
- }
- else {
+ } else {
$this->info('Please adjust your APP_ENV to Production and APP_DEBUG to false in your .env file before continuing set-up!');
+
return;
}
- if(isset($verifiedAt)) {
+ if (isset($verifiedAt)) {
$this->line('Marking email address as verified...');
$user->email_verified_at = $verifiedAt;
$user->save();
}
- if(isset($alias)) {
+ if (isset($alias)) {
$this->line('Adding user alias...');
$user->update(['has_alias' => 1]);
UserAlias::create([
- 'user_id' => $user->id,
- 'site' => 'deviantart',
- 'alias' => $alias,
+ 'user_id' => $user->id,
+ 'site' => 'deviantart',
+ 'alias' => $alias,
'is_primary_alias' => 1,
- 'is_visible' => 1
+ 'is_visible' => 1,
]);
}
$this->line('Updates complete.');
}
+
return;
}
$this->line('Action cancelled.');
-
}
}
diff --git a/app/Console/Commands/UpdateExtensionTracker.php b/app/Console/Commands/UpdateExtensionTracker.php
index f334f1a2a5..5c1f33bd6a 100644
--- a/app/Console/Commands/UpdateExtensionTracker.php
+++ b/app/Console/Commands/UpdateExtensionTracker.php
@@ -2,12 +2,11 @@
namespace App\Console\Commands;
-use Illuminate\Console\Command;
-use DB;
use Config;
+use DB;
+use Illuminate\Console\Command;
-class UpdateExtensionTracker extends Command
-{
+class UpdateExtensionTracker extends Command {
/**
* The name and signature of the console command.
*
@@ -24,11 +23,8 @@ class UpdateExtensionTracker extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -37,8 +33,7 @@ public function __construct()
*
* @return mixed
*/
- public function handle()
- {
+ public function handle() {
$extensions = Config::get('lorekeeper.extension_tracker');
$this->info("\n".'****************************');
@@ -47,38 +42,35 @@ public function handle()
$this->line('Adding site extensions...existing entries will be updated.'."\n");
- foreach($extensions as $data)
- {
+ foreach ($extensions as $data) {
$extension = DB::table('site_extensions')->where('key', $data['key']);
- if(!$extension->exists())
- {
+ if (!$extension->exists()) {
DB::table('site_extensions')->insert([
- 'key' => $data['key'],
+ 'key' => $data['key'],
'wiki_key' => $data['wiki_key'],
'creators' => $data['creators'],
- 'version' => $data['version'],
+ 'version' => $data['version'],
]);
$this->info('Added: '.$data['key'].' / Version: '.$data['version']);
- }
- elseif($extension->first()->version != $data['version'])
- {
+ } elseif ($extension->first()->version != $data['version']) {
$this->info(ucfirst($data['key']).' version mismatch. Old version: '.$extension->first()->version.' / New version: '.$data['version']);
$confirm = $this->confirm('Do you want to update the listed version of '.$data['key'].' to '.$data['version'].'? This will not affect any other files.');
- if($confirm){
+ if ($confirm) {
DB::table('site_extensions')->where('key', $data['key'])->update([
- 'key' => $data['key'],
+ 'key' => $data['key'],
'wiki_key' => $data['wiki_key'],
'creators' => $data['creators'],
- 'version' => $data['version'],
+ 'version' => $data['version'],
]);
$this->info('Updated: '.$data['key'].' / Version: '.$data['version']);
+ } else {
+ $this->line('Skipped: '.$data['key'].' / Version: '.$extension->first()->version);
}
- else $this->line('Skipped: '.$data['key'].' / Version: '.$extension->first()->version);
+ } else {
+ $this->line('Skipped: '.$data['key'].' / Version: '.$data['version']);
}
- else $this->line('Skipped: '.$data['key'].' / Version: '.$data['version']);
}
-
- $this->info("\n".'All extensions are in tracker.'."\n");
+ $this->info("\n".'All extensions are in tracker.'."\n");
}
}
diff --git a/app/Console/Commands/UpdateLorekeeperV2.php b/app/Console/Commands/UpdateLorekeeperV2.php
index 129416f842..88201c547b 100644
--- a/app/Console/Commands/UpdateLorekeeperV2.php
+++ b/app/Console/Commands/UpdateLorekeeperV2.php
@@ -5,8 +5,7 @@
use App\Models\Comment;
use Illuminate\Console\Command;
-class UpdateLorekeeperV2 extends Command
-{
+class UpdateLorekeeperV2 extends Command {
/**
* The name and signature of the console command.
*
@@ -23,11 +22,8 @@ class UpdateLorekeeperV2 extends Command
/**
* Create a new command instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct();
}
@@ -36,15 +32,14 @@ public function __construct()
*
* @return int
*/
- public function handle()
- {
+ public function handle() {
$this->info('**************************');
$this->info('* UPDATE LOREKEEPER (V2) *');
$this->info('**************************'."\n");
// Check if the user has run composer
$this->info('This command should be run after updating packages using composer.');
- if($this->confirm('Have you run the composer update command or equivalent?')) {
+ if ($this->confirm('Have you run the composer update command or equivalent?')) {
// Migrate
$this->line('Running migrations...');
$this->call('migrate');
@@ -63,33 +58,37 @@ public function handle()
$this->line("\n".'Updating comments...');
// Folding in fix-child-comment-types for tidiness
$childComments = Comment::whereNotNull('child_id')->get();
- if($childComments->count()) {
+ if ($childComments->count()) {
$this->line('Updating '.$childComments->count().' child comments...');
- foreach($childComments as $comment) {
+ foreach ($childComments as $comment) {
$parent = Comment::find($comment->child_id);
- if(isset($parent->type) && $comment->type != $parent->type)
+ if (isset($parent->type) && $comment->type != $parent->type) {
$comment->update(['type' => $parent->type]);
+ }
}
$this->info('Child comments updated!');
+ } else {
+ $this->line('No child comments to update!');
}
- else $this->line('No child comments to update!');
// Folding in update-sales-comments for tidiness
$salesComments = Comment::where('commentable_type', 'App\Models\Sales')->get();
- if($salesComments->count()) {
+ if ($salesComments->count()) {
$this->line('Updating '.$salesComments->count().' sales comments...');
- foreach($salesComments as $comment) {
+ foreach ($salesComments as $comment) {
$comment->commentable_type = 'App\Models\Sales\Sales';
$comment->save();
}
$this->info('Sales comments updated!');
+ } else {
+ $this->line('No sales comments to update!');
}
- else $this->line('No sales comments to update!');
// Migrate aliases
$this->line("\n".'Updating alias information...');
$this->call('migrate-aliases');
+ } else {
+ $this->line('Aborting! Please run composer update and then run this command again.');
}
- else $this->line('Aborting! Please run composer update and then run this command again.');
}
}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index 2ec3d9aab5..db1287efb7 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -5,8 +5,7 @@
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
-class Kernel extends ConsoleKernel
-{
+class Kernel extends ConsoleKernel {
/**
* The Artisan commands provided by your application.
*
@@ -18,28 +17,20 @@ class Kernel extends ConsoleKernel
/**
* Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- * @return void
*/
- protected function schedule(Schedule $schedule)
- {
+ protected function schedule(Schedule $schedule) {
$schedule->command('check-news')
- ->everyMinute();
+ ->everyMinute();
$schedule->exec('rm public/images/avatars/*.tmp')
- ->daily();
+ ->daily();
$schedule->command('check-sales')
- ->everyMinute();
-
+ ->everyMinute();
}
/**
* Register the commands for the application.
- *
- * @return void
*/
- protected function commands()
- {
+ protected function commands() {
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
diff --git a/app/Events/CommentCreated.php b/app/Events/CommentCreated.php
index 3a6c243185..9bc8c56b02 100644
--- a/app/Events/CommentCreated.php
+++ b/app/Events/CommentCreated.php
@@ -2,22 +2,18 @@
namespace App\Events;
-use Illuminate\Queue\SerializesModels;
use App\Models\Comment;
+use Illuminate\Queue\SerializesModels;
-class CommentCreated
-{
+class CommentCreated {
use SerializesModels;
public $comment;
/**
* Create a new event instance.
- *
- * @return void
*/
- public function __construct(Comment $comment)
- {
+ public function __construct(Comment $comment) {
$this->comment = $comment;
}
}
diff --git a/app/Events/CommentDeleted.php b/app/Events/CommentDeleted.php
index 2eb694982d..af5f379032 100644
--- a/app/Events/CommentDeleted.php
+++ b/app/Events/CommentDeleted.php
@@ -2,22 +2,18 @@
namespace App\Events;
-use Illuminate\Queue\SerializesModels;
use App\Models\Comment;
+use Illuminate\Queue\SerializesModels;
-class CommentDeleted
-{
+class CommentDeleted {
use SerializesModels;
public $comment;
/**
* Create a new event instance.
- *
- * @return void
*/
- public function __construct(Comment $comment)
- {
+ public function __construct(Comment $comment) {
$this->comment = $comment;
}
}
diff --git a/app/Events/CommentUpdated.php b/app/Events/CommentUpdated.php
index 0c276f32b8..86d0922580 100644
--- a/app/Events/CommentUpdated.php
+++ b/app/Events/CommentUpdated.php
@@ -2,22 +2,18 @@
namespace App\Events;
-use Illuminate\Queue\SerializesModels;
use App\Models\Comment;
+use Illuminate\Queue\SerializesModels;
-class CommentUpdated
-{
+class CommentUpdated {
use SerializesModels;
public $comment;
/**
* Create a new event instance.
- *
- * @return void
*/
- public function __construct(Comment $comment)
- {
+ public function __construct(Comment $comment) {
$this->comment = $comment;
}
}
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index 376174d4ed..5ea241a030 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -2,12 +2,11 @@
namespace App\Exceptions;
-use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Validation\ValidationException;
+use Throwable;
-class Handler extends ExceptionHandler
-{
+class Handler extends ExceptionHandler {
/**
* A list of the exception types that are not reported.
*
@@ -30,11 +29,9 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
- * @param \Exception $exception
- * @return void
+ * @param \Exception $exception
*/
- public function report(Throwable $exception)
- {
+ public function report(Throwable $exception) {
if ($exception instanceof ValidationException) {
foreach ($exception->validator->errors()->all() as $message) {
flash($message)->error();
@@ -47,12 +44,12 @@ public function report(Throwable $exception)
/**
* Render an exception into an HTTP response.
*
- * @param \Illuminate\Http\Request $request
- * @param \Exception $exception
+ * @param \Illuminate\Http\Request $request
+ * @param \Exception $exception
+ *
* @return \Illuminate\Http\Response
*/
- public function render($request, Throwable $exception)
- {
+ public function render($request, Throwable $exception) {
return parent::render($request, $exception);
}
}
diff --git a/app/Facades/Notifications.php b/app/Facades/Notifications.php
index 2c39eaf656..682c9b3159 100644
--- a/app/Facades/Notifications.php
+++ b/app/Facades/Notifications.php
@@ -5,7 +5,7 @@
use Illuminate\Support\Facades\Facade;
class Notifications extends Facade {
-
- protected static function getFacadeAccessor() { return 'notifications'; }
-
-}
\ No newline at end of file
+ protected static function getFacadeAccessor() {
+ return 'notifications';
+ }
+}
diff --git a/app/Facades/Settings.php b/app/Facades/Settings.php
index d41cac1272..c75b230e7b 100644
--- a/app/Facades/Settings.php
+++ b/app/Facades/Settings.php
@@ -5,7 +5,7 @@
use Illuminate\Support\Facades\Facade;
class Settings extends Facade {
-
- protected static function getFacadeAccessor() { return 'settings'; }
-
-}
\ No newline at end of file
+ protected static function getFacadeAccessor() {
+ return 'settings';
+ }
+}
diff --git a/app/Helpers/AssetHelpers.php b/app/Helpers/AssetHelpers.php
index c796899d4d..b455f46cc7 100644
--- a/app/Helpers/AssetHelpers.php
+++ b/app/Helpers/AssetHelpers.php
@@ -14,92 +14,122 @@
* Gets the asset keys for an array depending on whether the
* assets being managed are owned by a user or character.
*
- * @param bool $isCharacter
+ * @param bool $isCharacter
+ *
* @return array
*/
-function getAssetKeys($isCharacter = false)
-{
- if(!$isCharacter) return ['items', 'currencies', 'raffle_tickets', 'loot_tables', 'user_items', 'characters'];
- else return ['currencies', 'items', 'character_items', 'loot_tables'];
+function getAssetKeys($isCharacter = false) {
+ if (!$isCharacter) {
+ return ['items', 'currencies', 'raffle_tickets', 'loot_tables', 'user_items', 'characters'];
+ } else {
+ return ['currencies', 'items', 'character_items', 'loot_tables'];
+ }
}
/**
* Gets the model name for an asset type.
* The asset type has to correspond to one of the asset keys above.
*
- * @param string $type
- * @param bool $namespaced
+ * @param string $type
+ * @param bool $namespaced
+ *
* @return string
*/
-function getAssetModelString($type, $namespaced = true)
-{
- switch($type)
- {
+function getAssetModelString($type, $namespaced = true) {
+ switch ($type) {
case 'items':
- if($namespaced) return '\App\Models\Item\Item';
- else return 'Item';
+ if ($namespaced) {
+ return '\App\Models\Item\Item';
+ } else {
+ return 'Item';
+ }
break;
case 'currencies':
- if($namespaced) return '\App\Models\Currency\Currency';
- else return 'Currency';
+ if ($namespaced) {
+ return '\App\Models\Currency\Currency';
+ } else {
+ return 'Currency';
+ }
break;
case 'raffle_tickets':
- if($namespaced) return '\App\Models\Raffle\Raffle';
- else return 'Raffle';
+ if ($namespaced) {
+ return '\App\Models\Raffle\Raffle';
+ } else {
+ return 'Raffle';
+ }
break;
case 'loot_tables':
- if($namespaced) return '\App\Models\Loot\LootTable';
- else return 'LootTable';
+ if ($namespaced) {
+ return '\App\Models\Loot\LootTable';
+ } else {
+ return 'LootTable';
+ }
break;
case 'user_items':
- if($namespaced) return '\App\Models\User\UserItem';
- else return 'UserItem';
+ if ($namespaced) {
+ return '\App\Models\User\UserItem';
+ } else {
+ return 'UserItem';
+ }
break;
case 'characters':
- if($namespaced) return '\App\Models\Character\Character';
- else return 'Character';
+ if ($namespaced) {
+ return '\App\Models\Character\Character';
+ } else {
+ return 'Character';
+ }
break;
case 'character_items':
- if($namespaced) return '\App\Models\Character\CharacterItem';
- else return 'CharacterItem';
+ if ($namespaced) {
+ return '\App\Models\Character\CharacterItem';
+ } else {
+ return 'CharacterItem';
+ }
break;
}
+
return null;
}
/**
* Initialises a new blank assets array, keyed by the asset type.
*
- * @param bool $isCharacter
+ * @param bool $isCharacter
+ *
* @return array
*/
-function createAssetsArray($isCharacter = false)
-{
+function createAssetsArray($isCharacter = false) {
$keys = getAssetKeys($isCharacter);
$assets = [];
- foreach($keys as $key) $assets[$key] = [];
+ foreach ($keys as $key) {
+ $assets[$key] = [];
+ }
+
return $assets;
}
/**
* Merges 2 asset arrays.
*
- * @param array $first
- * @param array $second
+ * @param array $first
+ * @param array $second
+ *
* @return array
*/
-function mergeAssetsArrays($first, $second)
-{
+function mergeAssetsArrays($first, $second) {
$keys = getAssetKeys();
- foreach($keys as $key)
- foreach($second[$key] as $item)
+ foreach ($keys as $key) {
+ foreach ($second[$key] as $item) {
addAsset($first, $item['asset'], $item['quantity']);
+ }
+ }
+
return $first;
}
@@ -107,15 +137,19 @@ function mergeAssetsArrays($first, $second)
* Adds an asset to the given array.
* If the asset already exists, it adds to the quantity.
*
- * @param array $array
- * @param mixed $asset
- * @param int $quantity
+ * @param array $array
+ * @param mixed $asset
+ * @param int $quantity
*/
-function addAsset(&$array, $asset, $quantity = 1)
-{
- if(!$asset) return;
- if(isset($array[$asset->assetType][$asset->id])) $array[$asset->assetType][$asset->id]['quantity'] += $quantity;
- else $array[$asset->assetType][$asset->id] = ['asset' => $asset, 'quantity' => $quantity];
+function addAsset(&$array, $asset, $quantity = 1) {
+ if (!$asset) {
+ return;
+ }
+ if (isset($array[$asset->assetType][$asset->id])) {
+ $array[$asset->assetType][$asset->id]['quantity'] += $quantity;
+ } else {
+ $array[$asset->assetType][$asset->id] = ['asset' => $asset, 'quantity' => $quantity];
+ }
}
/**
@@ -123,21 +157,22 @@ function addAsset(&$array, $asset, $quantity = 1)
* where each asset is listed in [id => quantity] format.
* json_encode this and store in the data attribute.
*
- * @param array $array
- * @param bool $isCharacter
+ * @param array $array
+ * @param bool $isCharacter
+ *
* @return array
*/
-function getDataReadyAssets($array, $isCharacter = false)
-{
+function getDataReadyAssets($array, $isCharacter = false) {
$result = [];
- foreach($array as $key => $type)
- {
- if($type && !isset($result[$key])) $result[$key] = [];
- foreach($type as $assetId => $assetData)
- {
+ foreach ($array as $key => $type) {
+ if ($type && !isset($result[$key])) {
+ $result[$key] = [];
+ }
+ foreach ($type as $assetId => $assetData) {
$result[$key][$assetId] = $assetData['quantity'];
}
}
+
return $result;
}
@@ -146,27 +181,24 @@ function getDataReadyAssets($array, $isCharacter = false)
* basically reversing the above function.
* Use the data attribute after json_decode()ing it.
*
- * @param array $array
+ * @param array $array
+ *
* @return array
*/
-function parseAssetData($array)
-{
+function parseAssetData($array) {
$assets = createAssetsArray();
- foreach($array as $key => $contents)
- {
+ foreach ($array as $key => $contents) {
$model = getAssetModelString($key);
- if($model)
- {
- foreach($contents as $id => $quantity)
- {
+ if ($model) {
+ foreach ($contents as $id => $quantity) {
$assets[$key][$id] = [
- 'asset' => $model::find($id),
- 'quantity' => $quantity
+ 'asset' => $model::find($id),
+ 'quantity' => $quantity,
];
}
-
}
}
+
return $assets;
}
@@ -174,58 +206,62 @@ function parseAssetData($array)
* Distributes the assets in an assets array to the given recipient (user).
* Loot tables will be rolled before distribution.
*
- * @param array $assets
- * @param \App\Models\User\User $sender
- * @param \App\Models\User\User $recipient
- * @param string $logType
- * @param string $data
+ * @param array $assets
+ * @param \App\Models\User\User $sender
+ * @param \App\Models\User\User $recipient
+ * @param string $logType
+ * @param string $data
+ *
* @return array
*/
-function fillUserAssets($assets, $sender, $recipient, $logType, $data)
-{
+function fillUserAssets($assets, $sender, $recipient, $logType, $data) {
// Roll on any loot tables
- if(isset($assets['loot_tables']))
- {
- foreach($assets['loot_tables'] as $table)
- {
+ if (isset($assets['loot_tables'])) {
+ foreach ($assets['loot_tables'] as $table) {
$assets = mergeAssetsArrays($assets, $table['asset']->roll($table['quantity']));
}
unset($assets['loot_tables']);
}
- foreach($assets as $key => $contents)
- {
- if($key == 'items' && count($contents))
- {
+ foreach ($assets as $key => $contents) {
+ if ($key == 'items' && count($contents)) {
$service = new \App\Services\InventoryManager;
- foreach($contents as $asset)
- if(!$service->creditItem($sender, $recipient, $logType, $data, $asset['asset'], $asset['quantity'])) return false;
- }
- elseif($key == 'currencies' && count($contents))
- {
+ foreach ($contents as $asset) {
+ if (!$service->creditItem($sender, $recipient, $logType, $data, $asset['asset'], $asset['quantity'])) {
+ return false;
+ }
+ }
+ } elseif ($key == 'currencies' && count($contents)) {
$service = new \App\Services\CurrencyManager;
- foreach($contents as $asset)
- if(!$service->creditCurrency($sender, $recipient, $logType, $data['data'], $asset['asset'], $asset['quantity'])) return false;
- }
- elseif($key == 'raffle_tickets' && count($contents))
- {
+ foreach ($contents as $asset) {
+ if (!$service->creditCurrency($sender, $recipient, $logType, $data['data'], $asset['asset'], $asset['quantity'])) {
+ return false;
+ }
+ }
+ } elseif ($key == 'raffle_tickets' && count($contents)) {
$service = new \App\Services\RaffleManager;
- foreach($contents as $asset)
- if(!$service->addTicket($recipient, $asset['asset'], $asset['quantity'])) return false;
- }
- elseif($key == 'user_items' && count($contents))
- {
+ foreach ($contents as $asset) {
+ if (!$service->addTicket($recipient, $asset['asset'], $asset['quantity'])) {
+ return false;
+ }
+ }
+ } elseif ($key == 'user_items' && count($contents)) {
$service = new \App\Services\InventoryManager;
- foreach($contents as $asset)
- if(!$service->moveStack($sender, $recipient, $logType, $data, $asset['asset'])) return false;
- }
- elseif($key == 'characters' && count($contents))
- {
+ foreach ($contents as $asset) {
+ if (!$service->moveStack($sender, $recipient, $logType, $data, $asset['asset'])) {
+ return false;
+ }
+ }
+ } elseif ($key == 'characters' && count($contents)) {
$service = new \App\Services\CharacterManager;
- foreach($contents as $asset)
- if(!$service->moveCharacter($asset['asset'], $recipient, $data, $asset['quantity'], $logType)) return false;
+ foreach ($contents as $asset) {
+ if (!$service->moveCharacter($asset['asset'], $recipient, $data, $asset['quantity'], $logType)) {
+ return false;
+ }
+ }
}
}
+
return $assets;
}
@@ -233,43 +269,47 @@ function fillUserAssets($assets, $sender, $recipient, $logType, $data)
* Distributes the assets in an assets array to the given recipient (character).
* Loot tables will be rolled before distribution.
*
- * @param array $assets
- * @param \App\Models\User\User $sender
- * @param \App\Models\Character\Character $recipient
- * @param string $logType
- * @param string $data
+ * @param array $assets
+ * @param \App\Models\User\User $sender
+ * @param \App\Models\Character\Character $recipient
+ * @param string $logType
+ * @param string $data
+ * @param mixed|null $submitter
+ *
* @return array
*/
-function fillCharacterAssets($assets, $sender, $recipient, $logType, $data, $submitter = null)
-{
- if(!Config::get('lorekeeper.extensions.character_reward_expansion.default_recipient') && $recipient->user) $item_recipient = $recipient->user;
- else $item_recipient = $submitter;
-
+function fillCharacterAssets($assets, $sender, $recipient, $logType, $data, $submitter = null) {
+ if (!Config::get('lorekeeper.extensions.character_reward_expansion.default_recipient') && $recipient->user) {
+ $item_recipient = $recipient->user;
+ } else {
+ $item_recipient = $submitter;
+ }
// Roll on any loot tables
- if(isset($assets['loot_tables']))
- {
- foreach($assets['loot_tables'] as $table)
- {
+ if (isset($assets['loot_tables'])) {
+ foreach ($assets['loot_tables'] as $table) {
$assets = mergeAssetsArrays($assets, $table['asset']->roll($table['quantity']));
}
unset($assets['loot_tables']);
}
- foreach($assets as $key => $contents)
- {
- if($key == 'currencies' && count($contents))
- {
+ foreach ($assets as $key => $contents) {
+ if ($key == 'currencies' && count($contents)) {
$service = new \App\Services\CurrencyManager;
- foreach($contents as $asset)
- if(!$service->creditCurrency($sender, ( $asset['asset']->is_character_owned ? $recipient : $item_recipient), $logType, $data['data'], $asset['asset'], $asset['quantity'])) return false;
- }
- elseif($key == 'items' && count($contents))
- {
+ foreach ($contents as $asset) {
+ if (!$service->creditCurrency($sender, ($asset['asset']->is_character_owned ? $recipient : $item_recipient), $logType, $data['data'], $asset['asset'], $asset['quantity'])) {
+ return false;
+ }
+ }
+ } elseif ($key == 'items' && count($contents)) {
$service = new \App\Services\InventoryManager;
- foreach($contents as $asset)
- if(!$service->creditItem($sender, ( ($asset['asset']->category && $asset['asset']->category->is_character_owned) ? $recipient : $item_recipient), $logType, $data, $asset['asset'], $asset['quantity'])) return false;
+ foreach ($contents as $asset) {
+ if (!$service->creditItem($sender, (($asset['asset']->category && $asset['asset']->category->is_character_owned) ? $recipient : $item_recipient), $logType, $data, $asset['asset'], $asset['quantity'])) {
+ return false;
+ }
+ }
}
}
+
return $assets;
}
diff --git a/app/Helpers/Helpers.php b/app/Helpers/Helpers.php
index 302c9bbd38..de654153ed 100644
--- a/app/Helpers/Helpers.php
+++ b/app/Helpers/Helpers.php
@@ -12,18 +12,20 @@
/**
* Returns class name if the current URL corresponds to the given path.
*
- * @param string $path
- * @param string $class
+ * @param string $path
+ * @param string $class
+ *
* @return string
*/
function set_active($path, $class = 'active') {
- return call_user_func_array('Request::is', (array)$path) ? $class : '';
+ return call_user_func_array('Request::is', (array) $path) ? $class : '';
}
/**
* Adds a help icon with a tooltip.
*
- * @param string $text
+ * @param string $text
+ *
* @return string
*/
function add_help($text) {
@@ -33,23 +35,30 @@ function add_help($text) {
/**
* Uses the given array to generate breadcrumb links.
*
- * @param array $links
+ * @param array $links
+ *
* @return string
*/
function breadcrumbs($links) {
$ret = '';
$count = 0;
$ret .= ''.config('lorekeeper.settings.site_name', 'Lorekeeper').' ';
- foreach($links as $key => $link) {
+ foreach ($links as $key => $link) {
$isLast = ($count == count($links) - 1);
$ret .= '';
- if(!$isLast) $ret .= '';
- $ret .= $key;
- if(!$isLast) $ret .= ' ';
+ if (!$isLast) {
+ $ret .= '';
+ }
+ $ret .= $key;
+ if (!$isLast) {
+ $ret .= ' ';
+ }
$ret .= ' ';
@@ -63,22 +72,26 @@ function breadcrumbs($links) {
/**
* Formats the timestamp to a standard format.
*
- * @param \Illuminate\Support\Carbon\Carbon $timestamp
+ * @param \Illuminate\Support\Carbon\Carbon $timestamp
+ * @param mixed $showTime
+ *
* @return string
*/
function format_date($timestamp, $showTime = true) {
- return $timestamp->format('j F Y' . ($showTime ? ', H:i:s' : '')) . ($showTime ? ' ' . strtoupper($timestamp->timezone->getAbbreviatedName($timestamp->isDST())) . ' ' : '');
+ return $timestamp->format('j F Y'.($showTime ? ', H:i:s' : '')).($showTime ? ' '.strtoupper($timestamp->timezone->getAbbreviatedName($timestamp->isDST())).' ' : '');
}
function pretty_date($timestamp, $showTime = true) {
- return '' .$timestamp->diffForHumans() . ' ';
+ return ''.$timestamp->diffForHumans().' ';
}
/**
* Formats a number to fit the number of digits given,
* for generating masterlist numbers.
*
- * @param \Illuminate\Support\Carbon\Carbon $timestamp
+ * @param mixed $number
+ * @param mixed $digits
+ *
* @return string
*/
function format_masterlist_number($number, $digits) {
@@ -88,27 +101,29 @@ function format_masterlist_number($number, $digits) {
/**
* Parses a piece of user-entered text for HTML output and optionally gets pings.
*
- * @param string $text
- * @param array $pings
+ * @param string $text
+ * @param array $pings
+ *
* @return string
*/
function parse($text, &$pings = null) {
- if(!$text) return null;
+ if (!$text) {
+ return null;
+ }
- require_once(base_path().'/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php');
+ require_once base_path().'/vendor/ezyang/htmlpurifier/library/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('Attr.EnableID', true);
$config->set('HTML.DefinitionID', 'include');
$config->set('HTML.DefinitionRev', 2);
- $config->set('Cache.DefinitionImpl', null); // TODO: remove this later!
+ $config->set('Cache.DefinitionImpl', null); // TODO: remove this later!
if ($def = $config->maybeGetRawHTMLDefinition()) {
- $def->addElement('include', 'Block', 'Empty', 'Common', array('file*' => 'URI', 'height' => 'Text', 'width' => 'Text'));
- $def->addAttribute('a', 'data-toggle', 'Enum#collapse,tab');
- $def->addAttribute('a', 'aria-expanded', 'Enum#true,false');
- $def->addAttribute('a', 'data-target', 'Text');
- $def->addAttribute('div', 'data-parent', 'Text');
-
+ $def->addElement('include', 'Block', 'Empty', 'Common', ['file*' => 'URI', 'height' => 'Text', 'width' => 'Text']);
+ $def->addAttribute('a', 'data-toggle', 'Enum#collapse,tab');
+ $def->addAttribute('a', 'aria-expanded', 'Enum#true,false');
+ $def->addAttribute('a', 'data-target', 'Text');
+ $def->addAttribute('div', 'data-parent', 'Text');
}
$purifier = new HTMLPurifier($config);
@@ -118,7 +133,9 @@ function parse($text, &$pings = null) {
$text = parseUsers($text, $users);
$text = parseCharacters($text, $characters);
$text = parseGalleryThumbs($text, $submissions);
- if($pings) $pings = ['users' => $users, 'characters' => $characters];
+ if ($pings) {
+ $pings = ['users' => $users, 'characters' => $characters];
+ }
return $text;
}
@@ -127,19 +144,20 @@ function parse($text, &$pings = null) {
* Parses a piece of user-entered text to match user mentions
* and replace with a link.
*
- * @param string $text
- * @param mixed $users
+ * @param string $text
+ * @param mixed $users
+ *
* @return string
*/
function parseUsers($text, &$users) {
$matches = null;
$users = [];
$count = preg_match_all('/\B@([A-Za-z0-9_-]+)/', $text, $matches);
- if($count) {
+ if ($count) {
$matches = array_unique($matches[1]);
- foreach($matches as $match) {
+ foreach ($matches as $match) {
$user = \App\Models\User\User::where('name', $match)->first();
- if($user) {
+ if ($user) {
$users[] = $user;
$text = preg_replace('/\B@'.$match.'/', $user->displayName, $text);
}
@@ -153,19 +171,20 @@ function parseUsers($text, &$users) {
* Parses a piece of user-entered text to match character mentions
* and replace with a link.
*
- * @param string $text
- * @param mixed $characters
+ * @param string $text
+ * @param mixed $characters
+ *
* @return string
*/
function parseCharacters($text, &$characters) {
$matches = null;
$characters = [];
$count = preg_match_all('/\[character=([^\[\]&<>?"\']+)\]/', $text, $matches);
- if($count) {
+ if ($count) {
$matches = array_unique($matches[1]);
- foreach($matches as $match) {
+ foreach ($matches as $match) {
$character = \App\Models\Character\Character::where('slug', $match)->first();
- if($character) {
+ if ($character) {
$characters[] = $character;
$text = preg_replace('/\[character='.$match.'\]/', $character->displayName, $text);
}
@@ -179,19 +198,20 @@ function parseCharacters($text, &$characters) {
* Parses a piece of user-entered text to match gallery submission thumb mentions
* and replace with a link.
*
- * @param string $text
- * @param mixed $submissions
+ * @param string $text
+ * @param mixed $submissions
+ *
* @return string
*/
function parseGalleryThumbs($text, &$submissions) {
$matches = null;
$submissions = [];
$count = preg_match_all('/\[thumb=([^\[\]&<>?"\']+)\]/', $text, $matches);
- if($count) {
+ if ($count) {
$matches = array_unique($matches[1]);
- foreach($matches as $match) {
+ foreach ($matches as $match) {
$submission = \App\Models\Gallery\GallerySubmission::where('id', $match)->first();
- if($submission) {
+ if ($submission) {
$submissions[] = $submission;
$text = preg_replace('/\[thumb='.$match.'\]/', ''.view('widgets._gallery_thumb', ['submission' => $submission]).' ', $text);
}
@@ -204,14 +224,17 @@ function parseGalleryThumbs($text, &$submissions) {
/**
* Generates a string of random characters of the specified length.
*
- * @param int $characters
+ * @param int $characters
+ *
* @return string
*/
-function randomString($characters)
-{
+function randomString($characters) {
$src = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
$code = '';
- for ($i = 0; $i < $characters; $i++) $code .= $src[mt_rand(0, strlen($src) - 1)];
+ for ($i = 0; $i < $characters; $i++) {
+ $code .= $src[mt_rand(0, strlen($src) - 1)];
+ }
+
return $code;
}
@@ -219,13 +242,13 @@ function randomString($characters)
* Check that a url is from a site used for authentication,
* and if it belongs to a user.
*
- * @param string $url
- * @param bool $failOnError
+ * @param string $url
+ * @param bool $failOnError
+ *
* @return \App\Models\User\User|string
*/
-function checkAlias($url, $failOnError = true)
-{
- if($url) {
+function checkAlias($url, $failOnError = true) {
+ if ($url) {
$recipient = null;
$matches = [];
// Check to see if url is 1. from a site used for auth
@@ -259,37 +282,52 @@ function checkAlias($url, $failOnError = true)
/**
* Prettifies links to user profiles on various sites in a "user@site" format.
*
- * @param string $url
+ * @param string $url
+ *
* @return string
*/
-function prettyProfileLink($url)
-{
+function prettyProfileLink($url) {
$matches = [];
// Check different sites and return site if a match is made, plus username (retreived from the URL)
- foreach(Config::get('lorekeeper.sites') as $siteName=>$siteInfo) {
- if(preg_match_all($siteInfo['regex'], $url, $matches)) {$site = $siteName; $name = $matches[1][0]; $link = $matches[0][0]; break;}
+ foreach (Config::get('lorekeeper.sites') as $siteName=>$siteInfo) {
+ if (preg_match_all($siteInfo['regex'], $url, $matches)) {
+ $site = $siteName;
+ $name = $matches[1][0];
+ $link = $matches[0][0];
+ break;
+ }
}
// Return formatted link if possible; failing that, an unformatted link
- if(isset($name) && isset($site) && isset($link)) return ''.$name.'@'.(Config::get('lorekeeper.sites.'.$site.'.display_name') != null ? Config::get('lorekeeper.sites.'.$site.'.display_name') : $site).' ';
- else return ''.$url.' ';
+ if (isset($name) && isset($site) && isset($link)) {
+ return ''.$name.'@'.(Config::get('lorekeeper.sites.'.$site.'.display_name') != null ? Config::get('lorekeeper.sites.'.$site.'.display_name') : $site).' ';
+ } else {
+ return ''.$url.' ';
+ }
}
/**
* Prettifies user profile names for use in various functions.
*
- * @param string $url
+ * @param string $url
+ *
* @return string
*/
-function prettyProfileName($url)
-{
+function prettyProfileName($url) {
$matches = [];
// Check different sites and return site if a match is made, plus username (retreived from the URL)
- foreach(Config::get('lorekeeper.sites') as $siteName=>$siteInfo) {
- if(preg_match_all($siteInfo['regex'], $url, $matches)) {$site = $siteName; $name = $matches[1][0]; break;}
+ foreach (Config::get('lorekeeper.sites') as $siteName=>$siteInfo) {
+ if (preg_match_all($siteInfo['regex'], $url, $matches)) {
+ $site = $siteName;
+ $name = $matches[1][0];
+ break;
+ }
}
// Return formatted name if possible; failing that, an unformatted url
- if(isset($name) && isset($site)) return $name.'@'.(Config::get('lorekeeper.sites.'.$site.'.display_name') != null ? Config::get('lorekeeper.sites.'.$site.'.display_name') : $site);
- else return $url;
+ if (isset($name) && isset($site)) {
+ return $name.'@'.(Config::get('lorekeeper.sites.'.$site.'.display_name') != null ? Config::get('lorekeeper.sites.'.$site.'.display_name') : $site);
+ } else {
+ return $url;
+ }
}
diff --git a/app/Helpers/Notifications.php b/app/Helpers/Notifications.php
index 38957fa6a9..23fc283108 100644
--- a/app/Helpers/Notifications.php
+++ b/app/Helpers/Notifications.php
@@ -2,11 +2,10 @@
namespace App\Helpers;
-use DB;
use App\Models\Notification;
+use DB;
class Notifications {
-
/*
|--------------------------------------------------------------------------
| Notifications
@@ -19,13 +18,13 @@ class Notifications {
/**
* Creates a new notification.
*
- * @param string $type
- * @param \App\Models\User\User $user
- * @param array $data
+ * @param string $type
+ * @param \App\Models\User\User $user
+ * @param array $data
+ *
* @return bool
*/
- public function create($type, $user, $data)
- {
+ public function create($type, $user, $data) {
DB::beginTransaction();
try {
@@ -33,18 +32,20 @@ public function create($type, $user, $data)
'user_id' => $user->id,
'notification_type_id' => Notification::getNotificationId($type),
'data' => json_encode($data),
- 'is_unread' => 1
+ 'is_unread' => 1,
]);
$user->notifications_unread++;
$user->save();
-
+
DB::commit();
+
return true;
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
DB::rollback();
+
return false;
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Settings.php b/app/Helpers/Settings.php
index e0dd3a087b..7d80ac23fe 100644
--- a/app/Helpers/Settings.php
+++ b/app/Helpers/Settings.php
@@ -5,7 +5,6 @@
use DB;
class Settings {
-
/*
|--------------------------------------------------------------------------
| Settings
@@ -18,13 +17,16 @@ class Settings {
/**
* Gets a site setting.
*
- * @param string $key
+ * @param string $key
+ *
* @return mixed|null
*/
- public function get($key)
- {
+ public function get($key) {
$setting = DB::table('site_settings')->where('key', $key)->first();
- if($setting) return $setting->value;
- else return null;
+ if ($setting) {
+ return $setting->value;
+ } else {
+ return null;
+ }
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/Admin/Characters/CharacterController.php b/app/Http/Controllers/Admin/Characters/CharacterController.php
index 61255ba293..f3cef7bb26 100644
--- a/app/Http/Controllers/Admin/Characters/CharacterController.php
+++ b/app/Http/Controllers/Admin/Characters/CharacterController.php
@@ -2,31 +2,25 @@
namespace App\Http\Controllers\Admin\Characters;
-use Illuminate\Http\Request;
-
-use Auth;
-use Config;
-use Settings;
-
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
use App\Models\Character\CharacterCategory;
+use App\Models\Character\CharacterTransfer;
+use App\Models\Feature\Feature;
use App\Models\Rarity;
-use App\Models\User\User;
use App\Models\Species\Species;
use App\Models\Species\Subtype;
-use App\Models\Feature\Feature;
-use App\Models\Character\CharacterTransfer;
use App\Models\Trade;
+use App\Models\User\User;
use App\Models\User\UserItem;
-
use App\Services\CharacterManager;
-use App\Services\CurrencyManager;
use App\Services\TradeManager;
+use Auth;
+use Config;
+use Illuminate\Http\Request;
+use Settings;
-use App\Http\Controllers\Controller;
-
-class CharacterController extends Controller
-{
+class CharacterController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Character Controller
@@ -39,12 +33,11 @@ class CharacterController extends Controller
/**
* Gets the next number for a character in a category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
+ * @param App\Services\CharacterManager $service
+ *
* @return string
*/
- public function getPullNumber(Request $request, CharacterManager $service)
- {
+ public function getPullNumber(Request $request, CharacterManager $service) {
return $service->pullNumber($request->get('category'));
}
@@ -53,16 +46,15 @@ public function getPullNumber(Request $request, CharacterManager $service)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateCharacter()
- {
+ public function getCreateCharacter() {
return view('admin.masterlist.create_character', [
- 'categories' => CharacterCategory::orderBy('sort')->get(),
+ 'categories' => CharacterCategory::orderBy('sort')->get(),
'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
- 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['0' => 'Pick a Species First'],
- 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
- 'isMyo' => false
+ 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtypes' => ['0' => 'Pick a Species First'],
+ 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
+ 'isMyo' => false,
]);
}
@@ -71,41 +63,39 @@ public function getCreateCharacter()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateMyo()
- {
+ public function getCreateMyo() {
return view('admin.masterlist.create_character', [
'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
- 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['0' => 'Pick a Species First'],
- 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
- 'isMyo' => true
+ 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtypes' => ['0' => 'Pick a Species First'],
+ 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
+ 'isMyo' => true,
]);
}
/**
- * Shows the edit image subtype portion of the modal
+ * Shows the edit image subtype portion of the modal.
*
- * @param Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getCreateCharacterMyoSubtype(Request $request) {
- $species = $request->input('species');
- return view('admin.masterlist._create_character_subtype', [
- 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id','=',$species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'isMyo' => $request->input('myo')
- ]);
+ $species = $request->input('species');
+
+ return view('admin.masterlist._create_character_subtype', [
+ 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id', '=', $species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'isMyo' => $request->input('myo'),
+ ]);
}
/**
* Creates a character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
+ * @param App\Services\CharacterManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateCharacter(Request $request, CharacterManager $service)
- {
+ public function postCreateCharacter(Request $request, CharacterManager $service) {
$request->validate(Character::$createRules);
$data = $request->only([
'user_id', 'owner_url', 'character_category_id', 'number', 'slug',
@@ -115,27 +105,29 @@ public function postCreateCharacter(Request $request, CharacterManager $service)
'designer_id', 'designer_url',
'artist_id', 'artist_url',
'species_id', 'subtype_id', 'rarity_id', 'feature_id', 'feature_data',
- 'image', 'thumbnail', 'image_description'
+ 'image', 'thumbnail', 'image_description',
]);
if ($character = $service->createCharacter($data, Auth::user())) {
flash('Character created successfully.')->success();
+
return redirect()->to($character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Creates an MYO slot.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
+ * @param App\Services\CharacterManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateMyo(Request $request, CharacterManager $service)
- {
+ public function postCreateMyo(Request $request, CharacterManager $service) {
$request->validate(Character::$myoRules);
$data = $request->only([
'user_id', 'owner_url', 'name',
@@ -145,408 +137,469 @@ public function postCreateMyo(Request $request, CharacterManager $service)
'designer_id', 'designer_url',
'artist_id', 'artist_url',
'species_id', 'subtype_id', 'rarity_id', 'feature_id', 'feature_data',
- 'image', 'thumbnail'
+ 'image', 'thumbnail',
]);
if ($character = $service->createCharacter($data, Auth::user(), true)) {
flash('MYO slot created successfully.')->success();
+
return redirect()->to($character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Shows the edit character stats modal.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditCharacterStats($slug)
- {
+ public function getEditCharacterStats($slug) {
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
return view('character.admin._edit_stats_modal', [
- 'character' => $this->character,
- 'categories' => CharacterCategory::orderBy('sort')->pluck('name', 'id')->toArray(),
+ 'character' => $this->character,
+ 'categories' => CharacterCategory::orderBy('sort')->pluck('name', 'id')->toArray(),
'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
- 'number' => format_masterlist_number($this->character->number, Config::get('lorekeeper.settings.character_number_digits')),
- 'isMyo' => false
+ 'number' => format_masterlist_number($this->character->number, Config::get('lorekeeper.settings.character_number_digits')),
+ 'isMyo' => false,
]);
}
/**
* Shows the edit MYO stats modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditMyoStats($id)
- {
+ public function getEditMyoStats($id) {
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
return view('character.admin._edit_stats_modal', [
- 'character' => $this->character,
+ 'character' => $this->character,
'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
- 'isMyo' => true
+ 'isMyo' => true,
]);
}
/**
* Edits a character's stats.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditCharacterStats(Request $request, CharacterManager $service, $slug)
- {
+ public function postEditCharacterStats(Request $request, CharacterManager $service, $slug) {
$request->validate(Character::$updateRules);
$data = $request->only([
'character_category_id', 'number', 'slug',
'is_giftable', 'is_tradeable', 'is_sellable', 'sale_value',
- 'transferrable_at'
+ 'transferrable_at',
]);
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->updateCharacterStats($data, $this->character, Auth::user())) {
flash('Character stats updated successfully.')->success();
+
return redirect()->to($this->character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Edits an MYO slot's stats.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditMyoStats(Request $request, CharacterManager $service, $id)
- {
+ public function postEditMyoStats(Request $request, CharacterManager $service, $id) {
$request->validate(Character::$myoRules);
$data = $request->only([
'name',
'is_giftable', 'is_tradeable', 'is_sellable', 'sale_value',
- 'transferrable_at'
+ 'transferrable_at',
]);
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->updateCharacterStats($data, $this->character, Auth::user())) {
flash('Character stats updated successfully.')->success();
+
return redirect()->to($this->character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Shows the edit character description modal.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditCharacterDescription($slug)
- {
+ public function getEditCharacterDescription($slug) {
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
return view('character.admin._edit_description_modal', [
'character' => $this->character,
- 'isMyo' => false
+ 'isMyo' => false,
]);
}
/**
* Shows the edit MYO slot description modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditMyoDescription($id)
- {
+ public function getEditMyoDescription($id) {
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
return view('character.admin._edit_description_modal', [
'character' => $this->character,
- 'isMyo' => true
+ 'isMyo' => true,
]);
}
/**
* Edits a character's description.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditCharacterDescription(Request $request, CharacterManager $service, $slug)
- {
+ public function postEditCharacterDescription(Request $request, CharacterManager $service, $slug) {
$data = $request->only([
- 'description'
+ 'description',
]);
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->updateCharacterDescription($data, $this->character, Auth::user())) {
flash('Character description updated successfully.')->success();
+
return redirect()->to($this->character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Edits an MYO slot's description.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditMyoDescription(Request $request, CharacterManager $service, $id)
- {
+ public function postEditMyoDescription(Request $request, CharacterManager $service, $id) {
$data = $request->only([
- 'description'
+ 'description',
]);
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->updateCharacterDescription($data, $this->character, Auth::user())) {
flash('Character description updated successfully.')->success();
+
return redirect()->to($this->character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Edits a character's settings.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCharacterSettings(Request $request, CharacterManager $service, $slug)
- {
+ public function postCharacterSettings(Request $request, CharacterManager $service, $slug) {
$data = $request->only([
- 'is_visible'
+ 'is_visible',
]);
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->updateCharacterSettings($data, $this->character, Auth::user())) {
flash('Character settings updated successfully.')->success();
+
return redirect()->to($this->character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Edits an MYO slot's settings.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postMyoSettings(Request $request, CharacterManager $service, $id)
- {
+ public function postMyoSettings(Request $request, CharacterManager $service, $id) {
$data = $request->only([
- 'is_visible'
+ 'is_visible',
]);
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->updateCharacterSettings($data, $this->character, Auth::user())) {
flash('Character settings updated successfully.')->success();
+
return redirect()->to($this->character->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back()->withInput();
}
/**
* Shows the delete character modal.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterDelete($slug)
- {
+ public function getCharacterDelete($slug) {
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
return view('character.admin._delete_character_modal', [
'character' => $this->character,
- 'isMyo' => false
+ 'isMyo' => false,
]);
}
/**
* Shows the delete MYO slot modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getMyoDelete($id)
- {
+ public function getMyoDelete($id) {
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
return view('character.admin._delete_character_modal', [
'character' => $this->character,
- 'isMyo' => true
+ 'isMyo' => true,
]);
}
/**
* Deletes a character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCharacterDelete(Request $request, CharacterManager $service, $slug)
- {
+ public function postCharacterDelete(Request $request, CharacterManager $service, $slug) {
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->deleteCharacter($this->character, Auth::user())) {
flash('Character deleted successfully.')->success();
+
return redirect()->to('masterlist');
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Deletes an MYO slot.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postMyoDelete(Request $request, CharacterManager $service, $id)
- {
+ public function postMyoDelete(Request $request, CharacterManager $service, $id) {
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->deleteCharacter($this->character, Auth::user())) {
flash('Character deleted successfully.')->success();
+
return redirect()->to('myos');
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Transfers a character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postTransfer(Request $request, CharacterManager $service, $slug)
- {
+ public function postTransfer(Request $request, CharacterManager $service, $slug) {
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
- if($service->adminTransfer($request->only(['recipient_id', 'recipient_url', 'cooldown', 'reason']), $this->character, Auth::user())) {
+ if ($service->adminTransfer($request->only(['recipient_id', 'recipient_url', 'cooldown', 'reason']), $this->character, Auth::user())) {
flash('Character transferred successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Transfers an MYO slot.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postMyoTransfer(Request $request, CharacterManager $service, $id)
- {
+ public function postMyoTransfer(Request $request, CharacterManager $service, $id) {
$this->character = Character::where('is_myo_slot', 1)->where('id', $id)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
- if($service->adminTransfer($request->only(['recipient_id', 'recipient_url', 'cooldown', 'reason']), $this->character, Auth::user())) {
+ if ($service->adminTransfer($request->only(['recipient_id', 'recipient_url', 'cooldown', 'reason']), $this->character, Auth::user())) {
flash('Character transferred successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the character transfer queue.
*
- * @param string $type
+ * @param string $type
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTransferQueue($type)
- {
+ public function getTransferQueue($type) {
$transfers = CharacterTransfer::query();
$user = Auth::user();
- if($type == 'completed') $transfers->completed();
- else if ($type == 'incoming') $transfers->active()->where('is_approved', 0);
- else abort(404);
+ if ($type == 'completed') {
+ $transfers->completed();
+ } elseif ($type == 'incoming') {
+ $transfers->active()->where('is_approved', 0);
+ } else {
+ abort(404);
+ }
$openTransfersQueue = Settings::get('open_transfers_queue');
return view('admin.masterlist.character_transfers', [
- 'transfers' => $transfers->orderBy('id', 'DESC')->paginate(20),
- 'transfersQueue' => Settings::get('open_transfers_queue'),
+ 'transfers' => $transfers->orderBy('id', 'DESC')->paginate(20),
+ 'transfersQueue' => Settings::get('open_transfers_queue'),
'openTransfersQueue' => $openTransfersQueue,
- 'transferCount' => $openTransfersQueue ? CharacterTransfer::active()->where('is_approved', 0)->count() : 0,
- 'tradeCount' => $openTransfersQueue ? Trade::where('status', 'Pending')->count() : 0
+ 'transferCount' => $openTransfersQueue ? CharacterTransfer::active()->where('is_approved', 0)->count() : 0,
+ 'tradeCount' => $openTransfersQueue ? Trade::where('status', 'Pending')->count() : 0,
]);
}
/**
* Shows the character transfer action modal.
*
- * @param int $id
- * @param string $action
+ * @param int $id
+ * @param string $action
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTransferModal($id, $action)
- {
- if($action != 'approve' && $action != 'reject') abort(404);
+ public function getTransferModal($id, $action) {
+ if ($action != 'approve' && $action != 'reject') {
+ abort(404);
+ }
$transfer = CharacterTransfer::where('id', $id)->active()->first();
- if(!$transfer) abort(404);
+ if (!$transfer) {
+ abort(404);
+ }
return view('admin.masterlist._'.$action.'_modal', [
'transfer' => $transfer,
@@ -557,57 +610,64 @@ public function getTransferModal($id, $action)
/**
* Acts on a transfer in the transfer queue.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postTransferQueue(Request $request, CharacterManager $service, $id)
- {
- if(!Auth::check()) abort(404);
+ public function postTransferQueue(Request $request, CharacterManager $service, $id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$action = $request->get('action');
- if($service->processTransferQueue($request->only(['action', 'cooldown', 'reason']) + ['transfer_id' => $id], Auth::user())) {
+ if ($service->processTransferQueue($request->only(['action', 'cooldown', 'reason']) + ['transfer_id' => $id], Auth::user())) {
if (strtolower($action) == 'approve') {
- flash('Transfer ' . strtolower($action) . 'd.')->success();
+ flash('Transfer '.strtolower($action).'d.')->success();
} else {
- flash('Transfer ' . strtolower($action) . 'ed.')->success();
+ flash('Transfer '.strtolower($action).'ed.')->success();
+ }
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
}
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the character trade queue.
*
- * @param string $type
+ * @param string $type
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTradeQueue($type)
- {
+ public function getTradeQueue($type) {
$trades = Trade::query();
$user = Auth::user();
- if($type == 'completed') $trades->completed();
- else if ($type == 'incoming') $trades->where('status', 'Pending');
- else abort(404);
+ if ($type == 'completed') {
+ $trades->completed();
+ } elseif ($type == 'incoming') {
+ $trades->where('status', 'Pending');
+ } else {
+ abort(404);
+ }
$openTransfersQueue = Settings::get('open_transfers_queue');
- $stacks = array();
- foreach($trades->get() as $trade) {
- foreach($trade->data as $side=>$assets) {
- if(isset($assets['user_items'])) {
+ $stacks = [];
+ foreach ($trades->get() as $trade) {
+ foreach ($trade->data as $side=>$assets) {
+ if (isset($assets['user_items'])) {
$user_items = UserItem::with('item')->find(array_keys($assets['user_items']));
- $items = array();
- foreach($assets['user_items'] as $id=>$quantity) {
+ $items = [];
+ foreach ($assets['user_items'] as $id=>$quantity) {
$user_item = $user_items->find($id);
$user_item['quantity'] = $quantity;
- array_push($items,$user_item);
+ array_push($items, $user_item);
}
$items = collect($items)->groupBy('item_id');
$stacks[$trade->id][$side] = $items;
@@ -616,30 +676,34 @@ public function getTradeQueue($type)
}
return view('admin.masterlist.character_trades', [
- 'trades' => $trades->orderBy('id', 'DESC')->paginate(20),
- 'tradesQueue' => Settings::get('open_transfers_queue'),
+ 'trades' => $trades->orderBy('id', 'DESC')->paginate(20),
+ 'tradesQueue' => Settings::get('open_transfers_queue'),
'openTransfersQueue' => $openTransfersQueue,
- 'transferCount' => $openTransfersQueue ? CharacterTransfer::active()->where('is_approved', 0)->count() : 0,
- 'tradeCount' => $openTransfersQueue ? Trade::where('status', 'Pending')->count() : 0,
- 'stacks' => $stacks
+ 'transferCount' => $openTransfersQueue ? CharacterTransfer::active()->where('is_approved', 0)->count() : 0,
+ 'tradeCount' => $openTransfersQueue ? Trade::where('status', 'Pending')->count() : 0,
+ 'stacks' => $stacks,
]);
}
/**
* Shows the character trade action modal.
*
- * @param int $id
- * @param string $action
+ * @param int $id
+ * @param string $action
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTradeModal($id, $action)
- {
- if($action != 'approve' && $action != 'reject') abort(404);
+ public function getTradeModal($id, $action) {
+ if ($action != 'approve' && $action != 'reject') {
+ abort(404);
+ }
$trade = Trade::where('id', $id)->first();
- if(!$trade) abort(404);
+ if (!$trade) {
+ abort(404);
+ }
return view('admin.masterlist._'.$action.'_trade_modal', [
- 'trade' => $trade,
+ 'trade' => $trade,
'cooldown' => Settings::get('transfer_cooldown'),
]);
}
@@ -647,36 +711,36 @@ public function getTradeModal($id, $action)
/**
* Acts on a trade in the trade queue.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postTradeQueue(Request $request, TradeManager $service, $id)
- {
- if(!Auth::check()) abort(404);
+ public function postTradeQueue(Request $request, TradeManager $service, $id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$action = strtolower($request->get('action'));
- if($action == 'approve' && $service->approveTrade($request->only(['action', 'cooldowns']) + ['id' => $id], Auth::user())) {
+ if ($action == 'approve' && $service->approveTrade($request->only(['action', 'cooldowns']) + ['id' => $id], Auth::user())) {
flash('Trade approved.')->success();
- }
- else if($action == 'reject' && $service->rejectTrade($request->only(['action', 'reason']) + ['id' => $id], Auth::user())) {
+ } elseif ($action == 'reject' && $service->rejectTrade($request->only(['action', 'reason']) + ['id' => $id], Auth::user())) {
flash('Trade rejected.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
/**
* Shows a list of all existing MYO slots.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getMyoIndex()
- {
+ public function getMyoIndex() {
return view('admin.masterlist.myo_index', [
'slots' => Character::myo(1)->orderBy('id', 'DESC')->paginate(30),
]);
diff --git a/app/Http/Controllers/Admin/Characters/CharacterImageController.php b/app/Http/Controllers/Admin/Characters/CharacterImageController.php
index c532ce184e..fd6f04be51 100644
--- a/app/Http/Controllers/Admin/Characters/CharacterImageController.php
+++ b/app/Http/Controllers/Admin/Characters/CharacterImageController.php
@@ -2,25 +2,19 @@
namespace App\Http\Controllers\Admin\Characters;
-use Illuminate\Http\Request;
-
-use Auth;
-
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
use App\Models\Character\CharacterImage;
-use App\Models\Character\CharacterCategory;
+use App\Models\Feature\Feature;
use App\Models\Rarity;
-use App\Models\User\User;
use App\Models\Species\Species;
use App\Models\Species\Subtype;
-use App\Models\Feature\Feature;
-
+use App\Models\User\User;
use App\Services\CharacterManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class CharacterImageController extends Controller
-{
+class CharacterImageController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Character Image Controller
@@ -33,128 +27,137 @@ class CharacterImageController extends Controller
/**
* Shows the add image page. Existing characters only, not MYO slots.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getNewImage($slug)
- {
+ public function getNewImage($slug) {
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
return view('character.admin.upload_image', [
'character' => $this->character,
- 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id','=',$this->character->image->species_id)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'users' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
- 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
- 'isMyo' => false
+ 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id', '=', $this->character->image->species_id)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'users' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
+ 'isMyo' => false,
]);
}
/**
- * Shows the edit image subtype portion of the modal
+ * Shows the edit image subtype portion of the modal.
*
- * @param Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getNewImageSubtype(Request $request) {
- $species = $request->input('species');
- $id = $request->input('id');
- return view('character.admin._upload_image_subtype', [
- 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id','=',$species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtype' => $id
- ]);
+ $species = $request->input('species');
+ $id = $request->input('id');
+
+ return view('character.admin._upload_image_subtype', [
+ 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id', '=', $species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtype' => $id,
+ ]);
}
/**
* Creates a new image for a character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postNewImage(Request $request, CharacterManager $service, $slug)
- {
+ public function postNewImage(Request $request, CharacterManager $service, $slug) {
$request->validate(CharacterImage::$createRules);
$data = $request->only(['image', 'thumbnail', 'x0', 'x1', 'y0', 'y1', 'use_cropper', 'artist_url', 'artist_id', 'designer_url', 'designer_id', 'species_id', 'subtype_id', 'rarity_id', 'feature_id', 'feature_data', 'is_valid', 'is_visible']);
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
- if($service->createImage($data, $this->character, Auth::user())) {
- flash('Image uploaded successfully.')->success();
+ if (!$this->character) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->createImage($data, $this->character, Auth::user())) {
+ flash('Image uploaded successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+
return redirect()->back()->withInput();
}
+
return redirect()->to($this->character->url.'/images');
}
/**
* Shows the edit image features modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditImageFeatures($id)
- {
- $image = CharacterImage::find($id);
+ public function getEditImageFeatures($id) {
+ $image = CharacterImage::find($id);
return view('character.admin._edit_features_modal', [
- 'image' => $image,
- 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'image' => $image,
+ 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id','=',$image->species_id)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray()
+ 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id', '=', $image->species_id)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Edits the features of an image.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditImageFeatures(Request $request, CharacterManager $service, $id)
- {
+ public function postEditImageFeatures(Request $request, CharacterManager $service, $id) {
$data = $request->only(['species_id', 'subtype_id', 'rarity_id', 'feature_id', 'feature_data']);
$image = CharacterImage::find($id);
- if(!$image) abort(404);
- if($service->updateImageFeatures($data, $image, Auth::user())) {
- flash('Character traits edited successfully.')->success();
+ if (!$image) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->updateImageFeatures($data, $image, Auth::user())) {
+ flash('Character traits edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
return redirect()->back()->withInput();
}
/**
- * Shows the edit image subtype portion of the modal
+ * Shows the edit image subtype portion of the modal.
*
- * @param Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getEditImageSubtype(Request $request) {
- $species = $request->input('species');
- $id = $request->input('id');
- return view('character.admin._edit_features_subtype', [
- 'image' => CharacterImage::find($id),
- 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id','=',$species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- ]);
+ $species = $request->input('species');
+ $id = $request->input('id');
+
+ return view('character.admin._edit_features_subtype', [
+ 'image' => CharacterImage::find($id),
+ 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id', '=', $species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ ]);
}
/**
* Shows the edit image notes modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditImageNotes($id)
- {
+ public function getEditImageNotes($id) {
return view('character.admin._edit_notes_modal', [
'image' => CharacterImage::find($id),
]);
@@ -163,33 +166,36 @@ public function getEditImageNotes($id)
/**
* Edits the features of an image.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditImageNotes(Request $request, CharacterManager $service, $id)
- {
+ public function postEditImageNotes(Request $request, CharacterManager $service, $id) {
$data = $request->only(['description']);
$image = CharacterImage::find($id);
- if(!$image) abort(404);
- if($service->updateImageNotes($data, $image, Auth::user())) {
- flash('Image notes edited successfully.')->success();
+ if (!$image) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->updateImageNotes($data, $image, Auth::user())) {
+ flash('Image notes edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
return redirect()->back();
}
/**
* Shows the edit image credits modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditImageCredits($id)
- {
+ public function getEditImageCredits($id) {
return view('character.admin._edit_credits_modal', [
'image' => CharacterImage::find($id),
'users' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
@@ -199,33 +205,36 @@ public function getEditImageCredits($id)
/**
* Edits the credits of an image.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditImageCredits(Request $request, CharacterManager $service, $id)
- {
+ public function postEditImageCredits(Request $request, CharacterManager $service, $id) {
$data = $request->only(['artist_url', 'artist_id', 'designer_url', 'designer_id']);
$image = CharacterImage::find($id);
- if(!$image) abort(404);
- if($service->updateImageCredits($data, $image, Auth::user())) {
- flash('Image credits edited successfully.')->success();
+ if (!$image) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->updateImageCredits($data, $image, Auth::user())) {
+ flash('Image credits edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
return redirect()->back();
}
/**
* Shows the reupload image modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getImageReupload($id)
- {
+ public function getImageReupload($id) {
return view('character.admin._reupload_image_modal', [
'image' => CharacterImage::find($id),
]);
@@ -234,90 +243,98 @@ public function getImageReupload($id)
/**
* Reuploads an image.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postImageReupload(Request $request, CharacterManager $service, $id)
- {
+ public function postImageReupload(Request $request, CharacterManager $service, $id) {
$data = $request->only(['image', 'thumbnail', 'x0', 'x1', 'y0', 'y1', 'use_cropper']);
$image = CharacterImage::find($id);
- if(!$image) abort(404);
- if($service->reuploadImage($data, $image, Auth::user())) {
- flash('Image uploaded successfully.')->success();
+ if (!$image) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->reuploadImage($data, $image, Auth::user())) {
+ flash('Image uploaded successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
return redirect()->back();
}
/**
* Edits an image's settings.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postImageSettings(Request $request, CharacterManager $service, $id)
- {
+ public function postImageSettings(Request $request, CharacterManager $service, $id) {
$data = $request->only(['is_valid', 'is_visible']);
$image = CharacterImage::find($id);
- if(!$image) abort(404);
- if($service->updateImageSettings($data, $image, Auth::user())) {
- flash('Image settings edited successfully.')->success();
+ if (!$image) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->updateImageSettings($data, $image, Auth::user())) {
+ flash('Image settings edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
return redirect()->back();
}
/**
* Shows the set active image modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getImageActive($id)
- {
+ public function getImageActive($id) {
return view('character.admin._active_image_modal', [
'image' => CharacterImage::find($id),
]);
}
-
/**
* Sets an image to be the character's active image.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postImageActive(Request $request, CharacterManager $service, $id)
- {
+ public function postImageActive(Request $request, CharacterManager $service, $id) {
$image = CharacterImage::find($id);
- if(!$image) abort(404);
- if($service->updateActiveImage($image, Auth::user())) {
- flash('Active character image set successfully.')->success();
+ if (!$image) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->updateActiveImage($image, Auth::user())) {
+ flash('Active character image set successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
return redirect()->back();
}
/**
* Shows the delete image modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getImageDelete($id)
- {
+ public function getImageDelete($id) {
return view('character.admin._delete_image_modal', [
'image' => CharacterImage::find($id),
]);
@@ -326,44 +343,51 @@ public function getImageDelete($id)
/**
* Deletes an image.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postImageDelete(Request $request, CharacterManager $service, $id)
- {
+ public function postImageDelete(Request $request, CharacterManager $service, $id) {
$image = CharacterImage::find($id);
- if(!$image) abort(404);
- if($service->deleteImage($image, Auth::user())) {
- flash('Character image deleted successfully.')->success();
+ if (!$image) {
+ abort(404);
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ if ($service->deleteImage($image, Auth::user())) {
+ flash('Character image deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
return redirect()->back();
}
/**
* Sorts a character's images.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortImages(Request $request, CharacterManager $service, $slug)
- {
+ public function postSortImages(Request $request, CharacterManager $service, $slug) {
$this->character = Character::where('slug', $slug)->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
if ($service->sortImages($request->only(['sort']), $this->character, Auth::user())) {
flash('Images sorted successfully.')->success();
+
return redirect()->back();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/Characters/GrantController.php b/app/Http/Controllers/Admin/Characters/GrantController.php
index a084da98c1..11e3360305 100644
--- a/app/Http/Controllers/Admin/Characters/GrantController.php
+++ b/app/Http/Controllers/Admin/Characters/GrantController.php
@@ -2,58 +2,54 @@
namespace App\Http\Controllers\Admin\Characters;
-use Auth;
-use Config;
-use Illuminate\Http\Request;
-
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
use App\Models\Currency\Currency;
-use App\Models\Item\Item;
-
use App\Services\CurrencyManager;
use App\Services\InventoryManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class GrantController extends Controller
-{
+class GrantController extends Controller {
/**
* Grants or removes currency from a character.
*
- * @param string $slug
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CurrencyManager $service
+ * @param string $slug
+ * @param App\Services\CurrencyManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCharacterCurrency($slug, Request $request, CurrencyManager $service)
- {
+ public function postCharacterCurrency($slug, Request $request, CurrencyManager $service) {
$data = $request->only(['currency_id', 'quantity', 'data']);
- if($service->grantCharacterCurrencies($data, Character::where('slug', $slug)->first(), Auth::user())) {
+ if ($service->grantCharacterCurrencies($data, Character::where('slug', $slug)->first(), Auth::user())) {
flash('Currency granted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Grants items to characters.
*
- * @param string $slug
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
+ * @param string $slug
+ * @param App\Services\InventoryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCharacterItems($slug, Request $request, InventoryManager $service)
- {
+ public function postCharacterItems($slug, Request $request, InventoryManager $service) {
$data = $request->only(['item_ids', 'quantities', 'data', 'disallow_transfer', 'notes']);
- if($service->grantCharacterItems($data, Character::where('slug', $slug)->first(), Auth::user())) {
+ if ($service->grantCharacterItems($data, Character::where('slug', $slug)->first(), Auth::user())) {
flash('Items granted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/Data/CharacterCategoryController.php b/app/Http/Controllers/Admin/Data/CharacterCategoryController.php
index 096238e7ac..30e1e42b8e 100644
--- a/app/Http/Controllers/Admin/Data/CharacterCategoryController.php
+++ b/app/Http/Controllers/Admin/Data/CharacterCategoryController.php
@@ -2,17 +2,13 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
+use App\Http\Controllers\Controller;
use App\Models\Character\CharacterCategory;
use App\Models\Character\Sublist;
-
use App\Services\CharacterCategoryService;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class CharacterCategoryController extends Controller
-{
+class CharacterCategoryController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Character Category Controller
@@ -27,78 +23,81 @@ class CharacterCategoryController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.characters.character_categories', [
- 'categories' => CharacterCategory::orderBy('sort', 'DESC')->get()
+ 'categories' => CharacterCategory::orderBy('sort', 'DESC')->get(),
]);
}
-
+
/**
* Shows the create character category page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateCharacterCategory()
- {
+ public function getCreateCharacterCategory() {
return view('admin.characters.create_edit_character_category', [
'category' => new CharacterCategory,
- 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray()
+ 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
-
+
/**
* Shows the edit character category page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditCharacterCategory($id)
- {
+ public function getEditCharacterCategory($id) {
$category = CharacterCategory::find($id);
- if(!$category) abort(404);
+ if (!$category) {
+ abort(404);
+ }
+
return view('admin.characters.create_edit_character_category', [
'category' => $category,
- 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray()
+ 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
/**
* Creates or edits a character category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterCategoryService $service
- * @param int|null $id
+ * @param App\Services\CharacterCategoryService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditCharacterCategory(Request $request, CharacterCategoryService $service, $id = null)
- {
+ public function postCreateEditCharacterCategory(Request $request, CharacterCategoryService $service, $id = null) {
$id ? $request->validate(CharacterCategory::$updateRules) : $request->validate(CharacterCategory::$createRules);
$data = $request->only([
- 'code', 'name', 'description', 'image', 'remove_image', 'masterlist_sub_id'
+ 'code', 'name', 'description', 'image', 'remove_image', 'masterlist_sub_id',
]);
- if($id && $service->updateCharacterCategory(CharacterCategory::find($id), $data)) {
+ if ($id && $service->updateCharacterCategory(CharacterCategory::find($id), $data)) {
flash('Category updated successfully.')->success();
- }
- else if (!$id && $category = $service->createCharacterCategory($data)) {
+ } elseif (!$id && $category = $service->createCharacterCategory($data)) {
flash('Category created successfully.')->success();
+
return redirect()->to('admin/data/character-categories/edit/'.$category->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the character category deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteCharacterCategory($id)
- {
+ public function getDeleteCharacterCategory($id) {
$category = CharacterCategory::find($id);
+
return view('admin.characters._delete_character_category', [
'category' => $category,
]);
@@ -107,37 +106,39 @@ public function getDeleteCharacterCategory($id)
/**
* Deletes a character category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterCategoryService $service
- * @param int $id
+ * @param App\Services\CharacterCategoryService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteCharacterCategory(Request $request, CharacterCategoryService $service, $id)
- {
- if($id && $service->deleteCharacterCategory(CharacterCategory::find($id))) {
+ public function postDeleteCharacterCategory(Request $request, CharacterCategoryService $service, $id) {
+ if ($id && $service->deleteCharacterCategory(CharacterCategory::find($id))) {
flash('Category deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/character-categories');
}
/**
* Sorts character categories.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterCategoryService $service
+ * @param App\Services\CharacterCategoryService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortCharacterCategory(Request $request, CharacterCategoryService $service)
- {
- if($service->sortCharacterCategory($request->get('sort'))) {
+ public function postSortCharacterCategory(Request $request, CharacterCategoryService $service) {
+ if ($service->sortCharacterCategory($request->get('sort'))) {
flash('Category order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/Data/CriterionController.php b/app/Http/Controllers/Admin/Data/CriterionController.php
index 2470fdfc08..033d346549 100644
--- a/app/Http/Controllers/Admin/Data/CriterionController.php
+++ b/app/Http/Controllers/Admin/Data/CriterionController.php
@@ -11,201 +11,238 @@
use Illuminate\Http\Request;
class CriterionController extends Controller {
+ /**
+ * Shows the index for creating Criteria.
+ */
+ public function getIndex() {
+ return view('admin.criteria.index', [
+ 'criteria' => Criterion::get(),
+ ]);
+ }
+
+ /**
+ * Shows the create / edit page for a criterion.
+ *
+ * @param mixed|null $id
+ */
+ public function getCreateEditCriterion($id = null) {
+ return view('admin.criteria.create_edit_criterion', [
+ 'criterion' => $id ? Criterion::where('id', $id)->first() : new Criterion,
+ 'currencies' => Currency::pluck('name', 'id')->toArray(),
+ ]);
+ }
+
+ /**
+ * Creates a Criterion.
+ *
+ * @param mixed|null $id
+ */
+ public function postCreateEditCriterion(Request $request, CriterionService $service, $id = null) {
+ $id ? $request->validate(Criterion::$updateRules) : $request->validate(Criterion::$createRules);
+ $data = $request->only(['name', 'currency_id', 'is_active', 'summary', 'is_guide_active', 'base_value', 'sort', 'rounding', 'round_precision']);
+
+ if ($id && $service->updateCriterion(Criterion::find($id), $data)) {
+ flash('Criterion updated successfully.')->success();
+ } elseif (!$id && $criterion = $service->createCriterion($data)) {
+ flash('Criterion created successfully.')->success();
+
+ return redirect()->to('admin/data/criteria/edit/'.$criterion->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
+ return redirect()->back();
+ }
+
+ /**
+ * Gets the criterion deletion modal.
+ *
+ * @param int $id
+ *
+ * @return \Illuminate\Contracts\Support\Renderable
+ */
+ public function getDeleteCriterion($id) {
+ $criterion = Criterion::find($id);
+
+ return view('admin.criteria._delete_criterion', [
+ 'criterion' => $criterion,
+ 'name' => 'Criterion',
+ ]);
+ }
+
+ /**
+ * Deletes an criterion.
+ *
+ * @param App\Services\ItemService $service
+ * @param int $id
+ *
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ public function postDeleteCriterion(Request $request, CriterionService $service, $id) {
+ if ($id && $service->deleteCriterion(Criterion::find($id))) {
+ flash('Criterion deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
+ return redirect()->to('admin/data/criteria');
+ }
- /**
- * Shows the index for creating Criteria
- */
- public function getIndex() {
- return view('admin.criteria.index', [
- 'criteria' => Criterion::get()
- ]);
- }
-
-
- /**
- * Shows the create / edit page for a criterion
- */
- public function getCreateEditCriterion($id = null) {
- return view('admin.criteria.create_edit_criterion', [
- 'criterion' => $id ? Criterion::where('id', $id)->first() : new Criterion,
- 'currencies' => Currency::pluck('name', 'id')->toArray()
- ]);
- }
-
- /**
- * Creates a Criterion
- */
- public function postCreateEditCriterion(Request $request, CriterionService $service, $id = null) {
- $id ? $request->validate(Criterion::$updateRules) : $request->validate(Criterion::$createRules);
- $data = $request->only(['name', 'currency_id', 'is_active', 'summary', 'is_guide_active', 'base_value', 'sort', 'rounding', 'round_precision']);
-
- if ($id && $service->updateCriterion(Criterion::find($id), $data)) {
- flash('Criterion updated successfully.')->success();
- } else if (!$id && $criterion = $service->createCriterion($data)) {
- flash('Criterion created successfully.')->success();
- return redirect()->to('admin/data/criteria/edit/' . $criterion->id);
- } else {
- foreach ($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ /**
+ * Shows the create / edit page for a criterion step.
+ *
+ * @param mixed $id
+ * @param mixed|null $step_id
+ */
+ public function getCreateEditCriterionStep($id, $step_id = null) {
+ return view('admin.criteria.create_edit_criterion_step', [
+ 'criterionId' => $id,
+ 'step' => $step_id ? CriterionStep::where('id', $step_id)->first() : new CriterionStep,
+ ]);
}
- return redirect()->back();
- }
-
- /**
- * Gets the criterion deletion modal.
- *
- * @param int $id
- * @return \Illuminate\Contracts\Support\Renderable
- */
- public function getDeleteCriterion($id) {
- $criterion = Criterion::find($id);
- return view('admin.criteria._delete_criterion', [
- 'criterion' => $criterion,
- 'name' => 'Criterion'
- ]);
- }
-
- /**
- * Deletes an criterion.
- *
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
- * @return \Illuminate\Http\RedirectResponse
- */
- public function postDeleteCriterion(Request $request, CriterionService $service, $id) {
- if ($id && $service->deleteCriterion(Criterion::find($id))) {
- flash('Criterion deleted successfully.')->success();
- } else {
- foreach ($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+
+ /**
+ * Creates a Criterion Step.
+ *
+ * @param mixed $id
+ * @param mixed|null $step_id
+ */
+ public function postCreateEditCriterionStep(Request $request, CriterionService $service, $id, $step_id = null) {
+ $step_id ? $request->validate(CriterionStep::$updateRules) : $request->validate(CriterionStep::$createRules);
+ $data = $request->only(['name', 'summary', 'image', 'remove_image', 'description', 'parsed_description', 'is_active', 'type', 'calc_type', 'input_calc_type', 'options', 'sort']);
+ $data['criterion_id'] = $id;
+
+ if ($step_id && $service->updateCriterionStep(CriterionStep::find($step_id), $data)) {
+ flash('Criterion Step updated successfully.')->success();
+ } elseif (!$step_id && $step = $service->createCriterionStep($data)) {
+ flash('Criterion Step created successfully.')->success();
+
+ return redirect()->to('admin/data/criteria/'.$id.'/step/'.$step->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
+ return redirect()->back();
}
- return redirect()->to('admin/data/criteria');
- }
-
- /**
- * Shows the create / edit page for a criterion step
- */
- public function getCreateEditCriterionStep($id, $step_id = null) {
-
- return view('admin.criteria.create_edit_criterion_step', [
- 'criterionId' => $id,
- 'step' => $step_id ? CriterionStep::where('id', $step_id)->first() : new CriterionStep,
- ]);
- }
-
- /**
- * Creates a Criterion Step
- */
- public function postCreateEditCriterionStep(Request $request, CriterionService $service, $id, $step_id = null) {
- $step_id ? $request->validate(CriterionStep::$updateRules) : $request->validate(CriterionStep::$createRules);
- $data = $request->only(['name', 'summary', 'image', 'remove_image', 'description', 'parsed_description', 'is_active', 'type', 'calc_type', 'input_calc_type', 'options', 'sort']);
- $data['criterion_id'] = $id;
-
- if ($step_id && $service->updateCriterionStep(CriterionStep::find($step_id), $data)) {
- flash('Criterion Step updated successfully.')->success();
- } else if (!$step_id && $step = $service->createCriterionStep($data)) {
- flash('Criterion Step created successfully.')->success();
- return redirect()->to('admin/data/criteria/' . $id . '/step/' . $step->id);
- } else {
- foreach ($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+
+ /**
+ * Gets the criterion deletion modal.
+ *
+ * @param int $id
+ *
+ * @return \Illuminate\Contracts\Support\Renderable
+ */
+ public function getDeleteCriterionStep($id) {
+ $step = CriterionStep::find($id);
+
+ return view('admin.criteria._delete_criterion', [
+ 'criterion' => $step,
+ 'name' => 'Step',
+ 'path' => 'step/',
+ ]);
}
- return redirect()->back();
- }
-
-
- /**
- * Gets the criterion deletion modal.
- *
- * @param int $id
- * @return \Illuminate\Contracts\Support\Renderable
- */
- public function getDeleteCriterionStep($id) {
- $step = CriterionStep::find($id);
- return view('admin.criteria._delete_criterion', [
- 'criterion' => $step,
- 'name' => 'Step',
- 'path' => 'step/'
- ]);
- }
-
- /**
- * Deletes an criterion.
- *
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
- * @return \Illuminate\Http\RedirectResponse
- */
- public function postDeleteCriterionStep(Request $request, CriterionService $service, $id) {
- $criterion_id = CriterionStep::find($id)->criterion_id;
- if ($id && $service->deleteCriterionStep(CriterionStep::find($id))) {
- flash('Criterion step deleted successfully.')->success();
- } else {
- foreach ($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+
+ /**
+ * Deletes an criterion.
+ *
+ * @param App\Services\ItemService $service
+ * @param int $id
+ *
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ public function postDeleteCriterionStep(Request $request, CriterionService $service, $id) {
+ $criterion_id = CriterionStep::find($id)->criterion_id;
+ if ($id && $service->deleteCriterionStep(CriterionStep::find($id))) {
+ flash('Criterion step deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
+ return redirect()->to('admin/data/criteria/edit/'.$criterion_id);
}
- return redirect()->to('admin/data/criteria/edit/' . $criterion_id);
- }
-
-
- /**
- * Shows the create / edit page for a criterion step
- */
- public function getCreateEditCriterionOption($stepId, $id = null) {
- return view('admin.criteria._create_edit_option', [
- 'stepId' => $stepId,
- 'option' => $id ? CriterionStepOption::where('id', $id)->first() : new CriterionStepOption,
- ]);
- }
-
- /**
- * Creates a Criterion Step
- */
- public function postCreateEditCriterionOption(Request $request, CriterionService $service, $step_id, $id = null) {
- $step_id ? $request->validate(CriterionStepOption::$updateRules) : $request->validate(CriterionStepOption::$createRules);
- $data = $request->only(['name', 'summary', 'description', 'parsed_description', 'is_active', 'amount']);
- $data['criterion_step_id'] = $step_id;
-
- if ($id && $service->updateCriterionOption(CriterionStepOption::find($id), $data)) {
- flash('Criterion Option updated successfully.')->success();
- } else if (!$id && $option = $service->createCriterionOption($data)) {
- flash('Criterion Option created successfully.')->success();
- return redirect()->to('admin/data/criteria/' . $option->step->criterion_id . '/step/' . $step_id);
- } else {
- foreach ($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+
+ /**
+ * Shows the create / edit page for a criterion step.
+ *
+ * @param mixed $stepId
+ * @param mixed|null $id
+ */
+ public function getCreateEditCriterionOption($stepId, $id = null) {
+ return view('admin.criteria._create_edit_option', [
+ 'stepId' => $stepId,
+ 'option' => $id ? CriterionStepOption::where('id', $id)->first() : new CriterionStepOption,
+ ]);
}
- return redirect()->back();
- }
-
-
- /**
- * Gets the criterion deletion modal.
- *
- * @param int $id
- * @return \Illuminate\Contracts\Support\Renderable
- */
- public function getDeleteCriterionOption($id) {
- $option = CriterionStepOption::find($id);
- return view('admin.criteria._delete_criterion', [
- 'criterion' => $option,
- 'name' => 'Option',
- 'path' => 'option/'
- ]);
- }
-
- /**
- * Deletes an criterion option
- *
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
- * @return \Illuminate\Http\RedirectResponse
- */
- public function postDeleteCriterionOption(Request $request, CriterionService $service, $id) {
- $step = CriterionStepOption::find($id)->step;
- if ($id && $service->deleteCriterionOption(CriterionStepOption::find($id))) {
- flash('Criterion step deleted successfully.')->success();
- } else {
- foreach ($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+
+ /**
+ * Creates a Criterion Step.
+ *
+ * @param mixed $step_id
+ * @param mixed|null $id
+ */
+ public function postCreateEditCriterionOption(Request $request, CriterionService $service, $step_id, $id = null) {
+ $step_id ? $request->validate(CriterionStepOption::$updateRules) : $request->validate(CriterionStepOption::$createRules);
+ $data = $request->only(['name', 'summary', 'description', 'parsed_description', 'is_active', 'amount']);
+ $data['criterion_step_id'] = $step_id;
+
+ if ($id && $service->updateCriterionOption(CriterionStepOption::find($id), $data)) {
+ flash('Criterion Option updated successfully.')->success();
+ } elseif (!$id && $option = $service->createCriterionOption($data)) {
+ flash('Criterion Option created successfully.')->success();
+
+ return redirect()->to('admin/data/criteria/'.$option->step->criterion_id.'/step/'.$step_id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
+ return redirect()->back();
+ }
+
+ /**
+ * Gets the criterion deletion modal.
+ *
+ * @param int $id
+ *
+ * @return \Illuminate\Contracts\Support\Renderable
+ */
+ public function getDeleteCriterionOption($id) {
+ $option = CriterionStepOption::find($id);
+
+ return view('admin.criteria._delete_criterion', [
+ 'criterion' => $option,
+ 'name' => 'Option',
+ 'path' => 'option/',
+ ]);
+ }
+
+ /**
+ * Deletes an criterion option.
+ *
+ * @param App\Services\ItemService $service
+ * @param int $id
+ *
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ public function postDeleteCriterionOption(Request $request, CriterionService $service, $id) {
+ $step = CriterionStepOption::find($id)->step;
+ if ($id && $service->deleteCriterionOption(CriterionStepOption::find($id))) {
+ flash('Criterion step deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
+ return redirect()->to('admin/data/criteria/'.$step->criterion_id.'/step/'.$step->id);
}
- return redirect()->to('admin/data/criteria/' . $step->criterion_id . '/step/' . $step->id);
- }
}
diff --git a/app/Http/Controllers/Admin/Data/CurrencyController.php b/app/Http/Controllers/Admin/Data/CurrencyController.php
index de042d2cb7..87d05a392f 100644
--- a/app/Http/Controllers/Admin/Data/CurrencyController.php
+++ b/app/Http/Controllers/Admin/Data/CurrencyController.php
@@ -2,18 +2,13 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
+use App\Http\Controllers\Controller;
use App\Models\Currency\Currency;
-
use App\Services\CurrencyService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class CurrencyController extends Controller
-{
+class CurrencyController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Currency Controller
@@ -28,79 +23,82 @@ class CurrencyController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.currencies.currencies', [
- 'currencies' => Currency::paginate(30)
+ 'currencies' => Currency::paginate(30),
]);
}
-
+
/**
* Shows the create currency page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateCurrency()
- {
+ public function getCreateCurrency() {
return view('admin.currencies.create_edit_currency', [
- 'currency' => new Currency
+ 'currency' => new Currency,
]);
}
-
+
/**
* Shows the edit currency page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditCurrency($id)
- {
+ public function getEditCurrency($id) {
$currency = Currency::find($id);
- if(!$currency) abort(404);
+ if (!$currency) {
+ abort(404);
+ }
+
return view('admin.currencies.create_edit_currency', [
- 'currency' => $currency
+ 'currency' => $currency,
]);
}
/**
* Creates or edits a currency.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterCategoryService $service
- * @param int|null $id
+ * @param App\Services\CharacterCategoryService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditCurrency(Request $request, CurrencyService $service, $id = null)
- {
+ public function postCreateEditCurrency(Request $request, CurrencyService $service, $id = null) {
$id ? $request->validate(Currency::$updateRules) : $request->validate(Currency::$createRules);
$data = $request->only([
- 'is_user_owned', 'is_character_owned',
+ 'is_user_owned', 'is_character_owned',
'name', 'abbreviation', 'description',
'is_displayed', 'allow_user_to_user', 'allow_user_to_character', 'allow_character_to_user',
- 'icon', 'image', 'remove_icon', 'remove_image'
+ 'icon', 'image', 'remove_icon', 'remove_image',
]);
- if($id && $service->updateCurrency(Currency::find($id), $data, Auth::user())) {
+ if ($id && $service->updateCurrency(Currency::find($id), $data, Auth::user())) {
flash('Currency updated successfully.')->success();
- }
- else if (!$id && $currency = $service->createCurrency($data, Auth::user())) {
+ } elseif (!$id && $currency = $service->createCurrency($data, Auth::user())) {
flash('Currency created successfully.')->success();
+
return redirect()->to('admin/data/currencies/edit/'.$currency->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the currency deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteCurrency($id)
- {
+ public function getDeleteCurrency($id) {
$currency = Currency::find($id);
+
return view('admin.currencies._delete_currency', [
'currency' => $currency,
]);
@@ -109,19 +107,20 @@ public function getDeleteCurrency($id)
/**
* Deletes a currency.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterCategoryService $service
- * @param int $id
+ * @param App\Services\CharacterCategoryService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteCurrency(Request $request, CurrencyService $service, $id)
- {
- if($id && $service->deleteCurrency(Currency::find($id))) {
+ public function postDeleteCurrency(Request $request, CurrencyService $service, $id) {
+ if ($id && $service->deleteCurrency(Currency::find($id))) {
flash('Currency deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/currencies');
}
@@ -130,30 +129,30 @@ public function postDeleteCurrency(Request $request, CurrencyService $service, $
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSort()
- {
+ public function getSort() {
return view('admin.currencies.sort', [
- 'userCurrencies' => Currency::where('is_user_owned', 1)->orderBy('sort_user', 'DESC')->get(),
- 'characterCurrencies' => Currency::where('is_character_owned', 1)->orderBy('sort_character', 'DESC')->get()
+ 'userCurrencies' => Currency::where('is_user_owned', 1)->orderBy('sort_user', 'DESC')->get(),
+ 'characterCurrencies' => Currency::where('is_character_owned', 1)->orderBy('sort_character', 'DESC')->get(),
]);
}
/**
* Sorts currencies.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterCategoryService $service
- * @param string $type
+ * @param App\Services\CharacterCategoryService $service
+ * @param string $type
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortCurrency(Request $request, CurrencyService $service, $type)
- {
- if($service->sortCurrency($request->get('sort'), $type)) {
+ public function postSortCurrency(Request $request, CurrencyService $service, $type) {
+ if ($service->sortCurrency($request->get('sort'), $type)) {
flash('Currency order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/Data/FeatureController.php b/app/Http/Controllers/Admin/Data/FeatureController.php
index eacd21a6d4..e38f620ca3 100644
--- a/app/Http/Controllers/Admin/Data/FeatureController.php
+++ b/app/Http/Controllers/Admin/Data/FeatureController.php
@@ -2,34 +2,29 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
-use App\Models\Feature\FeatureCategory;
+use App\Http\Controllers\Controller;
use App\Models\Feature\Feature;
+use App\Models\Feature\FeatureCategory;
use App\Models\Rarity;
use App\Models\Species\Species;
use App\Models\Species\Subtype;
-
use App\Services\FeatureService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class FeatureController extends Controller
-{
+class FeatureController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Feature Controller
|--------------------------------------------------------------------------
|
- | Handles creation/editing of character feature categories and features
+ | Handles creation/editing of character feature categories and features
| (AKA traits, which is a reserved keyword in PHP and thus can't be used).
|
*/
/**********************************************************************************************
-
+
FEATURE CATEGORIES
**********************************************************************************************/
@@ -39,76 +34,79 @@ class FeatureController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.features.feature_categories', [
- 'categories' => FeatureCategory::orderBy('sort', 'DESC')->get()
+ 'categories' => FeatureCategory::orderBy('sort', 'DESC')->get(),
]);
}
-
+
/**
* Shows the create feature category page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateFeatureCategory()
- {
+ public function getCreateFeatureCategory() {
return view('admin.features.create_edit_feature_category', [
- 'category' => new FeatureCategory
+ 'category' => new FeatureCategory,
]);
}
-
+
/**
* Shows the edit feature category page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditFeatureCategory($id)
- {
+ public function getEditFeatureCategory($id) {
$category = FeatureCategory::find($id);
- if(!$category) abort(404);
+ if (!$category) {
+ abort(404);
+ }
+
return view('admin.features.create_edit_feature_category', [
- 'category' => $category
+ 'category' => $category,
]);
}
/**
* Creates or edits a feature category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FeatureService $service
- * @param int|null $id
+ * @param App\Services\FeatureService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditFeatureCategory(Request $request, FeatureService $service, $id = null)
- {
+ public function postCreateEditFeatureCategory(Request $request, FeatureService $service, $id = null) {
$id ? $request->validate(FeatureCategory::$updateRules) : $request->validate(FeatureCategory::$createRules);
$data = $request->only([
- 'name', 'description', 'image', 'remove_image'
+ 'name', 'description', 'image', 'remove_image',
]);
- if($id && $service->updateFeatureCategory(FeatureCategory::find($id), $data, Auth::user())) {
+ if ($id && $service->updateFeatureCategory(FeatureCategory::find($id), $data, Auth::user())) {
flash('Category updated successfully.')->success();
- }
- else if (!$id && $category = $service->createFeatureCategory($data, Auth::user())) {
+ } elseif (!$id && $category = $service->createFeatureCategory($data, Auth::user())) {
flash('Category created successfully.')->success();
+
return redirect()->to('admin/data/trait-categories/edit/'.$category->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the feature category deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteFeatureCategory($id)
- {
+ public function getDeleteFeatureCategory($id) {
$category = FeatureCategory::find($id);
+
return view('admin.features._delete_feature_category', [
'category' => $category,
]);
@@ -117,42 +115,44 @@ public function getDeleteFeatureCategory($id)
/**
* Creates or edits a feature category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FeatureService $service
- * @param int|null $id
+ * @param App\Services\FeatureService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteFeatureCategory(Request $request, FeatureService $service, $id)
- {
- if($id && $service->deleteFeatureCategory(FeatureCategory::find($id))) {
+ public function postDeleteFeatureCategory(Request $request, FeatureService $service, $id) {
+ if ($id && $service->deleteFeatureCategory(FeatureCategory::find($id))) {
flash('Category deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/trait-categories');
}
/**
* Sorts feature categories.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FeatureService $service
+ * @param App\Services\FeatureService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortFeatureCategory(Request $request, FeatureService $service)
- {
- if($service->sortFeatureCategory($request->get('sort'))) {
+ public function postSortFeatureCategory(Request $request, FeatureService $service) {
+ if ($service->sortFeatureCategory($request->get('sort'))) {
flash('Category order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**********************************************************************************************
-
+
FEATURES
**********************************************************************************************/
@@ -160,125 +160,133 @@ public function postSortFeatureCategory(Request $request, FeatureService $servic
/**
* Shows the feature index.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getFeatureIndex(Request $request)
- {
+ public function getFeatureIndex(Request $request) {
$query = Feature::query();
$data = $request->only(['rarity_id', 'feature_category_id', 'species_id', 'name']);
- if(isset($data['rarity_id']) && $data['rarity_id'] != 'none')
+ if (isset($data['rarity_id']) && $data['rarity_id'] != 'none') {
$query->where('rarity_id', $data['rarity_id']);
- if(isset($data['feature_category_id']) && $data['feature_category_id'] != 'none')
+ }
+ if (isset($data['feature_category_id']) && $data['feature_category_id'] != 'none') {
$query->where('feature_category_id', $data['feature_category_id']);
- if(isset($data['species_id']) && $data['species_id'] != 'none')
+ }
+ if (isset($data['species_id']) && $data['species_id'] != 'none') {
$query->where('species_id', $data['species_id']);
- if(isset($data['subtype_id']) && $data['subtype_id'] != 'none')
+ }
+ if (isset($data['subtype_id']) && $data['subtype_id'] != 'none') {
$query->where('subtype_id', $data['subtype_id']);
- if(isset($data['name']))
+ }
+ if (isset($data['name'])) {
$query->where('name', 'LIKE', '%'.$data['name'].'%');
+ }
+
return view('admin.features.features', [
- 'features' => $query->paginate(20)->appends($request->query()),
- 'rarities' => ['none' => 'Any Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'specieses' => ['none' => 'Any Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['none' => 'Any Subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'categories' => ['none' => 'Any Category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'features' => $query->paginate(20)->appends($request->query()),
+ 'rarities' => ['none' => 'Any Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'specieses' => ['none' => 'Any Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtypes' => ['none' => 'Any Subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'categories' => ['none' => 'Any Category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
-
+
/**
* Shows the create feature page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateFeature()
- {
+ public function getCreateFeature() {
return view('admin.features.create_edit_feature', [
- 'feature' => new Feature,
- 'rarities' => ['none' => 'Select a Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'specieses' => ['none' => 'No restriction'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['none' => 'No subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'categories' => ['none' => 'No category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'feature' => new Feature,
+ 'rarities' => ['none' => 'Select a Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'specieses' => ['none' => 'No restriction'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtypes' => ['none' => 'No subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'categories' => ['none' => 'No category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
-
+
/**
* Shows the edit feature page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditFeature($id)
- {
+ public function getEditFeature($id) {
$feature = Feature::find($id);
- if(!$feature) abort(404);
+ if (!$feature) {
+ abort(404);
+ }
+
return view('admin.features.create_edit_feature', [
- 'feature' => $feature,
- 'rarities' => ['none' => 'Select a Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'specieses' => ['none' => 'No restriction'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['none' => 'No subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'categories' => ['none' => 'No category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'feature' => $feature,
+ 'rarities' => ['none' => 'Select a Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'specieses' => ['none' => 'No restriction'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtypes' => ['none' => 'No subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'categories' => ['none' => 'No category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
/**
* Creates or edits a feature.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FeatureService $service
- * @param int|null $id
+ * @param App\Services\FeatureService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditFeature(Request $request, FeatureService $service, $id = null)
- {
+ public function postCreateEditFeature(Request $request, FeatureService $service, $id = null) {
$id ? $request->validate(Feature::$updateRules) : $request->validate(Feature::$createRules);
$data = $request->only([
- 'name', 'species_id', 'subtype_id', 'rarity_id', 'feature_category_id', 'description', 'image', 'remove_image'
+ 'name', 'species_id', 'subtype_id', 'rarity_id', 'feature_category_id', 'description', 'image', 'remove_image',
]);
- if($id && $service->updateFeature(Feature::find($id), $data, Auth::user())) {
+ if ($id && $service->updateFeature(Feature::find($id), $data, Auth::user())) {
flash('Trait updated successfully.')->success();
- }
- else if (!$id && $feature = $service->createFeature($data, Auth::user())) {
+ } elseif (!$id && $feature = $service->createFeature($data, Auth::user())) {
flash('Trait created successfully.')->success();
+
return redirect()->to('admin/data/traits/edit/'.$feature->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the feature deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteFeature($id)
- {
+ public function getDeleteFeature($id) {
$feature = Feature::find($id);
+
return view('admin.features._delete_feature', [
'feature' => $feature,
]);
}
-
/**
* Deletes a feature.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FeatureService $service
- * @param int $id
+ * @param App\Services\FeatureService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteFeature(Request $request, FeatureService $service, $id)
- {
- if($id && $service->deleteFeature(Feature::find($id))) {
+ public function postDeleteFeature(Request $request, FeatureService $service, $id) {
+ if ($id && $service->deleteFeature(Feature::find($id))) {
flash('Trait deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/traits');
}
}
diff --git a/app/Http/Controllers/Admin/Data/GalleryController.php b/app/Http/Controllers/Admin/Data/GalleryController.php
index e9f798c832..8c61019e7a 100644
--- a/app/Http/Controllers/Admin/Data/GalleryController.php
+++ b/app/Http/Controllers/Admin/Data/GalleryController.php
@@ -2,18 +2,14 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
-use App\Models\Gallery\Gallery;
-use App\Services\GalleryService;
-
use App\Http\Controllers\Controller;
use App\Models\Criteria\Criterion;
+use App\Models\Gallery\Gallery;
+use App\Services\GalleryService;
+use Auth;
+use Illuminate\Http\Request;
-class GalleryController extends Controller
-{
+class GalleryController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Gallery Controller
@@ -28,10 +24,9 @@ class GalleryController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.galleries.galleries', [
- 'galleries' => Gallery::sort()->whereNull('parent_id')->paginate(10)
+ 'galleries' => Gallery::sort()->whereNull('parent_id')->paginate(10),
]);
}
@@ -40,68 +35,72 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateGallery()
- {
+ public function getCreateGallery() {
return view('admin.galleries.create_edit_gallery', [
- 'gallery' => new Gallery,
- 'galleries' => Gallery::sort()->pluck('name','id'),
- 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
+ 'gallery' => new Gallery,
+ 'galleries' => Gallery::sort()->pluck('name', 'id'),
+ 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
]);
}
/**
* Shows the edit gallery page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditGallery($id)
- {
+ public function getEditGallery($id) {
$gallery = Gallery::find($id);
- if(!$gallery) abort(404);
+ if (!$gallery) {
+ abort(404);
+ }
+
return view('admin.galleries.create_edit_gallery', [
- 'gallery' => $gallery,
- 'galleries' => Gallery::sort()->pluck('name','id')->forget($id),
- 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
+ 'gallery' => $gallery,
+ 'galleries' => Gallery::sort()->pluck('name', 'id')->forget($id),
+ 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
]);
}
/**
* Creates or edits a gallery.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryService $service
- * @param int|null $id
+ * @param App\Services\GalleryService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditGallery(Request $request, GalleryService $service, $id = null)
- {
+ public function postCreateEditGallery(Request $request, GalleryService $service, $id = null) {
$id ? $request->validate(Gallery::$updateRules) : $request->validate(Gallery::$createRules);
$data = $request->only([
- 'name', 'sort', 'parent_id', 'description', 'submissions_open', 'currency_enabled', 'votes_required', 'start_at', 'end_at', 'hide_before_start', 'prompt_selection', 'criterion_id', 'criterion'
+ 'name', 'sort', 'parent_id', 'description', 'submissions_open', 'currency_enabled', 'votes_required', 'start_at', 'end_at', 'hide_before_start', 'prompt_selection', 'criterion_id', 'criterion',
]);
- if($id && $service->updateGallery(Gallery::find($id), $data, Auth::user())) {
+ if ($id && $service->updateGallery(Gallery::find($id), $data, Auth::user())) {
flash('Gallery updated successfully.')->success();
- }
- else if (!$id && $gallery = $service->createGallery($data, Auth::user())) {
+ } elseif (!$id && $gallery = $service->createGallery($data, Auth::user())) {
flash('Gallery created successfully.')->success();
+
return redirect()->to('admin/data/galleries/edit/'.$gallery->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the gallery deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteGallery($id)
- {
+ public function getDeleteGallery($id) {
$gallery = Gallery::find($id);
+
return view('admin.galleries._delete_gallery', [
'gallery' => $gallery,
]);
@@ -110,19 +109,20 @@ public function getDeleteGallery($id)
/**
* Deletes a gallery.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryService $service
- * @param int $id
+ * @param App\Services\GalleryService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteGallery(Request $request, GalleryService $service, $id)
- {
- if($id && $service->deleteGallery(Gallery::find($id))) {
+ public function postDeleteGallery(Request $request, GalleryService $service, $id) {
+ if ($id && $service->deleteGallery(Gallery::find($id))) {
flash('Gallery deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/galleries');
}
}
diff --git a/app/Http/Controllers/Admin/Data/ItemController.php b/app/Http/Controllers/Admin/Data/ItemController.php
index 0fb2b3b9f3..8d6c305b04 100644
--- a/app/Http/Controllers/Admin/Data/ItemController.php
+++ b/app/Http/Controllers/Admin/Data/ItemController.php
@@ -2,25 +2,19 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
-use App\Models\Item\ItemCategory;
+use App\Http\Controllers\Controller;
+use App\Models\Currency\Currency;
use App\Models\Item\Item;
-use App\Models\Item\ItemTag;
+use App\Models\Item\ItemCategory;
+use App\Models\Prompt\Prompt;
use App\Models\Shop\Shop;
use App\Models\Shop\ShopStock;
-use App\Models\Prompt\Prompt;
-use App\Models\Currency\Currency;
use App\Models\User\User;
-
use App\Services\ItemService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class ItemController extends Controller
-{
+class ItemController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Item Controller
@@ -41,10 +35,9 @@ class ItemController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.items.item_categories', [
- 'categories' => ItemCategory::orderBy('sort', 'DESC')->get()
+ 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
]);
}
@@ -53,64 +46,68 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateItemCategory()
- {
+ public function getCreateItemCategory() {
return view('admin.items.create_edit_item_category', [
- 'category' => new ItemCategory
+ 'category' => new ItemCategory,
]);
}
/**
* Shows the edit item category page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditItemCategory($id)
- {
+ public function getEditItemCategory($id) {
$category = ItemCategory::find($id);
- if(!$category) abort(404);
+ if (!$category) {
+ abort(404);
+ }
+
return view('admin.items.create_edit_item_category', [
- 'category' => $category
+ 'category' => $category,
]);
}
/**
* Creates or edits an item category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int|null $id
+ * @param App\Services\ItemService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditItemCategory(Request $request, ItemService $service, $id = null)
- {
+ public function postCreateEditItemCategory(Request $request, ItemService $service, $id = null) {
$id ? $request->validate(ItemCategory::$updateRules) : $request->validate(ItemCategory::$createRules);
$data = $request->only([
- 'name', 'description', 'image', 'remove_image', 'is_character_owned', 'character_limit', 'can_name'
+ 'name', 'description', 'image', 'remove_image', 'is_character_owned', 'character_limit', 'can_name',
]);
- if($id && $service->updateItemCategory(ItemCategory::find($id), $data, Auth::user())) {
+ if ($id && $service->updateItemCategory(ItemCategory::find($id), $data, Auth::user())) {
flash('Category updated successfully.')->success();
- }
- else if (!$id && $category = $service->createItemCategory($data, Auth::user())) {
+ } elseif (!$id && $category = $service->createItemCategory($data, Auth::user())) {
flash('Category created successfully.')->success();
+
return redirect()->to('admin/data/item-categories/edit/'.$category->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the item category deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteItemCategory($id)
- {
+ public function getDeleteItemCategory($id) {
$category = ItemCategory::find($id);
+
return view('admin.items._delete_item_category', [
'category' => $category,
]);
@@ -119,37 +116,39 @@ public function getDeleteItemCategory($id)
/**
* Deletes an item category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
+ * @param App\Services\ItemService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteItemCategory(Request $request, ItemService $service, $id)
- {
- if($id && $service->deleteItemCategory(ItemCategory::find($id))) {
+ public function postDeleteItemCategory(Request $request, ItemService $service, $id) {
+ if ($id && $service->deleteItemCategory(ItemCategory::find($id))) {
flash('Category deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/item-categories');
}
/**
* Sorts item categories.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
+ * @param App\Services\ItemService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortItemCategory(Request $request, ItemService $service)
- {
- if($service->sortItemCategory($request->get('sort'))) {
+ public function postSortItemCategory(Request $request, ItemService $service) {
+ if ($service->sortItemCategory($request->get('sort'))) {
flash('Category order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
@@ -162,20 +161,21 @@ public function postSortItemCategory(Request $request, ItemService $service)
/**
* Shows the item index.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getItemIndex(Request $request)
- {
+ public function getItemIndex(Request $request) {
$query = Item::query();
$data = $request->only(['item_category_id', 'name']);
- if(isset($data['item_category_id']) && $data['item_category_id'] != 'none')
+ if (isset($data['item_category_id']) && $data['item_category_id'] != 'none') {
$query->where('item_category_id', $data['item_category_id']);
- if(isset($data['name']))
+ }
+ if (isset($data['name'])) {
$query->where('name', 'LIKE', '%'.$data['name'].'%');
+ }
+
return view('admin.items.items', [
- 'items' => $query->paginate(20)->appends($request->query()),
- 'categories' => ['none' => 'Any Category'] + ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'items' => $query->paginate(20)->appends($request->query()),
+ 'categories' => ['none' => 'Any Category'] + ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
@@ -184,75 +184,79 @@ public function getItemIndex(Request $request)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateItem()
- {
+ public function getCreateItem() {
return view('admin.items.create_edit_item', [
- 'item' => new Item,
- 'categories' => ['none' => 'No category'] + ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'prompts' => Prompt::where('is_active', 1)->orderBy('id')->pluck('name', 'id'),
+ 'item' => new Item,
+ 'categories' => ['none' => 'No category'] + ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'prompts' => Prompt::where('is_active', 1)->orderBy('id')->pluck('name', 'id'),
'userCurrencies' => Currency::where('is_user_owned', 1)->orderBy('sort_user', 'DESC')->pluck('name', 'id'),
- 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray()
+ 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Shows the edit item page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditItem($id)
- {
+ public function getEditItem($id) {
$item = Item::find($id);
- if(!$item) abort(404);
+ if (!$item) {
+ abort(404);
+ }
+
return view('admin.items.create_edit_item', [
- 'item' => $item,
- 'categories' => ['none' => 'No category'] + ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'shops' => Shop::whereIn('id', ShopStock::where('item_id', $item->id)->pluck('shop_id')->unique()->toArray())->orderBy('sort', 'DESC')->get(),
- 'prompts' => Prompt::where('is_active', 1)->orderBy('id')->pluck('name', 'id'),
+ 'item' => $item,
+ 'categories' => ['none' => 'No category'] + ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'shops' => Shop::whereIn('id', ShopStock::where('item_id', $item->id)->pluck('shop_id')->unique()->toArray())->orderBy('sort', 'DESC')->get(),
+ 'prompts' => Prompt::where('is_active', 1)->orderBy('id')->pluck('name', 'id'),
'userCurrencies' => Currency::where('is_user_owned', 1)->orderBy('sort_user', 'DESC')->pluck('name', 'id'),
- 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray()
+ 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Creates or edits an item.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int|null $id
+ * @param App\Services\ItemService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditItem(Request $request, ItemService $service, $id = null)
- {
+ public function postCreateEditItem(Request $request, ItemService $service, $id = null) {
$id ? $request->validate(Item::$updateRules) : $request->validate(Item::$createRules);
$data = $request->only([
'name', 'allow_transfer', 'item_category_id', 'description', 'image', 'remove_image', 'rarity',
'reference_url', 'artist_id', 'artist_url', 'uses', 'shops', 'prompts', 'release', 'currency_id', 'currency_quantity',
- 'is_released'
+ 'is_released',
]);
- if($id && $service->updateItem(Item::find($id), $data, Auth::user())) {
+ if ($id && $service->updateItem(Item::find($id), $data, Auth::user())) {
flash('Item updated successfully.')->success();
- }
- else if (!$id && $item = $service->createItem($data, Auth::user())) {
+ } elseif (!$id && $item = $service->createItem($data, Auth::user())) {
flash('Item created successfully.')->success();
+
return redirect()->to('admin/data/items/edit/'.$item->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the item deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteItem($id)
- {
+ public function getDeleteItem($id) {
$item = Item::find($id);
+
return view('admin.items._delete_item', [
'item' => $item,
]);
@@ -261,19 +265,20 @@ public function getDeleteItem($id)
/**
* Creates or edits an item.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
+ * @param App\Services\ItemService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteItem(Request $request, ItemService $service, $id)
- {
- if($id && $service->deleteItem(Item::find($id))) {
+ public function postDeleteItem(Request $request, ItemService $service, $id) {
+ if ($id && $service->deleteItem(Item::find($id))) {
flash('Item deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/items');
}
@@ -286,114 +291,124 @@ public function postDeleteItem(Request $request, ItemService $service, $id)
/**
* Gets the tag addition page.
*
- * @param App\Services\ItemService $service
- * @param int $id
+ * @param App\Services\ItemService $service
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getAddItemTag(ItemService $service, $id)
- {
+ public function getAddItemTag(ItemService $service, $id) {
$item = Item::find($id);
+
return view('admin.items.add_tag', [
'item' => $item,
- 'tags' => array_diff($service->getItemTags(), $item->tags()->pluck('tag')->toArray())
+ 'tags' => array_diff($service->getItemTags(), $item->tags()->pluck('tag')->toArray()),
]);
}
/**
* Adds a tag to an item.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
+ * @param App\Services\ItemService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postAddItemTag(Request $request, ItemService $service, $id)
- {
+ public function postAddItemTag(Request $request, ItemService $service, $id) {
$item = Item::find($id);
$tag = $request->get('tag');
- if($tag = $service->addItemTag($item, $tag)) {
+ if ($tag = $service->addItemTag($item, $tag)) {
flash('Tag added successfully.')->success();
+
return redirect()->to($tag->adminUrl);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the tag editing page.
*
- * @param int $id
+ * @param int $id
+ * @param mixed $tag
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditItemTag(ItemService $service, $id, $tag)
- {
+ public function getEditItemTag(ItemService $service, $id, $tag) {
$item = Item::find($id);
$tag = $item->tags()->where('tag', $tag)->first();
- if(!$item || !$tag) abort(404);
+ if (!$item || !$tag) {
+ abort(404);
+ }
+
return view('admin.items.edit_tag', [
'item' => $item,
- 'tag' => $tag
+ 'tag' => $tag,
] + $tag->getEditData());
}
/**
* Edits tag data for an item.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
- * @param string $tag
+ * @param App\Services\ItemService $service
+ * @param int $id
+ * @param string $tag
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditItemTag(Request $request, ItemService $service, $id, $tag)
- {
+ public function postEditItemTag(Request $request, ItemService $service, $id, $tag) {
$item = Item::find($id);
- if($service->editItemTag($item, $tag, $request->all())) {
+ if ($service->editItemTag($item, $tag, $request->all())) {
flash('Tag edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the item tag deletion modal.
*
- * @param int $id
- * @param string $tag
+ * @param int $id
+ * @param string $tag
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteItemTag($id, $tag)
- {
+ public function getDeleteItemTag($id, $tag) {
$item = Item::find($id);
$tag = $item->tags()->where('tag', $tag)->first();
+
return view('admin.items._delete_item_tag', [
'item' => $item,
- 'tag' => $tag
+ 'tag' => $tag,
]);
}
/**
* Deletes a tag from an item.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ItemService $service
- * @param int $id
- * @param string $tag
+ * @param App\Services\ItemService $service
+ * @param int $id
+ * @param string $tag
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteItemTag(Request $request, ItemService $service, $id, $tag)
- {
+ public function postDeleteItemTag(Request $request, ItemService $service, $id, $tag) {
$item = Item::find($id);
- if($service->deleteItemTag($item, $tag)) {
+ if ($service->deleteItemTag($item, $tag)) {
flash('Tag deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/items/edit/'.$item->id);
}
}
diff --git a/app/Http/Controllers/Admin/Data/LootTableController.php b/app/Http/Controllers/Admin/Data/LootTableController.php
index e48ab3eee5..592d99bd07 100644
--- a/app/Http/Controllers/Admin/Data/LootTableController.php
+++ b/app/Http/Controllers/Admin/Data/LootTableController.php
@@ -2,21 +2,15 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
+use App\Http\Controllers\Controller;
+use App\Models\Currency\Currency;
use App\Models\Item\Item;
use App\Models\Item\ItemCategory;
-use App\Models\Currency\Currency;
use App\Models\Loot\LootTable;
-
use App\Services\LootService;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class LootTableController extends Controller
-{
+class LootTableController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Loot Table Controller
@@ -31,10 +25,9 @@ class LootTableController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.loot_tables.loot_tables', [
- 'tables' => LootTable::paginate(20)
+ 'tables' => LootTable::paginate(20),
]);
}
@@ -43,82 +36,85 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateLootTable()
- {
+ public function getCreateLootTable() {
$rarities = Item::whereNotNull('data')->get()->pluck('rarity')->unique()->toArray();
sort($rarities);
return view('admin.loot_tables.create_edit_loot_table', [
- 'table' => new LootTable,
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'table' => new LootTable,
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
'categories' => ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id'),
'currencies' => Currency::orderBy('name')->pluck('name', 'id'),
- 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
- 'rarities' => array_filter($rarities),
+ 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
+ 'rarities' => array_filter($rarities),
]);
}
/**
* Shows the edit loot table page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditLootTable($id)
- {
+ public function getEditLootTable($id) {
$table = LootTable::find($id);
- if(!$table) abort(404);
+ if (!$table) {
+ abort(404);
+ }
$rarities = Item::whereNotNull('data')->get()->pluck('rarity')->unique()->toArray();
sort($rarities);
return view('admin.loot_tables.create_edit_loot_table', [
- 'table' => $table,
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'table' => $table,
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
'categories' => ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id'),
'currencies' => Currency::orderBy('name')->pluck('name', 'id'),
- 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
- 'rarities' => array_filter($rarities),
+ 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
+ 'rarities' => array_filter($rarities),
]);
}
/**
* Creates or edits a loot table.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\LootService $service
- * @param int|null $id
+ * @param App\Services\LootService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditLootTable(Request $request, LootService $service, $id = null)
- {
+ public function postCreateEditLootTable(Request $request, LootService $service, $id = null) {
$id ? $request->validate(LootTable::$updateRules) : $request->validate(LootTable::$createRules);
$data = $request->only([
'name', 'display_name', 'rewardable_type', 'rewardable_id', 'quantity', 'weight',
- 'criteria', 'rarity'
+ 'criteria', 'rarity',
]);
- if($id && $service->updateLootTable(LootTable::find($id), $data)) {
+ if ($id && $service->updateLootTable(LootTable::find($id), $data)) {
flash('Loot table updated successfully.')->success();
- }
- else if (!$id && $table = $service->createLootTable($data)) {
+ } elseif (!$id && $table = $service->createLootTable($data)) {
flash('Loot table created successfully.')->success();
+
return redirect()->to('admin/data/loot-tables/edit/'.$table->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the loot table deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteLootTable($id)
- {
+ public function getDeleteLootTable($id) {
$table = LootTable::find($id);
+
return view('admin.loot_tables._delete_loot_table', [
'table' => $table,
]);
@@ -127,45 +123,48 @@ public function getDeleteLootTable($id)
/**
* Deletes an item category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\LootService $service
- * @param int $id
+ * @param App\Services\LootService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteLootTable(Request $request, LootService $service, $id)
- {
- if($id && $service->deleteLootTable(LootTable::find($id))) {
+ public function postDeleteLootTable(Request $request, LootService $service, $id) {
+ if ($id && $service->deleteLootTable(LootTable::find($id))) {
flash('Loot table deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/loot-tables');
}
/**
* Gets the loot table test roll modal.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\LootService $service
- * @param int $id
+ * @param App\Services\LootService $service
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getRollLootTable(Request $request, LootService $service, $id)
- {
+ public function getRollLootTable(Request $request, LootService $service, $id) {
$table = LootTable::find($id);
- if(!$table) abort(404);
+ if (!$table) {
+ abort(404);
+ }
// Normally we'd merge the result tables, but since we're going to be looking at
// the results of each roll individually on this page, we'll keep them separate
$results = [];
- for ($i = 0; $i < $request->get('quantity'); $i++)
+ for ($i = 0; $i < $request->get('quantity'); $i++) {
$results[] = $table->roll();
+ }
return view('admin.loot_tables._roll_loot_table', [
- 'table' => $table,
- 'results' => $results,
- 'quantity' => $request->get('quantity')
+ 'table' => $table,
+ 'results' => $results,
+ 'quantity' => $request->get('quantity'),
]);
}
}
diff --git a/app/Http/Controllers/Admin/Data/PromptController.php b/app/Http/Controllers/Admin/Data/PromptController.php
index bf69f54e92..527d29dcd0 100644
--- a/app/Http/Controllers/Admin/Data/PromptController.php
+++ b/app/Http/Controllers/Admin/Data/PromptController.php
@@ -2,24 +2,19 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
-use App\Models\Prompt\PromptCategory;
-use App\Models\Prompt\Prompt;
-use App\Models\Item\Item;
+use App\Http\Controllers\Controller;
+use App\Models\Criteria\Criterion;
use App\Models\Currency\Currency;
+use App\Models\Item\Item;
use App\Models\Loot\LootTable;
+use App\Models\Prompt\Prompt;
+use App\Models\Prompt\PromptCategory;
use App\Models\Raffle\Raffle;
-
use App\Services\PromptService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-use App\Models\Criteria\Criterion;
-
-class PromptController extends Controller
-{
+class PromptController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Prompt Controller
@@ -34,10 +29,9 @@ class PromptController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.prompts.prompt_categories', [
- 'categories' => PromptCategory::orderBy('sort', 'DESC')->get()
+ 'categories' => PromptCategory::orderBy('sort', 'DESC')->get(),
]);
}
@@ -46,64 +40,68 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreatePromptCategory()
- {
+ public function getCreatePromptCategory() {
return view('admin.prompts.create_edit_prompt_category', [
- 'category' => new PromptCategory
+ 'category' => new PromptCategory,
]);
}
/**
* Shows the edit prompt category page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditPromptCategory($id)
- {
+ public function getEditPromptCategory($id) {
$category = PromptCategory::find($id);
- if(!$category) abort(404);
+ if (!$category) {
+ abort(404);
+ }
+
return view('admin.prompts.create_edit_prompt_category', [
- 'category' => $category
+ 'category' => $category,
]);
}
/**
* Creates or edits a prompt category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\PromptService $service
- * @param int|null $id
+ * @param App\Services\PromptService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditPromptCategory(Request $request, PromptService $service, $id = null)
- {
+ public function postCreateEditPromptCategory(Request $request, PromptService $service, $id = null) {
$id ? $request->validate(PromptCategory::$updateRules) : $request->validate(PromptCategory::$createRules);
$data = $request->only([
- 'name', 'description', 'image', 'remove_image'
+ 'name', 'description', 'image', 'remove_image',
]);
- if($id && $service->updatePromptCategory(PromptCategory::find($id), $data, Auth::user())) {
+ if ($id && $service->updatePromptCategory(PromptCategory::find($id), $data, Auth::user())) {
flash('Category updated successfully.')->success();
- }
- else if (!$id && $category = $service->createPromptCategory($data, Auth::user())) {
+ } elseif (!$id && $category = $service->createPromptCategory($data, Auth::user())) {
flash('Category created successfully.')->success();
+
return redirect()->to('admin/data/prompt-categories/edit/'.$category->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the prompt category deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeletePromptCategory($id)
- {
+ public function getDeletePromptCategory($id) {
$category = PromptCategory::find($id);
+
return view('admin.prompts._delete_prompt_category', [
'category' => $category,
]);
@@ -112,41 +110,42 @@ public function getDeletePromptCategory($id)
/**
* Deletes a prompt category.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\PromptService $service
- * @param int $id
+ * @param App\Services\PromptService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeletePromptCategory(Request $request, PromptService $service, $id)
- {
- if($id && $service->deletePromptCategory(PromptCategory::find($id))) {
+ public function postDeletePromptCategory(Request $request, PromptService $service, $id) {
+ if ($id && $service->deletePromptCategory(PromptCategory::find($id))) {
flash('Category deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/prompt-categories');
}
/**
* Sorts prompt categories.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\PromptService $service
+ * @param App\Services\PromptService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortPromptCategory(Request $request, PromptService $service)
- {
- if($service->sortPromptCategory($request->get('sort'))) {
+ public function postSortPromptCategory(Request $request, PromptService $service) {
+ if ($service->sortPromptCategory($request->get('sort'))) {
flash('Category order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
/**********************************************************************************************
PROMPTS
@@ -156,20 +155,21 @@ public function postSortPromptCategory(Request $request, PromptService $service)
/**
* Shows the prompt category index.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPromptIndex(Request $request)
- {
+ public function getPromptIndex(Request $request) {
$query = Prompt::query();
$data = $request->only(['prompt_category_id', 'name']);
- if(isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none')
+ if (isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none') {
$query->where('prompt_category_id', $data['prompt_category_id']);
- if(isset($data['name']))
+ }
+ if (isset($data['name'])) {
$query->where('name', 'LIKE', '%'.$data['name'].'%');
+ }
+
return view('admin.prompts.prompts', [
- 'prompts' => $query->paginate(20)->appends($request->query()),
- 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'prompts' => $query->paginate(20)->appends($request->query()),
+ 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
@@ -178,76 +178,80 @@ public function getPromptIndex(Request $request)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreatePrompt()
- {
+ public function getCreatePrompt() {
return view('admin.prompts.create_edit_prompt', [
- 'prompt' => new Prompt,
+ 'prompt' => new Prompt,
'categories' => ['none' => 'No category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
- 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
- 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
- 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
+ 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
+ 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
+ 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
]);
}
/**
* Shows the edit prompt page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditPrompt($id)
- {
+ public function getEditPrompt($id) {
$prompt = Prompt::find($id);
- if(!$prompt) abort(404);
+ if (!$prompt) {
+ abort(404);
+ }
+
return view('admin.prompts.create_edit_prompt', [
- 'prompt' => $prompt,
+ 'prompt' => $prompt,
'categories' => ['none' => 'No category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
- 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
- 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
- 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
+ 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
+ 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
+ 'criteria' => Criterion::active()->orderBy('name')->pluck('name', 'id'),
]);
}
/**
* Creates or edits a prompt.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\PromptService $service
- * @param int|null $id
+ * @param App\Services\PromptService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditPrompt(Request $request, PromptService $service, $id = null)
- {
+ public function postCreateEditPrompt(Request $request, PromptService $service, $id = null) {
$id ? $request->validate(Prompt::$updateRules) : $request->validate(Prompt::$createRules);
$data = $request->only([
- 'name', 'prompt_category_id', 'summary', 'description', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'is_active', 'rewardable_type', 'rewardable_id', 'quantity', 'image', 'remove_image', 'prefix', 'hide_submissions', 'criterion_id', 'criterion'
+ 'name', 'prompt_category_id', 'summary', 'description', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'is_active', 'rewardable_type', 'rewardable_id', 'quantity', 'image', 'remove_image', 'prefix', 'hide_submissions', 'criterion_id', 'criterion',
]);
- if($id && $service->updatePrompt(Prompt::find($id), $data, Auth::user())) {
+ if ($id && $service->updatePrompt(Prompt::find($id), $data, Auth::user())) {
flash('Prompt updated successfully.')->success();
- }
- else if (!$id && $prompt = $service->createPrompt($data, Auth::user())) {
+ } elseif (!$id && $prompt = $service->createPrompt($data, Auth::user())) {
flash('Prompt created successfully.')->success();
+
return redirect()->to('admin/data/prompts/edit/'.$prompt->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the prompt deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeletePrompt($id)
- {
+ public function getDeletePrompt($id) {
$prompt = Prompt::find($id);
+
return view('admin.prompts._delete_prompt', [
'prompt' => $prompt,
]);
@@ -256,19 +260,20 @@ public function getDeletePrompt($id)
/**
* Deletes a prompt.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\PromptService $service
- * @param int $id
+ * @param App\Services\PromptService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeletePrompt(Request $request, PromptService $service, $id)
- {
- if($id && $service->deletePrompt(Prompt::find($id))) {
+ public function postDeletePrompt(Request $request, PromptService $service, $id) {
+ if ($id && $service->deletePrompt(Prompt::find($id))) {
flash('Prompt deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/prompts');
}
}
diff --git a/app/Http/Controllers/Admin/Data/RarityController.php b/app/Http/Controllers/Admin/Data/RarityController.php
index 0ac98f2e18..2af60445ed 100644
--- a/app/Http/Controllers/Admin/Data/RarityController.php
+++ b/app/Http/Controllers/Admin/Data/RarityController.php
@@ -2,18 +2,13 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
+use App\Http\Controllers\Controller;
use App\Models\Rarity;
-
use App\Services\RarityService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class RarityController extends Controller
-{
+class RarityController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Rarity Controller
@@ -28,76 +23,79 @@ class RarityController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.rarities.rarities', [
- 'rarities' => Rarity::orderBy('sort', 'DESC')->get()
+ 'rarities' => Rarity::orderBy('sort', 'DESC')->get(),
]);
}
-
+
/**
* Shows the create rarity page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateRarity()
- {
+ public function getCreateRarity() {
return view('admin.rarities.create_edit_rarity', [
- 'rarity' => new Rarity
+ 'rarity' => new Rarity,
]);
}
-
+
/**
* Shows the edit rarity page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditRarity($id)
- {
+ public function getEditRarity($id) {
$rarity = Rarity::find($id);
- if(!$rarity) abort(404);
+ if (!$rarity) {
+ abort(404);
+ }
+
return view('admin.rarities.create_edit_rarity', [
- 'rarity' => $rarity
+ 'rarity' => $rarity,
]);
}
/**
* Creates or edits a rarity.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\RarityService $service
- * @param int|null $id
+ * @param App\Services\RarityService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditRarity(Request $request, RarityService $service, $id = null)
- {
+ public function postCreateEditRarity(Request $request, RarityService $service, $id = null) {
$id ? $request->validate(Rarity::$updateRules) : $request->validate(Rarity::$createRules);
$data = $request->only([
- 'name', 'color', 'description', 'image', 'remove_image'
+ 'name', 'color', 'description', 'image', 'remove_image',
]);
- if($id && $service->updateRarity(Rarity::find($id), $data, Auth::user())) {
+ if ($id && $service->updateRarity(Rarity::find($id), $data, Auth::user())) {
flash('Rarity updated successfully.')->success();
- }
- else if (!$id && $rarity = $service->createRarity($data, Auth::user())) {
+ } elseif (!$id && $rarity = $service->createRarity($data, Auth::user())) {
flash('Rarity created successfully.')->success();
+
return redirect()->to('admin/data/rarities/edit/'.$rarity->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the rarity deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteRarity($id)
- {
+ public function getDeleteRarity($id) {
$rarity = Rarity::find($id);
+
return view('admin.rarities._delete_rarity', [
'rarity' => $rarity,
]);
@@ -106,37 +104,39 @@ public function getDeleteRarity($id)
/**
* Deletes a rarity.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\RarityService $service
- * @param int $id
+ * @param App\Services\RarityService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteRarity(Request $request, RarityService $service, $id)
- {
- if($id && $service->deleteRarity(Rarity::find($id))) {
+ public function postDeleteRarity(Request $request, RarityService $service, $id) {
+ if ($id && $service->deleteRarity(Rarity::find($id))) {
flash('Rarity deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/rarities');
}
/**
* Sorts rarities.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\RarityService $service
+ * @param App\Services\RarityService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortRarity(Request $request, RarityService $service)
- {
- if($service->sortRarity($request->get('sort'))) {
+ public function postSortRarity(Request $request, RarityService $service) {
+ if ($service->sortRarity($request->get('sort'))) {
flash('Rarity order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/Data/ShopController.php b/app/Http/Controllers/Admin/Data/ShopController.php
index 13cab9d712..2f709d826e 100644
--- a/app/Http/Controllers/Admin/Data/ShopController.php
+++ b/app/Http/Controllers/Admin/Data/ShopController.php
@@ -2,21 +2,15 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
-use App\Models\Shop\Shop;
-use App\Models\Shop\ShopStock;
-use App\Models\Item\Item;
+use App\Http\Controllers\Controller;
use App\Models\Currency\Currency;
-
+use App\Models\Item\Item;
+use App\Models\Shop\Shop;
use App\Services\ShopService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class ShopController extends Controller
-{
+class ShopController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Shop Controller
@@ -31,38 +25,39 @@ class ShopController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.shops.shops', [
- 'shops' => Shop::orderBy('sort', 'DESC')->get()
+ 'shops' => Shop::orderBy('sort', 'DESC')->get(),
]);
}
-
+
/**
* Shows the create shop page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateShop()
- {
+ public function getCreateShop() {
return view('admin.shops.create_edit_shop', [
- 'shop' => new Shop
+ 'shop' => new Shop,
]);
}
-
+
/**
* Shows the edit shop page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditShop($id)
- {
+ public function getEditShop($id) {
$shop = Shop::find($id);
- if(!$shop) abort(404);
+ if (!$shop) {
+ abort(404);
+ }
+
return view('admin.shops.create_edit_shop', [
- 'shop' => $shop,
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'shop' => $shop,
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
'currencies' => Currency::orderBy('name')->pluck('name', 'id'),
]);
}
@@ -70,62 +65,66 @@ public function getEditShop($id)
/**
* Creates or edits a shop.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ShopService $service
- * @param int|null $id
+ * @param App\Services\ShopService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditShop(Request $request, ShopService $service, $id = null)
- {
+ public function postCreateEditShop(Request $request, ShopService $service, $id = null) {
$id ? $request->validate(Shop::$updateRules) : $request->validate(Shop::$createRules);
$data = $request->only([
- 'name', 'description', 'image', 'remove_image', 'is_active'
+ 'name', 'description', 'image', 'remove_image', 'is_active',
]);
- if($id && $service->updateShop(Shop::find($id), $data, Auth::user())) {
+ if ($id && $service->updateShop(Shop::find($id), $data, Auth::user())) {
flash('Shop updated successfully.')->success();
- }
- else if (!$id && $shop = $service->createShop($data, Auth::user())) {
+ } elseif (!$id && $shop = $service->createShop($data, Auth::user())) {
flash('Shop created successfully.')->success();
+
return redirect()->to('admin/data/shops/edit/'.$shop->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Edits a shop's stock.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ShopService $service
- * @param int $id
+ * @param App\Services\ShopService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditShopStock(Request $request, ShopService $service, $id)
- {
+ public function postEditShopStock(Request $request, ShopService $service, $id) {
$data = $request->only([
- 'shop_id', 'item_id', 'currency_id', 'cost', 'use_user_bank', 'use_character_bank', 'is_limited_stock', 'quantity', 'purchase_limit'
+ 'shop_id', 'item_id', 'currency_id', 'cost', 'use_user_bank', 'use_character_bank', 'is_limited_stock', 'quantity', 'purchase_limit',
]);
- if($service->updateShopStock(Shop::find($id), $data, Auth::user())) {
+ if ($service->updateShopStock(Shop::find($id), $data, Auth::user())) {
flash('Shop stock updated successfully.')->success();
+
return redirect()->back();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the shop deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteShop($id)
- {
+ public function getDeleteShop($id) {
$shop = Shop::find($id);
+
return view('admin.shops._delete_shop', [
'shop' => $shop,
]);
@@ -134,38 +133,39 @@ public function getDeleteShop($id)
/**
* Deletes a shop.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ShopService $service
- * @param int $id
+ * @param App\Services\ShopService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteShop(Request $request, ShopService $service, $id)
- {
- if($id && $service->deleteShop(Shop::find($id))) {
+ public function postDeleteShop(Request $request, ShopService $service, $id) {
+ if ($id && $service->deleteShop(Shop::find($id))) {
flash('Shop deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/shops');
}
/**
* Sorts shops.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ShopService $service
+ * @param App\Services\ShopService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortShop(Request $request, ShopService $service)
- {
- if($service->sortShop($request->get('sort'))) {
+ public function postSortShop(Request $request, ShopService $service) {
+ if ($service->sortShop($request->get('sort'))) {
flash('Shop order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
}
diff --git a/app/Http/Controllers/Admin/Data/SpeciesController.php b/app/Http/Controllers/Admin/Data/SpeciesController.php
index 8b1e9ae370..8873f6a2d1 100644
--- a/app/Http/Controllers/Admin/Data/SpeciesController.php
+++ b/app/Http/Controllers/Admin/Data/SpeciesController.php
@@ -2,20 +2,15 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
-use Auth;
-
+use App\Http\Controllers\Controller;
+use App\Models\Character\Sublist;
use App\Models\Species\Species;
use App\Models\Species\Subtype;
-use App\Models\Character\Sublist;
-
use App\Services\SpeciesService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class SpeciesController extends Controller
-{
+class SpeciesController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Species Controller
@@ -30,78 +25,81 @@ class SpeciesController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.specieses.specieses', [
- 'specieses' => Species::orderBy('sort', 'DESC')->get()
+ 'specieses' => Species::orderBy('sort', 'DESC')->get(),
]);
}
-
+
/**
* Shows the create species page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateSpecies()
- {
+ public function getCreateSpecies() {
return view('admin.specieses.create_edit_species', [
- 'species' => new Species,
- 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray()
+ 'species' => new Species,
+ 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
-
+
/**
* Shows the edit species page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditSpecies($id)
- {
+ public function getEditSpecies($id) {
$species = Species::find($id);
- if(!$species) abort(404);
+ if (!$species) {
+ abort(404);
+ }
+
return view('admin.specieses.create_edit_species', [
- 'species' => $species,
- 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray()
+ 'species' => $species,
+ 'sublists' => [0 => 'No Sublist'] + Sublist::orderBy('name', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
/**
* Creates or edits a species.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SpeciesService $service
- * @param int|null $id
+ * @param App\Services\SpeciesService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditSpecies(Request $request, SpeciesService $service, $id = null)
- {
+ public function postCreateEditSpecies(Request $request, SpeciesService $service, $id = null) {
$id ? $request->validate(Species::$updateRules) : $request->validate(Species::$createRules);
$data = $request->only([
- 'name', 'description', 'image', 'remove_image', 'masterlist_sub_id'
+ 'name', 'description', 'image', 'remove_image', 'masterlist_sub_id',
]);
- if($id && $service->updateSpecies(Species::find($id), $data, Auth::user())) {
+ if ($id && $service->updateSpecies(Species::find($id), $data, Auth::user())) {
flash('Species updated successfully.')->success();
- }
- else if (!$id && $species = $service->createSpecies($data, Auth::user())) {
+ } elseif (!$id && $species = $service->createSpecies($data, Auth::user())) {
flash('Species created successfully.')->success();
+
return redirect()->to('admin/data/species/edit/'.$species->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the species deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteSpecies($id)
- {
+ public function getDeleteSpecies($id) {
$species = Species::find($id);
+
return view('admin.specieses._delete_species', [
'species' => $species,
]);
@@ -110,37 +108,39 @@ public function getDeleteSpecies($id)
/**
* Deletes a species.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SpeciesService $service
- * @param int $id
+ * @param App\Services\SpeciesService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteSpecies(Request $request, SpeciesService $service, $id)
- {
- if($id && $service->deleteSpecies(Species::find($id))) {
+ public function postDeleteSpecies(Request $request, SpeciesService $service, $id) {
+ if ($id && $service->deleteSpecies(Species::find($id))) {
flash('Species deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/species');
}
/**
* Sorts species.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SpeciesService $service
+ * @param App\Services\SpeciesService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortSpecies(Request $request, SpeciesService $service)
- {
- if($service->sortSpecies($request->get('sort'))) {
+ public function postSortSpecies(Request $request, SpeciesService $service) {
+ if ($service->sortSpecies($request->get('sort'))) {
flash('Species order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
@@ -149,78 +149,81 @@ public function postSortSpecies(Request $request, SpeciesService $service)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubtypeIndex()
- {
+ public function getSubtypeIndex() {
return view('admin.specieses.subtypes', [
- 'subtypes' => Subtype::orderBy('sort', 'DESC')->get()
+ 'subtypes' => Subtype::orderBy('sort', 'DESC')->get(),
]);
}
-
+
/**
* Shows the create subtype page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateSubtype()
- {
+ public function getCreateSubtype() {
return view('admin.specieses.create_edit_subtype', [
- 'subtype' => new Subtype,
- 'specieses' => Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'subtype' => new Subtype,
+ 'specieses' => Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
-
+
/**
* Shows the edit subtype page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditSubtype($id)
- {
+ public function getEditSubtype($id) {
$subtype = Subtype::find($id);
- if(!$subtype) abort(404);
+ if (!$subtype) {
+ abort(404);
+ }
+
return view('admin.specieses.create_edit_subtype', [
- 'subtype' => $subtype,
- 'specieses' => Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'subtype' => $subtype,
+ 'specieses' => Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
/**
* Creates or edits a subtype.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SpeciesService $service
- * @param int|null $id
+ * @param App\Services\SpeciesService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditSubtype(Request $request, SpeciesService $service, $id = null)
- {
+ public function postCreateEditSubtype(Request $request, SpeciesService $service, $id = null) {
$id ? $request->validate(Subtype::$updateRules) : $request->validate(Subtype::$createRules);
$data = $request->only([
- 'species_id', 'name', 'description', 'image', 'remove_image'
+ 'species_id', 'name', 'description', 'image', 'remove_image',
]);
- if($id && $service->updateSubtype(Subtype::find($id), $data, Auth::user())) {
+ if ($id && $service->updateSubtype(Subtype::find($id), $data, Auth::user())) {
flash('Subtype updated successfully.')->success();
- }
- else if (!$id && $subtype = $service->createSubtype($data, Auth::user())) {
+ } elseif (!$id && $subtype = $service->createSubtype($data, Auth::user())) {
flash('Subtype created successfully.')->success();
+
return redirect()->to('admin/data/subtypes/edit/'.$subtype->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the subtype deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteSubtype($id)
- {
+ public function getDeleteSubtype($id) {
$subtype = Subtype::find($id);
+
return view('admin.specieses._delete_subtype', [
'subtype' => $subtype,
]);
@@ -229,37 +232,39 @@ public function getDeleteSubtype($id)
/**
* Deletes a subtype.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SpeciesService $service
- * @param int $id
+ * @param App\Services\SpeciesService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteSubtype(Request $request, SpeciesService $service, $id)
- {
- if($id && $service->deleteSubtype(Subtype::find($id))) {
+ public function postDeleteSubtype(Request $request, SpeciesService $service, $id) {
+ if ($id && $service->deleteSubtype(Subtype::find($id))) {
flash('Subtype deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/subtypes');
}
/**
* Sorts subtypes.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SpeciesService $service
+ * @param App\Services\SpeciesService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortSubtypes(Request $request, SpeciesService $service)
- {
- if($service->sortSubtypes($request->get('sort'))) {
+ public function postSortSubtypes(Request $request, SpeciesService $service) {
+ if ($service->sortSubtypes($request->get('sort'))) {
flash('Subtype order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/Data/SublistController.php b/app/Http/Controllers/Admin/Data/SublistController.php
index 7fcf67aaa2..dd8d86f407 100644
--- a/app/Http/Controllers/Admin/Data/SublistController.php
+++ b/app/Http/Controllers/Admin/Data/SublistController.php
@@ -2,16 +2,14 @@
namespace App\Http\Controllers\Admin\Data;
-use Illuminate\Http\Request;
-
use App\Http\Controllers\Controller;
-use App\Models\Character\Sublist;
-use App\Services\SublistService;
use App\Models\Character\CharacterCategory;
+use App\Models\Character\Sublist;
use App\Models\Species\Species;
+use App\Services\SublistService;
+use Illuminate\Http\Request;
-class SublistController extends Controller
-{
+class SublistController extends Controller {
/*
|--------------------------------------------------------------------------
| Admin / Masterlist Sub Controller
@@ -26,87 +24,94 @@ class SublistController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.sublist.sublist', [
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
-
+
/**
* Shows the create sublist page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateSublist()
- {
+ public function getCreateSublist() {
return view('admin.sublist.create_edit_sublist', [
- 'sublist' => new Sublist,
+ 'sublist' => new Sublist,
'subCategories' => [],
- 'subSpecies' => [],
- 'categories' => CharacterCategory::orderBy('sort')->pluck('name', 'id'),
- 'species' => Species::orderBy('sort')->pluck('name', 'id')
+ 'subSpecies' => [],
+ 'categories' => CharacterCategory::orderBy('sort')->pluck('name', 'id'),
+ 'species' => Species::orderBy('sort')->pluck('name', 'id'),
]);
}
-
+
/**
* Shows the edit sublist page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditSublist($id)
- {
+ public function getEditSublist($id) {
$sublist = Sublist::find($id);
- if(!$sublist) abort(404);
+ if (!$sublist) {
+ abort(404);
+ }
+
return view('admin.sublist.create_edit_sublist', [
- 'sublist' => $sublist,
+ 'sublist' => $sublist,
'subCategories' => CharacterCategory::where('masterlist_sub_id', $sublist->id)->pluck('id'),
- 'subSpecies' => Species::where('masterlist_sub_id', $sublist->id)->pluck('id'),
- 'categories' => CharacterCategory::orderBy('sort')->pluck('name', 'id'),
- 'species' => Species::orderBy('sort')->pluck('name', 'id')
+ 'subSpecies' => Species::where('masterlist_sub_id', $sublist->id)->pluck('id'),
+ 'categories' => CharacterCategory::orderBy('sort')->pluck('name', 'id'),
+ 'species' => Species::orderBy('sort')->pluck('name', 'id'),
]);
}
/**
* Creates or edits a sublist.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SublistService $service
- * @param int|null $id
+ * @param App\Services\SublistService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditSublist(Request $request, SublistService $service, $id = null)
- {
- if(!$request['show_main'] || $request['show_main'] == null) $request['show_main'] = 0; else $request['show_main'] = 1;
+ public function postCreateEditSublist(Request $request, SublistService $service, $id = null) {
+ if (!$request['show_main'] || $request['show_main'] == null) {
+ $request['show_main'] = 0;
+ } else {
+ $request['show_main'] = 1;
+ }
$id ? $request->validate(Sublist::$updateRules) : $request->validate(Sublist::$createRules);
$data = $request->only([
- 'name', 'key', 'show_main'
+ 'name', 'key', 'show_main',
]);
- $contents = $request->only([ 'categories', 'species' ]);
+ $contents = $request->only(['categories', 'species']);
- if($id && $service->updateSublist(Sublist::find($id), $data, $contents)) {
+ if ($id && $service->updateSublist(Sublist::find($id), $data, $contents)) {
flash('Sublist updated successfully.')->success();
- }
- else if (!$id && $sublist = $service->createSublist($data, $contents)) {
+ } elseif (!$id && $sublist = $service->createSublist($data, $contents)) {
flash('Sublist created successfully.')->success();
+
return redirect()->to('admin/data/sublists/edit/'.$sublist->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the sublist deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteSublist($id)
- {
+ public function getDeleteSublist($id) {
$sublist = Sublist::find($id);
+
return view('admin.sublist._delete_sublist', [
'sublist' => $sublist,
]);
@@ -115,37 +120,39 @@ public function getDeleteSublist($id)
/**
* Deletes a sublist.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SublistService $service
- * @param int $id
+ * @param App\Services\SublistService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteSublist(Request $request, SublistService $service, $id)
- {
- if($id && $service->deleteSublist(Sublist::find($id))) {
+ public function postDeleteSublist(Request $request, SublistService $service, $id) {
+ if ($id && $service->deleteSublist(Sublist::find($id))) {
flash('Sublist deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/data/sublists');
}
-
+
/**
* Sorts sublist order.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SublistService $service
+ * @param App\Services\SublistService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortSublist(Request $request, SublistService $service)
- {
- if($service->sortSublist($request->get('sort'))) {
+ public function postSortSublist(Request $request, SublistService $service) {
+ if ($service->sortSublist($request->get('sort'))) {
flash('Category order updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/DesignController.php b/app/Http/Controllers/Admin/DesignController.php
index 72787517e2..3380dfe127 100644
--- a/app/Http/Controllers/Admin/DesignController.php
+++ b/app/Http/Controllers/Admin/DesignController.php
@@ -2,98 +2,103 @@
namespace App\Http\Controllers\Admin;
-use Auth;
-use Config;
-use Illuminate\Http\Request;
-
-use App\Models\Character\CharacterDesignUpdate;
+use App\Http\Controllers\Controller;
use App\Models\Character\CharacterCategory;
-
+use App\Models\Character\CharacterDesignUpdate;
use App\Services\CharacterManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class DesignController extends Controller
-{
+class DesignController extends Controller {
/**
* Show the design index page.
*
- * @param \Illuminate\Http\Request $request
- * @param string $type
- * @param string $id
+ * @param string $type
+ * @param mixed $status
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDesignIndex(Request $request, $type, $status)
- {
+ public function getDesignIndex(Request $request, $type, $status) {
$requests = CharacterDesignUpdate::where('status', ucfirst($status));
- if($type == 'myo-approvals') $requests = $requests->myos();
- else $requests = $requests->characters();
-
+ if ($type == 'myo-approvals') {
+ $requests = $requests->myos();
+ } else {
+ $requests = $requests->characters();
+ }
+
return view('admin.designs.index', [
'requests' => $requests->paginate(30)->appends($request->query()),
- 'isMyo' => ($type == 'myo-approvals')
+ 'isMyo' => ($type == 'myo-approvals'),
]);
}
/**
* Show the design action confirmation modal.
*
+ * @param mixed $id
+ * @param mixed $action
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDesignConfirmation($id, $action)
- {
+ public function getDesignConfirmation($id, $action) {
$r = CharacterDesignUpdate::where('id', $id)->where('status', 'Pending')->first();
- if(!$r) abort(404);
+ if (!$r) {
+ abort(404);
+ }
+
return view('admin.designs._'.$action.'_request_modal', [
- 'request' => $r
+ 'request' => $r,
] + ($action == 'approve' ? [
'categories' => CharacterCategory::orderBy('sort')->get(),
] : []));
}
- public function postDesign($id, $action, Request $request, CharacterManager $service)
- {
+ public function postDesign($id, $action, Request $request, CharacterManager $service) {
$r = CharacterDesignUpdate::where('id', $id)->where('status', 'Pending')->first();
- if($action == 'cancel' && $service->cancelRequest($request->only(['staff_comments', 'preserve_queue']), $r, Auth::user())) {
+ if ($action == 'cancel' && $service->cancelRequest($request->only(['staff_comments', 'preserve_queue']), $r, Auth::user())) {
flash('Request cancelled successfully.')->success();
- }
- elseif($action == 'approve' && $service->approveRequest($request->only([
- 'character_category_id', 'number', 'slug', 'description',
- 'is_giftable', 'is_tradeable', 'is_sellable', 'sale_value',
- 'transferrable_at', 'set_active', 'invalidate_old',
- ]), $r, Auth::user())) {
+ } elseif ($action == 'approve' && $service->approveRequest($request->only([
+ 'character_category_id', 'number', 'slug', 'description',
+ 'is_giftable', 'is_tradeable', 'is_sellable', 'sale_value',
+ 'transferrable_at', 'set_active', 'invalidate_old',
+ ]), $r, Auth::user())) {
flash('Request approved successfully.')->success();
- }
- elseif($action == 'reject' && $service->rejectRequest($request->only(['staff_comments']), $r, Auth::user())) {
+ } elseif ($action == 'reject' && $service->rejectRequest($request->only(['staff_comments']), $r, Auth::user())) {
flash('Request rejected successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Casts a vote for a design's approval or denial.
*
+ * @param mixed $id
+ * @param mixed $action
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function postVote($id, $action, Request $request, CharacterManager $service)
- {
+ public function postVote($id, $action, Request $request, CharacterManager $service) {
$r = CharacterDesignUpdate::where('id', $id)->where('status', 'Pending')->first();
- if(!$r) throw new \Exception ("Invalid design update.");
+ if (!$r) {
+ throw new \Exception('Invalid design update.');
+ }
- if($action == 'reject' && $service->voteRequest($action, $r, Auth::user())) {
+ if ($action == 'reject' && $service->voteRequest($action, $r, Auth::user())) {
flash('Voted to reject successfully.')->success();
- }
- elseif($action == 'approve' && $service->voteRequest($action, $r, Auth::user())) {
+ } elseif ($action == 'approve' && $service->voteRequest($action, $r, Auth::user())) {
flash('Voted to approve successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
}
diff --git a/app/Http/Controllers/Admin/FileController.php b/app/Http/Controllers/Admin/FileController.php
index 2aac0facaa..26736b166e 100644
--- a/app/Http/Controllers/Admin/FileController.php
+++ b/app/Http/Controllers/Admin/FileController.php
@@ -2,206 +2,216 @@
namespace App\Http\Controllers\Admin;
-use Illuminate\Http\Request;
-
-use Auth;
-use Config;
-
-use App\Services\FileManager;
-
use App\Http\Controllers\Controller;
+use App\Services\FileManager;
+use Config;
+use Illuminate\Http\Request;
-class FileController extends Controller
-{
+class FileController extends Controller {
/**
* Shows the files index.
*
- * @param string $folder
+ * @param string $folder
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex($folder = null)
- {
+ public function getIndex($folder = null) {
$filesDirectory = public_path().'/files';
// Create the files directory if it doesn't already exist.
- if(!file_exists($filesDirectory))
- {
+ if (!file_exists($filesDirectory)) {
// Create the directory.
if (!mkdir($filesDirectory, 0755, true)) {
$this->abort(500);
+
return false;
}
chmod($filesDirectory, 0755);
}
- if($folder && !file_exists($filesDirectory.'/'.$folder)) abort(404);
+ if ($folder && !file_exists($filesDirectory.'/'.$folder)) {
+ abort(404);
+ }
$dir = $filesDirectory.($folder ? '/'.$folder : '');
- $files = scandir($dir);
+ $files = scandir($dir);
$fileList = [];
- foreach($files as $file)
- {
- if(is_file($dir. '/'.$file)) $fileList[] = $file;
+ foreach ($files as $file) {
+ if (is_file($dir.'/'.$file)) {
+ $fileList[] = $file;
+ }
}
+
return view('admin.files.index', [
- 'folder' => $folder,
- 'folders' => glob(public_path().'/files/*' , GLOB_ONLYDIR),
- 'files' => $fileList
+ 'folder' => $folder,
+ 'folders' => glob(public_path().'/files/*', GLOB_ONLYDIR),
+ 'files' => $fileList,
]);
}
/**
* Creates a new directory in the files directory.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateFolder(Request $request, FileManager $service)
- {
+ public function postCreateFolder(Request $request, FileManager $service) {
$request->validate(['name' => 'required|alpha_dash']);
- if($service->createDirectory(public_path().'/files/'.$request->get('name'))) {
+ if ($service->createDirectory(public_path().'/files/'.$request->get('name'))) {
flash('Folder created successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Moves a file in the files directory.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postMoveFile(Request $request, FileManager $service)
- {
+ public function postMoveFile(Request $request, FileManager $service) {
$request->validate(['destination' => 'required']);
$oldDir = $request->get('folder');
$newDir = $request->get('destination');
- if($service->moveFile(public_path().'/files'.($oldDir ? '/' . $oldDir : ''),
- public_path().'/files'.($newDir != 'root' ? '/' . $newDir : ''),
- $request->get('filename'))) {
+ if ($service->moveFile(
+ public_path().'/files'.($oldDir ? '/'.$oldDir : ''),
+ public_path().'/files'.($newDir != 'root' ? '/'.$newDir : ''),
+ $request->get('filename')
+ )) {
flash('File moved successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Renames a file in the files directory.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postRenameFile(Request $request, FileManager $service)
- {
+ public function postRenameFile(Request $request, FileManager $service) {
$request->validate(['name' => 'required|regex:/^[a-z0-9\._-]+$/i']);
$dir = $request->get('folder');
$oldName = $request->get('filename');
$newName = $request->get('name');
- if($service->renameFile(public_path().'/files'.($dir ? '/' . $dir : ''), $oldName, $newName)) {
+ if ($service->renameFile(public_path().'/files'.($dir ? '/'.$dir : ''), $oldName, $newName)) {
flash('File renamed successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Deletes a file in the files directory.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteFile(Request $request, FileManager $service)
- {
+ public function postDeleteFile(Request $request, FileManager $service) {
$request->validate(['filename' => 'required']);
$dir = $request->get('folder');
$name = $request->get('filename');
- if($service->deleteFile(public_path().'/files'.($dir ? '/' . $dir : '') . '/' . $name)) {
+ if ($service->deleteFile(public_path().'/files'.($dir ? '/'.$dir : '').'/'.$name)) {
flash('File deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Uploads a file to the files directory.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postUploadFile(Request $request, FileManager $service)
- {
+ public function postUploadFile(Request $request, FileManager $service) {
$request->validate(['file' => 'required|file']);
$dir = $request->get('folder');
$file = $request->file('file');
- if($service->uploadFile($file, $dir, $file->getClientOriginalName())) {
+ if ($service->uploadFile($file, $dir, $file->getClientOriginalName())) {
flash('File uploaded successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Renames a directory in the files directory.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postRenameFolder(Request $request, FileManager $service)
- {
+ public function postRenameFolder(Request $request, FileManager $service) {
$request->validate(['name' => 'required|regex:/^[a-z0-9\._-]+$/i']);
$dir = public_path().'/files';
$oldName = $request->get('folder');
$newName = $request->get('name');
- if($service->renameDirectory($dir, $oldName, $newName)) {
+ if ($service->renameDirectory($dir, $oldName, $newName)) {
flash('Folder renamed successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+
return redirect()->back();
}
+
return redirect()->to('admin/files/'.$newName);
}
/**
* Deletes a directory in the files directory.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteFolder(Request $request, FileManager $service)
- {
+ public function postDeleteFolder(Request $request, FileManager $service) {
$request->validate(['folder' => 'required']);
$dir = $request->get('folder');
- if($service->deleteDirectory(public_path().'/files/'.$dir)) {
+ if ($service->deleteDirectory(public_path().'/files/'.$dir)) {
flash('Folder deleted successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+
return redirect()->back();
}
+
return redirect()->to('admin/files');
}
@@ -210,54 +220,55 @@ public function postDeleteFolder(Request $request, FileManager $service)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSiteImages()
- {
+ public function getSiteImages() {
return view('admin.files.images', [
- 'images' => Config::get('lorekeeper.image_files')
+ 'images' => Config::get('lorekeeper.image_files'),
]);
}
/**
* Uploads a site image file.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postUploadImage(Request $request, FileManager $service)
- {
+ public function postUploadImage(Request $request, FileManager $service) {
$request->validate(['file' => 'required|file']);
$file = $request->file('file');
$key = $request->get('key');
$filename = Config::get('lorekeeper.image_files.'.$key)['filename'];
- if($service->uploadFile($file, null, $filename, false)) {
+ if ($service->uploadFile($file, null, $filename, false)) {
flash('Image uploaded successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Uploads a custom site CSS file.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\FileManager $service
+ * @param App\Services\FileManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postUploadCss(Request $request, FileManager $service)
- {
+ public function postUploadCss(Request $request, FileManager $service) {
$request->validate(['file' => 'required|file']);
$file = $request->file('file');
- if($service->uploadCss($file)) {
+ if ($service->uploadCss($file)) {
flash('File uploaded successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/GalleryController.php b/app/Http/Controllers/Admin/GalleryController.php
index 16090bc751..955822e329 100644
--- a/app/Http/Controllers/Admin/GalleryController.php
+++ b/app/Http/Controllers/Admin/GalleryController.php
@@ -2,78 +2,83 @@
namespace App\Http\Controllers\Admin;
-use Auth;
-use Config;
-use Settings;
-use Illuminate\Http\Request;
-
+use App\Http\Controllers\Controller;
+use App\Models\Currency\Currency;
use App\Models\Gallery\Gallery;
use App\Models\Gallery\GallerySubmission;
-use App\Models\Currency\Currency;
-
use App\Services\GalleryManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class GalleryController extends Controller
-{
+class GalleryController extends Controller {
/**
* Shows the submission index page.
*
- * @param string $status
+ * @param string $status
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubmissionIndex(Request $request, $status = null)
- {
+ public function getSubmissionIndex(Request $request, $status = null) {
$submissions = GallerySubmission::collaboratorApproved()->where('status', $status ? ucfirst($status) : 'Pending');
- if($request->get('gallery_id'))
- $submissions->where(function($query) use ($request) {
+ if ($request->get('gallery_id')) {
+ $submissions->where(function ($query) use ($request) {
$query->where('gallery_id', $request->get('gallery_id'));
});
- if($status == 'pending' || !$status) $submissions = $submissions->orderBy('created_at', 'ASC');
- else $submissions = $submissions->orderBy('created_at', 'DESC');
+ }
+ if ($status == 'pending' || !$status) {
+ $submissions = $submissions->orderBy('created_at', 'ASC');
+ } else {
+ $submissions = $submissions->orderBy('created_at', 'DESC');
+ }
+
return view('admin.galleries.submissions_index', [
'submissions' => $submissions->paginate(10)->appends($request->query()),
- 'galleries' => ['' => 'Any Gallery'] + Gallery::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'galleries' => ['' => 'Any Gallery'] + Gallery::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
/**
* Shows the index of submissions in the context of currency rewards.
*
- * @param string $status
+ * @param string $status
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCurrencyIndex(Request $request, $status = null)
- {
+ public function getCurrencyIndex(Request $request, $status = null) {
$submissions = GallerySubmission::requiresAward()->where('is_valued', !$status || $status == 'pending' ? 0 : 1);
- if($request->get('gallery_id'))
- $submissions->where(function($query) use ($request) {
+ if ($request->get('gallery_id')) {
+ $submissions->where(function ($query) use ($request) {
$query->where('gallery_id', $request->get('gallery_id'));
});
- if($status == 'pending' || !$status) $submissions = $submissions->orderBy('created_at', 'ASC');
- else $submissions = $submissions->orderBy('created_at', 'DESC');
+ }
+ if ($status == 'pending' || !$status) {
+ $submissions = $submissions->orderBy('created_at', 'ASC');
+ } else {
+ $submissions = $submissions->orderBy('created_at', 'DESC');
+ }
+
return view('admin.galleries.submissions_currency_index', [
'submissions' => $submissions->paginate(10)->appends($request->query()),
- 'galleries' => ['' => 'Any Gallery'] + Gallery::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'galleries' => ['' => 'Any Gallery'] + Gallery::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
/**
* Edits gallery submissions.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryManager $service
- * @param int $id
- * @param string $action
+ * @param App\Services\GalleryManager $service
+ * @param int $id
+ * @param string $action
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditSubmission(Request $request, GalleryManager $service, $id, $action)
- {
- if(!$id) { flash('Invalid submission selected.')->error(); }
-
- if($id && $action) {
- switch($action) {
+ public function postEditSubmission(Request $request, GalleryManager $service, $id, $action) {
+ if (!$id) {
+ flash('Invalid submission selected.')->error();
+ }
+
+ if ($id && $action) {
+ switch ($action) {
default:
flash('Invalid action selected.')->error();
break;
@@ -91,71 +96,77 @@ public function postEditSubmission(Request $request, GalleryManager $service, $i
break;
}
}
+
return redirect()->back();
}
/**
* Casts a vote for a submission's approval or denial.
*
- * @param int $id
- * @param string $action
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryManager $service
+ * @param int $id
+ * @param string $action
+ * @param App\Services\GalleryManager $service
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- private function postVote($id, GalleryManager $service, $action)
- {
+ private function postVote($id, GalleryManager $service, $action) {
$submission = GallerySubmission::where('id', $id)->where('status', 'Pending')->first();
- if(!$submission) throw new \Exception ("Invalid submission.");
+ if (!$submission) {
+ throw new \Exception('Invalid submission.');
+ }
- if($action == 'reject' && $service->castVote($action, $submission, Auth::user())) {
+ if ($action == 'reject' && $service->castVote($action, $submission, Auth::user())) {
flash('Voted to reject successfully.')->success();
- }
- elseif($action == 'accept' && $service->castVote($action, $submission, Auth::user())) {
+ } elseif ($action == 'accept' && $service->castVote($action, $submission, Auth::user())) {
flash('Voted to approve successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Posts staff comments for a gallery submission.
*
- * @param int $id
- * @param string $data
- * @param App\Services\GalleryManager $service
+ * @param int $id
+ * @param string $data
+ * @param App\Services\GalleryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- private function postStaffComments($id, $data, GalleryManager $service)
- {
- if($service->postStaffComments($id, $data, Auth::user())) {
+ private function postStaffComments($id, $data, GalleryManager $service) {
+ if ($service->postStaffComments($id, $data, Auth::user())) {
flash('Comments updated succesfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Posts group currency evaluation for a gallery submission.
*
- * @param int $id
- * @param string $data
- * @param App\Services\GalleryManager $service
+ * @param int $id
+ * @param string $data
+ * @param App\Services\GalleryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- private function postValue($id, $data, GalleryManager $service)
- {
- if($service->postValueSubmission($id, $data, Auth::user())) {
+ private function postValue($id, $data, GalleryManager $service) {
+ if ($service->postValueSubmission($id, $data, Auth::user())) {
flash('Submission evaluated succesfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
}
diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php
index 257922d60e..6b87ecc45c 100644
--- a/app/Http/Controllers/Admin/HomeController.php
+++ b/app/Http/Controllers/Admin/HomeController.php
@@ -2,47 +2,41 @@
namespace App\Http\Controllers\Admin;
-use Illuminate\Http\Request;
-
-use Settings;
-use Auth;
-
-use App\Models\Submission\Submission;
-use App\Models\Gallery\GallerySubmission;
+use App\Http\Controllers\Controller;
use App\Models\Character\CharacterDesignUpdate;
use App\Models\Character\CharacterTransfer;
-use App\Models\Trade;
-use App\Models\Report\Report;
-
-use App\Http\Controllers\Controller;
use App\Models\Gallery\GalleryCriterion;
+use App\Models\Gallery\GallerySubmission;
+use App\Models\Report\Report;
+use App\Models\Submission\Submission;
+use App\Models\Trade;
+use Auth;
+use Settings;
-class HomeController extends Controller
-{
+class HomeController extends Controller {
/**
* Show the admin dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
$openTransfersQueue = Settings::get('open_transfers_queue');
$galleryRequireApproval = Settings::get('gallery_submissions_require_approval');
return view('admin.index', [
- 'submissionCount' => Submission::where('status', 'Pending')->whereNotNull('prompt_id')->count(),
- 'claimCount' => Submission::where('status', 'Pending')->whereNull('prompt_id')->count(),
- 'designCount' => CharacterDesignUpdate::characters()->where('status', 'Pending')->count(),
- 'myoCount' => CharacterDesignUpdate::myos()->where('status', 'Pending')->count(),
- 'reportCount' => Report::where('status', 'Pending')->count(),
- 'assignedReportCount' => Report::assignedToMe(Auth::user())->count(),
- 'openTransfersQueue' => $openTransfersQueue,
- 'transferCount' => $openTransfersQueue ? CharacterTransfer::active()->where('is_approved', 0)->count() : 0,
- 'tradeCount' => $openTransfersQueue ? Trade::where('status', 'Pending')->count() : 0,
+ 'submissionCount' => Submission::where('status', 'Pending')->whereNotNull('prompt_id')->count(),
+ 'claimCount' => Submission::where('status', 'Pending')->whereNull('prompt_id')->count(),
+ 'designCount' => CharacterDesignUpdate::characters()->where('status', 'Pending')->count(),
+ 'myoCount' => CharacterDesignUpdate::myos()->where('status', 'Pending')->count(),
+ 'reportCount' => Report::where('status', 'Pending')->count(),
+ 'assignedReportCount' => Report::assignedToMe(Auth::user())->count(),
+ 'openTransfersQueue' => $openTransfersQueue,
+ 'transferCount' => $openTransfersQueue ? CharacterTransfer::active()->where('is_approved', 0)->count() : 0,
+ 'tradeCount' => $openTransfersQueue ? Trade::where('status', 'Pending')->count() : 0,
'galleryRequireApproval' => $galleryRequireApproval,
- 'galleryCurrencyAwards' => GalleryCriterion::get()->count() > 0,
+ 'galleryCurrencyAwards' => GalleryCriterion::get()->count() > 0,
'gallerySubmissionCount' => GallerySubmission::collaboratorApproved()->where('status', 'Pending')->count(),
- 'galleryAwardCount' => GallerySubmission::requiresAward()->where('is_valued', 0)->count()
+ 'galleryAwardCount' => GallerySubmission::requiresAward()->where('is_valued', 0)->count(),
]);
}
}
diff --git a/app/Http/Controllers/Admin/InvitationController.php b/app/Http/Controllers/Admin/InvitationController.php
index 9078360c2c..efc02b7ae5 100644
--- a/app/Http/Controllers/Admin/InvitationController.php
+++ b/app/Http/Controllers/Admin/InvitationController.php
@@ -2,61 +2,60 @@
namespace App\Http\Controllers\Admin;
-use Illuminate\Http\Request;
-
-use Auth;
+use App\Http\Controllers\Controller;
use App\Models\Invitation;
use App\Services\InvitationService;
+use Auth;
-use App\Http\Controllers\Controller;
-
-class InvitationController extends Controller
-{
+class InvitationController extends Controller {
/**
* Shows the invitation key index.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.invitations.invitations', [
- 'invitations' => Invitation::orderBy('id', 'DESC')->paginate(20)
+ 'invitations' => Invitation::orderBy('id', 'DESC')->paginate(20),
]);
}
/**
* Generates a new invitation key.
*
- * @param App\Services\InvitationService $service
+ * @param App\Services\InvitationService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postGenerateKey(InvitationService $service)
- {
- if($service->generateInvitation(Auth::user())) {
+ public function postGenerateKey(InvitationService $service) {
+ if ($service->generateInvitation(Auth::user())) {
flash('Generated invitation successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Generates a new invitation key.
*
- * @param App\Services\InvitationService $service
- * @param int $id
+ * @param App\Services\InvitationService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteKey(InvitationService $service, $id)
- {
+ public function postDeleteKey(InvitationService $service, $id) {
$invitation = Invitation::find($id);
- if($invitation && $service->deleteInvitation($invitation)) {
+ if ($invitation && $service->deleteInvitation($invitation)) {
flash('Deleted invitation key successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/NewsController.php b/app/Http/Controllers/Admin/NewsController.php
index 05d2686f7d..f1186085ef 100644
--- a/app/Http/Controllers/Admin/NewsController.php
+++ b/app/Http/Controllers/Admin/NewsController.php
@@ -2,92 +2,91 @@
namespace App\Http\Controllers\Admin;
-use Illuminate\Http\Request;
-
-use Auth;
-
+use App\Http\Controllers\Controller;
use App\Models\News;
use App\Services\NewsService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class NewsController extends Controller
-{
+class NewsController extends Controller {
/**
* Shows the news index.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.news.news', [
- 'newses' => News::orderBy('updated_at', 'DESC')->paginate(20)
+ 'newses' => News::orderBy('updated_at', 'DESC')->paginate(20),
]);
}
-
+
/**
- * Shows the create news page.
+ * Shows the create news page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateNews()
- {
+ public function getCreateNews() {
return view('admin.news.create_edit_news', [
- 'news' => new News
+ 'news' => new News,
]);
}
-
+
/**
* Shows the edit news page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditNews($id)
- {
+ public function getEditNews($id) {
$news = News::find($id);
- if(!$news) abort(404);
+ if (!$news) {
+ abort(404);
+ }
+
return view('admin.news.create_edit_news', [
- 'news' => $news
+ 'news' => $news,
]);
}
/**
* Creates or edits a news page.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\NewsService $service
- * @param int|null $id
+ * @param App\Services\NewsService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditNews(Request $request, NewsService $service, $id = null)
- {
+ public function postCreateEditNews(Request $request, NewsService $service, $id = null) {
$id ? $request->validate(News::$updateRules) : $request->validate(News::$createRules);
$data = $request->only([
- 'title', 'text', 'post_at', 'is_visible', 'bump'
+ 'title', 'text', 'post_at', 'is_visible', 'bump',
]);
- if($id && $service->updateNews(News::find($id), $data, Auth::user())) {
+ if ($id && $service->updateNews(News::find($id), $data, Auth::user())) {
flash('News updated successfully.')->success();
- }
- else if (!$id && $news = $service->createNews($data, Auth::user())) {
+ } elseif (!$id && $news = $service->createNews($data, Auth::user())) {
flash('News created successfully.')->success();
+
return redirect()->to('admin/news/edit/'.$news->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the news deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteNews($id)
- {
+ public function getDeleteNews($id) {
$news = News::find($id);
+
return view('admin.news._delete_news', [
'news' => $news,
]);
@@ -96,20 +95,20 @@ public function getDeleteNews($id)
/**
* Deletes a news page.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\NewsService $service
- * @param int $id
+ * @param App\Services\NewsService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteNews(Request $request, NewsService $service, $id)
- {
- if($id && $service->deleteNews(News::find($id))) {
+ public function postDeleteNews(Request $request, NewsService $service, $id) {
+ if ($id && $service->deleteNews(News::find($id))) {
flash('News deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/news');
}
-
}
diff --git a/app/Http/Controllers/Admin/PageController.php b/app/Http/Controllers/Admin/PageController.php
index 78be2a7d31..4469970f79 100644
--- a/app/Http/Controllers/Admin/PageController.php
+++ b/app/Http/Controllers/Admin/PageController.php
@@ -2,92 +2,91 @@
namespace App\Http\Controllers\Admin;
-use Illuminate\Http\Request;
-
-use Auth;
-
+use App\Http\Controllers\Controller;
use App\Models\SitePage;
use App\Services\PageService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class PageController extends Controller
-{
+class PageController extends Controller {
/**
* Shows the page index.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.pages.pages', [
- 'pages' => SitePage::orderBy('title')->paginate(20)
+ 'pages' => SitePage::orderBy('title')->paginate(20),
]);
}
-
+
/**
- * Shows the create page page.
+ * Shows the create page page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreatePage()
- {
+ public function getCreatePage() {
return view('admin.pages.create_edit_page', [
- 'page' => new SitePage
+ 'page' => new SitePage,
]);
}
-
+
/**
* Shows the edit page page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditPage($id)
- {
+ public function getEditPage($id) {
$page = SitePage::find($id);
- if(!$page) abort(404);
+ if (!$page) {
+ abort(404);
+ }
+
return view('admin.pages.create_edit_page', [
- 'page' => $page
+ 'page' => $page,
]);
}
/**
* Creates or edits a page.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\PageService $service
- * @param int|null $id
+ * @param App\Services\PageService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditPage(Request $request, PageService $service, $id = null)
- {
+ public function postCreateEditPage(Request $request, PageService $service, $id = null) {
$id ? $request->validate(SitePage::$updateRules) : $request->validate(SitePage::$createRules);
$data = $request->only([
- 'key', 'title', 'text', 'is_visible', 'can_comment'
+ 'key', 'title', 'text', 'is_visible', 'can_comment',
]);
- if($id && $service->updatePage(SitePage::find($id), $data, Auth::user())) {
+ if ($id && $service->updatePage(SitePage::find($id), $data, Auth::user())) {
flash('Page updated successfully.')->success();
- }
- else if (!$id && $page = $service->createPage($data, Auth::user())) {
+ } elseif (!$id && $page = $service->createPage($data, Auth::user())) {
flash('Page created successfully.')->success();
+
return redirect()->to('admin/pages/edit/'.$page->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Gets the page deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeletePage($id)
- {
+ public function getDeletePage($id) {
$page = SitePage::find($id);
+
return view('admin.pages._delete_page', [
'page' => $page,
]);
@@ -96,19 +95,20 @@ public function getDeletePage($id)
/**
* Deletes a page.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\PageService $service
- * @param int $id
+ * @param App\Services\PageService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeletePage(Request $request, PageService $service, $id)
- {
- if($id && $service->deletePage(SitePage::find($id))) {
+ public function postDeletePage(Request $request, PageService $service, $id) {
+ if ($id && $service->deletePage(SitePage::find($id))) {
flash('Page deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/pages');
}
}
diff --git a/app/Http/Controllers/Admin/RaffleController.php b/app/Http/Controllers/Admin/RaffleController.php
index cd3363c15b..c5b270d29c 100644
--- a/app/Http/Controllers/Admin/RaffleController.php
+++ b/app/Http/Controllers/Admin/RaffleController.php
@@ -1,56 +1,54 @@
-get('is_active')) $raffles->where('is_active', $request->get('is_active'));
- else $raffles->where('is_active', '!=', 2);
+ if ($request->get('is_active')) {
+ $raffles->where('is_active', $request->get('is_active'));
+ } else {
+ $raffles->where('is_active', '!=', 2);
+ }
$raffles = $raffles->orderBy('group_id')->orderBy('order');
return view('admin.raffle.index', [
'raffles' => $raffles->get(),
- 'groups' => RaffleGroup::whereIn('id', $raffles->pluck('group_id')->toArray())->get()->keyBy('id')
+ 'groups' => RaffleGroup::whereIn('id', $raffles->pluck('group_id')->toArray())->get()->keyBy('id'),
]);
}
/**
* Shows the create/edit raffle modal.
*
- * @param int|null $id
+ * @param int|null $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateEditRaffle($id = null)
- {
+ public function getCreateEditRaffle($id = null) {
$raffle = null;
if ($id) {
$raffle = Raffle::find($id);
- if (!$raffle) abort(404);
+ if (!$raffle) {
+ abort(404);
+ }
+ } else {
+ $raffle = new Raffle;
}
- else $raffle = new Raffle;
+
return view('admin.raffle._raffle_create_edit', [
'raffle' => $raffle,
'groups' => [0 => 'No group'] + RaffleGroup::where('is_active', '<', 2)->pluck('name', 'id')->toArray(),
@@ -60,140 +58,153 @@ public function getCreateEditRaffle($id = null)
/**
* Creates or edits a raffle.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\RaffleService $service
- * @param int|null $id
+ * @param App\Services\RaffleService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditRaffle(Request $request, RaffleService $service, $id = null)
- {
+ public function postCreateEditRaffle(Request $request, RaffleService $service, $id = null) {
$data = $request->only(['name', 'is_active', 'winner_count', 'group_id', 'order']);
$raffle = null;
- if (!$id) $raffle = $service->createRaffle($data);
- else if ($id) $raffle = $service->updateRaffle($data, Raffle::find($id));
+ if (!$id) {
+ $raffle = $service->createRaffle($data);
+ } elseif ($id) {
+ $raffle = $service->updateRaffle($data, Raffle::find($id));
+ }
if ($raffle) {
- flash('Raffle ' . ($id ? 'updated' : 'created') . ' successfully!')->success();
+ flash('Raffle '.($id ? 'updated' : 'created').' successfully!')->success();
+
return redirect()->back();
- }
- else {
+ } else {
flash('Couldn\'t create raffle.')->error();
- return redirect()->back()->withInput();
+
+ return redirect()->back()->withInput();
}
}
-
+
/**
* Shows the create/edit raffle group modal.
*
- * @param int|null $id
+ * @param int|null $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateEditRaffleGroup($id = null)
- {
+ public function getCreateEditRaffleGroup($id = null) {
$group = null;
if ($id) {
$group = RaffleGroup::find($id);
- if (!$group) abort(404);
+ if (!$group) {
+ abort(404);
+ }
+ } else {
+ $group = new RaffleGroup;
}
- else $group = new RaffleGroup;
+
return view('admin.raffle._group_create_edit', [
- 'group' => $group
+ 'group' => $group,
]);
}
/**
* Creates or edits a raffle group.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\RaffleService $service
- * @param int|null $id
+ * @param App\Services\RaffleService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditRaffleGroup(Request $request, RaffleService $service, $id = null)
- {
- $data =$request->only(['name', 'is_active']);
+ public function postCreateEditRaffleGroup(Request $request, RaffleService $service, $id = null) {
+ $data = $request->only(['name', 'is_active']);
$group = null;
- if (!$id) $group = $service->createRaffleGroup($data);
- else if ($id) $group = $service->updateRaffleGroup($data, RaffleGroup::find($id));
+ if (!$id) {
+ $group = $service->createRaffleGroup($data);
+ } elseif ($id) {
+ $group = $service->updateRaffleGroup($data, RaffleGroup::find($id));
+ }
if ($group) {
- flash('Raffle group ' . ($id ? 'updated' : 'created') . ' successfully!')->success();
+ flash('Raffle group '.($id ? 'updated' : 'created').' successfully!')->success();
+
return redirect()->back();
- }
- else {
+ } else {
flash('Couldn\'t create raffle group.')->error();
- return redirect()->back()->withInput();
+
+ return redirect()->back()->withInput();
}
}
/**
* Shows the ticket index of a raffle.
*
- * @param \Illuminate\Http\Request $request
* @param int|\\ $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getRaffleTickets(Request $request, $id)
- {
+ public function getRaffleTickets(Request $request, $id) {
$raffle = Raffle::find($id);
- if(!$raffle) abort(404);
+ if (!$raffle) {
+ abort(404);
+ }
return view('admin.raffle.ticket_index', [
- 'raffle' => $raffle,
+ 'raffle' => $raffle,
'tickets' => $raffle->tickets()->orderBy('id')->paginate(200),
- "page" => $request->get('page') ? $request->get('page') - 1 : 0
+ 'page' => $request->get('page') ? $request->get('page') - 1 : 0,
]);
}
/**
* Creates raffle tickets for a raffle.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\RaffleManager $service
- * @param int $id
+ * @param App\Services\RaffleManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateRaffleTickets(Request $request, RaffleManager $service, $id)
- {
+ public function postCreateRaffleTickets(Request $request, RaffleManager $service, $id) {
$data = $request->get('names');
if ($count = $service->addTickets(Raffle::find($id), $data)) {
- flash($count . ' tickets added!')->success();
+ flash($count.' tickets added!')->success();
+
return redirect()->back();
- }
- else {
+ } else {
flash('Couldn\'t add tickets.')->error();
- return redirect()->back()->withInput();
+
+ return redirect()->back()->withInput();
}
}
/**
* Deletes a raffle ticket.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\RaffleManager $service
- * @param int $id
+ * @param App\Services\RaffleManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteRaffleTicket(Request $request, RaffleManager $service, $id)
- {
+ public function postDeleteRaffleTicket(Request $request, RaffleManager $service, $id) {
if ($service->removeTicket(RaffleTicket::find($id))) {
flash('Ticket removed.')->success();
+
return redirect()->back();
- }
- else {
+ } else {
flash('Couldn\'t remove ticket.')->error();
- return redirect()->back()->withInput();
+
+ return redirect()->back()->withInput();
}
}
/**
* Shows the confirmation modal for rolling a raffle.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getRollRaffle($id)
- {
+ public function getRollRaffle($id) {
$raffle = Raffle::find($id);
- if(!$raffle) abort(404);
+ if (!$raffle) {
+ abort(404);
+ }
return view('admin.raffle._raffle_roll', [
'raffle' => $raffle,
@@ -203,32 +214,35 @@ public function getRollRaffle($id)
/**
* Rolls a raffle.
*
- * @param App\Services\RaffleManager $service
- * @param int $id
+ * @param App\Services\RaffleManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postRollRaffle(RaffleManager $service, $id)
- {
+ public function postRollRaffle(RaffleManager $service, $id) {
if ($service->rollRaffle(Raffle::find($id))) {
flash('Winners rolled!')->success();
+
return redirect()->back();
- }
- else {
+ } else {
flash('Error in rolling winners.')->error();
- return redirect()->back()->withInput();
+
+ return redirect()->back()->withInput();
}
}
/**
* Shows the confirmation modal for rolling a raffle group.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getRollRaffleGroup($id)
- {
+ public function getRollRaffleGroup($id) {
$group = RaffleGroup::find($id);
- if(!$group) abort(404);
+ if (!$group) {
+ abort(404);
+ }
return view('admin.raffle._group_roll', [
'group' => $group,
@@ -238,19 +252,20 @@ public function getRollRaffleGroup($id)
/**
* Rolls a raffle group.
*
- * @param App\Services\RaffleManager $service
- * @param int $id
+ * @param App\Services\RaffleManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postRollRaffleGroup(RaffleManager $service, $id)
- {
+ public function postRollRaffleGroup(RaffleManager $service, $id) {
if ($service->rollRaffleGroup(RaffleGroup::find($id))) {
flash('Winners rolled!')->success();
+
return redirect()->back();
- }
- else {
+ } else {
flash('Error in rolling winners.')->error();
- return redirect()->back()->withInput();
+
+ return redirect()->back()->withInput();
}
}
}
diff --git a/app/Http/Controllers/Admin/ReportController.php b/app/Http/Controllers/Admin/ReportController.php
index dec9759a5b..8e168f53d5 100644
--- a/app/Http/Controllers/Admin/ReportController.php
+++ b/app/Http/Controllers/Admin/ReportController.php
@@ -2,74 +2,71 @@
namespace App\Http\Controllers\Admin;
-use Auth;
-use Config;
-use Illuminate\Http\Request;
-
-use App\Models\Prompt\PromptCategory;
+use App\Http\Controllers\Controller;
use App\Models\Report\Report;
-use App\Models\Item\Item;
-use App\Models\Currency\Currency;
-use App\Models\Loot\LootTable;
-
use App\Services\ReportManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class ReportController extends Controller
-{
+class ReportController extends Controller {
/**
* Shows the report index page.
*
- * @param string $status
+ * @param string $status
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getReportIndex(Request $request, $status = null)
- {
- if($status == 'assigned-to-me') $reports = Report::assignedToMe(Auth::user());
- else $reports = Report::where('status', $status ? ucfirst($status) : 'Pending');
+ public function getReportIndex(Request $request, $status = null) {
+ if ($status == 'assigned-to-me') {
+ $reports = Report::assignedToMe(Auth::user());
+ } else {
+ $reports = Report::where('status', $status ? ucfirst($status) : 'Pending');
+ }
return view('admin.reports.index', [
'reports' => $reports->orderBy('id', 'DESC')->paginate(30)->appends($request->query()),
]);
}
-
+
/**
* Shows the report detail page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getReport($id)
- {
+ public function getReport($id) {
$report = Report::where('id', $id)->first();
- if(!$report) abort(404);
+ if (!$report) {
+ abort(404);
+ }
+
return view('admin.reports.report', [
'report' => $report,
]);
- }
+ }
/**
* Creates a new report.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ReportManager $service
- * @param int $id
- * @param string $action
+ * @param App\Services\ReportManager $service
+ * @param int $id
+ * @param string $action
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postReport(Request $request, ReportManager $service, $id, $action)
- {
+ public function postReport(Request $request, ReportManager $service, $id, $action) {
$data = $request->only(['staff_comments']);
- if($action == 'assign' && $service->assignReport($request->only(['staff_comments']) + ['id' => $id], Auth::user())) {
+ if ($action == 'assign' && $service->assignReport($request->only(['staff_comments']) + ['id' => $id], Auth::user())) {
flash('Report assigned successfully.')->success();
- }
- elseif($action == 'close' && $service->closeReport($data + ['id' => $id], Auth::user())) {
+ } elseif ($action == 'close' && $service->closeReport($data + ['id' => $id], Auth::user())) {
flash('Report closed successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/SalesController.php b/app/Http/Controllers/Admin/SalesController.php
index 34bc9c7e16..4f48a09c69 100644
--- a/app/Http/Controllers/Admin/SalesController.php
+++ b/app/Http/Controllers/Admin/SalesController.php
@@ -2,28 +2,22 @@
namespace App\Http\Controllers\Admin;
-use Illuminate\Http\Request;
-
-use Auth;
-
-use App\Models\Sales\Sales;
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
-
+use App\Models\Sales\Sales;
use App\Services\SalesService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class SalesController extends Controller
-{
+class SalesController extends Controller {
/**
* Shows the Sales index.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.sales.sales', [
- 'saleses' => Sales::orderBy('post_at', 'DESC')->paginate(20)
+ 'saleses' => Sales::orderBy('post_at', 'DESC')->paginate(20),
]);
}
@@ -32,36 +26,38 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateSales()
- {
+ public function getCreateSales() {
return view('admin.sales.create_edit_sales', [
- 'sales' => new Sales
+ 'sales' => new Sales,
]);
}
/**
* Shows the edit Sales page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditSales($id)
- {
+ public function getEditSales($id) {
$sales = Sales::find($id);
- if(!$sales) abort(404);
+ if (!$sales) {
+ abort(404);
+ }
+
return view('admin.sales.create_edit_sales', [
- 'sales' => $sales
+ 'sales' => $sales,
]);
}
/**
* Shows character information.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterInfo($slug)
- {
+ public function getCharacterInfo($slug) {
$character = Character::visible()->where('slug', $slug)->first();
return view('home._character', [
@@ -72,41 +68,43 @@ public function getCharacterInfo($slug)
/**
* Creates or edits a Sales page.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SalesService $service
- * @param int|null $id
+ * @param App\Services\SalesService $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditSales(Request $request, SalesService $service, $id = null)
- {
+ public function postCreateEditSales(Request $request, SalesService $service, $id = null) {
$id ? $request->validate(Sales::$updateRules) : $request->validate(Sales::$createRules);
$data = $request->only([
'title', 'text', 'post_at', 'is_visible', 'bump', 'is_open', 'comments_open_at',
// Character information
- 'slug', 'sale_type', 'price', 'starting_bid', 'min_increment', 'autobuy', 'end_point', 'minimum', 'description', 'link', 'character_is_open', 'new_entry'
+ 'slug', 'sale_type', 'price', 'starting_bid', 'min_increment', 'autobuy', 'end_point', 'minimum', 'description', 'link', 'character_is_open', 'new_entry',
]);
- if($id && $service->updateSales(Sales::find($id), $data, Auth::user())) {
+ if ($id && $service->updateSales(Sales::find($id), $data, Auth::user())) {
flash('Sales updated successfully.')->success();
- }
- else if (!$id && $sales = $service->createSales($data, Auth::user())) {
+ } elseif (!$id && $sales = $service->createSales($data, Auth::user())) {
flash('Sales created successfully.')->success();
+
return redirect()->to('admin/sales/edit/'.$sales->id);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the Sales deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteSales($id)
- {
+ public function getDeleteSales($id) {
$sales = Sales::find($id);
+
return view('admin.sales._delete_sales', [
'sales' => $sales,
]);
@@ -115,20 +113,20 @@ public function getDeleteSales($id)
/**
* Deletes a Sales page.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SalesService $service
- * @param int $id
+ * @param App\Services\SalesService $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteSales(Request $request, SalesService $service, $id)
- {
- if($id && $service->deleteSales(Sales::find($id))) {
+ public function postDeleteSales(Request $request, SalesService $service, $id) {
+ if ($id && $service->deleteSales(Sales::find($id))) {
flash('Sales deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('admin/sales');
}
-
}
diff --git a/app/Http/Controllers/Admin/SettingsController.php b/app/Http/Controllers/Admin/SettingsController.php
index 0bc6ef8616..8409070f48 100644
--- a/app/Http/Controllers/Admin/SettingsController.php
+++ b/app/Http/Controllers/Admin/SettingsController.php
@@ -2,40 +2,36 @@
namespace App\Http\Controllers\Admin;
-use Illuminate\Http\Request;
-use DB;
-
use App\Http\Controllers\Controller;
+use DB;
+use Illuminate\Http\Request;
-class SettingsController extends Controller
-{
+class SettingsController extends Controller {
/**
* Shows the settings index.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.settings.settings', [
- 'settings' => DB::table('site_settings')->orderBy('key')->paginate(20)
+ 'settings' => DB::table('site_settings')->orderBy('key')->paginate(20),
]);
}
/**
* Edits a setting.
*
- * @param \Illuminate\Http\Request $request
- * @param string $key
+ * @param string $key
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditSetting(Request $request, $key)
- {
- if(DB::table('site_settings')->where('key', $key)->update(['value' => $request->get('value')])) {
+ public function postEditSetting(Request $request, $key) {
+ if (DB::table('site_settings')->where('key', $key)->update(['value' => $request->get('value')])) {
flash('Setting updated successfully.')->success();
- }
- else {
+ } else {
flash('Invalid setting selected.')->success();
}
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/SubmissionController.php b/app/Http/Controllers/Admin/SubmissionController.php
index 73c259dff9..b8a3f7551c 100644
--- a/app/Http/Controllers/Admin/SubmissionController.php
+++ b/app/Http/Controllers/Admin/SubmissionController.php
@@ -2,41 +2,36 @@
namespace App\Http\Controllers\Admin;
-use Auth;
-use Config;
-use Illuminate\Http\Request;
-
-use App\Models\Prompt\PromptCategory;
-use App\Models\Submission\Submission;
-use App\Models\Item\Item;
-use App\Models\Item\ItemCategory;
+use App\Http\Controllers\Controller;
use App\Models\Currency\Currency;
+use App\Models\Item\Item;
use App\Models\Loot\LootTable;
+use App\Models\Prompt\PromptCategory;
use App\Models\Raffle\Raffle;
-
+use App\Models\Submission\Submission;
use App\Services\SubmissionManager;
+use Auth;
+use Config;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class SubmissionController extends Controller
-{
+class SubmissionController extends Controller {
/**
* Shows the submission index page.
*
- * @param string $status
+ * @param string $status
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubmissionIndex(Request $request, $status = null)
- {
+ public function getSubmissionIndex(Request $request, $status = null) {
$submissions = Submission::with('prompt')->where('status', $status ? ucfirst($status) : 'Pending')->whereNotNull('prompt_id');
$data = $request->only(['prompt_category_id', 'sort']);
- if(isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none')
- $submissions->whereHas('prompt', function($query) use ($data) {
+ if (isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none') {
+ $submissions->whereHas('prompt', function ($query) use ($data) {
$query->where('prompt_category_id', $data['prompt_category_id']);
});
- if(isset($data['sort']))
- {
- switch($data['sort']) {
+ }
+ if (isset($data['sort'])) {
+ switch ($data['sort']) {
case 'newest':
$submissions->sortNewest();
break;
@@ -44,56 +39,60 @@ public function getSubmissionIndex(Request $request, $status = null)
$submissions->sortOldest();
break;
}
+ } else {
+ $submissions->sortOldest();
}
- else $submissions->sortOldest();
+
return view('admin.submissions.index', [
'submissions' => $submissions->paginate(30)->appends($request->query()),
- 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'isClaims' => false
+ 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'isClaims' => false,
]);
}
/**
* Shows the submission detail page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubmission($id)
- {
+ public function getSubmission($id) {
$submission = Submission::whereNotNull('prompt_id')->where('id', $id)->first();
$inventory = isset($submission->data['user']) ? parseAssetData($submission->data['user']) : null;
- if(!$submission) abort(404);
+ if (!$submission) {
+ abort(404);
+ }
+
return view('admin.submissions.submission', [
- 'submission' => $submission,
- 'inventory' => $inventory,
- 'rewardsData' => isset($submission->data['rewards']) ? parseAssetData($submission->data['rewards']) : null,
- 'itemsrow' => Item::all()->keyBy('id'),
- 'page' => 'submission',
+ 'submission' => $submission,
+ 'inventory' => $inventory,
+ 'rewardsData' => isset($submission->data['rewards']) ? parseAssetData($submission->data['rewards']) : null,
+ 'itemsrow' => Item::all()->keyBy('id'),
+ 'page' => 'submission',
'expanded_rewards' => Config::get('lorekeeper.extensions.character_reward_expansion.expanded'),
] + ($submission->status == 'Pending' ? [
'characterCurrencies' => Currency::where('is_character_owned', 1)->orderBy('sort_character', 'DESC')->pluck('name', 'id'),
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
- 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
- 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
- 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
- 'count' => Submission::where('prompt_id', $submission->prompt_id)->where('status', 'Approved')->where('user_id', $submission->user_id)->count()
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
+ 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
+ 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
+ 'count' => Submission::where('prompt_id', $submission->prompt_id)->where('status', 'Approved')->where('user_id', $submission->user_id)->count(),
] : []));
}
/**
* Shows the claim index page.
*
- * @param string $status
+ * @param string $status
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getClaimIndex(Request $request, $status = null)
- {
+ public function getClaimIndex(Request $request, $status = null) {
$submissions = Submission::where('status', $status ? ucfirst($status) : 'Pending')->whereNull('prompt_id');
$data = $request->only(['sort']);
- if(isset($data['sort']))
- {
- switch($data['sort']) {
+ if (isset($data['sort'])) {
+ switch ($data['sort']) {
case 'newest':
$submissions->sortNewest();
break;
@@ -101,62 +100,67 @@ public function getClaimIndex(Request $request, $status = null)
$submissions->sortOldest();
break;
}
+ } else {
+ $submissions->sortOldest();
}
- else $submissions->sortOldest();
+
return view('admin.submissions.index', [
'submissions' => $submissions->paginate(30),
- 'isClaims' => true
+ 'isClaims' => true,
]);
}
/**
* Shows the claim detail page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getClaim($id)
- {
+ public function getClaim($id) {
$submission = Submission::whereNull('prompt_id')->where('id', $id)->first();
$inventory = isset($submission->data['user']) ? parseAssetData($submission->data['user']) : null;
- if(!$submission) abort(404);
+ if (!$submission) {
+ abort(404);
+ }
+
return view('admin.submissions.submission', [
- 'submission' => $submission,
- 'inventory' => $inventory,
- 'itemsrow' => Item::all()->keyBy('id'),
+ 'submission' => $submission,
+ 'inventory' => $inventory,
+ 'itemsrow' => Item::all()->keyBy('id'),
'expanded_rewards' => Config::get('lorekeeper.extensions.character_reward_expansion.expanded'),
] + ($submission->status == 'Pending' ? [
'characterCurrencies' => Currency::where('is_character_owned', 1)->orderBy('sort_character', 'DESC')->pluck('name', 'id'),
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
- 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
- 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
- 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
- 'count' => Submission::where('prompt_id', $id)->where('status', 'Approved')->where('user_id', $submission->user_id)->count(),
- 'rewardsData' => isset($submission->data['rewards']) ? parseAssetData($submission->data['rewards']) : null
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
+ 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
+ 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
+ 'count' => Submission::where('prompt_id', $id)->where('status', 'Approved')->where('user_id', $submission->user_id)->count(),
+ 'rewardsData' => isset($submission->data['rewards']) ? parseAssetData($submission->data['rewards']) : null,
] : []));
}
/**
* Creates a new submission.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SubmissionManager $service
- * @param int $id
- * @param string $action
+ * @param App\Services\SubmissionManager $service
+ * @param int $id
+ * @param string $action
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSubmission(Request $request, SubmissionManager $service, $id, $action)
- {
- $data = $request->only(['slug', 'character_rewardable_quantity', 'character_rewardable_id', 'character_rewardable_type', 'character_currency_id', 'rewardable_type', 'rewardable_id', 'quantity', 'staff_comments', 'criterion' ]);
- if($action == 'reject' && $service->rejectSubmission($request->only(['staff_comments']) + ['id' => $id], Auth::user())) {
+ public function postSubmission(Request $request, SubmissionManager $service, $id, $action) {
+ $data = $request->only(['slug', 'character_rewardable_quantity', 'character_rewardable_id', 'character_rewardable_type', 'character_currency_id', 'rewardable_type', 'rewardable_id', 'quantity', 'staff_comments', 'criterion']);
+ if ($action == 'reject' && $service->rejectSubmission($request->only(['staff_comments']) + ['id' => $id], Auth::user())) {
flash('Submission rejected successfully.')->success();
- }
- elseif($action == 'approve' && $service->approveSubmission($data + ['id' => $id], Auth::user())) {
+ } elseif ($action == 'approve' && $service->approveSubmission($data + ['id' => $id], Auth::user())) {
flash('Submission approved successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Admin/Users/GrantController.php b/app/Http/Controllers/Admin/Users/GrantController.php
index bdc2c9bdfd..910054f892 100644
--- a/app/Http/Controllers/Admin/Users/GrantController.php
+++ b/app/Http/Controllers/Admin/Users/GrantController.php
@@ -2,57 +2,51 @@
namespace App\Http\Controllers\Admin\Users;
-use Auth;
-use Config;
-use Illuminate\Http\Request;
-
-use App\Models\User\User;
-use App\Models\Item\Item;
-use App\Models\Currency\Currency;
-
-use App\Models\User\UserItem;
-use App\Models\Character\CharacterItem;
-use App\Models\Trade;
+use App\Http\Controllers\Controller;
+use App\Models\Character\Character;
use App\Models\Character\CharacterDesignUpdate;
+use App\Models\Character\CharacterItem;
+use App\Models\Currency\Currency;
+use App\Models\Item\Item;
use App\Models\Submission\Submission;
-
-use App\Models\Character\Character;
+use App\Models\Trade;
+use App\Models\User\User;
+use App\Models\User\UserItem;
use App\Services\CurrencyManager;
use App\Services\InventoryManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class GrantController extends Controller
-{
+class GrantController extends Controller {
/**
* Show the currency grant page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserCurrency()
- {
+ public function getUserCurrency() {
return view('admin.grants.user_currency', [
- 'users' => User::orderBy('id')->pluck('name', 'id'),
- 'userCurrencies' => Currency::where('is_user_owned', 1)->orderBy('sort_user', 'DESC')->pluck('name', 'id')
+ 'users' => User::orderBy('id')->pluck('name', 'id'),
+ 'userCurrencies' => Currency::where('is_user_owned', 1)->orderBy('sort_user', 'DESC')->pluck('name', 'id'),
]);
}
/**
* Grants or removes currency from multiple users.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CurrencyManager $service
+ * @param App\Services\CurrencyManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postUserCurrency(Request $request, CurrencyManager $service)
- {
+ public function postUserCurrency(Request $request, CurrencyManager $service) {
$data = $request->only(['names', 'currency_id', 'quantity', 'data']);
- if($service->grantUserCurrencies($data, Auth::user())) {
+ if ($service->grantUserCurrencies($data, Auth::user())) {
flash('Currency granted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
@@ -61,30 +55,30 @@ public function postUserCurrency(Request $request, CurrencyManager $service)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getItems()
- {
+ public function getItems() {
return view('admin.grants.items', [
'users' => User::orderBy('id')->pluck('name', 'id'),
- 'items' => Item::orderBy('name')->pluck('name', 'id')
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
]);
}
/**
* Grants or removes items from multiple users.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
+ * @param App\Services\InventoryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postItems(Request $request, InventoryManager $service)
- {
+ public function postItems(Request $request, InventoryManager $service) {
$data = $request->only(['names', 'item_ids', 'quantities', 'data', 'disallow_transfer', 'notes']);
- if($service->grantItems($data, Auth::user())) {
+ if ($service->grantItems($data, Auth::user())) {
flash('Items granted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
@@ -93,11 +87,10 @@ public function postItems(Request $request, InventoryManager $service)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getItemSearch(Request $request)
- {
+ public function getItemSearch(Request $request) {
$item = Item::find($request->only(['item_id']))->first();
- if($item) {
+ if ($item) {
// Gather all instances of this item
$userItems = UserItem::where('item_id', $item->id)->where('count', '>', 0)->get();
$characterItems = CharacterItem::where('item_id', $item->id)->where('count', '>', 0)->get();
@@ -113,16 +106,15 @@ public function getItemSearch(Request $request)
}
return view('admin.grants.item_search', [
- 'item' => $item ? $item : null,
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
- 'userItems' => $item ? $userItems : null,
+ 'item' => $item ? $item : null,
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'userItems' => $item ? $userItems : null,
'characterItems' => $item ? $characterItems : null,
- 'users' => $item ? $users : null,
- 'characters' => $item ? $characters : null,
- 'designUpdates' => $item ? $designUpdates :null,
- 'trades' => $item ? $trades : null,
- 'submissions' => $item ? $submissions : null,
+ 'users' => $item ? $users : null,
+ 'characters' => $item ? $characters : null,
+ 'designUpdates' => $item ? $designUpdates : null,
+ 'trades' => $item ? $trades : null,
+ 'submissions' => $item ? $submissions : null,
]);
}
-
}
diff --git a/app/Http/Controllers/Admin/Users/RankController.php b/app/Http/Controllers/Admin/Users/RankController.php
index e670375a71..f11d370095 100644
--- a/app/Http/Controllers/Admin/Users/RankController.php
+++ b/app/Http/Controllers/Admin/Users/RankController.php
@@ -2,25 +2,22 @@
namespace App\Http\Controllers\Admin\Users;
+use App\Http\Controllers\Controller;
+use App\Models\Rank\Rank;
+use App\Services\RankService;
use Auth;
use Config;
use Illuminate\Http\Request;
-use App\Models\Rank\Rank;
-use App\Services\RankService;
-
-use App\Http\Controllers\Controller;
-class RankController extends Controller
-{
+class RankController extends Controller {
/**
* Show the rank index.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('admin.users.ranks', [
- 'ranks' => Rank::orderBy('sort', 'DESC')->get()
+ 'ranks' => Rank::orderBy('sort', 'DESC')->get(),
]);
}
@@ -29,86 +26,94 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateRank()
- {
+ public function getCreateRank() {
return view('admin.users._create_edit_rank', [
- 'rank' => new Rank,
+ 'rank' => new Rank,
'rankPowers' => null,
- 'powers' => Config::get('lorekeeper.powers'),
- 'editable' => 1
+ 'powers' => Config::get('lorekeeper.powers'),
+ 'editable' => 1,
]);
}
/**
* Get the rank editing modal.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditRank($id)
- {
+ public function getEditRank($id) {
$rank = Rank::find($id);
$editable = Auth::user()->canEditRank($rank);
- if(!$editable) $rank = null;
+ if (!$editable) {
+ $rank = null;
+ }
+
return view('admin.users._create_edit_rank', [
- 'rank' => $rank,
+ 'rank' => $rank,
'rankPowers' => $rank ? $rank->getPowers() : null,
- 'powers' => Config::get('lorekeeper.powers'),
- 'editable' => $editable
+ 'powers' => Config::get('lorekeeper.powers'),
+ 'editable' => $editable,
]);
}
- public function postCreateEditRank(Request $request, RankService $service, $id = null)
- {
+ public function postCreateEditRank(Request $request, RankService $service, $id = null) {
$request->validate(Rank::$rules);
$data = $request->only(['name', 'description', 'color', 'powers', 'icon']);
- if($id && $service->updateRank(Rank::find($id), $data, Auth::user())) {
+ if ($id && $service->updateRank(Rank::find($id), $data, Auth::user())) {
flash('Rank updated successfully.')->success();
- }
- else if ($service->createRank($data, Auth::user())) {
+ } elseif ($service->createRank($data, Auth::user())) {
flash('Rank created successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Get the rank deletion modal.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteRank($id)
- {
+ public function getDeleteRank($id) {
$rank = Rank::find($id);
$editable = Auth::user()->canEditRank($rank);
- if(!$editable) $rank = null;
+ if (!$editable) {
+ $rank = null;
+ }
+
return view('admin.users._delete_rank', [
- 'rank' => $rank,
- 'editable' => $editable
+ 'rank' => $rank,
+ 'editable' => $editable,
]);
}
- public function postDeleteRank(Request $request, RankService $service, $id)
- {
- if($id && $service->deleteRank(Rank::find($id), Auth::user())) {
+ public function postDeleteRank(Request $request, RankService $service, $id) {
+ if ($id && $service->deleteRank(Rank::find($id), Auth::user())) {
flash('Rank deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
- public function postSortRanks(Request $request, RankService $service)
- {
- if($service->sortRanks($request->get('sort'), Auth::user())) {
+
+ public function postSortRanks(Request $request, RankService $service) {
+ if ($service->sortRanks($request->get('sort'), Auth::user())) {
flash('Ranks sorted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
}
diff --git a/app/Http/Controllers/Admin/Users/UserController.php b/app/Http/Controllers/Admin/Users/UserController.php
index 5527ca1370..bea778d938 100644
--- a/app/Http/Controllers/Admin/Users/UserController.php
+++ b/app/Http/Controllers/Admin/Users/UserController.php
@@ -2,40 +2,37 @@
namespace App\Http\Controllers\Admin\Users;
-use DB;
-use Auth;
-use Config;
-
-use Illuminate\Http\Request;
-use Carbon\Carbon;
-
+use App\Http\Controllers\Controller;
+use App\Models\Rank\Rank;
use App\Models\User\User;
use App\Models\User\UserAlias;
-use App\Models\Rank\Rank;
use App\Models\User\UserUpdateLog;
-
use App\Services\UserService;
+use Auth;
+use Carbon\Carbon;
+use Config;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class UserController extends Controller
-{
+class UserController extends Controller {
/**
* Show the user index.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex(Request $request)
- {
- $query = User::join('ranks','users.rank_id', '=', 'ranks.id')->select('ranks.name AS rank_name', 'users.*');
+ public function getIndex(Request $request) {
+ $query = User::join('ranks', 'users.rank_id', '=', 'ranks.id')->select('ranks.name AS rank_name', 'users.*');
$sort = $request->only(['sort']);
- if($request->get('name')) $query->where(function($query) use ($request) {
- $query->where('users.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('users.alias', 'LIKE', '%' . $request->get('name') . '%');
- });
- if($request->get('rank_id')) $query->where('rank_id', $request->get('rank_id'));
+ if ($request->get('name')) {
+ $query->where(function ($query) use ($request) {
+ $query->where('users.name', 'LIKE', '%'.$request->get('name').'%')->orWhere('users.alias', 'LIKE', '%'.$request->get('name').'%');
+ });
+ }
+ if ($request->get('rank_id')) {
+ $query->where('rank_id', $request->get('rank_id'));
+ }
- switch(isset($sort['sort']) ? $sort['sort'] : null) {
+ switch ($sort['sort'] ?? null) {
default:
$query->orderBy('ranks.sort', 'DESC')->orderBy('name');
break;
@@ -65,239 +62,249 @@ public function getIndex(Request $request)
return view('admin.users.index', [
'users' => $query->paginate(30)->appends($request->query()),
'ranks' => [0 => 'Any Rank'] + Rank::orderBy('ranks.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'count' => $query->count()
+ 'count' => $query->count(),
]);
}
/**
* Show a user's admin page.
*
+ * @param mixed $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUser($name)
- {
+ public function getUser($name) {
$user = User::where('name', $name)->first();
- if(!$user) abort(404);
+ if (!$user) {
+ abort(404);
+ }
return view('admin.users.user', [
- 'user' => $user,
- 'ranks' => Rank::orderBy('ranks.sort')->pluck('name', 'id')->toArray()
+ 'user' => $user,
+ 'ranks' => Rank::orderBy('ranks.sort')->pluck('name', 'id')->toArray(),
]);
}
- public function postUserBasicInfo(Request $request, $name)
- {
+ public function postUserBasicInfo(Request $request, $name) {
$user = User::where('name', $name)->first();
- if(!$user){
+ if (!$user) {
flash('Invalid user.')->error();
- }
- elseif (!Auth::user()->canEditRank($user->rank)) {
+ } elseif (!Auth::user()->canEditRank($user->rank)) {
flash('You cannot edit the information of a user that has a higher rank than yourself.')->error();
- }
- else {
+ } else {
$request->validate([
- 'name' => 'required|between:3,25'
+ 'name' => 'required|between:3,25',
]);
$data = $request->only(['name'] + (!$user->isAdmin ? [1 => 'rank_id'] : []));
$logData = ['old_name' => $user->name] + $data;
- if($user->update($data)) {
+ if ($user->update($data)) {
UserUpdateLog::create(['staff_id' => Auth::user()->id, 'user_id' => $user->id, 'data' => json_encode($logData), 'type' => 'Name/Rank Change']);
flash('Updated user\'s information successfully.')->success();
- }
- else {
+ } else {
flash('Failed to update user\'s information.')->error();
}
}
+
return redirect()->to($user->adminUrl);
}
- public function postUserAlias(Request $request, $name, $id)
- {
+ public function postUserAlias(Request $request, $name, $id) {
$user = User::where('name', $name)->first();
$alias = UserAlias::find($id);
$logData = ['old_alias' => $user ? $alias->alias : null, 'old_site' => $user ? $alias->site : null];
$isPrimary = $alias->is_primary_alias;
- if(!$user) flash('Invalid user.')->error();
- else if(!$alias) flash('Invalid alias.')->error();
- else if (!Auth::user()->canEditRank($user->rank)) {
+ if (!$user) {
+ flash('Invalid user.')->error();
+ } elseif (!$alias) {
+ flash('Invalid alias.')->error();
+ } elseif (!Auth::user()->canEditRank($user->rank)) {
flash('You cannot edit the information of a user that has a higher rank than yourself.')->error();
- }
- else if($alias && $alias->delete()) {
+ } elseif ($alias && $alias->delete()) {
// If this was the user's primary alias, check if they have any remaining valid primary aliases
// or any remaining aliases at all, and update accordingly
- if($isPrimary) {
- if(!$user->aliases->count()) $user->update(['has_alias' => 0]);
- else {
+ if ($isPrimary) {
+ if (!$user->aliases->count()) {
+ $user->update(['has_alias' => 0]);
+ } else {
// Hidden aliases are excluded as a courtesy measure (users may not want them forced visible for any number of reasons)
- foreach($user->aliases as $alias) {
- if(Config::get('lorekeeper.sites.'.$alias->site.'.auth') && Config::get('lorekeeper.sites.'.$alias->site.'.primary_alias') && $alias->is_visible) {
+ foreach ($user->aliases as $alias) {
+ if (Config::get('lorekeeper.sites.'.$alias->site.'.auth') && Config::get('lorekeeper.sites.'.$alias->site.'.primary_alias') && $alias->is_visible) {
$alias->update(['is_primary_alias' => 1]);
break;
}
}
// If the user does not have a remaining valid primary alias after this check, update accordingly
- if(!$user->primaryAlias) $user->update(['has_alias' => 0]);
+ if (!$user->primaryAlias) {
+ $user->update(['has_alias' => 0]);
+ }
}
}
UserUpdateLog::create(['staff_id' => Auth::user()->id, 'user_id' => $user->id, 'data' => json_encode($logData), 'type' => 'Clear Alias']);
flash('Cleared user\'s alias successfully.')->success();
- }
- else {
+ } else {
flash('Failed to clear user\'s alias.')->error();
}
+
return redirect()->back();
}
-
- public function postUserAccount(Request $request, $name)
- {
+ public function postUserAccount(Request $request, $name) {
$user = User::where('name', $name)->first();
- if(!$user) {
+ if (!$user) {
flash('Invalid user.')->error();
- }
- else if (!Auth::user()->canEditRank($user->rank)) {
+ } elseif (!Auth::user()->canEditRank($user->rank)) {
flash('You cannot edit the information of a user that has a higher rank than yourself.')->error();
- }
- else if($user->settings->update(['is_fto' => $request->get('is_fto') ?: 0])) {
+ } elseif ($user->settings->update(['is_fto' => $request->get('is_fto') ?: 0])) {
UserUpdateLog::create(['staff_id' => Auth::user()->id, 'user_id' => $user->id, 'data' => json_encode(['is_fto' => $request->get('is_fto') ? 'Yes' : 'No']), 'type' => 'FTO Status Change']);
flash('Updated user\'s account information successfully.')->success();
- }
- else {
+ } else {
flash('Failed to update user\'s account information.')->error();
}
+
return redirect()->back();
}
- public function postUserBirthday(Request $request, $name)
- {
+ public function postUserBirthday(Request $request, $name) {
$user = User::where('name', $name)->first();
- if(!$user) {
+ if (!$user) {
flash('Invalid user.')->error();
}
$service = new UserService;
// Make birthday into format we can store
$data = $request->input('dob');
- $date = $data['day']."-".$data['month']."-".$data['year'];
+ $date = $data['day'].'-'.$data['month'].'-'.$data['year'];
$formatDate = Carbon::parse($date);
$logData = ['old_date' => $user->birthday ? $user->birthday->isoFormat('DD-MM-YYYY') : Carbon::now()->isoFormat('DD-MM-YYYY')] + ['new_date' => $date];
- if($service->updateBirthday($formatDate, $user)) {
+ if ($service->updateBirthday($formatDate, $user)) {
UserUpdateLog::create(['staff_id' => Auth::user()->id, 'user_id' => $user->id, 'data' => json_encode($logData), 'type' => 'Birth Date Change']);
flash('Birthday updated successfully!')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Show a user's account update log.
*
+ * @param mixed $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserUpdates($name)
- {
+ public function getUserUpdates($name) {
$user = User::where('name', $name)->first();
- if(!$user) abort(404);
+ if (!$user) {
+ abort(404);
+ }
return view('admin.users.user_update_log', [
'user' => $user,
- 'logs' => UserUpdateLog::where('user_id', $user->id)->orderBy('id', 'DESC')->paginate(50)
+ 'logs' => UserUpdateLog::where('user_id', $user->id)->orderBy('id', 'DESC')->paginate(50),
]);
}
/**
* Show a user's ban page.
*
+ * @param mixed $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getBan($name)
- {
+ public function getBan($name) {
$user = User::where('name', $name)->first();
- if(!$user) abort(404);
+ if (!$user) {
+ abort(404);
+ }
return view('admin.users.user_ban', [
- 'user' => $user
+ 'user' => $user,
]);
}
/**
* Show a user's ban confirmation page.
*
+ * @param mixed $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getBanConfirmation($name)
- {
+ public function getBanConfirmation($name) {
$user = User::where('name', $name)->first();
- if(!$user) abort(404);
+ if (!$user) {
+ abort(404);
+ }
return view('admin.users._user_ban_confirmation', [
- 'user' => $user
+ 'user' => $user,
]);
}
- public function postBan(Request $request, UserService $service, $name)
- {
+ public function postBan(Request $request, UserService $service, $name) {
$user = User::where('name', $name)->with('settings')->first();
$wasBanned = $user->is_banned;
- if(!$user) {
+ if (!$user) {
flash('Invalid user.')->error();
- }
- else if (!Auth::user()->canEditRank($user->rank)) {
+ } elseif (!Auth::user()->canEditRank($user->rank)) {
flash('You cannot edit the information of a user that has a higher rank than yourself.')->error();
- }
- else if($service->ban(['ban_reason' => $request->get('ban_reason')], $user, Auth::user())) {
+ } elseif ($service->ban(['ban_reason' => $request->get('ban_reason')], $user, Auth::user())) {
flash($wasBanned ? 'User ban reason edited successfully.' : 'User banned successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Show a user's unban confirmation page.
*
+ * @param mixed $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUnbanConfirmation($name)
- {
+ public function getUnbanConfirmation($name) {
$user = User::where('name', $name)->with('settings')->first();
- if(!$user) abort(404);
+ if (!$user) {
+ abort(404);
+ }
return view('admin.users._user_unban_confirmation', [
- 'user' => $user
+ 'user' => $user,
]);
}
- public function postUnban(Request $request, UserService $service, $name)
- {
+ public function postUnban(Request $request, UserService $service, $name) {
$user = User::where('name', $name)->first();
- if(!$user) {
+ if (!$user) {
flash('Invalid user.')->error();
- }
- else if (!Auth::user()->canEditRank($user->rank)) {
+ } elseif (!Auth::user()->canEditRank($user->rank)) {
flash('You cannot edit the information of a user that has a higher rank than yourself.')->error();
- }
- else if($service->unban($user, Auth::user())) {
+ } elseif ($service->unban($user, Auth::user())) {
flash('User unbanned successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php
index 6a247fefd0..f93f8724cf 100644
--- a/app/Http/Controllers/Auth/ForgotPasswordController.php
+++ b/app/Http/Controllers/Auth/ForgotPasswordController.php
@@ -5,8 +5,7 @@
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
-class ForgotPasswordController extends Controller
-{
+class ForgotPasswordController extends Controller {
/*
|--------------------------------------------------------------------------
| Password Reset Controller
@@ -22,11 +21,8 @@ class ForgotPasswordController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
$this->middleware('guest');
}
}
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 375ff22f6c..516c877bd2 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -3,11 +3,10 @@
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
-use Illuminate\Foundation\Auth\AuthenticatesUsers;
use App\Models\User\User;
+use Illuminate\Foundation\Auth\AuthenticatesUsers;
-class LoginController extends Controller
-{
+class LoginController extends Controller {
/*
|--------------------------------------------------------------------------
| Login Controller
@@ -30,11 +29,8 @@ class LoginController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
$this->middleware('guest')->except('logout');
}
@@ -43,8 +39,7 @@ public function __construct()
*
* @return \Illuminate\Http\Response
*/
- public function showLoginForm()
- {
+ public function showLoginForm() {
return view('auth.login', ['userCount' => User::count()]);
}
}
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php
index ad31782413..341bbeb253 100644
--- a/app/Http/Controllers/Auth/RegisterController.php
+++ b/app/Http/Controllers/Auth/RegisterController.php
@@ -2,23 +2,19 @@
namespace App\Http\Controllers\Auth;
-use DB;
-use Settings;
-use Carbon\Carbon;
-
-use App\Models\User\User;
use App\Http\Controllers\Controller;
-use Illuminate\Support\Facades\Hash;
-use Illuminate\Support\Facades\Validator;
-use Illuminate\Foundation\Auth\RegistersUsers;
-use Illuminate\Support\Arr;
-
use App\Models\Invitation;
-use App\Services\UserService;
+use App\Models\User\User;
use App\Services\InvitationService;
+use App\Services\UserService;
+use Carbon\Carbon;
+use DB;
+use Illuminate\Foundation\Auth\RegistersUsers;
+use Illuminate\Support\Arr;
+use Illuminate\Support\Facades\Validator;
+use Settings;
-class RegisterController extends Controller
-{
+class RegisterController extends Controller {
/*
|--------------------------------------------------------------------------
| Register Controller
@@ -41,11 +37,8 @@ class RegisterController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
$this->middleware('guest');
}
@@ -54,61 +47,59 @@ public function __construct()
*
* @return \Illuminate\Http\Response
*/
- public function showRegistrationForm()
- {
+ public function showRegistrationForm() {
return view('auth.register', ['userCount' => User::count()]);
}
/**
* Get a validator for an incoming registration request.
*
- * @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
- protected function validator(array $data)
- {
+ protected function validator(array $data) {
return Validator::make($data, [
- 'name' => ['required', 'string', 'min:3', 'max:25', 'alpha_dash', 'unique:users'],
- 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
+ 'name' => ['required', 'string', 'min:3', 'max:25', 'alpha_dash', 'unique:users'],
+ 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'agreement' => ['required', 'accepted'],
- 'password' => ['required', 'string', 'min:8', 'confirmed'],
- 'dob' => ['required', function ($attribute, $value, $fail) {
- {
- $date = $value['day']."-".$value['month']."-".$value['year'];
- $formatDate = carbon::parse($date);
- $now = Carbon::now();
- if($formatDate->diffInYears($now) < 13) {
- $fail('You must be 13 or older to access this site.');
- }
- }
+ 'password' => ['required', 'string', 'min:8', 'confirmed'],
+ 'dob' => ['required', function ($attribute, $value, $fail) {
+ $date = $value['day'].'-'.$value['month'].'-'.$value['year'];
+ $formatDate = carbon::parse($date);
+ $now = Carbon::now();
+ if ($formatDate->diffInYears($now) < 13) {
+ $fail('You must be 13 or older to access this site.');
}
+ },
],
'code' => ['string', function ($attribute, $value, $fail) {
- if(!Settings::get('is_registration_open')) {
- if(!$value) $fail('An invitation code is required to register an account.');
- $invitation = Invitation::where('code', $value)->whereNull('recipient_id')->first();
- if(!$invitation) $fail('Invalid code entered.');
+ if (!Settings::get('is_registration_open')) {
+ if (!$value) {
+ $fail('An invitation code is required to register an account.');
+ }
+ $invitation = Invitation::where('code', $value)->whereNull('recipient_id')->first();
+ if (!$invitation) {
+ $fail('Invalid code entered.');
}
}
- ]
+ },
+ ],
]);
}
/**
* Create a new user instance after a valid registration.
*
- * @param array $data
* @return \App\Models\User\User
*/
- protected function create(array $data)
- {
+ protected function create(array $data) {
DB::beginTransaction();
$service = new UserService;
$user = $service->createUser(Arr::only($data, ['name', 'email', 'password', 'dob']));
- if(!Settings::get('is_registration_open')) {
+ if (!Settings::get('is_registration_open')) {
(new InvitationService)->useInvitation(Invitation::where('code', $data['code'])->first(), $user);
}
DB::commit();
+
return $user;
}
}
diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php
index 2c863aa6b5..2ada41391f 100644
--- a/app/Http/Controllers/Auth/ResetPasswordController.php
+++ b/app/Http/Controllers/Auth/ResetPasswordController.php
@@ -5,8 +5,7 @@
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
-class ResetPasswordController extends Controller
-{
+class ResetPasswordController extends Controller {
/*
|--------------------------------------------------------------------------
| Password Reset Controller
@@ -29,11 +28,8 @@ class ResetPasswordController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
$this->middleware('guest');
}
}
diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php
index 22aaf00666..071bd656b4 100644
--- a/app/Http/Controllers/Auth/VerificationController.php
+++ b/app/Http/Controllers/Auth/VerificationController.php
@@ -5,8 +5,7 @@
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\VerifiesEmails;
-class VerificationController extends Controller
-{
+class VerificationController extends Controller {
/*
|--------------------------------------------------------------------------
| Email Verification Controller
@@ -29,11 +28,8 @@ class VerificationController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:6,1')->only('verify', 'resend');
diff --git a/app/Http/Controllers/BrowseController.php b/app/Http/Controllers/BrowseController.php
index 5613badd16..ab4c29befe 100644
--- a/app/Http/Controllers/BrowseController.php
+++ b/app/Http/Controllers/BrowseController.php
@@ -2,25 +2,21 @@
namespace App\Http\Controllers;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Settings;
-use App\Models\User\User;
-use App\Models\Rank\Rank;
-
use App\Models\Character\Character;
-use App\Models\Character\CharacterImage;
use App\Models\Character\CharacterCategory;
+use App\Models\Character\CharacterImage;
use App\Models\Character\Sublist;
+use App\Models\Feature\Feature;
+use App\Models\Rank\Rank;
+use App\Models\Rarity;
use App\Models\Species\Species;
use App\Models\Species\Subtype;
-use App\Models\Rarity;
-use App\Models\Feature\Feature;
+use App\Models\User\User;
+use Auth;
+use Illuminate\Http\Request;
+use Settings;
-class BrowseController extends Controller
-{
+class BrowseController extends Controller {
/*
|--------------------------------------------------------------------------
| Browse Controller
@@ -33,20 +29,22 @@ class BrowseController extends Controller
/**
* Shows the user list.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUsers(Request $request)
- {
- $query = User::visible()->join('ranks','users.rank_id', '=', 'ranks.id')->select('ranks.name AS rank_name', 'users.*');
+ public function getUsers(Request $request) {
+ $query = User::visible()->join('ranks', 'users.rank_id', '=', 'ranks.id')->select('ranks.name AS rank_name', 'users.*');
$sort = $request->only(['sort']);
- if($request->get('name')) $query->where(function($query) use ($request) {
- $query->where('users.name', 'LIKE', '%' . $request->get('name') . '%');
- });
- if($request->get('rank_id')) $query->where('rank_id', $request->get('rank_id'));
+ if ($request->get('name')) {
+ $query->where(function ($query) use ($request) {
+ $query->where('users.name', 'LIKE', '%'.$request->get('name').'%');
+ });
+ }
+ if ($request->get('rank_id')) {
+ $query->where('rank_id', $request->get('rank_id'));
+ }
- switch(isset($sort['sort']) ? $sort['sort'] : null) {
+ switch ($sort['sort'] ?? null) {
default:
$query->orderBy('ranks.sort', 'DESC')->orderBy('name');
break;
@@ -68,161 +66,183 @@ public function getUsers(Request $request)
}
return view('browse.users', [
- 'users' => $query->paginate(30)->appends($request->query()),
- 'ranks' => [0 => 'Any Rank'] + Rank::orderBy('ranks.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'blacklistLink' => Settings::get('blacklist_link')
+ 'users' => $query->paginate(30)->appends($request->query()),
+ 'ranks' => [0 => 'Any Rank'] + Rank::orderBy('ranks.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'blacklistLink' => Settings::get('blacklist_link'),
]);
}
/**
* Shows the user blacklist.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getBlacklist(Request $request)
- {
+ public function getBlacklist(Request $request) {
$canView = false;
$key = Settings::get('blacklist_key');
// First, check the display settings for the blacklist...
$privacy = Settings::get('blacklist_privacy');
- if ( $privacy == 3 ||
+ if ($privacy == 3 ||
(Auth::check() &&
($privacy == 2 ||
($privacy == 1 && Auth::user()->isStaff) ||
- ($privacy == 0 && Auth::user()->isAdmin))))
- {
+ ($privacy == 0 && Auth::user()->isAdmin)))) {
// Next, check if the blacklist requires a key
$canView = true;
- if($key != '0' && ($request->get('key') != $key)) $canView = false;
-
+ if ($key != '0' && ($request->get('key') != $key)) {
+ $canView = false;
+ }
}
+
return view('browse.blacklist', [
'canView' => $canView,
'privacy' => $privacy,
- 'key' => $key,
- 'users' => $canView ? User::where('is_banned', 1)->orderBy('users.name')->paginate(30)->appends($request->query()) : null,
+ 'key' => $key,
+ 'users' => $canView ? User::where('is_banned', 1)->orderBy('users.name')->paginate(30)->appends($request->query()) : null,
]);
}
/**
* Shows the character masterlist.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacters(Request $request)
- {
+ public function getCharacters(Request $request) {
$query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(0);
$imageQuery = CharacterImage::images(Auth::check() ? Auth::user() : null)->with('features')->with('rarity')->with('species')->with('features');
- if($sublists = Sublist::where('show_main', 0)->get())
- $subCategories = []; $subSpecies = [];
- { foreach($sublists as $sublist)
- {
- $subCategories = array_merge($subCategories, $sublist->categories->pluck('id')->toArray());
- $subSpecies = array_merge($subSpecies, $sublist->species->pluck('id')->toArray());
- }
+ if ($sublists = Sublist::where('show_main', 0)->get()) {
+ $subCategories = [];
+ } $subSpecies = [];
+ foreach ($sublists as $sublist) {
+ $subCategories = array_merge($subCategories, $sublist->categories->pluck('id')->toArray());
+ $subSpecies = array_merge($subSpecies, $sublist->species->pluck('id')->toArray());
}
$query->whereNotIn('character_category_id', $subCategories);
$imageQuery->whereNotIn('species_id', $subSpecies);
- if($request->get('name')) $query->where(function($query) use ($request) {
- $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%');
- });
- if($request->get('rarity_id')) $query->where('rarity_id', $request->get('rarity_id'));
- if($request->get('character_category_id')) $query->where('character_category_id', $request->get('character_category_id'));
+ if ($request->get('name')) {
+ $query->where(function ($query) use ($request) {
+ $query->where('characters.name', 'LIKE', '%'.$request->get('name').'%')->orWhere('characters.slug', 'LIKE', '%'.$request->get('name').'%');
+ });
+ }
+ if ($request->get('rarity_id')) {
+ $query->where('rarity_id', $request->get('rarity_id'));
+ }
+ if ($request->get('character_category_id')) {
+ $query->where('character_category_id', $request->get('character_category_id'));
+ }
- if($request->get('sale_value_min')) $query->where('sale_value', '>=', $request->get('sale_value_min'));
- if($request->get('sale_value_max')) $query->where('sale_value', '<=', $request->get('sale_value_max'));
+ if ($request->get('sale_value_min')) {
+ $query->where('sale_value', '>=', $request->get('sale_value_min'));
+ }
+ if ($request->get('sale_value_max')) {
+ $query->where('sale_value', '<=', $request->get('sale_value_max'));
+ }
- if($request->get('is_trading')) $query->where('is_trading', 1);
- if($request->get('is_sellable')) $query->where('is_sellable', 1);
- if($request->get('is_tradeable')) $query->where('is_tradeable', 1);
- if($request->get('is_giftable')) $query->where('is_giftable', 1);
+ if ($request->get('is_trading')) {
+ $query->where('is_trading', 1);
+ }
+ if ($request->get('is_sellable')) {
+ $query->where('is_sellable', 1);
+ }
+ if ($request->get('is_tradeable')) {
+ $query->where('is_tradeable', 1);
+ }
+ if ($request->get('is_giftable')) {
+ $query->where('is_giftable', 1);
+ }
- if($request->get('owner')) {
+ if ($request->get('owner')) {
$owner = User::find($request->get('owner'));
- $query->where(function($query) use ($owner) {
+ $query->where(function ($query) use ($owner) {
$query->where('user_id', $owner->id);
});
}
- if($request->get('owner_url')) {
+ if ($request->get('owner_url')) {
$ownerUrl = $request->get('owner_url');
- $query->where(function($query) use ($ownerUrl) {
- $query->where('owner_url','LIKE', '%'.$ownerUrl.'%');
+ $query->where(function ($query) use ($ownerUrl) {
+ $query->where('owner_url', 'LIKE', '%'.$ownerUrl.'%');
});
}
// Search only main images
- if(!$request->get('search_images')) {
+ if (!$request->get('search_images')) {
$imageQuery->whereIn('id', $query->pluck('character_image_id')->toArray());
}
// Searching on image properties
- if($request->get('species_id')) $imageQuery->where('species_id', $request->get('species_id'));
- if($request->get('subtype_id')) $imageQuery->where('subtype_id', $request->get('subtype_id'));
- if($request->get('feature_id')) {
+ if ($request->get('species_id')) {
+ $imageQuery->where('species_id', $request->get('species_id'));
+ }
+ if ($request->get('subtype_id')) {
+ $imageQuery->where('subtype_id', $request->get('subtype_id'));
+ }
+ if ($request->get('feature_id')) {
$featureIds = $request->get('feature_id');
- foreach($featureIds as $featureId) {
- $imageQuery->whereHas('features', function($query) use ($featureId) {
+ foreach ($featureIds as $featureId) {
+ $imageQuery->whereHas('features', function ($query) use ($featureId) {
$query->where('feature_id', $featureId);
});
}
}
- if($request->get('artist')) {
+ if ($request->get('artist')) {
$artist = User::find($request->get('artist'));
- $imageQuery->whereHas('artists', function($query) use ($artist) {
+ $imageQuery->whereHas('artists', function ($query) use ($artist) {
$query->where('user_id', $artist->id);
});
}
- if($request->get('designer')) {
+ if ($request->get('designer')) {
$designer = User::find($request->get('designer'));
- $imageQuery->whereHas('designers', function($query) use ($designer) {
+ $imageQuery->whereHas('designers', function ($query) use ($designer) {
$query->where('user_id', $designer->id);
});
}
- if($request->get('artist_url')) {
+ if ($request->get('artist_url')) {
$artistUrl = $request->get('artist_url');
- $imageQuery->whereHas('artists', function($query) use ($artistUrl) {
+ $imageQuery->whereHas('artists', function ($query) use ($artistUrl) {
$query->where('url', 'LIKE', '%'.$artistUrl.'%');
});
}
- if($request->get('designer_url')) {
+ if ($request->get('designer_url')) {
$designerUrl = $request->get('designer_url');
- $imageQuery->whereHas('designers', function($query) use ($designerUrl) {
+ $imageQuery->whereHas('designers', function ($query) use ($designerUrl) {
$query->where('url', 'LIKE', '%'.$designerUrl.'%');
});
}
$query->whereIn('id', $imageQuery->pluck('character_id')->toArray());
- if($request->get('is_gift_art_allowed')) switch($request->get('is_gift_art_allowed')) {
- case 1:
- $query->where('is_gift_art_allowed', 1);
- break;
- case 2:
- $query->where('is_gift_art_allowed', 2);
- break;
- case 3:
- $query->where('is_gift_art_allowed', '>=', 1);
- break;
- }
- if($request->get('is_gift_writing_allowed')) switch($request->get('is_gift_writing_allowed')) {
- case 1:
- $query->where('is_gift_writing_allowed', 1);
- break;
- case 2:
- $query->where('is_gift_writing_allowed', 2);
- break;
- case 3:
- $query->where('is_gift_writing_allowed', '>=', 1);
- break;
- }
-
- switch($request->get('sort')) {
+ if ($request->get('is_gift_art_allowed')) {
+ switch ($request->get('is_gift_art_allowed')) {
+ case 1:
+ $query->where('is_gift_art_allowed', 1);
+ break;
+ case 2:
+ $query->where('is_gift_art_allowed', 2);
+ break;
+ case 3:
+ $query->where('is_gift_art_allowed', '>=', 1);
+ break;
+ }
+ }
+ if ($request->get('is_gift_writing_allowed')) {
+ switch ($request->get('is_gift_writing_allowed')) {
+ case 1:
+ $query->where('is_gift_writing_allowed', 1);
+ break;
+ case 2:
+ $query->where('is_gift_writing_allowed', 2);
+ break;
+ case 3:
+ $query->where('is_gift_writing_allowed', '>=', 1);
+ break;
+ }
+ }
+
+ switch ($request->get('sort')) {
case 'number_desc':
$query->orderBy('characters.number', 'DESC');
break;
@@ -245,94 +265,112 @@ public function getCharacters(Request $request)
$query->orderBy('characters.number', 'DESC');
}
- if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) $query->visible();
+ if (!Auth::check() || !Auth::user()->hasPower('manage_characters')) {
+ $query->visible();
+ }
return view('browse.masterlist', [
- 'isMyo' => false,
- 'characters' => $query->paginate(24)->appends($request->query()),
- 'categories' => [0 => 'Any Category'] + CharacterCategory::whereNotIn('id', $subCategories)->orderBy('character_categories.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'specieses' => [0 => 'Any Species'] + Species::whereNotIn('id', $subSpecies)->orderBy('specieses.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => [0 => 'Any Subtype'] + Subtype::orderBy('subtypes.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'rarities' => [0 => 'Any Rarity'] + Rarity::orderBy('rarities.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'features' => Feature::orderBy('features.name')->pluck('name', 'id')->toArray(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
- 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray()
+ 'isMyo' => false,
+ 'characters' => $query->paginate(24)->appends($request->query()),
+ 'categories' => [0 => 'Any Category'] + CharacterCategory::whereNotIn('id', $subCategories)->orderBy('character_categories.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'specieses' => [0 => 'Any Species'] + Species::whereNotIn('id', $subSpecies)->orderBy('specieses.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtypes' => [0 => 'Any Subtype'] + Subtype::orderBy('subtypes.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'rarities' => [0 => 'Any Rarity'] + Rarity::orderBy('rarities.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'features' => Feature::orderBy('features.name')->pluck('name', 'id')->toArray(),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
+ 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Shows the MYO slot masterlist.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getMyos(Request $request)
- {
+ public function getMyos(Request $request) {
$query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(1);
$imageQuery = CharacterImage::images(Auth::check() ? Auth::user() : null)->with('features')->with('rarity')->with('species')->with('features');
- if($request->get('name')) $query->where(function($query) use ($request) {
- $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%');
- });
- if($request->get('rarity_id')) $query->where('rarity_id', $request->get('rarity_id'));
+ if ($request->get('name')) {
+ $query->where(function ($query) use ($request) {
+ $query->where('characters.name', 'LIKE', '%'.$request->get('name').'%')->orWhere('characters.slug', 'LIKE', '%'.$request->get('name').'%');
+ });
+ }
+ if ($request->get('rarity_id')) {
+ $query->where('rarity_id', $request->get('rarity_id'));
+ }
- if($request->get('sale_value_min')) $query->where('sale_value', '>=', $request->get('sale_value_min'));
- if($request->get('sale_value_max')) $query->where('sale_value', '<=', $request->get('sale_value_max'));
+ if ($request->get('sale_value_min')) {
+ $query->where('sale_value', '>=', $request->get('sale_value_min'));
+ }
+ if ($request->get('sale_value_max')) {
+ $query->where('sale_value', '<=', $request->get('sale_value_max'));
+ }
- if($request->get('is_trading')) $query->where('is_trading', 1);
- if($request->get('is_sellable')) $query->where('is_sellable', 1);
- if($request->get('is_tradeable')) $query->where('is_tradeable', 1);
- if($request->get('is_giftable')) $query->where('is_giftable', 1);
+ if ($request->get('is_trading')) {
+ $query->where('is_trading', 1);
+ }
+ if ($request->get('is_sellable')) {
+ $query->where('is_sellable', 1);
+ }
+ if ($request->get('is_tradeable')) {
+ $query->where('is_tradeable', 1);
+ }
+ if ($request->get('is_giftable')) {
+ $query->where('is_giftable', 1);
+ }
- if($request->get('owner')) {
+ if ($request->get('owner')) {
$owner = User::find($request->get('owner'));
- $query->where(function($query) use ($owner) {
+ $query->where(function ($query) use ($owner) {
$query->where('user_id', $owner->id);
});
}
- if($request->get('owner_url')) {
+ if ($request->get('owner_url')) {
$ownerUrl = $request->get('owner_url');
- $query->where(function($query) use ($ownerUrl) {
- $query->where('owner_url','LIKE', '%'.$ownerUrl.'%');
+ $query->where(function ($query) use ($ownerUrl) {
+ $query->where('owner_url', 'LIKE', '%'.$ownerUrl.'%');
});
}
// Search only main images
- if(!$request->get('search_images')) {
+ if (!$request->get('search_images')) {
$imageQuery->whereIn('id', $query->pluck('character_image_id')->toArray());
}
// Searching on image properties
- if($request->get('species_id')) $imageQuery->where('species_id', $request->get('species_id'));
- if($request->get('artist')) {
+ if ($request->get('species_id')) {
+ $imageQuery->where('species_id', $request->get('species_id'));
+ }
+ if ($request->get('artist')) {
$artist = User::find($request->get('artist'));
- $imageQuery->whereHas('artists', function($query) use ($artist) {
+ $imageQuery->whereHas('artists', function ($query) use ($artist) {
$query->where('user_id', $artist->id);
});
}
- if($request->get('designer')) {
+ if ($request->get('designer')) {
$designer = User::find($request->get('designer'));
- $imageQuery->whereHas('designers', function($query) use ($designer) {
+ $imageQuery->whereHas('designers', function ($query) use ($designer) {
$query->where('user_id', $designer->id);
});
}
- if($request->get('artist_url')) {
+ if ($request->get('artist_url')) {
$artistUrl = $request->get('artist_url');
- $imageQuery->whereHas('artists', function($query) use ($artistUrl) {
+ $imageQuery->whereHas('artists', function ($query) use ($artistUrl) {
$query->where('url', 'LIKE', '%'.$artistUrl.'%');
});
}
- if($request->get('designer_url')) {
+ if ($request->get('designer_url')) {
$designerUrl = $request->get('designer_url');
- $imageQuery->whereHas('designers', function($query) use ($designerUrl) {
+ $imageQuery->whereHas('designers', function ($query) use ($designerUrl) {
$query->where('url', 'LIKE', '%'.$designerUrl.'%');
});
}
- if($request->get('feature_id')) {
+ if ($request->get('feature_id')) {
$featureIds = $request->get('feature_id');
- foreach($featureIds as $featureId) {
- $imageQuery->whereHas('features', function($query) use ($featureId) {
+ foreach ($featureIds as $featureId) {
+ $imageQuery->whereHas('features', function ($query) use ($featureId) {
$query->where('feature_id', $featureId);
});
}
@@ -340,7 +378,7 @@ public function getMyos(Request $request)
$query->whereIn('id', $imageQuery->pluck('character_id')->toArray());
- switch($request->get('sort')) {
+ switch ($request->get('sort')) {
case 'id_desc':
$query->orderBy('characters.id', 'DESC');
break;
@@ -355,131 +393,165 @@ public function getMyos(Request $request)
break;
}
- if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) $query->visible();
+ if (!Auth::check() || !Auth::user()->hasPower('manage_characters')) {
+ $query->visible();
+ }
return view('browse.myo_masterlist', [
- 'isMyo' => true,
- 'slots' => $query->paginate(30)->appends($request->query()),
- 'specieses' => [0 => 'Any Species'] + Species::orderBy('specieses.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'rarities' => [0 => 'Any Rarity'] + Rarity::orderBy('rarities.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'features' => Feature::orderBy('features.name')->pluck('name', 'id')->toArray(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
- 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray()
+ 'isMyo' => true,
+ 'slots' => $query->paginate(30)->appends($request->query()),
+ 'specieses' => [0 => 'Any Species'] + Species::orderBy('specieses.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'rarities' => [0 => 'Any Rarity'] + Rarity::orderBy('rarities.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'features' => Feature::orderBy('features.name')->pluck('name', 'id')->toArray(),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
+ 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Shows the Sub masterlists.
*
- * @param \Illuminate\Http\Request $request
+ * @param mixed $key
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSublist(Request $request, $key)
- {
+ public function getSublist(Request $request, $key) {
$query = Character::with('user.rank')->with('image.features')->with('rarity')->with('image.species')->myo(0);
$imageQuery = CharacterImage::with('features')->with('rarity')->with('species')->with('features');
$sublist = Sublist::where('key', $key)->first();
- if(!$sublist) abort(404);
+ if (!$sublist) {
+ abort(404);
+ }
$subCategories = $sublist->categories->pluck('id')->toArray();
$subSpecies = $sublist->species->pluck('id')->toArray();
- if($subCategories) $query->whereIn('character_category_id', $subCategories);
- if($subSpecies) $imageQuery->whereIn('species_id', $subSpecies);
-
- if($request->get('name')) $query->where(function($query) use ($request) {
- $query->where('characters.name', 'LIKE', '%' . $request->get('name') . '%')->orWhere('characters.slug', 'LIKE', '%' . $request->get('name') . '%');
- });
- if($request->get('rarity_id')) $query->where('rarity_id', $request->get('rarity_id'));
- if($request->get('character_category_id')) $query->where('character_category_id', $request->get('character_category_id'));
-
- if($request->get('sale_value_min')) $query->where('sale_value', '>=', $request->get('sale_value_min'));
- if($request->get('sale_value_max')) $query->where('sale_value', '<=', $request->get('sale_value_max'));
-
- if($request->get('is_trading')) $query->where('is_trading', 1);
- if($request->get('is_gift_art_allowed')) switch($request->get('is_gift_art_allowed')) {
- case 1:
- $query->where('is_gift_art_allowed', 1);
- break;
- case 2:
- $query->where('is_gift_art_allowed', 2);
- break;
- case 3:
- $query->where('is_gift_art_allowed', '>=', 1);
- break;
- }
- if($request->get('is_gift_writing_allowed')) switch($request->get('is_gift_writing_allowed')) {
- case 1:
- $query->where('is_gift_writing_allowed', 1);
- break;
- case 2:
- $query->where('is_gift_writing_allowed', 2);
- break;
- case 3:
- $query->where('is_gift_writing_allowed', '>=', 1);
- break;
- }
- if($request->get('is_sellable')) $query->where('is_sellable', 1);
- if($request->get('is_tradeable')) $query->where('is_tradeable', 1);
- if($request->get('is_giftable')) $query->where('is_giftable', 1);
-
- if($request->get('owner')) {
+ if ($subCategories) {
+ $query->whereIn('character_category_id', $subCategories);
+ }
+ if ($subSpecies) {
+ $imageQuery->whereIn('species_id', $subSpecies);
+ }
+
+ if ($request->get('name')) {
+ $query->where(function ($query) use ($request) {
+ $query->where('characters.name', 'LIKE', '%'.$request->get('name').'%')->orWhere('characters.slug', 'LIKE', '%'.$request->get('name').'%');
+ });
+ }
+ if ($request->get('rarity_id')) {
+ $query->where('rarity_id', $request->get('rarity_id'));
+ }
+ if ($request->get('character_category_id')) {
+ $query->where('character_category_id', $request->get('character_category_id'));
+ }
+
+ if ($request->get('sale_value_min')) {
+ $query->where('sale_value', '>=', $request->get('sale_value_min'));
+ }
+ if ($request->get('sale_value_max')) {
+ $query->where('sale_value', '<=', $request->get('sale_value_max'));
+ }
+
+ if ($request->get('is_trading')) {
+ $query->where('is_trading', 1);
+ }
+ if ($request->get('is_gift_art_allowed')) {
+ switch ($request->get('is_gift_art_allowed')) {
+ case 1:
+ $query->where('is_gift_art_allowed', 1);
+ break;
+ case 2:
+ $query->where('is_gift_art_allowed', 2);
+ break;
+ case 3:
+ $query->where('is_gift_art_allowed', '>=', 1);
+ break;
+ }
+ }
+ if ($request->get('is_gift_writing_allowed')) {
+ switch ($request->get('is_gift_writing_allowed')) {
+ case 1:
+ $query->where('is_gift_writing_allowed', 1);
+ break;
+ case 2:
+ $query->where('is_gift_writing_allowed', 2);
+ break;
+ case 3:
+ $query->where('is_gift_writing_allowed', '>=', 1);
+ break;
+ }
+ }
+ if ($request->get('is_sellable')) {
+ $query->where('is_sellable', 1);
+ }
+ if ($request->get('is_tradeable')) {
+ $query->where('is_tradeable', 1);
+ }
+ if ($request->get('is_giftable')) {
+ $query->where('is_giftable', 1);
+ }
+
+ if ($request->get('owner')) {
$owner = User::find($request->get('owner'));
- $query->where(function($query) use ($owner) {
+ $query->where(function ($query) use ($owner) {
$query->where('user_id', $owner->id);
});
}
- if($request->get('owner_url')) {
+ if ($request->get('owner_url')) {
$ownerUrl = $request->get('owner_url');
- $query->where(function($query) use ($ownerUrl) {
- $query->where('owner_url','LIKE', '%'.$ownerUrl.'%');
+ $query->where(function ($query) use ($ownerUrl) {
+ $query->where('owner_url', 'LIKE', '%'.$ownerUrl.'%');
});
}
// Search only main images
- if(!$request->get('search_images')) {
+ if (!$request->get('search_images')) {
$imageQuery->whereIn('id', $query->pluck('character_image_id')->toArray());
}
// Searching on image properties
- if($request->get('species_id')) $imageQuery->where('species_id', $request->get('species_id'));
- if($request->get('subtype_id')) $imageQuery->where('subtype_id', $request->get('subtype_id'));
- if($request->get('feature_id')) {
+ if ($request->get('species_id')) {
+ $imageQuery->where('species_id', $request->get('species_id'));
+ }
+ if ($request->get('subtype_id')) {
+ $imageQuery->where('subtype_id', $request->get('subtype_id'));
+ }
+ if ($request->get('feature_id')) {
$featureIds = $request->get('feature_id');
- foreach($featureIds as $featureId) {
- $imageQuery->whereHas('features', function($query) use ($featureId) {
+ foreach ($featureIds as $featureId) {
+ $imageQuery->whereHas('features', function ($query) use ($featureId) {
$query->where('feature_id', $featureId);
});
}
}
- if($request->get('artist')) {
+ if ($request->get('artist')) {
$artist = User::find($request->get('artist'));
- $imageQuery->whereHas('artists', function($query) use ($artist) {
+ $imageQuery->whereHas('artists', function ($query) use ($artist) {
$query->where('user_id', $artist->id);
});
}
- if($request->get('designer')) {
+ if ($request->get('designer')) {
$designer = User::find($request->get('designer'));
- $imageQuery->whereHas('designers', function($query) use ($designer) {
+ $imageQuery->whereHas('designers', function ($query) use ($designer) {
$query->where('user_id', $designer->id);
});
}
- if($request->get('artist_url')) {
+ if ($request->get('artist_url')) {
$artistUrl = $request->get('artist_url');
- $imageQuery->whereHas('artists', function($query) use ($artistUrl) {
+ $imageQuery->whereHas('artists', function ($query) use ($artistUrl) {
$query->where('url', 'LIKE', '%'.$artistUrl.'%');
});
}
- if($request->get('designer_url')) {
+ if ($request->get('designer_url')) {
$designerUrl = $request->get('designer_url');
- $imageQuery->whereHas('designers', function($query) use ($designerUrl) {
+ $imageQuery->whereHas('designers', function ($query) use ($designerUrl) {
$query->where('url', 'LIKE', '%'.$designerUrl.'%');
});
}
$query->whereIn('id', $imageQuery->pluck('character_id')->toArray());
- switch($request->get('sort')) {
+ switch ($request->get('sort')) {
case 'number_desc':
$query->orderBy('characters.number', 'DESC');
break;
@@ -502,23 +574,30 @@ public function getSublist(Request $request, $key)
$query->orderBy('characters.number', 'DESC');
}
- if(!Auth::check() || !Auth::user()->hasPower('manage_characters')) $query->visible();
+ if (!Auth::check() || !Auth::user()->hasPower('manage_characters')) {
+ $query->visible();
+ }
$subCategory = CharacterCategory::where('masterlist_sub_id', $sublist->id)->orderBy('character_categories.sort', 'DESC')->pluck('name', 'id')->toArray();
- if(!$subCategory) $subCategory = CharacterCategory::orderBy('character_categories.sort', 'DESC')->pluck('name', 'id')->toArray();
+ if (!$subCategory) {
+ $subCategory = CharacterCategory::orderBy('character_categories.sort', 'DESC')->pluck('name', 'id')->toArray();
+ }
$subSpecies = Species::where('masterlist_sub_id', $sublist->id)->orderBy('specieses.sort', 'DESC')->pluck('name', 'id')->toArray();
- if(!$subSpecies) $subSpecies = Species::orderBy('specieses.sort', 'DESC')->pluck('name', 'id')->toArray();
+ if (!$subSpecies) {
+ $subSpecies = Species::orderBy('specieses.sort', 'DESC')->pluck('name', 'id')->toArray();
+ }
+
return view('browse.sub_masterlist', [
- 'isMyo' => false,
- 'characters' => $query->paginate(24)->appends($request->query()),
- 'categories' => [0 => 'Any Category'] + $subCategory,
- 'specieses' => [0 => 'Any Species'] + $subSpecies,
- 'subtypes' => [0 => 'Any Subtype'] + Subtype::orderBy('subtypes.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'rarities' => [0 => 'Any Rarity'] + Rarity::orderBy('rarities.sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'features' => Feature::orderBy('features.name')->pluck('name', 'id')->toArray(),
- 'sublist' => $sublist,
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
- 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray()
+ 'isMyo' => false,
+ 'characters' => $query->paginate(24)->appends($request->query()),
+ 'categories' => [0 => 'Any Category'] + $subCategory,
+ 'specieses' => [0 => 'Any Species'] + $subSpecies,
+ 'subtypes' => [0 => 'Any Subtype'] + Subtype::orderBy('subtypes.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'rarities' => [0 => 'Any Rarity'] + Rarity::orderBy('rarities.sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'features' => Feature::orderBy('features.name')->pluck('name', 'id')->toArray(),
+ 'sublist' => $sublist,
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
+ 'userOptions' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
}
diff --git a/app/Http/Controllers/Characters/CharacterController.php b/app/Http/Controllers/Characters/CharacterController.php
index 1a77d7cc61..1784277a1f 100644
--- a/app/Http/Controllers/Characters/CharacterController.php
+++ b/app/Http/Controllers/Characters/CharacterController.php
@@ -2,41 +2,28 @@
namespace App\Http\Controllers\Characters;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Route;
-use Settings;
-use App\Models\User\User;
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
-use App\Models\Species\Species;
-use App\Models\Rarity;
-use App\Models\Feature\Feature;
+use App\Models\Character\CharacterCurrency;
+use App\Models\Character\CharacterItem;
use App\Models\Character\CharacterProfile;
-
+use App\Models\Character\CharacterTransfer;
use App\Models\Currency\Currency;
-use App\Models\Currency\CurrencyLog;
-use App\Models\User\UserCurrency;
use App\Models\Gallery\GallerySubmission;
-use App\Models\Character\CharacterCurrency;
-
use App\Models\Item\Item;
use App\Models\Item\ItemCategory;
+use App\Models\User\User;
+use App\Models\User\UserCurrency;
use App\Models\User\UserItem;
-use App\Models\Character\CharacterItem;
-use App\Models\Item\ItemLog;
-
-use App\Models\Character\CharacterTransfer;
-
+use App\Services\CharacterManager;
use App\Services\CurrencyManager;
use App\Services\InventoryManager;
-use App\Services\CharacterManager;
-
-use App\Http\Controllers\Controller;
+use Auth;
+use Illuminate\Http\Request;
+use Route;
+use Settings;
-class CharacterController extends Controller
-{
+class CharacterController extends Controller {
/*
|--------------------------------------------------------------------------
| Character Controller
@@ -48,19 +35,21 @@ class CharacterController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
$this->middleware(function ($request, $next) {
$slug = Route::current()->parameter('slug');
$query = Character::myo(0)->where('slug', $slug);
- if(!(Auth::check() && Auth::user()->hasPower('manage_characters'))) $query->where('is_visible', 1);
+ if (!(Auth::check() && Auth::user()->hasPower('manage_characters'))) {
+ $query->where('is_visible', 1);
+ }
$this->character = $query->first();
- if(!$this->character) abort(404);
+ if (!$this->character) {
+ abort(404);
+ }
$this->character->updateOwner();
+
return $next($request);
});
}
@@ -68,11 +57,11 @@ public function __construct()
/**
* Shows a character's masterlist entry.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacter($slug)
- {
+ public function getCharacter($slug) {
return view('character.character', [
'character' => $this->character,
]);
@@ -81,11 +70,11 @@ public function getCharacter($slug)
/**
* Shows a character's profile.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterProfile($slug)
- {
+ public function getCharacterProfile($slug) {
return view('character.profile', [
'character' => $this->character,
]);
@@ -94,16 +83,20 @@ public function getCharacterProfile($slug)
/**
* Shows a character's edit profile page.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditCharacterProfile($slug)
- {
- if(!Auth::check()) abort(404);
+ public function getEditCharacterProfile($slug) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_characters');
$isOwner = ($this->character->user_id == Auth::user()->id);
- if(!$isMod && !$isOwner) abort(404);
+ if (!$isMod && !$isOwner) {
+ abort(404);
+ }
return view('character.edit_profile', [
'character' => $this->character,
@@ -113,40 +106,45 @@ public function getEditCharacterProfile($slug)
/**
* Edits a character's profile.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditCharacterProfile(Request $request, CharacterManager $service, $slug)
- {
- if(!Auth::check()) abort(404);
+ public function postEditCharacterProfile(Request $request, CharacterManager $service, $slug) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_characters');
$isOwner = ($this->character->user_id == Auth::user()->id);
- if(!$isMod && !$isOwner) abort(404);
+ if (!$isMod && !$isOwner) {
+ abort(404);
+ }
$request->validate(CharacterProfile::$rules);
- if($service->updateCharacterProfile($request->only(['name', 'link', 'text', 'is_gift_art_allowed', 'is_gift_writing_allowed', 'is_trading', 'alert_user']), $this->character, Auth::user(), !$isOwner)) {
+ if ($service->updateCharacterProfile($request->only(['name', 'link', 'text', 'is_gift_art_allowed', 'is_gift_writing_allowed', 'is_trading', 'alert_user']), $this->character, Auth::user(), !$isOwner)) {
flash('Profile edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows a character's gallery.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterGallery($slug)
- {
+ public function getCharacterGallery($slug) {
return view('character.gallery', [
- 'character' => $this->character,
+ 'character' => $this->character,
'submissions' => GallerySubmission::whereIn('id', $this->character->gallerySubmissions->pluck('gallery_submission_id')->toArray())->visible()->accepted()->orderBy('created_at', 'DESC')->paginate(20),
]);
}
@@ -154,13 +152,13 @@ public function getCharacterGallery($slug)
/**
* Shows a character's images.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterImages($slug)
- {
+ public function getCharacterImages($slug) {
return view('character.images', [
- 'user' => Auth::check() ? Auth::user() : null,
+ 'user' => Auth::check() ? Auth::user() : null,
'character' => $this->character,
]);
}
@@ -168,11 +166,11 @@ public function getCharacterImages($slug)
/**
* Shows a character's inventory.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterInventory($slug)
- {
+ public function getCharacterInventory($slug) {
$categories = ItemCategory::where('is_character_owned', '1')->orderBy('sort', 'DESC')->get();
$itemOptions = Item::whereIn('item_category_id', $categories->pluck('id'));
@@ -190,31 +188,35 @@ public function getCharacterInventory($slug)
->orderBy('updated_at')
->get()
->groupBy(['item_category_id', 'id']);
+
return view('character.inventory', [
- 'character' => $this->character,
+ 'character' => $this->character,
'categories' => $categories->keyBy('id'),
- 'items' => $items,
- 'logs' => $this->character->getItemLogs(),
- ] + (Auth::check() && (Auth::user()->hasPower('edit_inventories') || Auth::user()->id == $this->character->user_id) ? [
- 'itemOptions' => $itemOptions->pluck('name', 'id'),
- 'userInventory' => UserItem::with('item')->whereIn('item_id', $itemOptions->pluck('id'))->whereNull('deleted_at')->where('count', '>', '0')->where('user_id', Auth::user()->id)->get()->filter(function($userItem){return $userItem->isTransferrable == true;})->sortBy('item.name'),
- 'page' => 'character'
- ] : []));
+ 'items' => $items,
+ 'logs' => $this->character->getItemLogs(),
+ ] + (Auth::check() && (Auth::user()->hasPower('edit_inventories') || Auth::user()->id == $this->character->user_id) ? [
+ 'itemOptions' => $itemOptions->pluck('name', 'id'),
+ 'userInventory' => UserItem::with('item')->whereIn('item_id', $itemOptions->pluck('id'))->whereNull('deleted_at')->where('count', '>', '0')->where('user_id', Auth::user()->id)->get()->filter(function ($userItem) {
+ return $userItem->isTransferrable == true;
+ })->sortBy('item.name'),
+ 'page' => 'character',
+ ] : []));
}
/**
* Shows a character's bank.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterBank($slug)
- {
+ public function getCharacterBank($slug) {
$character = $this->character;
+
return view('character.bank', [
- 'character' => $this->character,
+ 'character' => $this->character,
'currencies' => $character->getCurrencies(true),
- 'logs' => $this->character->getCurrencyLogs(),
+ 'logs' => $this->character->getCurrencyLogs(),
] + (Auth::check() && Auth::user()->id == $this->character->user_id ? [
'takeCurrencyOptions' => Currency::where('allow_character_to_user', 1)->where('is_user_owned', 1)->where('is_character_owned', 1)->whereIn('id', CharacterCurrency::where('character_id', $this->character->id)->pluck('currency_id')->toArray())->orderBy('sort_character', 'DESC')->pluck('name', 'id')->toArray(),
'giveCurrencyOptions' => Currency::where('allow_user_to_character', 1)->where('is_user_owned', 1)->where('is_character_owned', 1)->whereIn('id', UserCurrency::where('user_id', Auth::user()->id)->pluck('currency_id')->toArray())->orderBy('sort_user', 'DESC')->pluck('name', 'id')->toArray(),
@@ -227,40 +229,44 @@ public function getCharacterBank($slug)
/**
* Transfers currency between the user and character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCurrencyTransfer(Request $request, CurrencyManager $service, $slug)
- {
- if(!Auth::check()) abort(404);
+ public function postCurrencyTransfer(Request $request, CurrencyManager $service, $slug) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$action = $request->get('action');
$sender = ($action == 'take') ? $this->character : Auth::user();
$recipient = ($action == 'take') ? Auth::user() : $this->character;
- if($service->transferCharacterCurrency($sender, $recipient, Currency::where(($action == 'take') ? 'allow_character_to_user' : 'allow_user_to_character', 1)->where('id', $request->get(($action == 'take') ? 'take_currency_id' : 'give_currency_id'))->first(), $request->get('quantity'))) {
+ if ($service->transferCharacterCurrency($sender, $recipient, Currency::where(($action == 'take') ? 'allow_character_to_user' : 'allow_user_to_character', 1)->where('id', $request->get(($action == 'take') ? 'take_currency_id' : 'give_currency_id'))->first(), $request->get('quantity'))) {
flash('Currency transferred successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Handles inventory item processing, including transferring items between the user and character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postInventoryEdit(Request $request, InventoryManager $service, $slug)
- {
- if(!Auth::check()) abort(404);
- switch($request->get('action')) {
+ public function postInventoryEdit(Request $request, InventoryManager $service, $slug) {
+ if (!Auth::check()) {
+ abort(404);
+ }
+ switch ($request->get('action')) {
default:
flash('Invalid action selected.')->error();
break;
@@ -268,11 +274,12 @@ public function postInventoryEdit(Request $request, InventoryManager $service, $
$sender = Auth::user();
$recipient = $this->character;
- if($service->transferCharacterStack($sender, $recipient, UserItem::find($request->get('stack_id')), $request->get('stack_quantity'))) {
+ if ($service->transferCharacterStack($sender, $recipient, UserItem::find($request->get('stack_id')), $request->get('stack_quantity'))) {
flash('Item transferred successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
break;
case 'name':
@@ -289,230 +296,251 @@ public function postInventoryEdit(Request $request, InventoryManager $service, $
return redirect()->back();
}
- /**
- * Transfers inventory items back to a user.
- *
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
- * @return \Illuminate\Http\RedirectResponse
- */
- private function postItemTransfer(Request $request, InventoryManager $service)
- {
- if($service->transferCharacterStack($this->character, $this->character->user, CharacterItem::find($request->get('ids')), $request->get('quantities'))) {
- flash('Item transferred successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
- return redirect()->back();
- }
-
- /**
- * Names an inventory stack.
- *
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @return \Illuminate\Http\RedirectResponse
- */
- private function postName(Request $request, InventoryManager $service)
- {
- if($service->nameStack($this->character, CharacterItem::find($request->get('ids')), $request->get('stack_name'))) {
- flash('Item named successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
- return redirect()->back();
- }
-
- /**
- * Deletes an inventory stack.
- *
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @return \Illuminate\Http\RedirectResponse
- */
- private function postDelete(Request $request, InventoryManager $service)
- {
- if($service->deleteStack($this->character, CharacterItem::find($request->get('ids')), $request->get('quantities'))) {
- flash('Item deleted successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
- return redirect()->back();
- }
-
/**
* Shows a character's currency logs.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterCurrencyLogs($slug)
- {
+ public function getCharacterCurrencyLogs($slug) {
return view('character.currency_logs', [
'character' => $this->character,
- 'logs' => $this->character->getCurrencyLogs(0)
+ 'logs' => $this->character->getCurrencyLogs(0),
]);
}
/**
* Shows a character's item logs.
*
- * @param string $name
+ * @param mixed $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterItemLogs($slug)
- {
+ public function getCharacterItemLogs($slug) {
return view('character.item_logs', [
'character' => $this->character,
- 'logs' => $this->character->getItemLogs(0)
+ 'logs' => $this->character->getItemLogs(0),
]);
}
/**
* Shows a character's ownership logs.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterOwnershipLogs($slug)
- {
+ public function getCharacterOwnershipLogs($slug) {
return view('character.ownership_logs', [
'character' => $this->character,
- 'logs' => $this->character->getOwnershipLogs(0)
+ 'logs' => $this->character->getOwnershipLogs(0),
]);
}
/**
* Shows a character's ownership logs.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterLogs($slug)
- {
+ public function getCharacterLogs($slug) {
return view('character.character_logs', [
'character' => $this->character,
- 'logs' => $this->character->getCharacterLogs()
+ 'logs' => $this->character->getCharacterLogs(),
]);
}
/**
* Shows a character's submissions.
*
+ * @param mixed $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterSubmissions($slug)
- {
+ public function getCharacterSubmissions($slug) {
return view('character.submission_logs', [
'character' => $this->character,
- 'logs' => $this->character->getSubmissions()
+ 'logs' => $this->character->getSubmissions(),
]);
}
/**
* Shows a character's transfer page.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTransfer($slug)
- {
- if(!Auth::check()) abort(404);
+ public function getTransfer($slug) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_characters');
$isOwner = ($this->character->user_id == Auth::user()->id);
- if(!$isMod && !$isOwner) abort(404);
+ if (!$isMod && !$isOwner) {
+ abort(404);
+ }
return view('character.transfer', [
- 'character' => $this->character,
- 'transfer' => CharacterTransfer::active()->where('character_id', $this->character->id)->first(),
- 'cooldown' => Settings::get('transfer_cooldown'),
+ 'character' => $this->character,
+ 'transfer' => CharacterTransfer::active()->where('character_id', $this->character->id)->first(),
+ 'cooldown' => Settings::get('transfer_cooldown'),
'transfersQueue' => Settings::get('open_transfers_queue'),
- 'userOptions' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'userOptions' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Opens a transfer request for a character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postTransfer(Request $request, CharacterManager $service, $slug)
- {
- if(!Auth::check()) abort(404);
+ public function postTransfer(Request $request, CharacterManager $service, $slug) {
+ if (!Auth::check()) {
+ abort(404);
+ }
- if($service->createTransfer($request->only(['recipient_id', 'user_reason']), $this->character, Auth::user())) {
+ if ($service->createTransfer($request->only(['recipient_id', 'user_reason']), $this->character, Auth::user())) {
flash('Transfer created successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Cancels a transfer request for a character.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param string $slug
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCancelTransfer(Request $request, CharacterManager $service, $slug, $id)
- {
- if(!Auth::check()) abort(404);
+ public function postCancelTransfer(Request $request, CharacterManager $service, $slug, $id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
- if($service->cancelTransfer(['transfer_id' => $id], Auth::user())) {
+ if ($service->cancelTransfer(['transfer_id' => $id], Auth::user())) {
flash('Transfer cancelled.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows a character's design update approval page.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterApproval($slug)
- {
- if(!Auth::check() || $this->character->user_id != Auth::user()->id) abort(404);
+ public function getCharacterApproval($slug) {
+ if (!Auth::check() || $this->character->user_id != Auth::user()->id) {
+ abort(404);
+ }
return view('character.update_form', [
'character' => $this->character,
'queueOpen' => Settings::get('is_design_updates_open'),
- 'request' => $this->character->designUpdate()->active()->first()
+ 'request' => $this->character->designUpdate()->active()->first(),
]);
}
/**
* Opens a new design update approval request for a character.
*
- * @param App\Services\CharacterManager $service
- * @param string $slug
+ * @param App\Services\CharacterManager $service
+ * @param string $slug
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCharacterApproval($slug, CharacterManager $service)
- {
- if(!Auth::check() || $this->character->user_id != Auth::user()->id) abort(404);
+ public function postCharacterApproval($slug, CharacterManager $service) {
+ if (!Auth::check() || $this->character->user_id != Auth::user()->id) {
+ abort(404);
+ }
- if($request = $service->createDesignUpdateRequest($this->character, Auth::user())) {
+ if ($request = $service->createDesignUpdateRequest($this->character, Auth::user())) {
flash('Successfully created new design update request draft.')->success();
+
return redirect()->to($request->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+
+ return redirect()->back();
+ }
+
+ /**
+ * Transfers inventory items back to a user.
+ *
+ * @param App\Services\InventoryManager $service
+ *
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ private function postItemTransfer(Request $request, InventoryManager $service) {
+ if ($service->transferCharacterStack($this->character, $this->character->user, CharacterItem::find($request->get('ids')), $request->get('quantities'))) {
+ flash('Item transferred successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
+
+ return redirect()->back();
+ }
+
+ /**
+ * Names an inventory stack.
+ *
+ * @param App\Services\CharacterManager $service
+ *
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ private function postName(Request $request, InventoryManager $service) {
+ if ($service->nameStack($this->character, CharacterItem::find($request->get('ids')), $request->get('stack_name'))) {
+ flash('Item named successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
+ return redirect()->back();
+ }
+
+ /**
+ * Deletes an inventory stack.
+ *
+ * @param App\Services\CharacterManager $service
+ *
+ * @return \Illuminate\Http\RedirectResponse
+ */
+ private function postDelete(Request $request, InventoryManager $service) {
+ if ($service->deleteStack($this->character, CharacterItem::find($request->get('ids')), $request->get('quantities'))) {
+ flash('Item deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+ }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Characters/DesignController.php b/app/Http/Controllers/Characters/DesignController.php
index 0350192ba0..f2f0afaa90 100644
--- a/app/Http/Controllers/Characters/DesignController.php
+++ b/app/Http/Controllers/Characters/DesignController.php
@@ -2,316 +2,365 @@
namespace App\Http\Controllers\Characters;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Settings;
-use App\Models\Item\Item;
-use App\Models\User\User;
-use App\Models\User\UserItem;
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
use App\Models\Character\CharacterDesignUpdate;
-use App\Models\Species\Species;
-use App\Models\Species\Subtype;
-use App\Models\Rarity;
use App\Models\Feature\Feature;
+use App\Models\Item\Item;
use App\Models\Item\ItemCategory;
+use App\Models\Rarity;
+use App\Models\Species\Species;
+use App\Models\Species\Subtype;
+use App\Models\User\User;
+use App\Models\User\UserItem;
use App\Services\CharacterManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class DesignController extends Controller
-{
+class DesignController extends Controller {
/**
* Shows the index of character design update submissions.
*
- * @param string $type
+ * @param string $type
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDesignUpdateIndex($type = null)
- {
+ public function getDesignUpdateIndex($type = null) {
$requests = CharacterDesignUpdate::where('user_id', Auth::user()->id);
- if(!$type) $type = 'draft';
+ if (!$type) {
+ $type = 'draft';
+ }
$requests->where('status', ucfirst($type));
return view('character.design.index', [
'requests' => $requests->orderBy('id', 'DESC')->paginate(20),
- 'status' => $type
+ 'status' => $type,
]);
}
/**
* Shows a design update request.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDesignUpdate($id)
- {
+ public function getDesignUpdate($id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) abort(404);
+ if (!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) {
+ abort(404);
+ }
+
return view('character.design.request', [
- 'request' => $r
+ 'request' => $r,
]);
}
/**
* Shows a design update request's comments section.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getComments($id)
- {
+ public function getComments($id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) abort(404);
+ if (!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) {
+ abort(404);
+ }
+
return view('character.design.comments', [
- 'request' => $r
+ 'request' => $r,
]);
}
/**
* Edits a design update request's comments section.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postComments(Request $request, CharacterManager $service, $id)
- {
+ public function postComments(Request $request, CharacterManager $service, $id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r) abort(404);
- if($r->user_id != Auth::user()->id) abort(404);
+ if (!$r) {
+ abort(404);
+ }
+ if ($r->user_id != Auth::user()->id) {
+ abort(404);
+ }
- if($service->saveRequestComment($request->only(['comments']), $r)) {
+ if ($service->saveRequestComment($request->only(['comments']), $r)) {
flash('Request edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows a design update request's image section.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getImage($id)
- {
+ public function getImage($id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) abort(404);
+ if (!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) {
+ abort(404);
+ }
+
return view('character.design.image', [
'request' => $r,
- 'users' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'users' => User::query()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Edits a design update request's image upload section.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postImage(Request $request, CharacterManager $service, $id)
- {
+ public function postImage(Request $request, CharacterManager $service, $id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r) abort(404);
- if($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters')) abort(404);
+ if (!$r) {
+ abort(404);
+ }
+ if ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters')) {
+ abort(404);
+ }
$request->validate(CharacterDesignUpdate::$imageRules);
$useAdmin = ($r->status != 'Draft' || $r->user_id != Auth::user()->id) && Auth::user()->hasPower('manage_characters');
- if($service->saveRequestImage($request->all(), $r, $useAdmin)) {
+ if ($service->saveRequestImage($request->all(), $r, $useAdmin)) {
flash('Request edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows a design update request's addons section.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getAddons($id)
- {
+ public function getAddons($id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) abort(404);
- if($r->status == 'Draft' && $r->user_id == Auth::user()->id)
+ if (!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) {
+ abort(404);
+ }
+ if ($r->status == 'Draft' && $r->user_id == Auth::user()->id) {
$inventory = UserItem::with('item')->whereNull('deleted_at')->where('count', '>', '0')->where('user_id', $r->user_id)->get();
- else
+ } else {
$inventory = isset($r->data['user']) ? parseAssetData($r->data['user']) : null;
+ }
+
return view('character.design.addons', [
- 'request' => $r,
- 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
- 'inventory' => $inventory,
- 'items' => Item::all()->keyBy('id'),
+ 'request' => $r,
+ 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
+ 'inventory' => $inventory,
+ 'items' => Item::all()->keyBy('id'),
'item_filter' => Item::orderBy('name')->get()->keyBy('id'),
- 'page' => 'update'
+ 'page' => 'update',
]);
}
/**
* Edits a design update request's addons section.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postAddons(Request $request, CharacterManager $service, $id)
- {
+ public function postAddons(Request $request, CharacterManager $service, $id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r) abort(404);
- if($r->user_id != Auth::user()->id) abort(404);
+ if (!$r) {
+ abort(404);
+ }
+ if ($r->user_id != Auth::user()->id) {
+ abort(404);
+ }
- if($service->saveRequestAddons($request->all(), $r)) {
+ if ($service->saveRequestAddons($request->all(), $r)) {
flash('Request edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows a design update request's features section.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getFeatures($id)
- {
+ public function getFeatures($id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) abort(404);
+ if (!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) {
+ abort(404);
+ }
return view('character.design.features', [
- 'request' => $r,
+ 'request' => $r,
'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['0' => 'No Subtype'] + Subtype::where('species_id','=',$r->species_id)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray()
+ 'subtypes' => ['0' => 'No Subtype'] + Subtype::where('species_id', '=', $r->species_id)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'features' => Feature::orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
- * Shows the edit image subtype portion of the modal
+ * Shows the edit image subtype portion of the modal.
*
- * @param Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getFeaturesSubtype(Request $request) {
+ $species = $request->input('species');
+ $id = $request->input('id');
- $species = $request->input('species');
- $id = $request->input('id');
- return view('character.design._features_subtype', [
- 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id','=',$species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtype' => $id
- ]);
+ return view('character.design._features_subtype', [
+ 'subtypes' => ['0' => 'Select Subtype'] + Subtype::where('species_id', '=', $species)->orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'subtype' => $id,
+ ]);
}
/**
* Edits a design update request's features section.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postFeatures(Request $request, CharacterManager $service, $id)
- {
+ public function postFeatures(Request $request, CharacterManager $service, $id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r) abort(404);
- if($r->user_id != Auth::user()->id) abort(404);
+ if (!$r) {
+ abort(404);
+ }
+ if ($r->user_id != Auth::user()->id) {
+ abort(404);
+ }
- if($service->saveRequestFeatures($request->all(), $r)) {
+ if ($service->saveRequestFeatures($request->all(), $r)) {
flash('Request edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the design update request submission confirmation modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getConfirm($id)
- {
+ public function getConfirm($id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) abort(404);
+ if (!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) {
+ abort(404);
+ }
+
return view('character.design._confirm_modal', [
- 'request' => $r
+ 'request' => $r,
]);
}
/**
* Submits a design update request for approval.
*
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSubmit(CharacterManager $service, $id)
- {
+ public function postSubmit(CharacterManager $service, $id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r) abort(404);
- if($r->user_id != Auth::user()->id) abort(404);
+ if (!$r) {
+ abort(404);
+ }
+ if ($r->user_id != Auth::user()->id) {
+ abort(404);
+ }
- if($service->submitRequest($r)) {
+ if ($service->submitRequest($r)) {
flash('Request submitted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the design update request deletion confirmation modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDelete($id)
- {
+ public function getDelete($id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) abort(404);
+ if (!$r || ($r->user_id != Auth::user()->id && !Auth::user()->hasPower('manage_characters'))) {
+ abort(404);
+ }
+
return view('character.design._delete_modal', [
- 'request' => $r
+ 'request' => $r,
]);
}
/**
* Deletes a design update request.
*
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDelete(CharacterManager $service, $id)
- {
+ public function postDelete(CharacterManager $service, $id) {
$r = CharacterDesignUpdate::find($id);
- if(!$r) abort(404);
- if($r->user_id != Auth::user()->id) abort(404);
+ if (!$r) {
+ abort(404);
+ }
+ if ($r->user_id != Auth::user()->id) {
+ abort(404);
+ }
- if($service->deleteRequest($r)) {
+ if ($service->deleteRequest($r)) {
flash('Request deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('designs');
}
}
diff --git a/app/Http/Controllers/Characters/MyoController.php b/app/Http/Controllers/Characters/MyoController.php
index da29321e9c..9dba7a5429 100644
--- a/app/Http/Controllers/Characters/MyoController.php
+++ b/app/Http/Controllers/Characters/MyoController.php
@@ -2,27 +2,17 @@
namespace App\Http\Controllers\Characters;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Route;
-use Settings;
-use App\Models\User\User;
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
-use App\Models\Currency\Currency;
-use App\Models\Currency\CurrencyLog;
-use App\Models\User\UserCurrency;
-use App\Models\Character\CharacterCurrency;
use App\Models\Character\CharacterTransfer;
-
-use App\Services\CurrencyManager;
+use App\Models\User\User;
use App\Services\CharacterManager;
+use Auth;
+use Illuminate\Http\Request;
+use Route;
+use Settings;
-use App\Http\Controllers\Controller;
-
-class MyoController extends Controller
-{
+class MyoController extends Controller {
/*
|--------------------------------------------------------------------------
| MYO Slot Controller
@@ -34,38 +24,41 @@ class MyoController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
- $this->middleware(function ($request, $next) {
- $id = Route::current()->parameter('id');
- $check = Character::where('id', $id)->first();
- if(!$check) abort(404);
-
- if($check->is_myo_slot) {
- $query = Character::myo(1)->where('id', $id);
- if(!(Auth::check() && Auth::user()->hasPower('manage_characters'))) $query->where('is_visible', 1);
- $this->character = $query->first();
- if(!$this->character) abort(404);
- $this->character->updateOwner();
- return $next($request);
- }
- else {
- return redirect('/character/' . $check->slug);
- }
- });
+ public function __construct() {
+ $this->middleware(function ($request, $next) {
+ $id = Route::current()->parameter('id');
+ $check = Character::where('id', $id)->first();
+ if (!$check) {
+ abort(404);
+ }
+
+ if ($check->is_myo_slot) {
+ $query = Character::myo(1)->where('id', $id);
+ if (!(Auth::check() && Auth::user()->hasPower('manage_characters'))) {
+ $query->where('is_visible', 1);
+ }
+ $this->character = $query->first();
+ if (!$this->character) {
+ abort(404);
+ }
+ $this->character->updateOwner();
+
+ return $next($request);
+ } else {
+ return redirect('/character/'.$check->slug);
+ }
+ });
}
/**
* Shows an MYO slot's masterlist entry.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacter($id)
- {
+ public function getCharacter($id) {
return view('character.myo.character', [
'character' => $this->character,
]);
@@ -74,11 +67,11 @@ public function getCharacter($id)
/**
* Shows an MYO slot's profile.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterProfile($id)
- {
+ public function getCharacterProfile($id) {
return view('character.profile', [
'character' => $this->character,
]);
@@ -87,16 +80,20 @@ public function getCharacterProfile($id)
/**
* Shows an MYO slot's edit profile page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditCharacterProfile($id)
- {
- if(!Auth::check()) abort(404);
+ public function getEditCharacterProfile($id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_characters');
$isOwner = ($this->character->user_id == Auth::user()->id);
- if(!$isMod && !$isOwner) abort(404);
+ if (!$isMod && !$isOwner) {
+ abort(404);
+ }
return view('character.edit_profile', [
'character' => $this->character,
@@ -106,171 +103,193 @@ public function getEditCharacterProfile($id)
/**
* Edits an MYO slot's profile.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditCharacterProfile(Request $request, CharacterManager $service, $id)
- {
- if(!Auth::check()) abort(404);
+ public function postEditCharacterProfile(Request $request, CharacterManager $service, $id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_characters');
$isOwner = ($this->character->user_id == Auth::user()->id);
- if(!$isMod && !$isOwner) abort(404);
+ if (!$isMod && !$isOwner) {
+ abort(404);
+ }
- if($service->updateCharacterProfile($request->only(['text', 'is_gift_art_allowed', 'is_trading', 'alert_user']), $this->character, Auth::user(), !$isOwner)) {
+ if ($service->updateCharacterProfile($request->only(['text', 'is_gift_art_allowed', 'is_trading', 'alert_user']), $this->character, Auth::user(), !$isOwner)) {
flash('Profile edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows an MYO slot's ownership logs.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterOwnershipLogs($id)
- {
+ public function getCharacterOwnershipLogs($id) {
return view('character.ownership_logs', [
'character' => $this->character,
- 'logs' => $this->character->getOwnershipLogs(0)
+ 'logs' => $this->character->getOwnershipLogs(0),
]);
}
/**
* Shows an MYO slot's ownership logs.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterLogs($id)
- {
+ public function getCharacterLogs($id) {
return view('character.character_logs', [
'character' => $this->character,
- 'logs' => $this->character->getCharacterLogs()
+ 'logs' => $this->character->getCharacterLogs(),
]);
}
/**
* Shows an MYO slot's submissions.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterSubmissions($id)
- {
+ public function getCharacterSubmissions($id) {
return view('character.submission_logs', [
'character' => $this->character,
- 'logs' => $this->character->getSubmissions()
+ 'logs' => $this->character->getSubmissions(),
]);
}
/**
* Shows an MYO slot's transfer page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTransfer($id)
- {
- if(!Auth::check()) abort(404);
+ public function getTransfer($id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_characters');
$isOwner = ($this->character->user_id == Auth::user()->id);
- if(!$isMod && !$isOwner) abort(404);
+ if (!$isMod && !$isOwner) {
+ abort(404);
+ }
return view('character.transfer', [
- 'character' => $this->character,
- 'transfer' => CharacterTransfer::active()->where('character_id', $this->character->id)->first(),
- 'cooldown' => Settings::get('transfer_cooldown'),
+ 'character' => $this->character,
+ 'transfer' => CharacterTransfer::active()->where('character_id', $this->character->id)->first(),
+ 'cooldown' => Settings::get('transfer_cooldown'),
'transfersQueue' => Settings::get('open_transfers_queue'),
- 'userOptions' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'userOptions' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
/**
* Opens a transfer request for an MYO slot.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postTransfer(Request $request, CharacterManager $service, $id)
- {
- if(!Auth::check()) abort(404);
+ public function postTransfer(Request $request, CharacterManager $service, $id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
- if($service->createTransfer($request->only(['recipient_id', 'user_reason']), $this->character, Auth::user())) {
+ if ($service->createTransfer($request->only(['recipient_id', 'user_reason']), $this->character, Auth::user())) {
flash('Transfer created successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Cancels a transfer request for an MYO slot.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
- * @param int $id2
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ * @param int $id2
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCancelTransfer(Request $request, CharacterManager $service, $id, $id2)
- {
- if(!Auth::check()) abort(404);
+ public function postCancelTransfer(Request $request, CharacterManager $service, $id, $id2) {
+ if (!Auth::check()) {
+ abort(404);
+ }
- if($service->cancelTransfer(['transfer_id' => $id2], Auth::user())) {
+ if ($service->cancelTransfer(['transfer_id' => $id2], Auth::user())) {
flash('Transfer cancelled.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows an MYO slot's approval page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterApproval($id)
- {
- if(!Auth::check() || $this->character->user_id != Auth::user()->id) abort(404);
+ public function getCharacterApproval($id) {
+ if (!Auth::check() || $this->character->user_id != Auth::user()->id) {
+ abort(404);
+ }
return view('character.update_form', [
'character' => $this->character,
'queueOpen' => Settings::get('is_myos_open'),
- 'request' => $this->character->designUpdate()->active()->first()
+ 'request' => $this->character->designUpdate()->active()->first(),
]);
}
/**
* Opens a new design approval request for an MYO slot.
*
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCharacterApproval(CharacterManager $service, $id)
- {
- if(!Auth::check() || $this->character->user_id != Auth::user()->id) abort(404);
+ public function postCharacterApproval(CharacterManager $service, $id) {
+ if (!Auth::check() || $this->character->user_id != Auth::user()->id) {
+ abort(404);
+ }
- if($request = $service->createDesignUpdateRequest($this->character, Auth::user())) {
+ if ($request = $service->createDesignUpdateRequest($this->character, Auth::user())) {
flash('Successfully created new MYO slot approval draft.')->success();
+
return redirect()->to($request->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Comments/CommentController.php b/app/Http/Controllers/Comments/CommentController.php
index 337eff26a7..e2091392f4 100644
--- a/app/Http/Controllers/Comments/CommentController.php
+++ b/app/Http/Controllers/Comments/CommentController.php
@@ -2,32 +2,27 @@
namespace App\Http\Controllers\Comments;
+use App\Models\Comment;
+use App\Models\Gallery\GallerySubmission;
+use App\Models\News;
+use App\Models\Report\Report;
+use App\Models\Sales\Sales;
+use App\Models\SitePage;
+use App\Models\User\User;
use Illuminate\Http\Request;
-use Settings;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Auth;
-use Spatie\Honeypot\ProtectAgainstSpam;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Validator;
-
-use App\Models\Comment;
-use App\Models\Sales\Sales;
-use App\Models\User\User;
-use App\Models\News;
-use App\Models\Gallery\GallerySubmission;
-use App\Models\Report\Report;
-use App\Models\SitePage;
-
use Notifications;
+use Settings;
+use Spatie\Honeypot\ProtectAgainstSpam;
-class CommentController extends Controller implements CommentControllerInterface
-{
- public function __construct()
- {
-
+class CommentController extends Controller implements CommentControllerInterface {
+ public function __construct() {
$this->middleware('web');
if (Config::get('comments.guest_commenting') == true) {
@@ -41,9 +36,7 @@ public function __construct()
/**
* Creates a new comment for given model.
*/
- public function store(Request $request)
- {
-
+ public function store(Request $request) {
// If guest commenting is turned off, authorize this action.
if (Config::get('comments.guest_commenting') == false) {
Gate::authorize('create-comment', Comment::class);
@@ -52,7 +45,7 @@ public function store(Request $request)
// Define guest rules if user is not logged in.
if (!Auth::check()) {
$guest_rules = [
- 'guest_name' => 'required|string|max:255',
+ 'guest_name' => 'required|string|max:255',
'guest_email' => 'required|string|email|max:255',
];
}
@@ -60,8 +53,8 @@ public function store(Request $request)
// Merge guest rules, if any, with normal validation rules.
Validator::make($request->all(), array_merge($guest_rules ?? [], [
'commentable_type' => 'required|string',
- 'commentable_id' => 'required|string|min:1',
- 'message' => 'required|string'
+ 'commentable_id' => 'required|string|min:1',
+ 'message' => 'required|string',
]))->validate();
$model = $request->commentable_type::findOrFail($request->commentable_id);
@@ -79,7 +72,7 @@ public function store(Request $request)
$comment->commentable()->associate($model);
$comment->comment = $request->message;
$comment->approved = !Config::get('comments.approval_required');
- $comment->type = isset($request['type']) && $request['type'] ? $request['type'] : "User-User";
+ $comment->type = isset($request['type']) && $request['type'] ? $request['type'] : 'User-User';
$comment->save();
$recipient = null;
@@ -89,90 +82,93 @@ public function store(Request $request)
$sender = User::find($comment->commenter_id);
$type = $comment->type;
- switch($model_type) {
+ switch ($model_type) {
case 'App\Models\User\UserProfile':
$recipient = User::find($comment->commentable_id);
$post = 'your profile';
- $link = $recipient->url . '/#comment-' . $comment->getKey();
+ $link = $recipient->url.'/#comment-'.$comment->getKey();
break;
case 'App\Models\Sales\Sales':
$sale = Sales::find($comment->commentable_id);
$recipient = $sale->user; // User that has been commented on (or owner of sale post)
$post = 'your sales post'; // Simple message to show if it's profile/sales/news
- $link = $sale->url . '/#comment-' . $comment->getKey();
+ $link = $sale->url.'/#comment-'.$comment->getKey();
break;
case 'App\Models\News':
$news = News::find($comment->commentable_id);
$recipient = $news->user; // User that has been commented on (or owner of sale post)
$post = 'your news post'; // Simple message to show if it's profile/sales/news
- $link = $news->url . '/#comment-' . $comment->getKey();
+ $link = $news->url.'/#comment-'.$comment->getKey();
break;
case 'App\Models\Report\Report':
$report = Report::find($comment->commentable_id);
$recipients = $report->user; // User that has been commented on (or owner of sale post)
$post = 'your report'; // Simple message to show if it's profile/sales/news
- $link = 'reports/view/' . $report->id . '/#comment-' . $comment->getKey();
- if($recipients == $sender) $recipient = (isset($report->staff_id) ? $report->staff : User::find(Settings::get('admin_user')));
- else $recipient = $recipients;
+ $link = 'reports/view/'.$report->id.'/#comment-'.$comment->getKey();
+ if ($recipients == $sender) {
+ $recipient = (isset($report->staff_id) ? $report->staff : User::find(Settings::get('admin_user')));
+ } else {
+ $recipient = $recipients;
+ }
break;
case 'App\Models\SitePage':
$page = SitePage::find($comment->commentable_id);
$recipient = User::find(Settings::get('admin_user'));
$post = 'your site page';
- $link = $page->url . '/#comment-' . $comment->getKey();
+ $link = $page->url.'/#comment-'.$comment->getKey();
break;
case 'App\Models\Gallery\GallerySubmission':
$submission = GallerySubmission::find($comment->commentable_id);
- if($type == 'Staff-Staff') $recipient = User::find(Settings::get('admin_user'));
- else $recipient = $submission->user;
+ if ($type == 'Staff-Staff') {
+ $recipient = User::find(Settings::get('admin_user'));
+ } else {
+ $recipient = $submission->user;
+ }
$post = (($type != 'User-User') ? 'your gallery submission\'s staff comments' : 'your gallery submission');
- $link = (($type != 'User-User') ? $submission->queueUrl . '/#comment-' . $comment->getKey() : $submission->url . '/#comment-' . $comment->getKey());
+ $link = (($type != 'User-User') ? $submission->queueUrl.'/#comment-'.$comment->getKey() : $submission->url.'/#comment-'.$comment->getKey());
break;
- }
-
+ }
- if($recipient != $sender) {
+ if ($recipient != $sender) {
Notifications::create('COMMENT_MADE', $recipient, [
'comment_url' => $link,
- 'post_type' => $post,
- 'sender' => $sender->name,
- 'sender_url' => $sender->url,
+ 'post_type' => $post,
+ 'sender' => $sender->name,
+ 'sender_url' => $sender->url,
]);
- }
- return Redirect::to(URL::previous() . '#comment-' . $comment->getKey());
+ }
+
+ return Redirect::to(URL::previous().'#comment-'.$comment->getKey());
}
/**
* Updates the message of the comment.
*/
- public function update(Request $request, Comment $comment)
- {
+ public function update(Request $request, Comment $comment) {
Gate::authorize('edit-comment', $comment);
Validator::make($request->all(), [
- 'message' => 'required|string'
+ 'message' => 'required|string',
])->validate();
$comment->update([
- 'comment' => $request->message
+ 'comment' => $request->message,
]);
- return Redirect::to(URL::previous() . '#comment-' . $comment->getKey());
+ return Redirect::to(URL::previous().'#comment-'.$comment->getKey());
}
/**
* Deletes a comment.
*/
- public function destroy(Comment $comment)
- {
+ public function destroy(Comment $comment) {
Gate::authorize('delete-comment', $comment);
if (Config::get('comments.soft_deletes') == true) {
- $comment->delete();
- }
- else {
- $comment->forceDelete();
- }
+ $comment->delete();
+ } else {
+ $comment->forceDelete();
+ }
return Redirect::back();
}
@@ -180,12 +176,11 @@ public function destroy(Comment $comment)
/**
* Creates a reply "comment" to a comment.
*/
- public function reply(Request $request, Comment $comment)
- {
+ public function reply(Request $request, Comment $comment) {
Gate::authorize('reply-to-comment', $comment);
Validator::make($request->all(), [
- 'message' => 'required|string'
+ 'message' => 'required|string',
])->validate();
$commentClass = Config::get('comments.model');
@@ -198,35 +193,36 @@ public function reply(Request $request, Comment $comment)
$reply->approved = !Config::get('comments.approval_required');
$reply->save();
- // url = url('comments/32')
+ // url = url('comments/32')
$sender = User::find($reply->commenter_id);
$recipient = User::find($comment->commenter_id);
// if($sender == $recipient)
- if($recipient != $sender) {
+ if ($recipient != $sender) {
Notifications::create('COMMENT_REPLY', $recipient, [
- 'sender_url' => $sender->url,
- 'sender' => $sender->name,
- 'comment_url' => $comment->id,
+ 'sender_url' => $sender->url,
+ 'sender' => $sender->name,
+ 'comment_url' => $comment->id,
]);
}
- return Redirect::to(URL::previous() . '#comment-' . $reply->getKey());
+ return Redirect::to(URL::previous().'#comment-'.$reply->getKey());
}
/**
- * Is featured for comments
+ * Is featured for comments.
+ *
+ * @param mixed $id
*/
public function feature($id) {
$comment = Comment::find($id);
- if($comment->is_featured == 0) {
+ if ($comment->is_featured == 0) {
$comment->update(['is_featured' => 1]);
- }
- else {
+ } else {
$comment->update(['is_featured' => 0]);
}
- return Redirect::to(URL::previous() . '#comment-' . $comment->getKey());
+ return Redirect::to(URL::previous().'#comment-'.$comment->getKey());
}
}
diff --git a/app/Http/Controllers/Comments/CommentControllerInterface.php b/app/Http/Controllers/Comments/CommentControllerInterface.php
index 9caa8bfc61..9223886b52 100644
--- a/app/Http/Controllers/Comments/CommentControllerInterface.php
+++ b/app/Http/Controllers/Comments/CommentControllerInterface.php
@@ -2,11 +2,10 @@
namespace App\Http\Controllers\Comments;
-use Illuminate\Http\Request;
use App\Models\Comment;
+use Illuminate\Http\Request;
-interface CommentControllerInterface
-{
+interface CommentControllerInterface {
/**
* Creates a new comment for given model.
*/
@@ -26,4 +25,4 @@ public function destroy(Comment $comment);
* Creates a reply "comment" to a comment.
*/
public function reply(Request $request, Comment $comment);
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php
index ab5a3b08f7..86454a9790 100644
--- a/app/Http/Controllers/Controller.php
+++ b/app/Http/Controllers/Controller.php
@@ -2,19 +2,16 @@
namespace App\Http\Controllers;
+use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
-use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
-use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
+use Illuminate\Routing\Controller as BaseController;
-class Controller extends BaseController
-{
+class Controller extends BaseController {
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
/**
* Creates a new controller instance.
- *
- * @return void
*/
public function __construct() {
}
diff --git a/app/Http/Controllers/CriterionController.php b/app/Http/Controllers/CriterionController.php
index e3089a26ad..521fe81b77 100644
--- a/app/Http/Controllers/CriterionController.php
+++ b/app/Http/Controllers/CriterionController.php
@@ -2,95 +2,106 @@
namespace App\Http\Controllers;
-use App\Http\Controllers\Controller;
use App\Models\Criteria\Criterion;
use App\Models\Gallery\GalleryCriterion;
use App\Models\Prompt\PromptCriterion;
use Illuminate\Http\Request;
-class CriterionController extends Controller
-{
-
- /**
- * returns a criterion's guide page
+class CriterionController extends Controller {
+ /**
+ * returns a criterion's guide page.
+ *
+ * @param mixed $id
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getCriterionGuide($id) {
$criterion = Criterion::where('id', $id)->first();
-
- if(!$criterion->is_guide_active) abort(404);
-
- return view('criteria.guide',[
+
+ if (!$criterion->is_guide_active) {
+ abort(404);
+ }
+
+ return view('criteria.guide', [
'criterion' => $criterion,
]);
}
-
+
/**
- * returns a criterion's form based on steps
+ * returns a criterion's form based on steps.
+ *
+ * @param mixed $id
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getCriterionFormLimited($id) {
-
- return view('criteria._minimum_requirements',[
- 'criterion' => Criterion::where('id', $id)->first(),
+ return view('criteria._minimum_requirements', [
+ 'criterion' => Criterion::where('id', $id)->first(),
'minRequirements' => null,
]);
}
-
- /**
- * returns a criterion's form based on steps
+
+ /**
+ * returns a criterion's form based on steps.
+ *
+ * @param mixed|null $entity
+ * @param mixed $id
+ * @param mixed|null $entity_id
+ * @param mixed|null $form_id
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCriterionForm($entity = null, $id, $entity_id = null, $form_id = null) {
- if($entity_id && $entity) {
- if($entity === 'prompt') {
+ public function getCriterionForm($entity, $id, $entity_id = null, $form_id = null) {
+ if ($entity_id && $entity) {
+ if ($entity === 'prompt') {
$entityCriteria = PromptCriterion::where('prompt_id', $entity_id)->where('criterion_id', $id)->first();
- } else if ($entity === 'gallery') {
+ } elseif ($entity === 'gallery') {
$entityCriteria = GalleryCriterion::where('gallery_id', $entity_id)->where('criterion_id', $id)->first();
}
}
-
- return view('criteria._minimum_requirements',[
- 'criterion' => Criterion::where('id', $id)->first(),
+
+ return view('criteria._minimum_requirements', [
+ 'criterion' => Criterion::where('id', $id)->first(),
'minRequirements' => isset($entityCriteria) ? $entityCriteria->minRequirements : null,
- 'title' => isset($entityCriteria) ? 'Criterion Options' : null,
- 'limitByMinReq' => isset($entityCriteria) ? true : null,
- 'id' => $form_id
+ 'title' => isset($entityCriteria) ? 'Criterion Options' : null,
+ 'limitByMinReq' => isset($entityCriteria) ? true : null,
+ 'id' => $form_id,
]);
}
-
- /**
- * returns a criterion dd based on entity
+
+ /**
+ * returns a criterion dd based on entity.
+ *
+ * @param mixed $entity
+ * @param mixed $id
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getCriterionSelector($entity, $id) {
- if($entity === 'prompt') {
- $entityCriteria= PromptCriterion::where('prompt_id', $id)->pluck('criterion_id')->toArray();
- } else if ($entity === 'gallery') {
+ if ($entity === 'prompt') {
+ $entityCriteria = PromptCriterion::where('prompt_id', $id)->pluck('criterion_id')->toArray();
+ } elseif ($entity === 'gallery') {
$entityCriteria = GalleryCriterion::where('gallery_id', $id)->pluck('criterion_id')->toArray();
}
-
-
+
$criteria = Criterion::whereIn('id', $entityCriteria)->pluck('name', 'id');
- return view('criteria._criterion_selector',[
+
+ return view('criteria._criterion_selector', [
'criteria' => $criteria,
]);
}
-
- /**
- * returns an amount based on a criterion id and data
+
+ /**
+ * returns an amount based on a criterion id and data.
+ *
+ * @param mixed $id
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
public function postCriterionRewards($id, Request $request) {
$stepData = $request->except('_token');
$criterion = Criterion::where('id', $id)->first();
-
+
return $criterion->currency->display($criterion->calculateReward($stepData));
}
}
diff --git a/app/Http/Controllers/GalleryController.php b/app/Http/Controllers/GalleryController.php
index 704af05b01..0ccab8504f 100644
--- a/app/Http/Controllers/GalleryController.php
+++ b/app/Http/Controllers/GalleryController.php
@@ -1,24 +1,22 @@
-visible()->sort()->get());
}
@@ -44,38 +39,41 @@ public function __construct()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getGalleryIndex()
- {
+ public function getGalleryIndex() {
return view('galleries.index', [
- 'galleries' => Gallery::sort()->active()->whereNull('parent_id')->paginate(10),
+ 'galleries' => Gallery::sort()->active()->whereNull('parent_id')->paginate(10),
'galleryPage' => false,
- 'sideGallery' => null
+ 'sideGallery' => null,
]);
}
/**
* Shows a given gallery.
*
- * @param int $id
- * @param \Illuminate\Http\Request $request
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getGallery($id, Request $request)
- {
+ public function getGallery($id, Request $request) {
$gallery = Gallery::visible()->where('id', $id)->first();
- if(!$gallery) abort(404);
+ if (!$gallery) {
+ abort(404);
+ }
$query = GallerySubmission::where('gallery_id', $gallery->id)->visible(Auth::check() ? Auth::user() : null)->accepted();
$sort = $request->only(['sort']);
- if($request->get('title')) $query->where(function($query) use ($request) {
- $query->where('gallery_submissions.title', 'LIKE', '%' . $request->get('title') . '%');
- });
- if($request->get('prompt_id')) $query->where('prompt_id', $request->get('prompt_id'));
+ if ($request->get('title')) {
+ $query->where(function ($query) use ($request) {
+ $query->where('gallery_submissions.title', 'LIKE', '%'.$request->get('title').'%');
+ });
+ }
+ if ($request->get('prompt_id')) {
+ $query->where('prompt_id', $request->get('prompt_id'));
+ }
- if(isset($sort['sort']))
- {
- switch($sort['sort']) {
+ if (isset($sort['sort'])) {
+ switch ($sort['sort']) {
case 'alpha':
$query->orderBy('title');
break;
@@ -95,55 +93,63 @@ public function getGallery($id, Request $request)
$query->orderBy('created_at', 'ASC');
break;
}
+ } else {
+ $query->orderBy('created_at', 'DESC');
}
- else $query->orderBy('created_at', 'DESC');
return view('galleries.gallery', [
- 'gallery' => $gallery,
- 'submissions' => $query->paginate(20)->appends($request->query()),
- 'prompts' => [0 => 'Any Prompt'] + Prompt::whereIn('id', GallerySubmission::where('gallery_id', $gallery->id)->visible(Auth::check() ? Auth::user() : null)->accepted()->whereNotNull('prompt_id')->pluck('prompt_id')->toArray())->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'gallery' => $gallery,
+ 'submissions' => $query->paginate(20)->appends($request->query()),
+ 'prompts' => [0 => 'Any Prompt'] + Prompt::whereIn('id', GallerySubmission::where('gallery_id', $gallery->id)->visible(Auth::check() ? Auth::user() : null)->accepted()->whereNotNull('prompt_id')->pluck('prompt_id')->toArray())->orderBy('name')->pluck('name', 'id')->toArray(),
'childSubmissions' => GallerySubmission::whereIn('gallery_id', $gallery->children->pluck('id')->toArray())->where('is_visible', 1)->where('status', 'Accepted'),
- 'galleryPage' => true,
- 'sideGallery' => $gallery
+ 'galleryPage' => true,
+ 'sideGallery' => $gallery,
]);
}
/**
* Shows a given submission.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubmission($id)
- {
+ public function getSubmission($id) {
$submission = GallerySubmission::find($id);
- if(!$submission) abort(404);
+ if (!$submission) {
+ abort(404);
+ }
- if(!$submission->isVisible) {
- if(!Auth::check()) abort(404);
+ if (!$submission->isVisible) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_submissions');
$isOwner = ($submission->user_id == Auth::user()->id);
$isCollaborator = $submission->collaborators->where('user_id', Auth::user()->id)->first() != null;
- if(!$isMod && (!$isOwner && !$isCollaborator)) abort(404);
+ if (!$isMod && (!$isOwner && !$isCollaborator)) {
+ abort(404);
+ }
}
return view('galleries.submission', [
- 'submission' => $submission,
+ 'submission' => $submission,
'commentCount' => Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'User-User')->count(),
- 'galleryPage' => true,
- 'sideGallery' => $submission->gallery
+ 'galleryPage' => true,
+ 'sideGallery' => $submission->gallery,
]);
}
/**
* Gets the submission favorites list modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubmissionFavorites($id)
- {
+ public function getSubmissionFavorites($id) {
$submission = GallerySubmission::find($id);
+
return view('galleries._submission_favorites', [
'submission' => $submission,
]);
@@ -152,64 +158,73 @@ public function getSubmissionFavorites($id)
/**
* Shows a given submission's detailed queue log.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubmissionLog($id)
- {
+ public function getSubmissionLog($id) {
$submission = GallerySubmission::find($id);
- if(!$submission) abort(404);
+ if (!$submission) {
+ abort(404);
+ }
- if(!Auth::check()) abort(404);
+ if (!Auth::check()) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_submissions');
$isOwner = ($submission->user_id == Auth::user()->id);
$isCollaborator = $submission->collaborators->where('user_id', Auth::user()->id)->first() != null ? true : false;
- if(!$isMod && !$isOwner && !$isCollaborator) abort(404);
-
+ if (!$isMod && !$isOwner && !$isCollaborator) {
+ abort(404);
+ }
+
$totals = [];
- if(isset($submission->data['criterion'])) {
- foreach($submission->data['criterion'] as $key => $criterionData) {
+ if (isset($submission->data['criterion'])) {
+ foreach ($submission->data['criterion'] as $key => $criterionData) {
$criterion = Criterion::where('id', $criterionData['id'])->first();
$totals[$key] = [
- 'value' => $criterion->calculateReward($criterionData),
- 'name' => $criterion->name,
- 'currency' => $criterion->currency
+ 'value' => $criterion->calculateReward($criterionData),
+ 'name' => $criterion->name,
+ 'currency' => $criterion->currency,
];
}
}
return view('galleries.submission_log', [
- 'submission' => $submission,
- 'galleryPage' => true,
- 'sideGallery' => $submission->gallery,
- 'totals' => $totals,
+ 'submission' => $submission,
+ 'galleryPage' => true,
+ 'sideGallery' => $submission->gallery,
+ 'totals' => $totals,
'collaboratorsCount' => $submission->collaborators->count() + ($submission->collaborators->where('user_id', $submission->user_id)->first() === null ? 1 : 0),
]);
}
-
+
/**
* Gets updated totals for a given submission.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
public function postSubmissionTotals(Request $request, $id) {
$submission = GallerySubmission::find($id);
- if(!$submission) abort(404);
-
+ if (!$submission) {
+ abort(404);
+ }
+
$totals = [];
$data = $request->only(['criterion']);
- foreach($data['criterion'] as $key => $criterionData) {
+ foreach ($data['criterion'] as $key => $criterionData) {
$criterion = Criterion::where('id', $criterionData['id'])->first();
$totals[$key] = [
- 'value' => $criterion->calculateReward($criterionData),
- 'name' => $criterion->name,
- 'currency' => $criterion->currency
+ 'value' => $criterion->calculateReward($criterionData),
+ 'name' => $criterion->name,
+ 'currency' => $criterion->currency,
];
- }
-
+ }
+
return view('galleries._submission_totals', [
- 'totals' => $totals,
+ 'totals' => $totals,
'collaboratorsCount' => $submission->collaborators->count() + ($submission->collaborators->where('user_id', $submission->user_id)->first() === null ? 1 : 0),
]);
}
@@ -217,88 +232,100 @@ public function postSubmissionTotals(Request $request, $id) {
/**
* Shows the user's gallery submission log.
*
- * @param \Illuminate\Http\Request $request
+ * @param mixed $type
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserSubmissions(Request $request, $type)
- {
+ public function getUserSubmissions(Request $request, $type) {
$submissions = GallerySubmission::userSubmissions(Auth::user());
- if(!$type) $type = 'Pending';
+ if (!$type) {
+ $type = 'Pending';
+ }
$submissions = $submissions->where('status', ucfirst($type));
return view('galleries.submissions', [
'submissions' => $submissions->orderBy('id', 'DESC')->paginate(10),
- 'galleries' => Gallery::sort()->whereNull('parent_id')->paginate(10),
+ 'galleries' => Gallery::sort()->whereNull('parent_id')->paginate(10),
'galleryPage' => false,
- 'sideGallery' => null
+ 'sideGallery' => null,
]);
}
/**
* Shows the submit page.
*
- * @param \Illuminate\Http\Request $request
+ * @param mixed $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getNewGallerySubmission(Request $request, $id)
- {
- if(!Auth::check()) abort(404);
+ public function getNewGallerySubmission(Request $request, $id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$gallery = Gallery::find($id);
$closed = !Settings::get('gallery_submissions_open');
$galleryCriteria = GalleryCriterion::where('gallery_id', $id)->pluck('criterion_id')->toArray();
+
return view('galleries.create_edit_submission', [
'closed' => $closed,
] + ($closed ? [] : [
- 'gallery' => $gallery,
- 'submission' => new GallerySubmission,
- 'prompts' => Prompt::active()->sortAlphabetical()->pluck('name', 'id')->toArray(),
- 'users' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'gallery' => $gallery,
+ 'submission' => new GallerySubmission,
+ 'prompts' => Prompt::active()->sortAlphabetical()->pluck('name', 'id')->toArray(),
+ 'users' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
'galleryPage' => true,
'sideGallery' => $gallery,
- 'criteria' => Criterion::active()->whereIn('id', $galleryCriteria)->orderBy('name')->pluck('name', 'id'),
+ 'criteria' => Criterion::active()->whereIn('id', $galleryCriteria)->orderBy('name')->pluck('name', 'id'),
]));
}
/**
* Shows the edit submission page.
*
- * @param integer $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditGallerySubmission($id)
- {
- if(!Auth::check()) abort(404);
+ public function getEditGallerySubmission($id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$submission = GallerySubmission::find($id);
- if(!$submission) abort(404);
+ if (!$submission) {
+ abort(404);
+ }
$isMod = Auth::user()->hasPower('manage_submissions');
$isOwner = ($submission->user_id == Auth::user()->id);
- if(!$isMod && !$isOwner) abort(404);
+ if (!$isMod && !$isOwner) {
+ abort(404);
+ }
// Show inactive prompts in the event of being edited by an admin after acceptance
$prompts = Auth::user()->hasPower('manage_submissions') && $submission->status == 'Pending' ? Prompt::query() : Prompt::active();
$galleryCriteria = GalleryCriterion::where('gallery_id', $id)->pluck('criterion_id')->toArray();
+
return view('galleries.create_edit_submission', [
- 'closed' => false,
- 'gallery' => $submission->gallery,
+ 'closed' => false,
+ 'gallery' => $submission->gallery,
'galleryOptions' => Gallery::orderBy('name')->pluck('name', 'id')->toArray(),
- 'prompts' => $prompts->sortAlphabetical()->pluck('name', 'id')->toArray(),
- 'submission' => $submission,
- 'users' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
- 'galleryPage' => true,
- 'sideGallery' => $submission->gallery,
- 'criteria' => Criterion::active()->whereIn('id', $galleryCriteria)->orderBy('name')->pluck('name', 'id'),
+ 'prompts' => $prompts->sortAlphabetical()->pluck('name', 'id')->toArray(),
+ 'submission' => $submission,
+ 'users' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'galleryPage' => true,
+ 'sideGallery' => $submission->gallery,
+ 'criteria' => Criterion::active()->whereIn('id', $galleryCriteria)->orderBy('name')->pluck('name', 'id'),
]);
}
/**
* Shows character information.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterInfo($slug)
- {
+ public function getCharacterInfo($slug) {
$character = Character::visible()->where('slug', $slug)->first();
return view('galleries._character', [
@@ -309,12 +336,13 @@ public function getCharacterInfo($slug)
/**
* Gets the submission archival modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getArchiveSubmission($id)
- {
+ public function getArchiveSubmission($id) {
$submission = GallerySubmission::find($id);
+
return view('galleries._archive_submission', [
'submission' => $submission,
]);
@@ -323,85 +351,94 @@ public function getArchiveSubmission($id)
/**
* Creates or edits a new gallery submission.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryManager $service
+ * @param App\Services\GalleryManager $service
+ * @param mixed|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditGallerySubmission(Request $request, GalleryManager $service, $id = null)
- {
+ public function postCreateEditGallerySubmission(Request $request, GalleryManager $service, $id = null) {
$id ? $request->validate(GallerySubmission::$updateRules) : $request->validate(GallerySubmission::$createRules);
$data = $request->only(['image', 'text', 'title', 'description', 'slug', 'collaborator_id', 'collaborator_data', 'participant_id', 'participant_type', 'gallery_id', 'alert_user', 'prompt_id', 'content_warning']);
- if(!$id) $currencyFormData = $request->only(['criterion']);
- else $currencyFormData = null;
+ if (!$id) {
+ $currencyFormData = $request->only(['criterion']);
+ } else {
+ $currencyFormData = null;
+ }
- if($id && $service->updateSubmission(GallerySubmission::find($id), $data, Auth::user())) {
+ if ($id && $service->updateSubmission(GallerySubmission::find($id), $data, Auth::user())) {
flash('Submission updated successfully.')->success();
- }
- else if (!$id && $gallery = $service->createSubmission($data, $currencyFormData, Auth::user())) {
+ } elseif (!$id && $gallery = $service->createSubmission($data, $currencyFormData, Auth::user())) {
flash('Submission created successfully.')->success();
+
return redirect()->to('gallery/submissions/pending');
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Archives a submission.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryManager $service
- * @param int $id
+ * @param App\Services\GalleryManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postArchiveSubmission(Request $request, GalleryManager $service, $id)
- {
- if($id && $service->archiveSubmission(GallerySubmission::find($id), Auth::user())) {
+ public function postArchiveSubmission(Request $request, GalleryManager $service, $id) {
+ if ($id && $service->archiveSubmission(GallerySubmission::find($id), Auth::user())) {
flash('Submission updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Edits/approves collaborator contributions to a submission.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryManager $service
+ * @param App\Services\GalleryManager $service
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditCollaborator(Request $request, GalleryManager $service, $id)
- {
+ public function postEditCollaborator(Request $request, GalleryManager $service, $id) {
$data = $request->only(['collaborator_data', 'remove_user']);
- if($service->editCollaborator(GallerySubmission::find($id), $data, Auth::user())) {
+ if ($service->editCollaborator(GallerySubmission::find($id), $data, Auth::user())) {
flash('Collaborator info edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Favorites/unfavorites a gallery submission.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\GalleryManager $service
+ * @param App\Services\GalleryManager $service
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postFavoriteSubmission(Request $request, GalleryManager $service, $id)
- {
- if($service->favoriteSubmission(GallerySubmission::find($id), Auth::user())) {
+ public function postFavoriteSubmission(Request $request, GalleryManager $service, $id) {
+ if ($service->favoriteSubmission(GallerySubmission::find($id), Auth::user())) {
flash('Favorite updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
}
diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index 27b613141b..04e69693a3 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -12,8 +12,7 @@
use Illuminate\Http\Request;
use Laravel\Socialite\Facades\Socialite;
-class HomeController extends Controller
-{
+class HomeController extends Controller {
/*
|--------------------------------------------------------------------------
| Home Controller
@@ -28,8 +27,7 @@ class HomeController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('welcome', [
'about' => SitePage::where('key', 'about')->first(),
]);
@@ -40,8 +38,7 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getLink(Request $request)
- {
+ public function getLink(Request $request) {
// If the user already has a username associated with their account, redirect them
if (Auth::check() && Auth::user()->hasAlias) {
redirect()->to('home');
@@ -56,8 +53,7 @@ public function getLink(Request $request)
*
* @param string $provider
*/
- public function getAuthRedirect(LinkService $service, $provider)
- {
+ public function getAuthRedirect(LinkService $service, $provider) {
if (!$this->checkProvider($provider, Auth::user())) {
flash($this->error)->error();
@@ -73,8 +69,7 @@ public function getAuthRedirect(LinkService $service, $provider)
*
* @param string $provider
*/
- public function getAuthCallback(LinkService $service, $provider)
- {
+ public function getAuthCallback(LinkService $service, $provider) {
if (!$this->checkProvider($provider, Auth::user())) {
flash($this->error)->error();
@@ -106,8 +101,7 @@ public function getAuthCallback(LinkService $service, $provider)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getBirthday(Request $request)
- {
+ public function getBirthday(Request $request) {
// If the user already has a username associated with their account, redirect them
if (Auth::check() && Auth::user()->birthday) {
return redirect()->to('/');
@@ -122,8 +116,7 @@ public function getBirthday(Request $request)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function postBirthday(Request $request)
- {
+ public function postBirthday(Request $request) {
$service = new UserService;
// Make birthday into format we can store
$data = $request->input('dob');
@@ -148,8 +141,7 @@ public function postBirthday(Request $request)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getBirthdayBlocked(Request $request)
- {
+ public function getBirthdayBlocked(Request $request) {
// If the user already has a username associated with their account, redirect them
if (Auth::check() && Auth::user()->checkBirthday) {
return redirect()->to('/');
@@ -163,8 +155,7 @@ public function getBirthdayBlocked(Request $request)
return view('auth.blocked');
}
- private function checkProvider($provider, $user)
- {
+ private function checkProvider($provider, $user) {
// Check if the site can be used for authentication
$isAllowed = false;
foreach (Config::get('lorekeeper.sites') as $key => $site) {
diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php
index e5e2945d05..c34debd23d 100644
--- a/app/Http/Controllers/NewsController.php
+++ b/app/Http/Controllers/NewsController.php
@@ -2,15 +2,10 @@
namespace App\Http\Controllers;
-use Auth;
-
-use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
use App\Models\News;
+use Auth;
-class NewsController extends Controller
-{
+class NewsController extends Controller {
/*
|--------------------------------------------------------------------------
| News Controller
@@ -25,23 +20,28 @@ class NewsController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
- if(Auth::check() && Auth::user()->is_news_unread) Auth::user()->update(['is_news_unread' => 0]);
+ public function getIndex() {
+ if (Auth::check() && Auth::user()->is_news_unread) {
+ Auth::user()->update(['is_news_unread' => 0]);
+ }
+
return view('news.index', ['newses' => News::visible()->orderBy('updated_at', 'DESC')->paginate(10)]);
}
-
+
/**
* Shows a news post.
*
- * @param int $id
- * @param string|null $slug
+ * @param int $id
+ * @param string|null $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getNews($id, $slug = null)
- {
+ public function getNews($id, $slug = null) {
$news = News::where('id', $id)->where('is_visible', 1)->first();
- if(!$news) abort(404);
+ if (!$news) {
+ abort(404);
+ }
+
return view('news.news', ['news' => $news]);
}
}
diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php
index 720938c307..5ad46bcc3c 100644
--- a/app/Http/Controllers/PageController.php
+++ b/app/Http/Controllers/PageController.php
@@ -2,16 +2,10 @@
namespace App\Http\Controllers;
-use Auth;
-use DB;
-
-use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
use App\Models\SitePage;
+use DB;
-class PageController extends Controller
-{
+class PageController extends Controller {
/*
|--------------------------------------------------------------------------
| Page Controller
@@ -24,28 +18,28 @@ class PageController extends Controller
/**
* Shows the page with the given key.
*
- * @param string $key
+ * @param string $key
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPage($key)
- {
+ public function getPage($key) {
$page = SitePage::where('key', $key)->where('is_visible', 1)->first();
- if(!$page) abort(404);
+ if (!$page) {
+ abort(404);
+ }
+
return view('pages.page', ['page' => $page]);
}
-
/**
* Shows the credits page.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreditsPage()
- {
+ public function getCreditsPage() {
return view('pages.credits', [
- 'credits' => SitePage::where('key', 'credits')->first(),
- 'extensions' => DB::table('site_extensions')->get()
+ 'credits' => SitePage::where('key', 'credits')->first(),
+ 'extensions' => DB::table('site_extensions')->get(),
]);
}
-
}
diff --git a/app/Http/Controllers/PermalinkController.php b/app/Http/Controllers/PermalinkController.php
index 6d1a2f2100..aef2486dbd 100644
--- a/app/Http/Controllers/PermalinkController.php
+++ b/app/Http/Controllers/PermalinkController.php
@@ -2,56 +2,64 @@
namespace App\Http\Controllers;
-use Auth;
-use DB;
-
-use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-use App\Models\User\User;
-use App\Models\Gallery\GallerySubmission;
-use App\Models\Model;
-
use App\Models\Comment;
+use App\Models\Gallery\GallerySubmission;
+use Auth;
-class PermalinkController extends Controller
-{
- /**
- * returns replies recursively
+class PermalinkController extends Controller {
+ /**
+ * returns replies recursively.
+ *
+ * @param mixed $id
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getComment($id) {
-
+ public function getComment($id) {
$comments = Comment::all();
//$comments = $comments->sortByDesc('created_at');
$comment = $comments->find($id);
-
- if(!$comment) abort(404);
- if(!$comment->commentable) abort(404);
+
+ if (!$comment) {
+ abort(404);
+ }
+ if (!$comment->commentable) {
+ abort(404);
+ }
// Check if the comment can be viewed
- switch($comment->type) {
- case "Staff-User":
- if(!Auth::check()) abort(404);
+ switch ($comment->type) {
+ case 'Staff-User':
+ if (!Auth::check()) {
+ abort(404);
+ }
$submission = GallerySubmission::find($comment->commentable_id);
$isMod = Auth::user()->hasPower('manage_submissions');
$isOwner = ($submission->user_id == Auth::user()->id);
$isCollaborator = $submission->collaborators->where('user_id', Auth::user()->id)->first() != null ? true : false;
- if(!$isMod && !$isOwner && !$isCollaborator) abort(404);
+ if (!$isMod && !$isOwner && !$isCollaborator) {
+ abort(404);
+ }
break;
- case "Staff-Staff":
- if(!Auth::check()) abort(404);
- if(!Auth::user()->hasPower('manage_submissions')) abort(404);
+ case 'Staff-Staff':
+ if (!Auth::check()) {
+ abort(404);
+ }
+ if (!Auth::user()->hasPower('manage_submissions')) {
+ abort(404);
+ }
break;
default:
break;
}
- if($comment->commentable_type == 'App\Models\User\UserProfile') $comment->location = $comment->commentable->user->url;
- else $comment->location = $comment->commentable->url;
-
- return view('comments._perma_layout',[
- 'comment' => $comment,
+ if ($comment->commentable_type == 'App\Models\User\UserProfile') {
+ $comment->location = $comment->commentable->user->url;
+ } else {
+ $comment->location = $comment->commentable->url;
+ }
+
+ return view('comments._perma_layout', [
+ 'comment' => $comment,
]);
}
}
diff --git a/app/Http/Controllers/PromptsController.php b/app/Http/Controllers/PromptsController.php
index 530c24d6cd..8c90f90d32 100644
--- a/app/Http/Controllers/PromptsController.php
+++ b/app/Http/Controllers/PromptsController.php
@@ -2,16 +2,11 @@
namespace App\Http\Controllers;
-use Illuminate\Http\Request;
-
-use App\Models\Currency\Currency;
-use App\Models\Item\ItemCategory;
-use App\Models\Item\Item;
-use App\Models\Prompt\PromptCategory;
use App\Models\Prompt\Prompt;
+use App\Models\Prompt\PromptCategory;
+use Illuminate\Http\Request;
-class PromptsController extends Controller
-{
+class PromptsController extends Controller {
/*
|--------------------------------------------------------------------------
| Prompts Controller
@@ -27,23 +22,23 @@ class PromptsController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('prompts.index');
}
/**
* Shows the prompt categories page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPromptCategories(Request $request)
- {
+ public function getPromptCategories(Request $request) {
$query = PromptCategory::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%');
- return view('prompts.prompt_categories', [
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%');
+ }
+
+ return view('prompts.prompt_categories', [
'categories' => $query->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
}
@@ -51,21 +46,20 @@ public function getPromptCategories(Request $request)
/**
* Shows the prompts page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPrompts(Request $request)
- {
+ public function getPrompts(Request $request) {
$query = Prompt::active()->with('category');
$data = $request->only(['prompt_category_id', 'name', 'sort']);
- if(isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none')
+ if (isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none') {
$query->where('prompt_category_id', $data['prompt_category_id']);
- if(isset($data['name']))
+ }
+ if (isset($data['name'])) {
$query->where('name', 'LIKE', '%'.$data['name'].'%');
+ }
- if(isset($data['sort']))
- {
- switch($data['sort']) {
+ if (isset($data['sort'])) {
+ switch ($data['sort']) {
case 'alpha':
$query->sortAlphabetical();
break;
@@ -94,12 +88,13 @@ public function getPrompts(Request $request)
$query->sortEnd(true);
break;
}
- }
- else $query->sortCategory();
+ } else {
+ $query->sortCategory();
+ }
return view('prompts.prompts', [
- 'prompts' => $query->paginate(20)->appends($request->query()),
- 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'prompts' => $query->paginate(20)->appends($request->query()),
+ 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
}
diff --git a/app/Http/Controllers/RaffleController.php b/app/Http/Controllers/RaffleController.php
index 048334e398..cca67f8151 100644
--- a/app/Http/Controllers/RaffleController.php
+++ b/app/Http/Controllers/RaffleController.php
@@ -1,13 +1,13 @@
-where('is_active', 2);
- else $raffles->where('is_active', '=', 1);
+ if (Request::get('view') == 'completed') {
+ $raffles->where('is_active', 2);
+ } else {
+ $raffles->where('is_active', '=', 1);
+ }
$raffles = $raffles->orderBy('group_id')->orderBy('order');
return view('raffles.index', [
'raffles' => $raffles->get(),
- 'groups' => RaffleGroup::whereIn('id', $raffles->pluck('group_id')->toArray())->get()->keyBy('id')
+ 'groups' => RaffleGroup::whereIn('id', $raffles->pluck('group_id')->toArray())->get()->keyBy('id'),
]);
}
/**
* Shows tickets for a given raffle.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getRaffleTickets($id)
- {
+ public function getRaffleTickets($id) {
$raffle = Raffle::find($id);
- if(!$raffle || !$raffle->is_active) abort(404);
+ if (!$raffle || !$raffle->is_active) {
+ abort(404);
+ }
$userCount = Auth::check() ? $raffle->tickets()->where('user_id', Auth::user()->id)->count() : 0;
$count = $raffle->tickets()->count();
return view('raffles.ticket_index', [
- 'raffle' => $raffle,
- 'tickets' => $raffle->tickets()->with('user')->orderBy('id')->paginate(100),
- 'count' => $count,
- 'userCount' => $userCount,
- "page" => Request::get('page') ? Request::get('page') - 1 : 0
+ 'raffle' => $raffle,
+ 'tickets' => $raffle->tickets()->with('user')->orderBy('id')->paginate(100),
+ 'count' => $count,
+ 'userCount' => $userCount,
+ 'page' => Request::get('page') ? Request::get('page') - 1 : 0,
]);
}
}
diff --git a/app/Http/Controllers/SalesController.php b/app/Http/Controllers/SalesController.php
index 02cfa47e75..ab13937879 100644
--- a/app/Http/Controllers/SalesController.php
+++ b/app/Http/Controllers/SalesController.php
@@ -2,15 +2,10 @@
namespace App\Http\Controllers;
-use Auth;
-
-use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
use App\Models\Sales\Sales;
+use Auth;
-class SalesController extends Controller
-{
+class SalesController extends Controller {
/*
|--------------------------------------------------------------------------
| sales Controller
@@ -25,23 +20,28 @@ class SalesController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
- if(Auth::check() && Auth::user()->is_sales_unread) Auth::user()->update(['is_sales_unread' => 0]);
+ public function getIndex() {
+ if (Auth::check() && Auth::user()->is_sales_unread) {
+ Auth::user()->update(['is_sales_unread' => 0]);
+ }
+
return view('sales.index', ['saleses' => Sales::visible()->orderBy('id', 'DESC')->paginate(10)]);
}
/**
* Shows a sales post.
*
- * @param int $id
- * @param string|null $slug
+ * @param int $id
+ * @param string|null $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSales($id, $slug = null)
- {
+ public function getSales($id, $slug = null) {
$sales = Sales::where('id', $id)->where('is_visible', 1)->first();
- if(!$sales) abort(404);
+ if (!$sales) {
+ abort(404);
+ }
+
return view('sales.sales', ['sales' => $sales]);
}
}
diff --git a/app/Http/Controllers/ShopController.php b/app/Http/Controllers/ShopController.php
index d37c40fb9c..dd4e5f55ff 100644
--- a/app/Http/Controllers/ShopController.php
+++ b/app/Http/Controllers/ShopController.php
@@ -2,23 +2,18 @@
namespace App\Http\Controllers;
-use Auth;
-
-use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-use App\Services\ShopManager;
-
-use App\Models\Shop\Shop;
-use App\Models\Shop\ShopStock;
-use App\Models\Shop\ShopLog;
-use App\Models\Item\Item;
use App\Models\Currency\Currency;
+use App\Models\Item\Item;
use App\Models\Item\ItemCategory;
+use App\Models\Shop\Shop;
+use App\Models\Shop\ShopLog;
+use App\Models\Shop\ShopStock;
use App\Models\User\UserItem;
+use App\Services\ShopManager;
+use Auth;
+use Illuminate\Http\Request;
-class ShopController extends Controller
-{
+class ShopController extends Controller {
/*
|--------------------------------------------------------------------------
| Shop Controller
@@ -33,83 +28,91 @@ class ShopController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('shops.index', [
- 'shops' => Shop::where('is_active', 1)->orderBy('sort', 'DESC')->get()
- ]);
+ 'shops' => Shop::where('is_active', 1)->orderBy('sort', 'DESC')->get(),
+ ]);
}
/**
* Shows a shop.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getShop($id)
- {
+ public function getShop($id) {
$categories = ItemCategory::orderBy('sort', 'DESC')->get();
$shop = Shop::where('id', $id)->where('is_active', 1)->first();
- if(!$shop) abort(404);
+ if (!$shop) {
+ abort(404);
+ }
$items = count($categories) ? $shop->displayStock()->orderByRaw('FIELD(item_category_id,'.implode(',', $categories->pluck('id')->toArray()).')')->orderBy('name')->get()->groupBy('item_category_id') : $shop->displayStock()->orderBy('name')->get()->groupBy('item_category_id');
+
return view('shops.shop', [
- 'shop' => $shop,
+ 'shop' => $shop,
'categories' => $categories->keyBy('id'),
- 'items' => $items,
- 'shops' => Shop::where('is_active', 1)->orderBy('sort', 'DESC')->get(),
- 'currencies' => Currency::whereIn('id', ShopStock::where('shop_id', $shop->id)->pluck('currency_id')->toArray())->get()->keyBy('id')
+ 'items' => $items,
+ 'shops' => Shop::where('is_active', 1)->orderBy('sort', 'DESC')->get(),
+ 'currencies' => Currency::whereIn('id', ShopStock::where('shop_id', $shop->id)->pluck('currency_id')->toArray())->get()->keyBy('id'),
]);
}
/**
* Gets the shop stock modal.
*
- * @param App\Services\ShopManager $service
- * @param int $id
- * @param int $stockId
+ * @param App\Services\ShopManager $service
+ * @param int $id
+ * @param int $stockId
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getShopStock(ShopManager $service, $id, $stockId)
- {
+ public function getShopStock(ShopManager $service, $id, $stockId) {
$shop = Shop::where('id', $id)->where('is_active', 1)->first();
$stock = ShopStock::with('item')->where('id', $stockId)->where('shop_id', $id)->first();
$user = Auth::user();
- $quantityLimit = 0; $userPurchaseCount = 0; $purchaseLimitReached = false;
- if($user){
+ $quantityLimit = 0;
+ $userPurchaseCount = 0;
+ $purchaseLimitReached = false;
+ if ($user) {
$quantityLimit = $service->getStockPurchaseLimit($stock, Auth::user());
$userPurchaseCount = $service->checkUserPurchases($stock, Auth::user());
$purchaseLimitReached = $service->checkPurchaseLimitReached($stock, Auth::user());
$userOwned = UserItem::where('user_id', $user->id)->where('item_id', $stock->item->id)->where('count', '>', 0)->get();
}
- if(!$shop) abort(404);
+ if (!$shop) {
+ abort(404);
+ }
+
return view('shops._stock_modal', [
- 'shop' => $shop,
- 'stock' => $stock,
- 'quantityLimit' => $quantityLimit,
- 'userPurchaseCount' => $userPurchaseCount,
+ 'shop' => $shop,
+ 'stock' => $stock,
+ 'quantityLimit' => $quantityLimit,
+ 'userPurchaseCount' => $userPurchaseCount,
'purchaseLimitReached' => $purchaseLimitReached,
- 'userOwned' => $user ? $userOwned : null
- ]);
+ 'userOwned' => $user ? $userOwned : null,
+ ]);
}
/**
* Buys an item from a shop.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ShopManager $service
+ * @param App\Services\ShopManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postBuy(Request $request, ShopManager $service)
- {
+ public function postBuy(Request $request, ShopManager $service) {
$request->validate(ShopLog::$createRules);
- if($service->buyStock($request->only(['stock_id', 'shop_id', 'slug', 'bank', 'quantity']), Auth::user())) {
+ if ($service->buyStock($request->only(['stock_id', 'shop_id', 'slug', 'bank', 'quantity']), Auth::user())) {
flash('Successfully purchased item.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
@@ -118,13 +121,10 @@ public function postBuy(Request $request, ShopManager $service)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPurchaseHistory()
- {
+ public function getPurchaseHistory() {
return view('shops.purchase_history', [
- 'logs' => Auth::user()->getShopLogs(0),
+ 'logs' => Auth::user()->getShopLogs(0),
'shops' => Shop::where('is_active', 1)->orderBy('sort', 'DESC')->get(),
]);
}
}
-
-
diff --git a/app/Http/Controllers/Users/AccountController.php b/app/Http/Controllers/Users/AccountController.php
index 8a3175e816..6a70bff185 100644
--- a/app/Http/Controllers/Users/AccountController.php
+++ b/app/Http/Controllers/Users/AccountController.php
@@ -2,24 +2,16 @@
namespace App\Http\Controllers\Users;
-use Auth;
-use File;
-use Image;
-
+use App\Http\Controllers\Controller;
+use App\Models\Notification;
use App\Models\User\User;
use App\Models\User\UserAlias;
-
-use Illuminate\Http\Request;
-use Illuminate\Support\Facades\Storage;
-use App\Models\Notification;
-
-use App\Services\UserService;
use App\Services\LinkService;
+use App\Services\UserService;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class AccountController extends Controller
-{
+class AccountController extends Controller {
/*
|--------------------------------------------------------------------------
| Account Controller
@@ -34,12 +26,12 @@ class AccountController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable|\Illuminate\Http\RedirectResponse
*/
- public function getBanned()
- {
- if(Auth::user()->is_banned)
+ public function getBanned() {
+ if (Auth::user()->is_banned) {
return view('account.banned');
- else
+ } else {
return redirect()->to('/');
+ }
}
/**
@@ -47,102 +39,103 @@ public function getBanned()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSettings()
- {
+ public function getSettings() {
return view('account.settings');
}
-
+
/**
* Edits the user's profile.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse
*/
- public function postProfile(Request $request)
- {
+ public function postProfile(Request $request) {
Auth::user()->profile->update([
- 'text' => $request->get('text'),
- 'parsed_text' => parse($request->get('text'))
+ 'text' => $request->get('text'),
+ 'parsed_text' => parse($request->get('text')),
]);
flash('Profile updated successfully.')->success();
+
return redirect()->back();
}
/**
* Edits the user's avatar.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse
*/
- public function postAvatar(Request $request, UserService $service)
- {
- if($service->updateAvatar($request->file('avatar'), Auth::user())) {
+ public function postAvatar(Request $request, UserService $service) {
+ if ($service->updateAvatar($request->file('avatar'), Auth::user())) {
flash('Avatar updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Changes the user's password.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\UserService $service
+ * @param App\Services\UserService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postPassword(Request $request, UserService $service)
- {
- $request->validate( [
+ public function postPassword(Request $request, UserService $service) {
+ $request->validate([
'old_password' => 'required|string',
- 'new_password' => 'required|string|min:8|confirmed'
+ 'new_password' => 'required|string|min:8|confirmed',
]);
- if($service->updatePassword($request->only(['old_password', 'new_password', 'new_password_confirmation']), Auth::user())) {
+ if ($service->updatePassword($request->only(['old_password', 'new_password', 'new_password_confirmation']), Auth::user())) {
flash('Password updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Changes the user's email address and sends a verification email.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\UserService $service
+ * @param App\Services\UserService $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEmail(Request $request, UserService $service)
- {
- $request->validate( [
- 'email' => 'required|string|email|max:255|unique:users'
+ public function postEmail(Request $request, UserService $service) {
+ $request->validate([
+ 'email' => 'required|string|email|max:255|unique:users',
]);
- if($service->updateEmail($request->only(['email']), Auth::user())) {
+ if ($service->updateEmail($request->only(['email']), Auth::user())) {
flash('Email updated successfully. A verification email has been sent to your new email address.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
- * Changes user birthday setting
+ * Changes user birthday setting.
+ *
+ * @param App\Services\UserService $service
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\UserService $service
* @return \Illuminate\Http\RedirectResponse
*/
- public function postBirthday(Request $request, UserService $service)
- {
- if($service->updateDOB($request->input('birthday_setting'), Auth::user())) {
+ public function postBirthday(Request $request, UserService $service) {
+ if ($service->updateDOB($request->input('birthday_setting'), Auth::user())) {
flash('Setting updated successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
@@ -151,40 +144,48 @@ public function postBirthday(Request $request, UserService $service)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getNotifications()
- {
+ public function getNotifications() {
$notifications = Auth::user()->notifications()->orderBy('id', 'DESC')->paginate(30);
Auth::user()->notifications()->update(['is_unread' => 0]);
Auth::user()->notifications_unread = 0;
Auth::user()->save();
return view('account.notifications', [
- 'notifications' => $notifications
+ 'notifications' => $notifications,
]);
}
-
+
/**
* Deletes a notification and returns a response.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Http\Response
*/
- public function getDeleteNotification($id)
- {
+ public function getDeleteNotification($id) {
$notification = Notification::where('id', $id)->where('user_id', Auth::user()->id)->first();
- if($notification) $notification->delete();
+ if ($notification) {
+ $notification->delete();
+ }
+
return response(200);
}
/**
* Deletes all of the user's notifications.
*
+ * @param mixed|null $type
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postClearNotifications($type = null)
- {
- if(isset($type) && $type) Auth::user()->notifications()->where('notification_type_id', $type)->delete();
- else Auth::user()->notifications()->delete();
+ public function postClearNotifications($type = null) {
+ if (isset($type) && $type) {
+ Auth::user()->notifications()->where('notification_type_id', $type)->delete();
+ } else {
+ Auth::user()->notifications()->delete();
+ }
flash('Notifications cleared successfully.')->success();
+
return redirect()->back();
}
@@ -193,86 +194,97 @@ public function postClearNotifications($type = null)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getAliases()
- {
+ public function getAliases() {
return view('account.aliases');
}
/**
* Shows the make primary alias modal.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getMakePrimary($id)
- {
+ public function getMakePrimary($id) {
return view('account._make_primary_modal', ['alias' => UserAlias::where('id', $id)->where('user_id', Auth::user()->id)->first()]);
}
/**
* Makes an alias the user's primary alias.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postMakePrimary(LinkService $service, $id)
- {
- if($service->makePrimary($id, Auth::user())) {
+ public function postMakePrimary(LinkService $service, $id) {
+ if ($service->makePrimary($id, Auth::user())) {
flash('Your primary alias has been changed successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the hide alias modal.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getHideAlias($id)
- {
+ public function getHideAlias($id) {
return view('account._hide_alias_modal', ['alias' => UserAlias::where('id', $id)->where('user_id', Auth::user()->id)->first()]);
}
/**
* Hides or unhides the selected alias from public view.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postHideAlias(LinkService $service, $id)
- {
- if($service->hideAlias($id, Auth::user())) {
+ public function postHideAlias(LinkService $service, $id) {
+ if ($service->hideAlias($id, Auth::user())) {
flash('Your alias\'s visibility setting has been changed successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the remove alias modal.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getRemoveAlias($id)
- {
+ public function getRemoveAlias($id) {
return view('account._remove_alias_modal', ['alias' => UserAlias::where('id', $id)->where('user_id', Auth::user()->id)->first()]);
}
/**
* Removes the selected alias from the user's account.
*
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postRemoveAlias(LinkService $service, $id)
- {
- if($service->removeAlias($id, Auth::user())) {
+ public function postRemoveAlias(LinkService $service, $id) {
+ if ($service->removeAlias($id, Auth::user())) {
flash('Your alias has been removed successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Users/BankController.php b/app/Http/Controllers/Users/BankController.php
index 6c3c49a3cc..2044f81443 100644
--- a/app/Http/Controllers/Users/BankController.php
+++ b/app/Http/Controllers/Users/BankController.php
@@ -2,20 +2,15 @@
namespace App\Http\Controllers\Users;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
+use App\Http\Controllers\Controller;
+use App\Models\Currency\Currency;
use App\Models\User\User;
use App\Models\User\UserCurrency;
-use App\Models\Currency\Currency;
-use App\Models\Currency\CurrencyLog;
use App\Services\CurrencyManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class BankController extends Controller
-{
+class BankController extends Controller {
/*
|--------------------------------------------------------------------------
| Bank Controller
@@ -30,30 +25,30 @@ class BankController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('home.bank', [
'currencyOptions' => Currency::where('allow_user_to_user', 1)->where('is_user_owned', 1)->whereIn('id', UserCurrency::where('user_id', Auth::user()->id)->pluck('currency_id')->toArray())->orderBy('sort_user', 'DESC')->pluck('name', 'id')->toArray(),
- 'userOptions' => User::visible()->where('id', '!=', Auth::user()->id)->orderBy('name')->pluck('name', 'id')->toArray()
+ 'userOptions' => User::visible()->where('id', '!=', Auth::user()->id)->orderBy('name')->pluck('name', 'id')->toArray(),
]);
}
-
+
/**
* Transfers currency from the user to another.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CurrencyManager $service
+ * @param App\Services\CurrencyManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postTransfer(Request $request, CurrencyManager $service)
- {
- if($service->transferCurrency(Auth::user(), User::visible()->where('id', $request->get('user_id'))->first(), Currency::where('allow_user_to_user', 1)->where('id', $request->get('currency_id'))->first(), $request->get('quantity'))) {
+ public function postTransfer(Request $request, CurrencyManager $service) {
+ if ($service->transferCurrency(Auth::user(), User::visible()->where('id', $request->get('user_id'))->first(), Currency::where('allow_user_to_user', 1)->where('id', $request->get('currency_id'))->first(), $request->get('quantity'))) {
flash('Currency transferred successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Users/BookmarkController.php b/app/Http/Controllers/Users/BookmarkController.php
index 7e10d3cf8b..5738807b86 100644
--- a/app/Http/Controllers/Users/BookmarkController.php
+++ b/app/Http/Controllers/Users/BookmarkController.php
@@ -2,17 +2,13 @@
namespace App\Http\Controllers\Users;
+use App\Http\Controllers\Controller;
+use App\Models\Character\CharacterBookmark;
+use App\Services\BookmarkManager;
use Auth;
-
use Illuminate\Http\Request;
-use App\Services\BookmarkManager;
-use App\Models\Character\CharacterBookmark;
-
-use App\Http\Controllers\Controller;
-
-class BookmarkController extends Controller
-{
+class BookmarkController extends Controller {
/*
|--------------------------------------------------------------------------
| Bookmark Controller
@@ -25,17 +21,15 @@ class BookmarkController extends Controller
/**
* Shows the bookmarks page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getBookmarks(Request $request)
- {
+ public function getBookmarks(Request $request) {
$query = CharacterBookmark::join('characters', 'character_bookmarks.character_id', '=', 'characters.id')
- ->join('character_images', 'characters.character_image_id', '=', 'character_images.id')
- ->with('character.image')->with('character.user')->visible()
- ->where('character_bookmarks.user_id', Auth::user()->id);
+ ->join('character_images', 'characters.character_image_id', '=', 'character_images.id')
+ ->with('character.image')->with('character.user')->visible()
+ ->where('character_bookmarks.user_id', Auth::user()->id);
- switch($request->get('sort')) {
+ switch ($request->get('sort')) {
case 'number_desc':
$query->orderBy('characters.number', 'DESC');
break;
@@ -83,7 +77,7 @@ public function getBookmarks(Request $request)
}
return view('account.bookmarks', [
- 'bookmarks' => $query->paginate(20)->appends($request->query())
+ 'bookmarks' => $query->paginate(20)->appends($request->query()),
]);
}
@@ -92,8 +86,7 @@ public function getBookmarks(Request $request)
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateBookmark()
- {
+ public function getCreateBookmark() {
return view('account.bookmarks._create_edit_bookmark', [
'bookmark' => new CharacterBookmark,
]);
@@ -102,13 +95,16 @@ public function getCreateBookmark()
/**
* Gets the bookmark editing modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditBookmark($id)
- {
+ public function getEditBookmark($id) {
$bookmark = CharacterBookmark::with('character')->where('id', $id)->where('user_id', Auth::user()->id)->first();
- if(!$bookmark) abort(404);
+ if (!$bookmark) {
+ abort(404);
+ }
+
return view('account.bookmarks._create_edit_bookmark', [
'bookmark' => $bookmark,
]);
@@ -117,40 +113,44 @@ public function getEditBookmark($id)
/**
* Creates or edits a bookmark.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\BookmarkManager $service
- * @param int|null $id
+ * @param App\Services\BookmarkManager $service
+ * @param int|null $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateEditBookmark(Request $request, BookmarkManager $service, $id = null)
- {
+ public function postCreateEditBookmark(Request $request, BookmarkManager $service, $id = null) {
$id ? $request->validate(CharacterBookmark::$updateRules) : $request->validate(CharacterBookmark::$createRules);
$data = $request->only([
- 'character_id', 'notify_on_trade_status', 'notify_on_gift_art_status', 'notify_on_gift_writing_status', 'notify_on_transfer', 'notify_on_image', 'comment'
+ 'character_id', 'notify_on_trade_status', 'notify_on_gift_art_status', 'notify_on_gift_writing_status', 'notify_on_transfer', 'notify_on_image', 'comment',
]);
- if($id && $service->updateBookmark($data + ['bookmark_id' => $id], Auth::user())) {
+ if ($id && $service->updateBookmark($data + ['bookmark_id' => $id], Auth::user())) {
flash('Bookmark updated successfully.')->success();
- }
- else if (!$id && $bookmark = $service->createBookmark($data, Auth::user())) {
+ } elseif (!$id && $bookmark = $service->createBookmark($data, Auth::user())) {
flash('Bookmark created successfully.')->success();
+
return redirect()->back();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Gets the bookmark deletion modal.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getDeleteBookmark($id)
- {
+ public function getDeleteBookmark($id) {
$bookmark = CharacterBookmark::with('character')->where('id', $id)->where('user_id', Auth::user()->id)->first();
- if(!$bookmark) abort(404);
+ if (!$bookmark) {
+ abort(404);
+ }
+
return view('account.bookmarks._delete_bookmark', [
'bookmark' => $bookmark,
]);
@@ -159,19 +159,20 @@ public function getDeleteBookmark($id)
/**
* Deletes a bookmark.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\BookmarkManager $service
- * @param int $id
+ * @param App\Services\BookmarkManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postDeleteBookmark(Request $request, BookmarkManager $service, $id)
- {
- if($id && $service->deleteBookmark(['bookmark_id' => $id], Auth::user())) {
+ public function postDeleteBookmark(Request $request, BookmarkManager $service, $id) {
+ if ($id && $service->deleteBookmark(['bookmark_id' => $id], Auth::user())) {
flash('Bookmark deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Users/CharacterController.php b/app/Http/Controllers/Users/CharacterController.php
index fffb42a843..de9f4f3c6e 100644
--- a/app/Http/Controllers/Users/CharacterController.php
+++ b/app/Http/Controllers/Users/CharacterController.php
@@ -2,27 +2,16 @@
namespace App\Http\Controllers\Users;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Route;
-use Settings;
-use App\Models\User\User;
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
-use App\Models\Currency\Currency;
-use App\Models\Currency\CurrencyLog;
-use App\Models\User\UserCurrency;
-use App\Models\Character\CharacterCurrency;
use App\Models\Character\CharacterTransfer;
-
-use App\Services\CurrencyManager;
+use App\Models\User\User;
use App\Services\CharacterManager;
+use Auth;
+use Illuminate\Http\Request;
+use Settings;
-use App\Http\Controllers\Controller;
-
-class CharacterController extends Controller
-{
+class CharacterController extends Controller {
/*
|--------------------------------------------------------------------------
| Character Controller
@@ -37,8 +26,7 @@ class CharacterController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
$characters = Auth::user()->characters()->with('image')->visible()->whereNull('trade_id')->get();
return view('home.characters', [
@@ -51,8 +39,7 @@ public function getIndex()
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getMyos()
- {
+ public function getMyos() {
$slots = Auth::user()->myoSlots()->with('image')->get();
return view('home.myos', [
@@ -63,34 +50,36 @@ public function getMyos()
/**
* Sorts the user's characters.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
+ * @param App\Services\CharacterManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postSortCharacters(Request $request, CharacterManager $service)
- {
+ public function postSortCharacters(Request $request, CharacterManager $service) {
if ($service->sortCharacters($request->only(['sort']), Auth::user())) {
flash('Characters sorted successfully.')->success();
+
return redirect()->back();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the user's transfers.
*
- * @param string $type
+ * @param string $type
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTransfers($type = 'incoming')
- {
+ public function getTransfers($type = 'incoming') {
$transfers = CharacterTransfer::with('sender.rank')->with('recipient.rank')->with('character.image');
$user = Auth::user();
- switch($type) {
+ switch ($type) {
case 'incoming':
$transfers->where('recipient_id', $user->id)->active();
break;
@@ -98,14 +87,14 @@ public function getTransfers($type = 'incoming')
$transfers->where('sender_id', $user->id)->active();
break;
case 'completed':
- $transfers->where(function($query) use ($user) {
+ $transfers->where(function ($query) use ($user) {
$query->where('recipient_id', $user->id)->orWhere('sender_id', $user->id);
})->completed();
break;
}
return view('home.character_transfers', [
- 'transfers' => $transfers->orderBy('id', 'DESC')->paginate(20),
+ 'transfers' => $transfers->orderBy('id', 'DESC')->paginate(20),
'transfersQueue' => Settings::get('open_transfers_queue'),
]);
}
@@ -113,31 +102,32 @@ public function getTransfers($type = 'incoming')
/**
* Transfers one of the user's own characters.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\CharacterManager $service
- * @param int $id
+ * @param App\Services\CharacterManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postHandleTransfer(Request $request, CharacterManager $service, $id)
- {
- if(!Auth::check()) abort(404);
+ public function postHandleTransfer(Request $request, CharacterManager $service, $id) {
+ if (!Auth::check()) {
+ abort(404);
+ }
$action = $request->get('action');
- if($action == 'Cancel' && $service->cancelTransfer(['transfer_id' => $id], Auth::user())) {
+ if ($action == 'Cancel' && $service->cancelTransfer(['transfer_id' => $id], Auth::user())) {
flash('Transfer cancelled.')->success();
- }
- else if($service->processTransfer($request->only(['action']) + ['transfer_id' => $id], Auth::user())) {
- if(strtolower($action) == 'approve'){
- flash('Transfer ' . strtolower($action) . 'd.')->success();
+ } elseif ($service->processTransfer($request->only(['action']) + ['transfer_id' => $id], Auth::user())) {
+ if (strtolower($action) == 'approve') {
+ flash('Transfer '.strtolower($action).'d.')->success();
+ } else {
+ flash('Transfer '.strtolower($action).'ed.')->success();
}
- else {
- flash('Transfer ' . strtolower($action) . 'ed.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
}
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Users/InventoryController.php b/app/Http/Controllers/Users/InventoryController.php
index 88c935faa3..27937f0721 100644
--- a/app/Http/Controllers/Users/InventoryController.php
+++ b/app/Http/Controllers/Users/InventoryController.php
@@ -2,27 +2,21 @@
namespace App\Http\Controllers\Users;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use App\Models\User\User;
-use App\Models\User\UserItem;
-use App\Models\Item\Item;
-use App\Models\Item\ItemCategory;
-use App\Models\Item\UserItemLog;
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
-use App\Models\Character\CharacterItem;
-use App\Services\InventoryManager;
-
-use App\Models\Trade;
use App\Models\Character\CharacterDesignUpdate;
+use App\Models\Character\CharacterItem;
+use App\Models\Item\Item;
+use App\Models\Item\ItemCategory;
use App\Models\Submission\Submission;
+use App\Models\Trade;
+use App\Models\User\User;
+use App\Models\User\UserItem;
+use App\Services\InventoryManager;
+use Auth;
+use Illuminate\Http\Request;
-use App\Http\Controllers\Controller;
-
-class InventoryController extends Controller
-{
+class InventoryController extends Controller {
/*
|--------------------------------------------------------------------------
| Inventory Controller
@@ -37,8 +31,7 @@ class InventoryController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
$categories = ItemCategory::orderBy('sort', 'DESC')->get();
$items = count($categories) ?
Auth::user()->items()
@@ -54,47 +47,46 @@ public function getIndex()
->orderBy('updated_at')
->get()
->groupBy(['item_category_id', 'id']);
+
return view('home.inventory', [
- 'categories' => $categories->keyBy('id'),
- 'items' => $items,
+ 'categories' => $categories->keyBy('id'),
+ 'items' => $items,
'userOptions' => User::visible()->where('id', '!=', Auth::user()->id)->orderBy('name')->pluck('name', 'id')->toArray(),
- 'user' => Auth::user()
+ 'user' => Auth::user(),
]);
}
/**
* Shows the inventory stack modal.
*
- * @param \Illuminate\Http\Request $request
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getStack(Request $request, $id)
- {
+ public function getStack(Request $request, $id) {
$first_instance = UserItem::withTrashed()->where('id', $id)->first();
- $readOnly = $request->get('read_only') ? : ((Auth::check() && $first_instance && ($first_instance->user_id == Auth::user()->id || Auth::user()->hasPower('edit_inventories'))) ? 0 : 1);
+ $readOnly = $request->get('read_only') ?: ((Auth::check() && $first_instance && ($first_instance->user_id == Auth::user()->id || Auth::user()->hasPower('edit_inventories'))) ? 0 : 1);
$stack = UserItem::where([['user_id', $first_instance->user_id], ['item_id', $first_instance->item_id], ['count', '>', 0]])->get();
$item = Item::where('id', $first_instance->item_id)->first();
return view('home._inventory_stack', [
- 'stack' => $stack,
- 'item' => $item,
- 'user' => Auth::user(),
- 'userOptions' => ['' => 'Select User'] + User::visible()->where('id', '!=', $first_instance ? $first_instance->user_id : 0)->orderBy('name')->get()->pluck('verified_name', 'id')->toArray(),
- 'readOnly' => $readOnly,
- 'characterOptions' => Character::visible()->myo(0)->where('user_id', optional(Auth::user())->id)->orderBy('sort','DESC')->get()->pluck('fullName','id')->toArray(),
+ 'stack' => $stack,
+ 'item' => $item,
+ 'user' => Auth::user(),
+ 'userOptions' => ['' => 'Select User'] + User::visible()->where('id', '!=', $first_instance ? $first_instance->user_id : 0)->orderBy('name')->get()->pluck('verified_name', 'id')->toArray(),
+ 'readOnly' => $readOnly,
+ 'characterOptions' => Character::visible()->myo(0)->where('user_id', optional(Auth::user())->id)->orderBy('sort', 'DESC')->get()->pluck('fullName', 'id')->toArray(),
]);
}
/**
* Shows the inventory stack modal, for characters.
*
- * @param \Illuminate\Http\Request $request
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterStack(Request $request, $id)
- {
+ public function getCharacterStack(Request $request, $id) {
$first_instance = CharacterItem::withTrashed()->where('id', $id)->first();
$stack = CharacterItem::where([['character_id', $first_instance->character_id], ['item_id', $first_instance->item_id], ['count', '>', 0]])->get();
$item = Item::where('id', $first_instance->item_id)->first();
@@ -104,33 +96,36 @@ public function getCharacterStack(Request $request, $id)
$ownerId = $stack->first()->character->user_id : null;
$hasPower = Auth::check() ? Auth::user()->hasPower('edit_inventories') : false;
- $readOnly = $request->get('read_only') ? : ((Auth::check() && $first_instance && (isset($ownerId) == TRUE || $hasPower == TRUE)) ? 0 : 1);
+ $readOnly = $request->get('read_only') ?: ((Auth::check() && $first_instance && (isset($ownerId) == true || $hasPower == true)) ? 0 : 1);
return view('character._inventory_stack', [
- 'stack' => $stack,
- 'item' => $item,
- 'user' => Auth::user(),
+ 'stack' => $stack,
+ 'item' => $item,
+ 'user' => Auth::user(),
'has_power' => $hasPower,
- 'readOnly' => $readOnly,
+ 'readOnly' => $readOnly,
'character' => $character,
- 'owner_id' => isset($ownerId) ? $ownerId : null,
+ 'owner_id' => $ownerId ?? null,
]);
}
/**
* Edits the inventory of involved users.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
+ * @param App\Services\InventoryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEdit(Request $request, InventoryManager $service)
- {
- if(!$request->ids) { flash('No items selected.')->error(); }
- if(!$request->quantities) { flash('Quantities not set.')->error(); }
+ public function postEdit(Request $request, InventoryManager $service) {
+ if (!$request->ids) {
+ flash('No items selected.')->error();
+ }
+ if (!$request->quantities) {
+ flash('Quantities not set.')->error();
+ }
- if($request->ids && $request->quantities) {
- switch($request->action) {
+ if ($request->ids && $request->quantities) {
+ switch ($request->action) {
default:
flash('Invalid action selected.')->error();
break;
@@ -151,148 +146,153 @@ public function postEdit(Request $request, InventoryManager $service)
break;
}
}
+
return redirect()->back();
}
+ /**
+ * Shows the inventory selection widget.
+ *
+ * @param int $id
+ *
+ * @return \Illuminate\Contracts\Support\Renderable
+ */
+ public function getSelector($id) {
+ return view('widgets._inventory_select', [
+ 'user' => Auth::user(),
+ ]);
+ }
+
+ /**
+ * Show the account search page.
+ *
+ * @return \Illuminate\Contracts\Support\Renderable
+ */
+ public function getAccountSearch(Request $request) {
+ $item = Item::released()->find($request->only(['item_id']))->first();
+ $user = Auth::user();
+
+ if ($item) {
+ // Gather all instances of this item in the user's inventory
+ $userItems = UserItem::where('user_id', $user->id)->where('item_id', $item->id)->where('count', '>', 0)->get();
+
+ // Gather the user's characters and the items they own
+ $characters = Character::where('user_id', $user->id)->orderBy('slug', 'ASC')->get();
+ $characterItems = CharacterItem::whereIn('character_id', $characters->pluck('id')->toArray())->where('item_id', $item->id)->where('count', '>', 0)->get();
+
+ // Gather hold locations
+ $designUpdates = CharacterDesignUpdate::where('user_id', $user->id)->whereNotNull('data')->get();
+ $trades = Trade::where('sender_id', $user->id)->orWhere('recipient_id', $user->id)->get();
+ $submissions = Submission::where('user_id', $user->id)->whereNotNull('data')->get();
+ }
+
+ return view('home.account_search', [
+ 'item' => $item ? $item : null,
+ 'items' => Item::orderBy('name')->released()->pluck('name', 'id'),
+ 'userItems' => $item ? $userItems : null,
+ 'characterItems' => $item ? $characterItems : null,
+ 'characters' => $item ? $characters : null,
+ 'designUpdates' => $item ? $designUpdates : null,
+ 'trades' => $item ? $trades : null,
+ 'submissions' => $item ? $submissions : null,
+ ]);
+ }
+
/**
* Transfers inventory items to another user.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
+ * @param App\Services\InventoryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- private function postTransfer(Request $request, InventoryManager $service)
- {
- if($service->transferStack(Auth::user(), User::visible()->where('id', $request->get('user_id'))->first(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
+ private function postTransfer(Request $request, InventoryManager $service) {
+ if ($service->transferStack(Auth::user(), User::visible()->where('id', $request->get('user_id'))->first(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
flash('Item transferred successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Transfers inventory items to another user.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
+ * @param App\Services\InventoryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- private function postTransferToCharacter(Request $request, InventoryManager $service)
- {
- if($service->transferCharacterStack(Auth::user(), Character::visible()->where('id', $request->get('character_id'))->first(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
+ private function postTransferToCharacter(Request $request, InventoryManager $service) {
+ if ($service->transferCharacterStack(Auth::user(), Character::visible()->where('id', $request->get('character_id'))->first(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
flash('Item transferred successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Deletes an inventory stack.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
+ * @param App\Services\InventoryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- private function postDelete(Request $request, InventoryManager $service)
- {
- if($service->deleteStack(Auth::user(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
+ private function postDelete(Request $request, InventoryManager $service) {
+ if ($service->deleteStack(Auth::user(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
flash('Item deleted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Sells an inventory stack.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\InventoryManager $service
+ * @param App\Services\InventoryManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- private function postResell(Request $request, InventoryManager $service)
- {
- if($service->resellStack(Auth::user(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
+ private function postResell(Request $request, InventoryManager $service) {
+ if ($service->resellStack(Auth::user(), UserItem::find($request->get('ids')), $request->get('quantities'))) {
flash('Item sold successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
- return redirect()->back();
- }
- /**
- * Shows the inventory selection widget.
- *
- * @param int $id
- * @return \Illuminate\Contracts\Support\Renderable
- */
- public function getSelector($id)
- {
- return view('widgets._inventory_select', [
- 'user' => Auth::user(),
- ]);
+ return redirect()->back();
}
/**
* Acts on an item based on the item's tag.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse
*/
- private function postAct(Request $request)
- {
+ private function postAct(Request $request) {
$stacks = UserItem::with('item')->find($request->get('ids'));
$tag = $request->get('tag');
$service = $stacks->first()->item->hasTag($tag) ? $stacks->first()->item->tag($tag)->service : null;
- if($service && $service->act($stacks, Auth::user(), $request->all())) {
+ if ($service && $service->act($stacks, Auth::user(), $request->all())) {
flash('Item used successfully.')->success();
- }
- else if(!$stacks->first()->item->hasTag($tag)) flash('Invalid action selected.')->error();
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
- return redirect()->back();
- }
-
- /**
- * Show the account search page.
- *
- * @return \Illuminate\Contracts\Support\Renderable
- */
- public function getAccountSearch(Request $request)
- {
- $item = Item::released()->find($request->only(['item_id']))->first();
- $user = Auth::user();
-
- if($item) {
- // Gather all instances of this item in the user's inventory
- $userItems = UserItem::where('user_id', $user->id)->where('item_id', $item->id)->where('count', '>', 0)->get();
-
- // Gather the user's characters and the items they own
- $characters = Character::where('user_id', $user->id)->orderBy('slug', 'ASC')->get();
- $characterItems = CharacterItem::whereIn('character_id', $characters->pluck('id')->toArray())->where('item_id', $item->id)->where('count', '>', 0)->get();
-
- // Gather hold locations
- $designUpdates = CharacterDesignUpdate::where('user_id', $user->id)->whereNotNull('data')->get();
- $trades = Trade::where('sender_id', $user->id)->orWhere('recipient_id', $user->id)->get();
- $submissions = Submission::where('user_id', $user->id)->whereNotNull('data')->get();
+ } elseif (!$stacks->first()->item->hasTag($tag)) {
+ flash('Invalid action selected.')->error();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- return view('home.account_search', [
- 'item' => $item ? $item : null,
- 'items' => Item::orderBy('name')->released()->pluck('name', 'id'),
- 'userItems' => $item ? $userItems : null,
- 'characterItems' => $item ? $characterItems : null,
- 'characters' => $item ? $characters : null,
- 'designUpdates' => $item ? $designUpdates :null,
- 'trades' => $item ? $trades : null,
- 'submissions' => $item ? $submissions : null,
- ]);
+ return redirect()->back();
}
}
diff --git a/app/Http/Controllers/Users/ReportController.php b/app/Http/Controllers/Users/ReportController.php
index a23b425129..dc5dd32c59 100644
--- a/app/Http/Controllers/Users/ReportController.php
+++ b/app/Http/Controllers/Users/ReportController.php
@@ -2,24 +2,15 @@
namespace App\Http\Controllers\Users;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Settings;
-use App\Models\User\User;
-use App\Models\Character\Character;
-use App\Models\Item\Item;
-use App\Models\Currency\Currency;
+use App\Http\Controllers\Controller;
use App\Models\Report\Report;
-use App\Models\Prompt\Prompt;
-
+use App\Models\User\User;
use App\Services\ReportManager;
+use Auth;
+use Illuminate\Http\Request;
+use Settings;
-use App\Http\Controllers\Controller;
-
-class ReportController extends Controller
-{
+class ReportController extends Controller {
/**********************************************************************************************
REPORTS
@@ -29,14 +20,14 @@ class ReportController extends Controller
/**
* Shows the user's report log.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getReportsIndex(Request $request)
- {
+ public function getReportsIndex(Request $request) {
$reports = Report::where('user_id', Auth::user()->id);
$type = $request->get('type');
- if(!$type) $type = 'Pending';
+ if (!$type) {
+ $type = 'Pending';
+ }
$reports = $reports->where('status', ucfirst($type));
@@ -48,17 +39,16 @@ public function getReportsIndex(Request $request)
/**
* Shows the bug report log.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getBugIndex(Request $request)
- {
+ public function getBugIndex(Request $request) {
$reports = Report::where('is_br', 1);
$data = $request->only(['url']);
- if(isset($data['url']))
+ if (isset($data['url'])) {
$reports->where('url', 'LIKE', '%'.$data['url'].'%');
+ }
return view('home.bug_report_index', [
'reports' => $reports->orderBy('id', 'DESC')->paginate(20)->appends($request->query()),
@@ -68,28 +58,30 @@ public function getBugIndex(Request $request)
/**
* Shows the report page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getReport($id)
- {
+ public function getReport($id) {
$report = Report::viewable(Auth::check() ? Auth::user() : null)->where('id', $id)->first();
- if(!$report) abort(404);
+ if (!$report) {
+ abort(404);
+ }
+
return view('home.report', [
'report' => $report,
- 'user' => $report->user
+ 'user' => $report->user,
]);
}
/**
* Shows the submit report page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getNewReport(Request $request)
- {
+ public function getNewReport(Request $request) {
$closed = !Settings::get('is_reports_open');
+
return view('home.create_report', [
'closed' => $closed,
]);
@@ -98,21 +90,22 @@ public function getNewReport(Request $request)
/**
* Creates a new report.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\ReportManager $service
+ * @param App\Services\ReportManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postNewReport(Request $request, ReportManager $service)
- {
+ public function postNewReport(Request $request, ReportManager $service) {
$request->validate(Report::$createRules);
$request['url'] = strip_tags($request['url']);
- if($service->createReport($request->only(['url', 'comments', 'is_br', 'error']), Auth::user(), true)) {
+ if ($service->createReport($request->only(['url', 'comments', 'is_br', 'error']), Auth::user(), true)) {
flash('Report submitted successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->to('reports');
}
}
diff --git a/app/Http/Controllers/Users/SubmissionController.php b/app/Http/Controllers/Users/SubmissionController.php
index 6a743b5e24..c9860b288b 100644
--- a/app/Http/Controllers/Users/SubmissionController.php
+++ b/app/Http/Controllers/Users/SubmissionController.php
@@ -2,31 +2,25 @@
namespace App\Http\Controllers\Users;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Config;
-use Settings;
-use App\Models\User\User;
-use App\Models\User\UserItem;
+use App\Http\Controllers\Controller;
use App\Models\Character\Character;
+use App\Models\Criteria\Criterion;
+use App\Models\Currency\Currency;
use App\Models\Item\Item;
-use App\Models\Raffle\Raffle;
use App\Models\Item\ItemCategory;
-use App\Models\Currency\Currency;
-use App\Models\Submission\Submission;
-use App\Models\Submission\SubmissionCharacter;
use App\Models\Prompt\Prompt;
-
-use App\Services\SubmissionManager;
-
-use App\Http\Controllers\Controller;
-use App\Models\Criteria\Criterion;
use App\Models\Prompt\PromptCriterion;
+use App\Models\Raffle\Raffle;
+use App\Models\Submission\Submission;
+use App\Models\User\User;
+use App\Models\User\UserItem;
+use App\Services\SubmissionManager;
+use Auth;
+use Config;
+use Illuminate\Http\Request;
+use Settings;
-class SubmissionController extends Controller
-{
+class SubmissionController extends Controller {
/*
|--------------------------------------------------------------------------
| Submission Controller
@@ -45,82 +39,84 @@ class SubmissionController extends Controller
/**
* Shows the user's submission log.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex(Request $request)
- {
+ public function getIndex(Request $request) {
$submissions = Submission::with('prompt')->where('user_id', Auth::user()->id)->whereNotNull('prompt_id');
$type = $request->get('type');
- if(!$type) $type = 'Pending';
+ if (!$type) {
+ $type = 'Pending';
+ }
$submissions = $submissions->where('status', ucfirst($type));
return view('home.submissions', [
'submissions' => $submissions->orderBy('id', 'DESC')->paginate(20)->appends($request->query()),
- 'isClaims' => false
+ 'isClaims' => false,
]);
}
/**
* Shows the submission page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubmission($id)
- {
+ public function getSubmission($id) {
$submission = Submission::viewable(Auth::user())->where('id', $id)->whereNotNull('prompt_id')->first();
$inventory = isset($submission->data['user']) ? parseAssetData($submission->data['user']) : null;
- if(!$submission) abort(404);
+ if (!$submission) {
+ abort(404);
+ }
+
return view('home.submission', [
'submission' => $submission,
- 'user' => $submission->user,
+ 'user' => $submission->user,
'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
- 'inventory' => $inventory,
- 'itemsrow' => Item::all()->keyBy('id')
+ 'inventory' => $inventory,
+ 'itemsrow' => Item::all()->keyBy('id'),
]);
}
/**
* Shows the submit page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getNewSubmission(Request $request)
- {
+ public function getNewSubmission(Request $request) {
$closed = !Settings::get('is_prompts_open');
$inventory = UserItem::with('item')->whereNull('deleted_at')->where('count', '>', '0')->where('user_id', Auth::user()->id)->get();
$prompt = $request->all()['prompt_id'] ?? null;
$promptCriteria = $prompt ? PromptCriterion::where('prompt_id', $prompt)->pluck('criterion_id')->toArray() : null;
+
return view('home.create_submission', [
- 'closed' => $closed,
+ 'closed' => $closed,
'isClaim' => false,
] + ($closed ? [] : [
- 'submission' => new Submission,
- 'prompts' => Prompt::active()->sortAlphabetical()->pluck('name', 'id')->toArray(),
+ 'submission' => new Submission,
+ 'prompts' => Prompt::active()->sortAlphabetical()->pluck('name', 'id')->toArray(),
'characterCurrencies' => Currency::where('is_character_owned', 1)->orderBy('sort_character', 'DESC')->pluck('name', 'id'),
- 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
- 'item_filter' => Item::orderBy('name')->released()->get()->keyBy('id'),
- 'items' => Item::orderBy('name')->released()->pluck('name', 'id'),
- 'character_items' => Item::whereIn('item_category_id', ItemCategory::where('is_character_owned',1)->pluck('id')->toArray() )->orderBy('name')->released()->pluck('name', 'id'),
- 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
- 'inventory' => $inventory,
- 'page' => 'submission',
- 'expanded_rewards' => Config::get('lorekeeper.extensions.character_reward_expansion.expanded'),
- 'criteria' => $prompt ? Criterion::active()->whereIn('id', $promptCriteria)->orderBy('name')->pluck('name', 'id') : null,
+ 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
+ 'item_filter' => Item::orderBy('name')->released()->get()->keyBy('id'),
+ 'items' => Item::orderBy('name')->released()->pluck('name', 'id'),
+ 'character_items' => Item::whereIn('item_category_id', ItemCategory::where('is_character_owned', 1)->pluck('id')->toArray())->orderBy('name')->released()->pluck('name', 'id'),
+ 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
+ 'inventory' => $inventory,
+ 'page' => 'submission',
+ 'expanded_rewards' => Config::get('lorekeeper.extensions.character_reward_expansion.expanded'),
+ 'criteria' => $prompt ? Criterion::active()->whereIn('id', $promptCriteria)->orderBy('name')->pluck('name', 'id') : null,
]));
}
/**
* Shows character information.
*
- * @param string $slug
+ * @param string $slug
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterInfo($slug)
- {
+ public function getCharacterInfo($slug) {
$character = Character::visible()->where('slug', $slug)->first();
return view('home._character', [
@@ -131,37 +127,41 @@ public function getCharacterInfo($slug)
/**
* Shows prompt information.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPromptInfo($id)
- {
+ public function getPromptInfo($id) {
$prompt = Prompt::active()->where('id', $id)->first();
- if(!$prompt) return response(404);
+ if (!$prompt) {
+ return response(404);
+ }
return view('home._prompt', [
'prompt' => $prompt,
- 'count' => Submission::where('prompt_id', $id)->where('status', 'Approved')->where('user_id', Auth::user()->id)->count()
+ 'count' => Submission::where('prompt_id', $id)->where('status', 'Approved')->where('user_id', Auth::user()->id)->count(),
]);
}
/**
* Creates a new submission.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SubmissionManager $service
+ * @param App\Services\SubmissionManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postNewSubmission(Request $request, SubmissionManager $service)
- {
+ public function postNewSubmission(Request $request, SubmissionManager $service) {
$request->validate(Submission::$createRules);
- if($service->createSubmission($request->only(['url', 'prompt_id', 'comments', 'slug', 'character_rewardable_type', 'character_rewardable_id', 'character_rewardable_quantity', 'rewardable_type', 'rewardable_id', 'quantity', 'stack_id', 'stack_quantity', 'currency_id', 'currency_quantity', 'criterion_id', 'criterion']), Auth::user())) {
+ if ($service->createSubmission($request->only(['url', 'prompt_id', 'comments', 'slug', 'character_rewardable_type', 'character_rewardable_id', 'character_rewardable_quantity', 'rewardable_type', 'rewardable_id', 'quantity', 'stack_id', 'stack_quantity', 'currency_id', 'currency_quantity', 'criterion_id', 'criterion']), Auth::user())) {
flash('Prompt submitted successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+
return redirect()->back();
}
+
return redirect()->to('submissions');
}
@@ -174,87 +174,91 @@ public function postNewSubmission(Request $request, SubmissionManager $service)
/**
* Shows the user's claim log.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getClaimsIndex(Request $request)
- {
+ public function getClaimsIndex(Request $request) {
$submissions = Submission::where('user_id', Auth::user()->id)->whereNull('prompt_id');
$type = $request->get('type');
- if(!$type) $type = 'Pending';
+ if (!$type) {
+ $type = 'Pending';
+ }
$submissions = $submissions->where('status', ucfirst($type));
return view('home.submissions', [
'submissions' => $submissions->orderBy('id', 'DESC')->paginate(20)->appends($request->query()),
- 'isClaims' => true
+ 'isClaims' => true,
]);
}
/**
* Shows the claim page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getClaim($id)
- {
+ public function getClaim($id) {
$submission = Submission::viewable(Auth::user())->where('id', $id)->whereNull('prompt_id')->first();
$inventory = isset($submission->data['user']) ? parseAssetData($submission->data['user']) : null;
- if(!$submission) abort(404);
+ if (!$submission) {
+ abort(404);
+ }
+
return view('home.submission', [
'submission' => $submission,
- 'user' => $submission->user,
+ 'user' => $submission->user,
'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
- 'itemsrow' => Item::all()->keyBy('id'),
- 'inventory' => $inventory
+ 'itemsrow' => Item::all()->keyBy('id'),
+ 'inventory' => $inventory,
]);
}
/**
* Shows the submit claim page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getNewClaim(Request $request)
- {
+ public function getNewClaim(Request $request) {
$closed = !Settings::get('is_claims_open');
$inventory = UserItem::with('item')->whereNull('deleted_at')->where('count', '>', '0')->where('user_id', Auth::user()->id)->get();
+
return view('home.create_submission', [
- 'closed' => $closed,
+ 'closed' => $closed,
'isClaim' => true,
] + ($closed ? [] : [
- 'submission' => new Submission,
+ 'submission' => new Submission,
'characterCurrencies' => Currency::where('is_character_owned', 1)->orderBy('sort_character', 'DESC')->pluck('name', 'id'),
- 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
- 'inventory' => $inventory,
- 'item_filter' => Item::orderBy('name')->released()->get()->keyBy('id'),
- 'items' => Item::orderBy('name')->released()->pluck('name', 'id'),
- 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
- 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
- 'page' => 'submission',
- 'expanded_rewards' => Config::get('lorekeeper.extensions.character_reward_expansion.expanded')
+ 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
+ 'inventory' => $inventory,
+ 'item_filter' => Item::orderBy('name')->released()->get()->keyBy('id'),
+ 'items' => Item::orderBy('name')->released()->pluck('name', 'id'),
+ 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
+ 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
+ 'page' => 'submission',
+ 'expanded_rewards' => Config::get('lorekeeper.extensions.character_reward_expansion.expanded'),
]));
}
/**
* Creates a new claim.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\SubmissionManager $service
+ * @param App\Services\SubmissionManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postNewClaim(Request $request, SubmissionManager $service)
- {
+ public function postNewClaim(Request $request, SubmissionManager $service) {
$request->validate(Submission::$createRules);
- if($service->createSubmission($request->only(['url', 'comments', 'stack_id', 'stack_quantity', 'slug', 'character_rewardable_type', 'character_rewardable_id', 'character_rewardable_quantity', 'rewardable_type','rewardable_id', 'quantity', 'currency_id', 'currency_quantity']), Auth::user(), true)) {
+ if ($service->createSubmission($request->only(['url', 'comments', 'stack_id', 'stack_quantity', 'slug', 'character_rewardable_type', 'character_rewardable_id', 'character_rewardable_quantity', 'rewardable_type', 'rewardable_id', 'quantity', 'currency_id', 'currency_quantity']), Auth::user(), true)) {
flash('Claim submitted successfully.')->success();
- }
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
+
return redirect()->back();
}
+
return redirect()->to('claims');
}
}
diff --git a/app/Http/Controllers/Users/TradeController.php b/app/Http/Controllers/Users/TradeController.php
index 87c847eaaa..d67456e49e 100644
--- a/app/Http/Controllers/Users/TradeController.php
+++ b/app/Http/Controllers/Users/TradeController.php
@@ -2,23 +2,18 @@
namespace App\Http\Controllers\Users;
-use Auth;
-
-use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
-
-use App\Models\Trade;
-use App\Models\Item\ItemCategory;
+use App\Models\Character\CharacterCategory;
use App\Models\Item\Item;
+use App\Models\Item\ItemCategory;
+use App\Models\Trade;
use App\Models\User\User;
use App\Models\User\UserItem;
-use App\Models\Currency\Currency;
-use App\Models\Character\CharacterCategory;
-
use App\Services\TradeManager;
+use Auth;
+use Illuminate\Http\Request;
-class TradeController extends Controller
-{
+class TradeController extends Controller {
/*
|--------------------------------------------------------------------------
| Trade Controller
@@ -31,26 +26,26 @@ class TradeController extends Controller
/**
* Shows the user's trades.
*
- * @param string $type
+ * @param mixed $status
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex($status = 'open')
- {
+ public function getIndex($status = 'open') {
$user = Auth::user();
- $trades = Trade::with('recipient')->with('sender')->with('staff')->where(function($query) {
+ $trades = Trade::with('recipient')->with('sender')->with('staff')->where(function ($query) {
$query->where('recipient_id', Auth::user()->id)->orWhere('sender_id', Auth::user()->id);
})->where('status', ucfirst($status))->orderBy('id', 'DESC');
- $stacks = array();
- foreach($trades->get() as $trade) {
- foreach($trade->data as $side=>$assets) {
- if(isset($assets['user_items'])) {
+ $stacks = [];
+ foreach ($trades->get() as $trade) {
+ foreach ($trade->data as $side=>$assets) {
+ if (isset($assets['user_items'])) {
$user_items = UserItem::with('item')->find(array_keys($assets['user_items']));
- $items = array();
- foreach($assets['user_items'] as $id=>$quantity) {
+ $items = [];
+ foreach ($assets['user_items'] as $id=>$quantity) {
$user_item = $user_items->find($id);
$user_item['quantity'] = $quantity;
- array_push($items,$user_item);
+ array_push($items, $user_item);
}
$items = collect($items)->groupBy('item_id');
$stacks[$trade->id][$side] = $items;
@@ -60,235 +55,252 @@ public function getIndex($status = 'open')
return view('home.trades.index', [
'trades' => $trades->paginate(20),
- 'stacks' => $stacks
+ 'stacks' => $stacks,
]);
}
/**
* Shows a trade.
*
- * @param integer $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getTrade($id)
- {
+ public function getTrade($id) {
$trade = Trade::find($id);
-
- if($trade->status != 'Completed' && !Auth::user()->hasPower('manage_characters') && !($trade->sender_id == Auth::user()->id || $trade->recipient_id == Auth::user()->id)) $trade = null;
- if(!$trade) abort(404);
+ if ($trade->status != 'Completed' && !Auth::user()->hasPower('manage_characters') && !($trade->sender_id == Auth::user()->id || $trade->recipient_id == Auth::user()->id)) {
+ $trade = null;
+ }
+
+ if (!$trade) {
+ abort(404);
+ }
+
return view('home.trades.trade', [
- 'trade' => $trade,
- 'partner' => (Auth::user()->id == $trade->sender_id) ? $trade->recipient : $trade->sender,
- 'senderData' => isset($trade->data['sender']) ? parseAssetData($trade->data['sender']) : null,
+ 'trade' => $trade,
+ 'partner' => (Auth::user()->id == $trade->sender_id) ? $trade->recipient : $trade->sender,
+ 'senderData' => isset($trade->data['sender']) ? parseAssetData($trade->data['sender']) : null,
'recipientData' => isset($trade->data['recipient']) ? parseAssetData($trade->data['recipient']) : null,
- 'items' => Item::all()->keyBy('id')
+ 'items' => Item::all()->keyBy('id'),
]);
}
/**
* Shows the trade creation page.
*
- * @param integer $id
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCreateTrade()
- {
+ public function getCreateTrade() {
$inventory = UserItem::with('item')->whereNull('deleted_at')->where('count', '>', '0')->where('user_id', Auth::user()->id)
- ->get()
- ->filter(function($userItem){
- return $userItem->isTransferrable == true;
- })
- ->sortBy('item.name');;
+ ->get()
+ ->filter(function ($userItem) {
+ return $userItem->isTransferrable == true;
+ })
+ ->sortBy('item.name');
+
return view('home.trades.create_trade', [
- 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
- 'item_filter' => Item::orderBy('name')->get()->keyBy('id'),
- 'inventory' => $inventory,
- 'userOptions' => User::visible()->where('id', '!=', Auth::user()->id)->orderBy('name')->pluck('name', 'id')->toArray(),
- 'characters' => Auth::user()->allCharacters()->visible()->tradable()->with('designUpdate')->get(),
+ 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
+ 'item_filter' => Item::orderBy('name')->get()->keyBy('id'),
+ 'inventory' => $inventory,
+ 'userOptions' => User::visible()->where('id', '!=', Auth::user()->id)->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'characters' => Auth::user()->allCharacters()->visible()->tradable()->with('designUpdate')->get(),
'characterCategories' => CharacterCategory::orderBy('sort', 'DESC')->get(),
- 'page' => 'trade'
+ 'page' => 'trade',
]);
}
/**
* Shows the trade edit page.
*
- * @param integer $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getEditTrade($id)
- {
- $trade = Trade::where('id', $id)->where(function($query) {
+ public function getEditTrade($id) {
+ $trade = Trade::where('id', $id)->where(function ($query) {
$query->where('recipient_id', Auth::user()->id)->orWhere('sender_id', Auth::user()->id);
})->where('status', 'Open')->first();
- if($trade)
+ if ($trade) {
$inventory = UserItem::with('item')->whereNull('deleted_at')->where('count', '>', '0')->where('user_id', Auth::user()->id)
- ->get()
- ->filter(function($userItem){
- return $userItem->isTransferrable == true;
- })
- ->sortBy('item.name');
- else $trade = null;
+ ->get()
+ ->filter(function ($userItem) {
+ return $userItem->isTransferrable == true;
+ })
+ ->sortBy('item.name');
+ } else {
+ $trade = null;
+ }
+
return view('home.trades.edit_trade', [
- 'trade' => $trade,
- 'partner' => (Auth::user()->id == $trade->sender_id) ? $trade->recipient : $trade->sender,
- 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
- 'item_filter' => Item::orderBy('name')->get()->keyBy('id'),
- 'inventory' => $inventory,
- 'userOptions' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
- 'characters' => Auth::user()->allCharacters()->visible()->with('designUpdate')->get(),
+ 'trade' => $trade,
+ 'partner' => (Auth::user()->id == $trade->sender_id) ? $trade->recipient : $trade->sender,
+ 'categories' => ItemCategory::orderBy('sort', 'DESC')->get(),
+ 'item_filter' => Item::orderBy('name')->get()->keyBy('id'),
+ 'inventory' => $inventory,
+ 'userOptions' => User::visible()->orderBy('name')->pluck('name', 'id')->toArray(),
+ 'characters' => Auth::user()->allCharacters()->visible()->with('designUpdate')->get(),
'characterCategories' => CharacterCategory::orderBy('sort', 'DESC')->get(),
- 'page' => 'trade'
+ 'page' => 'trade',
]);
}
-
+
/**
* Creates a new trade.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\TradeManager $service
+ * @param App\Services\TradeManager $service
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCreateTrade(Request $request, TradeManager $service)
- {
- if($trade = $service->createTrade($request->only(['recipient_id', 'comments', 'stack_id', 'stack_quantity', 'currency_id', 'currency_quantity', 'character_id']), Auth::user())) {
+ public function postCreateTrade(Request $request, TradeManager $service) {
+ if ($trade = $service->createTrade($request->only(['recipient_id', 'comments', 'stack_id', 'stack_quantity', 'currency_id', 'currency_quantity', 'character_id']), Auth::user())) {
flash('Trade created successfully.')->success();
+
return redirect()->to($trade->url);
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
-
+
/**
* Edits a trade.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\TradeManager $service
- * @param integer $id
+ * @param App\Services\TradeManager $service
+ * @param int $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postEditTrade(Request $request, TradeManager $service, $id)
- {
- if($trade = $service->editTrade($request->only(['comments', 'stack_id', 'stack_quantity', 'currency_id', 'currency_quantity', 'character_id']) + ['id' => $id], Auth::user())) {
+ public function postEditTrade(Request $request, TradeManager $service, $id) {
+ if ($trade = $service->editTrade($request->only(['comments', 'stack_id', 'stack_quantity', 'currency_id', 'currency_quantity', 'character_id']) + ['id' => $id], Auth::user())) {
flash('Trade offer edited successfully.')->success();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the offer confirmation modal.
*
- * @param integer $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getConfirmOffer($id)
- {
- $trade = Trade::where('id', $id)->where(function($query) {
+ public function getConfirmOffer($id) {
+ $trade = Trade::where('id', $id)->where(function ($query) {
$query->where('recipient_id', Auth::user()->id)->orWhere('sender_id', Auth::user()->id);
})->where('status', 'Open')->first();
-
+
return view('home.trades._confirm_offer_modal', [
- 'trade' => $trade
+ 'trade' => $trade,
]);
}
-
+
/**
* Confirms or unconfirms an offer.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\TradeManager $service
+ * @param App\Services\TradeManager $service
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postConfirmOffer(Request $request, TradeManager $service, $id)
- {
- if($trade = $service->confirmOffer(['id' => $id], Auth::user())) {
+ public function postConfirmOffer(Request $request, TradeManager $service, $id) {
+ if ($trade = $service->confirmOffer(['id' => $id], Auth::user())) {
flash('Trade offer confirmation edited successfully.')->success();
+
return redirect()->back();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the trade confirmation modal.
*
- * @param integer $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getConfirmTrade($id)
- {
- $trade = Trade::where('id', $id)->where(function($query) {
+ public function getConfirmTrade($id) {
+ $trade = Trade::where('id', $id)->where(function ($query) {
$query->where('recipient_id', Auth::user()->id)->orWhere('sender_id', Auth::user()->id);
})->where('status', 'Open')->first();
-
+
return view('home.trades._confirm_trade_modal', [
- 'trade' => $trade
+ 'trade' => $trade,
]);
}
-
+
/**
* Confirms or unconfirms a trade.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\TradeManager $service
+ * @param App\Services\TradeManager $service
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postConfirmTrade(Request $request, TradeManager $service, $id)
- {
- if($trade = $service->confirmTrade(['id' => $id], Auth::user())) {
+ public function postConfirmTrade(Request $request, TradeManager $service, $id) {
+ if ($trade = $service->confirmTrade(['id' => $id], Auth::user())) {
flash('Trade confirmed successfully.')->success();
+
return redirect()->back();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
/**
* Shows the trade cancellation modal.
*
- * @param integer $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCancelTrade($id)
- {
- $trade = Trade::where('id', $id)->where(function($query) {
+ public function getCancelTrade($id) {
+ $trade = Trade::where('id', $id)->where(function ($query) {
$query->where('recipient_id', Auth::user()->id)->orWhere('sender_id', Auth::user()->id);
})->where('status', 'Open')->first();
-
+
return view('home.trades._cancel_trade_modal', [
- 'trade' => $trade
+ 'trade' => $trade,
]);
}
-
+
/**
* Cancels a trade.
*
- * @param \Illuminate\Http\Request $request
- * @param App\Services\TradeManager $service
+ * @param App\Services\TradeManager $service
+ * @param mixed $id
+ *
* @return \Illuminate\Http\RedirectResponse
*/
- public function postCancelTrade(Request $request, TradeManager $service, $id)
- {
- if($trade = $service->cancelTrade(['id' => $id], Auth::user())) {
+ public function postCancelTrade(Request $request, TradeManager $service, $id) {
+ if ($trade = $service->cancelTrade(['id' => $id], Auth::user())) {
flash('Trade canceled successfully.')->success();
+
return redirect()->back();
+ } else {
+ foreach ($service->errors()->getMessages()['error'] as $error) {
+ flash($error)->error();
+ }
}
- else {
- foreach($service->errors()->getMessages()['error'] as $error) flash($error)->error();
- }
+
return redirect()->back();
}
}
-
-
diff --git a/app/Http/Controllers/Users/UserController.php b/app/Http/Controllers/Users/UserController.php
index 2293b96382..68597a4c7f 100644
--- a/app/Http/Controllers/Users/UserController.php
+++ b/app/Http/Controllers/Users/UserController.php
@@ -2,35 +2,22 @@
namespace App\Http\Controllers\Users;
-use Illuminate\Http\Request;
-
-use DB;
-use Auth;
-use Route;
-use App\Models\User\User;
-
-use App\Models\User\UserCurrency;
+use App\Http\Controllers\Controller;
+use App\Models\Character\Character;
+use App\Models\Character\CharacterImage;
+use App\Models\Character\Sublist;
use App\Models\Currency\Currency;
-use App\Models\Currency\CurrencyLog;
use App\Models\Gallery\Gallery;
+use App\Models\Gallery\GalleryCharacter;
use App\Models\Gallery\GallerySubmission;
-
-use App\Models\User\UserItem;
use App\Models\Item\Item;
use App\Models\Item\ItemCategory;
-use App\Models\Gallery\GalleryFavorite;
-use App\Models\Gallery\GalleryCharacter;
-use App\Models\Item\ItemLog;
-
-use App\Models\Character\CharacterCategory;
-use App\Models\Character\CharacterImage;
-use App\Models\Character\Character;
-use App\Models\Character\Sublist;
-
-use App\Http\Controllers\Controller;
+use App\Models\User\User;
+use App\Models\User\UserCurrency;
+use Auth;
+use Route;
-class UserController extends Controller
-{
+class UserController extends Controller {
/*
|--------------------------------------------------------------------------
| User Controller
@@ -42,14 +29,13 @@ class UserController extends Controller
/**
* Create a new controller instance.
- *
- * @return void
*/
- public function __construct()
- {
+ public function __construct() {
$name = Route::current()->parameter('name');
$this->user = User::where('name', $name)->first();
- if(!$this->user) abort(404);
+ if (!$this->user) {
+ abort(404);
+ }
$this->user->updateCharacters();
$this->user->updateArtDesignCredits();
@@ -58,18 +44,20 @@ public function __construct()
/**
* Shows a user's profile.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUser($name)
- {
+ public function getUser($name) {
$characters = $this->user->characters();
- if(!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) $characters->visible();
-
+ if (!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) {
+ $characters->visible();
+ }
+
return view('user.profile', [
- 'user' => $this->user,
- 'items' => $this->user->items()->where('count', '>', 0)->orderBy('user_items.updated_at', 'DESC')->take(4)->get(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
+ 'user' => $this->user,
+ 'items' => $this->user->items()->where('count', '>', 0)->orderBy('user_items.updated_at', 'DESC')->take(4)->get(),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
'characters' => $characters,
]);
}
@@ -77,16 +65,18 @@ public function getUser($name)
/**
* Shows a user's aliases.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserAliases($name)
- {
+ public function getUserAliases($name) {
$aliases = $this->user->aliases();
- if(!Auth::check() || !(Auth::check() && Auth::user()->hasPower('edit_user_info'))) $aliases->visible();
-
+ if (!Auth::check() || !(Auth::check() && Auth::user()->hasPower('edit_user_info'))) {
+ $aliases->visible();
+ }
+
return view('user.aliases', [
- 'user' => $this->user,
+ 'user' => $this->user,
'aliases' => $aliases->orderBy('is_primary_alias', 'DESC')->orderBy('site')->get(),
]);
}
@@ -94,21 +84,20 @@ public function getUserAliases($name)
/**
* Shows a user's characters.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserCharacters($name)
- {
+ public function getUserCharacters($name) {
$query = Character::myo(0)->where('user_id', $this->user->id);
$imageQuery = CharacterImage::images(Auth::check() ? Auth::user() : null)->with('features')->with('rarity')->with('species')->with('features');
- if($sublists = Sublist::where('show_main', 0)->get())
- $subCategories = []; $subSpecies = [];
- { foreach($sublists as $sublist)
- {
- $subCategories = array_merge($subCategories, $sublist->categories->pluck('id')->toArray());
- $subSpecies = array_merge($subSpecies, $sublist->species->pluck('id')->toArray());
- }
+ if ($sublists = Sublist::where('show_main', 0)->get()) {
+ $subCategories = [];
+ } $subSpecies = [];
+ foreach ($sublists as $sublist) {
+ $subCategories = array_merge($subCategories, $sublist->categories->pluck('id')->toArray());
+ $subSpecies = array_merge($subSpecies, $sublist->species->pluck('id')->toArray());
}
$query->whereNotIn('character_category_id', $subCategories);
@@ -116,72 +105,85 @@ public function getUserCharacters($name)
$query->whereIn('id', $imageQuery->pluck('character_id'));
- if(!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) $query->visible();
+ if (!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) {
+ $query->visible();
+ }
return view('user.characters', [
- 'user' => $this->user,
+ 'user' => $this->user,
'characters' => $query->orderBy('sort', 'DESC')->get(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's sublist characters.
*
- * @param string $name
+ * @param string $name
+ * @param mixed $key
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserSublist($name, $key)
- {
+ public function getUserSublist($name, $key) {
$query = Character::myo(0)->where('user_id', $this->user->id);
$imageQuery = CharacterImage::images(Auth::check() ? Auth::user() : null)->with('features')->with('rarity')->with('species')->with('features');
$sublist = Sublist::where('key', $key)->first();
- if(!$sublist) abort(404);
+ if (!$sublist) {
+ abort(404);
+ }
$subCategories = $sublist->categories->pluck('id')->toArray();
$subSpecies = $sublist->species->pluck('id')->toArray();
- if($subCategories) $query->whereIn('character_category_id', $subCategories);
- if($subSpecies) $imageQuery->whereIn('species_id', $subSpecies);
+ if ($subCategories) {
+ $query->whereIn('character_category_id', $subCategories);
+ }
+ if ($subSpecies) {
+ $imageQuery->whereIn('species_id', $subSpecies);
+ }
$query->whereIn('id', $imageQuery->pluck('character_id'));
- if(!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) $query->visible();
+ if (!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) {
+ $query->visible();
+ }
return view('user.sublist', [
- 'user' => $this->user,
+ 'user' => $this->user,
'characters' => $query->orderBy('sort', 'DESC')->get(),
- 'sublist' => $sublist,
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'sublist' => $sublist,
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's MYO slots.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserMyoSlots($name)
- {
+ public function getUserMyoSlots($name) {
$myo = $this->user->myoSlots();
- if(!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) $myo->visible();
+ if (!Auth::check() || !(Auth::check() && Auth::user()->hasPower('manage_characters'))) {
+ $myo->visible();
+ }
return view('user.myo_slots', [
- 'user' => $this->user,
- 'myos' => $myo->get(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'user' => $this->user,
+ 'myos' => $myo->get(),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's inventory.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserInventory($name)
- {
+ public function getUserInventory($name) {
$categories = ItemCategory::orderBy('sort', 'DESC')->get();
$items = count($categories) ?
$this->user->items()
@@ -197,146 +199,150 @@ public function getUserInventory($name)
->orderBy('updated_at')
->get()
->groupBy(['item_category_id', 'id']);
+
return view('user.inventory', [
- 'user' => $this->user,
- 'categories' => $categories->keyBy('id'),
- 'items' => $items,
+ 'user' => $this->user,
+ 'categories' => $categories->keyBy('id'),
+ 'items' => $items,
'userOptions' => User::where('id', '!=', $this->user->id)->orderBy('name')->pluck('name', 'id')->toArray(),
- 'user' => $this->user,
- 'logs' => $this->user->getItemLogs(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'user' => $this->user,
+ 'logs' => $this->user->getItemLogs(),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's profile.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserBank($name)
- {
+ public function getUserBank($name) {
$user = $this->user;
+
return view('user.bank', [
- 'user' => $this->user,
- 'logs' => $this->user->getCurrencyLogs(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'user' => $this->user,
+ 'logs' => $this->user->getCurrencyLogs(),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
] + (Auth::check() && Auth::user()->id == $this->user->id ? [
'currencyOptions' => Currency::where('allow_user_to_user', 1)->where('is_user_owned', 1)->whereIn('id', UserCurrency::where('user_id', $this->user->id)->pluck('currency_id')->toArray())->orderBy('sort_user', 'DESC')->pluck('name', 'id')->toArray(),
- 'userOptions' => User::where('id', '!=', Auth::user()->id)->orderBy('name')->pluck('name', 'id')->toArray()
+ 'userOptions' => User::where('id', '!=', Auth::user()->id)->orderBy('name')->pluck('name', 'id')->toArray(),
] : []));
}
/**
* Shows a user's currency logs.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserCurrencyLogs($name)
- {
+ public function getUserCurrencyLogs($name) {
$user = $this->user;
+
return view('user.currency_logs', [
- 'user' => $this->user,
- 'logs' => $this->user->getCurrencyLogs(0),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'user' => $this->user,
+ 'logs' => $this->user->getCurrencyLogs(0),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's item logs.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserItemLogs($name)
- {
+ public function getUserItemLogs($name) {
$user = $this->user;
+
return view('user.item_logs', [
- 'user' => $this->user,
- 'logs' => $this->user->getItemLogs(0),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'user' => $this->user,
+ 'logs' => $this->user->getItemLogs(0),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's character ownership logs.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserOwnershipLogs($name)
- {
+ public function getUserOwnershipLogs($name) {
return view('user.ownership_logs', [
- 'user' => $this->user,
- 'logs' => $this->user->getOwnershipLogs(),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'user' => $this->user,
+ 'logs' => $this->user->getOwnershipLogs(),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's submissions.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserSubmissions($name)
- {
+ public function getUserSubmissions($name) {
return view('user.submission_logs', [
- 'user' => $this->user,
- 'logs' => $this->user->getSubmissions(Auth::check() ? Auth::user() : null),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'user' => $this->user,
+ 'logs' => $this->user->getSubmissions(Auth::check() ? Auth::user() : null),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's gallery submissions.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserGallery($name)
- {
+ public function getUserGallery($name) {
return view('user.gallery', [
- 'user' => $this->user,
+ 'user' => $this->user,
'submissions' => $this->user->gallerySubmissions()->paginate(20),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's gallery submission favorites.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserFavorites($name)
- {
+ public function getUserFavorites($name) {
return view('user.favorites', [
- 'user' => $this->user,
+ 'user' => $this->user,
'characters' => false,
- 'favorites' => GallerySubmission::whereIn('id', $this->user->galleryFavorites()->pluck('gallery_submission_id')->toArray())->visible(Auth::check() ? Auth::user() : null)->accepted()->orderBy('created_at', 'DESC')->paginate(20),
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'favorites' => GallerySubmission::whereIn('id', $this->user->galleryFavorites()->pluck('gallery_submission_id')->toArray())->visible(Auth::check() ? Auth::user() : null)->accepted()->orderBy('created_at', 'DESC')->paginate(20),
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows a user's gallery submission favorites that contain characters they own.
*
- * @param string $name
+ * @param string $name
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getUserOwnCharacterFavorites($name)
- {
+ public function getUserOwnCharacterFavorites($name) {
$user = $this->user;
$userCharacters = $user->characters()->pluck('id')->toArray();
$userFavorites = $user->galleryFavorites()->pluck('gallery_submission_id')->toArray();
return view('user.favorites', [
- 'user' => $this->user,
+ 'user' => $this->user,
'characters' => true,
- 'favorites' => $this->user->characters->count() ? GallerySubmission::whereIn('id', $userFavorites)->whereIn('id', GalleryCharacter::whereIn('character_id', $userCharacters)->pluck('gallery_submission_id')->toArray())->visible(Auth::check() ? Auth::user() : null)->accepted()->orderBy('created_at', 'DESC')->paginate(20) : null,
- 'sublists' => Sublist::orderBy('sort', 'DESC')->get()
+ 'favorites' => $this->user->characters->count() ? GallerySubmission::whereIn('id', $userFavorites)->whereIn('id', GalleryCharacter::whereIn('character_id', $userCharacters)->pluck('gallery_submission_id')->toArray())->visible(Auth::check() ? Auth::user() : null)->accepted()->orderBy('created_at', 'DESC')->paginate(20) : null,
+ 'sublists' => Sublist::orderBy('sort', 'DESC')->get(),
]);
}
}
diff --git a/app/Http/Controllers/WorldController.php b/app/Http/Controllers/WorldController.php
index 27741d0401..df9c7cc40b 100644
--- a/app/Http/Controllers/WorldController.php
+++ b/app/Http/Controllers/WorldController.php
@@ -2,26 +2,24 @@
namespace App\Http\Controllers;
-use Illuminate\Http\Request;
-use Config;
-
+use App\Models\Character\CharacterCategory;
use App\Models\Currency\Currency;
-use App\Models\Rarity;
-use App\Models\Species\Species;
-use App\Models\Species\Subtype;
-use App\Models\Item\ItemCategory;
-use App\Models\Item\Item;
-use App\Models\Feature\FeatureCategory;
use App\Models\Feature\Feature;
-use App\Models\Character\CharacterCategory;
-use App\Models\Prompt\PromptCategory;
+use App\Models\Feature\FeatureCategory;
+use App\Models\Item\Item;
+use App\Models\Item\ItemCategory;
use App\Models\Prompt\Prompt;
+use App\Models\Prompt\PromptCategory;
+use App\Models\Rarity;
use App\Models\Shop\Shop;
use App\Models\Shop\ShopStock;
+use App\Models\Species\Species;
+use App\Models\Species\Subtype;
use App\Models\User\User;
+use Config;
+use Illuminate\Http\Request;
-class WorldController extends Controller
-{
+class WorldController extends Controller {
/*
|--------------------------------------------------------------------------
| World Controller
@@ -37,22 +35,22 @@ class WorldController extends Controller
*
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getIndex()
- {
+ public function getIndex() {
return view('world.index');
}
/**
* Shows the currency page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCurrencies(Request $request)
- {
+ public function getCurrencies(Request $request) {
$query = Currency::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%')->orWhere('abbreviation', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%')->orWhere('abbreviation', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.currencies', [
'currencies' => $query->orderBy('name')->paginate(20)->appends($request->query()),
]);
@@ -61,14 +59,15 @@ public function getCurrencies(Request $request)
/**
* Shows the rarity page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getRarities(Request $request)
- {
+ public function getRarities(Request $request) {
$query = Rarity::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.rarities', [
'rarities' => $query->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
@@ -77,16 +76,17 @@ public function getRarities(Request $request)
/**
* Shows the species page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSpecieses(Request $request)
- {
+ public function getSpecieses(Request $request) {
$query = Species::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.specieses', [
- 'specieses' => $query->with(['subtypes' => function($query) {
+ 'specieses' => $query->with(['subtypes' => function ($query) {
$query->orderBy('sort', 'DESC');
}])->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
@@ -95,14 +95,15 @@ public function getSpecieses(Request $request)
/**
* Shows the subtypes page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSubtypes(Request $request)
- {
+ public function getSubtypes(Request $request) {
$query = Subtype::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.subtypes', [
'subtypes' => $query->with('species')->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
@@ -111,14 +112,15 @@ public function getSubtypes(Request $request)
/**
* Shows the item categories page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getItemCategories(Request $request)
- {
+ public function getItemCategories(Request $request) {
$query = ItemCategory::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.item_categories', [
'categories' => $query->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
@@ -127,14 +129,15 @@ public function getItemCategories(Request $request)
/**
* Shows the trait categories page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getFeatureCategories(Request $request)
- {
+ public function getFeatureCategories(Request $request) {
$query = FeatureCategory::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.feature_categories', [
'categories' => $query->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
@@ -143,25 +146,26 @@ public function getFeatureCategories(Request $request)
/**
* Shows the traits page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getFeatures(Request $request)
- {
+ public function getFeatures(Request $request) {
$query = Feature::with('category')->with('rarity')->with('species');
$data = $request->only(['rarity_id', 'feature_category_id', 'species_id', 'name', 'sort']);
- if(isset($data['rarity_id']) && $data['rarity_id'] != 'none')
+ if (isset($data['rarity_id']) && $data['rarity_id'] != 'none') {
$query->where('rarity_id', $data['rarity_id']);
- if(isset($data['feature_category_id']) && $data['feature_category_id'] != 'none')
+ }
+ if (isset($data['feature_category_id']) && $data['feature_category_id'] != 'none') {
$query->where('feature_category_id', $data['feature_category_id']);
- if(isset($data['species_id']) && $data['species_id'] != 'none')
+ }
+ if (isset($data['species_id']) && $data['species_id'] != 'none') {
$query->where('species_id', $data['species_id']);
- if(isset($data['name']))
+ }
+ if (isset($data['name'])) {
$query->where('name', 'LIKE', '%'.$data['name'].'%');
+ }
- if(isset($data['sort']))
- {
- switch($data['sort']) {
+ if (isset($data['sort'])) {
+ switch ($data['sort']) {
case 'alpha':
$query->sortAlphabetical();
break;
@@ -187,30 +191,35 @@ public function getFeatures(Request $request)
$query->sortOldest();
break;
}
+ } else {
+ $query->sortCategory();
}
- else $query->sortCategory();
return view('world.features', [
- 'features' => $query->paginate(20)->appends($request->query()),
- 'rarities' => ['none' => 'Any Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'specieses' => ['none' => 'Any Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'categories' => ['none' => 'Any Category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'features' => $query->paginate(20)->appends($request->query()),
+ 'rarities' => ['none' => 'Any Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'specieses' => ['none' => 'Any Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'categories' => ['none' => 'Any Category'] + FeatureCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
/**
* Shows a species' visual trait list.
*
- * @param \Illuminate\Http\Request $request
+ * @param mixed $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getSpeciesFeatures($id)
- {
+ public function getSpeciesFeatures($id) {
$categories = FeatureCategory::orderBy('sort', 'DESC')->get();
$rarities = Rarity::orderBy('sort', 'ASC')->get();
$species = Species::where('id', $id)->first();
- if(!$species) abort(404);
- if(!Config::get('lorekeeper.extensions.species_trait_index')) abort(404);
+ if (!$species) {
+ abort(404);
+ }
+ if (!Config::get('lorekeeper.extensions.species_trait_index')) {
+ abort(404);
+ }
$features = count($categories) ?
$species->features()
@@ -228,33 +237,33 @@ public function getSpeciesFeatures($id)
->groupBy(['feature_category_id', 'id']);
return view('world.species_features', [
- 'species' => $species,
+ 'species' => $species,
'categories' => $categories->keyBy('id'),
- 'rarities' => $rarities->keyBy('id'),
- 'features' => $features,
+ 'rarities' => $rarities->keyBy('id'),
+ 'features' => $features,
]);
}
/**
* Shows the items page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getItems(Request $request)
- {
+ public function getItems(Request $request) {
$query = Item::with('category')->released();
$data = $request->only(['item_category_id', 'name', 'sort', 'artist']);
- if(isset($data['item_category_id']) && $data['item_category_id'] != 'none')
+ if (isset($data['item_category_id']) && $data['item_category_id'] != 'none') {
$query->where('item_category_id', $data['item_category_id']);
- if(isset($data['name']))
+ }
+ if (isset($data['name'])) {
$query->where('name', 'LIKE', '%'.$data['name'].'%');
- if(isset($data['artist']) && $data['artist'] != 'none')
+ }
+ if (isset($data['artist']) && $data['artist'] != 'none') {
$query->where('artist_id', $data['artist']);
+ }
- if(isset($data['sort']))
- {
- switch($data['sort']) {
+ if (isset($data['sort'])) {
+ switch ($data['sort']) {
case 'alpha':
$query->sortAlphabetical();
break;
@@ -271,50 +280,54 @@ public function getItems(Request $request)
$query->sortOldest();
break;
}
+ } else {
+ $query->sortCategory();
}
- else $query->sortCategory();
return view('world.items', [
- 'items' => $query->paginate(20)->appends($request->query()),
+ 'items' => $query->paginate(20)->appends($request->query()),
'categories' => ['none' => 'Any Category'] + ItemCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'shops' => Shop::orderBy('sort', 'DESC')->get(),
- 'artists' => ['none' => 'Any Artist'] + User::whereIn('id', Item::whereNotNull('artist_id')->pluck('artist_id')->toArray())->pluck('name', 'id')->toArray()
+ 'shops' => Shop::orderBy('sort', 'DESC')->get(),
+ 'artists' => ['none' => 'Any Artist'] + User::whereIn('id', Item::whereNotNull('artist_id')->pluck('artist_id')->toArray())->pluck('name', 'id')->toArray(),
]);
}
/**
* Shows an individual item's page.
*
- * @param int $id
+ * @param int $id
+ *
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getItem($id)
- {
+ public function getItem($id) {
$categories = ItemCategory::orderBy('sort', 'DESC')->get();
$item = Item::where('id', $id)->released()->first();
- if(!$item) abort(404);
+ if (!$item) {
+ abort(404);
+ }
return view('world.item_page', [
- 'item' => $item,
- 'imageUrl' => $item->imageUrl,
- 'name' => $item->displayName,
+ 'item' => $item,
+ 'imageUrl' => $item->imageUrl,
+ 'name' => $item->displayName,
'description' => $item->parsed_description,
- 'categories' => $categories->keyBy('id'),
- 'shops' => Shop::whereIn('id', ShopStock::where('item_id', $item->id)->pluck('shop_id')->unique()->toArray())->orderBy('sort', 'DESC')->get()
+ 'categories' => $categories->keyBy('id'),
+ 'shops' => Shop::whereIn('id', ShopStock::where('item_id', $item->id)->pluck('shop_id')->unique()->toArray())->orderBy('sort', 'DESC')->get(),
]);
}
/**
* Shows the character categories page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getCharacterCategories(Request $request)
- {
+ public function getCharacterCategories(Request $request) {
$query = CharacterCategory::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%')->orWhere('code', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%')->orWhere('code', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.character_categories', [
'categories' => $query->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
@@ -323,14 +336,15 @@ public function getCharacterCategories(Request $request)
/**
* Shows the prompt categories page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPromptCategories(Request $request)
- {
+ public function getPromptCategories(Request $request) {
$query = PromptCategory::query();
$name = $request->get('name');
- if($name) $query->where('name', 'LIKE', '%'.$name.'%');
+ if ($name) {
+ $query->where('name', 'LIKE', '%'.$name.'%');
+ }
+
return view('world.prompt_categories', [
'categories' => $query->orderBy('sort', 'DESC')->paginate(20)->appends($request->query()),
]);
@@ -339,21 +353,20 @@ public function getPromptCategories(Request $request)
/**
* Shows the prompts page.
*
- * @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\Support\Renderable
*/
- public function getPrompts(Request $request)
- {
+ public function getPrompts(Request $request) {
$query = Prompt::active()->with('category');
$data = $request->only(['prompt_category_id', 'name', 'sort']);
- if(isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none')
+ if (isset($data['prompt_category_id']) && $data['prompt_category_id'] != 'none') {
$query->where('prompt_category_id', $data['prompt_category_id']);
- if(isset($data['name']))
+ }
+ if (isset($data['name'])) {
$query->where('name', 'LIKE', '%'.$data['name'].'%');
+ }
- if(isset($data['sort']))
- {
- switch($data['sort']) {
+ if (isset($data['sort'])) {
+ switch ($data['sort']) {
case 'alpha':
$query->sortAlphabetical();
break;
@@ -382,12 +395,13 @@ public function getPrompts(Request $request)
$query->sortEnd(true);
break;
}
+ } else {
+ $query->sortCategory();
}
- else $query->sortCategory();
return view('world.prompts', [
- 'prompts' => $query->paginate(20)->appends($request->query()),
- 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray()
+ 'prompts' => $query->paginate(20)->appends($request->query()),
+ 'categories' => ['none' => 'Any Category'] + PromptCategory::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
]);
}
}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 42e0582a34..2f3909e56d 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -4,8 +4,7 @@
use Illuminate\Foundation\Http\Kernel as HttpKernel;
-class Kernel extends HttpKernel
-{
+class Kernel extends HttpKernel {
/**
* The application's global HTTP middleware stack.
*
@@ -51,19 +50,19 @@ class Kernel extends HttpKernel
* @var array
*/
protected $routeMiddleware = [
- 'auth' => \App\Http\Middleware\Authenticate::class,
- 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
- 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
+ 'auth' => \App\Http\Middleware\Authenticate::class,
+ 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
+ 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
- 'can' => \Illuminate\Auth\Middleware\Authorize::class,
- 'alias' => \App\Http\Middleware\CheckAlias::class,
- 'power' => \App\Http\Middleware\CheckPower::class,
- 'admin' => \App\Http\Middleware\CheckAdmin::class,
- 'staff' => \App\Http\Middleware\CheckStaff::class,
- 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
- 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
- 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
- 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
+ 'can' => \Illuminate\Auth\Middleware\Authorize::class,
+ 'alias' => \App\Http\Middleware\CheckAlias::class,
+ 'power' => \App\Http\Middleware\CheckPower::class,
+ 'admin' => \App\Http\Middleware\CheckAdmin::class,
+ 'staff' => \App\Http\Middleware\CheckStaff::class,
+ 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
+ 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
+ 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
+ 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
/**
diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php
index a4be5c587e..77c91f7306 100644
--- a/app/Http/Middleware/Authenticate.php
+++ b/app/Http/Middleware/Authenticate.php
@@ -4,17 +4,16 @@
use Illuminate\Auth\Middleware\Authenticate as Middleware;
-class Authenticate extends Middleware
-{
+class Authenticate extends Middleware {
/**
* Get the path the user should be redirected to when they are not authenticated.
*
- * @param \Illuminate\Http\Request $request
+ * @param \Illuminate\Http\Request $request
+ *
* @return string
*/
- protected function redirectTo($request)
- {
- if (! $request->expectsJson()) {
+ protected function redirectTo($request) {
+ if (!$request->expectsJson()) {
return route('login');
}
}
diff --git a/app/Http/Middleware/CheckAdmin.php b/app/Http/Middleware/CheckAdmin.php
index c8a4d96b8a..1dc98076e2 100644
--- a/app/Http/Middleware/CheckAdmin.php
+++ b/app/Http/Middleware/CheckAdmin.php
@@ -4,19 +4,18 @@
use Closure;
-class CheckAdmin
-{
+class CheckAdmin {
/**
* Redirect non-admins to the home page.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
+ * @param \Illuminate\Http\Request $request
+ *
* @return mixed
*/
- public function handle($request, Closure $next)
- {
+ public function handle($request, Closure $next) {
if (!$request->user()->isAdmin) {
flash('You do not have the permission to access this page.')->error();
+
return redirect('/');
}
diff --git a/app/Http/Middleware/CheckAlias.php b/app/Http/Middleware/CheckAlias.php
index 4f7eff0b91..364263b37f 100644
--- a/app/Http/Middleware/CheckAlias.php
+++ b/app/Http/Middleware/CheckAlias.php
@@ -4,28 +4,26 @@
use Closure;
-class CheckAlias
-{
+class CheckAlias {
/**
* Redirects users without an alias to the dA account linking page,
* and banned users to the ban page.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
+ * @param \Illuminate\Http\Request $request
+ *
* @return mixed
*/
- public function handle($request, Closure $next)
- {
- if(!$request->user()->has_alias) {
+ public function handle($request, Closure $next) {
+ if (!$request->user()->has_alias) {
return redirect('/link');
}
- if(!$request->user()->birthday) {
+ if (!$request->user()->birthday) {
return redirect('/birthday');
}
- if(!$request->user()->checkBirthday) {
+ if (!$request->user()->checkBirthday) {
return redirect('/blocked');
}
- if($request->user()->is_banned) {
+ if ($request->user()->is_banned) {
return redirect('/banned');
}
diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php
index 35b9824bae..86fa3eb97f 100644
--- a/app/Http/Middleware/CheckForMaintenanceMode.php
+++ b/app/Http/Middleware/CheckForMaintenanceMode.php
@@ -4,8 +4,7 @@
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;
-class CheckForMaintenanceMode extends Middleware
-{
+class CheckForMaintenanceMode extends Middleware {
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
diff --git a/app/Http/Middleware/CheckPower.php b/app/Http/Middleware/CheckPower.php
index ecec711f85..b5eb7770f8 100644
--- a/app/Http/Middleware/CheckPower.php
+++ b/app/Http/Middleware/CheckPower.php
@@ -4,19 +4,19 @@
use Closure;
-class CheckPower
-{
+class CheckPower {
/**
* Check if the user has the power to access the current page.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
+ * @param \Illuminate\Http\Request $request
+ * @param mixed $power
+ *
* @return mixed
*/
- public function handle($request, Closure $next, $power)
- {
+ public function handle($request, Closure $next, $power) {
if (!$request->user()->hasPower($power)) {
flash('You do not have the permission to access this page.')->error();
+
return redirect('/');
}
diff --git a/app/Http/Middleware/CheckStaff.php b/app/Http/Middleware/CheckStaff.php
index 481587bd00..966e007b71 100644
--- a/app/Http/Middleware/CheckStaff.php
+++ b/app/Http/Middleware/CheckStaff.php
@@ -4,19 +4,18 @@
use Closure;
-class CheckStaff
-{
+class CheckStaff {
/**
* Check if the user is a staff member.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
+ * @param \Illuminate\Http\Request $request
+ *
* @return mixed
*/
- public function handle($request, Closure $next)
- {
+ public function handle($request, Closure $next) {
if (!$request->user()->isStaff) {
flash('You do not have the permission to access this page.')->error();
+
return redirect('/');
}
diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php
index 033136ad12..61dc55764c 100644
--- a/app/Http/Middleware/EncryptCookies.php
+++ b/app/Http/Middleware/EncryptCookies.php
@@ -4,8 +4,7 @@
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
-class EncryptCookies extends Middleware
-{
+class EncryptCookies extends Middleware {
/**
* The names of the cookies that should not be encrypted.
*
diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php
index e27860e24e..7c83bcbaef 100644
--- a/app/Http/Middleware/RedirectIfAuthenticated.php
+++ b/app/Http/Middleware/RedirectIfAuthenticated.php
@@ -5,18 +5,16 @@
use Closure;
use Illuminate\Support\Facades\Auth;
-class RedirectIfAuthenticated
-{
+class RedirectIfAuthenticated {
/**
* Handle an incoming request.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
- * @param string|null $guard
+ * @param \Illuminate\Http\Request $request
+ * @param string|null $guard
+ *
* @return mixed
*/
- public function handle($request, Closure $next, $guard = null)
- {
+ public function handle($request, Closure $next, $guard = null) {
if (Auth::guard($guard)->check()) {
return redirect('/');
}
diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php
index 5a50e7b5c8..da84164695 100644
--- a/app/Http/Middleware/TrimStrings.php
+++ b/app/Http/Middleware/TrimStrings.php
@@ -4,8 +4,7 @@
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
-class TrimStrings extends Middleware
-{
+class TrimStrings extends Middleware {
/**
* The names of the attributes that should not be trimmed.
*
diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php
index 7daf51f165..a5917f043e 100644
--- a/app/Http/Middleware/TrustProxies.php
+++ b/app/Http/Middleware/TrustProxies.php
@@ -2,11 +2,10 @@
namespace App\Http\Middleware;
-use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
+use Illuminate\Http\Request;
-class TrustProxies extends Middleware
-{
+class TrustProxies extends Middleware {
/**
* The trusted proxies for this application.
*
diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php
index 324a166bc9..4b2fc45403 100644
--- a/app/Http/Middleware/VerifyCsrfToken.php
+++ b/app/Http/Middleware/VerifyCsrfToken.php
@@ -4,8 +4,7 @@
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
-class VerifyCsrfToken extends Middleware
-{
+class VerifyCsrfToken extends Middleware {
/**
* Indicates whether the XSRF-TOKEN cookie should be set on the response.
*
diff --git a/app/Models/Character/Character.php b/app/Models/Character/Character.php
index 69e4d1565c..e3f44acd3b 100644
--- a/app/Models/Character/Character.php
+++ b/app/Models/Character/Character.php
@@ -2,34 +2,21 @@
namespace App\Models\Character;
-use Config;
-use DB;
-use Carbon\Carbon;
-use Notifications;
-use App\Models\Model;
-
-use App\Models\User\User;
-use App\Models\User\UserCharacterLog;
-
-use App\Models\Character\Character;
-use App\Models\Character\CharacterCategory;
-use App\Models\Character\CharacterTransfer;
-use App\Models\Character\CharacterBookmark;
-
-use App\Models\Character\CharacterCurrency;
use App\Models\Currency\Currency;
use App\Models\Currency\CurrencyLog;
-
-use App\Models\Character\CharacterItem;
use App\Models\Item\Item;
use App\Models\Item\ItemLog;
+use App\Models\Model;
use App\Models\Submission\Submission;
use App\Models\Submission\SubmissionCharacter;
+use App\Models\User\User;
+use App\Models\User\UserCharacterLog;
+use Carbon\Carbon;
use Illuminate\Database\Eloquent\SoftDeletes;
+use Notifications;
-class Character extends Model
-{
+class Character extends Model {
use SoftDeletes;
/**
@@ -43,7 +30,7 @@ class Character extends Model
'is_sellable', 'is_tradeable', 'is_giftable',
'sale_value', 'transferrable_at', 'is_visible',
'is_gift_art_allowed', 'is_gift_writing_allowed', 'is_trading', 'sort',
- 'is_myo_slot', 'name', 'trade_id', 'owner_url'
+ 'is_myo_slot', 'name', 'trade_id', 'owner_url',
];
/**
@@ -81,15 +68,15 @@ class Character extends Model
*/
public static $createRules = [
'character_category_id' => 'required',
- 'rarity_id' => 'required',
- 'user_id' => 'nullable',
- 'number' => 'required',
- 'slug' => 'required|alpha_dash',
- 'description' => 'nullable',
- 'sale_value' => 'nullable',
- 'image' => 'required|mimes:jpeg,jpg,gif,png|max:20000',
- 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png|max:20000',
- 'owner_url' => 'url|nullable',
+ 'rarity_id' => 'required',
+ 'user_id' => 'nullable',
+ 'number' => 'required',
+ 'slug' => 'required|alpha_dash',
+ 'description' => 'nullable',
+ 'sale_value' => 'nullable',
+ 'image' => 'required|mimes:jpeg,jpg,gif,png|max:20000',
+ 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png|max:20000',
+ 'owner_url' => 'url|nullable',
];
/**
@@ -99,10 +86,10 @@ class Character extends Model
*/
public static $updateRules = [
'character_category_id' => 'required',
- 'number' => 'required',
- 'slug' => 'required',
- 'description' => 'nullable',
- 'sale_value' => 'nullable',
+ 'number' => 'required',
+ 'slug' => 'required',
+ 'description' => 'nullable',
+ 'sale_value' => 'nullable',
];
/**
@@ -111,15 +98,15 @@ class Character extends Model
* @var array
*/
public static $myoRules = [
- 'rarity_id' => 'nullable',
- 'user_id' => 'nullable',
- 'number' => 'nullable',
- 'slug' => 'nullable',
+ 'rarity_id' => 'nullable',
+ 'user_id' => 'nullable',
+ 'number' => 'nullable',
+ 'slug' => 'nullable',
'description' => 'nullable',
- 'sale_value' => 'nullable',
- 'name' => 'required',
- 'image' => 'nullable|mimes:jpeg,gif,png|max:20000',
- 'thumbnail' => 'nullable|mimes:jpeg,gif,png|max:20000',
+ 'sale_value' => 'nullable',
+ 'name' => 'required',
+ 'image' => 'nullable|mimes:jpeg,gif,png|max:20000',
+ 'thumbnail' => 'nullable|mimes:jpeg,gif,png|max:20000',
];
/**********************************************************************************************
@@ -131,80 +118,72 @@ class Character extends Model
/**
* Get the user who owns the character.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**
* Get the category the character belongs to.
*/
- public function category()
- {
+ public function category() {
return $this->belongsTo('App\Models\Character\CharacterCategory', 'character_category_id');
}
/**
* Get the masterlist image of the character.
*/
- public function image()
- {
+ public function image() {
return $this->belongsTo('App\Models\Character\CharacterImage', 'character_image_id');
}
/**
* Get all images associated with the character.
+ *
+ * @param mixed|null $user
*/
- public function images($user = null)
- {
+ public function images($user = null) {
return $this->hasMany('App\Models\Character\CharacterImage', 'character_id')->images($user);
}
/**
* Get the user-editable profile data of the character.
*/
- public function profile()
- {
+ public function profile() {
return $this->hasOne('App\Models\Character\CharacterProfile', 'character_id');
}
/**
* Get the character's active design update.
*/
- public function designUpdate()
- {
+ public function designUpdate() {
return $this->hasMany('App\Models\Character\CharacterDesignUpdate', 'character_id');
}
/**
* Get the trade this character is attached to.
*/
- public function trade()
- {
+ public function trade() {
return $this->belongsTo('App\Models\Trade', 'trade_id');
}
/**
* Get the rarity of this character.
*/
- public function rarity()
- {
+ public function rarity() {
return $this->belongsTo('App\Models\Rarity', 'rarity_id');
}
/**
* Get the character's associated gallery submissions.
*/
- public function gallerySubmissions()
- {
+ public function gallerySubmissions() {
return $this->hasMany('App\Models\Gallery\GalleryCharacter', 'character_id');
}
/**
* Get the character's items.
*/
- public function items()
- {
+ public function items() {
return $this->belongsToMany('App\Models\Item\Item', 'character_items')->withPivot('count', 'data', 'updated_at', 'id')->whereNull('character_items.deleted_at');
}
@@ -217,49 +196,49 @@ public function items()
/**
* Scope a query to only include either characters of MYO slots.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $isMyo
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param bool $isMyo
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeMyo($query, $isMyo = false)
- {
+ public function scopeMyo($query, $isMyo = false) {
return $query->where('is_myo_slot', $isMyo);
}
/**
* Scope a query to only include visible characters.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query)
- {
+ public function scopeVisible($query) {
return $query->where('is_visible', 1);
}
/**
* Scope a query to only include characters that the owners are interested in trading.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeTrading($query)
- {
+ public function scopeTrading($query) {
return $query->where('is_trading', 1);
}
/**
* Scope a query to only include characters that can be traded.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeTradable($query)
- {
- return $query->where(function($query) {
+ public function scopeTradable($query) {
+ return $query->where(function ($query) {
$query->whereNull('transferrable_at')->orWhere('transferrable_at', '<', Carbon::now());
- })->where(function($query) {
- $query->where('is_sellable', 1)->orWhere('is_tradeable', 1)->orWhere('is_giftable', 1);
+ })->where(function ($query) {
+ $query->where('is_sellable', 1)->orWhere('is_tradeable', 1)->orWhere('is_giftable', 1);
});
}
@@ -274,11 +253,17 @@ public function scopeTradable($query)
*
* @return bool
*/
- public function getIsAvailableAttribute()
- {
- if($this->designUpdate()->active()->exists()) return false;
- if($this->trade_id) return false;
- if(CharacterTransfer::active()->where('character_id', $this->id)->exists()) return false;
+ public function getIsAvailableAttribute() {
+ if ($this->designUpdate()->active()->exists()) {
+ return false;
+ }
+ if ($this->trade_id) {
+ return false;
+ }
+ if (CharacterTransfer::active()->where('character_id', $this->id)->exists()) {
+ return false;
+ }
+
return true;
}
@@ -288,10 +273,12 @@ public function getIsAvailableAttribute()
*
* @return string
*/
- public function getDisplayOwnerAttribute()
- {
- if($this->user_id) return $this->user->displayName;
- else return prettyProfileLink($this->owner_url);
+ public function getDisplayOwnerAttribute() {
+ if ($this->user_id) {
+ return $this->user->displayName;
+ } else {
+ return prettyProfileLink($this->owner_url);
+ }
}
/**
@@ -300,10 +287,12 @@ public function getDisplayOwnerAttribute()
*
* @return string
*/
- public function getSlugAttribute()
- {
- if($this->is_myo_slot) return $this->name;
- else return $this->attributes['slug'];
+ public function getSlugAttribute() {
+ if ($this->is_myo_slot) {
+ return $this->name;
+ } else {
+ return $this->attributes['slug'];
+ }
}
/**
@@ -311,8 +300,7 @@ public function getSlugAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->fullName.' ';
}
@@ -322,10 +310,12 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getFullNameAttribute()
- {
- if($this->is_myo_slot) return $this->name;
- else return $this->slug . ($this->name ? ': '.$this->name : '');
+ public function getFullNameAttribute() {
+ if ($this->is_myo_slot) {
+ return $this->name;
+ } else {
+ return $this->slug.($this->name ? ': '.$this->name : '');
+ }
}
/**
@@ -333,10 +323,12 @@ public function getFullNameAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
- if($this->is_myo_slot) return url('myo/'.$this->id);
- else return url('character/'.$this->slug);
+ public function getUrlAttribute() {
+ if ($this->is_myo_slot) {
+ return url('myo/'.$this->id);
+ } else {
+ return url('character/'.$this->slug);
+ }
}
/**
@@ -344,8 +336,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'characters';
}
@@ -354,8 +345,7 @@ public function getAssetTypeAttribute()
*
* @return string
*/
- public function getLogTypeAttribute()
- {
+ public function getLogTypeAttribute() {
return 'Character';
}
@@ -368,14 +358,15 @@ public function getLogTypeAttribute()
/**
* Checks if the character's owner has registered on the site and updates ownership accordingly.
*/
- public function updateOwner()
- {
+ public function updateOwner() {
// Return if the character has an owner on the site already.
- if($this->user_id) return;
+ if ($this->user_id) {
+ return;
+ }
// Check if the owner has an account and update the character's user ID for them.
$owner = checkAlias($this->owner_url);
- if(is_object($owner)) {
+ if (is_object($owner)) {
$this->user_id = $owner->id;
$this->owner_url = null;
$this->save();
@@ -388,11 +379,11 @@ public function updateOwner()
/**
* Get the character's held currencies.
*
- * @param bool $displayedOnly
+ * @param bool $displayedOnly
+ *
* @return \Illuminate\Support\Collection
*/
- public function getCurrencies($displayedOnly = false)
- {
+ public function getCurrencies($displayedOnly = false) {
// Get a list of currencies that need to be displayed
// On profile: only ones marked is_displayed
// In bank: ones marked is_displayed + the ones the user has
@@ -400,15 +391,18 @@ public function getCurrencies($displayedOnly = false)
$owned = CharacterCurrency::where('character_id', $this->id)->pluck('quantity', 'currency_id')->toArray();
$currencies = Currency::where('is_character_owned', 1);
- if($displayedOnly) $currencies->where(function($query) use($owned) {
- $query->where('is_displayed', 1)->orWhereIn('id', array_keys($owned));
- });
- else $currencies = $currencies->where('is_displayed', 1);
+ if ($displayedOnly) {
+ $currencies->where(function ($query) use ($owned) {
+ $query->where('is_displayed', 1)->orWhereIn('id', array_keys($owned));
+ });
+ } else {
+ $currencies = $currencies->where('is_displayed', 1);
+ }
$currencies = $currencies->orderBy('sort_character', 'DESC')->get();
- foreach($currencies as $currency) {
- $currency->quantity = isset($owned[$currency->id]) ? $owned[$currency->id] : 0;
+ foreach ($currencies as $currency) {
+ $currency->quantity = $owned[$currency->id] ?? 0;
}
return $currencies;
@@ -419,47 +413,52 @@ public function getCurrencies($displayedOnly = false)
*
* @return array
*/
- public function getCurrencySelect()
- {
+ public function getCurrencySelect() {
return CharacterCurrency::where('character_id', $this->id)->leftJoin('currencies', 'character_currencies.currency_id', '=', 'currencies.id')->orderBy('currencies.sort_character', 'DESC')->get()->pluck('name_with_quantity', 'currency_id')->toArray();
}
/**
* Get the character's currency logs.
*
- * @param int $limit
- * @return \Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator
+ * @param int $limit
+ *
+ * @return \Illuminate\Pagination\LengthAwarePaginator|\Illuminate\Support\Collection
*/
- public function getCurrencyLogs($limit = 10)
- {
+ public function getCurrencyLogs($limit = 10) {
$character = $this;
- $query = CurrencyLog::with('currency')->where(function($query) use ($character) {
+ $query = CurrencyLog::with('currency')->where(function ($query) use ($character) {
$query->with('sender.rank')->where('sender_type', 'Character')->where('sender_id', $character->id)->where('log_type', '!=', 'Staff Grant');
- })->orWhere(function($query) use ($character) {
+ })->orWhere(function ($query) use ($character) {
$query->with('recipient.rank')->where('recipient_type', 'Character')->where('recipient_id', $character->id)->where('log_type', '!=', 'Staff Removal');
})->orderBy('id', 'DESC');
- if($limit) return $query->take($limit)->get();
- else return $query->paginate(30);
+ if ($limit) {
+ return $query->take($limit)->get();
+ } else {
+ return $query->paginate(30);
+ }
}
/**
* Get the character's item logs.
*
- * @param int $limit
- * @return \Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator
+ * @param int $limit
+ *
+ * @return \Illuminate\Pagination\LengthAwarePaginator|\Illuminate\Support\Collection
*/
- public function getItemLogs($limit = 10)
- {
+ public function getItemLogs($limit = 10) {
$character = $this;
- $query = ItemLog::with('item')->where(function($query) use ($character) {
+ $query = ItemLog::with('item')->where(function ($query) use ($character) {
$query->with('sender.rank')->where('sender_type', 'Character')->where('sender_id', $character->id)->where('log_type', '!=', 'Staff Grant');
- })->orWhere(function($query) use ($character) {
+ })->orWhere(function ($query) use ($character) {
$query->with('recipient.rank')->where('recipient_type', 'Character')->where('recipient_id', $character->id)->where('log_type', '!=', 'Staff Removal');
})->orderBy('id', 'DESC');
- if($limit) return $query->take($limit)->get();
- else return $query->paginate(30);
+ if ($limit) {
+ return $query->take($limit)->get();
+ } else {
+ return $query->paginate(30);
+ }
}
/**
@@ -467,9 +466,9 @@ public function getItemLogs($limit = 10)
*
* @return \Illuminate\Pagination\LengthAwarePaginator
*/
- public function getOwnershipLogs()
- {
+ public function getOwnershipLogs() {
$query = UserCharacterLog::with('sender.rank')->with('recipient.rank')->where('character_id', $this->id)->orderBy('id', 'DESC');
+
return $query->paginate(30);
}
@@ -478,9 +477,9 @@ public function getOwnershipLogs()
*
* @return \Illuminate\Pagination\LengthAwarePaginator
*/
- public function getCharacterLogs()
- {
+ public function getCharacterLogs() {
$query = CharacterLog::with('sender.rank')->where('character_id', $this->id)->orderBy('id', 'DESC');
+
return $query->paginate(30);
}
@@ -489,8 +488,7 @@ public function getCharacterLogs()
*
* @return \Illuminate\Pagination\LengthAwarePaginator
*/
- public function getSubmissions()
- {
+ public function getSubmissions() {
return Submission::with('user.rank')->with('prompt')->where('status', 'Approved')->whereIn('id', SubmissionCharacter::where('character_id', $this->id)->pluck('submission_id')->toArray())->paginate(30);
// Untested
@@ -506,13 +504,14 @@ public function getSubmissions()
/**
* Notifies character's bookmarkers in case of a change.
+ *
+ * @param mixed $type
*/
- public function notifyBookmarkers($type)
- {
+ public function notifyBookmarkers($type) {
// Bookmarkers will not be notified if the character is set to not visible
- if($this->is_visible) {
+ if ($this->is_visible) {
$column = null;
- switch($type) {
+ switch ($type) {
case 'BOOKMARK_TRADING':
$column = 'notify_on_trade_status';
break;
@@ -533,17 +532,20 @@ public function notifyBookmarkers($type)
// The owner of the character themselves will not be notified, in the case that
// they still have a bookmark on the character after it was transferred to them
$bookmarkers = CharacterBookmark::where('character_id', $this->id)->where('user_id', '!=', $this->user_id);
- if($column) $bookmarkers = $bookmarkers->where($column, 1);
+ if ($column) {
+ $bookmarkers = $bookmarkers->where($column, 1);
+ }
$bookmarkers = User::whereIn('id', $bookmarkers->pluck('user_id')->toArray())->get();
// This may have to be redone more efficiently in the case of large numbers of bookmarkers,
// but since we're not expecting many users on the site to begin with it should be fine
- foreach($bookmarkers as $bookmarker)
+ foreach ($bookmarkers as $bookmarker) {
Notifications::create($type, $bookmarker, [
- 'character_url' => $this->url,
- 'character_name' => $this->fullName
+ 'character_url' => $this->url,
+ 'character_name' => $this->fullName,
]);
+ }
}
}
}
diff --git a/app/Models/Character/CharacterBookmark.php b/app/Models/Character/CharacterBookmark.php
index 11eddc19ec..4a473b66f9 100644
--- a/app/Models/Character/CharacterBookmark.php
+++ b/app/Models/Character/CharacterBookmark.php
@@ -4,25 +4,23 @@
use App\Models\Model;
-class CharacterBookmark extends Model
-{
-
+class CharacterBookmark extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'user_id', 'character_id', 'notify_on_trade_status', 'notify_on_gift_art_status', 'notify_on_gift_writing_status', 'notify_on_transfer', 'notify_on_image', 'comment'
+ 'user_id', 'character_id', 'notify_on_trade_status', 'notify_on_gift_art_status', 'notify_on_gift_writing_status', 'notify_on_transfer', 'notify_on_image', 'comment',
];
-
+
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'character_bookmarks';
-
+
/**
* Validation rules for creation.
*
@@ -30,20 +28,20 @@ class CharacterBookmark extends Model
*/
public static $createRules = [
'character_id' => 'required',
- 'comment' => 'string|nullable|max:500'
+ 'comment' => 'string|nullable|max:500',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'comment' => 'string|nullable|max:500'
+ 'comment' => 'string|nullable|max:500',
];
/**********************************************************************************************
-
+
SCOPES
**********************************************************************************************/
@@ -51,18 +49,18 @@ class CharacterBookmark extends Model
/**
* Scope a query to only include visible characters.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query)
- {
- return $query->whereHas('character', function($query) {
+ public function scopeVisible($query) {
+ return $query->whereHas('character', function ($query) {
$query->where('is_visible', 1);
});
}
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -70,16 +68,14 @@ public function scopeVisible($query)
/**
* Get the character the record belongs to.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character');
}
-
+
/**
* Get the user the record belongs to.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
}
diff --git a/app/Models/Character/CharacterCategory.php b/app/Models/Character/CharacterCategory.php
index a045426e44..54d1306c03 100644
--- a/app/Models/Character/CharacterCategory.php
+++ b/app/Models/Character/CharacterCategory.php
@@ -2,18 +2,16 @@
namespace App\Models\Character;
-use Config;
use App\Models\Model;
-class CharacterCategory extends Model
-{
+class CharacterCategory extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'code', 'name', 'sort', 'has_image', 'description', 'parsed_description', 'masterlist_sub_id'
+ 'code', 'name', 'sort', 'has_image', 'description', 'parsed_description', 'masterlist_sub_id',
];
/**
@@ -22,58 +20,56 @@ class CharacterCategory extends Model
* @var string
*/
protected $table = 'character_categories';
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:character_categories|between:3,100',
- 'code' => 'required|unique:character_categories|between:1,25',
+ 'name' => 'required|unique:character_categories|between:3,100',
+ 'code' => 'required|unique:character_categories|between:1,25',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
- 'code' => 'required|between:1,25',
+ 'name' => 'required|between:3,100',
+ 'code' => 'required|between:1,25',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the sub masterlist for this species.
*/
- public function sublist()
- {
+ public function sublist() {
return $this->belongsTo('App\Models\Character\Sublist', 'masterlist_sub_id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Displays the model's name, linked to its encyclopedia page.
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ('.$this->code.') ';
}
@@ -82,8 +78,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/character-categories';
}
@@ -92,9 +87,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getCategoryImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getCategoryImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -102,20 +96,21 @@ public function getCategoryImageFileNameAttribute()
*
* @return string
*/
- public function getCategoryImagePathAttribute()
- {
+ public function getCategoryImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getCategoryImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->categoryImageFileName);
+ public function getCategoryImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->categoryImageFileName);
}
/**
@@ -123,8 +118,7 @@ public function getCategoryImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/character-categories?name='.$this->name);
}
@@ -133,11 +127,11 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getSearchUrlAttribute()
- {
- if($this->masterlist_sub_id != 0 && $this->sublist->show_main == 0)
- return url('sublist/'.$this->sublist->key.'?character_category_id='.$this->id);
- else
- return url('masterlist?character_category_id='.$this->id);
+ public function getSearchUrlAttribute() {
+ if ($this->masterlist_sub_id != 0 && $this->sublist->show_main == 0) {
+ return url('sublist/'.$this->sublist->key.'?character_category_id='.$this->id);
+ } else {
+ return url('masterlist?character_category_id='.$this->id);
+ }
}
}
diff --git a/app/Models/Character/CharacterCurrency.php b/app/Models/Character/CharacterCurrency.php
index 75366234bc..1e6bc7d973 100644
--- a/app/Models/Character/CharacterCurrency.php
+++ b/app/Models/Character/CharacterCurrency.php
@@ -4,18 +4,16 @@
use App\Models\Model;
-class CharacterCurrency extends Model
-{
-
+class CharacterCurrency extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'quantity', 'character_id', 'currency_id'
+ 'quantity', 'character_id', 'currency_id',
];
-
+
/**
* The table associated with the model.
*
@@ -24,7 +22,7 @@ class CharacterCurrency extends Model
protected $table = 'character_currencies';
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -32,32 +30,29 @@ class CharacterCurrency extends Model
/**
* Get the character the record belongs to.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character');
}
-
+
/**
* Get the currency associated with this record.
*/
- public function currency()
- {
+ public function currency() {
return $this->belongsTo('App\Models\Currency\Currency');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
/**
* Get the name of the currency formatted with the quantity owned.
- *
+ *
* @return string
*/
- public function getNameWithQuantityAttribute()
- {
- return $this->currency->name . ' [Owned: ' . $this->quantity . ']';
+ public function getNameWithQuantityAttribute() {
+ return $this->currency->name.' [Owned: '.$this->quantity.']';
}
}
diff --git a/app/Models/Character/CharacterDesignUpdate.php b/app/Models/Character/CharacterDesignUpdate.php
index 332cc48b07..7efd0e773b 100644
--- a/app/Models/Character/CharacterDesignUpdate.php
+++ b/app/Models/Character/CharacterDesignUpdate.php
@@ -2,15 +2,13 @@
namespace App\Models\Character;
-use Config;
-use DB;
-use App\Models\Model;
use App\Models\Currency\Currency;
use App\Models\Feature\FeatureCategory;
+use App\Models\Model;
+use DB;
use Illuminate\Database\Eloquent\SoftDeletes;
-class CharacterDesignUpdate extends Model
-{
+class CharacterDesignUpdate extends Model {
use SoftDeletes;
/**
@@ -24,8 +22,8 @@ class CharacterDesignUpdate extends Model
'use_cropper', 'x0', 'x1', 'y0', 'y1',
'hash', 'species_id', 'subtype_id', 'rarity_id',
'has_comments', 'has_image', 'has_addons', 'has_features',
- 'submitted_at', 'update_type', 'fullsize_hash',
- 'approval_votes', 'rejection_votes'
+ 'submitted_at', 'update_type', 'fullsize_hash',
+ 'approval_votes', 'rejection_votes',
];
/**
@@ -55,10 +53,10 @@ class CharacterDesignUpdate extends Model
* @var array
*/
public static $imageRules = [
- 'image' => 'nullable|mimes:jpeg,gif,png',
- 'thumbnail' => 'nullable|mimes:jpeg,gif,png',
- 'artist_url.*' => 'nullable|url',
- 'designer_url.*' => 'nullable|url'
+ 'image' => 'nullable|mimes:jpeg,gif,png',
+ 'thumbnail' => 'nullable|mimes:jpeg,gif,png',
+ 'artist_url.*' => 'nullable|url',
+ 'designer_url.*' => 'nullable|url',
];
/**********************************************************************************************
@@ -70,56 +68,49 @@ class CharacterDesignUpdate extends Model
/**
* Get the character associated with the design update.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character', 'character_id');
}
/**
* Get the user who created the design update.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**
* Get the staff who processed the design update.
*/
- public function staff()
- {
+ public function staff() {
return $this->belongsTo('App\Models\User\User', 'staff_id');
}
/**
* Get the species of the design update.
*/
- public function species()
- {
+ public function species() {
return $this->belongsTo('App\Models\Species\Species', 'species_id');
}
/**
* Get the subtype of the design update.
*/
- public function subtype()
- {
+ public function subtype() {
return $this->belongsTo('App\Models\Species\Subtype', 'subtype_id');
}
/**
* Get the rarity of the design update.
*/
- public function rarity()
- {
+ public function rarity() {
return $this->belongsTo('App\Models\Rarity', 'rarity_id');
}
/**
* Get the features (traits) attached to the design update, ordered by display order.
*/
- public function features()
- {
+ public function features() {
$ids = FeatureCategory::orderBy('sort', 'DESC')->pluck('id')->toArray();
$query = $this->hasMany('App\Models\Character\CharacterFeature', 'character_image_id')->where('character_features.character_type', 'Update')->join('features', 'features.id', '=', 'character_features.feature_id')->select(['character_features.*', 'features.*', 'character_features.id AS character_feature_id']);
@@ -130,24 +121,21 @@ public function features()
/**
* Get the features (traits) attached to the design update with no extra sorting.
*/
- public function rawFeatures()
- {
+ public function rawFeatures() {
return $this->hasMany('App\Models\Character\CharacterFeature', 'character_image_id')->where('character_features.character_type', 'Update');
}
/**
* Get the designers attached to the design update.
*/
- public function designers()
- {
+ public function designers() {
return $this->hasMany('App\Models\Character\CharacterImageCreator', 'character_image_id')->where('type', 'Designer')->where('character_type', 'Update');
}
/**
* Get the artists attached to the design update.
*/
- public function artists()
- {
+ public function artists() {
return $this->hasMany('App\Models\Character\CharacterImageCreator', 'character_image_id')->where('type', 'Artist')->where('character_type', 'Update');
}
@@ -160,33 +148,33 @@ public function artists()
/**
* Scope a query to only include active (Open or Pending) update requests.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query->where('status', '!=', 'Approved')->where('status', '!=', 'Rejected');
}
/**
* Scope a query to only include MYO slot approval requests.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeMyos($query)
- {
+ public function scopeMyos($query) {
$query->select('design_updates.*')->where('update_type', 'MYO');
}
/**
* Scope a query to only include character design update requests.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeCharacters($query)
- {
+ public function scopeCharacters($query) {
$query->select('design_updates.*')->where('update_type', 'Character');
}
@@ -201,8 +189,7 @@ public function scopeCharacters($query)
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -211,8 +198,7 @@ public function getDataAttribute()
*
* @return array
*/
- public function getInventoryAttribute()
- {
+ public function getInventoryAttribute() {
// This is for showing the addons page
// just need to retrieve a list of stack IDs to tell which ones to check
@@ -224,8 +210,7 @@ public function getInventoryAttribute()
*
* @return array
*/
- public function getUserBankAttribute()
- {
+ public function getUserBankAttribute() {
return $this->data && isset($this->data['user']['currencies']) ? $this->data['user']['currencies'] : [];
}
@@ -234,8 +219,7 @@ public function getUserBankAttribute()
*
* @return array
*/
- public function getCharacterBankAttribute()
- {
+ public function getCharacterBankAttribute() {
return $this->data && isset($this->data['character']['currencies']) ? $this->data['character']['currencies'] : [];
}
@@ -244,9 +228,8 @@ public function getCharacterBankAttribute()
*
* @return bool
*/
- public function getIsCompleteAttribute()
- {
- return ($this->has_comments && $this->has_image && $this->has_addons && $this->has_features);
+ public function getIsCompleteAttribute() {
+ return $this->has_comments && $this->has_image && $this->has_addons && $this->has_features;
}
/**
@@ -254,8 +237,7 @@ public function getIsCompleteAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/character-updates/'.floor($this->id / 1000);
}
@@ -264,9 +246,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getImageFileNameAttribute()
- {
- return $this->id . '_'.$this->hash.'.'.$this->extension;
+ public function getImageFileNameAttribute() {
+ return $this->id.'_'.$this->hash.'.'.$this->extension;
}
/**
@@ -274,8 +255,7 @@ public function getImageFileNameAttribute()
*
* @return string
*/
- public function getImagePathAttribute()
- {
+ public function getImagePathAttribute() {
return public_path($this->imageDirectory);
}
@@ -284,9 +264,8 @@ public function getImagePathAttribute()
*
* @return string
*/
- public function getImageUrlAttribute()
- {
- return asset($this->imageDirectory . '/' . $this->imageFileName);
+ public function getImageUrlAttribute() {
+ return asset($this->imageDirectory.'/'.$this->imageFileName);
}
/**
@@ -294,9 +273,8 @@ public function getImageUrlAttribute()
*
* @return string
*/
- public function getThumbnailFileNameAttribute()
- {
- return $this->id . '_'.$this->hash.'_th.'.$this->extension;
+ public function getThumbnailFileNameAttribute() {
+ return $this->id.'_'.$this->hash.'_th.'.$this->extension;
}
/**
@@ -304,8 +282,7 @@ public function getThumbnailFileNameAttribute()
*
* @return string
*/
- public function getThumbnailPathAttribute()
- {
+ public function getThumbnailPathAttribute() {
return $this->imagePath;
}
@@ -314,9 +291,8 @@ public function getThumbnailPathAttribute()
*
* @return string
*/
- public function getThumbnailUrlAttribute()
- {
- return asset($this->imageDirectory . '/' . $this->thumbnailFileName);
+ public function getThumbnailUrlAttribute() {
+ return asset($this->imageDirectory.'/'.$this->thumbnailFileName);
}
/**
@@ -324,8 +300,7 @@ public function getThumbnailUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('designs/'.$this->id);
}
@@ -334,8 +309,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getVoteDataAttribute()
- {
+ public function getVoteDataAttribute() {
return collect(json_decode($this->attributes['vote_data'], true));
}
@@ -348,20 +322,25 @@ public function getVoteDataAttribute()
/**
* Get the available currencies that the user can attach to this update request.
*
- * @param string $type
+ * @param string $type
+ *
* @return array
*/
- public function getBank($type)
- {
- if($type == 'user') $currencies = $this->userBank;
- else $currencies = $this->characterBank;
- if(!count($currencies)) return [];
+ public function getBank($type) {
+ if ($type == 'user') {
+ $currencies = $this->userBank;
+ } else {
+ $currencies = $this->characterBank;
+ }
+ if (!count($currencies)) {
+ return [];
+ }
$ids = array_keys($currencies);
$result = Currency::whereIn('id', $ids)->get();
- foreach($result as $i=>$currency)
- {
+ foreach ($result as $i=>$currency) {
$currency->quantity = $currencies[$currency->id];
}
+
return $result;
}
}
diff --git a/app/Models/Character/CharacterFeature.php b/app/Models/Character/CharacterFeature.php
index 823fc209e7..491493714c 100644
--- a/app/Models/Character/CharacterFeature.php
+++ b/app/Models/Character/CharacterFeature.php
@@ -2,21 +2,16 @@
namespace App\Models\Character;
-use Config;
-use DB;
use App\Models\Model;
-use App\Models\Character\CharacterCategory;
-
-class CharacterFeature extends Model
-{
+class CharacterFeature extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'character_image_id', 'feature_id', 'data', 'character_type'
+ 'character_image_id', 'feature_id', 'data', 'character_type',
];
/**
@@ -24,10 +19,10 @@ class CharacterFeature extends Model
*
* @var string
*/
- protected $table = 'character_features';
-
+ protected $table = 'character_features';
+
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -35,16 +30,14 @@ class CharacterFeature extends Model
/**
* Get the image associated with this record.
*/
- public function image()
- {
+ public function image() {
return $this->belongsTo('App\Models\Character\CharacterImage', 'character_image_id');
}
-
+
/**
* Get the feature (character trait) associated with this record.
*/
- public function feature()
- {
+ public function feature() {
return $this->belongsTo('App\Models\Feature\Feature', 'feature_id');
}
}
diff --git a/app/Models/Character/CharacterImage.php b/app/Models/Character/CharacterImage.php
index 8a77174388..34d71ac7fb 100644
--- a/app/Models/Character/CharacterImage.php
+++ b/app/Models/Character/CharacterImage.php
@@ -2,15 +2,12 @@
namespace App\Models\Character;
-use Config;
-use DB;
-use App\Models\Model;
use App\Models\Feature\FeatureCategory;
-use App\Models\Character\CharacterCategory;
+use App\Models\Model;
+use DB;
use Illuminate\Database\Eloquent\SoftDeletes;
-class CharacterImage extends Model
-{
+class CharacterImage extends Model {
use SoftDeletes;
/**
@@ -47,9 +44,9 @@ class CharacterImage extends Model
*/
public static $createRules = [
'species_id' => 'required',
- 'rarity_id' => 'required',
- 'image' => 'required|mimes:jpeg,jpg,gif,png|max:20000',
- 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png|max:20000',
+ 'rarity_id' => 'required',
+ 'image' => 'required|mimes:jpeg,jpg,gif,png|max:20000',
+ 'thumbnail' => 'nullable|mimes:jpeg,jpg,gif,png|max:20000',
];
/**
@@ -59,10 +56,10 @@ class CharacterImage extends Model
*/
public static $updateRules = [
'character_id' => 'required',
- 'user_id' => 'required',
- 'species_id' => 'required',
- 'rarity_id' => 'required',
- 'description' => 'nullable',
+ 'user_id' => 'required',
+ 'species_id' => 'required',
+ 'rarity_id' => 'required',
+ 'description' => 'nullable',
];
/**********************************************************************************************
@@ -74,48 +71,42 @@ class CharacterImage extends Model
/**
* Get the character associated with the image.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character', 'character_id');
}
/**
* Get the user who owned the character at the time of image creation.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**
* Get the species of the character image.
*/
- public function species()
- {
+ public function species() {
return $this->belongsTo('App\Models\Species\Species', 'species_id');
}
/**
* Get the subtype of the character image.
*/
- public function subtype()
- {
+ public function subtype() {
return $this->belongsTo('App\Models\Species\Subtype', 'subtype_id');
}
/**
* Get the rarity of the character image.
*/
- public function rarity()
- {
+ public function rarity() {
return $this->belongsTo('App\Models\Rarity', 'rarity_id');
}
/**
* Get the features (traits) attached to the character image, ordered by display order.
*/
- public function features()
- {
+ public function features() {
$ids = FeatureCategory::orderBy('sort', 'DESC')->pluck('id')->toArray();
$query = $this->hasMany('App\Models\Character\CharacterFeature', 'character_image_id')->where('character_features.character_type', 'Character')->join('features', 'features.id', '=', 'character_features.feature_id')->select(['character_features.*', 'features.*', 'character_features.id AS character_feature_id']);
@@ -126,24 +117,21 @@ public function features()
/**
* Get the designers/artists attached to the character image.
*/
- public function creators()
- {
+ public function creators() {
return $this->hasMany('App\Models\Character\CharacterImageCreator', 'character_image_id');
}
/**
* Get the designers attached to the character image.
*/
- public function designers()
- {
+ public function designers() {
return $this->hasMany('App\Models\Character\CharacterImageCreator', 'character_image_id')->where('type', 'Designer')->where('character_type', 'Character');
}
/**
* Get the artists attached to the character image.
*/
- public function artists()
- {
+ public function artists() {
return $this->hasMany('App\Models\Character\CharacterImageCreator', 'character_image_id')->where('type', 'Artist')->where('character_type', 'Character');
}
@@ -156,13 +144,17 @@ public function artists()
/**
* Scope a query to only include images visible to guests and regular logged-in users.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param mixed|null $user
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeImages($query, $user = null)
- {
- if(!$user || !$user->hasPower('manage_characters')) return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC');
- else return $query->orderBy('sort')->orderBy('id', 'DESC');
+ public function scopeImages($query, $user = null) {
+ if (!$user || !$user->hasPower('manage_characters')) {
+ return $query->where('is_visible', 1)->orderBy('sort')->orderBy('id', 'DESC');
+ } else {
+ return $query->orderBy('sort')->orderBy('id', 'DESC');
+ }
}
/**********************************************************************************************
@@ -176,8 +168,7 @@ public function scopeImages($query, $user = null)
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/characters/'.floor($this->id / 1000);
}
@@ -186,9 +177,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getImageFileNameAttribute()
- {
- return $this->id . '_'.$this->hash.'.'.$this->extension;
+ public function getImageFileNameAttribute() {
+ return $this->id.'_'.$this->hash.'.'.$this->extension;
}
/**
@@ -196,8 +186,7 @@ public function getImageFileNameAttribute()
*
* @return string
*/
- public function getImagePathAttribute()
- {
+ public function getImagePathAttribute() {
return public_path($this->imageDirectory);
}
@@ -206,9 +195,8 @@ public function getImagePathAttribute()
*
* @return string
*/
- public function getImageUrlAttribute()
- {
- return asset($this->imageDirectory . '/' . $this->imageFileName);
+ public function getImageUrlAttribute() {
+ return asset($this->imageDirectory.'/'.$this->imageFileName);
}
/**
@@ -216,9 +204,8 @@ public function getImageUrlAttribute()
*
* @return string
*/
- public function getFullsizeFileNameAttribute()
- {
- return $this->id . '_'.$this->hash.'_'.$this->fullsize_hash.'_full.'.$this->extension;
+ public function getFullsizeFileNameAttribute() {
+ return $this->id.'_'.$this->hash.'_'.$this->fullsize_hash.'_full.'.$this->extension;
}
/**
@@ -226,22 +213,24 @@ public function getFullsizeFileNameAttribute()
*
* @return string
*/
- public function getFullsizeUrlAttribute()
- {
- return asset($this->imageDirectory . '/' . $this->fullsizeFileName);
+ public function getFullsizeUrlAttribute() {
+ return asset($this->imageDirectory.'/'.$this->fullsizeFileName);
}
/**
* Gets the file name of the model's fullsize image.
*
* @param user
+ * @param mixed|null $user
+ *
* @return string
*/
- public function canViewFull($user = null)
- {
- if(((isset($this->character->user_id) && ($user ? $this->character->user->id == $user->id : false)) || ($user ? $user->hasPower('manage_characters') : false)))
- return true;
- else return false;
+ public function canViewFull($user = null) {
+ if (((isset($this->character->user_id) && ($user ? $this->character->user->id == $user->id : false)) || ($user ? $user->hasPower('manage_characters') : false))) {
+ return true;
+ } else {
+ return false;
+ }
}
/**
@@ -249,9 +238,8 @@ public function canViewFull($user = null)
*
* @return string
*/
- public function getThumbnailFileNameAttribute()
- {
- return $this->id . '_'.$this->hash.'_th.'.$this->extension;
+ public function getThumbnailFileNameAttribute() {
+ return $this->id.'_'.$this->hash.'_th.'.$this->extension;
}
/**
@@ -259,8 +247,7 @@ public function getThumbnailFileNameAttribute()
*
* @return string
*/
- public function getThumbnailPathAttribute()
- {
+ public function getThumbnailPathAttribute() {
return $this->imagePath;
}
@@ -269,8 +256,7 @@ public function getThumbnailPathAttribute()
*
* @return string
*/
- public function getThumbnailUrlAttribute()
- {
- return asset($this->imageDirectory . '/' . $this->thumbnailFileName);
+ public function getThumbnailUrlAttribute() {
+ return asset($this->imageDirectory.'/'.$this->thumbnailFileName);
}
}
diff --git a/app/Models/Character/CharacterImageCreator.php b/app/Models/Character/CharacterImageCreator.php
index 26f3027ce9..d3d712b25d 100644
--- a/app/Models/Character/CharacterImageCreator.php
+++ b/app/Models/Character/CharacterImageCreator.php
@@ -2,22 +2,17 @@
namespace App\Models\Character;
-use Config;
-use DB;
use App\Models\Model;
use App\Models\User\User;
-use App\Models\Character\CharacterCategory;
-
-class CharacterImageCreator extends Model
-{
+class CharacterImageCreator extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'character_image_id', 'type', 'url', 'alias', 'character_type', 'user_id'
+ 'character_image_id', 'type', 'url', 'alias', 'character_type', 'user_id',
];
/**
@@ -33,56 +28,52 @@ class CharacterImageCreator extends Model
* @var string
*/
public $timestamps = false;
-
+
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the image associated with this record.
*/
- public function image()
- {
+ public function image() {
return $this->belongsTo('App\Models\Character\CharacterImage', 'character_image_id');
}
/**
* Get the user associated with this record.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**********************************************************************************************
-
+
OTHER FUNCTIONS
**********************************************************************************************/
/**
* Displays a link using the creator's URL.
- *
+ *
* @return string
*/
- public function displayLink()
- {
- if($this->user_id)
- {
+ public function displayLink() {
+ if ($this->user_id) {
$user = User::find($this->user_id);
+
return $user->displayName;
- }
- else if ($this->url)
- {
+ } elseif ($this->url) {
return prettyProfileLink($this->url);
- }
- else if($this->alias)
- {
+ } elseif ($this->alias) {
$user = User::where('alias', trim($this->alias))->first();
- if($user) return $user->displayName;
- else return ''.$this->alias.'@dA ';
+ if ($user) {
+ return $user->displayName;
+ } else {
+ return ''.$this->alias.'@dA ';
+ }
}
}
}
diff --git a/app/Models/Character/CharacterItem.php b/app/Models/Character/CharacterItem.php
index 8fd0b7c5e8..a496764d96 100644
--- a/app/Models/Character/CharacterItem.php
+++ b/app/Models/Character/CharacterItem.php
@@ -5,8 +5,7 @@
use App\Models\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
-class CharacterItem extends Model
-{
+class CharacterItem extends Model {
use SoftDeletes;
/**
@@ -15,25 +14,25 @@ class CharacterItem extends Model
* @var array
*/
protected $fillable = [
- 'data', 'item_id', 'character_id', 'stack_name'
+ 'data', 'item_id', 'character_id', 'stack_name',
];
/**
- * Whether the model contains timestamps to be saved and updated.
+ * The table associated with the model.
*
* @var string
*/
- public $timestamps = true;
+ protected $table = 'character_items';
/**
- * The table associated with the model.
+ * Whether the model contains timestamps to be saved and updated.
*
* @var string
*/
- protected $table = 'character_items';
+ public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -41,21 +40,19 @@ class CharacterItem extends Model
/**
* Get the character who owns the stack.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character');
}
/**
* Get the item associated with this item stack.
*/
- public function item()
- {
+ public function item() {
return $this->belongsTo('App\Models\Item\Item');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -65,19 +62,20 @@ public function item()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
-
+
/**
* Checks if the stack is transferrable.
*
* @return array
*/
- public function getIsTransferrableAttribute()
- {
- if(!isset($this->data['disallow_transfer']) && $this->item->allow_transfer) return true;
+ public function getIsTransferrableAttribute() {
+ if (!isset($this->data['disallow_transfer']) && $this->item->allow_transfer) {
+ return true;
+ }
+
return false;
}
@@ -86,9 +84,8 @@ public function getIsTransferrableAttribute()
*
* @return int
*/
- public function getAvailableQuantityAttribute()
- {
- return ($this->count);
+ public function getAvailableQuantityAttribute() {
+ return $this->count;
}
/**
@@ -96,8 +93,7 @@ public function getAvailableQuantityAttribute()
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'character_items';
}
}
diff --git a/app/Models/Character/CharacterLog.php b/app/Models/Character/CharacterLog.php
index 519894a20f..29c896c1a7 100644
--- a/app/Models/Character/CharacterLog.php
+++ b/app/Models/Character/CharacterLog.php
@@ -2,11 +2,9 @@
namespace App\Models\Character;
-use Config;
use App\Models\Model;
-class CharacterLog extends Model
-{
+class CharacterLog extends Model {
/**
* The attributes that are mass assignable.
*
@@ -14,7 +12,7 @@ class CharacterLog extends Model
*/
protected $fillable = [
'character_id', 'sender_id', 'sender_alias', 'recipient_id', 'recipient_alias',
- 'log', 'log_type', 'data', 'change_log', 'sender_url', 'recipient_url'
+ 'log', 'log_type', 'data', 'change_log', 'sender_url', 'recipient_url',
];
/**
@@ -32,7 +30,7 @@ class CharacterLog extends Model
public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -40,29 +38,26 @@ class CharacterLog extends Model
/**
* Get the user who initiated the logged action.
*/
- public function sender()
- {
+ public function sender() {
return $this->belongsTo('App\Models\User\User', 'sender_id');
}
/**
* Get the user who received the logged action.
*/
- public function recipient()
- {
+ public function recipient() {
return $this->belongsTo('App\Models\User\User', 'recipient_id');
}
/**
* Get the character that is the target of the action.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -72,11 +67,12 @@ public function character()
*
* @return string
*/
- public function getDisplayRecipientAliasAttribute()
- {
- if($this->recipient_url)
+ public function getDisplayRecipientAliasAttribute() {
+ if ($this->recipient_url) {
return prettyProfileLink($this->recipient_url);
- else return '---';
+ } else {
+ return '---';
+ }
}
/**
@@ -84,8 +80,7 @@ public function getDisplayRecipientAliasAttribute()
*
* @return array
*/
- public function getChangedDataAttribute()
- {
+ public function getChangedDataAttribute() {
return json_decode($this->change_log, true);
}
}
diff --git a/app/Models/Character/CharacterProfile.php b/app/Models/Character/CharacterProfile.php
index b249115862..011d2092cf 100644
--- a/app/Models/Character/CharacterProfile.php
+++ b/app/Models/Character/CharacterProfile.php
@@ -2,21 +2,16 @@
namespace App\Models\Character;
-use Config;
-use DB;
use App\Models\Model;
-use App\Models\Character\CharacterCategory;
-
-class CharacterProfile extends Model
-{
+class CharacterProfile extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'character_id', 'text', 'parsed_text', 'link'
+ 'character_id', 'text', 'parsed_text', 'link',
];
/**
@@ -39,7 +34,7 @@ class CharacterProfile extends Model
* @var array
*/
public static $rules = [
- 'link' => 'url|nullable'
+ 'link' => 'url|nullable',
];
/**********************************************************************************************
@@ -51,8 +46,7 @@ class CharacterProfile extends Model
/**
* Get the character this profile belongs to.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character', 'character_id');
}
}
diff --git a/app/Models/Character/CharacterTransfer.php b/app/Models/Character/CharacterTransfer.php
index 09fe1d955c..f0e7fc7587 100644
--- a/app/Models/Character/CharacterTransfer.php
+++ b/app/Models/Character/CharacterTransfer.php
@@ -2,12 +2,10 @@
namespace App\Models\Character;
-use Config;
-use Settings;
use App\Models\Model;
+use Settings;
-class CharacterTransfer extends Model
-{
+class CharacterTransfer extends Model {
/**
* The attributes that are mass assignable.
*
@@ -15,7 +13,7 @@ class CharacterTransfer extends Model
*/
protected $fillable = [
'character_id', 'sender_id', 'user_reason', 'recipient_id',
- 'status', 'is_approved', 'reason', 'data'
+ 'status', 'is_approved', 'reason', 'data',
];
/**
@@ -41,24 +39,21 @@ class CharacterTransfer extends Model
/**
* Get the user who initiated the transfer.
*/
- public function sender()
- {
+ public function sender() {
return $this->belongsTo('App\Models\User\User', 'sender_id');
}
/**
* Get the user who received the transfer.
*/
- public function recipient()
- {
+ public function recipient() {
return $this->belongsTo('App\Models\User\User', 'recipient_id');
}
/**
* Get the character to be transferred.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character');
}
@@ -71,15 +66,15 @@ public function character()
/**
* Scope a query to only include pending trades, as well as trades pending staff approval.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
$query->where('status', 'Pending');
- if(Settings::get('open_transfers_queue')) {
- $query->orWhere(function($query) {
+ if (Settings::get('open_transfers_queue')) {
+ $query->orWhere(function ($query) {
$query->where('status', 'Accepted')->where('is_approved', 0);
});
}
@@ -90,14 +85,15 @@ public function scopeActive($query)
/**
* Scope a query to only include completed trades.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeCompleted($query)
- {
- $query->where('status', 'Rejected')->orWhere('status', 'Canceled')->orWhere(function($query) {
+ public function scopeCompleted($query) {
+ $query->where('status', 'Rejected')->orWhere('status', 'Canceled')->orWhere(function ($query) {
$query->where('status', 'Accepted')->where('is_approved', 1);
- });;
+ });
+
return $query;
}
@@ -112,10 +108,13 @@ public function scopeCompleted($query)
*
* @return bool
*/
- public function getIsActiveAttribute()
- {
- if($this->status == 'Pending') return true;
- if(($this->status == 'Accepted') && $this->is_approved == 0) return true;
+ public function getIsActiveAttribute() {
+ if ($this->status == 'Pending') {
+ return true;
+ }
+ if (($this->status == 'Accepted') && $this->is_approved == 0) {
+ return true;
+ }
return false;
}
@@ -125,8 +124,7 @@ public function getIsActiveAttribute()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
}
diff --git a/app/Models/Character/Sublist.php b/app/Models/Character/Sublist.php
index bb59a4a608..f02fc32ce7 100644
--- a/app/Models/Character/Sublist.php
+++ b/app/Models/Character/Sublist.php
@@ -4,20 +4,14 @@
use App\Models\Model;
-use App\Models\Character\Character;
-use App\Models\Character\CharacterImage;
-use App\Models\Character\CharacterCategory;
-use App\Models\Species\Species;
-
-class Sublist extends Model
-{
+class Sublist extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'key', 'show_main', 'sort'
+ 'name', 'key', 'show_main', 'sort',
];
/**
@@ -34,9 +28,9 @@ class Sublist extends Model
*/
public static $createRules = [
'name' => 'required|unique:masterlist_sub|between:3,25',
- 'key' => 'required|unique:masterlist_sub|between:3,25|alpha_dash'
+ 'key' => 'required|unique:masterlist_sub|between:3,25|alpha_dash',
];
-
+
/**
* Validation rules for updating.
*
@@ -44,33 +38,31 @@ class Sublist extends Model
*/
public static $updateRules = [
'name' => 'required|between:3,25',
- 'key' => 'required|between:3,25|alpha_dash'
+ 'key' => 'required|between:3,25|alpha_dash',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get all character categories associated with the sub list.
*/
- public function categories()
- {
+ public function categories() {
return $this->hasMany('App\Models\Character\CharacterCategory', 'masterlist_sub_id');
}
/**
* Get all character categories associated with the sub list.
*/
- public function species()
- {
+ public function species() {
return $this->hasMany('App\Models\Species\Species', 'masterlist_sub_id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -80,8 +72,7 @@ public function species()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('sublist/'.$this->key);
}
}
diff --git a/app/Models/Comment.php b/app/Models/Comment.php
index fd212a1e72..e4faa10d54 100644
--- a/app/Models/Comment.php
+++ b/app/Models/Comment.php
@@ -1,17 +1,14 @@
'boolean'
+ 'approved' => 'boolean',
];
/**
@@ -59,57 +48,60 @@ class Comment extends Model
'deleted' => CommentDeleted::class,
];
+ /**
+ * Whether the model contains timestamps to be saved and updated.
+ *
+ * @var string
+ */
+ public $timestamps = true;
+
/**
* The user who posted the comment.
*/
- public function commenter()
- {
+ public function commenter() {
return $this->morphTo();
}
/**
* The model that was commented upon.
*/
- public function commentable()
- {
+ public function commentable() {
return $this->morphTo();
}
/**
* Returns all comments that this comment is the parent of.
*/
- public function children()
- {
+ public function children() {
return $this->hasMany('App\Models\Comment', 'child_id');
}
/**
* Returns the comment to which this comment belongs to.
*/
- public function parent()
- {
+ public function parent() {
return $this->belongsTo('App\Models\Comment', 'child_id');
}
/**
- * Gets / Creates permalink for comments - allows user to go directly to comment
+ * Gets / Creates permalink for comments - allows user to go directly to comment.
*
* @return string
*/
- public function getUrlAttribute()
- {
- return url('comment/' . $this->id);
+ public function getUrlAttribute() {
+ return url('comment/'.$this->id);
}
/**
- * Gets top comment
+ * Gets top comment.
*
* @return string
*/
- public function getTopCommentAttribute()
- {
- if(!$this->parent) { return $this; }
- else {return $this->parent->topComment;}
+ public function getTopCommentAttribute() {
+ if (!$this->parent) {
+ return $this;
+ } else {
+ return $this->parent->topComment;
+ }
}
-
}
diff --git a/app/Models/Criteria/Criterion.php b/app/Models/Criteria/Criterion.php
index 12ba9abd77..0f65eb6aed 100644
--- a/app/Models/Criteria/Criterion.php
+++ b/app/Models/Criteria/Criterion.php
@@ -2,7 +2,6 @@
namespace App\Models\Criteria;
-use Config;
use App\Models\Model;
class Criterion extends Model {
@@ -12,7 +11,7 @@ class Criterion extends Model {
* @var array
*/
protected $fillable = [
- 'name', 'currency_id', 'is_active', 'summary', 'is_guide_active', 'base_value', 'rounding', 'round_precision'
+ 'name', 'currency_id', 'is_active', 'summary', 'is_guide_active', 'base_value', 'rounding', 'round_precision',
];
/**
@@ -28,8 +27,8 @@ class Criterion extends Model {
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:character_categories|between:3,100',
- 'currency_id' => 'required'
+ 'name' => 'required|unique:character_categories|between:3,100',
+ 'currency_id' => 'required',
];
/**
@@ -42,7 +41,7 @@ class Criterion extends Model {
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -62,7 +61,7 @@ public function steps() {
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -73,10 +72,9 @@ public function steps() {
* @return string
*/
public function getDisplayNameAttribute() {
- return $this->is_guide_active ? '' . $this->name . ' ' : $this->name;
+ return $this->is_guide_active ? ''.$this->name.' ' : $this->name;
}
-
/**********************************************************************************************
SCOPES
@@ -86,14 +84,14 @@ public function getDisplayNameAttribute() {
/**
* Scope a query to only include visible criteria.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeActive($query) {
return $query->where('is_active', 1);
}
-
/**********************************************************************************************
METHODS
@@ -101,7 +99,6 @@ public function scopeActive($query) {
**********************************************************************************************/
public function calculateReward($stepResults) {
-
$total = $this->base_value ?? 0;
if (isset($stepResults)) {
@@ -110,19 +107,23 @@ public function calculateReward($stepResults) {
// Get our subtotal from the step type and options
if ($step->type === 'boolean' && isset($stepResults[$step->id])) {
$subTotal = $step->options->first()->amount;
- } else if ($step->type === 'input') {
+ } elseif ($step->type === 'input') {
$subTotal = $step->options->first()->amount;
$input = floatval($stepResults[$step->id] ?? 0);
if ($step->input_calc_type === 'additive') {
$subTotal += $input;
- } else if ($step->input_calc_type === 'multiplicative') {
+ } elseif ($step->input_calc_type === 'multiplicative') {
$isDivision = $subTotal < 0;
- if (!$isDivision) $subTotal *= $input;
- elseif ($input === 0 && $isDivision) throw new \Exception("Criterion attempted to divide by zero.");
- else $subTotal = $input / -$subTotal;
+ if (!$isDivision) {
+ $subTotal *= $input;
+ } elseif ($input === 0 && $isDivision) {
+ throw new \Exception('Criterion attempted to divide by zero.');
+ } else {
+ $subTotal = $input / -$subTotal;
+ }
}
- } else if ($step->type === 'options') {
+ } elseif ($step->type === 'options') {
$optionId = $stepResults[$step->id] ?? null;
$option = $step->options()->where('id', $optionId)->first();
$subTotal = isset($option) ? $option->amount : 0;
@@ -131,12 +132,16 @@ public function calculateReward($stepResults) {
// Apply subtotal to running total based on calc type
if ($step->calc_type === 'additive') {
$total += $subTotal;
- } else if ($step->calc_type === 'multiplicative') {
+ } elseif ($step->calc_type === 'multiplicative') {
$isDivision = $subTotal < 0;
// makes sure we don't zero out the equation if we have an unset multiplicative boolean
- if (!$isDivision) $total *= max($subTotal, 1);
- elseif ($subTotal === 0 && $isDivision) throw new \Exception("Criterion attempted to divide by zero.");
- else $total /= -$subTotal;
+ if (!$isDivision) {
+ $total *= max($subTotal, 1);
+ } elseif ($subTotal === 0 && $isDivision) {
+ throw new \Exception('Criterion attempted to divide by zero.');
+ } else {
+ $total /= -$subTotal;
+ }
}
}
}
@@ -144,30 +149,32 @@ public function calculateReward($stepResults) {
$precision = $this->round_precision - 1;
if ($this->rounding === 'Traditional Rounding') {
$total = round($total, -$precision);
- } else if ($this->rounding === 'Always Rounds Up') {
+ } elseif ($this->rounding === 'Always Rounds Up') {
$total = $this->ceil_plus($total, -$precision);
- } else if ($this->rounding === 'Always Rounds Down') {
+ } elseif ($this->rounding === 'Always Rounds Down') {
$total = $this->floor_plus($total, -$precision);
}
return $total;
}
- private function ceil_plus(float $value, ?int $precision = null): float {
- if (null === $precision) {
+ private function ceil_plus(float $value, int $precision = null): float {
+ if ($precision === null) {
return (float) ceil($value);
}
$reg = $value + 0.5 / (10 ** $precision);
+
return round($reg, $precision, $reg > 0 ? PHP_ROUND_HALF_DOWN : PHP_ROUND_HALF_UP);
}
- private function floor_plus(float $value, ?int $precision = null): float {
- if (null === $precision) {
- return (float)floor($value);
+ private function floor_plus(float $value, int $precision = null): float {
+ if ($precision === null) {
+ return (float) floor($value);
}
$reg = $value - 0.5 / (10 ** $precision);
+
return round($reg, $precision, $reg > 0 ? PHP_ROUND_HALF_UP : PHP_ROUND_HALF_DOWN);
}
}
diff --git a/app/Models/Criteria/CriterionStep.php b/app/Models/Criteria/CriterionStep.php
index 60b1a7c910..614815f79f 100644
--- a/app/Models/Criteria/CriterionStep.php
+++ b/app/Models/Criteria/CriterionStep.php
@@ -2,18 +2,16 @@
namespace App\Models\Criteria;
-use Config;
use App\Models\Model;
-class CriterionStep extends Model
-{
+class CriterionStep extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'is_active', 'summary', 'description', 'parsed_description', 'type', 'calc_type', 'input_calc_type', 'order', 'has_image', 'criterion_id'
+ 'name', 'is_active', 'summary', 'description', 'parsed_description', 'type', 'calc_type', 'input_calc_type', 'order', 'has_image', 'criterion_id',
];
/**
@@ -22,7 +20,7 @@ class CriterionStep extends Model
* @var string
*/
protected $table = 'criterion_steps';
-
+
/**
* Validation rules for creation.
*
@@ -31,7 +29,7 @@ class CriterionStep extends Model
public static $createRules = [
'name' => 'required|unique:character_categories|between:3,100',
];
-
+
/**
* Validation rules for updating.
*
@@ -42,46 +40,46 @@ class CriterionStep extends Model
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the currency for this criterion.
*/
- public function criterion()
- {
+ public function criterion() {
return $this->belongsTo('App\Models\Criteria\Criterion', 'criterion_id');
}
-
+
/**
* Get all steps associated with the criterion.
+ *
+ * @param mixed|null $minRequirement
*/
- public function options($minRequirement = null)
- {
+ public function options($minRequirement = null) {
$query = $this->hasMany('App\Models\Criteria\CriterionStepOption', 'criterion_step_id')->orderBy('order');
- if($minRequirement) {
+ if ($minRequirement) {
$collection = $query->get();
$sliceAt = $collection->where('id', $minRequirement)->keys()->first();
$query = $collection->slice($sliceAt);
}
+
return $query;
}
-
+
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Gets the file directory containing the model's image.
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/criteria';
}
@@ -90,48 +88,46 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
-
+
/**
* Gets the path to the file directory containing the model's image.
*
* @return string
*/
- public function getImagePathAttribute()
- {
+ public function getImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->ImageFileName);
+ public function getImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->ImageFileName);
}
-
-
- /**********************************************************************************************
- SCOPES
+ /**********************************************************************************************
+
+ SCOPES
**********************************************************************************************/
-
+
/**
* Scope a query to only include visible criteria.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query->where('is_active', 1);
}
- }
\ No newline at end of file
+}
diff --git a/app/Models/Criteria/CriterionStepOption.php b/app/Models/Criteria/CriterionStepOption.php
index 42aecd8d45..7b2a34d3d2 100644
--- a/app/Models/Criteria/CriterionStepOption.php
+++ b/app/Models/Criteria/CriterionStepOption.php
@@ -2,18 +2,16 @@
namespace App\Models\Criteria;
-use Config;
use App\Models\Model;
-class CriterionStepOption extends Model
-{
+class CriterionStepOption extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'is_active', 'criterion_step_id', 'summary', 'description', 'parsed_description', 'amount', 'order'
+ 'name', 'is_active', 'criterion_step_id', 'summary', 'description', 'parsed_description', 'amount', 'order',
];
/**
@@ -22,7 +20,7 @@ class CriterionStepOption extends Model
* @var string
*/
protected $table = 'criterion_step_options';
-
+
/**
* Validation rules for creation.
*
@@ -31,7 +29,7 @@ class CriterionStepOption extends Model
public static $createRules = [
'name' => 'required|unique:character_categories|between:3,100',
];
-
+
/**
* Validation rules for updating.
*
@@ -42,34 +40,32 @@ class CriterionStepOption extends Model
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the currency for this criterion.
*/
- public function step()
- {
+ public function step() {
return $this->belongsTo('App\Models\Criteria\CriterionStep', 'criterion_step_id');
}
-
-
- /**********************************************************************************************
- SCOPES
+ /**********************************************************************************************
+
+ SCOPES
**********************************************************************************************/
-
+
/**
* Scope a query to only include visible criterions.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query->where('is_active', 1);
}
- }
\ No newline at end of file
+}
diff --git a/app/Models/Currency/Currency.php b/app/Models/Currency/Currency.php
index 46658f6781..66170f94b8 100644
--- a/app/Models/Currency/Currency.php
+++ b/app/Models/Currency/Currency.php
@@ -2,11 +2,9 @@
namespace App\Models\Currency;
-use Config;
use App\Models\Model;
-class Currency extends Model
-{
+class Currency extends Model {
/**
* The attributes that are mass assignable.
*
@@ -16,7 +14,7 @@ class Currency extends Model
'is_user_owned', 'is_character_owned',
'name', 'abbreviation', 'description', 'parsed_description', 'sort_user', 'sort_character',
'is_displayed', 'allow_user_to_user', 'allow_user_to_character', 'allow_character_to_user',
- 'has_icon', 'has_image'
+ 'has_icon', 'has_image',
];
/**
@@ -32,11 +30,11 @@ class Currency extends Model
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:currencies|between:3,100',
+ 'name' => 'required|unique:currencies|between:3,100',
'abbreviation' => 'nullable|unique:currencies|between:1,25',
- 'description' => 'nullable',
- 'icon' => 'mimes:png',
- 'image' => 'mimes:png'
+ 'description' => 'nullable',
+ 'icon' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**
@@ -45,11 +43,11 @@ class Currency extends Model
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
+ 'name' => 'required|between:3,100',
'abbreviation' => 'nullable|between:1,25',
- 'description' => 'nullable',
- 'icon' => 'mimes:png',
- 'image' => 'mimes:png'
+ 'description' => 'nullable',
+ 'icon' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
@@ -63,9 +61,8 @@ class Currency extends Model
*
* @return string
*/
- public function getDisplayIconAttribute()
- {
- return ' ';
+ public function getDisplayIconAttribute() {
+ return ' ';
}
/**
@@ -73,8 +70,7 @@ public function getDisplayIconAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/currencies';
}
@@ -83,9 +79,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getCurrencyImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getCurrencyImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -93,9 +88,8 @@ public function getCurrencyImageFileNameAttribute()
*
* @return string
*/
- public function getCurrencyIconFileNameAttribute()
- {
- return $this->id . '-icon.png';
+ public function getCurrencyIconFileNameAttribute() {
+ return $this->id.'-icon.png';
}
/**
@@ -103,8 +97,7 @@ public function getCurrencyIconFileNameAttribute()
*
* @return string
*/
- public function getCurrencyImagePathAttribute()
- {
+ public function getCurrencyImagePathAttribute() {
return public_path($this->imageDirectory);
}
@@ -113,8 +106,7 @@ public function getCurrencyImagePathAttribute()
*
* @return string
*/
- public function getCurrencyIconPathAttribute()
- {
+ public function getCurrencyIconPathAttribute() {
return public_path($this->imageDirectory);
}
@@ -123,10 +115,12 @@ public function getCurrencyIconPathAttribute()
*
* @return string
*/
- public function getCurrencyImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->currencyImageFileName);
+ public function getCurrencyImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->currencyImageFileName);
}
/**
@@ -134,10 +128,12 @@ public function getCurrencyImageUrlAttribute()
*
* @return string
*/
- public function getCurrencyIconUrlAttribute()
- {
- if (!$this->has_icon) return null;
- return asset($this->imageDirectory . '/' . $this->currencyIconFileName);
+ public function getCurrencyIconUrlAttribute() {
+ if (!$this->has_icon) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->currencyIconFileName);
}
/**********************************************************************************************
@@ -151,8 +147,7 @@ public function getCurrencyIconUrlAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -161,8 +156,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/currencies?name='.$this->name);
}
@@ -171,8 +165,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'currencies';
}
@@ -185,14 +178,20 @@ public function getAssetTypeAttribute()
/**
* Displays a given value of the currency with icon, abbreviation or name.
*
+ * @param mixed $value
+ *
* @return string
*/
- public function display($value)
- {
- $ret = '' . $value . ' ';
- if($this->has_icon) $ret .= $this->displayIcon;
- elseif ($this->abbreviation) $ret .= $this->abbreviation;
- else $ret .= $this->name;
- return $ret . ' ';
+ public function display($value) {
+ $ret = ''.$value.' ';
+ if ($this->has_icon) {
+ $ret .= $this->displayIcon;
+ } elseif ($this->abbreviation) {
+ $ret .= $this->abbreviation;
+ } else {
+ $ret .= $this->name;
+ }
+
+ return $ret.' ';
}
}
diff --git a/app/Models/Currency/CurrencyLog.php b/app/Models/Currency/CurrencyLog.php
index 13db13eb32..a74a544981 100644
--- a/app/Models/Currency/CurrencyLog.php
+++ b/app/Models/Currency/CurrencyLog.php
@@ -2,11 +2,9 @@
namespace App\Models\Currency;
-use Config;
use App\Models\Model;
-class CurrencyLog extends Model
-{
+class CurrencyLog extends Model {
/**
* The attributes that are mass assignable.
*
@@ -16,7 +14,7 @@ class CurrencyLog extends Model
'sender_id', 'sender_type',
'recipient_id', 'recipient_type',
'log', 'log_type', 'data',
- 'currency_id', 'quantity'
+ 'currency_id', 'quantity',
];
/**
@@ -34,7 +32,7 @@ class CurrencyLog extends Model
public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -42,27 +40,29 @@ class CurrencyLog extends Model
/**
* Get the user who initiated the logged action.
*/
- public function sender()
- {
- if($this->sender_type == 'User') return $this->belongsTo('App\Models\User\User', 'sender_id');
+ public function sender() {
+ if ($this->sender_type == 'User') {
+ return $this->belongsTo('App\Models\User\User', 'sender_id');
+ }
+
return $this->belongsTo('App\Models\Character\Character', 'sender_id');
}
/**
* Get the user who received the logged action.
*/
- public function recipient()
- {
- if($this->recipient_type == 'User') return $this->belongsTo('App\Models\User\User', 'recipient_id');
+ public function recipient() {
+ if ($this->recipient_type == 'User') {
+ return $this->belongsTo('App\Models\User\User', 'recipient_id');
+ }
+
return $this->belongsTo('App\Models\Character\Character', 'recipient_id');
}
/**
* Get the currency that is the target of the action.
*/
- public function currency()
- {
+ public function currency() {
return $this->belongsTo('App\Models\Currency\Currency');
}
-
}
diff --git a/app/Models/Feature/Feature.php b/app/Models/Feature/Feature.php
index 2c8bdec12b..f245691465 100644
--- a/app/Models/Feature/Feature.php
+++ b/app/Models/Feature/Feature.php
@@ -2,22 +2,19 @@
namespace App\Models\Feature;
-use Config;
-use DB;
use App\Models\Model;
-use App\Models\Feature\FeatureCategory;
-use App\Models\Species\Species;
use App\Models\Rarity;
+use App\Models\Species\Species;
+use DB;
-class Feature extends Model
-{
+class Feature extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'feature_category_id', 'species_id', 'subtype_id', 'rarity_id', 'name', 'has_image', 'description', 'parsed_description'
+ 'feature_category_id', 'species_id', 'subtype_id', 'rarity_id', 'name', 'has_image', 'description', 'parsed_description',
];
/**
@@ -34,12 +31,12 @@ class Feature extends Model
*/
public static $createRules = [
'feature_category_id' => 'nullable',
- 'species_id' => 'nullable',
- 'subtype_id' => 'nullable',
- 'rarity_id' => 'required|exists:rarities,id',
- 'name' => 'required|unique:features|between:3,100',
- 'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'species_id' => 'nullable',
+ 'subtype_id' => 'nullable',
+ 'rarity_id' => 'required|exists:rarities,id',
+ 'name' => 'required|unique:features|between:3,100',
+ 'description' => 'nullable',
+ 'image' => 'mimes:png',
];
/**
@@ -49,12 +46,12 @@ class Feature extends Model
*/
public static $updateRules = [
'feature_category_id' => 'nullable',
- 'species_id' => 'nullable',
- 'subtype_id' => 'nullable',
- 'rarity_id' => 'required|exists:rarities,id',
- 'name' => 'required|between:3,100',
- 'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'species_id' => 'nullable',
+ 'subtype_id' => 'nullable',
+ 'rarity_id' => 'required|exists:rarities,id',
+ 'name' => 'required|between:3,100',
+ 'description' => 'nullable',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
@@ -66,32 +63,28 @@ class Feature extends Model
/**
* Get the rarity of this feature.
*/
- public function rarity()
- {
+ public function rarity() {
return $this->belongsTo('App\Models\Rarity');
}
/**
* Get the species the feature belongs to.
*/
- public function species()
- {
+ public function species() {
return $this->belongsTo('App\Models\Species\Species');
}
/**
* Get the subtype the feature belongs to.
*/
- public function subtype()
- {
+ public function subtype() {
return $this->belongsTo('App\Models\Species\Subtype');
}
/**
* Get the category the feature belongs to.
*/
- public function category()
- {
+ public function category() {
return $this->belongsTo('App\Models\Feature\FeatureCategory', 'feature_category_id');
}
@@ -104,73 +97,74 @@ public function category()
/**
* Scope a query to sort features in alphabetical order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param bool $reverse
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortAlphabetical($query, $reverse = false)
- {
+ public function scopeSortAlphabetical($query, $reverse = false) {
return $query->orderBy('name', $reverse ? 'DESC' : 'ASC');
}
/**
* Scope a query to sort features in category order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortCategory($query)
- {
+ public function scopeSortCategory($query) {
$ids = FeatureCategory::orderBy('sort', 'DESC')->pluck('id')->toArray();
+
return count($ids) ? $query->orderByRaw(DB::raw('FIELD(feature_category_id, '.implode(',', $ids).')')) : $query;
}
/**
* Scope a query to sort features in species order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortSpecies($query)
- {
+ public function scopeSortSpecies($query) {
$ids = Species::orderBy('sort', 'DESC')->pluck('id')->toArray();
+
return count($ids) ? $query->orderByRaw(DB::raw('FIELD(species_id, '.implode(',', $ids).')')) : $query;
}
/**
* Scope a query to sort features in rarity order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param bool $reverse
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortRarity($query, $reverse = false)
- {
+ public function scopeSortRarity($query, $reverse = false) {
$ids = Rarity::orderBy('sort', $reverse ? 'ASC' : 'DESC')->pluck('id')->toArray();
+
return count($ids) ? $query->orderByRaw(DB::raw('FIELD(rarity_id, '.implode(',', $ids).')')) : $query;
}
/**
* Scope a query to sort features by newest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortNewest($query)
- {
+ public function scopeSortNewest($query) {
return $query->orderBy('id', 'DESC');
}
/**
* Scope a query to sort features oldest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortOldest($query)
- {
+ public function scopeSortOldest($query) {
return $query->orderBy('id');
}
@@ -185,9 +179,8 @@ public function scopeSortOldest($query)
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
- return ''.$this->name.' '.($this->rarity? ' (' . $this->rarity->displayName . ')' : '');
+ public function getDisplayNameAttribute() {
+ return ''.$this->name.' '.($this->rarity ? ' ('.$this->rarity->displayName.')' : '');
}
/**
@@ -195,8 +188,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/traits';
}
@@ -205,9 +197,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -215,8 +206,7 @@ public function getImageFileNameAttribute()
*
* @return string
*/
- public function getImagePathAttribute()
- {
+ public function getImagePathAttribute() {
return public_path($this->imageDirectory);
}
@@ -225,10 +215,12 @@ public function getImagePathAttribute()
*
* @return string
*/
- public function getImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->imageFileName);
+ public function getImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->imageFileName);
}
/**
@@ -236,8 +228,7 @@ public function getImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/traits?name='.$this->name);
}
@@ -246,8 +237,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getSearchUrlAttribute()
- {
+ public function getSearchUrlAttribute() {
return url('masterlist?feature_id[]='.$this->id);
}
}
diff --git a/app/Models/Feature/FeatureCategory.php b/app/Models/Feature/FeatureCategory.php
index 9e44328eb4..d3e6c3e461 100644
--- a/app/Models/Feature/FeatureCategory.php
+++ b/app/Models/Feature/FeatureCategory.php
@@ -2,18 +2,16 @@
namespace App\Models\Feature;
-use Config;
use App\Models\Model;
-class FeatureCategory extends Model
-{
+class FeatureCategory extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'sort', 'has_image', 'description', 'parsed_description'
+ 'name', 'sort', 'has_image', 'description', 'parsed_description',
];
/**
@@ -22,42 +20,41 @@ class FeatureCategory extends Model
* @var string
*/
protected $table = 'feature_categories';
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:feature_categories|between:3,100',
+ 'name' => 'required|unique:feature_categories|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
+ 'name' => 'required|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Displays the model's name, linked to its encyclopedia page.
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -66,8 +63,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/trait-categories';
}
@@ -76,9 +72,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getCategoryImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getCategoryImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -86,20 +81,21 @@ public function getCategoryImageFileNameAttribute()
*
* @return string
*/
- public function getCategoryImagePathAttribute()
- {
+ public function getCategoryImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getCategoryImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->categoryImageFileName);
+ public function getCategoryImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->categoryImageFileName);
}
/**
@@ -107,8 +103,7 @@ public function getCategoryImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/trait-categories?name='.$this->name);
}
@@ -117,8 +112,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getSearchUrlAttribute()
- {
+ public function getSearchUrlAttribute() {
return url('world/traits?feature_category_id='.$this->id);
}
}
diff --git a/app/Models/Gallery/Gallery.php b/app/Models/Gallery/Gallery.php
index a1f29d0f07..1150ae5793 100644
--- a/app/Models/Gallery/Gallery.php
+++ b/app/Models/Gallery/Gallery.php
@@ -2,14 +2,11 @@
namespace App\Models\Gallery;
-use Settings;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Model;
+use Carbon\Carbon;
+use Settings;
-class Gallery extends Model
-{
+class Gallery extends Model {
/**
* The attributes that are mass assignable.
*
@@ -18,7 +15,7 @@ class Gallery extends Model
protected $fillable = [
'id', 'parent_id', 'name', 'sort', 'description',
'currency_enabled', 'votes_required', 'submissions_open',
- 'start_at', 'end_at', 'hide_before_start', 'prompt_selection'
+ 'start_at', 'end_at', 'hide_before_start', 'prompt_selection',
];
/**
@@ -41,7 +38,7 @@ class Gallery extends Model
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:galleries|between:3,50',
+ 'name' => 'required|unique:galleries|between:3,50',
'description' => 'nullable',
];
@@ -51,7 +48,7 @@ class Gallery extends Model
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,50',
+ 'name' => 'required|between:3,50',
'description' => 'nullable',
];
@@ -64,32 +61,28 @@ class Gallery extends Model
/**
* Get the parent gallery.
*/
- public function parent()
- {
+ public function parent() {
return $this->belongsTo('App\Models\Gallery\Gallery', 'parent_id');
}
/**
* Get the child galleries of this gallery.
*/
- public function children()
- {
+ public function children() {
return $this->hasMany('App\Models\Gallery\Gallery', 'parent_id')->sort();
}
/**
* Get the submissions made to this gallery.
*/
- public function submissions()
- {
+ public function submissions() {
return $this->hasMany('App\Models\Gallery\GallerySubmission', 'gallery_id')->visible()->orderBy('created_at', 'DESC');
}
-
- /**
+
+ /**
* Get the criteria attached to this gallery.
*/
- public function criteria()
- {
+ public function criteria() {
return $this->hasMany('App\Models\Gallery\GalleryCriterion', 'gallery_id');
}
@@ -102,50 +95,48 @@ public function criteria()
/**
* Scope a query to return galleries sorted first by sort number and then name.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSort($query)
- {
+ public function scopeSort($query) {
return $query->orderByRaw('ISNULL(sort), sort ASC')->orderBy('name', 'ASC');
}
/**
* Scope a query to only include active galleries.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query
- ->where(function($query) {
- $query->whereNull('start_at')->orWhere('start_at', '<', Carbon::now())->orWhere(function($query) {
+ ->where(function ($query) {
+ $query->whereNull('start_at')->orWhere('start_at', '<', Carbon::now())->orWhere(function ($query) {
$query->where('start_at', '>=', Carbon::now())->where('hide_before_start', 0);
});
- })->where(function($query) {
- $query->whereNull('end_at')->orWhere('end_at', '>', Carbon::now())->orWhere(function($query) {
+ })->where(function ($query) {
+ $query->whereNull('end_at')->orWhere('end_at', '>', Carbon::now())->orWhere(function ($query) {
$query->where('end_at', '<=', Carbon::now());
});
- });
-
+ });
}
/**
* Scope a query to only include visible galleries.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query)
- {
+ public function scopeVisible($query) {
return $query
- ->where(function($query) {
- $query->whereNull('start_at')->orWhere('start_at', '<', Carbon::now())->orWhere(function($query) {
+ ->where(function ($query) {
+ $query->whereNull('start_at')->orWhere('start_at', '<', Carbon::now())->orWhere(function ($query) {
$query->where('start_at', '>=', Carbon::now())->where('hide_before_start', 0);
});
- });
-
+ });
}
/**********************************************************************************************
@@ -159,8 +150,7 @@ public function scopeVisible($query)
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -169,24 +159,28 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('gallery/'.$this->id);
}
/**
* Gets whether or not the user can submit to the gallery.
*
+ * @param mixed|null $user
+ *
* @return string
*/
- public function canSubmit($user = null)
- {
- if(Settings::get('gallery_submissions_open')) {
- if((isset($this->start_at) && $this->start_at->isFuture()) || (isset($this->end_at) && $this->end_at->isPast())) return false;
- elseif($user && $user->hasPower('manage_submissions')) return true;
- elseif($this->submissions_open) return true;
+ public function canSubmit($user = null) {
+ if (Settings::get('gallery_submissions_open')) {
+ if ((isset($this->start_at) && $this->start_at->isFuture()) || (isset($this->end_at) && $this->end_at->isPast())) {
+ return false;
+ } elseif ($user && $user->hasPower('manage_submissions')) {
+ return true;
+ } elseif ($this->submissions_open) {
+ return true;
+ }
+ } else {
+ return false;
}
- else return false;
}
-
}
diff --git a/app/Models/Gallery/GalleryCharacter.php b/app/Models/Gallery/GalleryCharacter.php
index 8ce8d4ac1b..b3583c85a8 100644
--- a/app/Models/Gallery/GalleryCharacter.php
+++ b/app/Models/Gallery/GalleryCharacter.php
@@ -2,20 +2,16 @@
namespace App\Models\Gallery;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Model;
-class GalleryCharacter extends Model
-{
+class GalleryCharacter extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'gallery_submission_id', 'character_id'
+ 'gallery_submission_id', 'character_id',
];
/**
@@ -24,21 +20,18 @@ class GalleryCharacter extends Model
* @var string
*/
protected $table = 'gallery_submission_characters';
-
+
/**
* Get the submission this is attached to.
*/
- public function submission()
- {
+ public function submission() {
return $this->belongsTo('App\Models\Gallery\GallerySubmission', 'gallery_submission_id');
}
-
+
/**
* Get the character being attached to the submission.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character', 'character_id');
}
-
}
diff --git a/app/Models/Gallery/GalleryCollaborator.php b/app/Models/Gallery/GalleryCollaborator.php
index 07d94e8337..27dec5a124 100644
--- a/app/Models/Gallery/GalleryCollaborator.php
+++ b/app/Models/Gallery/GalleryCollaborator.php
@@ -2,25 +2,17 @@
namespace App\Models\Gallery;
-use Settings;
-use Config;
-use DB;
-use Carbon\Carbon;
-
-use App\Models\Currency\Currency;
-
use App\Models\Model;
-class GalleryCollaborator extends Model
-{
+class GalleryCollaborator extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'gallery_submission_id', 'user_id',
- 'has_approved', 'data', 'type'
+ 'gallery_submission_id', 'user_id',
+ 'has_approved', 'data', 'type',
];
/**
@@ -31,29 +23,27 @@ class GalleryCollaborator extends Model
protected $table = 'gallery_submission_collaborators';
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the submission this is attached to.
*/
- public function submission()
- {
+ public function submission() {
return $this->belongsTo('App\Models\Gallery\GallerySubmission', 'gallery_submission_id');
}
-
+
/**
* Get the user being attached to the submission.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -63,9 +53,8 @@ public function user()
*
* @return string
*/
- public function getDisplayTypeAttribute()
- {
- switch($this->type) {
+ public function getDisplayTypeAttribute() {
+ switch ($this->type) {
default:
flash('Invalid type selected.')->error();
break;
@@ -83,5 +72,4 @@ public function getDisplayTypeAttribute()
break;
}
}
-
}
diff --git a/app/Models/Gallery/GalleryCriterion.php b/app/Models/Gallery/GalleryCriterion.php
index 223c7a022b..67d359264b 100644
--- a/app/Models/Gallery/GalleryCriterion.php
+++ b/app/Models/Gallery/GalleryCriterion.php
@@ -2,18 +2,16 @@
namespace App\Models\Gallery;
-use Config;
use App\Models\Model;
-class GalleryCriterion extends Model
-{
+class GalleryCriterion extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'gallery_id', 'criterion_id', 'min_requirements'
+ 'gallery_id', 'criterion_id', 'min_requirements',
];
/**
@@ -22,7 +20,7 @@ class GalleryCriterion extends Model
* @var string
*/
protected $table = 'gallery_criteria';
-
+
/**
* Validation rules for creation.
*
@@ -31,7 +29,7 @@ class GalleryCriterion extends Model
public static $createRules = [
'criterion_id' => 'required',
];
-
+
/**
* Validation rules for updating.
*
@@ -42,41 +40,37 @@ class GalleryCriterion extends Model
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
- * Get the gallery attached to this criterion
+ * Get the gallery attached to this criterion.
*/
- public function gallery()
- {
- return $this->belongsTo('App\Models\Gallery\Gallery', 'gallery_id');
+ public function gallery() {
+ return $this->belongsTo('App\Models\Gallery\Gallery', 'gallery_id');
}
-
+
/**
- * Get the criterion attached to this prompt
+ * Get the criterion attached to this prompt.
*/
- public function criterion()
- {
- return $this->belongsTo('App\Models\Criteria\Criterion', 'criterion_id');
+ public function criterion() {
+ return $this->belongsTo('App\Models\Criteria\Criterion', 'criterion_id');
}
-
-
- /**********************************************************************************************
-
- ACCESSORS
- **********************************************************************************************/
+ /**********************************************************************************************
+
+ ACCESSORS
+
+ **********************************************************************************************/
/**
* Get the data attribute as an associative array.
*
* @return array
*/
- public function getMinRequirementsAttribute()
- {
+ public function getMinRequirementsAttribute() {
return json_decode($this->attributes['min_requirements'], true);
}
}
diff --git a/app/Models/Gallery/GalleryFavorite.php b/app/Models/Gallery/GalleryFavorite.php
index bf4905f924..fabc19f3fc 100644
--- a/app/Models/Gallery/GalleryFavorite.php
+++ b/app/Models/Gallery/GalleryFavorite.php
@@ -2,20 +2,16 @@
namespace App\Models\Gallery;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Model;
-class GalleryFavorite extends Model
-{
+class GalleryFavorite extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'user_id', 'gallery_submission_id'
+ 'user_id', 'gallery_submission_id',
];
/**
@@ -28,17 +24,14 @@ class GalleryFavorite extends Model
/**
* Get the character being attached to the submission.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
-
+
/**
* Get the submission this is attached to.
*/
- public function submission()
- {
+ public function submission() {
return $this->belongsTo('App\Models\Gallery\GallerySubmission', 'gallery_submission_id');
}
-
}
diff --git a/app/Models/Gallery/GallerySubmission.php b/app/Models/Gallery/GallerySubmission.php
index 9ac07ede2d..31b12dd1d7 100644
--- a/app/Models/Gallery/GallerySubmission.php
+++ b/app/Models/Gallery/GallerySubmission.php
@@ -2,19 +2,14 @@
namespace App\Models\Gallery;
-use Config;
-use DB;
-use Settings;
-use Carbon\Carbon;
use App\Models\Currency\Currency;
+use App\Models\Model;
use App\Models\Prompt\Prompt;
use App\Models\Submission\Submission;
-use App\Models\Model;
-
use App\Traits\Commentable;
+use Settings;
-class GallerySubmission extends Model
-{
+class GallerySubmission extends Model {
use Commentable;
/**
@@ -28,7 +23,7 @@ class GallerySubmission extends Model
'title', 'description', 'parsed_description',
'prompt_id', 'data', 'is_visible', 'status',
'vote_data', 'staff_id', 'is_valued',
- 'staff_comments', 'parsed_staff_comments'
+ 'staff_comments', 'parsed_staff_comments',
];
/**
@@ -51,9 +46,9 @@ class GallerySubmission extends Model
* @var array
*/
public static $createRules = [
- 'title' => 'required|between:3,200',
- 'image' => 'required_without:text|mimes:png,jpeg,jpg,gif|max:3000',
- 'text' => 'required_without:image',
+ 'title' => 'required|between:3,200',
+ 'image' => 'required_without:text|mimes:png,jpeg,jpg,gif|max:3000',
+ 'text' => 'required_without:image',
'description' => 'nullable',
];
@@ -63,9 +58,9 @@ class GallerySubmission extends Model
* @var array
*/
public static $updateRules = [
- 'title' => 'required|between:3,200',
+ 'title' => 'required|between:3,200',
'description' => 'nullable',
- 'image' => 'mimes:png,jpeg,jpg,gif|max:3000'
+ 'image' => 'mimes:png,jpeg,jpg,gif|max:3000',
];
/**********************************************************************************************
@@ -77,64 +72,56 @@ class GallerySubmission extends Model
/**
* Get the user who made the submission.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**
* Get the staff member who last edited the submission's comments.
*/
- public function staff()
- {
+ public function staff() {
return $this->belongsTo('App\Models\User\User', 'staff_id');
}
/**
* Get the collaborating users on the submission.
*/
- public function collaborators()
- {
+ public function collaborators() {
return $this->hasMany('App\Models\Gallery\GalleryCollaborator', 'gallery_submission_id')->where('type', 'Collab');
}
/**
* Get the user(s) who are related to the submission in some way.
*/
- public function participants()
- {
+ public function participants() {
return $this->hasMany('App\Models\Gallery\GalleryCollaborator', 'gallery_submission_id')->where('type', '!=', 'Collab');
}
/**
* Get the characters associated with the submission.
*/
- public function characters()
- {
+ public function characters() {
return $this->hasMany('App\Models\Gallery\GalleryCharacter', 'gallery_submission_id');
}
/**
* Get any favorites on the submission.
*/
- public function favorites()
- {
+ public function favorites() {
return $this->hasMany('App\Models\Gallery\GalleryFavorite', 'gallery_submission_id');
}
/**
* Get the gallery this submission is in.
*/
- public function gallery()
- {
+ public function gallery() {
return $this->belongsTo('App\Models\Gallery\Gallery', 'gallery_id');
}
/**
* Get the prompt this submission is for if relevant.
*/
- public function prompt()
- {
+ public function prompt() {
return $this->belongsTo('App\Models\Prompt\Prompt', 'prompt_id');
}
@@ -147,80 +134,86 @@ public function prompt()
/**
* Scope a query to only include pending submissions.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopePending($query)
- {
+ public function scopePending($query) {
return $query->where('status', 'Pending');
}
/**
* Scope a query to only include submissions where all collaborators have approved.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeCollaboratorApproved($query)
- {
+ public function scopeCollaboratorApproved($query) {
return $query->whereNotIn('id', GalleryCollaborator::where('has_approved', 0)->pluck('gallery_submission_id')->toArray());
}
/**
* Scope a query to only include accepted submissions.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeAccepted($query)
- {
+ public function scopeAccepted($query) {
return $query->where('status', 'Accepted');
}
/**
* Scope a query to only include rejected submissions.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeRejected($query)
- {
+ public function scopeRejected($query) {
return $query->where('status', 'Rejected');
}
/**
* Scope a query to only include submissions that require currency awards.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeRequiresAward($query)
- {
- if(!Settings::get('gallery_submissions_reward_currency')) return $query->whereNull('id');
+ public function scopeRequiresAward($query) {
+ if (!Settings::get('gallery_submissions_reward_currency')) {
+ return $query->whereNull('id');
+ }
+
return $query->where('status', 'Accepted')->whereIn('gallery_id', Gallery::has('criteria')->pluck('id')->toArray());
}
/**
* Scope a query to only include submissions the user has either submitted or collaborated on.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param $user
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeUserSubmissions($query, $user)
- {
+ public function scopeUserSubmissions($query, $user) {
return $query->where('user_id', $user->id)->orWhereIn('id', GalleryCollaborator::where('user_id', $user->id)->where('type', 'Collab')->pluck('gallery_submission_id')->toArray());
}
/**
* Scope a query to only include submissions visible within the gallery.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param mixed|null $user
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query, $user = null)
- {
- if($user && $user->hasPower('manage_submissions')) return $query->where('status', 'Accepted');
+ public function scopeVisible($query, $user = null) {
+ if ($user && $user->hasPower('manage_submissions')) {
+ return $query->where('status', 'Accepted');
+ }
+
return $query->where('status', 'Accepted')->where('is_visible', 1);
}
@@ -235,8 +228,7 @@ public function scopeVisible($query, $user = null)
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/gallery/'.floor($this->id / 1000);
}
@@ -245,9 +237,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getImageFileNameAttribute()
- {
- return $this->id . '_'.$this->hash.'.'.$this->extension;
+ public function getImageFileNameAttribute() {
+ return $this->id.'_'.$this->hash.'.'.$this->extension;
}
/**
@@ -255,8 +246,7 @@ public function getImageFileNameAttribute()
*
* @return string
*/
- public function getImagePathAttribute()
- {
+ public function getImagePathAttribute() {
return public_path($this->imageDirectory);
}
@@ -265,10 +255,12 @@ public function getImagePathAttribute()
*
* @return string
*/
- public function getImageUrlAttribute()
- {
- if(!isset($this->hash)) return null;
- return asset($this->imageDirectory . '/' . $this->imageFileName);
+ public function getImageUrlAttribute() {
+ if (!isset($this->hash)) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->imageFileName);
}
/**
@@ -276,9 +268,8 @@ public function getImageUrlAttribute()
*
* @return string
*/
- public function getThumbnailFileNameAttribute()
- {
- return $this->id . '_'.$this->hash.'_th.'.$this->extension;
+ public function getThumbnailFileNameAttribute() {
+ return $this->id.'_'.$this->hash.'_th.'.$this->extension;
}
/**
@@ -286,8 +277,7 @@ public function getThumbnailFileNameAttribute()
*
* @return string
*/
- public function getThumbnailPathAttribute()
- {
+ public function getThumbnailPathAttribute() {
return $this->imagePath;
}
@@ -296,10 +286,12 @@ public function getThumbnailPathAttribute()
*
* @return string
*/
- public function getThumbnailUrlAttribute()
- {
- if(!isset($this->hash)) return null;
- return asset($this->imageDirectory . '/' . $this->thumbnailFileName);
+ public function getThumbnailUrlAttribute() {
+ if (!isset($this->hash)) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->thumbnailFileName);
}
/**
@@ -307,8 +299,7 @@ public function getThumbnailUrlAttribute()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -317,8 +308,7 @@ public function getDataAttribute()
*
* @return string
*/
- public function getVoteDataAttribute()
- {
+ public function getVoteDataAttribute() {
return collect(json_decode($this->attributes['vote_data'], true));
}
@@ -327,8 +317,7 @@ public function getVoteDataAttribute()
*
* @return string
*/
- public function getDisplayTitleAttribute()
- {
+ public function getDisplayTitleAttribute() {
return $this->prefix.$this->attributes['title'];
}
@@ -337,8 +326,7 @@ public function getDisplayTitleAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->displayTitle.' ';
}
@@ -347,8 +335,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('gallery/view/'.$this->id);
}
@@ -357,13 +344,17 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getPrefixAttribute()
- {
+ public function getPrefixAttribute() {
$prefixList = [];
- if($this->promptSubmissions->count()) foreach($this->prompts as $prompt) isset($prompt->prefix) ? ($prefixList[] = $prompt->prefix) : null;
- elseif(isset($this->prompt_id)) isset($this->prompt->prefix) ? $prefixList[] = $this->prompt->prefix : null;
- foreach($this->participants as $participant) {
- switch($participant->type) {
+ if ($this->promptSubmissions->count()) {
+ foreach ($this->prompts as $prompt) {
+ isset($prompt->prefix) ? ($prefixList[] = $prompt->prefix) : null;
+ }
+ } elseif (isset($this->prompt_id)) {
+ isset($this->prompt->prefix) ? $prefixList[] = $this->prompt->prefix : null;
+ }
+ foreach ($this->participants as $participant) {
+ switch ($participant->type) {
case 'Collab':
$prefixList[] = 'Collab';
break;
@@ -378,7 +369,10 @@ public function getPrefixAttribute()
break;
}
}
- if($prefixList != null) return '['.implode(' : ', array_unique($prefixList)).'] ';
+ if ($prefixList != null) {
+ return '['.implode(' : ', array_unique($prefixList)).'] ';
+ }
+
return null;
}
@@ -387,8 +381,7 @@ public function getPrefixAttribute()
*
* @return string
*/
- public function getQueueUrlAttribute()
- {
+ public function getQueueUrlAttribute() {
return url('gallery/queue/'.$this->id);
}
@@ -397,9 +390,10 @@ public function getQueueUrlAttribute()
*
* @return bool
*/
- public function getIsVisibleAttribute()
- {
- if($this->attributes['is_visible'] && $this->status == 'Accepted') return true;
+ public function getIsVisibleAttribute() {
+ if ($this->attributes['is_visible'] && $this->status == 'Accepted') {
+ return true;
+ }
}
/**
@@ -407,15 +401,16 @@ public function getIsVisibleAttribute()
*
* @return string
*/
- public function getCreditsAttribute()
- {
- if($this->collaborators->count()) {
- foreach($this->collaborators as $count=>$collaborator) {
+ public function getCreditsAttribute() {
+ if ($this->collaborators->count()) {
+ foreach ($this->collaborators as $count=>$collaborator) {
$collaboratorList[] = $collaborator->user->displayName;
}
+
return implode(', ', $collaboratorList);
+ } else {
+ return $this->user->displayName;
}
- else return $this->user->displayName;
}
/**
@@ -423,15 +418,16 @@ public function getCreditsAttribute()
*
* @return string
*/
- public function getCreditsPlainAttribute()
- {
- if($this->collaborators->count()) {
- foreach($this->collaborators as $count=>$collaborator) {
+ public function getCreditsPlainAttribute() {
+ if ($this->collaborators->count()) {
+ foreach ($this->collaborators as $count=>$collaborator) {
$collaboratorList[] = $collaborator->user->name;
}
+
return implode(', ', $collaboratorList);
+ } else {
+ return $this->user->name;
}
- else return $this->user->name;
}
/**
@@ -439,9 +435,11 @@ public function getCreditsPlainAttribute()
*
* @return string
*/
- public function getCollaboratorApprovedAttribute()
- {
- if($this->collaborators->where('has_approved', 0)->count()) return false;
+ public function getCollaboratorApprovedAttribute() {
+ if ($this->collaborators->where('has_approved', 0)->count()) {
+ return false;
+ }
+
return true;
}
@@ -450,8 +448,7 @@ public function getCollaboratorApprovedAttribute()
*
* @return array
*/
- public function getPromptSubmissionsAttribute()
- {
+ public function getPromptSubmissionsAttribute() {
// Only returns submissions which are viewable to everyone,
// but given that this is for the sake of public display, that's fine
return Submission::viewable()->whereNotNull('prompt_id')->where('url', $this->url)->get();
@@ -462,8 +459,7 @@ public function getPromptSubmissionsAttribute()
*
* @return array
*/
- public function getPromptsAttribute()
- {
+ public function getPromptsAttribute() {
// Only returns submissions which are viewable to everyone,
// but given that this is for the sake of public display, that's fine
return Prompt::whereIn('id', $this->promptSubmissions->pluck('prompt_id'))->get();
@@ -474,10 +470,11 @@ public function getPromptsAttribute()
*
* @return string
*/
- public function getExcerptAttribute()
- {
- if(!isset($this->parsed_text)) return null;
- else return strip_tags(substr($this->parsed_text, 0, 500)).(strlen($this->parsed_text) > 500 ? '...' : '');
+ public function getExcerptAttribute() {
+ if (!isset($this->parsed_text)) {
+ return null;
+ } else {
+ return strip_tags(substr($this->parsed_text, 0, 500)).(strlen($this->parsed_text) > 500 ? '...' : '');
+ }
}
-
}
diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php
index 788464817f..dd4dfd7450 100644
--- a/app/Models/Invitation.php
+++ b/app/Models/Invitation.php
@@ -2,17 +2,14 @@
namespace App\Models;
-use App\Models\Model;
-
-class Invitation extends Model
-{
+class Invitation extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'code', 'user_id', 'recipient_id'
+ 'code', 'user_id', 'recipient_id',
];
/**
@@ -29,26 +26,23 @@ class Invitation extends Model
*/
public $timestamps = true;
-
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the user who generated the invitation code.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
/**
* Get the user who created their account using the invitation code.
*/
- public function recipient()
- {
+ public function recipient() {
return $this->belongsTo('App\Models\User\User', 'recipient_id');
}
}
diff --git a/app/Models/Item/Item.php b/app/Models/Item/Item.php
index 7761c4914d..d7923eeefa 100644
--- a/app/Models/Item/Item.php
+++ b/app/Models/Item/Item.php
@@ -2,18 +2,14 @@
namespace App\Models\Item;
-use Config;
-use DB;
use App\Models\Model;
-use App\Models\Item\ItemCategory;
-
-use App\Models\User\User;
-use App\Models\Shop\Shop;
use App\Models\Prompt\Prompt;
+use App\Models\Shop\Shop;
+use App\Models\User\User;
use App\Models\User\UserItem;
+use DB;
-class Item extends Model
-{
+class Item extends Model {
/**
* The attributes that are mass assignable.
*
@@ -21,7 +17,7 @@ class Item extends Model
*/
protected $fillable = [
'item_category_id', 'name', 'has_image', 'description', 'parsed_description', 'allow_transfer',
- 'data', 'reference_url', 'artist_alias', 'artist_url', 'artist_id', 'is_released'
+ 'data', 'reference_url', 'artist_alias', 'artist_url', 'artist_id', 'is_released',
];
protected $appends = ['image_url'];
@@ -39,14 +35,14 @@ class Item extends Model
* @var array
*/
public static $createRules = [
- 'item_category_id' => 'nullable',
- 'name' => 'required|unique:items|between:3,100',
- 'description' => 'nullable',
- 'image' => 'mimes:png',
- 'rarity' => 'nullable',
- 'reference_url' => 'nullable|between:3,200',
- 'uses' => 'nullable|between:3,250',
- 'release' => 'nullable|between:3,100',
+ 'item_category_id' => 'nullable',
+ 'name' => 'required|unique:items|between:3,100',
+ 'description' => 'nullable',
+ 'image' => 'mimes:png',
+ 'rarity' => 'nullable',
+ 'reference_url' => 'nullable|between:3,200',
+ 'uses' => 'nullable|between:3,250',
+ 'release' => 'nullable|between:3,100',
'currency_quantity' => 'nullable|integer|min:1',
];
@@ -56,13 +52,13 @@ class Item extends Model
* @var array
*/
public static $updateRules = [
- 'item_category_id' => 'nullable',
- 'name' => 'required|between:3,100',
- 'description' => 'nullable',
- 'image' => 'mimes:png',
- 'reference_url' => 'nullable|between:3,200',
- 'uses' => 'nullable|between:3,250',
- 'release' => 'nullable|between:3,100',
+ 'item_category_id' => 'nullable',
+ 'name' => 'required|between:3,100',
+ 'description' => 'nullable',
+ 'image' => 'mimes:png',
+ 'reference_url' => 'nullable|between:3,200',
+ 'uses' => 'nullable|between:3,250',
+ 'release' => 'nullable|between:3,100',
'currency_quantity' => 'nullable|integer|min:1',
];
@@ -75,24 +71,21 @@ class Item extends Model
/**
* Get the category the item belongs to.
*/
- public function category()
- {
+ public function category() {
return $this->belongsTo('App\Models\Item\ItemCategory', 'item_category_id');
}
/**
* Get the item's tags.
*/
- public function tags()
- {
+ public function tags() {
return $this->hasMany('App\Models\Item\ItemTag', 'item_id');
}
/**
* Get the user that drew the item art.
*/
- public function artist()
- {
+ public function artist() {
return $this->belongsTo('App\Models\User\User', 'artist_id');
}
@@ -105,57 +98,58 @@ public function artist()
/**
* Scope a query to sort items in alphabetical order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param bool $reverse
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortAlphabetical($query, $reverse = false)
- {
+ public function scopeSortAlphabetical($query, $reverse = false) {
return $query->orderBy('name', $reverse ? 'DESC' : 'ASC');
}
/**
* Scope a query to sort items in category order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortCategory($query)
- {
+ public function scopeSortCategory($query) {
$ids = ItemCategory::orderBy('sort', 'DESC')->pluck('id')->toArray();
+
return count($ids) ? $query->orderByRaw(DB::raw('FIELD(item_category_id, '.implode(',', $ids).')')) : $query;
}
/**
* Scope a query to sort items by newest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortNewest($query)
- {
+ public function scopeSortNewest($query) {
return $query->orderBy('id', 'DESC');
}
/**
* Scope a query to sort features oldest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortOldest($query)
- {
+ public function scopeSortOldest($query) {
return $query->orderBy('id');
}
/**
* Scope a query to show only released or "released" (at least one user-owned stack has ever existed) items.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeReleased($query)
- {
+ public function scopeReleased($query) {
return $query->whereIn('id', UserItem::pluck('item_id')->toArray())->orWhere('is_released', 1);
}
@@ -170,8 +164,7 @@ public function scopeReleased($query)
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -180,8 +173,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/items';
}
@@ -190,9 +182,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -200,8 +191,7 @@ public function getImageFileNameAttribute()
*
* @return string
*/
- public function getImagePathAttribute()
- {
+ public function getImagePathAttribute() {
return public_path($this->imageDirectory);
}
@@ -210,10 +200,12 @@ public function getImagePathAttribute()
*
* @return string
*/
- public function getImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->imageFileName);
+ public function getImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->imageFileName);
}
/**
@@ -221,8 +213,7 @@ public function getImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/items?name='.$this->name);
}
@@ -231,8 +222,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getIdUrlAttribute()
- {
+ public function getIdUrlAttribute() {
return url('world/items/'.$this->id);
}
@@ -241,8 +231,7 @@ public function getIdUrlAttribute()
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'items';
}
@@ -251,24 +240,22 @@ public function getAssetTypeAttribute()
*
* @return string
*/
- public function getItemArtistAttribute()
- {
- if(!$this->artist_url && !$this->artist_id) return null;
+ public function getItemArtistAttribute() {
+ if (!$this->artist_url && !$this->artist_id) {
+ return null;
+ }
// Check to see if the artist exists on site
$artist = checkAlias($this->artist_url, false);
- if(is_object($artist)) {
+ if (is_object($artist)) {
$this->artist_id = $artist->id;
$this->artist_url = null;
$this->save();
}
- if($this->artist_id)
- {
+ if ($this->artist_id) {
return $this->artist->displayName;
- }
- else if ($this->artist_url)
- {
+ } elseif ($this->artist_url) {
return prettyProfileLink($this->artist_url);
}
}
@@ -278,9 +265,11 @@ public function getItemArtistAttribute()
*
* @return string
*/
- public function getReferenceAttribute()
- {
- if (!$this->reference_url) return null;
+ public function getReferenceAttribute() {
+ if (!$this->reference_url) {
+ return null;
+ }
+
return $this->reference_url;
}
@@ -289,9 +278,11 @@ public function getReferenceAttribute()
*
* @return array
*/
- public function getDataAttribute()
- {
- if (!$this->id) return null;
+ public function getDataAttribute() {
+ if (!$this->id) {
+ return null;
+ }
+
return json_decode($this->attributes['data'], true);
}
@@ -300,9 +291,11 @@ public function getDataAttribute()
*
* @return string
*/
- public function getRarityAttribute()
- {
- if (!isset($this->data) || !isset($this->data['rarity'])) return null;
+ public function getRarityAttribute() {
+ if (!isset($this->data) || !isset($this->data['rarity'])) {
+ return null;
+ }
+
return $this->data['rarity'];
}
@@ -311,9 +304,11 @@ public function getRarityAttribute()
*
* @return string
*/
- public function getUsesAttribute()
- {
- if (!$this->data) return null;
+ public function getUsesAttribute() {
+ if (!$this->data) {
+ return null;
+ }
+
return $this->data['uses'];
}
@@ -322,9 +317,11 @@ public function getUsesAttribute()
*
* @return string
*/
- public function getSourceAttribute()
- {
- if (!$this->data) return null;
+ public function getSourceAttribute() {
+ if (!$this->data) {
+ return null;
+ }
+
return $this->data['release'];
}
@@ -333,9 +330,11 @@ public function getSourceAttribute()
*
* @return string
*/
- public function getResellAttribute()
- {
- if (!$this->data) return null;
+ public function getResellAttribute() {
+ if (!$this->data) {
+ return null;
+ }
+
return collect($this->data['resell']);
}
@@ -344,10 +343,12 @@ public function getResellAttribute()
*
* @return array
*/
- public function getShopsAttribute()
- {
- if (!$this->data) return null;
+ public function getShopsAttribute() {
+ if (!$this->data) {
+ return null;
+ }
$itemShops = $this->data['shops'];
+
return Shop::whereIn('id', $itemShops)->get();
}
@@ -356,10 +357,12 @@ public function getShopsAttribute()
*
* @return array
*/
- public function getPromptsAttribute()
- {
- if (!$this->data) return null;
+ public function getPromptsAttribute() {
+ if (!$this->data) {
+ return null;
+ }
$itemPrompts = $this->data['prompts'];
+
return Prompt::whereIn('id', $itemPrompts)->get();
}
@@ -372,20 +375,22 @@ public function getPromptsAttribute()
/**
* Checks if the item has a particular tag.
*
+ * @param mixed $tag
+ *
* @return bool
*/
- public function hasTag($tag)
- {
+ public function hasTag($tag) {
return $this->tags()->where('tag', $tag)->where('is_active', 1)->exists();
}
/**
* Gets a particular tag attached to the item.
*
+ * @param mixed $tag
+ *
* @return \App\Models\Item\ItemTag
*/
- public function tag($tag)
- {
+ public function tag($tag) {
return $this->tags()->where('tag', $tag)->where('is_active', 1)->first();
}
}
diff --git a/app/Models/Item/ItemCategory.php b/app/Models/Item/ItemCategory.php
index 3dc336ff06..2f3dcb21c1 100644
--- a/app/Models/Item/ItemCategory.php
+++ b/app/Models/Item/ItemCategory.php
@@ -2,18 +2,16 @@
namespace App\Models\Item;
-use Config;
use App\Models\Model;
-class ItemCategory extends Model
-{
+class ItemCategory extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'sort', 'has_image', 'description', 'parsed_description', 'is_character_owned', 'character_limit', 'can_name'
+ 'name', 'sort', 'has_image', 'description', 'parsed_description', 'is_character_owned', 'character_limit', 'can_name',
];
/**
@@ -22,31 +20,31 @@ class ItemCategory extends Model
* @var string
*/
protected $table = 'item_categories';
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:item_categories|between:3,100',
+ 'name' => 'required|unique:item_categories|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
+ 'name' => 'required|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -56,8 +54,7 @@ class ItemCategory extends Model
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -66,8 +63,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/item-categories';
}
@@ -76,9 +72,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getCategoryImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getCategoryImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -86,20 +81,21 @@ public function getCategoryImageFileNameAttribute()
*
* @return string
*/
- public function getCategoryImagePathAttribute()
- {
+ public function getCategoryImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getCategoryImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->categoryImageFileName);
+ public function getCategoryImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->categoryImageFileName);
}
/**
@@ -107,8 +103,7 @@ public function getCategoryImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/item-categories?name='.$this->name);
}
@@ -117,8 +112,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getSearchUrlAttribute()
- {
+ public function getSearchUrlAttribute() {
return url('world/items?item_category_id='.$this->id);
}
}
diff --git a/app/Models/Item/ItemLog.php b/app/Models/Item/ItemLog.php
index 8c719bd421..a614a293a7 100644
--- a/app/Models/Item/ItemLog.php
+++ b/app/Models/Item/ItemLog.php
@@ -2,21 +2,19 @@
namespace App\Models\Item;
-use Config;
use App\Models\Model;
-class ItemLog extends Model
-{
+class ItemLog extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'sender_id', 'recipient_id',
+ 'sender_id', 'recipient_id',
'log', 'log_type', 'data',
'item_id', 'quantity', 'stack_id',
- 'sender_type', 'recipient_type'
+ 'sender_type', 'recipient_type',
];
/**
@@ -34,7 +32,7 @@ class ItemLog extends Model
public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -42,26 +40,29 @@ class ItemLog extends Model
/**
* Get the user who initiated the logged action.
*/
- public function sender()
- {
- if($this->sender_type == 'User') return $this->belongsTo('App\Models\User\User', 'sender_id');
+ public function sender() {
+ if ($this->sender_type == 'User') {
+ return $this->belongsTo('App\Models\User\User', 'sender_id');
+ }
+
return $this->belongsTo('App\Models\Character\Character', 'sender_id');
}
/**
* Get the user who received the logged action.
*/
- public function recipient()
- {
- if($this->recipient_type == 'User') return $this->belongsTo('App\Models\User\User', 'recipient_id');
+ public function recipient() {
+ if ($this->recipient_type == 'User') {
+ return $this->belongsTo('App\Models\User\User', 'recipient_id');
+ }
+
return $this->belongsTo('App\Models\Character\Character', 'recipient_id');
}
/**
* Get the item that is the target of the action.
*/
- public function item()
- {
+ public function item() {
return $this->belongsTo('App\Models\Item\Item');
}
}
diff --git a/app/Models/Item/ItemTag.php b/app/Models/Item/ItemTag.php
index 896aad0794..852afb1162 100644
--- a/app/Models/Item/ItemTag.php
+++ b/app/Models/Item/ItemTag.php
@@ -2,19 +2,17 @@
namespace App\Models\Item;
-use Config;
-use DB;
use App\Models\Model;
+use Config;
-class ItemTag extends Model
-{
+class ItemTag extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'item_id', 'tag', 'data', 'is_active'
+ 'item_id', 'tag', 'data', 'is_active',
];
/**
@@ -25,7 +23,7 @@ class ItemTag extends Model
protected $table = 'item_tags';
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -33,13 +31,12 @@ class ItemTag extends Model
/**
* Get the item that this tag is attached to.
*/
- public function item()
- {
+ public function item() {
return $this->belongsTo('App\Models\Item\Item');
}
/**********************************************************************************************
-
+
SCOPES
**********************************************************************************************/
@@ -47,41 +44,43 @@ public function item()
/**
* Scope a query to retrieve only active tags.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query->where('is_active', 1);
}
/**
* Scope a query to retrieve only a certain tag.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param string $tag
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param string $tag
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeType($query, $tag)
- {
+ public function scopeType($query, $tag) {
return $query->where('tag', $tag);
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Displays the tag name formatted according to its colours as defined in the config file.
*
* @return string
*/
- public function getDisplayTagAttribute()
- {
- $tag = Config::get('lorekeeper.item_tags.' . $this->tag);
- if($tag) return ''.$tag['name'].' ';
+ public function getDisplayTagAttribute() {
+ $tag = Config::get('lorekeeper.item_tags.'.$this->tag);
+ if ($tag) {
+ return ''.$tag['name'].' ';
+ }
+
return null;
}
@@ -90,9 +89,8 @@ public function getDisplayTagAttribute()
*
* @return mixed
*/
- public function getName()
- {
- return Config::get('lorekeeper.item_tags.' . $this->tag.'.name');
+ public function getName() {
+ return Config::get('lorekeeper.item_tags.'.$this->tag.'.name');
}
/**
@@ -100,8 +98,7 @@ public function getName()
*
* @return string
*/
- public function getAdminUrlAttribute()
- {
+ public function getAdminUrlAttribute() {
return url('admin/data/items/tag/'.$this->item_id.'/'.$this->tag);
}
@@ -110,8 +107,7 @@ public function getAdminUrlAttribute()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -120,14 +116,14 @@ public function getDataAttribute()
*
* @return mixed
*/
- public function getServiceAttribute()
- {
+ public function getServiceAttribute() {
$class = 'App\Services\Item\\'.str_replace(' ', '', ucwords(str_replace('_', ' ', $this->tag))).'Service';
- return (new $class());
+
+ return new $class();
}
/**********************************************************************************************
-
+
OTHER FUNCTIONS
**********************************************************************************************/
@@ -137,8 +133,7 @@ public function getServiceAttribute()
*
* @return mixed
*/
- public function getEditData()
- {
+ public function getEditData() {
return $this->service->getEditData();
}
@@ -147,8 +142,7 @@ public function getEditData()
*
* @return mixed
*/
- public function getData()
- {
+ public function getData() {
return $this->service->getTagData($this);
}
}
diff --git a/app/Models/Loot/Loot.php b/app/Models/Loot/Loot.php
index 2409f23f70..6b1f5ceecb 100644
--- a/app/Models/Loot/Loot.php
+++ b/app/Models/Loot/Loot.php
@@ -2,11 +2,9 @@
namespace App\Models\Loot;
-use Config;
use App\Models\Model;
-class Loot extends Model
-{
+class Loot extends Model {
/**
* The attributes that are mass assignable.
*
@@ -14,7 +12,7 @@ class Loot extends Model
*/
protected $fillable = [
'loot_table_id', 'rewardable_type', 'rewardable_id',
- 'quantity', 'weight', 'data'
+ 'quantity', 'weight', 'data',
];
/**
@@ -31,9 +29,9 @@ class Loot extends Model
*/
public static $createRules = [
'rewardable_type' => 'required',
- 'rewardable_id' => 'required',
- 'quantity' => 'required|integer|min:1',
- 'weight' => 'required|integer|min:1',
+ 'rewardable_id' => 'required',
+ 'quantity' => 'required|integer|min:1',
+ 'weight' => 'required|integer|min:1',
];
/**
@@ -43,9 +41,9 @@ class Loot extends Model
*/
public static $updateRules = [
'rewardable_type' => 'required',
- 'rewardable_id' => 'required',
- 'quantity' => 'required|integer|min:1',
- 'weight' => 'required|integer|min:1',
+ 'rewardable_id' => 'required',
+ 'quantity' => 'required|integer|min:1',
+ 'weight' => 'required|integer|min:1',
];
/**********************************************************************************************
@@ -57,10 +55,8 @@ class Loot extends Model
/**
* Get the reward attached to the loot entry.
*/
- public function reward()
- {
- switch ($this->rewardable_type)
- {
+ public function reward() {
+ switch ($this->rewardable_type) {
case 'Item':
return $this->belongsTo('App\Models\Item\Item', 'rewardable_id');
case 'ItemRarity':
@@ -77,6 +73,7 @@ public function reward()
// Laravel requires a relationship instance to be returned (cannot return null), so returning one that doesn't exist here.
return $this->belongsTo('App\Models\Loot\Loot', 'rewardable_id', 'loot_table_id')->whereNull('loot_table_id');
}
+
return null;
}
@@ -91,9 +88,11 @@ public function reward()
*
* @return array
*/
- public function getDataAttribute()
- {
- if (!$this->attributes['data']) return null;
+ public function getDataAttribute() {
+ if (!$this->attributes['data']) {
+ return null;
+ }
+
return json_decode($this->attributes['data'], true);
}
}
diff --git a/app/Models/Loot/LootTable.php b/app/Models/Loot/LootTable.php
index 4e264acde0..dba2c1cfea 100644
--- a/app/Models/Loot/LootTable.php
+++ b/app/Models/Loot/LootTable.php
@@ -2,13 +2,11 @@
namespace App\Models\Loot;
-use Config;
use App\Models\Item\Item;
-
use App\Models\Model;
+use Config;
-class LootTable extends Model
-{
+class LootTable extends Model {
/**
* The attributes that are mass assignable.
*
@@ -31,7 +29,7 @@ class LootTable extends Model
* @var array
*/
public static $createRules = [
- 'name' => 'required',
+ 'name' => 'required',
'display_name' => 'required',
];
@@ -41,7 +39,7 @@ class LootTable extends Model
* @var array
*/
public static $updateRules = [
- 'name' => 'required',
+ 'name' => 'required',
'display_name' => 'required',
];
@@ -54,8 +52,7 @@ class LootTable extends Model
/**
* Get the loot data for this loot table.
*/
- public function loot()
- {
+ public function loot() {
return $this->hasMany('App\Models\Loot\Loot', 'loot_table_id');
}
@@ -70,8 +67,7 @@ public function loot()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->attributes['display_name'].' '.add_help('This reward is random.');
}
@@ -80,8 +76,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'loot_tables';
}
@@ -94,110 +89,128 @@ public function getAssetTypeAttribute()
/**
* Rolls on the loot table and consolidates the rewards.
*
- * @param int $quantity
+ * @param int $quantity
+ *
* @return \Illuminate\Support\Collection
*/
- public function roll($quantity = 1)
- {
+ public function roll($quantity = 1) {
$rewards = createAssetsArray();
$loot = $this->loot;
$totalWeight = 0;
- foreach($loot as $l) $totalWeight += $l->weight;
+ foreach ($loot as $l) {
+ $totalWeight += $l->weight;
+ }
- for($i = 0; $i < $quantity; $i++)
- {
+ for ($i = 0; $i < $quantity; $i++) {
$roll = mt_rand(0, $totalWeight - 1);
$result = null;
$prev = null;
$count = 0;
- foreach($loot as $l)
- {
+ foreach ($loot as $l) {
$count += $l->weight;
- if($roll < $count)
- {
+ if ($roll < $count) {
$result = $l;
break;
}
$prev = $l;
}
- if(!$result) $result = $prev;
+ if (!$result) {
+ $result = $prev;
+ }
- if($result) {
+ if ($result) {
// If this is chained to another loot table, roll on that table
- if($result->rewardable_type == 'LootTable') $rewards = mergeAssetsArrays($rewards, $result->reward->roll($result->quantity));
- elseif($result->rewardable_type == 'ItemCategory' || $result->rewardable_type == 'ItemCategoryRarity') $rewards = mergeAssetsArrays($rewards, $this->rollCategory($result->rewardable_id, $result->quantity, (isset($result->data['criteria']) ? $result->data['criteria'] : null), (isset($result->data['rarity']) ? $result->data['rarity'] : null)));
- elseif($result->rewardable_type == 'ItemRarity') $rewards = mergeAssetsArrays($rewards, $this->rollRarityItem($result->quantity, $result->data['criteria'], $result->data['rarity']));
- else addAsset($rewards, $result->reward, $result->quantity);
+ if ($result->rewardable_type == 'LootTable') {
+ $rewards = mergeAssetsArrays($rewards, $result->reward->roll($result->quantity));
+ } elseif ($result->rewardable_type == 'ItemCategory' || $result->rewardable_type == 'ItemCategoryRarity') {
+ $rewards = mergeAssetsArrays($rewards, $this->rollCategory($result->rewardable_id, $result->quantity, ($result->data['criteria'] ?? null), ($result->data['rarity'] ?? null)));
+ } elseif ($result->rewardable_type == 'ItemRarity') {
+ $rewards = mergeAssetsArrays($rewards, $this->rollRarityItem($result->quantity, $result->data['criteria'], $result->data['rarity']));
+ } else {
+ addAsset($rewards, $result->reward, $result->quantity);
+ }
}
}
+
return $rewards;
}
/**
* Rolls on an item category.
*
- * @param int $id
- * @param int $quantity
- * @param string $condition
- * @param string $rarity
+ * @param int $id
+ * @param int $quantity
+ * @param string $rarity
+ * @param mixed|null $criteria
+ *
* @return \Illuminate\Support\Collection
*/
- public function rollCategory($id, $quantity = 1, $criteria = null, $rarity = null)
- {
+ public function rollCategory($id, $quantity = 1, $criteria = null, $rarity = null) {
$rewards = createAssetsArray();
- if(isset($criteria) && $criteria && isset($rarity) && $rarity) {
- if(Config::get('lorekeeper.extensions.item_entry_expansion.loot_tables.alternate_filtering')) $loot = Item::where('item_category_id', $id)->released()->whereNotNull('data')->where('data->rarity', $criteria, $rarity)->get();
- else $loot = Item::where('item_category_id', $id)->released()->whereNotNull('data')->whereRaw('JSON_EXTRACT(`data`, \'$.rarity\')'. $criteria . $rarity)->get();
+ if (isset($criteria) && $criteria && isset($rarity) && $rarity) {
+ if (Config::get('lorekeeper.extensions.item_entry_expansion.loot_tables.alternate_filtering')) {
+ $loot = Item::where('item_category_id', $id)->released()->whereNotNull('data')->where('data->rarity', $criteria, $rarity)->get();
+ } else {
+ $loot = Item::where('item_category_id', $id)->released()->whereNotNull('data')->whereRaw('JSON_EXTRACT(`data`, \'$.rarity\')'.$criteria.$rarity)->get();
+ }
+ } else {
+ $loot = Item::where('item_category_id', $id)->released()->get();
+ }
+ if (!$loot->count()) {
+ throw new \Exception('There are no items to select from!');
}
- else $loot = Item::where('item_category_id', $id)->released()->get();
- if(!$loot->count()) throw new \Exception('There are no items to select from!');
$totalWeight = $loot->count();
- for($i = 0; $i < $quantity; $i++)
- {
+ for ($i = 0; $i < $quantity; $i++) {
$roll = mt_rand(0, $totalWeight - 1);
$result = $loot[$roll];
- if($result) {
+ if ($result) {
// If this is chained to another loot table, roll on that table
addAsset($rewards, $result, 1);
}
}
+
return $rewards;
}
/**
* Rolls on an item rarity.
*
- * @param int $quantity
- * @param string $condition
- * @param string $rarity
+ * @param int $quantity
+ * @param string $rarity
+ * @param mixed $criteria
+ *
* @return \Illuminate\Support\Collection
*/
- public function rollRarityItem($quantity = 1, $criteria, $rarity)
- {
+ public function rollRarityItem($quantity, $criteria, $rarity) {
$rewards = createAssetsArray();
- if(Config::get('lorekeeper.extensions.item_entry_expansion.loot_tables.alternate_filtering')) $loot = Item::released()->whereNotNull('data')->where('data->rarity', $criteria, $rarity)->get();
- else $loot = Item::released()->whereNotNull('data')->whereRaw('JSON_EXTRACT(`data`, \'$.rarity\')'. $criteria . $rarity)->get();
- if(!$loot->count()) throw new \Exception('There are no items to select from!');
+ if (Config::get('lorekeeper.extensions.item_entry_expansion.loot_tables.alternate_filtering')) {
+ $loot = Item::released()->whereNotNull('data')->where('data->rarity', $criteria, $rarity)->get();
+ } else {
+ $loot = Item::released()->whereNotNull('data')->whereRaw('JSON_EXTRACT(`data`, \'$.rarity\')'.$criteria.$rarity)->get();
+ }
+ if (!$loot->count()) {
+ throw new \Exception('There are no items to select from!');
+ }
$totalWeight = $loot->count();
- for($i = 0; $i < $quantity; $i++)
- {
+ for ($i = 0; $i < $quantity; $i++) {
$roll = mt_rand(0, $totalWeight - 1);
$result = $loot[$roll];
- if($result) {
+ if ($result) {
// If this is chained to another loot table, roll on that table
addAsset($rewards, $result, 1);
}
}
+
return $rewards;
}
}
diff --git a/app/Models/Model.php b/app/Models/Model.php
index addde921b0..7525891258 100644
--- a/app/Models/Model.php
+++ b/app/Models/Model.php
@@ -4,8 +4,7 @@
use Illuminate\Database\Eloquent\Model as EloquentModel;
-class Model extends EloquentModel
-{
+class Model extends EloquentModel {
/**
* Whether the model contains timestamps to be saved and updated.
*
diff --git a/app/Models/News.php b/app/Models/News.php
index 340538dce4..7f1af4411a 100644
--- a/app/Models/News.php
+++ b/app/Models/News.php
@@ -2,15 +2,11 @@
namespace App\Models;
+use App\Traits\Commentable;
use Carbon\Carbon;
-use Config;
-use App\Models\Model;
use Illuminate\Support\Str;
-use App\Traits\Commentable;
-
-class News extends Model
-{
+class News extends Model {
use Commentable;
/**
* The attributes that are mass assignable.
@@ -18,7 +14,7 @@ class News extends Model
* @var array
*/
protected $fillable = [
- 'user_id', 'text', 'parsed_text', 'title', 'is_visible', 'post_at'
+ 'user_id', 'text', 'parsed_text', 'title', 'is_visible', 'post_at',
];
/**
@@ -49,9 +45,9 @@ class News extends Model
*/
public static $createRules = [
'title' => 'required|between:3,100',
- 'text' => 'required',
+ 'text' => 'required',
];
-
+
/**
* Validation rules for updating.
*
@@ -59,25 +55,24 @@ class News extends Model
*/
public static $updateRules = [
'title' => 'required|between:3,100',
- 'text' => 'required',
+ 'text' => 'required',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the user who created the news post.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
/**********************************************************************************************
-
+
SCOPES
**********************************************************************************************/
@@ -85,27 +80,27 @@ public function user()
/**
* Scope a query to only include visible posts.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query)
- {
+ public function scopeVisible($query) {
return $query->where('is_visible', 1);
}
/**
* Scope a query to only include posts that are scheduled to be posted and are ready to post.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeShouldBeVisible($query)
- {
+ public function scopeShouldBeVisible($query) {
return $query->whereNotNull('post_at')->where('post_at', '<', Carbon::now())->where('is_visible', 0);
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -115,9 +110,8 @@ public function scopeShouldBeVisible($query)
*
* @return bool
*/
- public function getSlugAttribute()
- {
- return $this->id . '.' . Str::slug($this->title);
+ public function getSlugAttribute() {
+ return $this->id.'.'.Str::slug($this->title);
}
/**
@@ -125,8 +119,7 @@ public function getSlugAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->title.' ';
}
@@ -135,8 +128,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('news/'.$this->slug);
}
}
diff --git a/app/Models/Notification.php b/app/Models/Notification.php
index d140bbfa9c..67c3208ffd 100644
--- a/app/Models/Notification.php
+++ b/app/Models/Notification.php
@@ -3,17 +3,15 @@
namespace App\Models;
use Config;
-use App\Models\Model;
-class Notification extends Model
-{
+class Notification extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'user_id', 'notification_type_id', 'is_unread', 'data'
+ 'user_id', 'notification_type_id', 'is_unread', 'data',
];
/**
@@ -30,23 +28,21 @@ class Notification extends Model
*/
public $timestamps = true;
-
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the user who owns notification.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -56,8 +52,7 @@ public function user()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -66,19 +61,18 @@ public function getDataAttribute()
*
* @return array
*/
- public function getMessageAttribute()
- {
+ public function getMessageAttribute() {
$notification = Config::get('lorekeeper.notifications.'.$this->notification_type_id);
$message = $notification['message'];
- // Replace the URL...
+ // Replace the URL...
$message = str_replace('{url}', url($notification['url']), $message);
- // Replace any variables in data...
+ // Replace any variables in data...
$data = $this->data;
- if($data && count($data)) {
- foreach($data as $key => $value) {
+ if ($data && count($data)) {
+ foreach ($data as $key => $value) {
$message = str_replace('{'.$key.'}', $value, $message);
}
}
@@ -89,74 +83,75 @@ public function getMessageAttribute()
/**
* Get the notification ID from type.
*
+ * @param mixed $type
+ *
* @return array
*/
- public static function getNotificationId($type)
- {
- return constant('self::'. $type);
+ public static function getNotificationId($type) {
+ return constant('self::'.$type);
}
/**********************************************************************************************
-
+
CONSTANTS
**********************************************************************************************/
- const CURRENCY_GRANT = 0;
- const ITEM_GRANT = 1;
- const CURRENCY_REMOVAL = 2;
- const ITEM_REMOVAL = 3;
- const CURRENCY_TRANSFER = 4;
- const ITEM_TRANSFER = 5;
- const FORCED_ITEM_TRANSFER = 6;
- const CHARACTER_UPLOAD = 7;
- const CHARACTER_CURRENCY_GRANT = 8;
- const CHARACTER_CURRENCY_REMOVAL = 9;
- const CHARACTER_PROFILE_EDIT = 10;
- const IMAGE_UPLOAD = 11;
- const CHARACTER_TRANSFER_RECEIVED = 12;
- const CHARACTER_TRANSFER_REJECTED = 13;
- const CHARACTER_TRANSFER_CANCELED = 14;
- const CHARACTER_TRANSFER_DENIED = 15;
- const CHARACTER_TRANSFER_ACCEPTED = 16;
- const CHARACTER_TRANSFER_APPROVED = 17;
- const CHARACTER_SENT = 18;
- const CHARACTER_RECEIVED = 19;
- const SUBMISSION_APPROVED = 20;
- const SUBMISSION_REJECTED = 21;
- const CLAIM_APPROVED = 22;
- const CLAIM_REJECTED = 23;
- const MYO_GRANT = 24;
- const DESIGN_APPROVED = 25;
- const DESIGN_REJECTED = 26;
- const DESIGN_CANCELED = 27;
- const TRADE_RECEIVED = 28;
- const TRADE_UPDATE = 29;
- const TRADE_CANCELED = 30;
- const TRADE_COMPLETED = 31;
- const TRADE_REJECTED = 32;
- const TRADE_CONFIRMED = 33;
- const BOOKMARK_TRADING = 34;
- const BOOKMARK_GIFTS = 35;
- const BOOKMARK_OWNER = 36;
- const BOOKMARK_IMAGE = 37;
- const CHARACTER_TRANSFER_ACCEPTABLE = 38;
- const BOOKMARK_GIFT_WRITING = 39;
- const REPORT_ASSIGNED = 220;
- const REPORT_CLOSED = 221;
- const COMMENT_MADE = 239;
- const COMMENT_REPLY = 240;
- const CHARACTER_ITEM_GRANT = 501;
- const CHARACTER_ITEM_REMOVAL = 502;
- const GALLERY_SUBMISSION_COLLABORATOR = 505;
- const GALLERY_COLLABORATORS_APPROVED = 506;
- const GALLERY_SUBMISSION_ACCEPTED = 507;
- const GALLERY_SUBMISSION_REJECTED = 508;
- const GALLERY_SUBMISSION_VALUED = 509;
- const GALLERY_SUBMISSION_MOVED = 510;
- const GALLERY_SUBMISSION_CHARACTER = 511;
- const GALLERY_SUBMISSION_FAVORITE = 512;
- const GALLERY_SUBMISSION_STAFF_COMMENTS = 513;
- const GALLERY_SUBMISSION_EDITED = 514;
- const GALLERY_SUBMISSION_PARTICIPANT = 515;
+ public const CURRENCY_GRANT = 0;
+ public const ITEM_GRANT = 1;
+ public const CURRENCY_REMOVAL = 2;
+ public const ITEM_REMOVAL = 3;
+ public const CURRENCY_TRANSFER = 4;
+ public const ITEM_TRANSFER = 5;
+ public const FORCED_ITEM_TRANSFER = 6;
+ public const CHARACTER_UPLOAD = 7;
+ public const CHARACTER_CURRENCY_GRANT = 8;
+ public const CHARACTER_CURRENCY_REMOVAL = 9;
+ public const CHARACTER_PROFILE_EDIT = 10;
+ public const IMAGE_UPLOAD = 11;
+ public const CHARACTER_TRANSFER_RECEIVED = 12;
+ public const CHARACTER_TRANSFER_REJECTED = 13;
+ public const CHARACTER_TRANSFER_CANCELED = 14;
+ public const CHARACTER_TRANSFER_DENIED = 15;
+ public const CHARACTER_TRANSFER_ACCEPTED = 16;
+ public const CHARACTER_TRANSFER_APPROVED = 17;
+ public const CHARACTER_SENT = 18;
+ public const CHARACTER_RECEIVED = 19;
+ public const SUBMISSION_APPROVED = 20;
+ public const SUBMISSION_REJECTED = 21;
+ public const CLAIM_APPROVED = 22;
+ public const CLAIM_REJECTED = 23;
+ public const MYO_GRANT = 24;
+ public const DESIGN_APPROVED = 25;
+ public const DESIGN_REJECTED = 26;
+ public const DESIGN_CANCELED = 27;
+ public const TRADE_RECEIVED = 28;
+ public const TRADE_UPDATE = 29;
+ public const TRADE_CANCELED = 30;
+ public const TRADE_COMPLETED = 31;
+ public const TRADE_REJECTED = 32;
+ public const TRADE_CONFIRMED = 33;
+ public const BOOKMARK_TRADING = 34;
+ public const BOOKMARK_GIFTS = 35;
+ public const BOOKMARK_OWNER = 36;
+ public const BOOKMARK_IMAGE = 37;
+ public const CHARACTER_TRANSFER_ACCEPTABLE = 38;
+ public const BOOKMARK_GIFT_WRITING = 39;
+ public const REPORT_ASSIGNED = 220;
+ public const REPORT_CLOSED = 221;
+ public const COMMENT_MADE = 239;
+ public const COMMENT_REPLY = 240;
+ public const CHARACTER_ITEM_GRANT = 501;
+ public const CHARACTER_ITEM_REMOVAL = 502;
+ public const GALLERY_SUBMISSION_COLLABORATOR = 505;
+ public const GALLERY_COLLABORATORS_APPROVED = 506;
+ public const GALLERY_SUBMISSION_ACCEPTED = 507;
+ public const GALLERY_SUBMISSION_REJECTED = 508;
+ public const GALLERY_SUBMISSION_VALUED = 509;
+ public const GALLERY_SUBMISSION_MOVED = 510;
+ public const GALLERY_SUBMISSION_CHARACTER = 511;
+ public const GALLERY_SUBMISSION_FAVORITE = 512;
+ public const GALLERY_SUBMISSION_STAFF_COMMENTS = 513;
+ public const GALLERY_SUBMISSION_EDITED = 514;
+ public const GALLERY_SUBMISSION_PARTICIPANT = 515;
}
diff --git a/app/Models/Prompt/Prompt.php b/app/Models/Prompt/Prompt.php
index ac9fd0a7e6..ab01bb4660 100644
--- a/app/Models/Prompt/Prompt.php
+++ b/app/Models/Prompt/Prompt.php
@@ -2,14 +2,11 @@
namespace App\Models\Prompt;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Model;
-use App\Models\Prompt\PromptCategory;
+use Carbon\Carbon;
+use DB;
-class Prompt extends Model
-{
+class Prompt extends Model {
/**
* The attributes that are mass assignable.
*
@@ -18,7 +15,7 @@ class Prompt extends Model
protected $fillable = [
'prompt_category_id', 'name', 'summary', 'description', 'parsed_description', 'is_active',
'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'has_image', 'prefix',
- 'hide_submissions'
+ 'hide_submissions',
];
/**
@@ -42,11 +39,11 @@ class Prompt extends Model
*/
public static $createRules = [
'prompt_category_id' => 'nullable',
- 'name' => 'required|unique:prompts|between:3,100',
- 'prefix' => 'nullable|unique:prompts|between:2,10',
- 'summary' => 'nullable',
- 'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'name' => 'required|unique:prompts|between:3,100',
+ 'prefix' => 'nullable|unique:prompts|between:2,10',
+ 'summary' => 'nullable',
+ 'description' => 'nullable',
+ 'image' => 'mimes:png',
];
/**
@@ -56,11 +53,11 @@ class Prompt extends Model
*/
public static $updateRules = [
'prompt_category_id' => 'nullable',
- 'name' => 'required|between:3,100',
- 'prefix' => 'nullable|between:2,10',
- 'summary' => 'nullable',
- 'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'name' => 'required|between:3,100',
+ 'prefix' => 'nullable|between:2,10',
+ 'summary' => 'nullable',
+ 'description' => 'nullable',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
@@ -72,24 +69,21 @@ class Prompt extends Model
/**
* Get the category the prompt belongs to.
*/
- public function category()
- {
+ public function category() {
return $this->belongsTo('App\Models\Prompt\PromptCategory', 'prompt_category_id');
}
/**
* Get the rewards attached to this prompt.
*/
- public function rewards()
- {
+ public function rewards() {
return $this->hasMany('App\Models\Prompt\PromptReward', 'prompt_id');
}
-
+
/**
* Get the criteria attached to this prompt.
*/
- public function criteria()
- {
+ public function criteria() {
return $this->hasMany('App\Models\Prompt\PromptCriterion', 'prompt_id');
}
@@ -102,91 +96,91 @@ public function criteria()
/**
* Scope a query to only include active prompts.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query->where('is_active', 1)
- ->where(function($query) {
- $query->whereNull('start_at')->orWhere('start_at', '<', Carbon::now())->orWhere(function($query) {
+ ->where(function ($query) {
+ $query->whereNull('start_at')->orWhere('start_at', '<', Carbon::now())->orWhere(function ($query) {
$query->where('start_at', '>=', Carbon::now())->where('hide_before_start', 0);
});
- })->where(function($query) {
- $query->whereNull('end_at')->orWhere('end_at', '>', Carbon::now())->orWhere(function($query) {
+ })->where(function ($query) {
+ $query->whereNull('end_at')->orWhere('end_at', '>', Carbon::now())->orWhere(function ($query) {
$query->where('end_at', '<=', Carbon::now())->where('hide_after_end', 0);
});
- });
-
+ });
}
/**
* Scope a query to sort prompts in alphabetical order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param bool $reverse
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortAlphabetical($query, $reverse = false)
- {
+ public function scopeSortAlphabetical($query, $reverse = false) {
return $query->orderBy('name', $reverse ? 'DESC' : 'ASC');
}
/**
* Scope a query to sort prompts in category order.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortCategory($query)
- {
+ public function scopeSortCategory($query) {
$ids = PromptCategory::orderBy('sort', 'DESC')->pluck('id')->toArray();
+
return count($ids) ? $query->orderByRaw(DB::raw('FIELD(prompt_category_id, '.implode(',', $ids).')')) : $query;
}
/**
* Scope a query to sort features by newest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortNewest($query)
- {
+ public function scopeSortNewest($query) {
return $query->orderBy('id', 'DESC');
}
/**
* Scope a query to sort features oldest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortOldest($query)
- {
+ public function scopeSortOldest($query) {
return $query->orderBy('id');
}
/**
* Scope a query to sort prompts by start date.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param bool $reverse
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortStart($query, $reverse = false)
- {
+ public function scopeSortStart($query, $reverse = false) {
return $query->orderBy('start_at', $reverse ? 'DESC' : 'ASC');
}
/**
* Scope a query to sort prompts by end date.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
- * @param bool $reverse
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param bool $reverse
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortEnd($query, $reverse = false)
- {
+ public function scopeSortEnd($query, $reverse = false) {
return $query->orderBy('end_at', $reverse ? 'DESC' : 'ASC');
}
@@ -201,8 +195,7 @@ public function scopeSortEnd($query, $reverse = false)
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -211,8 +204,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/prompts';
}
@@ -221,9 +213,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -231,8 +222,7 @@ public function getImageFileNameAttribute()
*
* @return string
*/
- public function getImagePathAttribute()
- {
+ public function getImagePathAttribute() {
return public_path($this->imageDirectory);
}
@@ -241,10 +231,12 @@ public function getImagePathAttribute()
*
* @return string
*/
- public function getImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->imageFileName);
+ public function getImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->imageFileName);
}
/**
@@ -252,8 +244,7 @@ public function getImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('prompts/prompts?name='.$this->name);
}
@@ -262,8 +253,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'prompts';
}
}
diff --git a/app/Models/Prompt/PromptCategory.php b/app/Models/Prompt/PromptCategory.php
index d189dde110..c42690f8f6 100644
--- a/app/Models/Prompt/PromptCategory.php
+++ b/app/Models/Prompt/PromptCategory.php
@@ -2,18 +2,16 @@
namespace App\Models\Prompt;
-use Config;
use App\Models\Model;
-class PromptCategory extends Model
-{
+class PromptCategory extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'sort', 'has_image', 'description', 'parsed_description'
+ 'name', 'sort', 'has_image', 'description', 'parsed_description',
];
/**
@@ -22,42 +20,41 @@ class PromptCategory extends Model
* @var string
*/
protected $table = 'prompt_categories';
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:prompt_categories|between:3,100',
+ 'name' => 'required|unique:prompt_categories|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
+ 'name' => 'required|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Displays the model's name, linked to its encyclopedia page.
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -66,8 +63,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/prompt-categories';
}
@@ -76,9 +72,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getCategoryImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getCategoryImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -86,20 +81,21 @@ public function getCategoryImageFileNameAttribute()
*
* @return string
*/
- public function getCategoryImagePathAttribute()
- {
+ public function getCategoryImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getCategoryImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->categoryImageFileName);
+ public function getCategoryImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->categoryImageFileName);
}
/**
@@ -107,8 +103,7 @@ public function getCategoryImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('prompts/prompt-categories?name='.$this->name);
}
@@ -117,8 +112,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getSearchUrlAttribute()
- {
+ public function getSearchUrlAttribute() {
return url('prompts/prompts?prompt_category_id='.$this->id);
}
}
diff --git a/app/Models/Prompt/PromptCriterion.php b/app/Models/Prompt/PromptCriterion.php
index 066d4da98c..1a9a118e58 100644
--- a/app/Models/Prompt/PromptCriterion.php
+++ b/app/Models/Prompt/PromptCriterion.php
@@ -2,18 +2,16 @@
namespace App\Models\Prompt;
-use Config;
use App\Models\Model;
-class PromptCriterion extends Model
-{
+class PromptCriterion extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'prompt_id', 'criterion_id', 'min_requirements'
+ 'prompt_id', 'criterion_id', 'min_requirements',
];
/**
@@ -22,7 +20,7 @@ class PromptCriterion extends Model
* @var string
*/
protected $table = 'prompt_criteria';
-
+
/**
* Validation rules for creation.
*
@@ -31,7 +29,7 @@ class PromptCriterion extends Model
public static $createRules = [
'criterion_id' => 'required',
];
-
+
/**
* Validation rules for updating.
*
@@ -40,43 +38,39 @@ class PromptCriterion extends Model
public static $updateRules = [
'criterion_id' => 'required',
];
-
-
- /**********************************************************************************************
-
- ACCESSORS
- **********************************************************************************************/
+ /**********************************************************************************************
+
+ ACCESSORS
+
+ **********************************************************************************************/
/**
* Get the data attribute as an associative array.
*
* @return array
*/
- public function getMinRequirementsAttribute()
- {
+ public function getMinRequirementsAttribute() {
return json_decode($this->attributes['min_requirements'], true);
}
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
- * Get the prompt attached to this criterion
+ * Get the prompt attached to this criterion.
*/
- public function prompt()
- {
- return $this->belongsTo('App\Models\Prompt\Prompt', 'prompt_id');
+ public function prompt() {
+ return $this->belongsTo('App\Models\Prompt\Prompt', 'prompt_id');
}
-
+
/**
- * Get the criterion attached to this prompt
+ * Get the criterion attached to this prompt.
*/
- public function criterion()
- {
- return $this->belongsTo('App\Models\Criteria\Criterion', 'criterion_id');
+ public function criterion() {
+ return $this->belongsTo('App\Models\Criteria\Criterion', 'criterion_id');
}
}
diff --git a/app/Models/Prompt/PromptReward.php b/app/Models/Prompt/PromptReward.php
index bfec899b20..9e94cac341 100644
--- a/app/Models/Prompt/PromptReward.php
+++ b/app/Models/Prompt/PromptReward.php
@@ -2,18 +2,16 @@
namespace App\Models\Prompt;
-use Config;
use App\Models\Model;
-class PromptReward extends Model
-{
+class PromptReward extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'prompt_id', 'rewardable_type', 'rewardable_id', 'quantity'
+ 'prompt_id', 'rewardable_type', 'rewardable_id', 'quantity',
];
/**
@@ -22,7 +20,7 @@ class PromptReward extends Model
* @var string
*/
protected $table = 'prompt_rewards';
-
+
/**
* Validation rules for creation.
*
@@ -30,10 +28,10 @@ class PromptReward extends Model
*/
public static $createRules = [
'rewardable_type' => 'required',
- 'rewardable_id' => 'required',
- 'quantity' => 'required|integer|min:1',
+ 'rewardable_id' => 'required',
+ 'quantity' => 'required|integer|min:1',
];
-
+
/**
* Validation rules for updating.
*
@@ -41,23 +39,21 @@ class PromptReward extends Model
*/
public static $updateRules = [
'rewardable_type' => 'required',
- 'rewardable_id' => 'required',
- 'quantity' => 'required|integer|min:1',
+ 'rewardable_id' => 'required',
+ 'quantity' => 'required|integer|min:1',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the reward attached to the prompt reward.
*/
- public function reward()
- {
- switch ($this->rewardable_type)
- {
+ public function reward() {
+ switch ($this->rewardable_type) {
case 'Item':
return $this->belongsTo('App\Models\Item\Item', 'rewardable_id');
break;
@@ -71,6 +67,7 @@ public function reward()
return $this->belongsTo('App\Models\Raffle\Raffle', 'rewardable_id');
break;
}
+
return null;
}
}
diff --git a/app/Models/Raffle/Raffle.php b/app/Models/Raffle/Raffle.php
index 5760da68e2..1b23c4e901 100644
--- a/app/Models/Raffle/Raffle.php
+++ b/app/Models/Raffle/Raffle.php
@@ -1,17 +1,17 @@
-hasMany('App\Models\Raffle\RaffleTicket');
}
-
+
/**
* Get the group that this raffle belongs to.
*/
- public function group()
- {
+ public function group() {
return $this->belongsTo('App\Models\Raffle\RaffleGroup', 'group_id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -75,8 +73,7 @@ public function group()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return $this->displayName();
}
@@ -85,33 +82,30 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getNameWithGroupAttribute()
- {
- return ($this->group_id ? '[' . $this->group->name . '] ' : '') . $this->name;
+ public function getNameWithGroupAttribute() {
+ return ($this->group_id ? '['.$this->group->name.'] ' : '').$this->name;
}
/**
- * Gets the raffle's asset type for asset management.
+ * Gets the raffle's asset type for asset management.
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'raffle_tickets';
}
/**
- * Gets the raffle's url.
+ * Gets the raffle's url.
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('raffles/view/'.$this->id);
}
/**********************************************************************************************
-
+
OTHER FUNCTIONS
**********************************************************************************************/
@@ -119,10 +113,11 @@ public function getUrlAttribute()
/**
* Displays the raffle's name, linked to the raffle page.
*
+ * @param mixed $asReward
+ *
* @return string
*/
- public function displayName($asReward = true)
- {
+ public function displayName($asReward = true) {
return ''.$this->name.($asReward ? ' (Raffle Ticket)' : '').' ';
}
}
diff --git a/app/Models/Raffle/RaffleGroup.php b/app/Models/Raffle/RaffleGroup.php
index 7df75a4252..a70b0045fb 100644
--- a/app/Models/Raffle/RaffleGroup.php
+++ b/app/Models/Raffle/RaffleGroup.php
@@ -1,17 +1,17 @@
-hasMany('App\Models\Raffle\Raffle', 'group_id')->orderBy('order');
}
}
diff --git a/app/Models/Raffle/RaffleTicket.php b/app/Models/Raffle/RaffleTicket.php
index 5d4f71e837..c616e71b7d 100644
--- a/app/Models/Raffle/RaffleTicket.php
+++ b/app/Models/Raffle/RaffleTicket.php
@@ -1,17 +1,17 @@
-belongsTo('App\Models\Raffle\Raffle');
}
/**
* Get the user who owns the raffle ticket.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
/**********************************************************************************************
-
+
SCOPES
**********************************************************************************************/
-
+
/**
* Scope a query to only include the winning tickets in order of drawing.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeWinners($query)
- {
+ public function scopeWinners($query) {
$query->whereNotNull('position')->orderBy('position');
}
/**********************************************************************************************
-
+
OTHER FUNCTIONS
**********************************************************************************************/
-
+
/**
- * Display the ticket holder's name.
+ * Display the ticket holder's name.
* If the owner is not a registered user on the site, this displays the ticket holder's dA name.
*
* @return string
*/
- public function getDisplayHolderNameAttribute()
- {
- if ($this->user_id) return $this->user->displayName;
+ public function getDisplayHolderNameAttribute() {
+ if ($this->user_id) {
+ return $this->user->displayName;
+ }
+
return ''.$this->alias.'@dA ';
}
}
diff --git a/app/Models/Rank/Rank.php b/app/Models/Rank/Rank.php
index 6a3b5da895..8dc44154b1 100644
--- a/app/Models/Rank/Rank.php
+++ b/app/Models/Rank/Rank.php
@@ -2,20 +2,18 @@
namespace App\Models\Rank;
-use Config;
use App\Models\Model;
+use Config;
use Illuminate\Support\Arr;
-class Rank extends Model
-{
-
+class Rank extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'description', 'parsed_description', 'sort', 'color', 'icon'
+ 'name', 'description', 'parsed_description', 'sort', 'color', 'icon',
];
/**
@@ -24,21 +22,21 @@ class Rank extends Model
* @var string
*/
protected $table = 'ranks';
-
+
/**
* Validation rules for ranks.
*
* @var array
*/
public static $rules = [
- 'name' => 'required|between:3,100',
+ 'name' => 'required|between:3,100',
'description' => 'nullable',
- 'color' => 'nullable|regex:/^#?[0-9a-fA-F]{6}$/i',
- 'icon' => 'nullable'
+ 'color' => 'nullable|regex:/^#?[0-9a-fA-F]{6}$/i',
+ 'icon' => 'nullable',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -46,13 +44,12 @@ class Rank extends Model
/**
* Get the powers attached to this rank.
*/
- public function powers()
- {
+ public function powers() {
return $this->hasMany('App\Models\Rank\RankPower');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -62,9 +59,11 @@ public function powers()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
- if($this->color) return ''.$this->name.' ';
+ public function getDisplayNameAttribute() {
+ if ($this->color) {
+ return ''.$this->name.' ';
+ }
+
return $this->name;
}
@@ -73,14 +72,16 @@ public function getDisplayNameAttribute()
*
* @return bool
*/
- public function getIsAdminAttribute()
- {
- if($this->id == Rank::orderBy('sort', 'DESC')->first()->id) return true;
+ public function getIsAdminAttribute() {
+ if ($this->id == self::orderBy('sort', 'DESC')->first()->id) {
+ return true;
+ }
+
return false;
}
/**********************************************************************************************
-
+
OTHER FUNCTIONS
**********************************************************************************************/
@@ -88,32 +89,43 @@ public function getIsAdminAttribute()
/**
* Checks if the current rank is high enough to edit a given rank.
*
- * @param \App\Models\Rank\Rank $rank
+ * @param \App\Models\Rank\Rank $rank
+ *
* @return int
*/
- public function canEditRank($rank)
- {
- if(is_numeric($rank)) $rank = Rank::find($rank);
- if($this->hasPower('edit_ranks')) {
- if($this->isAdmin) {
- if($rank->id != $this->id) return 1; // can edit everything
- else return 2; // limited edit: cannot edit sort order/powers
+ public function canEditRank($rank) {
+ if (is_numeric($rank)) {
+ $rank = self::find($rank);
+ }
+ if ($this->hasPower('edit_ranks')) {
+ if ($this->isAdmin) {
+ if ($rank->id != $this->id) {
+ return 1;
+ } // can edit everything
+ else {
+ return 2;
+ } // limited edit: cannot edit sort order/powers
+ } elseif ($this->sort > $rank->sort) {
+ return 1;
}
- else if ($this->sort > $rank->sort) return 1;
}
+
return 0;
}
/**
* Checks if the rank has a given power.
*
- * @param \App\Models\Rank\RankPower $power
+ * @param \App\Models\Rank\RankPower $power
+ *
* @return bool
*/
- public function hasPower($power)
- {
- if($this->isAdmin) return true;
- return $this->powers()->where('power', $power)->exists();
+ public function hasPower($power) {
+ if ($this->isAdmin) {
+ return true;
+ }
+
+ return $this->powers()->where('power', $power)->exists();
}
/**
@@ -121,10 +133,12 @@ public function hasPower($power)
*
* @return array
*/
- public function getPowers()
- {
- if($this->isAdmin) return Config::get('lorekeeper.powers');
+ public function getPowers() {
+ if ($this->isAdmin) {
+ return Config::get('lorekeeper.powers');
+ }
$powers = $this->powers->pluck('power')->toArray();
+
return Arr::only(Config::get('lorekeeper.powers'), $powers);
}
}
diff --git a/app/Models/Rank/RankPower.php b/app/Models/Rank/RankPower.php
index b0f8ac6b9c..429ce7cea4 100644
--- a/app/Models/Rank/RankPower.php
+++ b/app/Models/Rank/RankPower.php
@@ -4,16 +4,14 @@
use App\Models\Model;
-class RankPower extends Model
-{
-
+class RankPower extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'rank_id', 'power'
+ 'rank_id', 'power',
];
/**
diff --git a/app/Models/Rarity.php b/app/Models/Rarity.php
index 8e35f7da09..09d783e46f 100644
--- a/app/Models/Rarity.php
+++ b/app/Models/Rarity.php
@@ -2,18 +2,14 @@
namespace App\Models;
-use Config;
-use App\Models\Model;
-
-class Rarity extends Model
-{
+class Rarity extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'sort', 'color', 'has_image', 'description', 'parsed_description'
+ 'name', 'sort', 'color', 'has_image', 'description', 'parsed_description',
];
/**
@@ -22,44 +18,43 @@ class Rarity extends Model
* @var string
*/
protected $table = 'rarities';
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:rarities|between:3,100',
- 'color' => 'nullable|regex:/^#?[0-9a-fA-F]{6}$/i',
+ 'name' => 'required|unique:rarities|between:3,100',
+ 'color' => 'nullable|regex:/^#?[0-9a-fA-F]{6}$/i',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
- 'color' => 'nullable|regex:/^#?[0-9a-fA-F]{6}$/i',
+ 'name' => 'required|between:3,100',
+ 'color' => 'nullable|regex:/^#?[0-9a-fA-F]{6}$/i',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Displays the model's name, linked to its encyclopedia page.
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return 'color ? 'style="color: #'.$this->color.';"' : '').'>'.$this->name.' ';
}
@@ -68,8 +63,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/rarities';
}
@@ -78,9 +72,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getRarityImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getRarityImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -88,20 +81,21 @@ public function getRarityImageFileNameAttribute()
*
* @return string
*/
- public function getRarityImagePathAttribute()
- {
+ public function getRarityImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getRarityImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->rarityImageFileName);
+ public function getRarityImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->rarityImageFileName);
}
/**
@@ -109,28 +103,25 @@ public function getRarityImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/rarities?name='.$this->name);
}
-
+
/**
* Gets the URL for an encyclopedia search of features (character traits) in this category.
*
* @return string
*/
- public function getSearchFeaturesUrlAttribute()
- {
+ public function getSearchFeaturesUrlAttribute() {
return url('world/traits?rarity_id='.$this->id);
}
-
+
/**
* Gets the URL for a masterlist search of characters of this rarity.
*
* @return string
*/
- public function getSearchCharactersUrlAttribute()
- {
+ public function getSearchCharactersUrlAttribute() {
return url('masterlist?rarity_id='.$this->id);
}
}
diff --git a/app/Models/Report/Report.php b/app/Models/Report/Report.php
index b711c05bd1..9dc07cb7e7 100644
--- a/app/Models/Report/Report.php
+++ b/app/Models/Report/Report.php
@@ -2,14 +2,10 @@
namespace App\Models\Report;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Model;
use App\Traits\Commentable;
-class Report extends Model
-{
+class Report extends Model {
use Commentable;
/**
@@ -20,7 +16,7 @@ class Report extends Model
protected $fillable = [
'user_id', 'staff_id', 'url',
'comments', 'staff_comments', 'parsed_staff_comments',
- 'status', 'data', 'error_type', 'is_br'
+ 'status', 'data', 'error_type', 'is_br',
];
/**
@@ -36,7 +32,7 @@ class Report extends Model
* @var string
*/
public $timestamps = true;
-
+
/**
* Validation rules for report creation.
*
@@ -45,7 +41,7 @@ class Report extends Model
public static $createRules = [
'url' => 'required',
];
-
+
/**
* Validation rules for report updating.
*
@@ -56,28 +52,26 @@ class Report extends Model
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
/**
* Get the user who made the report.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
-
+
/**
* Get the staff who processed the report.
*/
- public function staff()
- {
+ public function staff() {
return $this->belongsTo('App\Models\User\User', 'staff_id');
}
/**********************************************************************************************
-
+
SCOPES
**********************************************************************************************/
@@ -85,53 +79,61 @@ public function staff()
/**
* Scope a query to only include pending reports.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query->where('status', 'Pending');
}
/**
* Scope a query to only include reports assigned to a given user.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param mixed $user
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeAssignedToMe($query, $user)
- {
+ public function scopeAssignedToMe($query, $user) {
return $query->where('status', 'Assigned')->where('staff_id', $user->id);
}
/**
* Scope a query to only include viewable reports.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param mixed $user
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeViewable($query, $user)
- {
- if($user && $user->hasPower('manage_reports')) return $query;
- return $query->where(function($query) use ($user) {
- if($user) $query->where('user_id', $user->id)->orWhere('error_type', '!=', 'exploit');
- else $query->where('error_type', '!=', 'exploit');
+ public function scopeViewable($query, $user) {
+ if ($user && $user->hasPower('manage_reports')) {
+ return $query;
+ }
+
+ return $query->where(function ($query) use ($user) {
+ if ($user) {
+ $query->where('user_id', $user->id)->orWhere('error_type', '!=', 'exploit');
+ } else {
+ $query->where('error_type', '!=', 'exploit');
+ }
});
}
/**
* Scope a query to sort reports oldest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortOldest($query)
- {
+ public function scopeSortOldest($query) {
return $query->orderBy('id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -141,8 +143,7 @@ public function scopeSortOldest($query)
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -151,8 +152,7 @@ public function getDataAttribute()
*
* @return string
*/
- public function getViewUrlAttribute()
- {
+ public function getViewUrlAttribute() {
return url('reports/view/'.$this->id);
}
@@ -161,8 +161,7 @@ public function getViewUrlAttribute()
*
* @return string
*/
- public function getAdminUrlAttribute()
- {
+ public function getAdminUrlAttribute() {
return url('admin/reports/edit/'.$this->id);
}
@@ -171,9 +170,7 @@ public function getAdminUrlAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
- return ''.'Report #-' . $this->id.' ';
+ public function getDisplayNameAttribute() {
+ return ''.'Report #-'.$this->id.' ';
}
-
}
diff --git a/app/Models/Sales/Sales.php b/app/Models/Sales/Sales.php
index 4744b8af76..fe004c4065 100644
--- a/app/Models/Sales/Sales.php
+++ b/app/Models/Sales/Sales.php
@@ -2,14 +2,12 @@
namespace App\Models\Sales;
-use Carbon\Carbon;
-use Config;
use App\Models\Model;
use App\Traits\Commentable;
+use Carbon\Carbon;
use Illuminate\Support\Str;
-class Sales extends Model
-{
+class Sales extends Model {
use Commentable;
/**
* The attributes that are mass assignable.
@@ -18,7 +16,7 @@ class Sales extends Model
*/
protected $fillable = [
'user_id', 'text', 'parsed_text', 'title', 'is_visible', 'post_at',
- 'is_open', 'comments_open_at'
+ 'is_open', 'comments_open_at',
];
/**
@@ -49,7 +47,7 @@ class Sales extends Model
*/
public static $createRules = [
'title' => 'required|between:3,100',
- 'text' => 'required',
+ 'text' => 'required',
];
/**
@@ -59,7 +57,7 @@ class Sales extends Model
*/
public static $updateRules = [
'title' => 'required|between:3,100',
- 'text' => 'required',
+ 'text' => 'required',
];
/**********************************************************************************************
@@ -71,16 +69,14 @@ class Sales extends Model
/**
* Get the user who created the Sales post.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
/**
* Get the characters associated with the sales post.
*/
- public function characters()
- {
+ public function characters() {
return $this->hasMany('App\Models\Sales\SalesCharacter', 'sales_id');
}
@@ -93,22 +89,22 @@ public function characters()
/**
* Scope a query to only include visible posts.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query)
- {
+ public function scopeVisible($query) {
return $query->orderBy('updated_at', 'DESC')->where('is_visible', 1);
}
/**
* Scope a query to only include posts that are scheduled to be posted and are ready to post.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeShouldBeVisible($query)
- {
+ public function scopeShouldBeVisible($query) {
return $query->whereNotNull('post_at')->where('post_at', '<', Carbon::now())->where('is_visible', 0);
}
@@ -123,9 +119,8 @@ public function scopeShouldBeVisible($query)
*
* @return bool
*/
- public function getSlugAttribute()
- {
- return $this->id . '.' . Str::slug($this->title);
+ public function getSlugAttribute() {
+ return $this->id.'.'.Str::slug($this->title);
}
/**
@@ -133,8 +128,7 @@ public function getSlugAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ' ['.($this->is_open ? (isset($this->comments_open_at) && $this->comments_open_at > Carbon::now() ? 'Preview' : 'Open') : 'Closed').'] '.$this->title.' ';
}
@@ -143,8 +137,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('sales/'.$this->slug);
}
}
diff --git a/app/Models/Sales/SalesCharacter.php b/app/Models/Sales/SalesCharacter.php
index 94b3f6bd15..521d9427b7 100644
--- a/app/Models/Sales/SalesCharacter.php
+++ b/app/Models/Sales/SalesCharacter.php
@@ -2,22 +2,18 @@
namespace App\Models\Sales;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Character\CharacterImage;
-
use App\Models\Model;
+use Config;
-class SalesCharacter extends Model
-{
+class SalesCharacter extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'sales_id', 'character_id', 'description', 'type', 'data', 'link', 'is_open'
+ 'sales_id', 'character_id', 'description', 'type', 'data', 'link', 'is_open',
];
/**
@@ -40,9 +36,9 @@ class SalesCharacter extends Model
'price' => 'required_if:sale_type,flat',
// Auction/XTA
- 'starting_bid' => 'required_if:type,auction',
+ 'starting_bid' => 'required_if:type,auction',
'min_increment' => 'required_if:type,auction',
- 'end_point' => 'exclude_unless:type,auction,xta,ota|max:255'
+ 'end_point' => 'exclude_unless:type,auction,xta,ota|max:255',
];
/**********************************************************************************************
@@ -54,16 +50,14 @@ class SalesCharacter extends Model
/**
* Get the sale this is attached to.
*/
- public function sales()
- {
+ public function sales() {
return $this->belongsTo('App\Models\Sales\Sales', 'sales_id');
}
/**
* Get the character being attached to the sale.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character', 'character_id');
}
@@ -78,8 +72,7 @@ public function character()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -88,9 +81,8 @@ public function getDataAttribute()
*
* @return string
*/
- public function getDisplayTypeAttribute()
- {
- switch($this->attributes['type']) {
+ public function getDisplayTypeAttribute() {
+ switch ($this->attributes['type']) {
case 'flatsale':
return 'Flatsale';
break;
@@ -120,9 +112,8 @@ public function getDisplayTypeAttribute()
*
* @return string
*/
- public function getTypeLinkAttribute()
- {
- switch($this->attributes['type']) {
+ public function getTypeLinkAttribute() {
+ switch ($this->attributes['type']) {
case 'flatsale':
return 'Claim Here';
break;
@@ -152,26 +143,26 @@ public function getTypeLinkAttribute()
*
* @return string
*/
- public function getPriceAttribute()
- {
- if($this->type == 'raffle') return null;
+ public function getPriceAttribute() {
+ if ($this->type == 'raffle') {
+ return null;
+ }
$symbol = Config::get('lorekeeper.settings.currency_symbol');
- switch($this->type) {
+ switch ($this->type) {
case 'flatsale':
return 'Price: '.$symbol.$this->data['price'];
break;
case 'auction':
return 'Starting Bid: '.$symbol.$this->data['starting_bid'].' '.
'Minimum Increment: '.$symbol.$this->data['min_increment'].
- (isset($this->data['autobuy']) ? ' Autobuy: '.$symbol.$this->data['autobuy'] : '')
- ;
+ (isset($this->data['autobuy']) ? ' Autobuy: '.$symbol.$this->data['autobuy'] : '');
break;
case 'ota':
- return (isset($this->data['autobuy']) ? ' Autobuy: '.$symbol.$this->data['autobuy'] : '');
+ return isset($this->data['autobuy']) ? ' Autobuy: '.$symbol.$this->data['autobuy'] : '';
break;
case 'xta':
- return (isset($this->data['autobuy']) ? ' Autobuy: '.$symbol.$this->data['autobuy'] : '');
+ return isset($this->data['autobuy']) ? ' Autobuy: '.$symbol.$this->data['autobuy'] : '';
break;
case 'flaffle':
return 'Price: '.$symbol.$this->data['price'];
@@ -187,9 +178,7 @@ public function getPriceAttribute()
*
* @return App\Models\Character\CharacterImage
*/
- public function getImageAttribute()
- {
+ public function getImageAttribute() {
return CharacterImage::where('is_visible', 1)->where('character_id', $this->character_id)->orderBy('created_at')->first();
}
-
}
diff --git a/app/Models/Shop/Shop.php b/app/Models/Shop/Shop.php
index 35bf7ef0ab..6f6b6efa01 100644
--- a/app/Models/Shop/Shop.php
+++ b/app/Models/Shop/Shop.php
@@ -2,18 +2,16 @@
namespace App\Models\Shop;
-use Config;
use App\Models\Model;
-class Shop extends Model
-{
+class Shop extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'sort', 'has_image', 'description', 'parsed_description', 'is_active'
+ 'name', 'sort', 'has_image', 'description', 'parsed_description', 'is_active',
];
/**
@@ -22,31 +20,31 @@ class Shop extends Model
* @var string
*/
protected $table = 'shops';
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:item_categories|between:3,100',
+ 'name' => 'required|unique:item_categories|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
+ 'name' => 'required|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -54,32 +52,29 @@ class Shop extends Model
/**
* Get the shop stock.
*/
- public function stock()
- {
+ public function stock() {
return $this->hasMany('App\Models\Shop\ShopStock');
}
-
+
/**
* Get the shop stock as items for display purposes.
*/
- public function displayStock()
- {
+ public function displayStock() {
return $this->belongsToMany('App\Models\Item\Item', 'shop_stock')->withPivot('item_id', 'currency_id', 'cost', 'use_user_bank', 'use_character_bank', 'is_limited_stock', 'quantity', 'purchase_limit', 'id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Displays the shop's name, linked to its purchase page.
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -88,8 +83,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/shops';
}
@@ -98,9 +92,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getShopImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getShopImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -108,20 +101,21 @@ public function getShopImageFileNameAttribute()
*
* @return string
*/
- public function getShopImagePathAttribute()
- {
+ public function getShopImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getShopImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->shopImageFileName);
+ public function getShopImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->shopImageFileName);
}
/**
@@ -129,8 +123,7 @@ public function getShopImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('shops/'.$this->id);
}
}
diff --git a/app/Models/Shop/ShopLog.php b/app/Models/Shop/ShopLog.php
index ae37e6fd91..22476afac6 100644
--- a/app/Models/Shop/ShopLog.php
+++ b/app/Models/Shop/ShopLog.php
@@ -4,16 +4,14 @@
use App\Models\Model;
-class ShopLog extends Model
-{
-
+class ShopLog extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'shop_id', 'character_id', 'user_id', 'currency_id', 'cost', 'item_id', 'quantity'
+ 'shop_id', 'character_id', 'user_id', 'currency_id', 'cost', 'item_id', 'quantity',
];
/**
@@ -29,7 +27,7 @@ class ShopLog extends Model
* @var string
*/
public $timestamps = true;
-
+
/**
* Validation rules for creation.
*
@@ -37,57 +35,53 @@ class ShopLog extends Model
*/
public static $createRules = [
'stock_id' => 'required',
- 'shop_id' => 'required',
- 'bank' => 'required|in:user,character'
+ 'shop_id' => 'required',
+ 'bank' => 'required|in:user,character',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the user who purchased the item.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
-
+
/**
* Get the character who purchased the item.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character');
}
+
/**
* Get the purchased item.
*/
- public function item()
- {
+ public function item() {
return $this->belongsTo('App\Models\Item\Item');
}
/**
* Get the shop the item was purchased from.
*/
- public function shop()
- {
+ public function shop() {
return $this->belongsTo('App\Models\Shop\Shop');
}
/**
* Get the currency used to purchase the item.
*/
- public function currency()
- {
+ public function currency() {
return $this->belongsTo('App\Models\Currency\Currency');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -97,8 +91,7 @@ public function currency()
*
* @return string
*/
- public function getItemDataAttribute()
- {
- return 'Purchased from '.$this->shop->name.' by '.($this->character_id ? $this->character->slug . ' (owned by ' . $this->user->name . ')' : $this->user->displayName) . ' for ' . $this->cost . ' ' . $this->currency->name . '.';
+ public function getItemDataAttribute() {
+ return 'Purchased from '.$this->shop->name.' by '.($this->character_id ? $this->character->slug.' (owned by '.$this->user->name.')' : $this->user->displayName).' for '.$this->cost.' '.$this->currency->name.'.';
}
}
diff --git a/app/Models/Shop/ShopStock.php b/app/Models/Shop/ShopStock.php
index e2009d745d..c5b6d391dd 100644
--- a/app/Models/Shop/ShopStock.php
+++ b/app/Models/Shop/ShopStock.php
@@ -4,16 +4,14 @@
use App\Models\Model;
-class ShopStock extends Model
-{
-
+class ShopStock extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'shop_id', 'item_id', 'currency_id', 'cost', 'use_user_bank', 'use_character_bank', 'is_limited_stock', 'quantity', 'sort', 'purchase_limit'
+ 'shop_id', 'item_id', 'currency_id', 'cost', 'use_user_bank', 'use_character_bank', 'is_limited_stock', 'quantity', 'sort', 'purchase_limit',
];
/**
@@ -24,32 +22,29 @@ class ShopStock extends Model
protected $table = 'shop_stock';
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the item being stocked.
*/
- public function item()
- {
+ public function item() {
return $this->belongsTo('App\Models\Item\Item');
}
-
+
/**
* Get the shop that holds this item.
*/
- public function shop()
- {
+ public function shop() {
return $this->belongsTo('App\Models\Shop\Shop');
}
-
+
/**
* Get the currency the item must be purchased with.
*/
- public function currency()
- {
+ public function currency() {
return $this->belongsTo('App\Models\Currency\Currency');
}
}
diff --git a/app/Models/SitePage.php b/app/Models/SitePage.php
index a17b7090dd..22eac04760 100644
--- a/app/Models/SitePage.php
+++ b/app/Models/SitePage.php
@@ -2,13 +2,9 @@
namespace App\Models;
-use Config;
-use App\Models\Model;
-
use App\Traits\Commentable;
-class SitePage extends Model
-{
+class SitePage extends Model {
use Commentable;
/**
@@ -17,7 +13,7 @@ class SitePage extends Model
* @var array
*/
protected $fillable = [
- 'key', 'title', 'text', 'parsed_text', 'is_visible', 'can_comment'
+ 'key', 'title', 'text', 'parsed_text', 'is_visible', 'can_comment',
];
/**
@@ -33,27 +29,27 @@ class SitePage extends Model
* @var string
*/
public $timestamps = true;
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'key' => 'required|unique:site_pages|between:3,25|alpha_dash',
+ 'key' => 'required|unique:site_pages|between:3,25|alpha_dash',
'title' => 'required|between:3,100',
- 'text' => 'nullable',
+ 'text' => 'nullable',
];
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'key' => 'required|between:3,25|alpha_dash',
+ 'key' => 'required|between:3,25|alpha_dash',
'title' => 'required|between:3,100',
- 'text' => 'nullable',
+ 'text' => 'nullable',
];
/**
@@ -61,8 +57,7 @@ class SitePage extends Model
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('info/'.$this->key);
}
@@ -71,8 +66,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->title.' ';
}
}
diff --git a/app/Models/Species/Species.php b/app/Models/Species/Species.php
index 8e11082c8b..bbbb002c66 100644
--- a/app/Models/Species/Species.php
+++ b/app/Models/Species/Species.php
@@ -2,18 +2,16 @@
namespace App\Models\Species;
-use Config;
use App\Models\Model;
-class Species extends Model
-{
+class Species extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'name', 'sort', 'has_image', 'description', 'parsed_description', 'masterlist_sub_id'
+ 'name', 'sort', 'has_image', 'description', 'parsed_description', 'masterlist_sub_id',
];
/**
@@ -22,33 +20,31 @@ class Species extends Model
* @var string
*/
protected $table = 'specieses';
-
-
+
/**
* Validation rules for creation.
*
* @var array
*/
public static $createRules = [
- 'name' => 'required|unique:specieses|between:3,100',
+ 'name' => 'required|unique:specieses|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
-
+
/**
* Validation rules for updating.
*
* @var array
*/
public static $updateRules = [
- 'name' => 'required|between:3,100',
+ 'name' => 'required|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -56,40 +52,36 @@ class Species extends Model
/**
* Get the subtypes for this species.
*/
- public function subtypes()
- {
+ public function subtypes() {
return $this->hasMany('App\Models\Species\Subtype');
}
/**
* Get the sub masterlist for this species.
*/
- public function sublist()
- {
+ public function sublist() {
return $this->belongsTo('App\Models\Character\Sublist', 'masterlist_sub_id');
}
-
+
/**
* Get the features associated with this species.
*/
- public function features()
- {
+ public function features() {
return $this->hasMany('App\Models\Feature\Feature');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
-
+
/**
* Displays the model's name, linked to its encyclopedia page.
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -98,8 +90,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/species';
}
@@ -108,9 +99,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getSpeciesImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getSpeciesImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -118,20 +108,21 @@ public function getSpeciesImageFileNameAttribute()
*
* @return string
*/
- public function getSpeciesImagePathAttribute()
- {
+ public function getSpeciesImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getSpeciesImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->speciesImageFileName);
+ public function getSpeciesImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->speciesImageFileName);
}
/**
@@ -139,8 +130,7 @@ public function getSpeciesImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/species?name='.$this->name);
}
@@ -149,12 +139,12 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getSearchUrlAttribute()
- {
- if($this->masterlist_sub_id != 0 && $this->sublist->show_main == 0)
- return url('sublist/'.$this->sublist->key.'?species_id='.$this->id);
- else
- return url('masterlist?species_id='.$this->id);
+ public function getSearchUrlAttribute() {
+ if ($this->masterlist_sub_id != 0 && $this->sublist->show_main == 0) {
+ return url('sublist/'.$this->sublist->key.'?species_id='.$this->id);
+ } else {
+ return url('masterlist?species_id='.$this->id);
+ }
}
/**
@@ -162,8 +152,7 @@ public function getSearchUrlAttribute()
*
* @return string
*/
- public function getVisualTraitsUrlAttribute()
- {
+ public function getVisualTraitsUrlAttribute() {
return url('/world/species/'.$this->id.'/traits');
}
}
diff --git a/app/Models/Species/Subtype.php b/app/Models/Species/Subtype.php
index 6824c2db75..b446cfe15f 100644
--- a/app/Models/Species/Subtype.php
+++ b/app/Models/Species/Subtype.php
@@ -2,18 +2,16 @@
namespace App\Models\Species;
-use Config;
use App\Models\Model;
-class Subtype extends Model
-{
+class Subtype extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'species_id', 'name', 'sort', 'has_image', 'description', 'parsed_description'
+ 'species_id', 'name', 'sort', 'has_image', 'description', 'parsed_description',
];
/**
@@ -22,58 +20,55 @@ class Subtype extends Model
* @var string
*/
protected $table = 'subtypes';
-
-
+
/**
- * Validation rules for creation.
+ * Accessors to append to the model.
*
* @var array
*/
- public static $createRules = [
- 'species_id' => 'required',
- 'name' => 'required|between:3,100',
- 'description' => 'nullable',
- 'image' => 'mimes:png',
+ protected $appends = [
+ 'name_with_species',
];
-
-
+
/**
- * Validation rules for updating.
+ * Validation rules for creation.
*
* @var array
*/
- public static $updateRules = [
- 'species_id' => 'required',
- 'name' => 'required|between:3,100',
+ public static $createRules = [
+ 'species_id' => 'required',
+ 'name' => 'required|between:3,100',
'description' => 'nullable',
- 'image' => 'mimes:png',
+ 'image' => 'mimes:png',
];
-
+
/**
- * Accessors to append to the model.
+ * Validation rules for updating.
*
* @var array
*/
- protected $appends = [
- 'name_with_species'
+ public static $updateRules = [
+ 'species_id' => 'required',
+ 'name' => 'required|between:3,100',
+ 'description' => 'nullable',
+ 'image' => 'mimes:png',
];
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the species the subtype belongs to.
*/
- public function species()
- {
+ public function species() {
return $this->belongsTo('App\Models\Species\Species', 'species_id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -83,18 +78,16 @@ public function species()
*
* @return string
*/
- public function getNameWithSpeciesAttribute()
- {
- return $this->name . ' [' . $this->species->name . ' Subtype]';
+ public function getNameWithSpeciesAttribute() {
+ return $this->name.' ['.$this->species->name.' Subtype]';
}
-
+
/**
* Displays the model's name, linked to its encyclopedia page.
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
+ public function getDisplayNameAttribute() {
return ''.$this->name.' ';
}
@@ -103,8 +96,7 @@ public function getDisplayNameAttribute()
*
* @return string
*/
- public function getImageDirectoryAttribute()
- {
+ public function getImageDirectoryAttribute() {
return 'images/data/subtypes';
}
@@ -113,9 +105,8 @@ public function getImageDirectoryAttribute()
*
* @return string
*/
- public function getSubtypeImageFileNameAttribute()
- {
- return $this->id . '-image.png';
+ public function getSubtypeImageFileNameAttribute() {
+ return $this->id.'-image.png';
}
/**
@@ -123,20 +114,21 @@ public function getSubtypeImageFileNameAttribute()
*
* @return string
*/
- public function getSubtypeImagePathAttribute()
- {
+ public function getSubtypeImagePathAttribute() {
return public_path($this->imageDirectory);
}
-
+
/**
* Gets the URL of the model's image.
*
* @return string
*/
- public function getSubtypeImageUrlAttribute()
- {
- if (!$this->has_image) return null;
- return asset($this->imageDirectory . '/' . $this->subtypeImageFileName);
+ public function getSubtypeImageUrlAttribute() {
+ if (!$this->has_image) {
+ return null;
+ }
+
+ return asset($this->imageDirectory.'/'.$this->subtypeImageFileName);
}
/**
@@ -144,8 +136,7 @@ public function getSubtypeImageUrlAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('world/subtypes?name='.$this->name);
}
@@ -154,8 +145,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getSearchUrlAttribute()
- {
+ public function getSearchUrlAttribute() {
return url('masterlist?subtype_id='.$this->id);
}
}
diff --git a/app/Models/Submission/Submission.php b/app/Models/Submission/Submission.php
index 36ec8bdfa4..e5427a5126 100644
--- a/app/Models/Submission/Submission.php
+++ b/app/Models/Submission/Submission.php
@@ -2,13 +2,10 @@
namespace App\Models\Submission;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Model;
+use Carbon\Carbon;
-class Submission extends Model
-{
+class Submission extends Model {
/**
* The attributes that are mass assignable.
*
@@ -17,7 +14,7 @@ class Submission extends Model
protected $fillable = [
'prompt_id', 'user_id', 'staff_id', 'url',
'comments', 'staff_comments', 'parsed_staff_comments',
- 'status', 'data'
+ 'status', 'data',
];
/**
@@ -61,32 +58,28 @@ class Submission extends Model
/**
* Get the prompt this submission is for.
*/
- public function prompt()
- {
+ public function prompt() {
return $this->belongsTo('App\Models\Prompt\Prompt', 'prompt_id');
}
/**
* Get the user who made the submission.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**
* Get the staff who processed the submission.
*/
- public function staff()
- {
+ public function staff() {
return $this->belongsTo('App\Models\User\User', 'staff_id');
}
/**
* Get the characters attached to the submission.
*/
- public function characters()
- {
+ public function characters() {
return $this->hasMany('App\Models\Submission\SubmissionCharacter', 'submission_id');
}
@@ -99,57 +92,64 @@ public function characters()
/**
* Scope a query to only include pending submissions.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeActive($query)
- {
+ public function scopeActive($query) {
return $query->where('status', 'Pending');
}
/**
* Scope a query to only include viewable submissions.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param mixed|null $user
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeViewable($query, $user = null)
- {
+ public function scopeViewable($query, $user = null) {
$forbiddenSubmissions = $this
- ->whereHas('prompt', function($q) {
- $q->where('hide_submissions', 1)->whereNotNull('end_at')->where('end_at', '>', Carbon::now());
- })
- ->orWhereHas('prompt', function($q) {
- $q->where('hide_submissions', 2);
- })
- ->orWhere('status', '!=', 'Approved')->pluck('id')->toArray();
-
- if($user && $user->hasPower('manage_submissions')) return $query;
- else return $query->where(function($query) use ($user, $forbiddenSubmissions) {
- if($user) $query->whereNotIn('id', $forbiddenSubmissions)->orWhere('user_id', $user->id);
- else $query->whereNotIn('id', $forbiddenSubmissions);
- });
+ ->whereHas('prompt', function ($q) {
+ $q->where('hide_submissions', 1)->whereNotNull('end_at')->where('end_at', '>', Carbon::now());
+ })
+ ->orWhereHas('prompt', function ($q) {
+ $q->where('hide_submissions', 2);
+ })
+ ->orWhere('status', '!=', 'Approved')->pluck('id')->toArray();
+
+ if ($user && $user->hasPower('manage_submissions')) {
+ return $query;
+ } else {
+ return $query->where(function ($query) use ($user, $forbiddenSubmissions) {
+ if ($user) {
+ $query->whereNotIn('id', $forbiddenSubmissions)->orWhere('user_id', $user->id);
+ } else {
+ $query->whereNotIn('id', $forbiddenSubmissions);
+ }
+ });
+ }
}
/**
* Scope a query to sort submissions oldest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortOldest($query)
- {
+ public function scopeSortOldest($query) {
return $query->orderBy('id');
}
/**
* Scope a query to sort submissions by newest first.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeSortNewest($query)
- {
+ public function scopeSortNewest($query) {
return $query->orderBy('id', 'DESC');
}
@@ -164,30 +164,31 @@ public function scopeSortNewest($query)
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
/**
* Gets the inventory of the user for selection.
*
+ * @param mixed $user
+ *
* @return array
*/
- public function getInventory($user)
- {
+ public function getInventory($user) {
return $this->data && isset($this->data['user']['user_items']) ? $this->data['user']['user_items'] : [];
+
return $inventory;
}
/**
* Gets the currencies of the given user for selection.
*
- * @param \App\Models\User\User $user
+ * @param \App\Models\User\User $user
+ *
* @return array
*/
- public function getCurrencies($user)
- {
+ public function getCurrencies($user) {
return $this->data && isset($this->data['user']) && isset($this->data['user']['currencies']) ? $this->data['user']['currencies'] : [];
}
@@ -196,9 +197,8 @@ public function getCurrencies($user)
*
* @return string
*/
- public function getViewUrlAttribute()
- {
- return url(($this->prompt_id ? 'submissions' : 'claims') . '/view/'.$this->id);
+ public function getViewUrlAttribute() {
+ return url(($this->prompt_id ? 'submissions' : 'claims').'/view/'.$this->id);
}
/**
@@ -206,9 +206,8 @@ public function getViewUrlAttribute()
*
* @return string
*/
- public function getAdminUrlAttribute()
- {
- return url('admin/' . ($this->prompt_id ? 'submissions' : 'claims') . '/edit/'.$this->id);
+ public function getAdminUrlAttribute() {
+ return url('admin/'.($this->prompt_id ? 'submissions' : 'claims').'/edit/'.$this->id);
}
/**
@@ -216,25 +215,24 @@ public function getAdminUrlAttribute()
*
* @return array
*/
- public function getRewardsAttribute()
- {
- if(isset($this->data['rewards']))
- $assets = parseAssetData($this->data['rewards']);
- else
- $assets = parseAssetData($this->data);
+ public function getRewardsAttribute() {
+ if (isset($this->data['rewards'])) {
+ $assets = parseAssetData($this->data['rewards']);
+ } else {
+ $assets = parseAssetData($this->data);
+ }
$rewards = [];
- foreach($assets as $type => $a)
- {
+ foreach ($assets as $type => $a) {
$class = getAssetModelString($type, false);
- foreach($a as $id => $asset)
- {
- $rewards[] = (object)[
+ foreach ($a as $id => $asset) {
+ $rewards[] = (object) [
'rewardable_type' => $class,
- 'rewardable_id' => $id,
- 'quantity' => $asset['quantity']
+ 'rewardable_id' => $id,
+ 'quantity' => $asset['quantity'],
];
}
}
+
return $rewards;
}
}
diff --git a/app/Models/Submission/SubmissionCharacter.php b/app/Models/Submission/SubmissionCharacter.php
index 9cb32dc945..350cff7ea3 100644
--- a/app/Models/Submission/SubmissionCharacter.php
+++ b/app/Models/Submission/SubmissionCharacter.php
@@ -2,20 +2,16 @@
namespace App\Models\Submission;
-use Config;
-use DB;
-use Carbon\Carbon;
use App\Models\Model;
-class SubmissionCharacter extends Model
-{
+class SubmissionCharacter extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'submission_id', 'character_id', 'data'
+ 'submission_id', 'character_id', 'data',
];
/**
@@ -34,16 +30,14 @@ class SubmissionCharacter extends Model
/**
* Get the submission this is attached to.
*/
- public function submission()
- {
+ public function submission() {
return $this->belongsTo('App\Models\Submission\Submission', 'submission_id');
}
/**
* Get the character being attached to the submission.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character', 'character_id');
}
@@ -58,8 +52,7 @@ public function character()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -68,22 +61,20 @@ public function getDataAttribute()
*
* @return array
*/
- public function getRewardsAttribute()
- {
+ public function getRewardsAttribute() {
$assets = parseAssetData($this->data);
$rewards = [];
- foreach($assets as $type => $a)
- {
+ foreach ($assets as $type => $a) {
$class = getAssetModelString($type, false);
- foreach($a as $id => $asset)
- {
- $rewards[] = (object)[
+ foreach ($a as $id => $asset) {
+ $rewards[] = (object) [
'rewardable_type' => $class,
- 'rewardable_id' => $id,
- 'quantity' => $asset['quantity']
+ 'rewardable_id' => $id,
+ 'quantity' => $asset['quantity'],
];
}
}
+
return $rewards;
}
}
diff --git a/app/Models/Trade.php b/app/Models/Trade.php
index 2d7f3a9c55..f3f29d1f79 100644
--- a/app/Models/Trade.php
+++ b/app/Models/Trade.php
@@ -2,15 +2,10 @@
namespace App\Models;
-use Config;
-use Settings;
-
use App\Models\Character\Character;
+use Settings;
-use App\Models\Model;
-
-class Trade extends Model
-{
+class Trade extends Model {
/**
* The attributes that are mass assignable.
*
@@ -19,7 +14,7 @@ class Trade extends Model
protected $fillable = [
'sender_id', 'recipient_id', 'comments',
'status', 'is_sender_confirmed', 'is_recipient_confirmed', 'is_sender_trade_confirmed', 'is_recipient_trade_confirmed',
- 'is_approved', 'reason', 'data'
+ 'is_approved', 'reason', 'data',
];
/**
@@ -37,7 +32,7 @@ class Trade extends Model
public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -45,40 +40,36 @@ class Trade extends Model
/**
* Get the user who initiated the trade.
*/
- public function sender()
- {
+ public function sender() {
return $this->belongsTo('App\Models\User\User', 'sender_id');
}
/**
* Get the user who received the trade.
*/
- public function recipient()
- {
+ public function recipient() {
return $this->belongsTo('App\Models\User\User', 'recipient_id');
}
/**
* Get the staff member who approved the character transfer.
*/
- public function staff()
- {
+ public function staff() {
return $this->belongsTo('App\Models\User\User', 'staff_id');
}
/**********************************************************************************************
-
+
SCOPES
**********************************************************************************************/
- public function scopeCompleted($query)
- {
+ public function scopeCompleted($query) {
return $query->where('status', 'Completed')->orWhere('status', 'Rejected');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -88,12 +79,15 @@ public function scopeCompleted($query)
*
* @return bool
*/
- public function getIsActiveAttribute()
- {
- if($this->status == 'Pending') return true;
+ public function getIsActiveAttribute() {
+ if ($this->status == 'Pending') {
+ return true;
+ }
- if(Settings::get('open_transfers_queue')) {
- if($this->status == 'Accepted' && $this->is_approved == 0) return true;
+ if (Settings::get('open_transfers_queue')) {
+ if ($this->status == 'Accepted' && $this->is_approved == 0) {
+ return true;
+ }
}
return false;
@@ -104,9 +98,11 @@ public function getIsActiveAttribute()
*
* @return bool
*/
- public function getIsConfirmableAttribute()
- {
- if($this->is_sender_confirmed && $this->is_recipient_confirmed) return true;
+ public function getIsConfirmableAttribute() {
+ if ($this->is_sender_confirmed && $this->is_recipient_confirmed) {
+ return true;
+ }
+
return false;
}
@@ -115,8 +111,7 @@ public function getIsConfirmableAttribute()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
@@ -125,63 +120,66 @@ public function getDataAttribute()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('trades/'.$this->id);
}
/**********************************************************************************************
-
+
OTHER FUNCTIONS
**********************************************************************************************/
-
+
/**
* Gets all characters involved in the trade.
*
* @return \Illuminate\Support\Collection
*/
- public function getCharacterData()
- {
+ public function getCharacterData() {
return Character::with('user')->whereIn('id', array_merge($this->getCharacters($this->sender), $this->getCharacters($this->recipient)))->get();
}
/**
* Gets the inventory of the given user for selection.
*
- * @param \App\Models\User\User $user
+ * @param \App\Models\User\User $user
+ *
* @return array
*/
- public function getInventory($user)
- {
+ public function getInventory($user) {
$type = $this->sender_id == $user->id ? 'sender' : 'recipient';
$inventory = $this->data && isset($this->data[$type]) && isset($this->data[$type]['user_items']) ? $this->data[$type]['user_items'] : [];
+
return $inventory;
}
/**
* Gets the characters of the given user for selection.
*
- * @param \App\Models\User\User $user
+ * @param \App\Models\User\User $user
+ *
* @return array
*/
- public function getCharacters($user)
- {
+ public function getCharacters($user) {
$type = $this->sender_id == $user->id ? 'sender' : 'recipient';
$characters = $this->data && isset($this->data[$type]) && isset($this->data[$type]['characters']) ? $this->data[$type]['characters'] : [];
- if($characters) $characters = array_keys($characters);
+ if ($characters) {
+ $characters = array_keys($characters);
+ }
+
return $characters;
}
/**
* Gets the currencies of the given user for selection.
*
- * @param \App\Models\User\User $user
+ * @param \App\Models\User\User $user
+ *
* @return array
*/
- public function getCurrencies($user)
- {
+ public function getCurrencies($user) {
$type = $this->sender_id == $user->id ? 'sender' : 'recipient';
+
return $this->data && isset($this->data[$type]) && isset($this->data[$type]['currencies']) ? $this->data[$type]['currencies'] : [];
}
}
diff --git a/app/Models/User/User.php b/app/Models/User/User.php
index 43d7bd63db..efa36b85e6 100644
--- a/app/Models/User/User.php
+++ b/app/Models/User/User.php
@@ -2,32 +2,26 @@
namespace App\Models\User;
-use Illuminate\Notifications\Notifiable;
-use Illuminate\Contracts\Auth\MustVerifyEmail;
-use Illuminate\Foundation\Auth\User as Authenticatable;
-use Auth;
-use Config;
-use Carbon\Carbon;
-
use App\Models\Character\Character;
+use App\Models\Character\CharacterBookmark;
use App\Models\Character\CharacterImageCreator;
-use App\Models\Rank\RankPower;
use App\Models\Currency\Currency;
use App\Models\Currency\CurrencyLog;
+use App\Models\Gallery\GalleryCollaborator;
use App\Models\Item\ItemLog;
+use App\Models\Rank\RankPower;
use App\Models\Shop\ShopLog;
-use App\Models\User\UserCharacterLog;
use App\Models\Submission\Submission;
-use App\Models\Submission\SubmissionCharacter;
-use App\Models\Character\CharacterBookmark;
-use App\Models\Gallery\GallerySubmission;
-use App\Models\Gallery\GalleryCollaborator;
-use App\Models\Gallery\GalleryFavorite;
use App\Traits\Commenter;
+use Auth;
+use Carbon\Carbon;
+use Config;
+use Illuminate\Contracts\Auth\MustVerifyEmail;
+use Illuminate\Foundation\Auth\User as Authenticatable;
+use Illuminate\Notifications\Notifiable;
-class User extends Authenticatable implements MustVerifyEmail
-{
- use Notifiable, Commenter;
+class User extends Authenticatable implements MustVerifyEmail {
+ use Commenter, Notifiable;
/**
* The attributes that are mass assignable.
@@ -35,7 +29,7 @@ class User extends Authenticatable implements MustVerifyEmail
* @var array
*/
protected $fillable = [
- 'name', 'alias', 'rank_id', 'email', 'password', 'is_news_unread', 'is_banned', 'has_alias', 'avatar', 'is_sales_unread', 'birthday'
+ 'name', 'alias', 'rank_id', 'email', 'password', 'is_news_unread', 'is_banned', 'has_alias', 'avatar', 'is_sales_unread', 'birthday',
];
/**
@@ -69,7 +63,7 @@ class User extends Authenticatable implements MustVerifyEmail
* @var array
*/
protected $appends = [
- 'verified_name'
+ 'verified_name',
];
/**
@@ -88,104 +82,91 @@ class User extends Authenticatable implements MustVerifyEmail
/**
* Get user settings.
*/
- public function settings()
- {
+ public function settings() {
return $this->hasOne('App\Models\User\UserSettings');
}
/**
* Get user-editable profile data.
*/
- public function profile()
- {
+ public function profile() {
return $this->hasOne('App\Models\User\UserProfile');
}
/**
* Get the user's aliases.
*/
- public function aliases()
- {
+ public function aliases() {
return $this->hasMany('App\Models\User\UserAlias');
}
/**
* Get the user's primary alias.
*/
- public function primaryAlias()
- {
+ public function primaryAlias() {
return $this->hasOne('App\Models\User\UserAlias')->where('is_primary_alias', 1);
}
/**
* Get the user's notifications.
*/
- public function notifications()
- {
+ public function notifications() {
return $this->hasMany('App\Models\Notification');
}
/**
* Get all the user's characters, regardless of whether they are full characters of myo slots.
*/
- public function allCharacters()
- {
+ public function allCharacters() {
return $this->hasMany('App\Models\Character\Character')->orderBy('sort', 'DESC');
}
/**
* Get the user's characters.
*/
- public function characters()
- {
+ public function characters() {
return $this->hasMany('App\Models\Character\Character')->where('is_myo_slot', 0)->orderBy('sort', 'DESC');
}
/**
* Get the user's MYO slots.
*/
- public function myoSlots()
- {
+ public function myoSlots() {
return $this->hasMany('App\Models\Character\Character')->where('is_myo_slot', 1)->orderBy('id', 'DESC');
}
/**
* Get the user's rank data.
*/
- public function rank()
- {
+ public function rank() {
return $this->belongsTo('App\Models\Rank\Rank');
}
/**
* Get the user's items.
*/
- public function items()
- {
+ public function items() {
return $this->belongsToMany('App\Models\Item\Item', 'user_items')->withPivot('count', 'data', 'updated_at', 'id')->whereNull('user_items.deleted_at');
}
/**
* Get all of the user's gallery submissions.
*/
- public function gallerySubmissions()
- {
+ public function gallerySubmissions() {
return $this->hasMany('App\Models\Gallery\GallerySubmission')->where('user_id', $this->id)->orWhereIn('id', GalleryCollaborator::where('user_id', $this->id)->where('type', 'Collab')->pluck('gallery_submission_id')->toArray())->visible($this)->accepted()->orderBy('created_at', 'DESC');
}
/**
* Get all of the user's favorited gallery submissions.
*/
- public function galleryFavorites()
- {
+ public function galleryFavorites() {
return $this->hasMany('App\Models\Gallery\GalleryFavorite')->where('user_id', $this->id);
}
-
+
/**
* Get all of the user's character bookmarks.
*/
- public function bookmarks()
- {
+ public function bookmarks() {
return $this->hasMany('App\Models\Character\CharacterBookmark')->where('user_id', $this->id);
}
@@ -198,11 +179,11 @@ public function bookmarks()
/**
* Scope a query to only include visible (non-banned) users.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query)
- {
+ public function scopeVisible($query) {
return $query->where('is_banned', 0);
}
@@ -217,9 +198,8 @@ public function scopeVisible($query)
*
* @return string
*/
- public function getVerifiedNameAttribute()
- {
- return $this->name . ($this->hasAlias ? '' : ' (Unverified)');
+ public function getVerifiedNameAttribute() {
+ return $this->name.($this->hasAlias ? '' : ' (Unverified)');
}
/**
@@ -227,8 +207,7 @@ public function getVerifiedNameAttribute()
*
* @return bool
*/
- public function getHasAliasAttribute()
- {
+ public function getHasAliasAttribute() {
return $this->attributes['has_alias'];
}
@@ -237,8 +216,7 @@ public function getHasAliasAttribute()
*
* @return bool
*/
- public function getIsAdminAttribute()
- {
+ public function getIsAdminAttribute() {
return $this->rank->isAdmin;
}
@@ -247,18 +225,18 @@ public function getIsAdminAttribute()
*
* @return bool
*/
- public function getIsStaffAttribute()
- {
- return (RankPower::where('rank_id', $this->rank_id)->exists() || $this->isAdmin);
+ public function getIsStaffAttribute() {
+ return RankPower::where('rank_id', $this->rank_id)->exists() || $this->isAdmin;
}
/**
* Checks if the user has the given power.
*
+ * @param mixed $power
+ *
* @return bool
*/
- public function hasPower($power)
- {
+ public function hasPower($power) {
return $this->rank->hasPower($power);
}
@@ -267,8 +245,7 @@ public function hasPower($power)
*
* @return array
*/
- public function getPowers()
- {
+ public function getPowers() {
return $this->rank->getPowers();
}
@@ -277,8 +254,7 @@ public function getPowers()
*
* @return string
*/
- public function getUrlAttribute()
- {
+ public function getUrlAttribute() {
return url('user/'.$this->name);
}
@@ -287,8 +263,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getAdminUrlAttribute()
- {
+ public function getAdminUrlAttribute() {
return url('admin/users/'.$this->name.'/edit');
}
@@ -297,19 +272,17 @@ public function getAdminUrlAttribute()
*
* @return string
*/
- public function getDisplayNameAttribute()
- {
- return ($this->is_banned ? '' : '') . 'rank->color ? 'style="color: #'.$this->rank->color.';"' : '').'>'.$this->name.' ' . ($this->is_banned ? ' ' : '');
+ public function getDisplayNameAttribute() {
+ return ($this->is_banned ? '' : '').'rank->color ? 'style="color: #'.$this->rank->color.';"' : '').'>'.$this->name.' '.($this->is_banned ? ' ' : '');
}
- /**
+ /**
* Displays the user's name, linked to their profile page.
*
* @return string
*/
- public function getCommentDisplayNameAttribute()
- {
- return 'rank->color ? 'style="background-color: #'.$this->rank->color.'!important;color:#000!important;"' : '').'> '. $this->name .' ';
+ public function getCommentDisplayNameAttribute() {
+ return 'rank->color ? 'style="background-color: #'.$this->rank->color.'!important;color:#000!important;"' : '').'> '.$this->name.' ';
}
/**
@@ -317,20 +290,21 @@ public function getCommentDisplayNameAttribute()
*
* @return string
*/
- public function getDisplayAliasAttribute()
- {
- if (!$this->hasAlias) return '(Unverified)';
+ public function getDisplayAliasAttribute() {
+ if (!$this->hasAlias) {
+ return '(Unverified)';
+ }
+
return $this->primaryAlias->displayAlias;
}
/**
- * Displays the user's avatar
+ * Displays the user's avatar.
*
* @return string
*/
- public function getAvatar()
- {
- return ($this->avatar);
+ public function getAvatar() {
+ return $this->avatar;
}
/**
@@ -338,47 +312,53 @@ public function getAvatar()
*
* @return string
*/
- public function getLogTypeAttribute()
- {
+ public function getLogTypeAttribute() {
return 'User';
}
/**
- * Get's user birthday setting
+ * Get's user birthday setting.
*/
- public function getBirthdayDisplayAttribute()
- {
+ public function getBirthdayDisplayAttribute() {
//
$icon = null;
$bday = $this->birthday;
- if(!isset($bday)) return 'N/A';
+ if (!isset($bday)) {
+ return 'N/A';
+ }
- if($bday->format('d M') == carbon::now()->format('d M')) $icon = ' ';
+ if ($bday->format('d M') == carbon::now()->format('d M')) {
+ $icon = ' ';
+ }
//
- switch($this->settings->birthday_setting) {
+ switch ($this->settings->birthday_setting) {
case 0:
return null;
- break;
+ break;
case 1:
- if(Auth::check()) return $bday->format('d M') . $icon;
- break;
+ if (Auth::check()) {
+ return $bday->format('d M').$icon;
+ }
+ break;
case 2:
- return $bday->format('d M') . $icon;
- break;
+ return $bday->format('d M').$icon;
+ break;
case 3:
- return $bday->format('d M Y') . $icon;
- break;
+ return $bday->format('d M Y').$icon;
+ break;
}
}
/**
- * Check if user is of age
+ * Check if user is of age.
*/
- public function getcheckBirthdayAttribute()
- {
- $bday = $this->birthday;
- if(!$bday || $bday->diffInYears(carbon::now()) < 13) return false;
- else return true;
+ public function getcheckBirthdayAttribute() {
+ $bday = $this->birthday;
+ if (!$bday || $bday->diffInYears(carbon::now()) < 13) {
+ return false;
+ } else {
+ return true;
+ }
}
/**********************************************************************************************
@@ -389,21 +369,22 @@ public function getcheckBirthdayAttribute()
/**
* Checks if the user can edit the given rank.
*
+ * @param mixed $rank
+ *
* @return bool
*/
- public function canEditRank($rank)
- {
+ public function canEditRank($rank) {
return $this->rank->canEditRank($rank);
}
/**
* Get the user's held currencies.
*
- * @param bool $showAll
+ * @param bool $showAll
+ *
* @return \Illuminate\Support\Collection
*/
- public function getCurrencies($showAll = false)
- {
+ public function getCurrencies($showAll = false) {
// Get a list of currencies that need to be displayed
// On profile: only ones marked is_displayed
// In bank: ones marked is_displayed + the ones the user has
@@ -411,15 +392,18 @@ public function getCurrencies($showAll = false)
$owned = UserCurrency::where('user_id', $this->id)->pluck('quantity', 'currency_id')->toArray();
$currencies = Currency::where('is_user_owned', 1);
- if($showAll) $currencies->where(function($query) use($owned) {
- $query->where('is_displayed', 1)->orWhereIn('id', array_keys($owned));
- });
- else $currencies = $currencies->where('is_displayed', 1);
+ if ($showAll) {
+ $currencies->where(function ($query) use ($owned) {
+ $query->where('is_displayed', 1)->orWhereIn('id', array_keys($owned));
+ });
+ } else {
+ $currencies = $currencies->where('is_displayed', 1);
+ }
$currencies = $currencies->orderBy('sort_user', 'DESC')->get();
- foreach($currencies as $currency) {
- $currency->quantity = isset($owned[$currency->id]) ? $owned[$currency->id] : 0;
+ foreach ($currencies as $currency) {
+ $currency->quantity = $owned[$currency->id] ?? 0;
}
return $currencies;
@@ -428,63 +412,76 @@ public function getCurrencies($showAll = false)
/**
* Get the user's held currencies as an array for select inputs.
*
+ * @param mixed $isTransferrable
+ *
* @return array
*/
- public function getCurrencySelect($isTransferrable = false)
- {
+ public function getCurrencySelect($isTransferrable = false) {
$query = UserCurrency::query()->where('user_id', $this->id)->leftJoin('currencies', 'user_currencies.currency_id', '=', 'currencies.id')->orderBy('currencies.sort_user', 'DESC');
- if($isTransferrable) $query->where('currencies.allow_user_to_user', 1);
+ if ($isTransferrable) {
+ $query->where('currencies.allow_user_to_user', 1);
+ }
+
return $query->get()->pluck('name_with_quantity', 'currency_id')->toArray();
}
/**
* Get the user's currency logs.
*
- * @param int $limit
- * @return \Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator
+ * @param int $limit
+ *
+ * @return \Illuminate\Pagination\LengthAwarePaginator|\Illuminate\Support\Collection
*/
- public function getCurrencyLogs($limit = 10)
- {
+ public function getCurrencyLogs($limit = 10) {
$user = $this;
- $query = CurrencyLog::with('currency')->where(function($query) use ($user) {
+ $query = CurrencyLog::with('currency')->where(function ($query) use ($user) {
$query->with('sender')->where('sender_type', 'User')->where('sender_id', $user->id)->whereNotIn('log_type', ['Staff Grant', 'Prompt Rewards', 'Claim Rewards', 'Gallery Submission Reward']);
- })->orWhere(function($query) use ($user) {
+ })->orWhere(function ($query) use ($user) {
$query->with('recipient')->where('recipient_type', 'User')->where('recipient_id', $user->id)->where('log_type', '!=', 'Staff Removal');
})->orderBy('id', 'DESC');
- if($limit) return $query->take($limit)->get();
- else return $query->paginate(30);
+ if ($limit) {
+ return $query->take($limit)->get();
+ } else {
+ return $query->paginate(30);
+ }
}
/**
* Get the user's item logs.
*
- * @param int $limit
- * @return \Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator
+ * @param int $limit
+ *
+ * @return \Illuminate\Pagination\LengthAwarePaginator|\Illuminate\Support\Collection
*/
- public function getItemLogs($limit = 10)
- {
+ public function getItemLogs($limit = 10) {
$user = $this;
- $query = ItemLog::with('item')->where(function($query) use ($user) {
+ $query = ItemLog::with('item')->where(function ($query) use ($user) {
$query->with('sender')->where('sender_type', 'User')->where('sender_id', $user->id)->whereNotIn('log_type', ['Staff Grant', 'Prompt Rewards', 'Claim Rewards']);
- })->orWhere(function($query) use ($user) {
+ })->orWhere(function ($query) use ($user) {
$query->with('recipient')->where('recipient_type', 'User')->where('recipient_id', $user->id)->where('log_type', '!=', 'Staff Removal');
})->orderBy('id', 'DESC');
- if($limit) return $query->take($limit)->get();
- else return $query->paginate(30);
+ if ($limit) {
+ return $query->take($limit)->get();
+ } else {
+ return $query->paginate(30);
+ }
}
/**
* Get the user's shop purchase logs.
*
- * @param int $limit
- * @return \Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator
+ * @param int $limit
+ *
+ * @return \Illuminate\Pagination\LengthAwarePaginator|\Illuminate\Support\Collection
*/
- public function getShopLogs($limit = 10)
- {
+ public function getShopLogs($limit = 10) {
$user = $this;
$query = ShopLog::where('user_id', $this->id)->with('character')->with('shop')->with('item')->with('currency')->orderBy('id', 'DESC');
- if($limit) return $query->take($limit)->get();
- else return $query->paginate(30);
+ if ($limit) {
+ return $query->take($limit)->get();
+ } else {
+ return $query->paginate(30);
+ }
}
/**
@@ -492,36 +489,45 @@ public function getShopLogs($limit = 10)
*
* @return \Illuminate\Pagination\LengthAwarePaginator
*/
- public function getOwnershipLogs()
- {
+ public function getOwnershipLogs() {
$user = $this;
- $query = UserCharacterLog::with('sender.rank')->with('recipient.rank')->with('character')->where(function($query) use ($user) {
+ $query = UserCharacterLog::with('sender.rank')->with('recipient.rank')->with('character')->where(function ($query) use ($user) {
$query->where('sender_id', $user->id)->whereNotIn('log_type', ['Character Created', 'MYO Slot Created', 'Character Design Updated', 'MYO Design Approved']);
- })->orWhere(function($query) use ($user) {
+ })->orWhere(function ($query) use ($user) {
$query->where('recipient_id', $user->id);
})->orderBy('id', 'DESC');
+
return $query->paginate(30);
}
/**
* Checks if there are characters credited to the user's alias and updates ownership to their account accordingly.
*/
- public function updateCharacters()
- {
- if(!$this->hasAlias) return;
+ public function updateCharacters() {
+ if (!$this->hasAlias) {
+ return;
+ }
// Pluck alias from url and check for matches
- $urlCharacters = Character::whereNotNull('owner_url')->pluck('owner_url','id');
- $matches = []; $count = 0;
- foreach($this->aliases as $alias) {
+ $urlCharacters = Character::whereNotNull('owner_url')->pluck('owner_url', 'id');
+ $matches = [];
+ $count = 0;
+ foreach ($this->aliases as $alias) {
// Find all urls from the same site as this alias
- foreach($urlCharacters as $key=>$character) preg_match_all(Config::get('lorekeeper.sites.'.$alias->site.'.regex'), $character, $matches[$key]);
+ foreach ($urlCharacters as $key=>$character) {
+ preg_match_all(Config::get('lorekeeper.sites.'.$alias->site.'.regex'), $character, $matches[$key]);
+ }
// Find all alias matches within those, and update the character's owner
- foreach($matches as $key=>$match) if($match[1] != [] && strtolower($match[1][0]) == strtolower($alias->alias)) {Character::find($key)->update(['owner_url' => null, 'user_id' => $this->id]); $count += 1;}
+ foreach ($matches as $key=>$match) {
+ if ($match[1] != [] && strtolower($match[1][0]) == strtolower($alias->alias)) {
+ Character::find($key)->update(['owner_url' => null, 'user_id' => $this->id]);
+ $count += 1;
+ }
+ }
}
//
- if($count > 0) {
+ if ($count > 0) {
$this->settings->is_fto = 0;
}
$this->settings->save();
@@ -530,28 +536,36 @@ public function updateCharacters()
/**
* Checks if there are art or design credits credited to the user's alias and credits them to their account accordingly.
*/
- public function updateArtDesignCredits()
- {
- if(!$this->hasAlias) return;
+ public function updateArtDesignCredits() {
+ if (!$this->hasAlias) {
+ return;
+ }
// Pluck alias from url and check for matches
- $urlCreators = CharacterImageCreator::whereNotNull('url')->pluck('url','id');
+ $urlCreators = CharacterImageCreator::whereNotNull('url')->pluck('url', 'id');
$matches = [];
- foreach($this->aliases as $alias) {
+ foreach ($this->aliases as $alias) {
// Find all urls from the same site as this alias
- foreach($urlCreators as $key=>$creator) preg_match_all(Config::get('lorekeeper.sites.'.$alias->site.'.regex'), $creator, $matches[$key]);
+ foreach ($urlCreators as $key=>$creator) {
+ preg_match_all(Config::get('lorekeeper.sites.'.$alias->site.'.regex'), $creator, $matches[$key]);
+ }
// Find all alias matches within those, and update the relevant CharacterImageCreator
- foreach($matches as $key=>$match) if($match[1] != [] && strtolower($match[1][0]) == strtolower($alias->alias)) CharacterImageCreator::find($key)->update(['url' => null, 'user_id' => $this->id]);
+ foreach ($matches as $key=>$match) {
+ if ($match[1] != [] && strtolower($match[1][0]) == strtolower($alias->alias)) {
+ CharacterImageCreator::find($key)->update(['url' => null, 'user_id' => $this->id]);
+ }
+ }
}
}
/**
* Get the user's submissions.
*
+ * @param mixed|null $user
+ *
* @return \Illuminate\Pagination\LengthAwarePaginator
*/
- public function getSubmissions($user = null)
- {
+ public function getSubmissions($user = null) {
return Submission::with('user')->with('prompt')->viewable($user ? $user : null)->where('user_id', $this->id)->orderBy('id', 'DESC')->paginate(30);
}
@@ -559,10 +573,11 @@ public function getSubmissions($user = null)
* Checks if the user has bookmarked a character.
* Returns the bookmark if one exists.
*
+ * @param mixed $character
+ *
* @return \App\Models\Character\CharacterBookmark
*/
- public function hasBookmarked($character)
- {
+ public function hasBookmarked($character) {
return CharacterBookmark::where('user_id', $this->id)->where('character_id', $character->id)->first();
}
}
diff --git a/app/Models/User/UserAlias.php b/app/Models/User/UserAlias.php
index e4e0677c6a..cf0df3610f 100644
--- a/app/Models/User/UserAlias.php
+++ b/app/Models/User/UserAlias.php
@@ -2,19 +2,17 @@
namespace App\Models\User;
-use Config;
use App\Models\Model;
+use Config;
-class UserAlias extends Model
-{
-
+class UserAlias extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'user_id', 'site', 'alias', 'is_visible', 'is_primary_alias'
+ 'user_id', 'site', 'alias', 'is_visible', 'is_primary_alias',
];
/**
@@ -33,8 +31,7 @@ class UserAlias extends Model
/**
* Get the user this set of settings belongs to.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
@@ -47,11 +44,11 @@ public function user()
/**
* Scope a query to only include visible aliases.
*
- * @param \Illuminate\Database\Eloquent\Builder $query
+ * @param \Illuminate\Database\Eloquent\Builder $query
+ *
* @return \Illuminate\Database\Eloquent\Builder
*/
- public function scopeVisible($query)
- {
+ public function scopeVisible($query) {
return $query->where('is_visible', 1);
}
@@ -66,10 +63,12 @@ public function scopeVisible($query)
*
* @return string
*/
- public function getUrlAttribute()
- {
- if($this->site == 'tumblr') return 'https://'.$this->alias.Config::get('lorekeeper.sites.tumblr.link');
- else return 'https://'.Config::get('lorekeeper.sites.'.$this->site.'.link').'/'.$this->alias;
+ public function getUrlAttribute() {
+ if ($this->site == 'tumblr') {
+ return 'https://'.$this->alias.Config::get('lorekeeper.sites.tumblr.link');
+ } else {
+ return 'https://'.Config::get('lorekeeper.sites.'.$this->site.'.link').'/'.$this->alias;
+ }
}
/**
@@ -77,8 +76,7 @@ public function getUrlAttribute()
*
* @return string
*/
- public function getDisplayAliasAttribute()
- {
+ public function getDisplayAliasAttribute() {
return ''.$this->alias.'@'.$this->siteDisplayName.' ';
}
@@ -87,9 +85,8 @@ public function getDisplayAliasAttribute()
*
* @return string
*/
- public function getConfigAttribute()
- {
- return Config::get('lorekeeper.sites.' . $this->site);
+ public function getConfigAttribute() {
+ return Config::get('lorekeeper.sites.'.$this->site);
}
/**
@@ -97,9 +94,8 @@ public function getConfigAttribute()
*
* @return string
*/
- public function getSiteDisplayNameAttribute()
- {
- return Config::get('lorekeeper.sites.' . $this->site . '.display_name');
+ public function getSiteDisplayNameAttribute() {
+ return Config::get('lorekeeper.sites.'.$this->site.'.display_name');
}
/**
@@ -107,8 +103,7 @@ public function getSiteDisplayNameAttribute()
*
* @return string
*/
- public function getCanMakePrimaryAttribute()
- {
- return Config::get('lorekeeper.sites.' . $this->site . '.primary_alias');
+ public function getCanMakePrimaryAttribute() {
+ return Config::get('lorekeeper.sites.'.$this->site.'.primary_alias');
}
}
diff --git a/app/Models/User/UserCharacterLog.php b/app/Models/User/UserCharacterLog.php
index ca8de48768..9c8daaf76b 100644
--- a/app/Models/User/UserCharacterLog.php
+++ b/app/Models/User/UserCharacterLog.php
@@ -2,11 +2,9 @@
namespace App\Models\User;
-use Config;
use App\Models\Model;
-class UserCharacterLog extends Model
-{
+class UserCharacterLog extends Model {
/**
* The attributes that are mass assignable.
*
@@ -14,7 +12,7 @@ class UserCharacterLog extends Model
*/
protected $fillable = [
'character_id', 'sender_id', 'sender_alias', 'recipient_id', 'recipient_alias',
- 'log', 'log_type', 'data', 'sender_url', 'recipient_url'
+ 'log', 'log_type', 'data', 'sender_url', 'recipient_url',
];
/**
@@ -32,37 +30,34 @@ class UserCharacterLog extends Model
public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the user who initiated the logged action.
*/
- public function sender()
- {
+ public function sender() {
return $this->belongsTo('App\Models\User\User', 'sender_id');
}
/**
* Get the user who received the logged action.
*/
- public function recipient()
- {
+ public function recipient() {
return $this->belongsTo('App\Models\User\User', 'recipient_id');
}
/**
* Get the character that is the target of the action.
*/
- public function character()
- {
+ public function character() {
return $this->belongsTo('App\Models\Character\Character');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -72,19 +67,16 @@ public function character()
*
* @return string
*/
- public function getDisplaySenderAliasAttribute()
- {
+ public function getDisplaySenderAliasAttribute() {
return prettyProfileLink($this->sender_url);
}
-
+
/**
* Displays the recipient's alias, linked to their profile.
*
* @return string
*/
- public function getDisplayRecipientAliasAttribute()
- {
+ public function getDisplayRecipientAliasAttribute() {
return prettyProfileLink($this->recipient_url);
}
-
}
diff --git a/app/Models/User/UserCurrency.php b/app/Models/User/UserCurrency.php
index 43cccb5b9c..03d8c5f2c8 100644
--- a/app/Models/User/UserCurrency.php
+++ b/app/Models/User/UserCurrency.php
@@ -4,25 +4,23 @@
use App\Models\Model;
-class UserCurrency extends Model
-{
-
+class UserCurrency extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'quantity', 'user_id', 'currency_id'
+ 'quantity', 'user_id', 'currency_id',
];
-
+
/**
* Accessors to append to the model.
*
* @var array
*/
protected $appends = [
- 'name_with_quantity'
+ 'name_with_quantity',
];
/**
@@ -33,7 +31,7 @@ class UserCurrency extends Model
protected $table = 'user_currencies';
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -41,21 +39,19 @@ class UserCurrency extends Model
/**
* Get the user who owns the currency.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
/**
* Get the currency associated with this record.
*/
- public function currency()
- {
+ public function currency() {
return $this->belongsTo('App\Models\Currency\Currency');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -65,8 +61,7 @@ public function currency()
*
* @return string
*/
- public function getNameWithQuantityAttribute()
- {
- return $this->currency->name . ' [Owned: ' . $this->quantity . ']';
+ public function getNameWithQuantityAttribute() {
+ return $this->currency->name.' [Owned: '.$this->quantity.']';
}
}
diff --git a/app/Models/User/UserItem.php b/app/Models/User/UserItem.php
index 9d6f957547..7f8bda7395 100644
--- a/app/Models/User/UserItem.php
+++ b/app/Models/User/UserItem.php
@@ -5,8 +5,7 @@
use App\Models\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
-class UserItem extends Model
-{
+class UserItem extends Model {
use SoftDeletes;
/**
@@ -15,25 +14,25 @@ class UserItem extends Model
* @var array
*/
protected $fillable = [
- 'data', 'item_id', 'user_id'
+ 'data', 'item_id', 'user_id',
];
/**
- * Whether the model contains timestamps to be saved and updated.
+ * The table associated with the model.
*
* @var string
*/
- public $timestamps = true;
+ protected $table = 'user_items';
/**
- * The table associated with the model.
+ * Whether the model contains timestamps to be saved and updated.
*
* @var string
*/
- protected $table = 'user_items';
+ public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
@@ -41,21 +40,19 @@ class UserItem extends Model
/**
* Get the user who owns the stack.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
/**
* Get the item associated with this item stack.
*/
- public function item()
- {
+ public function item() {
return $this->belongsTo('App\Models\Item\Item');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -65,19 +62,20 @@ public function item()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
-
+
/**
* Checks if the stack is transferrable.
*
* @return array
*/
- public function getIsTransferrableAttribute()
- {
- if(!isset($this->data['disallow_transfer']) && $this->item->allow_transfer) return true;
+ public function getIsTransferrableAttribute() {
+ if (!isset($this->data['disallow_transfer']) && $this->item->allow_transfer) {
+ return true;
+ }
+
return false;
}
@@ -86,9 +84,8 @@ public function getIsTransferrableAttribute()
*
* @return int
*/
- public function getAvailableQuantityAttribute()
- {
- return ($this->count - $this->trade_count - $this->update_count- $this->submission_count);
+ public function getAvailableQuantityAttribute() {
+ return $this->count - $this->trade_count - $this->update_count - $this->submission_count;
}
/**
@@ -96,43 +93,58 @@ public function getAvailableQuantityAttribute()
*
* @return string
*/
- public function getAssetTypeAttribute()
- {
+ public function getAssetTypeAttribute() {
return 'user_items';
}
/**
- * Returns string stating amount held elsewhere
+ * Returns string stating amount held elsewhere.
+ *
+ * @param mixed $tradeCount
+ * @param mixed $updateCount
+ * @param mixed $submissionCount
*
* @return string
*/
- public function getOthers($tradeCount = 0, $updateCount = 0, $submissionCount = 0)
- {
+ public function getOthers($tradeCount = 0, $updateCount = 0, $submissionCount = 0) {
return $this->getHeldString($this->trade_count - $tradeCount, $this->update_count - $updateCount, $this->submission_count - $submissionCount);
}
/**
- * Gets the available quantity based on input context (either trade count or update count)
+ * Gets the available quantity based on input context (either trade count or update count).
+ *
+ * @param mixed $count
*
* @return int
*/
- public function getAvailableContextQuantity($count)
- {
- return ($this->getAvailableQuantityAttribute() + $count);
+ public function getAvailableContextQuantity($count) {
+ return $this->getAvailableQuantityAttribute() + $count;
}
/**
- * Construct string stating held items
- *
+ * Construct string stating held items.
+ *
+ * @param mixed $tradeCount
+ * @param mixed $updateCount
+ * @param mixed $submissionCount
+ *
* @return string
*/
- private function getHeldString($tradeCount, $updateCount, $submissionCount)
- {
- if(!$tradeCount && !$updateCount && !$submissionCount) return null;
+ private function getHeldString($tradeCount, $updateCount, $submissionCount) {
+ if (!$tradeCount && !$updateCount && !$submissionCount) {
+ return null;
+ }
$held = [];
- if($tradeCount) array_push($held, $tradeCount.' held in Trades');
- if($updateCount) array_push($held, $updateCount.' held in Design Updates');
- if($submissionCount) array_push($held, $submissionCount.' held in Submissions');
- return ('('.implode(', ',$held).')');
+ if ($tradeCount) {
+ array_push($held, $tradeCount.' held in Trades');
+ }
+ if ($updateCount) {
+ array_push($held, $updateCount.' held in Design Updates');
+ }
+ if ($submissionCount) {
+ array_push($held, $submissionCount.' held in Submissions');
+ }
+
+ return '('.implode(', ', $held).')';
}
}
diff --git a/app/Models/User/UserProfile.php b/app/Models/User/UserProfile.php
index 7ab4e34719..7e2a9b4ef7 100644
--- a/app/Models/User/UserProfile.php
+++ b/app/Models/User/UserProfile.php
@@ -5,9 +5,7 @@
use App\Models\Model;
use App\Traits\Commentable;
-class UserProfile extends Model
-{
-
+class UserProfile extends Model {
use Commentable;
/**
@@ -16,34 +14,33 @@ class UserProfile extends Model
* @var array
*/
protected $fillable = [
- 'text', 'parsed_text'
+ 'text', 'parsed_text',
];
/**
- * The primary key of the model.
+ * The table associated with the model.
*
* @var string
*/
- public $primaryKey = 'user_id';
+ protected $table = 'user_profiles';
/**
- * The table associated with the model.
+ * The primary key of the model.
*
* @var string
*/
- protected $table = 'user_profiles';
+ public $primaryKey = 'user_id';
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the user this profile belongs to.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
}
diff --git a/app/Models/User/UserSettings.php b/app/Models/User/UserSettings.php
index 5c29a7cabe..6fed0fbe87 100644
--- a/app/Models/User/UserSettings.php
+++ b/app/Models/User/UserSettings.php
@@ -4,25 +4,16 @@
use App\Models\Model;
-class UserSettings extends Model
-{
-
+class UserSettings extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'is_fto', 'submission_count', 'banned_at', 'ban_reason', 'birthday_setting'
+ 'is_fto', 'submission_count', 'banned_at', 'ban_reason', 'birthday_setting',
];
- /**
- * The primary key of the model.
- *
- * @var string
- */
- public $primaryKey = 'user_id';
-
/**
* The table associated with the model.
*
@@ -37,17 +28,23 @@ class UserSettings extends Model
*/
protected $dates = ['banned_at'];
+ /**
+ * The primary key of the model.
+ *
+ * @var string
+ */
+ public $primaryKey = 'user_id';
+
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the user this set of settings belongs to.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User');
}
}
diff --git a/app/Models/User/UserUpdateLog.php b/app/Models/User/UserUpdateLog.php
index a750d302ad..7cacf6d5f1 100644
--- a/app/Models/User/UserUpdateLog.php
+++ b/app/Models/User/UserUpdateLog.php
@@ -4,63 +4,59 @@
use App\Models\Model;
-class UserUpdateLog extends Model
-{
-
+class UserUpdateLog extends Model {
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
- 'staff_id', 'user_id', 'data', 'type'
+ 'staff_id', 'user_id', 'data', 'type',
];
/**
- * The primary key of the model.
+ * The table associated with the model.
*
* @var string
*/
- public $primaryKey = 'user_id';
+ protected $table = 'user_update_log';
/**
- * Whether the model contains timestamps to be saved and updated.
+ * The primary key of the model.
*
* @var string
*/
- public $timestamps = true;
+ public $primaryKey = 'user_id';
/**
- * The table associated with the model.
+ * Whether the model contains timestamps to be saved and updated.
*
* @var string
*/
- protected $table = 'user_update_log';
+ public $timestamps = true;
/**********************************************************************************************
-
+
RELATIONS
**********************************************************************************************/
-
+
/**
* Get the staff who updated the user.
*/
- public function staff()
- {
+ public function staff() {
return $this->belongsTo('App\Models\User\User', 'staff_id');
}
-
+
/**
* Get the user that was updated.
*/
- public function user()
- {
+ public function user() {
return $this->belongsTo('App\Models\User\User', 'user_id');
}
/**********************************************************************************************
-
+
ACCESSORS
**********************************************************************************************/
@@ -70,8 +66,7 @@ public function user()
*
* @return array
*/
- public function getDataAttribute()
- {
+ public function getDataAttribute() {
return json_decode($this->attributes['data'], true);
}
}
diff --git a/app/Policies/CommentPolicy.php b/app/Policies/CommentPolicy.php
index 5b554228ed..4d08b64737 100644
--- a/app/Policies/CommentPolicy.php
+++ b/app/Policies/CommentPolicy.php
@@ -2,61 +2,39 @@
namespace App\Policies;
-use Auth;
use App\Models\Comment;
+use Auth;
-class CommentPolicy
-{
+class CommentPolicy {
/**
- * Can user create the comment
- *
- * @param $user
- * @return bool
+ * Can user create the comment.
*/
- public function create($user) : bool
- {
+ public function create($user): bool {
return true;
}
/**
- * Can user delete the comment
- *
- * @param $user
- * @param Comment $comment
- * @return bool
+ * Can user delete the comment.
*/
- public function delete($user, Comment $comment) : bool
- {
- if(Auth::user()->isStaff) {
- return true;
- }
- else {
- return false;
- }
+ public function delete($user, Comment $comment): bool {
+ if (Auth::user()->isStaff) {
+ return true;
+ } else {
+ return false;
+ }
}
/**
- * Can user update the comment
- *
- * @param $user
- * @param Comment $comment
- * @return bool
+ * Can user update the comment.
*/
- public function update($user, Comment $comment) : bool
- {
+ public function update($user, Comment $comment): bool {
return $user->getKey() == $comment->commenter_id;
}
/**
- * Can user reply to the comment
- *
- * @param $user
- * @param Comment $comment
- * @return bool
+ * Can user reply to the comment.
*/
- public function reply($user, Comment $comment) : bool
- {
+ public function reply($user, Comment $comment): bool {
return $user->getKey();
}
}
-
diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php
index 9524a3c3d0..0c7052fcb4 100644
--- a/app/Providers/AppServiceProvider.php
+++ b/app/Providers/AppServiceProvider.php
@@ -9,21 +9,18 @@
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
-class AppServiceProvider extends ServiceProvider
-{
+class AppServiceProvider extends ServiceProvider {
/**
* Register any application services.
*/
- public function register()
- {
+ public function register() {
//
}
/**
* Bootstrap any application services.
*/
- public function boot()
- {
+ public function boot() {
//
Schema::defaultStringLength(191);
Paginator::useBootstrap();
@@ -58,8 +55,7 @@ public function boot()
/**
* Boot Toyhouse Socialite provider.
*/
- private function bootToyhouseSocialite()
- {
+ private function bootToyhouseSocialite() {
$socialite = $this->app->make('Laravel\Socialite\Contracts\Factory');
$socialite->extend(
'toyhouse',
diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php
index 9784b1a300..aaaf13f707 100644
--- a/app/Providers/AuthServiceProvider.php
+++ b/app/Providers/AuthServiceProvider.php
@@ -2,11 +2,9 @@
namespace App\Providers;
-use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
-class AuthServiceProvider extends ServiceProvider
-{
+class AuthServiceProvider extends ServiceProvider {
/**
* The policy mappings for the application.
*
@@ -18,11 +16,8 @@ class AuthServiceProvider extends ServiceProvider
/**
* Register any authentication / authorization services.
- *
- * @return void
*/
- public function boot()
- {
+ public function boot() {
$this->registerPolicies();
//
diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php
index 352cce44a3..13b63a4e52 100644
--- a/app/Providers/BroadcastServiceProvider.php
+++ b/app/Providers/BroadcastServiceProvider.php
@@ -2,18 +2,14 @@
namespace App\Providers;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
+use Illuminate\Support\ServiceProvider;
-class BroadcastServiceProvider extends ServiceProvider
-{
+class BroadcastServiceProvider extends ServiceProvider {
/**
* Bootstrap any application services.
- *
- * @return void
*/
- public function boot()
- {
+ public function boot() {
Broadcast::routes();
require base_path('routes/channels.php');
diff --git a/app/Providers/CommentProvider.php b/app/Providers/CommentProvider.php
index 972d769ff4..bc921725a2 100644
--- a/app/Providers/CommentProvider.php
+++ b/app/Providers/CommentProvider.php
@@ -2,36 +2,14 @@
namespace App\Providers;
-use Illuminate\Support\ServiceProvider;
-use Illuminate\Support\Facades\App;
-use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Gate;
+use Illuminate\Support\Facades\Route;
+use Illuminate\Support\ServiceProvider;
-class CommentProvider extends ServiceProvider
-{
-
- /**
- * If for some reason you want to override the component.
- */
- protected function includeBladeComponent()
- {
- Blade::include('comments::comments', 'comments');
- }
-
- /**
- * Define permission defined in the config.
- */
- protected function definePermissions()
- {
- foreach(Config::get('lorekeeper.comments.permissions', []) as $permission => $policy) {
- Gate::define($permission, $policy);
- }
- }
-
- public function boot()
- {
+class CommentProvider extends ServiceProvider {
+ public function boot() {
$this->loadViewsFrom(base_path('resources/views/comments'), 'comments');
$this->includeBladeComponent();
@@ -41,11 +19,26 @@ public function boot()
Route::model('comment', 'App\Models\Comment');
}
- public function register()
- {
+ public function register() {
$this->mergeConfigFrom(
base_path('config/lorekeeper/comments.php'),
'comments'
); // Swapped to / instead of \ because for some reason Dreamhost was Not Happy if it was \
}
+
+ /**
+ * If for some reason you want to override the component.
+ */
+ protected function includeBladeComponent() {
+ Blade::include('comments::comments', 'comments');
+ }
+
+ /**
+ * Define permission defined in the config.
+ */
+ protected function definePermissions() {
+ foreach (Config::get('lorekeeper.comments.permissions', []) as $permission => $policy) {
+ Gate::define($permission, $policy);
+ }
+ }
}
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index 245624ea06..79ffb5dacd 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -2,13 +2,12 @@
namespace App\Providers;
-use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
+use Illuminate\Support\Facades\Event;
-class EventServiceProvider extends ServiceProvider
-{
+class EventServiceProvider extends ServiceProvider {
/**
* The event listener mappings for the application.
*
@@ -18,7 +17,7 @@ class EventServiceProvider extends ServiceProvider
Registered::class => [
SendEmailVerificationNotification::class,
],
-
+
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
'SocialiteProviders\\Deviantart\\DeviantartExtendSocialite@handle',
'SocialiteProviders\\Twitter\\TwitterExtendSocialite@handle',
@@ -26,16 +25,13 @@ class EventServiceProvider extends ServiceProvider
'SocialiteProviders\\Tumblr\\TumblrExtendSocialite@handle',
'SocialiteProviders\\Imgur\\ImgurExtendSocialite@handle',
'SocialiteProviders\\Twitch\\TwitchExtendSocialite@handle',
- ]
+ ],
];
/**
* Register any events for your application.
- *
- * @return void
*/
- public function boot()
- {
+ public function boot() {
parent::boot();
//
diff --git a/app/Providers/NotificationsProvider.php b/app/Providers/NotificationsProvider.php
index fcb4b784e2..bd96deda59 100644
--- a/app/Providers/NotificationsProvider.php
+++ b/app/Providers/NotificationsProvider.php
@@ -2,31 +2,23 @@
namespace App\Providers;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\App;
+use Illuminate\Support\ServiceProvider;
-class NotificationsProvider extends ServiceProvider
-{
+class NotificationsProvider extends ServiceProvider {
/**
* Register services.
- *
- * @return void
*/
- public function register()
- {
+ public function register() {
//
}
/**
* Bootstrap services.
- *
- * @return void
*/
- public function boot()
- {
+ public function boot() {
//
- App::bind('notifications', function()
- {
+ App::bind('notifications', function () {
return new \App\Helpers\Notifications;
});
}
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index 5ea48d39d4..97c5516082 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -2,11 +2,10 @@
namespace App\Providers;
-use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
+use Illuminate\Support\Facades\Route;
-class RouteServiceProvider extends ServiceProvider
-{
+class RouteServiceProvider extends ServiceProvider {
/**
* This namespace is applied to your controller routes.
*
@@ -18,11 +17,8 @@ class RouteServiceProvider extends ServiceProvider
/**
* Define your route model bindings, pattern filters, etc.
- *
- * @return void
*/
- public function boot()
- {
+ public function boot() {
//
parent::boot();
@@ -30,11 +26,8 @@ public function boot()
/**
* Define the routes for the application.
- *
- * @return void
*/
- public function map()
- {
+ public function map() {
$this->mapApiRoutes();
$this->mapWebRoutes();
@@ -46,28 +39,22 @@ public function map()
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
- *
- * @return void
*/
- protected function mapWebRoutes()
- {
+ protected function mapWebRoutes() {
Route::middleware('web')
- ->namespace($this->namespace)
- ->group(base_path('routes/web.php'));
+ ->namespace($this->namespace)
+ ->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
- *
- * @return void
*/
- protected function mapApiRoutes()
- {
+ protected function mapApiRoutes() {
Route::prefix('api')
- ->middleware('api')
- ->namespace($this->namespace)
- ->group(base_path('routes/api.php'));
+ ->middleware('api')
+ ->namespace($this->namespace)
+ ->group(base_path('routes/api.php'));
}
}
diff --git a/app/Providers/SettingsProvider.php b/app/Providers/SettingsProvider.php
index 0401b025ed..b9c0aaf49b 100644
--- a/app/Providers/SettingsProvider.php
+++ b/app/Providers/SettingsProvider.php
@@ -2,31 +2,23 @@
namespace App\Providers;
-use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\App;
+use Illuminate\Support\ServiceProvider;
-class SettingsProvider extends ServiceProvider
-{
+class SettingsProvider extends ServiceProvider {
/**
* Register services.
- *
- * @return void
*/
- public function register()
- {
+ public function register() {
//
}
/**
* Bootstrap services.
- *
- * @return void
*/
- public function boot()
- {
+ public function boot() {
//
- App::bind('settings', function()
- {
+ App::bind('settings', function () {
return new \App\Helpers\Settings;
});
}
diff --git a/app/Providers/Socialite/ToyhouseProvider.php b/app/Providers/Socialite/ToyhouseProvider.php
index ffac5235ce..e0cdc581e3 100644
--- a/app/Providers/Socialite/ToyhouseProvider.php
+++ b/app/Providers/Socialite/ToyhouseProvider.php
@@ -7,8 +7,7 @@
use Laravel\Socialite\Two\ProviderInterface;
use Laravel\Socialite\Two\User;
-class ToyhouseProvider extends AbstractProvider implements ProviderInterface
-{
+class ToyhouseProvider extends AbstractProvider implements ProviderInterface {
protected $scopes = [];
/**
@@ -18,8 +17,7 @@ class ToyhouseProvider extends AbstractProvider implements ProviderInterface
*
* @return string
*/
- protected function getAuthUrl($state)
- {
+ protected function getAuthUrl($state) {
return $this->buildAuthUrlFromBase('https://toyhou.se/~oauth/authorize', $state);
}
@@ -28,8 +26,7 @@ protected function getAuthUrl($state)
*
* @return string
*/
- protected function getTokenUrl()
- {
+ protected function getTokenUrl() {
return 'https://toyhou.se/~oauth/token';
}
@@ -40,8 +37,7 @@ protected function getTokenUrl()
*
* @return array
*/
- protected function getUserByToken($token)
- {
+ protected function getUserByToken($token) {
$response = $this->getHttpClient()->get(
'https://toyhou.se/~api/v1/me',
[
@@ -59,8 +55,7 @@ protected function getUserByToken($token)
*
* @return \Laravel\Socialite\Two\User
*/
- protected function mapUserToObject(array $user)
- {
+ protected function mapUserToObject(array $user) {
return (new User)->setRaw($user)->map([
'id' => $user['id'], 'nickname' => $user['username'],
'name' => null, 'email' => null, 'avatar' => $user['avatar'],
diff --git a/app/Services/BookmarkManager.php b/app/Services/BookmarkManager.php
index 17a2fde9e1..d959701831 100644
--- a/app/Services/BookmarkManager.php
+++ b/app/Services/BookmarkManager.php
@@ -1,13 +1,12 @@
-visible()->first();
- if(!$character) throw new \Exception("Invalid character selected.");
+ if (!$character) {
+ throw new \Exception('Invalid character selected.');
+ }
+
+ if ($user->hasBookmarked($character)) {
+ throw new \Exception('You have already bookmarked this character.');
+ }
- if($user->hasBookmarked($character)) throw new \Exception("You have already bookmarked this character.");
-
$bookmark = CharacterBookmark::create([
- 'character_id' => $character->id,
- 'user_id' => $user->id,
- 'sort' => 0,
- 'notify_on_trade_status' => isset($data['notify_on_trade_status']) ? $data['notify_on_trade_status'] : 0,
- 'notify_on_gift_art_status' => isset($data['notify_on_gift_art_status']) ? $data['notify_on_gift_art_status'] : 0,
- 'notify_on_gift_writing_status' => isset($data['notify_on_gift_writing_status']) ? $data['notify_on_gift_writing_status'] : 0,
- 'notify_on_transfer' => isset($data['notify_on_transfer']) ? $data['notify_on_transfer'] : 0,
- 'notify_on_image' => isset($data['notify_on_image']) ? $data['notify_on_image'] : 0,
- 'comment' => $data['comment']
+ 'character_id' => $character->id,
+ 'user_id' => $user->id,
+ 'sort' => 0,
+ 'notify_on_trade_status' => $data['notify_on_trade_status'] ?? 0,
+ 'notify_on_gift_art_status' => $data['notify_on_gift_art_status'] ?? 0,
+ 'notify_on_gift_writing_status' => $data['notify_on_gift_writing_status'] ?? 0,
+ 'notify_on_transfer' => $data['notify_on_transfer'] ?? 0,
+ 'notify_on_image' => $data['notify_on_image'] ?? 0,
+ 'comment' => $data['comment'],
]);
return $this->commitReturn($bookmark);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Update a bookmark.
*
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return \App\Models\Character\CharacterBookmark|bool
*/
- public function updateBookmark($data, $user)
- {
+ public function updateBookmark($data, $user) {
DB::beginTransaction();
try {
- if(!isset($data['bookmark_id'])) throw new \Exception("Invalid bookmark selected.");
+ if (!isset($data['bookmark_id'])) {
+ throw new \Exception('Invalid bookmark selected.');
+ }
$bookmark = CharacterBookmark::with('character')->where('id', $data['bookmark_id'])->visible()->where('user_id', $user->id)->first();
- if(!$bookmark || !$bookmark->character->is_visible) throw new \Exception("Invalid bookmark selected.");
+ if (!$bookmark || !$bookmark->character->is_visible) {
+ throw new \Exception('Invalid bookmark selected.');
+ }
$bookmark->update([
- 'notify_on_trade_status' => isset($data['notify_on_trade_status']) ? $data['notify_on_trade_status'] : 0,
- 'notify_on_gift_art_status' => isset($data['notify_on_gift_art_status']) ? $data['notify_on_gift_art_status'] : 0,
- 'notify_on_gift_writing_status' => isset($data['notify_on_gift_writing_status']) ? $data['notify_on_gift_writing_status'] : 0,
- 'notify_on_transfer' => isset($data['notify_on_transfer']) ? $data['notify_on_transfer'] : 0,
- 'notify_on_image' => isset($data['notify_on_image']) ? $data['notify_on_image'] : 0,
- 'comment' => $data['comment']
+ 'notify_on_trade_status' => $data['notify_on_trade_status'] ?? 0,
+ 'notify_on_gift_art_status' => $data['notify_on_gift_art_status'] ?? 0,
+ 'notify_on_gift_writing_status' => $data['notify_on_gift_writing_status'] ?? 0,
+ 'notify_on_transfer' => $data['notify_on_transfer'] ?? 0,
+ 'notify_on_image' => $data['notify_on_image'] ?? 0,
+ 'comment' => $data['comment'],
]);
return $this->commitReturn($bookmark);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Delete a bookmark.
*
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return bool
*/
- public function deleteBookmark($data, $user)
- {
+ public function deleteBookmark($data, $user) {
DB::beginTransaction();
try {
- if(!isset($data['bookmark_id'])) throw new \Exception("Invalid bookmark selected.");
+ if (!isset($data['bookmark_id'])) {
+ throw new \Exception('Invalid bookmark selected.');
+ }
$bookmark = CharacterBookmark::with('character')->where('id', $data['bookmark_id'])->visible()->where('user_id', $user->id)->first();
- if(!$bookmark || !$bookmark->character->is_visible) throw new \Exception("Invalid bookmark selected.");
+ if (!$bookmark || !$bookmark->character->is_visible) {
+ throw new \Exception('Invalid bookmark selected.');
+ }
$bookmark->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
@@ -116,20 +132,21 @@ public function deleteBookmark($data, $user)
* Deletes bookmarks associated with a character.
* For use when a character is deleted.
*
- * @param \App\Models\Character\Character $character
+ * @param \App\Models\Character\Character $character
+ *
* @return bool
*/
- public function deleteBookmarks($character)
- {
+ public function deleteBookmarks($character) {
DB::beginTransaction();
try {
CharacterBookmark::where('character_id', $character->id)->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/CharacterCategoryService.php b/app/Services/CharacterCategoryService.php
index c5cfc8be63..fce03afccf 100644
--- a/app/Services/CharacterCategoryService.php
+++ b/app/Services/CharacterCategoryService.php
@@ -1,15 +1,12 @@
-populateCategoryData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$category = CharacterCategory::create($data);
- if ($image) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($image) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Update a category.
*
- * @param \App\Models\Character\CharacterCategory $category
- * @param array $data
+ * @param \App\Models\Character\CharacterCategory $category
+ * @param array $data
+ *
* @return \App\Models\Character\CharacterCategory|bool
*/
- public function updateCharacterCategory($category, $data)
- {
+ public function updateCharacterCategory($category, $data) {
DB::beginTransaction();
try {
- if(CharacterCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) throw new \Exception("The name has already been taken.");
- if(CharacterCategory::where('code', $data['code'])->where('id', '!=', $category->id)->exists()) throw new \Exception("The code has already been taken.");
+ if (CharacterCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
+ if (CharacterCategory::where('code', $data['code'])->where('id', '!=', $category->id)->exists()) {
+ throw new \Exception('The code has already been taken.');
+ }
$data = $this->populateCategoryData($data, $category);
- $image = null;
- if(isset($data['image']) && $data['image']) {
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -77,86 +82,94 @@ public function updateCharacterCategory($category, $data)
$category->update($data);
- if ($category) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($category) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
- /**
- * Handle category data.
- *
- * @param array $data
- * @param \App\Models\Character\CharacterCategory|null $category
- * @return array
- */
- private function populateCategoryData($data, $category = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- if(isset($data['remove_image']))
- {
- if($category && $category->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
- }
- unset($data['remove_image']);
- }
-
- return $data;
+ return $this->rollbackReturn(false);
}
/**
* Delete a category.
*
- * @param \App\Models\Character\CharacterCategory $category
+ * @param \App\Models\Character\CharacterCategory $category
+ *
* @return bool
*/
- public function deleteCharacterCategory($category)
- {
+ public function deleteCharacterCategory($category) {
DB::beginTransaction();
try {
// Check first if the category is currently in use
- if(Character::where('character_category_id', $category->id)->exists()) throw new \Exception("An character with this category exists. Please change its category first.");
-
- if($category->has_image) $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ if (Character::where('character_category_id', $category->id)->exists()) {
+ throw new \Exception('An character with this category exists. Please change its category first.');
+ }
+
+ if ($category->has_image) {
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
$category->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts category order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortCharacterCategory($data)
- {
+ public function sortCharacterCategory($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
CharacterCategory::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+ /**
+ * Handle category data.
+ *
+ * @param array $data
+ * @param \App\Models\Character\CharacterCategory|null $category
+ *
+ * @return array
+ */
+ private function populateCategoryData($data, $category = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($category && $category->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+}
diff --git a/app/Services/CharacterManager.php b/app/Services/CharacterManager.php
index e052081461..18bc9ae8fb 100644
--- a/app/Services/CharacterManager.php
+++ b/app/Services/CharacterManager.php
@@ -1,39 +1,32 @@
-orderBy('number', 'DESC')->first();
- if($character) $number = ltrim($character->number, 0);
- if(!strlen($number)) $number = '0';
- }
- else if (Config::get('lorekeeper.settings.character_pull_number') == 'category' && $categoryId)
- {
+ if ($character) {
+ $number = ltrim($character->number, 0);
+ }
+ if (!strlen($number)) {
+ $number = '0';
+ }
+ } elseif (Config::get('lorekeeper.settings.character_pull_number') == 'category' && $categoryId) {
$character = Character::myo(0)->where('character_category_id', $categoryId)->orderBy('number', 'DESC')->first();
- if($character) $number = ltrim($character->number, 0);
- if(!strlen($number)) $number = '0';
+ if ($character) {
+ $number = ltrim($character->number, 0);
+ }
+ if (!strlen($number)) {
+ $number = '0';
+ }
}
$result = format_masterlist_number($number + 1, $digits);
@@ -78,55 +76,71 @@ public function pullNumber($categoryId)
/**
* Creates a new character or MYO slot.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @param bool $isMyo
+ * @param array $data
+ * @param \App\Models\User\User $user
+ * @param bool $isMyo
+ *
* @return \App\Models\Character\Character|bool
*/
- public function createCharacter($data, $user, $isMyo = false)
- {
+ public function createCharacter($data, $user, $isMyo = false) {
DB::beginTransaction();
try {
- if(!$isMyo && Character::where('slug', $data['slug'])->exists()) throw new \Exception("Please enter a unique character code.");
+ if (!$isMyo && Character::where('slug', $data['slug'])->exists()) {
+ throw new \Exception('Please enter a unique character code.');
+ }
- if(!(isset($data['user_id']) && $data['user_id']) && !(isset($data['owner_url']) && $data['owner_url']))
- throw new \Exception("Please select an owner.");
- if(!$isMyo)
- {
- if(!(isset($data['species_id']) && $data['species_id'])) throw new \Exception('Characters require a species.');
- if(!(isset($data['rarity_id']) && $data['rarity_id'])) throw new \Exception('Characters require a rarity.');
+ if (!(isset($data['user_id']) && $data['user_id']) && !(isset($data['owner_url']) && $data['owner_url'])) {
+ throw new \Exception('Please select an owner.');
+ }
+ if (!$isMyo) {
+ if (!(isset($data['species_id']) && $data['species_id'])) {
+ throw new \Exception('Characters require a species.');
+ }
+ if (!(isset($data['rarity_id']) && $data['rarity_id'])) {
+ throw new \Exception('Characters require a rarity.');
+ }
}
- if(isset($data['subtype_id']) && $data['subtype_id'])
- {
+ if (isset($data['subtype_id']) && $data['subtype_id']) {
$subtype = Subtype::find($data['subtype_id']);
- if(!(isset($data['species_id']) && $data['species_id'])) throw new \Exception('Species must be selected to select a subtype.');
- if(!$subtype || $subtype->species_id != $data['species_id']) throw new \Exception('Selected subtype invalid or does not match species.');
+ if (!(isset($data['species_id']) && $data['species_id'])) {
+ throw new \Exception('Species must be selected to select a subtype.');
+ }
+ if (!$subtype || $subtype->species_id != $data['species_id']) {
+ throw new \Exception('Selected subtype invalid or does not match species.');
+ }
+ } else {
+ $data['subtype_id'] = null;
}
- else $data['subtype_id'] = null;
// Get owner info
$url = null;
$recipientId = null;
- if(isset($data['user_id']) && $data['user_id']) $recipient = User::find($data['user_id']);
- elseif(isset($data['owner_url']) && $data['owner_url']) $recipient = checkAlias($data['owner_url']);
+ if (isset($data['user_id']) && $data['user_id']) {
+ $recipient = User::find($data['user_id']);
+ } elseif (isset($data['owner_url']) && $data['owner_url']) {
+ $recipient = checkAlias($data['owner_url']);
+ }
- if(is_object($recipient)) {
+ if (is_object($recipient)) {
$recipientId = $recipient->id;
$data['user_id'] = $recipient->id;
- }
- else {
+ } else {
$url = $recipient;
}
// Create character
$character = $this->handleCharacter($data, $isMyo);
- if(!$character) throw new \Exception("Error happened while trying to create character.");
+ if (!$character) {
+ throw new \Exception('Error happened while trying to create character.');
+ }
// Create character image
$data['is_valid'] = true; // New image of new characters are always valid
$image = $this->handleCharacterImage($data, $character, $isMyo);
- if(!$image) throw new \Exception("Error happened while trying to create image.");
+ if (!$image) {
+ throw new \Exception('Error happened while trying to create image.');
+ }
// Update the character's image ID
$character->character_image_id = $image->id;
@@ -141,896 +155,519 @@ public function createCharacter($data, $user, $isMyo = false)
$this->createLog($user->id, null, $recipientId, $url, $character->id, $isMyo ? 'MYO Slot Created' : 'Character Created', 'Initial upload', 'user');
// Update the user's FTO status and character count
- if(is_object($recipient)) {
- if(!$isMyo) {
+ if (is_object($recipient)) {
+ if (!$isMyo) {
$recipient->settings->is_fto = 0; // MYO slots don't affect the FTO status - YMMV
}
$recipient->settings->save();
}
// If the recipient has an account, send them a notification
- if(is_object($recipient) && $user->id != $recipient->id) {
+ if (is_object($recipient) && $user->id != $recipient->id) {
Notifications::create($isMyo ? 'MYO_GRANT' : 'CHARACTER_UPLOAD', $recipient, [
'character_url' => $character->url,
- ] + ($isMyo ?
+ ] + (
+ $isMyo ?
['name' => $character->name] :
['character_slug' => $character->slug]
));
}
return $this->commitReturn($character);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
- * Handles character data.
+ * Creates a character log.
+ *
+ * @param int $senderId
+ * @param string $senderUrl
+ * @param int $recipientId
+ * @param string $recipientUrl
+ * @param int $characterId
+ * @param string $type
+ * @param string $data
+ * @param string $logType
+ * @param bool $isUpdate
+ * @param string $oldData
+ * @param string $newData
+ *
+ * @return bool
+ */
+ public function createLog($senderId, $senderUrl, $recipientId, $recipientUrl, $characterId, $type, $data, $logType, $isUpdate = false, $oldData = null, $newData = null) {
+ return DB::table($logType == 'character' ? 'character_log' : 'user_character_log')->insert(
+ [
+ 'sender_id' => $senderId,
+ 'sender_url' => $senderUrl,
+ 'recipient_id' => $recipientId,
+ 'recipient_url' => $recipientUrl,
+ 'character_id' => $characterId,
+ 'log' => $type.($data ? ' ('.$data.')' : ''),
+ 'log_type' => $type,
+ 'data' => $data,
+ 'created_at' => Carbon::now(),
+ 'updated_at' => Carbon::now(),
+ ] + ($logType == 'character' ?
+ [
+ 'change_log' => $isUpdate ? json_encode([
+ 'old' => $oldData,
+ 'new' => $newData,
+ ]) : null,
+ ] : [])
+ );
+ }
+
+ /**
+ * Creates a character image.
+ *
+ * @param array $data
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $user
*
- * @param array $data
- * @param bool $isMyo
* @return \App\Models\Character\Character|bool
*/
- private function handleCharacter($data, $isMyo = false)
- {
+ public function createImage($data, $character, $user) {
+ DB::beginTransaction();
+
try {
- if($isMyo)
- {
- $data['character_category_id'] = null;
- $data['number'] = null;
- $data['slug'] = null;
- $data['species_id'] = isset($data['species_id']) && $data['species_id'] ? $data['species_id'] : null;
- $data['subtype_id'] = isset($data['subtype_id']) && $data['subtype_id'] ? $data['subtype_id'] : null;
- $data['rarity_id'] = isset($data['rarity_id']) && $data['rarity_id'] ? $data['rarity_id'] : null;
+ if (!$character->is_myo_slot) {
+ if (!(isset($data['species_id']) && $data['species_id'])) {
+ throw new \Exception('Characters require a species.');
+ }
+ if (!(isset($data['rarity_id']) && $data['rarity_id'])) {
+ throw new \Exception('Characters require a rarity.');
+ }
+ }
+ if (isset($data['subtype_id']) && $data['subtype_id']) {
+ $subtype = Subtype::find($data['subtype_id']);
+ if (!(isset($data['species_id']) && $data['species_id'])) {
+ throw new \Exception('Species must be selected to select a subtype.');
+ }
+ if (!$subtype || $subtype->species_id != $data['species_id']) {
+ throw new \Exception('Selected subtype invalid or does not match species.');
+ }
+ } else {
+ $data['subtype_id'] = null;
}
- $characterData = Arr::only($data, [
- 'character_category_id', 'rarity_id', 'user_id',
- 'number', 'slug', 'description',
- 'sale_value', 'transferrable_at', 'is_visible'
- ]);
+ $data['is_visible'] = 1;
- $characterData['name'] = ($isMyo && isset($data['name'])) ? $data['name'] : null;
- $characterData['owner_url'] = isset($characterData['user_id']) ? null : $data['owner_url'];
- $characterData['is_sellable'] = isset($data['is_sellable']);
- $characterData['is_tradeable'] = isset($data['is_tradeable']);
- $characterData['is_giftable'] = isset($data['is_giftable']);
- $characterData['is_visible'] = isset($data['is_visible']);
- $characterData['sale_value'] = isset($data['sale_value']) ? $data['sale_value'] : 0;
- $characterData['is_gift_art_allowed'] = 0;
- $characterData['is_gift_writing_allowed'] = 0;
- $characterData['is_trading'] = 0;
- $characterData['parsed_description'] = parse($data['description']);
- if($isMyo) $characterData['is_myo_slot'] = 1;
+ // Create character image
+ $image = $this->handleCharacterImage($data, $character);
+ if (!$image) {
+ throw new \Exception('Error happened while trying to create image.');
+ }
- $character = Character::create($characterData);
+ // Update the character's image ID
+ $character->character_image_id = $image->id;
+ $character->save();
- // Create character profile row
- $character->profile()->create([]);
+ // Add a log for the character
+ // This logs all the updates made to the character
+ $this->createLog($user->id, null, $character->user_id, ($character->user_id ? null : $character->owner_url), $character->id, 'Character Image Uploaded', '[#'.$image->id.']', 'character');
- return $character;
- } catch(\Exception $e) {
+ // If the recipient has an account, send them a notification
+ if ($character->user && $user->id != $character->user_id && $character->is_visible) {
+ Notifications::create('IMAGE_UPLOAD', $character->user, [
+ 'character_url' => $character->url,
+ 'character_slug' => $character->slug,
+ 'character_name' => $character->name,
+ 'sender_url' => $user->url,
+ 'sender_name' => $user->name,
+ ]);
+ }
+
+ // Notify bookmarkers
+ $character->notifyBookmarkers('BOOKMARK_IMAGE');
+
+ return $this->commitReturn($character);
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return false;
+
+ return $this->rollbackReturn(false);
}
/**
- * Handles character image data.
+ * Updates a character image.
*
- * @param array $data
- * @return \App\Models\Character\Character $character
- * @param bool $isMyo
- * @return \App\Models\Character\CharacterImage|bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterImage $image
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- private function handleCharacterImage($data, $character, $isMyo = false)
- {
+ public function updateImageFeatures($data, $image, $user) {
+ DB::beginTransaction();
+
try {
- if($isMyo)
- {
- $data['species_id'] = (isset($data['species_id']) && $data['species_id']) ? $data['species_id'] : null;
- $data['subtype_id'] = isset($data['subtype_id']) && $data['subtype_id'] ? $data['subtype_id'] : null;
- $data['rarity_id'] = (isset($data['rarity_id']) && $data['rarity_id']) ? $data['rarity_id'] : null;
+ // Check that the subtype matches
+ if (isset($data['subtype_id']) && $data['subtype_id']) {
+ $subtype = Subtype::find($data['subtype_id']);
+ if (!(isset($data['species_id']) && $data['species_id'])) {
+ throw new \Exception('Species must be selected to select a subtype.');
+ }
+ if (!$subtype || $subtype->species_id != $data['species_id']) {
+ throw new \Exception('Selected subtype invalid or does not match species.');
+ }
+ }
+ // Log old features
+ $old = [];
+ $old['features'] = $this->generateFeatureList($image);
+ $old['species'] = $image->species_id ? $image->species->displayName : null;
+ $old['subtype'] = $image->subtype_id ? $image->subtype->displayName : null;
+ $old['rarity'] = $image->rarity_id ? $image->rarity->displayName : null;
- // Use default images for MYO slots without an image provided
- if(!isset($data['image']))
- {
- $data['image'] = asset('images/myo.png');
- $data['thumbnail'] = asset('images/myo-th.png');
- $data['extension'] = 'png';
- $data['default_image'] = true;
- unset($data['use_cropper']);
+ // Clear old features
+ $image->features()->delete();
+
+ // Attach features
+ foreach ($data['feature_id'] as $key => $featureId) {
+ if ($featureId) {
+ $feature = CharacterFeature::create(['character_image_id' => $image->id, 'feature_id' => $featureId, 'data' => $data['feature_data'][$key]]);
}
}
- $imageData = Arr::only($data, [
- 'species_id', 'subtype_id', 'rarity_id', 'use_cropper',
- 'x0', 'x1', 'y0', 'y1',
- ]);
- $imageData['use_cropper'] = isset($data['use_cropper']) ;
- $imageData['description'] = isset($data['image_description']) ? $data['image_description'] : null;
- $imageData['parsed_description'] = parse($imageData['description']);
- $imageData['hash'] = randomString(10);
- $imageData['fullsize_hash'] = randomString(15);
- $imageData['sort'] = 0;
- $imageData['is_valid'] = isset($data['is_valid']);
- $imageData['is_visible'] = isset($data['is_visible']);
- $imageData['extension'] = (Config::get('lorekeeper.settings.masterlist_image_format') ? Config::get('lorekeeper.settings.masterlist_image_format') : (isset($data['extension']) ? $data['extension'] : $data['image']->getClientOriginalExtension()));
- $imageData['character_id'] = $character->id;
- $image = CharacterImage::create($imageData);
+ // Update other stats
+ $image->species_id = $data['species_id'];
+ $image->subtype_id = $data['subtype_id'] ?: null;
+ $image->rarity_id = $data['rarity_id'];
+ $image->save();
+
+ $new = [];
+ $new['features'] = $this->generateFeatureList($image);
+ $new['species'] = $image->species_id ? $image->species->displayName : null;
+ $new['subtype'] = $image->subtype_id ? $image->subtype->displayName : null;
+ $new['rarity'] = $image->rarity_id ? $image->rarity->displayName : null;
+
+ // Character also keeps track of these features
+ $image->character->rarity_id = $image->rarity_id;
+ $image->character->save();
+
+ // Add a log for the character
+ // This logs all the updates made to the character
+ $this->createLog($user->id, null, null, null, $image->character_id, 'Traits Updated', '#'.$image->id, 'character', true, $old, $new);
+
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
+
+ /**
+ * Updates image data.
+ *
+ * @param array $data
+ * @param \App\Models\Character\CharacterImage $image
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
+ */
+ public function updateImageNotes($data, $image, $user) {
+ DB::beginTransaction();
+
+ try {
+ $old = $image->parsed_description;
+
+ // Update the image's notes
+ $image->description = $data['description'];
+ $image->parsed_description = parse($data['description']);
+ $image->save();
+
+ // Add a log for the character
+ // This logs all the updates made to the character
+ $this->createLog($user->id, null, null, null, $image->character_id, 'Image Notes Updated', '[#'.$image->id.']', 'character', true, $old, $image->parsed_description);
+
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
+
+ /**
+ * Updates image credits.
+ *
+ * @param array $data
+ * @param \App\Models\Character\CharacterImage $image
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
+ */
+ public function updateImageCredits($data, $image, $user) {
+ DB::beginTransaction();
+
+ try {
+ $old = $this->generateCredits($image);
+
+ // Clear old artists/designers
+ $image->creators()->delete();
// Check if entered url(s) have aliases associated with any on-site users
- foreach($data['designer_url'] as $key=>$url) {
+ foreach ($data['designer_url'] as $key=>$url) {
$recipient = checkAlias($url, false);
- if(is_object($recipient)) {
+ if (is_object($recipient)) {
$data['designer_id'][$key] = $recipient->id;
$data['designer_url'][$key] = null;
}
}
- foreach($data['artist_url'] as $key=>$url) {
+ foreach ($data['artist_url'] as $key=>$url) {
$recipient = checkAlias($url, false);
- if(is_object($recipient)) {
+ if (is_object($recipient)) {
$data['artist_id'][$key] = $recipient->id;
$data['artist_url'][$key] = null;
}
}
// Check that users with the specified id(s) exist on site
- foreach($data['designer_id'] as $id) {
- if(isset($id) && $id) {
+ foreach ($data['designer_id'] as $id) {
+ if (isset($id) && $id) {
$user = User::find($id);
- if(!$user) throw new \Exception('One or more designers is invalid.');
+ if (!$user) {
+ throw new \Exception('One or more designers is invalid.');
+ }
}
}
- foreach($data['artist_id'] as $id) {
- if(isset($id) && $id) {
+ foreach ($data['artist_id'] as $id) {
+ if (isset($id) && $id) {
$user = $user = User::find($id);
- if(!$user) throw new \Exception('One or more artists is invalid.');
+ if (!$user) {
+ throw new \Exception('One or more artists is invalid.');
+ }
}
}
// Attach artists/designers
- foreach($data['designer_id'] as $key => $id) {
- if($id || $data['designer_url'][$key])
+ foreach ($data['designer_id'] as $key => $id) {
+ if ($id || $data['designer_url'][$key]) {
DB::table('character_image_creators')->insert([
'character_image_id' => $image->id,
- 'type' => 'Designer',
- 'url' => $data['designer_url'][$key],
- 'user_id' => $id
+ 'type' => 'Designer',
+ 'url' => $data['designer_url'][$key],
+ 'user_id' => $id,
]);
+ }
}
- foreach($data['artist_id'] as $key => $id) {
- if($id || $data['artist_url'][$key])
+ foreach ($data['artist_id'] as $key => $id) {
+ if ($id || $data['artist_url'][$key]) {
DB::table('character_image_creators')->insert([
'character_image_id' => $image->id,
- 'type' => 'Artist',
- 'url' => $data['artist_url'][$key],
- 'user_id' => $id
+ 'type' => 'Artist',
+ 'url' => $data['artist_url'][$key],
+ 'user_id' => $id,
]);
+ }
}
- // Save image
- $this->handleImage($data['image'], $image->imageDirectory, $image->imageFileName, null, isset($data['default_image']));
+ // Add a log for the character
+ // This logs all the updates made to the character
+ $this->createLog($user->id, null, null, null, $image->character_id, 'Image Credits Updated', '[#'.$image->id.']', 'character', true, $old, $this->generateCredits($image));
- // Save thumbnail first before processing full image
- if(isset($data['use_cropper'])) $this->cropThumbnail(Arr::only($data, ['x0','x1','y0','y1']), $image, $isMyo);
- else $this->handleImage($data['thumbnail'], $image->imageDirectory, $image->thumbnailFileName, null, isset($data['default_image']));
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
- // Process and save the image itself
- if(!$isMyo) $this->processImage($image);
-
- // Attach features
- foreach($data['feature_id'] as $key => $featureId) {
- if($featureId) {
- $feature = CharacterFeature::create(['character_image_id' => $image->id, 'feature_id' => $featureId, 'data' => $data['feature_data'][$key]]);
- }
- }
-
- return $image;
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return false;
-
- }
+ return $this->rollbackReturn(false);
+ }
/**
- * Trims and optionally resizes and watermarks an image.
+ * Reuploads an image.
*
+ * @param array $data
+ * @param \App\Models\Character\CharacterImage $image
+ * @param \App\Models\User\User $user
*
- * @param \App\Models\Character\CharacterImage $characterImage
+ * @return bool
*/
- private function processImage($characterImage)
- {
- // Trim transparent parts of image.
- $image = Image::make($characterImage->imagePath . '/' . $characterImage->imageFileName)->trim('transparent');
+ public function reuploadImage($data, $image, $user) {
+ DB::beginTransaction();
- if (Config::get('lorekeeper.settings.masterlist_image_automation') == 1)
- {
- // Make the image be square
- $imageWidth = $image->width();
- $imageHeight = $image->height();
+ try {
+ if (Config::get('lorekeeper.settings.masterlist_image_format') != null) {
+ // Remove old versions so that images in various filetypes don't pile up
+ unlink($image->imagePath.'/'.$image->imageFileName);
+ if (isset($image->fullsize_hash) ? file_exists(public_path($image->imageDirectory.'/'.$image->fullsizeFileName)) : false) {
+ unlink($image->imagePath.'/'.$image->fullsizeFileName);
+ }
+ unlink($image->imagePath.'/'.$image->thumbnailFileName);
- if( $imageWidth > $imageHeight) {
- // Landscape
- $canvas = Image::canvas($image->width(), $image->width());
- $image = $canvas->insert($image, 'center');
- }
- else {
- // Portrait
- $canvas = Image::canvas($image->height(), $image->height());
- $image = $canvas->insert($image, 'center');
+ // Set the image's extension in the DB as defined in settings
+ $image->extension = Config::get('lorekeeper.settings.masterlist_image_format');
+ $image->save();
+ } else {
+ // Get uploaded image's extension and save it to the DB
+ $image->extension = $data['image']->getClientOriginalExtension();
+ $image->save();
}
- }
- if(Config::get('lorekeeper.settings.masterlist_image_format') != 'png' && Config::get('lorekeeper.settings.masterlist_image_format') != null && Config::get('lorekeeper.settings.masterlist_image_background') != null) {
- $canvas = Image::canvas($image->width(), $image->height(), Config::get('lorekeeper.settings.masterlist_image_background'));
- $image = $canvas->insert($image, 'center');
- }
+ // Save image
+ $this->handleImage($data['image'], $image->imageDirectory, $image->imageFileName);
- if(Config::get('lorekeeper.settings.store_masterlist_fullsizes') == 1) {
- // Generate fullsize hash if not already generated,
- // then save the full-sized image
- if(!$characterImage->fullsize_hash) {
- $characterImage->fullsize_hash = randomString(15);
- $characterImage->save();
+ $isMyo = $image->character->is_myo_slot ? true : false;
+ // Save thumbnail
+ if (isset($data['use_cropper'])) {
+ $this->cropThumbnail(Arr::only($data, ['x0', 'x1', 'y0', 'y1']), $image, $isMyo);
+ } else {
+ $this->handleImage($data['thumbnail'], $image->thumbnailPath, $image->thumbnailFileName);
}
- if(Config::get('lorekeeper.settings.masterlist_fullsizes_cap') != 0) {
- $imageWidth = $image->width();
- $imageHeight = $image->height();
-
- if( $imageWidth > $imageHeight) {
- // Landscape
- $image->resize(Config::get('lorekeeper.settings.masterlist_fullsizes_cap'), null, function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
- else {
- // Portrait
- $image->resize(null, Config::get('lorekeeper.settings.masterlist_fullsizes_cap'), function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
+ // Process and save the image itself
+ if (!$isMyo) {
+ $this->processImage($image);
}
- // Save the processed image
- $image->save($characterImage->imagePath . '/' . $characterImage->fullsizeFileName, 100, Config::get('lorekeeper.settings.masterlist_image_format'));
- }
- else {
- // Delete fullsize if it was previously created.
- if(isset($characterImage->fullsize_hash) ? file_exists( public_path($characterImage->imageDirectory.'/'.$characterImage->fullsizeFileName)) : FALSE) unlink($characterImage->imagePath . '/' . $characterImage->fullsizeFileName);
- }
-
- // Resize image if desired
- if(Config::get('lorekeeper.settings.masterlist_image_dimension') != 0) {
- $imageWidth = $image->width();
- $imageHeight = $image->height();
+ // Add a log for the character
+ // This logs all the updates made to the character
+ $this->createLog($user->id, null, null, null, $image->character_id, 'Image Reuploaded', '[#'.$image->id.']', 'character');
- if( $imageWidth > $imageHeight) {
- // Landscape
- $image->resize(null, Config::get('lorekeeper.settings.masterlist_image_dimension'), function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
- else {
- // Portrait
- $image->resize(Config::get('lorekeeper.settings.masterlist_image_dimension'), null, function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
- }
- // Watermark the image if desired
- if(Config::get('lorekeeper.settings.watermark_masterlist_images') == 1) {
- $watermark = Image::make('images/watermark.png');
- $image->insert($watermark, 'center');
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
}
- // Save the processed image
- $image->save($characterImage->imagePath . '/' . $characterImage->imageFileName, 100, Config::get('lorekeeper.settings.masterlist_image_format'));
+ return $this->rollbackReturn(false);
}
/**
- * Crops a thumbnail for the given image.
+ * Deletes an image.
+ *
+ * @param \App\Models\Character\CharacterImage $image
+ * @param \App\Models\User\User $user
*
- * @param array $points
- * @param \App\Models\Character\CharacterImage $characterImage
+ * @return bool
*/
- private function cropThumbnail($points, $characterImage, $isMyo = false)
- {
- $image = Image::make($characterImage->imagePath . '/' . $characterImage->imageFileName);
+ public function deleteImage($image, $user) {
+ DB::beginTransaction();
- if(Config::get('lorekeeper.settings.masterlist_image_format') != 'png' && Config::get('lorekeeper.settings.masterlist_image_format') != null && Config::get('lorekeeper.settings.masterlist_image_background') != null) {
- $canvas = Image::canvas($image->width(), $image->height(), Config::get('lorekeeper.settings.masterlist_image_background'));
- $image = $canvas->insert($image, 'center');
- $trimColor = TRUE;
- }
+ try {
+ if ($image->character->character_image_id == $image->id) {
+ throw new \Exception("Cannot delete a character's active image.");
+ }
- if(Config::get('lorekeeper.settings.watermark_masterlist_thumbnails') == 1 && !$isMyo) {
- // Trim transparent parts of image.
- $image->trim(isset($trimColor) && $trimColor ? 'top-left' : 'transparent');
+ $image->features()->delete();
- if (Config::get('lorekeeper.settings.masterlist_image_automation') == 1)
- {
- // Make the image be square
- $imageWidth = $image->width();
- $imageHeight = $image->height();
+ $image->delete();
- if( $imageWidth > $imageHeight) {
- // Landscape
- $canvas = Image::canvas($image->width(), $image->width());
- $image = $canvas->insert($image, 'center');
- }
- else {
- // Portrait
- $canvas = Image::canvas($image->height(), $image->height());
- $image = $canvas->insert($image, 'center');
- }
+ // Delete the image files
+ unlink($image->imagePath.'/'.$image->imageFileName);
+ if (isset($image->fullsize_hash) ? file_exists(public_path($image->imageDirectory.'/'.$image->fullsizeFileName)) : false) {
+ unlink($image->imagePath.'/'.$image->fullsizeFileName);
}
+ unlink($image->imagePath.'/'.$image->thumbnailFileName);
- $cropWidth = Config::get('lorekeeper.settings.masterlist_thumbnails.width');
- $cropHeight = Config::get('lorekeeper.settings.masterlist_thumbnails.height');
-
- $imageWidthOld = $image->width();
- $imageHeightOld = $image->height();
+ // Add a log for the character
+ // This logs all the updates made to the character
+ $this->createLog($user->id, null, null, null, $image->character_id, 'Image Deleted', '[#'.$image->id.']', 'character');
- $trimOffsetX = $imageWidthOld - $image->width();
- $trimOffsetY = $imageHeightOld - $image->height();
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
- if(Config::get('lorekeeper.settings.watermark_masterlist_images') == 1) {
- // Resize image if desired, so that the watermark is applied to the correct size of image
- if(Config::get('lorekeeper.settings.masterlist_image_dimension') != 0) {
- $imageWidth = $image->width();
- $imageHeight = $image->height();
+ return $this->rollbackReturn(false);
+ }
- if( $imageWidth > $imageHeight) {
- // Landscape
- $image->resize(null, Config::get('lorekeeper.settings.masterlist_image_dimension'), function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
- else {
- // Portrait
- $image->resize(Config::get('lorekeeper.settings.masterlist_image_dimension'), null, function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
- }
- // Watermark the image
- $watermark = Image::make('images/watermark.png');
- $image->insert($watermark, 'center');
- }
- // Now shrink the image
- {
- $imageWidth = $image->width();
- $imageHeight = $image->height();
+ /**
+ * Updates image settings.
+ *
+ * @param array $data
+ * @param \App\Models\Character\CharacterImage $image
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
+ */
+ public function updateImageSettings($data, $image, $user) {
+ DB::beginTransaction();
- if( $imageWidth > $imageHeight) {
- // Landscape
- $image->resize(null, $cropWidth, function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
- else {
- // Portrait
- $image->resize($cropHeight, null, function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
- }
+ try {
+ if ($image->character->character_image_id == $image->id && !isset($data['is_visible'])) {
+ throw new \Exception("Cannot hide a character's active image.");
}
- if (Config::get('lorekeeper.settings.masterlist_image_automation') == 0)
- {
- $xOffset = 0 + (($points['x0'] - $trimOffsetX) > 0 ? ($points['x0'] - $trimOffsetX) : 0);
- if(($xOffset + $cropWidth) > $image->width()) $xOffsetNew = $cropWidth - ($image->width() - $xOffset);
- if(isset($xOffsetNew)) if(($xOffsetNew + $cropWidth) > $image->width()) $xOffsetNew = $image->width() - $cropWidth;
- $yOffset = 0 + (($points['y0'] - $trimOffsetY) > 0 ? ($points['y0'] - $trimOffsetY) : 0);
- if(($yOffset + $cropHeight) > $image->height()) $yOffsetNew = $cropHeight - ($image->height() - $yOffset);
- if(isset($yOffsetNew)) if(($yOffsetNew + $cropHeight) > $image->height()) $yOffsetNew = $image->height() - $cropHeight;
- // Crop according to the selected area
- $image->crop($cropWidth, $cropHeight, isset($xOffsetNew) ? $xOffsetNew : $xOffset, isset($yOffsetNew) ? $yOffsetNew : $yOffset);
- }
- }
- else {
- $cropWidth = $points['x1'] - $points['x0'];
- $cropHeight = $points['y1'] - $points['y0'];
+ $image->is_valid = isset($data['is_valid']);
+ $image->is_visible = isset($data['is_visible']);
+ $image->save();
- if (Config::get('lorekeeper.settings.masterlist_image_automation') == 0)
- {
- // Crop according to the selected area
- $image->crop($cropWidth, $cropHeight, $points['x0'], $points['y0']);
- }
+ // Add a log for the character
+ // This logs all the updates made to the character
+ $this->createLog($user->id, null, null, null, $image->character_id, 'Image Visibility/Validity Updated', '[#'.$image->id.']', 'character');
- // Resize to fit the thumbnail size
- $image->resize(Config::get('lorekeeper.settings.masterlist_thumbnails.width'), Config::get('lorekeeper.settings.masterlist_thumbnails.height'));
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
}
- // Save the thumbnail
- $image->save($characterImage->thumbnailPath . '/' . $characterImage->thumbnailFileName, 100, Config::get('lorekeeper.settings.masterlist_image_format'));
+ return $this->rollbackReturn(false);
}
/**
- * Creates a character log.
+ * Updates a character's active image.
*
- * @param int $senderId
- * @param string $senderUrl
- * @param int $recipientId
- * @param string $recipientUrl
- * @param int $characterId
- * @param string $type
- * @param string $data
- * @param string $logType
- * @param bool $isUpdate
- * @param string $oldData
- * @param string $newData
- * @return bool
- */
- public function createLog($senderId, $senderUrl, $recipientId, $recipientUrl, $characterId, $type, $data, $logType, $isUpdate = false, $oldData = null, $newData = null)
- {
- return DB::table($logType == 'character' ? 'character_log' : 'user_character_log')->insert(
- [
- 'sender_id' => $senderId,
- 'sender_url' => $senderUrl,
- 'recipient_id' => $recipientId,
- 'recipient_url' => $recipientUrl,
- 'character_id' => $characterId,
- 'log' => $type . ($data ? ' (' . $data . ')' : ''),
- 'log_type' => $type,
- 'data' => $data,
- 'created_at' => Carbon::now(),
- 'updated_at' => Carbon::now()
- ] + ($logType == 'character' ?
- [
- 'change_log' => $isUpdate ? json_encode([
- 'old' => $oldData,
- 'new' => $newData
- ]) : null
- ] : [])
- );
- }
-
- /**
- * Creates a character image.
+ * @param \App\Models\Character\CharacterImage $image
+ * @param \App\Models\User\User $user
*
- * @param array $data
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $user
- * @return \App\Models\Character\Character|bool
+ * @return bool
*/
- public function createImage($data, $character, $user)
- {
+ public function updateActiveImage($image, $user) {
DB::beginTransaction();
try {
- if(!$character->is_myo_slot)
- {
- if(!(isset($data['species_id']) && $data['species_id'])) throw new \Exception('Characters require a species.');
- if(!(isset($data['rarity_id']) && $data['rarity_id'])) throw new \Exception('Characters require a rarity.');
+ if ($image->character->character_image_id == $image->id) {
+ return true;
}
- if(isset($data['subtype_id']) && $data['subtype_id'])
- {
- $subtype = Subtype::find($data['subtype_id']);
- if(!(isset($data['species_id']) && $data['species_id'])) throw new \Exception('Species must be selected to select a subtype.');
- if(!$subtype || $subtype->species_id != $data['species_id']) throw new \Exception('Selected subtype invalid or does not match species.');
+ if (!$image->is_visible) {
+ throw new \Exception("Cannot set a non-visible image as the character's active image.");
}
- else $data['subtype_id'] = null;
-
- $data['is_visible'] = 1;
-
- // Create character image
- $image = $this->handleCharacterImage($data, $character);
- if(!$image) throw new \Exception("Error happened while trying to create image.");
- // Update the character's image ID
- $character->character_image_id = $image->id;
- $character->save();
+ $image->character->character_image_id = $image->id;
+ $image->character->save();
// Add a log for the character
// This logs all the updates made to the character
- $this->createLog($user->id, null, $character->user_id, ($character->user_id ? null : $character->owner_url), $character->id, 'Character Image Uploaded', '[#'.$image->id.']', 'character');
-
- // If the recipient has an account, send them a notification
- if($character->user && $user->id != $character->user_id && $character->is_visible) {
- Notifications::create('IMAGE_UPLOAD', $character->user, [
- 'character_url' => $character->url,
- 'character_slug' => $character->slug,
- 'character_name' => $character->name,
- 'sender_url' => $user->url,
- 'sender_name' => $user->name
- ]);
- }
-
- // Notify bookmarkers
- $character->notifyBookmarkers('BOOKMARK_IMAGE');
+ $this->createLog($user->id, null, null, null, $image->character_id, 'Active Image Updated', '[#'.$image->id.']', 'character');
- return $this->commitReturn($character);
- } catch(\Exception $e) {
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
- * Updates a character image.
+ * Sorts a character's images.
*
- * @param array $data
- * @param \App\Models\Character\CharacterImage $image
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\User\User $user
+ * @param mixed $character
+ *
+ * @return bool
*/
- public function updateImageFeatures($data, $image, $user)
- {
+ public function sortImages($data, $character, $user) {
DB::beginTransaction();
try {
- // Check that the subtype matches
- if(isset($data['subtype_id']) && $data['subtype_id'])
- {
- $subtype = Subtype::find($data['subtype_id']);
- if(!(isset($data['species_id']) && $data['species_id'])) throw new \Exception('Species must be selected to select a subtype.');
- if(!$subtype || $subtype->species_id != $data['species_id']) throw new \Exception('Selected subtype invalid or does not match species.');
+ $ids = explode(',', $data['sort']);
+ $images = CharacterImage::whereIn('id', $ids)->where('character_id', $character->id)->orderByRaw(DB::raw('FIELD(id, '.implode(',', $ids).')'))->get();
+
+ if (count($images) != count($ids)) {
+ throw new \Exception('Invalid image included in sorting order.');
+ }
+ if (!$images->first()->is_visible) {
+ throw new \Exception("Cannot set a non-visible image as the character's active image.");
}
- // Log old features
- $old = [];
- $old['features'] = $this->generateFeatureList($image);
- $old['species'] = $image->species_id ? $image->species->displayName : null;
- $old['subtype'] = $image->subtype_id ? $image->subtype->displayName : null;
- $old['rarity'] = $image->rarity_id ? $image->rarity->displayName : null;
-
- // Clear old features
- $image->features()->delete();
-
- // Attach features
- foreach($data['feature_id'] as $key => $featureId) {
- if($featureId) {
- $feature = CharacterFeature::create(['character_image_id' => $image->id, 'feature_id' => $featureId, 'data' => $data['feature_data'][$key]]);
- }
- }
-
- // Update other stats
- $image->species_id = $data['species_id'];
- $image->subtype_id = $data['subtype_id'] ?: null;
- $image->rarity_id = $data['rarity_id'];
- $image->save();
-
- $new = [];
- $new['features'] = $this->generateFeatureList($image);
- $new['species'] = $image->species_id ? $image->species->displayName : null;
- $new['subtype'] = $image->subtype_id ? $image->subtype->displayName : null;
- $new['rarity'] = $image->rarity_id ? $image->rarity->displayName : null;
-
- // Character also keeps track of these features
- $image->character->rarity_id = $image->rarity_id;
- $image->character->save();
-
- // Add a log for the character
- // This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $image->character_id, 'Traits Updated', '#'.$image->id, 'character', true, $old, $new);
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Generates a list of features for displaying.
- *
- * @param \App\Models\Character\CharacterImage $image
- * @return string
- */
- private function generateFeatureList($image)
- {
- $result = '';
- foreach($image->features as $feature)
- $result .= '' . ($feature->feature->category ? '' . $feature->feature->category->displayName . ': ' : '') . $feature->feature->displayName . '
';
- return $result;
- }
-
- /**
- * Updates image data.
- *
- * @param array $data
- * @param \App\Models\Character\CharacterImage $image
- * @param \App\Models\User\User $user
- * @return bool
- */
- public function updateImageNotes($data, $image, $user)
- {
- DB::beginTransaction();
-
- try {
- $old = $image->parsed_description;
-
- // Update the image's notes
- $image->description = $data['description'];
- $image->parsed_description = parse($data['description']);
- $image->save();
-
- // Add a log for the character
- // This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $image->character_id, 'Image Notes Updated', '[#'.$image->id.']', 'character', true, $old, $image->parsed_description);
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Updates image credits.
- *
- * @param array $data
- * @param \App\Models\Character\CharacterImage $image
- * @param \App\Models\User\User $user
- * @return bool
- */
- public function updateImageCredits($data, $image, $user)
- {
- DB::beginTransaction();
-
- try {
- $old = $this->generateCredits($image);
-
- // Clear old artists/designers
- $image->creators()->delete();
-
- // Check if entered url(s) have aliases associated with any on-site users
- foreach($data['designer_url'] as $key=>$url) {
- $recipient = checkAlias($url, false);
- if(is_object($recipient)) {
- $data['designer_id'][$key] = $recipient->id;
- $data['designer_url'][$key] = null;
- }
- }
- foreach($data['artist_url'] as $key=>$url) {
- $recipient = checkAlias($url, false);
- if(is_object($recipient)) {
- $data['artist_id'][$key] = $recipient->id;
- $data['artist_url'][$key] = null;
- }
- }
-
- // Check that users with the specified id(s) exist on site
- foreach($data['designer_id'] as $id) {
- if(isset($id) && $id) {
- $user = User::find($id);
- if(!$user) throw new \Exception('One or more designers is invalid.');
- }
- }
- foreach($data['artist_id'] as $id) {
- if(isset($id) && $id) {
- $user = $user = User::find($id);
- if(!$user) throw new \Exception('One or more artists is invalid.');
- }
- }
-
- // Attach artists/designers
- foreach($data['designer_id'] as $key => $id) {
- if($id || $data['designer_url'][$key])
- DB::table('character_image_creators')->insert([
- 'character_image_id' => $image->id,
- 'type' => 'Designer',
- 'url' => $data['designer_url'][$key],
- 'user_id' => $id
- ]);
- }
- foreach($data['artist_id'] as $key => $id) {
- if($id || $data['artist_url'][$key])
- DB::table('character_image_creators')->insert([
- 'character_image_id' => $image->id,
- 'type' => 'Artist',
- 'url' => $data['artist_url'][$key],
- 'user_id' => $id
- ]);
- }
-
- // Add a log for the character
- // This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $image->character_id, 'Image Credits Updated', '[#'.$image->id.']', 'character', true, $old, $this->generateCredits($image));
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Generates a list of image credits for displaying.
- *
- * @param \App\Models\Character\CharacterImage $image
- * @return string
- */
- private function generateCredits($image)
- {
- $result = ['designers' => '', 'artists' => ''];
- foreach($image->designers as $designer)
- $result['designers'] .= '' . $designer->displayLink() . '
';
- foreach($image->artists as $artist)
- $result['artists'] .= '' . $artist->displayLink() . '
';
- return $result;
- }
-
- /**
- * Reuploads an image.
- *
- * @param array $data
- * @param \App\Models\Character\CharacterImage $image
- * @param \App\Models\User\User $user
- * @return bool
- */
- public function reuploadImage($data, $image, $user)
- {
- DB::beginTransaction();
-
- try {
- if(Config::get('lorekeeper.settings.masterlist_image_format') != null) {
- // Remove old versions so that images in various filetypes don't pile up
- unlink($image->imagePath . '/' . $image->imageFileName);
- if(isset($image->fullsize_hash) ? file_exists( public_path($image->imageDirectory.'/'.$image->fullsizeFileName)) : FALSE) unlink($image->imagePath . '/' . $image->fullsizeFileName);
- unlink($image->imagePath . '/' . $image->thumbnailFileName);
-
- // Set the image's extension in the DB as defined in settings
- $image->extension = Config::get('lorekeeper.settings.masterlist_image_format');
- $image->save();
- }
- else {
- // Get uploaded image's extension and save it to the DB
- $image->extension = $data['image']->getClientOriginalExtension();
- $image->save();
- }
-
- // Save image
- $this->handleImage($data['image'], $image->imageDirectory, $image->imageFileName);
-
- $isMyo = $image->character->is_myo_slot ? true : false;
- // Save thumbnail
- if(isset($data['use_cropper'])) $this->cropThumbnail(Arr::only($data, ['x0','x1','y0','y1']), $image, $isMyo);
- else $this->handleImage($data['thumbnail'], $image->thumbnailPath, $image->thumbnailFileName);
-
- // Process and save the image itself
- if(!$isMyo) $this->processImage($image);
-
- // Add a log for the character
- // This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $image->character_id, 'Image Reuploaded', '[#'.$image->id.']', 'character');
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Deletes an image.
- *
- * @param \App\Models\Character\CharacterImage $image
- * @param \App\Models\User\User $user
- * @return bool
- */
- public function deleteImage($image, $user)
- {
- DB::beginTransaction();
-
- try {
- if($image->character->character_image_id == $image->id) throw new \Exception("Cannot delete a character's active image.");
-
- $image->features()->delete();
-
- $image->delete();
-
- // Delete the image files
- unlink($image->imagePath . '/' . $image->imageFileName);
- if(isset($image->fullsize_hash) ? file_exists( public_path($image->imageDirectory.'/'.$image->fullsizeFileName)) : FALSE) unlink($image->imagePath . '/' . $image->fullsizeFileName);
- unlink($image->imagePath . '/' . $image->thumbnailFileName);
-
- // Add a log for the character
- // This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $image->character_id, 'Image Deleted', '[#'.$image->id.']', 'character');
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Updates image settings.
- *
- * @param array $data
- * @param \App\Models\Character\CharacterImage $image
- * @param \App\Models\User\User $user
- * @return bool
- */
- public function updateImageSettings($data, $image, $user)
- {
- DB::beginTransaction();
-
- try {
- if($image->character->character_image_id == $image->id && !isset($data['is_visible'])) throw new \Exception("Cannot hide a character's active image.");
-
- $image->is_valid = isset($data['is_valid']);
- $image->is_visible = isset($data['is_visible']);
- $image->save();
-
- // Add a log for the character
- // This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $image->character_id, 'Image Visibility/Validity Updated', '[#'.$image->id.']', 'character');
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Updates a character's active image.
- *
- * @param \App\Models\Character\CharacterImage $image
- * @param \App\Models\User\User $user
- * @return bool
- */
- public function updateActiveImage($image, $user)
- {
- DB::beginTransaction();
-
- try {
- if($image->character->character_image_id == $image->id) return true;
- if(!$image->is_visible) throw new \Exception("Cannot set a non-visible image as the character's active image.");
-
- $image->character->character_image_id = $image->id;
- $image->character->save();
-
- // Add a log for the character
- // This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $image->character_id, 'Active Image Updated', '[#'.$image->id.']', 'character');
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Sorts a character's images
- *
- * @param array $data
- * @param \App\Models\Character\Character $image
- * @param \App\Models\User\User $user
- * @return bool
- */
- public function sortImages($data, $character, $user)
- {
- DB::beginTransaction();
-
- try {
- $ids = explode(',', $data['sort']);
- $images = CharacterImage::whereIn('id', $ids)->where('character_id', $character->id)->orderByRaw(DB::raw('FIELD(id, '.implode(',', $ids).')'))->get();
-
- if(count($images) != count($ids)) throw new \Exception("Invalid image included in sorting order.");
- if(!$images->first()->is_visible) throw new \Exception("Cannot set a non-visible image as the character's active image.");
-
$count = 0;
- foreach($images as $image)
- {
+ foreach ($images as $image) {
//if($count == 1)
//{
// // Set the first one as the active image
@@ -1047,58 +684,63 @@ public function sortImages($data, $character, $user)
$this->createLog($user->id, null, null, null, $image->character_id, 'Image Order Updated', '', 'character');
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts a user's characters.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function sortCharacters($data, $user)
- {
+ public function sortCharacters($data, $user) {
DB::beginTransaction();
try {
$ids = array_reverse(explode(',', $data['sort']));
$characters = Character::myo(0)->whereIn('id', $ids)->where('user_id', $user->id)->where('is_visible', 1)->orderByRaw(DB::raw('FIELD(id, '.implode(',', $ids).')'))->get();
- if(count($characters) != count($ids)) throw new \Exception("Invalid character included in sorting order.");
+ if (count($characters) != count($ids)) {
+ throw new \Exception('Invalid character included in sorting order.');
+ }
$count = 0;
- foreach($characters as $character)
- {
+ foreach ($characters as $character) {
$character->sort = $count;
$character->save();
$count++;
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a character's stats.
*
- * @param array $data
- * @param \App\Models\Character\Character $image
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\User\User $user
+ * @param mixed $character
+ *
+ * @return bool
*/
- public function updateCharacterStats($data, $character, $user)
- {
+ public function updateCharacterStats($data, $character, $user) {
DB::beginTransaction();
try {
- if(!$character->is_myo_slot && Character::where('slug', $data['slug'])->where('id', '!=', $character->id)->exists()) throw new \Exception("Character code must be unique.");
+ if (!$character->is_myo_slot && Character::where('slug', $data['slug'])->where('id', '!=', $character->id)->exists()) {
+ throw new \Exception('Character code must be unique.');
+ }
$characterData = Arr::only($data, [
'character_category_id',
@@ -1107,90 +749,91 @@ public function updateCharacterStats($data, $character, $user)
$characterData['is_sellable'] = isset($data['is_sellable']);
$characterData['is_tradeable'] = isset($data['is_tradeable']);
$characterData['is_giftable'] = isset($data['is_giftable']);
- $characterData['sale_value'] = isset($data['sale_value']) ? $data['sale_value'] : 0;
- $characterData['transferrable_at'] = isset($data['transferrable_at']) ? $data['transferrable_at'] : null;
- if($character->is_myo_slot) $characterData['name'] = (isset($data['name']) && $data['name']) ? $data['name'] : null;
+ $characterData['sale_value'] = $data['sale_value'] ?? 0;
+ $characterData['transferrable_at'] = $data['transferrable_at'] ?? null;
+ if ($character->is_myo_slot) {
+ $characterData['name'] = (isset($data['name']) && $data['name']) ? $data['name'] : null;
+ }
// Needs to be cleaned up
$result = [];
$old = [];
$new = [];
- if(!$character->is_myo_slot) {
- if($characterData['character_category_id'] != $character->character_category_id) {
+ if (!$character->is_myo_slot) {
+ if ($characterData['character_category_id'] != $character->character_category_id) {
$result[] = 'character category';
$old['character_category'] = $character->category->displayName;
$new['character_category'] = CharacterCategory::find($characterData['character_category_id'])->displayName;
}
- if($characterData['number'] != $character->number) {
+ if ($characterData['number'] != $character->number) {
$result[] = 'character number';
$old['number'] = $character->number;
$new['number'] = $characterData['number'];
}
- if($characterData['slug'] != $character->number) {
+ if ($characterData['slug'] != $character->number) {
$result[] = 'character code';
$old['slug'] = $character->slug;
$new['slug'] = $characterData['slug'];
}
- }
- else {
- if($characterData['name'] != $character->name) {
+ } else {
+ if ($characterData['name'] != $character->name) {
$result[] = 'name';
$old['name'] = $character->name;
$new['name'] = $characterData['name'];
}
}
- if($characterData['is_sellable'] != $character->is_sellable) {
+ if ($characterData['is_sellable'] != $character->is_sellable) {
$result[] = 'sellable status';
$old['is_sellable'] = $character->is_sellable;
$new['is_sellable'] = $characterData['is_sellable'];
}
- if($characterData['is_tradeable'] != $character->is_tradeable) {
+ if ($characterData['is_tradeable'] != $character->is_tradeable) {
$result[] = 'tradeable status';
$old['is_tradeable'] = $character->is_tradeable;
$new['is_tradeable'] = $characterData['is_tradeable'];
}
- if($characterData['is_giftable'] != $character->is_giftable) {
+ if ($characterData['is_giftable'] != $character->is_giftable) {
$result[] = 'giftable status';
$old['is_giftable'] = $character->is_giftable;
$new['is_giftable'] = $characterData['is_giftable'];
}
- if($characterData['sale_value'] != $character->sale_value) {
+ if ($characterData['sale_value'] != $character->sale_value) {
$result[] = 'sale value';
$old['sale_value'] = $character->sale_value;
$new['sale_value'] = $characterData['sale_value'];
}
- if($characterData['transferrable_at'] != $character->transferrable_at) {
+ if ($characterData['transferrable_at'] != $character->transferrable_at) {
$result[] = 'transfer cooldown';
$old['transferrable_at'] = $character->transferrable_at;
$new['transferrable_at'] = $characterData['transferrable_at'];
}
- if(count($result))
- {
+ if (count($result)) {
$character->update($characterData);
// Add a log for the character
// This logs all the updates made to the character
- $this->createLog($user->id, null, null, null, $character->id, 'Character Updated', ucfirst(implode(', ', $result)) . ' edited', 'character', true, $old, $new);
+ $this->createLog($user->id, null, null, null, $character->id, 'Character Updated', ucfirst(implode(', ', $result)).' edited', 'character', true, $old, $new);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a character's description.
*
- * @param array $data
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function updateCharacterDescription($data, $character, $user)
- {
+ public function updateCharacterDescription($data, $character, $user) {
DB::beginTransaction();
try {
@@ -1206,22 +849,23 @@ public function updateCharacterDescription($data, $character, $user)
$this->createLog($user->id, null, null, null, $character->id, 'Character Description Updated', '', 'character', true, $old, $character->parsed_description);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a character's settings.
*
- * @param array $data
- * @param \App\Models\Character\Character $image
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\User\User $user
+ * @param mixed $character
+ *
+ * @return bool
*/
- public function updateCharacterSettings($data, $character, $user)
- {
+ public function updateCharacterSettings($data, $character, $user) {
DB::beginTransaction();
try {
@@ -1235,23 +879,24 @@ public function updateCharacterSettings($data, $character, $user)
$this->createLog($user->id, null, null, null, $character->id, 'Character Visibility Updated', '', 'character', true, $old, ['is_visible' => $character->is_visible]);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a character's profile.
*
- * @param array $data
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $user
- * @param bool $isAdmin
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $user
+ * @param bool $isAdmin
+ *
+ * @return bool
*/
- public function updateCharacterProfile($data, $character, $user, $isAdmin = false)
- {
+ public function updateCharacterProfile($data, $character, $user, $isAdmin = false) {
DB::beginTransaction();
try {
@@ -1261,13 +906,20 @@ public function updateCharacterProfile($data, $character, $user, $isAdmin = fals
// Allow updating the gift art/trading options if the editing
// user owns the character
- if(!$isAdmin)
- {
- if($character->user_id != $user->id) throw new \Exception("You cannot edit this character.");
+ if (!$isAdmin) {
+ if ($character->user_id != $user->id) {
+ throw new \Exception('You cannot edit this character.');
+ }
- if($character->is_trading != isset($data['is_trading'])) $notifyTrading = true;
- if(isset($data['is_gift_art_allowed']) && $character->is_gift_art_allowed != $data['is_gift_art_allowed']) $notifyGiftArt = true;
- if(isset($data['is_gift_writing_allowed']) && $character->is_gift_writing_allowed != $data['is_gift_writing_allowed']) $notifyGiftWriting = true;
+ if ($character->is_trading != isset($data['is_trading'])) {
+ $notifyTrading = true;
+ }
+ if (isset($data['is_gift_art_allowed']) && $character->is_gift_art_allowed != $data['is_gift_art_allowed']) {
+ $notifyGiftArt = true;
+ }
+ if (isset($data['is_gift_writing_allowed']) && $character->is_gift_writing_allowed != $data['is_gift_writing_allowed']) {
+ $notifyGiftWriting = true;
+ }
$character->is_gift_art_allowed = isset($data['is_gift_art_allowed']) && $data['is_gift_art_allowed'] <= 2 ? $data['is_gift_art_allowed'] : 0;
$character->is_gift_writing_allowed = isset($data['is_gift_writing_allowed']) && $data['is_gift_writing_allowed'] <= 2 ? $data['is_gift_writing_allowed'] : 0;
@@ -1276,59 +928,69 @@ public function updateCharacterProfile($data, $character, $user, $isAdmin = fals
}
// Update the character's profile
- if(!$character->is_myo_slot) $character->name = $data['name'];
+ if (!$character->is_myo_slot) {
+ $character->name = $data['name'];
+ }
$character->save();
- if(!$character->is_myo_slot && Config::get('lorekeeper.extensions.character_TH_profile_link')) $character->profile->link = $data['link'];
+ if (!$character->is_myo_slot && Config::get('lorekeeper.extensions.character_TH_profile_link')) {
+ $character->profile->link = $data['link'];
+ }
$character->profile->save();
$character->profile->text = $data['text'];
$character->profile->parsed_text = parse($data['text']);
$character->profile->save();
- if($isAdmin && isset($data['alert_user']) && $character->is_visible && $character->user_id)
- {
+ if ($isAdmin && isset($data['alert_user']) && $character->is_visible && $character->user_id) {
Notifications::create('CHARACTER_PROFILE_EDIT', $character->user, [
'character_name' => $character->name,
'character_slug' => $character->slug,
- 'sender_url' => $user->url,
- 'sender_name' => $user->name
+ 'sender_url' => $user->url,
+ 'sender_name' => $user->name,
]);
}
- if($notifyTrading) $character->notifyBookmarkers('BOOKMARK_TRADING');
- if($notifyGiftArt) $character->notifyBookmarkers('BOOKMARK_GIFTS');
- if($notifyGiftWriting) $character->notifyBookmarkers('BOOKMARK_GIFT_WRITING');
+ if ($notifyTrading) {
+ $character->notifyBookmarkers('BOOKMARK_TRADING');
+ }
+ if ($notifyGiftArt) {
+ $character->notifyBookmarkers('BOOKMARK_GIFTS');
+ }
+ if ($notifyGiftWriting) {
+ $character->notifyBookmarkers('BOOKMARK_GIFT_WRITING');
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes a character.
*
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $user
- * @return bool
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function deleteCharacter($character, $user)
- {
+ public function deleteCharacter($character, $user) {
DB::beginTransaction();
try {
- if($character->user_id) {
+ if ($character->user_id) {
$character->user->settings->save();
- }
+ }
// Delete associated bookmarks
CharacterBookmark::where('character_id', $character->id)->delete();
// Delete associated features and images
// Images use soft deletes
- foreach($character->images as $image) {
+ foreach ($character->images as $image) {
$image->features()->delete();
$image->delete();
}
@@ -1345,159 +1007,183 @@ public function deleteCharacter($character, $user)
$character->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Creates a character transfer.
*
- * @param array $data
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function createTransfer($data, $character, $user)
- {
+ public function createTransfer($data, $character, $user) {
DB::beginTransaction();
try {
- if($user->id != $character->user_id) throw new \Exception("You do not own this character.");
- if(!$character->is_sellable && !$character->is_tradeable && !$character->is_giftable) throw new \Exception("This character is not transferrable.");
- if($character->transferrable_at && $character->transferrable_at->isFuture()) throw new \Exception("This character is still on transfer cooldown and cannot be transferred.");
- if(CharacterTransfer::active()->where('character_id', $character->id)->exists()) throw new \Exception("This character is in an active transfer.");
- if($character->trade_id) throw new \Exception("This character is in an active trade.");
+ if ($user->id != $character->user_id) {
+ throw new \Exception('You do not own this character.');
+ }
+ if (!$character->is_sellable && !$character->is_tradeable && !$character->is_giftable) {
+ throw new \Exception('This character is not transferrable.');
+ }
+ if ($character->transferrable_at && $character->transferrable_at->isFuture()) {
+ throw new \Exception('This character is still on transfer cooldown and cannot be transferred.');
+ }
+ if (CharacterTransfer::active()->where('character_id', $character->id)->exists()) {
+ throw new \Exception('This character is in an active transfer.');
+ }
+ if ($character->trade_id) {
+ throw new \Exception('This character is in an active trade.');
+ }
$recipient = User::find($data['recipient_id']);
- if(!$recipient) throw new \Exception("Invalid user selected.");
- if($recipient->is_banned) throw new \Exception("Cannot transfer character to a banned member.");
+ if (!$recipient) {
+ throw new \Exception('Invalid user selected.');
+ }
+ if ($recipient->is_banned) {
+ throw new \Exception('Cannot transfer character to a banned member.');
+ }
// deletes any pending design drafts
- foreach($character->designUpdate as $update)
- {
- if($update->status == 'Draft')
- {
- if(!$this->rejectRequest('Cancelled by '.$user->displayName.' in order to transfer character to another user', $update, $user, true, false)) throw new \Exception('Could not cancel pending request.');
+ foreach ($character->designUpdate as $update) {
+ if ($update->status == 'Draft') {
+ if (!$this->rejectRequest('Cancelled by '.$user->displayName.' in order to transfer character to another user', $update, $user, true, false)) {
+ throw new \Exception('Could not cancel pending request.');
+ }
}
}
$queueOpen = Settings::get('open_transfers_queue');
CharacterTransfer::create([
- 'user_reason' => $data['user_reason'], # pulls from this characters user_reason collum
+ 'user_reason' => $data['user_reason'], // pulls from this characters user_reason collum
'character_id' => $character->id,
- 'sender_id' => $user->id,
+ 'sender_id' => $user->id,
'recipient_id' => $recipient->id,
- 'status' => 'Pending',
+ 'status' => 'Pending',
// if the queue is closed, all transfers are auto-approved
- 'is_approved' => !$queueOpen
+ 'is_approved' => !$queueOpen,
]);
- if(!$queueOpen)
+ if (!$queueOpen) {
Notifications::create('CHARACTER_TRANSFER_RECEIVED', $recipient, [
- 'character_url' => $character->url,
+ 'character_url' => $character->url,
'character_name' => $character->slug,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
]);
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Forces an admin transfer of a character.
*
- * @param array $data
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function adminTransfer($data, $character, $user)
- {
+ public function adminTransfer($data, $character, $user) {
DB::beginTransaction();
try {
- if(isset($data['recipient_id']) && $data['recipient_id']) {
+ if (isset($data['recipient_id']) && $data['recipient_id']) {
$recipient = User::find($data['recipient_id']);
- if(!$recipient) throw new \Exception("Invalid user selected.");
- if($character->user_id == $recipient->id) throw new \Exception("Cannot transfer a character to the same user.");
- }
- else if(isset($data['recipient_url']) && $data['recipient_url']) {
+ if (!$recipient) {
+ throw new \Exception('Invalid user selected.');
+ }
+ if ($character->user_id == $recipient->id) {
+ throw new \Exception('Cannot transfer a character to the same user.');
+ }
+ } elseif (isset($data['recipient_url']) && $data['recipient_url']) {
// Transferring to an off-site user
$recipient = checkAlias($data['recipient_url']);
+ } else {
+ throw new \Exception('Please enter a recipient for the transfer.');
}
- else throw new \Exception("Please enter a recipient for the transfer.");
// If the character is in an active transfer, cancel it
$transfer = CharacterTransfer::active()->where('character_id', $character->id)->first();
- if($transfer) {
+ if ($transfer) {
$transfer->status = 'Canceled';
$transfer->reason = 'Transfer canceled by '.$user->displayName.' in order to transfer character to another user';
$transfer->save();
}
// deletes any pending design drafts
- foreach($character->designUpdate as $update)
- {
- if($update->status == 'Draft')
- {
- if(!$this->rejectRequest('Cancelled by '.$user->displayName.' in order to transfer character to another user', $update, $user, true, false)) throw new \Exception('Could not cancel pending request.');
+ foreach ($character->designUpdate as $update) {
+ if ($update->status == 'Draft') {
+ if (!$this->rejectRequest('Cancelled by '.$user->displayName.' in order to transfer character to another user', $update, $user, true, false)) {
+ throw new \Exception('Could not cancel pending request.');
+ }
}
}
$sender = $character->user;
- $this->moveCharacter($character, $recipient, 'Transferred by ' . $user->displayName . (isset($data['reason']) ? ': ' . $data['reason'] : ''), isset($data['cooldown']) ? $data['cooldown'] : -1);
+ $this->moveCharacter($character, $recipient, 'Transferred by '.$user->displayName.(isset($data['reason']) ? ': '.$data['reason'] : ''), $data['cooldown'] ?? -1);
// Add notifications for the old and new owners
- if($sender) {
+ if ($sender) {
Notifications::create('CHARACTER_SENT', $sender, [
'character_name' => $character->slug,
'character_slug' => $character->slug,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url,
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
'recipient_name' => is_object($recipient) ? $recipient->name : prettyProfileName($recipient),
- 'recipient_url' => is_object($recipient) ? $recipient->url : $recipient,
+ 'recipient_url' => is_object($recipient) ? $recipient->url : $recipient,
]);
}
- if(is_object($recipient)) {
+ if (is_object($recipient)) {
Notifications::create('CHARACTER_RECEIVED', $recipient, [
'character_name' => $character->slug,
'character_slug' => $character->slug,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url,
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Processes a character transfer.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function processTransfer($data, $user)
- {
+ public function processTransfer($data, $user) {
DB::beginTransaction();
try {
$transfer = CharacterTransfer::where('id', $data['transfer_id'])->active()->where('recipient_id', $user->id)->first();
- if(!$transfer) throw new \Exception("Invalid transfer selected.");
+ if (!$transfer) {
+ throw new \Exception('Invalid transfer selected.');
+ }
- if($data['action'] == 'Accept') {
+ if ($data['action'] == 'Accept') {
$cooldown = Settings::get('transfer_cooldown');
$transfer->status = 'Accepted';
@@ -1505,60 +1191,65 @@ public function processTransfer($data, $user)
// Process the character move if the transfer has already been approved
if ($transfer->is_approved) {
//check the cooldown saved
- if(isset($transfer->data['cooldown'])) $cooldown = $transfer->data['cooldown'];
+ if (isset($transfer->data['cooldown'])) {
+ $cooldown = $transfer->data['cooldown'];
+ }
$this->moveCharacter($transfer->character, $transfer->recipient, 'User Transfer', $cooldown);
- if(!Settings::get('open_transfers_queue'))
+ if (!Settings::get('open_transfers_queue')) {
$transfer->data = json_encode([
'cooldown' => $cooldown,
- 'staff_id' => null
+ 'staff_id' => null,
]);
+ }
// Notify sender of the successful transfer
Notifications::create('CHARACTER_TRANSFER_ACCEPTED', $transfer->sender, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $transfer->recipient->name,
- 'sender_url' => $transfer->recipient->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $transfer->recipient->name,
+ 'sender_url' => $transfer->recipient->url,
]);
}
- }
- else {
+ } else {
$transfer->status = 'Rejected';
$transfer->data = json_encode([
- 'staff_id' => null
+ 'staff_id' => null,
]);
// Notify sender that transfer has been rejected
Notifications::create('CHARACTER_TRANSFER_REJECTED', $transfer->sender, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $transfer->recipient->name,
- 'sender_url' => $transfer->recipient->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $transfer->recipient->name,
+ 'sender_url' => $transfer->recipient->url,
]);
}
$transfer->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Cancels a character transfer.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function cancelTransfer($data, $user)
- {
+ public function cancelTransfer($data, $user) {
DB::beginTransaction();
try {
$transfer = CharacterTransfer::where('id', $data['transfer_id'])->active()->where('sender_id', $user->id)->first();
- if(!$transfer) throw new \Exception("Invalid transfer selected.");
+ if (!$transfer) {
+ throw new \Exception('Invalid transfer selected.');
+ }
$transfer->status = 'Canceled';
$transfer->save();
@@ -1566,132 +1257,137 @@ public function cancelTransfer($data, $user)
// Notify recipient of the cancelled transfer
Notifications::create('CHARACTER_TRANSFER_CANCELED', $transfer->recipient, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $transfer->sender->name,
- 'sender_url' => $transfer->sender->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $transfer->sender->name,
+ 'sender_url' => $transfer->sender->url,
]);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Processes a character transfer in the approvals queue.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function processTransferQueue($data, $user)
- {
+ public function processTransferQueue($data, $user) {
DB::beginTransaction();
try {
- if(isset($data['transfer_id'])) $transfer = CharacterTransfer::where('id', $data['transfer_id'])->active()->first();
- else $transfer = $data['transfer'];
- if(!$transfer) throw new \Exception("Invalid transfer selected.");
+ if (isset($data['transfer_id'])) {
+ $transfer = CharacterTransfer::where('id', $data['transfer_id'])->active()->first();
+ } else {
+ $transfer = $data['transfer'];
+ }
+ if (!$transfer) {
+ throw new \Exception('Invalid transfer selected.');
+ }
- if($data['action'] == 'Approve') {
+ if ($data['action'] == 'Approve') {
$transfer->is_approved = 1;
$transfer->data = json_encode([
'staff_id' => $user->id,
- 'cooldown' => isset($data['cooldown']) ? $data['cooldown'] : Settings::get('transfer_cooldown')
+ 'cooldown' => $data['cooldown'] ?? Settings::get('transfer_cooldown'),
]);
// Process the character move if the recipient has already accepted the transfer
- if($transfer->status == 'Accepted') {
- $this->moveCharacter($transfer->character, $transfer->recipient, 'User Transfer', isset($data['cooldown']) ? $data['cooldown'] : -1);
+ if ($transfer->status == 'Accepted') {
+ $this->moveCharacter($transfer->character, $transfer->recipient, 'User Transfer', $data['cooldown'] ?? -1);
// Notify both parties of the successful transfer
Notifications::create('CHARACTER_TRANSFER_APPROVED', $transfer->sender, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
]);
Notifications::create('CHARACTER_TRANSFER_APPROVED', $transfer->recipient, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
]);
-
- }
- else {
+ } else {
// Still pending a response from the recipient
Notifications::create('CHARACTER_TRANSFER_ACCEPTABLE', $transfer->recipient, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
]);
-
}
- }
- else {
+ } else {
$transfer->status = 'Rejected';
- $transfer->reason = isset($data['reason']) ? $data['reason'] : null;
+ $transfer->reason = $data['reason'] ?? null;
$transfer->data = json_encode([
- 'staff_id' => $user->id
+ 'staff_id' => $user->id,
]);
// Notify both parties that the request was denied
Notifications::create('CHARACTER_TRANSFER_DENIED', $transfer->sender, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
]);
Notifications::create('CHARACTER_TRANSFER_DENIED', $transfer->recipient, [
'character_name' => $transfer->character->slug,
- 'character_url' => $transfer->character->url,
- 'sender_name' => $user->name,
- 'sender_url' => $user->url,
+ 'character_url' => $transfer->character->url,
+ 'sender_name' => $user->name,
+ 'sender_url' => $user->url,
]);
}
$transfer->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Moves a character from one user to another.
*
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $recipient
- * @param string $data
- * @param int $cooldown
- * @param string $logType
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $recipient
+ * @param string $data
+ * @param int $cooldown
+ * @param string $logType
*/
- public function moveCharacter($character, $recipient, $data, $cooldown = -1, $logType = null)
- {
+ public function moveCharacter($character, $recipient, $data, $cooldown = -1, $logType = null) {
$sender = $character->user;
- if(!$sender) $sender = $character->owner_url;
+ if (!$sender) {
+ $sender = $character->owner_url;
+ }
// Update character counts if the sender has an account
- if(is_object($sender)) {
+ if (is_object($sender)) {
$sender->settings->save();
}
- if(is_object($recipient)) {
- if(!$character->is_myo_slot) $recipient->settings->is_fto = 0;
+ if (is_object($recipient)) {
+ if (!$character->is_myo_slot) {
+ $recipient->settings->is_fto = 0;
+ }
$recipient->settings->save();
}
// Update character owner, sort order and cooldown
$character->sort = 0;
- if(is_object($recipient)) {
+ if (is_object($recipient)) {
$character->user_id = $recipient->id;
$character->owner_url = null;
- }
- else {
+ } else {
$character->owner_url = $recipient;
$character->user_id = null;
}
@@ -1699,17 +1395,19 @@ public function moveCharacter($character, $recipient, $data, $cooldown = -1, $lo
// Add the default amount from settings
$cooldown = Settings::get('transfer_cooldown');
}
- if($cooldown > 0) {
- if ($character->transferrable_at && $character->transferrable_at->isFuture())
+ if ($cooldown > 0) {
+ if ($character->transferrable_at && $character->transferrable_at->isFuture()) {
$character->transferrable_at->addDays($cooldown);
- else $character->transferrable_at = Carbon::now()->addDays($cooldown);
+ } else {
+ $character->transferrable_at = Carbon::now()->addDays($cooldown);
+ }
}
$character->save();
// Notify bookmarkers
$character->notifyBookmarkers('BOOKMARK_OWNER');
- if(Config::get('lorekeeper.settings.reset_character_status_on_transfer')) {
+ if (Config::get('lorekeeper.settings.reset_character_status_on_transfer')) {
// Reset trading status, gift art status, and writing status
$character->update([
'is_gift_art_allowed' => 0,
@@ -1718,54 +1416,64 @@ public function moveCharacter($character, $recipient, $data, $cooldown = -1, $lo
]);
}
- if(Config::get('lorekeeper.settings.reset_character_profile_on_transfer') && !$character->is_myo_slot) {
+ if (Config::get('lorekeeper.settings.reset_character_profile_on_transfer') && !$character->is_myo_slot) {
// Reset name and profile
$character->update(['name' => null]);
// Reset profile
$character->profile->update([
'text' => null,
- 'parsed_text' => null
+ 'parsed_text' => null,
]);
}
// Add a log for the ownership change
$this->createLog(
-is_object($sender) ? $sender->id : null,
+ is_object($sender) ? $sender->id : null,
is_object($sender) ? null : $sender,
$recipient && is_object($recipient) ? $recipient->id : null,
- $recipient && is_object($recipient) ? $recipient->url : ($recipient ? : null),
- $character->id, $logType ? $logType : ($character->is_myo_slot ? 'MYO Slot Transferred' : 'Character Transferred'), $data, 'user');
+ $recipient && is_object($recipient) ? $recipient->url : ($recipient ?: null),
+ $character->id,
+ $logType ? $logType : ($character->is_myo_slot ? 'MYO Slot Transferred' : 'Character Transferred'),
+ $data,
+ 'user'
+ );
}
/**
* Creates a character design update request (or a MYO design approval request).
*
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $user
- * @return \App\Models\Character\CharacterDesignUpdate|bool
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Character\CharacterDesignUpdate|bool
*/
- public function createDesignUpdateRequest($character, $user)
- {
+ public function createDesignUpdateRequest($character, $user) {
DB::beginTransaction();
try {
- if($character->user_id != $user->id) throw new \Exception("You do not own this character.");
- if(CharacterDesignUpdate::where('character_id', $character->id)->active()->exists()) throw new \Exception("This ".($character->is_myo_slot ? 'MYO slot' : 'character')." already has an existing request. Please update that one, or delete it before creating a new one.");
- if(!$character->isAvailable) throw new \Exception("This ".($character->is_myo_slot ? 'MYO slot' : 'character')." is currently in an open trade or transfer. Please cancel the trade or transfer before creating a design update.");
+ if ($character->user_id != $user->id) {
+ throw new \Exception('You do not own this character.');
+ }
+ if (CharacterDesignUpdate::where('character_id', $character->id)->active()->exists()) {
+ throw new \Exception('This '.($character->is_myo_slot ? 'MYO slot' : 'character').' already has an existing request. Please update that one, or delete it before creating a new one.');
+ }
+ if (!$character->isAvailable) {
+ throw new \Exception('This '.($character->is_myo_slot ? 'MYO slot' : 'character').' is currently in an open trade or transfer. Please cancel the trade or transfer before creating a design update.');
+ }
$data = [
- 'user_id' => $user->id,
- 'character_id' => $character->id,
- 'status' => 'Draft',
- 'hash' => randomString(10),
+ 'user_id' => $user->id,
+ 'character_id' => $character->id,
+ 'status' => 'Draft',
+ 'hash' => randomString(10),
'fullsize_hash' => randomString(15),
- 'update_type' => $character->is_myo_slot ? 'MYO' : 'Character',
+ 'update_type' => $character->is_myo_slot ? 'MYO' : 'Character',
// Set some data based on the character's existing stats
- 'rarity_id' => $character->image->rarity_id,
+ 'rarity_id' => $character->image->rarity_id,
'species_id' => $character->image->species_id,
- 'subtype_id' => $character->image->subtype_id
+ 'subtype_id' => $character->image->subtype_id,
];
$request = CharacterDesignUpdate::create($data);
@@ -1774,35 +1482,34 @@ public function createDesignUpdateRequest($character, $user)
// as presumably, we will not want to make major modifications to them.
// This is skipped for MYO slots as it complicates things later on - we don't want
// users to edit compulsory traits, so we'll only add them when the design is approved.
- if(!$character->is_myo_slot)
- {
- foreach($character->image->features as $feature)
- {
+ if (!$character->is_myo_slot) {
+ foreach ($character->image->features as $feature) {
$request->features()->create([
'character_image_id' => $request->id,
- 'character_type' => 'Update',
- 'feature_id' => $feature->feature_id,
- 'data' => $feature->data
+ 'character_type' => 'Update',
+ 'feature_id' => $feature->feature_id,
+ 'data' => $feature->data,
]);
}
}
return $this->commitReturn($request);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Saves the comment section of a character design update request.
*
- * @param array $data
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ *
+ * @return bool
*/
- public function saveRequestComment($data, $request)
- {
+ public function saveRequestComment($data, $request) {
DB::beginTransaction();
try {
@@ -1812,48 +1519,55 @@ public function saveRequestComment($data, $request)
$request->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Saves the image upload section of a character design update request.
*
- * @param array $data
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @param bool $isAdmin
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ * @param bool $isAdmin
+ *
+ * @return bool
*/
- public function saveRequestImage($data, $request, $isAdmin = false)
- {
+ public function saveRequestImage($data, $request, $isAdmin = false) {
DB::beginTransaction();
try {
// Require an image to be uploaded the first time, but if an image already exists, allow user to update the other details
- if(!$isAdmin && !isset($data['image']) && !file_exists($request->imagePath . '/' . $request->imageFileName)) throw new \Exception("Please upload a valid image.");
+ if (!$isAdmin && !isset($data['image']) && !file_exists($request->imagePath.'/'.$request->imageFileName)) {
+ throw new \Exception('Please upload a valid image.');
+ }
// Require a thumbnail to be uploaded the first time as well
- if(!file_exists($request->thumbnailPath . '/' . $request->thumbnailFileName)) {
+ if (!file_exists($request->thumbnailPath.'/'.$request->thumbnailFileName)) {
// If the crop dimensions are invalid...
// The crop function resizes the thumbnail to fit, so we only need to check that it's not null
- if(!$isAdmin || ($isAdmin && isset($data['modify_thumbnail']))) {
- if(isset($data['use_cropper']) && ($data['x0'] === null || $data['x1'] === null || $data['y0'] === null || $data['y1'] === null)) throw new \Exception('Invalid crop dimensions specified.');
- if(!isset($data['use_cropper']) && !isset($data['thumbnail'])) throw new \Exception("Please upload a valid thumbnail or use the image cropper.");
+ if (!$isAdmin || ($isAdmin && isset($data['modify_thumbnail']))) {
+ if (isset($data['use_cropper']) && ($data['x0'] === null || $data['x1'] === null || $data['y0'] === null || $data['y1'] === null)) {
+ throw new \Exception('Invalid crop dimensions specified.');
+ }
+ if (!isset($data['use_cropper']) && !isset($data['thumbnail'])) {
+ throw new \Exception('Please upload a valid thumbnail or use the image cropper.');
+ }
}
}
- if(!$isAdmin || ($isAdmin && isset($data['modify_thumbnail']))) {
+ if (!$isAdmin || ($isAdmin && isset($data['modify_thumbnail']))) {
$imageData = [];
- if(isset($data['use_cropper'])) {
+ if (isset($data['use_cropper'])) {
$imageData = Arr::only($data, [
'use_cropper',
'x0', 'x1', 'y0', 'y1',
]);
$imageData['use_cropper'] = isset($data['use_cropper']);
}
- if(!$isAdmin && isset($data['image'])) {
- $imageData['extension'] = (Config::get('lorekeeper.settings.masterlist_image_format') ? Config::get('lorekeeper.settings.masterlist_image_format') : (isset($data['extension']) ? $data['extension'] : $data['image']->getClientOriginalExtension()));
+ if (!$isAdmin && isset($data['image'])) {
+ $imageData['extension'] = (Config::get('lorekeeper.settings.masterlist_image_format') ? Config::get('lorekeeper.settings.masterlist_image_format') : ($data['extension'] ?? $data['image']->getClientOriginalExtension()));
$imageData['has_image'] = true;
}
$request->update($imageData);
@@ -1863,78 +1577,92 @@ public function saveRequestImage($data, $request, $isAdmin = false)
$request->artists()->delete();
// Check that users with the specified id(s) exist on site
- foreach($data['designer_id'] as $id) {
- if(isset($id) && $id) {
+ foreach ($data['designer_id'] as $id) {
+ if (isset($id) && $id) {
$user = User::find($id);
- if(!$user) throw new \Exception('One or more designers is invalid.');
+ if (!$user) {
+ throw new \Exception('One or more designers is invalid.');
+ }
}
}
- foreach($data['artist_id'] as $id) {
- if(isset($id) && $id) {
+ foreach ($data['artist_id'] as $id) {
+ if (isset($id) && $id) {
$user = $user = User::find($id);
- if(!$user) throw new \Exception('One or more artists is invalid.');
+ if (!$user) {
+ throw new \Exception('One or more artists is invalid.');
+ }
}
}
// Attach artists/designers
- foreach($data['designer_id'] as $key => $id) {
- if($id || $data['designer_url'][$key])
+ foreach ($data['designer_id'] as $key => $id) {
+ if ($id || $data['designer_url'][$key]) {
DB::table('character_image_creators')->insert([
'character_image_id' => $request->id,
- 'type' => 'Designer',
- 'character_type' => 'Update',
- 'url' => $data['designer_url'][$key],
- 'user_id' => $id
+ 'type' => 'Designer',
+ 'character_type' => 'Update',
+ 'url' => $data['designer_url'][$key],
+ 'user_id' => $id,
]);
+ }
}
- foreach($data['artist_id'] as $key => $id) {
- if($id || $data['artist_url'][$key])
+ foreach ($data['artist_id'] as $key => $id) {
+ if ($id || $data['artist_url'][$key]) {
DB::table('character_image_creators')->insert([
'character_image_id' => $request->id,
- 'type' => 'Artist',
- 'character_type' => 'Update',
- 'url' => $data['artist_url'][$key],
- 'user_id' => $id
+ 'type' => 'Artist',
+ 'character_type' => 'Update',
+ 'url' => $data['artist_url'][$key],
+ 'user_id' => $id,
]);
+ }
}
// Save image
- if(!$isAdmin && isset($data['image'])) $this->handleImage($data['image'], $request->imageDirectory, $request->imageFileName, null, isset($data['default_image']));
+ if (!$isAdmin && isset($data['image'])) {
+ $this->handleImage($data['image'], $request->imageDirectory, $request->imageFileName, null, isset($data['default_image']));
+ }
// Save thumbnail
- if(!$isAdmin || ($isAdmin && isset($data['modify_thumbnail']))) {
- if(isset($data['use_cropper']))
- $this->cropThumbnail(Arr::only($data, ['x0','x1','y0','y1']), $request);
- else if(isset($data['thumbnail']))
+ if (!$isAdmin || ($isAdmin && isset($data['modify_thumbnail']))) {
+ if (isset($data['use_cropper'])) {
+ $this->cropThumbnail(Arr::only($data, ['x0', 'x1', 'y0', 'y1']), $request);
+ } elseif (isset($data['thumbnail'])) {
$this->handleImage($data['thumbnail'], $request->imageDirectory, $request->thumbnailFileName);
+ }
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Saves the addons section of a character design update request.
*
- * @param array $data
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ *
+ * @return bool
*/
- public function saveRequestAddons($data, $request)
- {
+ public function saveRequestAddons($data, $request) {
DB::beginTransaction();
try {
$requestData = $request->data;
// First return any item stacks associated with this request
- if(isset($requestData['user']) && isset($requestData['user']['user_items'])) {
- foreach($requestData['user']['user_items'] as $userItemId=>$quantity) {
+ if (isset($requestData['user']) && isset($requestData['user']['user_items'])) {
+ foreach ($requestData['user']['user_items'] as $userItemId=>$quantity) {
$userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->update_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->update_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->update_count -= $quantity;
$userItemRow->save();
}
@@ -1943,13 +1671,13 @@ public function saveRequestAddons($data, $request)
// Also return any currency associated with this request
// This is stored in the data attribute
$currencyManager = new CurrencyManager;
- if(isset($requestData['user']) && isset($requestData['user']['currencies'])) {
- foreach($requestData['user']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['user']) && isset($requestData['user']['currencies'])) {
+ foreach ($requestData['user']['currencies'] as $currencyId=>$quantity) {
$currencyManager->creditCurrency(null, $request->user, null, null, $currencyId, $quantity);
}
}
- if(isset($requestData['character']) && isset($requestData['character']['currencies'])) {
- foreach($requestData['character']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['character']) && isset($requestData['character']['currencies'])) {
+ foreach ($requestData['character']['currencies'] as $currencyId=>$quantity) {
$currencyManager->creditCurrency(null, $request->character, null, null, $currencyId, $quantity);
}
}
@@ -1960,11 +1688,15 @@ public function saveRequestAddons($data, $request)
// Attach items. Technically, the user doesn't lose ownership of the item - we're just adding an additional holding field.
// We're also not going to add logs as this might add unnecessary fluff to the logs and the items still belong to the user.
// Perhaps later I'll add a way to locate items that are being held by updates/trades.
- if(isset($data['stack_id'])) {
- foreach($data['stack_id'] as $stackId) {
+ if (isset($data['stack_id'])) {
+ foreach ($data['stack_id'] as $stackId) {
$stack = UserItem::with('item')->find($stackId);
- if(!$stack || $stack->user_id != $request->user_id) throw new \Exception("Invalid item selected.");
- if(!isset($data['stack_quantity'][$stackId])) throw new \Exception("Invalid quantity selected.");
+ if (!$stack || $stack->user_id != $request->user_id) {
+ throw new \Exception('Invalid item selected.');
+ }
+ if (!isset($data['stack_quantity'][$stackId])) {
+ throw new \Exception('Invalid quantity selected.');
+ }
$stack->update_count += $data['stack_quantity'][$stackId];
$stack->save();
@@ -1973,66 +1705,88 @@ public function saveRequestAddons($data, $request)
}
// Attach currencies.
- if(isset($data['currency_id'])) {
- foreach($data['currency_id'] as $holderKey=>$currencyIds) {
+ if (isset($data['currency_id'])) {
+ foreach ($data['currency_id'] as $holderKey=>$currencyIds) {
$holder = explode('-', $holderKey);
$holderType = $holder[0];
$holderId = $holder[1];
// The holder can be obtained from the request, but for sanity's sake we're going to perform a check
$holder = ($holderType == 'user' ? User::find($holderId) : Character::find($holderId));
- if ($holderType == 'user' && $holder->id != $request->user_id) throw new \Exception("Error attaching currencies to this request. (1)");
- else if ($holderType == 'character' && $holder->id != $request->character_id) throw new \Exception("Error attaching currencies to this request. (2)");
+ if ($holderType == 'user' && $holder->id != $request->user_id) {
+ throw new \Exception('Error attaching currencies to this request. (1)');
+ } elseif ($holderType == 'character' && $holder->id != $request->character_id) {
+ throw new \Exception('Error attaching currencies to this request. (2)');
+ }
- foreach($currencyIds as $key=>$currencyId) {
+ foreach ($currencyIds as $key=>$currencyId) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Invalid currency selected.");
- if(!$currencyManager->debitCurrency($holder, null, null, null, $currency, $data['currency_quantity'][$holderKey][$key])) throw new \Exception("Invalid currency/quantity selected.");
-
- if($holderType == 'user') addAsset($userAssets, $currency, $data['currency_quantity'][$holderKey][$key]);
- else addAsset($characterAssets, $currency, $data['currency_quantity'][$holderKey][$key]);
-
+ if (!$currency) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ if (!$currencyManager->debitCurrency($holder, null, null, null, $currency, $data['currency_quantity'][$holderKey][$key])) {
+ throw new \Exception('Invalid currency/quantity selected.');
+ }
+
+ if ($holderType == 'user') {
+ addAsset($userAssets, $currency, $data['currency_quantity'][$holderKey][$key]);
+ } else {
+ addAsset($characterAssets, $currency, $data['currency_quantity'][$holderKey][$key]);
+ }
}
}
}
$request->has_addons = 1;
$request->data = json_encode([
- 'user' => Arr::only(getDataReadyAssets($userAssets), ['user_items','currencies']),
- 'character' => Arr::only(getDataReadyAssets($characterAssets), ['currencies'])
+ 'user' => Arr::only(getDataReadyAssets($userAssets), ['user_items', 'currencies']),
+ 'character' => Arr::only(getDataReadyAssets($characterAssets), ['currencies']),
]);
$request->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Saves the character features (traits) section of a character design update request.
*
- * @param array $data
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ *
+ * @return bool
*/
- public function saveRequestFeatures($data, $request)
- {
+ public function saveRequestFeatures($data, $request) {
DB::beginTransaction();
try {
- if(!($request->character->is_myo_slot && $request->character->image->species_id) && !isset($data['species_id'])) throw new \Exception("Please select a species.");
- if(!($request->character->is_myo_slot && $request->character->image->rarity_id) && !isset($data['rarity_id'])) throw new \Exception("Please select a rarity.");
+ if (!($request->character->is_myo_slot && $request->character->image->species_id) && !isset($data['species_id'])) {
+ throw new \Exception('Please select a species.');
+ }
+ if (!($request->character->is_myo_slot && $request->character->image->rarity_id) && !isset($data['rarity_id'])) {
+ throw new \Exception('Please select a rarity.');
+ }
$rarity = ($request->character->is_myo_slot && $request->character->image->rarity_id) ? $request->character->image->rarity : Rarity::find($data['rarity_id']);
$species = ($request->character->is_myo_slot && $request->character->image->species_id) ? $request->character->image->species : Species::find($data['species_id']);
- if(isset($data['subtype_id']) && $data['subtype_id'])
+ if (isset($data['subtype_id']) && $data['subtype_id']) {
$subtype = ($request->character->is_myo_slot && $request->character->image->subtype_id) ? $request->character->image->subtype : Subtype::find($data['subtype_id']);
- else $subtype = null;
- if(!$rarity) throw new \Exception("Invalid rarity selected.");
- if(!$species) throw new \Exception("Invalid species selected.");
- if($subtype && $subtype->species_id != $species->id) throw new \Exception("Subtype does not match the species.");
+ } else {
+ $subtype = null;
+ }
+ if (!$rarity) {
+ throw new \Exception('Invalid rarity selected.');
+ }
+ if (!$species) {
+ throw new \Exception('Invalid species selected.');
+ }
+ if ($subtype && $subtype->species_id != $species->id) {
+ throw new \Exception('Subtype does not match the species.');
+ }
// Clear old features
$request->features()->delete();
@@ -2042,15 +1796,19 @@ public function saveRequestFeatures($data, $request)
$features = Feature::whereIn('id', $data['feature_id'])->with('rarity')->get()->keyBy('id');
- foreach($data['feature_id'] as $key => $featureId) {
- if(!$featureId) continue;
+ foreach ($data['feature_id'] as $key => $featureId) {
+ if (!$featureId) {
+ continue;
+ }
// Skip the feature if the rarity is too high.
// Comment out this check if rarities should have more berth for traits choice.
//if($features[$featureId]->rarity->sort > $rarity->sort) continue;
// Skip the feature if it's not the correct species.
- if($features[$featureId]->species_id && $features[$featureId]->species_id != $species->id) continue;
+ if ($features[$featureId]->species_id && $features[$featureId]->species_id != $species->id) {
+ continue;
+ }
$feature = CharacterFeature::create(['character_image_id' => $request->id, 'feature_id' => $featureId, 'data' => $data['feature_data'][$key], 'character_type' => 'Update']);
}
@@ -2063,103 +1821,138 @@ public function saveRequestFeatures($data, $request)
$request->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Submit a character design update request to the approval queue.
*
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @return bool
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ *
+ * @return bool
*/
- public function submitRequest($request)
- {
+ public function submitRequest($request) {
DB::beginTransaction();
try {
- if($request->status != 'Draft') throw new \Exception("This request cannot be resubmitted to the queue.");
+ if ($request->status != 'Draft') {
+ throw new \Exception('This request cannot be resubmitted to the queue.');
+ }
// Recheck and set update type, as insurance/in case of pre-existing drafts
- if($request->character->is_myo_slot)
- $request->update_type = 'MYO';
- else $request->update_type = 'Character';
+ if ($request->character->is_myo_slot) {
+ $request->update_type = 'MYO';
+ } else {
+ $request->update_type = 'Character';
+ }
// We've done validation and all section by section,
// so it's safe to simply set the status to Pending here
$request->status = 'Pending';
- if(!$request->submitted_at) $request->submitted_at = Carbon::now();
+ if (!$request->submitted_at) {
+ $request->submitted_at = Carbon::now();
+ }
$request->save();
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Approves a character design update request and processes it.
*
- * @param array $data
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function approveRequest($data, $request, $user)
- {
+ public function approveRequest($data, $request, $user) {
DB::beginTransaction();
try {
- if($request->status != 'Pending') throw new \Exception("This request cannot be processed.");
- if(!isset($data['character_category_id'])) throw new \Exception("Please select a character category.");
- if(!isset($data['number'])) throw new \Exception("Please enter a character number.");
- if(!isset($data['slug']) || Character::where('slug', $data['slug'])->where('id', '!=', $request->character_id)->exists()) throw new \Exception("Please enter a unique character code.");
+ if ($request->status != 'Pending') {
+ throw new \Exception('This request cannot be processed.');
+ }
+ if (!isset($data['character_category_id'])) {
+ throw new \Exception('Please select a character category.');
+ }
+ if (!isset($data['number'])) {
+ throw new \Exception('Please enter a character number.');
+ }
+ if (!isset($data['slug']) || Character::where('slug', $data['slug'])->where('id', '!=', $request->character_id)->exists()) {
+ throw new \Exception('Please enter a unique character code.');
+ }
// Remove any added items/currency
// Currency has already been removed, so no action required
// However logs need to be added for each of these
$requestData = $request->data;
$inventoryManager = new InventoryManager;
- if(isset($requestData['user']) && isset($requestData['user']['user_items'])) {
+ if (isset($requestData['user']) && isset($requestData['user']['user_items'])) {
$stacks = $requestData['user']['user_items'];
- foreach($requestData['user']['user_items'] as $userItemId=>$quantity) {
+ foreach ($requestData['user']['user_items'] as $userItemId=>$quantity) {
$userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->update_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->update_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->update_count -= $quantity;
$userItemRow->save();
}
$staff = $user;
- foreach($stacks as $stackId=>$quantity) {
+ foreach ($stacks as $stackId=>$quantity) {
$stack = UserItem::find($stackId);
$user = User::find($request->user_id);
- if(!$inventoryManager->debitStack($user, $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated', ['data' => 'Item used in ' . ($request->character->is_myo_slot ? 'MYO design approval' : 'Character design update') . ' (#'.$request->id.' )'], $stack, $quantity)) throw new \Exception("Failed to create log for item stack.");
+ if (!$inventoryManager->debitStack($user, $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated', ['data' => 'Item used in '.($request->character->is_myo_slot ? 'MYO design approval' : 'Character design update').' (#'.$request->id.' )'], $stack, $quantity)) {
+ throw new \Exception('Failed to create log for item stack.');
+ }
}
$user = $staff;
}
$currencyManager = new CurrencyManager;
- if(isset($requestData['user']['currencies']) && $requestData['user']['currencies'])
- {
- foreach($requestData['user']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['user']['currencies']) && $requestData['user']['currencies']) {
+ foreach ($requestData['user']['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currencyManager->createLog($request->user_id, 'User', null, null,
- $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated',
- 'Used in ' . ($request->character->is_myo_slot ? 'MYO design approval' : 'character design update') . ' (#'.$request->id.' )',
- $currencyId, $quantity))
- throw new \Exception("Failed to create log for user currency.");
+ if (!$currencyManager->createLog(
+ $request->user_id,
+ 'User',
+ null,
+ null,
+ $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated',
+ 'Used in '.($request->character->is_myo_slot ? 'MYO design approval' : 'character design update').' (#'.$request->id.' )',
+ $currencyId,
+ $quantity
+ )) {
+ throw new \Exception('Failed to create log for user currency.');
+ }
}
}
- if(isset($requestData['character']['currencies']) && $requestData['character']['currencies'])
- {
- foreach($requestData['character']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['character']['currencies']) && $requestData['character']['currencies']) {
+ foreach ($requestData['character']['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currencyManager->createLog($request->character_id, 'Character', null, null,
- $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated',
- 'Used in ' . ($request->character->is_myo_slot ? 'MYO design approval' : 'character design update') . ' (#'.$request->id.' )',
- $currencyId, $quantity))
- throw new \Exception("Failed to create log for character currency.");
+ if (!$currencyManager->createLog(
+ $request->character_id,
+ 'Character',
+ null,
+ null,
+ $request->character->is_myo_slot ? 'MYO Design Approved' : 'Character Design Updated',
+ 'Used in '.($request->character->is_myo_slot ? 'MYO design approval' : 'character design update').' (#'.$request->id.' )',
+ $currencyId,
+ $quantity
+ )) {
+ throw new \Exception('Failed to create log for character currency.');
+ }
}
}
@@ -2167,20 +1960,20 @@ public function approveRequest($data, $request, $user)
// Create a new image with the request data
$image = CharacterImage::create([
- 'character_id' => $request->character_id,
- 'is_visible' => 1,
- 'hash' => $request->hash,
+ 'character_id' => $request->character_id,
+ 'is_visible' => 1,
+ 'hash' => $request->hash,
'fullsize_hash' => $request->fullsize_hash ? $request->fullsize_hash : randomString(15),
- 'extension' => $extension,
- 'use_cropper' => $request->use_cropper,
- 'x0' => $request->x0,
- 'x1' => $request->x1,
- 'y0' => $request->y0,
- 'y1' => $request->y1,
- 'species_id' => $request->species_id,
- 'subtype_id' => ($request->character->is_myo_slot && isset($request->character->image->subtype_id)) ? $request->character->image->subtype_id : $request->subtype_id,
- 'rarity_id' => $request->rarity_id,
- 'sort' => 0,
+ 'extension' => $extension,
+ 'use_cropper' => $request->use_cropper,
+ 'x0' => $request->x0,
+ 'x1' => $request->x1,
+ 'y0' => $request->y0,
+ 'y1' => $request->y1,
+ 'species_id' => $request->species_id,
+ 'subtype_id' => ($request->character->is_myo_slot && isset($request->character->image->subtype_id)) ? $request->character->image->subtype_id : $request->subtype_id,
+ 'rarity_id' => $request->rarity_id,
+ 'sort' => 0,
]);
// Shift the image credits over to the new image
@@ -2188,10 +1981,8 @@ public function approveRequest($data, $request, $user)
$request->artists()->update(['character_type' => 'Character', 'character_image_id' => $image->id]);
// Add the compulsory features
- if($request->character->is_myo_slot)
- {
- foreach($request->character->image->features as $feature)
- {
+ if ($request->character->is_myo_slot) {
+ foreach ($request->character->image->features as $feature) {
CharacterFeature::create(['character_image_id' => $image->id, 'feature_id' => $feature->feature_id, 'data' => $feature->data, 'character_type' => 'Character']);
}
}
@@ -2200,27 +1991,29 @@ public function approveRequest($data, $request, $user)
$request->rawFeatures()->update(['character_image_id' => $image->id, 'character_type' => 'Character']);
// Make the image directory if it doesn't exist
- if(!file_exists($image->imagePath))
- {
+ if (!file_exists($image->imagePath)) {
// Create the directory.
if (!mkdir($image->imagePath, 0755, true)) {
$this->setError('error', 'Failed to create image directory.');
+
return false;
}
chmod($image->imagePath, 0755);
}
// Move the image file to the new image
- File::move($request->imagePath . '/' . $request->imageFileName, $image->imagePath . '/' . $image->imageFileName);
+ File::move($request->imagePath.'/'.$request->imageFileName, $image->imagePath.'/'.$image->imageFileName);
// Process and save the image
$this->processImage($image);
// The thumbnail is already generated, so it can just be moved without processing
- File::move($request->thumbnailPath . '/' . $request->thumbnailFileName, $image->thumbnailPath . '/' . $image->thumbnailFileName);
+ File::move($request->thumbnailPath.'/'.$request->thumbnailFileName, $image->thumbnailPath.'/'.$image->thumbnailFileName);
// Set character data and other info such as cooldown time, resell cost and terms etc.
// since those might be updated with the new design update
- if(isset($data['transferrable_at'])) $request->character->transferrable_at = $data['transferrable_at'];
+ if (isset($data['transferrable_at'])) {
+ $request->character->transferrable_at = $data['transferrable_at'];
+ }
$request->character->character_category_id = $data['character_category_id'];
$request->character->number = $data['number'];
$request->character->slug = $data['slug'];
@@ -2232,25 +2025,25 @@ public function approveRequest($data, $request, $user)
$request->character->is_sellable = isset($data['is_sellable']);
$request->character->is_tradeable = isset($data['is_tradeable']);
$request->character->is_giftable = isset($data['is_giftable']);
- $request->character->sale_value = isset($data['sale_value']) ? $data['sale_value'] : 0;
+ $request->character->sale_value = $data['sale_value'] ?? 0;
// Invalidate old image if desired
- if(isset($data['invalidate_old']))
- {
+ if (isset($data['invalidate_old'])) {
$request->character->image->is_valid = 0;
$request->character->image->save();
}
// Set new image if desired
- if(isset($data['set_active']))
- {
+ if (isset($data['set_active'])) {
$request->character->character_image_id = $image->id;
}
// Final recheck and setting of update type, as insurance
- if($request->character->is_myo_slot)
- $request->update_type = 'MYO';
- else $request->update_type = 'Character';
+ if ($request->character->is_myo_slot) {
+ $request->update_type = 'MYO';
+ } else {
+ $request->update_type = 'Character';
+ }
$request->save();
// Add a log for the character and user
@@ -2259,9 +2052,10 @@ public function approveRequest($data, $request, $user)
// If this is for a MYO, set user's FTO status and the MYO status of the slot
// and clear the character's name
- if($request->character->is_myo_slot)
- {
- if(Config::get('lorekeeper.settings.clear_myo_slot_name_on_approval')) $request->character->name = null;
+ if ($request->character->is_myo_slot) {
+ if (Config::get('lorekeeper.settings.clear_myo_slot_name_on_approval')) {
+ $request->character->name = null;
+ }
$request->character->is_myo_slot = 0;
$request->user->settings->is_fto = 0;
$request->user->settings->save();
@@ -2275,18 +2069,19 @@ public function approveRequest($data, $request, $user)
// Notify the user
Notifications::create('DESIGN_APPROVED', $request->user, [
- 'design_url' => $request->url,
+ 'design_url' => $request->url,
'character_url' => $request->character->url,
- 'name' => $request->character->fullName
+ 'name' => $request->character->fullName,
]);
// Notify bookmarkers
$request->character->notifyBookmarkers('BOOKMARK_IMAGE');
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
@@ -2295,18 +2090,21 @@ public function approveRequest($data, $request, $user)
* Rejection can be a soft rejection (reopens the request so the user can edit it and resubmit)
* or a hard rejection (takes the request out of the queue completely).
*
- * @param array $data
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @param \App\Models\User\User $user
- * @param bool $forceReject
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ * @param \App\Models\User\User $user
+ * @param bool $forceReject
+ * @param mixed $notification
+ *
+ * @return bool
*/
- public function rejectRequest($data, $request, $user, $forceReject = false, $notification = true)
- {
+ public function rejectRequest($data, $request, $user, $forceReject = false, $notification = true) {
DB::beginTransaction();
try {
- if(!$forceReject && $request->status != 'Pending') throw new \Exception("This request cannot be processed.");
+ if (!$forceReject && $request->status != 'Pending') {
+ throw new \Exception('This request cannot be processed.');
+ }
// This hard rejects the request - items/currency are returned to user
// and the user will need to open a new request to resubmit.
@@ -2314,71 +2112,83 @@ public function rejectRequest($data, $request, $user, $forceReject = false, $not
$requestData = $request->data;
// Return all added items/currency
- if(isset($requestData['user']) && isset($requestData['user']['user_items'])) {
- foreach($requestData['user']['user_items'] as $userItemId=>$quantity) {
+ if (isset($requestData['user']) && isset($requestData['user']['user_items'])) {
+ foreach ($requestData['user']['user_items'] as $userItemId=>$quantity) {
$userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->update_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->update_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->update_count -= $quantity;
$userItemRow->save();
}
}
$currencyManager = new CurrencyManager;
- if(isset($requestData['user']['currencies']) && $requestData['user']['currencies'])
- {
- foreach($requestData['user']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['user']['currencies']) && $requestData['user']['currencies']) {
+ foreach ($requestData['user']['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Cannot return an invalid currency. (".$currencyId.")");
- if(!$currencyManager->creditCurrency(null, $request->user, null, null, $currency, $quantity)) throw new \Exception("Could not return currency to user. (".$currencyId.")");
+ if (!$currency) {
+ throw new \Exception('Cannot return an invalid currency. ('.$currencyId.')');
+ }
+ if (!$currencyManager->creditCurrency(null, $request->user, null, null, $currency, $quantity)) {
+ throw new \Exception('Could not return currency to user. ('.$currencyId.')');
+ }
}
}
- if(isset($requestData['character']['currencies']) && $requestData['character']['currencies'])
- {
- foreach($requestData['character']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['character']['currencies']) && $requestData['character']['currencies']) {
+ foreach ($requestData['character']['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Cannot return an invalid currency. (".$currencyId.")");
- if(!$currencyManager->creditCurrency(null, $request->character, null, null, $currency, $quantity)) throw new \Exception("Could not return currency to character. (".$currencyId.")");
+ if (!$currency) {
+ throw new \Exception('Cannot return an invalid currency. ('.$currencyId.')');
+ }
+ if (!$currencyManager->creditCurrency(null, $request->character, null, null, $currency, $quantity)) {
+ throw new \Exception('Could not return currency to character. ('.$currencyId.')');
+ }
}
}
// Set staff comment and status
$request->staff_id = $user->id;
- $request->staff_comments = isset($data['staff_comments']) ? $data['staff_comments'] : null;
+ $request->staff_comments = $data['staff_comments'] ?? null;
$request->status = 'Rejected';
$request->save();
- if($notification)
- {
+ if ($notification) {
// Notify the user
Notifications::create('DESIGN_REJECTED', $request->user, [
- 'design_url' => $request->url,
+ 'design_url' => $request->url,
'character_url' => $request->character->url,
- 'name' => $request->character->fullName
+ 'name' => $request->character->fullName,
]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Cancels a character design update request.
*
- * @param array $data
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @param \App\Models\User\User $user
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function cancelRequest($data, $request, $user)
- {
+ public function cancelRequest($data, $request, $user) {
DB::beginTransaction();
try {
- if($request->status != 'Pending') throw new \Exception("This request cannot be processed.");
+ if ($request->status != 'Pending') {
+ throw new \Exception('This request cannot be processed.');
+ }
// Soft removes the request from the queue -
// it preserves all the data entered, but allows the staff member
@@ -2387,37 +2197,42 @@ public function cancelRequest($data, $request, $user)
// Set staff comment and status
$request->staff_id = $user->id;
- $request->staff_comments = isset($data['staff_comments']) ? $data['staff_comments'] : null;
+ $request->staff_comments = $data['staff_comments'] ?? null;
$request->status = 'Draft';
- if(!isset($data['preserve_queue'])) $request->submitted_at = null;
+ if (!isset($data['preserve_queue'])) {
+ $request->submitted_at = null;
+ }
$request->save();
// Notify the user
Notifications::create('DESIGN_CANCELED', $request->user, [
- 'design_url' => $request->url,
+ 'design_url' => $request->url,
'character_url' => $request->character->url,
- 'name' => $request->character->fullName
+ 'name' => $request->character->fullName,
]);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes a character design update request.
*
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @return bool
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ *
+ * @return bool
*/
- public function deleteRequest($request)
- {
+ public function deleteRequest($request) {
DB::beginTransaction();
try {
- if($request->status != 'Draft') throw new \Exception("This request cannot be processed.");
+ if ($request->status != 'Draft') {
+ throw new \Exception('This request cannot be processed.');
+ }
// Deletes the request entirely, including images and etc.
// This returns any attached items/currency
@@ -2426,31 +2241,41 @@ public function deleteRequest($request)
$requestData = $request->data;
// Return all added items/currency
- if(isset($requestData['user']) && isset($requestData['user']['user_items'])) {
- foreach($requestData['user']['user_items'] as $userItemId=>$quantity) {
+ if (isset($requestData['user']) && isset($requestData['user']['user_items'])) {
+ foreach ($requestData['user']['user_items'] as $userItemId=>$quantity) {
$userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->update_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->update_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->update_count -= $quantity;
$userItemRow->save();
}
}
$currencyManager = new CurrencyManager;
- if(isset($requestData['user']['currencies']) && $requestData['user']['currencies'])
- {
- foreach($requestData['user']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['user']['currencies']) && $requestData['user']['currencies']) {
+ foreach ($requestData['user']['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Cannot return an invalid currency. (".$currencyId.")");
- if(!$currencyManager->creditCurrency(null, $request->user, null, null, $currency, $quantity)) throw new \Exception("Could not return currency to user. (".$currencyId.")");
+ if (!$currency) {
+ throw new \Exception('Cannot return an invalid currency. ('.$currencyId.')');
+ }
+ if (!$currencyManager->creditCurrency(null, $request->user, null, null, $currency, $quantity)) {
+ throw new \Exception('Could not return currency to user. ('.$currencyId.')');
+ }
}
}
- if(isset($requestData['character']['currencies']) && $requestData['character']['currencies'])
- {
- foreach($requestData['character']['currencies'] as $currencyId=>$quantity) {
+ if (isset($requestData['character']['currencies']) && $requestData['character']['currencies']) {
+ foreach ($requestData['character']['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Cannot return an invalid currency. (".$currencyId.")");
- if(!$currencyManager->creditCurrency(null, $request->character, null, null, $currency, $quantity)) throw new \Exception("Could not return currency to character. (".$currencyId.")");
+ if (!$currency) {
+ throw new \Exception('Cannot return an invalid currency. ('.$currencyId.')');
+ }
+ if (!$currencyManager->creditCurrency(null, $request->character, null, null, $currency, $quantity)) {
+ throw new \Exception('Could not return currency to character. ('.$currencyId.')');
+ }
}
}
@@ -2458,29 +2283,34 @@ public function deleteRequest($request)
$request->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Votes on a a character design update request.
*
- * @param string $action
- * @param \App\Models\Character\CharacterDesignUpdate $request
- * @param \App\Models\User\User $user
- * @return bool
+ * @param string $action
+ * @param \App\Models\Character\CharacterDesignUpdate $request
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function voteRequest($action, $request, $user)
- {
+ public function voteRequest($action, $request, $user) {
DB::beginTransaction();
try {
- if($request->status != 'Pending') throw new \Exception("This request cannot be processed.");
- if(!Config::get('lorekeeper.extensions.design_update_voting')) throw new \Exception('This extension is not currently enabled.');
+ if ($request->status != 'Pending') {
+ throw new \Exception('This request cannot be processed.');
+ }
+ if (!Config::get('lorekeeper.extensions.design_update_voting')) {
+ throw new \Exception('This extension is not currently enabled.');
+ }
- switch($action) {
+ switch ($action) {
default:
flash('Invalid action.')->error();
break;
@@ -2500,9 +2330,450 @@ public function voteRequest($action, $request, $user)
$request->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+
+ /**
+ * Handles character data.
+ *
+ * @param array $data
+ * @param bool $isMyo
+ *
+ * @return \App\Models\Character\Character|bool
+ */
+ private function handleCharacter($data, $isMyo = false) {
+ try {
+ if ($isMyo) {
+ $data['character_category_id'] = null;
+ $data['number'] = null;
+ $data['slug'] = null;
+ $data['species_id'] = isset($data['species_id']) && $data['species_id'] ? $data['species_id'] : null;
+ $data['subtype_id'] = isset($data['subtype_id']) && $data['subtype_id'] ? $data['subtype_id'] : null;
+ $data['rarity_id'] = isset($data['rarity_id']) && $data['rarity_id'] ? $data['rarity_id'] : null;
+ }
+
+ $characterData = Arr::only($data, [
+ 'character_category_id', 'rarity_id', 'user_id',
+ 'number', 'slug', 'description',
+ 'sale_value', 'transferrable_at', 'is_visible',
+ ]);
+
+ $characterData['name'] = ($isMyo && isset($data['name'])) ? $data['name'] : null;
+ $characterData['owner_url'] = isset($characterData['user_id']) ? null : $data['owner_url'];
+ $characterData['is_sellable'] = isset($data['is_sellable']);
+ $characterData['is_tradeable'] = isset($data['is_tradeable']);
+ $characterData['is_giftable'] = isset($data['is_giftable']);
+ $characterData['is_visible'] = isset($data['is_visible']);
+ $characterData['sale_value'] = $data['sale_value'] ?? 0;
+ $characterData['is_gift_art_allowed'] = 0;
+ $characterData['is_gift_writing_allowed'] = 0;
+ $characterData['is_trading'] = 0;
+ $characterData['parsed_description'] = parse($data['description']);
+ if ($isMyo) {
+ $characterData['is_myo_slot'] = 1;
+ }
+
+ $character = Character::create($characterData);
+
+ // Create character profile row
+ $character->profile()->create([]);
+
+ return $character;
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return false;
+ }
+
+ /**
+ * Handles character image data.
+ *
+ * @param array $data
+ * @param bool $isMyo
+ * @param mixed $character
+ *
+ * @return \App\Models\Character\Character $character
+ * @return \App\Models\Character\CharacterImage|bool
+ */
+ private function handleCharacterImage($data, $character, $isMyo = false) {
+ try {
+ if ($isMyo) {
+ $data['species_id'] = (isset($data['species_id']) && $data['species_id']) ? $data['species_id'] : null;
+ $data['subtype_id'] = isset($data['subtype_id']) && $data['subtype_id'] ? $data['subtype_id'] : null;
+ $data['rarity_id'] = (isset($data['rarity_id']) && $data['rarity_id']) ? $data['rarity_id'] : null;
+
+ // Use default images for MYO slots without an image provided
+ if (!isset($data['image'])) {
+ $data['image'] = asset('images/myo.png');
+ $data['thumbnail'] = asset('images/myo-th.png');
+ $data['extension'] = 'png';
+ $data['default_image'] = true;
+ unset($data['use_cropper']);
+ }
+ }
+ $imageData = Arr::only($data, [
+ 'species_id', 'subtype_id', 'rarity_id', 'use_cropper',
+ 'x0', 'x1', 'y0', 'y1',
+ ]);
+ $imageData['use_cropper'] = isset($data['use_cropper']);
+ $imageData['description'] = $data['image_description'] ?? null;
+ $imageData['parsed_description'] = parse($imageData['description']);
+ $imageData['hash'] = randomString(10);
+ $imageData['fullsize_hash'] = randomString(15);
+ $imageData['sort'] = 0;
+ $imageData['is_valid'] = isset($data['is_valid']);
+ $imageData['is_visible'] = isset($data['is_visible']);
+ $imageData['extension'] = (Config::get('lorekeeper.settings.masterlist_image_format') ? Config::get('lorekeeper.settings.masterlist_image_format') : ($data['extension'] ?? $data['image']->getClientOriginalExtension()));
+ $imageData['character_id'] = $character->id;
+
+ $image = CharacterImage::create($imageData);
+
+ // Check if entered url(s) have aliases associated with any on-site users
+ foreach ($data['designer_url'] as $key=>$url) {
+ $recipient = checkAlias($url, false);
+ if (is_object($recipient)) {
+ $data['designer_id'][$key] = $recipient->id;
+ $data['designer_url'][$key] = null;
+ }
+ }
+ foreach ($data['artist_url'] as $key=>$url) {
+ $recipient = checkAlias($url, false);
+ if (is_object($recipient)) {
+ $data['artist_id'][$key] = $recipient->id;
+ $data['artist_url'][$key] = null;
+ }
+ }
+
+ // Check that users with the specified id(s) exist on site
+ foreach ($data['designer_id'] as $id) {
+ if (isset($id) && $id) {
+ $user = User::find($id);
+ if (!$user) {
+ throw new \Exception('One or more designers is invalid.');
+ }
+ }
+ }
+ foreach ($data['artist_id'] as $id) {
+ if (isset($id) && $id) {
+ $user = $user = User::find($id);
+ if (!$user) {
+ throw new \Exception('One or more artists is invalid.');
+ }
+ }
+ }
+
+ // Attach artists/designers
+ foreach ($data['designer_id'] as $key => $id) {
+ if ($id || $data['designer_url'][$key]) {
+ DB::table('character_image_creators')->insert([
+ 'character_image_id' => $image->id,
+ 'type' => 'Designer',
+ 'url' => $data['designer_url'][$key],
+ 'user_id' => $id,
+ ]);
+ }
+ }
+ foreach ($data['artist_id'] as $key => $id) {
+ if ($id || $data['artist_url'][$key]) {
+ DB::table('character_image_creators')->insert([
+ 'character_image_id' => $image->id,
+ 'type' => 'Artist',
+ 'url' => $data['artist_url'][$key],
+ 'user_id' => $id,
+ ]);
+ }
+ }
+
+ // Save image
+ $this->handleImage($data['image'], $image->imageDirectory, $image->imageFileName, null, isset($data['default_image']));
+
+ // Save thumbnail first before processing full image
+ if (isset($data['use_cropper'])) {
+ $this->cropThumbnail(Arr::only($data, ['x0', 'x1', 'y0', 'y1']), $image, $isMyo);
+ } else {
+ $this->handleImage($data['thumbnail'], $image->imageDirectory, $image->thumbnailFileName, null, isset($data['default_image']));
+ }
+
+ // Process and save the image itself
+ if (!$isMyo) {
+ $this->processImage($image);
+ }
+
+ // Attach features
+ foreach ($data['feature_id'] as $key => $featureId) {
+ if ($featureId) {
+ $feature = CharacterFeature::create(['character_image_id' => $image->id, 'feature_id' => $featureId, 'data' => $data['feature_data'][$key]]);
+ }
+ }
+
+ return $image;
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return false;
+ }
+
+ /**
+ * Trims and optionally resizes and watermarks an image.
+ *
+ * @param \App\Models\Character\CharacterImage $characterImage
+ */
+ private function processImage($characterImage) {
+ // Trim transparent parts of image.
+ $image = Image::make($characterImage->imagePath.'/'.$characterImage->imageFileName)->trim('transparent');
+
+ if (Config::get('lorekeeper.settings.masterlist_image_automation') == 1) {
+ // Make the image be square
+ $imageWidth = $image->width();
+ $imageHeight = $image->height();
+
+ if ($imageWidth > $imageHeight) {
+ // Landscape
+ $canvas = Image::canvas($image->width(), $image->width());
+ $image = $canvas->insert($image, 'center');
+ } else {
+ // Portrait
+ $canvas = Image::canvas($image->height(), $image->height());
+ $image = $canvas->insert($image, 'center');
+ }
+ }
+
+ if (Config::get('lorekeeper.settings.masterlist_image_format') != 'png' && Config::get('lorekeeper.settings.masterlist_image_format') != null && Config::get('lorekeeper.settings.masterlist_image_background') != null) {
+ $canvas = Image::canvas($image->width(), $image->height(), Config::get('lorekeeper.settings.masterlist_image_background'));
+ $image = $canvas->insert($image, 'center');
+ }
+
+ if (Config::get('lorekeeper.settings.store_masterlist_fullsizes') == 1) {
+ // Generate fullsize hash if not already generated,
+ // then save the full-sized image
+ if (!$characterImage->fullsize_hash) {
+ $characterImage->fullsize_hash = randomString(15);
+ $characterImage->save();
+ }
+
+ if (Config::get('lorekeeper.settings.masterlist_fullsizes_cap') != 0) {
+ $imageWidth = $image->width();
+ $imageHeight = $image->height();
+
+ if ($imageWidth > $imageHeight) {
+ // Landscape
+ $image->resize(Config::get('lorekeeper.settings.masterlist_fullsizes_cap'), null, function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ } else {
+ // Portrait
+ $image->resize(null, Config::get('lorekeeper.settings.masterlist_fullsizes_cap'), function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ }
+ }
+
+ // Save the processed image
+ $image->save($characterImage->imagePath.'/'.$characterImage->fullsizeFileName, 100, Config::get('lorekeeper.settings.masterlist_image_format'));
+ } else {
+ // Delete fullsize if it was previously created.
+ if (isset($characterImage->fullsize_hash) ? file_exists(public_path($characterImage->imageDirectory.'/'.$characterImage->fullsizeFileName)) : false) {
+ unlink($characterImage->imagePath.'/'.$characterImage->fullsizeFileName);
+ }
+ }
+
+ // Resize image if desired
+ if (Config::get('lorekeeper.settings.masterlist_image_dimension') != 0) {
+ $imageWidth = $image->width();
+ $imageHeight = $image->height();
+
+ if ($imageWidth > $imageHeight) {
+ // Landscape
+ $image->resize(null, Config::get('lorekeeper.settings.masterlist_image_dimension'), function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ } else {
+ // Portrait
+ $image->resize(Config::get('lorekeeper.settings.masterlist_image_dimension'), null, function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ }
+ }
+ // Watermark the image if desired
+ if (Config::get('lorekeeper.settings.watermark_masterlist_images') == 1) {
+ $watermark = Image::make('images/watermark.png');
+ $image->insert($watermark, 'center');
+ }
+
+ // Save the processed image
+ $image->save($characterImage->imagePath.'/'.$characterImage->imageFileName, 100, Config::get('lorekeeper.settings.masterlist_image_format'));
+ }
+
+ /**
+ * Crops a thumbnail for the given image.
+ *
+ * @param array $points
+ * @param \App\Models\Character\CharacterImage $characterImage
+ * @param mixed $isMyo
+ */
+ private function cropThumbnail($points, $characterImage, $isMyo = false) {
+ $image = Image::make($characterImage->imagePath.'/'.$characterImage->imageFileName);
+
+ if (Config::get('lorekeeper.settings.masterlist_image_format') != 'png' && Config::get('lorekeeper.settings.masterlist_image_format') != null && Config::get('lorekeeper.settings.masterlist_image_background') != null) {
+ $canvas = Image::canvas($image->width(), $image->height(), Config::get('lorekeeper.settings.masterlist_image_background'));
+ $image = $canvas->insert($image, 'center');
+ $trimColor = true;
+ }
+
+ if (Config::get('lorekeeper.settings.watermark_masterlist_thumbnails') == 1 && !$isMyo) {
+ // Trim transparent parts of image.
+ $image->trim(isset($trimColor) && $trimColor ? 'top-left' : 'transparent');
+
+ if (Config::get('lorekeeper.settings.masterlist_image_automation') == 1) {
+ // Make the image be square
+ $imageWidth = $image->width();
+ $imageHeight = $image->height();
+
+ if ($imageWidth > $imageHeight) {
+ // Landscape
+ $canvas = Image::canvas($image->width(), $image->width());
+ $image = $canvas->insert($image, 'center');
+ } else {
+ // Portrait
+ $canvas = Image::canvas($image->height(), $image->height());
+ $image = $canvas->insert($image, 'center');
+ }
+ }
+
+ $cropWidth = Config::get('lorekeeper.settings.masterlist_thumbnails.width');
+ $cropHeight = Config::get('lorekeeper.settings.masterlist_thumbnails.height');
+
+ $imageWidthOld = $image->width();
+ $imageHeightOld = $image->height();
+
+ $trimOffsetX = $imageWidthOld - $image->width();
+ $trimOffsetY = $imageHeightOld - $image->height();
+
+ if (Config::get('lorekeeper.settings.watermark_masterlist_images') == 1) {
+ // Resize image if desired, so that the watermark is applied to the correct size of image
+ if (Config::get('lorekeeper.settings.masterlist_image_dimension') != 0) {
+ $imageWidth = $image->width();
+ $imageHeight = $image->height();
+
+ if ($imageWidth > $imageHeight) {
+ // Landscape
+ $image->resize(null, Config::get('lorekeeper.settings.masterlist_image_dimension'), function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ } else {
+ // Portrait
+ $image->resize(Config::get('lorekeeper.settings.masterlist_image_dimension'), null, function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ }
+ }
+ // Watermark the image
+ $watermark = Image::make('images/watermark.png');
+ $image->insert($watermark, 'center');
+ }
+ // Now shrink the image
+
+ $imageWidth = $image->width();
+ $imageHeight = $image->height();
+
+ if ($imageWidth > $imageHeight) {
+ // Landscape
+ $image->resize(null, $cropWidth, function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ } else {
+ // Portrait
+ $image->resize($cropHeight, null, function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+ }
+
+ if (Config::get('lorekeeper.settings.masterlist_image_automation') == 0) {
+ $xOffset = 0 + (($points['x0'] - $trimOffsetX) > 0 ? ($points['x0'] - $trimOffsetX) : 0);
+ if (($xOffset + $cropWidth) > $image->width()) {
+ $xOffsetNew = $cropWidth - ($image->width() - $xOffset);
+ }
+ if (isset($xOffsetNew)) {
+ if (($xOffsetNew + $cropWidth) > $image->width()) {
+ $xOffsetNew = $image->width() - $cropWidth;
+ }
+ }
+ $yOffset = 0 + (($points['y0'] - $trimOffsetY) > 0 ? ($points['y0'] - $trimOffsetY) : 0);
+ if (($yOffset + $cropHeight) > $image->height()) {
+ $yOffsetNew = $cropHeight - ($image->height() - $yOffset);
+ }
+ if (isset($yOffsetNew)) {
+ if (($yOffsetNew + $cropHeight) > $image->height()) {
+ $yOffsetNew = $image->height() - $cropHeight;
+ }
+ }
+
+ // Crop according to the selected area
+ $image->crop($cropWidth, $cropHeight, $xOffsetNew ?? $xOffset, $yOffsetNew ?? $yOffset);
+ }
+ } else {
+ $cropWidth = $points['x1'] - $points['x0'];
+ $cropHeight = $points['y1'] - $points['y0'];
+
+ if (Config::get('lorekeeper.settings.masterlist_image_automation') == 0) {
+ // Crop according to the selected area
+ $image->crop($cropWidth, $cropHeight, $points['x0'], $points['y0']);
+ }
+
+ // Resize to fit the thumbnail size
+ $image->resize(Config::get('lorekeeper.settings.masterlist_thumbnails.width'), Config::get('lorekeeper.settings.masterlist_thumbnails.height'));
+ }
+
+ // Save the thumbnail
+ $image->save($characterImage->thumbnailPath.'/'.$characterImage->thumbnailFileName, 100, Config::get('lorekeeper.settings.masterlist_image_format'));
+ }
+
+ /**
+ * Generates a list of features for displaying.
+ *
+ * @param \App\Models\Character\CharacterImage $image
+ *
+ * @return string
+ */
+ private function generateFeatureList($image) {
+ $result = '';
+ foreach ($image->features as $feature) {
+ $result .= ''.($feature->feature->category ? ''.$feature->feature->category->displayName.': ' : '').$feature->feature->displayName.'
';
+ }
+
+ return $result;
+ }
+
+ /**
+ * Generates a list of image credits for displaying.
+ *
+ * @param \App\Models\Character\CharacterImage $image
+ *
+ * @return string
+ */
+ private function generateCredits($image) {
+ $result = ['designers' => '', 'artists' => ''];
+ foreach ($image->designers as $designer) {
+ $result['designers'] .= ''.$designer->displayLink().'
';
+ }
+ foreach ($image->artists as $artist) {
+ $result['artists'] .= ''.$artist->displayLink().'
';
+ }
+
+ return $result;
+ }
}
diff --git a/app/Services/CriterionService.php b/app/Services/CriterionService.php
index 00b7b0a635..4f1e7cdcbe 100644
--- a/app/Services/CriterionService.php
+++ b/app/Services/CriterionService.php
@@ -1,15 +1,13 @@
-handleActive(isset($data['is_active']), $criterion);
$criterion->save();
-
+
return $this->commitReturn($criterion);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Update a criterion.
*
- * @param array $data
+ * @param array $data
+ * @param mixed $criterion
+ *
* @return \App\Models\Criterion\Criterion|bool
*/
- public function updateCriterion($criterion, $data)
- {
+ public function updateCriterion($criterion, $data) {
DB::beginTransaction();
try {
- if(isset($data['sort'])) $this->handleSort($data['sort'], CriterionStep::class);
+ if (isset($data['sort'])) {
+ $this->handleSort($data['sort'], CriterionStep::class);
+ }
$this->handleActive(isset($data['is_active']), $criterion);
- if(isset($data['is_guide_active'])) $criterion->is_guide_active = 1;
- else $criterion->is_guide_active = 0;
-
+ if (isset($data['is_guide_active'])) {
+ $criterion->is_guide_active = 1;
+ } else {
+ $criterion->is_guide_active = 0;
+ }
+
$criterion->update($data);
$criterion->save();
-
+
return $this->commitReturn($criterion);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
- /**
- * Handles saving the sorting order for steps
- */
- private function handleSort($sort, $model) {
- $ids = explode(',', $sort);
- $steps = $model::whereIn('id', $ids)->orderByRaw(DB::raw('FIELD(id, '.implode(',', $ids).')'))->get();
- if(count($steps) != count($ids)) throw new \Exception("Invalid step included in sorting order.");
-
- $count = 0;
- foreach($steps as $step)
- {
- $step->order = $count;
- $step->save();
- $count++;
- }
- }
-
- /** Handles setting the active setting on a given object */
- private function handleActive($isActive, $object) {
- if($isActive) $object->is_active = 1;
- else $object->is_active = 0;
- }
-
- /**
+ /**
* Create a criterion Step.
*
- * @param array $data
+ * @param array $data
+ *
* @return \App\Models\Criterion\Criterion|bool
*/
- public function createCriterionStep($data)
- {
+ public function createCriterionStep($data) {
DB::beginTransaction();
try {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
-
+
$step = CriterionStep::create($data);
$this->handleActive(isset($data['is_active']), $step);
-
- if ($image) $this->handleImage($image, $step->imagePath, $step->imageFileName);
-
- if($data['type'] === 'input' || $data['type'] === 'boolean') {
+
+ if ($image) {
+ $this->handleImage($image, $step->imagePath, $step->imageFileName);
+ }
+
+ if ($data['type'] === 'input' || $data['type'] === 'boolean') {
// For these two types we need to default create a single option to represent some additional data
$step->input_calc_type = 'multiplicative';
-
+
CriterionStepOption::create([
- 'name' => $data['type'],
- 'amount' => 1,
- 'is_active' => 1,
- 'criterion_step_id' => $step->id
+ 'name' => $data['type'],
+ 'amount' => 1,
+ 'is_active' => 1,
+ 'criterion_step_id' => $step->id,
]);
}
-
+
$step->save();
+
return $this->commitReturn($step);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Update a criterion step.
*
- * @param array $data
+ * @param array $data
+ * @param mixed $step
+ *
* @return \App\Models\Criterion\Criterion|bool
*/
- public function updateCriterionStep($step, $data)
- {
+ public function updateCriterionStep($step, $data) {
DB::beginTransaction();
try {
// If we switch type, we want to just delete the existing options cause they're likely not relevant anymore
- if($step->type !== $data['type']) {
- foreach($step->options as $option) {
+ if ($step->type !== $data['type']) {
+ foreach ($step->options as $option) {
$this->deleteCriterionOption($option);
}
- if($data['type'] === 'input' || $data['type'] === 'boolean') {
+ if ($data['type'] === 'input' || $data['type'] === 'boolean') {
// For these two types we need to default create a single option to represent some additional data
$step->input_calc_type = 'multiplicative';
-
+
CriterionStepOption::create([
- 'name' => $data['type'],
- 'amount' => 1,
- 'is_active' => 1,
- 'criterion_step_id' => $step->id
+ 'name' => $data['type'],
+ 'amount' => 1,
+ 'is_active' => 1,
+ 'criterion_step_id' => $step->id,
]);
}
- } else if($data['type'] === 'input' || $data['type'] === 'boolean') {
+ } elseif ($data['type'] === 'input' || $data['type'] === 'boolean') {
$optionData = $data['options'];
$option = CriterionStepOption::where('id', $optionData['id'])->first();
$option->update($optionData);
$option->save();
} else {
- if(isset($data['sort'])) $this->handleSort($data['sort'], CriterionStepOption::class);
+ if (isset($data['sort'])) {
+ $this->handleSort($data['sort'], CriterionStepOption::class);
+ }
+ }
+
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ } else {
+ $data['parsed_description'] = '';
}
-
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
- else $data['parsed_description'] = '';
-
-
- if(isset($data['remove_image'])){
- if($step && $step->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($step->imagePath, $step->imageFileName);
+
+ if (isset($data['remove_image'])) {
+ if ($step && $step->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($step->imagePath, $step->imageFileName);
}
unset($data['remove_image']);
}
-
- $image = null;
- if(isset($data['image']) && $data['image']) {
+
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
}
-
- if ($step) $this->handleImage($image, $step->imagePath, $step->imageFileName);
-
+
+ if ($step) {
+ $this->handleImage($image, $step->imagePath, $step->imageFileName);
+ }
+
$step->update($data);
$this->handleActive(isset($data['is_active']), $step);
$step->save();
+
return $this->commitReturn($step);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
-
+
/**
* Create a criterion option.
*
- * @param array $data
+ * @param array $data
+ *
* @return \App\Models\Criterion\Criterion|bool
*/
- public function createCriterionOption($data)
- {
+ public function createCriterionOption($data) {
DB::beginTransaction();
try {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
$option = CriterionStepOption::create($data);
$this->handleActive(isset($data['is_active']), $option);
-
+
$option->save();
-
+
return $this->commitReturn($option);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Update a criterion option.
*
- * @param array $data
+ * @param array $data
+ * @param mixed $option
+ *
* @return \App\Models\Criterion\Criterion|bool
*/
- public function updateCriterionOption($option, $data)
- {
+ public function updateCriterionOption($option, $data) {
DB::beginTransaction();
try {
-
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
$this->handleActive(isset($data['is_active']), $option);
$option->update($data);
$option->save();
-
+
return $this->commitReturn($option);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/** Deletes a Criterion (and it's associated steps and options) */
- public function deleteCriterion($criterion){
+ public function deleteCriterion($criterion) {
DB::beginTransaction();
try {
$steps = $criterion->steps;
-
- foreach($steps as $step) {
+
+ foreach ($steps as $step) {
$this->deleteCriterionStep($step);
}
-
+
$criterion->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/** Deletes a step (and it's associated options) */
- public function deleteCriterionStep($step){
+ public function deleteCriterionStep($step) {
DB::beginTransaction();
try {
$options = $step->options;
-
- foreach($options as $option) {
+
+ foreach ($options as $option) {
$this->deleteCriterionOption($option);
}
-
+
$step->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/** Deletes an option */
- public function deleteCriterionOption($option){
+ public function deleteCriterionOption($option) {
DB::beginTransaction();
try {
$option->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
-
}
-
+
/** Populates criterion relationships for prompts, galleries, etc. */
- public function populateCriteria($data, $entity, $relationshipClass){
+ public function populateCriteria($data, $entity, $relationshipClass) {
// clear out old relationships
$entity->criteria()->delete();
-
- if(isset($data['criterion_id'])) {
- foreach($data['criterion_id'] as $key => $criterionId) {
+
+ if (isset($data['criterion_id'])) {
+ foreach ($data['criterion_id'] as $key => $criterionId) {
$relationshipClass::create([
// so it can be prompt_id or gallery_id
strtolower(class_basename($entity)).'_id' => $entity->id,
- 'criterion_id' => $criterionId,
- 'min_requirements' => isset($data['criterion'][$criterionId]) ? json_encode($data['criterion'][$criterionId]) : null,
+ 'criterion_id' => $criterionId,
+ 'min_requirements' => isset($data['criterion'][$criterionId]) ? json_encode($data['criterion'][$criterionId]) : null,
]);
}
}
}
-}
\ No newline at end of file
+
+ /**
+ * Handles saving the sorting order for steps.
+ *
+ * @param mixed $sort
+ * @param mixed $model
+ */
+ private function handleSort($sort, $model) {
+ $ids = explode(',', $sort);
+ $steps = $model::whereIn('id', $ids)->orderByRaw(DB::raw('FIELD(id, '.implode(',', $ids).')'))->get();
+
+ if (count($steps) != count($ids)) {
+ throw new \Exception('Invalid step included in sorting order.');
+ }
+
+ $count = 0;
+ foreach ($steps as $step) {
+ $step->order = $count;
+ $step->save();
+ $count++;
+ }
+ }
+
+ /** Handles setting the active setting on a given object */
+ private function handleActive($isActive, $object) {
+ if ($isActive) {
+ $object->is_active = 1;
+ } else {
+ $object->is_active = 0;
+ }
+ }
+}
diff --git a/app/Services/CurrencyManager.php b/app/Services/CurrencyManager.php
index 7c0e2c64dc..7324525733 100644
--- a/app/Services/CurrencyManager.php
+++ b/app/Services/CurrencyManager.php
@@ -1,19 +1,16 @@
-is_user_owned) throw new \Exception("This currency cannot be held by users.");
+ if (!$currency) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ if (!$currency->is_user_owned) {
+ throw new \Exception('This currency cannot be held by users.');
+ }
- if($data['quantity'] < 0)
- foreach($users as $user) {
+ if ($data['quantity'] < 0) {
+ foreach ($users as $user) {
$this->debitCurrency($user, $staff, 'Staff Removal', $data['data'], $currency, -$data['quantity']);
Notifications::create('CURRENCY_REMOVAL', $user, [
- 'currency_name' => $currency->name,
+ 'currency_name' => $currency->name,
'currency_quantity' => -$data['quantity'],
- 'sender_url' => $staff->url,
- 'sender_name' => $staff->name
+ 'sender_url' => $staff->url,
+ 'sender_name' => $staff->name,
]);
}
- else
- foreach($users as $user) {
+ } else {
+ foreach ($users as $user) {
$this->creditCurrency($staff, $user, 'Staff Grant', $data['data'], $currency, $data['quantity']);
Notifications::create('CURRENCY_GRANT', $user, [
- 'currency_name' => $currency->name,
+ 'currency_name' => $currency->name,
'currency_quantity' => $data['quantity'],
- 'sender_url' => $staff->url,
- 'sender_name' => $staff->name
+ 'sender_url' => $staff->url,
+ 'sender_name' => $staff->name,
]);
}
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
@@ -78,250 +85,303 @@ public function grantUserCurrencies($data, $staff)
* Admin function for granting currency to a character.
* Removes currency if the quantity given is less than 0.
*
- * @param array $data
- * @param \App\Models\Character\Character $staff
- * @param \App\Models\User\User $staff
- * @return bool
+ * @param array $data
+ * @param \App\Models\Character\Character $staff
+ * @param \App\Models\User\User $staff
+ * @param mixed $character
+ *
+ * @return bool
*/
- public function grantCharacterCurrencies($data, $character, $staff)
- {
+ public function grantCharacterCurrencies($data, $character, $staff) {
DB::beginTransaction();
try {
- if($data['quantity'] == 0) throw new \Exception("Please enter a non-zero quantity.");
+ if ($data['quantity'] == 0) {
+ throw new \Exception('Please enter a non-zero quantity.');
+ }
- if(!$character) throw new \Exception("Invalid character selected.");
+ if (!$character) {
+ throw new \Exception('Invalid character selected.');
+ }
// Process currency
$currency = Currency::find($data['currency_id']);
- if(!$currency) throw new \Exception("Invalid currency selected.");
- if(!$currency->is_character_owned) throw new \Exception("This currency cannot be held by characters.");
- if($data['quantity'] < 0) {
+ if (!$currency) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ if (!$currency->is_character_owned) {
+ throw new \Exception('This currency cannot be held by characters.');
+ }
+ if ($data['quantity'] < 0) {
$this->debitCurrency($character, $staff, 'Staff Removal', $data['data'], $currency, -$data['quantity']);
- if(isset($character->user)) {
- Notifications::create('CHARACTER_CURRENCY_REMOVAL', $character->user, [
- 'currency_name' => $currency->name,
- 'currency_quantity' => -$data['quantity'],
- 'sender_url' => $staff->url,
- 'sender_name' => $staff->name,
- 'character_name' => $character->fullName,
- 'character_slug' => $character->slug
- ]);
+ if (isset($character->user)) {
+ Notifications::create('CHARACTER_CURRENCY_REMOVAL', $character->user, [
+ 'currency_name' => $currency->name,
+ 'currency_quantity' => -$data['quantity'],
+ 'sender_url' => $staff->url,
+ 'sender_name' => $staff->name,
+ 'character_name' => $character->fullName,
+ 'character_slug' => $character->slug,
+ ]);
}
- }
- else{
+ } else {
$this->creditCurrency($staff, $character, 'Staff Grant', $data['data'], $currency, $data['quantity']);
- if(isset($character->user)) {
- Notifications::create('CHARACTER_CURRENCY_GRANT', $character->user, [
- 'currency_name' => $currency->name,
- 'currency_quantity' => $data['quantity'],
- 'sender_url' => $staff->url,
- 'sender_name' => $staff->name,
- 'character_name' => $character->fullName,
- 'character_slug' => $character->slug
- ]);
+ if (isset($character->user)) {
+ Notifications::create('CHARACTER_CURRENCY_GRANT', $character->user, [
+ 'currency_name' => $currency->name,
+ 'currency_quantity' => $data['quantity'],
+ 'sender_url' => $staff->url,
+ 'sender_name' => $staff->name,
+ 'character_name' => $character->fullName,
+ 'character_slug' => $character->slug,
+ ]);
}
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Transfers currency between users.
*
- * @param \App\Models\User\User $sender
- * @param \App\Models\User\User $recipient
- * @param \App\Models\Currency\Currency $currency
- * @param int $quantity
- * @return bool
+ * @param \App\Models\User\User $sender
+ * @param \App\Models\User\User $recipient
+ * @param \App\Models\Currency\Currency $currency
+ * @param int $quantity
+ *
+ * @return bool
*/
- public function transferCurrency($sender, $recipient, $currency, $quantity)
- {
+ public function transferCurrency($sender, $recipient, $currency, $quantity) {
DB::beginTransaction();
try {
- if(!$recipient) throw new \Exception("Invalid recipient selected.");
- if($recipient->logType == 'User' && !$recipient->hasAlias) throw new \Exception("Cannot transfer currency to a non-verified member.");
- if($recipient->logType == 'User' && $recipient->is_banned) throw new \Exception("Cannot transfer currency to a banned member.");
- if(!$currency) throw new \Exception("Invalid currency selected.");
- if($quantity <= 0) throw new \Exception("Invalid quantity entered.");
-
+ if (!$recipient) {
+ throw new \Exception('Invalid recipient selected.');
+ }
+ if ($recipient->logType == 'User' && !$recipient->hasAlias) {
+ throw new \Exception('Cannot transfer currency to a non-verified member.');
+ }
+ if ($recipient->logType == 'User' && $recipient->is_banned) {
+ throw new \Exception('Cannot transfer currency to a banned member.');
+ }
+ if (!$currency) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ if ($quantity <= 0) {
+ throw new \Exception('Invalid quantity entered.');
+ }
- if($this->debitCurrency($sender, $recipient, null, null, $currency, $quantity) &&
- $this->creditCurrency($sender, $recipient, null, null, $currency, $quantity))
- {
+ if ($this->debitCurrency($sender, $recipient, null, null, $currency, $quantity) &&
+ $this->creditCurrency($sender, $recipient, null, null, $currency, $quantity)) {
$this->createLog($sender->id, $sender->logType, $recipient->id, $recipient->logType, 'User Transfer', null, $currency->id, $quantity);
Notifications::create('CURRENCY_TRANSFER', $recipient, [
- 'currency_name' => $currency->name,
+ 'currency_name' => $currency->name,
'currency_quantity' => $quantity,
- 'sender_url' => $sender->url,
- 'sender_name' => $sender->name
+ 'sender_url' => $sender->url,
+ 'sender_name' => $sender->name,
]);
+
return $this->commitReturn(true);
}
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Transfers currency between a user and character.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $sender
- * @param \App\Models\User\User|\App\Models\Character\Character $recipient
- * @param \App\Models\Currency\Currency $currency
- * @param int $quantity
- * @return bool
+ * @param \App\Models\Character\Character|\App\Models\User\User $sender
+ * @param \App\Models\Character\Character|\App\Models\User\User $recipient
+ * @param \App\Models\Currency\Currency $currency
+ * @param int $quantity
+ *
+ * @return bool
*/
- public function transferCharacterCurrency($sender, $recipient, $currency, $quantity)
- {
+ public function transferCharacterCurrency($sender, $recipient, $currency, $quantity) {
DB::beginTransaction();
try {
- if(!$recipient) throw new \Exception("Invalid recipient selected.");
- if(!$sender) throw new \Exception("Invalid sender selected.");
- if($recipient->logType == 'Character' && $sender->logType == 'Character') throw new \Exception("Cannot transfer currencies between characters.");
- if($recipient->logType == 'Character' && !$sender->hasPower('edit_inventories') && !$recipient->is_visible) throw new \Exception("Invalid character selected.");
- if(!$currency) throw new \Exception("Invalid currency selected.");
- if($quantity <= 0) throw new \Exception("Invalid quantity entered.");
-
+ if (!$recipient) {
+ throw new \Exception('Invalid recipient selected.');
+ }
+ if (!$sender) {
+ throw new \Exception('Invalid sender selected.');
+ }
+ if ($recipient->logType == 'Character' && $sender->logType == 'Character') {
+ throw new \Exception('Cannot transfer currencies between characters.');
+ }
+ if ($recipient->logType == 'Character' && !$sender->hasPower('edit_inventories') && !$recipient->is_visible) {
+ throw new \Exception('Invalid character selected.');
+ }
+ if (!$currency) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ if ($quantity <= 0) {
+ throw new \Exception('Invalid quantity entered.');
+ }
- if($this->debitCurrency($sender, $recipient, null, null, $currency, $quantity) &&
- $this->creditCurrency($sender, $recipient, null, null, $currency, $quantity))
- {
+ if ($this->debitCurrency($sender, $recipient, null, null, $currency, $quantity) &&
+ $this->creditCurrency($sender, $recipient, null, null, $currency, $quantity)) {
$this->createLog($sender->id, $sender->logType, $recipient->id, $recipient->logType, $sender->logType == 'User' ? 'User → Character Transfer' : 'Character → User Transfer', null, $currency->id, $quantity);
+
return $this->commitReturn(true);
}
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Credits currency to a user or character.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $sender
- * @param \App\Models\User\User|\App\Models\Character\Character $recipient
- * @param string $type
- * @param string $data
- * @param \App\Models\Currency\Currency $currency
- * @param int $quantity
- * @return bool
+ * @param \App\Models\Character\Character|\App\Models\User\User $sender
+ * @param \App\Models\Character\Character|\App\Models\User\User $recipient
+ * @param string $type
+ * @param string $data
+ * @param \App\Models\Currency\Currency $currency
+ * @param int $quantity
+ *
+ * @return bool
*/
- public function creditCurrency($sender, $recipient, $type, $data, $currency, $quantity)
- {
+ public function creditCurrency($sender, $recipient, $type, $data, $currency, $quantity) {
DB::beginTransaction();
try {
- if(is_numeric($currency)) $currency = Currency::find($currency);
- if($recipient->logType == 'User') {
+ if (is_numeric($currency)) {
+ $currency = Currency::find($currency);
+ }
+ if ($recipient->logType == 'User') {
$record = UserCurrency::where('user_id', $recipient->id)->where('currency_id', $currency->id)->first();
- if($record) {
+ if ($record) {
// Laravel doesn't support composite primary keys, so directly updating the DB row here
DB::table('user_currencies')->where('user_id', $recipient->id)->where('currency_id', $currency->id)->update(['quantity' => $record->quantity + $quantity]);
- }
- else {
+ } else {
$record = UserCurrency::create(['user_id' => $recipient->id, 'currency_id' => $currency->id, 'quantity' => $quantity]);
}
- }
- else {
+ } else {
$record = CharacterCurrency::where('character_id', $recipient->id)->where('currency_id', $currency->id)->first();
- if($record) {
+ if ($record) {
// Laravel doesn't support composite primary keys, so directly updating the DB row here
DB::table('character_currencies')->where('character_id', $recipient->id)->where('currency_id', $currency->id)->update(['quantity' => $record->quantity + $quantity]);
- }
- else {
+ } else {
$record = CharacterCurrency::create(['character_id' => $recipient->id, 'currency_id' => $currency->id, 'quantity' => $quantity]);
}
}
- if($type && !$this->createLog($sender ? $sender->id : null, $sender ? $sender->logType : null,
- $recipient ? $recipient->id : null, $recipient ? $recipient->logType : null,
- $type, $data, $currency->id, $quantity)) throw new \Exception("Failed to create log.");
+ if ($type && !$this->createLog(
+ $sender ? $sender->id : null,
+ $sender ? $sender->logType : null,
+ $recipient ? $recipient->id : null,
+ $recipient ? $recipient->logType : null,
+ $type,
+ $data,
+ $currency->id,
+ $quantity
+ )) {
+ throw new \Exception('Failed to create log.');
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Debits currency from a user or character.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $sender
- * @param \App\Models\User\User|\App\Models\Character\Character $recipient
- * @param string $type
- * @param string $data
- * @param \App\Models\Currency\Currency $currency
- * @param int $quantity
- * @return bool
+ * @param \App\Models\Character\Character|\App\Models\User\User $sender
+ * @param \App\Models\Character\Character|\App\Models\User\User $recipient
+ * @param string $type
+ * @param string $data
+ * @param \App\Models\Currency\Currency $currency
+ * @param int $quantity
+ *
+ * @return bool
*/
- public function debitCurrency($sender, $recipient, $type, $data, $currency, $quantity)
- {
+ public function debitCurrency($sender, $recipient, $type, $data, $currency, $quantity) {
DB::beginTransaction();
try {
- if($sender->logType == 'User') {
+ if ($sender->logType == 'User') {
$record = UserCurrency::where('user_id', $sender->id)->where('currency_id', $currency->id)->first();
- if(!$record || $record->quantity < $quantity) throw new \Exception("Not enough ".$currency->name." to carry out this action.");
+ if (!$record || $record->quantity < $quantity) {
+ throw new \Exception('Not enough '.$currency->name.' to carry out this action.');
+ }
// Laravel doesn't support composite primary keys, so directly updating the DB row here
DB::table('user_currencies')->where('user_id', $sender->id)->where('currency_id', $currency->id)->update(['quantity' => $record->quantity - $quantity]);
- }
- else {
+ } else {
$record = CharacterCurrency::where('character_id', $sender->id)->where('currency_id', $currency->id)->first();
- if(!$record || $record->quantity < $quantity) throw new \Exception("Not enough ".$currency->name." to carry out this action.");
+ if (!$record || $record->quantity < $quantity) {
+ throw new \Exception('Not enough '.$currency->name.' to carry out this action.');
+ }
// Laravel doesn't support composite primary keys, so directly updating the DB row here
DB::table('character_currencies')->where('character_id', $sender->id)->where('currency_id', $currency->id)->update(['quantity' => $record->quantity - $quantity]);
}
- if($type && !$this->createLog($sender ? $sender->id : null, $sender ? $sender->logType : null,
- $recipient ? $recipient->id : null, $recipient ? $recipient->logType : null,
- $type, $data, $currency->id, -$quantity)) throw new \Exception("Failed to create log.");
+ if ($type && !$this->createLog(
+ $sender ? $sender->id : null,
+ $sender ? $sender->logType : null,
+ $recipient ? $recipient->id : null,
+ $recipient ? $recipient->logType : null,
+ $type,
+ $data,
+ $currency->id,
+ -$quantity
+ )) {
+ throw new \Exception('Failed to create log.');
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Creates a currency log.
*
- * @param int $senderId
- * @param string $senderType
- * @param int $recipientId
- * @param string $recipientType
- * @param string $type
- * @param string $data
- * @param int $currencyId
- * @param int $quantity
- * @return int
+ * @param int $senderId
+ * @param string $senderType
+ * @param int $recipientId
+ * @param string $recipientType
+ * @param string $type
+ * @param string $data
+ * @param int $currencyId
+ * @param int $quantity
+ *
+ * @return int
*/
- public function createLog($senderId, $senderType, $recipientId, $recipientType, $type, $data, $currencyId, $quantity)
- {
+ public function createLog($senderId, $senderType, $recipientId, $recipientType, $type, $data, $currencyId, $quantity) {
return DB::table('currencies_log')->insert(
[
- 'sender_id' => $senderId,
- 'sender_type' => $senderType,
- 'recipient_id' => $recipientId,
+ 'sender_id' => $senderId,
+ 'sender_type' => $senderType,
+ 'recipient_id' => $recipientId,
'recipient_type' => $recipientType,
- 'log' => $type . ($data ? ' (' . $data . ')' : ''),
- 'log_type' => $type,
- 'data' => $data, // this should be just a string
- 'currency_id' => $currencyId,
- 'quantity' => $quantity,
- 'created_at' => Carbon::now(),
- 'updated_at' => Carbon::now()
+ 'log' => $type.($data ? ' ('.$data.')' : ''),
+ 'log_type' => $type,
+ 'data' => $data, // this should be just a string
+ 'currency_id' => $currencyId,
+ 'quantity' => $quantity,
+ 'created_at' => Carbon::now(),
+ 'updated_at' => Carbon::now(),
]
);
}
diff --git a/app/Services/CurrencyService.php b/app/Services/CurrencyService.php
index b608d2bbd7..cd6d042633 100644
--- a/app/Services/CurrencyService.php
+++ b/app/Services/CurrencyService.php
@@ -1,17 +1,13 @@
-populateData($data);
$icon = $image = null;
- if(isset($data['icon']) && $data['icon']) {
+ if (isset($data['icon']) && $data['icon']) {
$data['has_icon'] = 1;
$icon = $data['icon'];
unset($data['icon']);
+ } else {
+ $data['has_icon'] = 0;
}
- else $data['has_icon'] = 0;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$currency = Currency::create($data);
- if ($icon) $this->handleImage($icon, $currency->currencyIconPath, $currency->currencyIconFileName);
- if ($image) $this->handleImage($image, $currency->currencyImagePath, $currency->currencyImageFileName);
+ if ($icon) {
+ $this->handleImage($icon, $currency->currencyIconPath, $currency->currencyIconFileName);
+ }
+ if ($image) {
+ $this->handleImage($image, $currency->currencyImagePath, $currency->currencyImageFileName);
+ }
return $this->commitReturn($currency);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a currency.
*
- * @param \App\Models\Currency\Currency $currency
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Currency\Currency
+ * @param \App\Models\Currency\Currency $currency
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Currency\Currency|bool
*/
- public function updateCurrency($currency, $data, $user)
- {
+ public function updateCurrency($currency, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(!isset($data['is_user_owned']) && !isset($data['is_character_owned'])) throw new \Exception("Please choose if this currency is attached to users and/or characters.");
- if(Currency::where('name', $data['name'])->where('id', '!=', $currency->id)->exists()) throw new \Exception("The name has already been taken.");
- if(isset($data['abbreviation']) && Currency::where('abbreviation', $data['abbreviation'])->where('id', '!=', $currency->id)->exists()) throw new \Exception("The abbreviation has already been taken.");
+ if (!isset($data['is_user_owned']) && !isset($data['is_character_owned'])) {
+ throw new \Exception('Please choose if this currency is attached to users and/or characters.');
+ }
+ if (Currency::where('name', $data['name'])->where('id', '!=', $currency->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
+ if (isset($data['abbreviation']) && Currency::where('abbreviation', $data['abbreviation'])->where('id', '!=', $currency->id)->exists()) {
+ throw new \Exception('The abbreviation has already been taken.');
+ }
$data = $this->populateData($data, $currency);
$icon = $image = null;
- if(isset($data['icon']) && $data['icon']) {
+ if (isset($data['icon']) && $data['icon']) {
$data['has_icon'] = 1;
$icon = $data['icon'];
unset($data['icon']);
}
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -100,85 +111,41 @@ public function updateCurrency($currency, $data, $user)
$currency->update($data);
- if ($icon) $this->handleImage($icon, $currency->currencyIconPath, $currency->currencyIconFileName);
- if ($image) $this->handleImage($image, $currency->currencyImagePath, $currency->currencyImageFileName);
+ if ($icon) {
+ $this->handleImage($icon, $currency->currencyIconPath, $currency->currencyIconFileName);
+ }
+ if ($image) {
+ $this->handleImage($image, $currency->currencyImagePath, $currency->currencyImageFileName);
+ }
return $this->commitReturn($currency);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
-
- /**
- * Processes user input for creating/updating a currency.
- *
- * @param array $data
- * @param \App\Models\Currency\Currency $currency
- * @return array
- */
- private function populateData($data, $currency = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
- if(!isset($data['is_user_owned'])) $data['is_user_owned'] = 0;
- if(!isset($data['is_character_owned'])) $data['is_character_owned'] = 0;
-
- if(!isset($data['is_displayed'])) $data['is_displayed'] = 0;
-
- if(!isset($data['allow_user_to_user'])) $data['allow_user_to_user'] = 0;
- if(!isset($data['allow_user_to_character'])) $data['allow_user_to_character'] = 0;
- if(!isset($data['allow_character_to_user'])) $data['allow_character_to_user'] = 0;
-
- $data['sort_user'] = $data['sort_character'] = 0;
-
- // Process the checkbox fields
- if(!($data['is_character_owned'] && $data['is_user_owned']))
- {
- $data['allow_user_to_character'] = $data['allow_character_to_user'] = 0;
- }
- if(!$data['is_user_owned'])
- {
- $data['allow_user_to_user'] = $data['is_displayed'] = 0;
- }
-
- if(isset($data['remove_icon']) || isset($data['remove_image']))
- {
- if($currency)
- {
- if($currency->has_icon && $data['remove_icon'])
- {
- $data['has_icon'] = 0;
- $this->deleteImage($currency->currencyIconPath, $currency->currencyIconFileName);
- }
- if($currency->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($currency->currencyImagePath, $currency->currencyImageFileName);
- }
- }
- unset($data['remove_icon']);
- unset($data['remove_image']);
- }
-
- return $data;
+ return $this->rollbackReturn(false);
}
/**
* Deletes a currency.
*
- * @param \App\Models\Currency\Currency $currency
+ * @param \App\Models\Currency\Currency $currency
+ *
* @return bool
*/
- public function deleteCurrency($currency)
- {
+ public function deleteCurrency($currency) {
DB::beginTransaction();
try {
-
- if(DB::table('loots')->where('rewardable_type', 'Currency')->where('rewardable_id', $currency->id)->exists()) throw new \Exception("A loot table currently distributes this currency as a potential reward. Please remove the currency before deleting it.");
- if(DB::table('prompt_rewards')->where('rewardable_type', 'Currency')->where('rewardable_id', $currency->id)->exists()) throw new \Exception("A prompt currently distributes this currency as a reward. Please remove the currency before deleting it.");
- if(DB::table('shop_stock')->where('currency_id', $currency->id)->exists()) throw new \Exception("A shop currently requires this currency to purchase an item. Please change the currency before deleting it.");
+ if (DB::table('loots')->where('rewardable_type', 'Currency')->where('rewardable_id', $currency->id)->exists()) {
+ throw new \Exception('A loot table currently distributes this currency as a potential reward. Please remove the currency before deleting it.');
+ }
+ if (DB::table('prompt_rewards')->where('rewardable_type', 'Currency')->where('rewardable_id', $currency->id)->exists()) {
+ throw new \Exception('A prompt currently distributes this currency as a reward. Please remove the currency before deleting it.');
+ }
+ if (DB::table('shop_stock')->where('currency_id', $currency->id)->exists()) {
+ throw new \Exception('A shop currently requires this currency to purchase an item. Please change the currency before deleting it.');
+ }
// Disabled for now due to issues with JSON lookup with older mysql versions/mariaDB
// if(DB::table('items')->where('data->resell', $currency->id)->exists()) throw new \Exception("An item currently uses this currency for its resale value. Please change the resale information before deleting this currency.");
@@ -189,40 +156,108 @@ public function deleteCurrency($currency)
UserCurrency::where('currency_id', $currency->id)->delete();
CharacterCurrency::where('currency_id', $currency->id)->delete();
- if($currency->has_image) $this->deleteImage($currency->currencyImagePath, $currency->currencyImageFileName);
- if($currency->has_icon) $this->deleteImage($currency->currencyIconPath, $currency->currencyIconFileName);
+ if ($currency->has_image) {
+ $this->deleteImage($currency->currencyImagePath, $currency->currencyImageFileName);
+ }
+ if ($currency->has_icon) {
+ $this->deleteImage($currency->currencyIconPath, $currency->currencyIconFileName);
+ }
$currency->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts currency order.
*
- * @param array $data
- * @param string $type
+ * @param array $data
+ * @param string $type
+ *
* @return bool
*/
- public function sortCurrency($data, $type)
- {
+ public function sortCurrency($data, $type) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the power order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
Currency::where('id', $s)->update([($type == 'user') ? 'sort_user' : 'sort_character' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+
+ /**
+ * Processes user input for creating/updating a currency.
+ *
+ * @param array $data
+ * @param \App\Models\Currency\Currency $currency
+ *
+ * @return array
+ */
+ private function populateData($data, $currency = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ if (!isset($data['is_user_owned'])) {
+ $data['is_user_owned'] = 0;
+ }
+ if (!isset($data['is_character_owned'])) {
+ $data['is_character_owned'] = 0;
+ }
+
+ if (!isset($data['is_displayed'])) {
+ $data['is_displayed'] = 0;
+ }
+
+ if (!isset($data['allow_user_to_user'])) {
+ $data['allow_user_to_user'] = 0;
+ }
+ if (!isset($data['allow_user_to_character'])) {
+ $data['allow_user_to_character'] = 0;
+ }
+ if (!isset($data['allow_character_to_user'])) {
+ $data['allow_character_to_user'] = 0;
+ }
+
+ $data['sort_user'] = $data['sort_character'] = 0;
+
+ // Process the checkbox fields
+ if (!($data['is_character_owned'] && $data['is_user_owned'])) {
+ $data['allow_user_to_character'] = $data['allow_character_to_user'] = 0;
+ }
+ if (!$data['is_user_owned']) {
+ $data['allow_user_to_user'] = $data['is_displayed'] = 0;
+ }
+
+ if (isset($data['remove_icon']) || isset($data['remove_image'])) {
+ if ($currency) {
+ if ($currency->has_icon && $data['remove_icon']) {
+ $data['has_icon'] = 0;
+ $this->deleteImage($currency->currencyIconPath, $currency->currencyIconFileName);
+ }
+ if ($currency->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($currency->currencyImagePath, $currency->currencyImageFileName);
+ }
+ }
+ unset($data['remove_icon']);
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
}
diff --git a/app/Services/ExtensionService.php b/app/Services/ExtensionService.php
index ca931880e1..3141988796 100644
--- a/app/Services/ExtensionService.php
+++ b/app/Services/ExtensionService.php
@@ -1,14 +1,11 @@
-count();
- if($count && isset($destination)) {
+ if ($count && isset($destination)) {
DB::beginTransaction();
try {
Notification::where('notification_type_id', $source)->update(['notification_type_id' => $destination]);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/FeatureService.php b/app/Services/FeatureService.php
index a045f0df38..7e98888094 100644
--- a/app/Services/FeatureService.php
+++ b/app/Services/FeatureService.php
@@ -1,17 +1,14 @@
-populateCategoryData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$category = FeatureCategory::create($data);
- if ($image) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($image) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Update a category.
*
- * @param \App\Models\Feature\FeatureCategory $category
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param \App\Models\Feature\FeatureCategory $category
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return \App\Models\Feature\FeatureCategory|bool
*/
- public function updateFeatureCategory($category, $data, $user)
- {
+ public function updateFeatureCategory($category, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(FeatureCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) throw new \Exception("The name has already been taken.");
+ if (FeatureCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
$data = $this->populateCategoryData($data, $category);
- $image = null;
- if(isset($data['image']) && $data['image']) {
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -87,91 +90,75 @@ public function updateFeatureCategory($category, $data, $user)
$category->update($data);
- if ($category) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($category) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
-
- /**
- * Handle category data.
- *
- * @param array $data
- * @param \App\Models\Feature\FeatureCategory|null $category
- * @return array
- */
- private function populateCategoryData($data, $category = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- if(isset($data['remove_image']))
- {
- if($category && $category->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
- }
- unset($data['remove_image']);
- }
- return $data;
+ return $this->rollbackReturn(false);
}
/**
* Delete a category.
*
- * @param \App\Models\Feature\FeatureCategory $category
+ * @param \App\Models\Feature\FeatureCategory $category
+ *
* @return bool
*/
- public function deleteFeatureCategory($category)
- {
+ public function deleteFeatureCategory($category) {
DB::beginTransaction();
try {
// Check first if the category is currently in use
- if(Feature::where('feature_category_id', $category->id)->exists()) throw new \Exception("A trait with this category exists. Please change its category first.");
-
- if($category->has_image) $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ if (Feature::where('feature_category_id', $category->id)->exists()) {
+ throw new \Exception('A trait with this category exists. Please change its category first.');
+ }
+
+ if ($category->has_image) {
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
$category->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts category order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortFeatureCategory($data)
- {
+ public function sortFeatureCategory($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
FeatureCategory::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
/**********************************************************************************************
-
+
FEATURES
**********************************************************************************************/
@@ -179,81 +166,113 @@ public function sortFeatureCategory($data)
/**
* Creates a new feature.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Feature\Feature
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Feature\Feature|bool
*/
- public function createFeature($data, $user)
- {
+ public function createFeature($data, $user) {
DB::beginTransaction();
try {
- if(isset($data['feature_category_id']) && $data['feature_category_id'] == 'none') $data['feature_category_id'] = null;
- if(isset($data['species_id']) && $data['species_id'] == 'none') $data['species_id'] = null;
- if(isset($data['subtype_id']) && $data['subtype_id'] == 'none') $data['subtype_id'] = null;
-
- if((isset($data['feature_category_id']) && $data['feature_category_id']) && !FeatureCategory::where('id', $data['feature_category_id'])->exists()) throw new \Exception("The selected trait category is invalid.");
- if((isset($data['species_id']) && $data['species_id']) && !Species::where('id', $data['species_id'])->exists()) throw new \Exception("The selected species is invalid.");
- if(isset($data['subtype_id']) && $data['subtype_id'])
- {
+ if (isset($data['feature_category_id']) && $data['feature_category_id'] == 'none') {
+ $data['feature_category_id'] = null;
+ }
+ if (isset($data['species_id']) && $data['species_id'] == 'none') {
+ $data['species_id'] = null;
+ }
+ if (isset($data['subtype_id']) && $data['subtype_id'] == 'none') {
+ $data['subtype_id'] = null;
+ }
+
+ if ((isset($data['feature_category_id']) && $data['feature_category_id']) && !FeatureCategory::where('id', $data['feature_category_id'])->exists()) {
+ throw new \Exception('The selected trait category is invalid.');
+ }
+ if ((isset($data['species_id']) && $data['species_id']) && !Species::where('id', $data['species_id'])->exists()) {
+ throw new \Exception('The selected species is invalid.');
+ }
+ if (isset($data['subtype_id']) && $data['subtype_id']) {
$subtype = Subtype::find($data['subtype_id']);
- if(!(isset($data['species_id']) && $data['species_id'])) throw new \Exception('Species must be selected to select a subtype.');
- if(!$subtype || $subtype->species_id != $data['species_id']) throw new \Exception('Selected subtype invalid or does not match species.');
+ if (!(isset($data['species_id']) && $data['species_id'])) {
+ throw new \Exception('Species must be selected to select a subtype.');
+ }
+ if (!$subtype || $subtype->species_id != $data['species_id']) {
+ throw new \Exception('Selected subtype invalid or does not match species.');
+ }
}
$data = $this->populateData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$feature = Feature::create($data);
- if ($image) $this->handleImage($image, $feature->imagePath, $feature->imageFileName);
+ if ($image) {
+ $this->handleImage($image, $feature->imagePath, $feature->imageFileName);
+ }
return $this->commitReturn($feature);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a feature.
*
- * @param \App\Models\Feature\Feature $feature
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Feature\Feature
+ * @param \App\Models\Feature\Feature $feature
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Feature\Feature|bool
*/
- public function updateFeature($feature, $data, $user)
- {
+ public function updateFeature($feature, $data, $user) {
DB::beginTransaction();
try {
- if(isset($data['feature_category_id']) && $data['feature_category_id'] == 'none') $data['feature_category_id'] = null;
- if(isset($data['species_id']) && $data['species_id'] == 'none') $data['species_id'] = null;
- if(isset($data['subtype_id']) && $data['subtype_id'] == 'none') $data['subtype_id'] = null;
+ if (isset($data['feature_category_id']) && $data['feature_category_id'] == 'none') {
+ $data['feature_category_id'] = null;
+ }
+ if (isset($data['species_id']) && $data['species_id'] == 'none') {
+ $data['species_id'] = null;
+ }
+ if (isset($data['subtype_id']) && $data['subtype_id'] == 'none') {
+ $data['subtype_id'] = null;
+ }
// More specific validation
- if(Feature::where('name', $data['name'])->where('id', '!=', $feature->id)->exists()) throw new \Exception("The name has already been taken.");
- if((isset($data['feature_category_id']) && $data['feature_category_id']) && !FeatureCategory::where('id', $data['feature_category_id'])->exists()) throw new \Exception("The selected trait category is invalid.");
- if((isset($data['species_id']) && $data['species_id']) && !Species::where('id', $data['species_id'])->exists()) throw new \Exception("The selected species is invalid.");
- if(isset($data['subtype_id']) && $data['subtype_id'])
- {
+ if (Feature::where('name', $data['name'])->where('id', '!=', $feature->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
+ if ((isset($data['feature_category_id']) && $data['feature_category_id']) && !FeatureCategory::where('id', $data['feature_category_id'])->exists()) {
+ throw new \Exception('The selected trait category is invalid.');
+ }
+ if ((isset($data['species_id']) && $data['species_id']) && !Species::where('id', $data['species_id'])->exists()) {
+ throw new \Exception('The selected species is invalid.');
+ }
+ if (isset($data['subtype_id']) && $data['subtype_id']) {
$subtype = Subtype::find($data['subtype_id']);
- if(!(isset($data['species_id']) && $data['species_id'])) throw new \Exception('Species must be selected to select a subtype.');
- if(!$subtype || $subtype->species_id != $data['species_id']) throw new \Exception('Selected subtype invalid or does not match species.');
+ if (!(isset($data['species_id']) && $data['species_id'])) {
+ throw new \Exception('Species must be selected to select a subtype.');
+ }
+ if (!$subtype || $subtype->species_id != $data['species_id']) {
+ throw new \Exception('Selected subtype invalid or does not match species.');
+ }
}
$data = $this->populateData($data);
- $image = null;
- if(isset($data['image']) && $data['image']) {
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -261,61 +280,97 @@ public function updateFeature($feature, $data, $user)
$feature->update($data);
- if ($feature) $this->handleImage($image, $feature->imagePath, $feature->imageFileName);
+ if ($feature) {
+ $this->handleImage($image, $feature->imagePath, $feature->imageFileName);
+ }
return $this->commitReturn($feature);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
- /**
- * Processes user input for creating/updating a feature.
- *
- * @param array $data
- * @param \App\Models\Feature\Feature $feature
- * @return array
- */
- private function populateData($data, $feature = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
- if(isset($data['species_id']) && $data['species_id'] == 'none') $data['species_id'] = null;
- if(isset($data['feature_category_id']) && $data['feature_category_id'] == 'none') $data['feature_category_id'] = null;
- if(isset($data['remove_image']))
- {
- if($feature && $feature->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($feature->imagePath, $feature->imageFileName);
- }
- unset($data['remove_image']);
- }
-
- return $data;
- }
-
/**
* Deletes a feature.
*
- * @param \App\Models\Feature\Feature $feature
+ * @param \App\Models\Feature\Feature $feature
+ *
* @return bool
*/
- public function deleteFeature($feature)
- {
+ public function deleteFeature($feature) {
DB::beginTransaction();
try {
// Check first if the feature is currently in use
- if(DB::table('character_features')->where('feature_id', $feature->id)->exists()) throw new \Exception("A character with this trait exists. Please remove the trait first.");
-
- if($feature->has_image) $this->deleteImage($feature->imagePath, $feature->imageFileName);
+ if (DB::table('character_features')->where('feature_id', $feature->id)->exists()) {
+ throw new \Exception('A character with this trait exists. Please remove the trait first.');
+ }
+
+ if ($feature->has_image) {
+ $this->deleteImage($feature->imagePath, $feature->imageFileName);
+ }
$feature->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+
+ /**
+ * Handle category data.
+ *
+ * @param array $data
+ * @param \App\Models\Feature\FeatureCategory|null $category
+ *
+ * @return array
+ */
+ private function populateCategoryData($data, $category = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($category && $category->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Processes user input for creating/updating a feature.
+ *
+ * @param array $data
+ * @param \App\Models\Feature\Feature $feature
+ *
+ * @return array
+ */
+ private function populateData($data, $feature = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+ if (isset($data['species_id']) && $data['species_id'] == 'none') {
+ $data['species_id'] = null;
+ }
+ if (isset($data['feature_category_id']) && $data['feature_category_id'] == 'none') {
+ $data['feature_category_id'] = null;
+ }
+ if (isset($data['remove_image'])) {
+ if ($feature && $feature->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($feature->imagePath, $feature->imageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+}
diff --git a/app/Services/FileManager.php b/app/Services/FileManager.php
index 9845e1539d..35064e2fb1 100644
--- a/app/Services/FileManager.php
+++ b/app/Services/FileManager.php
@@ -1,12 +1,10 @@
-setError('Folder already exists.');
- else {
+ public function createDirectory($dir) {
+ if (file_exists($dir)) {
+ $this->setError('Folder already exists.');
+ } else {
// Create the directory.
if (!mkdir($dir, 0755, true)) {
$this->setError('Failed to create folder.');
+
return false;
}
chmod($dir, 0755);
}
+
return true;
}
/**
* Deletes a directory if it exists and doesn't contain files.
*
- * @param string $dir
+ * @param string $dir
+ *
* @return bool
*/
- public function deleteDirectory($dir)
- {
- if(!file_exists($dir)) {
+ public function deleteDirectory($dir) {
+ if (!file_exists($dir)) {
$this->setError('error', 'Directory does not exist.');
+
return false;
}
- $files = array_diff(scandir($dir), array('.', '..'));
- if(count($files)) {
+ $files = array_diff(scandir($dir), ['.', '..']);
+ if (count($files)) {
$this->setError('error', 'Cannot delete a folder that contains files.');
+
return false;
}
rmdir($dir);
+
return true;
}
-
+
/**
* Renames a directory.
*
- * @param string $dir
- * @param string $oldName
- * @param string $newName
+ * @param string $dir
+ * @param string $oldName
+ * @param string $newName
+ *
* @return bool
*/
- public function renameDirectory($dir, $oldName, $newName)
- {
- if(!file_exists($dir . '/' . $oldName)) {
+ public function renameDirectory($dir, $oldName, $newName) {
+ if (!file_exists($dir.'/'.$oldName)) {
$this->setError('error', 'Directory does not exist.');
+
return false;
}
- $files = array_diff(scandir($dir . '/' . $oldName), array('.', '..'));
- if(count($files)) {
+ $files = array_diff(scandir($dir.'/'.$oldName), ['.', '..']);
+ if (count($files)) {
$this->setError('error', 'Cannot delete a folder that contains files.');
+
return false;
}
- rename($dir . '/' . $oldName, $dir . '/' . $newName);
+ rename($dir.'/'.$oldName, $dir.'/'.$newName);
+
return true;
}
-
+
/**
* Uploads a file.
*
- * @param array $file
- * @param string $dir
- * @param string $name
- * @param bool $isFileManager
+ * @param array $file
+ * @param string $dir
+ * @param string $name
+ * @param bool $isFileManager
+ *
* @return bool
*/
- public function uploadFile($file, $dir, $name, $isFileManager = true)
- {
- $directory = public_path(). ($isFileManager ? '/files'.($dir ? '/'.$dir : '') : '/images');
- if(!file_exists($directory))
- {
+ public function uploadFile($file, $dir, $name, $isFileManager = true) {
+ $directory = public_path().($isFileManager ? '/files'.($dir ? '/'.$dir : '') : '/images');
+ if (!file_exists($directory)) {
$this->setError('error', 'Folder does not exist.');
}
- File::move($file, $directory . '/' . $name);
- chmod($directory . '/' . $name, 0755);
-
+ File::move($file, $directory.'/'.$name);
+ chmod($directory.'/'.$name, 0755);
+
return true;
}
-
+
/**
* Uploads a custom CSS file.
*
- * @param array $file
+ * @param array $file
+ *
* @return bool
*/
- public function uploadCss($file)
- {
- File::move($file, public_path() . '/css/custom.css');
- chmod(public_path() . '/css/custom.css', 0755);
-
+ public function uploadCss($file) {
+ File::move($file, public_path().'/css/custom.css');
+ chmod(public_path().'/css/custom.css', 0755);
+
return true;
}
-
+
/**
* Deletes a file.
*
- * @param string $path
+ * @param string $path
+ *
* @return bool
*/
- public function deleteFile($path)
- {
- if(!file_exists($path)) {
+ public function deleteFile($path) {
+ if (!file_exists($path)) {
$this->setError('error', 'File does not exist.');
+
return false;
}
unlink($path);
+
return true;
}
-
+
/**
* Moves a file.
*
- * @param string $oldDir
- * @param string $newDir
- * @param string $name
+ * @param string $oldDir
+ * @param string $newDir
+ * @param string $name
+ *
* @return bool
*/
- public function moveFile($oldDir, $newDir, $name)
- {
- if(!file_exists($oldDir . '/' . $name)) {
+ public function moveFile($oldDir, $newDir, $name) {
+ if (!file_exists($oldDir.'/'.$name)) {
$this->setError('error', 'File does not exist.');
+
return false;
- }
- else if(!file_exists($newDir)) {
+ } elseif (!file_exists($newDir)) {
$this->setError('error', 'Destination does not exist.');
+
return false;
}
- rename($oldDir . '/' . $name, $newDir . '/' . $name);
+ rename($oldDir.'/'.$name, $newDir.'/'.$name);
+
return true;
}
-
+
/**
* Renames a file.
*
- * @param string $dir
- * @param string $oldName
- * @param string $newName
+ * @param string $dir
+ * @param string $oldName
+ * @param string $newName
+ *
* @return bool
*/
- public function renameFile($dir, $oldName, $newName)
- {
- if(!file_exists($dir . '/' . $oldName)) {
+ public function renameFile($dir, $oldName, $newName) {
+ if (!file_exists($dir.'/'.$oldName)) {
$this->setError('error', 'File does not exist.');
+
return false;
}
- rename($dir . '/' . $oldName, $dir . '/' . $newName);
+ rename($dir.'/'.$oldName, $dir.'/'.$newName);
+
return true;
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/GalleryManager.php b/app/Services/GalleryManager.php
index 708fc22f79..60f0e1030f 100644
--- a/app/Services/GalleryManager.php
+++ b/app/Services/GalleryManager.php
@@ -1,27 +1,24 @@
-submissions_open && !$user->hasPower('manage_submissions')) throw new \Exception("You cannot submit to this gallery.");
- if((isset($gallery->start_at) && $gallery->start_at->isFuture()) || (isset($gallery->end_at) && $gallery->end_at->isPast())) throw new \Exception('This gallery\'s submissions aren\'t open.');
+ if (!$gallery) {
+ throw new \Exception('Invalid gallery selected.');
+ }
+ if (!$gallery->submissions_open && !$user->hasPower('manage_submissions')) {
+ throw new \Exception('You cannot submit to this gallery.');
+ }
+ if ((isset($gallery->start_at) && $gallery->start_at->isFuture()) || (isset($gallery->end_at) && $gallery->end_at->isPast())) {
+ throw new \Exception('This gallery\'s submissions aren\'t open.');
+ }
// Check that associated collaborators exist
- if(isset($data['collaborator_id'])) {
+ if (isset($data['collaborator_id'])) {
$collaborators = User::whereIn('id', $data['collaborator_id'])->get();
- if(count($collaborators) != count($data['collaborator_id'])) throw new \Exception("One or more of the selected collaborators does not exist, or you have entered a duplicate.");
+ if (count($collaborators) != count($data['collaborator_id'])) {
+ throw new \Exception('One or more of the selected collaborators does not exist, or you have entered a duplicate.');
+ }
+ } else {
+ $collaborators = [];
}
- else $collaborators = [];
// Check that associated participants exist
- if(isset($data['participant_id'])) {
+ if (isset($data['participant_id'])) {
$participants = User::whereIn('id', $data['participant_id'])->get();
- if(count($participants) != count($data['participant_id'])) throw new \Exception("One or more of the selected participants does not exist, or you have entered a duplicate.");
+ if (count($participants) != count($data['participant_id'])) {
+ throw new \Exception('One or more of the selected participants does not exist, or you have entered a duplicate.');
+ }
+ } else {
+ $participants = [];
}
- else $participants = [];
// Check that associated characters exist
- if(isset($data['slug'])) {
+ if (isset($data['slug'])) {
$characters = Character::myo(0)->visible()->whereIn('slug', $data['slug'])->get();
- if(count($characters) != count($data['slug'])) throw new \Exception("One or more of the selected characters does not exist, or you have entered a duplicate.");
+ if (count($characters) != count($data['slug'])) {
+ throw new \Exception('One or more of the selected characters does not exist, or you have entered a duplicate.');
+ }
+ } else {
+ $characters = [];
}
- else $characters = [];
// Check that the selected prompt exists and can be submitted to
- if(isset($data['prompt_id'])) {
+ if (isset($data['prompt_id'])) {
$prompt = Prompt::active()->find($data['prompt_id']);
- if(!$prompt) throw new \Exception("Invalid prompt selected.");
+ if (!$prompt) {
+ throw new \Exception('Invalid prompt selected.');
+ }
}
$submission = GallerySubmission::create([
- 'user_id' => $user->id,
+ 'user_id' => $user->id,
'gallery_id' => $gallery->id,
- 'status' => 'Pending',
- 'title' => $data['title'],
- 'is_visible' => 1
+ 'status' => 'Pending',
+ 'title' => $data['title'],
+ 'is_visible' => 1,
]);
$data = $this->populateData($data);
- $withCriteriaSelected = isset($currencyFormData) && $currencyFormData && isset($currencyFormData['criterion']) ? array_filter($currencyFormData['criterion'], function($obj){
+ $withCriteriaSelected = isset($currencyFormData) && $currencyFormData && isset($currencyFormData['criterion']) ? array_filter($currencyFormData['criterion'], function ($obj) {
return isset($obj['id']);
}) : [];
- if(count($withCriteriaSelected) > 0) $currencyFormData['criterion'] = $withCriteriaSelected;
- else $currencyFormData['criterion'] = null;
-
- if(isset($currencyFormData) && $currencyFormData && isset($currencyFormData['criterion'])) {
+ if (count($withCriteriaSelected) > 0) {
+ $currencyFormData['criterion'] = $withCriteriaSelected;
+ } else {
+ $currencyFormData['criterion'] = null;
+ }
+
+ if (isset($currencyFormData) && $currencyFormData && isset($currencyFormData['criterion'])) {
$data['data']['criterion'] = $currencyFormData['criterion'];
$total = 0;
- foreach($currencyFormData['criterion'] as $criteria) {
+ foreach ($currencyFormData['criterion'] as $criteria) {
$calc = Criterion::where('id', $criteria['id'])->first();
$total += $calc->calculateReward($criteria);
}
$data['data']['total'] = $total;
$data['data'] = collect($data['data'])->toJson();
}
-
+
$submission->update($data);
- if(isset($data['image']) && $data['image']) $this->processImage($data, $submission);
+ if (isset($data['image']) && $data['image']) {
+ $this->processImage($data, $submission);
+ }
$submission->update();
- if(isset($data['collaborator_id']) && $collaborators->count()) {
+ if (isset($data['collaborator_id']) && $collaborators->count()) {
// Attach any collaborators to the submission
- foreach($data['collaborator_id'] as $key=>$collaborator) {
+ foreach ($data['collaborator_id'] as $key=>$collaborator) {
GalleryCollaborator::create([
- 'user_id' => $collaborator,
+ 'user_id' => $collaborator,
'gallery_submission_id' => $submission->id,
- 'data' => $data['collaborator_data'][$key],
- 'has_approved' => $collaborator == $user->id ? 1 : 0,
+ 'data' => $data['collaborator_data'][$key],
+ 'has_approved' => $collaborator == $user->id ? 1 : 0,
]);
// Notify collaborators (but not the submitting user)
- if($collaborator != $user->id) {
+ if ($collaborator != $user->id) {
Notifications::create('GALLERY_SUBMISSION_COLLABORATOR', User::find($collaborator), [
- 'sender_url' => $user->url,
- 'sender' => $user->name,
+ 'sender_url' => $user->url,
+ 'sender' => $user->name,
'submission_id' => $submission->id,
]);
}
}
}
- if(isset($data['participant_id']) && $participants->count()) {
+ if (isset($data['participant_id']) && $participants->count()) {
// Attach any participants to the submission
- foreach($data['participant_id'] as $key=>$participant) {
+ foreach ($data['participant_id'] as $key=>$participant) {
GalleryCollaborator::create([
- 'user_id' => $participant,
+ 'user_id' => $participant,
'gallery_submission_id' => $submission->id,
- 'data' => null,
- 'has_approved' => 1,
- 'type' => $data['participant_type'][$key]
+ 'data' => null,
+ 'has_approved' => 1,
+ 'type' => $data['participant_type'][$key],
]);
}
}
// Attach any characters to the submission
- foreach($characters as $character) {
+ foreach ($characters as $character) {
GalleryCharacter::create([
- 'character_id' => $character->id,
+ 'character_id' => $character->id,
'gallery_submission_id' => $submission->id,
]);
}
- if(!$submission->collaborators->count() && (!Settings::get('gallery_submissions_require_approval') || (Settings::get('gallery_submissions_require_approval') && $submission->gallery->votes_required == 0))) $this->acceptSubmission($submission);
+ if (!$submission->collaborators->count() && (!Settings::get('gallery_submissions_require_approval') || (Settings::get('gallery_submissions_require_approval') && $submission->gallery->votes_required == 0))) {
+ $this->acceptSubmission($submission);
+ }
return $this->commitReturn($submission);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a gallery submission.
*
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Gallery\GallerySubmission
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Gallery\GallerySubmission|bool
*/
- public function updateSubmission($submission, $data, $user)
- {
+ public function updateSubmission($submission, $data, $user) {
DB::beginTransaction();
try {
// Check that the user can edit the submission
- if(!$submission->user_id == $user->id && !$user->hasPower('manage_submissions')) throw new \Exception("You can't edit this submission.");
+ if (!$submission->user_id == $user->id && !$user->hasPower('manage_submissions')) {
+ throw new \Exception("You can't edit this submission.");
+ }
// Check that there is text and/or an image, including if there is an existing image (via the existence of a hash)
- if((!isset($data['image']) && !isset($submission->hash)) && !$data['text']) throw new \Exception("Please submit either text or an image.");
+ if ((!isset($data['image']) && !isset($submission->hash)) && !$data['text']) {
+ throw new \Exception('Please submit either text or an image.');
+ }
// If still pending, perform validation on and process collaborators and participants
- if($submission->status == 'Pending') {
+ if ($submission->status == 'Pending') {
// Check that associated collaborators exist
- if(isset($data['collaborator_id'])) {
+ if (isset($data['collaborator_id'])) {
$collaborators = User::whereIn('id', $data['collaborator_id'])->get();
- if(count($collaborators) != count($data['collaborator_id'])) throw new \Exception("One or more of the selected users does not exist, or you have entered a duplicate.");
+ if (count($collaborators) != count($data['collaborator_id'])) {
+ throw new \Exception('One or more of the selected users does not exist, or you have entered a duplicate.');
+ }
+ } else {
+ $collaborators = [];
}
- else $collaborators = [];
// Fetch collaborator approval data
$collaboratorApproval = $submission->collaborators->pluck('has_approved', 'user_id');
// Remove all collaborators from the submission so they can be reattached with new data
$submission->collaborators()->delete();
- if(isset($data['collaborator_id']) && $collaborators->count()) {
+ if (isset($data['collaborator_id']) && $collaborators->count()) {
// Attach any collaborators to the submission
- foreach($data['collaborator_id'] as $key=>$collaborator) {
+ foreach ($data['collaborator_id'] as $key=>$collaborator) {
GalleryCollaborator::create([
- 'user_id' => $collaborator,
+ 'user_id' => $collaborator,
'gallery_submission_id' => $submission->id,
- 'data' => $data['collaborator_data'][$key],
- 'has_approved' => isset($collaboratorApproval[$collaborator]) ? $collaboratorApproval[$collaborator] : ($collaborator == $user->id ? 1 : 0),
+ 'data' => $data['collaborator_data'][$key],
+ 'has_approved' => $collaboratorApproval[$collaborator] ?? ($collaborator == $user->id ? 1 : 0),
]);
}
}
// Check that associated participants exist
- if(isset($data['participant_id'])) {
+ if (isset($data['participant_id'])) {
$participants = User::whereIn('id', $data['participant_id'])->get();
- if(count($participants) != count($data['participant_id'])) throw new \Exception("One or more of the selected participants does not exist, or you have entered a duplicate.");
+ if (count($participants) != count($data['participant_id'])) {
+ throw new \Exception('One or more of the selected participants does not exist, or you have entered a duplicate.');
+ }
+ } else {
+ $participants = [];
}
- else $participants = [];
// Remove all participants from the submission so they can be reattached with new data
$submission->participants()->delete();
- if(isset($data['participant_id']) && $participants->count()) {
+ if (isset($data['participant_id']) && $participants->count()) {
// Attach any participants to the submission
- foreach($data['participant_id'] as $key=>$participant) {
+ foreach ($data['participant_id'] as $key=>$participant) {
GalleryCollaborator::create([
- 'user_id' => $participant,
+ 'user_id' => $participant,
'gallery_submission_id' => $submission->id,
- 'data' => null,
- 'has_approved' => 1,
- 'type' => $data['participant_type'][$key]
+ 'data' => null,
+ 'has_approved' => 1,
+ 'type' => $data['participant_type'][$key],
]);
}
}
}
// Check that associated characters exist
- if(isset($data['slug'])) {
+ if (isset($data['slug'])) {
$characters = Character::myo(0)->visible()->whereIn('slug', $data['slug'])->get();
- if(count($characters) != count($data['slug'])) throw new \Exception("One or more of the selected characters does not exist, or you have entered a duplicate.");
+ if (count($characters) != count($data['slug'])) {
+ throw new \Exception('One or more of the selected characters does not exist, or you have entered a duplicate.');
+ }
+ } else {
+ $characters = [];
}
- else $characters = [];
// Remove all characters from the submission so they can be reattached with new data
$submission->characters()->delete();
// Attach any characters to the submission
- foreach($characters as $character) {
+ foreach ($characters as $character) {
GalleryCharacter::create([
- 'character_id' => $character->id,
+ 'character_id' => $character->id,
'gallery_submission_id' => $submission->id,
]);
}
// Check that the selected prompt exists and can be submitted to
- if(isset($data['prompt_id'])) {
+ if (isset($data['prompt_id'])) {
$prompt = $user->hasPower('manage_submissions') ? Prompt::find($data['prompt_id']) : Prompt::active()->find($data['prompt_id']);
- if(!$prompt) throw new \Exception("Invalid prompt selected.");
+ if (!$prompt) {
+ throw new \Exception('Invalid prompt selected.');
+ }
}
- if((isset($submission->parsed_description) && $submission->parsed_description) && !isset($data['description'])) $data['parsed_description'] = null;
- if((isset($submission->parsed_text) && $submission->parsed_text) && !isset($data['text'])) $data['parsed_text'] = null;
+ if ((isset($submission->parsed_description) && $submission->parsed_description) && !isset($data['description'])) {
+ $data['parsed_description'] = null;
+ }
+ if ((isset($submission->parsed_text) && $submission->parsed_text) && !isset($data['text'])) {
+ $data['parsed_text'] = null;
+ }
$data = $this->populateData($data);
- if(isset($data['image']) && $data['image']) $this->processImage($data, $submission);
+ if (isset($data['image']) && $data['image']) {
+ $this->processImage($data, $submission);
+ }
// Processing relating to staff edits
- if($user->hasPower('manage_submissions')) {
- if(!isset($data['gallery_id']) && !$data['gallery_id']) $data['gallery_id'] = $submission->gallery->id;
+ if ($user->hasPower('manage_submissions')) {
+ if (!isset($data['gallery_id']) && !$data['gallery_id']) {
+ $data['gallery_id'] = $submission->gallery->id;
+ }
$data['staff_id'] = $user->id;
}
// Send notifications for staff edits if necessary
- if($user->hasPower('manage_submissions') && $user->id != $submission->user->id && (isset($data['alert_user']) && $data['alert_user'])) {
- if($data['gallery_id'] != $submission->gallery_id) {
+ if ($user->hasPower('manage_submissions') && $user->id != $submission->user->id && (isset($data['alert_user']) && $data['alert_user'])) {
+ if ($data['gallery_id'] != $submission->gallery_id) {
Notifications::create('GALLERY_SUBMISSION_MOVED', $submission->user, [
'submission_title' => $submission->title,
- 'submission_id' => $submission->id,
- 'staff_url' => $user->url,
- 'staff_name' => $user->name,
+ 'submission_id' => $submission->id,
+ 'staff_url' => $user->url,
+ 'staff_name' => $user->name,
]);
- }
- else {
+ } else {
Notifications::create('GALLERY_SUBMISSION_EDITED', $submission->user, [
'submission_title' => $submission->title,
- 'submission_id' => $submission->id,
- 'staff_url' => $user->url,
- 'staff_name' => $user->name,
+ 'submission_id' => $submission->id,
+ 'staff_url' => $user->url,
+ 'staff_name' => $user->name,
]);
}
}
@@ -291,78 +337,36 @@ public function updateSubmission($submission, $data, $user)
$submission->update($data);
return $this->commitReturn($submission);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
- /**
- * Processes user input for creating/updating a gallery submission.
- *
- * @param array $data
- * @return array
- */
- private function populateData($data)
- {
- // Parse any text
- if(isset($data['text']) && $data['text']) $data['parsed_text'] = parse($data['text']);
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- return $data;
- }
-
- /**
- * Processes gallery submission images.
- *
- * @param array $data
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @return array
- */
- private function processImage($data, $submission)
- {
- if(isset($submission->hash)) {
- unlink($submission->imagePath . '/' . $submission->imageFileName);
- unlink($submission->imagePath . '/' . $submission->thumbnailFileName);
- }
- $submission->hash = randomString(10);
- $submission->extension = $data['image']->getClientOriginalExtension();
-
- // Save image itself
- $this->handleImage($data['image'], $submission->imageDirectory, $submission->imageFileName);
-
- // Process thumbnail
- $thumbnail = Image::make($submission->imagePath . '/' . $submission->imageFileName);
- // Resize
- $thumbnail->resize(null, Config::get('lorekeeper.settings.masterlist_thumbnails.height'), function ($constraint) {
- $constraint->aspectRatio();
- $constraint->upsize();
- });
-
- // Save thumbnail
- $thumbnail->save($submission->thumbnailPath . '/' . $submission->thumbnailFileName);
-
- return $submission;
+ return $this->rollbackReturn(false);
}
/**
* Processes collaborator edits/approvals on a submission.
*
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Gallery\GalleryFavorite
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ * @param \App\Models\User\User $user
+ * @param mixed $data
+ *
+ * @return \App\Models\Gallery\GalleryFavorite|bool
*/
- public function editCollaborator($submission, $data, $user)
- {
+ public function editCollaborator($submission, $data, $user) {
DB::beginTransaction();
try {
// Check that the submission is pending and the user is a collaborator on it
- if(!$submission->status == 'Pending') throw new \Exception("This submission isn't pending.");
- if($submission->collaborators->where('user_id', $user->id)->first() == null) throw new \Exception("You aren't a collaborator on this submission.");
+ if (!$submission->status == 'Pending') {
+ throw new \Exception("This submission isn't pending.");
+ }
+ if ($submission->collaborators->where('user_id', $user->id)->first() == null) {
+ throw new \Exception("You aren't a collaborator on this submission.");
+ }
// Check if the user has requested to be removed from the submission
- if(isset($data['remove_user']) && $data['remove_user']) {
+ if (isset($data['remove_user']) && $data['remove_user']) {
$submission->collaborators()->where('user_id', $user->id)->delete();
}
// Otherwise update the record of their contribution and mark them as having approved
@@ -373,43 +377,49 @@ public function editCollaborator($submission, $data, $user)
// Check if all collaborators have approved, and if so send a notification to the
// submitting user (unless they are the last to approve-- which shouldn't happen, but)
- if($submission->collaboratorApproved) {
- if(Settings::get('gallery_submissions_require_approval') && $submission->gallery->votes_required > 0) {
- if($submission->user->id != $user->id) {
+ if ($submission->collaboratorApproved) {
+ if (Settings::get('gallery_submissions_require_approval') && $submission->gallery->votes_required > 0) {
+ if ($submission->user->id != $user->id) {
Notifications::create('GALLERY_COLLABORATORS_APPROVED', $submission->user, [
'submission_title' => $submission->title,
- 'submission_id' => $submission->id,
+ 'submission_id' => $submission->id,
]);
}
+ } else {
+ $this->acceptSubmission($submission);
}
- else $this->acceptSubmission($submission);
}
}
return $this->commitReturn($submission);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Votes on a gallery submission.
*
- * @param string $action
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @param \App\Models\User\User $user
- * @return bool
+ * @param string $action
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ * @param \App\Models\User\User $user
+ *
+ * @return bool
*/
- public function castVote($action, $submission, $user)
- {
+ public function castVote($action, $submission, $user) {
DB::beginTransaction();
try {
- if($submission->status != 'Pending') throw new \Exception("This request cannot be processed.");
- if(!$submission->collaboratorApproved) throw new \Exception("This submission's collaborators have not all approved yet.");
+ if ($submission->status != 'Pending') {
+ throw new \Exception('This request cannot be processed.');
+ }
+ if (!$submission->collaboratorApproved) {
+ throw new \Exception("This submission's collaborators have not all approved yet.");
+ }
- switch($action) {
+ switch ($action) {
default:
flash('Invalid action.')->error();
break;
@@ -433,198 +443,137 @@ public function castVote($action, $submission, $user)
// Count up the existing votes to see if the required number has been reached
$rejectSum = 0;
$approveSum = 0;
- foreach($submission->voteData as $voter=>$vote) {
- if($vote == 1) $rejectSum += 1;
- if($vote == 2) $approveSum += 1;
+ foreach ($submission->voteData as $voter=>$vote) {
+ if ($vote == 1) {
+ $rejectSum += 1;
+ }
+ if ($vote == 2) {
+ $approveSum += 1;
+ }
}
// And if so, process the submission
- if($action == 'reject' && $rejectSum >= $submission->gallery->votes_required)
- $this->rejectSubmission($submission);
- if($action == 'accept' && $approveSum >= $submission->gallery->votes_required) $this->acceptSubmission($submission);
+ if ($action == 'reject' && $rejectSum >= $submission->gallery->votes_required) {
+ $this->rejectSubmission($submission);
+ }
+ if ($action == 'accept' && $approveSum >= $submission->gallery->votes_required) {
+ $this->acceptSubmission($submission);
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Processes staff comments for a submission.
*
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Gallery\GalleryFavorite
+ * @param \App\Models\User\User $user
+ * @param mixed $id
+ * @param mixed $data
+ *
+ * @return \App\Models\Gallery\GalleryFavorite|bool
*/
- public function postStaffComments($id, $data, $user)
- {
+ public function postStaffComments($id, $data, $user) {
DB::beginTransaction();
try {
$submission = GallerySubmission::find($id);
// Check that the submission exists and that the user can edit staff comments
- if(!$submission) throw new \Exception("Invalid submission selected.");
- if(!$user->hasPower('manage_submissions')) throw new \Exception("You can't edit staff comments on this submission.");
+ if (!$submission) {
+ throw new \Exception('Invalid submission selected.');
+ }
+ if (!$user->hasPower('manage_submissions')) {
+ throw new \Exception("You can't edit staff comments on this submission.");
+ }
// Parse comments
- if(isset($data['staff_comments']) && $data['staff_comments']) $data['parsed_staff_comments'] = parse($data['staff_comments']);
+ if (isset($data['staff_comments']) && $data['staff_comments']) {
+ $data['parsed_staff_comments'] = parse($data['staff_comments']);
+ }
$submission->update([
- 'staff_comments' => $data['staff_comments'],
+ 'staff_comments' => $data['staff_comments'],
'parsed_staff_comments' => $data['parsed_staff_comments'],
- 'staff_id' => $user->id,
+ 'staff_id' => $user->id,
]);
- if(isset($data['alert_user'])) {
+ if (isset($data['alert_user'])) {
Notifications::create('GALLERY_SUBMISSION_STAFF_COMMENTS', $submission->user, [
- 'sender' => $user->name,
- 'sender_url' => $user->url,
+ 'sender' => $user->name,
+ 'sender_url' => $user->url,
'submission_title' => $submission->title,
- 'submission_id' => $submission->id,
+ 'submission_id' => $submission->id,
]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
- * Processes acceptance for a submission.
+ * Archives a submission.
+ *
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ * @param mixed $user
*
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @return bool|\App\Models\Gallery\GallerySubmission
+ * @return bool
*/
- private function acceptSubmission($submission)
- {
+ public function archiveSubmission($submission, $user) {
DB::beginTransaction();
try {
- // Check that the submission exists and is pending
- if(!$submission) throw new \Exception("Invalid submission selected.");
- if($submission->status != 'Pending') throw new \Exception("This submission isn't pending.");
-
- $submission->update(['status' => 'Accepted']);
-
- // If the submission wouldn't have been automatically approved, send a notification
- if(Settings::get('gallery_submissions_require_approval') || (!Settings::get('gallery_submissions_require_approval') && $submission->collaborators->count())) {
- Notifications::create('GALLERY_SUBMISSION_ACCEPTED', $submission->user, [
- 'submission_title' => $submission->title,
- 'submission_id' => $submission->id
- ]);
+ if (!$submission) {
+ throw new \Exception('Invalid submission selected.');
}
-
- if($submission->characters->count()) {
- // Send a notification to included characters' owners now that the submission is accepted
- // but not for the submitting user's own characters
- foreach($submission->characters as $character) {
- if($character->user && $character->character->user->id != $submission->user->id) {
- Notifications::create('GALLERY_SUBMISSION_CHARACTER', $character->character->user, [
- 'sender' => $submission->user->name,
- 'sender_url' => $submission->user->url,
- 'character_url' => $character->character->url,
- 'character' => isset($character->character->name) ? $character->character->fullName : $character->character->slug,
- 'submission_id' => $submission->id,
- ]);
- }
- }
+ if ($submission->user->id != $user->id && !$user->hasPower('manage_submissions')) {
+ throw new \Exception("You can't archive this submission.");
}
- if($submission->participants->count()) {
- // Send a notification to participants now that the submission is accepted
- // but not for the submitting user
- foreach($submission->participants as $participant) {
- if($participant->user->id != $submission->user->id) {
- Notifications::create('GALLERY_SUBMISSION_PARTICIPANT', $participant->user, [
- 'sender_url' => $submission->user->url,
- 'sender' => $submission->user->name,
- 'submission_id' => $submission->id,
- ]);
- }
- }
+ if ($submission->is_visible) {
+ $submission->update(['is_visible' => 0]);
+ } else {
+ $submission->update(['is_visible' => 1]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Processes rejection for a submission.
- *
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @return bool|\App\Models\Gallery\GallerySubmission
- */
- private function rejectSubmission($submission)
- {
- DB::beginTransaction();
-
- try {
- // Check that the submission exists and is pending
- if(!$submission) throw new \Exception("Invalid submission selected.");
- if($submission->status != 'Pending') throw new \Exception("This submission isn't pending.");
-
- $submission->update(['status' => 'Rejected']);
-
- Notifications::create('GALLERY_SUBMISSION_REJECTED', $submission->user, [
- 'submission_title' => $submission->title,
- 'submission_id' => $submission->id,
- ]);
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
- /**
- * Archives a submission.
- *
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @return bool
- */
- public function archiveSubmission($submission, $user)
- {
- DB::beginTransaction();
-
- try {
- if(!$submission) throw new \Exception("Invalid submission selected.");
- if($submission->user->id != $user->id && !$user->hasPower('manage_submissions')) throw new \Exception("You can't archive this submission.");
-
- if($submission->is_visible) $submission->update(['is_visible' => 0]);
- else $submission->update(['is_visible' => 1]);
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
return $this->rollbackReturn(false);
}
/**
* Processes group currency evaluation for a submission.
*
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Gallery\GalleryFavorite
+ * @param \App\Models\User\User $user
+ * @param mixed $id
+ * @param mixed $data
+ *
+ * @return \App\Models\Gallery\GalleryFavorite|bool
*/
- public function postValueSubmission($id, $data, $user)
- {
+ public function postValueSubmission($id, $data, $user) {
DB::beginTransaction();
try {
$submission = GallerySubmission::find($id);
// Check that the submission exists and that the user can value it
- if(!$submission) throw new \Exception("Invalid submission selected.");
- if(!$user->hasPower('manage_submissions')) throw new \Exception("You can't evaluate this submission.");
+ if (!$submission) {
+ throw new \Exception('Invalid submission selected.');
+ }
+ if (!$user->hasPower('manage_submissions')) {
+ throw new \Exception("You can't evaluate this submission.");
+ }
- if(!isset($data['ineligible'])) {
+ if (!isset($data['ineligible'])) {
// Process data and award currency for each user associated with the submission
// First, set up CurrencyManager instance and log information
$currencyManager = new CurrencyManager;
@@ -635,35 +584,43 @@ public function postValueSubmission($id, $data, $user)
$grantedList = [];
$awardQuantity = [];
$currency = [];
-
+
$shouldDivideRewards = Settings::get('gallery_rewards_divided') === '1';
- if(isset($data['criterion'])) {
- foreach($data['criterion'] as $criterionData) {
+ if (isset($data['criterion'])) {
+ foreach ($data['criterion'] as $criterionData) {
$criterion = Criterion::where('id', $criterionData['id'])->first();
$total = $criterion->calculateReward($criterionData);
$collaboratorCount = $submission->collaborators->count() + ($submission->collaborators->where('user_id', $submission->user_id)->first() === null ? 1 : 0);
- if($shouldDivideRewards) $total /= $collaboratorCount;
-
+ if ($shouldDivideRewards) {
+ $total /= $collaboratorCount;
+ }
+
// Then cycle through associated users and award currency
- if(!$submission->collaborators->count() || $submission->collaborators->where('user_id', $submission->user_id)->first() == null) {
- if(!$currencyManager->creditCurrency($user, $submission->user, $awardType, $awardData, $criterion->currency, $total)) throw new \Exception("Failed to award currency to submitting user.");
+ if (!$submission->collaborators->count() || $submission->collaborators->where('user_id', $submission->user_id)->first() == null) {
+ if (!$currencyManager->creditCurrency($user, $submission->user, $awardType, $awardData, $criterion->currency, $total)) {
+ throw new \Exception('Failed to award currency to submitting user.');
+ }
$grantedList[] = $submission->user;
$awardQuantity[] = $total;
$currency[] = $criterion->currency;
}
-
- foreach($submission->collaborators as $collaborator) {
+
+ foreach ($submission->collaborators as $collaborator) {
// Double check that the submitting user isn't being awarded currency twice
- if($collaborator->user->id == $submission->user->id) throw new \Exception("Can't award currency to the submitting user twice.");
+ if ($collaborator->user->id == $submission->user->id) {
+ throw new \Exception("Can't award currency to the submitting user twice.");
+ }
- if(!$currencyManager->creditCurrency($user, $collaborator->user, $awardType, $awardData, $criterion->currency, $total)) throw new \Exception("Failed to award currency to one or more collaborators.");
+ if (!$currencyManager->creditCurrency($user, $collaborator->user, $awardType, $awardData, $criterion->currency, $total)) {
+ throw new \Exception('Failed to award currency to one or more collaborators.');
+ }
$grantedList[] = $collaborator->user;
$awardQuantity[] = $total;
$currency[] = $criterion->currency;
- }
+ }
}
}
@@ -681,94 +638,252 @@ public function postValueSubmission($id, $data, $user)
// Collect and json encode existing as well as new data for storage
$valueData = collect([
- 'criterion' => isset($submission->data['criterion']) ? $submission->data['criterion'] : null,
+ 'criterion' => $submission->data['criterion'] ?? null,
'awardQuantity' => $awardQuantity,
- 'staff' => $user->id,
+ 'staff' => $user->id,
])->toJson();
// Update the submission with the new data and mark it as processed
$submission->update([
- 'data' => $valueData,
+ 'data' => $valueData,
'is_valued' => 1,
]);
// Send a notification to each user that received a currency award
- foreach($grantedList as $key=>$grantedUser) {
+ foreach ($grantedList as $key=>$grantedUser) {
Notifications::create('GALLERY_SUBMISSION_VALUED', $grantedUser, [
'currency_quantity' => $awardQuantity[$key],
- 'currency_name' => $currency[$key]->name,
- 'submission_title' => $submission->title,
- 'submission_id' => $submission->id,
+ 'currency_name' => $currency[$key]->name,
+ 'submission_title' => $submission->title,
+ 'submission_id' => $submission->id,
]);
}
- }
- else {
+ } else {
// Collect and json encode existing as well as new data for storage
- if(isset($submission->data['total'])) $valueData = collect([
- 'criterion' => isset($submission->data['criterion']) ? $submission->data['criterion'] : null,
- 'total' => $submission->data['total'],
- 'ineligible' => 1,
- 'staff' => $user->id,
- ])->toJson();
- else $valueData = collect(['ineligible' => 1, 'staff' => $user->id])->toJson();
+ if (isset($submission->data['total'])) {
+ $valueData = collect([
+ 'criterion' => $submission->data['criterion'] ?? null,
+ 'total' => $submission->data['total'],
+ 'ineligible' => 1,
+ 'staff' => $user->id,
+ ])->toJson();
+ } else {
+ $valueData = collect(['ineligible' => 1, 'staff' => $user->id])->toJson();
+ }
// Update the submission, including marking it as processed
$submission->update([
- 'data' => $valueData,
+ 'data' => $valueData,
'is_valued' => 1,
]);
-
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Toggles favorite status on a submission for a user.
*
- * @param \App\Models\Gallery\GallerySubmission $submission
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Gallery\GalleryFavorite
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Gallery\GalleryFavorite|bool
*/
- public function favoriteSubmission($submission, $user)
- {
+ public function favoriteSubmission($submission, $user) {
DB::beginTransaction();
try {
// Check that the submission can be favorited
- if(!$submission->isVisible) throw new \Exception("This submission isn't visible to be favorited.");
- if($submission->user->id == $user->id || $submission->collaborators->where('user_id', $user->id)->first() != null) throw new \Exception("You can't favorite your own submission!");
+ if (!$submission->isVisible) {
+ throw new \Exception("This submission isn't visible to be favorited.");
+ }
+ if ($submission->user->id == $user->id || $submission->collaborators->where('user_id', $user->id)->first() != null) {
+ throw new \Exception("You can't favorite your own submission!");
+ }
// Check if the user has an existing favorite, and if so, delete it
// or else create one.
- if($submission->favorites->where('user_id', $user->id)->first() != null) {
+ if ($submission->favorites->where('user_id', $user->id)->first() != null) {
$submission->favorites()->where('user_id', $user->id)->delete();
- }
- else {
+ } else {
GalleryFavorite::create([
- 'user_id' => $user->id,
+ 'user_id' => $user->id,
'gallery_submission_id' => $submission->id,
]);
- if($submission->user->id != $user->id) {
+ if ($submission->user->id != $user->id) {
Notifications::create('GALLERY_SUBMISSION_FAVORITE', $submission->user, [
- 'sender_url' => $user->url,
- 'sender' => $user->name,
+ 'sender_url' => $user->url,
+ 'sender' => $user->name,
'submission_title' => $submission->title,
- 'submission_id' => $submission->id,
+ 'submission_id' => $submission->id,
]);
}
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+ /**
+ * Processes user input for creating/updating a gallery submission.
+ *
+ * @param array $data
+ *
+ * @return array
+ */
+ private function populateData($data) {
+ // Parse any text
+ if (isset($data['text']) && $data['text']) {
+ $data['parsed_text'] = parse($data['text']);
+ }
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Processes gallery submission images.
+ *
+ * @param array $data
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ *
+ * @return array
+ */
+ private function processImage($data, $submission) {
+ if (isset($submission->hash)) {
+ unlink($submission->imagePath.'/'.$submission->imageFileName);
+ unlink($submission->imagePath.'/'.$submission->thumbnailFileName);
+ }
+ $submission->hash = randomString(10);
+ $submission->extension = $data['image']->getClientOriginalExtension();
+
+ // Save image itself
+ $this->handleImage($data['image'], $submission->imageDirectory, $submission->imageFileName);
+
+ // Process thumbnail
+ $thumbnail = Image::make($submission->imagePath.'/'.$submission->imageFileName);
+ // Resize
+ $thumbnail->resize(null, Config::get('lorekeeper.settings.masterlist_thumbnails.height'), function ($constraint) {
+ $constraint->aspectRatio();
+ $constraint->upsize();
+ });
+
+ // Save thumbnail
+ $thumbnail->save($submission->thumbnailPath.'/'.$submission->thumbnailFileName);
+
+ return $submission;
+ }
+
+ /**
+ * Processes acceptance for a submission.
+ *
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ *
+ * @return \App\Models\Gallery\GallerySubmission|bool
+ */
+ private function acceptSubmission($submission) {
+ DB::beginTransaction();
+
+ try {
+ // Check that the submission exists and is pending
+ if (!$submission) {
+ throw new \Exception('Invalid submission selected.');
+ }
+ if ($submission->status != 'Pending') {
+ throw new \Exception("This submission isn't pending.");
+ }
+
+ $submission->update(['status' => 'Accepted']);
+
+ // If the submission wouldn't have been automatically approved, send a notification
+ if (Settings::get('gallery_submissions_require_approval') || (!Settings::get('gallery_submissions_require_approval') && $submission->collaborators->count())) {
+ Notifications::create('GALLERY_SUBMISSION_ACCEPTED', $submission->user, [
+ 'submission_title' => $submission->title,
+ 'submission_id' => $submission->id,
+ ]);
+ }
+
+ if ($submission->characters->count()) {
+ // Send a notification to included characters' owners now that the submission is accepted
+ // but not for the submitting user's own characters
+ foreach ($submission->characters as $character) {
+ if ($character->user && $character->character->user->id != $submission->user->id) {
+ Notifications::create('GALLERY_SUBMISSION_CHARACTER', $character->character->user, [
+ 'sender' => $submission->user->name,
+ 'sender_url' => $submission->user->url,
+ 'character_url' => $character->character->url,
+ 'character' => isset($character->character->name) ? $character->character->fullName : $character->character->slug,
+ 'submission_id' => $submission->id,
+ ]);
+ }
+ }
+ }
+
+ if ($submission->participants->count()) {
+ // Send a notification to participants now that the submission is accepted
+ // but not for the submitting user
+ foreach ($submission->participants as $participant) {
+ if ($participant->user->id != $submission->user->id) {
+ Notifications::create('GALLERY_SUBMISSION_PARTICIPANT', $participant->user, [
+ 'sender_url' => $submission->user->url,
+ 'sender' => $submission->user->name,
+ 'submission_id' => $submission->id,
+ ]);
+ }
+ }
+ }
+
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
+
+ /**
+ * Processes rejection for a submission.
+ *
+ * @param \App\Models\Gallery\GallerySubmission $submission
+ *
+ * @return \App\Models\Gallery\GallerySubmission|bool
+ */
+ private function rejectSubmission($submission) {
+ DB::beginTransaction();
+
+ try {
+ // Check that the submission exists and is pending
+ if (!$submission) {
+ throw new \Exception('Invalid submission selected.');
+ }
+ if ($submission->status != 'Pending') {
+ throw new \Exception("This submission isn't pending.");
+ }
+
+ $submission->update(['status' => 'Rejected']);
+
+ Notifications::create('GALLERY_SUBMISSION_REJECTED', $submission->user, [
+ 'submission_title' => $submission->title,
+ 'submission_id' => $submission->id,
+ ]);
+
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
}
diff --git a/app/Services/GalleryService.php b/app/Services/GalleryService.php
index 107efbd454..c761374ffb 100644
--- a/app/Services/GalleryService.php
+++ b/app/Services/GalleryService.php
@@ -1,17 +1,14 @@
-populateCriteria(Arr::only($data, ['criterion_id', 'criterion']), $gallery, GalleryCriterion::class);
return $this->commitReturn($gallery);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a gallery.
*
- * @param \App\Models\Gallery $gallery
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Gallery
+ * @param \App\Models\Gallery $gallery
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Gallery|bool
*/
- public function updateGallery($gallery, $data, $user)
- {
+ public function updateGallery($gallery, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(Gallery::where('name', $data['name'])->where('id', '!=', $gallery->id)->exists()) throw new \Exception("The name has already been taken.");
-
- if(!isset($data['submissions_open'])) $data['submissions_open'] = 0;
- if(!isset($data['currency_enabled'])) $data['currency_enabled'] = 0;
- if(!isset($data['votes_required'])) $data['votes_required'] = 0;
- if(!isset($data['hide_before_start'])) $data['hide_before_start'] = 0;
- if(!isset($data['prompt_selection'])) $data['prompt_selection'] = 0;
+ if (Gallery::where('name', $data['name'])->where('id', '!=', $gallery->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
+
+ if (!isset($data['submissions_open'])) {
+ $data['submissions_open'] = 0;
+ }
+ if (!isset($data['currency_enabled'])) {
+ $data['currency_enabled'] = 0;
+ }
+ if (!isset($data['votes_required'])) {
+ $data['votes_required'] = 0;
+ }
+ if (!isset($data['hide_before_start'])) {
+ $data['hide_before_start'] = 0;
+ }
+ if (!isset($data['prompt_selection'])) {
+ $data['prompt_selection'] = 0;
+ }
$gallery->update($data);
-
+
(new CriterionService)->populateCriteria(Arr::only($data, ['criterion_id', 'criterion']), $gallery, GalleryCriterion::class);
return $this->commitReturn($gallery);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes a gallery.
*
- * @param \App\Models\Gallery $gallery
+ * @param \App\Models\Gallery $gallery
+ *
* @return bool
*/
- public function deleteGallery($gallery)
- {
+ public function deleteGallery($gallery) {
DB::beginTransaction();
try {
// Check first if submissions exist in this gallery, or the gallery has children
- if(GallerySubmission::where('gallery_id', $gallery->id)->exists() || Gallery::where('parent_id', $gallery->id)->exists()) throw new \Exception("A gallery or submissions in this gallery exist. Consider setting the gallery's submissions to closed instead.");
+ if (GallerySubmission::where('gallery_id', $gallery->id)->exists() || Gallery::where('parent_id', $gallery->id)->exists()) {
+ throw new \Exception("A gallery or submissions in this gallery exist. Consider setting the gallery's submissions to closed instead.");
+ }
$gallery->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
}
diff --git a/app/Services/InventoryManager.php b/app/Services/InventoryManager.php
index 422b3cb076..4ddfff8781 100644
--- a/app/Services/InventoryManager.php
+++ b/app/Services/InventoryManager.php
@@ -1,23 +1,19 @@
-creditItem($staff, $user, 'Staff Grant', Arr::only($data, ['data', 'disallow_transfer', 'notes']), $item, $keyed_quantities[$item->id]))
- {
+ foreach ($users as $user) {
+ foreach ($items as $item) {
+ if ($this->creditItem($staff, $user, 'Staff Grant', Arr::only($data, ['data', 'disallow_transfer', 'notes']), $item, $keyed_quantities[$item->id])) {
Notifications::create('ITEM_GRANT', $user, [
- 'item_name' => $item->name,
+ 'item_name' => $item->name,
'item_quantity' => $keyed_quantities[$item->id],
- 'sender_url' => $staff->url,
- 'sender_name' => $staff->name
+ 'sender_url' => $staff->url,
+ 'sender_name' => $staff->name,
]);
- }
- else
- {
- throw new \Exception("Failed to credit items to ".$user->name.".");
+ } else {
+ throw new \Exception('Failed to credit items to '.$user->name.'.');
}
}
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Grants an item to a character.
*
- * @param array $data
- * @param \App\Models\Character\Character $character
- * @param \App\Models\User\User $staff
+ * @param array $data
+ * @param \App\Models\Character\Character $character
+ * @param \App\Models\User\User $staff
+ *
* @return bool
*/
- public function grantCharacterItems($data, $character, $staff)
- {
+ public function grantCharacterItems($data, $character, $staff) {
DB::beginTransaction();
try {
- if(!$character) throw new \Exception("Invalid character selected.");
+ if (!$character) {
+ throw new \Exception('Invalid character selected.');
+ }
- foreach($data['quantities'] as $q) {
- if($q <= 0) throw new \Exception("All quantities must be at least 1.");
+ foreach ($data['quantities'] as $q) {
+ if ($q <= 0) {
+ throw new \Exception('All quantities must be at least 1.');
+ }
}
$keyed_quantities = [];
- array_walk($data['item_ids'], function($id, $key) use(&$keyed_quantities, $data) {
- if($id != null && !in_array($id, array_keys($keyed_quantities), TRUE)) {
+ array_walk($data['item_ids'], function ($id, $key) use (&$keyed_quantities, $data) {
+ if ($id != null && !in_array($id, array_keys($keyed_quantities), true)) {
$keyed_quantities[$id] = $data['quantities'][$key];
}
});
// Process item(s)
$items = Item::find($data['item_ids']);
- foreach($items as $i) {
- if(!$i->category->is_character_owned) throw new \Exception("One of these items cannot be owned by characters.");
+ foreach ($items as $i) {
+ if (!$i->category->is_character_owned) {
+ throw new \Exception('One of these items cannot be owned by characters.');
+ }
}
- if(!count($items)) throw new \Exception("No valid items found.");
-
- foreach($items as $item) {
+ if (!count($items)) {
+ throw new \Exception('No valid items found.');
+ }
+
+ foreach ($items as $item) {
$this->creditItem($staff, $character, 'Staff Grant', Arr::only($data, ['data', 'disallow_transfer', 'notes']), $item, $keyed_quantities[$item->id]);
- if($character->is_visible && $character->user_id) {
+ if ($character->is_visible && $character->user_id) {
Notifications::create('CHARACTER_ITEM_GRANT', $character->user, [
- 'item_name' => $item->name,
- 'item_quantity' => $keyed_quantities[$item->id],
- 'sender_url' => $staff->url,
- 'sender_name' => $staff->name,
+ 'item_name' => $item->name,
+ 'item_quantity' => $keyed_quantities[$item->id],
+ 'sender_url' => $staff->url,
+ 'sender_name' => $staff->name,
'character_name' => $character->fullName,
'character_slug' => $character->slug,
]);
}
}
-
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Transfers items between a user and character.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $sender
- * @param \App\Models\User\User|\App\Models\Character\Character $recipient
- * @param \App\Models\User\UserItem|\App\Models\Character\CharacterItem $stacks
- * @param int $quantities
+ * @param \App\Models\Character\Character|\App\Models\User\User $sender
+ * @param \App\Models\Character\Character|\App\Models\User\User $recipient
+ * @param \App\Models\Character\CharacterItem|\App\Models\User\UserItem $stacks
+ * @param int $quantities
+ *
* @return bool
*/
- public function transferCharacterStack($sender, $recipient, $stacks, $quantities)
- {
+ public function transferCharacterStack($sender, $recipient, $stacks, $quantities) {
DB::beginTransaction();
try {
- foreach($stacks as $key=>$stack) {
+ foreach ($stacks as $key=>$stack) {
$quantity = $quantities[$key];
- if(!$stack) throw new \Exception("Invalid or no stack selected.");
- if(!$recipient) throw new \Exception("Invalid recipient selected.");
- if(!$sender) throw new \Exception("Invalid sender selected.");
-
- if($recipient->logType == 'Character' && $sender->logType == 'Character') throw new \Exception("Cannot transfer items between characters.");
- if($recipient->logType == 'Character' && !$sender->hasPower('edit_inventories') && !$recipient->is_visible) throw new \Exception("Invalid character selected.");
- if(!$stacks) throw new \Exception("Invalid stack selected.");
- if($sender->logType == 'Character' && $quantity <= 0 && $stack->count > 0) $quantity = $stack->count;
- if($quantity <= 0) throw new \Exception("Invalid quantity entered.");
-
- if(($recipient->logType == 'Character' && !$sender->hasPower('edit_inventories') && !Auth::user() == $recipient->user) || ($recipient->logType == 'User' && !Auth::user()->hasPower('edit_inventories') && !Auth::user() == $sender->user)) throw new \Exception("Cannot transfer items to/from a character you don't own.");
-
- if($recipient->logType == 'Character' && !$stack->item->category->is_character_owned) throw new \Exception("One of the selected items cannot be owned by characters.");
- if((!$stack->item->allow_transfer || isset($stack->data['disallow_transfer'])) && !Auth::user()->hasPower('edit_inventories')) throw new \Exception("One of the selected items cannot be transferred.");
- if($stack->count < $quantity) throw new \Exception("Quantity to transfer exceeds item count.");
+ if (!$stack) {
+ throw new \Exception('Invalid or no stack selected.');
+ }
+ if (!$recipient) {
+ throw new \Exception('Invalid recipient selected.');
+ }
+ if (!$sender) {
+ throw new \Exception('Invalid sender selected.');
+ }
+
+ if ($recipient->logType == 'Character' && $sender->logType == 'Character') {
+ throw new \Exception('Cannot transfer items between characters.');
+ }
+ if ($recipient->logType == 'Character' && !$sender->hasPower('edit_inventories') && !$recipient->is_visible) {
+ throw new \Exception('Invalid character selected.');
+ }
+ if (!$stacks) {
+ throw new \Exception('Invalid stack selected.');
+ }
+ if ($sender->logType == 'Character' && $quantity <= 0 && $stack->count > 0) {
+ $quantity = $stack->count;
+ }
+ if ($quantity <= 0) {
+ throw new \Exception('Invalid quantity entered.');
+ }
+
+ if (($recipient->logType == 'Character' && !$sender->hasPower('edit_inventories') && !Auth::user() == $recipient->user) || ($recipient->logType == 'User' && !Auth::user()->hasPower('edit_inventories') && !Auth::user() == $sender->user)) {
+ throw new \Exception("Cannot transfer items to/from a character you don't own.");
+ }
+
+ if ($recipient->logType == 'Character' && !$stack->item->category->is_character_owned) {
+ throw new \Exception('One of the selected items cannot be owned by characters.');
+ }
+ if ((!$stack->item->allow_transfer || isset($stack->data['disallow_transfer'])) && !Auth::user()->hasPower('edit_inventories')) {
+ throw new \Exception('One of the selected items cannot be transferred.');
+ }
+ if ($stack->count < $quantity) {
+ throw new \Exception('Quantity to transfer exceeds item count.');
+ }
//Check that hold count isn't being exceeded
- if($stack->item->category->character_limit > 0) $limit = $stack->item->category->character_limit;
- if($recipient->logType == 'Character' && isset($limit)) {
+ if ($stack->item->category->character_limit > 0) {
+ $limit = $stack->item->category->character_limit;
+ }
+ if ($recipient->logType == 'Character' && isset($limit)) {
$limitedItems = Item::where('item_category_id', $stack->item->category->id);
$ownedLimitedItems = CharacterItem::with('item')->whereIn('item_id', $limitedItems->pluck('id'))->whereNull('deleted_at')->where('count', '>', '0')->where('character_id', $recipient->id)->get();
$newOwnedLimit = $ownedLimitedItems->pluck('count')->sum() + $quantity;
}
- if($recipient->logType == 'Character' && isset($limit) && ($ownedLimitedItems->pluck('count')->sum() >= $limit || $newOwnedLimit > $limit)) throw new \Exception("One of the selected items exceeds the limit characters can own for its category.");
+ if ($recipient->logType == 'Character' && isset($limit) && ($ownedLimitedItems->pluck('count')->sum() >= $limit || $newOwnedLimit > $limit)) {
+ throw new \Exception('One of the selected items exceeds the limit characters can own for its category.');
+ }
$this->creditItem($sender, $recipient, $sender->logType == 'User' ? 'User → Character Transfer' : 'Character → User Transfer', $stack->data, $stack->item, $quantity);
$stack->count -= $quantity;
$stack->save();
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Transfers items between user stacks.
*
- * @param \App\Models\User\User $sender
- * @param \App\Models\User\User $recipient
- * @param \App\Models\User\UserItem $stacks
- * @param int $quantities
+ * @param \App\Models\User\User $sender
+ * @param \App\Models\User\User $recipient
+ * @param \App\Models\User\UserItem $stacks
+ * @param int $quantities
+ *
* @return bool
*/
- public function transferStack($sender, $recipient, $stacks, $quantities)
- {
+ public function transferStack($sender, $recipient, $stacks, $quantities) {
DB::beginTransaction();
try {
- foreach($stacks as $key=>$stack) {
+ foreach ($stacks as $key=>$stack) {
$quantity = $quantities[$key];
- if(!$sender->hasAlias) throw new \Exception("You need to have a linked social media account before you can perform this action.");
- if(!$stack) throw new \Exception("An invalid item was selected.");
- if($stack->user_id != $sender->id && !$sender->hasPower('edit_inventories')) throw new \Exception("You do not own one of the selected items.");
- if($stack->user_id == $recipient->id) throw new \Exception("Cannot send items to the item's owner.");
- if(!$recipient) throw new \Exception("Invalid recipient selected.");
- if(!$recipient->hasAlias) throw new \Exception("Cannot transfer items to a non-verified member.");
- if($recipient->is_banned) throw new \Exception("Cannot transfer items to a banned member.");
- if((!$stack->item->allow_transfer || isset($stack->data['disallow_transfer'])) && !$sender->hasPower('edit_inventories')) throw new \Exception("One of the selected items cannot be transferred.");
- if($stack->count < $quantity) throw new \Exception("Quantity to transfer exceeds item count.");
+ if (!$sender->hasAlias) {
+ throw new \Exception('You need to have a linked social media account before you can perform this action.');
+ }
+ if (!$stack) {
+ throw new \Exception('An invalid item was selected.');
+ }
+ if ($stack->user_id != $sender->id && !$sender->hasPower('edit_inventories')) {
+ throw new \Exception('You do not own one of the selected items.');
+ }
+ if ($stack->user_id == $recipient->id) {
+ throw new \Exception("Cannot send items to the item's owner.");
+ }
+ if (!$recipient) {
+ throw new \Exception('Invalid recipient selected.');
+ }
+ if (!$recipient->hasAlias) {
+ throw new \Exception('Cannot transfer items to a non-verified member.');
+ }
+ if ($recipient->is_banned) {
+ throw new \Exception('Cannot transfer items to a banned member.');
+ }
+ if ((!$stack->item->allow_transfer || isset($stack->data['disallow_transfer'])) && !$sender->hasPower('edit_inventories')) {
+ throw new \Exception('One of the selected items cannot be transferred.');
+ }
+ if ($stack->count < $quantity) {
+ throw new \Exception('Quantity to transfer exceeds item count.');
+ }
$oldUser = $stack->user;
- if($this->moveStack($stack->user, $recipient, ($stack->user_id == $sender->id ? 'User Transfer' : 'Staff Transfer'), ['data' => ($stack->user_id != $sender->id ? 'Transferred by '.$sender->displayName : '')], $stack, $quantity))
- {
+ if ($this->moveStack($stack->user, $recipient, ($stack->user_id == $sender->id ? 'User Transfer' : 'Staff Transfer'), ['data' => ($stack->user_id != $sender->id ? 'Transferred by '.$sender->displayName : '')], $stack, $quantity)) {
Notifications::create('ITEM_TRANSFER', $recipient, [
- 'item_name' => $stack->item->name,
+ 'item_name' => $stack->item->name,
'item_quantity' => $quantity,
- 'sender_url' => $sender->url,
- 'sender_name' => $sender->name
+ 'sender_url' => $sender->url,
+ 'sender_name' => $sender->name,
]);
- if($stack->user_id != $sender->id)
+ if ($stack->user_id != $sender->id) {
Notifications::create('FORCED_ITEM_TRANSFER', $oldUser, [
- 'item_name' => $stack->item->name,
+ 'item_name' => $stack->item->name,
'item_quantity' => $quantity,
- 'sender_url' => $sender->url,
- 'sender_name' => $sender->name
+ 'sender_url' => $sender->url,
+ 'sender_name' => $sender->name,
]);
+ }
}
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes items from stack.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $owner
- * @param \App\Models\User\UserItem|\App\Models\Character\CharacterItem $stacks
- * @param int $quantities
+ * @param \App\Models\Character\Character|\App\Models\User\User $owner
+ * @param \App\Models\Character\CharacterItem|\App\Models\User\UserItem $stacks
+ * @param int $quantities
+ *
* @return bool
*/
- public function deleteStack($owner, $stacks, $quantities)
- {
+ public function deleteStack($owner, $stacks, $quantities) {
DB::beginTransaction();
try {
- if($owner->logType == 'User') {
- foreach($stacks as $key=>$stack) {
+ if ($owner->logType == 'User') {
+ foreach ($stacks as $key=>$stack) {
$user = Auth::user();
$quantity = $quantities[$key];
- if(!$owner->hasAlias) throw new \Exception("You need to have a linked social media account before you can perform this action.");
- if(!$stack) throw new \Exception("An invalid item was selected.");
- if($stack->user_id != $owner->id && !$user->hasPower('edit_inventories')) throw new \Exception("You do not own one of the selected items.");
- if($stack->count < $quantity) throw new \Exception("Quantity to delete exceeds item count.");
-
+ if (!$owner->hasAlias) {
+ throw new \Exception('You need to have a linked social media account before you can perform this action.');
+ }
+ if (!$stack) {
+ throw new \Exception('An invalid item was selected.');
+ }
+ if ($stack->user_id != $owner->id && !$user->hasPower('edit_inventories')) {
+ throw new \Exception('You do not own one of the selected items.');
+ }
+ if ($stack->count < $quantity) {
+ throw new \Exception('Quantity to delete exceeds item count.');
+ }
+
$oldUser = $stack->user;
- if($this->debitStack($stack->user, ($stack->user_id == $user->id ? 'User Deleted' : 'Staff Deleted'), ['data' => ($stack->user_id != $user->id ? 'Deleted by '.$user->displayName : '')], $stack, $quantity))
- {
- if($stack->user_id != $user->id)
+ if ($this->debitStack($stack->user, ($stack->user_id == $user->id ? 'User Deleted' : 'Staff Deleted'), ['data' => ($stack->user_id != $user->id ? 'Deleted by '.$user->displayName : '')], $stack, $quantity)) {
+ if ($stack->user_id != $user->id) {
Notifications::create('ITEM_REMOVAL', $oldUser, [
- 'item_name' => $stack->item->name,
+ 'item_name' => $stack->item->name,
'item_quantity' => $quantity,
- 'sender_url' => $user->url,
- 'sender_name' => $user->name
+ 'sender_url' => $user->url,
+ 'sender_name' => $user->name,
]);
+ }
}
}
- }
- else {
- foreach($stacks as $key=>$stack) {
+ } else {
+ foreach ($stacks as $key=>$stack) {
$quantity = $quantities[$key];
$user = Auth::user();
- if(!$user->hasAlias) throw new \Exception("You need to have a linked social media account before you can perform this action.");
- if(!$stack) throw new \Exception("An invalid item was selected.");
- if($stack->character->user_id != $user->id && !$user->hasPower('edit_inventories')) throw new \Exception("You do not own one of the selected items.");
- if($stack->count < $quantity) throw new \Exception("Quantity to delete exceeds item count.");
-
- if($this->debitStack($stack->character, ($stack->character->user_id == $user->id ? 'User Deleted' : 'Staff Deleted'), ['data' => ($stack->character->user_id != $user->id ? 'Deleted by '.$user->displayName : '')], $stack, $quantity))
- {
- if($stack->character->user_id != $user->id && $stack->character->is_visible && $stack->character->user_id)
+ if (!$user->hasAlias) {
+ throw new \Exception('You need to have a linked social media account before you can perform this action.');
+ }
+ if (!$stack) {
+ throw new \Exception('An invalid item was selected.');
+ }
+ if ($stack->character->user_id != $user->id && !$user->hasPower('edit_inventories')) {
+ throw new \Exception('You do not own one of the selected items.');
+ }
+ if ($stack->count < $quantity) {
+ throw new \Exception('Quantity to delete exceeds item count.');
+ }
+
+ if ($this->debitStack($stack->character, ($stack->character->user_id == $user->id ? 'User Deleted' : 'Staff Deleted'), ['data' => ($stack->character->user_id != $user->id ? 'Deleted by '.$user->displayName : '')], $stack, $quantity)) {
+ if ($stack->character->user_id != $user->id && $stack->character->is_visible && $stack->character->user_id) {
Notifications::create('CHARACTER_ITEM_REMOVAL', $stack->character->user, [
- 'item_name' => $stack->item->name,
- 'item_quantity' => $quantity,
- 'sender_url' => $user->url,
- 'sender_name' => $user->name,
+ 'item_name' => $stack->item->name,
+ 'item_quantity' => $quantity,
+ 'sender_url' => $user->url,
+ 'sender_name' => $user->name,
'character_name' => $stack->character->fullName,
- 'character_slug' => $stack->character->slug
+ 'character_slug' => $stack->character->slug,
]);
+ }
}
}
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sells items from stack.
*
- * @param \App\Models\User\User $user
- * @param \App\Models\User\UserItem $stacks
- * @param int $quantities
+ * @param \App\Models\User\User $user
+ * @param \App\Models\User\UserItem $stacks
+ * @param int $quantities
+ *
* @return bool
*/
- public function resellStack($user, $stacks, $quantities)
- {
+ public function resellStack($user, $stacks, $quantities) {
DB::beginTransaction();
try {
- foreach($stacks as $key=>$stack) {
+ foreach ($stacks as $key=>$stack) {
$quantity = $quantities[$key];
- if(!$user->hasAlias) throw new \Exception("You need to have a linked social media account before you can perform this action.");
- if(!$stack) throw new \Exception("An invalid item was selected.");
- if($stack->user_id != $user->id && !$user->hasPower('edit_inventories')) throw new \Exception("You do not own one of the selected items.");
- if($stack->count < $quantity) throw new \Exception("Quantity to sell exceeds item count.");
- if(!isset($stack->item->data['resell'])) throw new \Exception ("This item cannot be sold.");
- if(!Config::get('lorekeeper.extensions.item_entry_expansion.resale_function')) throw new \Exception("This function is not currently enabled.");
-
+ if (!$user->hasAlias) {
+ throw new \Exception('You need to have a linked social media account before you can perform this action.');
+ }
+ if (!$stack) {
+ throw new \Exception('An invalid item was selected.');
+ }
+ if ($stack->user_id != $user->id && !$user->hasPower('edit_inventories')) {
+ throw new \Exception('You do not own one of the selected items.');
+ }
+ if ($stack->count < $quantity) {
+ throw new \Exception('Quantity to sell exceeds item count.');
+ }
+ if (!isset($stack->item->data['resell'])) {
+ throw new \Exception('This item cannot be sold.');
+ }
+ if (!Config::get('lorekeeper.extensions.item_entry_expansion.resale_function')) {
+ throw new \Exception('This function is not currently enabled.');
+ }
+
$oldUser = $stack->user;
$currencyManager = new CurrencyManager;
- if(isset($stack->item->data['resell']) && $stack->item->data['resell'])
- {
+ if (isset($stack->item->data['resell']) && $stack->item->data['resell']) {
$currency = $stack->item->resell->flip()->pop();
$currencyQuantity = $stack->item->resell->pop() * $quantity;
- if(!$currencyManager->creditCurrency(null, $oldUser, 'Sold Item', 'Sold '.$stack->item->displayName.' ×'.$quantity, $currency, $currencyQuantity))
- throw new \Exception("Failed to credit currency.");
+ if (!$currencyManager->creditCurrency(null, $oldUser, 'Sold Item', 'Sold '.$stack->item->displayName.' ×'.$quantity, $currency, $currencyQuantity)) {
+ throw new \Exception('Failed to credit currency.');
+ }
}
- if($this->debitStack($stack->user, ($stack->user_id == $user->id ? 'Sold by User' : 'Sold by Staff'), ['data' => ($stack->user_id != $user->id ? 'Sold by '.$user->displayName : '')], $stack, $quantity))
- {
- if($stack->user_id != $user->id)
+ if ($this->debitStack($stack->user, ($stack->user_id == $user->id ? 'Sold by User' : 'Sold by Staff'), ['data' => ($stack->user_id != $user->id ? 'Sold by '.$user->displayName : '')], $stack, $quantity)) {
+ if ($stack->user_id != $user->id) {
Notifications::create('ITEM_REMOVAL', $oldUser, [
- 'item_name' => $stack->item->name,
+ 'item_name' => $stack->item->name,
'item_quantity' => $quantity,
- 'sender_url' => $user->url,
- 'sender_name' => $user->name
+ 'sender_url' => $user->url,
+ 'sender_name' => $user->name,
]);
+ }
}
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Credits an item to a user or character.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $sender
- * @param \App\Models\User\User|\App\Models\Character\Character $recipient
- * @param string $type
- * @param array $data
- * @param \App\Models\Item\Item $item
- * @param int $quantity
+ * @param \App\Models\Character\Character|\App\Models\User\User $sender
+ * @param \App\Models\Character\Character|\App\Models\User\User $recipient
+ * @param string $type
+ * @param array $data
+ * @param \App\Models\Item\Item $item
+ * @param int $quantity
+ *
* @return bool
*/
- public function creditItem($sender, $recipient, $type, $data, $item, $quantity)
- {
+ public function creditItem($sender, $recipient, $type, $data, $item, $quantity) {
DB::beginTransaction();
try {
$encoded_data = \json_encode($data);
- if($recipient->logType == 'User') {
+ if ($recipient->logType == 'User') {
$recipient_stack = UserItem::where([
['user_id', '=', $recipient->id],
['item_id', '=', $item->id],
- ['data', '=', $encoded_data]
+ ['data', '=', $encoded_data],
])->first();
-
- if(!$recipient_stack)
+
+ if (!$recipient_stack) {
$recipient_stack = UserItem::create(['user_id' => $recipient->id, 'item_id' => $item->id, 'data' => $encoded_data]);
+ }
$recipient_stack->count += $quantity;
$recipient_stack->save();
- }
- else {
+ } else {
$recipient_stack = CharacterItem::where([
['character_id', '=', $recipient->id],
['item_id', '=', $item->id],
- ['data', '=', $encoded_data]
+ ['data', '=', $encoded_data],
])->first();
-
- if(!$recipient_stack)
+
+ if (!$recipient_stack) {
$recipient_stack = CharacterItem::create(['character_id' => $recipient->id, 'item_id' => $item->id, 'data' => $encoded_data]);
+ }
$recipient_stack->count += $quantity;
$recipient_stack->save();
}
- if($type && !$this->createLog($sender ? $sender->id : null, $sender ? $sender->logType : null, $recipient ? $recipient->id : null, $recipient ? $recipient->logType : null, null, $type, $data['data'], $item->id, $quantity)) throw new \Exception("Failed to create log.");
+ if ($type && !$this->createLog($sender ? $sender->id : null, $sender ? $sender->logType : null, $recipient ? $recipient->id : null, $recipient ? $recipient->logType : null, null, $type, $data['data'], $item->id, $quantity)) {
+ throw new \Exception('Failed to create log.');
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Moves items from one user or character stack to another.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $sender
- * @param \App\Models\User\User|\App\Models\Character\Character $recipient
- * @param string $type
- * @param array $data
- * @param \App\Models\User\UserItem|\App\Models\Character\CharacterItem $item
+ * @param \App\Models\Character\Character|\App\Models\User\User $sender
+ * @param \App\Models\Character\Character|\App\Models\User\User $recipient
+ * @param string $type
+ * @param array $data
+ * @param mixed $stack
+ * @param mixed $quantity
+ *
* @return bool
*/
- public function moveStack($sender, $recipient, $type, $data, $stack, $quantity)
- {
+ public function moveStack($sender, $recipient, $type, $data, $stack, $quantity) {
DB::beginTransaction();
try {
$recipient_stack = UserItem::where([
['user_id', '=', $recipient->id],
['item_id', '=', $stack->item_id],
- ['data', '=', json_encode($stack->data)]
+ ['data', '=', json_encode($stack->data)],
])->first();
- if(!$recipient_stack)
+ if (!$recipient_stack) {
$recipient_stack = UserItem::create(['user_id' => $recipient->id, 'item_id' => $stack->item_id, 'data' => json_encode($stack->data)]);
-
+ }
+
$stack->count -= $quantity;
$recipient_stack->count += $quantity;
$stack->save();
$recipient_stack->save();
- if($type && !$this->createLog($sender ? $sender->id : null, $sender ? $sender->logType : null, $recipient->id, $recipient ? $recipient->logType : null, $stack->id, $type, $data['data'], $stack->item_id, $quantity)) throw new \Exception("Failed to create log.");
+ if ($type && !$this->createLog($sender ? $sender->id : null, $sender ? $sender->logType : null, $recipient->id, $recipient ? $recipient->logType : null, $stack->id, $type, $data['data'], $stack->item_id, $quantity)) {
+ throw new \Exception('Failed to create log.');
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Debits an item from a user or character.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $owner
- * @param string $type
- * @param array $data
- * @param \App\Models\Item\UserItem $stack
+ * @param \App\Models\Character\Character|\App\Models\User\User $owner
+ * @param string $type
+ * @param array $data
+ * @param \App\Models\Item\UserItem $stack
+ * @param mixed $quantity
+ *
* @return bool
*/
- public function debitStack($owner, $type, $data, $stack, $quantity)
- {
+ public function debitStack($owner, $type, $data, $stack, $quantity) {
DB::beginTransaction();
try {
$stack->count -= $quantity;
$stack->save();
- if($type && !$this->createLog($owner ? $owner->id : null, $owner ? $owner->logType : null, null, null, $stack->id, $type, $data['data'], $stack->item->id, $quantity)) throw new \Exception("Failed to create log.");
+ if ($type && !$this->createLog($owner ? $owner->id : null, $owner ? $owner->logType : null, null, null, $stack->id, $type, $data['data'], $stack->item->id, $quantity)) {
+ throw new \Exception('Failed to create log.');
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Names an item stack.
*
- * @param \App\Models\User\User|\App\Models\Character\Character $owner
- * @param \App\Models\User\UserItem|\App\Models\Character\CharacterItem $stacks
- * @param int $quantities
+ * @param \App\Models\Character\Character|\App\Models\User\User $owner
+ * @param \App\Models\Character\CharacterItem|\App\Models\User\UserItem $stacks
+ * @param mixed $name
+ *
* @return bool
*/
- public function nameStack($owner, $stacks, $name)
- {
+ public function nameStack($owner, $stacks, $name) {
DB::beginTransaction();
try {
- foreach($stacks as $key=>$stack) {
+ foreach ($stacks as $key=>$stack) {
$user = Auth::user();
- if(!$user->hasAlias) throw new \Exception("You need to have a linked social media account before you can perform this action.");
- if(!$stack) throw new \Exception("An invalid item was selected.");
- if($stack->character->user_id != $user->id && !$user->hasPower('edit_inventories')) throw new \Exception("You do not own one of the selected items.");
+ if (!$user->hasAlias) {
+ throw new \Exception('You need to have a linked social media account before you can perform this action.');
+ }
+ if (!$stack) {
+ throw new \Exception('An invalid item was selected.');
+ }
+ if ($stack->character->user_id != $user->id && !$user->hasPower('edit_inventories')) {
+ throw new \Exception('You do not own one of the selected items.');
+ }
$stack['stack_name'] = $name;
$stack->save();
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Creates an inventory log.
*
- * @param int $senderId
- * @param string $senderType
- * @param int $recipientId
- * @param string $recipientType
- * @param int $stackId
- * @param string $type
- * @param string $data
- * @param int $quantity
- * @return int
+ * @param int $senderId
+ * @param string $senderType
+ * @param int $recipientId
+ * @param string $recipientType
+ * @param int $stackId
+ * @param string $type
+ * @param string $data
+ * @param int $quantity
+ * @param mixed $itemId
+ *
+ * @return int
*/
- public function createLog($senderId, $senderType, $recipientId, $recipientType, $stackId, $type, $data, $itemId, $quantity)
- {
-
+ public function createLog($senderId, $senderType, $recipientId, $recipientType, $stackId, $type, $data, $itemId, $quantity) {
return DB::table('items_log')->insert(
[
- 'sender_id' => $senderId,
- 'sender_type' => $senderType,
- 'recipient_id' => $recipientId,
+ 'sender_id' => $senderId,
+ 'sender_type' => $senderType,
+ 'recipient_id' => $recipientId,
'recipient_type' => $recipientType,
- 'stack_id' => $stackId,
- 'log' => $type . ($data ? ' (' . $data . ')' : ''),
- 'log_type' => $type,
- 'data' => $data, // this should be just a string
- 'item_id' => $itemId,
- 'quantity' => $quantity,
- 'created_at' => Carbon::now(),
- 'updated_at' => Carbon::now()
+ 'stack_id' => $stackId,
+ 'log' => $type.($data ? ' ('.$data.')' : ''),
+ 'log_type' => $type,
+ 'data' => $data, // this should be just a string
+ 'item_id' => $itemId,
+ 'quantity' => $quantity,
+ 'created_at' => Carbon::now(),
+ 'updated_at' => Carbon::now(),
]
);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/InvitationService.php b/app/Services/InvitationService.php
index 35dce35f21..a211edb5db 100644
--- a/app/Services/InvitationService.php
+++ b/app/Services/InvitationService.php
@@ -1,12 +1,11 @@
- $this->generateCode(),
- 'user_id' => $user->id
+ 'code' => $this->generateCode(),
+ 'user_id' => $user->id,
]);
return $this->commitReturn($invitation);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Marks an invitation code as used, saving the user who used it.
*
- * @param \App\Models\User\User $user
+ * @param \App\Models\User\User $user
+ * @param mixed $invitation
+ *
* @return \App\Models\Invitation|bool
*/
- public function useInvitation($invitation, $user)
- {
+ public function useInvitation($invitation, $user) {
DB::beginTransaction();
try {
// More specific validation
- if($invitation->recipient_id) throw new \Exception("This invitation key has already been used.");
-
+ if ($invitation->recipient_id) {
+ throw new \Exception('This invitation key has already been used.');
+ }
+
$invitation->recipient_id = $user->id;
$invitation->save();
return $this->commitReturn($invitation);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes an unused invitation code.
*
- * @param \App\Models\Invitation $invitation
+ * @param \App\Models\Invitation $invitation
+ *
* @return bool
*/
- public function deleteInvitation($invitation)
- {
+ public function deleteInvitation($invitation) {
DB::beginTransaction();
try {
// Check first if the invitation has been used
- if($invitation->recipient_id) throw new \Exception("This invitation has already been used.");
+ if ($invitation->recipient_id) {
+ throw new \Exception('This invitation has already been used.');
+ }
$invitation->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Generates a string for an invitation code.
*
* @return string
*/
- private function generateCode()
- {
+ private function generateCode() {
return randomString(10);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/Item/BoxService.php b/app/Services/Item/BoxService.php
index 89c3edb85e..df147b1468 100644
--- a/app/Services/Item/BoxService.php
+++ b/app/Services/Item/BoxService.php
@@ -1,18 +1,16 @@
- Currency::where('is_character_owned', 1)->orderBy('sort_character', 'DESC')->pluck('name', 'id'),
- 'items' => Item::orderBy('name')->pluck('name', 'id'),
- 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
- 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
- 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
+ 'items' => Item::orderBy('name')->pluck('name', 'id'),
+ 'currencies' => Currency::where('is_user_owned', 1)->orderBy('name')->pluck('name', 'id'),
+ 'tables' => LootTable::orderBy('name')->pluck('name', 'id'),
+ 'raffles' => Raffle::where('rolled_at', null)->where('is_active', 1)->orderBy('name')->pluck('name', 'id'),
];
}
/**
* Processes the data attribute of the tag and returns it in the preferred format.
*
- * @param string $tag
+ * @param string $tag
+ *
* @return mixed
*/
- public function getTagData($tag)
- {
+ public function getTagData($tag) {
$rewards = [];
- if($tag->data) {
+ if ($tag->data) {
$assets = parseAssetData($tag->data);
- foreach($assets as $type => $a)
- {
+ foreach ($assets as $type => $a) {
$class = getAssetModelString($type, false);
- foreach($a as $id => $asset)
- {
- $rewards[] = (object)[
+ foreach ($a as $id => $asset) {
+ $rewards[] = (object) [
'rewardable_type' => $class,
- 'rewardable_id' => $id,
- 'quantity' => $asset['quantity']
+ 'rewardable_id' => $id,
+ 'quantity' => $asset['quantity'],
];
}
}
}
+
return $rewards;
}
/**
* Processes the data attribute of the tag and returns it in the preferred format.
*
- * @param string $tag
- * @param array $data
+ * @param string $tag
+ * @param array $data
+ *
* @return bool
*/
- public function updateData($tag, $data)
- {
+ public function updateData($tag, $data) {
DB::beginTransaction();
try {
// If there's no data, return.
- if(!isset($data['rewardable_type'])) return true;
-
- // The data will be stored as an asset table, json_encode()d.
+ if (!isset($data['rewardable_type'])) {
+ return true;
+ }
+
+ // The data will be stored as an asset table, json_encode()d.
// First build the asset table, then prepare it for storage.
$assets = createAssetsArray();
- foreach($data['rewardable_type'] as $key => $r) {
- switch ($r)
- {
+ foreach ($data['rewardable_type'] as $key => $r) {
+ switch ($r) {
case 'Item':
$type = 'App\Models\Item\Item';
break;
@@ -107,70 +104,73 @@ public function updateData($tag, $data)
$tag->update(['data' => json_encode($assets)]);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
/**
* Acts upon the item when used from the inventory.
*
- * @param \App\Models\User\UserItem $stacks
- * @param \App\Models\User\User $user
- * @param array $data
+ * @param \App\Models\User\UserItem $stacks
+ * @param \App\Models\User\User $user
+ * @param array $data
+ *
* @return bool
*/
- public function act($stacks, $user, $data)
- {
+ public function act($stacks, $user, $data) {
DB::beginTransaction();
try {
- foreach($stacks as $key=>$stack) {
+ foreach ($stacks as $key=>$stack) {
// We don't want to let anyone who isn't the owner of the box open it,
- // so do some validation...
- if($stack->user_id != $user->id) throw new \Exception("This item does not belong to you.");
+ // so do some validation...
+ if ($stack->user_id != $user->id) {
+ throw new \Exception('This item does not belong to you.');
+ }
// Next, try to delete the box item. If successful, we can start distributing rewards.
- if((new InventoryManager)->debitStack($stack->user, 'Box Opened', ['data' => ''], $stack, $data['quantities'][$key])) {
-
- for($q=0; $q<$data['quantities'][$key]; $q++) {
+ if ((new InventoryManager)->debitStack($stack->user, 'Box Opened', ['data' => ''], $stack, $data['quantities'][$key])) {
+ for ($q = 0; $q < $data['quantities'][$key]; $q++) {
// Distribute user rewards
- if(!$rewards = fillUserAssets(parseAssetData($stack->item->tag('box')->data), $user, $user, 'Box Rewards', [
- 'data' => 'Received rewards from opening '.$stack->item->name
- ])) throw new \Exception("Failed to open box.");
+ if (!$rewards = fillUserAssets(parseAssetData($stack->item->tag('box')->data), $user, $user, 'Box Rewards', [
+ 'data' => 'Received rewards from opening '.$stack->item->name,
+ ])) {
+ throw new \Exception('Failed to open box.');
+ }
flash($this->getBoxRewardsString($rewards));
}
}
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Acts upon the item when used from the inventory.
*
- * @param array $rewards
+ * @param array $rewards
+ *
* @return string
*/
- private function getBoxRewardsString($rewards)
- {
- $results = "You have received: ";
+ private function getBoxRewardsString($rewards) {
+ $results = 'You have received: ';
$result_elements = [];
- foreach($rewards as $assetType)
- {
- if(isset($assetType))
- {
- foreach($assetType as $asset)
- {
- array_push($result_elements, $asset['asset']->name.(class_basename($asset['asset']) == 'Raffle' ? ' (Raffle Ticket)' : '')." x".$asset['quantity']);
+ foreach ($rewards as $assetType) {
+ if (isset($assetType)) {
+ foreach ($assetType as $asset) {
+ array_push($result_elements, $asset['asset']->name.(class_basename($asset['asset']) == 'Raffle' ? ' (Raffle Ticket)' : '').' x'.$asset['quantity']);
}
}
}
+
return $results.implode(', ', $result_elements);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/Item/SlotService.php b/app/Services/Item/SlotService.php
index 0f83ed7d39..e1b05fa2ec 100644
--- a/app/Services/Item/SlotService.php
+++ b/app/Services/Item/SlotService.php
@@ -1,23 +1,18 @@
- ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'rarities' => ['0' => 'Select Rarity'] + Rarity::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
'specieses' => ['0' => 'Select Species'] + Species::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'subtypes' => ['0' => 'Select Subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
- 'isMyo' => true
+ 'subtypes' => ['0' => 'Select Subtype'] + Subtype::orderBy('sort', 'DESC')->pluck('name', 'id')->toArray(),
+ 'isMyo' => true,
];
}
/**
* Processes the data attribute of the tag and returns it in the preferred format for edits.
*
- * @param string $tag
+ * @param string $tag
+ *
* @return mixed
*/
- public function getTagData($tag)
- {
+ public function getTagData($tag) {
//fetch data from DB, if there is no data then set to NULL instead
- $characterData['name'] = isset($tag->data['name']) ? $tag->data['name'] : null;
+ $characterData['name'] = $tag->data['name'] ?? null;
$characterData['species_id'] = isset($tag->data['species_id']) && $tag->data['species_id'] ? $tag->data['species_id'] : null;
$characterData['subtype_id'] = isset($tag->data['subtype_id']) && $tag->data['subtype_id'] ? $tag->data['subtype_id'] : null;
$characterData['rarity_id'] = isset($tag->data['rarity_id']) && $tag->data['rarity_id'] ? $tag->data['rarity_id'] : null;
$characterData['description'] = isset($tag->data['description']) && $tag->data['description'] ? $tag->data['description'] : null;
$characterData['parsed_description'] = parse($characterData['description']);
- $characterData['sale_value'] = isset($tag->data['sale_value']) ? $tag->data['sale_value'] : 0;
+ $characterData['sale_value'] = $tag->data['sale_value'] ?? 0;
//the switches hate true/false, need to convert boolean to binary
- if( isset($tag->data['is_sellable']) && $tag->data['is_sellable'] == "true") { $characterData['is_sellable'] = 1; } else $characterData['is_sellable'] = 0;
- if( isset($tag->data['is_tradeable']) && $tag->data['is_tradeable'] == "true") { $characterData['is_tradeable'] = 1; } else $characterData['is_tradeable'] = 0;
- if( isset($tag->data['is_giftable']) && $tag->data['is_giftable'] == "true") { $characterData['is_giftable'] = 1; } else $characterData['is_giftable'] = 0;
- if( isset($tag->data['is_visible']) && $tag->data['is_visible'] == "true") { $characterData['is_visible'] = 1; } else $characterData['is_visible'] = 0;
+ if (isset($tag->data['is_sellable']) && $tag->data['is_sellable'] == 'true') {
+ $characterData['is_sellable'] = 1;
+ } else {
+ $characterData['is_sellable'] = 0;
+ }
+ if (isset($tag->data['is_tradeable']) && $tag->data['is_tradeable'] == 'true') {
+ $characterData['is_tradeable'] = 1;
+ } else {
+ $characterData['is_tradeable'] = 0;
+ }
+ if (isset($tag->data['is_giftable']) && $tag->data['is_giftable'] == 'true') {
+ $characterData['is_giftable'] = 1;
+ } else {
+ $characterData['is_giftable'] = 0;
+ }
+ if (isset($tag->data['is_visible']) && $tag->data['is_visible'] == 'true') {
+ $characterData['is_visible'] = 1;
+ } else {
+ $characterData['is_visible'] = 0;
+ }
return $characterData;
}
@@ -70,20 +80,20 @@ public function getTagData($tag)
/**
* Processes the data attribute of the tag and returns it in the preferred format for DB storage.
*
- * @param string $tag
- * @param array $data
+ * @param string $tag
+ * @param array $data
+ *
* @return bool
*/
- public function updateData($tag, $data)
- {
+ public function updateData($tag, $data) {
//put inputs into an array to transfer to the DB
- $characterData['name'] = isset($data['name']) ? $data['name'] : null;
+ $characterData['name'] = $data['name'] ?? null;
$characterData['species_id'] = isset($data['species_id']) && $data['species_id'] ? $data['species_id'] : null;
$characterData['subtype_id'] = isset($data['subtype_id']) && $data['subtype_id'] ? $data['subtype_id'] : null;
$characterData['rarity_id'] = isset($data['rarity_id']) && $data['rarity_id'] ? $data['rarity_id'] : null;
$characterData['description'] = isset($data['description']) && $data['description'] ? $data['description'] : null;
$characterData['parsed_description'] = parse($characterData['description']);
- $characterData['sale_value'] = isset($data['sale_value']) ? $data['sale_value'] : 0;
+ $characterData['sale_value'] = $data['sale_value'] ?? 0;
//if the switch was toggled, set true, if null, set false
$characterData['is_sellable'] = isset($data['is_sellable']);
$characterData['is_tradeable'] = isset($data['is_tradeable']);
@@ -97,40 +107,42 @@ public function updateData($tag, $data)
$tag->update(['data' => json_encode($characterData)]);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Acts upon the item when used from the inventory.
*
- * @param \App\Models\User\UserItem $stacks
- * @param \App\Models\User\User $user
- * @param array $data
+ * @param \App\Models\User\UserItem $stacks
+ * @param \App\Models\User\User $user
+ * @param array $data
+ *
* @return bool
*/
- public function act($stacks, $user, $data)
- {
+ public function act($stacks, $user, $data) {
DB::beginTransaction();
try {
- foreach($stacks as $key=>$stack) {
+ foreach ($stacks as $key=>$stack) {
// We don't want to let anyone who isn't the owner of the slot to use it,
// so do some validation...
- if($stack->user_id != $user->id) throw new \Exception("This item does not belong to you.");
+ if ($stack->user_id != $user->id) {
+ throw new \Exception('This item does not belong to you.');
+ }
// Next, try to delete the tag item. If successful, we can start distributing rewards.
- if((new InventoryManager)->debitStack($stack->user, 'Slot Used', ['data' => ''], $stack, $data['quantities'][$key])) {
-
- for($q=0; $q<$data['quantities'][$key]; $q++) {
+ if ((new InventoryManager)->debitStack($stack->user, 'Slot Used', ['data' => ''], $stack, $data['quantities'][$key])) {
+ for ($q = 0; $q < $data['quantities'][$key]; $q++) {
//fill an array with the DB contents
$characterData = $stack->item->tag('slot')->data;
//set user who is opening the item
$characterData['user_id'] = $user->id;
//other vital data that is default
- $characterData['name'] = isset($characterData['name']) ? $characterData['name'] : "Slot";
+ $characterData['name'] ??= 'Slot';
$characterData['transferrable_at'] = null;
$characterData['is_myo_slot'] = 1;
//this uses your default MYO slot image from the CharacterManager
@@ -150,26 +162,43 @@ public function act($stacks, $user, $data)
$characterData['feature_data'][0] = null;
//DB has 'true' and 'false' as strings, so need to set them to true/null
- if( $stack->item->tag('slot')->data['is_sellable'] == "true") { $characterData['is_sellable'] = true; } else $characterData['is_sellable'] = null;
- if( $stack->item->tag('slot')->data['is_tradeable'] == "true") { $characterData['is_tradeable'] = true; } else $characterData['is_tradeable'] = null;
- if( $stack->item->tag('slot')->data['is_giftable'] == "true") { $characterData['is_giftable'] = true; } else $characterData['is_giftable'] = null;
- if( $stack->item->tag('slot')->data['is_visible'] == "true") { $characterData['is_visible'] = true; } else $characterData['is_visible'] = null;
+ if ($stack->item->tag('slot')->data['is_sellable'] == 'true') {
+ $characterData['is_sellable'] = true;
+ } else {
+ $characterData['is_sellable'] = null;
+ }
+ if ($stack->item->tag('slot')->data['is_tradeable'] == 'true') {
+ $characterData['is_tradeable'] = true;
+ } else {
+ $characterData['is_tradeable'] = null;
+ }
+ if ($stack->item->tag('slot')->data['is_giftable'] == 'true') {
+ $characterData['is_giftable'] = true;
+ } else {
+ $characterData['is_giftable'] = null;
+ }
+ if ($stack->item->tag('slot')->data['is_visible'] == 'true') {
+ $characterData['is_visible'] = true;
+ } else {
+ $characterData['is_visible'] = null;
+ }
// Distribute user rewards
$charService = new CharacterManager;
if ($character = $charService->createCharacter($characterData, $user, true)) {
- flash('MYO slot created successfully.')->success();
- }
- else {
- throw new \Exception("Failed to use slot.");
+ flash('MYO slot created successfully.')->success();
+ } else {
+ throw new \Exception('Failed to use slot.');
}
}
}
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
}
diff --git a/app/Services/ItemService.php b/app/Services/ItemService.php
index 4483990179..90efc15a2e 100644
--- a/app/Services/ItemService.php
+++ b/app/Services/ItemService.php
@@ -1,16 +1,14 @@
-populateCategoryData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$category = ItemCategory::create($data);
- if ($image) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($image) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Update a category.
*
- * @param \App\Models\Item\ItemCategory $category
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param \App\Models\Item\ItemCategory $category
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return \App\Models\Item\ItemCategory|bool
*/
- public function updateItemCategory($category, $data, $user)
- {
+ public function updateItemCategory($category, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(ItemCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) throw new \Exception("The name has already been taken.");
+ if (ItemCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
$data = $this->populateCategoryData($data, $category);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -87,89 +90,70 @@ public function updateItemCategory($category, $data, $user)
$category->update($data);
- if ($category) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($category) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
-
- /**
- * Handle category data.
- *
- * @param array $data
- * @param \App\Models\Item\ItemCategory|null $category
- * @return array
- */
- private function populateCategoryData($data, $category = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- isset($data['is_character_owned']) && $data['is_character_owned'] ? $data['is_character_owned'] : $data['is_character_owned'] = 0;
- isset($data['character_limit']) && $data['character_limit'] ? $data['character_limit'] : $data['character_limit'] = 0;
- isset($data['can_name']) && $data['can_name'] ? $data['can_name'] : $data['can_name'] = 0;
-
- if(isset($data['remove_image']))
- {
- if($category && $category->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
- }
- unset($data['remove_image']);
- }
- return $data;
+ return $this->rollbackReturn(false);
}
/**
* Delete a category.
*
- * @param \App\Models\Item\ItemCategory $category
+ * @param \App\Models\Item\ItemCategory $category
+ *
* @return bool
*/
- public function deleteItemCategory($category)
- {
+ public function deleteItemCategory($category) {
DB::beginTransaction();
try {
// Check first if the category is currently in use
- if(Item::where('item_category_id', $category->id)->exists()) throw new \Exception("An item with this category exists. Please change its category first.");
+ if (Item::where('item_category_id', $category->id)->exists()) {
+ throw new \Exception('An item with this category exists. Please change its category first.');
+ }
- if($category->has_image) $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ if ($category->has_image) {
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
$category->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts category order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortItemCategory($data)
- {
+ public function sortItemCategory($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
ItemCategory::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
@@ -182,73 +166,87 @@ public function sortItemCategory($data)
/**
* Creates a new item.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Item\Item
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Item\Item|bool
*/
- public function createItem($data, $user)
- {
+ public function createItem($data, $user) {
DB::beginTransaction();
try {
- if(isset($data['item_category_id']) && $data['item_category_id'] == 'none') $data['item_category_id'] = null;
+ if (isset($data['item_category_id']) && $data['item_category_id'] == 'none') {
+ $data['item_category_id'] = null;
+ }
- if((isset($data['item_category_id']) && $data['item_category_id']) && !ItemCategory::where('id', $data['item_category_id'])->exists()) throw new \Exception("The selected item category is invalid.");
+ if ((isset($data['item_category_id']) && $data['item_category_id']) && !ItemCategory::where('id', $data['item_category_id'])->exists()) {
+ throw new \Exception('The selected item category is invalid.');
+ }
$data = $this->populateData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$item = Item::create($data);
$item->update([
'data' => json_encode([
- 'rarity' => isset($data['rarity']) && $data['rarity'] ? $data['rarity'] : null,
- 'uses' => isset($data['uses']) && $data['uses'] ? $data['uses'] : null,
+ 'rarity' => isset($data['rarity']) && $data['rarity'] ? $data['rarity'] : null,
+ 'uses' => isset($data['uses']) && $data['uses'] ? $data['uses'] : null,
'release' => isset($data['release']) && $data['release'] ? $data['release'] : null,
'prompts' => isset($data['prompts']) && $data['prompts'] ? $data['prompts'] : null,
- 'resell' => isset($data['currency_quantity']) ? [$data['currency_id'] => $data['currency_quantity']] : null,
- ]) // rarity, availability info (original source, purchase locations, drop locations)
+ 'resell' => isset($data['currency_quantity']) ? [$data['currency_id'] => $data['currency_quantity']] : null,
+ ]), // rarity, availability info (original source, purchase locations, drop locations)
]);
- if ($image) $this->handleImage($image, $item->imagePath, $item->imageFileName);
+ if ($image) {
+ $this->handleImage($image, $item->imagePath, $item->imageFileName);
+ }
return $this->commitReturn($item);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates an item.
*
- * @param \App\Models\Item\Item $item
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Item\Item
+ * @param \App\Models\Item\Item $item
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Item\Item|bool
*/
- public function updateItem($item, $data, $user)
- {
+ public function updateItem($item, $data, $user) {
DB::beginTransaction();
try {
- if(isset($data['item_category_id']) && $data['item_category_id'] == 'none') $data['item_category_id'] = null;
+ if (isset($data['item_category_id']) && $data['item_category_id'] == 'none') {
+ $data['item_category_id'] = null;
+ }
// More specific validation
- if(Item::where('name', $data['name'])->where('id', '!=', $item->id)->exists()) throw new \Exception("The name has already been taken.");
- if((isset($data['item_category_id']) && $data['item_category_id']) && !ItemCategory::where('id', $data['item_category_id'])->exists()) throw new \Exception("The selected item category is invalid.");
+ if (Item::where('name', $data['name'])->where('id', '!=', $item->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
+ if ((isset($data['item_category_id']) && $data['item_category_id']) && !ItemCategory::where('id', $data['item_category_id'])->exists()) {
+ throw new \Exception('The selected item category is invalid.');
+ }
$data = $this->populateData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -258,81 +256,68 @@ public function updateItem($item, $data, $user)
$item->update([
'data' => json_encode([
- 'rarity' => isset($data['rarity']) && $data['rarity'] ? $data['rarity'] : null,
- 'uses' => isset($data['uses']) && $data['uses'] ? $data['uses'] : null,
+ 'rarity' => isset($data['rarity']) && $data['rarity'] ? $data['rarity'] : null,
+ 'uses' => isset($data['uses']) && $data['uses'] ? $data['uses'] : null,
'release' => isset($data['release']) && $data['release'] ? $data['release'] : null,
'prompts' => isset($data['prompts']) && $data['prompts'] ? $data['prompts'] : null,
- 'resell' => isset($data['currency_quantity']) ? [$data['currency_id'] => $data['currency_quantity']] : null,
- ]) // rarity, availability info (original source, purchase locations, drop locations)
+ 'resell' => isset($data['currency_quantity']) ? [$data['currency_id'] => $data['currency_quantity']] : null,
+ ]), // rarity, availability info (original source, purchase locations, drop locations)
]);
- if ($item) $this->handleImage($image, $item->imagePath, $item->imageFileName);
+ if ($item) {
+ $this->handleImage($image, $item->imagePath, $item->imageFileName);
+ }
return $this->commitReturn($item);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
-
- /**
- * Processes user input for creating/updating an item.
- *
- * @param array $data
- * @param \App\Models\Item\Item $item
- * @return array
- */
- private function populateData($data, $item = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
- else $data['parsed_description'] = null;
-
- if(!isset($data['allow_transfer'])) $data['allow_transfer'] = 0;
- if(!isset($data['is_released']) && Config::get('lorekeeper.extensions.item_entry_expansion.extra_fields')) $data['is_released'] = 0;
- else $data['is_released'] = 1;
-
- if(isset($data['remove_image']))
- {
- if($item && $item->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($item->imagePath, $item->imageFileName);
- }
- unset($data['remove_image']);
- }
- return $data;
+ return $this->rollbackReturn(false);
}
/**
* Deletes an item.
*
- * @param \App\Models\Item\Item $item
+ * @param \App\Models\Item\Item $item
+ *
* @return bool
*/
- public function deleteItem($item)
- {
+ public function deleteItem($item) {
DB::beginTransaction();
try {
// Check first if the item is currently owned or if some other site feature uses it
- if(DB::table('user_items')->where([['item_id', '=', $item->id], ['count', '>', 0]])->exists()) throw new \Exception("At least one user currently owns this item. Please remove the item(s) before deleting it.");
- if(DB::table('character_items')->where([['item_id', '=', $item->id], ['count', '>', 0]])->exists()) throw new \Exception("At least one character currently owns this item. Please remove the item(s) before deleting it.");
- if(DB::table('loots')->where('rewardable_type', 'Item')->where('rewardable_id', $item->id)->exists()) throw new \Exception("A loot table currently distributes this item as a potential reward. Please remove the item before deleting it.");
- if(DB::table('prompt_rewards')->where('rewardable_type', 'Item')->where('rewardable_id', $item->id)->exists()) throw new \Exception("A prompt currently distributes this item as a reward. Please remove the item before deleting it.");
- if(DB::table('shop_stock')->where('item_id', $item->id)->exists()) throw new \Exception("A shop currently stocks this item. Please remove the item before deleting it.");
+ if (DB::table('user_items')->where([['item_id', '=', $item->id], ['count', '>', 0]])->exists()) {
+ throw new \Exception('At least one user currently owns this item. Please remove the item(s) before deleting it.');
+ }
+ if (DB::table('character_items')->where([['item_id', '=', $item->id], ['count', '>', 0]])->exists()) {
+ throw new \Exception('At least one character currently owns this item. Please remove the item(s) before deleting it.');
+ }
+ if (DB::table('loots')->where('rewardable_type', 'Item')->where('rewardable_id', $item->id)->exists()) {
+ throw new \Exception('A loot table currently distributes this item as a potential reward. Please remove the item before deleting it.');
+ }
+ if (DB::table('prompt_rewards')->where('rewardable_type', 'Item')->where('rewardable_id', $item->id)->exists()) {
+ throw new \Exception('A prompt currently distributes this item as a reward. Please remove the item before deleting it.');
+ }
+ if (DB::table('shop_stock')->where('item_id', $item->id)->exists()) {
+ throw new \Exception('A shop currently stocks this item. Please remove the item before deleting it.');
+ }
DB::table('items_log')->where('item_id', $item->id)->delete();
DB::table('user_items')->where('item_id', $item->id)->delete();
DB::table('character_items')->where('item_id', $item->id)->delete();
$item->tags()->delete();
- if($item->has_image) $this->deleteImage($item->imagePath, $item->imageFileName);
+ if ($item->has_image) {
+ $this->deleteImage($item->imagePath, $item->imageFileName);
+ }
$item->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
@@ -347,12 +332,12 @@ public function deleteItem($item)
*
* @return array
*/
- public function getItemTags()
- {
+ public function getItemTags() {
$tags = Config::get('lorekeeper.item_tags');
$result = [];
- foreach($tags as $tag => $tagData)
+ foreach ($tags as $tag => $tagData) {
$result[$tag] = $tagData['name'];
+ }
return $result;
}
@@ -360,51 +345,62 @@ public function getItemTags()
/**
* Adds an item tag to an item.
*
- * @param \App\Models\Item\Item $item
- * @param string $tag
- * @return string|bool
+ * @param \App\Models\Item\Item $item
+ * @param string $tag
+ *
+ * @return bool|string
*/
- public function addItemTag($item, $tag)
- {
+ public function addItemTag($item, $tag) {
DB::beginTransaction();
try {
- if(!$item) throw new \Exception("Invalid item selected.");
- if($item->tags()->where('tag', $tag)->exists()) throw new \Exception("This item already has this tag attached to it.");
- if(!$tag) throw new \Exception("No tag selected.");
+ if (!$item) {
+ throw new \Exception('Invalid item selected.');
+ }
+ if ($item->tags()->where('tag', $tag)->exists()) {
+ throw new \Exception('This item already has this tag attached to it.');
+ }
+ if (!$tag) {
+ throw new \Exception('No tag selected.');
+ }
$tag = ItemTag::create([
'item_id' => $item->id,
- 'tag' => $tag
+ 'tag' => $tag,
]);
return $this->commitReturn($tag);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Edits the data associated with an item tag on an item.
*
- * @param \App\Models\Item\Item $item
- * @param string $tag
- * @param array $data
- * @return string|bool
+ * @param \App\Models\Item\Item $item
+ * @param string $tag
+ * @param array $data
+ *
+ * @return bool|string
*/
- public function editItemTag($item, $tag, $data)
- {
+ public function editItemTag($item, $tag, $data) {
DB::beginTransaction();
try {
- if(!$item) throw new \Exception("Invalid item selected.");
- if(!$item->tags()->where('tag', $tag)->exists()) throw new \Exception("This item does not have this tag attached to it.");
+ if (!$item) {
+ throw new \Exception('Invalid item selected.');
+ }
+ if (!$item->tags()->where('tag', $tag)->exists()) {
+ throw new \Exception('This item does not have this tag attached to it.');
+ }
$tag = $item->tags()->where('tag', $tag)->first();
$service = $tag->service;
- if(!$service->updateData($tag, $data)) {
+ if (!$service->updateData($tag, $data)) {
$this->setErrors($service->errors());
throw new \Exception('sdlfk');
}
@@ -414,33 +410,102 @@ public function editItemTag($item, $tag, $data)
$tag->save();
return $this->commitReturn($tag);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Removes an item tag from an item.
*
- * @param \App\Models\Item\Item $item
- * @param string $tag
- * @return string|bool
+ * @param \App\Models\Item\Item $item
+ * @param string $tag
+ *
+ * @return bool|string
*/
- public function deleteItemTag($item, $tag)
- {
+ public function deleteItemTag($item, $tag) {
DB::beginTransaction();
try {
- if(!$item) throw new \Exception("Invalid item selected.");
- if(!$item->tags()->where('tag', $tag)->exists()) throw new \Exception("This item does not have this tag attached to it.");
+ if (!$item) {
+ throw new \Exception('Invalid item selected.');
+ }
+ if (!$item->tags()->where('tag', $tag)->exists()) {
+ throw new \Exception('This item does not have this tag attached to it.');
+ }
$item->tags()->where('tag', $tag)->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+
+ /**
+ * Handle category data.
+ *
+ * @param array $data
+ * @param \App\Models\Item\ItemCategory|null $category
+ *
+ * @return array
+ */
+ private function populateCategoryData($data, $category = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ isset($data['is_character_owned']) && $data['is_character_owned'] ? $data['is_character_owned'] : $data['is_character_owned'] = 0;
+ isset($data['character_limit']) && $data['character_limit'] ? $data['character_limit'] : $data['character_limit'] = 0;
+ isset($data['can_name']) && $data['can_name'] ? $data['can_name'] : $data['can_name'] = 0;
+
+ if (isset($data['remove_image'])) {
+ if ($category && $category->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Processes user input for creating/updating an item.
+ *
+ * @param array $data
+ * @param \App\Models\Item\Item $item
+ *
+ * @return array
+ */
+ private function populateData($data, $item = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ } else {
+ $data['parsed_description'] = null;
+ }
+
+ if (!isset($data['allow_transfer'])) {
+ $data['allow_transfer'] = 0;
+ }
+ if (!isset($data['is_released']) && Config::get('lorekeeper.extensions.item_entry_expansion.extra_fields')) {
+ $data['is_released'] = 0;
+ } else {
+ $data['is_released'] = 1;
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($item && $item->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($item->imagePath, $item->imageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
}
diff --git a/app/Services/LinkService.php b/app/Services/LinkService.php
index 33756855e3..4c4e8aaa90 100644
--- a/app/Services/LinkService.php
+++ b/app/Services/LinkService.php
@@ -1,13 +1,13 @@
-setScopes(['user'])->redirect();
- else return Socialite::driver($provider)->redirect();
+ if ($provider == 'deviantart') {
+ return Socialite::driver($provider)->setScopes(['user'])->redirect();
+ } else {
+ return Socialite::driver($provider)->redirect();
+ }
}
/**
- * Link the user's social media account name to their account
- *
- * @param \App\Models\User\User $user
+ * Link the user's social media account name to their account.
+ *
+ * @param \App\Models\User\User $user
+ * @param mixed $provider
+ * @param mixed $result
*/
public function saveProvider($provider, $result, $user) {
DB::beginTransaction();
try {
- if(!$result || !$result->nickname) throw new \Exception("Unable to retrieve user data.");
+ if (!$result || !$result->nickname) {
+ throw new \Exception('Unable to retrieve user data.');
+ }
- if(DB::table('user_aliases')->where('site', $provider)->where('alias', $result->nickname)->exists()) throw new \Exception("Cannot link the same account multiple times and/or to different site accounts.");
+ if (DB::table('user_aliases')->where('site', $provider)->where('alias', $result->nickname)->exists()) {
+ throw new \Exception('Cannot link the same account multiple times and/or to different site accounts.');
+ }
// Save the user's alias and set it as the primary alias
UserAlias::create([
- 'user_id' => $user->id,
- 'site' => $provider,
- 'alias' => $result->nickname,
- 'is_visible' => !$user->has_alias,
+ 'user_id' => $user->id,
+ 'site' => $provider,
+ 'alias' => $result->nickname,
+ 'is_visible' => !$user->has_alias,
'is_primary_alias' => !$user->has_alias,
]);
// Save that the user has an alias
$user->has_alias = 1;
$user->save();
-
+
UserUpdateLog::create(['user_id' => $user->id, 'data' => json_encode(['alias' => $result->nickname, 'site' => $provider]), 'type' => 'Alias Added']);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Makes the selected alias the user's primary alias.
- *
- * @param \App\Models\User\User $user
+ *
+ * @param \App\Models\User\User $user
+ * @param mixed $aliasId
*/
public function makePrimary($aliasId, $user) {
DB::beginTransaction();
@@ -73,8 +86,12 @@ public function makePrimary($aliasId, $user) {
try {
$alias = UserAlias::where('id', $aliasId)->where('user_id', $user->id)->where('is_primary_alias', 0)->first();
- if(!$alias) throw new \Exception("Invalid alias selected.");
- if(!$alias->canMakePrimary) throw new \Exception("This alias cannot be made your primary alias.");
+ if (!$alias) {
+ throw new \Exception('Invalid alias selected.');
+ }
+ if (!$alias->canMakePrimary) {
+ throw new \Exception('This alias cannot be made your primary alias.');
+ }
// Unset the current primary alias
UserAlias::where('user_id', $user->id)->where('is_primary_alias', 1)->update(['is_primary_alias' => 0]);
@@ -83,20 +100,22 @@ public function makePrimary($aliasId, $user) {
$alias->is_visible = 1;
$alias->is_primary_alias = 1;
$alias->save();
-
+
UserUpdateLog::create(['user_id' => $user->id, 'data' => json_encode(['alias' => $alias->alias, 'site' => $alias->site]), 'type' => 'Primary Alias Changed']);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Hides or unhides the selected alias.
- *
- * @param \App\Models\User\User $user
+ *
+ * @param \App\Models\User\User $user
+ * @param mixed $aliasId
*/
public function hideAlias($aliasId, $user) {
DB::beginTransaction();
@@ -104,25 +123,29 @@ public function hideAlias($aliasId, $user) {
try {
$alias = UserAlias::where('id', $aliasId)->where('user_id', $user->id)->where('is_primary_alias', 0)->first();
- if(!$alias) throw new \Exception("Invalid alias selected.");
+ if (!$alias) {
+ throw new \Exception('Invalid alias selected.');
+ }
// Update the alias's visibility
$alias->is_visible = !$alias->is_visible;
$alias->save();
-
+
UserUpdateLog::create(['user_id' => $user->id, 'data' => json_encode(['alias' => $alias->alias, 'site' => $alias->site]), 'type' => 'Alias Visibility Changed']);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Removes the selected alias.
- *
- * @param \App\Models\User\User $user
+ *
+ * @param \App\Models\User\User $user
+ * @param mixed $aliasId
*/
public function removeAlias($aliasId, $user) {
DB::beginTransaction();
@@ -130,18 +153,20 @@ public function removeAlias($aliasId, $user) {
try {
$alias = UserAlias::where('id', $aliasId)->where('user_id', $user->id)->where('is_primary_alias', 0)->first();
- if(!$alias) throw new \Exception("Invalid alias selected.");
-
+ if (!$alias) {
+ throw new \Exception('Invalid alias selected.');
+ }
+
UserUpdateLog::create(['user_id' => $user->id, 'data' => json_encode(['alias' => $alias->alias, 'site' => $alias->site]), 'type' => 'Alias Deleted']);
// Delete the alias
$alias->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
}
diff --git a/app/Services/LootService.php b/app/Services/LootService.php
index a48d7d4d76..26deb58c02 100644
--- a/app/Services/LootService.php
+++ b/app/Services/LootService.php
@@ -1,17 +1,14 @@
- $type)
- {
- if(!$type) throw new \Exception("Loot type is required.");
- if($type != 'ItemRarity' && !$data['rewardable_id'][$key]) throw new \Exception("Reward is required.");
- if(!$data['quantity'][$key] || $data['quantity'][$key] < 1) throw new \Exception("Quantity is required and must be an integer greater than 0.");
- if(!$data['weight'][$key] || $data['weight'][$key] < 1) throw new \Exception("Weight is required and must be an integer greater than 0.");
- if($type == 'ItemCategoryRarity') {
- if(!isset($data['criteria'][$key]) || !$data['criteria'][$key]) throw new \Exception("Criteria is required for conditional item categories.");
- if(!isset($data['rarity'][$key]) || !$data['rarity'][$key]) throw new \Exception("A rarity is required for conditional item categories.");
+ foreach ($data['rewardable_type'] as $key => $type) {
+ if (!$type) {
+ throw new \Exception('Loot type is required.');
+ }
+ if ($type != 'ItemRarity' && !$data['rewardable_id'][$key]) {
+ throw new \Exception('Reward is required.');
+ }
+ if (!$data['quantity'][$key] || $data['quantity'][$key] < 1) {
+ throw new \Exception('Quantity is required and must be an integer greater than 0.');
+ }
+ if (!$data['weight'][$key] || $data['weight'][$key] < 1) {
+ throw new \Exception('Weight is required and must be an integer greater than 0.');
+ }
+ if ($type == 'ItemCategoryRarity') {
+ if (!isset($data['criteria'][$key]) || !$data['criteria'][$key]) {
+ throw new \Exception('Criteria is required for conditional item categories.');
+ }
+ if (!isset($data['rarity'][$key]) || !$data['rarity'][$key]) {
+ throw new \Exception('A rarity is required for conditional item categories.');
+ }
}
}
@@ -51,35 +58,46 @@ public function createLootTable($data)
$this->populateLootTable($table, Arr::only($data, ['rewardable_type', 'rewardable_id', 'quantity', 'weight', 'criteria', 'rarity']));
return $this->commitReturn($table);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a loot table.
*
- * @param \App\Models\Loot\LootTable $table
- * @param array $data
- * @return bool|\App\Models\Loot\LootTable
+ * @param \App\Models\Loot\LootTable $table
+ * @param array $data
+ *
+ * @return \App\Models\Loot\LootTable|bool
*/
- public function updateLootTable($table, $data)
- {
+ public function updateLootTable($table, $data) {
DB::beginTransaction();
try {
-
// More specific validation
- foreach($data['rewardable_type'] as $key => $type)
- {
- if(!$type) throw new \Exception("Loot type is required.");
- if($type != 'ItemRarity' && !$data['rewardable_id'][$key]) throw new \Exception("Reward is required.");
- if(!$data['quantity'][$key] || $data['quantity'][$key] < 1) throw new \Exception("Quantity is required and must be an integer greater than 0.");
- if(!$data['weight'][$key] || $data['weight'][$key] < 1) throw new \Exception("Weight is required and must be an integer greater than 0.");
- if($type == 'ItemCategoryRarity') {
- if(!isset($data['criteria'][$key]) || !$data['criteria'][$key]) throw new \Exception("Criteria is required for conditional item categories.");
- if(!isset($data['rarity'][$key]) || !$data['rarity'][$key]) throw new \Exception("A rarity is required for conditional item categories.");
+ foreach ($data['rewardable_type'] as $key => $type) {
+ if (!$type) {
+ throw new \Exception('Loot type is required.');
+ }
+ if ($type != 'ItemRarity' && !$data['rewardable_id'][$key]) {
+ throw new \Exception('Reward is required.');
+ }
+ if (!$data['quantity'][$key] || $data['quantity'][$key] < 1) {
+ throw new \Exception('Quantity is required and must be an integer greater than 0.');
+ }
+ if (!$data['weight'][$key] || $data['weight'][$key] < 1) {
+ throw new \Exception('Weight is required and must be an integer greater than 0.');
+ }
+ if ($type == 'ItemCategoryRarity') {
+ if (!isset($data['criteria'][$key]) || !$data['criteria'][$key]) {
+ throw new \Exception('Criteria is required for conditional item categories.');
+ }
+ if (!isset($data['rarity'][$key]) || !$data['rarity'][$key]) {
+ throw new \Exception('A rarity is required for conditional item categories.');
+ }
}
}
@@ -88,65 +106,68 @@ public function updateLootTable($table, $data)
$this->populateLootTable($table, Arr::only($data, ['rewardable_type', 'rewardable_id', 'quantity', 'weight', 'criteria', 'rarity']));
return $this->commitReturn($table);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
-
- /**
- * Handles the creation of loot for a loot table.
- *
- * @param \App\Models\Loot\LootTable $table
- * @param array $data
- */
- private function populateLootTable($table, $data)
- {
- // Clear the old loot...
- $table->loot()->delete();
-
- foreach($data['rewardable_type'] as $key => $type)
- {
- if($type == 'ItemCategoryRarity' || $type == 'ItemRarity')
- $lootData = [
- 'criteria' => $data['criteria'][$key],
- 'rarity' => $data['rarity'][$key]
- ];
- Loot::create([
- 'loot_table_id' => $table->id,
- 'rewardable_type' => $type,
- 'rewardable_id' => isset($data['rewardable_id'][$key]) ? $data['rewardable_id'][$key] : 1,
- 'quantity' => $data['quantity'][$key],
- 'weight' => $data['weight'][$key],
- 'data' => isset($lootData) ? json_encode($lootData) : null
- ]);
- }
+ return $this->rollbackReturn(false);
}
/**
* Deletes a loot table.
*
- * @param \App\Models\Loot\LootTable $table
+ * @param \App\Models\Loot\LootTable $table
+ *
* @return bool
*/
- public function deleteLootTable($table)
- {
+ public function deleteLootTable($table) {
DB::beginTransaction();
try {
// Check first if the table is currently in use
// - Prompts
// - Box rewards (unfortunately this can't be checked easily)
- if(PromptReward::where('rewardable_type', 'LootTable')->where('rewardable_id', $table->id)->exists()) throw new \Exception("A prompt uses this table to distribute rewards. Please remove it from the rewards list first.");
+ if (PromptReward::where('rewardable_type', 'LootTable')->where('rewardable_id', $table->id)->exists()) {
+ throw new \Exception('A prompt uses this table to distribute rewards. Please remove it from the rewards list first.');
+ }
$table->loot()->delete();
$table->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+
+ /**
+ * Handles the creation of loot for a loot table.
+ *
+ * @param \App\Models\Loot\LootTable $table
+ * @param array $data
+ */
+ private function populateLootTable($table, $data) {
+ // Clear the old loot...
+ $table->loot()->delete();
+
+ foreach ($data['rewardable_type'] as $key => $type) {
+ if ($type == 'ItemCategoryRarity' || $type == 'ItemRarity') {
+ $lootData = [
+ 'criteria' => $data['criteria'][$key],
+ 'rarity' => $data['rarity'][$key],
+ ];
+ }
+
+ Loot::create([
+ 'loot_table_id' => $table->id,
+ 'rewardable_type' => $type,
+ 'rewardable_id' => $data['rewardable_id'][$key] ?? 1,
+ 'quantity' => $data['quantity'][$key],
+ 'weight' => $data['weight'][$key],
+ 'data' => isset($lootData) ? json_encode($lootData) : null,
+ ]);
+ }
+ }
}
diff --git a/app/Services/NewsService.php b/app/Services/NewsService.php
index 46482b3c04..7c6ede92b8 100644
--- a/app/Services/NewsService.php
+++ b/app/Services/NewsService.php
@@ -1,15 +1,12 @@
-id;
- if(!isset($data['is_visible'])) $data['is_visible'] = 0;
+ if (!isset($data['is_visible'])) {
+ $data['is_visible'] = 0;
+ }
$news = News::create($data);
- if($news->is_visible) $this->alertUsers();
+ if ($news->is_visible) {
+ $this->alertUsers();
+ }
return $this->commitReturn($news);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a news post.
*
- * @param \App\Models\News $news
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\News
+ * @param \App\Models\News $news
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\News|bool
*/
- public function updateNews($news, $data, $user)
- {
+ public function updateNews($news, $data, $user) {
DB::beginTransaction();
try {
$data['parsed_text'] = parse($data['text']);
$data['user_id'] = $user->id;
- if(!isset($data['is_visible'])) $data['is_visible'] = 0;
- if(isset($data['bump']) && $data['is_visible'] == 1 && $data['bump'] == 1) $this->alertUsers();
+ if (!isset($data['is_visible'])) {
+ $data['is_visible'] = 0;
+ }
+ if (isset($data['bump']) && $data['is_visible'] == 1 && $data['bump'] == 1) {
+ $this->alertUsers();
+ }
$news->update($data);
return $this->commitReturn($news);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes a news post.
*
- * @param \App\Models\News $news
+ * @param \App\Models\News $news
+ *
* @return bool
*/
- public function deleteNews($news)
- {
+ public function deleteNews($news) {
DB::beginTransaction();
try {
$news->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
@@ -99,10 +107,9 @@ public function deleteNews($news)
*
* @return bool
*/
- public function updateQueue()
- {
+ public function updateQueue() {
$count = News::shouldBeVisible()->count();
- if($count) {
+ if ($count) {
DB::beginTransaction();
try {
@@ -110,9 +117,10 @@ public function updateQueue()
$this->alertUsers();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
}
@@ -123,9 +131,9 @@ public function updateQueue()
*
* @return bool
*/
- private function alertUsers()
- {
+ private function alertUsers() {
User::query()->update(['is_news_unread' => 1]);
+
return true;
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/PageService.php b/app/Services/PageService.php
index b7b3d9ea0c..51dec884a6 100644
--- a/app/Services/PageService.php
+++ b/app/Services/PageService.php
@@ -1,14 +1,12 @@
-id;
- if(!isset($data['is_visible'])) $data['is_visible'] = 0;
- if(!isset($data['can_comment'])) $data['can_comment'] = 0;
+ if (!isset($data['is_visible'])) {
+ $data['is_visible'] = 0;
+ }
+ if (!isset($data['can_comment'])) {
+ $data['can_comment'] = 0;
+ }
$page = SitePage::create($data);
return $this->commitReturn($page);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a site page.
*
- * @param \App\Models\SitePage $news
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\SitePage
+ * @param array $data
+ * @param \App\Models\User\User $user
+ * @param mixed $page
+ *
+ * @return \App\Models\SitePage|bool
*/
- public function updatePage($page, $data, $user)
- {
+ public function updatePage($page, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(SitePage::where('key', $data['key'])->where('id', '!=', $page->id)->exists()) throw new \Exception("The key has already been taken.");
+ if (SitePage::where('key', $data['key'])->where('id', '!=', $page->id)->exists()) {
+ throw new \Exception('The key has already been taken.');
+ }
- if(isset($data['text']) && $data['text']) $data['parsed_text'] = parse($data['text']);
+ if (isset($data['text']) && $data['text']) {
+ $data['parsed_text'] = parse($data['text']);
+ }
$data['user_id'] = $user->id;
- if(!isset($data['is_visible'])) $data['is_visible'] = 0;
- if(!isset($data['can_comment'])) $data['can_comment'] = 0;
+ if (!isset($data['is_visible'])) {
+ $data['is_visible'] = 0;
+ }
+ if (!isset($data['can_comment'])) {
+ $data['can_comment'] = 0;
+ }
$page->update($data);
return $this->commitReturn($page);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes a site page.
*
- * @param \App\Models\SitePage $news
+ * @param mixed $page
+ *
* @return bool
*/
- public function deletePage($page)
- {
+ public function deletePage($page) {
DB::beginTransaction();
try {
// Specific pages such as the TOS/privacy policy cannot be deleted from the admin panel.
- if(Config::get('lorekeeper.text_pages.'.$page->key)) throw new \Exception("You cannot delete this page.");
+ if (Config::get('lorekeeper.text_pages.'.$page->key)) {
+ throw new \Exception('You cannot delete this page.');
+ }
$page->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/PromptService.php b/app/Services/PromptService.php
index 0f503aadb9..f1a737a82a 100644
--- a/app/Services/PromptService.php
+++ b/app/Services/PromptService.php
@@ -1,19 +1,16 @@
-populateCategoryData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$category = PromptCategory::create($data);
- if ($image) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($image) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Update a category.
*
- * @param \App\Models\Prompt\PromptCategory $category
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param \App\Models\Prompt\PromptCategory $category
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return \App\Models\Prompt\PromptCategory|bool
*/
- public function updatePromptCategory($category, $data, $user)
- {
+ public function updatePromptCategory($category, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(PromptCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) throw new \Exception("The name has already been taken.");
+ if (PromptCategory::where('name', $data['name'])->where('id', '!=', $category->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
$data = $this->populateCategoryData($data, $category);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -90,86 +92,70 @@ public function updatePromptCategory($category, $data, $user)
$category->update($data);
- if ($category) $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ if ($category) {
+ $this->handleImage($image, $category->categoryImagePath, $category->categoryImageFileName);
+ }
return $this->commitReturn($category);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
- /**
- * Handle category data.
- *
- * @param array $data
- * @param \App\Models\Prompt\PromptCategory|null $category
- * @return array
- */
- private function populateCategoryData($data, $category = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
- elseif(!isset($data['description']) && !$data['description']) $data['parsed_description'] = null;
-
- if(isset($data['remove_image']))
- {
- if($category && $category->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
- }
- unset($data['remove_image']);
- }
-
- return $data;
+ return $this->rollbackReturn(false);
}
/**
* Delete a category.
*
- * @param \App\Models\Prompt\PromptCategory $category
+ * @param \App\Models\Prompt\PromptCategory $category
+ *
* @return bool
*/
- public function deletePromptCategory($category)
- {
+ public function deletePromptCategory($category) {
DB::beginTransaction();
try {
// Check first if the category is currently in use
- if(Prompt::where('prompt_category_id', $category->id)->exists()) throw new \Exception("An prompt with this category exists. Please change its category first.");
+ if (Prompt::where('prompt_category_id', $category->id)->exists()) {
+ throw new \Exception('An prompt with this category exists. Please change its category first.');
+ }
- if($category->has_image) $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ if ($category->has_image) {
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
$category->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts category order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortPromptCategory($data)
- {
+ public function sortPromptCategory($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
PromptCategory::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
@@ -182,109 +168,194 @@ public function sortPromptCategory($data)
/**
* Creates a new prompt.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Prompt\Prompt
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Prompt\Prompt|bool
*/
- public function createPrompt($data, $user)
- {
+ public function createPrompt($data, $user) {
DB::beginTransaction();
try {
- if(isset($data['prompt_category_id']) && $data['prompt_category_id'] == 'none') $data['prompt_category_id'] = null;
+ if (isset($data['prompt_category_id']) && $data['prompt_category_id'] == 'none') {
+ $data['prompt_category_id'] = null;
+ }
- if((isset($data['prompt_category_id']) && $data['prompt_category_id']) && !PromptCategory::where('id', $data['prompt_category_id'])->exists()) throw new \Exception("The selected prompt category is invalid.");
+ if ((isset($data['prompt_category_id']) && $data['prompt_category_id']) && !PromptCategory::where('id', $data['prompt_category_id'])->exists()) {
+ throw new \Exception('The selected prompt category is invalid.');
+ }
$data = $this->populateData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
- if(!isset($data['hide_submissions']) && !$data['hide_submissions']) $data['hide_submissions'] = 0;
+ if (!isset($data['hide_submissions']) && !$data['hide_submissions']) {
+ $data['hide_submissions'] = 0;
+ }
$prompt = Prompt::create(Arr::only($data, ['prompt_category_id', 'name', 'summary', 'description', 'parsed_description', 'is_active', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'has_image', 'prefix', 'hide_submissions']));
- if ($image) $this->handleImage($image, $prompt->imagePath, $prompt->imageFileName);
+ if ($image) {
+ $this->handleImage($image, $prompt->imagePath, $prompt->imageFileName);
+ }
$this->populateRewards(Arr::only($data, ['rewardable_type', 'rewardable_id', 'quantity']), $prompt);
(new CriterionService)->populateCriteria(Arr::only($data, ['criterion_id', 'criterion']), $prompt, PromptCriterion::class);
-
+
return $this->commitReturn($prompt);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a prompt.
*
- * @param \App\Models\Prompt\Prompt $prompt
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Prompt\Prompt
+ * @param \App\Models\Prompt\Prompt $prompt
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Prompt\Prompt|bool
*/
- public function updatePrompt($prompt, $data, $user)
- {
+ public function updatePrompt($prompt, $data, $user) {
DB::beginTransaction();
try {
- if(isset($data['prompt_category_id']) && $data['prompt_category_id'] == 'none') $data['prompt_category_id'] = null;
+ if (isset($data['prompt_category_id']) && $data['prompt_category_id'] == 'none') {
+ $data['prompt_category_id'] = null;
+ }
// More specific validation
- if(Prompt::where('name', $data['name'])->where('id', '!=', $prompt->id)->exists()) throw new \Exception("The name has already been taken.");
- if((isset($data['prompt_category_id']) && $data['prompt_category_id']) && !PromptCategory::where('id', $data['prompt_category_id'])->exists()) throw new \Exception("The selected prompt category is invalid.");
- if(isset($data['prefix']) && Prompt::where('prefix', $data['prefix'])->where('id', '!=', $prompt->id)->exists()) throw new \Exception("That prefix has already been taken.");
+ if (Prompt::where('name', $data['name'])->where('id', '!=', $prompt->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
+ if ((isset($data['prompt_category_id']) && $data['prompt_category_id']) && !PromptCategory::where('id', $data['prompt_category_id'])->exists()) {
+ throw new \Exception('The selected prompt category is invalid.');
+ }
+ if (isset($data['prefix']) && Prompt::where('prefix', $data['prefix'])->where('id', '!=', $prompt->id)->exists()) {
+ throw new \Exception('That prefix has already been taken.');
+ }
$data = $this->populateData($data, $prompt);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
}
- if(!isset($data['hide_submissions']) && !$data['hide_submissions']) $data['hide_submissions'] = 0;
+ if (!isset($data['hide_submissions']) && !$data['hide_submissions']) {
+ $data['hide_submissions'] = 0;
+ }
$prompt->update(Arr::only($data, ['prompt_category_id', 'name', 'summary', 'description', 'parsed_description', 'is_active', 'start_at', 'end_at', 'hide_before_start', 'hide_after_end', 'has_image', 'prefix', 'hide_submissions']));
- if ($prompt) $this->handleImage($image, $prompt->imagePath, $prompt->imageFileName);
+ if ($prompt) {
+ $this->handleImage($image, $prompt->imagePath, $prompt->imageFileName);
+ }
$this->populateRewards(Arr::only($data, ['rewardable_type', 'rewardable_id', 'quantity']), $prompt);
(new CriterionService)->populateCriteria(Arr::only($data, ['criterion_id', 'criterion']), $prompt, PromptCriterion::class);
return $this->commitReturn($prompt);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
+
+ /**
+ * Deletes a prompt.
+ *
+ * @param \App\Models\Prompt\Prompt $prompt
+ *
+ * @return bool
+ */
+ public function deletePrompt($prompt) {
+ DB::beginTransaction();
+
+ try {
+ // Check first if the category is currently in use
+ if (Submission::where('prompt_id', $prompt->id)->exists()) {
+ throw new \Exception('A submission under this prompt exists. Deleting the prompt will break the submission page - consider setting the prompt to be not active instead.');
+ }
+
+ $prompt->rewards()->delete();
+ if ($prompt->has_image) {
+ $this->deleteImage($prompt->imagePath, $prompt->imageFileName);
+ }
+ $prompt->delete();
+
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+ /**
+ * Handle category data.
+ *
+ * @param array $data
+ * @param \App\Models\Prompt\PromptCategory|null $category
+ *
+ * @return array
+ */
+ private function populateCategoryData($data, $category = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ } elseif (!isset($data['description']) && !$data['description']) {
+ $data['parsed_description'] = null;
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($category && $category->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($category->categoryImagePath, $category->categoryImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+
/**
* Processes user input for creating/updating a prompt.
*
- * @param array $data
- * @param \App\Models\Prompt\Prompt $prompt
+ * @param array $data
+ * @param \App\Models\Prompt\Prompt $prompt
+ *
* @return array
*/
- private function populateData($data, $prompt = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- if(!isset($data['hide_before_start'])) $data['hide_before_start'] = 0;
- if(!isset($data['hide_after_end'])) $data['hide_after_end'] = 0;
- if(!isset($data['is_active'])) $data['is_active'] = 0;
-
- if(isset($data['remove_image']))
- {
- if($prompt && $prompt->has_image && $data['remove_image'])
- {
+ private function populateData($data, $prompt = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ if (!isset($data['hide_before_start'])) {
+ $data['hide_before_start'] = 0;
+ }
+ if (!isset($data['hide_after_end'])) {
+ $data['hide_after_end'] = 0;
+ }
+ if (!isset($data['is_active'])) {
+ $data['is_active'] = 0;
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($prompt && $prompt->has_image && $data['remove_image']) {
$data['has_image'] = 0;
$this->deleteImage($prompt->imagePath, $prompt->imageFileName);
}
@@ -297,17 +368,15 @@ private function populateData($data, $prompt = null)
/**
* Processes user input for creating/updating prompt rewards.
*
- * @param array $data
- * @param \App\Models\Prompt\Prompt $prompt
+ * @param array $data
+ * @param \App\Models\Prompt\Prompt $prompt
*/
- private function populateRewards($data, $prompt)
- {
+ private function populateRewards($data, $prompt) {
// Clear the old rewards...
$prompt->rewards()->delete();
- if(isset($data['rewardable_type'])) {
- foreach($data['rewardable_type'] as $key => $type)
- {
+ if (isset($data['rewardable_type'])) {
+ foreach ($data['rewardable_type'] as $key => $type) {
PromptReward::create([
'prompt_id' => $prompt->id,
'rewardable_type' => $type,
@@ -317,29 +386,4 @@ private function populateRewards($data, $prompt)
}
}
}
-
- /**
- * Deletes a prompt.
- *
- * @param \App\Models\Prompt\Prompt $prompt
- * @return bool
- */
- public function deletePrompt($prompt)
- {
- DB::beginTransaction();
-
- try {
- // Check first if the category is currently in use
- if(Submission::where('prompt_id', $prompt->id)->exists()) throw new \Exception("A submission under this prompt exists. Deleting the prompt will break the submission page - consider setting the prompt to be not active instead.");
-
- $prompt->rewards()->delete();
- if($prompt->has_image) $this->deleteImage($prompt->imagePath, $prompt->imageFileName);
- $prompt->delete();
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
}
diff --git a/app/Services/RaffleManager.php b/app/Services/RaffleManager.php
index 0649f0896c..f458f66de2 100644
--- a/app/Services/RaffleManager.php
+++ b/app/Services/RaffleManager.php
@@ -1,15 +1,14 @@
-first())
+ if (strlen($name) == 0) {
+ continue;
+ }
+ if ($user = User::where('name', $name)->first()) {
$count += $this->addTicket($user, $raffle);
- else
+ } else {
$count += $this->addTicket($name, $raffle);
+ }
}
+
return $count;
}
/**
* Adds one or more tickets to a single user for a raffle.
*
- * @param \App\Models\User\User $user
- * @param \App\Models\Raffle\Raffle $raffle
- * @param int $count
+ * @param \App\Models\User\User $user
+ * @param \App\Models\Raffle\Raffle $raffle
+ * @param int $count
+ *
* @return int
*/
- public function addTicket($user, $raffle, $count = 1)
- {
- if (!$user) return 0;
- else if (!$raffle) return 0;
- else if ($count == 0) return 0;
- else if ($raffle->rolled_at != null) return 0;
- else {
+ public function addTicket($user, $raffle, $count = 1) {
+ if (!$user) {
+ return 0;
+ } elseif (!$raffle) {
+ return 0;
+ } elseif ($count == 0) {
+ return 0;
+ } elseif ($raffle->rolled_at != null) {
+ return 0;
+ } else {
DB::beginTransaction();
- $data = ["raffle_id" => $raffle->id, 'created_at' => Carbon::now()] + (is_string($user) ? ['alias' => $user] : ['user_id' => $user->id]);
- for ($i = 0; $i < $count; $i++) RaffleTicket::create($data);
+ $data = ['raffle_id' => $raffle->id, 'created_at' => Carbon::now()] + (is_string($user) ? ['alias' => $user] : ['user_id' => $user->id]);
+ for ($i = 0; $i < $count; $i++) {
+ RaffleTicket::create($data);
+ }
DB::commit();
+
return 1;
}
+
return 0;
}
/**
* Removes a single ticket.
*
- * @param \App\Models\Raffle\RaffleTicket $ticket
+ * @param \App\Models\Raffle\RaffleTicket $ticket
+ *
* @return bool
*/
- public function removeTicket($ticket)
- {
- if (!$ticket) return null;
- else {
+ public function removeTicket($ticket) {
+ if (!$ticket) {
+ return null;
+ } else {
$ticket->delete();
+
return true;
}
+
return false;
}
@@ -89,25 +102,27 @@ public function removeTicket($ticket)
* If the $updateGroup flag is true, winners will be removed
* from other raffles in the group.
*
- * @param \App\Models\Raffle\RaffleGroup $raffleGroup
- * @param bool $updateGroup
+ * @param \App\Models\Raffle\RaffleGroup $raffleGroup
+ * @param bool $updateGroup
+ *
* @return bool
*/
- public function rollRaffleGroup($raffleGroup, $updateGroup = true)
- {
- if(!$raffleGroup) return null;
+ public function rollRaffleGroup($raffleGroup, $updateGroup = true) {
+ if (!$raffleGroup) {
+ return null;
+ }
DB::beginTransaction();
- foreach($raffleGroup->raffles()->orderBy('order')->get() as $raffle)
- {
- if (!$this->rollRaffle($raffle, $updateGroup))
- {
+ foreach ($raffleGroup->raffles()->orderBy('order')->get() as $raffle) {
+ if (!$this->rollRaffle($raffle, $updateGroup)) {
DB::rollback();
+
return false;
}
}
$raffleGroup->is_active = 2;
$raffleGroup->save();
DB::commit();
+
return true;
}
@@ -116,49 +131,53 @@ public function rollRaffleGroup($raffleGroup, $updateGroup = true)
* If the $updateGroup flag is true, winners will be removed
* from other raffles in the group.
*
- * @param \App\Models\Raffle\Raffle $raffle
- * @param bool $updateGroup
+ * @param \App\Models\Raffle\Raffle $raffle
+ * @param bool $updateGroup
+ *
* @return bool
*/
- public function rollRaffle($raffle, $updateGroup = false)
- {
- if(!$raffle) return null;
+ public function rollRaffle($raffle, $updateGroup = false) {
+ if (!$raffle) {
+ return null;
+ }
DB::beginTransaction();
// roll winners
- if($winners = $this->rollWinners($raffle))
- {
+ if ($winners = $this->rollWinners($raffle)) {
// mark raffle as finished
$raffle->is_active = 2;
$raffle->rolled_at = Carbon::now();
$raffle->save();
// updates the raffle group if necessary
- if($updateGroup && !$this->afterRoll($winners, $raffle->group, $raffle))
- {
+ if ($updateGroup && !$this->afterRoll($winners, $raffle->group, $raffle)) {
DB::rollback();
+
return false;
}
DB::commit();
+
return true;
}
DB::rollback();
+
return false;
}
/**
* Rolls the winners of a raffle.
*
- * @param \App\Models\Raffle\Raffle $raffle
+ * @param \App\Models\Raffle\Raffle $raffle
+ *
* @return array
*/
- private function rollWinners($raffle)
- {
+ private function rollWinners($raffle) {
$ticketPool = $raffle->tickets;
$ticketCount = $ticketPool->count();
$winners = ['ids' => [], 'aliases' => []];
- for ($i = 0; $i < $raffle->winner_count; $i++)
- {
- if($ticketCount == 0) break;
+ for ($i = 0; $i < $raffle->winner_count; $i++) {
+ if ($ticketCount == 0) {
+ break;
+ }
$num = mt_rand(0, $ticketCount - 1);
$winner = $ticketPool[$num];
@@ -167,8 +186,11 @@ private function rollWinners($raffle)
$winner->update(['position' => $i + 1]);
// save the winning ticket's user id
- if(isset($winner->user_id)) $winners['ids'][] = $winner->user_id;
- else $winners['aliases'][] = $winner->alias;
+ if (isset($winner->user_id)) {
+ $winners['ids'][] = $winner->user_id;
+ } else {
+ $winners['aliases'][] = $winner->alias;
+ }
// remove ticket from the ticket pool after pulled
$ticketPool->forget($num);
@@ -177,40 +199,36 @@ private function rollWinners($raffle)
$ticketCount--;
// remove tickets for the same user...I'm unsure how this is going to hold up with 3000 tickets,
- foreach($ticketPool as $key=>$ticket)
- {
- if(($ticket->user_id != null && $ticket->user_id == $winner->user_id) || ($ticket->user_id == null && $ticket->alias == $winner->alias))
- {
+ foreach ($ticketPool as $key=>$ticket) {
+ if (($ticket->user_id != null && $ticket->user_id == $winner->user_id) || ($ticket->user_id == null && $ticket->alias == $winner->alias)) {
$ticketPool->forget($key);
}
-
}
$ticketPool = $ticketPool->values();
$ticketCount = $ticketPool->count();
}
+
return $winners;
}
/**
* Rolls the winners of a raffle.
*
- * @param array $winners
- * @param \App\Models\Raffle\RaffleGroup $raffleGroup
- * @param \App\Models\Raffle\Raffle $raffle
+ * @param array $winners
+ * @param \App\Models\Raffle\RaffleGroup $raffleGroup
+ * @param \App\Models\Raffle\Raffle $raffle
+ *
* @return bool
*/
- private function afterRoll($winners, $raffleGroup, $raffle)
- {
+ private function afterRoll($winners, $raffleGroup, $raffle) {
// remove any tickets from winners in raffles in the group that aren't completed
$raffles = $raffleGroup->raffles()->where('is_active', '!=', 2)->where('id', '!=', $raffle->id)->get();
- foreach($raffles as $r)
- {
- $r->tickets()->where(function($query) use ($winners) {
- $query->whereIn('user_id', $winners['ids'])->orWhereIn('alias', $winners['aliases']);
+ foreach ($raffles as $r) {
+ $r->tickets()->where(function ($query) use ($winners) {
+ $query->whereIn('user_id', $winners['ids'])->orWhereIn('alias', $winners['aliases']);
})->delete();
}
+
return true;
}
-
-
}
diff --git a/app/Services/RaffleService.php b/app/Services/RaffleService.php
index 0244cef761..5c17c2ec85 100644
--- a/app/Services/RaffleService.php
+++ b/app/Services/RaffleService.php
@@ -1,15 +1,13 @@
-update(Arr::only($data, ['name', 'is_active', 'winner_count', 'group_id', 'order']));
DB::commit();
+
return $raffle;
- }
+ }
/**
- * Deletes a raffle.
+ * Deletes a raffle.
+ *
+ * @param \App\Models\Raffle\Raffle $raffle
*
- * @param \App\Models\Raffle\Raffle $raffle
* @return bool
*/
- public function deleteRaffle($raffle)
- {
+ public function deleteRaffle($raffle) {
DB::beginTransaction();
- foreach($raffle->tickets as $ticket) $ticket->delete();
+ foreach ($raffle->tickets as $ticket) {
+ $ticket->delete();
+ }
$raffle->delete();
DB::commit();
+
return true;
- }
+ }
/**
* Creates a raffle group.
*
- * @param array $data
+ * @param array $data
+ *
* @return \App\Models\Raffle\RaffleGroup
*/
- public function createRaffleGroup($data)
- {
+ public function createRaffleGroup($data) {
DB::beginTransaction();
- if(!isset($data['is_active'])) $data['is_active'] = 0;
+ if (!isset($data['is_active'])) {
+ $data['is_active'] = 0;
+ }
$group = RaffleGroup::create(Arr::only($data, ['name', 'is_active']));
DB::commit();
+
return $group;
}
/**
- * Updates a raffle group.
+ * Updates a raffle group.
+ *
+ * @param array $data
+ * @param mixed $group
*
- * @param array $data
- * @param \App\Models\Raffle\RaffleGroup $raffle
* @return \App\Models\Raffle\Raffle
*/
- public function updateRaffleGroup($data, $group)
- {
+ public function updateRaffleGroup($data, $group) {
DB::beginTransaction();
- if(!isset($data['is_active'])) $data['is_active'] = 0;
+ if (!isset($data['is_active'])) {
+ $data['is_active'] = 0;
+ }
$group->update(Arr::only($data, ['name', 'is_active']));
- foreach($group->raffles as $raffle) $raffle->update(['is_active' => $data['is_active']]);
+ foreach ($group->raffles as $raffle) {
+ $raffle->update(['is_active' => $data['is_active']]);
+ }
DB::commit();
+
return $group;
- }
+ }
/**
- * Deletes a raffle group.
+ * Deletes a raffle group.
+ *
+ * @param mixed $group
*
- * @param \App\Models\Raffle\RaffleGroup $raffle
* @return bool
*/
- public function deleteRaffleGroup($group)
- {
+ public function deleteRaffleGroup($group) {
DB::beginTransaction();
- foreach($group->raffles as $raffle) $raffle->update(['group_id' => null]);
+ foreach ($group->raffles as $raffle) {
+ $raffle->update(['group_id' => null]);
+ }
$group->delete();
DB::commit();
+
return true;
- }
+ }
}
diff --git a/app/Services/RankService.php b/app/Services/RankService.php
index 7c88993d01..1cac07191a 100644
--- a/app/Services/RankService.php
+++ b/app/Services/RankService.php
@@ -1,16 +1,13 @@
-exists()) throw new \Exception("A rank with the given name already exists.");
+ if (Rank::where('name', $data['name'])->exists()) {
+ throw new \Exception('A rank with the given name already exists.');
+ }
$powers = null;
- if(isset($data['powers'])) {
- foreach($data['powers'] as $power) {
- if(!Config::get('lorekeeper.powers.'.$power)) throw new \Exception("Invalid power selected.");
+ if (isset($data['powers'])) {
+ foreach ($data['powers'] as $power) {
+ if (!Config::get('lorekeeper.powers.'.$power)) {
+ throw new \Exception('Invalid power selected.');
+ }
}
$powers = array_unique($data['powers']);
@@ -52,40 +53,51 @@ public function createRank($data, $user)
Rank::where('sort', '>=', $data['sort'])->increment('sort');
$data['color'] = isset($data['color']) ? str_replace('#', '', $data['color']) : null;
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
- $data['icon'] = isset($data['icon']) ? $data['icon'] : 'fas fa-user';
+ $data['icon'] ??= 'fas fa-user';
$rank = Rank::create($data);
- if($powers) foreach($powers as $power) DB::table('rank_powers')->insert(['rank_id' => $rank->id, 'power' => $power]);
+ if ($powers) {
+ foreach ($powers as $power) {
+ DB::table('rank_powers')->insert(['rank_id' => $rank->id, 'power' => $power]);
+ }
+ }
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a user rank.
*
- * @param \App\Models\Rank\Rank $rank
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param \App\Models\Rank\Rank $rank
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return bool
*/
- public function updateRank($rank, $data, $user)
- {
+ public function updateRank($rank, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(Rank::where('name', $data['name'])->where('id', '!=', $rank->id)->exists()) throw new \Exception("A rank with the given name already exists.");
+ if (Rank::where('name', $data['name'])->where('id', '!=', $rank->id)->exists()) {
+ throw new \Exception('A rank with the given name already exists.');
+ }
$powers = null;
- if(isset($data['powers'])) {
- foreach($data['powers'] as $power) {
- if(!Config::get('lorekeeper.powers.'.$power)) throw new \Exception("Invalid power selected.");
+ if (isset($data['powers'])) {
+ foreach ($data['powers'] as $power) {
+ if (!Config::get('lorekeeper.powers.'.$power)) {
+ throw new \Exception('Invalid power selected.');
+ }
}
$powers = array_unique($data['powers']);
@@ -93,57 +105,65 @@ public function updateRank($rank, $data, $user)
}
$data['color'] = isset($data['color']) ? str_replace('#', '', $data['color']) : null;
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
- $data['icon'] = isset($data['icon']) ? $data['icon'] : 'fas fa-user';
+ $data['icon'] ??= 'fas fa-user';
$rank->update($data);
- if($powers) {
+ if ($powers) {
$rank->powers()->delete();
- foreach($powers as $power) DB::table('rank_powers')->insert(['rank_id' => $rank->id, 'power' => $power]);
+ foreach ($powers as $power) {
+ DB::table('rank_powers')->insert(['rank_id' => $rank->id, 'power' => $power]);
+ }
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Deletes a user rank.
*
- * @param \App\Models\Rank\Rank $rank
- * @param \App\Models\User\User $user
+ * @param \App\Models\Rank\Rank $rank
+ * @param \App\Models\User\User $user
+ *
* @return bool
*/
- public function deleteRank($rank, $user)
- {
+ public function deleteRank($rank, $user) {
DB::beginTransaction();
try {
// Disallow deletion of ranks that are currently assigned to users
- if(User::where('rank_id', $rank->id)->exists()) throw new \Exception("There are currently user(s) with the selected rank. Please change their rank before deleting this one.");
+ if (User::where('rank_id', $rank->id)->exists()) {
+ throw new \Exception('There are currently user(s) with the selected rank. Please change their rank before deleting this one.');
+ }
$rank->powers()->delete();
$rank->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts user ranks.
*
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return bool
*/
- public function sortRanks($data, $user)
- {
+ public function sortRanks($data, $user) {
DB::beginTransaction();
try {
@@ -153,9 +173,13 @@ public function sortRanks($data, $user)
// Check if the array contains the admin rank, or anything non-numeric
$adminRank = Rank::orderBy('sort', 'DESC')->first();
$count = 0;
- foreach($sort as $key => $s) {
- if(!is_numeric($s) || !is_numeric($key)) throw new \Exception("Invalid sort order.");
- if($s == $adminRank->id) throw new \Exception("Sort order of admin rank cannot be changed.");
+ foreach ($sort as $key => $s) {
+ if (!is_numeric($s) || !is_numeric($key)) {
+ throw new \Exception('Invalid sort order.');
+ }
+ if ($s == $adminRank->id) {
+ throw new \Exception('Sort order of admin rank cannot be changed.');
+ }
Rank::where('id', $s)->update(['sort' => $key]);
$count++;
@@ -163,9 +187,10 @@ public function sortRanks($data, $user)
$adminRank->update(['sort'=> $count]);
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/RarityService.php b/app/Services/RarityService.php
index 18d8556b09..f65851e8e2 100644
--- a/app/Services/RarityService.php
+++ b/app/Services/RarityService.php
@@ -1,16 +1,13 @@
-populateData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$rarity = Rarity::create($data);
- if ($image) $this->handleImage($image, $rarity->rarityImagePath, $rarity->rarityImageFileName);
+ if ($image) {
+ $this->handleImage($image, $rarity->rarityImagePath, $rarity->rarityImageFileName);
+ }
return $this->commitReturn($rarity);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a rarity.
*
- * @param \App\Models\Rarity $rarity
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Rarity
+ * @param \App\Models\Rarity $rarity
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Rarity|bool
*/
- public function updateRarity($rarity, $data, $user)
- {
+ public function updateRarity($rarity, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(Rarity::where('name', $data['name'])->where('id', '!=', $rarity->id)->exists()) throw new \Exception("The name has already been taken.");
+ if (Rarity::where('name', $data['name'])->where('id', '!=', $rarity->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
$data = $this->populateData($data, $rarity);
- $image = null;
- if(isset($data['image']) && $data['image']) {
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -80,87 +83,98 @@ public function updateRarity($rarity, $data, $user)
$rarity->update($data);
- if ($rarity) $this->handleImage($image, $rarity->rarityImagePath, $rarity->rarityImageFileName);
+ if ($rarity) {
+ $this->handleImage($image, $rarity->rarityImagePath, $rarity->rarityImageFileName);
+ }
return $this->commitReturn($rarity);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
- /**
- * Processes user input for creating/updating a rarity.
- *
- * @param array $data
- * @param \App\Models\Rarity $rarity
- * @return array
- */
- private function populateData($data, $rarity = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- if(isset($data['color'])) $data['color'] = str_replace('#', '', $data['color']);
-
- if(isset($data['remove_image']))
- {
- if($rarity && $rarity->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($rarity->rarityImagePath, $rarity->rarityImageFileName);
- }
- unset($data['remove_image']);
- }
-
- return $data;
- }
-
/**
* Deletes a rarity.
*
- * @param \App\Models\Rarity $rarity
+ * @param \App\Models\Rarity $rarity
+ *
* @return bool
*/
- public function deleteRarity($rarity)
- {
+ public function deleteRarity($rarity) {
DB::beginTransaction();
- try {
+ try {
// Check first if characters with this rarity exist
- if(CharacterImage::where('rarity_id', $rarity->id)->exists() || Character::where('rarity_id', $rarity->id)->exists()) throw new \Exception("A character or character image with this rarity exists. Please change its rarity first.");
+ if (CharacterImage::where('rarity_id', $rarity->id)->exists() || Character::where('rarity_id', $rarity->id)->exists()) {
+ throw new \Exception('A character or character image with this rarity exists. Please change its rarity first.');
+ }
- if($rarity->has_image) $this->deleteImage($rarity->rarityImagePath, $rarity->rarityImageFileName);
+ if ($rarity->has_image) {
+ $this->deleteImage($rarity->rarityImagePath, $rarity->rarityImageFileName);
+ }
$rarity->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts rarity order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortRarity($data)
- {
+ public function sortRarity($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
Rarity::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+
+ /**
+ * Processes user input for creating/updating a rarity.
+ *
+ * @param array $data
+ * @param \App\Models\Rarity $rarity
+ *
+ * @return array
+ */
+ private function populateData($data, $rarity = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ if (isset($data['color'])) {
+ $data['color'] = str_replace('#', '', $data['color']);
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($rarity && $rarity->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($rarity->rarityImagePath, $rarity->rarityImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+}
diff --git a/app/Services/ReportManager.php b/app/Services/ReportManager.php
index df2fa0493a..02d7d14194 100644
--- a/app/Services/ReportManager.php
+++ b/app/Services/ReportManager.php
@@ -1,25 +1,14 @@
- $user->id,
- 'url' => $data['url'],
- 'status' => 'Pending',
- 'comments' => $data['comments'],
+ 'user_id' => $user->id,
+ 'url' => $data['url'],
+ 'status' => 'Pending',
+ 'comments' => $data['comments'],
'error_type' => $data['error'],
- 'is_br' => $data['is_br'],
- ]);
-
+ 'is_br' => $data['is_br'],
+ ]);
+
return $this->commitReturn($report);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Approves a report.
*
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return mixed
*/
- public function assignReport($data, $user)
- {
+ public function assignReport($data, $user) {
DB::beginTransaction();
try {
-
- $report = Report::where('staff_id', NULL)->where('id', $data['id'])->first();
- if(!$report) throw new \Exception("This has been assigned an admin");
+ $report = Report::where('staff_id', null)->where('id', $data['id'])->first();
+ if (!$report) {
+ throw new \Exception('This has been assigned an admin');
+ }
$report->update([
'staff_id' => $user->id,
- 'status' => 'Assigned',
+ 'status' => 'Assigned',
]);
Notifications::create('REPORT_ASSIGNED', $report->user, [
- 'staff_url' => $user->url,
+ 'staff_url' => $user->url,
'staff_name' => $user->name,
- 'report_id' => $report->id,
+ 'report_id' => $report->id,
]);
return $this->commitReturn($report);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Closes a report.
*
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return mixed
*/
- public function closeReport($data, $user)
- {
+ public function closeReport($data, $user) {
DB::beginTransaction();
try {
- if(!isset($data['report'])) $report = Report::where('status', 'Assigned')->where('id', $data['id'])->first();
- elseif($data['report']->status == 'Assigned') $report = $data['report'];
- else $report = null;
- if(!$report) throw new \Exception("Invalid report.");
-
- if(isset($data['staff_comments']) && $data['staff_comments']) $data['parsed_staff_comments'] = parse($data['staff_comments']);
- else $data['parsed_staff_comments'] = null;
+ if (!isset($data['report'])) {
+ $report = Report::where('status', 'Assigned')->where('id', $data['id'])->first();
+ } elseif ($data['report']->status == 'Assigned') {
+ $report = $data['report'];
+ } else {
+ $report = null;
+ }
+ if (!$report) {
+ throw new \Exception('Invalid report.');
+ }
+
+ if (isset($data['staff_comments']) && $data['staff_comments']) {
+ $data['parsed_staff_comments'] = parse($data['staff_comments']);
+ } else {
+ $data['parsed_staff_comments'] = null;
+ }
$report->update([
- 'staff_comments' => $data['staff_comments'],
- 'parsed_staff_comments' => $data['parsed_staff_comments'],
- 'staff_id' => $user->id,
- 'status' => 'Closed'
+ 'staff_comments' => $data['staff_comments'],
+ 'parsed_staff_comments' => $data['parsed_staff_comments'],
+ 'staff_id' => $user->id,
+ 'status' => 'Closed',
]);
Notifications::create('REPORT_CLOSED', $report->user, [
- 'staff_url' => $user->url,
+ 'staff_url' => $user->url,
'staff_name' => $user->name,
- 'report_id' => $report->id,
+ 'report_id' => $report->id,
]);
return $this->commitReturn($report);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
-}
\ No newline at end of file
+}
diff --git a/app/Services/SalesService.php b/app/Services/SalesService.php
index c747f01dfc..787190e37d 100644
--- a/app/Services/SalesService.php
+++ b/app/Services/SalesService.php
@@ -1,18 +1,15 @@
-id;
- if(!isset($data['is_visible'])) $data['is_visible'] = 0;
- if(!isset($data['is_open'])) $data['is_open'] = 0;
+ if (!isset($data['is_visible'])) {
+ $data['is_visible'] = 0;
+ }
+ if (!isset($data['is_open'])) {
+ $data['is_open'] = 0;
+ }
$sales = Sales::create($data);
// The character identification comes in both the slug field and as character IDs
// First, check if the characters are accessible to begin with.
- if(isset($data['slug'])) {
+ if (isset($data['slug'])) {
$characters = Character::myo(0)->visible()->whereIn('slug', $data['slug'])->get();
- if(count($characters) != count($data['slug'])) throw new \Exception("One or more of the selected characters do not exist.");
+ if (count($characters) != count($data['slug'])) {
+ throw new \Exception('One or more of the selected characters do not exist.');
+ }
+ } else {
+ $characters = [];
}
- else $characters = [];
// Process entered character data
- if(isset($data['slug'])) $this->processCharacters($sales, $data);
+ if (isset($data['slug'])) {
+ $this->processCharacters($sales, $data);
+ }
- if($sales->is_visible) $this->alertUsers();
+ if ($sales->is_visible) {
+ $this->alertUsers();
+ }
return $this->commitReturn($sales);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Updates a Sales post.
*
- * @param \App\Models\Sales\Sales $Sales
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Sales\Sales
+ * @param array $data
+ * @param \App\Models\User\User $user
+ * @param mixed $sales
+ *
+ * @return \App\Models\Sales\Sales|bool
*/
- public function updateSales($sales, $data, $user)
- {
+ public function updateSales($sales, $data, $user) {
DB::beginTransaction();
try {
$data['parsed_text'] = parse($data['text']);
$data['user_id'] = $user->id;
- if(!isset($data['is_visible'])) $data['is_visible'] = 0;
- if(!isset($data['is_open'])) $data['is_open'] = 0;
+ if (!isset($data['is_visible'])) {
+ $data['is_visible'] = 0;
+ }
+ if (!isset($data['is_open'])) {
+ $data['is_open'] = 0;
+ }
- if(isset($data['bump']) && $data['is_visible'] == 1 && $data['bump'] == 1) $this->alertUsers();
+ if (isset($data['bump']) && $data['is_visible'] == 1 && $data['bump'] == 1) {
+ $this->alertUsers();
+ }
// The character identification comes in both the slug field and as character IDs
// First, check if the characters are accessible to begin with.
- if(isset($data['slug'])) {
+ if (isset($data['slug'])) {
$characters = Character::myo(0)->visible()->whereIn('slug', $data['slug'])->get();
- if(count($characters) != count($data['slug'])) throw new \Exception("One or more of the selected characters do not exist.");
+ if (count($characters) != count($data['slug'])) {
+ throw new \Exception('One or more of the selected characters do not exist.');
+ }
+ } else {
+ $characters = [];
}
- else $characters = [];
// Remove existing attached characters, then process entered character data
$sales->characters()->delete();
- if(isset($data['slug'])) $this->processCharacters($sales, $data);
+ if (isset($data['slug'])) {
+ $this->processCharacters($sales, $data);
+ }
$sales->update($data);
return $this->commitReturn($sales);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+ /**
+ * Deletes a Sales post.
+ *
+ * @param mixed $sales
+ *
+ * @return bool
+ */
+ public function deleteSales($sales) {
+ DB::beginTransaction();
+
+ try {
+ $sales->delete();
+
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
+
+ /**
+ * Updates queued Sales posts to be visible and alert users when
+ * they should be posted.
+ *
+ * @return bool
+ */
+ public function updateQueue() {
+ $count = Sales::shouldBeVisible()->count();
+ if ($count) {
+ DB::beginTransaction();
+
+ try {
+ Sales::shouldBeVisible()->update(['is_visible' => 1]);
+ $this->alertUsers();
+
+ return $this->commitReturn(true);
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
+ }
+
/**
* Processes sales data entered for characters.
*
- * @param App\Models\Sales\Sales $sales
- * @param array $data
+ * @param App\Models\Sales\Sales $sales
+ * @param array $data
+ *
* @return bool
*/
- private function processCharacters($sales, $data)
- {
- foreach($data['slug'] as $key=>$slug) {
+ private function processCharacters($sales, $data) {
+ foreach ($data['slug'] as $key=>$slug) {
$character = Character::myo(0)->visible()->where('slug', $slug)->first();
// Assemble data
$charData[$key] = [];
$charData[$key]['type'] = $data['sale_type'][$key];
- switch($charData[$key]['type']) {
+ switch ($charData[$key]['type']) {
case 'flatsale':
$charData[$key]['price'] = $data['price'][$key];
break;
case 'auction':
$charData[$key]['starting_bid'] = $data['starting_bid'][$key];
$charData[$key]['min_increment'] = $data['min_increment'][$key];
- if(isset($data['autobuy'][$key])) $charData[$key]['autobuy'] = $data['autobuy'][$key];
- if(isset($data['end_point'][$key])) $charData[$key]['end_point'] = $data['end_point'][$key];
+ if (isset($data['autobuy'][$key])) {
+ $charData[$key]['autobuy'] = $data['autobuy'][$key];
+ }
+ if (isset($data['end_point'][$key])) {
+ $charData[$key]['end_point'] = $data['end_point'][$key];
+ }
break;
case 'ota':
- if(isset($data['autobuy'][$key])) $charData[$key]['autobuy'] = $data['autobuy'][$key];
- if(isset($data['end_point'][$key])) $charData[$key]['end_point'] = $data['end_point'][$key];
+ if (isset($data['autobuy'][$key])) {
+ $charData[$key]['autobuy'] = $data['autobuy'][$key];
+ }
+ if (isset($data['end_point'][$key])) {
+ $charData[$key]['end_point'] = $data['end_point'][$key];
+ }
break;
case 'xta':
- if(isset($data['autobuy'][$key])) $charData[$key]['autobuy'] = $data['autobuy'][$key];
- if(isset($data['end_point'][$key])) $charData[$key]['end_point'] = $data['end_point'][$key];
+ if (isset($data['autobuy'][$key])) {
+ $charData[$key]['autobuy'] = $data['autobuy'][$key];
+ }
+ if (isset($data['end_point'][$key])) {
+ $charData[$key]['end_point'] = $data['end_point'][$key];
+ }
break;
case 'flaffle':
$charData[$key]['price'] = $data['price'][$key];
break;
case 'pwyw':
- if(isset($data['minimum'][$key])) $charData[$key]['minimum'] = $data['minimum'][$key];
+ if (isset($data['minimum'][$key])) {
+ $charData[$key]['minimum'] = $data['minimum'][$key];
+ }
break;
}
// Validate data
$validator = Validator::make($charData[$key], SalesCharacter::$rules);
- if($validator->fails()) throw new \Exception($validator->errors()->first());
+ if ($validator->fails()) {
+ throw new \Exception($validator->errors()->first());
+ }
// Record data/attach the character to the sales post
SalesCharacter::create([
'character_id' => $character->id,
- 'sales_id' => $sales->id,
- 'type' => $charData[$key]['type'],
- 'data' => json_encode($charData[$key]),
- 'description' => isset($data['description'][$key]) ? $data['description'][$key] : null,
- 'link' => isset($data['link'][$key]) ? $data['link'][$key] : null,
- 'is_open' => isset($data['character_is_open'][$character->slug]) ? $data['character_is_open'][$character->slug] : ($data['new_entry'][$key] ? 1 : 0)
+ 'sales_id' => $sales->id,
+ 'type' => $charData[$key]['type'],
+ 'data' => json_encode($charData[$key]),
+ 'description' => $data['description'][$key] ?? null,
+ 'link' => $data['link'][$key] ?? null,
+ 'is_open' => $data['character_is_open'][$character->slug] ?? ($data['new_entry'][$key] ? 1 : 0),
]);
}
}
- /**
- * Deletes a Sales post.
- *
- * @param \App\Models\Sales\Sales $Sales
- * @return bool
- */
- public function deleteSales($sales)
- {
- DB::beginTransaction();
-
- try {
- $sales->delete();
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
-
- /**
- * Updates queued Sales posts to be visible and alert users when
- * they should be posted.
- *
- * @return bool
- */
- public function updateQueue()
- {
- $count = Sales::shouldBeVisible()->count();
- if($count) {
- DB::beginTransaction();
-
- try {
- Sales::shouldBeVisible()->update(['is_visible' => 1]);
- $this->alertUsers();
-
- return $this->commitReturn(true);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
- return $this->rollbackReturn(false);
- }
- }
-
/**
* Updates the unread Sales flag for all users so that
* the new Sales notification is displayed.
*
* @return bool
*/
- private function alertUsers()
- {
+ private function alertUsers() {
User::query()->update(['is_sales_unread' => 1]);
+
return true;
}
}
diff --git a/app/Services/Service.php b/app/Services/Service.php
index c3a58587d0..efe8d90954 100644
--- a/app/Services/Service.php
+++ b/app/Services/Service.php
@@ -1,14 +1,14 @@
-callMethod('beforeConstruct');
$this->resetErrors();
$this->callMethod('afterConstruct');
}
/**
- * Calls a service method and injects the required dependencies.
- * @param string $methodName
- * @return mixed
- */
- protected function callMethod($methodName)
- {
- if(method_exists($this, $methodName)) return App::call([$this, $methodName]);
- }
-
- /**
- * Return if an error exists.
+ * Return if an error exists.
+ *
* @return bool
*/
- public function hasErrors()
- {
+ public function hasErrors() {
return $this->errors->count() > 0;
}
/**
- * Return if an error exists.
+ * Return if an error exists.
+ *
+ * @param mixed $key
+ *
* @return bool
*/
- public function hasError($key)
- {
+ public function hasError($key) {
return $this->errors->has($key);
}
/**
- * Return errors.
+ * Return errors.
+ *
* @return Illuminate\Support\MessageBag
*/
- public function errors()
- {
+ public function errors() {
return $this->errors;
}
+
/**
- * Return errors.
+ * Return errors.
+ *
* @return array
*/
- public function getAllErrors()
- {
+ public function getAllErrors() {
return $this->errors->unique();
}
/**
- * Return error by key.
+ * Return error by key.
+ *
+ * @param mixed $key
+ *
* @return Illuminate\Support\MessageBag
*/
- public function getError($key)
- {
+ public function getError($key) {
return $this->errors->get($key);
}
/**
* Empty the errors MessageBag.
- * @return void
*/
- public function resetErrors()
- {
+ public function resetErrors() {
$this->errors = new MessageBag();
}
+ public function remember($key = null, $fn = null) {
+ if (isset($this->cache[$key])) {
+ return $this->cache[$key];
+ }
+
+ return $this->cache[$key] = $fn();
+ }
+
+ public function forget($key = null) {
+ unset($this->cache[$key]);
+ }
+
+ public function setUser($user) {
+ $this->user = $user;
+
+ return $this;
+ }
+
+ public function user() {
+ return $this->user ? $this->user : Auth::user();
+ }
+
+ // 1. Old image exists, want to move it to a new location.
+ // 2. Given new image, want to upload it to new location.
+ // (old image may or may not exist)
+ // 3. Nothing happens (no changes required)
+ public function handleImage($image, $dir, $name, $oldName = null, $copy = false) {
+ if (!$oldName && !$image) {
+ return true;
+ }
+
+ if (!$image) {
+ // Check if we're moving an old image, and move it if it does.
+ if ($oldName) {
+ return $this->moveImage($dir, $name, $oldName, $copy);
+ }
+ } else {
+ // Don't want to leave a lot of random images lying around,
+ // so move the old image first if it exists.
+ if ($oldName) {
+ $this->moveImage($dir, $name, $oldName, $copy);
+ }
+
+ // Then overwrite the old image.
+ return $this->saveImage($image, $dir, $name, $copy);
+ }
+
+ return false;
+ }
+
+ public function deleteImage($dir, $name) {
+ unlink($dir.'/'.$name);
+ }
+
+ /**
+ * Calls a service method and injects the required dependencies.
+ *
+ * @param string $methodName
+ *
+ * @return mixed
+ */
+ protected function callMethod($methodName) {
+ if (method_exists($this, $methodName)) {
+ return App::call([$this, $methodName]);
+ }
+ }
+
/**
* Add an error to the MessageBag.
+ *
* @param string $key
* @param string $value
- * @return void
*/
- protected function setError($key, $value)
- {
+ protected function setError($key, $value) {
$this->errors->add($key, $value);
}
/**
- * Add multiple errors to the message bag
+ * Add multiple errors to the message bag.
+ *
* @param Illuminate\Support\MessageBag $errors
- * @return void
*/
- protected function setErrors($errors)
- {
+ protected function setErrors($errors) {
$this->errors->merge($errors);
}
/**
* Commits the current DB transaction and returns a value.
+ *
* @param mixed $return
+ *
* @return mixed $return
*/
- protected function commitReturn($return = true)
- {
+ protected function commitReturn($return = true) {
DB::commit();
+
return $return;
}
/**
* Rolls back the current DB transaction and returns a value.
+ *
* @param mixed $return
+ *
* @return mixed $return
*/
- protected function rollbackReturn($return = false)
- {
+ protected function rollbackReturn($return = false) {
DB::rollback();
+
return $return;
}
/**
* Returns the current field if it is numeric, otherwise searches for a field if it is an array or object.
- * @param mixed $data
+ *
+ * @param mixed $data
* @param string $field
- * @return mixed
+ *
+ * @return mixed
*/
- protected function getNumeric($data, $field = 'id')
- {
- if(is_numeric($data)) return $data;
- elseif(is_object($data)) return $data->$field;
- elseif(is_array($data)) return $data[$field];
- else return 0;
- }
-
- public function remember($key = null, $fn = null)
- {
- if(isset($this->cache[$key])) return $this->cache[$key];
- return $this->cache[$key] = $fn();
- }
-
- public function forget($key = null)
- {
- unset($this->cache[$key]);
- }
-
- public function setUser($user)
- {
- $this->user = $user;
- return $this;
- }
-
- public function user()
- {
- return $this->user ? $this->user : Auth::user();
- }
-
- // 1. Old image exists, want to move it to a new location.
- // 2. Given new image, want to upload it to new location.
- // (old image may or may not exist)
- // 3. Nothing happens (no changes required)
- public function handleImage($image, $dir, $name, $oldName = null, $copy = false)
- {
- if(!$oldName && !$image) return true;
-
- if(!$image)
- {
- // Check if we're moving an old image, and move it if it does.
- if($oldName) { return $this->moveImage($dir, $name, $oldName, $copy); }
+ protected function getNumeric($data, $field = 'id') {
+ if (is_numeric($data)) {
+ return $data;
+ } elseif (is_object($data)) {
+ return $data->$field;
+ } elseif (is_array($data)) {
+ return $data[$field];
+ } else {
+ return 0;
}
- else
- {
- // Don't want to leave a lot of random images lying around,
- // so move the old image first if it exists.
- if($oldName) { $this->moveImage($dir, $name, $oldName, $copy); }
-
- // Then overwrite the old image.
- return $this->saveImage($image, $dir, $name, $copy);
- }
-
- return false;
}
// Moves an old image within the same directory.
- private function moveImage($dir, $name, $oldName, $copy = false)
- {
- if($copy) File::copy($dir . '/' . $oldName, $dir . '/' . $name);
- else File::move($dir . '/' . $oldName, $dir . '/' . $name);
+ private function moveImage($dir, $name, $oldName, $copy = false) {
+ if ($copy) {
+ File::copy($dir.'/'.$oldName, $dir.'/'.$name);
+ } else {
+ File::move($dir.'/'.$oldName, $dir.'/'.$name);
+ }
+
return true;
}
// Moves an uploaded image into a directory, checking if it exists.
- private function saveImage($image, $dir, $name, $copy = false)
- {
- if(!file_exists($dir))
- {
+ private function saveImage($image, $dir, $name, $copy = false) {
+ if (!file_exists($dir)) {
// Create the directory.
if (!mkdir($dir, 0755, true)) {
$this->setError('error', 'Failed to create image directory.');
+
return false;
}
chmod($dir, 0755);
}
- if($copy) File::copy($image, $dir . '/' . $name);
- else File::move($image, $dir . '/' . $name);
- chmod($dir . '/' . $name, 0755);
-
- return true;
- }
+ if ($copy) {
+ File::copy($image, $dir.'/'.$name);
+ } else {
+ File::move($image, $dir.'/'.$name);
+ }
+ chmod($dir.'/'.$name, 0755);
- public function deleteImage($dir, $name)
- {
- unlink($dir . '/' . $name);
+ return true;
}
}
diff --git a/app/Services/ShopManager.php b/app/Services/ShopManager.php
index 794342dd00..112c610e3c 100644
--- a/app/Services/ShopManager.php
+++ b/app/Services/ShopManager.php
@@ -1,17 +1,15 @@
-where('is_active', 1)->first();
- if(!$shop) throw new \Exception("Invalid shop selected.");
+ if (!$shop) {
+ throw new \Exception('Invalid shop selected.');
+ }
// Check that the stock exists and belongs to the shop
$shopStock = ShopStock::where('id', $data['stock_id'])->where('shop_id', $data['shop_id'])->with('currency')->with('item')->first();
- if(!$shopStock) throw new \Exception("Invalid item selected.");
+ if (!$shopStock) {
+ throw new \Exception('Invalid item selected.');
+ }
// Check if the item has a quantity, and if it does, check there is enough stock remaining
- if($shopStock->is_limited_stock && $shopStock->quantity < $quantity) throw new \Exception("There is insufficient stock to fulfill your request.");
+ if ($shopStock->is_limited_stock && $shopStock->quantity < $quantity) {
+ throw new \Exception('There is insufficient stock to fulfill your request.');
+ }
// Check if the user can only buy a limited number of this item, and if it does, check that the user hasn't hit the limit
- if($shopStock->purchase_limit && $this->checkPurchaseLimitReached($shopStock, $user)) throw new \Exception("You have already purchased the maximum amount of this item you can buy.");
+ if ($shopStock->purchase_limit && $this->checkPurchaseLimitReached($shopStock, $user)) {
+ throw new \Exception('You have already purchased the maximum amount of this item you can buy.');
+ }
$total_cost = $shopStock->cost * $quantity;
$character = null;
- if($data['bank'] == 'character')
- {
+ if ($data['bank'] == 'character') {
// Check if the user is using a character to pay
// - stock must be purchaseable with characters
// - currency must be character-held
// - character has enough currency
- if(!$shopStock->use_character_bank || !$shopStock->currency->is_character_owned) throw new \Exception("You cannot use a character's bank to pay for this item.");
- if(!$data['slug']) throw new \Exception("Please enter a character code.");
+ if (!$shopStock->use_character_bank || !$shopStock->currency->is_character_owned) {
+ throw new \Exception("You cannot use a character's bank to pay for this item.");
+ }
+ if (!$data['slug']) {
+ throw new \Exception('Please enter a character code.');
+ }
$character = Character::where('slug', $data['slug'])->first();
- if(!$character) throw new \Exception("Please enter a valid character code.");
- if(!(new CurrencyManager)->debitCurrency($character, null, 'Shop Purchase', 'Purchased '.$shopStock->item->name.' from '.$shop->name, $shopStock->currency, $total_cost)) throw new \Exception("Not enough currency to make this purchase.");
- }
- else
- {
+ if (!$character) {
+ throw new \Exception('Please enter a valid character code.');
+ }
+ if (!(new CurrencyManager)->debitCurrency($character, null, 'Shop Purchase', 'Purchased '.$shopStock->item->name.' from '.$shop->name, $shopStock->currency, $total_cost)) {
+ throw new \Exception('Not enough currency to make this purchase.');
+ }
+ } else {
// If the user is paying by themselves
// - stock must be purchaseable by users
// - currency must be user-held
// - user has enough currency
- if(!$shopStock->use_user_bank || !$shopStock->currency->is_user_owned) throw new \Exception("You cannot use your user bank to pay for this item.");
- if($shopStock->cost > 0 && !(new CurrencyManager)->debitCurrency($user, null, 'Shop Purchase', 'Purchased '.$shopStock->item->name.' from '.$shop->name, $shopStock->currency, $total_cost)) throw new \Exception("Not enough currency to make this purchase.");
+ if (!$shopStock->use_user_bank || !$shopStock->currency->is_user_owned) {
+ throw new \Exception('You cannot use your user bank to pay for this item.');
+ }
+ if ($shopStock->cost > 0 && !(new CurrencyManager)->debitCurrency($user, null, 'Shop Purchase', 'Purchased '.$shopStock->item->name.' from '.$shop->name, $shopStock->currency, $total_cost)) {
+ throw new \Exception('Not enough currency to make this purchase.');
+ }
}
// If the item has a limited quantity, decrease the quantity
- if($shopStock->is_limited_stock)
- {
+ if ($shopStock->is_limited_stock) {
$shopStock->quantity -= $quantity;
$shopStock->save();
}
// Add a purchase log
$shopLog = ShopLog::create([
- 'shop_id' => $shop->id,
- 'character_id' => $character ? $character->id : null,
- 'user_id' => $user->id,
- 'currency_id' => $shopStock->currency->id,
- 'cost' => $total_cost,
- 'item_id' => $shopStock->item_id,
- 'quantity' => $quantity
+ 'shop_id' => $shop->id,
+ 'character_id' => $character ? $character->id : null,
+ 'user_id' => $user->id,
+ 'currency_id' => $shopStock->currency->id,
+ 'cost' => $total_cost,
+ 'item_id' => $shopStock->item_id,
+ 'quantity' => $quantity,
]);
-
+
// Give the user the item, noting down 1. whose currency was used (user or character) 2. who purchased it 3. which shop it was purchased from
- if(!(new InventoryManager)->creditItem(null, $user, 'Shop Purchase', [
- 'data' => $shopLog->itemData,
- 'notes' => 'Purchased ' . format_date($shopLog->created_at)
- ], $shopStock->item, $quantity)) throw new \Exception("Failed to purchase item.");
+ if (!(new InventoryManager)->creditItem(null, $user, 'Shop Purchase', [
+ 'data' => $shopLog->itemData,
+ 'notes' => 'Purchased '.format_date($shopLog->created_at),
+ ], $shopStock->item, $quantity)) {
+ throw new \Exception('Failed to purchase item.');
+ }
return $this->commitReturn($shop);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Checks if the purchase limit for an item from a shop has been reached.
*
- * @param \App\Models\Shop\ShopStock $shopStock
- * @param \App\Models\User\User $user
+ * @param \App\Models\Shop\ShopStock $shopStock
+ * @param \App\Models\User\User $user
+ *
* @return bool
*/
- public function checkPurchaseLimitReached($shopStock, $user)
- {
- if($shopStock->purchase_limit > 0)
+ public function checkPurchaseLimitReached($shopStock, $user) {
+ if ($shopStock->purchase_limit > 0) {
return $this->checkUserPurchases($shopStock, $user) >= $shopStock->purchase_limit;
+ }
+
return false;
}
/**
* Checks how many times a user has purchased a shop item.
*
- * @param \App\Models\Shop\ShopStock $shopStock
- * @param \App\Models\User\User $user
+ * @param \App\Models\Shop\ShopStock $shopStock
+ * @param \App\Models\User\User $user
+ *
* @return int
*/
- public function checkUserPurchases($shopStock, $user)
- {
+ public function checkUserPurchases($shopStock, $user) {
return ShopLog::where('shop_id', $shopStock->shop_id)->where('item_id', $shopStock->item_id)->where('user_id', $user->id)->sum('quantity');
}
- public function getStockPurchaseLimit($shopStock, $user)
- {
+ public function getStockPurchaseLimit($shopStock, $user) {
$limit = Config::get('lorekeeper.settings.default_purchase_limit');
- if($shopStock->purchase_limit > 0) {
+ if ($shopStock->purchase_limit > 0) {
$user_purchase_limit = $shopStock->purchase_limit - $this->checkUserPurchases($shopStock, $user);
- if($user_purchase_limit < $limit) $limit = $user_purchase_limit;
+ if ($user_purchase_limit < $limit) {
+ $limit = $user_purchase_limit;
+ }
}
- if($shopStock->is_limited_stock) {
- if($shopStock->quantity < $limit) $limit = $shopStock->quantity;
+ if ($shopStock->is_limited_stock) {
+ if ($shopStock->quantity < $limit) {
+ $limit = $shopStock->quantity;
+ }
}
+
return $limit;
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/ShopService.php b/app/Services/ShopService.php
index de2f205ae6..b844ff9be3 100644
--- a/app/Services/ShopService.php
+++ b/app/Services/ShopService.php
@@ -1,15 +1,11 @@
-populateShopData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$shop = Shop::create($data);
- if ($image) $this->handleImage($image, $shop->shopImagePath, $shop->shopImageFileName);
+ if ($image) {
+ $this->handleImage($image, $shop->shopImagePath, $shop->shopImageFileName);
+ }
return $this->commitReturn($shop);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Updates a shop.
*
- * @param \App\Models\Shop\Shop $shop
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Shop\Shop
+ * @param \App\Models\Shop\Shop $shop
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Shop\Shop|bool
*/
- public function updateShop($shop, $data, $user)
- {
+ public function updateShop($shop, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(Shop::where('name', $data['name'])->where('id', '!=', $shop->id)->exists()) throw new \Exception("The name has already been taken.");
+ if (Shop::where('name', $data['name'])->where('id', '!=', $shop->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
$data = $this->populateShopData($data, $shop);
- $image = null;
- if(isset($data['image']) && $data['image']) {
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -86,40 +87,45 @@ public function updateShop($shop, $data, $user)
$shop->update($data);
- if ($shop) $this->handleImage($image, $shop->shopImagePath, $shop->shopImageFileName);
+ if ($shop) {
+ $this->handleImage($image, $shop->shopImagePath, $shop->shopImageFileName);
+ }
return $this->commitReturn($shop);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Updates shop stock.
*
- * @param \App\Models\Shop\Shop $shop
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Shop\Shop
+ * @param \App\Models\Shop\Shop $shop
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Shop\Shop|bool
*/
- public function updateShopStock($shop, $data, $user)
- {
+ public function updateShopStock($shop, $data, $user) {
DB::beginTransaction();
try {
- if(isset($data['item_id'])) {
- foreach($data['item_id'] as $key => $itemId)
- {
- if($data['cost'][$key] == null) throw new \Exception("One or more of the items is missing a cost.");
- if($data['cost'][$key] < 0) throw new \Exception("One or more of the items has a negative cost.");
+ if (isset($data['item_id'])) {
+ foreach ($data['item_id'] as $key => $itemId) {
+ if ($data['cost'][$key] == null) {
+ throw new \Exception('One or more of the items is missing a cost.');
+ }
+ if ($data['cost'][$key] < 0) {
+ throw new \Exception('One or more of the items has a negative cost.');
+ }
}
// Clear the existing shop stock
$shop->stock()->delete();
- foreach($data['item_id'] as $key => $itemId)
- {
+ foreach ($data['item_id'] as $key => $itemId) {
$shop->stock()->create([
'shop_id' => $shop->id,
'item_id' => $data['item_id'][$key],
@@ -138,83 +144,88 @@ public function updateShopStock($shop, $data, $user)
}
return $this->commitReturn($shop);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
- /**
- * Processes user input for creating/updating a shop.
- *
- * @param array $data
- * @param \App\Models\Shop\Shop $shop
- * @return array
- */
- private function populateShopData($data, $shop = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
- $data['is_active'] = isset($data['is_active']);
-
- if(isset($data['remove_image']))
- {
- if($shop && $shop->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($shop->shopImagePath, $shop->shopImageFileName);
- }
- unset($data['remove_image']);
- }
-
- return $data;
- }
-
/**
* Deletes a shop.
*
- * @param \App\Models\Shop\Shop $shop
+ * @param \App\Models\Shop\Shop $shop
+ *
* @return bool
*/
- public function deleteShop($shop)
- {
+ public function deleteShop($shop) {
DB::beginTransaction();
try {
// Delete shop stock
$shop->stock()->delete();
- if($shop->has_image) $this->deleteImage($shop->shopImagePath, $shop->shopImageFileName);
+ if ($shop->has_image) {
+ $this->deleteImage($shop->shopImagePath, $shop->shopImageFileName);
+ }
$shop->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts shop order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortShop($data)
- {
+ public function sortShop($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
Shop::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+
+ /**
+ * Processes user input for creating/updating a shop.
+ *
+ * @param array $data
+ * @param \App\Models\Shop\Shop $shop
+ *
+ * @return array
+ */
+ private function populateShopData($data, $shop = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+ $data['is_active'] = isset($data['is_active']);
+
+ if (isset($data['remove_image'])) {
+ if ($shop && $shop->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($shop->shopImagePath, $shop->shopImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+}
diff --git a/app/Services/SpeciesService.php b/app/Services/SpeciesService.php
index 461d2cb442..ccd602ca13 100644
--- a/app/Services/SpeciesService.php
+++ b/app/Services/SpeciesService.php
@@ -1,16 +1,13 @@
-populateData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$species = Species::create($data);
- if ($image) $this->handleImage($image, $species->speciesImagePath, $species->speciesImageFileName);
+ if ($image) {
+ $this->handleImage($image, $species->speciesImagePath, $species->speciesImageFileName);
+ }
return $this->commitReturn($species);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Updates a species.
*
- * @param \App\Models\Species\Species $species
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Species\Species
+ * @param \App\Models\Species\Species $species
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Species\Species|bool
*/
- public function updateSpecies($species, $data, $user)
- {
+ public function updateSpecies($species, $data, $user) {
DB::beginTransaction();
try {
// More specific validation
- if(Species::where('name', $data['name'])->where('id', '!=', $species->id)->exists()) throw new \Exception("The name has already been taken.");
+ if (Species::where('name', $data['name'])->where('id', '!=', $species->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
$data = $this->populateData($data, $species);
- $image = null;
- if(isset($data['image']) && $data['image']) {
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -80,138 +83,127 @@ public function updateSpecies($species, $data, $user)
$species->update($data);
- if ($species) $this->handleImage($image, $species->speciesImagePath, $species->speciesImageFileName);
+ if ($species) {
+ $this->handleImage($image, $species->speciesImagePath, $species->speciesImageFileName);
+ }
return $this->commitReturn($species);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
- /**
- * Processes user input for creating/updating a species.
- *
- * @param array $data
- * @param \App\Models\Species\Species $species
- * @return array
- */
- private function populateData($data, $species = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- if(isset($data['remove_image']))
- {
- if($species && $species->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($species->speciesImagePath, $species->speciesImageFileName);
- }
- unset($data['remove_image']);
- }
-
- return $data;
- }
-
/**
* Deletes a species.
*
- * @param \App\Models\Species\Species $species
+ * @param \App\Models\Species\Species $species
+ *
* @return bool
*/
- public function deleteSpecies($species)
- {
+ public function deleteSpecies($species) {
DB::beginTransaction();
try {
// Check first if characters with this species exists
- if(CharacterImage::where('species_id', $species->id)->exists()) throw new \Exception("A character image with this species exists. Please change its species first.");
-
- if($species->has_image) $this->deleteImage($species->speciesImagePath, $species->speciesImageFileName);
+ if (CharacterImage::where('species_id', $species->id)->exists()) {
+ throw new \Exception('A character image with this species exists. Please change its species first.');
+ }
+
+ if ($species->has_image) {
+ $this->deleteImage($species->speciesImagePath, $species->speciesImageFileName);
+ }
$species->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts species order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortSpecies($data)
- {
+ public function sortSpecies($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
Species::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Creates a new subtype.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Species\Subtype
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Species\Subtype|bool
*/
- public function createSubtype($data, $user)
- {
+ public function createSubtype($data, $user) {
DB::beginTransaction();
try {
$data = $this->populateSubtypeData($data);
$image = null;
- if(isset($data['image']) && $data['image']) {
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
+ } else {
+ $data['has_image'] = 0;
}
- else $data['has_image'] = 0;
$subtype = Subtype::create($data);
- if ($image) $this->handleImage($image, $subtype->subtypeImagePath, $subtype->subtypeImageFileName);
+ if ($image) {
+ $this->handleImage($image, $subtype->subtypeImagePath, $subtype->subtypeImageFileName);
+ }
return $this->commitReturn($subtype);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-
+
/**
* Updates a subtype.
*
- * @param \App\Models\Species\Subtype $subtype
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Species\Subtype
+ * @param \App\Models\Species\Subtype $subtype
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Species\Subtype|bool
*/
- public function updateSubtype($subtype, $data, $user)
- {
+ public function updateSubtype($subtype, $data, $user) {
DB::beginTransaction();
try {
$data = $this->populateSubtypeData($data, $subtype);
- $image = null;
- if(isset($data['image']) && $data['image']) {
+ $image = null;
+ if (isset($data['image']) && $data['image']) {
$data['has_image'] = 1;
$image = $data['image'];
unset($data['image']);
@@ -219,85 +211,118 @@ public function updateSubtype($subtype, $data, $user)
$subtype->update($data);
- if ($subtype) $this->handleImage($image, $subtype->subtypeImagePath, $subtype->subtypeImageFileName);
+ if ($subtype) {
+ $this->handleImage($image, $subtype->subtypeImagePath, $subtype->subtypeImageFileName);
+ }
return $this->commitReturn($subtype);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
- /**
- * Processes user input for creating/updating a subtype.
- *
- * @param array $data
- * @param \App\Models\Species\Subtype $subtype
- * @return array
- */
- private function populateSubtypeData($data, $subtype = null)
- {
- if(isset($data['description']) && $data['description']) $data['parsed_description'] = parse($data['description']);
-
- if(isset($data['remove_image']))
- {
- if($subtype && $subtype->has_image && $data['remove_image'])
- {
- $data['has_image'] = 0;
- $this->deleteImage($subtype->subtypeImagePath, $subtype->subtypeImageFileName);
- }
- unset($data['remove_image']);
- }
-
- return $data;
- }
-
/**
* Deletes a subtype.
*
- * @param \App\Models\Species\Subtype $subtype
+ * @param \App\Models\Species\Subtype $subtype
+ *
* @return bool
*/
- public function deleteSubtype($subtype)
- {
+ public function deleteSubtype($subtype) {
DB::beginTransaction();
try {
// Check first if characters with this subtype exists
- if(CharacterImage::where('subtype_id', $subtype->id)->exists()) throw new \Exception("A character image with this subtype exists. Please change or remove its subtype first.");
-
- if($subtype->has_image) $this->deleteImage($subtype->subtypeImagePath, $subtype->subtypeImageFileName);
+ if (CharacterImage::where('subtype_id', $subtype->id)->exists()) {
+ throw new \Exception('A character image with this subtype exists. Please change or remove its subtype first.');
+ }
+
+ if ($subtype->has_image) {
+ $this->deleteImage($subtype->subtypeImagePath, $subtype->subtypeImageFileName);
+ }
$subtype->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts subtype order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortSubtypes($data)
- {
+ public function sortSubtypes($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
Subtype::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+
+ /**
+ * Processes user input for creating/updating a species.
+ *
+ * @param array $data
+ * @param \App\Models\Species\Species $species
+ *
+ * @return array
+ */
+ private function populateData($data, $species = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($species && $species->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($species->speciesImagePath, $species->speciesImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+
+ /**
+ * Processes user input for creating/updating a subtype.
+ *
+ * @param array $data
+ * @param \App\Models\Species\Subtype $subtype
+ *
+ * @return array
+ */
+ private function populateSubtypeData($data, $subtype = null) {
+ if (isset($data['description']) && $data['description']) {
+ $data['parsed_description'] = parse($data['description']);
+ }
+
+ if (isset($data['remove_image'])) {
+ if ($subtype && $subtype->has_image && $data['remove_image']) {
+ $data['has_image'] = 0;
+ $this->deleteImage($subtype->subtypeImagePath, $subtype->subtypeImageFileName);
+ }
+ unset($data['remove_image']);
+ }
+
+ return $data;
+ }
+}
diff --git a/app/Services/SublistService.php b/app/Services/SublistService.php
index f75dfe63d8..a806b2a37f 100644
--- a/app/Services/SublistService.php
+++ b/app/Services/SublistService.php
@@ -1,16 +1,13 @@
-update(array('masterlist_sub_id' => $sublist->id));
+ if (isset($contents['categories']) && $contents['categories']) {
+ CharacterCategory::whereIn('id', $contents['categories'])->update(['masterlist_sub_id' => $sublist->id]);
}
- if(isset($contents['species']) && $contents['species'])
- {
- Species::whereIn('id', $contents['species'])->update(array('masterlist_sub_id' => $sublist->id));
+ if (isset($contents['species']) && $contents['species']) {
+ Species::whereIn('id', $contents['species'])->update(['masterlist_sub_id' => $sublist->id]);
}
return $this->commitReturn($sublist);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Update a sublist.
*
- * @param \App\Models\Character\Sublist $sublist
- * @param array $data
- * @param array $contents
- * @param \App\Models\User\User $user
+ * @param \App\Models\Character\Sublist $sublist
+ * @param array $data
+ * @param array $contents
+ *
* @return \App\Models\Character\Sublist|bool
*/
- public function updateSublist($sublist, $data, $contents)
- {
+ public function updateSublist($sublist, $data, $contents) {
DB::beginTransaction();
try {
// More specific validation
- if(Sublist::where('name', $data['name'])->where('id', '!=', $sublist->id)->exists()) throw new \Exception("The name has already been taken.");
+ if (Sublist::where('name', $data['name'])->where('id', '!=', $sublist->id)->exists()) {
+ throw new \Exception('The name has already been taken.');
+ }
//update sublist
$sublist->update($data);
//update categories and species
- CharacterCategory::where('masterlist_sub_id', $sublist->id)->update(array('masterlist_sub_id' => 0));
- Species::where('masterlist_sub_id', $sublist->id)->update(array('masterlist_sub_id' => 0));
- if(isset($contents['categories']))
- CharacterCategory::whereIn('id', $contents['categories'])->update(array('masterlist_sub_id' => $sublist->id));
- if(isset($contents['species']))
- Species::whereIn('id', $contents['species'])->update(array('masterlist_sub_id' => $sublist->id));
+ CharacterCategory::where('masterlist_sub_id', $sublist->id)->update(['masterlist_sub_id' => 0]);
+ Species::where('masterlist_sub_id', $sublist->id)->update(['masterlist_sub_id' => 0]);
+ if (isset($contents['categories'])) {
+ CharacterCategory::whereIn('id', $contents['categories'])->update(['masterlist_sub_id' => $sublist->id]);
+ }
+ if (isset($contents['species'])) {
+ Species::whereIn('id', $contents['species'])->update(['masterlist_sub_id' => $sublist->id]);
+ }
return $this->commitReturn($sublist);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Delete a sublist.
*
- * @param \App\Models\Character\Sublist $sublist
+ * @param \App\Models\Character\Sublist $sublist
+ *
* @return bool
*/
- public function deleteSublist($sublist)
- {
+ public function deleteSublist($sublist) {
DB::beginTransaction();
try {
// Check first if the sublist is currently in use
- CharacterCategory::where('masterlist_sub_id', $sublist->id)->update(array('masterlist_sub_id' => 0));
- Species::where('masterlist_sub_id', $sublist->id)->update(array('masterlist_sub_id' => 0));
-
+ CharacterCategory::where('masterlist_sub_id', $sublist->id)->update(['masterlist_sub_id' => 0]);
+ Species::where('masterlist_sub_id', $sublist->id)->update(['masterlist_sub_id' => 0]);
+
$sublist->delete();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Sorts sublist order.
*
- * @param array $data
+ * @param array $data
+ *
* @return bool
*/
- public function sortSublist($data)
- {
+ public function sortSublist($data) {
DB::beginTransaction();
try {
// explode the sort array and reverse it since the order is inverted
$sort = array_reverse(explode(',', $data));
- foreach($sort as $key => $s) {
+ foreach ($sort as $key => $s) {
Sublist::where('id', $s)->update(['sort' => $key]);
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/SubmissionManager.php b/app/Services/SubmissionManager.php
index 21e16f9e84..9104622efc 100644
--- a/app/Services/SubmissionManager.php
+++ b/app/Services/SubmissionManager.php
@@ -1,30 +1,24 @@
-where('id', $data['prompt_id'])->with('rewards')->first();
- if(!$prompt) throw new \Exception("Invalid prompt selected.");
+ if (!$prompt) {
+ throw new \Exception('Invalid prompt selected.');
+ }
+ } else {
+ $prompt = null;
}
- else $prompt = null;
-
- $withCriteriaSelected = isset($data['criterion']) ? array_filter($data['criterion'], function($obj){
+
+ $withCriteriaSelected = isset($data['criterion']) ? array_filter($data['criterion'], function ($obj) {
return isset($obj['id']);
}) : [];
- if(count($withCriteriaSelected) > 0) $data['criterion'] = $withCriteriaSelected;
- else $data['criterion'] = null;
+ if (count($withCriteriaSelected) > 0) {
+ $data['criterion'] = $withCriteriaSelected;
+ } else {
+ $data['criterion'] = null;
+ }
// The character identification comes in both the slug field and as character IDs
// that key the reward ID/quantity arrays.
// We'll need to match characters to the rewards for them.
// First, check if the characters are accessible to begin with.
- if(isset($data['slug'])) {
+ if (isset($data['slug'])) {
$characters = Character::myo(0)->visible()->whereIn('slug', $data['slug'])->get();
- if(count($characters) != count($data['slug'])) throw new \Exception("One or more of the selected characters do not exist.");
+ if (count($characters) != count($data['slug'])) {
+ throw new \Exception('One or more of the selected characters do not exist.');
+ }
+ } else {
+ $characters = [];
}
- else $characters = [];
$userAssets = createAssetsArray();
// Attach items. Technically, the user doesn't lose ownership of the item - we're just adding an additional holding field.
// We're also not going to add logs as this might add unnecessary fluff to the logs and the items still belong to the user.
- if(isset($data['stack_id'])) {
- foreach($data['stack_id'] as $stackId) {
+ if (isset($data['stack_id'])) {
+ foreach ($data['stack_id'] as $stackId) {
$stack = UserItem::with('item')->find($stackId);
- if(!$stack || $stack->user_id != $user->id) throw new \Exception("Invalid item selected.");
- if(!isset($data['stack_quantity'][$stackId])) throw new \Exception("Invalid quantity selected.");
+ if (!$stack || $stack->user_id != $user->id) {
+ throw new \Exception('Invalid item selected.');
+ }
+ if (!isset($data['stack_quantity'][$stackId])) {
+ throw new \Exception('Invalid quantity selected.');
+ }
$stack->submission_count += $data['stack_quantity'][$stackId];
$stack->save();
@@ -93,8 +104,8 @@ public function createSubmission($data, $user, $isClaim = false)
}
// Attach currencies.
- if(isset($data['currency_id'])) {
- foreach($data['currency_id'] as $holderKey=>$currencyIds) {
+ if (isset($data['currency_id'])) {
+ foreach ($data['currency_id'] as $holderKey=>$currencyIds) {
$holder = explode('-', $holderKey);
$holderType = $holder[0];
$holderId = $holder[1];
@@ -102,196 +113,134 @@ public function createSubmission($data, $user, $isClaim = false)
$holder = User::find($holderId);
$currencyManager = new CurrencyManager;
- foreach($currencyIds as $key=>$currencyId) {
+ foreach ($currencyIds as $key=>$currencyId) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Invalid currency selected.");
- if($data['currency_quantity'][$holderKey][$key] < 0) throw new \Exception('Cannot attach a negative amount of currency.');
- if(!$currencyManager->debitCurrency($holder, null, null, null, $currency, $data['currency_quantity'][$holderKey][$key])) throw new \Exception("Invalid currency/quantity selected.");
+ if (!$currency) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ if ($data['currency_quantity'][$holderKey][$key] < 0) {
+ throw new \Exception('Cannot attach a negative amount of currency.');
+ }
+ if (!$currencyManager->debitCurrency($holder, null, null, null, $currency, $data['currency_quantity'][$holderKey][$key])) {
+ throw new \Exception('Invalid currency/quantity selected.');
+ }
addAsset($userAssets, $currency, $data['currency_quantity'][$holderKey][$key]);
-
}
}
}
// Get a list of rewards, then create the submission itself
$promptRewards = createAssetsArray();
- if(!$isClaim)
- {
- foreach($prompt->rewards as $reward)
- {
+ if (!$isClaim) {
+ foreach ($prompt->rewards as $reward) {
addAsset($promptRewards, $reward->reward, $reward->quantity);
}
}
$promptRewards = mergeAssetsArrays($promptRewards, $this->processRewards($data, false));
-
+
$submission = Submission::create([
- 'user_id' => $user->id,
- 'url' => isset($data['url']) ? $data['url'] : null,
- 'status' => 'Pending',
+ 'user_id' => $user->id,
+ 'url' => $data['url'] ?? null,
+ 'status' => 'Pending',
'comments' => $data['comments'],
- 'data' => json_encode([
- 'user' => Arr::only(getDataReadyAssets($userAssets), ['user_items','currencies']),
- 'rewards' => getDataReadyAssets($promptRewards),
- 'criterion' => isset($data['criterion']) ? $data['criterion'] : null,
- ]) // list of rewards and addons
- ] + ($isClaim ? [] : ['prompt_id' => $prompt->id,]));
-
+ 'data' => json_encode([
+ 'user' => Arr::only(getDataReadyAssets($userAssets), ['user_items', 'currencies']),
+ 'rewards' => getDataReadyAssets($promptRewards),
+ 'criterion' => $data['criterion'] ?? null,
+ ]), // list of rewards and addons
+ ] + ($isClaim ? [] : ['prompt_id' => $prompt->id]));
// Retrieve all reward IDs for characters
- $currencyIds = []; $itemIds = []; $tableIds = [];
- if(isset($data['character_currency_id'])) {
- foreach($data['character_currency_id'] as $c)
- {
- foreach($c as $currencyId) $currencyIds[] = $currencyId;
+ $currencyIds = [];
+ $itemIds = [];
+ $tableIds = [];
+ if (isset($data['character_currency_id'])) {
+ foreach ($data['character_currency_id'] as $c) {
+ foreach ($c as $currencyId) {
+ $currencyIds[] = $currencyId;
+ }
} // Non-expanded character rewards
- }
- elseif(isset($data['character_rewardable_id']))
- {
- $data['character_rewardable_id'] = array_map(array($this, 'innerNull'),$data['character_rewardable_id']);
- foreach($data['character_rewardable_id'] as $ckey => $c)
- {
- foreach($c as $key => $id) {
-
- switch($data['character_rewardable_type'][$ckey][$key])
- {
- case 'Currency': $currencyIds[] = $id; break;
- case 'Item': $itemIds[] = $id; break;
- case 'LootTable': $tableIds[] = $id; break;
+ } elseif (isset($data['character_rewardable_id'])) {
+ $data['character_rewardable_id'] = array_map([$this, 'innerNull'], $data['character_rewardable_id']);
+ foreach ($data['character_rewardable_id'] as $ckey => $c) {
+ foreach ($c as $key => $id) {
+ switch ($data['character_rewardable_type'][$ckey][$key]) {
+ case 'Currency': $currencyIds[] = $id;
+ break;
+ case 'Item': $itemIds[] = $id;
+ break;
+ case 'LootTable': $tableIds[] = $id;
+ break;
}
}
} // Expanded character rewards
}
- array_unique($currencyIds); array_unique($itemIds); array_unique($tableIds);
+ array_unique($currencyIds);
+ array_unique($itemIds);
+ array_unique($tableIds);
$currencies = Currency::whereIn('id', $currencyIds)->where('is_character_owned', 1)->get()->keyBy('id');
$items = Item::whereIn('id', $itemIds)->get()->keyBy('id');
$tables = LootTable::whereIn('id', $tableIds)->get()->keyBy('id');
// Attach characters
- foreach($characters as $c)
- {
+ foreach ($characters as $c) {
// Users might not pass in clean arrays (may contain redundant data) so we need to clean that up
$assets = $this->processRewards($data + ['character_id' => $c->id, 'currencies' => $currencies, 'items' => $items, 'tables' => $tables], true);
// Now we have a clean set of assets (redundant data is gone, duplicate entries are merged)
// so we can attach the character to the submission
SubmissionCharacter::create([
- 'character_id' => $c->id,
+ 'character_id' => $c->id,
'submission_id' => $submission->id,
- 'data' => json_encode(getDataReadyAssets($assets))
+ 'data' => json_encode(getDataReadyAssets($assets)),
]);
}
return $this->commitReturn($submission);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
- private function innerNull($value){
- return array_values(array_filter($value));
- }
-
- /**
- * Processes reward data into a format that can be used for distribution.
- *
- * @param array $data
- * @param bool $isCharacter
- * @param bool $isStaff
- * @return array
- */
- private function processRewards($data, $isCharacter, $isStaff = false)
- {
- if($isCharacter)
- {
- $assets = createAssetsArray(true);
-
- if(isset($data['character_currency_id'][$data['character_id']]) && isset($data['character_quantity'][$data['character_id']]))
- {
- foreach($data['character_currency_id'][$data['character_id']] as $key => $currency)
- {
- if($data['character_quantity'][$data['character_id']][$key]) addAsset($assets, $data['currencies'][$currency], $data['character_quantity'][$data['character_id']][$key]);
- }
- }
- elseif(isset($data['character_rewardable_type'][$data['character_id']]) && isset($data['character_rewardable_id'][$data['character_id']]) && isset($data['character_rewardable_quantity'][$data['character_id']]))
- {
-
- $data['character_rewardable_id'] = array_map(array($this, 'innerNull'),$data['character_rewardable_id']);
-
- foreach($data['character_rewardable_id'][$data['character_id']] as $key => $reward)
- {
- switch($data['character_rewardable_type'][$data['character_id']][$key])
- {
- case 'Currency': if($data['character_rewardable_quantity'][$data['character_id']][$key]) addAsset($assets, $data['currencies'][$reward], $data['character_rewardable_quantity'][$data['character_id']][$key]); break;
- case 'Item': if($data['character_rewardable_quantity'][$data['character_id']][$key]) addAsset($assets, $data['items'][$reward], $data['character_rewardable_quantity'][$data['character_id']][$key]); break;
- case 'LootTable': if($data['character_rewardable_quantity'][$data['character_id']][$key]) addAsset($assets, $data['tables'][$reward], $data['character_rewardable_quantity'][$data['character_id']][$key]); break;
- }
- }
- }
- return $assets;
- }
- else
- {
- $assets = createAssetsArray(false);
- // Process the additional rewards
- if(isset($data['rewardable_type']) && $data['rewardable_type'])
- {
- foreach($data['rewardable_type'] as $key => $type)
- {
- $reward = null;
- switch($type)
- {
- case 'Item':
- $reward = Item::find($data['rewardable_id'][$key]);
- break;
- case 'Currency':
- $reward = Currency::find($data['rewardable_id'][$key]);
- if(!$reward->is_user_owned) throw new \Exception("Invalid currency selected.");
- break;
- case 'LootTable':
- if (!$isStaff) break;
- $reward = LootTable::find($data['rewardable_id'][$key]);
- break;
- case 'Raffle':
- if (!$isStaff) break;
- $reward = Raffle::find($data['rewardable_id'][$key]);
- break;
- }
- if(!$reward) continue;
- addAsset($assets, $reward, $data['quantity'][$key]);
- }
- }
- return $assets;
- }
+ return $this->rollbackReturn(false);
}
/**
* Rejects a submission.
*
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return mixed
*/
- public function rejectSubmission($data, $user)
- {
+ public function rejectSubmission($data, $user) {
DB::beginTransaction();
try {
// 1. check that the submission exists
// 2. check that the submission is pending
- if(!isset($data['submission'])) $submission = Submission::where('status', 'Pending')->where('id', $data['id'])->first();
- elseif($data['submission']->status == 'Pending') $submission = $data['submission'];
- else $submission = null;
- if(!$submission) throw new \Exception("Invalid submission.");
+ if (!isset($data['submission'])) {
+ $submission = Submission::where('status', 'Pending')->where('id', $data['id'])->first();
+ } elseif ($data['submission']->status == 'Pending') {
+ $submission = $data['submission'];
+ } else {
+ $submission = null;
+ }
+ if (!$submission) {
+ throw new \Exception('Invalid submission.');
+ }
// Return all added items
$addonData = $submission->data['user'];
- if(isset($addonData['user_items'])) {
- foreach($addonData['user_items'] as $userItemId => $quantity) {
+ if (isset($addonData['user_items'])) {
+ foreach ($addonData['user_items'] as $userItemId => $quantity) {
$userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->submission_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->submission_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->submission_count -= $quantity;
$userItemRow->save();
}
@@ -299,68 +248,81 @@ public function rejectSubmission($data, $user)
// And currencies
$currencyManager = new CurrencyManager;
- if(isset($addonData['currencies']) && $addonData['currencies'])
- {
- foreach($addonData['currencies'] as $currencyId=>$quantity) {
+ if (isset($addonData['currencies']) && $addonData['currencies']) {
+ foreach ($addonData['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Cannot return an invalid currency. (".$currencyId.")");
- if(!$currencyManager->creditCurrency(null, $submission->user, null, null, $currency, $quantity)) throw new \Exception("Could not return currency to user. (".$currencyId.")");
+ if (!$currency) {
+ throw new \Exception('Cannot return an invalid currency. ('.$currencyId.')');
+ }
+ if (!$currencyManager->creditCurrency(null, $submission->user, null, null, $currency, $quantity)) {
+ throw new \Exception('Could not return currency to user. ('.$currencyId.')');
+ }
}
}
- if(isset($data['staff_comments']) && $data['staff_comments']) $data['parsed_staff_comments'] = parse($data['staff_comments']);
- else $data['parsed_staff_comments'] = null;
+ if (isset($data['staff_comments']) && $data['staff_comments']) {
+ $data['parsed_staff_comments'] = parse($data['staff_comments']);
+ } else {
+ $data['parsed_staff_comments'] = null;
+ }
// The only things we need to set are:
// 1. staff comment
// 2. staff ID
// 3. status
$submission->update([
- 'staff_comments' => $data['staff_comments'],
- 'parsed_staff_comments' => $data['parsed_staff_comments'],
- 'staff_id' => $user->id,
- 'status' => 'Rejected'
+ 'staff_comments' => $data['staff_comments'],
+ 'parsed_staff_comments' => $data['parsed_staff_comments'],
+ 'staff_id' => $user->id,
+ 'status' => 'Rejected',
]);
Notifications::create($submission->prompt_id ? 'SUBMISSION_REJECTED' : 'CLAIM_REJECTED', $submission->user, [
- 'staff_url' => $user->url,
- 'staff_name' => $user->name,
+ 'staff_url' => $user->url,
+ 'staff_name' => $user->name,
'submission_id' => $submission->id,
]);
return $this->commitReturn($submission);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Approves a submission.
*
- * @param array $data
- * @param \App\Models\User\User $user
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
* @return mixed
*/
- public function approveSubmission($data, $user)
- {
+ public function approveSubmission($data, $user) {
DB::beginTransaction();
try {
// 1. check that the submission exists
// 2. check that the submission is pending
$submission = Submission::where('status', 'Pending')->where('id', $data['id'])->first();
- if(!$submission) throw new \Exception("Invalid submission.");
+ if (!$submission) {
+ throw new \Exception('Invalid submission.');
+ }
// Remove any added items, hold counts, and add logs
$addonData = $submission->data['user'];
$inventoryManager = new InventoryManager;
- if(isset($addonData['user_items'])) {
+ if (isset($addonData['user_items'])) {
$stacks = $addonData['user_items'];
- foreach($addonData['user_items'] as $userItemId => $quantity) {
+ foreach ($addonData['user_items'] as $userItemId => $quantity) {
$userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->submission_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->submission_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->submission_count -= $quantity;
$userItemRow->save();
}
@@ -368,10 +330,12 @@ public function approveSubmission($data, $user)
// Workaround for user not being unset after inventory shuffling, preventing proper staff ID assignment
$staff = $user;
- foreach($stacks as $stackId=>$quantity) {
+ foreach ($stacks as $stackId=>$quantity) {
$stack = UserItem::find($stackId);
$user = User::find($submission->user_id);
- if(!$inventoryManager->debitStack($user, $submission->prompt_id ? 'Prompt Approved' : 'Claim Approved', ['data' => 'Item used in submission (#'.$submission->id.' )'], $stack, $quantity)) throw new \Exception("Failed to create log for item stack.");
+ if (!$inventoryManager->debitStack($user, $submission->prompt_id ? 'Prompt Approved' : 'Claim Approved', ['data' => 'Item used in submission (#'.$submission->id.' )'], $stack, $quantity)) {
+ throw new \Exception('Failed to create log for item stack.');
+ }
}
// Set user back to the processing staff member, now that addons have been properly processed.
@@ -380,13 +344,21 @@ public function approveSubmission($data, $user)
// Log currency removal, etc.
$currencyManager = new CurrencyManager;
- if(isset($addonData['currencies']) && $addonData['currencies'])
- {
- foreach($addonData['currencies'] as $currencyId=>$quantity) {
+ if (isset($addonData['currencies']) && $addonData['currencies']) {
+ foreach ($addonData['currencies'] as $currencyId=>$quantity) {
$currency = Currency::find($currencyId);
- if(!$currencyManager->createLog($submission->user_id, 'User', null, null,
- $submission->prompt_id ? 'Prompt Approved' : 'Claim Approved', 'Used in ' . ($submission->prompt_id ? 'prompt' : 'claim') . ' (#'.$submission->id.' )', $currencyId, $quantity))
- throw new \Exception("Failed to create currency log.");
+ if (!$currencyManager->createLog(
+ $submission->user_id,
+ 'User',
+ null,
+ null,
+ $submission->prompt_id ? 'Prompt Approved' : 'Claim Approved',
+ 'Used in '.($submission->prompt_id ? 'prompt' : 'claim').' (#'.$submission->id.' )',
+ $currencyId,
+ $quantity
+ )) {
+ throw new \Exception('Failed to create currency log.');
+ }
}
}
@@ -394,11 +366,14 @@ public function approveSubmission($data, $user)
// that key the reward ID/quantity arrays.
// We'll need to match characters to the rewards for them.
// First, check if the characters are accessible to begin with.
- if(isset($data['slug'])) {
+ if (isset($data['slug'])) {
$characters = Character::myo(0)->visible()->whereIn('slug', $data['slug'])->get();
- if(count($characters) != count($data['slug'])) throw new \Exception("One or more of the selected characters do not exist.");
+ if (count($characters) != count($data['slug'])) {
+ throw new \Exception('One or more of the selected characters do not exist.');
+ }
+ } else {
+ $characters = [];
}
- else $characters = [];
// Get the updated set of rewards
$rewards = $this->processRewards($data, false, true);
@@ -406,48 +381,54 @@ public function approveSubmission($data, $user)
// Logging data
$promptLogType = $submission->prompt_id ? 'Prompt Rewards' : 'Claim Rewards';
$promptData = [
- 'data' => 'Received rewards for '.($submission->prompt_id ? 'submission' : 'claim').' (#'.$submission->id.' )'
+ 'data' => 'Received rewards for '.($submission->prompt_id ? 'submission' : 'claim').' (#'.$submission->id.' )',
];
// Distribute user rewards
- if(!$rewards = fillUserAssets($rewards, $user, $submission->user, $promptLogType, $promptData)) throw new \Exception("Failed to distribute rewards to user.");
+ if (!$rewards = fillUserAssets($rewards, $user, $submission->user, $promptLogType, $promptData)) {
+ throw new \Exception('Failed to distribute rewards to user.');
+ }
// Distribute currency from criteria
$service = new CurrencyManager;
-
- if(isset($data['criterion'])) {
- foreach($data['criterion'] as $key => $criterionData) {
+
+ if (isset($data['criterion'])) {
+ foreach ($data['criterion'] as $key => $criterionData) {
$criterion = Criterion::where('id', $criterionData['id'])->first();
- if(!$service->creditCurrency($user, $submission->user, $promptLogType, $promptData['data'], $criterion->currency, $criterion->calculateReward($criterionData))) throw new \Exception("Failed to distribute criterion rewards to user.");
+ if (!$service->creditCurrency($user, $submission->user, $promptLogType, $promptData['data'], $criterion->currency, $criterion->calculateReward($criterionData))) {
+ throw new \Exception('Failed to distribute criterion rewards to user.');
+ }
}
}
-
-
+
// Retrieve all reward IDs for characters
- $currencyIds = []; $itemIds = []; $tableIds = [];
- if(isset($data['character_currency_id'])) {
- foreach($data['character_currency_id'] as $c)
- {
- foreach($c as $currencyId) $currencyIds[] = $currencyId;
+ $currencyIds = [];
+ $itemIds = [];
+ $tableIds = [];
+ if (isset($data['character_currency_id'])) {
+ foreach ($data['character_currency_id'] as $c) {
+ foreach ($c as $currencyId) {
+ $currencyIds[] = $currencyId;
+ }
} // Non-expanded character rewards
- }
- elseif(isset($data['character_rewardable_id']))
- {
- $data['character_rewardable_id'] = array_map(array($this, 'innerNull'),$data['character_rewardable_id']);
- foreach($data['character_rewardable_id'] as $ckey => $c)
- {
- foreach($c as $key => $id) {
-
- switch($data['character_rewardable_type'][$ckey][$key])
- {
- case 'Currency': $currencyIds[] = $id; break;
- case 'Item': $itemIds[] = $id; break;
- case 'LootTable': $tableIds[] = $id; break;
+ } elseif (isset($data['character_rewardable_id'])) {
+ $data['character_rewardable_id'] = array_map([$this, 'innerNull'], $data['character_rewardable_id']);
+ foreach ($data['character_rewardable_id'] as $ckey => $c) {
+ foreach ($c as $key => $id) {
+ switch ($data['character_rewardable_type'][$ckey][$key]) {
+ case 'Currency': $currencyIds[] = $id;
+ break;
+ case 'Item': $itemIds[] = $id;
+ break;
+ case 'LootTable': $tableIds[] = $id;
+ break;
}
}
} // Expanded character rewards
}
- array_unique($currencyIds); array_unique($itemIds); array_unique($tableIds);
+ array_unique($currencyIds);
+ array_unique($itemIds);
+ array_unique($tableIds);
$currencies = Currency::whereIn('id', $currencyIds)->where('is_character_owned', 1)->get()->keyBy('id');
$items = Item::whereIn('id', $itemIds)->get()->keyBy('id');
$tables = LootTable::whereIn('id', $tableIds)->get()->keyBy('id');
@@ -456,57 +437,143 @@ public function approveSubmission($data, $user)
$submission->characters()->delete();
// Distribute character rewards
- foreach($characters as $c)
- {
+ foreach ($characters as $c) {
// Users might not pass in clean arrays (may contain redundant data) so we need to clean that up
$assets = $this->processRewards($data + ['character_id' => $c->id, 'currencies' => $currencies, 'items' => $items, 'tables' => $tables], true);
- if(!$assets = fillCharacterAssets($assets, $user, $c, $promptLogType, $promptData, $submission->user)) throw new \Exception("Failed to distribute rewards to character.");
+ if (!$assets = fillCharacterAssets($assets, $user, $c, $promptLogType, $promptData, $submission->user)) {
+ throw new \Exception('Failed to distribute rewards to character.');
+ }
SubmissionCharacter::create([
- 'character_id' => $c->id,
+ 'character_id' => $c->id,
'submission_id' => $submission->id,
- 'data' => json_encode(getDataReadyAssets($assets))
+ 'data' => json_encode(getDataReadyAssets($assets)),
]);
}
// Increment user submission count if it's a prompt
- if($submission->prompt_id) {
+ if ($submission->prompt_id) {
$user->settings->submission_count++;
$user->settings->save();
}
- if(isset($data['staff_comments']) && $data['staff_comments']) $data['parsed_staff_comments'] = parse($data['staff_comments']);
- else $data['parsed_staff_comments'] = null;
+ if (isset($data['staff_comments']) && $data['staff_comments']) {
+ $data['parsed_staff_comments'] = parse($data['staff_comments']);
+ } else {
+ $data['parsed_staff_comments'] = null;
+ }
// Finally, set:
- // 1. staff comments
+ // 1. staff comments
// 2. staff ID
// 3. status
// 4. final rewards
$submission->update([
- 'staff_comments' => $data['staff_comments'],
- 'parsed_staff_comments' => $data['parsed_staff_comments'],
- 'staff_id' => $user->id,
- 'status' => 'Approved',
- 'data' => json_encode([
- 'user' => $addonData,
- 'rewards' => getDataReadyAssets($rewards),
- 'criterion' => isset($data['criterion']) ? $data['criterion'] : null
- ]) // list of rewards
+ 'staff_comments' => $data['staff_comments'],
+ 'parsed_staff_comments' => $data['parsed_staff_comments'],
+ 'staff_id' => $user->id,
+ 'status' => 'Approved',
+ 'data' => json_encode([
+ 'user' => $addonData,
+ 'rewards' => getDataReadyAssets($rewards),
+ 'criterion' => $data['criterion'] ?? null,
+ ]), // list of rewards
]);
Notifications::create($submission->prompt_id ? 'SUBMISSION_APPROVED' : 'CLAIM_APPROVED', $submission->user, [
- 'staff_url' => $user->url,
- 'staff_name' => $user->name,
+ 'staff_url' => $user->url,
+ 'staff_name' => $user->name,
'submission_id' => $submission->id,
]);
return $this->commitReturn($submission);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
+ private function innerNull($value) {
+ return array_values(array_filter($value));
+ }
+
+ /**
+ * Processes reward data into a format that can be used for distribution.
+ *
+ * @param array $data
+ * @param bool $isCharacter
+ * @param bool $isStaff
+ *
+ * @return array
+ */
+ private function processRewards($data, $isCharacter, $isStaff = false) {
+ if ($isCharacter) {
+ $assets = createAssetsArray(true);
+
+ if (isset($data['character_currency_id'][$data['character_id']]) && isset($data['character_quantity'][$data['character_id']])) {
+ foreach ($data['character_currency_id'][$data['character_id']] as $key => $currency) {
+ if ($data['character_quantity'][$data['character_id']][$key]) {
+ addAsset($assets, $data['currencies'][$currency], $data['character_quantity'][$data['character_id']][$key]);
+ }
+ }
+ } elseif (isset($data['character_rewardable_type'][$data['character_id']]) && isset($data['character_rewardable_id'][$data['character_id']]) && isset($data['character_rewardable_quantity'][$data['character_id']])) {
+ $data['character_rewardable_id'] = array_map([$this, 'innerNull'], $data['character_rewardable_id']);
+
+ foreach ($data['character_rewardable_id'][$data['character_id']] as $key => $reward) {
+ switch ($data['character_rewardable_type'][$data['character_id']][$key]) {
+ case 'Currency': if ($data['character_rewardable_quantity'][$data['character_id']][$key]) {
+ addAsset($assets, $data['currencies'][$reward], $data['character_rewardable_quantity'][$data['character_id']][$key]);
+ } break;
+ case 'Item': if ($data['character_rewardable_quantity'][$data['character_id']][$key]) {
+ addAsset($assets, $data['items'][$reward], $data['character_rewardable_quantity'][$data['character_id']][$key]);
+ } break;
+ case 'LootTable': if ($data['character_rewardable_quantity'][$data['character_id']][$key]) {
+ addAsset($assets, $data['tables'][$reward], $data['character_rewardable_quantity'][$data['character_id']][$key]);
+ } break;
+ }
+ }
+ }
+
+ return $assets;
+ } else {
+ $assets = createAssetsArray(false);
+ // Process the additional rewards
+ if (isset($data['rewardable_type']) && $data['rewardable_type']) {
+ foreach ($data['rewardable_type'] as $key => $type) {
+ $reward = null;
+ switch ($type) {
+ case 'Item':
+ $reward = Item::find($data['rewardable_id'][$key]);
+ break;
+ case 'Currency':
+ $reward = Currency::find($data['rewardable_id'][$key]);
+ if (!$reward->is_user_owned) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ break;
+ case 'LootTable':
+ if (!$isStaff) {
+ break;
+ }
+ $reward = LootTable::find($data['rewardable_id'][$key]);
+ break;
+ case 'Raffle':
+ if (!$isStaff) {
+ break;
+ }
+ $reward = Raffle::find($data['rewardable_id'][$key]);
+ break;
+ }
+ if (!$reward) {
+ continue;
+ }
+ addAsset($assets, $reward, $data['quantity'][$key]);
+ }
+ }
+
+ return $assets;
+ }
+ }
}
diff --git a/app/Services/TradeManager.php b/app/Services/TradeManager.php
index 076d7b051e..48f3b1bf3e 100644
--- a/app/Services/TradeManager.php
+++ b/app/Services/TradeManager.php
@@ -1,29 +1,20 @@
-id) throw new \Exception("Cannot start a trade with yourself.");
+ if (!isset($data['recipient_id'])) {
+ throw new \Exception('Please select a recipient.');
+ }
+ if ($data['recipient_id'] == $user->id) {
+ throw new \Exception('Cannot start a trade with yourself.');
+ }
$recipient = User::find($data['recipient_id']);
- if($recipient->is_banned) throw new \Exception("The recipient is a banned user and cannot receive a trade.");
+ if ($recipient->is_banned) {
+ throw new \Exception('The recipient is a banned user and cannot receive a trade.');
+ }
$trade = Trade::create([
- 'sender_id' => $user->id,
- 'recipient_id' => $data['recipient_id'],
- 'status' => 'Open',
- 'comments' => isset($data['comments']) ? $data['comments'] : null,
- 'is_sender_confirmed' => 0,
+ 'sender_id' => $user->id,
+ 'recipient_id' => $data['recipient_id'],
+ 'status' => 'Open',
+ 'comments' => $data['comments'] ?? null,
+ 'is_sender_confirmed' => 0,
'is_recipient_confirmed' => 0,
- 'data' => null
+ 'data' => null,
]);
- if($assetData = $this->handleTradeAssets($trade, $data, $user)) {
-
+ if ($assetData = $this->handleTradeAssets($trade, $data, $user)) {
$trade->data = json_encode(['sender' => getDataReadyAssets($assetData['sender'])]);
$trade->save();
// send a notification
Notifications::create('TRADE_RECEIVED', $recipient, [
- 'sender_url' => $user->url,
+ 'sender_url' => $user->url,
'sender_name' => $user->name,
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
return $this->commitReturn($trade);
}
-
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Edits a user's side of a trade.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Trade
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Trade|bool
*/
- public function editTrade($data, $user)
- {
+ public function editTrade($data, $user) {
DB::beginTransaction();
try {
- if(!isset($data['trade']))
- $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function($query) use ($user) {
- $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
+ if (!isset($data['trade'])) {
+ $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function ($query) use ($user) {
+ $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
})->first();
- elseif($data['trade']->status == 'Open')
+ } elseif ($data['trade']->status == 'Open') {
$trade = $data['trade'];
- else
+ } else {
$trade = null;
- if(!$trade) throw new \Exception("Invalid trade.");
+ }
+ if (!$trade) {
+ throw new \Exception('Invalid trade.');
+ }
- if($assetData = $this->handleTradeAssets($trade, $data, $user)) {
+ if ($assetData = $this->handleTradeAssets($trade, $data, $user)) {
$tradeData = $trade->data;
$isSender = ($trade->sender_id == $user->id);
$tradeData[$isSender ? 'sender' : 'recipient'] = getDataReadyAssets($assetData[$isSender ? 'sender' : 'recipient']);
@@ -110,207 +109,113 @@ public function editTrade($data, $user)
$trade->{'is_'.($isSender ? 'sender' : 'recipient').'_confirmed'} = 0;
$trade->{'is_'.($isSender ? 'recipient' : 'sender').'_trade_confirmed'} = 0;
$trade->save();
+
return $this->commitReturn($trade);
}
-
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
- return $this->rollbackReturn(false);
- }
-
- /**
- * Handles modification of assets on the user's side of a trade.
- *
- * @param \App\Models\Trade $trade
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|array
- */
- private function handleTradeAssets($trade, $data, $user)
- {
- DB::beginTransaction();
- try {
- $tradeData = $trade->data;
- $isSender = $trade->sender_id == $user->id;
- $type = ($isSender ? 'sender' : (($trade->recipient_id == $user->id) ? 'recipient' : null));
- if(!$type) throw new \Exception("User not found.");
- // First return any item stacks attached to the trade
-
- if(isset($tradeData[$type]['user_items'])) {
- foreach($tradeData[$type]['user_items'] as $userItemId=>$quantity) {
- $userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->trade_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
- $userItemRow->trade_count -= $quantity;
- $userItemRow->save();
- }
- }
-
- // Also return any currency attached to the trade
- // This is stored in the data attribute
- $currencyManager = new CurrencyManager;
- if(isset($tradeData[$type]['currencies'])) {
- foreach($tradeData[$type]['currencies'] as $currencyId=>$quantity) {
- $currencyManager->creditCurrency(null, $user, null, null, $currencyId, $quantity);
- }
- }
-
- // Unattach characters too
- Character::where('trade_id', $trade->id)->where('user_id', $user->id)->update(['trade_id' => null]);
-
- $userAssets = createAssetsArray();
- $assetCount = 0;
- $assetLimit = Config::get('lorekeeper.settings.trade_asset_limit');
-
- // Attach items. Technically, the user doesn't lose ownership of the item - we're just adding an additional holding field.
- // Unlike for design updates, we're keeping track of attached items here.
- if(isset($data['stack_id'])) {
- foreach($data['stack_id'] as $stackId) {
- $stack = UserItem::with('item')->find($stackId);
- if(!$stack || $stack->user_id != $user->id) throw new \Exception("Invalid item selected.");
- if(!isset($data['stack_quantity'][$stackId])) throw new \Exception("Invalid quantity selected.");
- if(!$stack->item->allow_transfer || isset($stack->data['disallow_transfer'])) throw new \Exception("One or more of the selected items cannot be transferred.");
- $stack->trade_count += $data['stack_quantity'][$stackId];
- $stack->save();
-
- addAsset($userAssets, $stack, $data['stack_quantity'][$stackId]);
- $assetCount++;
- }
- }
- if($assetCount > $assetLimit) throw new \Exception("You may only include a maximum of {$assetLimit} things in a trade.");
-
- // Attach currencies. Character currencies cannot be attached to trades, so we're just checking the user's bank.
- if(isset($data['currency_id'])) {
- if ($user->id != $trade->sender_id && $user->id != $trade->recipient_id) throw new \Exception("Error attaching currencies to this trade.");
- //dd([$data['currency_id'], $data['currency_quantity']]);
- $data['currency_id'] = $data['currency_id']['user-'.$user->id];
- $data['currency_quantity'] = $data['currency_quantity']['user-'.$user->id];
- foreach($data['currency_id'] as $key=>$currencyId) {
- $currency = Currency::where('allow_user_to_user', 1)->where('id', $currencyId)->first();
- if(!$currency) throw new \Exception("Invalid currency selected.");
- if(!$currencyManager->debitCurrency($user, null, null, null, $currency, $data['currency_quantity'][$key])) throw new \Exception("Invalid currency/quantity selected.");
-
- addAsset($userAssets, $currency, $data['currency_quantity'][$key]);
- $assetCount++;
- }
- }
- if($assetCount > $assetLimit) throw new \Exception("You may only include a maximum of {$assetLimit} things in a trade.");
-
- // Attach characters.
- if(isset($data['character_id'])) {
- foreach($data['character_id'] as $characterId) {
- $character = Character::where('id', $characterId)->where('user_id', $user->id)->first();
- if(!$character) throw new \Exception("Invalid character selected.");
- if(!$character->is_sellable && !$character->is_tradeable && !$character->is_giftable) throw new \Exception("One or more of the selected characters cannot be transferred.");
- if(CharacterTransfer::active()->where('character_id', $character->id)->exists()) throw new \Exception("One or more of the selected characters is already pending a character transfer.");
- if($character->trade_id) throw new \Exception("One or more of the selected characters is already in a trade.");
- if($character->designUpdate()->active()->exists()) throw new \Exception("One or more of the selected characters has an active design update. Please wait for it to be processed, or delete it.");
- if($character->transferrable_at && $character->transferrable_at->isFuture()) throw new \Exception("One or more of the selected characters is still on transfer cooldown and cannot be transferred.");
-
- $character->trade_id = $trade->id;
- $character->save();
- addAsset($userAssets, $character, 1);
- $assetCount++;
- }
-
- }
- if($assetCount > $assetLimit) throw new \Exception("You may only include a maximum of {$assetLimit} things in a trade.");
-
- return $this->commitReturn([($isSender ? 'sender' : 'recipient') => $userAssets]);
- } catch(\Exception $e) {
- $this->setError('error', $e->getMessage());
- }
return $this->rollbackReturn(false);
}
/**
* Cancels a trade.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Trade
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Trade|bool
*/
- public function cancelTrade($data, $user)
- {
+ public function cancelTrade($data, $user) {
DB::beginTransaction();
try {
- if(!isset($data['trade'])) $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function($query) use ($user) {
- $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
- })->first();
- elseif($data['trade']->status == 'Open') $trade = $data['trade'];
- else $trade = null;
- if(!$trade) throw new \Exception("Invalid trade.");
-
- if($this->returnAttachments($trade)) {
+ if (!isset($data['trade'])) {
+ $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function ($query) use ($user) {
+ $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
+ })->first();
+ } elseif ($data['trade']->status == 'Open') {
+ $trade = $data['trade'];
+ } else {
+ $trade = null;
+ }
+ if (!$trade) {
+ throw new \Exception('Invalid trade.');
+ }
+
+ if ($this->returnAttachments($trade)) {
Notifications::create('TRADE_CANCELED', $trade->sender_id == $user->id ? $trade->recipient : $trade->sender, [
- 'sender_url' => $user->url,
+ 'sender_url' => $user->url,
'sender_name' => $user->name,
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
$trade->status = 'Canceled';
$trade->save();
return $this->commitReturn($trade);
+ } else {
+ throw new \Exception('Failed to cancel trade.');
}
- else throw new \Exception("Failed to cancel trade.");
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Confirms the user's offer.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Trade
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Trade|bool
*/
- public function confirmOffer($data, $user)
- {
+ public function confirmOffer($data, $user) {
DB::beginTransaction();
try {
- if(!isset($data['trade'])) $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function($query) use ($user) {
- $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
- })->first();
- elseif($data['trade']->status == 'Open') $trade = $data['trade'];
- else $trade = null;
- if(!$trade) throw new \Exception("Invalid trade.");
+ if (!isset($data['trade'])) {
+ $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function ($query) use ($user) {
+ $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
+ })->first();
+ } elseif ($data['trade']->status == 'Open') {
+ $trade = $data['trade'];
+ } else {
+ $trade = null;
+ }
+ if (!$trade) {
+ throw new \Exception('Invalid trade.');
+ }
// Mark the offer as confirmed
- if($trade->sender_id == $user->id) {
+ if ($trade->sender_id == $user->id) {
$trade->is_sender_confirmed = !$trade->is_sender_confirmed;
// Reset trade confirmations if this is unconfirming an offer
- if(!$trade->is_sender_confirmed) {
+ if (!$trade->is_sender_confirmed) {
$trade->is_sender_trade_confirmed = 0;
$trade->is_recipient_trade_confirmed = 0;
- }
- else {
+ } else {
Notifications::create('TRADE_UPDATE', $trade->recipient, [
- 'sender_url' => $user->url,
+ 'sender_url' => $user->url,
'sender_name' => $user->name,
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
}
- }
- else {
+ } else {
$trade->is_recipient_confirmed = !$trade->is_recipient_confirmed;
// Reset trade confirmations if this is unconfirming an offer
- if(!$trade->is_recipient_confirmed) {
+ if (!$trade->is_recipient_confirmed) {
$trade->is_sender_trade_confirmed = 0;
$trade->is_recipient_trade_confirmed = 0;
- }
- else {
+ } else {
Notifications::create('TRADE_UPDATE', $trade->sender, [
- 'sender_url' => $user->url,
+ 'sender_url' => $user->url,
'sender_name' => $user->name,
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
}
}
@@ -318,106 +223,120 @@ public function confirmOffer($data, $user)
$trade->save();
return $this->commitReturn($trade);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Confirms the trade for a user.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Trade
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Trade|bool
*/
- public function confirmTrade($data, $user)
- {
+ public function confirmTrade($data, $user) {
DB::beginTransaction();
try {
- if(!isset($data['trade'])) $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function($query) use ($user) {
- $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
- })->first();
- elseif($data['trade']->status == 'Open') $trade = $data['trade'];
- else $trade = null;
- if(!$trade) throw new \Exception("Invalid trade.");
- if(!$trade->isConfirmable) throw new \Exception('Both parties are required to confirm their offers before the trade can be confirmed.');
-
- if($user->id == $trade->sender_id) $trade->is_sender_trade_confirmed = 1;
- else $trade->is_recipient_trade_confirmed = 1;
-
- if($trade->is_sender_trade_confirmed && $trade->is_recipient_trade_confirmed) {
- if(!(Settings::get('open_transfers_queue') && (isset($trade->data['sender']['characters']) || isset($trade->data['recipient']['characters'])))) {
+ if (!isset($data['trade'])) {
+ $trade = Trade::where('status', 'Open')->where('id', $data['id'])->where(function ($query) use ($user) {
+ $query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
+ })->first();
+ } elseif ($data['trade']->status == 'Open') {
+ $trade = $data['trade'];
+ } else {
+ $trade = null;
+ }
+ if (!$trade) {
+ throw new \Exception('Invalid trade.');
+ }
+ if (!$trade->isConfirmable) {
+ throw new \Exception('Both parties are required to confirm their offers before the trade can be confirmed.');
+ }
+
+ if ($user->id == $trade->sender_id) {
+ $trade->is_sender_trade_confirmed = 1;
+ } else {
+ $trade->is_recipient_trade_confirmed = 1;
+ }
+
+ if ($trade->is_sender_trade_confirmed && $trade->is_recipient_trade_confirmed) {
+ if (!(Settings::get('open_transfers_queue') && (isset($trade->data['sender']['characters']) || isset($trade->data['recipient']['characters'])))) {
// Distribute the trade attachments
$this->creditAttachments($trade);
-
+
$trade->status = 'Completed';
// Notify both users
Notifications::create('TRADE_COMPLETED', $trade->sender, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
Notifications::create('TRADE_COMPLETED', $trade->recipient, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
- }
- else {
+ } else {
// Put the trade into the queue
$trade->status = 'Pending';
-
+
// Notify both users
Notifications::create('TRADE_CONFIRMED', $trade->sender, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
Notifications::create('TRADE_CONFIRMED', $trade->recipient, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
}
- }
- else {
-
+ } else {
// Notify the other user
Notifications::create('TRADE_UPDATE', $user->id == $trade->sender_id ? $trade->recipient : $trade->sender, [
- 'sender_url' => $user->url,
+ 'sender_url' => $user->url,
'sender_name' => $user->name,
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
-
}
$trade->save();
return $this->commitReturn($trade);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Approves a trade in the admin panel.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Trade
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Trade|bool
*/
- public function approveTrade($data, $user)
- {
+ public function approveTrade($data, $user) {
DB::beginTransaction();
try {
// 1. check that the trade exists
// 2. check that the trade is open
- if(!isset($data['trade'])) $trade = Trade::where('status', 'Pending')->where('id', $data['id'])->first();
- else $trade = $data['trade'];
- if(!$trade) throw new \Exception("Invalid trade.");
-
- if($this->creditAttachments($trade, $data)) {
+ if (!isset($data['trade'])) {
+ $trade = Trade::where('status', 'Pending')->where('id', $data['id'])->first();
+ } else {
+ $trade = $data['trade'];
+ }
+ if (!$trade) {
+ throw new \Exception('Invalid trade.');
+ }
+
+ if ($this->creditAttachments($trade, $data)) {
Notifications::create('TRADE_COMPLETED', $trade->sender, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
Notifications::create('TRADE_COMPLETED', $trade->recipient, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
$trade->status = 'Completed';
@@ -425,105 +344,265 @@ public function approveTrade($data, $user)
$trade->save();
return $this->commitReturn($trade);
+ } else {
+ throw new \Exception('Failed to credit trade attachments.');
}
- else throw new \Exception("Failed to credit trade attachments.");
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Rejects a trade in the admin panel.
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @return bool|\App\Models\Trade
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return \App\Models\Trade|bool
*/
- public function rejectTrade($data, $user)
- {
+ public function rejectTrade($data, $user) {
DB::beginTransaction();
try {
+ if (!isset($data['trade'])) {
+ $trade = Trade::where('status', 'Pending')->where('id', $data['id'])->first();
+ } else {
+ $trade = $data['trade'];
+ }
+ if (!$trade) {
+ throw new \Exception('Invalid trade.');
+ }
- if(!isset($data['trade'])) $trade = Trade::where('status', 'Pending')->where('id', $data['id'])->first();
- else $trade = $data['trade'];
- if(!$trade) throw new \Exception("Invalid trade.");
-
- if($this->returnAttachments($trade)) {
+ if ($this->returnAttachments($trade)) {
Notifications::create('TRADE_REJECTED', $trade->sender, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
Notifications::create('TRADE_REJECTED', $trade->recipient, [
- 'trade_id' => $trade->id
+ 'trade_id' => $trade->id,
]);
- $trade->reason = isset($data['reason']) ? $data['reason'] : '';
+ $trade->reason = $data['reason'] ?? '';
$trade->status = 'Rejected';
$trade->staff_id = $user->id;
$trade->save();
return $this->commitReturn($trade);
+ } else {
+ throw new \Exception('Failed to return trade attachments.');
+ }
+ } catch (\Exception $e) {
+ $this->setError('error', $e->getMessage());
+ }
+
+ return $this->rollbackReturn(false);
+ }
+
+ /**
+ * Handles modification of assets on the user's side of a trade.
+ *
+ * @param \App\Models\Trade $trade
+ * @param array $data
+ * @param \App\Models\User\User $user
+ *
+ * @return array|bool
+ */
+ private function handleTradeAssets($trade, $data, $user) {
+ DB::beginTransaction();
+ try {
+ $tradeData = $trade->data;
+ $isSender = $trade->sender_id == $user->id;
+ $type = ($isSender ? 'sender' : (($trade->recipient_id == $user->id) ? 'recipient' : null));
+ if (!$type) {
+ throw new \Exception('User not found.');
+ }
+ // First return any item stacks attached to the trade
+
+ if (isset($tradeData[$type]['user_items'])) {
+ foreach ($tradeData[$type]['user_items'] as $userItemId=>$quantity) {
+ $userItemRow = UserItem::find($userItemId);
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->trade_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
+ $userItemRow->trade_count -= $quantity;
+ $userItemRow->save();
+ }
+ }
+
+ // Also return any currency attached to the trade
+ // This is stored in the data attribute
+ $currencyManager = new CurrencyManager;
+ if (isset($tradeData[$type]['currencies'])) {
+ foreach ($tradeData[$type]['currencies'] as $currencyId=>$quantity) {
+ $currencyManager->creditCurrency(null, $user, null, null, $currencyId, $quantity);
+ }
+ }
+
+ // Unattach characters too
+ Character::where('trade_id', $trade->id)->where('user_id', $user->id)->update(['trade_id' => null]);
+
+ $userAssets = createAssetsArray();
+ $assetCount = 0;
+ $assetLimit = Config::get('lorekeeper.settings.trade_asset_limit');
+
+ // Attach items. Technically, the user doesn't lose ownership of the item - we're just adding an additional holding field.
+ // Unlike for design updates, we're keeping track of attached items here.
+ if (isset($data['stack_id'])) {
+ foreach ($data['stack_id'] as $stackId) {
+ $stack = UserItem::with('item')->find($stackId);
+ if (!$stack || $stack->user_id != $user->id) {
+ throw new \Exception('Invalid item selected.');
+ }
+ if (!isset($data['stack_quantity'][$stackId])) {
+ throw new \Exception('Invalid quantity selected.');
+ }
+ if (!$stack->item->allow_transfer || isset($stack->data['disallow_transfer'])) {
+ throw new \Exception('One or more of the selected items cannot be transferred.');
+ }
+ $stack->trade_count += $data['stack_quantity'][$stackId];
+ $stack->save();
+
+ addAsset($userAssets, $stack, $data['stack_quantity'][$stackId]);
+ $assetCount++;
+ }
+ }
+ if ($assetCount > $assetLimit) {
+ throw new \Exception("You may only include a maximum of {$assetLimit} things in a trade.");
+ }
+
+ // Attach currencies. Character currencies cannot be attached to trades, so we're just checking the user's bank.
+ if (isset($data['currency_id'])) {
+ if ($user->id != $trade->sender_id && $user->id != $trade->recipient_id) {
+ throw new \Exception('Error attaching currencies to this trade.');
+ }
+ //dd([$data['currency_id'], $data['currency_quantity']]);
+ $data['currency_id'] = $data['currency_id']['user-'.$user->id];
+ $data['currency_quantity'] = $data['currency_quantity']['user-'.$user->id];
+ foreach ($data['currency_id'] as $key=>$currencyId) {
+ $currency = Currency::where('allow_user_to_user', 1)->where('id', $currencyId)->first();
+ if (!$currency) {
+ throw new \Exception('Invalid currency selected.');
+ }
+ if (!$currencyManager->debitCurrency($user, null, null, null, $currency, $data['currency_quantity'][$key])) {
+ throw new \Exception('Invalid currency/quantity selected.');
+ }
+
+ addAsset($userAssets, $currency, $data['currency_quantity'][$key]);
+ $assetCount++;
+ }
+ }
+ if ($assetCount > $assetLimit) {
+ throw new \Exception("You may only include a maximum of {$assetLimit} things in a trade.");
+ }
+
+ // Attach characters.
+ if (isset($data['character_id'])) {
+ foreach ($data['character_id'] as $characterId) {
+ $character = Character::where('id', $characterId)->where('user_id', $user->id)->first();
+ if (!$character) {
+ throw new \Exception('Invalid character selected.');
+ }
+ if (!$character->is_sellable && !$character->is_tradeable && !$character->is_giftable) {
+ throw new \Exception('One or more of the selected characters cannot be transferred.');
+ }
+ if (CharacterTransfer::active()->where('character_id', $character->id)->exists()) {
+ throw new \Exception('One or more of the selected characters is already pending a character transfer.');
+ }
+ if ($character->trade_id) {
+ throw new \Exception('One or more of the selected characters is already in a trade.');
+ }
+ if ($character->designUpdate()->active()->exists()) {
+ throw new \Exception('One or more of the selected characters has an active design update. Please wait for it to be processed, or delete it.');
+ }
+ if ($character->transferrable_at && $character->transferrable_at->isFuture()) {
+ throw new \Exception('One or more of the selected characters is still on transfer cooldown and cannot be transferred.');
+ }
+
+ $character->trade_id = $trade->id;
+ $character->save();
+
+ addAsset($userAssets, $character, 1);
+ $assetCount++;
+ }
}
- else throw new \Exception("Failed to return trade attachments.");
- } catch(\Exception $e) {
+ if ($assetCount > $assetLimit) {
+ throw new \Exception("You may only include a maximum of {$assetLimit} things in a trade.");
+ }
+
+ return $this->commitReturn([($isSender ? 'sender' : 'recipient') => $userAssets]);
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Returns trade attachments to their owners.
*
- * @param \App\Models\Trade $trade
+ * @param \App\Models\Trade $trade
+ *
* @return bool
*/
- private function returnAttachments($trade)
- {
+ private function returnAttachments($trade) {
DB::beginTransaction();
try {
$tradeData = $trade->data;
// Return all added items/currency/characters
- foreach(['sender', 'recipient'] as $type) {
- if(isset($tradeData[$type]['user_items'])) {
- foreach($tradeData[$type]['user_items'] as $userItemId => $quantity) {
+ foreach (['sender', 'recipient'] as $type) {
+ if (isset($tradeData[$type]['user_items'])) {
+ foreach ($tradeData[$type]['user_items'] as $userItemId => $quantity) {
$userItemRow = UserItem::find($userItemId);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->trade_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->trade_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->trade_count -= $quantity;
$userItemRow->save();
}
}
}
-
+
Character::where('trade_id', $trade->id)->update(['trade_id' => null]);
$currencyManager = new CurrencyManager;
- foreach(['sender', 'recipient'] as $type) {
- if(isset($tradeData[$type]['currencies'])) {
- foreach($tradeData[$type]['currencies'] as $currencyId => $quantity) {
+ foreach (['sender', 'recipient'] as $type) {
+ if (isset($tradeData[$type]['currencies'])) {
+ foreach ($tradeData[$type]['currencies'] as $currencyId => $quantity) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Cannot return an invalid currency. (".$currencyId.")");
- if(!$currencyManager->creditCurrency(null, $trade->{$type}, null, null, $currency, $quantity)) throw new \Exception("Could not return currency to user. (".$currencyId.")");
+ if (!$currency) {
+ throw new \Exception('Cannot return an invalid currency. ('.$currencyId.')');
+ }
+ if (!$currencyManager->creditCurrency(null, $trade->{$type}, null, null, $currency, $quantity)) {
+ throw new \Exception('Could not return currency to user. ('.$currencyId.')');
+ }
}
}
}
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
* Credits trade attachments to their new owners.
*
- * @param \App\Models\Trade $trade
- * @param array $data
+ * @param \App\Models\Trade $trade
+ * @param array $data
+ *
* @return bool
*/
- private function creditAttachments($trade, $data = [])
- {
+ private function creditAttachments($trade, $data = []) {
DB::beginTransaction();
try {
@@ -532,33 +611,39 @@ private function creditAttachments($trade, $data = [])
// Get all items
$senderStacks = null;
$recipientStacks = null;
- if(isset($trade->data['sender']['user_items']))
- {
+ if (isset($trade->data['sender']['user_items'])) {
$senderStacks = UserItem::find(array_keys($trade->data['sender']['user_items']));
}
- if(isset($trade->data['recipient']['user_items']))
- {
+ if (isset($trade->data['recipient']['user_items'])) {
$recipientStacks = UserItem::find(array_keys($trade->data['recipient']['user_items']));
}
- if($senderStacks) {
- foreach($senderStacks as $stack) {
+ if ($senderStacks) {
+ foreach ($senderStacks as $stack) {
$quantity = $trade->data['sender']['user_items'][$stack->id];
$inventoryManager->moveStack($trade->sender, $trade->recipient, 'Trade', ['data' => 'Received in trade [#'.$trade->id.' ]'], $stack, $quantity);
$userItemRow = UserItem::find($stack->id);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->trade_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->trade_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->trade_count -= $quantity;
$userItemRow->save();
}
}
- if($recipientStacks) {
- foreach($recipientStacks as $stack) {
+ if ($recipientStacks) {
+ foreach ($recipientStacks as $stack) {
$quantity = $trade->data['recipient']['user_items'][$stack->id];
$inventoryManager->moveStack($trade->recipient, $trade->sender, 'Trade', ['data' => 'Received in trade [#'.$trade->id.' ]'], $stack, $quantity);
$userItemRow = UserItem::find($stack->id);
- if(!$userItemRow) throw new \Exception("Cannot return an invalid item. (".$userItemId.")");
- if($userItemRow->trade_count < $quantity) throw new \Exception("Cannot return more items than was held. (".$userItemId.")");
+ if (!$userItemRow) {
+ throw new \Exception('Cannot return an invalid item. ('.$userItemId.')');
+ }
+ if ($userItemRow->trade_count < $quantity) {
+ throw new \Exception('Cannot return more items than was held. ('.$userItemId.')');
+ }
$userItemRow->trade_count -= $quantity;
$userItemRow->save();
}
@@ -566,36 +651,45 @@ private function creditAttachments($trade, $data = [])
$characterManager = new CharacterManager;
// Transfer characters
- $cooldowns = isset($data['cooldowns']) ? $data['cooldowns'] : [];
+ $cooldowns = $data['cooldowns'] ?? [];
$defaultCooldown = Settings::get('transfer_cooldown');
$senderCharacters = Character::where('user_id', $trade->sender_id)->where('trade_id', $trade->id)->get();
$recipientCharacters = Character::where('user_id', $trade->recipient_id)->where('trade_id', $trade->id)->get();
- foreach($senderCharacters as $character) $characterManager->moveCharacter($character, $trade->recipient, 'Trade [#'.$trade->id.' ]', isset($cooldowns[$character->id]) ? $cooldowns[$character->id] : $defaultCooldown, 'Transferred in trade');
-
- foreach($recipientCharacters as $character) $characterManager->moveCharacter($character, $trade->sender, 'Trade [#'.$trade->id.' ]', isset($cooldowns[$character->id]) ? $cooldowns[$character->id] : $defaultCooldown, 'Transferred in trade');
+ foreach ($senderCharacters as $character) {
+ $characterManager->moveCharacter($character, $trade->recipient, 'Trade [#'.$trade->id.' ]', $cooldowns[$character->id] ?? $defaultCooldown, 'Transferred in trade');
+ }
+
+ foreach ($recipientCharacters as $character) {
+ $characterManager->moveCharacter($character, $trade->sender, 'Trade [#'.$trade->id.' ]', $cooldowns[$character->id] ?? $defaultCooldown, 'Transferred in trade');
+ }
Character::where('trade_id', $trade->id)->update(['trade_id' => null]);
// Transfer currency
$tradeData = $trade->data;
$currencyManager = new CurrencyManager;
- foreach(['sender', 'recipient'] as $type) {
+ foreach (['sender', 'recipient'] as $type) {
$recipientType = ($type == 'sender') ? 'recipient' : 'sender';
- if(isset($tradeData[$type]['currencies'])) {
- foreach($tradeData[$type]['currencies'] as $currencyId => $quantity) {
+ if (isset($tradeData[$type]['currencies'])) {
+ foreach ($tradeData[$type]['currencies'] as $currencyId => $quantity) {
$currency = Currency::find($currencyId);
- if(!$currency) throw new \Exception("Cannot credit an invalid currency. (".$currencyId.")");
- if(!$currencyManager->creditCurrency($trade->{$type}, $trade->{$recipientType}, 'Trade', 'Received in trade [#'.$trade->id.']', $currency, $quantity)) throw new \Exception("Could not credit currency. (".$currencyId.")");
+ if (!$currency) {
+ throw new \Exception('Cannot credit an invalid currency. ('.$currencyId.')');
+ }
+ if (!$currencyManager->creditCurrency($trade->{$type}, $trade->{$recipientType}, 'Trade', 'Received in trade [ #'.$trade->id.']', $currency, $quantity)) {
+ throw new \Exception('Could not credit currency. ('.$currencyId.')');
+ }
}
}
}
-
+
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/UserService.php b/app/Services/UserService.php
index c34babbc68..19c05b6630 100644
--- a/app/Services/UserService.php
+++ b/app/Services/UserService.php
@@ -1,30 +1,22 @@
-first()->id;
+ if (!isset($data['rank_id'])) {
+ $data['rank_id'] = Rank::orderBy('sort')->first()->id;
+ }
// Make birthday into format we can store
- $date = $data['dob']['day']."-".$data['dob']['month']."-".$data['dob']['year'];
+ $date = $data['dob']['day'].'-'.$data['dob']['month'].'-'.$data['dob']['year'];
$formatDate = carbon::parse($date);
$user = User::create([
- 'name' => $data['name'],
- 'email' => $data['email'],
- 'rank_id' => $data['rank_id'],
+ 'name' => $data['name'],
+ 'email' => $data['email'],
+ 'rank_id' => $data['rank_id'],
'password' => Hash::make($data['password']),
'birthday' => $formatDate,
]);
@@ -60,7 +54,7 @@ public function createUser($data)
'user_id' => $user->id,
]);
$user->profile()->create([
- 'user_id' => $user->id
+ 'user_id' => $user->id,
]);
return $user;
@@ -69,53 +63,61 @@ public function createUser($data)
/**
* Updates a user. Used in modifying the admin user on the command line.
*
- * @param array $data
+ * @param array $data
+ *
* @return \App\Models\User\User
*/
- public function updateUser($data)
- {
+ public function updateUser($data) {
$user = User::find($data['id']);
- if(isset($data['password'])) $data['password'] = Hash::make($data['password']);
- if($user) $user->update($data);
+ if (isset($data['password'])) {
+ $data['password'] = Hash::make($data['password']);
+ }
+ if ($user) {
+ $user->update($data);
+ }
return $user;
}
/**
- * Updates the user's password.
+ * Updates the user's password.
+ *
+ * @param array $data
+ * @param \App\Models\User\User $user
*
- * @param array $data
- * @param \App\Models\User\User $user
* @return bool
*/
- public function updatePassword($data, $user)
- {
-
+ public function updatePassword($data, $user) {
DB::beginTransaction();
try {
- if(!Hash::check($data['old_password'], $user->password)) throw new \Exception("Please enter your old password.");
- if(Hash::make($data['new_password']) == $user->password) throw new \Exception("Please enter a different password.");
+ if (!Hash::check($data['old_password'], $user->password)) {
+ throw new \Exception('Please enter your old password.');
+ }
+ if (Hash::make($data['new_password']) == $user->password) {
+ throw new \Exception('Please enter a different password.');
+ }
$user->password = Hash::make($data['new_password']);
$user->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
- * Updates the user's email and resends a verification email.
+ * Updates the user's email and resends a verification email.
+ *
+ * @param array $data
+ * @param \App\Models\User\User $user
*
- * @param array $data
- * @param \App\Models\User\User $user
* @return bool
*/
- public function updateEmail($data, $user)
- {
+ public function updateEmail($data, $user) {
$user->email = $data['email'];
$user->email_verified_at = null;
$user->save();
@@ -126,10 +128,12 @@ public function updateEmail($data, $user)
}
/**
- * Updates user's birthday
+ * Updates user's birthday.
+ *
+ * @param mixed $data
+ * @param mixed $user
*/
- public function updateBirthday($data, $user)
- {
+ public function updateBirthday($data, $user) {
$user->birthday = $data;
$user->save();
@@ -137,10 +141,12 @@ public function updateBirthday($data, $user)
}
/**
- * Updates user's birthday setting
+ * Updates user's birthday setting.
+ *
+ * @param mixed $data
+ * @param mixed $user
*/
- public function updateDOB($data, $user)
- {
+ public function updateDOB($data, $user) {
$user->settings->birthday_setting = $data;
$user->settings->save();
@@ -148,149 +154,162 @@ public function updateDOB($data, $user)
}
/**
- * Updates the user's avatar.
+ * Updates the user's avatar.
+ *
+ * @param \App\Models\User\User $user
+ * @param mixed $avatar
*
- * @param array $data
- * @param \App\Models\User\User $user
* @return bool
*/
- public function updateAvatar($avatar, $user)
- {
+ public function updateAvatar($avatar, $user) {
DB::beginTransaction();
try {
- if(!$avatar) throw new \Exception ("Please upload a file.");
- $filename = $user->id . '.' . $avatar->getClientOriginalExtension();
-
+ if (!$avatar) {
+ throw new \Exception('Please upload a file.');
+ }
+ $filename = $user->id.'.'.$avatar->getClientOriginalExtension();
+
if ($user->avatar !== 'default.jpg') {
- $file = 'images/avatars/' . $user->avatar;
+ $file = 'images/avatars/'.$user->avatar;
//$destinationPath = 'uploads/' . $id . '/';
if (File::exists($file)) {
- if(!unlink($file)) throw new \Exception("Failed to unlink old avatar.");
+ if (!unlink($file)) {
+ throw new \Exception('Failed to unlink old avatar.');
+ }
}
}
// Checks if uploaded file is a GIF
if ($avatar->getClientOriginalExtension() == 'gif') {
-
- if(!copy($avatar, $file)) throw new \Exception("Failed to copy file.");
- if(!$file->move( public_path('images/avatars', $filename))) throw new \Exception("Failed to move file.");
- if(!$avatar->move( public_path('images/avatars', $filename))) throw new \Exception("Failed to move file.");
-
- }
-
- else {
- if(!Image::make($avatar)->resize(150, 150)->save( public_path('images/avatars/' . $filename)))
- throw new \Exception("Failed to process avatar.");
+ if (!copy($avatar, $file)) {
+ throw new \Exception('Failed to copy file.');
+ }
+ if (!$file->move(public_path('images/avatars', $filename))) {
+ throw new \Exception('Failed to move file.');
+ }
+ if (!$avatar->move(public_path('images/avatars', $filename))) {
+ throw new \Exception('Failed to move file.');
+ }
+ } else {
+ if (!Image::make($avatar)->resize(150, 150)->save(public_path('images/avatars/'.$filename))) {
+ throw new \Exception('Failed to process avatar.');
+ }
}
$user->avatar = $filename;
$user->save();
return $this->commitReturn($avatar);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
- * Bans a user.
+ * Bans a user.
+ *
+ * @param array $data
+ * @param \App\Models\User\User $user
+ * @param \App\Models\User\User $staff
*
- * @param array $data
- * @param \App\Models\User\User $user
- * @param \App\Models\User\User $staff
* @return bool
*/
- public function ban($data, $user, $staff)
- {
+ public function ban($data, $user, $staff) {
DB::beginTransaction();
try {
- if(!$user->is_banned) {
+ if (!$user->is_banned) {
// New ban (not just editing the reason), clear all their engagements
// 1. Character transfers
$characterManager = new CharacterManager;
- $transfers = CharacterTransfer::where(function($query) use ($user) {
+ $transfers = CharacterTransfer::where(function ($query) use ($user) {
$query->where('sender_id', $user->id)->orWhere('recipient_id', $user->id);
})->where('status', 'Pending')->get();
- foreach($transfers as $transfer)
- $characterManager->processTransferQueue(['transfer' => $transfer, 'action' => 'Reject', 'reason' => ($transfer->sender_id == $user->id ? 'Sender' : 'Recipient') . ' has been banned from site activity.'], $staff);
+ foreach ($transfers as $transfer) {
+ $characterManager->processTransferQueue(['transfer' => $transfer, 'action' => 'Reject', 'reason' => ($transfer->sender_id == $user->id ? 'Sender' : 'Recipient').' has been banned from site activity.'], $staff);
+ }
// 2. Submissions and claims
$submissionManager = new SubmissionManager;
$submissions = Submission::where('user_id', $user->id)->where('status', 'Pending')->get();
- foreach($submissions as $submission)
+ foreach ($submissions as $submission) {
$submissionManager->rejectSubmission(['submission' => $submission, 'staff_comments' => 'User has been banned from site activity.']);
+ }
// 3. Gallery Submissions
$galleryManager = new GalleryManager;
$gallerySubmissions = GallerySubmission::where('user_id', $user->id)->where('status', 'Pending')->get();
- foreach($gallerySubmissions as $submission) {
+ foreach ($gallerySubmissions as $submission) {
$galleryManager->rejectSubmission($submission);
$galleryManager->postStaffComments($submission->id, ['staff_comments' => 'User has been banned from site activity.'], $staff);
}
$gallerySubmissions = GallerySubmission::where('user_id', $user->id)->where('status', 'Accepted')->get();
- foreach($gallerySubmissions as $submission)
+ foreach ($gallerySubmissions as $submission) {
$submission->update(['is_visible' => 0]);
+ }
// 4. Design approvals
- $requests = CharacterDesignUpdate::where('user_id', $user->id)->where(function($query) {
+ $requests = CharacterDesignUpdate::where('user_id', $user->id)->where(function ($query) {
$query->where('status', 'Pending')->orWhere('status', 'Draft');
})->get();
- foreach($requests as $request)
+ foreach ($requests as $request) {
$characterManager->rejectRequest(['staff_comments' => 'User has been banned from site activity.'], $request, $staff, true);
+ }
// 5. Trades
$tradeManager = new TradeManager;
- $trades = Trade::where(function($query) {
+ $trades = Trade::where(function ($query) {
$query->where('status', 'Open')->orWhere('status', 'Pending');
- })->where(function($query) use ($user) {
+ })->where(function ($query) use ($user) {
$query->where('sender_id', $user->id)->where('recipient_id', $user->id);
})->get();
- foreach($trades as $trade)
+ foreach ($trades as $trade) {
$tradeManager->rejectTrade(['trade' => $trade, 'reason' => 'User has been banned from site activity.'], $staff);
+ }
- UserUpdateLog::create(['staff_id' => $staff->id, 'user_id' => $user->id, 'data' => json_encode(['is_banned' => 'Yes', 'ban_reason' => isset($data['ban_reason']) ? $data['ban_reason'] : null]), 'type' => 'Ban']);
+ UserUpdateLog::create(['staff_id' => $staff->id, 'user_id' => $user->id, 'data' => json_encode(['is_banned' => 'Yes', 'ban_reason' => $data['ban_reason'] ?? null]), 'type' => 'Ban']);
$user->settings->banned_at = Carbon::now();
$user->is_banned = 1;
$user->rank_id = Rank::orderBy('sort')->first()->id;
$user->save();
- }
- else {
- UserUpdateLog::create(['staff_id' => $staff->id, 'user_id' => $user->id, 'data' => json_encode(['ban_reason' => isset($data['ban_reason']) ? $data['ban_reason'] : null]), 'type' => 'Ban Update']);
+ } else {
+ UserUpdateLog::create(['staff_id' => $staff->id, 'user_id' => $user->id, 'data' => json_encode(['ban_reason' => $data['ban_reason'] ?? null]), 'type' => 'Ban Update']);
}
$user->settings->ban_reason = isset($data['ban_reason']) && $data['ban_reason'] ? $data['ban_reason'] : null;
$user->settings->save();
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
/**
- * Unbans a user.
+ * Unbans a user.
+ *
+ * @param \App\Models\User\User $user
+ * @param \App\Models\User\User $staff
*
- * @param \App\Models\User\User $user
- * @param \App\Models\User\User $staff
* @return bool
*/
- public function unban($user, $staff)
- {
+ public function unban($user, $staff) {
DB::beginTransaction();
try {
- if($user->is_banned) {
+ if ($user->is_banned) {
$user->is_banned = 0;
$user->save();
-
+
$user->settings->ban_reason = null;
$user->settings->banned_at = null;
$user->settings->save();
@@ -298,9 +317,10 @@ public function unban($user, $staff)
}
return $this->commitReturn(true);
- } catch(\Exception $e) {
+ } catch (\Exception $e) {
$this->setError('error', $e->getMessage());
}
+
return $this->rollbackReturn(false);
}
-}
\ No newline at end of file
+}
diff --git a/app/Traits/Commentable.php b/app/Traits/Commentable.php
index 4ea80ee838..e71a7fa4c0 100644
--- a/app/Traits/Commentable.php
+++ b/app/Traits/Commentable.php
@@ -3,47 +3,39 @@
namespace App\Traits;
use App\Models\Comment;
-
use Config;
/**
* Add this trait to any model that you want to be able to
* comment upon or get comments for.
*/
-trait Commentable
-{
- /**
- * This static method does voodoo magic to
- * delete leftover comments once the commentable
- * model is deleted.
- */
- protected static function bootCommentable()
- {
- static::deleted(function($commentable) {
-
- if (Config::get('lorekeeper.comments.soft_deletes') == true) {
- Comment::where('commentable_type', get_class($commentable))->where('commentable_id', $commentable->id)->delete();
- }
- else {
- Comment::where('commentable_type', get_class($commentable))->where('commentable_id', $commentable->id)->forceDelete();
- }
-
- });
- }
-
+trait Commentable {
/**
* Returns all comments for this model.
*/
- public function commentz()
- {
+ public function commentz() {
return $this->morphMany('App\Models\Comment', 'commentable');
}
/**
* Returns only approved comments for this model.
*/
- public function approvedComments()
- {
+ public function approvedComments() {
return $this->morphMany('App\Models\Comment', 'commentable')->where('approved', true);
}
+
+ /**
+ * This static method does voodoo magic to
+ * delete leftover comments once the commentable
+ * model is deleted.
+ */
+ protected static function bootCommentable() {
+ static::deleted(function ($commentable) {
+ if (Config::get('lorekeeper.comments.soft_deletes') == true) {
+ Comment::where('commentable_type', get_class($commentable))->where('commentable_id', $commentable->id)->delete();
+ } else {
+ Comment::where('commentable_type', get_class($commentable))->where('commentable_id', $commentable->id)->forceDelete();
+ }
+ });
+ }
}
diff --git a/app/Traits/Commenter.php b/app/Traits/Commenter.php
index 0f4d87d219..0438f576fc 100644
--- a/app/Traits/Commenter.php
+++ b/app/Traits/Commenter.php
@@ -2,29 +2,22 @@
namespace App\Traits;
-use App\Models\Comment;
-
-use Illuminate\Support\Facades\Config;
-
/**
* Add this trait to your User model so
* that you can retrieve the comments for a user.
*/
-trait Commenter
-{
+trait Commenter {
/**
* Returns all comments that this user has made.
*/
- public function comments()
- {
+ public function comments() {
return $this->morphMany('App\Models\Comment', 'commenter');
}
/**
* Returns only approved comments that this user has made.
*/
- public function approvedComments()
- {
+ public function approvedComments() {
return $this->morphMany('App\Models\Comment', 'commenter')->where('approved', true);
}
}
diff --git a/composer.json b/composer.json
index 70a3429869..6515fb3976 100644
--- a/composer.json
+++ b/composer.json
@@ -8,41 +8,36 @@
],
"license": "MIT",
"require": {
- "php": "~8.1",
- "boxconnect/deviant-php": "dev-master",
+ "php": "^8.1",
"doctrine/dbal": "^2.2",
"erusev/parsedown": "^1.7",
"ezyang/htmlpurifier": "^4.10",
- "fideloper/proxy": "^4.0",
- "illuminate/database": "^5.6|^6.0|^7.0|^8.0",
- "illuminate/http": "^5.6|^6.0|^7.0|^8.0",
- "illuminate/pagination": "^5.6|^6.0|^7.0|^8.0",
- "illuminate/queue": "^5.6|^6.0|^7.0|^8.0",
- "illuminate/routing": "^5.6|^6.0|^7.0|^8.0",
- "illuminate/support": "^5.6|^6.0|^7.0|^8.0",
"intervention/image": "^2.4",
+ "josiasmontag/laravel-recaptchav3": "^1.0.0",
"laracasts/flash": "^3.0",
- "laravel/framework": "^8.0",
+ "laravel/framework": "^9.0",
"laravel/helpers": "^1.4",
"laravel/socialite": "^5.2",
"laravel/tinker": "^2.0",
- "laravel/ui": "^3.1.0",
+ "laravel/ui": "^4.0.0",
"laravelcollective/html": "^6.0",
"socialiteproviders/deviantart": "^4.1",
+ "socialiteproviders/discord": "^4.1",
"socialiteproviders/imgur": "^4.1",
- "socialiteproviders/instagram": "^4.1",
+ "socialiteproviders/instagram": "^5.0",
"socialiteproviders/tumblr": "^4.1",
"socialiteproviders/twitch": "^5.3",
- "socialiteproviders/twitter": "^4.1",
+ "spatie/laravel-feed": "^4.1",
"spatie/laravel-honeypot": "^4.1"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
- "filp/whoops": "^2.0",
- "fzaninotto/faker": "^1.4",
+ "fakerphp/faker": "^1.9.1",
+ "laravel/pint": "^1.0",
"mockery/mockery": "^1.0",
- "nunomaduro/collision": "^5.0",
- "phpunit/phpunit": "^9.0"
+ "nunomaduro/collision": "^7.0",
+ "phpunit/phpunit": "^10.0",
+ "spatie/laravel-ignition": "^1.2"
},
"config": {
"optimize-autoloader": true,
@@ -84,6 +79,12 @@
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
+ ],
+ "sniff": [
+ "./vendor/bin/pint --test"
+ ],
+ "lint": [
+ "./vendor/bin/pint"
]
}
}
diff --git a/config/app.php b/config/app.php
index c9d7d3e103..7b1f27892a 100644
--- a/config/app.php
+++ b/config/app.php
@@ -195,46 +195,46 @@
'aliases' => [
- 'App' => Illuminate\Support\Facades\App::class,
- 'Arr' => Illuminate\Support\Arr::class,
- 'Artisan' => Illuminate\Support\Facades\Artisan::class,
- 'Auth' => Illuminate\Support\Facades\Auth::class,
- 'Blade' => Illuminate\Support\Facades\Blade::class,
- 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
- 'Bus' => Illuminate\Support\Facades\Bus::class,
- 'Cache' => Illuminate\Support\Facades\Cache::class,
- 'Config' => Illuminate\Support\Facades\Config::class,
- 'Cookie' => Illuminate\Support\Facades\Cookie::class,
- 'Crypt' => Illuminate\Support\Facades\Crypt::class,
- 'DB' => Illuminate\Support\Facades\DB::class,
- 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
- 'Event' => Illuminate\Support\Facades\Event::class,
- 'File' => Illuminate\Support\Facades\File::class,
- 'Gate' => Illuminate\Support\Facades\Gate::class,
- 'Hash' => Illuminate\Support\Facades\Hash::class,
- 'Lang' => Illuminate\Support\Facades\Lang::class,
- 'Log' => Illuminate\Support\Facades\Log::class,
- 'Mail' => Illuminate\Support\Facades\Mail::class,
- 'Notification' => Illuminate\Support\Facades\Notification::class,
- 'Password' => Illuminate\Support\Facades\Password::class,
- 'Queue' => Illuminate\Support\Facades\Queue::class,
- 'Redirect' => Illuminate\Support\Facades\Redirect::class,
- 'Redis' => Illuminate\Support\Facades\Redis::class,
- 'Request' => Illuminate\Support\Facades\Request::class,
- 'Response' => Illuminate\Support\Facades\Response::class,
- 'Route' => Illuminate\Support\Facades\Route::class,
- 'Schema' => Illuminate\Support\Facades\Schema::class,
- 'Session' => Illuminate\Support\Facades\Session::class,
- 'Storage' => Illuminate\Support\Facades\Storage::class,
- 'Str' => Illuminate\Support\Str::class,
- 'URL' => Illuminate\Support\Facades\URL::class,
- 'Validator' => Illuminate\Support\Facades\Validator::class,
- 'View' => Illuminate\Support\Facades\View::class,
- 'Form' => Collective\Html\FormFacade::class,
- 'Html' => Collective\Html\HtmlFacade::class,
- 'Settings' => App\Facades\Settings::class,
+ 'App' => Illuminate\Support\Facades\App::class,
+ 'Arr' => Illuminate\Support\Arr::class,
+ 'Artisan' => Illuminate\Support\Facades\Artisan::class,
+ 'Auth' => Illuminate\Support\Facades\Auth::class,
+ 'Blade' => Illuminate\Support\Facades\Blade::class,
+ 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
+ 'Bus' => Illuminate\Support\Facades\Bus::class,
+ 'Cache' => Illuminate\Support\Facades\Cache::class,
+ 'Config' => Illuminate\Support\Facades\Config::class,
+ 'Cookie' => Illuminate\Support\Facades\Cookie::class,
+ 'Crypt' => Illuminate\Support\Facades\Crypt::class,
+ 'DB' => Illuminate\Support\Facades\DB::class,
+ 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
+ 'Event' => Illuminate\Support\Facades\Event::class,
+ 'File' => Illuminate\Support\Facades\File::class,
+ 'Gate' => Illuminate\Support\Facades\Gate::class,
+ 'Hash' => Illuminate\Support\Facades\Hash::class,
+ 'Lang' => Illuminate\Support\Facades\Lang::class,
+ 'Log' => Illuminate\Support\Facades\Log::class,
+ 'Mail' => Illuminate\Support\Facades\Mail::class,
+ 'Notification' => Illuminate\Support\Facades\Notification::class,
+ 'Password' => Illuminate\Support\Facades\Password::class,
+ 'Queue' => Illuminate\Support\Facades\Queue::class,
+ 'Redirect' => Illuminate\Support\Facades\Redirect::class,
+ 'Redis' => Illuminate\Support\Facades\Redis::class,
+ 'Request' => Illuminate\Support\Facades\Request::class,
+ 'Response' => Illuminate\Support\Facades\Response::class,
+ 'Route' => Illuminate\Support\Facades\Route::class,
+ 'Schema' => Illuminate\Support\Facades\Schema::class,
+ 'Session' => Illuminate\Support\Facades\Session::class,
+ 'Storage' => Illuminate\Support\Facades\Storage::class,
+ 'Str' => Illuminate\Support\Str::class,
+ 'URL' => Illuminate\Support\Facades\URL::class,
+ 'Validator' => Illuminate\Support\Facades\Validator::class,
+ 'View' => Illuminate\Support\Facades\View::class,
+ 'Form' => Collective\Html\FormFacade::class,
+ 'Html' => Collective\Html\HtmlFacade::class,
+ 'Settings' => App\Facades\Settings::class,
'Notifications' => App\Facades\Notifications::class,
- 'Image' => Intervention\Image\Facades\Image::class
+ 'Image' => Intervention\Image\Facades\Image::class,
],
diff --git a/config/auth.php b/config/auth.php
index ef343f027d..3edfa33105 100644
--- a/config/auth.php
+++ b/config/auth.php
@@ -14,7 +14,7 @@
*/
'defaults' => [
- 'guard' => 'web',
+ 'guard' => 'web',
'passwords' => 'users',
],
@@ -37,14 +37,14 @@
'guards' => [
'web' => [
- 'driver' => 'session',
+ 'driver' => 'session',
'provider' => 'users',
],
'api' => [
- 'driver' => 'token',
+ 'driver' => 'token',
'provider' => 'users',
- 'hash' => false,
+ 'hash' => false,
],
],
@@ -68,7 +68,7 @@
'providers' => [
'users' => [
'driver' => 'eloquent',
- 'model' => App\Models\User\User::class,
+ 'model' => App\Models\User\User::class,
],
// 'users' => [
@@ -95,8 +95,8 @@
'passwords' => [
'users' => [
'provider' => 'users',
- 'table' => 'password_resets',
- 'expire' => 60,
+ 'table' => 'password_resets',
+ 'expire' => 60,
],
],
diff --git a/config/broadcasting.php b/config/broadcasting.php
index 3ca45eaa85..1e0044fedd 100644
--- a/config/broadcasting.php
+++ b/config/broadcasting.php
@@ -31,18 +31,18 @@
'connections' => [
'pusher' => [
- 'driver' => 'pusher',
- 'key' => env('PUSHER_APP_KEY'),
- 'secret' => env('PUSHER_APP_SECRET'),
- 'app_id' => env('PUSHER_APP_ID'),
+ 'driver' => 'pusher',
+ 'key' => env('PUSHER_APP_KEY'),
+ 'secret' => env('PUSHER_APP_SECRET'),
+ 'app_id' => env('PUSHER_APP_ID'),
'options' => [
- 'cluster' => env('PUSHER_APP_CLUSTER'),
+ 'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
],
],
'redis' => [
- 'driver' => 'redis',
+ 'driver' => 'redis',
'connection' => 'default',
],
diff --git a/config/cache.php b/config/cache.php
index 49767228e2..423386e9dd 100644
--- a/config/cache.php
+++ b/config/cache.php
@@ -42,20 +42,20 @@
],
'database' => [
- 'driver' => 'database',
- 'table' => 'cache',
+ 'driver' => 'database',
+ 'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
- 'path' => storage_path('framework/cache/data'),
+ 'path' => storage_path('framework/cache/data'),
],
'memcached' => [
- 'driver' => 'memcached',
+ 'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
- 'sasl' => [
+ 'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
@@ -64,24 +64,24 @@
],
'servers' => [
[
- 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
- 'port' => env('MEMCACHED_PORT', 11211),
+ 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
+ 'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
- 'driver' => 'redis',
+ 'driver' => 'redis',
'connection' => 'cache',
],
'dynamodb' => [
'driver' => 'dynamodb',
- 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_REGION', 'us-east-1'),
- 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
+ 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
],
],
diff --git a/config/database.php b/config/database.php
index 77c31843e0..529b233ee0 100644
--- a/config/database.php
+++ b/config/database.php
@@ -34,54 +34,54 @@
'connections' => [
'sqlite' => [
- 'driver' => 'sqlite',
- 'database' => env('DB_DATABASE', database_path('database.sqlite')),
- 'prefix' => '',
+ 'driver' => 'sqlite',
+ 'database' => env('DB_DATABASE', database_path('database.sqlite')),
+ 'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
- 'driver' => 'mysql',
- 'host' => env('DB_HOST', '127.0.0.1'),
- 'port' => env('DB_PORT', '3306'),
- 'database' => env('DB_DATABASE', 'forge'),
- 'username' => env('DB_USERNAME', 'forge'),
- 'password' => env('DB_PASSWORD', ''),
- 'unix_socket' => env('DB_SOCKET', ''),
- 'charset' => 'utf8mb4',
- 'collation' => 'utf8mb4_unicode_ci',
- 'prefix' => '',
+ 'driver' => 'mysql',
+ 'host' => env('DB_HOST', '127.0.0.1'),
+ 'port' => env('DB_PORT', '3306'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'unix_socket' => env('DB_SOCKET', ''),
+ 'charset' => 'utf8mb4',
+ 'collation' => 'utf8mb4_unicode_ci',
+ 'prefix' => '',
'prefix_indexes' => true,
- 'strict' => true,
- 'engine' => null,
- 'options' => array_filter([
+ 'strict' => true,
+ 'engine' => null,
+ 'options' => array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]),
],
'pgsql' => [
- 'driver' => 'pgsql',
- 'host' => env('DB_HOST', '127.0.0.1'),
- 'port' => env('DB_PORT', '5432'),
- 'database' => env('DB_DATABASE', 'forge'),
- 'username' => env('DB_USERNAME', 'forge'),
- 'password' => env('DB_PASSWORD', ''),
- 'charset' => 'utf8',
- 'prefix' => '',
+ 'driver' => 'pgsql',
+ 'host' => env('DB_HOST', '127.0.0.1'),
+ 'port' => env('DB_PORT', '5432'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
'prefix_indexes' => true,
- 'schema' => 'public',
- 'sslmode' => 'prefer',
+ 'schema' => 'public',
+ 'sslmode' => 'prefer',
],
'sqlsrv' => [
- 'driver' => 'sqlsrv',
- 'host' => env('DB_HOST', 'localhost'),
- 'port' => env('DB_PORT', '1433'),
- 'database' => env('DB_DATABASE', 'forge'),
- 'username' => env('DB_USERNAME', 'forge'),
- 'password' => env('DB_PASSWORD', ''),
- 'charset' => 'utf8',
- 'prefix' => '',
+ 'driver' => 'sqlsrv',
+ 'host' => env('DB_HOST', 'localhost'),
+ 'port' => env('DB_PORT', '1433'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
'prefix_indexes' => true,
],
@@ -120,16 +120,16 @@
],
'default' => [
- 'host' => env('REDIS_HOST', '127.0.0.1'),
+ 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
- 'port' => env('REDIS_PORT', 6379),
+ 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DB', 0),
],
'cache' => [
- 'host' => env('REDIS_HOST', '127.0.0.1'),
+ 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
- 'port' => env('REDIS_PORT', 6379),
+ 'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
diff --git a/config/filesystems.php b/config/filesystems.php
index 77fa5ded1d..ab75dc28b6 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -45,23 +45,23 @@
'local' => [
'driver' => 'local',
- 'root' => storage_path('app'),
+ 'root' => storage_path('app'),
],
'public' => [
- 'driver' => 'local',
- 'root' => storage_path('app/public'),
- 'url' => env('APP_URL').'/storage',
+ 'driver' => 'local',
+ 'root' => storage_path('app/public'),
+ 'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
- 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
- 'url' => env('AWS_URL'),
+ 'url' => env('AWS_URL'),
],
],
diff --git a/config/hashing.php b/config/hashing.php
index 842577087c..5b10c09d3c 100644
--- a/config/hashing.php
+++ b/config/hashing.php
@@ -44,9 +44,9 @@
*/
'argon' => [
- 'memory' => 1024,
+ 'memory' => 1024,
'threads' => 2,
- 'time' => 2,
+ 'time' => 2,
],
];
diff --git a/config/logging.php b/config/logging.php
index d09cd7d294..a0f9da17ff 100644
--- a/config/logging.php
+++ b/config/logging.php
@@ -35,36 +35,36 @@
'channels' => [
'stack' => [
- 'driver' => 'stack',
- 'channels' => ['daily'],
+ 'driver' => 'stack',
+ 'channels' => ['daily'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
- 'path' => storage_path('logs/laravel.log'),
- 'level' => 'debug',
+ 'path' => storage_path('logs/laravel.log'),
+ 'level' => 'debug',
],
'daily' => [
'driver' => 'daily',
- 'path' => storage_path('logs/laravel.log'),
- 'level' => 'debug',
- 'days' => 14,
+ 'path' => storage_path('logs/laravel.log'),
+ 'level' => 'debug',
+ 'days' => 14,
],
'slack' => [
- 'driver' => 'slack',
- 'url' => env('LOG_SLACK_WEBHOOK_URL'),
+ 'driver' => 'slack',
+ 'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
- 'emoji' => ':boom:',
- 'level' => 'critical',
+ 'emoji' => ':boom:',
+ 'level' => 'critical',
],
'papertrail' => [
- 'driver' => 'monolog',
- 'level' => 'debug',
- 'handler' => SyslogUdpHandler::class,
+ 'driver' => 'monolog',
+ 'level' => 'debug',
+ 'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
@@ -72,22 +72,22 @@
],
'stderr' => [
- 'driver' => 'monolog',
- 'handler' => StreamHandler::class,
+ 'driver' => 'monolog',
+ 'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
- 'with' => [
+ 'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
- 'level' => 'debug',
+ 'level' => 'debug',
],
'errorlog' => [
'driver' => 'errorlog',
- 'level' => 'debug',
+ 'level' => 'debug',
],
],
diff --git a/config/lorekeeper/admin_sidebar.php b/config/lorekeeper/admin_sidebar.php
index 4cead884c0..0ec9f21ae1 100644
--- a/config/lorekeeper/admin_sidebar.php
+++ b/config/lorekeeper/admin_sidebar.php
@@ -19,193 +19,193 @@
'links' => [
[
'name' => 'User Ranks',
- 'url' => 'admin/users/ranks'
- ]
- ]
+ 'url' => 'admin/users/ranks',
+ ],
+ ],
],
'Reports' => [
'power' => 'manage_reports',
'links' => [
[
'name' => 'Report Queue',
- 'url' => 'admin/reports/pending'
- ]
- ]
+ 'url' => 'admin/reports/pending',
+ ],
+ ],
],
'Site' => [
'power' => 'edit_pages',
'links' => [
[
'name' => 'News',
- 'url' => 'admin/news'
+ 'url' => 'admin/news',
],
[
'name' => 'Sales',
- 'url' => 'admin/sales'
+ 'url' => 'admin/sales',
],
[
'name' => 'Pages',
- 'url' => 'admin/pages'
- ]
- ]
+ 'url' => 'admin/pages',
+ ],
+ ],
],
'Users' => [
'power' => 'edit_user_info',
'links' => [
[
'name' => 'User Index',
- 'url' => 'admin/users'
+ 'url' => 'admin/users',
],
[
'name' => 'Invitation Keys',
- 'url' => 'admin/invitations'
+ 'url' => 'admin/invitations',
],
- ]
+ ],
],
'Queues' => [
'power' => 'manage_submissions',
'links' => [
[
'name' => 'Gallery Submissions',
- 'url' => 'admin/gallery/submissions'
+ 'url' => 'admin/gallery/submissions',
],
[
'name' => 'Gallery Currency Awards',
- 'url' => 'admin/gallery/currency'
+ 'url' => 'admin/gallery/currency',
],
[
'name' => 'Prompt Submissions',
- 'url' => 'admin/submissions'
+ 'url' => 'admin/submissions',
],
[
'name' => 'Claim Submissions',
- 'url' => 'admin/claims'
+ 'url' => 'admin/claims',
],
- ]
+ ],
],
'Grants' => [
'power' => 'edit_inventories',
'links' => [
[
'name' => 'Currency Grants',
- 'url' => 'admin/grants/user-currency'
+ 'url' => 'admin/grants/user-currency',
],
[
'name' => 'Item Grants',
- 'url' => 'admin/grants/items'
+ 'url' => 'admin/grants/items',
],
- ]
+ ],
],
'Masterlist' => [
'power' => 'manage_characters',
'links' => [
[
'name' => 'Create Character',
- 'url' => 'admin/masterlist/create-character'
+ 'url' => 'admin/masterlist/create-character',
],
[
'name' => 'Create MYO Slot',
- 'url' => 'admin/masterlist/create-myo'
+ 'url' => 'admin/masterlist/create-myo',
],
[
'name' => 'Character Transfers',
- 'url' => 'admin/masterlist/transfers/incoming'
+ 'url' => 'admin/masterlist/transfers/incoming',
],
[
'name' => 'Character Trades',
- 'url' => 'admin/masterlist/trades/incoming'
+ 'url' => 'admin/masterlist/trades/incoming',
],
[
'name' => 'Design Updates',
- 'url' => 'admin/design-approvals/pending'
+ 'url' => 'admin/design-approvals/pending',
],
[
'name' => 'MYO Approvals',
- 'url' => 'admin/myo-approvals/pending'
+ 'url' => 'admin/myo-approvals/pending',
],
- ]
+ ],
],
'Data' => [
'power' => 'edit_data',
'links' => [
[
'name' => 'Galleries',
- 'url' => 'admin/data/galleries'
+ 'url' => 'admin/data/galleries',
],
[
'name' => 'Character Categories',
- 'url' => 'admin/data/character-categories'
+ 'url' => 'admin/data/character-categories',
],
[
'name' => 'Sub Masterlists',
- 'url' => 'admin/data/sublists'
+ 'url' => 'admin/data/sublists',
],
[
'name' => 'Rarities',
- 'url' => 'admin/data/rarities'
+ 'url' => 'admin/data/rarities',
],
[
'name' => 'Species',
- 'url' => 'admin/data/species'
+ 'url' => 'admin/data/species',
],
[
'name' => 'Subtypes',
- 'url' => 'admin/data/subtypes'
+ 'url' => 'admin/data/subtypes',
],
[
'name' => 'Traits',
- 'url' => 'admin/data/traits'
+ 'url' => 'admin/data/traits',
],
[
'name' => 'Shops',
- 'url' => 'admin/data/shops'
+ 'url' => 'admin/data/shops',
],
[
'name' => 'Currencies',
- 'url' => 'admin/data/currencies'
+ 'url' => 'admin/data/currencies',
],
[
'name' => 'Prompts',
- 'url' => 'admin/data/prompts'
+ 'url' => 'admin/data/prompts',
],
[
'name' => 'Loot Tables',
- 'url' => 'admin/data/loot-tables'
+ 'url' => 'admin/data/loot-tables',
],
[
'name' => 'Items',
- 'url' => 'admin/data/items'
+ 'url' => 'admin/data/items',
],
[
'name' => 'Criteria Rewards',
- 'url' => 'admin/data/criteria'
- ]
- ]
+ 'url' => 'admin/data/criteria',
+ ],
+ ],
],
'Raffles' => [
'power' => 'manage_raffles',
'links' => [
[
'name' => 'Raffles',
- 'url' => 'admin/raffles'
+ 'url' => 'admin/raffles',
],
- ]
+ ],
],
'Settings' => [
'power' => 'edit_site_settings',
'links' => [
[
'name' => 'Site Settings',
- 'url' => 'admin/settings'
+ 'url' => 'admin/settings',
],
[
'name' => 'Site Images',
- 'url' => 'admin/images'
+ 'url' => 'admin/images',
],
[
'name' => 'File Manager',
- 'url' => 'admin/files'
+ 'url' => 'admin/files',
],
- ]
+ ],
],
];
diff --git a/config/lorekeeper/comments.php b/config/lorekeeper/comments.php
index aab62e8f4a..63fe6559e4 100644
--- a/config/lorekeeper/comments.php
+++ b/config/lorekeeper/comments.php
@@ -2,14 +2,14 @@
return [
- /**
+ /*
* To extend the base Comment model one just needs to create a new
* CustomComment model extending the Comment model shipped with the
* package and change this configuration option to their extended model.
*/
'model' => App\Models\Comment::class,
- /**
+ /*
* You can customize the behaviour of these permissions by
* creating your own and pointing to it here.
*/
@@ -20,18 +20,18 @@
'reply-to-comment' => 'App\Policies\CommentPolicy@reply',
],
- /**
+ /*
* The Comment Controller.
* Change this to your own implementation of the CommentController.
* You can use the \Laravelista\Comments\CommentControllerInterface.
*/
'controller' => 'App\Http\Controllers\Comments\CommentController',
-
- /**
+
+ /*
* Set this option to `true` to enable soft deleting of comments.
*
* Comments will be soft deleted using laravels "softDeletes" trait.
*/
- 'soft_deletes' => true
+ 'soft_deletes' => true,
];
diff --git a/config/lorekeeper/extension_tracker.php b/config/lorekeeper/extension_tracker.php
index 13e053ec9c..c831fb8e01 100644
--- a/config/lorekeeper/extension_tracker.php
+++ b/config/lorekeeper/extension_tracker.php
@@ -1,6 +1,7 @@
[
@@ -11,6 +12,5 @@
// ]),
// 'version' => '1.0.0',
// ],
-
-];
\ No newline at end of file
+];
diff --git a/config/lorekeeper/extensions.php b/config/lorekeeper/extensions.php
index a17a3540e6..751fc0b01e 100644
--- a/config/lorekeeper/extensions.php
+++ b/config/lorekeeper/extensions.php
@@ -36,12 +36,12 @@
// Item Entry Expansion - Mercury
'item_entry_expansion' => [
- 'extra_fields' => 0,
+ 'extra_fields' => 0,
'resale_function' => 0,
- 'loot_tables' => [
+ 'loot_tables' => [
// Adds the ability to use either rarity criteria for items or item categories with rarity criteria in loot tables. Note that disabling this does not apply retroactively.
- 'enable' => 0,
- 'alternate_filtering' => 0 // By default this uses more broadly compatible methods to filter by rarity. If you are on Dreamhost/know your DB software can handle searching in JSON, it's recommended to set this to 1 instead.
+ 'enable' => 0,
+ 'alternate_filtering' => 0, // By default this uses more broadly compatible methods to filter by rarity. If you are on Dreamhost/know your DB software can handle searching in JSON, it's recommended to set this to 1 instead.
],
],
@@ -50,7 +50,7 @@
// Character Reward Expansion - Uri
'character_reward_expansion' => [
- 'expanded' => 1,
+ 'expanded' => 1,
'default_recipient' => 0, // 0 to default to the character's owner (if a user), 1 to default to the submission user.
],
diff --git a/config/lorekeeper/image_files.php b/config/lorekeeper/image_files.php
index 181692471f..49762a8dc0 100644
--- a/config/lorekeeper/image_files.php
+++ b/config/lorekeeper/image_files.php
@@ -13,53 +13,53 @@
*/
'header' => [
- 'name' => 'Header Image',
+ 'name' => 'Header Image',
'description' => 'The header banner displayed at the top of the page. PNG format, default height of 200px. Tiles in both directions.',
- 'filename' => 'header.png'
+ 'filename' => 'header.png',
],
'characters' => [
- 'name' => 'Characters Icon',
+ 'name' => 'Characters Icon',
'description' => 'The characters graphic on the front page. PNG format, default size of 200px x 200px (no restriction).',
- 'filename' => 'characters.png'
+ 'filename' => 'characters.png',
],
'account' => [
- 'name' => 'Account Icon',
+ 'name' => 'Account Icon',
'description' => 'The account graphic on the front page. PNG format, default size of 200px x 200px (no restriction).',
- 'filename' => 'account.png'
+ 'filename' => 'account.png',
],
'inventory' => [
- 'name' => 'Inventory Icon',
+ 'name' => 'Inventory Icon',
'description' => 'The inventory graphic on the front page. PNG format, default size of 200px x 200px (no restriction).',
- 'filename' => 'inventory.png'
+ 'filename' => 'inventory.png',
],
'currency' => [
- 'name' => 'Currency Icon',
+ 'name' => 'Currency Icon',
'description' => 'The bank graphic on the front page. PNG format, default size of 200px x 200px (no restriction).',
- 'filename' => 'currency.png'
+ 'filename' => 'currency.png',
],
'myo' => [
- 'name' => 'MYO Default Image',
+ 'name' => 'MYO Default Image',
'description' => 'The default image used for MYO slots when no image is uploaded. PNG format, no size restriction.',
- 'filename' => 'myo.png'
+ 'filename' => 'myo.png',
],
'myo-th' => [
- 'name' => 'MYO Default Image (Thumbnail)',
+ 'name' => 'MYO Default Image (Thumbnail)',
'description' => 'The default masterlist thumbnail used for MYO slots when no image is uploaded. PNG format, size of masterlist thumbnails.',
- 'filename' => 'myo-th.png'
+ 'filename' => 'myo-th.png',
],
'meta-image' => [
- 'name' => 'Meta Tag Image',
+ 'name' => 'Meta Tag Image',
'description' => 'The image displayed in meta tag previews on social media, discord, and the like. PNG format, no size restriction.',
- 'filename' => 'meta-image.png'
+ 'filename' => 'meta-image.png',
],
'watermark' => [
- 'name' => 'Watermark Image',
+ 'name' => 'Watermark Image',
'description' => 'Watermark for applying to masterlist images.',
- 'filename' => 'watermark.png'
+ 'filename' => 'watermark.png',
],
'content_warning' => [
- 'name' => 'Content Warning Thumbnail',
+ 'name' => 'Content Warning Thumbnail',
'description' => 'Thumbnail used for gallery submissions with a set content warning. PNG format, size of masterlist thumbnails.',
- 'filename' => 'content_warning.png'
+ 'filename' => 'content_warning.png',
],
];
diff --git a/config/lorekeeper/item_tags.php b/config/lorekeeper/item_tags.php
index e74a6d3e8a..9b266f8c09 100644
--- a/config/lorekeeper/item_tags.php
+++ b/config/lorekeeper/item_tags.php
@@ -14,14 +14,14 @@
*/
'box' => [
- 'name' => 'Box',
- 'text_color' => '#ffffff',
- 'background_color' => '#f6993f'
+ 'name' => 'Box',
+ 'text_color' => '#ffffff',
+ 'background_color' => '#f6993f',
],
-
+
'slot' => [
- 'name' => 'Slot',
- 'text_color' => '#ffffff',
- 'background_color' => '#1fd1a7'
+ 'name' => 'Slot',
+ 'text_color' => '#ffffff',
+ 'background_color' => '#1fd1a7',
],
];
diff --git a/config/lorekeeper/notifications.php b/config/lorekeeper/notifications.php
index 4ce9d77e33..e1b13988db 100644
--- a/config/lorekeeper/notifications.php
+++ b/config/lorekeeper/notifications.php
@@ -13,398 +13,398 @@
// CURRENCY_GRANT
0 => [
- 'name' => 'Currency Grant',
+ 'name' => 'Currency Grant',
'message' => 'You have received a staff grant of {currency_quantity} {currency_name} from {sender_name} . (View Bank )',
- 'url' => 'bank'
+ 'url' => 'bank',
],
// ITEM_GRANT
1 => [
- 'name' => 'Item Grant',
+ 'name' => 'Item Grant',
'message' => 'You have received a staff grant of {item_name} (×{item_quantity}) from {sender_name} . (View Inventory )',
- 'url' => 'inventory'
+ 'url' => 'inventory',
],
-
+
// CURRENCY_REMOVAL
2 => [
- 'name' => 'Currency Removal',
+ 'name' => 'Currency Removal',
'message' => '{currency_quantity} {currency_name} was removed from your bank by {sender_name} . (View Bank )',
- 'url' => 'bank'
+ 'url' => 'bank',
],
// ITEM_REMOVAL
3 => [
- 'name' => 'Item Removal',
+ 'name' => 'Item Removal',
'message' => '{item_name} (×{item_quantity}) was removed from your inventory by {sender_name} . (View Inventory )',
- 'url' => 'inventory'
+ 'url' => 'inventory',
],
// CURRENCY_TRANSFER
4 => [
- 'name' => 'Currency Transfer',
+ 'name' => 'Currency Transfer',
'message' => 'You have received {currency_quantity} {currency_name} from {sender_name} . (View Bank )',
- 'url' => 'bank'
+ 'url' => 'bank',
],
// ITEM_TRANSFER
5 => [
- 'name' => 'Item Transfer',
+ 'name' => 'Item Transfer',
'message' => 'You have received {item_name} (×{item_quantity}) from {sender_name} . (View Inventory )',
- 'url' => 'inventory'
+ 'url' => 'inventory',
],
// FORCED_ITEM_TRANSFER
6 => [
- 'name' => 'Forced Item Transfer',
+ 'name' => 'Forced Item Transfer',
'message' => '{item_name} (×{item_quantity}) was transferred out of your inventory by {sender_name} . (View Inventory )',
- 'url' => 'inventory'
+ 'url' => 'inventory',
],
// CHARACTER_UPLOAD
7 => [
- 'name' => 'Character Upload',
+ 'name' => 'Character Upload',
'message' => 'A new character ({character_slug} ) has been uploaded for you. (View Characters )',
- 'url' => 'characters'
+ 'url' => 'characters',
],
// CHARACTER_CURRENCY_GRANT
8 => [
- 'name' => 'Character Currency Grant',
+ 'name' => 'Character Currency Grant',
'message' => '{character_name} has received a staff grant of {currency_quantity} {currency_name} from {sender_name} . (View Bank )',
- 'url' => 'character/{character_slug}/bank'
+ 'url' => 'character/{character_slug}/bank',
],
-
+
// CHARACTER_CURRENCY_REMOVAL
9 => [
- 'name' => 'Character Currency Removal',
+ 'name' => 'Character Currency Removal',
'message' => '{currency_quantity} {currency_name} was removed from {character_name} by {sender_name} . (View Bank )',
- 'url' => 'character/{character_slug}/bank'
+ 'url' => 'character/{character_slug}/bank',
],
-
+
// CHARACTER_PROFILE_EDIT
10 => [
- 'name' => 'Character Profile Edited',
+ 'name' => 'Character Profile Edited',
'message' => '{character_name}\'s profile was edited by {sender_name} . (View Character )',
- 'url' => 'character/{character_slug}/profile'
+ 'url' => 'character/{character_slug}/profile',
],
-
+
// IMAGE_UPLOAD
11 => [
- 'name' => 'Image Upload',
+ 'name' => 'Image Upload',
'message' => 'A new image for {character_name} was uploaded by {sender_name} . (View Character )',
- 'url' => 'character/{character_slug}/images'
+ 'url' => 'character/{character_slug}/images',
],
// CHARACTER_TRANSFER_RECEIVED
12 => [
- 'name' => 'Character Transfer Received',
+ 'name' => 'Character Transfer Received',
'message' => 'You have received a transfer for {character_name} from {sender_name} . (View Transfers )',
- 'url' => 'characters/transfers/incoming'
+ 'url' => 'characters/transfers/incoming',
],
// CHARACTER_TRANSFER_REJECTED
13 => [
- 'name' => 'Character Transfer Rejected',
+ 'name' => 'Character Transfer Rejected',
'message' => 'Your transfer request for {character_name} was rejected by {sender_name} . (View Transfers )',
- 'url' => 'characters/transfers/completed'
+ 'url' => 'characters/transfers/completed',
],
// CHARACTER_TRANSFER_CANCELED
14 => [
- 'name' => 'Character Transfer Cancelled',
+ 'name' => 'Character Transfer Cancelled',
'message' => 'The transfer for {character_name} was canceled by {sender_name} . (View Transfers )',
- 'url' => 'characters/transfers/completed'
+ 'url' => 'characters/transfers/completed',
],
// CHARACTER_TRANSFER_DENIED
15 => [
- 'name' => 'Character Transfer Denied',
+ 'name' => 'Character Transfer Denied',
'message' => 'Your transfer request for {character_name} was denied by {sender_name} . (View Transfers )',
- 'url' => 'characters/transfers/completed'
+ 'url' => 'characters/transfers/completed',
],
// CHARACTER_TRANSFER_ACCEPTED
16 => [
- 'name' => 'Character Transfer Accepted',
+ 'name' => 'Character Transfer Accepted',
'message' => 'Your transfer request for {character_name} was accepted by {sender_name} . (View Transfers )',
- 'url' => 'characters/transfers/completed'
+ 'url' => 'characters/transfers/completed',
],
// CHARACTER_TRANSFER_APPROVED
17 => [
- 'name' => 'Character Transfer Approved',
+ 'name' => 'Character Transfer Approved',
'message' => 'The transfer for {character_name} was approved by {sender_name} . (View Transfers )',
- 'url' => 'characters/transfers/completed'
+ 'url' => 'characters/transfers/completed',
],
// CHARACTER_SENT
18 => [
- 'name' => 'Character Sent',
+ 'name' => 'Character Sent',
'message' => '{character_name} was transferred to {recipient_name} by {sender_name} . (View Character )',
- 'url' => 'character/{character_slug}'
+ 'url' => 'character/{character_slug}',
],
// CHARACTER_RECEIVED
19 => [
- 'name' => 'Character Received',
+ 'name' => 'Character Received',
'message' => '{character_name} was transferred to you by {sender_name} . (View Character )',
- 'url' => 'character/{character_slug}'
+ 'url' => 'character/{character_slug}',
],
// SUBMISSION_APPROVED
20 => [
- 'name' => 'Submission Approved',
+ 'name' => 'Submission Approved',
'message' => 'Your submission (#{submission_id}) was approved by {staff_name} . (View Submission )',
- 'url' => 'submissions/view/{submission_id}'
+ 'url' => 'submissions/view/{submission_id}',
],
// SUBMISSION_REJECTED
21 => [
- 'name' => 'Submission Rejected',
+ 'name' => 'Submission Rejected',
'message' => 'Your submission (#{submission_id}) was rejected by {staff_name} . (View Submission )',
- 'url' => 'submissions/view/{submission_id}'
+ 'url' => 'submissions/view/{submission_id}',
],
// CLAIM_APPROVED
22 => [
- 'name' => 'Claim Approved',
+ 'name' => 'Claim Approved',
'message' => 'Your claim (#{submission_id}) was approved by {staff_name} . (View Claim )',
- 'url' => 'claims/view/{submission_id}'
+ 'url' => 'claims/view/{submission_id}',
],
// CLAIM_REJECTED
23 => [
- 'name' => 'Claim Rejected',
+ 'name' => 'Claim Rejected',
'message' => 'Your claim (#{submission_id}) was rejected by {staff_name} . (View Claim )',
- 'url' => 'claims/view/{submission_id}'
+ 'url' => 'claims/view/{submission_id}',
],
// MYO_GRANT
24 => [
- 'name' => 'MYO Grant',
+ 'name' => 'MYO Grant',
'message' => 'A new MYO slot ({name} ) has been created for you. (View MYO Slots )',
- 'url' => 'myos'
+ 'url' => 'myos',
],
// DESIGN_APPROVED
25 => [
- 'name' => 'Design Update Approved',
+ 'name' => 'Design Update Approved',
'message' => 'The design update for {name} has been approved. (View Design Approvals )',
- 'url' => 'designs/approved'
+ 'url' => 'designs/approved',
],
// DESIGN_REJECTED
26 => [
- 'name' => 'Design Update Requested',
+ 'name' => 'Design Update Requested',
'message' => 'The design update for {name} has been rejected. (View Design Approvals )',
- 'url' => 'designs/rejected'
+ 'url' => 'designs/rejected',
],
// DESIGN_CANCELED
27 => [
- 'name' => 'Design Update Cancelled',
+ 'name' => 'Design Update Cancelled',
'message' => 'The design update for {name} has been canceled. (View Design Approvals )',
- 'url' => 'designs'
+ 'url' => 'designs',
],
// TRADE_RECEIVED
28 => [
- 'name' => 'Trade Received',
+ 'name' => 'Trade Received',
'message' => 'You have received a new trade from {sender_name} . (View Trade )',
- 'url' => 'trades/{trade_id}'
+ 'url' => 'trades/{trade_id}',
],
// TRADE_UPDATE
29 => [
- 'name' => 'Trade Updated',
+ 'name' => 'Trade Updated',
'message' => '{sender_name} has updated their half of a trade. (View Trade )',
- 'url' => 'trades/{trade_id}'
+ 'url' => 'trades/{trade_id}',
],
// TRADE_CANCELED
30 => [
- 'name' => 'Trade Cancelled',
+ 'name' => 'Trade Cancelled',
'message' => '{sender_name} has canceled a trade. (View Trade )',
- 'url' => 'trades/{trade_id}'
+ 'url' => 'trades/{trade_id}',
],
// TRADE_COMPLETED
31 => [
- 'name' => 'Trade Completed',
+ 'name' => 'Trade Completed',
'message' => 'A trade has been completed. (View Trade )',
- 'url' => 'trades/{trade_id}'
+ 'url' => 'trades/{trade_id}',
],
// TRADE_REJECTED
32 => [
- 'name' => 'Trade Rejected',
+ 'name' => 'Trade Rejected',
'message' => 'A trade has been rejected from the character transfer queue. (View Trade )',
- 'url' => 'trades/{trade_id}'
+ 'url' => 'trades/{trade_id}',
],
// TRADE_CONFIRMED
33 => [
- 'name' => 'Trade Confirmed',
+ 'name' => 'Trade Confirmed',
'message' => 'A trade has been confirmed and placed in the character transfer queue to be reviewed. (View Trade )',
- 'url' => 'trades/{trade_id}'
+ 'url' => 'trades/{trade_id}',
],
// BOOKMARK_TRADING
34 => [
- 'name' => 'Bookmark Trading Status',
+ 'name' => 'Bookmark Trading Status',
'message' => 'A character you have bookmarked ({character_name} ) has had its Open For Trading status changed. (View Bookmarks )',
- 'url' => 'account/bookmarks'
+ 'url' => 'account/bookmarks',
],
// BOOKMARK_GIFTS
35 => [
- 'name' => 'Bookmark Gift Art Status',
+ 'name' => 'Bookmark Gift Art Status',
'message' => 'A character you have bookmarked ({character_name} ) has had its Gift Art Allowed status changed. (View Bookmarks )',
- 'url' => 'account/bookmarks'
+ 'url' => 'account/bookmarks',
],
// BOOKMARK_OWNER
36 => [
- 'name' => 'Bookmark Owner',
+ 'name' => 'Bookmark Owner',
'message' => 'A character you have bookmarked ({character_name} ) has been transferred to a different owner. (View Bookmarks )',
- 'url' => 'account/bookmarks'
+ 'url' => 'account/bookmarks',
],
// BOOKMARK_IMAGE
37 => [
- 'name' => 'Bookmark Image',
+ 'name' => 'Bookmark Image',
'message' => 'A new image has been uploaded for a character you have bookmarked ({character_name} ). (View Bookmarks )',
- 'url' => 'account/bookmarks'
+ 'url' => 'account/bookmarks',
],
// Technically this was acceptable before this point
// CHARACTER_TRANSFER_ACCEPTABLE
38 => [
- 'name' => 'Character Transfer Acceptable',
+ 'name' => 'Character Transfer Acceptable',
'message' => 'The transfer for {character_name} was approved by {sender_name} . (View Transfers )',
- 'url' => 'characters/transfers/incoming'
+ 'url' => 'characters/transfers/incoming',
],
// BOOKMARK_GIFT_WRITING
39 => [
'message' => 'A character you have bookmarked ({character_name} ) has had its Gift Writing Allowed status changed. (View Bookmarks )',
- 'url' => 'account/bookmarks'
+ 'url' => 'account/bookmarks',
],
// REPORT_ASSIGNED
220 => [
- 'name' => 'Report Assigned',
+ 'name' => 'Report Assigned',
'message' => 'Your report (#{report_id}) was assigned to {staff_name} , you can expect a response soon. (View Report )',
- 'url' => 'reports/view/{report_id}'
+ 'url' => 'reports/view/{report_id}',
],
// REPORT_CLOSED
221 => [
- 'name' => 'Report Closed',
+ 'name' => 'Report Closed',
'message' => 'Your report (#{report_id}) was closed by {staff_name} . (View Report )',
- 'url' => 'reports/view/{report_id}'
+ 'url' => 'reports/view/{report_id}',
],
// Comment made on user's model
// COMMENT_MADE
239 => [
- 'name' => 'Comment Made',
+ 'name' => 'Comment Made',
'message' => '{sender} has made a comment on {post_type}. See Context. ',
- 'url' => ''
+ 'url' => '',
],
// Comment recieved reply
// COMMENT_REPLY
240 => [
- 'name' => 'Comment Reply',
+ 'name' => 'Comment Reply',
'message' => '{sender} has made a reply to your comment. See Reply. ',
- 'url' => ''
+ 'url' => '',
],
// CHARACTER_ITEM_GRANT
501 => [
- 'name' => 'Character Item Grant',
+ 'name' => 'Character Item Grant',
'message' => '{character_name} has received a staff grant of {item_name} (×{item_quantity}) from {sender_name} . (View Inventory )',
- 'url' => 'character/{character_slug}/inventory'
+ 'url' => 'character/{character_slug}/inventory',
],
// CHARACTER_ITEM_REMOVAL
502 => [
- 'name' => 'Character Item Removal',
+ 'name' => 'Character Item Removal',
'message' => '{item_name} (×{item_quantity}) was removed from {character_name} by {sender_name} . (View Inventory )',
- 'url' => 'character/{character_slug}/inventory'
+ 'url' => 'character/{character_slug}/inventory',
],
// GALLERY_SUBMISSION_COLLABORATOR
505 => [
- 'name' => 'Gallery Submission Collaborator',
+ 'name' => 'Gallery Submission Collaborator',
'message' => '{sender} has added you as a collaborator on a gallery submission, which needs your approval. (View Submission )',
- 'url' => 'gallery/view/{submission_id}'
+ 'url' => 'gallery/view/{submission_id}',
],
// GALLERY_COLLABORATORS_APPROVED
506 => [
- 'name' => 'Gallery Submission Collaborators Approved',
+ 'name' => 'Gallery Submission Collaborators Approved',
'message' => 'All of the collaborators on your submission {submission_title} (#{submission_id}) have approved it, and it is now pending staff review. (View Submission )',
- 'url' => 'gallery/view/{submission_id}'
+ 'url' => 'gallery/view/{submission_id}',
],
// GALLERY_SUBMISSION_ACCEPTED
507 => [
- 'name' => 'Gallery Submission Accepted',
+ 'name' => 'Gallery Submission Accepted',
'message' => 'Your submission {submission_title} (#{submission_id}) was accepted. (View Submission )',
- 'url' => 'gallery/queue/{submission_id}'
+ 'url' => 'gallery/queue/{submission_id}',
],
// GALLERY_SUBMISSION_REJECTED
508 => [
- 'name' => 'Gallery Submission Rejected',
+ 'name' => 'Gallery Submission Rejected',
'message' => 'Your submission {submission_title} (#{submission_id}) was rejected. (View Submission )',
- 'url' => 'submissions/queue/{submission_id}'
+ 'url' => 'submissions/queue/{submission_id}',
],
// GALLERY_SUBMISSION_VALUED
509 => [
- 'name' => 'Gallery Submission Valued',
+ 'name' => 'Gallery Submission Valued',
'message' => 'You have been awarded {currency_quantity} {currency_name} for the gallery submission {submission_title} (#{submission_id}). (View Submission )',
- 'url' => 'gallery/queue/{submission_id}'
+ 'url' => 'gallery/queue/{submission_id}',
],
// GALLERY_SUBMISSION_MOVED
510 => [
- 'name' => 'Gallery Submission Moved',
+ 'name' => 'Gallery Submission Moved',
'message' => 'Your gallery submission {submission_title} (#{submission_id}) has been moved by {staff_name} . (View Submission )',
- 'url' => 'gallery/view/{submission_id}'
+ 'url' => 'gallery/view/{submission_id}',
],
// GALLERY_SUBMISSION_CHARACTER
511 => [
- 'name' => 'Gallery Submission Character',
+ 'name' => 'Gallery Submission Character',
'message' => '{sender} has added your character {character} to a gallery submission. (View Submission )',
- 'url' => 'gallery/view/{submission_id}'
+ 'url' => 'gallery/view/{submission_id}',
],
// GALLERY_SUBMISSION_FAVORITE
512 => [
- 'name' => 'Gallery Submission Favorite',
+ 'name' => 'Gallery Submission Favorite',
'message' => '{sender} has added your gallery submission {submission_title} (#{submission_id}) to their favorites. (View Submission )',
- 'url' => 'gallery/view/{submission_id}'
+ 'url' => 'gallery/view/{submission_id}',
],
// GALLERY_SUBMISSION_STAFF_COMMENTS
513 => [
- 'name' => 'Gallery Submission Staff Comments',
+ 'name' => 'Gallery Submission Staff Comments',
'message' => '{sender} updated the staff comments on your gallery submission {submission_title} (#{submission_id}). (View Submission )',
- 'url' => 'gallery/queue/{submission_id}'
+ 'url' => 'gallery/queue/{submission_id}',
],
// GALLERY_SUBMISSION_EDITED
514 => [
- 'name' => 'Gallery Submission Edited',
+ 'name' => 'Gallery Submission Edited',
'message' => 'Your gallery submission {submission_title} (#{submission_id}) has been edited by {staff_name} . (View Submission )',
- 'url' => 'gallery/view/{submission_id}'
+ 'url' => 'gallery/view/{submission_id}',
],
// GALLERY_SUBMISSION_PARTICIPANT
515 => [
- 'name' => 'Gallery Submission Participant',
+ 'name' => 'Gallery Submission Participant',
'message' => '{sender} has added you as a participant on a gallery submission. (View Submission )',
- 'url' => 'gallery/view/{submission_id}'
+ 'url' => 'gallery/view/{submission_id}',
],
];
diff --git a/config/lorekeeper/powers.php b/config/lorekeeper/powers.php
index 347d6d5ec5..d41acf1e43 100644
--- a/config/lorekeeper/powers.php
+++ b/config/lorekeeper/powers.php
@@ -12,45 +12,44 @@
*/
'edit_site_settings' => [
- 'name' => 'Edit Site Settings',
- 'description' => 'Allow rank to modify site settings and upload new images to replace the site layout images.'
+ 'name' => 'Edit Site Settings',
+ 'description' => 'Allow rank to modify site settings and upload new images to replace the site layout images.',
],
'edit_data' => [
- 'name' => 'Edit World Data',
- 'description' => 'Allow rank to modify the world data. This includes creating/editing/uploading images for species, items, traits, etc.'
+ 'name' => 'Edit World Data',
+ 'description' => 'Allow rank to modify the world data. This includes creating/editing/uploading images for species, items, traits, etc.',
],
'edit_pages' => [
- 'name' => 'Edit Text Pages',
- 'description' => 'Allow rank to create/modify text pages. This includes pages created using the page creator tool and news posts.'
+ 'name' => 'Edit Text Pages',
+ 'description' => 'Allow rank to create/modify text pages. This includes pages created using the page creator tool and news posts.',
],
'edit_user_info' => [
- 'name' => 'Manage Users',
- 'description' => 'Allow rank to view/modify user account info and create invitation keys. This will grant access to the user admin panel.'
+ 'name' => 'Manage Users',
+ 'description' => 'Allow rank to view/modify user account info and create invitation keys. This will grant access to the user admin panel.',
],
'edit_ranks' => [
- 'name' => 'Edit Ranks',
- 'description' => 'Allow rank to change the rank of a user. This power requires the Edit User Info power to be attached as well.'
+ 'name' => 'Edit Ranks',
+ 'description' => 'Allow rank to change the rank of a user. This power requires the Edit User Info power to be attached as well.',
],
'edit_inventories' => [
- 'name' => 'Edit Inventories',
- 'description' => 'Allow rank to grant and remove items from user inventories, as well as grant/remove currency from users and characters.'
+ 'name' => 'Edit Inventories',
+ 'description' => 'Allow rank to grant and remove items from user inventories, as well as grant/remove currency from users and characters.',
],
'manage_characters' => [
- 'name' => 'Manage Masterlist',
- 'description' => 'Allow rank to create/edit new characters. This includes uploading new images, modifying traits on an existing character and forcing ownership transfers.'
+ 'name' => 'Manage Masterlist',
+ 'description' => 'Allow rank to create/edit new characters. This includes uploading new images, modifying traits on an existing character and forcing ownership transfers.',
],
'manage_raffles' => [
- 'name' => 'Manage Raffles',
- 'description' => 'Allow rank to create/edit raffles, add/remove tickets for users and roll raffles.'
+ 'name' => 'Manage Raffles',
+ 'description' => 'Allow rank to create/edit raffles, add/remove tickets for users and roll raffles.',
],
'manage_submissions' => [
- 'name' => 'Manage Submissions',
- 'description' => 'Allow rank to view the submissions queue, edit rewards attached to a submission and approve/reject them.'
+ 'name' => 'Manage Submissions',
+ 'description' => 'Allow rank to view the submissions queue, edit rewards attached to a submission and approve/reject them.',
],
'manage_reports' => [
- 'name' => 'Manage Reports',
- 'description' => 'Allow rank to view the reports queue.'
- ]
-
+ 'name' => 'Manage Reports',
+ 'description' => 'Allow rank to view the reports queue.',
+ ],
];
diff --git a/config/lorekeeper/settings.php b/config/lorekeeper/settings.php
index aca647222d..3d67c09cd9 100644
--- a/config/lorekeeper/settings.php
+++ b/config/lorekeeper/settings.php
@@ -106,13 +106,13 @@
| Default: 0/Disabled, 1 to enable.
|
*/
- 'character_codes' => '{category}-{number}',
+ 'character_codes' => '{category}-{number}',
'character_number_digits' => 3,
- 'character_pull_number' => 'all',
+ 'character_pull_number' => 'all',
- 'reset_character_status_on_transfer' => 0,
+ 'reset_character_status_on_transfer' => 0,
'reset_character_profile_on_transfer' => 0,
- 'clear_myo_slot_name_on_approval' => 0,
+ 'clear_myo_slot_name_on_approval' => 0,
/*
|--------------------------------------------------------------------------
@@ -137,8 +137,8 @@
|
*/
'watermark_masterlist_images' => 0,
- 'masterlist_image_dimension' => 0,
- 'masterlist_image_format' => null,
+ 'masterlist_image_dimension' => 0,
+ 'masterlist_image_format' => null,
'masterlist_image_background' => '#ffffff',
/*
@@ -154,7 +154,7 @@
|
*/
'store_masterlist_fullsizes' => 0,
- 'masterlist_fullsizes_cap' => 0,
+ 'masterlist_fullsizes_cap' => 0,
/*
|--------------------------------------------------------------------------
@@ -170,8 +170,8 @@
|
*/
'masterlist_thumbnails' => [
- 'width' => 200,
- 'height' => 200
+ 'width' => 200,
+ 'height' => 200,
],
'watermark_masterlist_thumbnails' => 0,
@@ -222,6 +222,6 @@
| Symbol for the (real world) currency used for sales posts.
|
*/
- 'currency_symbol' => '$'
+ 'currency_symbol' => '$',
];
diff --git a/config/lorekeeper/text_pages.php b/config/lorekeeper/text_pages.php
index f1542e7732..bf7458ba91 100644
--- a/config/lorekeeper/text_pages.php
+++ b/config/lorekeeper/text_pages.php
@@ -14,20 +14,19 @@
'terms' => [
'title' => 'Terms of Service',
- 'text' => 'This is the terms of usage of your site. Users will see a link to these terms when registering and a Terms link is displayed at the bottom of the layout.'
+ 'text' => 'This is the terms of usage of your site. Users will see a link to these terms when registering and a Terms link is displayed at the bottom of the layout.',
],
'privacy' => [
'title' => 'Privacy Policy',
- 'text' => 'This is a page that explains how your site might use your members\' data. Users will see a link to this page when registering and a Privacy link is displayed at the bottom of the layout.'
+ 'text' => 'This is a page that explains how your site might use your members\' data. Users will see a link to this page when registering and a Privacy link is displayed at the bottom of the layout.',
],
'about' => [
'title' => 'About',
- 'text' => 'Welcome to Lorekeeper! This page is editable from the admin panel. Besides being displayed on the front page when users are logged out, it is also accessible from the About link at the bottom of the page.'
+ 'text' => 'Welcome to Lorekeeper! This page is editable from the admin panel. Besides being displayed on the front page when users are logged out, it is also accessible from the About link at the bottom of the page.',
],
'credits' => [
'title' => 'Credits',
- 'text' => 'This page will contain credits for code, art, ect that has been used on your site!'
+ 'text' => 'This page will contain credits for code, art, ect that has been used on your site!',
],
-
];
diff --git a/config/mail.php b/config/mail.php
index 6f8469f824..f2d9bf983a 100644
--- a/config/mail.php
+++ b/config/mail.php
@@ -57,7 +57,7 @@
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
- 'name' => env('MAIL_FROM_NAME', 'Example'),
+ 'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
diff --git a/config/queue.php b/config/queue.php
index ec520ec6f7..d17fef64ea 100644
--- a/config/queue.php
+++ b/config/queue.php
@@ -35,35 +35,35 @@
],
'database' => [
- 'driver' => 'database',
- 'table' => 'jobs',
- 'queue' => 'default',
+ 'driver' => 'database',
+ 'table' => 'jobs',
+ 'queue' => 'default',
'retry_after' => 90,
],
'beanstalkd' => [
- 'driver' => 'beanstalkd',
- 'host' => 'localhost',
- 'queue' => 'default',
+ 'driver' => 'beanstalkd',
+ 'host' => 'localhost',
+ 'queue' => 'default',
'retry_after' => 90,
- 'block_for' => 0,
+ 'block_for' => 0,
],
'sqs' => [
'driver' => 'sqs',
- 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
- 'queue' => env('SQS_QUEUE', 'your-queue-name'),
+ 'queue' => env('SQS_QUEUE', 'your-queue-name'),
'region' => env('AWS_REGION', 'us-east-1'),
],
'redis' => [
- 'driver' => 'redis',
- 'connection' => 'default',
- 'queue' => env('REDIS_QUEUE', 'default'),
+ 'driver' => 'redis',
+ 'connection' => 'default',
+ 'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
- 'block_for' => null,
+ 'block_for' => null,
],
],
@@ -81,7 +81,7 @@
'failed' => [
'database' => env('DB_CONNECTION', 'mysql'),
- 'table' => 'failed_jobs',
+ 'table' => 'failed_jobs',
],
];
diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php
index 6cdf48f2cd..9ab8edc773 100644
--- a/database/factories/UserFactory.php
+++ b/database/factories/UserFactory.php
@@ -1,8 +1,8 @@
define(User::class, function (Faker $faker) {
return [
- 'name' => $faker->name,
- 'email' => $faker->unique()->safeEmail,
+ 'name' => $faker->name,
+ 'email' => $faker->unique()->safeEmail,
'email_verified_at' => now(),
- 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
- 'remember_token' => Str::random(10),
+ 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
+ 'remember_token' => Str::random(10),
];
});
diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php
index 33f748263e..76317b4d40 100644
--- a/database/migrations/2014_10_12_000000_create_users_table.php
+++ b/database/migrations/2014_10_12_000000_create_users_table.php
@@ -1,20 +1,16 @@
engine = 'InnoDB';
$table->increments('id');
$table->string('name');
@@ -22,7 +18,7 @@ public function up()
$table->integer('sort')->unsigned()->default(0);
$table->string('color', 6)->nullable();
});
- Schema::create('rank_powers', function(Blueprint $table) {
+ Schema::create('rank_powers', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->integer('rank_id')->unsigned();
$table->string('power')->index(); // Power IDs are defined in a config file
@@ -41,7 +37,7 @@ public function up()
$table->integer('rank_id')->unsigned()->default(1);
$table->integer('notifications_unread')->unsigned()->default(0);
-
+
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
@@ -73,18 +69,14 @@ public function up()
$table->foreign('user_id')->references('id')->on('users');
});
-
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('notifications');
-
+
Schema::dropIfExists('user_settings');
Schema::dropIfExists('users');
diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php
index 4b6627ae75..f64c81f6a0 100644
--- a/database/migrations/2014_10_12_100000_create_password_resets_table.php
+++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->string('email')->index();
@@ -23,11 +19,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('password_resets');
}
}
diff --git a/database/migrations/2018_06_30_113500_create_comments_table.php b/database/migrations/2018_06_30_113500_create_comments_table.php
index 6e19445d72..22393dee19 100644
--- a/database/migrations/2018_06_30_113500_create_comments_table.php
+++ b/database/migrations/2018_06_30_113500_create_comments_table.php
@@ -1,31 +1,27 @@
bigIncrements('id');
$table->string('commenter_id')->nullable();
$table->string('commenter_type')->nullable();
- $table->index(["commenter_id", "commenter_type"]);
+ $table->index(['commenter_id', 'commenter_type']);
$table->string('guest_name')->nullable();
$table->string('guest_email')->nullable();
- $table->string("commentable_type");
- $table->string("commentable_id");
- $table->index(["commentable_type", "commentable_id"]);
+ $table->string('commentable_type');
+ $table->string('commentable_id');
+ $table->index(['commentable_type', 'commentable_id']);
$table->text('comment');
@@ -34,18 +30,15 @@ public function up()
$table->unsignedBigInteger('child_id')->nullable();
$table->foreign('child_id')->references('id')->on('comments')->onDelete('cascade');
- $table->softDeletes();
+ $table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('comments');
}
}
diff --git a/database/migrations/2019_02_27_075638_create_game_tables.php b/database/migrations/2019_02_27_075638_create_game_tables.php
index 6b3c590b36..f4f8293f24 100644
--- a/database/migrations/2019_02_27_075638_create_game_tables.php
+++ b/database/migrations/2019_02_27_075638_create_game_tables.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
-
+
$table->string('name');
$table->string('description', 512);
$table->integer('sort')->unsigned()->default(0);
@@ -38,7 +34,7 @@ public function up()
Schema::create('item_categories', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
-
+
$table->string('name');
$table->string('description', 512);
$table->integer('sort')->unsigned()->default(0);
@@ -49,7 +45,7 @@ public function up()
$table->increments('id');
$table->integer('item_category_id')->unsigned()->nullable()->default(null);
// For the sake of saving some headaches, item category can be left empty (which will put them in a generic "miscellaneous" category)
-
+
$table->string('name');
$table->string('description', 512);
$table->text('specifications')->nullable()->default(null);
@@ -75,7 +71,7 @@ public function up()
$table->foreign('user_id')->references('id')->on('users');
});
- Schema::create('inventory_log', function(Blueprint $table) {
+ Schema::create('inventory_log', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('item_id')->unsigned();
@@ -99,12 +95,12 @@ public function up()
// Create species tables //////////////////////////////////////////////////////////////////
- // These are named "species", but can also be used for making subspecies
+ // These are named "species", but can also be used for making subspecies
// (just change the wording on the views)
// I'll add a recipe to add a category above species so that multiple species
// with subspecies can be done, it just appears to be uncommon in ARPGs to
// have so many levels of options at once.
- Schema::create('specieses', function(Blueprint $table) {
+ Schema::create('specieses', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name');
@@ -114,7 +110,7 @@ public function up()
$table->integer('sort')->unsigned()->default(0);
});
// "Trait" is a reserved keyword, so traits are going to be called "features" instead
- Schema::create('feature_categories', function(Blueprint $table) {
+ Schema::create('feature_categories', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -123,7 +119,7 @@ public function up()
$table->boolean('has_image')->default(0);
$table->integer('sort')->unsigned()->default(0);
});
- Schema::create('features', function(Blueprint $table) {
+ Schema::create('features', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -133,9 +129,9 @@ public function up()
// Species ID can be left as null for a trait that can be used by
// any species in the database.
$table->integer('species_id')->unsigned()->nullable()->default(null);
-
+
$table->integer('rarity_id')->unsigned();
-
+
$table->string('name');
$table->string('description', 512);
$table->text('specifications')->nullable()->default(null);
@@ -148,19 +144,19 @@ public function up()
// Create character tables ////////////////////////////////////////////////////////////////
- Schema::create('character_categories', function(Blueprint $table) {
+ Schema::create('character_categories', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('code'); // A short code used to identify the category, e.g. MYO, GEN2, etc.
-
+
$table->string('name');
$table->string('description', 512);
$table->boolean('has_image')->default(0);
$table->integer('sort')->unsigned()->default(0);
});
- Schema::create('character_images', function(Blueprint $table) {
+ Schema::create('character_images', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -189,11 +185,10 @@ public function up()
//$table->foreign('character_id')->references('id')->on('characters');
$table->foreign('user_id')->references('id')->on('users');
-
});
// The actual character tables
- Schema::create('characters', function(Blueprint $table) {
+ Schema::create('characters', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -222,17 +217,17 @@ public function up()
$table->boolean('is_visible')->default(1);
});
- Schema::create('character_features', function(Blueprint $table) {
+ Schema::create('character_features', function (Blueprint $table) {
$table->engine = 'InnoDB';
// Images can have different features, so features are attached to images rather than characters
- $table->integer('character_image_id')->unsigned();
- $table->integer('feature_id')->unsigned();
+ $table->integer('character_image_id')->unsigned();
+ $table->integer('feature_id')->unsigned();
$table->string('data'); // Any special notes about the usage of this feature
$table->unique(['character_image_id', 'feature_id']);
});
- Schema::create('character_log', function(Blueprint $table) {
+ Schema::create('character_log', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('character_id')->unsigned();
@@ -246,7 +241,7 @@ public function up()
});
// A general queue for modifying characters
- Schema::create('character_submissions', function(Blueprint $table) {
+ Schema::create('character_submissions', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('user_id')->unsigned();
@@ -263,16 +258,15 @@ public function up()
$table->timestamps();
});
-
// Tracks characters/MYO slots that enter or leave a user's possession.
- // Main things to track:
+ // Main things to track:
// - Bought/traded for/was gifted a character/MYO slot
// - Sold/traded away/gifted away a character/MYO slot
// - Used a MYO slot (was approved)
// Depending on the game owner's preferences, FTO status may be "doesn't currently own a character"
// or "never had a character" (sometimes with additional qualifications, but usually the latter)
- Schema::create('user_character_log', function(Blueprint $table) {
+ Schema::create('user_character_log', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('character_id')->unsigned()->nullable()->default(null);
@@ -284,25 +278,21 @@ public function up()
$table->timestamps();
});
-
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('user_character_log');
-
+
Schema::dropIfExists('character_submissions');
Schema::dropIfExists('character_log');
Schema::dropIfExists('character_features');
Schema::dropIfExists('characters');
Schema::dropIfExists('character_images');
Schema::dropIfExists('character_categories');
-
+
Schema::dropIfExists('features');
Schema::dropIfExists('feature_categories');
Schema::dropIfExists('specieses');
@@ -311,7 +301,7 @@ public function down()
Schema::dropIfExists('inventory');
Schema::dropIfExists('items');
Schema::dropIfExists('item_categories');
-
+
Schema::dropIfExists('rarities');
}
}
diff --git a/database/migrations/2019_04_07_130129_add_site_settings.php b/database/migrations/2019_04_07_130129_add_site_settings.php
index ba9367d92a..3dbd005b04 100644
--- a/database/migrations/2019_04_07_130129_add_site_settings.php
+++ b/database/migrations/2019_04_07_130129_add_site_settings.php
@@ -1,27 +1,23 @@
engine = 'InnoDB';
$table->string('key', 50)->unique()->primary();
$table->string('value');
$table->string('description', 1024);
});
-
- Schema::create('site_pages', function(Blueprint $table) {
+
+ Schema::create('site_pages', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('key', 30)->unique();
@@ -35,11 +31,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('site_pages');
Schema::dropIfExists('site_settings');
diff --git a/database/migrations/2019_04_09_090831_create_user_log_table.php b/database/migrations/2019_04_09_090831_create_user_log_table.php
index 590ddd96c1..0cbcb19650 100644
--- a/database/migrations/2019_04_09_090831_create_user_log_table.php
+++ b/database/migrations/2019_04_09_090831_create_user_log_table.php
@@ -1,26 +1,22 @@
integer('user_id')->unsigned();
$table->string('type', 32);
$table->string('data', 512);
-
+
$table->foreign('user_id')->references('id')->on('users');
$table->foreign('staff_id')->references('id')->on('users');
});
@@ -42,11 +38,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('user_update_log');
}
}
diff --git a/database/migrations/2019_04_09_095513_create_currency_tables.php b/database/migrations/2019_04_09_095513_create_currency_tables.php
index 509ff74c0f..46ab8f89d0 100644
--- a/database/migrations/2019_04_09_095513_create_currency_tables.php
+++ b/database/migrations/2019_04_09_095513_create_currency_tables.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
@@ -26,11 +22,11 @@ public function up()
$table->integer('sort_user')->unsigned()->default(0); // larger shows up first
$table->integer('sort_character')->unsigned()->default(0); // larger shows up first
- // Applicable only to users.
+ // Applicable only to users.
// Chooses whether to show on the user profile,
// or if it's only visible from the bank page.
// This allows event-only currencies to be created for short-term use
- // but not clutter up user profiles.
+ // but not clutter up user profiles.
// (Non-displayed currencies are not listed if the user doesn't own any,
// but displayed ones will display as 0.)
$table->boolean('is_displayed')->default(1);
@@ -57,12 +53,12 @@ public function up()
$table->integer('currency_id')->unsigned();
$table->integer('quantity')->default(0);
-
+
$table->foreign('user_id')->references('id')->on('users');
$table->foreign('character_id')->references('id')->on('characters');
$table->foreign('currency_id')->references('id')->on('currencies');
});
-
+
Schema::create('banks_log', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -83,23 +79,20 @@ public function up()
// Any additional data, e.g. a reason for a staff grant, name of rewarded activity, etc.
$table->string('data', 512);
-
+
$table->integer('currency_id')->unsigned();
$table->integer('quantity')->default(0);
$table->timestamps();
-
+
$table->foreign('currency_id')->references('id')->on('currencies');
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('banks_log');
Schema::dropIfExists('banks');
Schema::dropIfExists('currencies');
diff --git a/database/migrations/2019_04_12_123405_fix_data_descriptions.php b/database/migrations/2019_04_12_123405_fix_data_descriptions.php
index ad502d3cd7..a386a45a61 100644
--- a/database/migrations/2019_04_12_123405_fix_data_descriptions.php
+++ b/database/migrations/2019_04_12_123405_fix_data_descriptions.php
@@ -1,228 +1,219 @@
dropColumn('description');
});
-
- Schema::table('ranks', function(Blueprint $table) {
+
+ Schema::table('ranks', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('rarities', function(Blueprint $table) {
+
+ Schema::table('rarities', function (Blueprint $table) {
$table->dropColumn('description');
});
-
- Schema::table('rarities', function(Blueprint $table) {
+
+ Schema::table('rarities', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('item_categories', function(Blueprint $table) {
+
+ Schema::table('item_categories', function (Blueprint $table) {
$table->dropColumn('description');
});
- Schema::table('item_categories', function(Blueprint $table) {
+ Schema::table('item_categories', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('items', function(Blueprint $table) {
+
+ Schema::table('items', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('specifications');
});
- Schema::table('items', function(Blueprint $table) {
+ Schema::table('items', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('specieses', function(Blueprint $table) {
+
+ Schema::table('specieses', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('specifications');
});
- Schema::table('specieses', function(Blueprint $table) {
+ Schema::table('specieses', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('feature_categories', function(Blueprint $table) {
+
+ Schema::table('feature_categories', function (Blueprint $table) {
$table->dropColumn('description');
});
- Schema::table('feature_categories', function(Blueprint $table) {
+ Schema::table('feature_categories', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('features', function(Blueprint $table) {
+
+ Schema::table('features', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('specifications');
});
- Schema::table('features', function(Blueprint $table) {
+ Schema::table('features', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('character_categories', function(Blueprint $table) {
+
+ Schema::table('character_categories', function (Blueprint $table) {
$table->dropColumn('description');
});
- Schema::table('character_categories', function(Blueprint $table) {
+ Schema::table('character_categories', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('character_images', function(Blueprint $table) {
+
+ Schema::table('character_images', function (Blueprint $table) {
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('characters', function(Blueprint $table) {
+
+ Schema::table('characters', function (Blueprint $table) {
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('character_submissions', function(Blueprint $table) {
+
+ Schema::table('character_submissions', function (Blueprint $table) {
$table->text('parsed_description')->nullable()->default(null);
});
-
- Schema::table('currencies', function(Blueprint $table) {
+
+ Schema::table('currencies', function (Blueprint $table) {
$table->dropColumn('description');
});
- Schema::table('currencies', function(Blueprint $table) {
+ Schema::table('currencies', function (Blueprint $table) {
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
});
-
-
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('currencies', function(Blueprint $table) {
+ Schema::table('currencies', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
- Schema::table('currencies', function(Blueprint $table) {
+ Schema::table('currencies', function (Blueprint $table) {
$table->string('description', 512)->nullable()->default(null);
});
- Schema::table('character_submissions', function(Blueprint $table) {
+ Schema::table('character_submissions', function (Blueprint $table) {
$table->dropColumn('parsed_description');
});
-
- Schema::table('characters', function(Blueprint $table) {
+
+ Schema::table('characters', function (Blueprint $table) {
$table->dropColumn('parsed_description');
});
-
- Schema::table('character_images', function(Blueprint $table) {
+
+ Schema::table('character_images', function (Blueprint $table) {
$table->dropColumn('parsed_description');
});
-
- Schema::table('character_categories', function(Blueprint $table) {
+
+ Schema::table('character_categories', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
- Schema::table('character_categories', function(Blueprint $table) {
+ Schema::table('character_categories', function (Blueprint $table) {
$table->string('description', 512);
});
-
- Schema::table('features', function(Blueprint $table) {
+
+ Schema::table('features', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
- Schema::table('features', function(Blueprint $table) {
+ Schema::table('features', function (Blueprint $table) {
$table->string('description', 512);
$table->text('specifications')->nullable()->default(null);
});
-
- Schema::table('feature_categories', function(Blueprint $table) {
+
+ Schema::table('feature_categories', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
-
- Schema::table('feature_categories', function(Blueprint $table) {
+
+ Schema::table('feature_categories', function (Blueprint $table) {
$table->string('description', 512);
});
-
- Schema::table('specieses', function(Blueprint $table) {
+
+ Schema::table('specieses', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
-
- Schema::table('specieses', function(Blueprint $table) {
+
+ Schema::table('specieses', function (Blueprint $table) {
$table->string('description', 512);
$table->text('specifications')->nullable()->default(null);
});
-
- Schema::table('items', function(Blueprint $table) {
+
+ Schema::table('items', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
- Schema::table('items', function(Blueprint $table) {
+ Schema::table('items', function (Blueprint $table) {
$table->string('description', 512);
$table->text('specifications')->nullable()->default(null);
});
-
- Schema::table('item_categories', function(Blueprint $table) {
+
+ Schema::table('item_categories', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
- Schema::table('item_categories', function(Blueprint $table) {
+ Schema::table('item_categories', function (Blueprint $table) {
$table->string('description', 512);
});
-
- Schema::table('rarities', function(Blueprint $table) {
+
+ Schema::table('rarities', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
- Schema::table('rarities', function(Blueprint $table) {
+ Schema::table('rarities', function (Blueprint $table) {
$table->string('description', 512);
});
- Schema::table('ranks', function(Blueprint $table) {
+ Schema::table('ranks', function (Blueprint $table) {
$table->dropColumn('description');
$table->dropColumn('parsed_description');
});
-
- Schema::table('ranks', function(Blueprint $table) {
+
+ Schema::table('ranks', function (Blueprint $table) {
$table->string('description', 512)->nullable();
});
}
diff --git a/database/migrations/2019_04_13_094613_add_owned_currencies.php b/database/migrations/2019_04_13_094613_add_owned_currencies.php
index 7e1092b79c..d08ca91681 100644
--- a/database/migrations/2019_04_13_094613_add_owned_currencies.php
+++ b/database/migrations/2019_04_13_094613_add_owned_currencies.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -42,11 +38,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
}
}
diff --git a/database/migrations/2019_04_14_120732_add_image_to_item_categories.php b/database/migrations/2019_04_14_120732_add_image_to_item_categories.php
index b21521c233..2714504d81 100644
--- a/database/migrations/2019_04_14_120732_add_image_to_item_categories.php
+++ b/database/migrations/2019_04_14_120732_add_image_to_item_categories.php
@@ -1,18 +1,14 @@
boolean('has_image')->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('item_categories', function (Blueprint $table) {
//
$table->dropColumn('has_image');
diff --git a/database/migrations/2019_04_14_121447_add_transfer_flag_to_items.php b/database/migrations/2019_04_14_121447_add_transfer_flag_to_items.php
index 1bcaf9e373..202a0352f4 100644
--- a/database/migrations/2019_04_14_121447_add_transfer_flag_to_items.php
+++ b/database/migrations/2019_04_14_121447_add_transfer_flag_to_items.php
@@ -1,18 +1,14 @@
dropColumn('allow_transfer');
diff --git a/database/migrations/2019_04_15_122508_add_prompts_table.php b/database/migrations/2019_04_15_122508_add_prompts_table.php
index 9356ff25e2..c7e8bb4038 100644
--- a/database/migrations/2019_04_15_122508_add_prompts_table.php
+++ b/database/migrations/2019_04_15_122508_add_prompts_table.php
@@ -1,18 +1,14 @@
increments('id');
$table->string('name', 64);
- // The summary will be displayed on the world page,
+ // The summary will be displayed on the world page,
// with a link to a page that contains the full text of the prompt.
$table->string('summary', 256)->nullable()->default(null);
$table->text('description')->nullable()->default(null);
@@ -36,11 +32,11 @@ public function up()
// When submitting a prompt, the selectable list will only contain prompts between
// the start/end times and active prompts.
- // This hides the prompt from the world prompt list before
+ // This hides the prompt from the world prompt list before
// the prompt start_at time has been reached.
$table->boolean('hide_before_start')->default(0);
- // This hides the prompt from the world prompt list after
+ // This hides the prompt from the world prompt list after
// the prompt end_at time has been reached.
$table->boolean('hide_after_end')->default(0);
});
@@ -48,11 +44,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('prompts');
}
diff --git a/database/migrations/2019_04_16_062617_add_parsed_text_to_site_pages.php b/database/migrations/2019_04_16_062617_add_parsed_text_to_site_pages.php
index c1a11e3e84..4a94361199 100644
--- a/database/migrations/2019_04_16_062617_add_parsed_text_to_site_pages.php
+++ b/database/migrations/2019_04_16_062617_add_parsed_text_to_site_pages.php
@@ -1,18 +1,14 @@
text('parsed_text')->nullable()->default(null);
@@ -25,11 +21,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('site_pages', function (Blueprint $table) {
//
$table->boolean('is_listed')->default(1);
diff --git a/database/migrations/2019_04_16_080112_add_invitation_keys.php b/database/migrations/2019_04_16_080112_add_invitation_keys.php
index 7726e0fbee..606fbed4fe 100644
--- a/database/migrations/2019_04_16_080112_add_invitation_keys.php
+++ b/database/migrations/2019_04_16_080112_add_invitation_keys.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -22,7 +18,7 @@ public function up()
$table->integer('user_id')->unsigned();
$table->integer('recipient_id')->unsigned()->nullable()->default(null);
$table->timestamps();
-
+
$table->foreign('user_id')->references('id')->on('users');
$table->foreign('recipient_id')->references('id')->on('users');
});
@@ -30,11 +26,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('invitations');
}
diff --git a/database/migrations/2019_04_19_125212_fix_inventory_tables.php b/database/migrations/2019_04_19_125212_fix_inventory_tables.php
index c0263e7c63..2e7bdbc573 100644
--- a/database/migrations/2019_04_19_125212_fix_inventory_tables.php
+++ b/database/migrations/2019_04_19_125212_fix_inventory_tables.php
@@ -1,18 +1,14 @@
dropColumn('data');
$table->dropColumn('type');
@@ -28,32 +24,26 @@ public function up()
Schema::table('currencies_log', function (Blueprint $table) {
// Standardise with the item logs
$table->string('log')->nullable();
- $table->string('log_type');
+ $table->string('log_type');
$table->string('data', 1024)->nullable();
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('currencies_log', function (Blueprint $table) {
-
$table->dropColumn('log');
$table->dropColumn('log_type');
$table->dropColumn('data');
});
Schema::table('currencies_log', function (Blueprint $table) {
-
$table->string('type', 32);
$table->string('data', 512);
});
-
Schema::rename('user_items_log', 'inventory_log');
Schema::rename('user_items', 'inventory');
Schema::rename('currencies_log', 'banks_log');
@@ -66,7 +56,7 @@ public function down()
$table->integer('currency_id')->unsigned();
$table->integer('quantity')->default(0);
-
+
$table->foreign('user_id')->references('id')->on('users');
$table->foreign('character_id')->references('id')->on('characters');
$table->foreign('currency_id')->references('id')->on('currencies');
diff --git a/database/migrations/2019_04_20_140827_fix_user_item_log.php b/database/migrations/2019_04_20_140827_fix_user_item_log.php
index 8d0c003135..8a32f9cc51 100644
--- a/database/migrations/2019_04_20_140827_fix_user_item_log.php
+++ b/database/migrations/2019_04_20_140827_fix_user_item_log.php
@@ -1,20 +1,16 @@
dropColumn('count');
$table->integer('quantity')->unsigned()->default(1);
});
@@ -22,13 +18,10 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('user_items_log', function(Blueprint $table) {
+ Schema::table('user_items_log', function (Blueprint $table) {
$table->dropColumn('quantity');
$table->integer('count')->unsigned()->default(1);
});
diff --git a/database/migrations/2019_04_29_080228_fix_inventory_tables_again.php b/database/migrations/2019_04_29_080228_fix_inventory_tables_again.php
index 2b0e046010..2b168964bd 100644
--- a/database/migrations/2019_04_29_080228_fix_inventory_tables_again.php
+++ b/database/migrations/2019_04_29_080228_fix_inventory_tables_again.php
@@ -1,18 +1,14 @@
dropForeign('inventory_log_stack_id_foreign');
@@ -26,11 +22,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('user_items_log', function (Blueprint $table) {
$table->dropForeign('inventory_log_stack_id_foreign');
diff --git a/database/migrations/2019_04_30_070721_add_notification_data.php b/database/migrations/2019_04_30_070721_add_notification_data.php
index dfa20d1e64..afa86a49f3 100644
--- a/database/migrations/2019_04_30_070721_add_notification_data.php
+++ b/database/migrations/2019_04_30_070721_add_notification_data.php
@@ -1,18 +1,14 @@
string('data', 1024)->nullable();
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('notifications', function (Blueprint $table) {
$table->dropColumn('data');
diff --git a/database/migrations/2019_05_04_091240_add_news.php b/database/migrations/2019_05_04_091240_add_news.php
index 8b9f248b33..a417c7effa 100644
--- a/database/migrations/2019_05_04_091240_add_news.php
+++ b/database/migrations/2019_05_04_091240_add_news.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -37,11 +33,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('is_news_unread');
diff --git a/database/migrations/2019_05_11_045038_update_character_tables.php b/database/migrations/2019_05_11_045038_update_character_tables.php
index e6e440f3ed..fdf987b166 100644
--- a/database/migrations/2019_05_11_045038_update_character_tables.php
+++ b/database/migrations/2019_05_11_045038_update_character_tables.php
@@ -1,18 +1,14 @@
string('name')->nullable()->default(null);
@@ -25,7 +21,7 @@ public function up()
Schema::table('character_images', function (Blueprint $table) {
$table->string('extension', 5);
-
+
// Whether to use the image cropper to generate the thumbnail
$table->boolean('use_cropper')->default(0);
$table->integer('x0')->nullable()->default(null);
@@ -41,7 +37,7 @@ public function up()
// Marks if the image is valid.
// This can be used in cases where you want to display
- // the image (an old version of the design) for logging purposes,
+ // the image (an old version of the design) for logging purposes,
// but not allow the owner to use the design in the game
$table->boolean('is_valid')->default(1);
@@ -58,7 +54,7 @@ public function up()
Schema::create('character_image_creators', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
-
+
$table->integer('character_image_id')->unsigned();
$table->enum('type', ['Artist', 'Designer']);
@@ -68,8 +64,8 @@ public function up()
$table->foreign('character_image_id')->references('id')->on('character_images');
});
- Schema::create('character_profiles', function (Blueprint $table) {
- $table->engine = 'InnoDB';
+ Schema::create('character_profiles', function (Blueprint $table) {
+ $table->engine = 'InnoDB';
$table->integer('character_id')->unsigned();
$table->text('text')->nullable()->default(null);
@@ -78,8 +74,8 @@ public function up()
$table->foreign('character_id')->references('id')->on('characters');
});
- Schema::create('user_profiles', function (Blueprint $table) {
- $table->engine = 'InnoDB';
+ Schema::create('user_profiles', function (Blueprint $table) {
+ $table->engine = 'InnoDB';
$table->integer('user_id')->unsigned();
$table->text('text')->nullable()->default(null);
@@ -87,16 +83,12 @@ public function up()
$table->foreign('user_id')->references('id')->on('users');
});
-
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('user_profiles');
Schema::dropIfExists('character_profiles');
@@ -112,7 +104,7 @@ public function down()
$table->dropColumn('hash');
$table->dropColumn('sort');
$table->dropColumn('is_valid');
-
+
$table->string('designer_alias');
$table->string('designer_url');
$table->string('artist_alias');
diff --git a/database/migrations/2019_05_12_064538_add_species_id_to_images.php b/database/migrations/2019_05_12_064538_add_species_id_to_images.php
index 0bca294164..8d51df939c 100644
--- a/database/migrations/2019_05_12_064538_add_species_id_to_images.php
+++ b/database/migrations/2019_05_12_064538_add_species_id_to_images.php
@@ -1,18 +1,14 @@
dropForeign('characters_rarity_id_foreign');
@@ -22,8 +18,6 @@ public function up()
$table->string('owner_alias')->nullable()->default('null');
});
Schema::table('character_images', function (Blueprint $table) {
-
-
$table->integer('species_id')->unsigned();
$table->integer('rarity_id')->unsigned();
@@ -34,19 +28,14 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_images', function (Blueprint $table) {
//
$table->dropForeign('character_images_species_id_foreign');
$table->dropForeign('character_images_rarity_id_foreign');
$table->dropColumn('species_id');
$table->dropColumn('rarity_id');
-
-
});
Schema::table('characters', function (Blueprint $table) {
$table->dropForeign('characters_rarity_id_foreign');
diff --git a/database/migrations/2019_05_12_100722_make_features_nonunique.php b/database/migrations/2019_05_12_100722_make_features_nonunique.php
index e207218b30..66b7f8d4c8 100644
--- a/database/migrations/2019_05_12_100722_make_features_nonunique.php
+++ b/database/migrations/2019_05_12_100722_make_features_nonunique.php
@@ -1,23 +1,19 @@
dropIndex('character_features_character_image_id_feature_id_unique');
@@ -28,11 +24,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('character_features', function (Blueprint $table) {
$table->dropColumn('id');
diff --git a/database/migrations/2019_05_19_054413_make_character_image_id_nullable.php b/database/migrations/2019_05_19_054413_make_character_image_id_nullable.php
index 4725b9a507..712cc96132 100644
--- a/database/migrations/2019_05_19_054413_make_character_image_id_nullable.php
+++ b/database/migrations/2019_05_19_054413_make_character_image_id_nullable.php
@@ -1,19 +1,15 @@
dropColumn('data');
@@ -106,7 +99,7 @@ public function down()
Schema::table('characters', function (Blueprint $table) {
$table->integer('user_id')->unsigned();
$table->integer('character_image_id')->unsigned();
-
+
$table->foreign('user_id')->references('id')->on('users');
});
}
diff --git a/database/migrations/2019_05_20_075936_add_character_sort.php b/database/migrations/2019_05_20_075936_add_character_sort.php
index 3c7de2b295..541a6fb6f2 100644
--- a/database/migrations/2019_05_20_075936_add_character_sort.php
+++ b/database/migrations/2019_05_20_075936_add_character_sort.php
@@ -1,18 +1,14 @@
integer('sort')->unsigned()->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('characters', function (Blueprint $table) {
$table->dropColumn('sort');
diff --git a/database/migrations/2019_06_01_121701_add_changed_data_to_character_log.php b/database/migrations/2019_06_01_121701_add_changed_data_to_character_log.php
index fcc28fa59c..7c5b49a60b 100644
--- a/database/migrations/2019_06_01_121701_add_changed_data_to_character_log.php
+++ b/database/migrations/2019_06_01_121701_add_changed_data_to_character_log.php
@@ -1,18 +1,14 @@
text('change_log')->nullable()->default(null);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_log', function (Blueprint $table) {
//
$table->dropColumn('change_log');
diff --git a/database/migrations/2019_06_10_083954_create_character_transfer_tables.php b/database/migrations/2019_06_10_083954_create_character_transfer_tables.php
index 3e3296e4f1..fce16f05a7 100644
--- a/database/migrations/2019_06_10_083954_create_character_transfer_tables.php
+++ b/database/migrations/2019_06_10_083954_create_character_transfer_tables.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
@@ -36,11 +32,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('character_transfers');
}
}
diff --git a/database/migrations/2019_07_09_063021_create_raffles.php b/database/migrations/2019_07_09_063021_create_raffles.php
index c5ed9c696e..b511d98542 100644
--- a/database/migrations/2019_07_09_063021_create_raffles.php
+++ b/database/migrations/2019_07_09_063021_create_raffles.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
@@ -47,11 +43,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('raffle_tickets');
Schema::dropIfExists('raffles');
Schema::dropIfExists('raffle_groups');
diff --git a/database/migrations/2019_07_13_095608_create_loot_tables.php b/database/migrations/2019_07_13_095608_create_loot_tables.php
index eb3cde785c..e597d15081 100644
--- a/database/migrations/2019_07_13_095608_create_loot_tables.php
+++ b/database/migrations/2019_07_13_095608_create_loot_tables.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
@@ -20,27 +16,24 @@ public function up()
$table->string('display_name');
});
- // I know this doesn't pluralise this way but
+ // I know this doesn't pluralise this way but
Schema::create('loots', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->integer('loot_table_id')->unsigned();
$table->string('rewardable_type');
$table->integer('rewardable_id')->unsigned();
-
+
$table->integer('quantity')->unsigned();
$table->integer('weight')->unsigned();
-
+
$table->foreign('loot_table_id')->references('id')->on('loot_tables');
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('loots');
Schema::dropIfExists('loot_tables');
}
diff --git a/database/migrations/2019_07_13_101743_create_prompt_categories.php b/database/migrations/2019_07_13_101743_create_prompt_categories.php
index 81a6513eec..088b81890c 100644
--- a/database/migrations/2019_07_13_101743_create_prompt_categories.php
+++ b/database/migrations/2019_07_13_101743_create_prompt_categories.php
@@ -1,28 +1,24 @@
engine = 'InnoDB';
$table->increments('id');
-
+
$table->string('name');
$table->text('description')->nullable()->default(null);
$table->text('parsed_description')->nullable()->default(null);
$table->integer('sort')->unsigned()->default(0);
-
+
$table->boolean('has_image')->default(0);
});
Schema::table('prompts', function (Blueprint $table) {
@@ -33,11 +29,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('prompts', function (Blueprint $table) {
$table->dropColumn('prompt_category_id');
});
diff --git a/database/migrations/2019_07_15_090200_add_prompt_rewards.php b/database/migrations/2019_07_15_090200_add_prompt_rewards.php
index 208806abf2..bce2aa59b6 100644
--- a/database/migrations/2019_07_15_090200_add_prompt_rewards.php
+++ b/database/migrations/2019_07_15_090200_add_prompt_rewards.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -20,18 +16,15 @@ public function up()
$table->string('rewardable_type');
$table->integer('rewardable_id')->unsigned();
$table->integer('quantity')->unsigned();
-
+
$table->foreign('prompt_id')->references('id')->on('prompts');
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('prompt_rewards');
}
diff --git a/database/migrations/2019_07_21_161720_add_prompt_submissions.php b/database/migrations/2019_07_21_161720_add_prompt_submissions.php
index 766c1698ff..3a2246a019 100644
--- a/database/migrations/2019_07_21_161720_add_prompt_submissions.php
+++ b/database/migrations/2019_07_21_161720_add_prompt_submissions.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -23,7 +19,7 @@ public function up()
$table->integer('staff_id')->unsigned()->nullable()->default(null);
$table->string('url', 200);
-
+
$table->text('comments')->nullable()->default(null);
$table->text('staff_comments')->nullable()->default(null);
@@ -41,7 +37,7 @@ public function up()
$table->string('data', 512)->nullable()->default(null);
});
-
+
Schema::create('claims', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -56,7 +52,7 @@ public function up()
$table->string('data', 512)->nullable()->default(null);
$table->enum('status', ['Pending', 'Approved', 'Rejected'])->default('Pending');
-
+
$table->timestamps();
});
Schema::create('claim_characters', function (Blueprint $table) {
@@ -71,11 +67,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('claim_characters');
Schema::dropIfExists('claims');
diff --git a/database/migrations/2019_08_06_092958_add_submission_count_to_user_settings.php b/database/migrations/2019_08_06_092958_add_submission_count_to_user_settings.php
index a72b3da14a..c575517e7d 100644
--- a/database/migrations/2019_08_06_092958_add_submission_count_to_user_settings.php
+++ b/database/migrations/2019_08_06_092958_add_submission_count_to_user_settings.php
@@ -1,18 +1,14 @@
integer('submission_count')->unsigned()->default(0);
@@ -24,11 +20,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('user_settings', function (Blueprint $table) {
//
$table->dropColumn('submission_count');
diff --git a/database/migrations/2019_08_09_123451_make_submission_prompt_id_nullable.php b/database/migrations/2019_08_09_123451_make_submission_prompt_id_nullable.php
index f9117ccceb..074accd2ae 100644
--- a/database/migrations/2019_08_09_123451_make_submission_prompt_id_nullable.php
+++ b/database/migrations/2019_08_09_123451_make_submission_prompt_id_nullable.php
@@ -1,18 +1,14 @@
dropColumn('prompt_id');
diff --git a/database/migrations/2019_08_10_120818_add_myo_slots.php b/database/migrations/2019_08_10_120818_add_myo_slots.php
index 2daa699c94..2ba4829163 100644
--- a/database/migrations/2019_08_10_120818_add_myo_slots.php
+++ b/database/migrations/2019_08_10_120818_add_myo_slots.php
@@ -1,20 +1,16 @@
boolean('is_myo_slot')->default(0);
// MYO slots won't have these filled
@@ -23,7 +19,7 @@ public function up()
$table->integer('number')->unsigned()->nullable()->change();
$table->string('slug')->nullable()->change();
});
- Schema::table('character_images', function (Blueprint $table) {
+ Schema::table('character_images', function (Blueprint $table) {
// MYO slots won't have these filled
$table->integer('rarity_id')->unsigned()->nullable()->change();
$table->integer('species_id')->unsigned()->nullable()->change();
@@ -32,18 +28,15 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('character_images', function (Blueprint $table) {
+ Schema::table('character_images', function (Blueprint $table) {
// MYO slots won't have these filled
$table->integer('rarity_id')->unsigned()->change();
$table->integer('species_id')->unsigned()->change();
});
- Schema::table('characters', function (Blueprint $table) {
+ Schema::table('characters', function (Blueprint $table) {
$table->dropColumn('is_myo_slot');
// MYO slots won't have these filled
diff --git a/database/migrations/2019_08_24_101751_add_design_updates.php b/database/migrations/2019_08_24_101751_add_design_updates.php
index 604fbdad7f..03386e01f6 100644
--- a/database/migrations/2019_08_24_101751_add_design_updates.php
+++ b/database/migrations/2019_08_24_101751_add_design_updates.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -22,7 +18,7 @@ public function up()
$table->integer('user_id')->unsigned()->index();
$table->integer('staff_id')->unsigned()->nullable()->default(null);
-
+
$table->text('comments')->nullable()->default(null);
$table->text('staff_comments')->nullable()->default(null);
@@ -30,7 +26,7 @@ public function up()
// This will be non-standard in terms of formatting, since we have to note down
// whether the currencies came from the user or character
$table->string('data', 512)->nullable()->default(null);
-
+
$table->string('extension', 5)->nullable()->default(null);
$table->boolean('use_cropper')->default(0);
$table->integer('x0')->nullable()->default(null);
@@ -39,12 +35,12 @@ public function up()
$table->integer('y1')->nullable()->default(null);
$table->string('hash', 10);
- // These are required in the final submission,
+ // These are required in the final submission,
// but for the sake of incremental editing they'll be nullable in the meantime
$table->integer('species_id')->unsigned()->nullable();
$table->integer('rarity_id')->unsigned()->nullable();
- // We're going to use this for the UI - since we're breaking down the editing by parts,
+ // We're going to use this for the UI - since we're breaking down the editing by parts,
// we want to make it easy for users to know if they've missed a section.
// Additionally, validation can be done per section, so submitting the final update is simple.
$table->boolean('has_comments')->default(0);
@@ -55,18 +51,18 @@ public function up()
$table->timestamps();
$table->softDeletes();
});
-
+
// Add a type to the features, so features can be attached to design updates
// We'll still use the character image column for the design updates -
// it should probably be renamed to be more appropriate though
- Schema::table('character_features', function(Blueprint $table) {
+ Schema::table('character_features', function (Blueprint $table) {
$table->enum('character_type', ['Character', 'Update'])->default('Character');
});
-
+
// Same here, the advantage of doing this is that after everything is good
// we only have to swap the type over to "Character" and update the ID
// and it's good to go
- Schema::table('character_image_creators', function(Blueprint $table) {
+ Schema::table('character_image_creators', function (Blueprint $table) {
$table->enum('character_type', ['Character', 'Update'])->default('Character');
});
@@ -74,7 +70,7 @@ public function up()
// item stacks to secure trade lots, this will also be used
// When the item is released from a design update or trade lot that has been
// deleted, it'll be returned to the user ID on the stack
- Schema::table('user_items', function(Blueprint $table) {
+ Schema::table('user_items', function (Blueprint $table) {
$table->enum('holding_type', ['Update', 'Trade'])->nullable()->default(null);
$table->integer('holding_id')->unsigned()->nullable()->default(null);
});
@@ -82,22 +78,19 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('user_items', function(Blueprint $table) {
+ Schema::table('user_items', function (Blueprint $table) {
$table->dropColumn('holding_type');
$table->dropColumn('holding_id');
});
-
- Schema::table('character_image_creators', function(Blueprint $table) {
+
+ Schema::table('character_image_creators', function (Blueprint $table) {
$table->dropColumn('character_type');
});
-
- Schema::table('character_features', function(Blueprint $table) {
+
+ Schema::table('character_features', function (Blueprint $table) {
$table->dropColumn('character_type');
});
diff --git a/database/migrations/2019_09_02_101303_drop_images_character_foreign_key.php b/database/migrations/2019_09_02_101303_drop_images_character_foreign_key.php
index 1599dccb7c..149c1bf83a 100644
--- a/database/migrations/2019_09_02_101303_drop_images_character_foreign_key.php
+++ b/database/migrations/2019_09_02_101303_drop_images_character_foreign_key.php
@@ -1,33 +1,25 @@
dropForeign(['character_image_id']);
});
-
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('character_image_creators', function (Blueprint $table) {
$table->foreign('character_image_id')->references('id')->on('character_images');
diff --git a/database/migrations/2019_09_08_060400_drop_character_images_foreign_keys.php b/database/migrations/2019_09_08_060400_drop_character_images_foreign_keys.php
index 58d3e8393a..d0c9a6fb1b 100644
--- a/database/migrations/2019_09_08_060400_drop_character_images_foreign_keys.php
+++ b/database/migrations/2019_09_08_060400_drop_character_images_foreign_keys.php
@@ -1,21 +1,17 @@
dropForeign(['species_id']);
$table->dropForeign(['rarity_id']);
});
@@ -23,13 +19,10 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('character_images', function(Blueprint $table) {
+ Schema::table('character_images', function (Blueprint $table) {
$table->foreign('species_id')->references('id')->on('specieses');
$table->foreign('rarity_id')->references('id')->on('rarities');
});
diff --git a/database/migrations/2019_09_08_063923_add_submitted_at_to_design_updates.php b/database/migrations/2019_09_08_063923_add_submitted_at_to_design_updates.php
index 09694343fa..19ed5f2fae 100644
--- a/database/migrations/2019_09_08_063923_add_submitted_at_to_design_updates.php
+++ b/database/migrations/2019_09_08_063923_add_submitted_at_to_design_updates.php
@@ -1,18 +1,14 @@
timestamp('submitted_at')->nullable()->default(null)->index();
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('design_updates', function (Blueprint $table) {
//
$table->dropColumn('submitted_at');
diff --git a/database/migrations/2019_09_17_110010_rename_design_approval_status.php b/database/migrations/2019_09_17_110010_rename_design_approval_status.php
index 6e70ffd1ab..74c0292feb 100644
--- a/database/migrations/2019_09_17_110010_rename_design_approval_status.php
+++ b/database/migrations/2019_09_17_110010_rename_design_approval_status.php
@@ -1,29 +1,20 @@
engine = 'InnoDB';
$table->increments('id');
@@ -30,12 +26,12 @@ public function up()
$table->increments('id');
$table->integer('shop_id')->unsigned()->index();
$table->integer('item_id')->unsigned();
-
+
$table->integer('currency_id')->unsigned();
$table->integer('cost')->default(0);
// In addition to the currency type,
- // restrict the bank you can use to buy the item -
+ // restrict the bank you can use to buy the item -
// e.g. if you only want characters to be able to buy the item,
// turn off use_user_bank so it forces the user to enter a character to buy it
// Of course this requires a sanity check to make sure that
@@ -45,7 +41,7 @@ public function up()
$table->boolean('is_limited_stock')->default(0);
$table->integer('quantity')->default(0);
-
+
$table->integer('sort')->unsigned()->default(0);
});
Schema::create('shop_log', function (Blueprint $table) {
@@ -54,7 +50,7 @@ public function up()
$table->integer('shop_id')->unsigned()->index();
$table->integer('user_id')->unsigned()->index();
$table->integer('character_id')->unsigned()->nullable()->default(null);
-
+
$table->integer('currency_id')->unsigned();
$table->integer('cost')->default(0);
@@ -66,11 +62,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('shop_log');
Schema::dropIfExists('shop_stock');
Schema::dropIfExists('shops');
diff --git a/database/migrations/2019_10_02_085738_add_shop_purchase_limits.php b/database/migrations/2019_10_02_085738_add_shop_purchase_limits.php
index 92efdf1391..de2675cf70 100644
--- a/database/migrations/2019_10_02_085738_add_shop_purchase_limits.php
+++ b/database/migrations/2019_10_02_085738_add_shop_purchase_limits.php
@@ -1,18 +1,14 @@
integer('purchase_limit')->unsigned()->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('shop_stock', function (Blueprint $table) {
$table->dropColumn('purchase_limit');
diff --git a/database/migrations/2019_10_12_095632_add_bans.php b/database/migrations/2019_10_12_095632_add_bans.php
index bb9c2d6fd5..cb181b6994 100644
--- a/database/migrations/2019_10_12_095632_add_bans.php
+++ b/database/migrations/2019_10_12_095632_add_bans.php
@@ -1,18 +1,14 @@
boolean('is_banned')->default(0);
@@ -25,11 +21,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('user_settings', function (Blueprint $table) {
$table->dropColumn('ban_reason');
diff --git a/database/migrations/2019_10_21_081343_add_secure_trades.php b/database/migrations/2019_10_21_081343_add_secure_trades.php
index 62470122f6..05bde1d18a 100644
--- a/database/migrations/2019_10_21_081343_add_secure_trades.php
+++ b/database/migrations/2019_10_21_081343_add_secure_trades.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -27,7 +23,7 @@ public function up()
$table->boolean('is_recipient_confirmed')->default(0);
$table->boolean('is_confirmed')->default(0);
$table->boolean('is_approved')->default(0);
-
+
// Reason for the transfer being rejected by a mod
$table->text('reason')->nullable()->default(null);
@@ -40,16 +36,12 @@ public function up()
// Fill this with a trade ID so we can tell if the character is busy
$table->integer('trade_id')->unsigned()->nullable()->default(null);
});
-
- }
+ }
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('characters', function (Blueprint $table) {
$table->dropColumn('trade_id');
diff --git a/database/migrations/2019_11_05_062623_modify_trade_confirmation_flags.php b/database/migrations/2019_11_05_062623_modify_trade_confirmation_flags.php
index aee3a4cf42..7a6167485c 100644
--- a/database/migrations/2019_11_05_062623_modify_trade_confirmation_flags.php
+++ b/database/migrations/2019_11_05_062623_modify_trade_confirmation_flags.php
@@ -1,18 +1,14 @@
dropColumn('is_confirmed');
@@ -23,11 +19,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('trades', function (Blueprint $table) {
$table->dropColumn('is_sender_trade_confirmed');
diff --git a/database/migrations/2019_12_02_090542_add_staff_id_to_trades.php b/database/migrations/2019_12_02_090542_add_staff_id_to_trades.php
index 2e8ed895a9..e5658e3036 100644
--- a/database/migrations/2019_12_02_090542_add_staff_id_to_trades.php
+++ b/database/migrations/2019_12_02_090542_add_staff_id_to_trades.php
@@ -1,18 +1,14 @@
integer('staff_id')->unsigned()->nullable()->default(null);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('trades', function (Blueprint $table) {
$table->dropColumn('staff_id');
});
diff --git a/database/migrations/2019_12_23_062730_add_item_tags.php b/database/migrations/2019_12_23_062730_add_item_tags.php
index ed548c582a..2559a7b4b3 100644
--- a/database/migrations/2019_12_23_062730_add_item_tags.php
+++ b/database/migrations/2019_12_23_062730_add_item_tags.php
@@ -1,18 +1,14 @@
string('tag')->index();
// This will hold the data required for using/displaying this item.
- // Note that the forms for editing the item will also have
+ // Note that the forms for editing the item will also have
// to be created yourself.
$table->text('data')->nullable()->default(null);
// This toggle allows you to disable the item tag,
// e.g. in a situation where you want an item to be usable
- // during an event, but not afterwards and you want to
+ // during an event, but not afterwards and you want to
// preserve the settings so you can reuse it again later
$table->boolean('is_active')->default(0);
});
@@ -37,11 +33,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('item_tags');
}
diff --git a/database/migrations/2020_02_23_135512_make_prompt_category_nullable.php b/database/migrations/2020_02_23_135512_make_prompt_category_nullable.php
index bc08cfe3e9..ad2b383361 100644
--- a/database/migrations/2020_02_23_135512_make_prompt_category_nullable.php
+++ b/database/migrations/2020_02_23_135512_make_prompt_category_nullable.php
@@ -1,32 +1,24 @@
integer('prompt_category_id')->unsigned()->nullable()->change();
});
-
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('prompts', function (Blueprint $table) {
$table->integer('prompt_category_id')->unsigned()->default(0)->change();
diff --git a/database/migrations/2020_03_07_065050_add_bookmarks.php b/database/migrations/2020_03_07_065050_add_bookmarks.php
index 5a66ff40ca..d66730ffa1 100644
--- a/database/migrations/2020_03_07_065050_add_bookmarks.php
+++ b/database/migrations/2020_03_07_065050_add_bookmarks.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -32,11 +28,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('character_bookmarks');
}
diff --git a/database/migrations/2020_03_14_090241_make_character_log_sender_nullable.php b/database/migrations/2020_03_14_090241_make_character_log_sender_nullable.php
index 8cc78c991b..f7b9d6bac0 100644
--- a/database/migrations/2020_03_14_090241_make_character_log_sender_nullable.php
+++ b/database/migrations/2020_03_14_090241_make_character_log_sender_nullable.php
@@ -1,18 +1,14 @@
string('sender_alias')->nullable();
@@ -26,11 +22,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('user_character_log', function (Blueprint $table) {
$table->dropColumn('sender_alias');
diff --git a/database/migrations/2020_03_14_124534_add_subtypes.php b/database/migrations/2020_03_14_124534_add_subtypes.php
index 73c4f8d9d6..0b053f1286 100644
--- a/database/migrations/2020_03_14_124534_add_subtypes.php
+++ b/database/migrations/2020_03_14_124534_add_subtypes.php
@@ -1,25 +1,21 @@
engine = 'InnoDB';
$table->increments('id');
$table->integer('species_id')->unsigned();
@@ -32,32 +28,29 @@ public function up()
$table->foreign('species_id')->references('id')->on('specieses');
});
- Schema::table('character_images', function(Blueprint $table) {
+ Schema::table('character_images', function (Blueprint $table) {
$table->integer('subtype_id')->unsigned()->nullable()->default(null);
});
- Schema::table('design_updates', function(Blueprint $table) {
+ Schema::table('design_updates', function (Blueprint $table) {
$table->integer('subtype_id')->unsigned()->nullable()->default(null);
});
- Schema::table('character_features', function(Blueprint $table) {
+ Schema::table('character_features', function (Blueprint $table) {
$table->integer('subtype_id')->unsigned()->nullable()->default(null);
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('character_images', function(Blueprint $table) {
+ Schema::table('character_images', function (Blueprint $table) {
$table->dropColumn('subtype_id');
});
- Schema::table('design_updates', function(Blueprint $table) {
+ Schema::table('design_updates', function (Blueprint $table) {
$table->dropColumn('subtype_id');
});
- Schema::table('character_features', function(Blueprint $table) {
+ Schema::table('character_features', function (Blueprint $table) {
$table->dropColumn('subtype_id');
});
Schema::dropIfExists('subtypes');
diff --git a/database/migrations/2020_03_23_075539_add_images_to_prompts.php b/database/migrations/2020_03_23_075539_add_images_to_prompts.php
index 3e07d4a3aa..2d51d9e92a 100644
--- a/database/migrations/2020_03_23_075539_add_images_to_prompts.php
+++ b/database/migrations/2020_03_23_075539_add_images_to_prompts.php
@@ -1,18 +1,14 @@
boolean('has_image')->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('prompts', function (Blueprint $table) {
//
$table->dropColumn('has_image');
diff --git a/database/migrations/2020_03_27_113928_add_subtype_to_features.php b/database/migrations/2020_03_27_113928_add_subtype_to_features.php
index de9ef875ad..d8ed8cd68c 100644
--- a/database/migrations/2020_03_27_113928_add_subtype_to_features.php
+++ b/database/migrations/2020_03_27_113928_add_subtype_to_features.php
@@ -1,20 +1,16 @@
dropColumn('subtype_id');
});
Schema::table('features', function (Blueprint $table) {
@@ -24,12 +20,9 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
- Schema::table('features', function(Blueprint $table) {
+ public function down() {
+ Schema::table('features', function (Blueprint $table) {
$table->dropColumn('subtype_id');
});
Schema::table('character_features', function (Blueprint $table) {
diff --git a/database/migrations/2020_04_25_114747_drop_log_foreign_keys.php b/database/migrations/2020_04_25_114747_drop_log_foreign_keys.php
index 44b5c5bf10..f7d09af15c 100644
--- a/database/migrations/2020_04_25_114747_drop_log_foreign_keys.php
+++ b/database/migrations/2020_04_25_114747_drop_log_foreign_keys.php
@@ -1,36 +1,29 @@
dropForeign('banks_log_currency_id_foreign');
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
// This is not actually a very accurate opposite of the above,
// as the old index was created when the table was called banks,
// and this will generate a different index name
- Schema::table('currencies_log', function(Blueprint $table) {
+ Schema::table('currencies_log', function (Blueprint $table) {
$table->foreign('currency_id')->references('id')->on('currencies');
});
}
diff --git a/database/migrations/2020_05_02_152118_drop_character_myo_counts.php b/database/migrations/2020_05_02_152118_drop_character_myo_counts.php
index 7761db1269..7fea2170d1 100644
--- a/database/migrations/2020_05_02_152118_drop_character_myo_counts.php
+++ b/database/migrations/2020_05_02_152118_drop_character_myo_counts.php
@@ -1,23 +1,18 @@
dropColumn('character_count');
$table->dropColumn('myo_slot_count');
});
@@ -25,19 +20,16 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('user_settings', function(Blueprint $table) {
+ Schema::table('user_settings', function (Blueprint $table) {
$table->integer('character_count')->unsigned()->default(0);
$table->integer('myo_slot_count')->unsigned()->default(0);
});
$users = User::all();
- foreach($users as $user) {
+ foreach ($users as $user) {
$user->settings->character_count = $user->characters->count();
$user_settings->myo_slot_count = $user->myoSlots->count();
$user->settings->save();
diff --git a/database/migrations/2020_05_10_204920_change_user_items_count_default.php b/database/migrations/2020_05_10_204920_change_user_items_count_default.php
index 523bfa3d87..a8cf467b68 100644
--- a/database/migrations/2020_05_10_204920_change_user_items_count_default.php
+++ b/database/migrations/2020_05_10_204920_change_user_items_count_default.php
@@ -1,28 +1,19 @@
unsignedInteger('holding_count')->default(0);
});
@@ -20,11 +16,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('user_items', function (Blueprint $table) {
$table->dropColumn('holding_count');
});
diff --git a/database/migrations/2020_05_23_112548_change_item_tracking_system.php b/database/migrations/2020_05_23_112548_change_item_tracking_system.php
index db05424362..c6eab3aeb8 100644
--- a/database/migrations/2020_05_23_112548_change_item_tracking_system.php
+++ b/database/migrations/2020_05_23_112548_change_item_tracking_system.php
@@ -1,18 +1,14 @@
text('parsed_staff_comments')->nullable()->default(null);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('submissions', function (Blueprint $table) {
//
$table->dropColumn('parsed_staff_comments');
diff --git a/database/migrations/2020_06_06_194000_add_submission_count.php b/database/migrations/2020_06_06_194000_add_submission_count.php
index 61dad31f07..9b9e18980f 100644
--- a/database/migrations/2020_06_06_194000_add_submission_count.php
+++ b/database/migrations/2020_06_06_194000_add_submission_count.php
@@ -1,18 +1,14 @@
unsignedInteger('submission_count')->default(0);
});
@@ -20,11 +16,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('user_items', function (Blueprint $table) {
//
$table->dropColumn('submission_count');
diff --git a/database/migrations/2020_06_12_155213_add_character_items_table.php b/database/migrations/2020_06_12_155213_add_character_items_table.php
index 2f23567f24..3400147ee0 100644
--- a/database/migrations/2020_06_12_155213_add_character_items_table.php
+++ b/database/migrations/2020_06_12_155213_add_character_items_table.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -31,7 +27,7 @@ public function up()
$table->foreign('character_id')->references('id')->on('characters');
});
- Schema::create('character_items_log', function(Blueprint $table) {
+ Schema::create('character_items_log', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('item_id')->unsigned();
@@ -50,11 +46,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('character_items');
Schema::dropIfExists('character_items_log');
diff --git a/database/migrations/2020_06_12_161322_add_character_transfer_perms_to_item_categories.php b/database/migrations/2020_06_12_161322_add_character_transfer_perms_to_item_categories.php
index ae769df83d..80c156e2ee 100644
--- a/database/migrations/2020_06_12_161322_add_character_transfer_perms_to_item_categories.php
+++ b/database/migrations/2020_06_12_161322_add_character_transfer_perms_to_item_categories.php
@@ -1,18 +1,14 @@
boolean('is_character_owned')->default(0);
@@ -24,11 +20,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('item_categories', function (Blueprint $table) {
$table->dropColumn('is_character_owned');
$table->dropColumn('character_limit');
diff --git a/database/migrations/2020_06_15_205604_fix_character_item_log_table.php b/database/migrations/2020_06_15_205604_fix_character_item_log_table.php
index 0e56714f28..f31c77b00d 100644
--- a/database/migrations/2020_06_15_205604_fix_character_item_log_table.php
+++ b/database/migrations/2020_06_15_205604_fix_character_item_log_table.php
@@ -1,18 +1,14 @@
integer('stack_id')->unsigned()->change();
});
-
}
}
diff --git a/database/migrations/2020_06_15_232619_add_sender_recipient_type_to_character_items_log.php b/database/migrations/2020_06_15_232619_add_sender_recipient_type_to_character_items_log.php
index b5f1582076..ef31e1263f 100644
--- a/database/migrations/2020_06_15_232619_add_sender_recipient_type_to_character_items_log.php
+++ b/database/migrations/2020_06_15_232619_add_sender_recipient_type_to_character_items_log.php
@@ -1,18 +1,14 @@
enum('sender_type', ['User', 'Character'])->nullable()->default(null);
@@ -22,11 +18,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_items_log', function (Blueprint $table) {
//
$table->dropColumn('sender_type');
diff --git a/database/migrations/2020_06_16_182516_adjust_item_logs_for_character_items.php b/database/migrations/2020_06_16_182516_adjust_item_logs_for_character_items.php
index 3623b5475b..ad3253fad5 100644
--- a/database/migrations/2020_06_16_182516_adjust_item_logs_for_character_items.php
+++ b/database/migrations/2020_06_16_182516_adjust_item_logs_for_character_items.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
$table->integer('item_id')->unsigned();
diff --git a/database/migrations/2020_06_16_203821_set_items_log_sender_recipient_default_null.php b/database/migrations/2020_06_16_203821_set_items_log_sender_recipient_default_null.php
index bf6bc7a758..1779a2eb3e 100644
--- a/database/migrations/2020_06_16_203821_set_items_log_sender_recipient_default_null.php
+++ b/database/migrations/2020_06_16_203821_set_items_log_sender_recipient_default_null.php
@@ -1,22 +1,18 @@
dropForeign('inventory_log_sender_id_foreign');
@@ -28,11 +24,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
DB::statement("ALTER TABLE items_log CHANGE COLUMN sender_type sender_type ENUM('User', 'Character') DEFAULT 'User'");
DB::statement("ALTER TABLE items_log CHANGE COLUMN recipient_type recipient_type ENUM('User', 'Character') DEFAULT 'User'");
diff --git a/database/migrations/2020_06_19_142842_item_entry_extension.php b/database/migrations/2020_06_19_142842_item_entry_extension.php
index 278e4c4230..18e3e4a6fc 100644
--- a/database/migrations/2020_06_19_142842_item_entry_extension.php
+++ b/database/migrations/2020_06_19_142842_item_entry_extension.php
@@ -1,18 +1,14 @@
string('data', 1024)->nullable(); // includes rarity and availability information.
@@ -24,11 +20,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('items', function (Blueprint $table) {
//
$table->dropColumn('data');
diff --git a/database/migrations/2020_07_27_153640_user_icon_expansion.php b/database/migrations/2020_07_27_153640_user_icon_expansion.php
index 15413e0916..6b73462dcd 100644
--- a/database/migrations/2020_07_27_153640_user_icon_expansion.php
+++ b/database/migrations/2020_07_27_153640_user_icon_expansion.php
@@ -1,18 +1,14 @@
string('avatar')->default('default.jpg');
@@ -21,14 +17,11 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('users', function (Blueprint $table) {
//
$table->dropColumn('avatar');
});
}
-}
\ No newline at end of file
+}
diff --git a/database/migrations/2020_07_31_185640_add_type_to_design_updates.php b/database/migrations/2020_07_31_185640_add_type_to_design_updates.php
index 912eae90a0..5d8c59ae1c 100644
--- a/database/migrations/2020_07_31_185640_add_type_to_design_updates.php
+++ b/database/migrations/2020_07_31_185640_add_type_to_design_updates.php
@@ -1,18 +1,14 @@
enum('update_type', ['MYO', 'Character'])->nullable()->default('Character');
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('design_updates', function (Blueprint $table) {
//
$table->dropColumn('update_type');
diff --git a/database/migrations/2020_07_31_193235_set_design_update_type_null.php b/database/migrations/2020_07_31_193235_set_design_update_type_null.php
index a4b63e9a14..1198539c45 100644
--- a/database/migrations/2020_07_31_193235_set_design_update_type_null.php
+++ b/database/migrations/2020_07_31_193235_set_design_update_type_null.php
@@ -1,29 +1,20 @@
text('stack_name')->nullable()->default(null);
@@ -26,11 +22,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_items', function (Blueprint $table) {
$table->dropColumn('stack_name');
});
diff --git a/database/migrations/2020_08_10_211220_raise_items_log_char_limit.php b/database/migrations/2020_08_10_211220_raise_items_log_char_limit.php
index 280b09bf41..f4caeac6aa 100644
--- a/database/migrations/2020_08_10_211220_raise_items_log_char_limit.php
+++ b/database/migrations/2020_08_10_211220_raise_items_log_char_limit.php
@@ -1,18 +1,14 @@
string('vote_data', 512)->nullable()->default(null);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('design_updates', function (Blueprint $table) {
//
$table->dropColumn('vote_data');
diff --git a/database/migrations/2020_08_25_181738_add_fullsize_hash_to_character_images.php b/database/migrations/2020_08_25_181738_add_fullsize_hash_to_character_images.php
index 30245b4551..2da7b3b263 100644
--- a/database/migrations/2020_08_25_181738_add_fullsize_hash_to_character_images.php
+++ b/database/migrations/2020_08_25_181738_add_fullsize_hash_to_character_images.php
@@ -1,18 +1,14 @@
string('fullsize_hash', 20);
@@ -25,11 +21,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_images', function (Blueprint $table) {
$table->dropColumn('fullsize_hash');
});
diff --git a/database/migrations/2020_08_27_181445_char-link-addon.php b/database/migrations/2020_08_27_181445_char-link-addon.php
index 400c666db7..1e1551c7be 100644
--- a/database/migrations/2020_08_27_181445_char-link-addon.php
+++ b/database/migrations/2020_08_27_181445_char-link-addon.php
@@ -1,18 +1,14 @@
string('link', 100)->nullable($value = true);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_profiles', function (Blueprint $table) {
//
$table->dropColumn('link');
diff --git a/database/migrations/2020_09_01_122320_add_sales.php b/database/migrations/2020_09_01_122320_add_sales.php
index 0b5135dbf0..8a121fc86f 100644
--- a/database/migrations/2020_09_01_122320_add_sales.php
+++ b/database/migrations/2020_09_01_122320_add_sales.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -37,11 +33,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('is_sales_unread');
diff --git a/database/migrations/2020_09_11_181218_add_is_featured.php b/database/migrations/2020_09_11_181218_add_is_featured.php
index 174351524f..529dfd2809 100644
--- a/database/migrations/2020_09_11_181218_add_is_featured.php
+++ b/database/migrations/2020_09_11_181218_add_is_featured.php
@@ -1,18 +1,14 @@
integer('is_featured')->default(0);
});
@@ -20,13 +16,10 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('comments', function (Blueprint $table) {
$table->dropColumn('is_featured');
- });
+ });
}
}
diff --git a/database/migrations/2020_09_12_181218_add_rank_icon.php b/database/migrations/2020_09_12_181218_add_rank_icon.php
index d8b6af0577..0bc2e05d64 100644
--- a/database/migrations/2020_09_12_181218_add_rank_icon.php
+++ b/database/migrations/2020_09_12_181218_add_rank_icon.php
@@ -1,18 +1,14 @@
string('icon', 100)->after('color')->default('fas fa-user')->nullable();
});
@@ -20,11 +16,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('ranks', function (Blueprint $table) {
$table->dropColumn('icon');
});
diff --git a/database/migrations/2020_09_13_001802_add_toggle_for_comments_on_site_pages.php b/database/migrations/2020_09_13_001802_add_toggle_for_comments_on_site_pages.php
index 9694f58da7..87d13ef73b 100644
--- a/database/migrations/2020_09_13_001802_add_toggle_for_comments_on_site_pages.php
+++ b/database/migrations/2020_09_13_001802_add_toggle_for_comments_on_site_pages.php
@@ -1,18 +1,14 @@
integer('can_comment')->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('site_pages', function (Blueprint $table) {
$table->dropColumn('can_comment');
diff --git a/database/migrations/2020_09_16_190405_make_gallery_tables.php b/database/migrations/2020_09_16_190405_make_gallery_tables.php
index 91c8666dee..44063cc107 100644
--- a/database/migrations/2020_09_16_190405_make_gallery_tables.php
+++ b/database/migrations/2020_09_16_190405_make_gallery_tables.php
@@ -1,23 +1,19 @@
engine = 'InnoDB';
$table->increments('id');
-
+
// Parent gallery ID
$table->integer('parent_id')->unsigned()->nullable();
@@ -38,7 +34,7 @@ public function up()
});
// Gallery submission table
- Schema::create('gallery_submissions', function(Blueprint $table) {
+ Schema::create('gallery_submissions', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -75,17 +71,13 @@ public function up()
$table->timestamps();
$table->softDeletes();
-
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('galleries');
Schema::dropIfExists('gallery_submissions');
diff --git a/database/migrations/2020_09_17_185436_fix_gallery_tables.php b/database/migrations/2020_09_17_185436_fix_gallery_tables.php
index c75b9c4a20..2355687089 100644
--- a/database/migrations/2020_09_17_185436_fix_gallery_tables.php
+++ b/database/migrations/2020_09_17_185436_fix_gallery_tables.php
@@ -1,18 +1,14 @@
string('title');
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('gallery_submissions', function (Blueprint $table) {
//
$table->dropColumn('title');
diff --git a/database/migrations/2020_09_21_205840_transfer_reason.php b/database/migrations/2020_09_21_205840_transfer_reason.php
index 919a93565f..b004c3515b 100644
--- a/database/migrations/2020_09_21_205840_transfer_reason.php
+++ b/database/migrations/2020_09_21_205840_transfer_reason.php
@@ -1,18 +1,14 @@
string('user_reason', 200)->nullable($value = true);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_transfers', function (Blueprint $table) {
//
$table->dropColumn('user_reason');
diff --git a/database/migrations/2020_09_23_020953_set_gallery_submission_hash_nullable.php b/database/migrations/2020_09_23_020953_set_gallery_submission_hash_nullable.php
index 6cfe9705f3..aec1db55d4 100644
--- a/database/migrations/2020_09_23_020953_set_gallery_submission_hash_nullable.php
+++ b/database/migrations/2020_09_23_020953_set_gallery_submission_hash_nullable.php
@@ -1,18 +1,14 @@
dropColumn('hash');
@@ -27,11 +23,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('gallery_submissions', function (Blueprint $table) {
$table->dropColumn('hash');
diff --git a/database/migrations/2020_09_26_140543_add_gallery_favorites_table.php b/database/migrations/2020_09_26_140543_add_gallery_favorites_table.php
index 4a49ee5722..53e8959872 100644
--- a/database/migrations/2020_09_26_140543_add_gallery_favorites_table.php
+++ b/database/migrations/2020_09_26_140543_add_gallery_favorites_table.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -24,11 +20,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::dropIfExists('gallery_favorites');
}
diff --git a/database/migrations/2020_10_02_152241_add_staff_comments_to_gallery_submissions.php b/database/migrations/2020_10_02_152241_add_staff_comments_to_gallery_submissions.php
index 9047141683..120647fc93 100644
--- a/database/migrations/2020_10_02_152241_add_staff_comments_to_gallery_submissions.php
+++ b/database/migrations/2020_10_02_152241_add_staff_comments_to_gallery_submissions.php
@@ -1,18 +1,14 @@
text('staff_comments')->nullable();
@@ -23,11 +19,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('gallery_submissions', function (Blueprint $table) {
//
$table->dropColumn('staff_comments');
diff --git a/database/migrations/2020_10_03_170042_add_valued_status_to_gallery_submissions.php b/database/migrations/2020_10_03_170042_add_valued_status_to_gallery_submissions.php
index c18a7145eb..51d0ae6672 100644
--- a/database/migrations/2020_10_03_170042_add_valued_status_to_gallery_submissions.php
+++ b/database/migrations/2020_10_03_170042_add_valued_status_to_gallery_submissions.php
@@ -1,18 +1,14 @@
boolean('is_valued')->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('gallery_submissions', function (Blueprint $table) {
//
$table->dropColumn('is_valued');
diff --git a/database/migrations/2020_10_03_183104_add_type_to_gallery_submission_collaborators.php b/database/migrations/2020_10_03_183104_add_type_to_gallery_submission_collaborators.php
index 0ec52bd008..b17b65dd61 100644
--- a/database/migrations/2020_10_03_183104_add_type_to_gallery_submission_collaborators.php
+++ b/database/migrations/2020_10_03_183104_add_type_to_gallery_submission_collaborators.php
@@ -1,18 +1,14 @@
enum('type', ['Collab', 'Trade', 'Gift', 'Comm', 'Comm (Currency)'])->nullable()->default('Collab');
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('gallery_submission_collaborators', function (Blueprint $table) {
//
$table->dropColumn('type');
diff --git a/database/migrations/2020_10_03_211413_add_prefix_to_prompts.php b/database/migrations/2020_10_03_211413_add_prefix_to_prompts.php
index e91cdb3196..c039033581 100644
--- a/database/migrations/2020_10_03_211413_add_prefix_to_prompts.php
+++ b/database/migrations/2020_10_03_211413_add_prefix_to_prompts.php
@@ -1,18 +1,14 @@
string('prefix', 10)->nullable();
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('prompts', function (Blueprint $table) {
//
$table->dropColumn('prefix');
diff --git a/database/migrations/2020_10_05_180536_raise_currencies_log_log_character_limit.php b/database/migrations/2020_10_05_180536_raise_currencies_log_log_character_limit.php
index 9cbee272ad..81229be458 100644
--- a/database/migrations/2020_10_05_180536_raise_currencies_log_log_character_limit.php
+++ b/database/migrations/2020_10_05_180536_raise_currencies_log_log_character_limit.php
@@ -1,18 +1,14 @@
dropColumn('masterlist_sub_id');
});
-
+
Schema::table('specieses', function (Blueprint $table) {
//
$table->dropColumn('masterlist_sub_id');
@@ -58,4 +51,4 @@ public function down()
//
Schema::dropIfExists('masterlist_sub');
}
-}
\ No newline at end of file
+}
diff --git a/database/migrations/2020_10_15_143857_add_user_reports.php b/database/migrations/2020_10_15_143857_add_user_reports.php
index 25ed7df7b5..ac25989452 100644
--- a/database/migrations/2020_10_15_143857_add_user_reports.php
+++ b/database/migrations/2020_10_15_143857_add_user_reports.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
@@ -28,18 +24,15 @@ public function up()
$table->string('data', 512)->nullable()->default(null);
$table->enum('status', ['Pending', 'Assigned', 'Closed'])->default('Pending');
-
+
$table->timestamps();
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('reports');
}
}
diff --git a/database/migrations/2020_10_15_185536_add_bug_report_option.php b/database/migrations/2020_10_15_185536_add_bug_report_option.php
index 3bd9f3b2a9..f90ece9325 100644
--- a/database/migrations/2020_10_15_185536_add_bug_report_option.php
+++ b/database/migrations/2020_10_15_185536_add_bug_report_option.php
@@ -1,18 +1,14 @@
boolean('is_br')->default(0);
@@ -22,11 +18,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
Schema::table('reports', function (Blueprint $table) {
$table->dropColumn('is_br');
diff --git a/database/migrations/2020_10_19_144506_add_type_to_comments.php b/database/migrations/2020_10_19_144506_add_type_to_comments.php
index ca20750c03..0b458538f4 100644
--- a/database/migrations/2020_10_19_144506_add_type_to_comments.php
+++ b/database/migrations/2020_10_19_144506_add_type_to_comments.php
@@ -1,31 +1,24 @@
string('type')->default("User-User");
+ $table->string('type')->default('User-User');
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('comments', function (Blueprint $table) {
//
$table->dropColumn('type');
diff --git a/database/migrations/2020_10_30_011826_add_content_warning_to_gallery_submissions.php b/database/migrations/2020_10_30_011826_add_content_warning_to_gallery_submissions.php
index 60b631424f..afa59d78d9 100644
--- a/database/migrations/2020_10_30_011826_add_content_warning_to_gallery_submissions.php
+++ b/database/migrations/2020_10_30_011826_add_content_warning_to_gallery_submissions.php
@@ -1,18 +1,14 @@
string('content_warning', 255)->nullable();
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('gallery_submissions', function (Blueprint $table) {
//
$table->dropColumn('content_warning');
diff --git a/database/migrations/2020_10_30_170108_add_gift_writing_status_to_characters.php b/database/migrations/2020_10_30_170108_add_gift_writing_status_to_characters.php
index 85e4c246f5..da7caa8bdb 100644
--- a/database/migrations/2020_10_30_170108_add_gift_writing_status_to_characters.php
+++ b/database/migrations/2020_10_30_170108_add_gift_writing_status_to_characters.php
@@ -1,18 +1,14 @@
boolean('is_gift_writing_allowed')->default(0);
@@ -26,11 +22,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('characters', function (Blueprint $table) {
//
$table->dropColumn('is_gift_writing_allowed');
diff --git a/database/migrations/2020_11_02_204925_add_delayed_comments_to_sales.php b/database/migrations/2020_11_02_204925_add_delayed_comments_to_sales.php
index 580a10f6f6..37ffa399e0 100644
--- a/database/migrations/2020_11_02_204925_add_delayed_comments_to_sales.php
+++ b/database/migrations/2020_11_02_204925_add_delayed_comments_to_sales.php
@@ -1,18 +1,14 @@
timestamp('comments_open_at')->nullable()->default(null);
$table->boolean('is_open')->default(1);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('sales', function (Blueprint $table) {
//
$table->dropColumn('is_open');
diff --git a/database/migrations/2020_11_09_201534_add_user_id_to_character_image_creators.php b/database/migrations/2020_11_09_201534_add_user_id_to_character_image_creators.php
index 2cca305cd3..c199da95a2 100644
--- a/database/migrations/2020_11_09_201534_add_user_id_to_character_image_creators.php
+++ b/database/migrations/2020_11_09_201534_add_user_id_to_character_image_creators.php
@@ -1,18 +1,14 @@
integer('user_id')->unsigned()->nullable();
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_image_creators', function (Blueprint $table) {
//
$table->dropColumn('user_id');
diff --git a/database/migrations/2020_11_13_180553_create_aliases_table.php b/database/migrations/2020_11_13_180553_create_aliases_table.php
index a982a1caf9..76dd1620e2 100644
--- a/database/migrations/2020_11_13_180553_create_aliases_table.php
+++ b/database/migrations/2020_11_13_180553_create_aliases_table.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
$table->increments('id');
@@ -28,11 +24,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('user_aliases');
}
}
diff --git a/database/migrations/2020_11_13_184820_add_has_alias_to_users_table.php b/database/migrations/2020_11_13_184820_add_has_alias_to_users_table.php
index e2bb0e3e0b..10d9db8a6f 100644
--- a/database/migrations/2020_11_13_184820_add_has_alias_to_users_table.php
+++ b/database/migrations/2020_11_13_184820_add_has_alias_to_users_table.php
@@ -1,18 +1,14 @@
boolean('has_alias')->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('users', function (Blueprint $table) {
//
$table->dropColumn('has_alias');
diff --git a/database/migrations/2020_11_17_001602_add_url_to_characters.php b/database/migrations/2020_11_17_001602_add_url_to_characters.php
index 736d7a52f7..4cda0e49ab 100644
--- a/database/migrations/2020_11_17_001602_add_url_to_characters.php
+++ b/database/migrations/2020_11_17_001602_add_url_to_characters.php
@@ -1,18 +1,14 @@
string('owner_url')->nullable()->default(null)->index();
@@ -26,11 +22,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('characters', function (Blueprint $table) {
//
$table->dropColumn('owner_url');
diff --git a/database/migrations/2020_11_17_181454_add_url_to_character_logs.php b/database/migrations/2020_11_17_181454_add_url_to_character_logs.php
index 0392f9a609..94528238eb 100644
--- a/database/migrations/2020_11_17_181454_add_url_to_character_logs.php
+++ b/database/migrations/2020_11_17_181454_add_url_to_character_logs.php
@@ -1,18 +1,14 @@
string('sender_url')->nullable()->default(null);
@@ -28,11 +24,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('character_log', function (Blueprint $table) {
//
$table->dropColumn('sender_url');
diff --git a/database/migrations/2020_11_18_011215_add_visibility_toggles_to_prompts.php b/database/migrations/2020_11_18_011215_add_visibility_toggles_to_prompts.php
index 3b6aa37bac..c919cef1d9 100644
--- a/database/migrations/2020_11_18_011215_add_visibility_toggles_to_prompts.php
+++ b/database/migrations/2020_11_18_011215_add_visibility_toggles_to_prompts.php
@@ -1,18 +1,14 @@
integer('hide_submissions')->unsigned()->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('prompts', function (Blueprint $table) {
//
$table->dropColumn('hide_submissions');
diff --git a/database/migrations/2020_11_23_152732_add_site_extensions_table.php b/database/migrations/2020_11_23_152732_add_site_extensions_table.php
index afc1cad73c..9bb904d952 100644
--- a/database/migrations/2020_11_23_152732_add_site_extensions_table.php
+++ b/database/migrations/2020_11_23_152732_add_site_extensions_table.php
@@ -1,18 +1,14 @@
engine = 'InnoDB';
@@ -25,11 +21,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('site_extensions');
}
}
diff --git a/database/migrations/2020_11_25_192234_add_artist_id_to_items.php b/database/migrations/2020_11_25_192234_add_artist_id_to_items.php
index 423756cd5d..bb165c9a75 100644
--- a/database/migrations/2020_11_25_192234_add_artist_id_to_items.php
+++ b/database/migrations/2020_11_25_192234_add_artist_id_to_items.php
@@ -1,18 +1,14 @@
integer('artist_id')->unsigned()->nullable();
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('items', function (Blueprint $table) {
//
$table->dropColumn('artist_id');
diff --git a/database/migrations/2020_11_26_060832_make_submissions_url_nullable.php b/database/migrations/2020_11_26_060832_make_submissions_url_nullable.php
index dc5006b1ca..0e611f9e26 100644
--- a/database/migrations/2020_11_26_060832_make_submissions_url_nullable.php
+++ b/database/migrations/2020_11_26_060832_make_submissions_url_nullable.php
@@ -1,30 +1,20 @@
timestamp('start_at')->nullable()->default(null);
@@ -23,11 +19,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('galleries', function (Blueprint $table) {
//
$table->dropColumn('start_at');
diff --git a/database/migrations/2020_12_05_165316_index_gallery_tables.php b/database/migrations/2020_12_05_165316_index_gallery_tables.php
index e23ddf263e..24bf9d1ce5 100644
--- a/database/migrations/2020_12_05_165316_index_gallery_tables.php
+++ b/database/migrations/2020_12_05_165316_index_gallery_tables.php
@@ -1,18 +1,14 @@
boolean('is_released')->default(1);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('items', function (Blueprint $table) {
//
$table->dropColumn('is_released');
diff --git a/database/migrations/2021_01_15_012947_add_select_prompt_to_galleries.php b/database/migrations/2021_01_15_012947_add_select_prompt_to_galleries.php
index 7fa47f2683..e13f4b2bc2 100644
--- a/database/migrations/2021_01_15_012947_add_select_prompt_to_galleries.php
+++ b/database/migrations/2021_01_15_012947_add_select_prompt_to_galleries.php
@@ -4,15 +4,11 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class AddSelectPromptToGalleries extends Migration
-{
+class AddSelectPromptToGalleries extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
Schema::table('galleries', function (Blueprint $table) {
//
$table->boolean('prompt_selection')->default(0);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('galleries', function (Blueprint $table) {
//
$table->dropColumn('prompt_selection');
diff --git a/database/migrations/2021_02_14_231530_change_character_value_to_decimal.php b/database/migrations/2021_02_14_231530_change_character_value_to_decimal.php
index 04498f91d9..0f7de60dfb 100644
--- a/database/migrations/2021_02_14_231530_change_character_value_to_decimal.php
+++ b/database/migrations/2021_02_14_231530_change_character_value_to_decimal.php
@@ -4,15 +4,11 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class ChangeCharacterValueToDecimal extends Migration
-{
+class ChangeCharacterValueToDecimal extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
Schema::table('characters', function (Blueprint $table) {
$table->decimal('sale_value', 13, 2)->default(0.00)->change();
});
@@ -20,11 +16,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('characters', function (Blueprint $table) {
$table->integer('sale_value')->nullable(false)->default(0)->change();
});
diff --git a/database/migrations/2021_03_28_172111_add_item_category_info_to_loots.php b/database/migrations/2021_03_28_172111_add_item_category_info_to_loots.php
index 9b510fa942..668c23e20d 100644
--- a/database/migrations/2021_03_28_172111_add_item_category_info_to_loots.php
+++ b/database/migrations/2021_03_28_172111_add_item_category_info_to_loots.php
@@ -4,15 +4,11 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class AddItemCategoryInfoToLoots extends Migration
-{
+class AddItemCategoryInfoToLoots extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
Schema::table('loots', function (Blueprint $table) {
//
$table->string('data')->nullable()->default(null);
@@ -21,11 +17,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::table('loots', function (Blueprint $table) {
//
$table->dropColumn('data');
diff --git a/database/migrations/2021_04_22_230225_create_sales_characters.php b/database/migrations/2021_04_22_230225_create_sales_characters.php
index bc5b46d488..652f3937a0 100644
--- a/database/migrations/2021_04_22_230225_create_sales_characters.php
+++ b/database/migrations/2021_04_22_230225_create_sales_characters.php
@@ -4,15 +4,11 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class CreateSalesCharacters extends Migration
-{
+class CreateSalesCharacters extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
Schema::create('sales_characters', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -33,11 +29,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('sales_characters');
}
}
diff --git a/database/migrations/2021_04_29_175640_add_user_birthday.php b/database/migrations/2021_04_29_175640_add_user_birthday.php
index 8f0067c5d1..5e35edb713 100644
--- a/database/migrations/2021_04_29_175640_add_user_birthday.php
+++ b/database/migrations/2021_04_29_175640_add_user_birthday.php
@@ -4,38 +4,31 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class AddUserBirthday extends Migration
-{
+class AddUserBirthday extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
//
- Schema::table('users', function(Blueprint $table) {
+ Schema::table('users', function (Blueprint $table) {
$table->timestamp('birthday')->nullable()->default(null);
});
- Schema::table('user_settings', function(Blueprint $table) {
+ Schema::table('user_settings', function (Blueprint $table) {
$table->tinyInteger('birthday_setting')->default(0);
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//
- Schema::table('users', function(Blueprint $table) {
+ Schema::table('users', function (Blueprint $table) {
$table->dropColumn('birthday');
});
- Schema::table('user_settings', function(Blueprint $table) {
+ Schema::table('user_settings', function (Blueprint $table) {
$table->dropcolumn('birthday_setting');
});
}
diff --git a/database/migrations/2021_05_19_123518_change_birthday_column_type.php b/database/migrations/2021_05_19_123518_change_birthday_column_type.php
index 7fdaf8f310..5f79666d22 100644
--- a/database/migrations/2021_05_19_123518_change_birthday_column_type.php
+++ b/database/migrations/2021_05_19_123518_change_birthday_column_type.php
@@ -4,30 +4,23 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class ChangeBirthdayColumnType extends Migration
-{
+class ChangeBirthdayColumnType extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
//
- Schema::table('users', function(Blueprint $table) {
+ Schema::table('users', function (Blueprint $table) {
$table->datetime('birthday')->default(null)->change();
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
//#
- Schema::table('users', function(Blueprint $table) {
+ Schema::table('users', function (Blueprint $table) {
$table->timestamp('birthday')->default(null)->change();
});
}
diff --git a/database/migrations/2022_10_03_165700_create_calculators.php b/database/migrations/2022_10_03_165700_create_calculators.php
index bb1aebf8c7..b3fa354fb3 100644
--- a/database/migrations/2022_10_03_165700_create_calculators.php
+++ b/database/migrations/2022_10_03_165700_create_calculators.php
@@ -4,15 +4,11 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class CreateCalculators extends Migration
-{
+class CreateCalculators extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
Schema::create('criteria', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -23,10 +19,10 @@ public function up()
$table->string('summary', 256)->nullable()->default(null);
$table->boolean('is_guide_active')->default(0);
$table->integer('base_value')->nullable()->default(null);
-
+
$table->foreign('currency_id')->references('id')->on('currencies');
});
-
+
Schema::create('criterion_steps', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -45,10 +41,10 @@ public function up()
$table->integer('order')->unsigned()->default(1);
// For a default example image for the guide
$table->boolean('has_image')->default(0);
-
+
$table->foreign('criterion_id')->references('id')->on('criteria');
});
-
+
Schema::create('criterion_step_options', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -63,18 +59,15 @@ public function up()
$table->text('parsed_description')->nullable()->default(null);
$table->float('amount')->nullable()->default(null);
$table->integer('order')->unsigned()->default(1);
-
+
$table->foreign('criterion_step_id')->references('id')->on('criterion_steps');
});
}
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('criterion_step_options');
Schema::dropIfExists('criterion_steps');
Schema::dropIfExists('criteria');
diff --git a/database/migrations/2022_10_09_203539_add_calculator_relationships.php b/database/migrations/2022_10_09_203539_add_calculator_relationships.php
index 2fd3dae377..2c326d7625 100644
--- a/database/migrations/2022_10_09_203539_add_calculator_relationships.php
+++ b/database/migrations/2022_10_09_203539_add_calculator_relationships.php
@@ -4,15 +4,11 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
-class AddCalculatorRelationships extends Migration
-{
+class AddCalculatorRelationships extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
- public function up()
- {
+ public function up() {
Schema::create('prompt_criteria', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -20,7 +16,7 @@ public function up()
$table->integer('prompt_id')->unsigned();
$table->text('min_requirements')->nullable()->default(null);
});
-
+
Schema::create('gallery_criteria', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
@@ -32,11 +28,8 @@ public function up()
/**
* Reverse the migrations.
- *
- * @return void
*/
- public function down()
- {
+ public function down() {
Schema::dropIfExists('prompt_criteria');
Schema::dropIfExists('gallery_criteria');
}
diff --git a/database/migrations/2022_11_21_170405_add_rounding_to_criteria.php b/database/migrations/2022_11_21_170405_add_rounding_to_criteria.php
index c1e8f55e1b..dfe5fd55c7 100644
--- a/database/migrations/2022_11_21_170405_add_rounding_to_criteria.php
+++ b/database/migrations/2022_11_21_170405_add_rounding_to_criteria.php
@@ -7,8 +7,6 @@
class AddRoundingToCriteria extends Migration {
/**
* Run the migrations.
- *
- * @return void
*/
public function up() {
Schema::table('criteria', function (Blueprint $table) {
@@ -19,8 +17,6 @@ public function up() {
/**
* Reverse the migrations.
- *
- * @return void
*/
public function down() {
Schema::table('criteria', function (Blueprint $table) {
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index 77bee88bc2..22b41ff1a1 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.php
@@ -1,25 +1,20 @@
call(UsersTableSeeder::class);
-
- // create admin
- $user = User::create([
- 'name' => 'Admin',
- 'email' => 'admin@admin.com',
+ // create admin
+ $user = User::create([
+ 'name' => 'Admin',
+ 'email' => 'admin@admin.com',
'password' => Hash::make('admin'),
]);
$user->settings()->create([
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000000..6df49c8b02
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,18449 @@
+{
+ "name": "Fenroos",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "devDependencies": {
+ "axios": "^1.6.0",
+ "blade-formatter": "^1.38.5",
+ "bootstrap": "^4.6",
+ "cross-env": "^7.0",
+ "jquery": "^3.7",
+ "laravel-mix": "^6.0.49",
+ "lodash": "^4.17.21",
+ "popper.js": "^1.16",
+ "resolve-url-loader": "^5.0.0",
+ "sass": "^1.69.5",
+ "sass-loader": "^13.3.2",
+ "vue": "^3.3.7"
+ }
+ },
+ "node_modules/@alloc/quick-lru": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
+ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@ampproject/remapping": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/code-frame": {
+ "version": "7.22.13",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
+ "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/highlight": "^7.22.13",
+ "chalk": "^2.4.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/code-frame/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/code-frame/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/code-frame/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/@babel/code-frame/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "node_modules/@babel/code-frame/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/code-frame/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz",
+ "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz",
+ "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==",
+ "dev": true,
+ "dependencies": {
+ "@ampproject/remapping": "^2.2.0",
+ "@babel/code-frame": "^7.22.13",
+ "@babel/generator": "^7.23.0",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helpers": "^7.23.2",
+ "@babel/parser": "^7.23.0",
+ "@babel/template": "^7.22.15",
+ "@babel/traverse": "^7.23.2",
+ "@babel/types": "^7.23.0",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/@babel/core/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/generator": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
+ "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.23.0",
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jsesc": "^2.5.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-annotate-as-pure": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz",
+ "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz",
+ "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz",
+ "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.22.9",
+ "@babel/helper-validator-option": "^7.22.15",
+ "browserslist": "^4.21.9",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/helper-create-class-features-plugin": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz",
+ "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.5",
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/helper-member-expression-to-functions": "^7.22.15",
+ "@babel/helper-optimise-call-expression": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.9",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/helper-create-regexp-features-plugin": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz",
+ "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "regexpu-core": "^5.3.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/helper-define-polyfill-provider": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz",
+ "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.22.6",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "debug": "^4.1.1",
+ "lodash.debounce": "^4.0.8",
+ "resolve": "^1.14.2"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/@babel/helper-environment-visitor": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
+ "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-function-name": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
+ "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.23.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-hoist-variables": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
+ "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-member-expression-to-functions": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz",
+ "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.23.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
+ "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz",
+ "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-module-imports": "^7.22.15",
+ "@babel/helper-simple-access": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/helper-validator-identifier": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-optimise-call-expression": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz",
+ "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-plugin-utils": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",
+ "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-remap-async-to-generator": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz",
+ "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-wrap-function": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-replace-supers": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz",
+ "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-member-expression-to-functions": "^7.22.15",
+ "@babel/helper-optimise-call-expression": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-simple-access": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
+ "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-skip-transparent-expression-wrappers": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz",
+ "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-split-export-declaration": {
+ "version": "7.22.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
+ "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
+ "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz",
+ "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-wrap-function": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz",
+ "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.22.19"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz",
+ "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/template": "^7.22.15",
+ "@babel/traverse": "^7.23.2",
+ "@babel/types": "^7.23.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
+ "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.22.20",
+ "chalk": "^2.4.2",
+ "js-tokens": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "node_modules/@babel/highlight/node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/highlight/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
+ "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
+ "dev": true,
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz",
+ "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz",
+ "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/plugin-transform-optional-chaining": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.13.0"
+ }
+ },
+ "node_modules/@babel/plugin-proposal-object-rest-spread": {
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz",
+ "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==",
+ "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.20.5",
+ "@babel/helper-compilation-targets": "^7.20.7",
+ "@babel/helper-plugin-utils": "^7.20.2",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-transform-parameters": "^7.20.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-proposal-private-property-in-object": {
+ "version": "7.21.0-placeholder-for-preset-env.2",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",
+ "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-async-generators": {
+ "version": "7.8.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+ "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-class-properties": {
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
+ "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.12.13"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-class-static-block": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz",
+ "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-dynamic-import": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-export-namespace-from": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz",
+ "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.3"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-import-assertions": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz",
+ "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-import-attributes": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz",
+ "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-import-meta": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
+ "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-json-strings": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+ "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-logical-assignment-operators": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+ "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+ "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-numeric-separator": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+ "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-object-rest-spread": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+ "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-optional-catch-binding": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+ "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-optional-chaining": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
+ "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-private-property-in-object": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz",
+ "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-top-level-await": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
+ "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-unicode-sets-regex": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz",
+ "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.18.6",
+ "@babel/helper-plugin-utils": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-arrow-functions": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz",
+ "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-async-generator-functions": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz",
+ "integrity": "sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-remap-async-to-generator": "^7.22.20",
+ "@babel/plugin-syntax-async-generators": "^7.8.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-async-to-generator": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz",
+ "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-remap-async-to-generator": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-block-scoped-functions": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz",
+ "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-block-scoping": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz",
+ "integrity": "sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-class-properties": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz",
+ "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-class-static-block": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz",
+ "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.22.11",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-class-static-block": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.12.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-classes": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz",
+ "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-environment-visitor": "^7.22.5",
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/helper-optimise-call-expression": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.9",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "globals": "^11.1.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-computed-properties": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz",
+ "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/template": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-destructuring": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz",
+ "integrity": "sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-dotall-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz",
+ "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-duplicate-keys": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz",
+ "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-dynamic-import": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz",
+ "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-exponentiation-operator": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz",
+ "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-export-namespace-from": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz",
+ "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-export-namespace-from": "^7.8.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-for-of": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz",
+ "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-function-name": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz",
+ "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.22.5",
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-json-strings": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz",
+ "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-json-strings": "^7.8.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz",
+ "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-logical-assignment-operators": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz",
+ "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-member-expression-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz",
+ "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-amd": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz",
+ "integrity": "sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-commonjs": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz",
+ "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-simple-access": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-systemjs": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz",
+ "integrity": "sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-hoist-variables": "^7.22.5",
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-umd": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz",
+ "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz",
+ "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-new-target": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz",
+ "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-nullish-coalescing-operator": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz",
+ "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-numeric-separator": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz",
+ "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-object-rest-spread": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz",
+ "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.22.9",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-transform-parameters": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-object-super": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz",
+ "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-optional-catch-binding": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz",
+ "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-optional-chaining": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz",
+ "integrity": "sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-parameters": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz",
+ "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-private-methods": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz",
+ "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-private-property-in-object": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz",
+ "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-create-class-features-plugin": "^7.22.11",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-property-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz",
+ "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-regenerator": {
+ "version": "7.22.10",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz",
+ "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "regenerator-transform": "^0.15.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-reserved-words": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz",
+ "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-runtime": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.2.tgz",
+ "integrity": "sha512-XOntj6icgzMS58jPVtQpiuF6ZFWxQiJavISGx5KGjRj+3gqZr8+N6Kx+N9BApWzgS+DOjIZfXXj0ZesenOWDyA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "babel-plugin-polyfill-corejs2": "^0.4.6",
+ "babel-plugin-polyfill-corejs3": "^0.8.5",
+ "babel-plugin-polyfill-regenerator": "^0.5.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-runtime/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/plugin-transform-shorthand-properties": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz",
+ "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-spread": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz",
+ "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-sticky-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz",
+ "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-template-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz",
+ "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-typeof-symbol": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz",
+ "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-escapes": {
+ "version": "7.22.10",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz",
+ "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-property-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz",
+ "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz",
+ "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-sets-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz",
+ "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/preset-env": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.2.tgz",
+ "integrity": "sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.23.2",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-validator-option": "^7.22.15",
+ "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15",
+ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15",
+ "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
+ "@babel/plugin-syntax-async-generators": "^7.8.4",
+ "@babel/plugin-syntax-class-properties": "^7.12.13",
+ "@babel/plugin-syntax-class-static-block": "^7.14.5",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+ "@babel/plugin-syntax-export-namespace-from": "^7.8.3",
+ "@babel/plugin-syntax-import-assertions": "^7.22.5",
+ "@babel/plugin-syntax-import-attributes": "^7.22.5",
+ "@babel/plugin-syntax-import-meta": "^7.10.4",
+ "@babel/plugin-syntax-json-strings": "^7.8.3",
+ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3",
+ "@babel/plugin-syntax-private-property-in-object": "^7.14.5",
+ "@babel/plugin-syntax-top-level-await": "^7.14.5",
+ "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
+ "@babel/plugin-transform-arrow-functions": "^7.22.5",
+ "@babel/plugin-transform-async-generator-functions": "^7.23.2",
+ "@babel/plugin-transform-async-to-generator": "^7.22.5",
+ "@babel/plugin-transform-block-scoped-functions": "^7.22.5",
+ "@babel/plugin-transform-block-scoping": "^7.23.0",
+ "@babel/plugin-transform-class-properties": "^7.22.5",
+ "@babel/plugin-transform-class-static-block": "^7.22.11",
+ "@babel/plugin-transform-classes": "^7.22.15",
+ "@babel/plugin-transform-computed-properties": "^7.22.5",
+ "@babel/plugin-transform-destructuring": "^7.23.0",
+ "@babel/plugin-transform-dotall-regex": "^7.22.5",
+ "@babel/plugin-transform-duplicate-keys": "^7.22.5",
+ "@babel/plugin-transform-dynamic-import": "^7.22.11",
+ "@babel/plugin-transform-exponentiation-operator": "^7.22.5",
+ "@babel/plugin-transform-export-namespace-from": "^7.22.11",
+ "@babel/plugin-transform-for-of": "^7.22.15",
+ "@babel/plugin-transform-function-name": "^7.22.5",
+ "@babel/plugin-transform-json-strings": "^7.22.11",
+ "@babel/plugin-transform-literals": "^7.22.5",
+ "@babel/plugin-transform-logical-assignment-operators": "^7.22.11",
+ "@babel/plugin-transform-member-expression-literals": "^7.22.5",
+ "@babel/plugin-transform-modules-amd": "^7.23.0",
+ "@babel/plugin-transform-modules-commonjs": "^7.23.0",
+ "@babel/plugin-transform-modules-systemjs": "^7.23.0",
+ "@babel/plugin-transform-modules-umd": "^7.22.5",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5",
+ "@babel/plugin-transform-new-target": "^7.22.5",
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11",
+ "@babel/plugin-transform-numeric-separator": "^7.22.11",
+ "@babel/plugin-transform-object-rest-spread": "^7.22.15",
+ "@babel/plugin-transform-object-super": "^7.22.5",
+ "@babel/plugin-transform-optional-catch-binding": "^7.22.11",
+ "@babel/plugin-transform-optional-chaining": "^7.23.0",
+ "@babel/plugin-transform-parameters": "^7.22.15",
+ "@babel/plugin-transform-private-methods": "^7.22.5",
+ "@babel/plugin-transform-private-property-in-object": "^7.22.11",
+ "@babel/plugin-transform-property-literals": "^7.22.5",
+ "@babel/plugin-transform-regenerator": "^7.22.10",
+ "@babel/plugin-transform-reserved-words": "^7.22.5",
+ "@babel/plugin-transform-shorthand-properties": "^7.22.5",
+ "@babel/plugin-transform-spread": "^7.22.5",
+ "@babel/plugin-transform-sticky-regex": "^7.22.5",
+ "@babel/plugin-transform-template-literals": "^7.22.5",
+ "@babel/plugin-transform-typeof-symbol": "^7.22.5",
+ "@babel/plugin-transform-unicode-escapes": "^7.22.10",
+ "@babel/plugin-transform-unicode-property-regex": "^7.22.5",
+ "@babel/plugin-transform-unicode-regex": "^7.22.5",
+ "@babel/plugin-transform-unicode-sets-regex": "^7.22.5",
+ "@babel/preset-modules": "0.1.6-no-external-plugins",
+ "@babel/types": "^7.23.0",
+ "babel-plugin-polyfill-corejs2": "^0.4.6",
+ "babel-plugin-polyfill-corejs3": "^0.8.5",
+ "babel-plugin-polyfill-regenerator": "^0.5.3",
+ "core-js-compat": "^3.31.0",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/preset-env/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/@babel/preset-modules": {
+ "version": "0.1.6-no-external-plugins",
+ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz",
+ "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/types": "^7.4.4",
+ "esutils": "^2.0.2"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/@babel/regjsgen": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz",
+ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==",
+ "dev": true
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz",
+ "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==",
+ "dev": true,
+ "dependencies": {
+ "regenerator-runtime": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/runtime-corejs3": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.23.2.tgz",
+ "integrity": "sha512-54cIh74Z1rp4oIjsHjqN+WM4fMyCBYe+LpZ9jWm51CZ1fbH3SkAzQD/3XLoNkjbJ7YEmjobLXyvQrFypRHOrXw==",
+ "dev": true,
+ "dependencies": {
+ "core-js-pure": "^3.30.2",
+ "regenerator-runtime": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
+ "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.22.13",
+ "@babel/parser": "^7.22.15",
+ "@babel/types": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
+ "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.22.13",
+ "@babel/generator": "^7.23.0",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-function-name": "^7.23.0",
+ "@babel/helper-hoist-variables": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/parser": "^7.23.0",
+ "@babel/types": "^7.23.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
+ "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20",
+ "to-fast-properties": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@colors/colors": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
+ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
+ "dev": true,
+ "optional": true,
+ "engines": {
+ "node": ">=0.1.90"
+ }
+ },
+ "node_modules/@discoveryjs/json-ext": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
+ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/source-map": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",
+ "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.15",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+ "dev": true
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.20",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
+ "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "node_modules/@leichtgewicht/ip-codec": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
+ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==",
+ "dev": true
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@one-ini/wasm": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz",
+ "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==",
+ "dev": true
+ },
+ "node_modules/@prettier/plugin-php": {
+ "version": "0.19.7",
+ "resolved": "https://registry.npmjs.org/@prettier/plugin-php/-/plugin-php-0.19.7.tgz",
+ "integrity": "sha512-QOzBs05nwuR92uak7xBHf7RCZCFXml+6Sk3cjTp2ahQlilBtupqlNjitlTXsOfPIAYwlFgLP1oSfyapS6DN00w==",
+ "dev": true,
+ "dependencies": {
+ "linguist-languages": "^7.21.0",
+ "mem": "^8.0.0",
+ "php-parser": "^3.1.5"
+ },
+ "peerDependencies": {
+ "prettier": "^1.15.0 || ^2.0.0"
+ }
+ },
+ "node_modules/@shufo/tailwindcss-class-sorter": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@shufo/tailwindcss-class-sorter/-/tailwindcss-class-sorter-3.0.1.tgz",
+ "integrity": "sha512-y9SMobvwElX2G6vdg4odJ6UL6hu/o5RlMsdwEeDLGaqHU3BLSw9CeitGgBus6kadjjDdT2wseG0Tl5yXWdc4UQ==",
+ "dev": true,
+ "dependencies": {
+ "escalade": "^3.1.1",
+ "object-hash": "^3.0.0",
+ "tailwindcss": "^3.3.2"
+ },
+ "engines": {
+ "node": ">= 14.0.0"
+ }
+ },
+ "node_modules/@trysound/sax": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz",
+ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/@types/babel__core": {
+ "version": "7.20.3",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.3.tgz",
+ "integrity": "sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
+ "@types/babel__generator": "*",
+ "@types/babel__template": "*",
+ "@types/babel__traverse": "*"
+ }
+ },
+ "node_modules/@types/babel__generator": {
+ "version": "7.6.6",
+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.6.tgz",
+ "integrity": "sha512-66BXMKb/sUWbMdBNdMvajU7i/44RkrA3z/Yt1c7R5xejt8qh84iU54yUWCtm0QwGJlDcf/gg4zd/x4mpLAlb/w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__template": {
+ "version": "7.4.3",
+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.3.tgz",
+ "integrity": "sha512-ciwyCLeuRfxboZ4isgdNZi/tkt06m8Tw6uGbBSBgWrnnZGNXiEyM27xc/PjXGQLqlZ6ylbgHMnm7ccF9tCkOeQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/parser": "^7.1.0",
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "node_modules/@types/babel__traverse": {
+ "version": "7.20.3",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.3.tgz",
+ "integrity": "sha512-Lsh766rGEFbaxMIDH7Qa+Yha8cMVI3qAK6CHt3OR0YfxOIn5Z54iHiyDRycHrBqeIiqGa20Kpsv1cavfBKkRSw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.20.7"
+ }
+ },
+ "node_modules/@types/body-parser": {
+ "version": "1.19.4",
+ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.4.tgz",
+ "integrity": "sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==",
+ "dev": true,
+ "dependencies": {
+ "@types/connect": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/bonjour": {
+ "version": "3.5.12",
+ "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.12.tgz",
+ "integrity": "sha512-ky0kWSqXVxSqgqJvPIkgFkcn4C8MnRog308Ou8xBBIVo39OmUFy+jqNe0nPwLCDFxUpmT9EvT91YzOJgkDRcFg==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/clean-css": {
+ "version": "4.2.9",
+ "resolved": "https://registry.npmjs.org/@types/clean-css/-/clean-css-4.2.9.tgz",
+ "integrity": "sha512-pjzJ4n5eAXAz/L5Zur4ZymuJUvyo0Uh0iRnRI/1kADFLs76skDky0K0dX1rlv4iXXrJXNk3sxRWVJR7CMDroWA==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/@types/connect": {
+ "version": "3.4.37",
+ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.37.tgz",
+ "integrity": "sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/connect-history-api-fallback": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.2.tgz",
+ "integrity": "sha512-gX2j9x+NzSh4zOhnRPSdPPmTepS4DfxES0AvIFv3jGv5QyeAJf6u6dY5/BAoAJU9Qq1uTvwOku8SSC2GnCRl6Q==",
+ "dev": true,
+ "dependencies": {
+ "@types/express-serve-static-core": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/eslint": {
+ "version": "8.44.6",
+ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.6.tgz",
+ "integrity": "sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "*",
+ "@types/json-schema": "*"
+ }
+ },
+ "node_modules/@types/eslint-scope": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.6.tgz",
+ "integrity": "sha512-zfM4ipmxVKWdxtDaJ3MP3pBurDXOCoyjvlpE3u6Qzrmw4BPbfm4/ambIeTk/r/J0iq/+2/xp0Fmt+gFvXJY2PQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/eslint": "*",
+ "@types/estree": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz",
+ "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==",
+ "dev": true
+ },
+ "node_modules/@types/express": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.20.tgz",
+ "integrity": "sha512-rOaqlkgEvOW495xErXMsmyX3WKBInbhG5eqojXYi3cGUaLoRDlXa5d52fkfWZT963AZ3v2eZ4MbKE6WpDAGVsw==",
+ "dev": true,
+ "dependencies": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^4.17.33",
+ "@types/qs": "*",
+ "@types/serve-static": "*"
+ }
+ },
+ "node_modules/@types/express-serve-static-core": {
+ "version": "4.17.39",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.39.tgz",
+ "integrity": "sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*",
+ "@types/send": "*"
+ }
+ },
+ "node_modules/@types/glob": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
+ "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
+ "dev": true,
+ "dependencies": {
+ "@types/minimatch": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/http-errors": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.3.tgz",
+ "integrity": "sha512-pP0P/9BnCj1OVvQR2lF41EkDG/lWWnDyA203b/4Fmi2eTyORnBtcDoKDwjWQthELrBvWkMOrvSOnZ8OVlW6tXA==",
+ "dev": true
+ },
+ "node_modules/@types/http-proxy": {
+ "version": "1.17.13",
+ "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.13.tgz",
+ "integrity": "sha512-GkhdWcMNiR5QSQRYnJ+/oXzu0+7JJEPC8vkWXK351BkhjraZF+1W13CUYARUvX9+NqIU2n6YHA4iwywsc/M6Sw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/imagemin": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin/-/imagemin-8.0.3.tgz",
+ "integrity": "sha512-se/hpaYxu5DyvPqmUEwbupmbQSx6JNislk0dkoIgWSmArkj+Ow9pGG9pGz8MRmbQDfGNYNzqwPQKHCUy+K+jpQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/imagemin-gifsicle": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-gifsicle/-/imagemin-gifsicle-7.0.3.tgz",
+ "integrity": "sha512-GQBKOk9doOd0Xp7OvO4QDl7U0Vkwk2Ps7J0rxafdAa7wG9lu7idvZTm8TtSZiRtHENdkW88Kz8OjmjMlgeeC5w==",
+ "dev": true,
+ "dependencies": {
+ "@types/imagemin": "*"
+ }
+ },
+ "node_modules/@types/imagemin-mozjpeg": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-mozjpeg/-/imagemin-mozjpeg-8.0.3.tgz",
+ "integrity": "sha512-+U/ibETP2/oRqeuaaXa67dEpKHfzmfK0OBVC09AR4c1CIFAKjQ5xY+dxH+fjoMQRlwdcRQLkn/ALtnxSl3Xsqw==",
+ "dev": true,
+ "dependencies": {
+ "@types/imagemin": "*"
+ }
+ },
+ "node_modules/@types/imagemin-optipng": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-optipng/-/imagemin-optipng-5.2.3.tgz",
+ "integrity": "sha512-Q80ANbJYn+WgKkWVfx9f7/q4LR6qun4NIiuV1eRWCg8KCAmNrU7ZH16a2hGs9kfkFqyJlhBv6oV9SDXe1vL3aQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/imagemin": "*"
+ }
+ },
+ "node_modules/@types/imagemin-svgo": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-svgo/-/imagemin-svgo-8.0.1.tgz",
+ "integrity": "sha512-YafkdrVAcr38U0Ln1C+L1n4SIZqC47VBHTyxCq7gTUSd1R9MdIvMcrljWlgU1M9O68WZDeQWUrKipKYfEOCOvQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/imagemin": "*",
+ "@types/svgo": "^1"
+ }
+ },
+ "node_modules/@types/json-schema": {
+ "version": "7.0.14",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz",
+ "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==",
+ "dev": true
+ },
+ "node_modules/@types/mime": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.4.tgz",
+ "integrity": "sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==",
+ "dev": true
+ },
+ "node_modules/@types/minimatch": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
+ "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
+ "dev": true
+ },
+ "node_modules/@types/node": {
+ "version": "20.8.9",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz",
+ "integrity": "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==",
+ "dev": true,
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@types/node-forge": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.8.tgz",
+ "integrity": "sha512-vGXshY9vim9CJjrpcS5raqSjEfKlJcWy2HNdgUasR66fAnVEYarrf1ULV4nfvpC1nZq/moA9qyqBcu83x+Jlrg==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/parse-json": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.1.tgz",
+ "integrity": "sha512-3YmXzzPAdOTVljVMkTMBdBEvlOLg2cDQaDhnnhT3nT9uDbnJzjWhKlzb+desT12Y7tGqaN6d+AbozcKzyL36Ng==",
+ "dev": true
+ },
+ "node_modules/@types/qs": {
+ "version": "6.9.9",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz",
+ "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==",
+ "dev": true
+ },
+ "node_modules/@types/range-parser": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.6.tgz",
+ "integrity": "sha512-+0autS93xyXizIYiyL02FCY8N+KkKPhILhcUSA276HxzreZ16kl+cmwvV2qAM/PuCCwPXzOXOWhiPcw20uSFcA==",
+ "dev": true
+ },
+ "node_modules/@types/retry": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
+ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==",
+ "dev": true
+ },
+ "node_modules/@types/send": {
+ "version": "0.17.3",
+ "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.3.tgz",
+ "integrity": "sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==",
+ "dev": true,
+ "dependencies": {
+ "@types/mime": "^1",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/serve-index": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.3.tgz",
+ "integrity": "sha512-4KG+yMEuvDPRrYq5fyVm/I2uqAJSAwZK9VSa+Zf+zUq9/oxSSvy3kkIqyL+jjStv6UCVi8/Aho0NHtB1Fwosrg==",
+ "dev": true,
+ "dependencies": {
+ "@types/express": "*"
+ }
+ },
+ "node_modules/@types/serve-static": {
+ "version": "1.15.4",
+ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.4.tgz",
+ "integrity": "sha512-aqqNfs1XTF0HDrFdlY//+SGUxmdSUbjeRXb5iaZc3x0/vMbYmdw9qvOgHWOyyLFxSSRnUuP5+724zBgfw8/WAw==",
+ "dev": true,
+ "dependencies": {
+ "@types/http-errors": "*",
+ "@types/mime": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/sockjs": {
+ "version": "0.3.35",
+ "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.35.tgz",
+ "integrity": "sha512-tIF57KB+ZvOBpAQwSaACfEu7htponHXaFzP7RfKYgsOS0NoYnn+9+jzp7bbq4fWerizI3dTB4NfAZoyeQKWJLw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/svgo": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/@types/svgo/-/svgo-1.3.6.tgz",
+ "integrity": "sha512-AZU7vQcy/4WFEuwnwsNsJnFwupIpbllH1++LXScN6uxT1Z4zPzdrWG97w4/I7eFKFTvfy/bHFStWjdBAg2Vjug==",
+ "dev": true
+ },
+ "node_modules/@types/ws": {
+ "version": "8.5.8",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.8.tgz",
+ "integrity": "sha512-flUksGIQCnJd6sZ1l5dqCEG/ksaoAg/eUwiLAGTJQcfgvZJKF++Ta4bJA6A5aPSJmsr+xlseHn4KLgVlNnvPTg==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@vue/compiler-core": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.7.tgz",
+ "integrity": "sha512-pACdY6YnTNVLXsB86YD8OF9ihwpolzhhtdLVHhBL6do/ykr6kKXNYABRtNMGrsQXpEXXyAdwvWWkuTbs4MFtPQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/parser": "^7.23.0",
+ "@vue/shared": "3.3.7",
+ "estree-walker": "^2.0.2",
+ "source-map-js": "^1.0.2"
+ }
+ },
+ "node_modules/@vue/compiler-dom": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz",
+ "integrity": "sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==",
+ "dev": true,
+ "dependencies": {
+ "@vue/compiler-core": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "node_modules/@vue/compiler-sfc": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.7.tgz",
+ "integrity": "sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/parser": "^7.23.0",
+ "@vue/compiler-core": "3.3.7",
+ "@vue/compiler-dom": "3.3.7",
+ "@vue/compiler-ssr": "3.3.7",
+ "@vue/reactivity-transform": "3.3.7",
+ "@vue/shared": "3.3.7",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.5",
+ "postcss": "^8.4.31",
+ "source-map-js": "^1.0.2"
+ }
+ },
+ "node_modules/@vue/compiler-ssr": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.7.tgz",
+ "integrity": "sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==",
+ "dev": true,
+ "dependencies": {
+ "@vue/compiler-dom": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "node_modules/@vue/reactivity": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.7.tgz",
+ "integrity": "sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg==",
+ "dev": true,
+ "dependencies": {
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "node_modules/@vue/reactivity-transform": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.7.tgz",
+ "integrity": "sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/parser": "^7.23.0",
+ "@vue/compiler-core": "3.3.7",
+ "@vue/shared": "3.3.7",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.5"
+ }
+ },
+ "node_modules/@vue/runtime-core": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.7.tgz",
+ "integrity": "sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ==",
+ "dev": true,
+ "dependencies": {
+ "@vue/reactivity": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "node_modules/@vue/runtime-dom": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.7.tgz",
+ "integrity": "sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw==",
+ "dev": true,
+ "dependencies": {
+ "@vue/runtime-core": "3.3.7",
+ "@vue/shared": "3.3.7",
+ "csstype": "^3.1.2"
+ }
+ },
+ "node_modules/@vue/server-renderer": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.7.tgz",
+ "integrity": "sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==",
+ "dev": true,
+ "dependencies": {
+ "@vue/compiler-ssr": "3.3.7",
+ "@vue/shared": "3.3.7"
+ },
+ "peerDependencies": {
+ "vue": "3.3.7"
+ }
+ },
+ "node_modules/@vue/shared": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.7.tgz",
+ "integrity": "sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/ast": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
+ "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/helper-numbers": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6"
+ }
+ },
+ "node_modules/@webassemblyjs/floating-point-hex-parser": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",
+ "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-api-error": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",
+ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-buffer": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz",
+ "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-numbers": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",
+ "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/floating-point-hex-parser": "1.11.6",
+ "@webassemblyjs/helper-api-error": "1.11.6",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webassemblyjs/helper-wasm-bytecode": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz",
+ "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/helper-wasm-section": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz",
+ "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-buffer": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/wasm-gen": "1.11.6"
+ }
+ },
+ "node_modules/@webassemblyjs/ieee754": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz",
+ "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==",
+ "dev": true,
+ "dependencies": {
+ "@xtuc/ieee754": "^1.2.0"
+ }
+ },
+ "node_modules/@webassemblyjs/leb128": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz",
+ "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==",
+ "dev": true,
+ "dependencies": {
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webassemblyjs/utf8": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz",
+ "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==",
+ "dev": true
+ },
+ "node_modules/@webassemblyjs/wasm-edit": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz",
+ "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-buffer": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/helper-wasm-section": "1.11.6",
+ "@webassemblyjs/wasm-gen": "1.11.6",
+ "@webassemblyjs/wasm-opt": "1.11.6",
+ "@webassemblyjs/wasm-parser": "1.11.6",
+ "@webassemblyjs/wast-printer": "1.11.6"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-gen": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz",
+ "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/ieee754": "1.11.6",
+ "@webassemblyjs/leb128": "1.11.6",
+ "@webassemblyjs/utf8": "1.11.6"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-opt": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz",
+ "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-buffer": "1.11.6",
+ "@webassemblyjs/wasm-gen": "1.11.6",
+ "@webassemblyjs/wasm-parser": "1.11.6"
+ }
+ },
+ "node_modules/@webassemblyjs/wasm-parser": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz",
+ "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-api-error": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/ieee754": "1.11.6",
+ "@webassemblyjs/leb128": "1.11.6",
+ "@webassemblyjs/utf8": "1.11.6"
+ }
+ },
+ "node_modules/@webassemblyjs/wast-printer": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz",
+ "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==",
+ "dev": true,
+ "dependencies": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "node_modules/@webpack-cli/configtest": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
+ "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
+ "dev": true,
+ "peerDependencies": {
+ "webpack": "4.x.x || 5.x.x",
+ "webpack-cli": "4.x.x"
+ }
+ },
+ "node_modules/@webpack-cli/info": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
+ "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
+ "dev": true,
+ "dependencies": {
+ "envinfo": "^7.7.3"
+ },
+ "peerDependencies": {
+ "webpack-cli": "4.x.x"
+ }
+ },
+ "node_modules/@webpack-cli/serve": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
+ "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
+ "dev": true,
+ "peerDependencies": {
+ "webpack-cli": "4.x.x"
+ },
+ "peerDependenciesMeta": {
+ "webpack-dev-server": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@xtuc/ieee754": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
+ "dev": true
+ },
+ "node_modules/@xtuc/long": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
+ "dev": true
+ },
+ "node_modules/abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true
+ },
+ "node_modules/accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dev": true,
+ "dependencies": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.11.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
+ "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-import-assertions": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
+ "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
+ "dev": true,
+ "peerDependencies": {
+ "acorn": "^8"
+ }
+ },
+ "node_modules/adjust-sourcemap-loader": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz",
+ "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==",
+ "dev": true,
+ "dependencies": {
+ "loader-utils": "^2.0.0",
+ "regex-parser": "^2.2.11"
+ },
+ "engines": {
+ "node": ">=8.9"
+ }
+ },
+ "node_modules/aigle": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/aigle/-/aigle-1.14.1.tgz",
+ "integrity": "sha512-bCmQ65CEebspmpbWFs6ab3S27TNyVH1b5MledX8KoiGxUhsJmPUUGpaoSijhwawNnq5Lt8jbcq7Z7gUAD0nuTw==",
+ "dev": true,
+ "dependencies": {
+ "aigle-core": "^1.0.0"
+ }
+ },
+ "node_modules/aigle-core": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/aigle-core/-/aigle-core-1.0.0.tgz",
+ "integrity": "sha512-uGFWPumk5DLvYnUphNnff+kWC8VeAnjPbbU8ovsSHflKXGX77SD7cAN/aSBCLX3xnoJAM9KdtRgxUygRnSSu7A==",
+ "dev": true
+ },
+ "node_modules/ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-formats": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
+ "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
+ "dev": true,
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ajv-keywords": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
+ "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3"
+ },
+ "peerDependencies": {
+ "ajv": "^8.8.2"
+ }
+ },
+ "node_modules/ansi-html-community": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
+ "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==",
+ "dev": true,
+ "engines": [
+ "node >= 0.8.0"
+ ],
+ "bin": {
+ "ansi-html": "bin/ansi-html"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
+ "dev": true
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/arg": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
+ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
+ "dev": true
+ },
+ "node_modules/array-flatten": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
+ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
+ "dev": true
+ },
+ "node_modules/array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/asn1.js": {
+ "version": "4.10.1",
+ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
+ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.0.0",
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "node_modules/assert": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
+ "integrity": "sha512-N+aAxov+CKVS3JuhDIQFr24XvZvwE96Wlhk9dytTg/GmwWoghdOvR8dspx8MVz71O+Y0pA3UPqHF68D6iy8UvQ==",
+ "dev": true,
+ "dependencies": {
+ "util": "0.10.3"
+ }
+ },
+ "node_modules/assert/node_modules/inherits": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==",
+ "dev": true
+ },
+ "node_modules/assert/node_modules/util": {
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "2.0.1"
+ }
+ },
+ "node_modules/asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "dev": true
+ },
+ "node_modules/autoprefixer": {
+ "version": "10.4.16",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz",
+ "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "browserslist": "^4.21.10",
+ "caniuse-lite": "^1.0.30001538",
+ "fraction.js": "^4.3.6",
+ "normalize-range": "^0.1.2",
+ "picocolors": "^1.0.0",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "bin": {
+ "autoprefixer": "bin/autoprefixer"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/axios": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
+ "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
+ "dev": true,
+ "dependencies": {
+ "follow-redirects": "^1.15.0",
+ "form-data": "^4.0.0",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
+ "node_modules/babel-loader": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz",
+ "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==",
+ "dev": true,
+ "dependencies": {
+ "find-cache-dir": "^3.3.1",
+ "loader-utils": "^2.0.0",
+ "make-dir": "^3.1.0",
+ "schema-utils": "^2.6.5"
+ },
+ "engines": {
+ "node": ">= 8.9"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0",
+ "webpack": ">=2"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-corejs2": {
+ "version": "0.4.6",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz",
+ "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.22.6",
+ "@babel/helper-define-polyfill-provider": "^0.4.3",
+ "semver": "^6.3.1"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-corejs3": {
+ "version": "0.8.6",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz",
+ "integrity": "sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.4.3",
+ "core-js-compat": "^3.33.1"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-regenerator": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz",
+ "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.4.3"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/base64-js": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
+ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
+ "dev": true
+ },
+ "node_modules/batch": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
+ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==",
+ "dev": true
+ },
+ "node_modules/big.js": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
+ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/blade-formatter": {
+ "version": "1.38.5",
+ "resolved": "https://registry.npmjs.org/blade-formatter/-/blade-formatter-1.38.5.tgz",
+ "integrity": "sha512-J4JintmlH0yIIcTpVe5qtbSaXlyTD5vXOWkY7ns7sk6LIIZFFOn8k1yECv13EGsaDmb1dGNJsCGDMNeAGpIFdA==",
+ "dev": true,
+ "dependencies": {
+ "@prettier/plugin-php": "^0.19.7",
+ "@shufo/tailwindcss-class-sorter": "3.0.1",
+ "aigle": "^1.14.1",
+ "ajv": "^8.9.0",
+ "chalk": "^4.1.0",
+ "concat-stream": "^2.0.0",
+ "detect-indent": "^6.0.0",
+ "find-config": "^1.0.0",
+ "glob": "^8.0.1",
+ "html-attribute-sorter": "^0.4.3",
+ "ignore": "^5.1.8",
+ "js-beautify": "^1.14.8",
+ "lodash": "^4.17.19",
+ "php-parser": "3.1.5",
+ "prettier": "^2.2.0",
+ "tailwindcss": "^3.1.8",
+ "vscode-oniguruma": "1.7.0",
+ "vscode-textmate": "^7.0.1",
+ "xregexp": "^5.0.1",
+ "yargs": "^17.3.1"
+ },
+ "bin": {
+ "blade-formatter": "bin/blade-formatter.cjs"
+ },
+ "engines": {
+ "node": ">= 14.0.0"
+ }
+ },
+ "node_modules/bn.js": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+ "dev": true
+ },
+ "node_modules/body-parser": {
+ "version": "1.20.1",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
+ "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "dev": true,
+ "dependencies": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.11.0",
+ "raw-body": "2.5.1",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/body-parser/node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/body-parser/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/body-parser/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/bonjour-service": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.1.1.tgz",
+ "integrity": "sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg==",
+ "dev": true,
+ "dependencies": {
+ "array-flatten": "^2.1.2",
+ "dns-equal": "^1.0.0",
+ "fast-deep-equal": "^3.1.3",
+ "multicast-dns": "^7.2.5"
+ }
+ },
+ "node_modules/boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
+ "dev": true
+ },
+ "node_modules/bootstrap": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz",
+ "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/twbs"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/bootstrap"
+ }
+ ],
+ "peerDependencies": {
+ "jquery": "1.9.1 - 3",
+ "popper.js": "^1.16.1"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/brorand": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==",
+ "dev": true
+ },
+ "node_modules/browserify-aes": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
+ "dev": true,
+ "dependencies": {
+ "buffer-xor": "^1.0.3",
+ "cipher-base": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.3",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/browserify-cipher": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
+ "dev": true,
+ "dependencies": {
+ "browserify-aes": "^1.0.4",
+ "browserify-des": "^1.0.0",
+ "evp_bytestokey": "^1.0.0"
+ }
+ },
+ "node_modules/browserify-des": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
+ "dev": true,
+ "dependencies": {
+ "cipher-base": "^1.0.1",
+ "des.js": "^1.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/browserify-rsa": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
+ "integrity": "sha512-+YpEyaLDDvvdzIxQ+cCx73r5YEhS3ANGOkiHdyWqW4t3gdeoNEYjSiQwntbU4Uo2/9yRkpYX3SRFeH+7jc2Duw==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.1.0",
+ "randombytes": "^2.0.1"
+ }
+ },
+ "node_modules/browserify-sign": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
+ "integrity": "sha512-D2ItxCwNtLcHRrOCuEDZQlIezlFyUV/N5IYz6TY1svu1noyThFuthoEjzT8ChZe3UEctqnwmykcPhet3Eiz58A==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.1.1",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.2",
+ "elliptic": "^6.0.0",
+ "inherits": "^2.0.1",
+ "parse-asn1": "^5.0.0"
+ }
+ },
+ "node_modules/browserify-zlib": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
+ "dev": true,
+ "dependencies": {
+ "pako": "~1.0.5"
+ }
+ },
+ "node_modules/browserslist": {
+ "version": "4.22.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz",
+ "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001541",
+ "electron-to-chromium": "^1.4.535",
+ "node-releases": "^2.0.13",
+ "update-browserslist-db": "^1.0.13"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "4.9.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
+ "integrity": "sha512-DNK4ruAqtyHaN8Zne7PkBTO+dD1Lr0YfTduMqlIyjvQIoztBkUxrvL+hKeLW8NXFKHOq/2upkxuoS9znQ9bW9A==",
+ "deprecated": "This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer",
+ "dev": true,
+ "dependencies": {
+ "base64-js": "^1.0.2",
+ "ieee754": "^1.1.4",
+ "isarray": "^1.0.0"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+ "dev": true
+ },
+ "node_modules/buffer-xor": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+ "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==",
+ "dev": true
+ },
+ "node_modules/builtin-status-codes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+ "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==",
+ "dev": true
+ },
+ "node_modules/bytes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/camel-case": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
+ "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
+ "dev": true,
+ "dependencies": {
+ "pascal-case": "^3.1.2",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/camelcase-css": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
+ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/caniuse-api": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
+ "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.0.0",
+ "caniuse-lite": "^1.0.0",
+ "lodash.memoize": "^4.1.2",
+ "lodash.uniq": "^4.5.0"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001558",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001558.tgz",
+ "integrity": "sha512-/Et7DwLqpjS47JPEcz6VnxU9PwcIdVi0ciLXRWBQdj1XFye68pSQYpV0QtPTfUKWuOaEig+/Vez2l74eDc1tPQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ]
+ },
+ "node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/charenc": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
+ "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chrome-trace-event": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
+ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0"
+ }
+ },
+ "node_modules/cipher-base": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/clean-css": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz",
+ "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==",
+ "dev": true,
+ "dependencies": {
+ "source-map": "~0.6.0"
+ },
+ "engines": {
+ "node": ">= 10.0"
+ }
+ },
+ "node_modules/cli-table3": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz",
+ "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.2.0"
+ },
+ "engines": {
+ "node": "10.* || >= 12.*"
+ },
+ "optionalDependencies": {
+ "@colors/colors": "1.5.0"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/clone-deep": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
+ "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
+ "dev": true,
+ "dependencies": {
+ "is-plain-object": "^2.0.4",
+ "kind-of": "^6.0.2",
+ "shallow-clone": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/collect.js": {
+ "version": "4.36.1",
+ "resolved": "https://registry.npmjs.org/collect.js/-/collect.js-4.36.1.tgz",
+ "integrity": "sha512-jd97xWPKgHn6uvK31V6zcyPd40lUJd7gpYxbN2VOVxGWO4tyvS9Li4EpsFjXepGTo2tYcOTC4a8YsbQXMJ4XUw==",
+ "dev": true
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/colord": {
+ "version": "2.9.3",
+ "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
+ "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==",
+ "dev": true
+ },
+ "node_modules/colorette": {
+ "version": "2.0.20",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
+ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
+ "dev": true
+ },
+ "node_modules/combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
+ "dependencies": {
+ "delayed-stream": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/commander": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
+ "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
+ "dev": true,
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true
+ },
+ "node_modules/compressible": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": ">= 1.43.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/compression": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
+ "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
+ "dev": true,
+ "dependencies": {
+ "accepts": "~1.3.5",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.16",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.2",
+ "safe-buffer": "5.1.2",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/compression/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/compression/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/compression/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/concat": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/concat/-/concat-1.0.3.tgz",
+ "integrity": "sha512-f/ZaH1aLe64qHgTILdldbvyfGiGF4uzeo9IuXUloIOLQzFmIPloy9QbZadNsuVv0j5qbKQvQb/H/UYf2UsKTpw==",
+ "dev": true,
+ "dependencies": {
+ "commander": "^2.9.0"
+ },
+ "bin": {
+ "concat": "bin/concat"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/concat-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
+ "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
+ "dev": true,
+ "engines": [
+ "node >= 6.0"
+ ],
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.0.2",
+ "typedarray": "^0.0.6"
+ }
+ },
+ "node_modules/concat/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "node_modules/config-chain": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
+ "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
+ "dev": true,
+ "dependencies": {
+ "ini": "^1.3.4",
+ "proto-list": "~1.2.1"
+ }
+ },
+ "node_modules/connect-history-api-fallback": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz",
+ "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/consola": {
+ "version": "2.15.3",
+ "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz",
+ "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==",
+ "dev": true
+ },
+ "node_modules/console-browserify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
+ "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==",
+ "dev": true,
+ "dependencies": {
+ "date-now": "^0.1.4"
+ }
+ },
+ "node_modules/constants-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+ "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==",
+ "dev": true
+ },
+ "node_modules/content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "5.2.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "dev": true
+ },
+ "node_modules/cookie": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+ "dev": true
+ },
+ "node_modules/core-js-compat": {
+ "version": "3.33.1",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.1.tgz",
+ "integrity": "sha512-6pYKNOgD/j/bkC5xS5IIg6bncid3rfrI42oBH1SQJbsmYPKF7rhzcFzYCcxYMmNQQ0rCEB8WqpW7QHndOggaeQ==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.22.1"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
+ "node_modules/core-js-pure": {
+ "version": "3.33.1",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.33.1.tgz",
+ "integrity": "sha512-wCXGbLjnsP10PlK/thHSQlOLlLKNEkaWbTzVvHHZ79fZNeN1gUmw2gBlpItxPv/pvqldevEXFh/d5stdNvl6EQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
+ "node_modules/core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==",
+ "dev": true
+ },
+ "node_modules/cosmiconfig": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==",
+ "dev": true,
+ "dependencies": {
+ "@types/parse-json": "^4.0.0",
+ "import-fresh": "^3.2.1",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0",
+ "yaml": "^1.10.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/create-ecdh": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
+ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.1.0",
+ "elliptic": "^6.0.0"
+ }
+ },
+ "node_modules/create-hash": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+ "dev": true,
+ "dependencies": {
+ "cipher-base": "^1.0.1",
+ "inherits": "^2.0.1",
+ "md5.js": "^1.3.4",
+ "ripemd160": "^2.0.1",
+ "sha.js": "^2.4.0"
+ }
+ },
+ "node_modules/create-hmac": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+ "dev": true,
+ "dependencies": {
+ "cipher-base": "^1.0.3",
+ "create-hash": "^1.1.0",
+ "inherits": "^2.0.1",
+ "ripemd160": "^2.0.0",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "node_modules/cross-env": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
+ "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
+ "dev": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.1"
+ },
+ "bin": {
+ "cross-env": "src/bin/cross-env.js",
+ "cross-env-shell": "src/bin/cross-env-shell.js"
+ },
+ "engines": {
+ "node": ">=10.14",
+ "npm": ">=6",
+ "yarn": ">=1"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/crypt": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
+ "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/crypto-browserify": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
+ "dev": true,
+ "dependencies": {
+ "browserify-cipher": "^1.0.0",
+ "browserify-sign": "^4.0.0",
+ "create-ecdh": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.0",
+ "diffie-hellman": "^5.0.0",
+ "inherits": "^2.0.1",
+ "pbkdf2": "^3.0.3",
+ "public-encrypt": "^4.0.0",
+ "randombytes": "^2.0.0",
+ "randomfill": "^1.0.3"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/css-declaration-sorter": {
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz",
+ "integrity": "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.0.9"
+ }
+ },
+ "node_modules/css-loader": {
+ "version": "5.2.7",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.2.7.tgz",
+ "integrity": "sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg==",
+ "dev": true,
+ "dependencies": {
+ "icss-utils": "^5.1.0",
+ "loader-utils": "^2.0.0",
+ "postcss": "^8.2.15",
+ "postcss-modules-extract-imports": "^3.0.0",
+ "postcss-modules-local-by-default": "^4.0.0",
+ "postcss-modules-scope": "^3.0.0",
+ "postcss-modules-values": "^4.0.0",
+ "postcss-value-parser": "^4.1.0",
+ "schema-utils": "^3.0.0",
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.27.0 || ^5.0.0"
+ }
+ },
+ "node_modules/css-loader/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/css-loader/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/css-loader/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/css-loader/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/css-select": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz",
+ "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==",
+ "dev": true,
+ "dependencies": {
+ "boolbase": "^1.0.0",
+ "css-what": "^6.0.1",
+ "domhandler": "^4.3.1",
+ "domutils": "^2.8.0",
+ "nth-check": "^2.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/css-select/node_modules/domhandler": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
+ "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
+ "dev": true,
+ "dependencies": {
+ "domelementtype": "^2.2.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
+ "node_modules/css-tree": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
+ "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
+ "dev": true,
+ "dependencies": {
+ "mdn-data": "2.0.14",
+ "source-map": "^0.6.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/css-what": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
+ "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/fb55"
+ }
+ },
+ "node_modules/cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "dev": true,
+ "bin": {
+ "cssesc": "bin/cssesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/cssnano": {
+ "version": "5.1.15",
+ "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.15.tgz",
+ "integrity": "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==",
+ "dev": true,
+ "dependencies": {
+ "cssnano-preset-default": "^5.2.14",
+ "lilconfig": "^2.0.3",
+ "yaml": "^1.10.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/cssnano"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/cssnano-preset-default": {
+ "version": "5.2.14",
+ "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz",
+ "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==",
+ "dev": true,
+ "dependencies": {
+ "css-declaration-sorter": "^6.3.1",
+ "cssnano-utils": "^3.1.0",
+ "postcss-calc": "^8.2.3",
+ "postcss-colormin": "^5.3.1",
+ "postcss-convert-values": "^5.1.3",
+ "postcss-discard-comments": "^5.1.2",
+ "postcss-discard-duplicates": "^5.1.0",
+ "postcss-discard-empty": "^5.1.1",
+ "postcss-discard-overridden": "^5.1.0",
+ "postcss-merge-longhand": "^5.1.7",
+ "postcss-merge-rules": "^5.1.4",
+ "postcss-minify-font-values": "^5.1.0",
+ "postcss-minify-gradients": "^5.1.1",
+ "postcss-minify-params": "^5.1.4",
+ "postcss-minify-selectors": "^5.2.1",
+ "postcss-normalize-charset": "^5.1.0",
+ "postcss-normalize-display-values": "^5.1.0",
+ "postcss-normalize-positions": "^5.1.1",
+ "postcss-normalize-repeat-style": "^5.1.1",
+ "postcss-normalize-string": "^5.1.0",
+ "postcss-normalize-timing-functions": "^5.1.0",
+ "postcss-normalize-unicode": "^5.1.1",
+ "postcss-normalize-url": "^5.1.0",
+ "postcss-normalize-whitespace": "^5.1.1",
+ "postcss-ordered-values": "^5.1.3",
+ "postcss-reduce-initial": "^5.1.2",
+ "postcss-reduce-transforms": "^5.1.0",
+ "postcss-svgo": "^5.1.0",
+ "postcss-unique-selectors": "^5.1.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/cssnano-utils": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz",
+ "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/csso": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
+ "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
+ "dev": true,
+ "dependencies": {
+ "css-tree": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/csstype": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
+ "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==",
+ "dev": true
+ },
+ "node_modules/date-now": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
+ "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==",
+ "dev": true
+ },
+ "node_modules/debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/default-gateway": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
+ "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==",
+ "dev": true,
+ "dependencies": {
+ "execa": "^5.0.0"
+ },
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/define-lazy-prop": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
+ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/des.js": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
+ "integrity": "sha512-QlJHGiTiOmW4z3EO0qKwjM2Mb+EmOlBHbpC6QgTiXB913NxMKttEuV2SJ+eLA12sMKDg1N8HnncfAtYaNnU+cg==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "node_modules/destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8",
+ "npm": "1.2.8000 || >= 1.4.16"
+ }
+ },
+ "node_modules/detect-indent": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
+ "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/detect-node": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz",
+ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
+ "dev": true
+ },
+ "node_modules/didyoumean": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
+ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
+ "dev": true
+ },
+ "node_modules/diffie-hellman": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.1.0",
+ "miller-rabin": "^4.0.0",
+ "randombytes": "^2.0.0"
+ }
+ },
+ "node_modules/dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "dependencies": {
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/dlv": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
+ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
+ "dev": true
+ },
+ "node_modules/dns-equal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+ "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==",
+ "dev": true
+ },
+ "node_modules/dns-packet": {
+ "version": "5.6.1",
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz",
+ "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==",
+ "dev": true,
+ "dependencies": {
+ "@leichtgewicht/ip-codec": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/dom-serializer": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",
+ "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==",
+ "dev": true,
+ "dependencies": {
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.2.0",
+ "entities": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
+ }
+ },
+ "node_modules/dom-serializer/node_modules/domhandler": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
+ "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
+ "dev": true,
+ "dependencies": {
+ "domelementtype": "^2.2.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
+ "node_modules/domain-browser": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4",
+ "npm": ">=1.2"
+ }
+ },
+ "node_modules/domelementtype": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fb55"
+ }
+ ]
+ },
+ "node_modules/domhandler": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz",
+ "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==",
+ "dev": true,
+ "dependencies": {
+ "domelementtype": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
+ "node_modules/domutils": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
+ "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
+ "dev": true,
+ "dependencies": {
+ "dom-serializer": "^1.0.1",
+ "domelementtype": "^2.2.0",
+ "domhandler": "^4.2.0"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domutils?sponsor=1"
+ }
+ },
+ "node_modules/domutils/node_modules/domhandler": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
+ "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
+ "dev": true,
+ "dependencies": {
+ "domelementtype": "^2.2.0"
+ },
+ "engines": {
+ "node": ">= 4"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/domhandler?sponsor=1"
+ }
+ },
+ "node_modules/dot-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
+ "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
+ "dev": true,
+ "dependencies": {
+ "no-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/dotenv": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
+ "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/dotenv-expand": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
+ "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
+ "dev": true
+ },
+ "node_modules/editorconfig": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz",
+ "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==",
+ "dev": true,
+ "dependencies": {
+ "@one-ini/wasm": "0.1.1",
+ "commander": "^10.0.0",
+ "minimatch": "9.0.1",
+ "semver": "^7.5.3"
+ },
+ "bin": {
+ "editorconfig": "bin/editorconfig"
+ },
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/editorconfig/node_modules/minimatch": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
+ "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "dev": true
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.4.569",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz",
+ "integrity": "sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==",
+ "dev": true
+ },
+ "node_modules/elliptic": {
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
+ "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.11.9",
+ "brorand": "^1.1.0",
+ "hash.js": "^1.0.0",
+ "hmac-drbg": "^1.0.1",
+ "inherits": "^2.0.4",
+ "minimalistic-assert": "^1.0.1",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/emojis-list": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
+ "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/enhanced-resolve": {
+ "version": "5.15.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz",
+ "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/entities": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
+ "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/fb55/entities?sponsor=1"
+ }
+ },
+ "node_modules/envinfo": {
+ "version": "7.10.0",
+ "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz",
+ "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==",
+ "dev": true,
+ "bin": {
+ "envinfo": "dist/cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dev": true,
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "node_modules/es-module-lexer": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz",
+ "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==",
+ "dev": true
+ },
+ "node_modules/escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "dev": true
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+ "dev": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^4.1.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esrecurse/node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha512-VHvyaGnJy+FuGfcfaM7W7OZw4mQiKW73jPHwQXx2VnMSUBajYmytOT5sKEfsBvNPtGX6YDwcrGDz2eocoHg0JA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true
+ },
+ "node_modules/esutils": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "integrity": "sha512-UUPPULqkyAV+M3Shodis7l8D+IyX6V8SbaBnTb449jf3fMTd8+UOZI1Q70NbZVOQkcR91yYgdHsJiMMMVmYshg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/eventemitter3": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+ "dev": true
+ },
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.x"
+ }
+ },
+ "node_modules/evp_bytestokey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
+ "dev": true,
+ "dependencies": {
+ "md5.js": "^1.3.4",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "node_modules/execa": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "dev": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.0",
+ "human-signals": "^2.1.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.1",
+ "onetime": "^5.1.2",
+ "signal-exit": "^3.0.3",
+ "strip-final-newline": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/express": {
+ "version": "4.18.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
+ "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
+ "dev": true,
+ "dependencies": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.1",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.5.0",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.2.0",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.11.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.18.0",
+ "serve-static": "1.15.0",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/express/node_modules/array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "dev": true
+ },
+ "node_modules/express/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/express/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+ "integrity": "sha512-eIgZvM9C3P05kg0qxfqaVU6Tma4QedCPIByQOcemV0vju8ot3cS2DpHi4m2G2JvbSMI152rjfLX0p1pkSdyPlQ==",
+ "dev": true
+ },
+ "node_modules/fastest-levenshtein": {
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
+ "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4.9.1"
+ }
+ },
+ "node_modules/fastq": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+ "dev": true,
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/faye-websocket": {
+ "version": "0.11.4",
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
+ "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
+ "dev": true,
+ "dependencies": {
+ "websocket-driver": ">=0.5.1"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/file-loader": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz",
+ "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==",
+ "dev": true,
+ "dependencies": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.0.0 || ^5.0.0"
+ }
+ },
+ "node_modules/file-loader/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/file-loader/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/file-loader/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/file-loader/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/file-type": {
+ "version": "12.4.2",
+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.4.2.tgz",
+ "integrity": "sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/finalhandler": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/finalhandler/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/finalhandler/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/find-cache-dir": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
+ "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
+ "dev": true,
+ "dependencies": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/avajs/find-cache-dir?sponsor=1"
+ }
+ },
+ "node_modules/find-config": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/find-config/-/find-config-1.0.0.tgz",
+ "integrity": "sha512-Z+suHH+7LSE40WfUeZPIxSxypCWvrzdVc60xAjUShZeT5eMWM0/FQUduq3HjluyfAHWvC/aOBkT1pTZktyF/jg==",
+ "dev": true,
+ "dependencies": {
+ "user-home": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 0.12"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/flat": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
+ "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
+ "dev": true,
+ "bin": {
+ "flat": "cli.js"
+ }
+ },
+ "node_modules/follow-redirects": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
+ "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://github.com/sponsors/RubenVerborgh"
+ }
+ ],
+ "engines": {
+ "node": ">=4.0"
+ },
+ "peerDependenciesMeta": {
+ "debug": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "dev": true,
+ "dependencies": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fraction.js": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
+ "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "patreon",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fs-extra": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/fs-monkey": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz",
+ "integrity": "sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==",
+ "dev": true
+ },
+ "node_modules/fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true,
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
+ "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true
+ },
+ "node_modules/globals": {
+ "version": "11.11.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz",
+ "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/globby": {
+ "version": "10.0.2",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz",
+ "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==",
+ "dev": true,
+ "dependencies": {
+ "@types/glob": "^7.1.1",
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.0.3",
+ "glob": "^7.1.3",
+ "ignore": "^5.1.1",
+ "merge2": "^1.2.3",
+ "slash": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/globby/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/globby/node_modules/glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/globby/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true
+ },
+ "node_modules/growly": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
+ "integrity": "sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==",
+ "dev": true
+ },
+ "node_modules/handle-thing": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz",
+ "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==",
+ "dev": true
+ },
+ "node_modules/has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hash-base": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
+ "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/hash-sum": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
+ "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
+ "dev": true
+ },
+ "node_modules/hash.js": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "minimalistic-assert": "^1.0.1"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
+ "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "dev": true,
+ "bin": {
+ "he": "bin/he"
+ }
+ },
+ "node_modules/hmac-drbg": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==",
+ "dev": true,
+ "dependencies": {
+ "hash.js": "^1.0.3",
+ "minimalistic-assert": "^1.0.0",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "node_modules/hpack.js": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
+ "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "obuf": "^1.0.0",
+ "readable-stream": "^2.0.1",
+ "wbuf": "^1.1.0"
+ }
+ },
+ "node_modules/hpack.js/node_modules/readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/hpack.js/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/hpack.js/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/html-attribute-sorter": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/html-attribute-sorter/-/html-attribute-sorter-0.4.3.tgz",
+ "integrity": "sha512-HWSvaXJki44tg0uR1t+j5pRdUVpNiZcJaoB/PFhss/YoAw9cxUDLCpIBbLWQmKjBQfWk91P6LaRnredEyabrDw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 12.0.0"
+ }
+ },
+ "node_modules/html-entities": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.4.0.tgz",
+ "integrity": "sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/mdevils"
+ },
+ {
+ "type": "patreon",
+ "url": "https://patreon.com/mdevils"
+ }
+ ]
+ },
+ "node_modules/html-loader": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-1.3.2.tgz",
+ "integrity": "sha512-DEkUwSd0sijK5PF3kRWspYi56XP7bTNkyg5YWSzBdjaSDmvCufep5c4Vpb3PBf6lUL0YPtLwBfy9fL0t5hBAGA==",
+ "dev": true,
+ "dependencies": {
+ "html-minifier-terser": "^5.1.1",
+ "htmlparser2": "^4.1.0",
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.0.0 || ^5.0.0"
+ }
+ },
+ "node_modules/html-loader/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/html-loader/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/html-loader/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/html-loader/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/html-minifier-terser": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
+ "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==",
+ "dev": true,
+ "dependencies": {
+ "camel-case": "^4.1.1",
+ "clean-css": "^4.2.3",
+ "commander": "^4.1.1",
+ "he": "^1.2.0",
+ "param-case": "^3.0.3",
+ "relateurl": "^0.2.7",
+ "terser": "^4.6.3"
+ },
+ "bin": {
+ "html-minifier-terser": "cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/html-minifier-terser/node_modules/clean-css": {
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz",
+ "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==",
+ "dev": true,
+ "dependencies": {
+ "source-map": "~0.6.0"
+ },
+ "engines": {
+ "node": ">= 4.0"
+ }
+ },
+ "node_modules/html-minifier-terser/node_modules/commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/html-minifier-terser/node_modules/terser": {
+ "version": "4.8.1",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz",
+ "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==",
+ "dev": true,
+ "dependencies": {
+ "commander": "^2.20.0",
+ "source-map": "~0.6.1",
+ "source-map-support": "~0.5.12"
+ },
+ "bin": {
+ "terser": "bin/terser"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/html-minifier-terser/node_modules/terser/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "node_modules/htmlparser2": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz",
+ "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==",
+ "dev": true,
+ "dependencies": {
+ "domelementtype": "^2.0.1",
+ "domhandler": "^3.0.0",
+ "domutils": "^2.0.0",
+ "entities": "^2.0.0"
+ }
+ },
+ "node_modules/http-deceiver": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
+ "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==",
+ "dev": true
+ },
+ "node_modules/http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dev": true,
+ "dependencies": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/http-parser-js": {
+ "version": "0.5.8",
+ "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
+ "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==",
+ "dev": true
+ },
+ "node_modules/http-proxy": {
+ "version": "1.18.1",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+ "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
+ "dev": true,
+ "dependencies": {
+ "eventemitter3": "^4.0.0",
+ "follow-redirects": "^1.0.0",
+ "requires-port": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/http-proxy-middleware": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
+ "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
+ "dev": true,
+ "dependencies": {
+ "@types/http-proxy": "^1.17.8",
+ "http-proxy": "^1.18.1",
+ "is-glob": "^4.0.1",
+ "is-plain-obj": "^3.0.0",
+ "micromatch": "^4.0.2"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "@types/express": "^4.17.13"
+ },
+ "peerDependenciesMeta": {
+ "@types/express": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/https-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+ "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==",
+ "dev": true
+ },
+ "node_modules/human-signals": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.17.0"
+ }
+ },
+ "node_modules/iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dev": true,
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/icss-utils": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
+ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/ieee754": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
+ "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==",
+ "dev": true
+ },
+ "node_modules/ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/imagemin": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz",
+ "integrity": "sha512-33AmZ+xjZhg2JMCe+vDf6a9mzWukE7l+wAtesjE7KyteqqKjzxv7aVQeWnul1Ve26mWvEQqyPwl0OctNBfSR9w==",
+ "dev": true,
+ "dependencies": {
+ "file-type": "^12.0.0",
+ "globby": "^10.0.0",
+ "graceful-fs": "^4.2.2",
+ "junk": "^3.1.0",
+ "make-dir": "^3.0.0",
+ "p-pipe": "^3.0.0",
+ "replace-ext": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/img-loader": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/img-loader/-/img-loader-4.0.0.tgz",
+ "integrity": "sha512-UwRcPQdwdOyEHyCxe1V9s9YFwInwEWCpoO+kJGfIqDrBDqA8jZUsEZTxQ0JteNPGw/Gupmwesk2OhLTcnw6tnQ==",
+ "dev": true,
+ "dependencies": {
+ "loader-utils": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "peerDependencies": {
+ "imagemin": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/img-loader/node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/img-loader/node_modules/loader-utils": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
+ "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "dev": true,
+ "dependencies": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/immutable": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz",
+ "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==",
+ "dev": true
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/import-local": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
+ "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
+ "dev": true,
+ "dependencies": {
+ "pkg-dir": "^4.2.0",
+ "resolve-cwd": "^3.0.0"
+ },
+ "bin": {
+ "import-local-fixture": "fixtures/cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "node_modules/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+ "dev": true
+ },
+ "node_modules/interpret": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
+ "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/ipaddr.js": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz",
+ "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "dev": true
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-buffer": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+ "dev": true
+ },
+ "node_modules/is-core-module": {
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
+ "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+ "dev": true,
+ "dependencies": {
+ "hasown": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "dev": true,
+ "bin": {
+ "is-docker": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
+ "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "dev": true,
+ "dependencies": {
+ "isobject": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "dependencies": {
+ "is-docker": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "dev": true
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "node_modules/isobject": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8= sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/jest-worker": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
+ "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*",
+ "merge-stream": "^2.0.0",
+ "supports-color": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ }
+ },
+ "node_modules/jest-worker/node_modules/supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/jiti": {
+ "version": "1.20.0",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz",
+ "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==",
+ "dev": true,
+ "bin": {
+ "jiti": "bin/jiti.js"
+ }
+ },
+ "node_modules/jquery": {
+ "version": "3.7.1",
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
+ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
+ "dev": true
+ },
+ "node_modules/js-beautify": {
+ "version": "1.14.9",
+ "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.9.tgz",
+ "integrity": "sha512-coM7xq1syLcMyuVGyToxcj2AlzhkDjmfklL8r0JgJ7A76wyGMpJ1oA35mr4APdYNO/o/4YY8H54NQIJzhMbhBg==",
+ "dev": true,
+ "dependencies": {
+ "config-chain": "^1.1.13",
+ "editorconfig": "^1.0.3",
+ "glob": "^8.1.0",
+ "nopt": "^6.0.0"
+ },
+ "bin": {
+ "css-beautify": "js/bin/css-beautify.js",
+ "html-beautify": "js/bin/html-beautify.js",
+ "js-beautify": "js/bin/js-beautify.js"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "node_modules/jsesc": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+ "dev": true,
+ "bin": {
+ "jsesc": "bin/jsesc"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "dev": true
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jsonfile": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dev": true,
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/junk": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz",
+ "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/klona": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
+ "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/laravel-mix": {
+ "version": "6.0.49",
+ "resolved": "https://registry.npmjs.org/laravel-mix/-/laravel-mix-6.0.49.tgz",
+ "integrity": "sha512-bBMFpFjp26XfijPvY5y9zGKud7VqlyOE0OWUcPo3vTBY5asw8LTjafAbee1dhfLz6PWNqDziz69CP78ELSpfKw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/core": "^7.15.8",
+ "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+ "@babel/plugin-transform-runtime": "^7.15.8",
+ "@babel/preset-env": "^7.15.8",
+ "@babel/runtime": "^7.15.4",
+ "@types/babel__core": "^7.1.16",
+ "@types/clean-css": "^4.2.5",
+ "@types/imagemin-gifsicle": "^7.0.1",
+ "@types/imagemin-mozjpeg": "^8.0.1",
+ "@types/imagemin-optipng": "^5.2.1",
+ "@types/imagemin-svgo": "^8.0.0",
+ "autoprefixer": "^10.4.0",
+ "babel-loader": "^8.2.3",
+ "chalk": "^4.1.2",
+ "chokidar": "^3.5.2",
+ "clean-css": "^5.2.4",
+ "cli-table3": "^0.6.0",
+ "collect.js": "^4.28.5",
+ "commander": "^7.2.0",
+ "concat": "^1.0.3",
+ "css-loader": "^5.2.6",
+ "cssnano": "^5.0.8",
+ "dotenv": "^10.0.0",
+ "dotenv-expand": "^5.1.0",
+ "file-loader": "^6.2.0",
+ "fs-extra": "^10.0.0",
+ "glob": "^7.2.0",
+ "html-loader": "^1.3.2",
+ "imagemin": "^7.0.1",
+ "img-loader": "^4.0.0",
+ "lodash": "^4.17.21",
+ "md5": "^2.3.0",
+ "mini-css-extract-plugin": "^1.6.2",
+ "node-libs-browser": "^2.2.1",
+ "postcss-load-config": "^3.1.0",
+ "postcss-loader": "^6.2.0",
+ "semver": "^7.3.5",
+ "strip-ansi": "^6.0.0",
+ "style-loader": "^2.0.0",
+ "terser": "^5.9.0",
+ "terser-webpack-plugin": "^5.2.4",
+ "vue-style-loader": "^4.1.3",
+ "webpack": "^5.60.0",
+ "webpack-cli": "^4.9.1",
+ "webpack-dev-server": "^4.7.3",
+ "webpack-merge": "^5.8.0",
+ "webpack-notifier": "^1.14.1",
+ "webpackbar": "^5.0.0-3",
+ "yargs": "^17.2.1"
+ },
+ "bin": {
+ "laravel-mix": "bin/cli.js",
+ "mix": "bin/cli.js"
+ },
+ "engines": {
+ "node": ">=12.14.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.15.8",
+ "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+ "@babel/plugin-transform-runtime": "^7.15.8",
+ "@babel/preset-env": "^7.15.8",
+ "postcss": "^8.3.11",
+ "webpack": "^5.60.0",
+ "webpack-cli": "^4.9.1"
+ }
+ },
+ "node_modules/laravel-mix/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/laravel-mix/node_modules/commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/laravel-mix/node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/laravel-mix/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/launch-editor": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz",
+ "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==",
+ "dev": true,
+ "dependencies": {
+ "picocolors": "^1.0.0",
+ "shell-quote": "^1.8.1"
+ }
+ },
+ "node_modules/lilconfig": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
+ "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+ "dev": true
+ },
+ "node_modules/linguist-languages": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmjs.org/linguist-languages/-/linguist-languages-7.27.0.tgz",
+ "integrity": "sha512-Wzx/22c5Jsv2ag+uKy+ITanGA5hzvBZngrNGDXLTC7ZjGM6FLCYGgomauTkxNJeP9of353OM0pWqngYA180xgw==",
+ "dev": true
+ },
+ "node_modules/loader-runner": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
+ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.11.5"
+ }
+ },
+ "node_modules/loader-utils": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
+ "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "dev": true,
+ "dependencies": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^2.1.2"
+ },
+ "engines": {
+ "node": ">=8.9.0"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^4.1.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "node_modules/lodash.debounce": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
+ "dev": true
+ },
+ "node_modules/lodash.memoize": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
+ "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==",
+ "dev": true
+ },
+ "node_modules/lodash.uniq": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==",
+ "dev": true
+ },
+ "node_modules/lower-case": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
+ "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
+ "dev": true,
+ "dependencies": {
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "node_modules/magic-string": {
+ "version": "0.30.5",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
+ "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/sourcemap-codec": "^1.4.15"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dev": true,
+ "dependencies": {
+ "semver": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/make-dir/node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/map-age-cleaner": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+ "dev": true,
+ "dependencies": {
+ "p-defer": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/md5": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
+ "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
+ "dev": true,
+ "dependencies": {
+ "charenc": "0.0.2",
+ "crypt": "0.0.2",
+ "is-buffer": "~1.1.6"
+ }
+ },
+ "node_modules/md5.js": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+ "dev": true,
+ "dependencies": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/mdn-data": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
+ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
+ "dev": true
+ },
+ "node_modules/media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mem": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz",
+ "integrity": "sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA==",
+ "dev": true,
+ "dependencies": {
+ "map-age-cleaner": "^0.1.3",
+ "mimic-fn": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/mem?sponsor=1"
+ }
+ },
+ "node_modules/memfs": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz",
+ "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==",
+ "dev": true,
+ "dependencies": {
+ "fs-monkey": "^1.0.4"
+ },
+ "engines": {
+ "node": ">= 4.0.0"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
+ "dev": true
+ },
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/miller-rabin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.0.0",
+ "brorand": "^1.0.1"
+ },
+ "bin": {
+ "miller-rabin": "bin/miller-rabin"
+ }
+ },
+ "node_modules/mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "dev": true,
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "dependencies": {
+ "mime-db": "1.52.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz",
+ "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/mini-css-extract-plugin": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz",
+ "integrity": "sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==",
+ "dev": true,
+ "dependencies": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0",
+ "webpack-sources": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.4.0 || ^5.0.0"
+ }
+ },
+ "node_modules/mini-css-extract-plugin/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/mini-css-extract-plugin/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+ "dev": true
+ },
+ "node_modules/minimalistic-crypto-utils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==",
+ "dev": true
+ },
+ "node_modules/minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
+ "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ },
+ "node_modules/multicast-dns": {
+ "version": "7.2.5",
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
+ "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==",
+ "dev": true,
+ "dependencies": {
+ "dns-packet": "^5.2.2",
+ "thunky": "^1.0.2"
+ },
+ "bin": {
+ "multicast-dns": "cli.js"
+ }
+ },
+ "node_modules/mz": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
+ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
+ "dev": true,
+ "dependencies": {
+ "any-promise": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "thenify-all": "^1.0.0"
+ }
+ },
+ "node_modules/nanoid": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/neo-async": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
+ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+ "dev": true
+ },
+ "node_modules/no-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
+ "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
+ "dev": true,
+ "dependencies": {
+ "lower-case": "^2.0.2",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/node-forge": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
+ "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6.13.0"
+ }
+ },
+ "node_modules/node-libs-browser": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz",
+ "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==",
+ "dev": true,
+ "dependencies": {
+ "assert": "^1.1.1",
+ "browserify-zlib": "^0.2.0",
+ "buffer": "^4.3.0",
+ "console-browserify": "^1.1.0",
+ "constants-browserify": "^1.0.0",
+ "crypto-browserify": "^3.11.0",
+ "domain-browser": "^1.1.1",
+ "events": "^3.0.0",
+ "https-browserify": "^1.0.0",
+ "os-browserify": "^0.3.0",
+ "path-browserify": "0.0.1",
+ "process": "^0.11.10",
+ "punycode": "^1.2.4",
+ "querystring-es3": "^0.2.0",
+ "readable-stream": "^2.3.3",
+ "stream-browserify": "^2.0.1",
+ "stream-http": "^2.7.2",
+ "string_decoder": "^1.0.0",
+ "timers-browserify": "^2.0.4",
+ "tty-browserify": "0.0.0",
+ "url": "^0.11.0",
+ "util": "^0.11.0",
+ "vm-browserify": "^1.0.1"
+ }
+ },
+ "node_modules/node-libs-browser/node_modules/readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/node-libs-browser/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/node-libs-browser/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/node-notifier": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-9.0.1.tgz",
+ "integrity": "sha512-fPNFIp2hF/Dq7qLDzSg4vZ0J4e9v60gJR+Qx7RbjbWqzPDdEqeVpEx5CFeDAELIl+A/woaaNn1fQ5nEVerMxJg==",
+ "dev": true,
+ "dependencies": {
+ "growly": "^1.3.0",
+ "is-wsl": "^2.2.0",
+ "semver": "^7.3.2",
+ "shellwords": "^0.1.1",
+ "uuid": "^8.3.0",
+ "which": "^2.0.2"
+ }
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.13",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
+ "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",
+ "dev": true
+ },
+ "node_modules/nopt": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
+ "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
+ "dev": true,
+ "dependencies": {
+ "abbrev": "^1.0.0"
+ },
+ "bin": {
+ "nopt": "bin/nopt.js"
+ },
+ "engines": {
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/normalize-range": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/normalize-url": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/npm-run-path": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/nth-check": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
+ "dev": true,
+ "dependencies": {
+ "boolbase": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/fb55/nth-check?sponsor=1"
+ }
+ },
+ "node_modules/object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/object-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.12.2",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
+ "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/obuf": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
+ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
+ "dev": true
+ },
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dev": true,
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/on-headers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
+ "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dev": true,
+ "dependencies": {
+ "mimic-fn": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/onetime/node_modules/mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/open": {
+ "version": "8.4.2",
+ "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",
+ "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
+ "dev": true,
+ "dependencies": {
+ "define-lazy-prop": "^2.0.0",
+ "is-docker": "^2.1.1",
+ "is-wsl": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/os-browserify": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+ "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==",
+ "dev": true
+ },
+ "node_modules/os-homedir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/p-defer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "dependencies": {
+ "p-try": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-pipe": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-3.1.0.tgz",
+ "integrity": "sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-retry": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz",
+ "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/retry": "0.12.0",
+ "retry": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/p-try": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
+ "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/pako": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.8.tgz",
+ "integrity": "sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA==",
+ "dev": true
+ },
+ "node_modules/param-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
+ "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
+ "dev": true,
+ "dependencies": {
+ "dot-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parse-asn1": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz",
+ "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==",
+ "dev": true,
+ "dependencies": {
+ "asn1.js": "^4.0.0",
+ "browserify-aes": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.0",
+ "pbkdf2": "^3.0.3",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "node_modules/parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/pascal-case": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
+ "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
+ "dev": true,
+ "dependencies": {
+ "no-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node_modules/path-browserify": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
+ "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
+ "dev": true
+ },
+ "node_modules/path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "node_modules/path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
+ "dev": true
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/pbkdf2": {
+ "version": "3.0.17",
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
+ "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==",
+ "dev": true,
+ "dependencies": {
+ "create-hash": "^1.1.2",
+ "create-hmac": "^1.1.4",
+ "ripemd160": "^2.0.1",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ },
+ "engines": {
+ "node": ">=0.12"
+ }
+ },
+ "node_modules/php-parser": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.1.5.tgz",
+ "integrity": "sha512-jEY2DcbgCm5aclzBdfW86GM6VEIWcSlhTBSHN1qhJguVePlYe28GhwS0yoeLYXpM2K8y6wzLwrbq814n2PHSoQ==",
+ "dev": true
+ },
+ "node_modules/picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/pirates": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
+ "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "dependencies": {
+ "find-up": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/popper.js": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
+ "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==",
+ "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1",
+ "dev": true,
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/popperjs"
+ }
+ },
+ "node_modules/postcss": {
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "nanoid": "^3.3.6",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/postcss-calc": {
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz",
+ "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==",
+ "dev": true,
+ "dependencies": {
+ "postcss-selector-parser": "^6.0.9",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.2"
+ }
+ },
+ "node_modules/postcss-colormin": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz",
+ "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.21.4",
+ "caniuse-api": "^3.0.0",
+ "colord": "^2.9.1",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-convert-values": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz",
+ "integrity": "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.21.4",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-discard-comments": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz",
+ "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-discard-duplicates": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz",
+ "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-discard-empty": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz",
+ "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-discard-overridden": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz",
+ "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-import": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
+ "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.0.0",
+ "read-cache": "^1.0.0",
+ "resolve": "^1.1.7"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.0.0"
+ }
+ },
+ "node_modules/postcss-js": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz",
+ "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",
+ "dev": true,
+ "dependencies": {
+ "camelcase-css": "^2.0.1"
+ },
+ "engines": {
+ "node": "^12 || ^14 || >= 16"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ "peerDependencies": {
+ "postcss": "^8.4.21"
+ }
+ },
+ "node_modules/postcss-load-config": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz",
+ "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==",
+ "dev": true,
+ "dependencies": {
+ "lilconfig": "^2.0.5",
+ "yaml": "^1.10.2"
+ },
+ "engines": {
+ "node": ">= 10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ "peerDependencies": {
+ "postcss": ">=8.0.9",
+ "ts-node": ">=9.0.0"
+ },
+ "peerDependenciesMeta": {
+ "postcss": {
+ "optional": true
+ },
+ "ts-node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/postcss-loader": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-6.2.1.tgz",
+ "integrity": "sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==",
+ "dev": true,
+ "dependencies": {
+ "cosmiconfig": "^7.0.0",
+ "klona": "^2.0.5",
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "postcss": "^7.0.0 || ^8.0.1",
+ "webpack": "^5.0.0"
+ }
+ },
+ "node_modules/postcss-merge-longhand": {
+ "version": "5.1.7",
+ "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz",
+ "integrity": "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0",
+ "stylehacks": "^5.1.1"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-merge-rules": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz",
+ "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.21.4",
+ "caniuse-api": "^3.0.0",
+ "cssnano-utils": "^3.1.0",
+ "postcss-selector-parser": "^6.0.5"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-minify-font-values": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz",
+ "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-minify-gradients": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz",
+ "integrity": "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==",
+ "dev": true,
+ "dependencies": {
+ "colord": "^2.9.1",
+ "cssnano-utils": "^3.1.0",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-minify-params": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.4.tgz",
+ "integrity": "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.21.4",
+ "cssnano-utils": "^3.1.0",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-minify-selectors": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz",
+ "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==",
+ "dev": true,
+ "dependencies": {
+ "postcss-selector-parser": "^6.0.5"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-modules-extract-imports": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
+ "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-modules-local-by-default": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz",
+ "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==",
+ "dev": true,
+ "dependencies": {
+ "icss-utils": "^5.0.0",
+ "postcss-selector-parser": "^6.0.2",
+ "postcss-value-parser": "^4.1.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-modules-scope": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
+ "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
+ "dev": true,
+ "dependencies": {
+ "postcss-selector-parser": "^6.0.4"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-modules-values": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz",
+ "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==",
+ "dev": true,
+ "dependencies": {
+ "icss-utils": "^5.0.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >= 14"
+ },
+ "peerDependencies": {
+ "postcss": "^8.1.0"
+ }
+ },
+ "node_modules/postcss-nested": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz",
+ "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==",
+ "dev": true,
+ "dependencies": {
+ "postcss-selector-parser": "^6.0.11"
+ },
+ "engines": {
+ "node": ">=12.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.14"
+ }
+ },
+ "node_modules/postcss-normalize-charset": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz",
+ "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==",
+ "dev": true,
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-display-values": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz",
+ "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-positions": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz",
+ "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-repeat-style": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz",
+ "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-string": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz",
+ "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-timing-functions": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz",
+ "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-unicode": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.1.tgz",
+ "integrity": "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.21.4",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-url": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz",
+ "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==",
+ "dev": true,
+ "dependencies": {
+ "normalize-url": "^6.0.1",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-normalize-whitespace": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz",
+ "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-ordered-values": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz",
+ "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==",
+ "dev": true,
+ "dependencies": {
+ "cssnano-utils": "^3.1.0",
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-reduce-initial": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz",
+ "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.21.4",
+ "caniuse-api": "^3.0.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-reduce-transforms": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz",
+ "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-selector-parser": {
+ "version": "6.0.13",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+ "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
+ "dev": true,
+ "dependencies": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/postcss-svgo": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz",
+ "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==",
+ "dev": true,
+ "dependencies": {
+ "postcss-value-parser": "^4.2.0",
+ "svgo": "^2.7.0"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-unique-selectors": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz",
+ "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==",
+ "dev": true,
+ "dependencies": {
+ "postcss-selector-parser": "^6.0.5"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ },
+ "node_modules/prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/pretty-time": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
+ "integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
+ "node_modules/process-nextick-args": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+ "dev": true
+ },
+ "node_modules/proto-list": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
+ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
+ "dev": true
+ },
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dev": true,
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/proxy-addr/node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+ "dev": true
+ },
+ "node_modules/public-encrypt": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+ "dev": true,
+ "dependencies": {
+ "bn.js": "^4.1.0",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "parse-asn1": "^5.0.0",
+ "randombytes": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
+ "dev": true
+ },
+ "node_modules/qs": {
+ "version": "6.11.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
+ "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "dev": true,
+ "dependencies": {
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==",
+ "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.x"
+ }
+ },
+ "node_modules/querystring-es3": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+ "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.x"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/randomfill": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+ "dev": true,
+ "dependencies": {
+ "randombytes": "^2.0.5",
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dev": true,
+ "dependencies": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/raw-body/node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/read-cache": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
+ "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
+ "dev": true,
+ "dependencies": {
+ "pify": "^2.3.0"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/rechoir": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
+ "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
+ "dev": true,
+ "dependencies": {
+ "resolve": "^1.9.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/regenerate": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
+ "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
+ "dev": true
+ },
+ "node_modules/regenerate-unicode-properties": {
+ "version": "10.1.1",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz",
+ "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==",
+ "dev": true,
+ "dependencies": {
+ "regenerate": "^1.4.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
+ "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==",
+ "dev": true
+ },
+ "node_modules/regenerator-transform": {
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz",
+ "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/runtime": "^7.8.4"
+ }
+ },
+ "node_modules/regex-parser": {
+ "version": "2.2.11",
+ "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz",
+ "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==",
+ "dev": true
+ },
+ "node_modules/regexpu-core": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz",
+ "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/regjsgen": "^0.8.0",
+ "regenerate": "^1.4.2",
+ "regenerate-unicode-properties": "^10.1.0",
+ "regjsparser": "^0.9.1",
+ "unicode-match-property-ecmascript": "^2.0.0",
+ "unicode-match-property-value-ecmascript": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/regjsparser": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz",
+ "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==",
+ "dev": true,
+ "dependencies": {
+ "jsesc": "~0.5.0"
+ },
+ "bin": {
+ "regjsparser": "bin/parser"
+ }
+ },
+ "node_modules/regjsparser/node_modules/jsesc": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==",
+ "dev": true,
+ "bin": {
+ "jsesc": "bin/jsesc"
+ }
+ },
+ "node_modules/relateurl": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+ "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/replace-ext": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
+ "integrity": "sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
+ "dev": true
+ },
+ "node_modules/resolve": {
+ "version": "1.22.8",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
+ "dev": true,
+ "dependencies": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "dependencies": {
+ "resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/resolve-cwd/node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/resolve-url-loader": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz",
+ "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==",
+ "dev": true,
+ "dependencies": {
+ "adjust-sourcemap-loader": "^4.0.0",
+ "convert-source-map": "^1.7.0",
+ "loader-utils": "^2.0.0",
+ "postcss": "^8.2.14",
+ "source-map": "0.6.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/resolve-url-loader/node_modules/convert-source-map": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
+ "dev": true
+ },
+ "node_modules/retry": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
+ "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true,
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rimraf/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/rimraf/node_modules/glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/rimraf/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/ripemd160": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+ "dev": true,
+ "dependencies": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "node_modules/sass": {
+ "version": "1.69.5",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz",
+ "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
+ "dev": true,
+ "dependencies": {
+ "chokidar": ">=3.0.0 <4.0.0",
+ "immutable": "^4.0.0",
+ "source-map-js": ">=0.6.2 <2.0.0"
+ },
+ "bin": {
+ "sass": "sass.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/sass-loader": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.3.2.tgz",
+ "integrity": "sha512-CQbKl57kdEv+KDLquhC+gE3pXt74LEAzm+tzywcA0/aHZuub8wTErbjAoNI57rPUWRYRNC5WUnNl8eGJNbDdwg==",
+ "dev": true,
+ "dependencies": {
+ "neo-async": "^2.6.2"
+ },
+ "engines": {
+ "node": ">= 14.15.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "fibers": ">= 3.1.0",
+ "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
+ "sass": "^1.3.0",
+ "sass-embedded": "*",
+ "webpack": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "fibers": {
+ "optional": true
+ },
+ "node-sass": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "sass-embedded": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/schema-utils": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
+ "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.5",
+ "ajv": "^6.12.4",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 8.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/schema-utils/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/schema-utils/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/schema-utils/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/select-hose": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+ "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==",
+ "dev": true
+ },
+ "node_modules/selfsigned": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz",
+ "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==",
+ "dev": true,
+ "dependencies": {
+ "@types/node-forge": "^1.3.0",
+ "node-forge": "^1"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/semver/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/semver/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/send": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dev": true,
+ "dependencies": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/send/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/send/node_modules/debug/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/send/node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "node_modules/serialize-javascript": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
+ "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
+ "dev": true,
+ "dependencies": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "node_modules/serve-index": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==",
+ "dev": true,
+ "dependencies": {
+ "accepts": "~1.3.4",
+ "batch": "0.6.1",
+ "debug": "2.6.9",
+ "escape-html": "~1.0.3",
+ "http-errors": "~1.6.2",
+ "mime-types": "~2.1.17",
+ "parseurl": "~1.3.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/serve-index/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/serve-index/node_modules/depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-index/node_modules/http-errors": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==",
+ "dev": true,
+ "dependencies": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-index/node_modules/inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
+ "dev": true
+ },
+ "node_modules/serve-index/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "node_modules/serve-index/node_modules/setprototypeof": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
+ "dev": true
+ },
+ "node_modules/serve-index/node_modules/statuses": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
+ "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dev": true,
+ "dependencies": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.18.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
+ "dev": true
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "dev": true
+ },
+ "node_modules/sha.js": {
+ "version": "2.4.11",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ },
+ "bin": {
+ "sha.js": "bin.js"
+ }
+ },
+ "node_modules/shallow-clone": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
+ "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
+ "dev": true,
+ "dependencies": {
+ "kind-of": "^6.0.2"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shell-quote": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz",
+ "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/shellwords": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
+ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
+ "dev": true
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "node_modules/slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/sockjs": {
+ "version": "0.3.24",
+ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
+ "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==",
+ "dev": true,
+ "dependencies": {
+ "faye-websocket": "^0.11.3",
+ "uuid": "^8.3.2",
+ "websocket-driver": "^0.7.4"
+ }
+ },
+ "node_modules/source-list-map": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
+ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==",
+ "dev": true
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/spdy": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
+ "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.0",
+ "handle-thing": "^2.0.0",
+ "http-deceiver": "^1.2.7",
+ "select-hose": "^2.0.0",
+ "spdy-transport": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/spdy-transport": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz",
+ "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^4.1.0",
+ "detect-node": "^2.0.4",
+ "hpack.js": "^2.1.6",
+ "obuf": "^1.1.2",
+ "readable-stream": "^3.0.6",
+ "wbuf": "^1.7.3"
+ }
+ },
+ "node_modules/stable": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
+ "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
+ "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility",
+ "dev": true
+ },
+ "node_modules/statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/std-env": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz",
+ "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==",
+ "dev": true
+ },
+ "node_modules/stream-browserify": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
+ "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "~2.0.1",
+ "readable-stream": "^2.0.2"
+ }
+ },
+ "node_modules/stream-browserify/node_modules/readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/stream-browserify/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/stream-browserify/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/stream-http": {
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
+ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
+ "dev": true,
+ "dependencies": {
+ "builtin-status-codes": "^3.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.3.6",
+ "to-arraybuffer": "^1.0.0",
+ "xtend": "^4.0.0"
+ }
+ },
+ "node_modules/stream-http/node_modules/readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/stream-http/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/stream-http/node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
+ "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/string_decoder/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-final-newline": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/style-loader": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz",
+ "integrity": "sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==",
+ "dev": true,
+ "dependencies": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.0.0 || ^5.0.0"
+ }
+ },
+ "node_modules/style-loader/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/style-loader/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/style-loader/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/style-loader/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/stylehacks": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz",
+ "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.21.4",
+ "postcss-selector-parser": "^6.0.4"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14.0"
+ },
+ "peerDependencies": {
+ "postcss": "^8.2.15"
+ }
+ },
+ "node_modules/sucrase": {
+ "version": "3.34.0",
+ "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz",
+ "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "commander": "^4.0.0",
+ "glob": "7.1.6",
+ "lines-and-columns": "^1.1.6",
+ "mz": "^2.7.0",
+ "pirates": "^4.0.1",
+ "ts-interface-checker": "^0.1.9"
+ },
+ "bin": {
+ "sucrase": "bin/sucrase",
+ "sucrase-node": "bin/sucrase-node"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/sucrase/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/sucrase/node_modules/commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/sucrase/node_modules/glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/sucrase/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/svgo": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz",
+ "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==",
+ "dev": true,
+ "dependencies": {
+ "@trysound/sax": "0.2.0",
+ "commander": "^7.2.0",
+ "css-select": "^4.1.3",
+ "css-tree": "^1.1.3",
+ "csso": "^4.2.0",
+ "picocolors": "^1.0.0",
+ "stable": "^0.1.8"
+ },
+ "bin": {
+ "svgo": "bin/svgo"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/svgo/node_modules/commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/tailwindcss": {
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
+ "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
+ "dev": true,
+ "dependencies": {
+ "@alloc/quick-lru": "^5.2.0",
+ "arg": "^5.0.2",
+ "chokidar": "^3.5.3",
+ "didyoumean": "^1.2.2",
+ "dlv": "^1.1.3",
+ "fast-glob": "^3.3.0",
+ "glob-parent": "^6.0.2",
+ "is-glob": "^4.0.3",
+ "jiti": "^1.19.1",
+ "lilconfig": "^2.1.0",
+ "micromatch": "^4.0.5",
+ "normalize-path": "^3.0.0",
+ "object-hash": "^3.0.0",
+ "picocolors": "^1.0.0",
+ "postcss": "^8.4.23",
+ "postcss-import": "^15.1.0",
+ "postcss-js": "^4.0.1",
+ "postcss-load-config": "^4.0.1",
+ "postcss-nested": "^6.0.1",
+ "postcss-selector-parser": "^6.0.11",
+ "resolve": "^1.22.2",
+ "sucrase": "^3.32.0"
+ },
+ "bin": {
+ "tailwind": "lib/cli.js",
+ "tailwindcss": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/tailwindcss/node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/tailwindcss/node_modules/postcss-load-config": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz",
+ "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==",
+ "dev": true,
+ "dependencies": {
+ "lilconfig": "^2.0.5",
+ "yaml": "^2.1.1"
+ },
+ "engines": {
+ "node": ">= 14"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ "peerDependencies": {
+ "postcss": ">=8.0.9",
+ "ts-node": ">=9.0.0"
+ },
+ "peerDependenciesMeta": {
+ "postcss": {
+ "optional": true
+ },
+ "ts-node": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/tailwindcss/node_modules/yaml": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
+ "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/tapable": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
+ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/terser": {
+ "version": "5.23.0",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.23.0.tgz",
+ "integrity": "sha512-Iyy83LN0uX9ZZLCX4Qbu5JiHiWjOCTwrmM9InWOzVeM++KNWEsqV4YgN9U9E8AlohQ6Gs42ztczlWOG/lwDAMA==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/source-map": "^0.3.3",
+ "acorn": "^8.8.2",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ },
+ "bin": {
+ "terser": "bin/terser"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/terser-webpack-plugin": {
+ "version": "5.3.9",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz",
+ "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jest-worker": "^27.4.5",
+ "schema-utils": "^3.1.1",
+ "serialize-javascript": "^6.0.1",
+ "terser": "^5.16.8"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^5.1.0"
+ },
+ "peerDependenciesMeta": {
+ "@swc/core": {
+ "optional": true
+ },
+ "esbuild": {
+ "optional": true
+ },
+ "uglify-js": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/terser-webpack-plugin/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/terser-webpack-plugin/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/terser/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "node_modules/thenify": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
+ "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
+ "dev": true,
+ "dependencies": {
+ "any-promise": "^1.0.0"
+ }
+ },
+ "node_modules/thenify-all": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
+ "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
+ "dev": true,
+ "dependencies": {
+ "thenify": ">= 3.1.0 < 4"
+ },
+ "engines": {
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/thunky": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz",
+ "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==",
+ "dev": true
+ },
+ "node_modules/timers-browserify": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz",
+ "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==",
+ "dev": true,
+ "dependencies": {
+ "setimmediate": "^1.0.4"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ }
+ },
+ "node_modules/to-arraybuffer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
+ "integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==",
+ "dev": true
+ },
+ "node_modules/to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
+ "node_modules/ts-interface-checker": {
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
+ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
+ "dev": true
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
+ "dev": true
+ },
+ "node_modules/tty-browserify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "integrity": "sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==",
+ "dev": true
+ },
+ "node_modules/type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dev": true,
+ "dependencies": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
+ "dev": true
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "dev": true
+ },
+ "node_modules/unicode-canonical-property-names-ecmascript": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
+ "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unicode-match-property-ecmascript": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz",
+ "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==",
+ "dev": true,
+ "dependencies": {
+ "unicode-canonical-property-names-ecmascript": "^2.0.0",
+ "unicode-property-aliases-ecmascript": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unicode-match-property-value-ecmascript": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz",
+ "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unicode-property-aliases-ecmascript": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz",
+ "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/universalify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
+ "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "escalade": "^3.1.1",
+ "picocolors": "^1.0.0"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/uri-js/node_modules/punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/url": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ }
+ },
+ "node_modules/url/node_modules/punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==",
+ "dev": true
+ },
+ "node_modules/user-home": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
+ "integrity": "sha512-KMWqdlOcjCYdtIJpicDSFBQ8nFwS2i9sslAd6f4+CBGcU4gist2REnr2fxj2YocvJFxSF3ZOHLYLVZnUxv4BZQ==",
+ "dev": true,
+ "dependencies": {
+ "os-homedir": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/util": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
+ "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
+ "dev": true,
+ "dependencies": {
+ "inherits": "2.0.3"
+ }
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "dev": true
+ },
+ "node_modules/util/node_modules/inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
+ "dev": true
+ },
+ "node_modules/utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "dev": true,
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/vm-browserify": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
+ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
+ "dev": true
+ },
+ "node_modules/vscode-oniguruma": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz",
+ "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==",
+ "dev": true
+ },
+ "node_modules/vscode-textmate": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-7.0.4.tgz",
+ "integrity": "sha512-9hJp0xL7HW1Q5OgGe03NACo7yiCTMEk3WU/rtKXUbncLtdg6rVVNJnHwD88UhbIYU2KoxY0Dih0x+kIsmUKn2A==",
+ "dev": true
+ },
+ "node_modules/vue": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.7.tgz",
+ "integrity": "sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==",
+ "dev": true,
+ "dependencies": {
+ "@vue/compiler-dom": "3.3.7",
+ "@vue/compiler-sfc": "3.3.7",
+ "@vue/runtime-dom": "3.3.7",
+ "@vue/server-renderer": "3.3.7",
+ "@vue/shared": "3.3.7"
+ },
+ "peerDependencies": {
+ "typescript": "*"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vue-style-loader": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
+ "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==",
+ "dev": true,
+ "dependencies": {
+ "hash-sum": "^1.0.2",
+ "loader-utils": "^1.0.2"
+ }
+ },
+ "node_modules/vue-style-loader/node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/vue-style-loader/node_modules/loader-utils": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
+ "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "dev": true,
+ "dependencies": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/watchpack": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
+ "dev": true,
+ "dependencies": {
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.1.2"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/wbuf": {
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
+ "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
+ "dev": true,
+ "dependencies": {
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "node_modules/webpack": {
+ "version": "5.89.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz",
+ "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==",
+ "dev": true,
+ "dependencies": {
+ "@types/eslint-scope": "^3.7.3",
+ "@types/estree": "^1.0.0",
+ "@webassemblyjs/ast": "^1.11.5",
+ "@webassemblyjs/wasm-edit": "^1.11.5",
+ "@webassemblyjs/wasm-parser": "^1.11.5",
+ "acorn": "^8.7.1",
+ "acorn-import-assertions": "^1.9.0",
+ "browserslist": "^4.14.5",
+ "chrome-trace-event": "^1.0.2",
+ "enhanced-resolve": "^5.15.0",
+ "es-module-lexer": "^1.2.1",
+ "eslint-scope": "5.1.1",
+ "events": "^3.2.0",
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.2.9",
+ "json-parse-even-better-errors": "^2.3.1",
+ "loader-runner": "^4.2.0",
+ "mime-types": "^2.1.27",
+ "neo-async": "^2.6.2",
+ "schema-utils": "^3.2.0",
+ "tapable": "^2.1.1",
+ "terser-webpack-plugin": "^5.3.7",
+ "watchpack": "^2.4.0",
+ "webpack-sources": "^3.2.3"
+ },
+ "bin": {
+ "webpack": "bin/webpack.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependenciesMeta": {
+ "webpack-cli": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-cli": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
+ "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
+ "dev": true,
+ "dependencies": {
+ "@discoveryjs/json-ext": "^0.5.0",
+ "@webpack-cli/configtest": "^1.2.0",
+ "@webpack-cli/info": "^1.5.0",
+ "@webpack-cli/serve": "^1.7.0",
+ "colorette": "^2.0.14",
+ "commander": "^7.0.0",
+ "cross-spawn": "^7.0.3",
+ "fastest-levenshtein": "^1.0.12",
+ "import-local": "^3.0.2",
+ "interpret": "^2.2.0",
+ "rechoir": "^0.7.0",
+ "webpack-merge": "^5.7.3"
+ },
+ "bin": {
+ "webpack-cli": "bin/cli.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "4.x.x || 5.x.x"
+ },
+ "peerDependenciesMeta": {
+ "@webpack-cli/generators": {
+ "optional": true
+ },
+ "@webpack-cli/migrate": {
+ "optional": true
+ },
+ "webpack-bundle-analyzer": {
+ "optional": true
+ },
+ "webpack-dev-server": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-cli/node_modules/commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/webpack-dev-middleware": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz",
+ "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==",
+ "dev": true,
+ "dependencies": {
+ "colorette": "^2.0.10",
+ "memfs": "^3.4.3",
+ "mime-types": "^2.1.31",
+ "range-parser": "^1.2.1",
+ "schema-utils": "^4.0.0"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.0.0 || ^5.0.0"
+ }
+ },
+ "node_modules/webpack-dev-middleware/node_modules/schema-utils": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz",
+ "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.9.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.1.0"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/webpack-dev-server": {
+ "version": "4.15.1",
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz",
+ "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==",
+ "dev": true,
+ "dependencies": {
+ "@types/bonjour": "^3.5.9",
+ "@types/connect-history-api-fallback": "^1.3.5",
+ "@types/express": "^4.17.13",
+ "@types/serve-index": "^1.9.1",
+ "@types/serve-static": "^1.13.10",
+ "@types/sockjs": "^0.3.33",
+ "@types/ws": "^8.5.5",
+ "ansi-html-community": "^0.0.8",
+ "bonjour-service": "^1.0.11",
+ "chokidar": "^3.5.3",
+ "colorette": "^2.0.10",
+ "compression": "^1.7.4",
+ "connect-history-api-fallback": "^2.0.0",
+ "default-gateway": "^6.0.3",
+ "express": "^4.17.3",
+ "graceful-fs": "^4.2.6",
+ "html-entities": "^2.3.2",
+ "http-proxy-middleware": "^2.0.3",
+ "ipaddr.js": "^2.0.1",
+ "launch-editor": "^2.6.0",
+ "open": "^8.0.9",
+ "p-retry": "^4.5.0",
+ "rimraf": "^3.0.2",
+ "schema-utils": "^4.0.0",
+ "selfsigned": "^2.1.1",
+ "serve-index": "^1.9.1",
+ "sockjs": "^0.3.24",
+ "spdy": "^4.0.2",
+ "webpack-dev-middleware": "^5.3.1",
+ "ws": "^8.13.0"
+ },
+ "bin": {
+ "webpack-dev-server": "bin/webpack-dev-server.js"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ },
+ "peerDependencies": {
+ "webpack": "^4.37.0 || ^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "webpack": {
+ "optional": true
+ },
+ "webpack-cli": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-dev-server/node_modules/schema-utils": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz",
+ "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.9.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.1.0"
+ },
+ "engines": {
+ "node": ">= 12.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/webpack-merge": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz",
+ "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==",
+ "dev": true,
+ "dependencies": {
+ "clone-deep": "^4.0.1",
+ "flat": "^5.0.2",
+ "wildcard": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/webpack-notifier": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/webpack-notifier/-/webpack-notifier-1.15.0.tgz",
+ "integrity": "sha512-N2V8UMgRB5komdXQRavBsRpw0hPhJq2/SWNOGuhrXpIgRhcMexzkGQysUyGStHLV5hkUlgpRiF7IUXoBqyMmzQ==",
+ "dev": true,
+ "dependencies": {
+ "node-notifier": "^9.0.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "peerDependencies": {
+ "@types/webpack": ">4.41.31"
+ },
+ "peerDependenciesMeta": {
+ "@types/webpack": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/webpack-sources": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz",
+ "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==",
+ "dev": true,
+ "dependencies": {
+ "source-list-map": "^2.0.0",
+ "source-map": "~0.6.1"
+ }
+ },
+ "node_modules/webpack/node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/webpack/node_modules/ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "peerDependencies": {
+ "ajv": "^6.9.1"
+ }
+ },
+ "node_modules/webpack/node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/webpack/node_modules/schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ },
+ "engines": {
+ "node": ">= 10.13.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/webpack"
+ }
+ },
+ "node_modules/webpack/node_modules/webpack-sources": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/webpackbar": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz",
+ "integrity": "sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==",
+ "dev": true,
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "consola": "^2.15.3",
+ "pretty-time": "^1.1.0",
+ "std-env": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "peerDependencies": {
+ "webpack": "3 || 4 || 5"
+ }
+ },
+ "node_modules/websocket-driver": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
+ "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
+ "dev": true,
+ "dependencies": {
+ "http-parser-js": ">=0.5.1",
+ "safe-buffer": ">=5.1.0",
+ "websocket-extensions": ">=0.1.1"
+ },
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/websocket-extensions": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
+ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/wildcard": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz",
+ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==",
+ "dev": true
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/ws": {
+ "version": "8.14.2",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
+ "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
+ "dev": true,
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xregexp": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-5.1.1.tgz",
+ "integrity": "sha512-fKXeVorD+CzWvFs7VBuKTYIW63YD1e1osxwQ8caZ6o1jg6pDAbABDG54LCIq0j5cy7PjRvGIq6sef9DYPXpncg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/runtime-corejs3": "^7.16.5"
+ }
+ },
+ "node_modules/xtend": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "integrity": "sha512-iTwvhNBRetXWe81+VcIw5YeadVSWyze7uA7nVnpP13ulrpnJ3UfQm5ApGnrkmxDJFdrblRdZs0EvaTCIfei5oQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
+ "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
+ "dev": true
+ },
+ "node_modules/yaml": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dev": true,
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ }
+ },
+ "dependencies": {
+ "@alloc/quick-lru": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
+ "integrity": "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==",
+ "dev": true
+ },
+ "@ampproject/remapping": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "@babel/code-frame": {
+ "version": "7.22.13",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
+ "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.22.13",
+ "chalk": "^2.4.2"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@babel/compat-data": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz",
+ "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==",
+ "dev": true
+ },
+ "@babel/core": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz",
+ "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==",
+ "dev": true,
+ "requires": {
+ "@ampproject/remapping": "^2.2.0",
+ "@babel/code-frame": "^7.22.13",
+ "@babel/generator": "^7.23.0",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helpers": "^7.23.2",
+ "@babel/parser": "^7.23.0",
+ "@babel/template": "^7.22.15",
+ "@babel/traverse": "^7.23.2",
+ "@babel/types": "^7.23.0",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/generator": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
+ "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.23.0",
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jsesc": "^2.5.1"
+ }
+ },
+ "@babel/helper-annotate-as-pure": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz",
+ "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.5"
+ }
+ },
+ "@babel/helper-builder-binary-assignment-operator-visitor": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz",
+ "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.15"
+ }
+ },
+ "@babel/helper-compilation-targets": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz",
+ "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.22.9",
+ "@babel/helper-validator-option": "^7.22.15",
+ "browserslist": "^4.21.9",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-create-class-features-plugin": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz",
+ "integrity": "sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.5",
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/helper-member-expression-to-functions": "^7.22.15",
+ "@babel/helper-optimise-call-expression": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.9",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "semver": "^6.3.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-create-regexp-features-plugin": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz",
+ "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "regexpu-core": "^5.3.1",
+ "semver": "^6.3.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/helper-define-polyfill-provider": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz",
+ "integrity": "sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-compilation-targets": "^7.22.6",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "debug": "^4.1.1",
+ "lodash.debounce": "^4.0.8",
+ "resolve": "^1.14.2"
+ }
+ },
+ "@babel/helper-environment-visitor": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
+ "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
+ "dev": true
+ },
+ "@babel/helper-function-name": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
+ "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.23.0"
+ }
+ },
+ "@babel/helper-hoist-variables": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
+ "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.5"
+ }
+ },
+ "@babel/helper-member-expression-to-functions": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz",
+ "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.23.0"
+ }
+ },
+ "@babel/helper-module-imports": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
+ "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.15"
+ }
+ },
+ "@babel/helper-module-transforms": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz",
+ "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-module-imports": "^7.22.15",
+ "@babel/helper-simple-access": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/helper-validator-identifier": "^7.22.20"
+ }
+ },
+ "@babel/helper-optimise-call-expression": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz",
+ "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.5"
+ }
+ },
+ "@babel/helper-plugin-utils": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",
+ "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==",
+ "dev": true
+ },
+ "@babel/helper-remap-async-to-generator": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz",
+ "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-wrap-function": "^7.22.20"
+ }
+ },
+ "@babel/helper-replace-supers": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz",
+ "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-member-expression-to-functions": "^7.22.15",
+ "@babel/helper-optimise-call-expression": "^7.22.5"
+ }
+ },
+ "@babel/helper-simple-access": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
+ "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.5"
+ }
+ },
+ "@babel/helper-skip-transparent-expression-wrappers": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz",
+ "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.5"
+ }
+ },
+ "@babel/helper-split-export-declaration": {
+ "version": "7.22.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
+ "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.22.5"
+ }
+ },
+ "@babel/helper-string-parser": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
+ "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
+ "dev": true
+ },
+ "@babel/helper-validator-identifier": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
+ "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
+ "dev": true
+ },
+ "@babel/helper-validator-option": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz",
+ "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==",
+ "dev": true
+ },
+ "@babel/helper-wrap-function": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz",
+ "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.22.19"
+ }
+ },
+ "@babel/helpers": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz",
+ "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==",
+ "dev": true,
+ "requires": {
+ "@babel/template": "^7.22.15",
+ "@babel/traverse": "^7.23.2",
+ "@babel/types": "^7.23.0"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
+ "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-validator-identifier": "^7.22.20",
+ "chalk": "^2.4.2",
+ "js-tokens": "^4.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "@babel/parser": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
+ "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
+ "dev": true
+ },
+ "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.15.tgz",
+ "integrity": "sha512-FB9iYlz7rURmRJyXRKEnalYPPdn87H5no108cyuQQyMwlpJ2SJtpIUBI27kdTin956pz+LPypkPVPUTlxOmrsg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.15.tgz",
+ "integrity": "sha512-Hyph9LseGvAeeXzikV88bczhsrLrIZqDPxO+sSmAunMPaGrBGhfMWzCPYTtiW9t+HzSE2wtV8e5cc5P6r1xMDQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/plugin-transform-optional-chaining": "^7.22.15"
+ }
+ },
+ "@babel/plugin-proposal-object-rest-spread": {
+ "version": "7.20.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz",
+ "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.20.5",
+ "@babel/helper-compilation-targets": "^7.20.7",
+ "@babel/helper-plugin-utils": "^7.20.2",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-transform-parameters": "^7.20.7"
+ }
+ },
+ "@babel/plugin-proposal-private-property-in-object": {
+ "version": "7.21.0-placeholder-for-preset-env.2",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",
+ "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==",
+ "dev": true,
+ "requires": {}
+ },
+ "@babel/plugin-syntax-async-generators": {
+ "version": "7.8.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+ "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-class-properties": {
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
+ "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.12.13"
+ }
+ },
+ "@babel/plugin-syntax-class-static-block": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz",
+ "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ }
+ },
+ "@babel/plugin-syntax-dynamic-import": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+ "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-export-namespace-from": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz",
+ "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.3"
+ }
+ },
+ "@babel/plugin-syntax-import-assertions": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz",
+ "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-syntax-import-attributes": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz",
+ "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-syntax-import-meta": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
+ "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ }
+ },
+ "@babel/plugin-syntax-json-strings": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+ "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-logical-assignment-operators": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+ "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ }
+ },
+ "@babel/plugin-syntax-nullish-coalescing-operator": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+ "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-numeric-separator": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+ "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ }
+ },
+ "@babel/plugin-syntax-object-rest-spread": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+ "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-optional-catch-binding": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+ "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-optional-chaining": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
+ "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ }
+ },
+ "@babel/plugin-syntax-private-property-in-object": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz",
+ "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ }
+ },
+ "@babel/plugin-syntax-top-level-await": {
+ "version": "7.14.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
+ "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ }
+ },
+ "@babel/plugin-syntax-unicode-sets-regex": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz",
+ "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.18.6",
+ "@babel/helper-plugin-utils": "^7.18.6"
+ }
+ },
+ "@babel/plugin-transform-arrow-functions": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz",
+ "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-async-generator-functions": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.2.tgz",
+ "integrity": "sha512-BBYVGxbDVHfoeXbOwcagAkOQAm9NxoTdMGfTqghu1GrvadSaw6iW3Je6IcL5PNOw8VwjxqBECXy50/iCQSY/lQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-remap-async-to-generator": "^7.22.20",
+ "@babel/plugin-syntax-async-generators": "^7.8.4"
+ }
+ },
+ "@babel/plugin-transform-async-to-generator": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz",
+ "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-remap-async-to-generator": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-block-scoped-functions": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz",
+ "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-block-scoping": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.0.tgz",
+ "integrity": "sha512-cOsrbmIOXmf+5YbL99/S49Y3j46k/T16b9ml8bm9lP6N9US5iQ2yBK7gpui1pg0V/WMcXdkfKbTb7HXq9u+v4g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-class-properties": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz",
+ "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-class-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-class-static-block": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.11.tgz",
+ "integrity": "sha512-GMM8gGmqI7guS/llMFk1bJDkKfn3v3C4KHK9Yg1ey5qcHcOlKb0QvcMrgzvxo+T03/4szNh5lghY+fEC98Kq9g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-class-features-plugin": "^7.22.11",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-class-static-block": "^7.14.5"
+ }
+ },
+ "@babel/plugin-transform-classes": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.15.tgz",
+ "integrity": "sha512-VbbC3PGjBdE0wAWDdHM9G8Gm977pnYI0XpqMd6LrKISj8/DJXEsWqgRuTYaNE9Bv0JGhTZUzHDlMk18IpOuoqw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-environment-visitor": "^7.22.5",
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/helper-optimise-call-expression": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.9",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "globals": "^11.1.0"
+ }
+ },
+ "@babel/plugin-transform-computed-properties": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz",
+ "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/template": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-destructuring": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.0.tgz",
+ "integrity": "sha512-vaMdgNXFkYrB+8lbgniSYWHsgqK5gjaMNcc84bMIOMRLH0L9AqYq3hwMdvnyqj1OPqea8UtjPEuS/DCenah1wg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-dotall-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz",
+ "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-duplicate-keys": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz",
+ "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-dynamic-import": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.11.tgz",
+ "integrity": "sha512-g/21plo58sfteWjaO0ZNVb+uEOkJNjAaHhbejrnBmu011l/eNDScmkbjCC3l4FKb10ViaGU4aOkFznSu2zRHgA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3"
+ }
+ },
+ "@babel/plugin-transform-exponentiation-operator": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz",
+ "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-export-namespace-from": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.11.tgz",
+ "integrity": "sha512-xa7aad7q7OiT8oNZ1mU7NrISjlSkVdMbNxn9IuLZyL9AJEhs1Apba3I+u5riX1dIkdptP5EKDG5XDPByWxtehw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-export-namespace-from": "^7.8.3"
+ }
+ },
+ "@babel/plugin-transform-for-of": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.15.tgz",
+ "integrity": "sha512-me6VGeHsx30+xh9fbDLLPi0J1HzmeIIyenoOQHuw2D4m2SAU3NrspX5XxJLBpqn5yrLzrlw2Iy3RA//Bx27iOA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-function-name": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz",
+ "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-compilation-targets": "^7.22.5",
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-json-strings": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.11.tgz",
+ "integrity": "sha512-CxT5tCqpA9/jXFlme9xIBCc5RPtdDq3JpkkhgHQqtDdiTnTI0jtZ0QzXhr5DILeYifDPp2wvY2ad+7+hLMW5Pw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-json-strings": "^7.8.3"
+ }
+ },
+ "@babel/plugin-transform-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz",
+ "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-logical-assignment-operators": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.11.tgz",
+ "integrity": "sha512-qQwRTP4+6xFCDV5k7gZBF3C31K34ut0tbEcTKxlX/0KXxm9GLcO14p570aWxFvVzx6QAfPgq7gaeIHXJC8LswQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
+ }
+ },
+ "@babel/plugin-transform-member-expression-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz",
+ "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-modules-amd": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.0.tgz",
+ "integrity": "sha512-xWT5gefv2HGSm4QHtgc1sYPbseOyf+FFDo2JbpE25GWl5BqTGO9IMwTYJRoIdjsF85GE+VegHxSCUt5EvoYTAw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-modules-commonjs": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz",
+ "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-simple-access": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-modules-systemjs": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.0.tgz",
+ "integrity": "sha512-qBej6ctXZD2f+DhlOC9yO47yEYgUh5CZNz/aBoH4j/3NOlRfJXJbY7xDQCqQVf9KbrqGzIWER1f23doHGrIHFg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-hoist-variables": "^7.22.5",
+ "@babel/helper-module-transforms": "^7.23.0",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20"
+ }
+ },
+ "@babel/plugin-transform-modules-umd": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz",
+ "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-transforms": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-named-capturing-groups-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz",
+ "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-new-target": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz",
+ "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-nullish-coalescing-operator": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.11.tgz",
+ "integrity": "sha512-YZWOw4HxXrotb5xsjMJUDlLgcDXSfO9eCmdl1bgW4+/lAGdkjaEvOnQ4p5WKKdUgSzO39dgPl0pTnfxm0OAXcg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
+ }
+ },
+ "@babel/plugin-transform-numeric-separator": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.11.tgz",
+ "integrity": "sha512-3dzU4QGPsILdJbASKhF/V2TVP+gJya1PsueQCxIPCEcerqF21oEcrob4mzjsp2Py/1nLfF5m+xYNMDpmA8vffg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4"
+ }
+ },
+ "@babel/plugin-transform-object-rest-spread": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.15.tgz",
+ "integrity": "sha512-fEB+I1+gAmfAyxZcX1+ZUwLeAuuf8VIg67CTznZE0MqVFumWkh8xWtn58I4dxdVf080wn7gzWoF8vndOViJe9Q==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.22.9",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-transform-parameters": "^7.22.15"
+ }
+ },
+ "@babel/plugin-transform-object-super": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz",
+ "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-optional-catch-binding": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.11.tgz",
+ "integrity": "sha512-rli0WxesXUeCJnMYhzAglEjLWVDF6ahb45HuprcmQuLidBJFWjNnOzssk2kuc6e33FlLaiZhG/kUIzUMWdBKaQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.3"
+ }
+ },
+ "@babel/plugin-transform-optional-chaining": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.0.tgz",
+ "integrity": "sha512-sBBGXbLJjxTzLBF5rFWaikMnOGOk/BmK6vVByIdEggZ7Vn6CvWXZyRkkLFK6WE0IF8jSliyOkUN6SScFgzCM0g==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3"
+ }
+ },
+ "@babel/plugin-transform-parameters": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.15.tgz",
+ "integrity": "sha512-hjk7qKIqhyzhhUvRT683TYQOFa/4cQKwQy7ALvTpODswN40MljzNDa0YldevS6tGbxwaEKVn502JmY0dP7qEtQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-private-methods": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz",
+ "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-class-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-private-property-in-object": {
+ "version": "7.22.11",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.11.tgz",
+ "integrity": "sha512-sSCbqZDBKHetvjSwpyWzhuHkmW5RummxJBVbYLkGkaiTOWGxml7SXt0iWa03bzxFIx7wOj3g/ILRd0RcJKBeSQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-create-class-features-plugin": "^7.22.11",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
+ }
+ },
+ "@babel/plugin-transform-property-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz",
+ "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-regenerator": {
+ "version": "7.22.10",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.10.tgz",
+ "integrity": "sha512-F28b1mDt8KcT5bUyJc/U9nwzw6cV+UmTeRlXYIl2TNqMMJif0Jeey9/RQ3C4NOd2zp0/TRsDns9ttj2L523rsw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "regenerator-transform": "^0.15.2"
+ }
+ },
+ "@babel/plugin-transform-reserved-words": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz",
+ "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-runtime": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.2.tgz",
+ "integrity": "sha512-XOntj6icgzMS58jPVtQpiuF6ZFWxQiJavISGx5KGjRj+3gqZr8+N6Kx+N9BApWzgS+DOjIZfXXj0ZesenOWDyA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "babel-plugin-polyfill-corejs2": "^0.4.6",
+ "babel-plugin-polyfill-corejs3": "^0.8.5",
+ "babel-plugin-polyfill-regenerator": "^0.5.3",
+ "semver": "^6.3.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/plugin-transform-shorthand-properties": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz",
+ "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-spread": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz",
+ "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-sticky-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz",
+ "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-template-literals": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz",
+ "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-typeof-symbol": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz",
+ "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-unicode-escapes": {
+ "version": "7.22.10",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.10.tgz",
+ "integrity": "sha512-lRfaRKGZCBqDlRU3UIFovdp9c9mEvlylmpod0/OatICsSfuQ9YFthRo1tpTkGsklEefZdqlEFdY4A2dwTb6ohg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-unicode-property-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz",
+ "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-unicode-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz",
+ "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/plugin-transform-unicode-sets-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz",
+ "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ }
+ },
+ "@babel/preset-env": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.2.tgz",
+ "integrity": "sha512-BW3gsuDD+rvHL2VO2SjAUNTBe5YrjsTiDyqamPDWY723na3/yPQ65X5oQkFVJZ0o50/2d+svm1rkPoJeR1KxVQ==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.23.2",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-validator-option": "^7.22.15",
+ "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.15",
+ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.15",
+ "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
+ "@babel/plugin-syntax-async-generators": "^7.8.4",
+ "@babel/plugin-syntax-class-properties": "^7.12.13",
+ "@babel/plugin-syntax-class-static-block": "^7.14.5",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+ "@babel/plugin-syntax-export-namespace-from": "^7.8.3",
+ "@babel/plugin-syntax-import-assertions": "^7.22.5",
+ "@babel/plugin-syntax-import-attributes": "^7.22.5",
+ "@babel/plugin-syntax-import-meta": "^7.10.4",
+ "@babel/plugin-syntax-json-strings": "^7.8.3",
+ "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
+ "@babel/plugin-syntax-numeric-separator": "^7.10.4",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3",
+ "@babel/plugin-syntax-private-property-in-object": "^7.14.5",
+ "@babel/plugin-syntax-top-level-await": "^7.14.5",
+ "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6",
+ "@babel/plugin-transform-arrow-functions": "^7.22.5",
+ "@babel/plugin-transform-async-generator-functions": "^7.23.2",
+ "@babel/plugin-transform-async-to-generator": "^7.22.5",
+ "@babel/plugin-transform-block-scoped-functions": "^7.22.5",
+ "@babel/plugin-transform-block-scoping": "^7.23.0",
+ "@babel/plugin-transform-class-properties": "^7.22.5",
+ "@babel/plugin-transform-class-static-block": "^7.22.11",
+ "@babel/plugin-transform-classes": "^7.22.15",
+ "@babel/plugin-transform-computed-properties": "^7.22.5",
+ "@babel/plugin-transform-destructuring": "^7.23.0",
+ "@babel/plugin-transform-dotall-regex": "^7.22.5",
+ "@babel/plugin-transform-duplicate-keys": "^7.22.5",
+ "@babel/plugin-transform-dynamic-import": "^7.22.11",
+ "@babel/plugin-transform-exponentiation-operator": "^7.22.5",
+ "@babel/plugin-transform-export-namespace-from": "^7.22.11",
+ "@babel/plugin-transform-for-of": "^7.22.15",
+ "@babel/plugin-transform-function-name": "^7.22.5",
+ "@babel/plugin-transform-json-strings": "^7.22.11",
+ "@babel/plugin-transform-literals": "^7.22.5",
+ "@babel/plugin-transform-logical-assignment-operators": "^7.22.11",
+ "@babel/plugin-transform-member-expression-literals": "^7.22.5",
+ "@babel/plugin-transform-modules-amd": "^7.23.0",
+ "@babel/plugin-transform-modules-commonjs": "^7.23.0",
+ "@babel/plugin-transform-modules-systemjs": "^7.23.0",
+ "@babel/plugin-transform-modules-umd": "^7.22.5",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5",
+ "@babel/plugin-transform-new-target": "^7.22.5",
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11",
+ "@babel/plugin-transform-numeric-separator": "^7.22.11",
+ "@babel/plugin-transform-object-rest-spread": "^7.22.15",
+ "@babel/plugin-transform-object-super": "^7.22.5",
+ "@babel/plugin-transform-optional-catch-binding": "^7.22.11",
+ "@babel/plugin-transform-optional-chaining": "^7.23.0",
+ "@babel/plugin-transform-parameters": "^7.22.15",
+ "@babel/plugin-transform-private-methods": "^7.22.5",
+ "@babel/plugin-transform-private-property-in-object": "^7.22.11",
+ "@babel/plugin-transform-property-literals": "^7.22.5",
+ "@babel/plugin-transform-regenerator": "^7.22.10",
+ "@babel/plugin-transform-reserved-words": "^7.22.5",
+ "@babel/plugin-transform-shorthand-properties": "^7.22.5",
+ "@babel/plugin-transform-spread": "^7.22.5",
+ "@babel/plugin-transform-sticky-regex": "^7.22.5",
+ "@babel/plugin-transform-template-literals": "^7.22.5",
+ "@babel/plugin-transform-typeof-symbol": "^7.22.5",
+ "@babel/plugin-transform-unicode-escapes": "^7.22.10",
+ "@babel/plugin-transform-unicode-property-regex": "^7.22.5",
+ "@babel/plugin-transform-unicode-regex": "^7.22.5",
+ "@babel/plugin-transform-unicode-sets-regex": "^7.22.5",
+ "@babel/preset-modules": "0.1.6-no-external-plugins",
+ "@babel/types": "^7.23.0",
+ "babel-plugin-polyfill-corejs2": "^0.4.6",
+ "babel-plugin-polyfill-corejs3": "^0.8.5",
+ "babel-plugin-polyfill-regenerator": "^0.5.3",
+ "core-js-compat": "^3.31.0",
+ "semver": "^6.3.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "@babel/preset-modules": {
+ "version": "0.1.6-no-external-plugins",
+ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz",
+ "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/types": "^7.4.4",
+ "esutils": "^2.0.2"
+ }
+ },
+ "@babel/regjsgen": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz",
+ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==",
+ "dev": true
+ },
+ "@babel/runtime": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz",
+ "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==",
+ "dev": true,
+ "requires": {
+ "regenerator-runtime": "^0.14.0"
+ }
+ },
+ "@babel/runtime-corejs3": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.23.2.tgz",
+ "integrity": "sha512-54cIh74Z1rp4oIjsHjqN+WM4fMyCBYe+LpZ9jWm51CZ1fbH3SkAzQD/3XLoNkjbJ7YEmjobLXyvQrFypRHOrXw==",
+ "dev": true,
+ "requires": {
+ "core-js-pure": "^3.30.2",
+ "regenerator-runtime": "^0.14.0"
+ }
+ },
+ "@babel/template": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
+ "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.22.13",
+ "@babel/parser": "^7.22.15",
+ "@babel/types": "^7.22.15"
+ }
+ },
+ "@babel/traverse": {
+ "version": "7.23.2",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
+ "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.22.13",
+ "@babel/generator": "^7.23.0",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-function-name": "^7.23.0",
+ "@babel/helper-hoist-variables": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/parser": "^7.23.0",
+ "@babel/types": "^7.23.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0"
+ }
+ },
+ "@babel/types": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
+ "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-string-parser": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20",
+ "to-fast-properties": "^2.0.0"
+ }
+ },
+ "@colors/colors": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
+ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
+ "dev": true,
+ "optional": true
+ },
+ "@discoveryjs/json-ext": {
+ "version": "0.5.7",
+ "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
+ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
+ "dev": true
+ },
+ "@jridgewell/gen-mapping": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "@jridgewell/resolve-uri": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "dev": true
+ },
+ "@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true
+ },
+ "@jridgewell/source-map": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",
+ "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "@jridgewell/sourcemap-codec": {
+ "version": "1.4.15",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+ "dev": true
+ },
+ "@jridgewell/trace-mapping": {
+ "version": "0.3.20",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
+ "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "@leichtgewicht/ip-codec": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
+ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==",
+ "dev": true
+ },
+ "@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ }
+ },
+ "@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true
+ },
+ "@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ }
+ },
+ "@one-ini/wasm": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz",
+ "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==",
+ "dev": true
+ },
+ "@prettier/plugin-php": {
+ "version": "0.19.7",
+ "resolved": "https://registry.npmjs.org/@prettier/plugin-php/-/plugin-php-0.19.7.tgz",
+ "integrity": "sha512-QOzBs05nwuR92uak7xBHf7RCZCFXml+6Sk3cjTp2ahQlilBtupqlNjitlTXsOfPIAYwlFgLP1oSfyapS6DN00w==",
+ "dev": true,
+ "requires": {
+ "linguist-languages": "^7.21.0",
+ "mem": "^8.0.0",
+ "php-parser": "^3.1.5"
+ }
+ },
+ "@shufo/tailwindcss-class-sorter": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/@shufo/tailwindcss-class-sorter/-/tailwindcss-class-sorter-3.0.1.tgz",
+ "integrity": "sha512-y9SMobvwElX2G6vdg4odJ6UL6hu/o5RlMsdwEeDLGaqHU3BLSw9CeitGgBus6kadjjDdT2wseG0Tl5yXWdc4UQ==",
+ "dev": true,
+ "requires": {
+ "escalade": "^3.1.1",
+ "object-hash": "^3.0.0",
+ "tailwindcss": "^3.3.2"
+ }
+ },
+ "@trysound/sax": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz",
+ "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==",
+ "dev": true
+ },
+ "@types/babel__core": {
+ "version": "7.20.3",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.3.tgz",
+ "integrity": "sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA==",
+ "dev": true,
+ "requires": {
+ "@babel/parser": "^7.20.7",
+ "@babel/types": "^7.20.7",
+ "@types/babel__generator": "*",
+ "@types/babel__template": "*",
+ "@types/babel__traverse": "*"
+ }
+ },
+ "@types/babel__generator": {
+ "version": "7.6.6",
+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.6.tgz",
+ "integrity": "sha512-66BXMKb/sUWbMdBNdMvajU7i/44RkrA3z/Yt1c7R5xejt8qh84iU54yUWCtm0QwGJlDcf/gg4zd/x4mpLAlb/w==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "@types/babel__template": {
+ "version": "7.4.3",
+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.3.tgz",
+ "integrity": "sha512-ciwyCLeuRfxboZ4isgdNZi/tkt06m8Tw6uGbBSBgWrnnZGNXiEyM27xc/PjXGQLqlZ6ylbgHMnm7ccF9tCkOeQ==",
+ "dev": true,
+ "requires": {
+ "@babel/parser": "^7.1.0",
+ "@babel/types": "^7.0.0"
+ }
+ },
+ "@types/babel__traverse": {
+ "version": "7.20.3",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.3.tgz",
+ "integrity": "sha512-Lsh766rGEFbaxMIDH7Qa+Yha8cMVI3qAK6CHt3OR0YfxOIn5Z54iHiyDRycHrBqeIiqGa20Kpsv1cavfBKkRSw==",
+ "dev": true,
+ "requires": {
+ "@babel/types": "^7.20.7"
+ }
+ },
+ "@types/body-parser": {
+ "version": "1.19.4",
+ "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.4.tgz",
+ "integrity": "sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==",
+ "dev": true,
+ "requires": {
+ "@types/connect": "*",
+ "@types/node": "*"
+ }
+ },
+ "@types/bonjour": {
+ "version": "3.5.12",
+ "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.12.tgz",
+ "integrity": "sha512-ky0kWSqXVxSqgqJvPIkgFkcn4C8MnRog308Ou8xBBIVo39OmUFy+jqNe0nPwLCDFxUpmT9EvT91YzOJgkDRcFg==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/clean-css": {
+ "version": "4.2.9",
+ "resolved": "https://registry.npmjs.org/@types/clean-css/-/clean-css-4.2.9.tgz",
+ "integrity": "sha512-pjzJ4n5eAXAz/L5Zur4ZymuJUvyo0Uh0iRnRI/1kADFLs76skDky0K0dX1rlv4iXXrJXNk3sxRWVJR7CMDroWA==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*",
+ "source-map": "^0.6.0"
+ }
+ },
+ "@types/connect": {
+ "version": "3.4.37",
+ "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.37.tgz",
+ "integrity": "sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/connect-history-api-fallback": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.2.tgz",
+ "integrity": "sha512-gX2j9x+NzSh4zOhnRPSdPPmTepS4DfxES0AvIFv3jGv5QyeAJf6u6dY5/BAoAJU9Qq1uTvwOku8SSC2GnCRl6Q==",
+ "dev": true,
+ "requires": {
+ "@types/express-serve-static-core": "*",
+ "@types/node": "*"
+ }
+ },
+ "@types/eslint": {
+ "version": "8.44.6",
+ "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.6.tgz",
+ "integrity": "sha512-P6bY56TVmX8y9J87jHNgQh43h6VVU+6H7oN7hgvivV81K2XY8qJZ5vqPy/HdUoVIelii2kChYVzQanlswPWVFw==",
+ "dev": true,
+ "requires": {
+ "@types/estree": "*",
+ "@types/json-schema": "*"
+ }
+ },
+ "@types/eslint-scope": {
+ "version": "3.7.6",
+ "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.6.tgz",
+ "integrity": "sha512-zfM4ipmxVKWdxtDaJ3MP3pBurDXOCoyjvlpE3u6Qzrmw4BPbfm4/ambIeTk/r/J0iq/+2/xp0Fmt+gFvXJY2PQ==",
+ "dev": true,
+ "requires": {
+ "@types/eslint": "*",
+ "@types/estree": "*"
+ }
+ },
+ "@types/estree": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz",
+ "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==",
+ "dev": true
+ },
+ "@types/express": {
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.20.tgz",
+ "integrity": "sha512-rOaqlkgEvOW495xErXMsmyX3WKBInbhG5eqojXYi3cGUaLoRDlXa5d52fkfWZT963AZ3v2eZ4MbKE6WpDAGVsw==",
+ "dev": true,
+ "requires": {
+ "@types/body-parser": "*",
+ "@types/express-serve-static-core": "^4.17.33",
+ "@types/qs": "*",
+ "@types/serve-static": "*"
+ }
+ },
+ "@types/express-serve-static-core": {
+ "version": "4.17.39",
+ "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.39.tgz",
+ "integrity": "sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*",
+ "@types/qs": "*",
+ "@types/range-parser": "*",
+ "@types/send": "*"
+ }
+ },
+ "@types/glob": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
+ "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==",
+ "dev": true,
+ "requires": {
+ "@types/minimatch": "*",
+ "@types/node": "*"
+ }
+ },
+ "@types/http-errors": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.3.tgz",
+ "integrity": "sha512-pP0P/9BnCj1OVvQR2lF41EkDG/lWWnDyA203b/4Fmi2eTyORnBtcDoKDwjWQthELrBvWkMOrvSOnZ8OVlW6tXA==",
+ "dev": true
+ },
+ "@types/http-proxy": {
+ "version": "1.17.13",
+ "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.13.tgz",
+ "integrity": "sha512-GkhdWcMNiR5QSQRYnJ+/oXzu0+7JJEPC8vkWXK351BkhjraZF+1W13CUYARUvX9+NqIU2n6YHA4iwywsc/M6Sw==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/imagemin": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin/-/imagemin-8.0.3.tgz",
+ "integrity": "sha512-se/hpaYxu5DyvPqmUEwbupmbQSx6JNislk0dkoIgWSmArkj+Ow9pGG9pGz8MRmbQDfGNYNzqwPQKHCUy+K+jpQ==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/imagemin-gifsicle": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-gifsicle/-/imagemin-gifsicle-7.0.3.tgz",
+ "integrity": "sha512-GQBKOk9doOd0Xp7OvO4QDl7U0Vkwk2Ps7J0rxafdAa7wG9lu7idvZTm8TtSZiRtHENdkW88Kz8OjmjMlgeeC5w==",
+ "dev": true,
+ "requires": {
+ "@types/imagemin": "*"
+ }
+ },
+ "@types/imagemin-mozjpeg": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-mozjpeg/-/imagemin-mozjpeg-8.0.3.tgz",
+ "integrity": "sha512-+U/ibETP2/oRqeuaaXa67dEpKHfzmfK0OBVC09AR4c1CIFAKjQ5xY+dxH+fjoMQRlwdcRQLkn/ALtnxSl3Xsqw==",
+ "dev": true,
+ "requires": {
+ "@types/imagemin": "*"
+ }
+ },
+ "@types/imagemin-optipng": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-optipng/-/imagemin-optipng-5.2.3.tgz",
+ "integrity": "sha512-Q80ANbJYn+WgKkWVfx9f7/q4LR6qun4NIiuV1eRWCg8KCAmNrU7ZH16a2hGs9kfkFqyJlhBv6oV9SDXe1vL3aQ==",
+ "dev": true,
+ "requires": {
+ "@types/imagemin": "*"
+ }
+ },
+ "@types/imagemin-svgo": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/@types/imagemin-svgo/-/imagemin-svgo-8.0.1.tgz",
+ "integrity": "sha512-YafkdrVAcr38U0Ln1C+L1n4SIZqC47VBHTyxCq7gTUSd1R9MdIvMcrljWlgU1M9O68WZDeQWUrKipKYfEOCOvQ==",
+ "dev": true,
+ "requires": {
+ "@types/imagemin": "*",
+ "@types/svgo": "^1"
+ }
+ },
+ "@types/json-schema": {
+ "version": "7.0.14",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz",
+ "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==",
+ "dev": true
+ },
+ "@types/mime": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.4.tgz",
+ "integrity": "sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==",
+ "dev": true
+ },
+ "@types/minimatch": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
+ "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==",
+ "dev": true
+ },
+ "@types/node": {
+ "version": "20.8.9",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.9.tgz",
+ "integrity": "sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==",
+ "dev": true,
+ "requires": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "@types/node-forge": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.8.tgz",
+ "integrity": "sha512-vGXshY9vim9CJjrpcS5raqSjEfKlJcWy2HNdgUasR66fAnVEYarrf1ULV4nfvpC1nZq/moA9qyqBcu83x+Jlrg==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/parse-json": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.1.tgz",
+ "integrity": "sha512-3YmXzzPAdOTVljVMkTMBdBEvlOLg2cDQaDhnnhT3nT9uDbnJzjWhKlzb+desT12Y7tGqaN6d+AbozcKzyL36Ng==",
+ "dev": true
+ },
+ "@types/qs": {
+ "version": "6.9.9",
+ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz",
+ "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==",
+ "dev": true
+ },
+ "@types/range-parser": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.6.tgz",
+ "integrity": "sha512-+0autS93xyXizIYiyL02FCY8N+KkKPhILhcUSA276HxzreZ16kl+cmwvV2qAM/PuCCwPXzOXOWhiPcw20uSFcA==",
+ "dev": true
+ },
+ "@types/retry": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz",
+ "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==",
+ "dev": true
+ },
+ "@types/send": {
+ "version": "0.17.3",
+ "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.3.tgz",
+ "integrity": "sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==",
+ "dev": true,
+ "requires": {
+ "@types/mime": "^1",
+ "@types/node": "*"
+ }
+ },
+ "@types/serve-index": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.3.tgz",
+ "integrity": "sha512-4KG+yMEuvDPRrYq5fyVm/I2uqAJSAwZK9VSa+Zf+zUq9/oxSSvy3kkIqyL+jjStv6UCVi8/Aho0NHtB1Fwosrg==",
+ "dev": true,
+ "requires": {
+ "@types/express": "*"
+ }
+ },
+ "@types/serve-static": {
+ "version": "1.15.4",
+ "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.4.tgz",
+ "integrity": "sha512-aqqNfs1XTF0HDrFdlY//+SGUxmdSUbjeRXb5iaZc3x0/vMbYmdw9qvOgHWOyyLFxSSRnUuP5+724zBgfw8/WAw==",
+ "dev": true,
+ "requires": {
+ "@types/http-errors": "*",
+ "@types/mime": "*",
+ "@types/node": "*"
+ }
+ },
+ "@types/sockjs": {
+ "version": "0.3.35",
+ "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.35.tgz",
+ "integrity": "sha512-tIF57KB+ZvOBpAQwSaACfEu7htponHXaFzP7RfKYgsOS0NoYnn+9+jzp7bbq4fWerizI3dTB4NfAZoyeQKWJLw==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/svgo": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/@types/svgo/-/svgo-1.3.6.tgz",
+ "integrity": "sha512-AZU7vQcy/4WFEuwnwsNsJnFwupIpbllH1++LXScN6uxT1Z4zPzdrWG97w4/I7eFKFTvfy/bHFStWjdBAg2Vjug==",
+ "dev": true
+ },
+ "@types/ws": {
+ "version": "8.5.8",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.8.tgz",
+ "integrity": "sha512-flUksGIQCnJd6sZ1l5dqCEG/ksaoAg/eUwiLAGTJQcfgvZJKF++Ta4bJA6A5aPSJmsr+xlseHn4KLgVlNnvPTg==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@vue/compiler-core": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.7.tgz",
+ "integrity": "sha512-pACdY6YnTNVLXsB86YD8OF9ihwpolzhhtdLVHhBL6do/ykr6kKXNYABRtNMGrsQXpEXXyAdwvWWkuTbs4MFtPQ==",
+ "dev": true,
+ "requires": {
+ "@babel/parser": "^7.23.0",
+ "@vue/shared": "3.3.7",
+ "estree-walker": "^2.0.2",
+ "source-map-js": "^1.0.2"
+ }
+ },
+ "@vue/compiler-dom": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.7.tgz",
+ "integrity": "sha512-0LwkyJjnUPssXv/d1vNJ0PKfBlDoQs7n81CbO6Q0zdL7H1EzqYRrTVXDqdBVqro0aJjo/FOa1qBAPVI4PGSHBw==",
+ "dev": true,
+ "requires": {
+ "@vue/compiler-core": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "@vue/compiler-sfc": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.7.tgz",
+ "integrity": "sha512-7pfldWy/J75U/ZyYIXRVqvLRw3vmfxDo2YLMwVtWVNew8Sm8d6wodM+OYFq4ll/UxfqVr0XKiVwti32PCrruAw==",
+ "dev": true,
+ "requires": {
+ "@babel/parser": "^7.23.0",
+ "@vue/compiler-core": "3.3.7",
+ "@vue/compiler-dom": "3.3.7",
+ "@vue/compiler-ssr": "3.3.7",
+ "@vue/reactivity-transform": "3.3.7",
+ "@vue/shared": "3.3.7",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.5",
+ "postcss": "^8.4.31",
+ "source-map-js": "^1.0.2"
+ }
+ },
+ "@vue/compiler-ssr": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.7.tgz",
+ "integrity": "sha512-TxOfNVVeH3zgBc82kcUv+emNHo+vKnlRrkv8YvQU5+Y5LJGJwSNzcmLUoxD/dNzv0bhQ/F0s+InlgV0NrApJZg==",
+ "dev": true,
+ "requires": {
+ "@vue/compiler-dom": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "@vue/reactivity": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.7.tgz",
+ "integrity": "sha512-cZNVjWiw00708WqT0zRpyAgduG79dScKEPYJXq2xj/aMtk3SKvL3FBt2QKUlh6EHBJ1m8RhBY+ikBUzwc7/khg==",
+ "dev": true,
+ "requires": {
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "@vue/reactivity-transform": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.7.tgz",
+ "integrity": "sha512-APhRmLVbgE1VPGtoLQoWBJEaQk4V8JUsqrQihImVqKT+8U6Qi3t5ATcg4Y9wGAPb3kIhetpufyZ1RhwbZCIdDA==",
+ "dev": true,
+ "requires": {
+ "@babel/parser": "^7.23.0",
+ "@vue/compiler-core": "3.3.7",
+ "@vue/shared": "3.3.7",
+ "estree-walker": "^2.0.2",
+ "magic-string": "^0.30.5"
+ }
+ },
+ "@vue/runtime-core": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.7.tgz",
+ "integrity": "sha512-LHq9du3ubLZFdK/BP0Ysy3zhHqRfBn80Uc+T5Hz3maFJBGhci1MafccnL3rpd5/3wVfRHAe6c+PnlO2PAavPTQ==",
+ "dev": true,
+ "requires": {
+ "@vue/reactivity": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "@vue/runtime-dom": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.7.tgz",
+ "integrity": "sha512-PFQU1oeJxikdDmrfoNQay5nD4tcPNYixUBruZzVX/l0eyZvFKElZUjW4KctCcs52nnpMGO6UDK+jF5oV4GT5Lw==",
+ "dev": true,
+ "requires": {
+ "@vue/runtime-core": "3.3.7",
+ "@vue/shared": "3.3.7",
+ "csstype": "^3.1.2"
+ }
+ },
+ "@vue/server-renderer": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.7.tgz",
+ "integrity": "sha512-UlpKDInd1hIZiNuVVVvLgxpfnSouxKQOSE2bOfQpBuGwxRV/JqqTCyyjXUWiwtVMyeRaZhOYYqntxElk8FhBhw==",
+ "dev": true,
+ "requires": {
+ "@vue/compiler-ssr": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "@vue/shared": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.7.tgz",
+ "integrity": "sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==",
+ "dev": true
+ },
+ "@webassemblyjs/ast": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
+ "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/helper-numbers": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6"
+ }
+ },
+ "@webassemblyjs/floating-point-hex-parser": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz",
+ "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-api-error": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz",
+ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-buffer": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz",
+ "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-numbers": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz",
+ "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/floating-point-hex-parser": "1.11.6",
+ "@webassemblyjs/helper-api-error": "1.11.6",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "@webassemblyjs/helper-wasm-bytecode": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz",
+ "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==",
+ "dev": true
+ },
+ "@webassemblyjs/helper-wasm-section": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz",
+ "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-buffer": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/wasm-gen": "1.11.6"
+ }
+ },
+ "@webassemblyjs/ieee754": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz",
+ "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==",
+ "dev": true,
+ "requires": {
+ "@xtuc/ieee754": "^1.2.0"
+ }
+ },
+ "@webassemblyjs/leb128": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz",
+ "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==",
+ "dev": true,
+ "requires": {
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "@webassemblyjs/utf8": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz",
+ "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==",
+ "dev": true
+ },
+ "@webassemblyjs/wasm-edit": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz",
+ "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-buffer": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/helper-wasm-section": "1.11.6",
+ "@webassemblyjs/wasm-gen": "1.11.6",
+ "@webassemblyjs/wasm-opt": "1.11.6",
+ "@webassemblyjs/wasm-parser": "1.11.6",
+ "@webassemblyjs/wast-printer": "1.11.6"
+ }
+ },
+ "@webassemblyjs/wasm-gen": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz",
+ "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/ieee754": "1.11.6",
+ "@webassemblyjs/leb128": "1.11.6",
+ "@webassemblyjs/utf8": "1.11.6"
+ }
+ },
+ "@webassemblyjs/wasm-opt": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz",
+ "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-buffer": "1.11.6",
+ "@webassemblyjs/wasm-gen": "1.11.6",
+ "@webassemblyjs/wasm-parser": "1.11.6"
+ }
+ },
+ "@webassemblyjs/wasm-parser": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz",
+ "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@webassemblyjs/helper-api-error": "1.11.6",
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6",
+ "@webassemblyjs/ieee754": "1.11.6",
+ "@webassemblyjs/leb128": "1.11.6",
+ "@webassemblyjs/utf8": "1.11.6"
+ }
+ },
+ "@webassemblyjs/wast-printer": {
+ "version": "1.11.6",
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz",
+ "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==",
+ "dev": true,
+ "requires": {
+ "@webassemblyjs/ast": "1.11.6",
+ "@xtuc/long": "4.2.2"
+ }
+ },
+ "@webpack-cli/configtest": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz",
+ "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==",
+ "dev": true,
+ "requires": {}
+ },
+ "@webpack-cli/info": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz",
+ "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==",
+ "dev": true,
+ "requires": {
+ "envinfo": "^7.7.3"
+ }
+ },
+ "@webpack-cli/serve": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz",
+ "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==",
+ "dev": true,
+ "requires": {}
+ },
+ "@xtuc/ieee754": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
+ "dev": true
+ },
+ "@xtuc/long": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
+ "dev": true
+ },
+ "abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true
+ },
+ "accepts": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
+ "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
+ "dev": true,
+ "requires": {
+ "mime-types": "~2.1.34",
+ "negotiator": "0.6.3"
+ }
+ },
+ "acorn": {
+ "version": "8.11.2",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz",
+ "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==",
+ "dev": true
+ },
+ "acorn-import-assertions": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz",
+ "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==",
+ "dev": true,
+ "requires": {}
+ },
+ "adjust-sourcemap-loader": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz",
+ "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^2.0.0",
+ "regex-parser": "^2.2.11"
+ }
+ },
+ "aigle": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/aigle/-/aigle-1.14.1.tgz",
+ "integrity": "sha512-bCmQ65CEebspmpbWFs6ab3S27TNyVH1b5MledX8KoiGxUhsJmPUUGpaoSijhwawNnq5Lt8jbcq7Z7gUAD0nuTw==",
+ "dev": true,
+ "requires": {
+ "aigle-core": "^1.0.0"
+ }
+ },
+ "aigle-core": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/aigle-core/-/aigle-core-1.0.0.tgz",
+ "integrity": "sha512-uGFWPumk5DLvYnUphNnff+kWC8VeAnjPbbU8ovsSHflKXGX77SD7cAN/aSBCLX3xnoJAM9KdtRgxUygRnSSu7A==",
+ "dev": true
+ },
+ "ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-formats": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
+ "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
+ "dev": true,
+ "requires": {
+ "ajv": "^8.0.0"
+ }
+ },
+ "ajv-keywords": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
+ "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.3"
+ }
+ },
+ "ansi-html-community": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
+ "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "any-promise": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
+ "arg": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
+ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
+ "dev": true
+ },
+ "array-flatten": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
+ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==",
+ "dev": true
+ },
+ "array-union": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+ "dev": true
+ },
+ "asn1.js": {
+ "version": "4.10.1",
+ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
+ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.0.0",
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "assert": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
+ "integrity": "sha512-N+aAxov+CKVS3JuhDIQFr24XvZvwE96Wlhk9dytTg/GmwWoghdOvR8dspx8MVz71O+Y0pA3UPqHF68D6iy8UvQ==",
+ "dev": true,
+ "requires": {
+ "util": "0.10.3"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "integrity": "sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==",
+ "dev": true
+ },
+ "util": {
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "integrity": "sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "2.0.1"
+ }
+ }
+ }
+ },
+ "asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "dev": true
+ },
+ "autoprefixer": {
+ "version": "10.4.16",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz",
+ "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.10",
+ "caniuse-lite": "^1.0.30001538",
+ "fraction.js": "^4.3.6",
+ "normalize-range": "^0.1.2",
+ "picocolors": "^1.0.0",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "axios": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz",
+ "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==",
+ "dev": true,
+ "requires": {
+ "follow-redirects": "^1.15.0",
+ "form-data": "^4.0.0",
+ "proxy-from-env": "^1.1.0"
+ }
+ },
+ "babel-loader": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz",
+ "integrity": "sha512-H8SvsMF+m9t15HNLMipppzkC+Y2Yq+v3SonZyU70RBL/h1gxPkH08Ot8pEE9Z4Kd+czyWJClmFS8qzIP9OZ04Q==",
+ "dev": true,
+ "requires": {
+ "find-cache-dir": "^3.3.1",
+ "loader-utils": "^2.0.0",
+ "make-dir": "^3.1.0",
+ "schema-utils": "^2.6.5"
+ }
+ },
+ "babel-plugin-polyfill-corejs2": {
+ "version": "0.4.6",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz",
+ "integrity": "sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q==",
+ "dev": true,
+ "requires": {
+ "@babel/compat-data": "^7.22.6",
+ "@babel/helper-define-polyfill-provider": "^0.4.3",
+ "semver": "^6.3.1"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "babel-plugin-polyfill-corejs3": {
+ "version": "0.8.6",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz",
+ "integrity": "sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-define-polyfill-provider": "^0.4.3",
+ "core-js-compat": "^3.33.1"
+ }
+ },
+ "babel-plugin-polyfill-regenerator": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz",
+ "integrity": "sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-define-polyfill-provider": "^0.4.3"
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "base64-js": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
+ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==",
+ "dev": true
+ },
+ "batch": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
+ "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==",
+ "dev": true
+ },
+ "big.js": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
+ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+ "dev": true
+ },
+ "binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true
+ },
+ "blade-formatter": {
+ "version": "1.38.5",
+ "resolved": "https://registry.npmjs.org/blade-formatter/-/blade-formatter-1.38.5.tgz",
+ "integrity": "sha512-J4JintmlH0yIIcTpVe5qtbSaXlyTD5vXOWkY7ns7sk6LIIZFFOn8k1yECv13EGsaDmb1dGNJsCGDMNeAGpIFdA==",
+ "dev": true,
+ "requires": {
+ "@prettier/plugin-php": "^0.19.7",
+ "@shufo/tailwindcss-class-sorter": "3.0.1",
+ "aigle": "^1.14.1",
+ "ajv": "^8.9.0",
+ "chalk": "^4.1.0",
+ "concat-stream": "^2.0.0",
+ "detect-indent": "^6.0.0",
+ "find-config": "^1.0.0",
+ "glob": "^8.0.1",
+ "html-attribute-sorter": "^0.4.3",
+ "ignore": "^5.1.8",
+ "js-beautify": "^1.14.8",
+ "lodash": "^4.17.19",
+ "php-parser": "3.1.5",
+ "prettier": "^2.2.0",
+ "tailwindcss": "^3.1.8",
+ "vscode-oniguruma": "1.7.0",
+ "vscode-textmate": "^7.0.1",
+ "xregexp": "^5.0.1",
+ "yargs": "^17.3.1"
+ }
+ },
+ "bn.js": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+ "dev": true
+ },
+ "body-parser": {
+ "version": "1.20.1",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
+ "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
+ "dev": true,
+ "requires": {
+ "bytes": "3.1.2",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "on-finished": "2.4.1",
+ "qs": "6.11.0",
+ "raw-body": "2.5.1",
+ "type-is": "~1.6.18",
+ "unpipe": "1.0.0"
+ },
+ "dependencies": {
+ "bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true
+ },
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ }
+ }
+ },
+ "bonjour-service": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.1.1.tgz",
+ "integrity": "sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg==",
+ "dev": true,
+ "requires": {
+ "array-flatten": "^2.1.2",
+ "dns-equal": "^1.0.0",
+ "fast-deep-equal": "^3.1.3",
+ "multicast-dns": "^7.2.5"
+ }
+ },
+ "boolbase": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
+ "dev": true
+ },
+ "bootstrap": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz",
+ "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "brorand": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==",
+ "dev": true
+ },
+ "browserify-aes": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
+ "dev": true,
+ "requires": {
+ "buffer-xor": "^1.0.3",
+ "cipher-base": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.3",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "browserify-cipher": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
+ "dev": true,
+ "requires": {
+ "browserify-aes": "^1.0.4",
+ "browserify-des": "^1.0.0",
+ "evp_bytestokey": "^1.0.0"
+ }
+ },
+ "browserify-des": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
+ "dev": true,
+ "requires": {
+ "cipher-base": "^1.0.1",
+ "des.js": "^1.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "browserify-rsa": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
+ "integrity": "sha512-+YpEyaLDDvvdzIxQ+cCx73r5YEhS3ANGOkiHdyWqW4t3gdeoNEYjSiQwntbU4Uo2/9yRkpYX3SRFeH+7jc2Duw==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "randombytes": "^2.0.1"
+ }
+ },
+ "browserify-sign": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
+ "integrity": "sha512-D2ItxCwNtLcHRrOCuEDZQlIezlFyUV/N5IYz6TY1svu1noyThFuthoEjzT8ChZe3UEctqnwmykcPhet3Eiz58A==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.1",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.2",
+ "elliptic": "^6.0.0",
+ "inherits": "^2.0.1",
+ "parse-asn1": "^5.0.0"
+ }
+ },
+ "browserify-zlib": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
+ "dev": true,
+ "requires": {
+ "pako": "~1.0.5"
+ }
+ },
+ "browserslist": {
+ "version": "4.22.1",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz",
+ "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==",
+ "dev": true,
+ "requires": {
+ "caniuse-lite": "^1.0.30001541",
+ "electron-to-chromium": "^1.4.535",
+ "node-releases": "^2.0.13",
+ "update-browserslist-db": "^1.0.13"
+ }
+ },
+ "buffer": {
+ "version": "4.9.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
+ "integrity": "sha512-DNK4ruAqtyHaN8Zne7PkBTO+dD1Lr0YfTduMqlIyjvQIoztBkUxrvL+hKeLW8NXFKHOq/2upkxuoS9znQ9bW9A==",
+ "dev": true,
+ "requires": {
+ "base64-js": "^1.0.2",
+ "ieee754": "^1.1.4",
+ "isarray": "^1.0.0"
+ }
+ },
+ "buffer-from": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+ "dev": true
+ },
+ "buffer-xor": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+ "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==",
+ "dev": true
+ },
+ "builtin-status-codes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+ "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==",
+ "dev": true
+ },
+ "bytes": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==",
+ "dev": true
+ },
+ "call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ }
+ },
+ "callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true
+ },
+ "camel-case": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
+ "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
+ "dev": true,
+ "requires": {
+ "pascal-case": "^3.1.2",
+ "tslib": "^2.0.3"
+ }
+ },
+ "camelcase-css": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
+ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
+ "dev": true
+ },
+ "caniuse-api": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
+ "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.0.0",
+ "caniuse-lite": "^1.0.0",
+ "lodash.memoize": "^4.1.2",
+ "lodash.uniq": "^4.5.0"
+ }
+ },
+ "caniuse-lite": {
+ "version": "1.0.30001558",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001558.tgz",
+ "integrity": "sha512-/Et7DwLqpjS47JPEcz6VnxU9PwcIdVi0ciLXRWBQdj1XFye68pSQYpV0QtPTfUKWuOaEig+/Vez2l74eDc1tPQ==",
+ "dev": true
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "charenc": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
+ "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==",
+ "dev": true
+ },
+ "chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ }
+ },
+ "chrome-trace-event": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
+ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
+ "dev": true
+ },
+ "cipher-base": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "clean-css": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz",
+ "integrity": "sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==",
+ "dev": true,
+ "requires": {
+ "source-map": "~0.6.0"
+ }
+ },
+ "cli-table3": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz",
+ "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==",
+ "dev": true,
+ "requires": {
+ "@colors/colors": "1.5.0",
+ "string-width": "^4.2.0"
+ }
+ },
+ "cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dev": true,
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ }
+ },
+ "clone-deep": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
+ "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
+ "dev": true,
+ "requires": {
+ "is-plain-object": "^2.0.4",
+ "kind-of": "^6.0.2",
+ "shallow-clone": "^3.0.0"
+ }
+ },
+ "collect.js": {
+ "version": "4.36.1",
+ "resolved": "https://registry.npmjs.org/collect.js/-/collect.js-4.36.1.tgz",
+ "integrity": "sha512-jd97xWPKgHn6uvK31V6zcyPd40lUJd7gpYxbN2VOVxGWO4tyvS9Li4EpsFjXepGTo2tYcOTC4a8YsbQXMJ4XUw==",
+ "dev": true
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "colord": {
+ "version": "2.9.3",
+ "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
+ "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==",
+ "dev": true
+ },
+ "colorette": {
+ "version": "2.0.20",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz",
+ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
+ "dev": true
+ },
+ "combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ },
+ "commander": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
+ "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
+ "dev": true
+ },
+ "commondir": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
+ "dev": true
+ },
+ "compressible": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+ "dev": true,
+ "requires": {
+ "mime-db": ">= 1.43.0 < 2"
+ }
+ },
+ "compression": {
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
+ "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.5",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.16",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.2",
+ "safe-buffer": "5.1.2",
+ "vary": "~1.1.2"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ }
+ }
+ },
+ "concat": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/concat/-/concat-1.0.3.tgz",
+ "integrity": "sha512-f/ZaH1aLe64qHgTILdldbvyfGiGF4uzeo9IuXUloIOLQzFmIPloy9QbZadNsuVv0j5qbKQvQb/H/UYf2UsKTpw==",
+ "dev": true,
+ "requires": {
+ "commander": "^2.9.0"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ }
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "concat-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
+ "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
+ "dev": true,
+ "requires": {
+ "buffer-from": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.0.2",
+ "typedarray": "^0.0.6"
+ }
+ },
+ "config-chain": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
+ "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
+ "dev": true,
+ "requires": {
+ "ini": "^1.3.4",
+ "proto-list": "~1.2.1"
+ }
+ },
+ "connect-history-api-fallback": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz",
+ "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==",
+ "dev": true
+ },
+ "consola": {
+ "version": "2.15.3",
+ "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz",
+ "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==",
+ "dev": true
+ },
+ "console-browserify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
+ "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==",
+ "dev": true,
+ "requires": {
+ "date-now": "^0.1.4"
+ }
+ },
+ "constants-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+ "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==",
+ "dev": true
+ },
+ "content-disposition": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
+ "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "5.2.1"
+ }
+ },
+ "content-type": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+ "dev": true
+ },
+ "convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "dev": true
+ },
+ "cookie": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
+ "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
+ "dev": true
+ },
+ "cookie-signature": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
+ "dev": true
+ },
+ "core-js-compat": {
+ "version": "3.33.1",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.33.1.tgz",
+ "integrity": "sha512-6pYKNOgD/j/bkC5xS5IIg6bncid3rfrI42oBH1SQJbsmYPKF7rhzcFzYCcxYMmNQQ0rCEB8WqpW7QHndOggaeQ==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.22.1"
+ }
+ },
+ "core-js-pure": {
+ "version": "3.33.1",
+ "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.33.1.tgz",
+ "integrity": "sha512-wCXGbLjnsP10PlK/thHSQlOLlLKNEkaWbTzVvHHZ79fZNeN1gUmw2gBlpItxPv/pvqldevEXFh/d5stdNvl6EQ==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==",
+ "dev": true
+ },
+ "cosmiconfig": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
+ "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==",
+ "dev": true,
+ "requires": {
+ "@types/parse-json": "^4.0.0",
+ "import-fresh": "^3.2.1",
+ "parse-json": "^5.0.0",
+ "path-type": "^4.0.0",
+ "yaml": "^1.10.0"
+ }
+ },
+ "create-ecdh": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
+ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "elliptic": "^6.0.0"
+ }
+ },
+ "create-hash": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+ "dev": true,
+ "requires": {
+ "cipher-base": "^1.0.1",
+ "inherits": "^2.0.1",
+ "md5.js": "^1.3.4",
+ "ripemd160": "^2.0.1",
+ "sha.js": "^2.4.0"
+ }
+ },
+ "create-hmac": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+ "dev": true,
+ "requires": {
+ "cipher-base": "^1.0.3",
+ "create-hash": "^1.1.0",
+ "inherits": "^2.0.1",
+ "ripemd160": "^2.0.0",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "cross-env": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
+ "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^7.0.1"
+ }
+ },
+ "cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ }
+ },
+ "crypt": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
+ "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==",
+ "dev": true
+ },
+ "crypto-browserify": {
+ "version": "3.12.0",
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
+ "dev": true,
+ "requires": {
+ "browserify-cipher": "^1.0.0",
+ "browserify-sign": "^4.0.0",
+ "create-ecdh": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "create-hmac": "^1.1.0",
+ "diffie-hellman": "^5.0.0",
+ "inherits": "^2.0.1",
+ "pbkdf2": "^3.0.3",
+ "public-encrypt": "^4.0.0",
+ "randombytes": "^2.0.0",
+ "randomfill": "^1.0.3"
+ }
+ },
+ "css-declaration-sorter": {
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz",
+ "integrity": "sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==",
+ "dev": true,
+ "requires": {}
+ },
+ "css-loader": {
+ "version": "5.2.7",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.2.7.tgz",
+ "integrity": "sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg==",
+ "dev": true,
+ "requires": {
+ "icss-utils": "^5.1.0",
+ "loader-utils": "^2.0.0",
+ "postcss": "^8.2.15",
+ "postcss-modules-extract-imports": "^3.0.0",
+ "postcss-modules-local-by-default": "^4.0.0",
+ "postcss-modules-scope": "^3.0.0",
+ "postcss-modules-values": "^4.0.0",
+ "postcss-value-parser": "^4.1.0",
+ "schema-utils": "^3.0.0",
+ "semver": "^7.3.5"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
+ "css-select": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz",
+ "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==",
+ "dev": true,
+ "requires": {
+ "boolbase": "^1.0.0",
+ "css-what": "^6.0.1",
+ "domhandler": "^4.3.1",
+ "domutils": "^2.8.0",
+ "nth-check": "^2.0.1"
+ },
+ "dependencies": {
+ "domhandler": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
+ "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.2.0"
+ }
+ }
+ }
+ },
+ "css-tree": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
+ "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
+ "dev": true,
+ "requires": {
+ "mdn-data": "2.0.14",
+ "source-map": "^0.6.1"
+ }
+ },
+ "css-what": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
+ "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
+ "dev": true
+ },
+ "cssesc": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+ "dev": true
+ },
+ "cssnano": {
+ "version": "5.1.15",
+ "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.15.tgz",
+ "integrity": "sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==",
+ "dev": true,
+ "requires": {
+ "cssnano-preset-default": "^5.2.14",
+ "lilconfig": "^2.0.3",
+ "yaml": "^1.10.2"
+ }
+ },
+ "cssnano-preset-default": {
+ "version": "5.2.14",
+ "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz",
+ "integrity": "sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==",
+ "dev": true,
+ "requires": {
+ "css-declaration-sorter": "^6.3.1",
+ "cssnano-utils": "^3.1.0",
+ "postcss-calc": "^8.2.3",
+ "postcss-colormin": "^5.3.1",
+ "postcss-convert-values": "^5.1.3",
+ "postcss-discard-comments": "^5.1.2",
+ "postcss-discard-duplicates": "^5.1.0",
+ "postcss-discard-empty": "^5.1.1",
+ "postcss-discard-overridden": "^5.1.0",
+ "postcss-merge-longhand": "^5.1.7",
+ "postcss-merge-rules": "^5.1.4",
+ "postcss-minify-font-values": "^5.1.0",
+ "postcss-minify-gradients": "^5.1.1",
+ "postcss-minify-params": "^5.1.4",
+ "postcss-minify-selectors": "^5.2.1",
+ "postcss-normalize-charset": "^5.1.0",
+ "postcss-normalize-display-values": "^5.1.0",
+ "postcss-normalize-positions": "^5.1.1",
+ "postcss-normalize-repeat-style": "^5.1.1",
+ "postcss-normalize-string": "^5.1.0",
+ "postcss-normalize-timing-functions": "^5.1.0",
+ "postcss-normalize-unicode": "^5.1.1",
+ "postcss-normalize-url": "^5.1.0",
+ "postcss-normalize-whitespace": "^5.1.1",
+ "postcss-ordered-values": "^5.1.3",
+ "postcss-reduce-initial": "^5.1.2",
+ "postcss-reduce-transforms": "^5.1.0",
+ "postcss-svgo": "^5.1.0",
+ "postcss-unique-selectors": "^5.1.1"
+ }
+ },
+ "cssnano-utils": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz",
+ "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==",
+ "dev": true,
+ "requires": {}
+ },
+ "csso": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
+ "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
+ "dev": true,
+ "requires": {
+ "css-tree": "^1.1.2"
+ }
+ },
+ "csstype": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
+ "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==",
+ "dev": true
+ },
+ "date-now": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
+ "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==",
+ "dev": true
+ },
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "default-gateway": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
+ "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==",
+ "dev": true,
+ "requires": {
+ "execa": "^5.0.0"
+ }
+ },
+ "define-lazy-prop": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
+ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
+ "dev": true
+ },
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "dev": true
+ },
+ "depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "dev": true
+ },
+ "des.js": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
+ "integrity": "sha512-QlJHGiTiOmW4z3EO0qKwjM2Mb+EmOlBHbpC6QgTiXB913NxMKttEuV2SJ+eLA12sMKDg1N8HnncfAtYaNnU+cg==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "destroy": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
+ "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
+ "dev": true
+ },
+ "detect-indent": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
+ "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==",
+ "dev": true
+ },
+ "detect-node": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz",
+ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
+ "dev": true
+ },
+ "didyoumean": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
+ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
+ "dev": true
+ },
+ "diffie-hellman": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "miller-rabin": "^4.0.0",
+ "randombytes": "^2.0.0"
+ }
+ },
+ "dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "requires": {
+ "path-type": "^4.0.0"
+ }
+ },
+ "dlv": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
+ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",
+ "dev": true
+ },
+ "dns-equal": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+ "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==",
+ "dev": true
+ },
+ "dns-packet": {
+ "version": "5.6.1",
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz",
+ "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==",
+ "dev": true,
+ "requires": {
+ "@leichtgewicht/ip-codec": "^2.0.1"
+ }
+ },
+ "dom-serializer": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",
+ "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.2.0",
+ "entities": "^2.0.0"
+ },
+ "dependencies": {
+ "domhandler": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
+ "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.2.0"
+ }
+ }
+ }
+ },
+ "domain-browser": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
+ "dev": true
+ },
+ "domelementtype": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
+ "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
+ "dev": true
+ },
+ "domhandler": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz",
+ "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.0.1"
+ }
+ },
+ "domutils": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
+ "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
+ "dev": true,
+ "requires": {
+ "dom-serializer": "^1.0.1",
+ "domelementtype": "^2.2.0",
+ "domhandler": "^4.2.0"
+ },
+ "dependencies": {
+ "domhandler": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
+ "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.2.0"
+ }
+ }
+ }
+ },
+ "dot-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
+ "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
+ "dev": true,
+ "requires": {
+ "no-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "dotenv": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
+ "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
+ "dev": true
+ },
+ "dotenv-expand": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
+ "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
+ "dev": true
+ },
+ "editorconfig": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz",
+ "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==",
+ "dev": true,
+ "requires": {
+ "@one-ini/wasm": "0.1.1",
+ "commander": "^10.0.0",
+ "minimatch": "9.0.1",
+ "semver": "^7.5.3"
+ },
+ "dependencies": {
+ "minimatch": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
+ "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ }
+ }
+ }
+ },
+ "ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "dev": true
+ },
+ "electron-to-chromium": {
+ "version": "1.4.569",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz",
+ "integrity": "sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==",
+ "dev": true
+ },
+ "elliptic": {
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
+ "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.11.9",
+ "brorand": "^1.1.0",
+ "hash.js": "^1.0.0",
+ "hmac-drbg": "^1.0.1",
+ "inherits": "^2.0.4",
+ "minimalistic-assert": "^1.0.1",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "emojis-list": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
+ "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
+ "dev": true
+ },
+ "encodeurl": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
+ "dev": true
+ },
+ "enhanced-resolve": {
+ "version": "5.15.0",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz",
+ "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.2.4",
+ "tapable": "^2.2.0"
+ }
+ },
+ "entities": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
+ "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
+ "dev": true
+ },
+ "envinfo": {
+ "version": "7.10.0",
+ "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz",
+ "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==",
+ "dev": true
+ },
+ "error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dev": true,
+ "requires": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "es-module-lexer": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz",
+ "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==",
+ "dev": true
+ },
+ "escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true
+ },
+ "escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true
+ },
+ "eslint-scope": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+ "dev": true,
+ "requires": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^4.1.1"
+ }
+ },
+ "esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^5.2.0"
+ },
+ "dependencies": {
+ "estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true
+ }
+ }
+ },
+ "estraverse": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha512-VHvyaGnJy+FuGfcfaM7W7OZw4mQiKW73jPHwQXx2VnMSUBajYmytOT5sKEfsBvNPtGX6YDwcrGDz2eocoHg0JA==",
+ "dev": true
+ },
+ "estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "integrity": "sha512-UUPPULqkyAV+M3Shodis7l8D+IyX6V8SbaBnTb449jf3fMTd8+UOZI1Q70NbZVOQkcR91yYgdHsJiMMMVmYshg==",
+ "dev": true
+ },
+ "etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "dev": true
+ },
+ "eventemitter3": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+ "dev": true
+ },
+ "events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "dev": true
+ },
+ "evp_bytestokey": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
+ "dev": true,
+ "requires": {
+ "md5.js": "^1.3.4",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "execa": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+ "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.0",
+ "human-signals": "^2.1.0",
+ "is-stream": "^2.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^4.0.1",
+ "onetime": "^5.1.2",
+ "signal-exit": "^3.0.3",
+ "strip-final-newline": "^2.0.0"
+ }
+ },
+ "express": {
+ "version": "4.18.2",
+ "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
+ "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.8",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.20.1",
+ "content-disposition": "0.5.4",
+ "content-type": "~1.0.4",
+ "cookie": "0.5.0",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.2.0",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.7",
+ "qs": "6.11.0",
+ "range-parser": "~1.2.1",
+ "safe-buffer": "5.2.1",
+ "send": "0.18.0",
+ "serve-static": "1.15.0",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "type-is": "~1.6.18",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ },
+ "dependencies": {
+ "array-flatten": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
+ "dev": true
+ },
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ }
+ }
+ },
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ }
+ },
+ "fast-json-stable-stringify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+ "integrity": "sha512-eIgZvM9C3P05kg0qxfqaVU6Tma4QedCPIByQOcemV0vju8ot3cS2DpHi4m2G2JvbSMI152rjfLX0p1pkSdyPlQ==",
+ "dev": true
+ },
+ "fastest-levenshtein": {
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
+ "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==",
+ "dev": true
+ },
+ "fastq": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+ "dev": true,
+ "requires": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "faye-websocket": {
+ "version": "0.11.4",
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
+ "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
+ "dev": true,
+ "requires": {
+ "websocket-driver": ">=0.5.1"
+ }
+ },
+ "file-loader": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz",
+ "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
+ "file-type": {
+ "version": "12.4.2",
+ "resolved": "https://registry.npmjs.org/file-type/-/file-type-12.4.2.tgz",
+ "integrity": "sha512-UssQP5ZgIOKelfsaB5CuGAL+Y+q7EmONuiwF3N5HAH0t27rvrttgi6Ra9k/+DVaY9UF6+ybxu5pOXLUdA8N7Vg==",
+ "dev": true
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "finalhandler": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
+ "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "2.4.1",
+ "parseurl": "~1.3.3",
+ "statuses": "2.0.1",
+ "unpipe": "~1.0.0"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ }
+ }
+ },
+ "find-cache-dir": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
+ "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
+ "dev": true,
+ "requires": {
+ "commondir": "^1.0.1",
+ "make-dir": "^3.0.2",
+ "pkg-dir": "^4.1.0"
+ }
+ },
+ "find-config": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/find-config/-/find-config-1.0.0.tgz",
+ "integrity": "sha512-Z+suHH+7LSE40WfUeZPIxSxypCWvrzdVc60xAjUShZeT5eMWM0/FQUduq3HjluyfAHWvC/aOBkT1pTZktyF/jg==",
+ "dev": true,
+ "requires": {
+ "user-home": "^2.0.0"
+ }
+ },
+ "find-up": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
+ }
+ },
+ "flat": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
+ "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==",
+ "dev": true
+ },
+ "follow-redirects": {
+ "version": "1.15.3",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
+ "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
+ "dev": true
+ },
+ "form-data": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
+ "dev": true,
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.8",
+ "mime-types": "^2.1.12"
+ }
+ },
+ "forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "dev": true
+ },
+ "fraction.js": {
+ "version": "4.3.7",
+ "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
+ "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
+ "dev": true
+ },
+ "fresh": {
+ "version": "0.5.2",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
+ "dev": true
+ },
+ "fs-extra": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ }
+ },
+ "fs-monkey": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz",
+ "integrity": "sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==",
+ "dev": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "optional": true
+ },
+ "function-bind": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true
+ },
+ "gensync": {
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+ "dev": true
+ },
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true
+ },
+ "get-intrinsic": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz",
+ "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.3"
+ }
+ },
+ "get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "dev": true
+ },
+ "glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ }
+ },
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true
+ },
+ "globals": {
+ "version": "11.11.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.11.0.tgz",
+ "integrity": "sha512-WHq43gS+6ufNOEqlrDBxVEbb8ntfXrfAUU2ZOpCxrBdGKW3gyv8mCxAfIBD0DroPKGrJ2eSsXsLtY9MPntsyTw==",
+ "dev": true
+ },
+ "globby": {
+ "version": "10.0.2",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz",
+ "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==",
+ "dev": true,
+ "requires": {
+ "@types/glob": "^7.1.1",
+ "array-union": "^2.1.0",
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.0.3",
+ "glob": "^7.1.3",
+ "ignore": "^5.1.1",
+ "merge2": "^1.2.3",
+ "slash": "^3.0.0"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true
+ },
+ "growly": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
+ "integrity": "sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==",
+ "dev": true
+ },
+ "handle-thing": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz",
+ "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==",
+ "dev": true
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true
+ },
+ "hash-base": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
+ "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "hash-sum": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
+ "integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
+ "dev": true
+ },
+ "hash.js": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "minimalistic-assert": "^1.0.1"
+ }
+ },
+ "hasown": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
+ "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.2"
+ }
+ },
+ "he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "dev": true
+ },
+ "hmac-drbg": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==",
+ "dev": true,
+ "requires": {
+ "hash.js": "^1.0.3",
+ "minimalistic-assert": "^1.0.0",
+ "minimalistic-crypto-utils": "^1.0.1"
+ }
+ },
+ "hpack.js": {
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
+ "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "obuf": "^1.0.0",
+ "readable-stream": "^2.0.1",
+ "wbuf": "^1.1.0"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ }
+ }
+ },
+ "html-attribute-sorter": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/html-attribute-sorter/-/html-attribute-sorter-0.4.3.tgz",
+ "integrity": "sha512-HWSvaXJki44tg0uR1t+j5pRdUVpNiZcJaoB/PFhss/YoAw9cxUDLCpIBbLWQmKjBQfWk91P6LaRnredEyabrDw==",
+ "dev": true
+ },
+ "html-entities": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.4.0.tgz",
+ "integrity": "sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==",
+ "dev": true
+ },
+ "html-loader": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/html-loader/-/html-loader-1.3.2.tgz",
+ "integrity": "sha512-DEkUwSd0sijK5PF3kRWspYi56XP7bTNkyg5YWSzBdjaSDmvCufep5c4Vpb3PBf6lUL0YPtLwBfy9fL0t5hBAGA==",
+ "dev": true,
+ "requires": {
+ "html-minifier-terser": "^5.1.1",
+ "htmlparser2": "^4.1.0",
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
+ "html-minifier-terser": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
+ "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==",
+ "dev": true,
+ "requires": {
+ "camel-case": "^4.1.1",
+ "clean-css": "^4.2.3",
+ "commander": "^4.1.1",
+ "he": "^1.2.0",
+ "param-case": "^3.0.3",
+ "relateurl": "^0.2.7",
+ "terser": "^4.6.3"
+ },
+ "dependencies": {
+ "clean-css": {
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz",
+ "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==",
+ "dev": true,
+ "requires": {
+ "source-map": "~0.6.0"
+ }
+ },
+ "commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "dev": true
+ },
+ "terser": {
+ "version": "4.8.1",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz",
+ "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==",
+ "dev": true,
+ "requires": {
+ "commander": "^2.20.0",
+ "source-map": "~0.6.1",
+ "source-map-support": "~0.5.12"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ }
+ }
+ }
+ }
+ },
+ "htmlparser2": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz",
+ "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.0.1",
+ "domhandler": "^3.0.0",
+ "domutils": "^2.0.0",
+ "entities": "^2.0.0"
+ }
+ },
+ "http-deceiver": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
+ "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==",
+ "dev": true
+ },
+ "http-errors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+ "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+ "dev": true,
+ "requires": {
+ "depd": "2.0.0",
+ "inherits": "2.0.4",
+ "setprototypeof": "1.2.0",
+ "statuses": "2.0.1",
+ "toidentifier": "1.0.1"
+ }
+ },
+ "http-parser-js": {
+ "version": "0.5.8",
+ "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
+ "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==",
+ "dev": true
+ },
+ "http-proxy": {
+ "version": "1.18.1",
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+ "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
+ "dev": true,
+ "requires": {
+ "eventemitter3": "^4.0.0",
+ "follow-redirects": "^1.0.0",
+ "requires-port": "^1.0.0"
+ }
+ },
+ "http-proxy-middleware": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz",
+ "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==",
+ "dev": true,
+ "requires": {
+ "@types/http-proxy": "^1.17.8",
+ "http-proxy": "^1.18.1",
+ "is-glob": "^4.0.1",
+ "is-plain-obj": "^3.0.0",
+ "micromatch": "^4.0.2"
+ }
+ },
+ "https-browserify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+ "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==",
+ "dev": true
+ },
+ "human-signals": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+ "dev": true
+ },
+ "iconv-lite": {
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3"
+ }
+ },
+ "icss-utils": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
+ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
+ "dev": true,
+ "requires": {}
+ },
+ "ieee754": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
+ "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==",
+ "dev": true
+ },
+ "ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true
+ },
+ "imagemin": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz",
+ "integrity": "sha512-33AmZ+xjZhg2JMCe+vDf6a9mzWukE7l+wAtesjE7KyteqqKjzxv7aVQeWnul1Ve26mWvEQqyPwl0OctNBfSR9w==",
+ "dev": true,
+ "requires": {
+ "file-type": "^12.0.0",
+ "globby": "^10.0.0",
+ "graceful-fs": "^4.2.2",
+ "junk": "^3.1.0",
+ "make-dir": "^3.0.0",
+ "p-pipe": "^3.0.0",
+ "replace-ext": "^1.0.0"
+ }
+ },
+ "img-loader": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/img-loader/-/img-loader-4.0.0.tgz",
+ "integrity": "sha512-UwRcPQdwdOyEHyCxe1V9s9YFwInwEWCpoO+kJGfIqDrBDqA8jZUsEZTxQ0JteNPGw/Gupmwesk2OhLTcnw6tnQ==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^1.1.0"
+ },
+ "dependencies": {
+ "json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.0"
+ }
+ },
+ "loader-utils": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
+ "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "dev": true,
+ "requires": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^1.0.1"
+ }
+ }
+ }
+ },
+ "immutable": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz",
+ "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==",
+ "dev": true
+ },
+ "import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ }
+ },
+ "import-local": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
+ "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
+ "dev": true,
+ "requires": {
+ "pkg-dir": "^4.2.0",
+ "resolve-cwd": "^3.0.0"
+ }
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+ "dev": true
+ },
+ "interpret": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
+ "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
+ "dev": true
+ },
+ "ipaddr.js": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz",
+ "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==",
+ "dev": true
+ },
+ "is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
+ "is-buffer": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+ "dev": true
+ },
+ "is-core-module": {
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
+ "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+ "dev": true,
+ "requires": {
+ "hasown": "^2.0.0"
+ }
+ },
+ "is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "is-plain-obj": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
+ "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
+ "dev": true
+ },
+ "is-plain-object": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "dev": true,
+ "requires": {
+ "isobject": "^3.0.1"
+ }
+ },
+ "is-stream": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+ "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+ "dev": true
+ },
+ "is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "requires": {
+ "is-docker": "^2.0.0"
+ }
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "dev": true
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "isobject": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8= sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",
+ "dev": true
+ },
+ "jest-worker": {
+ "version": "27.5.1",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
+ "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
+ "dev": true,
+ "requires": {
+ "@types/node": "*",
+ "merge-stream": "^2.0.0",
+ "supports-color": "^8.0.0"
+ },
+ "dependencies": {
+ "supports-color": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
+ "jiti": {
+ "version": "1.20.0",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz",
+ "integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==",
+ "dev": true
+ },
+ "jquery": {
+ "version": "3.7.1",
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
+ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
+ "dev": true
+ },
+ "js-beautify": {
+ "version": "1.14.9",
+ "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.9.tgz",
+ "integrity": "sha512-coM7xq1syLcMyuVGyToxcj2AlzhkDjmfklL8r0JgJ7A76wyGMpJ1oA35mr4APdYNO/o/4YY8H54NQIJzhMbhBg==",
+ "dev": true,
+ "requires": {
+ "config-chain": "^1.1.13",
+ "editorconfig": "^1.0.3",
+ "glob": "^8.1.0",
+ "nopt": "^6.0.0"
+ }
+ },
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "jsesc": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+ "dev": true
+ },
+ "json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true
+ },
+ "jsonfile": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.6",
+ "universalify": "^2.0.0"
+ }
+ },
+ "junk": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz",
+ "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==",
+ "dev": true
+ },
+ "kind-of": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
+ },
+ "klona": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
+ "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
+ "dev": true
+ },
+ "laravel-mix": {
+ "version": "6.0.49",
+ "resolved": "https://registry.npmjs.org/laravel-mix/-/laravel-mix-6.0.49.tgz",
+ "integrity": "sha512-bBMFpFjp26XfijPvY5y9zGKud7VqlyOE0OWUcPo3vTBY5asw8LTjafAbee1dhfLz6PWNqDziz69CP78ELSpfKw==",
+ "dev": true,
+ "requires": {
+ "@babel/core": "^7.15.8",
+ "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+ "@babel/plugin-transform-runtime": "^7.15.8",
+ "@babel/preset-env": "^7.15.8",
+ "@babel/runtime": "^7.15.4",
+ "@types/babel__core": "^7.1.16",
+ "@types/clean-css": "^4.2.5",
+ "@types/imagemin-gifsicle": "^7.0.1",
+ "@types/imagemin-mozjpeg": "^8.0.1",
+ "@types/imagemin-optipng": "^5.2.1",
+ "@types/imagemin-svgo": "^8.0.0",
+ "autoprefixer": "^10.4.0",
+ "babel-loader": "^8.2.3",
+ "chalk": "^4.1.2",
+ "chokidar": "^3.5.2",
+ "clean-css": "^5.2.4",
+ "cli-table3": "^0.6.0",
+ "collect.js": "^4.28.5",
+ "commander": "^7.2.0",
+ "concat": "^1.0.3",
+ "css-loader": "^5.2.6",
+ "cssnano": "^5.0.8",
+ "dotenv": "^10.0.0",
+ "dotenv-expand": "^5.1.0",
+ "file-loader": "^6.2.0",
+ "fs-extra": "^10.0.0",
+ "glob": "^7.2.0",
+ "html-loader": "^1.3.2",
+ "imagemin": "^7.0.1",
+ "img-loader": "^4.0.0",
+ "lodash": "^4.17.21",
+ "md5": "^2.3.0",
+ "mini-css-extract-plugin": "^1.6.2",
+ "node-libs-browser": "^2.2.1",
+ "postcss-load-config": "^3.1.0",
+ "postcss-loader": "^6.2.0",
+ "semver": "^7.3.5",
+ "strip-ansi": "^6.0.0",
+ "style-loader": "^2.0.0",
+ "terser": "^5.9.0",
+ "terser-webpack-plugin": "^5.2.4",
+ "vue-style-loader": "^4.1.3",
+ "webpack": "^5.60.0",
+ "webpack-cli": "^4.9.1",
+ "webpack-dev-server": "^4.7.3",
+ "webpack-merge": "^5.8.0",
+ "webpack-notifier": "^1.14.1",
+ "webpackbar": "^5.0.0-3",
+ "yargs": "^17.2.1"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "launch-editor": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz",
+ "integrity": "sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==",
+ "dev": true,
+ "requires": {
+ "picocolors": "^1.0.0",
+ "shell-quote": "^1.8.1"
+ }
+ },
+ "lilconfig": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz",
+ "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==",
+ "dev": true
+ },
+ "lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+ "dev": true
+ },
+ "linguist-languages": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmjs.org/linguist-languages/-/linguist-languages-7.27.0.tgz",
+ "integrity": "sha512-Wzx/22c5Jsv2ag+uKy+ITanGA5hzvBZngrNGDXLTC7ZjGM6FLCYGgomauTkxNJeP9of353OM0pWqngYA180xgw==",
+ "dev": true
+ },
+ "loader-runner": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
+ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
+ "dev": true
+ },
+ "loader-utils": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
+ "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+ "dev": true,
+ "requires": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^2.1.2"
+ }
+ },
+ "locate-path": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^4.1.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "lodash.debounce": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
+ "dev": true
+ },
+ "lodash.memoize": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
+ "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==",
+ "dev": true
+ },
+ "lodash.uniq": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
+ "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==",
+ "dev": true
+ },
+ "lower-case": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
+ "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^2.0.3"
+ }
+ },
+ "lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dev": true,
+ "requires": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "magic-string": {
+ "version": "0.30.5",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz",
+ "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/sourcemap-codec": "^1.4.15"
+ }
+ },
+ "make-dir": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+ "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+ "dev": true,
+ "requires": {
+ "semver": "^6.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true
+ }
+ }
+ },
+ "map-age-cleaner": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+ "dev": true,
+ "requires": {
+ "p-defer": "^1.0.0"
+ }
+ },
+ "md5": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz",
+ "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==",
+ "dev": true,
+ "requires": {
+ "charenc": "0.0.2",
+ "crypt": "0.0.2",
+ "is-buffer": "~1.1.6"
+ }
+ },
+ "md5.js": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+ "dev": true,
+ "requires": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "mdn-data": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
+ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
+ "dev": true
+ },
+ "media-typer": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
+ "dev": true
+ },
+ "mem": {
+ "version": "8.1.1",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz",
+ "integrity": "sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA==",
+ "dev": true,
+ "requires": {
+ "map-age-cleaner": "^0.1.3",
+ "mimic-fn": "^3.1.0"
+ }
+ },
+ "memfs": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz",
+ "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==",
+ "dev": true,
+ "requires": {
+ "fs-monkey": "^1.0.4"
+ }
+ },
+ "merge-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
+ "dev": true
+ },
+ "merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "dev": true
+ },
+ "merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true
+ },
+ "methods": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "requires": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ }
+ },
+ "miller-rabin": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.0.0",
+ "brorand": "^1.0.1"
+ }
+ },
+ "mime": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
+ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
+ "dev": true
+ },
+ "mime-db": {
+ "version": "1.52.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.35",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+ "dev": true,
+ "requires": {
+ "mime-db": "1.52.0"
+ }
+ },
+ "mimic-fn": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz",
+ "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==",
+ "dev": true
+ },
+ "mini-css-extract-plugin": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz",
+ "integrity": "sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0",
+ "webpack-sources": "^1.1.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
+ "minimalistic-assert": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+ "dev": true
+ },
+ "minimalistic-crypto-utils": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ }
+ },
+ "minimist": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
+ "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "dev": true
+ },
+ "multicast-dns": {
+ "version": "7.2.5",
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
+ "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==",
+ "dev": true,
+ "requires": {
+ "dns-packet": "^5.2.2",
+ "thunky": "^1.0.2"
+ }
+ },
+ "mz": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
+ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
+ "dev": true,
+ "requires": {
+ "any-promise": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "thenify-all": "^1.0.0"
+ }
+ },
+ "nanoid": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
+ "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
+ "dev": true
+ },
+ "negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "dev": true
+ },
+ "neo-async": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
+ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+ "dev": true
+ },
+ "no-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
+ "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
+ "dev": true,
+ "requires": {
+ "lower-case": "^2.0.2",
+ "tslib": "^2.0.3"
+ }
+ },
+ "node-forge": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
+ "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
+ "dev": true
+ },
+ "node-libs-browser": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz",
+ "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==",
+ "dev": true,
+ "requires": {
+ "assert": "^1.1.1",
+ "browserify-zlib": "^0.2.0",
+ "buffer": "^4.3.0",
+ "console-browserify": "^1.1.0",
+ "constants-browserify": "^1.0.0",
+ "crypto-browserify": "^3.11.0",
+ "domain-browser": "^1.1.1",
+ "events": "^3.0.0",
+ "https-browserify": "^1.0.0",
+ "os-browserify": "^0.3.0",
+ "path-browserify": "0.0.1",
+ "process": "^0.11.10",
+ "punycode": "^1.2.4",
+ "querystring-es3": "^0.2.0",
+ "readable-stream": "^2.3.3",
+ "stream-browserify": "^2.0.1",
+ "stream-http": "^2.7.2",
+ "string_decoder": "^1.0.0",
+ "timers-browserify": "^2.0.4",
+ "tty-browserify": "0.0.0",
+ "url": "^0.11.0",
+ "util": "^0.11.0",
+ "vm-browserify": "^1.0.1"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ }
+ }
+ },
+ "node-notifier": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-9.0.1.tgz",
+ "integrity": "sha512-fPNFIp2hF/Dq7qLDzSg4vZ0J4e9v60gJR+Qx7RbjbWqzPDdEqeVpEx5CFeDAELIl+A/woaaNn1fQ5nEVerMxJg==",
+ "dev": true,
+ "requires": {
+ "growly": "^1.3.0",
+ "is-wsl": "^2.2.0",
+ "semver": "^7.3.2",
+ "shellwords": "^0.1.1",
+ "uuid": "^8.3.0",
+ "which": "^2.0.2"
+ }
+ },
+ "node-releases": {
+ "version": "2.0.13",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
+ "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",
+ "dev": true
+ },
+ "nopt": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
+ "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
+ "dev": true,
+ "requires": {
+ "abbrev": "^1.0.0"
+ }
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "normalize-range": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
+ "dev": true
+ },
+ "normalize-url": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
+ "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
+ "dev": true
+ },
+ "npm-run-path": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+ "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.0.0"
+ }
+ },
+ "nth-check": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
+ "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
+ "dev": true,
+ "requires": {
+ "boolbase": "^1.0.0"
+ }
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+ "dev": true
+ },
+ "object-hash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
+ "dev": true
+ },
+ "object-inspect": {
+ "version": "1.12.2",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
+ "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==",
+ "dev": true
+ },
+ "obuf": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
+ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==",
+ "dev": true
+ },
+ "on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "dev": true,
+ "requires": {
+ "ee-first": "1.1.1"
+ }
+ },
+ "on-headers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
+ "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "onetime": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+ "dev": true,
+ "requires": {
+ "mimic-fn": "^2.1.0"
+ },
+ "dependencies": {
+ "mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true
+ }
+ }
+ },
+ "open": {
+ "version": "8.4.2",
+ "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz",
+ "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==",
+ "dev": true,
+ "requires": {
+ "define-lazy-prop": "^2.0.0",
+ "is-docker": "^2.1.1",
+ "is-wsl": "^2.2.0"
+ }
+ },
+ "os-browserify": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+ "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==",
+ "dev": true
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==",
+ "dev": true
+ },
+ "p-defer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==",
+ "dev": true
+ },
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.2.0"
+ }
+ },
+ "p-pipe": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-3.1.0.tgz",
+ "integrity": "sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw==",
+ "dev": true
+ },
+ "p-retry": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz",
+ "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==",
+ "dev": true,
+ "requires": {
+ "@types/retry": "0.12.0",
+ "retry": "^0.13.1"
+ }
+ },
+ "p-try": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
+ "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==",
+ "dev": true
+ },
+ "pako": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.8.tgz",
+ "integrity": "sha512-6i0HVbUfcKaTv+EG8ZTr75az7GFXcLYk9UyLEg7Notv/Ma+z/UG3TCoz6GiNeOrn1E/e63I0X/Hpw18jHOTUnA==",
+ "dev": true
+ },
+ "param-case": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
+ "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
+ "dev": true,
+ "requires": {
+ "dot-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "requires": {
+ "callsites": "^3.0.0"
+ }
+ },
+ "parse-asn1": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz",
+ "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==",
+ "dev": true,
+ "requires": {
+ "asn1.js": "^4.0.0",
+ "browserify-aes": "^1.0.0",
+ "create-hash": "^1.1.0",
+ "evp_bytestokey": "^1.0.0",
+ "pbkdf2": "^3.0.3",
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ }
+ },
+ "parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "dev": true
+ },
+ "pascal-case": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
+ "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
+ "dev": true,
+ "requires": {
+ "no-case": "^3.0.4",
+ "tslib": "^2.0.3"
+ }
+ },
+ "path-browserify": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
+ "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+ "dev": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true
+ },
+ "path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "path-to-regexp": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
+ "pbkdf2": {
+ "version": "3.0.17",
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
+ "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==",
+ "dev": true,
+ "requires": {
+ "create-hash": "^1.1.2",
+ "create-hmac": "^1.1.4",
+ "ripemd160": "^2.0.1",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
+ "php-parser": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.1.5.tgz",
+ "integrity": "sha512-jEY2DcbgCm5aclzBdfW86GM6VEIWcSlhTBSHN1qhJguVePlYe28GhwS0yoeLYXpM2K8y6wzLwrbq814n2PHSoQ==",
+ "dev": true
+ },
+ "picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
+ "picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==",
+ "dev": true
+ },
+ "pirates": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
+ "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
+ "dev": true
+ },
+ "pkg-dir": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+ "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+ "dev": true,
+ "requires": {
+ "find-up": "^4.0.0"
+ }
+ },
+ "popper.js": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
+ "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==",
+ "dev": true
+ },
+ "postcss": {
+ "version": "8.4.31",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
+ "dev": true,
+ "requires": {
+ "nanoid": "^3.3.6",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ }
+ },
+ "postcss-calc": {
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz",
+ "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==",
+ "dev": true,
+ "requires": {
+ "postcss-selector-parser": "^6.0.9",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-colormin": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.1.tgz",
+ "integrity": "sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "caniuse-api": "^3.0.0",
+ "colord": "^2.9.1",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-convert-values": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz",
+ "integrity": "sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-discard-comments": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz",
+ "integrity": "sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "postcss-discard-duplicates": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz",
+ "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==",
+ "dev": true,
+ "requires": {}
+ },
+ "postcss-discard-empty": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz",
+ "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==",
+ "dev": true,
+ "requires": {}
+ },
+ "postcss-discard-overridden": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz",
+ "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==",
+ "dev": true,
+ "requires": {}
+ },
+ "postcss-import": {
+ "version": "15.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz",
+ "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.0.0",
+ "read-cache": "^1.0.0",
+ "resolve": "^1.1.7"
+ }
+ },
+ "postcss-js": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz",
+ "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",
+ "dev": true,
+ "requires": {
+ "camelcase-css": "^2.0.1"
+ }
+ },
+ "postcss-load-config": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz",
+ "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==",
+ "dev": true,
+ "requires": {
+ "lilconfig": "^2.0.5",
+ "yaml": "^1.10.2"
+ }
+ },
+ "postcss-loader": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-6.2.1.tgz",
+ "integrity": "sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==",
+ "dev": true,
+ "requires": {
+ "cosmiconfig": "^7.0.0",
+ "klona": "^2.0.5",
+ "semver": "^7.3.5"
+ }
+ },
+ "postcss-merge-longhand": {
+ "version": "5.1.7",
+ "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.7.tgz",
+ "integrity": "sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0",
+ "stylehacks": "^5.1.1"
+ }
+ },
+ "postcss-merge-rules": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz",
+ "integrity": "sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "caniuse-api": "^3.0.0",
+ "cssnano-utils": "^3.1.0",
+ "postcss-selector-parser": "^6.0.5"
+ }
+ },
+ "postcss-minify-font-values": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz",
+ "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-minify-gradients": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz",
+ "integrity": "sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==",
+ "dev": true,
+ "requires": {
+ "colord": "^2.9.1",
+ "cssnano-utils": "^3.1.0",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-minify-params": {
+ "version": "5.1.4",
+ "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.4.tgz",
+ "integrity": "sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "cssnano-utils": "^3.1.0",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-minify-selectors": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz",
+ "integrity": "sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==",
+ "dev": true,
+ "requires": {
+ "postcss-selector-parser": "^6.0.5"
+ }
+ },
+ "postcss-modules-extract-imports": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
+ "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
+ "dev": true,
+ "requires": {}
+ },
+ "postcss-modules-local-by-default": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz",
+ "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==",
+ "dev": true,
+ "requires": {
+ "icss-utils": "^5.0.0",
+ "postcss-selector-parser": "^6.0.2",
+ "postcss-value-parser": "^4.1.0"
+ }
+ },
+ "postcss-modules-scope": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
+ "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
+ "dev": true,
+ "requires": {
+ "postcss-selector-parser": "^6.0.4"
+ }
+ },
+ "postcss-modules-values": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz",
+ "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==",
+ "dev": true,
+ "requires": {
+ "icss-utils": "^5.0.0"
+ }
+ },
+ "postcss-nested": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz",
+ "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==",
+ "dev": true,
+ "requires": {
+ "postcss-selector-parser": "^6.0.11"
+ }
+ },
+ "postcss-normalize-charset": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz",
+ "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==",
+ "dev": true,
+ "requires": {}
+ },
+ "postcss-normalize-display-values": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz",
+ "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-normalize-positions": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz",
+ "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-normalize-repeat-style": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz",
+ "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-normalize-string": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz",
+ "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-normalize-timing-functions": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz",
+ "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-normalize-unicode": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.1.tgz",
+ "integrity": "sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-normalize-url": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz",
+ "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==",
+ "dev": true,
+ "requires": {
+ "normalize-url": "^6.0.1",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-normalize-whitespace": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz",
+ "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-ordered-values": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz",
+ "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==",
+ "dev": true,
+ "requires": {
+ "cssnano-utils": "^3.1.0",
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-reduce-initial": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz",
+ "integrity": "sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "caniuse-api": "^3.0.0"
+ }
+ },
+ "postcss-reduce-transforms": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz",
+ "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0"
+ }
+ },
+ "postcss-selector-parser": {
+ "version": "6.0.13",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+ "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
+ "dev": true,
+ "requires": {
+ "cssesc": "^3.0.0",
+ "util-deprecate": "^1.0.2"
+ }
+ },
+ "postcss-svgo": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz",
+ "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==",
+ "dev": true,
+ "requires": {
+ "postcss-value-parser": "^4.2.0",
+ "svgo": "^2.7.0"
+ }
+ },
+ "postcss-unique-selectors": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz",
+ "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==",
+ "dev": true,
+ "requires": {
+ "postcss-selector-parser": "^6.0.5"
+ }
+ },
+ "postcss-value-parser": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
+ "dev": true
+ },
+ "prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "dev": true
+ },
+ "pretty-time": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz",
+ "integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==",
+ "dev": true
+ },
+ "process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
+ "dev": true
+ },
+ "proto-list": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
+ "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
+ "dev": true
+ },
+ "proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "dev": true,
+ "requires": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "dependencies": {
+ "ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "dev": true
+ }
+ }
+ },
+ "proxy-from-env": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+ "dev": true
+ },
+ "public-encrypt": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+ "dev": true,
+ "requires": {
+ "bn.js": "^4.1.0",
+ "browserify-rsa": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "parse-asn1": "^5.0.0",
+ "randombytes": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
+ "dev": true
+ },
+ "qs": {
+ "version": "6.11.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
+ "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
+ "dev": true,
+ "requires": {
+ "side-channel": "^1.0.4"
+ }
+ },
+ "querystring": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==",
+ "dev": true
+ },
+ "querystring-es3": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+ "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==",
+ "dev": true
+ },
+ "queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true
+ },
+ "randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "randomfill": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+ "dev": true,
+ "requires": {
+ "randombytes": "^2.0.5",
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "range-parser": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "dev": true
+ },
+ "raw-body": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
+ "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+ "dev": true,
+ "requires": {
+ "bytes": "3.1.2",
+ "http-errors": "2.0.0",
+ "iconv-lite": "0.4.24",
+ "unpipe": "1.0.0"
+ },
+ "dependencies": {
+ "bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "dev": true
+ }
+ }
+ },
+ "read-cache": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
+ "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==",
+ "dev": true,
+ "requires": {
+ "pify": "^2.3.0"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.2.1"
+ }
+ },
+ "rechoir": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
+ "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
+ "dev": true,
+ "requires": {
+ "resolve": "^1.9.0"
+ }
+ },
+ "regenerate": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
+ "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
+ "dev": true
+ },
+ "regenerate-unicode-properties": {
+ "version": "10.1.1",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz",
+ "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==",
+ "dev": true,
+ "requires": {
+ "regenerate": "^1.4.2"
+ }
+ },
+ "regenerator-runtime": {
+ "version": "0.14.0",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
+ "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==",
+ "dev": true
+ },
+ "regenerator-transform": {
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz",
+ "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==",
+ "dev": true,
+ "requires": {
+ "@babel/runtime": "^7.8.4"
+ }
+ },
+ "regex-parser": {
+ "version": "2.2.11",
+ "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz",
+ "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==",
+ "dev": true
+ },
+ "regexpu-core": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz",
+ "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==",
+ "dev": true,
+ "requires": {
+ "@babel/regjsgen": "^0.8.0",
+ "regenerate": "^1.4.2",
+ "regenerate-unicode-properties": "^10.1.0",
+ "regjsparser": "^0.9.1",
+ "unicode-match-property-ecmascript": "^2.0.0",
+ "unicode-match-property-value-ecmascript": "^2.1.0"
+ }
+ },
+ "regjsparser": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz",
+ "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==",
+ "dev": true,
+ "requires": {
+ "jsesc": "~0.5.0"
+ },
+ "dependencies": {
+ "jsesc": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+ "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==",
+ "dev": true
+ }
+ }
+ },
+ "relateurl": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+ "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==",
+ "dev": true
+ },
+ "replace-ext": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
+ "integrity": "sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA==",
+ "dev": true
+ },
+ "require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true
+ },
+ "require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true
+ },
+ "requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.22.8",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
+ "dev": true,
+ "requires": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ }
+ },
+ "resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "requires": {
+ "resolve-from": "^5.0.0"
+ },
+ "dependencies": {
+ "resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true
+ }
+ }
+ },
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ },
+ "resolve-url-loader": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz",
+ "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==",
+ "dev": true,
+ "requires": {
+ "adjust-sourcemap-loader": "^4.0.0",
+ "convert-source-map": "^1.7.0",
+ "loader-utils": "^2.0.0",
+ "postcss": "^8.2.14",
+ "source-map": "0.6.1"
+ },
+ "dependencies": {
+ "convert-source-map": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
+ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
+ "dev": true
+ }
+ }
+ },
+ "retry": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
+ "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
+ "dev": true
+ },
+ "reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "glob": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "ripemd160": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+ "dev": true,
+ "requires": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1"
+ }
+ },
+ "run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "requires": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true
+ },
+ "safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "dev": true
+ },
+ "sass": {
+ "version": "1.69.5",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz",
+ "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
+ "dev": true,
+ "requires": {
+ "chokidar": ">=3.0.0 <4.0.0",
+ "immutable": "^4.0.0",
+ "source-map-js": ">=0.6.2 <2.0.0"
+ }
+ },
+ "sass-loader": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.3.2.tgz",
+ "integrity": "sha512-CQbKl57kdEv+KDLquhC+gE3pXt74LEAzm+tzywcA0/aHZuub8wTErbjAoNI57rPUWRYRNC5WUnNl8eGJNbDdwg==",
+ "dev": true,
+ "requires": {
+ "neo-async": "^2.6.2"
+ }
+ },
+ "schema-utils": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
+ "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.5",
+ "ajv": "^6.12.4",
+ "ajv-keywords": "^3.5.2"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ }
+ }
+ },
+ "select-hose": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+ "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==",
+ "dev": true
+ },
+ "selfsigned": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz",
+ "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==",
+ "dev": true,
+ "requires": {
+ "@types/node-forge": "^1.3.0",
+ "node-forge": "^1"
+ }
+ },
+ "semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "send": {
+ "version": "0.18.0",
+ "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
+ "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
+ "dev": true,
+ "requires": {
+ "debug": "2.6.9",
+ "depd": "2.0.0",
+ "destroy": "1.2.0",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "2.0.0",
+ "mime": "1.6.0",
+ "ms": "2.1.3",
+ "on-finished": "2.4.1",
+ "range-parser": "~1.2.1",
+ "statuses": "2.0.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ }
+ }
+ },
+ "ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ }
+ }
+ },
+ "serialize-javascript": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
+ "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
+ "dev": true,
+ "requires": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "serve-index": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==",
+ "dev": true,
+ "requires": {
+ "accepts": "~1.3.4",
+ "batch": "0.6.1",
+ "debug": "2.6.9",
+ "escape-html": "~1.0.3",
+ "http-errors": "~1.6.2",
+ "mime-types": "~2.1.17",
+ "parseurl": "~1.3.2"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "depd": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==",
+ "dev": true
+ },
+ "http-errors": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==",
+ "dev": true,
+ "requires": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "dev": true
+ },
+ "setprototypeof": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
+ "dev": true
+ },
+ "statuses": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
+ "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==",
+ "dev": true
+ }
+ }
+ },
+ "serve-static": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
+ "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
+ "dev": true,
+ "requires": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.3",
+ "send": "0.18.0"
+ }
+ },
+ "setimmediate": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
+ "dev": true
+ },
+ "setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "dev": true
+ },
+ "sha.js": {
+ "version": "2.4.11",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "shallow-clone": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
+ "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
+ "dev": true,
+ "requires": {
+ "kind-of": "^6.0.2"
+ }
+ },
+ "shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true
+ },
+ "shell-quote": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz",
+ "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==",
+ "dev": true
+ },
+ "shellwords": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
+ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
+ "dev": true
+ },
+ "side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ }
+ },
+ "signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "slash": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+ "dev": true
+ },
+ "sockjs": {
+ "version": "0.3.24",
+ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
+ "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==",
+ "dev": true,
+ "requires": {
+ "faye-websocket": "^0.11.3",
+ "uuid": "^8.3.2",
+ "websocket-driver": "^0.7.4"
+ }
+ },
+ "source-list-map": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
+ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==",
+ "dev": true
+ },
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dev": true
+ },
+ "source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "requires": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "spdy": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
+ "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.1.0",
+ "handle-thing": "^2.0.0",
+ "http-deceiver": "^1.2.7",
+ "select-hose": "^2.0.0",
+ "spdy-transport": "^3.0.0"
+ }
+ },
+ "spdy-transport": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz",
+ "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.1.0",
+ "detect-node": "^2.0.4",
+ "hpack.js": "^2.1.6",
+ "obuf": "^1.1.2",
+ "readable-stream": "^3.0.6",
+ "wbuf": "^1.7.3"
+ }
+ },
+ "stable": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
+ "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
+ "dev": true
+ },
+ "statuses": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
+ "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
+ "dev": true
+ },
+ "std-env": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.4.3.tgz",
+ "integrity": "sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==",
+ "dev": true
+ },
+ "stream-browserify": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
+ "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
+ "dev": true,
+ "requires": {
+ "inherits": "~2.0.1",
+ "readable-stream": "^2.0.2"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ }
+ }
+ },
+ "stream-http": {
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
+ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
+ "dev": true,
+ "requires": {
+ "builtin-status-codes": "^3.0.0",
+ "inherits": "^2.0.1",
+ "readable-stream": "^2.3.6",
+ "to-arraybuffer": "^1.0.0",
+ "xtend": "^4.0.0"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
+ "dev": true,
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ }
+ }
+ },
+ "string_decoder": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
+ "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ },
+ "dependencies": {
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
+ }
+ }
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "strip-final-newline": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+ "dev": true
+ },
+ "style-loader": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz",
+ "integrity": "sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^2.0.0",
+ "schema-utils": "^3.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
+ "stylehacks": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz",
+ "integrity": "sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==",
+ "dev": true,
+ "requires": {
+ "browserslist": "^4.21.4",
+ "postcss-selector-parser": "^6.0.4"
+ }
+ },
+ "sucrase": {
+ "version": "3.34.0",
+ "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz",
+ "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "commander": "^4.0.0",
+ "glob": "7.1.6",
+ "lines-and-columns": "^1.1.6",
+ "mz": "^2.7.0",
+ "pirates": "^4.0.1",
+ "ts-interface-checker": "^0.1.9"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "commander": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true
+ },
+ "svgo": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz",
+ "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==",
+ "dev": true,
+ "requires": {
+ "@trysound/sax": "0.2.0",
+ "commander": "^7.2.0",
+ "css-select": "^4.1.3",
+ "css-tree": "^1.1.3",
+ "csso": "^4.2.0",
+ "picocolors": "^1.0.0",
+ "stable": "^0.1.8"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true
+ }
+ }
+ },
+ "tailwindcss": {
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
+ "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
+ "dev": true,
+ "requires": {
+ "@alloc/quick-lru": "^5.2.0",
+ "arg": "^5.0.2",
+ "chokidar": "^3.5.3",
+ "didyoumean": "^1.2.2",
+ "dlv": "^1.1.3",
+ "fast-glob": "^3.3.0",
+ "glob-parent": "^6.0.2",
+ "is-glob": "^4.0.3",
+ "jiti": "^1.19.1",
+ "lilconfig": "^2.1.0",
+ "micromatch": "^4.0.5",
+ "normalize-path": "^3.0.0",
+ "object-hash": "^3.0.0",
+ "picocolors": "^1.0.0",
+ "postcss": "^8.4.23",
+ "postcss-import": "^15.1.0",
+ "postcss-js": "^4.0.1",
+ "postcss-load-config": "^4.0.1",
+ "postcss-nested": "^6.0.1",
+ "postcss-selector-parser": "^6.0.11",
+ "resolve": "^1.22.2",
+ "sucrase": "^3.32.0"
+ },
+ "dependencies": {
+ "glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.3"
+ }
+ },
+ "postcss-load-config": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz",
+ "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==",
+ "dev": true,
+ "requires": {
+ "lilconfig": "^2.0.5",
+ "yaml": "^2.1.1"
+ }
+ },
+ "yaml": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
+ "integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
+ "dev": true
+ }
+ }
+ },
+ "tapable": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
+ "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
+ "dev": true
+ },
+ "terser": {
+ "version": "5.23.0",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.23.0.tgz",
+ "integrity": "sha512-Iyy83LN0uX9ZZLCX4Qbu5JiHiWjOCTwrmM9InWOzVeM++KNWEsqV4YgN9U9E8AlohQ6Gs42ztczlWOG/lwDAMA==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/source-map": "^0.3.3",
+ "acorn": "^8.8.2",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ }
+ }
+ },
+ "terser-webpack-plugin": {
+ "version": "5.3.9",
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz",
+ "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jest-worker": "^27.4.5",
+ "schema-utils": "^3.1.1",
+ "serialize-javascript": "^6.0.1",
+ "terser": "^5.16.8"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ }
+ }
+ },
+ "thenify": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
+ "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",
+ "dev": true,
+ "requires": {
+ "any-promise": "^1.0.0"
+ }
+ },
+ "thenify-all": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
+ "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",
+ "dev": true,
+ "requires": {
+ "thenify": ">= 3.1.0 < 4"
+ }
+ },
+ "thunky": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz",
+ "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow==",
+ "dev": true
+ },
+ "timers-browserify": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz",
+ "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==",
+ "dev": true,
+ "requires": {
+ "setimmediate": "^1.0.4"
+ }
+ },
+ "to-arraybuffer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
+ "integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==",
+ "dev": true
+ },
+ "to-fast-properties": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "dev": true
+ },
+ "ts-interface-checker": {
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
+ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
+ "dev": true
+ },
+ "tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
+ "dev": true
+ },
+ "tty-browserify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "integrity": "sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==",
+ "dev": true
+ },
+ "type-is": {
+ "version": "1.6.18",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+ "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+ "dev": true,
+ "requires": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.24"
+ }
+ },
+ "typedarray": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
+ "dev": true
+ },
+ "undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "dev": true
+ },
+ "unicode-canonical-property-names-ecmascript": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
+ "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==",
+ "dev": true
+ },
+ "unicode-match-property-ecmascript": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz",
+ "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==",
+ "dev": true,
+ "requires": {
+ "unicode-canonical-property-names-ecmascript": "^2.0.0",
+ "unicode-property-aliases-ecmascript": "^2.0.0"
+ }
+ },
+ "unicode-match-property-value-ecmascript": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz",
+ "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==",
+ "dev": true
+ },
+ "unicode-property-aliases-ecmascript": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz",
+ "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==",
+ "dev": true
+ },
+ "universalify": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+ "dev": true
+ },
+ "unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "dev": true
+ },
+ "update-browserslist-db": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
+ "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
+ "dev": true,
+ "requires": {
+ "escalade": "^3.1.1",
+ "picocolors": "^1.0.0"
+ }
+ },
+ "uri-js": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true
+ }
+ }
+ },
+ "url": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==",
+ "dev": true,
+ "requires": {
+ "punycode": "1.3.2",
+ "querystring": "0.2.0"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==",
+ "dev": true
+ }
+ }
+ },
+ "user-home": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
+ "integrity": "sha512-KMWqdlOcjCYdtIJpicDSFBQ8nFwS2i9sslAd6f4+CBGcU4gist2REnr2fxj2YocvJFxSF3ZOHLYLVZnUxv4BZQ==",
+ "dev": true,
+ "requires": {
+ "os-homedir": "^1.0.0"
+ }
+ },
+ "util": {
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
+ "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
+ "dev": true,
+ "requires": {
+ "inherits": "2.0.3"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==",
+ "dev": true
+ }
+ }
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "dev": true
+ },
+ "utils-merge": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
+ "dev": true
+ },
+ "uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "dev": true
+ },
+ "vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "dev": true
+ },
+ "vm-browserify": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
+ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
+ "dev": true
+ },
+ "vscode-oniguruma": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz",
+ "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==",
+ "dev": true
+ },
+ "vscode-textmate": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-7.0.4.tgz",
+ "integrity": "sha512-9hJp0xL7HW1Q5OgGe03NACo7yiCTMEk3WU/rtKXUbncLtdg6rVVNJnHwD88UhbIYU2KoxY0Dih0x+kIsmUKn2A==",
+ "dev": true
+ },
+ "vue": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.7.tgz",
+ "integrity": "sha512-YEMDia1ZTv1TeBbnu6VybatmSteGOS3A3YgfINOfraCbf85wdKHzscD6HSS/vB4GAtI7sa1XPX7HcQaJ1l24zA==",
+ "dev": true,
+ "requires": {
+ "@vue/compiler-dom": "3.3.7",
+ "@vue/compiler-sfc": "3.3.7",
+ "@vue/runtime-dom": "3.3.7",
+ "@vue/server-renderer": "3.3.7",
+ "@vue/shared": "3.3.7"
+ }
+ },
+ "vue-style-loader": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
+ "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==",
+ "dev": true,
+ "requires": {
+ "hash-sum": "^1.0.2",
+ "loader-utils": "^1.0.2"
+ },
+ "dependencies": {
+ "json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.0"
+ }
+ },
+ "loader-utils": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
+ "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
+ "dev": true,
+ "requires": {
+ "big.js": "^5.2.2",
+ "emojis-list": "^3.0.0",
+ "json5": "^1.0.1"
+ }
+ }
+ }
+ },
+ "watchpack": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
+ "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
+ "dev": true,
+ "requires": {
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.1.2"
+ }
+ },
+ "wbuf": {
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
+ "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
+ "dev": true,
+ "requires": {
+ "minimalistic-assert": "^1.0.0"
+ }
+ },
+ "webpack": {
+ "version": "5.89.0",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz",
+ "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==",
+ "dev": true,
+ "requires": {
+ "@types/eslint-scope": "^3.7.3",
+ "@types/estree": "^1.0.0",
+ "@webassemblyjs/ast": "^1.11.5",
+ "@webassemblyjs/wasm-edit": "^1.11.5",
+ "@webassemblyjs/wasm-parser": "^1.11.5",
+ "acorn": "^8.7.1",
+ "acorn-import-assertions": "^1.9.0",
+ "browserslist": "^4.14.5",
+ "chrome-trace-event": "^1.0.2",
+ "enhanced-resolve": "^5.15.0",
+ "es-module-lexer": "^1.2.1",
+ "eslint-scope": "5.1.1",
+ "events": "^3.2.0",
+ "glob-to-regexp": "^0.4.1",
+ "graceful-fs": "^4.2.9",
+ "json-parse-even-better-errors": "^2.3.1",
+ "loader-runner": "^4.2.0",
+ "mime-types": "^2.1.27",
+ "neo-async": "^2.6.2",
+ "schema-utils": "^3.2.0",
+ "tapable": "^2.1.1",
+ "terser-webpack-plugin": "^5.3.7",
+ "watchpack": "^2.4.0",
+ "webpack-sources": "^3.2.3"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ajv-keywords": {
+ "version": "3.5.2",
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+ "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+ "dev": true,
+ "requires": {}
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "schema-utils": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
+ "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.8",
+ "ajv": "^6.12.5",
+ "ajv-keywords": "^3.5.2"
+ }
+ },
+ "webpack-sources": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
+ "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
+ "dev": true
+ }
+ }
+ },
+ "webpack-cli": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz",
+ "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==",
+ "dev": true,
+ "requires": {
+ "@discoveryjs/json-ext": "^0.5.0",
+ "@webpack-cli/configtest": "^1.2.0",
+ "@webpack-cli/info": "^1.5.0",
+ "@webpack-cli/serve": "^1.7.0",
+ "colorette": "^2.0.14",
+ "commander": "^7.0.0",
+ "cross-spawn": "^7.0.3",
+ "fastest-levenshtein": "^1.0.12",
+ "import-local": "^3.0.2",
+ "interpret": "^2.2.0",
+ "rechoir": "^0.7.0",
+ "webpack-merge": "^5.7.3"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+ "dev": true
+ }
+ }
+ },
+ "webpack-dev-middleware": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz",
+ "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==",
+ "dev": true,
+ "requires": {
+ "colorette": "^2.0.10",
+ "memfs": "^3.4.3",
+ "mime-types": "^2.1.31",
+ "range-parser": "^1.2.1",
+ "schema-utils": "^4.0.0"
+ },
+ "dependencies": {
+ "schema-utils": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz",
+ "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.9.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.1.0"
+ }
+ }
+ }
+ },
+ "webpack-dev-server": {
+ "version": "4.15.1",
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz",
+ "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==",
+ "dev": true,
+ "requires": {
+ "@types/bonjour": "^3.5.9",
+ "@types/connect-history-api-fallback": "^1.3.5",
+ "@types/express": "^4.17.13",
+ "@types/serve-index": "^1.9.1",
+ "@types/serve-static": "^1.13.10",
+ "@types/sockjs": "^0.3.33",
+ "@types/ws": "^8.5.5",
+ "ansi-html-community": "^0.0.8",
+ "bonjour-service": "^1.0.11",
+ "chokidar": "^3.5.3",
+ "colorette": "^2.0.10",
+ "compression": "^1.7.4",
+ "connect-history-api-fallback": "^2.0.0",
+ "default-gateway": "^6.0.3",
+ "express": "^4.17.3",
+ "graceful-fs": "^4.2.6",
+ "html-entities": "^2.3.2",
+ "http-proxy-middleware": "^2.0.3",
+ "ipaddr.js": "^2.0.1",
+ "launch-editor": "^2.6.0",
+ "open": "^8.0.9",
+ "p-retry": "^4.5.0",
+ "rimraf": "^3.0.2",
+ "schema-utils": "^4.0.0",
+ "selfsigned": "^2.1.1",
+ "serve-index": "^1.9.1",
+ "sockjs": "^0.3.24",
+ "spdy": "^4.0.2",
+ "webpack-dev-middleware": "^5.3.1",
+ "ws": "^8.13.0"
+ },
+ "dependencies": {
+ "schema-utils": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz",
+ "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
+ "dev": true,
+ "requires": {
+ "@types/json-schema": "^7.0.9",
+ "ajv": "^8.9.0",
+ "ajv-formats": "^2.1.1",
+ "ajv-keywords": "^5.1.0"
+ }
+ }
+ }
+ },
+ "webpack-merge": {
+ "version": "5.10.0",
+ "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz",
+ "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==",
+ "dev": true,
+ "requires": {
+ "clone-deep": "^4.0.1",
+ "flat": "^5.0.2",
+ "wildcard": "^2.0.0"
+ }
+ },
+ "webpack-notifier": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/webpack-notifier/-/webpack-notifier-1.15.0.tgz",
+ "integrity": "sha512-N2V8UMgRB5komdXQRavBsRpw0hPhJq2/SWNOGuhrXpIgRhcMexzkGQysUyGStHLV5hkUlgpRiF7IUXoBqyMmzQ==",
+ "dev": true,
+ "requires": {
+ "node-notifier": "^9.0.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "webpack-sources": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz",
+ "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==",
+ "dev": true,
+ "requires": {
+ "source-list-map": "^2.0.0",
+ "source-map": "~0.6.1"
+ }
+ },
+ "webpackbar": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz",
+ "integrity": "sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ==",
+ "dev": true,
+ "requires": {
+ "chalk": "^4.1.0",
+ "consola": "^2.15.3",
+ "pretty-time": "^1.1.0",
+ "std-env": "^3.0.1"
+ }
+ },
+ "websocket-driver": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
+ "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
+ "dev": true,
+ "requires": {
+ "http-parser-js": ">=0.5.1",
+ "safe-buffer": ">=5.1.0",
+ "websocket-extensions": ">=0.1.1"
+ }
+ },
+ "websocket-extensions": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
+ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
+ "dev": true
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "wildcard": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz",
+ "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "ws": {
+ "version": "8.14.2",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
+ "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
+ "dev": true,
+ "requires": {}
+ },
+ "xregexp": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-5.1.1.tgz",
+ "integrity": "sha512-fKXeVorD+CzWvFs7VBuKTYIW63YD1e1osxwQ8caZ6o1jg6pDAbABDG54LCIq0j5cy7PjRvGIq6sef9DYPXpncg==",
+ "dev": true,
+ "requires": {
+ "@babel/runtime-corejs3": "^7.16.5"
+ }
+ },
+ "xtend": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "integrity": "sha512-iTwvhNBRetXWe81+VcIw5YeadVSWyze7uA7nVnpP13ulrpnJ3UfQm5ApGnrkmxDJFdrblRdZs0EvaTCIfei5oQ==",
+ "dev": true
+ },
+ "y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true
+ },
+ "yallist": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
+ "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
+ "dev": true
+ },
+ "yaml": {
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
+ "dev": true
+ },
+ "yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dev": true,
+ "requires": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ }
+ },
+ "yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "dev": true
+ }
+ }
+}
diff --git a/package.json b/package.json
index edece6ebb7..1c25596075 100644
--- a/package.json
+++ b/package.json
@@ -2,24 +2,26 @@
"private": true,
"scripts": {
"dev": "npm run development",
- "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
- "watch": "npm run development -- --watch",
- "watch-poll": "npm run watch -- --watch-poll",
- "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
+ "development": "mix",
+ "watch": "mix watch",
+ "watch-poll": "mix watch -- --watch-options-poll=1000",
+ "hot": "mix watch --hot",
"prod": "npm run production",
- "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
+ "production": "mix --production",
+ "format": "./node_modules/.bin/blade-formatter --progress --write '**/*.blade.php'"
},
"devDependencies": {
- "axios": "^0.21.2",
- "bootstrap": "^4.0.0",
- "cross-env": "^5.1",
- "jquery": "^3.5",
- "laravel-mix": "^4.0.7",
- "lodash": "^4.17.19",
- "popper.js": "^1.12",
- "resolve-url-loader": "^2.3.1",
- "sass": "^1.15.2",
- "sass-loader": "^7.1.0",
- "vue": "^2.5.17"
+ "axios": "^1.6.0",
+ "blade-formatter": "^1.38.5",
+ "bootstrap": "^4.6",
+ "cross-env": "^7.0",
+ "jquery": "^3.7",
+ "laravel-mix": "^6.0.49",
+ "lodash": "^4.17.21",
+ "popper.js": "^1.16",
+ "resolve-url-loader": "^5.0.0",
+ "sass": "^1.69.5",
+ "sass-loader": "^13.3.2",
+ "vue": "^3.3.7"
}
}
diff --git a/pint.json b/pint.json
new file mode 100644
index 0000000000..bec0140c73
--- /dev/null
+++ b/pint.json
@@ -0,0 +1,188 @@
+{
+ "rules": {
+ "@PHP80Migration": true,
+ "align_multiline_comment": true,
+ "array_syntax": {
+ "syntax": "short"
+ },
+ "binary_operator_spaces": {
+ "default": "single_space",
+ "operators": {
+ "=>": "align"
+ }
+ },
+ "blank_line_after_namespace": true,
+ "blank_line_after_opening_tag": true,
+ "blank_line_before_statement": {
+ "statements": [
+ "return"
+ ]
+ },
+ "braces": true,
+ "cast_spaces": true,
+ "class_attributes_separation": {
+ "elements": {
+ "method": "one"
+ }
+ },
+ "class_definition": true,
+ "class_reference_name_casing": true,
+ "concat_space": {
+ "spacing": "none"
+ },
+ "curly_braces_position": {
+ "classes_opening_brace": "same_line",
+ "functions_opening_brace": "same_line"
+ },
+ "declare_equal_normalize": true,
+ "elseif": true,
+ "encoding": true,
+ "explicit_string_variable": true,
+ "full_opening_tag": true,
+ "fully_qualified_strict_types": true,
+ "function_declaration": true,
+ "function_typehint_space": true,
+ "heredoc_to_nowdoc": true,
+ "include": true,
+ "increment_style": {
+ "style": "post"
+ },
+ "indentation_type": true,
+ "linebreak_after_opening_tag": true,
+ "line_ending": true,
+ "lowercase_cast": true,
+ "constant_case": true,
+ "lowercase_keywords": true,
+ "lowercase_static_reference": true,
+ "magic_method_casing": true,
+ "magic_constant_casing": true,
+ "method_argument_space": true,
+ "native_function_casing": true,
+ "no_alias_functions": true,
+ "no_extra_blank_lines": {
+ "tokens": ["extra", "throw", "use"]
+ },
+ "no_blank_lines_after_class_opening": true,
+ "no_blank_lines_after_phpdoc": true,
+ "no_closing_tag": true,
+ "no_empty_phpdoc": true,
+ "no_empty_statement": true,
+ "no_leading_import_slash": true,
+ "no_leading_namespace_whitespace": true,
+ "no_mixed_echo_print": {
+ "use": "echo"
+ },
+ "no_multiline_whitespace_around_double_arrow": true,
+ "multiline_whitespace_before_semicolons": {
+ "strategy": "no_multi_line"
+ },
+ "no_short_bool_cast": true,
+ "no_singleline_whitespace_before_semicolons": true,
+ "no_spaces_after_function_name": true,
+ "no_spaces_around_offset": true,
+ "no_spaces_inside_parenthesis": true,
+ "no_trailing_comma_in_list_call": true,
+ "no_trailing_comma_in_singleline_array": true,
+ "no_trailing_whitespace": true,
+ "no_trailing_whitespace_in_comment": true,
+ "no_unneeded_control_parentheses": true,
+ "no_unreachable_default_argument_value": true,
+ "no_useless_return": true,
+ "no_whitespace_before_comma_in_array": true,
+ "no_whitespace_in_blank_line": true,
+ "normalize_index_brace": true,
+ "not_operator_with_successor_space": false,
+ "object_operator_without_whitespace": true,
+ "ordered_imports": {
+ "imports_order": [
+ "class",
+ "function",
+ "const"
+ ]
+ },
+ "ordered_class_elements": {
+ "order": [
+ "use_trait",
+ "property_protected",
+ "property_private",
+ "property_public",
+ "construct",
+ "destruct",
+ "magic",
+ "phpunit",
+ "method_public",
+ "method_protected",
+ "method_private",
+ "constant_public",
+ "constant_protected",
+ "constant_private"
+ ]
+ },
+ "ordered_traits": true,
+ "no_superfluous_phpdoc_tags": {
+ "allow_mixed": true
+ },
+ "phpdoc_add_missing_param_annotation": true,
+ "phpdoc_align": true,
+ "phpdoc_annotation_without_dot": true,
+ "phpdoc_indent": true,
+ "general_phpdoc_tag_rename": true,
+ "phpdoc_order_by_value": true,
+ "phpdoc_order": true,
+ "phpdoc_inline_tag_normalizer": true,
+ "phpdoc_tag_type": true,
+ "phpdoc_no_access": true,
+ "phpdoc_no_empty_return": true,
+ "phpdoc_no_package": true,
+ "phpdoc_no_useless_inheritdoc": true,
+ "phpdoc_scalar": true,
+ "phpdoc_separation": true,
+ "phpdoc_single_line_var_spacing": true,
+ "phpdoc_summary": true,
+ "phpdoc_tag_casing": true,
+ "phpdoc_to_comment": true,
+ "phpdoc_trim": true,
+ "phpdoc_trim_consecutive_blank_line_separation": true,
+ "phpdoc_types": true,
+ "phpdoc_types_order": {
+ "null_adjustment": "always_last"
+ },
+ "phpdoc_var_annotation_correct_order": true,
+ "phpdoc_var_without_name": true,
+ "psr_autoloading": true,
+ "self_accessor": true,
+ "short_scalar_cast": true,
+ "simplified_null_return": false,
+ "single_blank_line_at_eof": true,
+ "single_class_element_per_statement": {
+ "elements": ["property"]
+ },
+ "single_import_per_statement": true,
+ "single_line_after_imports": true,
+ "single_line_comment_style": {
+ "comment_types": ["hash"]
+ },
+ "single_quote": true,
+ "space_after_semicolon": true,
+ "single_space_after_construct": true,
+ "single_trait_insert_per_statement": false,
+ "standardize_not_equals": true,
+ "switch_case_semicolon_to_colon": true,
+ "switch_case_space": true,
+ "ternary_operator_spaces": true,
+ "trailing_comma_in_multiline": true,
+ "trim_array_spaces": true,
+ "unary_operator_spaces": true,
+ "visibility_required": {
+ "elements": [
+ "method",
+ "property"
+ ]
+ },
+ "whitespace_after_comma_in_array": true,
+ "no_unused_imports": true,
+ "php_unit_method_casing": {
+ "case": "camel_case"
+ }
+ }
+}
diff --git a/public/index.php b/public/index.php
index 4584cbcd6a..2b5641b4c1 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,12 +1,10 @@
*/
-
define('LARAVEL_START', microtime(true));
/*
diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php
index e5506df290..6ef1a73308 100644
--- a/resources/lang/en/auth.php
+++ b/resources/lang/en/auth.php
@@ -13,7 +13,7 @@
|
*/
- 'failed' => 'These credentials do not match our records.',
+ 'failed' => 'These credentials do not match our records.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];
diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php
index d481411877..fcab34b253 100644
--- a/resources/lang/en/pagination.php
+++ b/resources/lang/en/pagination.php
@@ -14,6 +14,6 @@
*/
'previous' => '« Previous',
- 'next' => 'Next »',
+ 'next' => 'Next »',
];
diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php
index bf6caf6edc..d40b620369 100644
--- a/resources/lang/en/passwords.php
+++ b/resources/lang/en/passwords.php
@@ -14,9 +14,9 @@
*/
'password' => 'Passwords must be at least eight characters and match the confirmation.',
- 'reset' => 'Your password has been reset!',
- 'sent' => 'We have e-mailed your password reset link!',
- 'token' => 'This password reset token is invalid.',
- 'user' => "We can't find a user with that e-mail address.",
+ 'reset' => 'Your password has been reset!',
+ 'sent' => 'We have e-mailed your password reset link!',
+ 'token' => 'This password reset token is invalid.',
+ 'user' => "We can't find a user with that e-mail address.",
];
diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php
index b7311a9b3f..f8156e93b2 100644
--- a/resources/lang/en/validation.php
+++ b/resources/lang/en/validation.php
@@ -13,108 +13,108 @@
|
*/
- 'accepted' => 'The :attribute must be accepted.',
- 'active_url' => 'The :attribute is not a valid URL.',
- 'after' => 'The :attribute must be a date after :date.',
- 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
- 'alpha' => 'The :attribute may only contain letters.',
- 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
- 'alpha_num' => 'The :attribute may only contain letters and numbers.',
- 'array' => 'The :attribute must be an array.',
- 'before' => 'The :attribute must be a date before :date.',
+ 'accepted' => 'The :attribute must be accepted.',
+ 'active_url' => 'The :attribute is not a valid URL.',
+ 'after' => 'The :attribute must be a date after :date.',
+ 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
+ 'alpha' => 'The :attribute may only contain letters.',
+ 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
+ 'alpha_num' => 'The :attribute may only contain letters and numbers.',
+ 'array' => 'The :attribute must be an array.',
+ 'before' => 'The :attribute must be a date before :date.',
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
- 'between' => [
+ 'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
- 'file' => 'The :attribute must be between :min and :max kilobytes.',
- 'string' => 'The :attribute must be between :min and :max characters.',
- 'array' => 'The :attribute must have between :min and :max items.',
+ 'file' => 'The :attribute must be between :min and :max kilobytes.',
+ 'string' => 'The :attribute must be between :min and :max characters.',
+ 'array' => 'The :attribute must have between :min and :max items.',
],
- 'boolean' => 'The :attribute field must be true or false.',
- 'confirmed' => 'The :attribute confirmation does not match.',
- 'date' => 'The :attribute is not a valid date.',
- 'date_equals' => 'The :attribute must be a date equal to :date.',
- 'date_format' => 'The :attribute does not match the format :format.',
- 'different' => 'The :attribute and :other must be different.',
- 'digits' => 'The :attribute must be :digits digits.',
+ 'boolean' => 'The :attribute field must be true or false.',
+ 'confirmed' => 'The :attribute confirmation does not match.',
+ 'date' => 'The :attribute is not a valid date.',
+ 'date_equals' => 'The :attribute must be a date equal to :date.',
+ 'date_format' => 'The :attribute does not match the format :format.',
+ 'different' => 'The :attribute and :other must be different.',
+ 'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.',
- 'dimensions' => 'The :attribute has invalid image dimensions.',
- 'distinct' => 'The :attribute field has a duplicate value.',
- 'email' => 'The :attribute must be a valid email address.',
- 'exists' => 'The selected :attribute is invalid.',
- 'file' => 'The :attribute must be a file.',
- 'filled' => 'The :attribute field must have a value.',
- 'gt' => [
+ 'dimensions' => 'The :attribute has invalid image dimensions.',
+ 'distinct' => 'The :attribute field has a duplicate value.',
+ 'email' => 'The :attribute must be a valid email address.',
+ 'exists' => 'The selected :attribute is invalid.',
+ 'file' => 'The :attribute must be a file.',
+ 'filled' => 'The :attribute field must have a value.',
+ 'gt' => [
'numeric' => 'The :attribute must be greater than :value.',
- 'file' => 'The :attribute must be greater than :value kilobytes.',
- 'string' => 'The :attribute must be greater than :value characters.',
- 'array' => 'The :attribute must have more than :value items.',
+ 'file' => 'The :attribute must be greater than :value kilobytes.',
+ 'string' => 'The :attribute must be greater than :value characters.',
+ 'array' => 'The :attribute must have more than :value items.',
],
'gte' => [
'numeric' => 'The :attribute must be greater than or equal :value.',
- 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
- 'string' => 'The :attribute must be greater than or equal :value characters.',
- 'array' => 'The :attribute must have :value items or more.',
+ 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
+ 'string' => 'The :attribute must be greater than or equal :value characters.',
+ 'array' => 'The :attribute must have :value items or more.',
],
- 'image' => 'The :attribute must be an image.',
- 'in' => 'The selected :attribute is invalid.',
+ 'image' => 'The :attribute must be an image.',
+ 'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
- 'integer' => 'The :attribute must be an integer.',
- 'ip' => 'The :attribute must be a valid IP address.',
- 'ipv4' => 'The :attribute must be a valid IPv4 address.',
- 'ipv6' => 'The :attribute must be a valid IPv6 address.',
- 'json' => 'The :attribute must be a valid JSON string.',
- 'lt' => [
+ 'integer' => 'The :attribute must be an integer.',
+ 'ip' => 'The :attribute must be a valid IP address.',
+ 'ipv4' => 'The :attribute must be a valid IPv4 address.',
+ 'ipv6' => 'The :attribute must be a valid IPv6 address.',
+ 'json' => 'The :attribute must be a valid JSON string.',
+ 'lt' => [
'numeric' => 'The :attribute must be less than :value.',
- 'file' => 'The :attribute must be less than :value kilobytes.',
- 'string' => 'The :attribute must be less than :value characters.',
- 'array' => 'The :attribute must have less than :value items.',
+ 'file' => 'The :attribute must be less than :value kilobytes.',
+ 'string' => 'The :attribute must be less than :value characters.',
+ 'array' => 'The :attribute must have less than :value items.',
],
'lte' => [
'numeric' => 'The :attribute must be less than or equal :value.',
- 'file' => 'The :attribute must be less than or equal :value kilobytes.',
- 'string' => 'The :attribute must be less than or equal :value characters.',
- 'array' => 'The :attribute must not have more than :value items.',
+ 'file' => 'The :attribute must be less than or equal :value kilobytes.',
+ 'string' => 'The :attribute must be less than or equal :value characters.',
+ 'array' => 'The :attribute must not have more than :value items.',
],
'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
- 'file' => 'The :attribute may not be greater than :max kilobytes.',
- 'string' => 'The :attribute may not be greater than :max characters.',
- 'array' => 'The :attribute may not have more than :max items.',
+ 'file' => 'The :attribute may not be greater than :max kilobytes.',
+ 'string' => 'The :attribute may not be greater than :max characters.',
+ 'array' => 'The :attribute may not have more than :max items.',
],
- 'mimes' => 'The :attribute must be a file of type: :values.',
+ 'mimes' => 'The :attribute must be a file of type: :values.',
'mimetypes' => 'The :attribute must be a file of type: :values.',
- 'min' => [
+ 'min' => [
'numeric' => 'The :attribute must be at least :min.',
- 'file' => 'The :attribute must be at least :min kilobytes.',
- 'string' => 'The :attribute must be at least :min characters.',
- 'array' => 'The :attribute must have at least :min items.',
+ 'file' => 'The :attribute must be at least :min kilobytes.',
+ 'string' => 'The :attribute must be at least :min characters.',
+ 'array' => 'The :attribute must have at least :min items.',
],
- 'not_in' => 'The selected :attribute is invalid.',
- 'not_regex' => 'The :attribute format is invalid.',
- 'numeric' => 'The :attribute must be a number.',
- 'present' => 'The :attribute field must be present.',
- 'regex' => 'The :attribute format is invalid.',
- 'required' => 'The :attribute field is required.',
- 'required_if' => 'The :attribute field is required when :other is :value.',
- 'required_unless' => 'The :attribute field is required unless :other is in :values.',
- 'required_with' => 'The :attribute field is required when :values is present.',
- 'required_with_all' => 'The :attribute field is required when :values are present.',
- 'required_without' => 'The :attribute field is required when :values is not present.',
+ 'not_in' => 'The selected :attribute is invalid.',
+ 'not_regex' => 'The :attribute format is invalid.',
+ 'numeric' => 'The :attribute must be a number.',
+ 'present' => 'The :attribute field must be present.',
+ 'regex' => 'The :attribute format is invalid.',
+ 'required' => 'The :attribute field is required.',
+ 'required_if' => 'The :attribute field is required when :other is :value.',
+ 'required_unless' => 'The :attribute field is required unless :other is in :values.',
+ 'required_with' => 'The :attribute field is required when :values is present.',
+ 'required_with_all' => 'The :attribute field is required when :values are present.',
+ 'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
- 'same' => 'The :attribute and :other must match.',
- 'size' => [
+ 'same' => 'The :attribute and :other must match.',
+ 'size' => [
'numeric' => 'The :attribute must be :size.',
- 'file' => 'The :attribute must be :size kilobytes.',
- 'string' => 'The :attribute must be :size characters.',
- 'array' => 'The :attribute must contain :size items.',
+ 'file' => 'The :attribute must be :size kilobytes.',
+ 'string' => 'The :attribute must be :size characters.',
+ 'array' => 'The :attribute must contain :size items.',
],
'starts_with' => 'The :attribute must start with one of the following: :values',
- 'string' => 'The :attribute must be a string.',
- 'timezone' => 'The :attribute must be a valid zone.',
- 'unique' => 'The :attribute has already been taken.',
- 'uploaded' => 'The :attribute failed to upload.',
- 'url' => 'The :attribute format is invalid.',
- 'uuid' => 'The :attribute must be a valid UUID.',
+ 'string' => 'The :attribute must be a string.',
+ 'timezone' => 'The :attribute must be a valid zone.',
+ 'unique' => 'The :attribute has already been taken.',
+ 'uploaded' => 'The :attribute failed to upload.',
+ 'url' => 'The :attribute format is invalid.',
+ 'uuid' => 'The :attribute must be a valid UUID.',
/*
|--------------------------------------------------------------------------
@@ -136,7 +136,7 @@
],
'artist_url.*' => [
'url' => 'One or more of the artist URL(s) is invalid.',
- ]
+ ],
],
/*
diff --git a/resources/views/galleries/_archive_submission.blade.php b/resources/views/galleries/_archive_submission.blade.php
index d507526c00..b8bab331e6 100644
--- a/resources/views/galleries/_archive_submission.blade.php
+++ b/resources/views/galleries/_archive_submission.blade.php
@@ -1,14 +1,15 @@
-@if($submission)
- {!! Form::open(['url' => 'gallery/archive/'.$submission->id]) !!}
+@if ($submission)
+ {!! Form::open(['url' => 'gallery/archive/' . $submission->id]) !!}
- You are about to {{ $submission->is_visible ? 'archive' : 'unarchive' }} the submission {{ $submission->title }} . This is reversible; you will be able to {{ $submission->is_visible ? 'unarchive' : 'archive'}} the submission at any time. Archiving a submission hides it from view by other users, but not staff.
+ You are about to {{ $submission->is_visible ? 'archive' : 'unarchive' }} the submission {{ $submission->title }} . This is reversible; you will be able to {{ $submission->is_visible ? 'unarchive' : 'archive' }} the submission
+ at any time. Archiving a submission hides it from view by other users, but not staff.
Are you sure you want to {{ $submission->is_visible ? 'archive' : 'unarchive' }} {{ $submission->title }} ?
- {!! Form::submit(($submission->is_visible ? 'Archive' : 'Unarchive').' Submission', ['class' => 'btn btn-warning']) !!}
+ {!! Form::submit(($submission->is_visible ? 'Archive' : 'Unarchive') . ' Submission', ['class' => 'btn btn-warning']) !!}
{!! Form::close() !!}
-@else
+@else
Invalid submission selected.
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/galleries/_character.blade.php b/resources/views/galleries/_character.blade.php
index e7947adb61..a2a255ebb9 100644
--- a/resources/views/galleries/_character.blade.php
+++ b/resources/views/galleries/_character.blade.php
@@ -1,5 +1,5 @@
-@if($character)
-
+@if ($character)
+
@else
Character not found.
diff --git a/resources/views/galleries/_character_select.blade.php b/resources/views/galleries/_character_select.blade.php
index 7d050f9d3a..400351c30e 100644
--- a/resources/views/galleries/_character_select.blade.php
+++ b/resources/views/galleries/_character_select.blade.php
@@ -9,13 +9,13 @@
-
- {!! Form::text('slug[]', null, ['class' => 'form-control character-code', 'placeholder' => 'Character Code (EX-001, for example)']) !!}
-
+
+ {!! Form::text('slug[]', null, ['class' => 'form-control character-code', 'placeholder' => 'Character Code (EX-001, for example)']) !!}
+
-
\ No newline at end of file
+
diff --git a/resources/views/galleries/_character_select_entry.blade.php b/resources/views/galleries/_character_select_entry.blade.php
index 6c97d1bdfe..867d74581e 100644
--- a/resources/views/galleries/_character_select_entry.blade.php
+++ b/resources/views/galleries/_character_select_entry.blade.php
@@ -10,12 +10,12 @@
-
- {!! Form::text('slug[]', $character->character->slug, ['class' => 'form-control character-code']) !!}
-
+
+ {!! Form::text('slug[]', $character->character->slug, ['class' => 'form-control character-code']) !!}
+
-
\ No newline at end of file
+
diff --git a/resources/views/galleries/_character_select_js.blade.php b/resources/views/galleries/_character_select_js.blade.php
index 717a798a9a..6740d1fe92 100644
--- a/resources/views/galleries/_character_select_js.blade.php
+++ b/resources/views/galleries/_character_select_js.blade.php
@@ -20,7 +20,7 @@
function attachListeners(node) {
node.find('.character-code').on('change', function(e) {
var $parent = $(this).parent().parent().parent().parent();
- $parent.find('.character-image-loaded').load('{{ url('gallery/submit/character') }}/'+$(this).val(), function(response, status, xhr) {
+ $parent.find('.character-image-loaded').load('{{ url('gallery/submit/character') }}/' + $(this).val(), function(response, status, xhr) {
$parent.find('.character-image-blank').addClass('hide');
$parent.find('.character-image-loaded').removeClass('hide');
$parent.find('.character-rewards').removeClass('hide');
@@ -33,4 +33,4 @@ function attachListeners(node) {
}
});
-
\ No newline at end of file
+
diff --git a/resources/views/galleries/_queue_submission.blade.php b/resources/views/galleries/_queue_submission.blade.php
index b56ba1e2a3..f7e23fe2ce 100644
--- a/resources/views/galleries/_queue_submission.blade.php
+++ b/resources/views/galleries/_queue_submission.blade.php
@@ -6,42 +6,48 @@
{!! $submission->displayName !!}
- @if(isset($submission->content_warning))
+ @if (isset($submission->content_warning))
Content Warning: {!! nl2br(htmlentities($submission->content_warning)) !!}
@endif
- @if(isset($queue) && $queue)
-
{{ $submission->status }} ・
+ @if (isset($queue) && $queue)
+
{{ $submission->status }} ・
@endif
- In {!! $submission->gallery->displayName !!} ・ By {!! $submission->credits !!}
+ In {!! $submission->gallery->displayName !!} ・ By {!! $submission->credits !!}
Submitted {!! pretty_date($submission->created_at) !!} ・ Last updated {!! pretty_date($submission->updated_at) !!}
- @if($submission->status == 'Pending' && $submission->collaboratorApproved && Auth::user()->hasPower('manage_submissions'))
+ @if ($submission->status == 'Pending' && $submission->collaboratorApproved && Auth::user()->hasPower('manage_submissions'))
voteData as $voter=>$vote) {
- if($vote == 1) $rejectSum[$key] += 1;
- if($vote == 2) $approveSum[$key] += 1;
+ $rejectSum[$key] = 0;
+ $approveSum[$key] = 0;
+ foreach ($submission->voteData as $voter => $vote) {
+ if ($vote == 1) {
+ $rejectSum[$key] += 1;
}
+ if ($vote == 2) {
+ $approveSum[$key] += 1;
+ }
+ }
?>
{{ $rejectSum[$key] }}/{{ $submission->gallery->votes_required }}
- {!! Form::open(['url' => 'admin/gallery/edit/'.$submission->id.'/reject', 'id' => 'voteRejectForm']) !!}
-
+ {!! Form::open(['url' => 'admin/gallery/edit/' . $submission->id . '/reject', 'id' => 'voteRejectForm']) !!}
+
{!! Form::close() !!}
{{ $approveSum[$key] }}/{{ $submission->gallery->votes_required }}
- {!! Form::open(['url' => 'admin/gallery/edit/'.$submission->id.'/accept', 'id' => 'voteApproveForm']) !!}
-
+ {!! Form::open(['url' => 'admin/gallery/edit/' . $submission->id . '/accept', 'id' => 'voteApproveForm']) !!}
+
{!! Form::close() !!}
@endif
- @if(isset($queue) && $queue)
-
{{ App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-User')->count() }} {{ Auth::user()->hasPower('manage_submissions') ? 'Staff↔User Comment'.(App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-User')->count() != 1 ? 's' : '').' ・ ' : 'Staff Comment' }}{{ Auth::user()->hasPower('manage_submissions') ? App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-Staff')->count().' Staff↔Staff Comment'.(App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-Staff')->count() != 1 ? 's' : '') : '' }}
+ @if (isset($queue) && $queue)
+
{{ App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-User')->count() }}
+ {{ Auth::user()->hasPower('manage_submissions')? 'Staff↔User Comment' .(App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-User')->count() != 1? 's': '') .' ・ ': 'Staff Comment' }}{{ Auth::user()->hasPower('manage_submissions')? App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-Staff')->count() .' Staff↔Staff Comment' .(App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'Staff-Staff')->count() != 1? 's': ''): '' }}
+
@endif
diff --git a/resources/views/galleries/_sidebar.blade.php b/resources/views/galleries/_sidebar.blade.php
index 6ade0e7198..06fe0b9ce5 100644
--- a/resources/views/galleries/_sidebar.blade.php
+++ b/resources/views/galleries/_sidebar.blade.php
@@ -5,24 +5,24 @@
@endauth
- @if($galleryPage && $sideGallery->children->count())
+ @if ($galleryPage && $sideGallery->children->count())
@endif
diff --git a/resources/views/galleries/_submission_favorites.blade.php b/resources/views/galleries/_submission_favorites.blade.php
index 28d90d9c05..bf91e89e4e 100644
--- a/resources/views/galleries/_submission_favorites.blade.php
+++ b/resources/views/galleries/_submission_favorites.blade.php
@@ -1,9 +1,9 @@
-@if($submission)
+@if ($submission)
- @foreach($submission->favorites as $favorite)
- {!! $favorite->user->displayName !!}
- @endforeach
+ @foreach ($submission->favorites as $favorite)
+ {!! $favorite->user->displayName !!}
+ @endforeach
-@else
+@else
Invalid submission selected.
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/galleries/_submission_totals.blade.php b/resources/views/galleries/_submission_totals.blade.php
index 7bbeb55f51..9dc90ac169 100644
--- a/resources/views/galleries/_submission_totals.blade.php
+++ b/resources/views/galleries/_submission_totals.blade.php
@@ -1,20 +1,20 @@
-@if(isset($totals))
- @if(Auth::user()->hasPower('manage_submissions') && isset($totals))
+@if (isset($totals))
+ @if (Auth::user()->hasPower('manage_submissions') && isset($totals))
-
Calculated Totals:
- @forEach($totals as $total)
-
-
{{ $total['name'] }}:
-
- {!! $total['currency']->display($total['value']) !!}
- @if($collaboratorsCount && Settings::get('gallery_rewards_divided') === "1")
- Divided Among {{ $collaboratorsCount }} Collaborator(s): {!! $total['currency']->display(round($total['value'] / $collaboratorsCount)) !!}
- @endif
-
-
- @endforEach
+ Calculated Totals:
+ @foreach ($totals as $total)
+
+
{{ $total['name'] }}:
+
+ {!! $total['currency']->display($total['value']) !!}
+ @if ($collaboratorsCount && Settings::get('gallery_rewards_divided') === '1')
+ Divided Among {{ $collaboratorsCount }} Collaborator(s): {!! $total['currency']->display(round($total['value'] / $collaboratorsCount)) !!}
+ @endif
+
+
+ @endforEach
@endif
@else
This submission does not have form data associated with it.
-@endif
\ No newline at end of file
+@endif
diff --git a/resources/views/galleries/_thumb.blade.php b/resources/views/galleries/_thumb.blade.php
index 2a2f4e292a..bf63fcbd5b 100644
--- a/resources/views/galleries/_thumb.blade.php
+++ b/resources/views/galleries/_thumb.blade.php
@@ -1,37 +1,54 @@
@include('widgets._gallery_thumb', ['submission' => $submission])
- hash) && !isset($submission->content_warning)) $width = Image::make($submission->imagePath.'/'.$submission->thumbnailFileName)->width(); else $width = 200; ?>
+ hash) && !isset($submission->content_warning)) {
+ $width = Image::make($submission->imagePath . '/' . $submission->thumbnailFileName)->width();
+ } else {
+ $width = 200;
+ } ?>
- @if(Auth::check() && ($submission->user->id != Auth::user()->id && $submission->collaborators->where('user_id', Auth::user()->id)->first() == null) && $submission->isVisible)
- {!! Form::open(['url' => '/gallery/favorite/'.$submission->id]) !!}
- @if(isset($gallery) && !$gallery)
- In {!! $submission->gallery->displayName !!} ・
- @endif
- By {!! $submission->credits !!}
- @if(isset($gallery) && !$gallery)
-
- @else
- ・
- @endif
- {{ $submission->favorites->count() }} {!! Form::button(' ', ['style' => 'border:0; border-radius:.5em;', 'class' => ($submission->favorites->where('user_id', Auth::user()->id)->first() != null ? 'btn-success' : ''), 'data-toggle' => 'tooltip', 'title' => ($submission->favorites->where('user_id', Auth::user()->id)->first() == null ? 'Add to' : 'Remove from').' your Favorites', 'type' => 'submit']) !!} ・ {{ App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'User-User')->count() }}
- {!! Form::close() !!}
+ @if (Auth::check() && ($submission->user->id != Auth::user()->id && $submission->collaborators->where('user_id', Auth::user()->id)->first() == null) && $submission->isVisible)
+ {!! Form::open(['url' => '/gallery/favorite/' . $submission->id]) !!}
+ @if (isset($gallery) && !$gallery)
+ In {!! $submission->gallery->displayName !!} ・
+ @endif
+ By {!! $submission->credits !!}
+ @if (isset($gallery) && !$gallery)
+
@else
- @if(isset($gallery) && !$gallery)
- In {!! $submission->gallery->displayName !!} ・
- @endif
- By {!! $submission->credits !!}
- @if(isset($gallery) && !$gallery)
-
- @else
- ・
- @endif
- {{ $submission->favorites->count() }} ・ {{ App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'User-User')->count() }}
+ ・
+ @endif
+ {{ $submission->favorites->count() }} {!! Form::button(' ', [
+ 'style' => 'border:0; border-radius:.5em;',
+ 'class' => $submission->favorites->where('user_id', Auth::user()->id)->first() != null ? 'btn-success' : '',
+ 'data-toggle' => 'tooltip',
+ 'title' => ($submission->favorites->where('user_id', Auth::user()->id)->first() == null ? 'Add to' : 'Remove from') . ' your Favorites',
+ 'type' => 'submit',
+ ]) !!} ・ {{ App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'User-User')->count() }}
+ {!! Form::close() !!}
+ @else
+ @if (isset($gallery) && !$gallery)
+ In {!! $submission->gallery->displayName !!} ・
@endif
+ By {!! $submission->credits !!}
+ @if (isset($gallery) && !$gallery)
+
+ @else
+ ・
+ @endif
+ {{ $submission->favorites->count() }} ・
+ {{ App\Models\Comment::where('commentable_type', 'App\Models\Gallery\GallerySubmission')->where('commentable_id', $submission->id)->where('type', 'User-User')->count() }}
+ @endif
diff --git a/resources/views/galleries/create_edit_submission.blade.php b/resources/views/galleries/create_edit_submission.blade.php
index b6e4cdb57f..3ba9044f92 100644
--- a/resources/views/galleries/create_edit_submission.blade.php
+++ b/resources/views/galleries/create_edit_submission.blade.php
@@ -1,45 +1,54 @@
@extends('galleries.layout')
-@section('gallery-title') {{ $submission->id ? 'Edit' : 'Create' }} Submission @endsection
+@section('gallery-title')
+ {{ $submission->id ? 'Edit' : 'Create' }} Submission
+@endsection
@section('gallery-content')
-{!! breadcrumbs(['Gallery' => 'gallery', $gallery->name => 'gallery/'.$gallery->id, ($submission->id ? 'Edit' : 'Create').' Submission' => $submission->id ? 'gallery/submissions/edit/'.$submission->id : 'gallery/submit/'.$gallery->id]) !!}
-
-
- {{ $submission->id ? 'Edit Submission (#'.$submission->id.', "'.$submission->displayTitle.'")' : 'Submit to '.$gallery->name }}
- @if($submission->id)
-
- @if($submission->status == 'Accepted')
-
{{ $submission->isVisible ? 'Archive' : 'Unarchive' }}
+ {!! breadcrumbs([
+ 'Gallery' => 'gallery',
+ $gallery->name => 'gallery/' . $gallery->id,
+ ($submission->id ? 'Edit' : 'Create') . ' Submission' => $submission->id ? 'gallery/submissions/edit/' . $submission->id : 'gallery/submit/' . $gallery->id,
+ ]) !!}
+
+
+ {{ $submission->id ? 'Edit Submission (#' . $submission->id . ', "' . $submission->displayTitle . '")' : 'Submit to ' . $gallery->name }}
+ @if ($submission->id)
+
+ @endif
+
+
+ @if (!$submission->id && ($closed || !$gallery->canSubmit(Auth::user())))
+
+ @if ($closed)
+ Gallery submissions are currently closed.
+ @else
+ You can't submit to this gallery.
@endif
-
View Submission
- @endif
-
-
-@if(!$submission->id && ($closed || !$gallery->canSubmit(Auth::user())))
-
- @if($closed) Gallery submissions are currently closed.
- @else You can't submit to this gallery. @endif
-
-@else
- {!! Form::open(['url' => $submission->id ? 'gallery/edit/'.$submission->id : 'gallery/submit', 'id' => 'gallerySubmissionForm', 'files' => true]) !!}
+ @else
+ {!! Form::open(['url' => $submission->id ? 'gallery/edit/' . $submission->id : 'gallery/submit', 'id' => 'gallerySubmissionForm', 'files' => true]) !!}
Main Content
Upload an image and/or text as the content of your submission. You can upload both in the event that you have an image with accompanying text or vice versa.
{!! Form::label('Image') !!}
- @if($submission->id && isset($submission->hash) && $submission->hash)
+ @if ($submission->id && isset($submission->hash) && $submission->hash)
-
+
@endif
-
+
@@ -67,114 +76,122 @@
- {!! Form::label('Content Warning (Optional)') !!} {!! add_help('Provide a succinct content warning for the piece if necessary. If a content warning is provided, the thumbnail will be replaced with a generic image and the warning displayed under it. The piece will be displayed in full on its page, however.') !!}
+ {!! Form::label('Content Warning (Optional)') !!} {!! add_help(
+ 'Provide a succinct content warning for the piece if necessary. If a content warning is provided, the thumbnail will be replaced with a generic image and the warning displayed under it. The piece will be displayed in full on its page, however.',
+ ) !!}
{!! Form::text('content_warning', $submission->content_warning, ['class' => 'form-control']) !!}
- @if($gallery->prompt_selection == 1 && (!$submission->id || Auth::user()->hasPower('manage_submissions')))
+ @if ($gallery->prompt_selection == 1 && (!$submission->id || Auth::user()->hasPower('manage_submissions')))
- {!! Form::label('prompt_id', ($submission->id && Auth::user()->hasPower('manage_submissions') ? '[Admin] ' : '').'Prompt (Optional)') !!} {!! add_help('This does not automatically submit to the selected prompt, and you will need to submit to it separately. The prompt selected here will be displayed on the submission page for future reference. You will not be able to edit this after creating the submission.') !!}
+ {!! Form::label('prompt_id', ($submission->id && Auth::user()->hasPower('manage_submissions') ? '[Admin] ' : '') . 'Prompt (Optional)') !!} {!! add_help(
+ 'This does not automatically submit to the selected prompt, and you will need to submit to it separately. The prompt selected here will be displayed on the submission page for future reference. You will not be able to edit this after creating the submission.',
+ ) !!}
{!! Form::select('prompt_id', $prompts, $submission->prompt_id, ['class' => 'form-control selectize', 'id' => 'prompt', 'placeholder' => 'Select a Prompt']) !!}
@else
- {!! $submission->prompt_id ? '
Prompt: '.$submission->prompt->displayName.'
' : '' !!}
+ {!! $submission->prompt_id ? '
Prompt: ' . $submission->prompt->displayName . '
' : '' !!}
@endif
- @if($submission->id && Auth::user()->hasPower('manage_submissions'))
+ @if ($submission->id && Auth::user()->hasPower('manage_submissions'))
- {!! Form::label('gallery_id', '[Admin] Gallery / Move Submission') !!} {!! add_help('Use in the event you need to move a submission between galleries. If left blank, leaves the submission in its current location. Note that if currency rewards from submissions are enabled, this won\'t retroactively fill out the form if moved from a gallery where they are disabled to one where they are enabled.') !!}
+ {!! Form::label('gallery_id', '[Admin] Gallery / Move Submission') !!} {!! add_help(
+ 'Use in the event you need to move a submission between galleries. If left blank, leaves the submission in its current location. Note that if currency rewards from submissions are enabled, this won\'t retroactively fill out the form if moved from a gallery where they are disabled to one where they are enabled.',
+ ) !!}
{!! Form::select('gallery_id', $galleryOptions, null, ['class' => 'form-control selectize gallery-select original', 'id' => 'gallery', 'placeholder' => '']) !!}
@endif
- @if(!$submission->id)
+ @if (!$submission->id)
{!! Form::hidden('gallery_id', $gallery->id) !!}
@endif
- @if(!$submission->id || $submission->status == 'Pending')
-
-
-
-
-
If this piece is a collaboration, add collaborators and their roles here, including yourself. Otherwise, leave this blank . You will not be able to edit this once the submission has been accepted, but will while it is still pending.
- @if(!$submission->id || $submission->status == 'Pending')
-
-
- @if($submission->id)
- @foreach($submission->collaborators as $collaborator)
-
-
{!! $collaborator->has_approved ? '
' : '' !!}{!! Form::select('collaborator_id[]', $users, $collaborator->user_id, ['class' => 'form-control mr-2 collaborator-select original', 'placeholder' => 'Select User']) !!}
-
- {!! Form::text('collaborator_data[]', $collaborator->data, ['class' => 'form-control mr-2', 'placeholder' => 'Role (Sketch, Lines, etc.)']) !!}
-
×
+ @if (!$submission->id || $submission->status == 'Pending')
+
+
+
+
+
If this piece is a collaboration, add collaborators and their roles here, including yourself. Otherwise, leave this blank . You will not be able to edit this once the submission has been
+ accepted, but will while it is still pending.
+ @if (!$submission->id || $submission->status == 'Pending')
+
+
+ @if ($submission->id)
+ @foreach ($submission->collaborators as $collaborator)
+
+
{!! $collaborator->has_approved ? '
' : '' !!}{!! Form::select('collaborator_id[]', $users, $collaborator->user_id, ['class' => 'form-control mr-2 collaborator-select original', 'placeholder' => 'Select User']) !!}
+
+ {!! Form::text('collaborator_data[]', $collaborator->data, ['class' => 'form-control mr-2', 'placeholder' => 'Role (Sketch, Lines, etc.)']) !!}
+
×
+
-
- @endforeach
- @endif
-
- @else
-
- @if($submission->collaborators->count())
- @foreach($submission->collaborators as $collaborator)
- {!! $collaborator->user->displayName !!}: {{ $collaborator->data }}
- @endforeach
- @endif
-
- @endif
+ @endforeach
+ @endif
+
+ @else
+
+ @if ($submission->collaborators->count())
+ @foreach ($submission->collaborators as $collaborator)
+ {!! $collaborator->user->displayName !!}: {{ $collaborator->data }}
+ @endforeach
+ @endif
+
+ @endif
+
-
-
-
-
-
If this piece is gift, part of a trade, or was commissioned, specify the related user(s) here and select their role. Otherwise, leave this blank . You will not be able to edit this once the submission has been accepted, but will while it is still pending.
- @if(!$submission->id || $submission->status == 'Pending')
-
-
- @if($submission->id)
- @foreach($submission->participants as $participant)
-
-
{!! Form::select('participant_id[]', $users, $participant->user_id, ['class' => 'form-control mr-2 participant-select original', 'placeholder' => 'Select User']) !!}
-
- {!! Form::select('participant_type[]', ['Gift' => 'Gift For', 'Trade' => 'Traded For', 'Comm' => 'Commissioned'], $participant->type, ['class' => 'form-control mr-2', 'placeholder' => 'Select Role']) !!}
-
×
+
+
+
+
If this piece is gift, part of a trade, or was commissioned, specify the related user(s) here and select their role. Otherwise, leave this blank . You will not be able to edit this once the
+ submission has been accepted, but will while it is still pending.
+ @if (!$submission->id || $submission->status == 'Pending')
+
+
+ @if ($submission->id)
+ @foreach ($submission->participants as $participant)
+
+
{!! Form::select('participant_id[]', $users, $participant->user_id, ['class' => 'form-control mr-2 participant-select original', 'placeholder' => 'Select User']) !!}
+
+ {!! Form::select('participant_type[]', ['Gift' => 'Gift For', 'Trade' => 'Traded For', 'Comm' => 'Commissioned'], $participant->type, ['class' => 'form-control mr-2', 'placeholder' => 'Select Role']) !!}
+
×
+
-
- @endforeach
- @endif
-
- @else
-
- @if($submission->participants->count())
- @foreach($submission->participants as $participant)
- {!! $participant->user->displayName !!}: {{ $participant->displayType }}
- @endforeach
- @endif
-
- @endif
+ @endforeach
+ @endif
+
+ @else
+
+ @if ($submission->participants->count())
+ @foreach ($submission->participants as $participant)
+ {!! $participant->user->displayName !!}: {{ $participant->displayType }}
+ @endforeach
+ @endif
+
+ @endif
+
-
@endif
-
+
Characters
Add the characters included in this piece.
- @if($gallery->criteria)
+ @if ($gallery->criteria)
This helps the staff processing your submission award currency for it, so be sure to add every character.
@endif
- @if($submission->id)
- @foreach($submission->characters as $character)
+ @if ($submission->id)
+ @foreach ($submission->characters as $character)
@include('galleries._character_select_entry', ['character' => $character])
@endforeach
@endif
@@ -182,16 +199,16 @@
-
- @if($gallery->criteria->count() > 0 && !$submission->id)
+
+ @if ($gallery->criteria->count() > 0 && !$submission->id)
Criteria Rewards Add Criterion
Criteria can be used in addition to or in replacment of rewards. They take input on what you are turning in for the prompt in order to calculate your final reward.
Criteria may populate in with pre-selected minimum requirements for this prompt.
- @endif
+ @endif
- @if($submission->id && Auth::user()->id != $submission->user->id && Auth::user()->hasPower('manage_submissions'))
+ @if ($submission->id && Auth::user()->id != $submission->user->id && Auth::user()->hasPower('manage_submissions'))