From 716af9ab0431e9cc3c7077d0ba0a93f5d7461356 Mon Sep 17 00:00:00 2001 From: Artem-Darius Atlas Date: Thu, 11 May 2023 15:39:34 +0300 Subject: [PATCH] feat: rbac and subscriptions --- app/Models/User.php | 6 +- composer.json | 3 + composer.lock | 819 +++++++++++++++++- config/app.php | 1 + config/cashier.php | 125 +++ config/flare.php | 80 ++ config/ignition.php | 241 ++++++ config/livewire.php | 158 ++++ config/rbac.php | 13 + config/tinker.php | 50 ++ ...9_05_03_000001_create_customer_columns.php | 36 + ...5_03_000002_create_subscriptions_table.php | 37 + ...000003_create_subscription_items_table.php | 34 + .../2020_05_21_100000_create_teams_table.php | 30 + ...20_05_21_200000_create_team_user_table.php | 32 + ...1_300000_create_team_invitations_table.php | 32 + .../2020_07_11_151756_create_roles_table.php | 37 + ...20_07_11_151834_create_user_role_table.php | 75 ++ ..._07_11_151894_create_permissions_table.php | 37 + ...11_151925_create_role_permission_table.php | 38 + database/seeders/LaRbacDatabaseSeeder.php | 22 + database/seeders/PermissionSeeder.php | 65 ++ database/seeders/RoleSeeder.php | 89 ++ public/vendor/livewire/livewire.js | 14 + public/vendor/livewire/livewire.js.map | 1 + public/vendor/livewire/manifest.json | 1 + .../js/Components/AuthenticationCard.vue | 11 + .../js/Components/AuthenticationCardLogo.vue | 17 + resources/js/Components/Checkbox.vue | 36 + resources/js/Pages/Auth/ConfirmPassword.vue | 63 ++ resources/js/Pages/Auth/ForgotPassword.vue | 61 ++ resources/js/Pages/Auth/Login.vue | 90 ++ resources/js/Pages/Auth/Register.vue | 112 +++ resources/js/Pages/Auth/ResetPassword.vue | 85 ++ .../js/Pages/Auth/TwoFactorChallenge.vue | 104 +++ resources/js/Pages/Auth/VerifyEmail.vue | 62 ++ resources/lang/vendor/grid_view/en/grid.php | 11 + resources/lang/vendor/grid_view/ru/grid.php | 11 + resources/lang/vendor/rbac/en/main.php | 15 + resources/lang/vendor/rbac/en/permissions.php | 9 + resources/lang/vendor/rbac/en/roles.php | 9 + resources/lang/vendor/rbac/en/users.php | 10 + resources/lang/vendor/rbac/en/validation.php | 11 + resources/lang/vendor/rbac/ru/main.php | 15 + resources/lang/vendor/rbac/ru/permissions.php | 9 + resources/lang/vendor/rbac/ru/roles.php | 9 + resources/lang/vendor/rbac/ru/users.php | 10 + resources/lang/vendor/rbac/ru/validation.php | 11 + resources/views/errors/401.blade.php | 5 + resources/views/errors/402.blade.php | 5 + resources/views/errors/403.blade.php | 5 + resources/views/errors/404.blade.php | 5 + resources/views/errors/419.blade.php | 5 + resources/views/errors/429.blade.php | 5 + resources/views/errors/500.blade.php | 5 + resources/views/errors/503.blade.php | 5 + resources/views/errors/layout.blade.php | 53 ++ resources/views/errors/minimal.blade.php | 34 + resources/views/layouts/app.blade.php | 5 +- .../views/vendor/cashier/payment.blade.php | 385 ++++++++ .../views/vendor/cashier/receipt.blade.php | 323 +++++++ .../vendor/grid_view/actions/delete.blade.php | 9 + .../vendor/grid_view/actions/edit.blade.php | 9 + .../vendor/grid_view/actions/view.blade.php | 9 + .../grid_view/columns/checkbox-stub.blade.php | 9 + .../grid_view/columns/checkbox.blade.php | 9 + .../grid_view/filters/dropdown.blade.php | 11 + .../vendor/grid_view/filters/stub.blade.php | 1 + .../vendor/grid_view/filters/text.blade.php | 5 + .../views/vendor/grid_view/grid.blade.php | 138 +++ .../vendor/grid_view/pagination.blade.php | 51 ++ .../views/vendor/livewire/bootstrap.blade.php | 50 ++ .../livewire/simple-bootstrap.blade.php | 41 + .../vendor/livewire/simple-tailwind.blade.php | 43 + .../views/vendor/livewire/tailwind.blade.php | 116 +++ .../views/vendor/mail/html/button.blade.php | 24 + .../views/vendor/mail/html/footer.blade.php | 11 + .../views/vendor/mail/html/header.blade.php | 12 + .../views/vendor/mail/html/layout.blade.php | 57 ++ .../views/vendor/mail/html/message.blade.php | 27 + .../views/vendor/mail/html/panel.blade.php | 14 + .../views/vendor/mail/html/subcopy.blade.php | 7 + .../views/vendor/mail/html/table.blade.php | 3 + .../views/vendor/mail/html/themes/default.css | 290 +++++++ .../views/vendor/mail/text/button.blade.php | 1 + .../views/vendor/mail/text/footer.blade.php | 1 + .../views/vendor/mail/text/header.blade.php | 1 + .../views/vendor/mail/text/layout.blade.php | 9 + .../views/vendor/mail/text/message.blade.php | 27 + .../views/vendor/mail/text/panel.blade.php | 1 + .../views/vendor/mail/text/subcopy.blade.php | 1 + .../views/vendor/mail/text/table.blade.php | 1 + .../vendor/notifications/email.blade.php | 58 ++ .../vendor/pagination/bootstrap-4.blade.php | 46 + .../vendor/pagination/bootstrap-5.blade.php | 88 ++ .../views/vendor/pagination/default.blade.php | 46 + .../vendor/pagination/semantic-ui.blade.php | 36 + .../pagination/simple-bootstrap-4.blade.php | 27 + .../pagination/simple-bootstrap-5.blade.php | 29 + .../pagination/simple-default.blade.php | 19 + .../pagination/simple-tailwind.blade.php | 25 + .../vendor/pagination/tailwind.blade.php | 106 +++ .../vendor/rbac/permissions/_fields.blade.php | 40 + .../vendor/rbac/permissions/create.blade.php | 25 + .../vendor/rbac/permissions/edit.blade.php | 25 + .../vendor/rbac/permissions/index.blade.php | 91 ++ .../vendor/rbac/permissions/show.blade.php | 47 + .../views/vendor/rbac/roles/_fields.blade.php | 64 ++ .../views/vendor/rbac/roles/create.blade.php | 25 + .../views/vendor/rbac/roles/edit.blade.php | 25 + .../views/vendor/rbac/roles/index.blade.php | 104 +++ .../views/vendor/rbac/roles/show.blade.php | 61 ++ .../views/vendor/rbac/users/_fields.blade.php | 33 + .../views/vendor/rbac/users/edit.blade.php | 25 + .../views/vendor/rbac/users/index.blade.php | 96 ++ .../views/vendor/rbac/users/show.blade.php | 53 ++ routes/jetstream.php | 49 ++ sail | 518 +++++++++++ 118 files changed, 6433 insertions(+), 3 deletions(-) create mode 100644 config/cashier.php create mode 100644 config/flare.php create mode 100644 config/ignition.php create mode 100644 config/livewire.php create mode 100644 config/rbac.php create mode 100644 config/tinker.php create mode 100644 database/migrations/2019_05_03_000001_create_customer_columns.php create mode 100644 database/migrations/2019_05_03_000002_create_subscriptions_table.php create mode 100644 database/migrations/2019_05_03_000003_create_subscription_items_table.php create mode 100644 database/migrations/2020_05_21_100000_create_teams_table.php create mode 100644 database/migrations/2020_05_21_200000_create_team_user_table.php create mode 100644 database/migrations/2020_05_21_300000_create_team_invitations_table.php create mode 100644 database/migrations/2020_07_11_151756_create_roles_table.php create mode 100644 database/migrations/2020_07_11_151834_create_user_role_table.php create mode 100644 database/migrations/2020_07_11_151894_create_permissions_table.php create mode 100644 database/migrations/2020_07_11_151925_create_role_permission_table.php create mode 100644 database/seeders/LaRbacDatabaseSeeder.php create mode 100644 database/seeders/PermissionSeeder.php create mode 100644 database/seeders/RoleSeeder.php create mode 100644 public/vendor/livewire/livewire.js create mode 100644 public/vendor/livewire/livewire.js.map create mode 100644 public/vendor/livewire/manifest.json create mode 100644 resources/js/Components/AuthenticationCard.vue create mode 100644 resources/js/Components/AuthenticationCardLogo.vue create mode 100644 resources/js/Components/Checkbox.vue create mode 100644 resources/js/Pages/Auth/ConfirmPassword.vue create mode 100644 resources/js/Pages/Auth/ForgotPassword.vue create mode 100644 resources/js/Pages/Auth/Login.vue create mode 100644 resources/js/Pages/Auth/Register.vue create mode 100644 resources/js/Pages/Auth/ResetPassword.vue create mode 100644 resources/js/Pages/Auth/TwoFactorChallenge.vue create mode 100644 resources/js/Pages/Auth/VerifyEmail.vue create mode 100644 resources/lang/vendor/grid_view/en/grid.php create mode 100644 resources/lang/vendor/grid_view/ru/grid.php create mode 100644 resources/lang/vendor/rbac/en/main.php create mode 100644 resources/lang/vendor/rbac/en/permissions.php create mode 100644 resources/lang/vendor/rbac/en/roles.php create mode 100644 resources/lang/vendor/rbac/en/users.php create mode 100644 resources/lang/vendor/rbac/en/validation.php create mode 100644 resources/lang/vendor/rbac/ru/main.php create mode 100644 resources/lang/vendor/rbac/ru/permissions.php create mode 100644 resources/lang/vendor/rbac/ru/roles.php create mode 100644 resources/lang/vendor/rbac/ru/users.php create mode 100644 resources/lang/vendor/rbac/ru/validation.php create mode 100644 resources/views/errors/401.blade.php create mode 100644 resources/views/errors/402.blade.php create mode 100644 resources/views/errors/403.blade.php create mode 100644 resources/views/errors/404.blade.php create mode 100644 resources/views/errors/419.blade.php create mode 100644 resources/views/errors/429.blade.php create mode 100644 resources/views/errors/500.blade.php create mode 100644 resources/views/errors/503.blade.php create mode 100644 resources/views/errors/layout.blade.php create mode 100644 resources/views/errors/minimal.blade.php create mode 100644 resources/views/vendor/cashier/payment.blade.php create mode 100644 resources/views/vendor/cashier/receipt.blade.php create mode 100644 resources/views/vendor/grid_view/actions/delete.blade.php create mode 100644 resources/views/vendor/grid_view/actions/edit.blade.php create mode 100644 resources/views/vendor/grid_view/actions/view.blade.php create mode 100644 resources/views/vendor/grid_view/columns/checkbox-stub.blade.php create mode 100644 resources/views/vendor/grid_view/columns/checkbox.blade.php create mode 100644 resources/views/vendor/grid_view/filters/dropdown.blade.php create mode 100644 resources/views/vendor/grid_view/filters/stub.blade.php create mode 100644 resources/views/vendor/grid_view/filters/text.blade.php create mode 100644 resources/views/vendor/grid_view/grid.blade.php create mode 100644 resources/views/vendor/grid_view/pagination.blade.php create mode 100644 resources/views/vendor/livewire/bootstrap.blade.php create mode 100644 resources/views/vendor/livewire/simple-bootstrap.blade.php create mode 100644 resources/views/vendor/livewire/simple-tailwind.blade.php create mode 100644 resources/views/vendor/livewire/tailwind.blade.php create mode 100644 resources/views/vendor/mail/html/button.blade.php create mode 100644 resources/views/vendor/mail/html/footer.blade.php create mode 100644 resources/views/vendor/mail/html/header.blade.php create mode 100644 resources/views/vendor/mail/html/layout.blade.php create mode 100644 resources/views/vendor/mail/html/message.blade.php create mode 100644 resources/views/vendor/mail/html/panel.blade.php create mode 100644 resources/views/vendor/mail/html/subcopy.blade.php create mode 100644 resources/views/vendor/mail/html/table.blade.php create mode 100644 resources/views/vendor/mail/html/themes/default.css create mode 100644 resources/views/vendor/mail/text/button.blade.php create mode 100644 resources/views/vendor/mail/text/footer.blade.php create mode 100644 resources/views/vendor/mail/text/header.blade.php create mode 100644 resources/views/vendor/mail/text/layout.blade.php create mode 100644 resources/views/vendor/mail/text/message.blade.php create mode 100644 resources/views/vendor/mail/text/panel.blade.php create mode 100644 resources/views/vendor/mail/text/subcopy.blade.php create mode 100644 resources/views/vendor/mail/text/table.blade.php create mode 100644 resources/views/vendor/notifications/email.blade.php create mode 100644 resources/views/vendor/pagination/bootstrap-4.blade.php create mode 100644 resources/views/vendor/pagination/bootstrap-5.blade.php create mode 100644 resources/views/vendor/pagination/default.blade.php create mode 100644 resources/views/vendor/pagination/semantic-ui.blade.php create mode 100644 resources/views/vendor/pagination/simple-bootstrap-4.blade.php create mode 100644 resources/views/vendor/pagination/simple-bootstrap-5.blade.php create mode 100644 resources/views/vendor/pagination/simple-default.blade.php create mode 100644 resources/views/vendor/pagination/simple-tailwind.blade.php create mode 100644 resources/views/vendor/pagination/tailwind.blade.php create mode 100644 resources/views/vendor/rbac/permissions/_fields.blade.php create mode 100644 resources/views/vendor/rbac/permissions/create.blade.php create mode 100644 resources/views/vendor/rbac/permissions/edit.blade.php create mode 100644 resources/views/vendor/rbac/permissions/index.blade.php create mode 100644 resources/views/vendor/rbac/permissions/show.blade.php create mode 100644 resources/views/vendor/rbac/roles/_fields.blade.php create mode 100644 resources/views/vendor/rbac/roles/create.blade.php create mode 100644 resources/views/vendor/rbac/roles/edit.blade.php create mode 100644 resources/views/vendor/rbac/roles/index.blade.php create mode 100644 resources/views/vendor/rbac/roles/show.blade.php create mode 100644 resources/views/vendor/rbac/users/_fields.blade.php create mode 100644 resources/views/vendor/rbac/users/edit.blade.php create mode 100644 resources/views/vendor/rbac/users/index.blade.php create mode 100644 resources/views/vendor/rbac/users/show.blade.php create mode 100644 routes/jetstream.php create mode 100644 sail diff --git a/app/Models/User.php b/app/Models/User.php index 5b7e3e0..121855b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -6,17 +6,20 @@ use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Itstructure\LaRbac\Interfaces\RbacUserInterface; +use Itstructure\LaRbac\Traits\Administrable; use Laravel\Fortify\TwoFactorAuthenticatable; use Laravel\Jetstream\HasProfilePhoto; use Laravel\Sanctum\HasApiTokens; -class User extends Authenticatable +class User extends Authenticatable implements RbacUserInterface { use HasApiTokens; use HasFactory; use HasProfilePhoto; use Notifiable; use TwoFactorAuthenticatable; + use Administrable; /** * The attributes that are mass assignable. @@ -28,6 +31,7 @@ class User extends Authenticatable 'email', 'password', 'nickname', + 'roles', ]; /** diff --git a/composer.json b/composer.json index 6605abc..4ae21b0 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,10 @@ "license": "MIT", "require": { "php": "^8.1", + "doctrine/dbal": "^3.6", "guzzlehttp/guzzle": "^7.2", + "itstructure/laravel-rbac": "~3.0.9", + "laravel/cashier": "^14.12", "laravel/framework": "^10.8", "laravel/jetstream": "^3.2", "laravel/sanctum": "^3.2", diff --git a/composer.lock b/composer.lock index 70866cf..ec6db57 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "134292f51c7e5ee47120ccd0f856c22d", + "content-hash": "03dde24c1e2d865fabd30042a946300e", "packages": [ { "name": "bacon/bacon-qr-code", @@ -240,6 +240,345 @@ }, "time": "2022-10-27T11:44:00+00:00" }, + { + "name": "doctrine/cache", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/2.2.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2022-05-20T20:07:39+00:00" + }, + { + "name": "doctrine/dbal", + "version": "3.6.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/b4bd1cfbd2b916951696d82e57d054394d84864c", + "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/cache": "^1.11|^2.0", + "doctrine/deprecations": "^0.5.3|^1", + "doctrine/event-manager": "^1|^2", + "php": "^7.4 || ^8.0", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "doctrine/coding-standard": "11.1.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2022.3", + "phpstan/phpstan": "1.10.9", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "9.6.6", + "psalm/plugin-phpunit": "0.18.4", + "squizlabs/php_codesniffer": "3.7.2", + "symfony/cache": "^5.4|^6.0", + "symfony/console": "^4.4|^5.4|^6.0", + "vimeo/psalm": "4.30.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/3.6.2" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2023-04-14T07:25:38+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + }, + "time": "2022-05-02T15:47:09+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32", + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.28" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/2.0.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2022-10-12T20:59:15+00:00" + }, { "name": "doctrine/inflector", "version": "2.0.6", @@ -1081,6 +1420,111 @@ ], "time": "2021-10-07T12:57:01+00:00" }, + { + "name": "itstructure/laravel-grid-view", + "version": "1.0.11", + "source": { + "type": "git", + "url": "https://github.com/itstructure/laravel-grid-view.git", + "reference": "b7e2c97398dd871473331b343c705181d76dbd52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/itstructure/laravel-grid-view/zipball/b7e2c97398dd871473331b343c705181d76dbd52", + "reference": "b7e2c97398dd871473331b343c705181d76dbd52", + "shasum": "" + }, + "require": { + "laravel/framework": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0", + "php": ">=7.1.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Itstructure\\GridView\\GridViewServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Itstructure\\GridView\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Girnik", + "email": "girnikandrey@gmail.com" + } + ], + "description": "Grid view for laravel framework", + "keywords": [ + "grid", + "gridview", + "laravel", + "table", + "view" + ], + "support": { + "issues": "https://github.com/itstructure/laravel-grid-view/issues", + "source": "https://github.com/itstructure/laravel-grid-view/tree/1.0.11" + }, + "time": "2023-02-18T06:05:00+00:00" + }, + { + "name": "itstructure/laravel-rbac", + "version": "3.0.9", + "source": { + "type": "git", + "url": "https://github.com/itstructure/laravel-rbac.git", + "reference": "de30bfcb11b0cadadaefada3da27445cb725a437" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/itstructure/laravel-rbac/zipball/de30bfcb11b0cadadaefada3da27445cb725a437", + "reference": "de30bfcb11b0cadadaefada3da27445cb725a437", + "shasum": "" + }, + "require": { + "itstructure/laravel-grid-view": "~1.0.11", + "laravel/framework": "^8.0|^9.0|^10.0", + "php": ">=7.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Itstructure\\LaRbac\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andrey Girnik", + "email": "girnikandrey@gmail.com", + "homepage": "https://github.com/itstructure", + "role": "Developer" + } + ], + "description": "Laravel package for RBAC manage", + "keywords": [ + "laravel", + "permission", + "rbac", + "role" + ], + "support": { + "issues": "https://github.com/itstructure/laravel-rbac/issues", + "source": "https://github.com/itstructure/laravel-rbac/tree/3.0.9" + }, + "time": "2023-03-23T17:29:13+00:00" + }, { "name": "jaybizzle/crawler-detect", "version": "v1.2.114", @@ -1216,6 +1660,93 @@ ], "time": "2020-06-13T08:05:20+00:00" }, + { + "name": "laravel/cashier", + "version": "v14.12.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/cashier-stripe.git", + "reference": "8ce5f2488c21aa996b48c375fabbff962bcd0a24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/cashier-stripe/zipball/8ce5f2488c21aa996b48c375fabbff962bcd0a24", + "reference": "8ce5f2488c21aa996b48c375fabbff962bcd0a24", + "shasum": "" + }, + "require": { + "ext-json": "*", + "illuminate/console": "^9.21|^10.0", + "illuminate/contracts": "^9.21|^10.0", + "illuminate/database": "^9.21|^10.0", + "illuminate/http": "^9.21|^10.0", + "illuminate/log": "^9.21|^10.0", + "illuminate/notifications": "^9.21|^10.0", + "illuminate/pagination": "^9.21|^10.0", + "illuminate/routing": "^9.21|^10.0", + "illuminate/support": "^9.21|^10.0", + "illuminate/view": "^9.21|^10.0", + "moneyphp/money": "^4.0", + "nesbot/carbon": "^2.0", + "php": "^8.0", + "stripe/stripe-php": "^7.39|^8.0|^9.0|^10.0", + "symfony/http-kernel": "^6.0", + "symfony/polyfill-intl-icu": "^1.22.1" + }, + "require-dev": { + "dompdf/dompdf": "^2.0", + "mockery/mockery": "^1.0", + "orchestra/testbench": "^7.0|^8.0", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "dompdf/dompdf": "Required when generating and downloading invoice PDF's using Dompdf (^1.0.1|^2.0).", + "ext-intl": "Allows for more locales besides the default \"en\" when formatting money values." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "14.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Cashier\\CashierServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Cashier\\": "src/", + "Laravel\\Cashier\\Database\\Factories\\": "database/factories/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries@laravel.com" + } + ], + "description": "Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.", + "keywords": [ + "billing", + "laravel", + "stripe" + ], + "support": { + "issues": "https://github.com/laravel/cashier/issues", + "source": "https://github.com/laravel/cashier" + }, + "time": "2023-05-09T15:26:48+00:00" + }, { "name": "laravel/fortify", "version": "v1.17.2", @@ -2264,6 +2795,95 @@ }, "time": "2022-11-08T18:31:26+00:00" }, + { + "name": "moneyphp/money", + "version": "v4.1.1", + "source": { + "type": "git", + "url": "https://github.com/moneyphp/money.git", + "reference": "9682220995ffd396843be5b4ee1e5f2c2d6ecee2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moneyphp/money/zipball/9682220995ffd396843be5b4ee1e5f2c2d6ecee2", + "reference": "9682220995ffd396843be5b4ee1e5f2c2d6ecee2", + "shasum": "" + }, + "require": { + "ext-bcmath": "*", + "ext-filter": "*", + "ext-json": "*", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "cache/taggable-cache": "^1.1.0", + "doctrine/coding-standard": "^9.0", + "doctrine/instantiator": "^1.4.0", + "ext-gmp": "*", + "ext-intl": "*", + "florianv/exchanger": "^2.6.3", + "florianv/swap": "^4.3.0", + "moneyphp/crypto-currencies": "^1.0.0", + "moneyphp/iso-currencies": "^3.2.1", + "php-http/message": "^1.11.0", + "php-http/mock-client": "^1.4.1", + "phpbench/phpbench": "^1.2.5", + "phpspec/phpspec": "^7.3", + "phpunit/phpunit": "^9.5.4", + "psalm/plugin-phpunit": "^0.18.4", + "psr/cache": "^1.0.1", + "vimeo/psalm": "~5.3.0" + }, + "suggest": { + "ext-gmp": "Calculate without integer limits", + "ext-intl": "Format Money objects with intl", + "florianv/exchanger": "Exchange rates library for PHP", + "florianv/swap": "Exchange rates library for PHP", + "psr/cache-implementation": "Used for Currency caching" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Money\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Verraes", + "email": "mathias@verraes.net", + "homepage": "http://verraes.net" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Frederik Bosch", + "email": "f.bosch@genkgo.nl" + } + ], + "description": "PHP implementation of Fowler's Money pattern", + "homepage": "http://moneyphp.org", + "keywords": [ + "Value Object", + "money", + "vo" + ], + "support": { + "issues": "https://github.com/moneyphp/money/issues", + "source": "https://github.com/moneyphp/money/tree/v4.1.1" + }, + "time": "2023-04-11T09:18:34+00:00" + }, { "name": "monolog/monolog", "version": "3.3.1", @@ -2952,6 +3572,55 @@ }, "time": "2022-06-13T21:57:56+00:00" }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, { "name": "psr/container", "version": "2.0.2", @@ -3617,6 +4286,67 @@ ], "time": "2023-04-15T23:01:58+00:00" }, + { + "name": "stripe/stripe-php", + "version": "v10.12.1", + "source": { + "type": "git", + "url": "https://github.com/stripe/stripe-php.git", + "reference": "9e8055d55e8212ad844f48d7cf525b630689be35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/9e8055d55e8212ad844f48d7cf525b630689be35", + "reference": "9e8055d55e8212ad844f48d7cf525b630689be35", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "3.5.0", + "php-coveralls/php-coveralls": "^2.5", + "phpstan/phpstan": "^1.2", + "phpunit/phpunit": "^5.7 || ^9.0", + "squizlabs/php_codesniffer": "^3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Stripe\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stripe and contributors", + "homepage": "https://github.com/stripe/stripe-php/contributors" + } + ], + "description": "Stripe PHP Library", + "homepage": "https://stripe.com/", + "keywords": [ + "api", + "payment processing", + "stripe" + ], + "support": { + "issues": "https://github.com/stripe/stripe-php/issues", + "source": "https://github.com/stripe/stripe-php/tree/v10.12.1" + }, + "time": "2023-04-04T19:13:21+00:00" + }, { "name": "symfony/console", "version": "v6.2.10", @@ -4656,6 +5386,93 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "a3d9148e2c363588e05abbdd4ee4f971f0a5330c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/a3d9148e2c363588e05abbdd4ee4f971f0a5330c", + "reference": "a3d9148e2c363588e05abbdd4ee4f971f0a5330c", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance and support of other locales than \"en\"" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Icu\\": "" + }, + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, { "name": "symfony/polyfill-intl-idn", "version": "v1.27.0", diff --git a/config/app.php b/config/app.php index cde8fb5..90b4e6e 100644 --- a/config/app.php +++ b/config/app.php @@ -170,6 +170,7 @@ return [ App\Providers\RouteServiceProvider::class, App\Providers\FortifyServiceProvider::class, App\Providers\JetstreamServiceProvider::class, + Itstructure\LaRbac\RbacServiceProvider::class, ])->toArray(), /* diff --git a/config/cashier.php b/config/cashier.php new file mode 100644 index 0000000..f5b8fcf --- /dev/null +++ b/config/cashier.php @@ -0,0 +1,125 @@ + env('STRIPE_KEY'), + + 'secret' => env('STRIPE_SECRET'), + + /* + |-------------------------------------------------------------------------- + | Cashier Path + |-------------------------------------------------------------------------- + | + | This is the base URI path where Cashier's views, such as the payment + | verification screen, will be available from. You're free to tweak + | this path according to your preferences and application design. + | + */ + + 'path' => env('CASHIER_PATH', 'stripe'), + + /* + |-------------------------------------------------------------------------- + | Stripe Webhooks + |-------------------------------------------------------------------------- + | + | Your Stripe webhook secret is used to prevent unauthorized requests to + | your Stripe webhook handling controllers. The tolerance setting will + | check the drift between the current time and the signed request's. + | + */ + + 'webhook' => [ + 'secret' => env('STRIPE_WEBHOOK_SECRET'), + 'tolerance' => env('STRIPE_WEBHOOK_TOLERANCE', 300), + 'events' => WebhookCommand::DEFAULT_EVENTS, + ], + + /* + |-------------------------------------------------------------------------- + | Currency + |-------------------------------------------------------------------------- + | + | This is the default currency that will be used when generating charges + | from your application. Of course, you are welcome to use any of the + | various world currencies that are currently supported via Stripe. + | + */ + + 'currency' => env('CASHIER_CURRENCY', 'usd'), + + /* + |-------------------------------------------------------------------------- + | Currency Locale + |-------------------------------------------------------------------------- + | + | This is the default locale in which your money values are formatted in + | for display. To utilize other locales besides the default en locale + | verify you have the "intl" PHP extension installed on the system. + | + */ + + 'currency_locale' => env('CASHIER_CURRENCY_LOCALE', 'en'), + + /* + |-------------------------------------------------------------------------- + | Payment Confirmation Notification + |-------------------------------------------------------------------------- + | + | If this setting is enabled, Cashier will automatically notify customers + | whose payments require additional verification. You should listen to + | Stripe's webhooks in order for this feature to function correctly. + | + */ + + 'payment_notification' => env('CASHIER_PAYMENT_NOTIFICATION'), + + /* + |-------------------------------------------------------------------------- + | Invoice Settings + |-------------------------------------------------------------------------- + | + | The following options determine how Cashier invoices are converted from + | HTML into PDFs. You're free to change the options based on the needs + | of your application or your preferences regarding invoice styling. + | + */ + + 'invoices' => [ + 'renderer' => env('CASHIER_INVOICE_RENDERER', DompdfInvoiceRenderer::class), + + 'options' => [ + // Supported: 'letter', 'legal', 'A4' + 'paper' => env('CASHIER_PAPER', 'letter'), + ], + ], + + /* + |-------------------------------------------------------------------------- + | Stripe Logger + |-------------------------------------------------------------------------- + | + | This setting defines which logging channel will be used by the Stripe + | library to write log messages. You are free to specify any of your + | logging channels listed inside the "logging" configuration file. + | + */ + + 'logger' => env('CASHIER_LOGGER'), + +]; diff --git a/config/flare.php b/config/flare.php new file mode 100644 index 0000000..a4896f3 --- /dev/null +++ b/config/flare.php @@ -0,0 +1,80 @@ + env('FLARE_KEY'), + + /* + |-------------------------------------------------------------------------- + | Middleware + |-------------------------------------------------------------------------- + | + | These middleware will modify the contents of the report sent to Flare. + | + */ + + 'flare_middleware' => [ + RemoveRequestIp::class, + AddGitInformation::class, + AddNotifierName::class, + AddEnvironmentInformation::class, + AddExceptionInformation::class, + AddDumps::class, + AddLogs::class => [ + 'maximum_number_of_collected_logs' => 200, + ], + AddQueries::class => [ + 'maximum_number_of_collected_queries' => 200, + 'report_query_bindings' => true, + ], + AddJobs::class => [ + 'max_chained_job_reporting_depth' => 5, + ], + CensorRequestBodyFields::class => [ + 'censor_fields' => [ + 'password', + 'password_confirmation', + ], + ], + CensorRequestHeaders::class => [ + 'headers' => [ + 'API-KEY', + ] + ] + ], + + /* + |-------------------------------------------------------------------------- + | Reporting log statements + |-------------------------------------------------------------------------- + | + | If this setting is `false` log statements won't be sent as events to Flare, + | no matter which error level you specified in the Flare log channel. + | + */ + + 'send_logs_as_events' => true, +]; diff --git a/config/ignition.php b/config/ignition.php new file mode 100644 index 0000000..e45347a --- /dev/null +++ b/config/ignition.php @@ -0,0 +1,241 @@ + env('IGNITION_EDITOR', 'phpstorm'), + + /* + |-------------------------------------------------------------------------- + | Theme + |-------------------------------------------------------------------------- + | + | Here you may specify which theme Ignition should use. + | + | Supported: "light", "dark", "auto" + | + */ + + 'theme' => env('IGNITION_THEME', 'auto'), + + /* + |-------------------------------------------------------------------------- + | Sharing + |-------------------------------------------------------------------------- + | + | You can share local errors with colleagues or others around the world. + | Sharing is completely free and doesn't require an account on Flare. + | + | If necessary, you can completely disable sharing below. + | + */ + + 'enable_share_button' => env('IGNITION_SHARING_ENABLED', true), + + /* + |-------------------------------------------------------------------------- + | Register Ignition commands + |-------------------------------------------------------------------------- + | + | Ignition comes with an additional make command that lets you create + | new solution classes more easily. To keep your default Laravel + | installation clean, this command is not registered by default. + | + | You can enable the command registration below. + | + */ + + 'register_commands' => env('REGISTER_IGNITION_COMMANDS', false), + + /* + |-------------------------------------------------------------------------- + | Solution Providers + |-------------------------------------------------------------------------- + | + | You may specify a list of solution providers (as fully qualified class + | names) that shouldn't be loaded. Ignition will ignore these classes + | and possible solutions provided by them will never be displayed. + | + */ + + 'solution_providers' => [ + // from spatie/ignition + BadMethodCallSolutionProvider::class, + MergeConflictSolutionProvider::class, + UndefinedPropertySolutionProvider::class, + + // from spatie/laravel-ignition + IncorrectValetDbCredentialsSolutionProvider::class, + MissingAppKeySolutionProvider::class, + DefaultDbNameSolutionProvider::class, + TableNotFoundSolutionProvider::class, + MissingImportSolutionProvider::class, + InvalidRouteActionSolutionProvider::class, + ViewNotFoundSolutionProvider::class, + RunningLaravelDuskInProductionProvider::class, + MissingColumnSolutionProvider::class, + UnknownValidationSolutionProvider::class, + MissingMixManifestSolutionProvider::class, + MissingViteManifestSolutionProvider::class, + MissingLivewireComponentSolutionProvider::class, + UndefinedViewVariableSolutionProvider::class, + GenericLaravelExceptionSolutionProvider::class, + OpenAiSolutionProvider::class, + ], + + /* + |-------------------------------------------------------------------------- + | Ignored Solution Providers + |-------------------------------------------------------------------------- + | + | You may specify a list of solution providers (as fully qualified class + | names) that shouldn't be loaded. Ignition will ignore these classes + | and possible solutions provided by them will never be displayed. + | + */ + + 'ignored_solution_providers' => [ + + ], + + /* + |-------------------------------------------------------------------------- + | Runnable Solutions + |-------------------------------------------------------------------------- + | + | Some solutions that Ignition displays are runnable and can perform + | various tasks. By default, runnable solutions are only enabled when your + | app has debug mode enabled and the environment is `local` or + | `development`. + | + | Using the `IGNITION_ENABLE_RUNNABLE_SOLUTIONS` environment variable, you + | can override this behaviour and enable or disable runnable solutions + | regardless of the application's environment. + | + | Default: env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS') + | + */ + + 'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS'), + + /* + |-------------------------------------------------------------------------- + | Remote Path Mapping + |-------------------------------------------------------------------------- + | + | If you are using a remote dev server, like Laravel Homestead, Docker, or + | even a remote VPS, it will be necessary to specify your path mapping. + | + | Leaving one, or both of these, empty or null will not trigger the remote + | URL changes and Ignition will treat your editor links as local files. + | + | "remote_sites_path" is an absolute base path for your sites or projects + | in Homestead, Vagrant, Docker, or another remote development server. + | + | Example value: "/home/vagrant/Code" + | + | "local_sites_path" is an absolute base path for your sites or projects + | on your local computer where your IDE or code editor is running on. + | + | Example values: "/Users//Code", "C:\Users\\Documents\Code" + | + */ + + 'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', base_path()), + 'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''), + + /* + |-------------------------------------------------------------------------- + | Housekeeping Endpoint Prefix + |-------------------------------------------------------------------------- + | + | Ignition registers a couple of routes when it is enabled. Below you may + | specify a route prefix that will be used to host all internal links. + | + */ + + 'housekeeping_endpoint_prefix' => '_ignition', + + /* + |-------------------------------------------------------------------------- + | Settings File + |-------------------------------------------------------------------------- + | + | Ignition allows you to save your settings to a specific global file. + | + | If no path is specified, a file with settings will be saved to the user's + | home directory. The directory depends on the OS and its settings but it's + | typically `~/.ignition.json`. In this case, the settings will be applied + | to all of your projects where Ignition is used and the path is not + | specified. + | + | However, if you want to store your settings on a project basis, or you + | want to keep them in another directory, you can specify a path where + | the settings file will be saved. The path should be an existing directory + | with correct write access. + | For example, create a new `ignition` folder in the storage directory and + | use `storage_path('ignition')` as the `settings_file_path`. + | + | Default value: '' (empty string) + */ + + 'settings_file_path' => '', + + /* + |-------------------------------------------------------------------------- + | Recorders + |-------------------------------------------------------------------------- + | + | Ignition registers a couple of recorders when it is enabled. Below you may + | specify a recorders will be used to record specific events. + | + */ + + 'recorders' => [ + DumpRecorder::class, + JobRecorder::class, + LogRecorder::class, + QueryRecorder::class + ], + + /* + * When a key is set, we'll send your exceptions to Open AI to generate a solution + */ + 'open_ai_key' => env('IGNITION_OPEN_AI_KEY'), +]; diff --git a/config/livewire.php b/config/livewire.php new file mode 100644 index 0000000..59f8d5c --- /dev/null +++ b/config/livewire.php @@ -0,0 +1,158 @@ + 'App\\Http\\Livewire', + + /* + |-------------------------------------------------------------------------- + | View Path + |-------------------------------------------------------------------------- + | + | This value sets the path for Livewire component views. This affects + | file manipulation helper commands like `artisan make:livewire`. + | + */ + + 'view_path' => resource_path('views/livewire'), + + /* + |-------------------------------------------------------------------------- + | Layout + |-------------------------------------------------------------------------- + | The default layout view that will be used when rendering a component via + | Route::get('/some-endpoint', SomeComponent::class);. In this case the + | the view returned by SomeComponent will be wrapped in "layouts.app" + | + */ + + 'layout' => 'layouts.app', + + /* + |-------------------------------------------------------------------------- + | Livewire Assets URL + |-------------------------------------------------------------------------- + | + | This value sets the path to Livewire JavaScript assets, for cases where + | your app's domain root is not the correct path. By default, Livewire + | will load its JavaScript assets from the app's "relative root". + | + | Examples: "/assets", "myurl.com/app". + | + */ + + 'asset_url' => null, + + /* + |-------------------------------------------------------------------------- + | Livewire App URL + |-------------------------------------------------------------------------- + | + | This value should be used if livewire assets are served from CDN. + | Livewire will communicate with an app through this url. + | + | Examples: "https://my-app.com", "myurl.com/app". + | + */ + + 'app_url' => null, + + /* + |-------------------------------------------------------------------------- + | Livewire Endpoint Middleware Group + |-------------------------------------------------------------------------- + | + | This value sets the middleware group that will be applied to the main + | Livewire "message" endpoint (the endpoint that gets hit everytime + | a Livewire component updates). It is set to "web" by default. + | + */ + + 'middleware_group' => 'web', + + /* + |-------------------------------------------------------------------------- + | Livewire Temporary File Uploads Endpoint Configuration + |-------------------------------------------------------------------------- + | + | Livewire handles file uploads by storing uploads in a temporary directory + | before the file is validated and stored permanently. All file uploads + | are directed to a global endpoint for temporary storage. The config + | items below are used for customizing the way the endpoint works. + | + */ + + 'temporary_file_upload' => [ + 'disk' => null, // Example: 'local', 's3' Default: 'default' + 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB) + 'directory' => null, // Example: 'tmp' Default 'livewire-tmp' + 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1' + 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs. + 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4', + 'mov', 'avi', 'wmv', 'mp3', 'm4a', + 'jpg', 'jpeg', 'mpga', 'webp', 'wma', + ], + 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated. + ], + + /* + |-------------------------------------------------------------------------- + | Manifest File Path + |-------------------------------------------------------------------------- + | + | This value sets the path to the Livewire manifest file. + | The default should work for most cases (which is + | "/bootstrap/cache/livewire-components.php"), but for specific + | cases like when hosting on Laravel Vapor, it could be set to a different value. + | + | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php". + | + */ + + 'manifest_path' => null, + + /* + |-------------------------------------------------------------------------- + | Back Button Cache + |-------------------------------------------------------------------------- + | + | This value determines whether the back button cache will be used on pages + | that contain Livewire. By disabling back button cache, it ensures that + | the back button shows the correct state of components, instead of + | potentially stale, cached data. + | + | Setting it to "false" (default) will disable back button cache. + | + */ + + 'back_button_cache' => false, + + /* + |-------------------------------------------------------------------------- + | Render On Redirect + |-------------------------------------------------------------------------- + | + | This value determines whether Livewire will render before it's redirected + | or not. Setting it to "false" (default) will mean the render method is + | skipped when redirecting. And "true" will mean the render method is + | run before redirecting. Browsers bfcache can store a potentially + | stale view if render is skipped on redirect. + | + */ + + 'render_on_redirect' => false, + +]; diff --git a/config/rbac.php b/config/rbac.php new file mode 100644 index 0000000..8ea68fc --- /dev/null +++ b/config/rbac.php @@ -0,0 +1,13 @@ + 'layouts.app', // You must set it. Example: 'layout' => 'adminlte::page' + 'userModelClass' => App\Models\User::class, // You can change it + 'adminUserId' => 1, // You must set it. This is the initial user id, which must be an administrator, at least at the first stage. + 'routesMainPermission' => Itstructure\LaRbac\Models\Permission::ADMINISTRATE_PERMISSION, // You can change it + 'routesAuthMiddlewares' => ['auth'], // You can change it + 'memberNameAttributeKey' => function ($row) { // You can change it. And can simply set 'memberNameAttributeKey' => 'name' + return $row->name; + }, + 'rowsPerPage' => 10, +]; diff --git a/config/tinker.php b/config/tinker.php new file mode 100644 index 0000000..c187942 --- /dev/null +++ b/config/tinker.php @@ -0,0 +1,50 @@ + [ + // App\Console\Commands\ExampleCommand::class, + ], + + /* + |-------------------------------------------------------------------------- + | Auto Aliased Classes + |-------------------------------------------------------------------------- + | + | Tinker will not automatically alias classes in your vendor namespaces + | but you may explicitly allow a subset of classes to get aliased by + | adding the names of each of those classes to the following list. + | + */ + + 'alias' => [ + // + ], + + /* + |-------------------------------------------------------------------------- + | Classes That Should Not Be Aliased + |-------------------------------------------------------------------------- + | + | Typically, Tinker automatically aliases classes as you require them in + | Tinker. However, you may wish to never alias certain classes, which + | you may accomplish by listing the classes in the following array. + | + */ + + 'dont_alias' => [ + 'App\Nova', + ], + +]; diff --git a/database/migrations/2019_05_03_000001_create_customer_columns.php b/database/migrations/2019_05_03_000001_create_customer_columns.php new file mode 100644 index 0000000..bd17cfe --- /dev/null +++ b/database/migrations/2019_05_03_000001_create_customer_columns.php @@ -0,0 +1,36 @@ +string('stripe_id')->nullable()->index(); + $table->string('pm_type')->nullable(); + $table->string('pm_last_four', 4)->nullable(); + $table->timestamp('trial_ends_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn([ + 'stripe_id', + 'pm_type', + 'pm_last_four', + 'trial_ends_at', + ]); + }); + } +}; diff --git a/database/migrations/2019_05_03_000002_create_subscriptions_table.php b/database/migrations/2019_05_03_000002_create_subscriptions_table.php new file mode 100644 index 0000000..951363f --- /dev/null +++ b/database/migrations/2019_05_03_000002_create_subscriptions_table.php @@ -0,0 +1,37 @@ +id(); + $table->foreignId('user_id'); + $table->string('name'); + $table->string('stripe_id')->unique(); + $table->string('stripe_status'); + $table->string('stripe_price')->nullable(); + $table->integer('quantity')->nullable(); + $table->timestamp('trial_ends_at')->nullable(); + $table->timestamp('ends_at')->nullable(); + $table->timestamps(); + + $table->index(['user_id', 'stripe_status']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('subscriptions'); + } +}; diff --git a/database/migrations/2019_05_03_000003_create_subscription_items_table.php b/database/migrations/2019_05_03_000003_create_subscription_items_table.php new file mode 100644 index 0000000..c81bd55 --- /dev/null +++ b/database/migrations/2019_05_03_000003_create_subscription_items_table.php @@ -0,0 +1,34 @@ +id(); + $table->foreignId('subscription_id'); + $table->string('stripe_id')->unique(); + $table->string('stripe_product'); + $table->string('stripe_price'); + $table->integer('quantity')->nullable(); + $table->timestamps(); + + $table->unique(['subscription_id', 'stripe_price']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('subscription_items'); + } +}; diff --git a/database/migrations/2020_05_21_100000_create_teams_table.php b/database/migrations/2020_05_21_100000_create_teams_table.php new file mode 100644 index 0000000..3e1b8ba --- /dev/null +++ b/database/migrations/2020_05_21_100000_create_teams_table.php @@ -0,0 +1,30 @@ +id(); + $table->foreignId('user_id')->index(); + $table->string('name'); + $table->boolean('personal_team'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('teams'); + } +}; diff --git a/database/migrations/2020_05_21_200000_create_team_user_table.php b/database/migrations/2020_05_21_200000_create_team_user_table.php new file mode 100644 index 0000000..3e27876 --- /dev/null +++ b/database/migrations/2020_05_21_200000_create_team_user_table.php @@ -0,0 +1,32 @@ +id(); + $table->foreignId('team_id'); + $table->foreignId('user_id'); + $table->string('role')->nullable(); + $table->timestamps(); + + $table->unique(['team_id', 'user_id']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('team_user'); + } +}; diff --git a/database/migrations/2020_05_21_300000_create_team_invitations_table.php b/database/migrations/2020_05_21_300000_create_team_invitations_table.php new file mode 100644 index 0000000..d59cd11 --- /dev/null +++ b/database/migrations/2020_05_21_300000_create_team_invitations_table.php @@ -0,0 +1,32 @@ +id(); + $table->foreignId('team_id')->constrained()->cascadeOnDelete(); + $table->string('email'); + $table->string('role')->nullable(); + $table->timestamps(); + + $table->unique(['team_id', 'email']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('team_invitations'); + } +}; diff --git a/database/migrations/2020_07_11_151756_create_roles_table.php b/database/migrations/2020_07_11_151756_create_roles_table.php new file mode 100644 index 0000000..8baea31 --- /dev/null +++ b/database/migrations/2020_07_11_151756_create_roles_table.php @@ -0,0 +1,37 @@ + + */ +class CreateRolesTable extends Migration +{ + /** + * Run the migrations. + * @return void + */ + public function up() + { + Schema::create('roles', function (Blueprint $table) { + $table->increments('id'); + $table->string('name', 191); + $table->string('slug', 191)->unique(); + $table->string('description', 191); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * @return void + */ + public function down() + { + Schema::dropIfExists('roles'); + } +} diff --git a/database/migrations/2020_07_11_151834_create_user_role_table.php b/database/migrations/2020_07_11_151834_create_user_role_table.php new file mode 100644 index 0000000..dfd8d72 --- /dev/null +++ b/database/migrations/2020_07_11_151834_create_user_role_table.php @@ -0,0 +1,75 @@ + + */ +class CreateUserRoleTable extends Migration +{ + /** + * @var string + */ + protected $userModelClass; + + /** + * UserController constructor. + */ + public function __construct() + { + $this->userModelClass = config('rbac.userModelClass'); + } + + /** + * Run the migrations. + * @throws Exception + * @throws \Exception + */ + public function up() + { + Helper::checkUserModel($this->userModelClass); + + /* @var Illuminate\Foundation\Auth\User $userNewModel */ + $userNewModel = new $this->userModelClass(); + + Helper::checkUserModelKeyType($userNewModel); + + $userModelTable = $userNewModel->getTable(); + + $userModelKeyName = $userNewModel->getAuthIdentifierName(); + + $userTablePrimaryType = Schema::getConnection()->getDoctrineColumn($userModelTable, $userModelKeyName)->getType()->getName(); + + Helper::checkUserTablePrimaryType($userTablePrimaryType, $userModelKeyName, $userModelTable); + + Schema::create('user_role', function (Blueprint $table) use ($userModelKeyName, $userModelTable, $userTablePrimaryType) { + switch ($userTablePrimaryType) { + case 'bigint': + $table->unsignedBigInteger('user_id'); + break; + case 'integer': + $table->unsignedInteger('user_id'); + break; + } + $table->unsignedInteger('role_id'); + $table->timestamps(); + $table->unique(['user_id','role_id']); + $table->foreign('user_id')->references($userModelKeyName)->on($userModelTable)->onDelete('cascade'); + $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * @return void + */ + public function down() + { + Schema::dropIfExists('user_role'); + } +} diff --git a/database/migrations/2020_07_11_151894_create_permissions_table.php b/database/migrations/2020_07_11_151894_create_permissions_table.php new file mode 100644 index 0000000..a9465b2 --- /dev/null +++ b/database/migrations/2020_07_11_151894_create_permissions_table.php @@ -0,0 +1,37 @@ + + */ +class CreatePermissionsTable extends Migration +{ + /** + * Run the migrations. + * @return void + */ + public function up() + { + Schema::create('permissions', function (Blueprint $table) { + $table->increments('id'); + $table->string('name', 191); + $table->string('slug', 191)->unique(); + $table->string('description', 191); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * @return void + */ + public function down() + { + Schema::dropIfExists('permissions'); + } +} diff --git a/database/migrations/2020_07_11_151925_create_role_permission_table.php b/database/migrations/2020_07_11_151925_create_role_permission_table.php new file mode 100644 index 0000000..03e5b40 --- /dev/null +++ b/database/migrations/2020_07_11_151925_create_role_permission_table.php @@ -0,0 +1,38 @@ + + */ +class CreateRolePermissionTable extends Migration +{ + /** + * Run the migrations. + * @return void + */ + public function up() + { + Schema::create('role_permission', function (Blueprint $table) { + $table->unsignedInteger('role_id'); + $table->unsignedInteger('permission_id'); + $table->timestamps(); + $table->unique(['permission_id','role_id']); + $table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade'); + $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * @return void + */ + public function down() + { + Schema::dropIfExists('role_permission'); + } +} diff --git a/database/seeders/LaRbacDatabaseSeeder.php b/database/seeders/LaRbacDatabaseSeeder.php new file mode 100644 index 0000000..5396ad4 --- /dev/null +++ b/database/seeders/LaRbacDatabaseSeeder.php @@ -0,0 +1,22 @@ + + */ +class LaRbacDatabaseSeeder extends Seeder +{ + /** + * Seed the application's database with RBAC data. + * @return void + */ + public function run() + { + $this->call(PermissionSeeder::class); + $this->call(RoleSeeder::class); + } +} diff --git a/database/seeders/PermissionSeeder.php b/database/seeders/PermissionSeeder.php new file mode 100644 index 0000000..13e84e1 --- /dev/null +++ b/database/seeders/PermissionSeeder.php @@ -0,0 +1,65 @@ + + */ +class PermissionSeeder extends Seeder +{ + /** + * Run the database seeds. + * @return void + */ + public function run() + { + $this->createRecord( + Permission::ADMINISTRATE_PERMISSION, + 'Total administrate of users and content' + ); + + $this->createRecord( + Permission::VIEW_RECORD_PERMISSION, + 'Permission to view record' + ); + + $this->createRecord( + Permission::CREATE_RECORD_PERMISSION, + 'Permission to create record' + ); + + $this->createRecord( + Permission::UPDATE_RECORD_PERMISSION, + 'Permission to update record' + ); + + $this->createRecord( + Permission::DELETE_RECORD_PERMISSION, + 'Permission to delete record' + ); + + $this->createRecord( + Permission::PUBLISH_RECORD_PERMISSION, + 'Permission to publish record' + ); + } + + /** + * Create permission record in database. + * @param string $slug + * @param string $description + * @return void + */ + private function createRecord(string $slug, string $description): void + { + Permission::create([ + 'name' => str_replace('-', ' ', ucfirst($slug)), + 'slug' => $slug, + 'description' => $description, + ]); + } +} diff --git a/database/seeders/RoleSeeder.php b/database/seeders/RoleSeeder.php new file mode 100644 index 0000000..9ebcc56 --- /dev/null +++ b/database/seeders/RoleSeeder.php @@ -0,0 +1,89 @@ + + */ +class RoleSeeder extends Seeder +{ + /** + * Run the database seeds. + * @return void + */ + public function run() + { + $totalPermissionId = Permission::where('slug', Permission::ADMINISTRATE_PERMISSION)->firstOrFail()->id; + $viewPermissionId = Permission::where('slug', Permission::VIEW_RECORD_PERMISSION)->firstOrFail()->id; + $createPermissionId = Permission::where('slug', Permission::CREATE_RECORD_PERMISSION)->firstOrFail()->id; + $updatePermissionId = Permission::where('slug', Permission::UPDATE_RECORD_PERMISSION)->firstOrFail()->id; + $deletePermissionId = Permission::where('slug', Permission::DELETE_RECORD_PERMISSION)->firstOrFail()->id; + $publishPermissionId = Permission::where('slug', Permission::PUBLISH_RECORD_PERMISSION)->firstOrFail()->id; + + $this->createRecord( + Role::ADMIN_ROLE, + 'Administrator', + [ + $totalPermissionId, + $viewPermissionId, + $createPermissionId, + $updatePermissionId, + $deletePermissionId, + $publishPermissionId + ] + ); + + $this->createRecord( + Role::MANAGER_ROLE, + 'Content manager', + [ + $viewPermissionId, + $createPermissionId, + $updatePermissionId, + $deletePermissionId, + $publishPermissionId + ] + ); + + $this->createRecord( + Role::EDITOR_ROLE, + 'Record editor', + [ + $viewPermissionId, + $createPermissionId, + $updatePermissionId, + $deletePermissionId, + $publishPermissionId + ] + ); + + $this->createRecord( + Role::USER_ROLE, + 'Simple user', + [ + $viewPermissionId + ] + ); + } + + /** + * Create role record in database. + * @param string $slug + * @param string $description + * @param array $permissions + * @return void + */ + private function createRecord(string $slug, string $description, array $permissions): void + { + Role::create([ + 'name' => ucfirst($slug), + 'slug' => $slug, + 'description' => $description, + ])->permissions() + ->attach($permissions); + } +} diff --git a/public/vendor/livewire/livewire.js b/public/vendor/livewire/livewire.js new file mode 100644 index 0000000..c28a26b --- /dev/null +++ b/public/vendor/livewire/livewire.js @@ -0,0 +1,14 @@ +!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global="undefined"!=typeof globalThis?globalThis:global||self).Livewire=factory()}(this,(function(){"use strict";function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function ownKeys$1(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}function _objectSpread2(target){for(var i=1;iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i0&&void 0!==arguments[0]?arguments[0]:"right";return this.modifiers.includes("up")?"up":this.modifiers.includes("down")?"down":this.modifiers.includes("left")?"left":this.modifiers.includes("right")?"right":fallback}}]),Directive}();function walk(root,callback){if(!1!==callback(root))for(var node=root.firstElementChild;node;)walk(node,callback),node=node.nextElementSibling}function dispatch(eventName){var event=document.createEvent("Events");return event.initEvent(eventName,!0,!0),document.dispatchEvent(event),event}function getCsrfToken(){var _window$livewire_toke,tokenTag=document.head.querySelector('meta[name="csrf-token"]');return tokenTag?tokenTag.content:null!==(_window$livewire_toke=window.livewire_token)&&void 0!==_window$livewire_toke?_window$livewire_toke:void 0}function kebabCase(subject){return subject.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()} +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */var isobject=function(val){return null!=val&&"object"==typeof val&&!1===Array.isArray(val)},getValue=function(target,path,options){if(isobject(options)||(options={default:options}),!isValidObject(target))return void 0!==options.default?options.default:target;"number"==typeof path&&(path=String(path));const isArray=Array.isArray(path),isString="string"==typeof path,splitChar=options.separator||".",joinChar=options.joinChar||("string"==typeof splitChar?splitChar:".");if(!isString&&!isArray)return target;if(isString&&path in target)return isValid(path,target,options)?target[path]:options.default;let segs=isArray?path:split$1(path,splitChar,options),len=segs.length,idx=0;do{let prop=segs[idx];for("number"==typeof prop&&(prop=String(prop));prop&&"\\"===prop.slice(-1);)prop=join([prop.slice(0,-1),segs[++idx]||""],joinChar,options);if(prop in target){if(!isValid(prop,target,options))return options.default;target=target[prop]}else{let hasProp=!1,n=idx+1;for(;n + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + */function join(segs,joinChar,options){return"function"==typeof options.join?options.join(segs):segs[0]+joinChar+segs[1]}function split$1(path,splitChar,options){return"function"==typeof options.split?options.split(path):path.split(splitChar)}function isValid(key,target,options){return"function"!=typeof options.isValid||options.isValid(key,target)}function isValidObject(val){return isobject(val)||Array.isArray(val)||"function"==typeof val}var _default$6=function(){function _default(el){var skipWatcher=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_classCallCheck(this,_default),this.el=el,this.skipWatcher=skipWatcher,this.resolveCallback=function(){},this.rejectCallback=function(){},this.signature=(Math.random()+1).toString(36).substring(8)}return _createClass(_default,[{key:"toId",value:function(){return btoa(encodeURIComponent(this.el.outerHTML))}},{key:"onResolve",value:function(callback){this.resolveCallback=callback}},{key:"onReject",value:function(callback){this.rejectCallback=callback}},{key:"resolve",value:function(thing){this.resolveCallback(thing)}},{key:"reject",value:function(thing){this.rejectCallback(thing)}}]),_default}(),_default$5=function(_Action){_inherits(_default,_Action);var _super=_createSuper(_default);function _default(event,params,el){var _this;return _classCallCheck(this,_default),(_this=_super.call(this,el)).type="fireEvent",_this.payload={id:_this.signature,event:event,params:params},_this}return _createClass(_default,[{key:"toId",value:function(){return btoa(encodeURIComponent(this.type,this.payload.event,JSON.stringify(this.payload.params)))}}]),_default}(_default$6),MessageBus=function(){function MessageBus(){_classCallCheck(this,MessageBus),this.listeners={}}return _createClass(MessageBus,[{key:"register",value:function(name,callback){this.listeners[name]||(this.listeners[name]=[]),this.listeners[name].push(callback)}},{key:"call",value:function(name){for(var _len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];(this.listeners[name]||[]).forEach((function(callback){callback.apply(void 0,params)}))}},{key:"has",value:function(name){return Object.keys(this.listeners).includes(name)}}]),MessageBus}(),HookManager={availableHooks:["component.initialized","element.initialized","element.updating","element.updated","element.removed","message.sent","message.failed","message.received","message.processed","interceptWireModelSetValue","interceptWireModelAttachListener","beforeReplaceState","beforePushState"],bus:new MessageBus,register:function(name,callback){if(!this.availableHooks.includes(name))throw"Livewire: Referencing unknown hook: [".concat(name,"]");this.bus.register(name,callback)},call:function(name){for(var _this$bus,_len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];(_this$bus=this.bus).call.apply(_this$bus,[name].concat(params))}},DirectiveManager={directives:new MessageBus,register:function(name,callback){if(this.has(name))throw"Livewire: Directive already registered: [".concat(name,"]");this.directives.register(name,callback)},call:function(name,el,directive,component){this.directives.call(name,el,directive,component)},has:function(name){return this.directives.has(name)}},store$2={componentsById:{},listeners:new MessageBus,initialRenderIsFinished:!1,livewireIsInBackground:!1,livewireIsOffline:!1,sessionHasExpired:!1,sessionHasExpiredCallback:void 0,directives:DirectiveManager,hooks:HookManager,onErrorCallback:function(){},components:function(){var _this=this;return Object.keys(this.componentsById).map((function(key){return _this.componentsById[key]}))},addComponent:function(component){return this.componentsById[component.id]=component},findComponent:function(id){return this.componentsById[id]},getComponentsByName:function(name){return this.components().filter((function(component){return component.name===name}))},hasComponent:function(id){return!!this.componentsById[id]},tearDownComponents:function(){var _this2=this;this.components().forEach((function(component){_this2.removeComponent(component)}))},on:function(event,callback){this.listeners.register(event,callback)},emit:function(event){for(var _this$listeners,_len=arguments.length,params=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)params[_key-1]=arguments[_key];(_this$listeners=this.listeners).call.apply(_this$listeners,[event].concat(params)),this.componentsListeningForEvent(event).forEach((function(component){return component.addAction(new _default$5(event,params))}))},emitUp:function(el,event){for(var _len2=arguments.length,params=new Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++)params[_key2-2]=arguments[_key2];this.componentsListeningForEventThatAreTreeAncestors(el,event).forEach((function(component){return component.addAction(new _default$5(event,params))}))},emitSelf:function(componentId,event){var component=this.findComponent(componentId);if(component.listeners.includes(event)){for(var _len3=arguments.length,params=new Array(_len3>2?_len3-2:0),_key3=2;_key3<_len3;_key3++)params[_key3-2]=arguments[_key3];component.addAction(new _default$5(event,params))}},emitTo:function(componentName,event){for(var _len4=arguments.length,params=new Array(_len4>2?_len4-2:0),_key4=2;_key4<_len4;_key4++)params[_key4-2]=arguments[_key4];var components=this.getComponentsByName(componentName);components.forEach((function(component){component.listeners.includes(event)&&component.addAction(new _default$5(event,params))}))},componentsListeningForEventThatAreTreeAncestors:function(el,event){for(var parentIds=[],parent=el.parentElement.closest("[wire\\:id]");parent;)parentIds.push(parent.getAttribute("wire:id")),parent=parent.parentElement.closest("[wire\\:id]");return this.components().filter((function(component){return component.listeners.includes(event)&&parentIds.includes(component.id)}))},componentsListeningForEvent:function(event){return this.components().filter((function(component){return component.listeners.includes(event)}))},registerDirective:function(name,callback){this.directives.register(name,callback)},registerHook:function(name,callback){this.hooks.register(name,callback)},callHook:function(name){for(var _this$hooks,_len5=arguments.length,params=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++)params[_key5-1]=arguments[_key5];(_this$hooks=this.hooks).call.apply(_this$hooks,[name].concat(params))},changeComponentId:function(component,newId){var oldId=component.id;component.id=newId,component.fingerprint.id=newId,this.componentsById[newId]=component,delete this.componentsById[oldId],this.components().forEach((function(component){var children=component.serverMemo.children||{};Object.entries(children).forEach((function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],_ref2$=_ref2[1],id=_ref2$.id;_ref2$.tagName,id===oldId&&(children[key].id=newId)}))}))},removeComponent:function(component){component.tearDown(),delete this.componentsById[component.id]},onError:function(callback){this.onErrorCallback=callback},getClosestParentId:function(childId,subsetOfParentIds){var _this3=this,distancesByParentId={};subsetOfParentIds.forEach((function(parentId){var distance=_this3.getDistanceToChild(parentId,childId);distance&&(distancesByParentId[parentId]=distance)}));var closestParentId,smallestDistance=Math.min.apply(Math,_toConsumableArray(Object.values(distancesByParentId)));return Object.entries(distancesByParentId).forEach((function(_ref3){var _ref4=_slicedToArray(_ref3,2),parentId=_ref4[0];_ref4[1]===smallestDistance&&(closestParentId=parentId)})),closestParentId},getDistanceToChild:function(parentId,childId){var distanceMemo=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,parentComponent=this.findComponent(parentId);if(parentComponent){var childIds=parentComponent.childIds;if(childIds.includes(childId))return distanceMemo;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;null===node&&(node=document);var allEls=Array.from(node.querySelectorAll("[wire\\:initial-data]")),onlyChildEls=Array.from(node.querySelectorAll("[wire\\:initial-data] [wire\\:initial-data]"));return allEls.filter((function(el){return!onlyChildEls.includes(el)}))},allModelElementsInside:function(root){return Array.from(root.querySelectorAll("[wire\\:model]"))},getByAttributeAndValue:function(attribute,value){return document.querySelector("[wire\\:".concat(attribute,'="').concat(value,'"]'))},nextFrame:function(fn){var _this=this;requestAnimationFrame((function(){requestAnimationFrame(fn.bind(_this))}))},closestRoot:function(el){return this.closestByAttribute(el,"id")},closestByAttribute:function(el,attribute){var closestEl=el.closest("[wire\\:".concat(attribute,"]"));if(!closestEl)throw"\nLivewire Error:\n\nCannot find parent element in DOM tree containing attribute: [wire:".concat(attribute,"].\n\nUsually this is caused by Livewire's DOM-differ not being able to properly track changes.\n\nReference the following guide for common causes: https://laravel-livewire.com/docs/troubleshooting \n\nReferenced element:\n\n").concat(el.outerHTML,"\n");return closestEl},isComponentRootEl:function(el){return this.hasAttribute(el,"id")},hasAttribute:function(el,attribute){return el.hasAttribute("wire:".concat(attribute))},getAttribute:function(el,attribute){return el.getAttribute("wire:".concat(attribute))},removeAttribute:function(el,attribute){return el.removeAttribute("wire:".concat(attribute))},setAttribute:function(el,attribute,value){return el.setAttribute("wire:".concat(attribute),value)},hasFocus:function(el){return el===document.activeElement},isInput:function(el){return["INPUT","TEXTAREA","SELECT"].includes(el.tagName.toUpperCase())},isTextInput:function(el){return["INPUT","TEXTAREA"].includes(el.tagName.toUpperCase())&&!["checkbox","radio"].includes(el.type)},valueFromInput:function(el,component){if("checkbox"===el.type){var modelName=wireDirectives(el).get("model").value,modelValue=component.deferredActions[modelName]?component.deferredActions[modelName].payload.value:getValue(component.data,modelName);return Array.isArray(modelValue)?this.mergeCheckboxValueIntoArray(el,modelValue):!!el.checked&&(el.getAttribute("value")||!0)}return"SELECT"===el.tagName&&el.multiple?this.getSelectValues(el):el.value},mergeCheckboxValueIntoArray:function(el,arrayValue){return el.checked?arrayValue.includes(el.value)?arrayValue:arrayValue.concat(el.value):arrayValue.filter((function(item){return item!=el.value}))},setInputValueFromModel:function(el,component){var modelString=wireDirectives(el).get("model").value,modelValue=getValue(component.data,modelString);"input"===el.tagName.toLowerCase()&&"file"===el.type||this.setInputValue(el,modelValue)},setInputValue:function(el,value){if(store$2.callHook("interceptWireModelSetValue",value,el),"radio"===el.type)el.checked=el.value==value;else if("checkbox"===el.type)if(Array.isArray(value)){var valueFound=!1;value.forEach((function(val){val==el.value&&(valueFound=!0)})),el.checked=valueFound}else el.checked=!!value;else"SELECT"===el.tagName?this.updateSelect(el,value):(value=void 0===value?"":value,el.value=value)},getSelectValues:function(el){return Array.from(el.options).filter((function(option){return option.selected})).map((function(option){return option.value||option.text}))},updateSelect:function(el,value){var arrayWrappedValue=[].concat(value).map((function(value){return value+""}));Array.from(el.options).forEach((function(option){option.selected=arrayWrappedValue.includes(option.value)}))}},fails=function(exec){try{return!!exec()}catch(error){return!0}},functionBindNative=!fails((function(){var test=function(){}.bind();return"function"!=typeof test||test.hasOwnProperty("prototype")})),FunctionPrototype$2=Function.prototype,call$2=FunctionPrototype$2.call,uncurryThisWithBind=functionBindNative&&FunctionPrototype$2.bind.bind(call$2,call$2),functionUncurryThis=functionBindNative?uncurryThisWithBind:function(fn){return function(){return call$2.apply(fn,arguments)}},ceil=Math.ceil,floor=Math.floor,mathTrunc=Math.trunc||function(x){var n=+x;return(n>0?floor:ceil)(n)},toIntegerOrInfinity=function(argument){var number=+argument;return number!=number||0===number?0:mathTrunc(number)},commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(fn,basedir,module){return module={path:basedir,exports:{},require:function(path,base){return commonjsRequire(path,null==base?module.path:base)}},fn(module,module.exports),module.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var check=function(it){return it&&it.Math==Math&&it},global_1=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),defineProperty$4=Object.defineProperty,defineGlobalProperty=function(key,value){try{defineProperty$4(global_1,key,{value:value,configurable:!0,writable:!0})}catch(error){global_1[key]=value}return value},SHARED="__core-js_shared__",store$1=global_1[SHARED]||defineGlobalProperty(SHARED,{}),sharedStore=store$1,shared=createCommonjsModule((function(module){(module.exports=function(key,value){return sharedStore[key]||(sharedStore[key]=void 0!==value?value:{})})("versions",[]).push({version:"3.27.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),isNullOrUndefined=function(it){return null==it},$TypeError$e=TypeError,requireObjectCoercible=function(it){if(isNullOrUndefined(it))throw $TypeError$e("Can't call method on "+it);return it},$Object$4=Object,toObject=function(argument){return $Object$4(requireObjectCoercible(argument))},hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(it,key){return hasOwnProperty(toObject(it),key)},id=0,postfix=Math.random(),toString$1=functionUncurryThis(1..toString),uid=function(key){return"Symbol("+(void 0===key?"":key)+")_"+toString$1(++id+postfix,36)},documentAll$2="object"==typeof document&&document.all,IS_HTMLDDA=void 0===documentAll$2&&void 0!==documentAll$2,documentAll_1={all:documentAll$2,IS_HTMLDDA:IS_HTMLDDA},documentAll$1=documentAll_1.all,isCallable=documentAll_1.IS_HTMLDDA?function(argument){return"function"==typeof argument||argument===documentAll$1}:function(argument){return"function"==typeof argument},aFunction=function(argument){return isCallable(argument)?argument:void 0},getBuiltIn=function(namespace,method){return arguments.length<2?aFunction(global_1[namespace]):global_1[namespace]&&global_1[namespace][method]},engineUserAgent=getBuiltIn("navigator","userAgent")||"",process$3=global_1.process,Deno$1=global_1.Deno,versions=process$3&&process$3.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,match,version;v8&&(match=v8.split("."),version=match[0]>0&&match[0]<4?1:+(match[0]+match[1])),!version&&engineUserAgent&&(match=engineUserAgent.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=+match[1])));var engineV8Version=version,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails((function(){var symbol=Symbol();return!String(symbol)||!(Object(symbol)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=symbolConstructorDetection&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,WellKnownSymbolsStore=shared("wks"),Symbol$1=global_1.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(name){if(!hasOwnProperty_1(WellKnownSymbolsStore,name)||!symbolConstructorDetection&&"string"!=typeof WellKnownSymbolsStore[name]){var description="Symbol."+name;symbolConstructorDetection&&hasOwnProperty_1(Symbol$1,name)?WellKnownSymbolsStore[name]=Symbol$1[name]:WellKnownSymbolsStore[name]=useSymbolAsUid&&symbolFor?symbolFor(description):createWellKnownSymbol(description)}return WellKnownSymbolsStore[name]},TO_STRING_TAG$4=wellKnownSymbol("toStringTag"),test={};test[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test),toString=functionUncurryThis({}.toString),stringSlice$2=functionUncurryThis("".slice),classofRaw=function(it){return stringSlice$2(toString(it),8,-1)},TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),$Object$3=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(it,key){try{return it[key]}catch(error){}},classof=toStringTagSupport?classofRaw:function(it){var O,tag,result;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(tag=tryGet(O=$Object$3(it),TO_STRING_TAG$3))?tag:CORRECT_ARGUMENTS?classofRaw(O):"Object"==(result=classofRaw(O))&&isCallable(O.callee)?"Arguments":result},$String$3=String,toString_1=function(argument){if("Symbol"===classof(argument))throw TypeError("Cannot convert a Symbol value to a string");return $String$3(argument)},charAt$1=functionUncurryThis("".charAt),charCodeAt=functionUncurryThis("".charCodeAt),stringSlice$1=functionUncurryThis("".slice),createMethod$3=function(CONVERT_TO_STRING){return function($this,pos){var first,second,S=toString_1(requireObjectCoercible($this)),position=toIntegerOrInfinity(pos),size=S.length;return position<0||position>=size?CONVERT_TO_STRING?"":void 0:(first=charCodeAt(S,position))<55296||first>56319||position+1===size||(second=charCodeAt(S,position+1))<56320||second>57343?CONVERT_TO_STRING?charAt$1(S,position):first:CONVERT_TO_STRING?stringSlice$1(S,position,position+2):second-56320+(first-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},WeakMap$1=global_1.WeakMap,weakMapBasicDetection=isCallable(WeakMap$1)&&/native code/.test(String(WeakMap$1)),documentAll=documentAll_1.all,isObject=documentAll_1.IS_HTMLDDA?function(it){return"object"==typeof it?null!==it:isCallable(it)||it===documentAll}:function(it){return"object"==typeof it?null!==it:isCallable(it)},descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),document$3=global_1.document,EXISTS$1=isObject(document$3)&&isObject(document$3.createElement),documentCreateElement=function(it){return EXISTS$1?document$3.createElement(it):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),v8PrototypeDefineBug=descriptors&&fails((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$String$2=String,$TypeError$d=TypeError,anObject=function(argument){if(isObject(argument))return argument;throw $TypeError$d($String$2(argument)+" is not an object")},call$1=Function.prototype.call,functionCall=functionBindNative?call$1.bind(call$1):function(){return call$1.apply(call$1,arguments)},objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),$Object$2=Object,isSymbol=useSymbolAsUid?function(it){return"symbol"==typeof it}:function(it){var $Symbol=getBuiltIn("Symbol");return isCallable($Symbol)&&objectIsPrototypeOf($Symbol.prototype,$Object$2(it))},$String$1=String,tryToString=function(argument){try{return $String$1(argument)}catch(error){return"Object"}},$TypeError$c=TypeError,aCallable=function(argument){if(isCallable(argument))return argument;throw $TypeError$c(tryToString(argument)+" is not a function")},getMethod=function(V,P){var func=V[P];return isNullOrUndefined(func)?void 0:aCallable(func)},$TypeError$b=TypeError,ordinaryToPrimitive=function(input,pref){var fn,val;if("string"===pref&&isCallable(fn=input.toString)&&!isObject(val=functionCall(fn,input)))return val;if(isCallable(fn=input.valueOf)&&!isObject(val=functionCall(fn,input)))return val;if("string"!==pref&&isCallable(fn=input.toString)&&!isObject(val=functionCall(fn,input)))return val;throw $TypeError$b("Can't convert object to primitive value")},$TypeError$a=TypeError,TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),toPrimitive=function(input,pref){if(!isObject(input)||isSymbol(input))return input;var result,exoticToPrim=getMethod(input,TO_PRIMITIVE);if(exoticToPrim){if(void 0===pref&&(pref="default"),result=functionCall(exoticToPrim,input,pref),!isObject(result)||isSymbol(result))return result;throw $TypeError$a("Can't convert object to primitive value")}return void 0===pref&&(pref="number"),ordinaryToPrimitive(input,pref)},toPropertyKey=function(argument){var key=toPrimitive(argument,"string");return isSymbol(key)?key:key+""},$TypeError$9=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",f$6=descriptors?v8PrototypeDefineBug?function(O,P,Attributes){if(anObject(O),P=toPropertyKey(P),anObject(Attributes),"function"==typeof O&&"prototype"===P&&"value"in Attributes&&WRITABLE in Attributes&&!Attributes[WRITABLE]){var current=$getOwnPropertyDescriptor$1(O,P);current&¤t[WRITABLE]&&(O[P]=Attributes.value,Attributes={configurable:CONFIGURABLE$1 in Attributes?Attributes[CONFIGURABLE$1]:current[CONFIGURABLE$1],enumerable:ENUMERABLE in Attributes?Attributes[ENUMERABLE]:current[ENUMERABLE],writable:!1})}return $defineProperty(O,P,Attributes)}:$defineProperty:function(O,P,Attributes){if(anObject(O),P=toPropertyKey(P),anObject(Attributes),ie8DomDefine)try{return $defineProperty(O,P,Attributes)}catch(error){}if("get"in Attributes||"set"in Attributes)throw $TypeError$9("Accessors not supported");return"value"in Attributes&&(O[P]=Attributes.value),O},objectDefineProperty={f:f$6},createPropertyDescriptor=function(bitmap,value){return{enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}},createNonEnumerableProperty=descriptors?function(object,key,value){return objectDefineProperty.f(object,key,createPropertyDescriptor(1,value))}:function(object,key,value){return object[key]=value,object},keys=shared("keys"),sharedKey=function(key){return keys[key]||(keys[key]=uid(key))},hiddenKeys$1={},OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$2=global_1.TypeError,WeakMap=global_1.WeakMap,set$1,get,has,enforce=function(it){return has(it)?get(it):set$1(it,{})},getterFor=function(TYPE){return function(it){var state;if(!isObject(it)||(state=get(it)).type!==TYPE)throw TypeError$2("Incompatible receiver, "+TYPE+" required");return state}};if(weakMapBasicDetection||sharedStore.state){var store=sharedStore.state||(sharedStore.state=new WeakMap);store.get=store.get,store.has=store.has,store.set=store.set,set$1=function(it,metadata){if(store.has(it))throw TypeError$2(OBJECT_ALREADY_INITIALIZED);return metadata.facade=it,store.set(it,metadata),metadata},get=function(it){return store.get(it)||{}},has=function(it){return store.has(it)}}else{var STATE=sharedKey("state");hiddenKeys$1[STATE]=!0,set$1=function(it,metadata){if(hasOwnProperty_1(it,STATE))throw TypeError$2(OBJECT_ALREADY_INITIALIZED);return metadata.facade=it,createNonEnumerableProperty(it,STATE,metadata),metadata},get=function(it){return hasOwnProperty_1(it,STATE)?it[STATE]:{}},has=function(it){return hasOwnProperty_1(it,STATE)}}var internalState={set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor},$propertyIsEnumerable$1={}.propertyIsEnumerable,getOwnPropertyDescriptor$3=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$3&&!$propertyIsEnumerable$1.call({1:2},1),f$5=NASHORN_BUG?function(V){var descriptor=getOwnPropertyDescriptor$3(this,V);return!!descriptor&&descriptor.enumerable}:$propertyIsEnumerable$1,objectPropertyIsEnumerable={f:f$5},$Object$1=Object,split=functionUncurryThis("".split),indexedObject=fails((function(){return!$Object$1("z").propertyIsEnumerable(0)}))?function(it){return"String"==classofRaw(it)?split(it,""):$Object$1(it)}:$Object$1,toIndexedObject=function(it){return indexedObject(requireObjectCoercible(it))},$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$4=descriptors?$getOwnPropertyDescriptor:function(O,P){if(O=toIndexedObject(O),P=toPropertyKey(P),ie8DomDefine)try{return $getOwnPropertyDescriptor(O,P)}catch(error){}if(hasOwnProperty_1(O,P))return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f,O,P),O[P])},objectGetOwnPropertyDescriptor={f:f$4},FunctionPrototype$1=Function.prototype,getDescriptor=descriptors&&Object.getOwnPropertyDescriptor,EXISTS=hasOwnProperty_1(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!descriptors||descriptors&&getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},functionToString=functionUncurryThis(Function.toString);isCallable(sharedStore.inspectSource)||(sharedStore.inspectSource=function(it){return functionToString(it)});var inspectSource=sharedStore.inspectSource,makeBuiltIn_1=createCommonjsModule((function(module){var CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,enforceInternalState=internalState.enforce,getInternalState=internalState.get,defineProperty=Object.defineProperty,CONFIGURABLE_LENGTH=descriptors&&!fails((function(){return 8!==defineProperty((function(){}),"length",{value:8}).length})),TEMPLATE=String(String).split("String"),makeBuiltIn=module.exports=function(value,name,options){"Symbol("===String(name).slice(0,7)&&(name="["+String(name).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),options&&options.getter&&(name="get "+name),options&&options.setter&&(name="set "+name),(!hasOwnProperty_1(value,"name")||CONFIGURABLE_FUNCTION_NAME&&value.name!==name)&&(descriptors?defineProperty(value,"name",{value:name,configurable:!0}):value.name=name),CONFIGURABLE_LENGTH&&options&&hasOwnProperty_1(options,"arity")&&value.length!==options.arity&&defineProperty(value,"length",{value:options.arity});try{options&&hasOwnProperty_1(options,"constructor")&&options.constructor?descriptors&&defineProperty(value,"prototype",{writable:!1}):value.prototype&&(value.prototype=void 0)}catch(error){}var state=enforceInternalState(value);return hasOwnProperty_1(state,"source")||(state.source=TEMPLATE.join("string"==typeof name?name:"")),value};Function.prototype.toString=makeBuiltIn((function(){return isCallable(this)&&getInternalState(this).source||inspectSource(this)}),"toString")})),defineBuiltIn=function(O,key,value,options){options||(options={});var simple=options.enumerable,name=void 0!==options.name?options.name:key;if(isCallable(value)&&makeBuiltIn_1(value,name,options),options.global)simple?O[key]=value:defineGlobalProperty(key,value);else{try{options.unsafe?O[key]&&(simple=!0):delete O[key]}catch(error){}simple?O[key]=value:objectDefineProperty.f(O,key,{value:value,enumerable:!1,configurable:!options.nonConfigurable,writable:!options.nonWritable})}return O},max=Math.max,min$2=Math.min,toAbsoluteIndex=function(index,length){var integer=toIntegerOrInfinity(index);return integer<0?max(integer+length,0):min$2(integer,length)},min$1=Math.min,toLength=function(argument){return argument>0?min$1(toIntegerOrInfinity(argument),9007199254740991):0},lengthOfArrayLike=function(obj){return toLength(obj.length)},createMethod$2=function(IS_INCLUDES){return function($this,el,fromIndex){var value,O=toIndexedObject($this),length=lengthOfArrayLike(O),index=toAbsoluteIndex(fromIndex,length);if(IS_INCLUDES&&el!=el){for(;length>index;)if((value=O[index++])!=value)return!0}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}},arrayIncludes={includes:createMethod$2(!0),indexOf:createMethod$2(!1)},indexOf=arrayIncludes.indexOf,push$3=functionUncurryThis([].push),objectKeysInternal=function(object,names){var key,O=toIndexedObject(object),i=0,result=[];for(key in O)!hasOwnProperty_1(hiddenKeys$1,key)&&hasOwnProperty_1(O,key)&&push$3(result,key);for(;names.length>i;)hasOwnProperty_1(O,key=names[i++])&&(~indexOf(result,key)||push$3(result,key));return result},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys=enumBugKeys.concat("length","prototype"),f$3=Object.getOwnPropertyNames||function(O){return objectKeysInternal(O,hiddenKeys)},objectGetOwnPropertyNames={f:f$3},f$2=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$2},concat$1=functionUncurryThis([].concat),ownKeys=getBuiltIn("Reflect","ownKeys")||function(it){var keys=objectGetOwnPropertyNames.f(anObject(it)),getOwnPropertySymbols=objectGetOwnPropertySymbols.f;return getOwnPropertySymbols?concat$1(keys,getOwnPropertySymbols(it)):keys},copyConstructorProperties=function(target,source,exceptions){for(var keys=ownKeys(source),defineProperty=objectDefineProperty.f,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,i=0;iindex;)objectDefineProperty.f(O,key=keys[index++],props[key]);return O},objectDefineProperties={f:f$1},html=getBuiltIn("document","documentElement"),GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(content){return LT+SCRIPT+GT+content+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(activeXDocument){activeXDocument.write(scriptTag("")),activeXDocument.close();var temp=activeXDocument.parentWindow.Object;return activeXDocument=null,temp},NullProtoObjectViaIFrame=function(){var iframeDocument,iframe=documentCreateElement("iframe"),JS="java"+SCRIPT+":";return iframe.style.display="none",html.appendChild(iframe),iframe.src=String(JS),(iframeDocument=iframe.contentWindow.document).open(),iframeDocument.write(scriptTag("document.F=Object")),iframeDocument.close(),iframeDocument.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(error){}NullProtoObject="undefined"!=typeof document?document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame():NullProtoObjectViaActiveX(activeXDocument);for(var length=enumBugKeys.length;length--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];return NullProtoObject()};hiddenKeys$1[IE_PROTO$1]=!0;var objectCreate=Object.create||function(O,Properties){var result;return null!==O?(EmptyConstructor[PROTOTYPE]=anObject(O),result=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,result[IE_PROTO$1]=O):result=NullProtoObject(),void 0===Properties?result:objectDefineProperties.f(result,Properties)},correctPrototypeGetter=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),IE_PROTO=sharedKey("IE_PROTO"),$Object=Object,ObjectPrototype=$Object.prototype,objectGetPrototypeOf=correctPrototypeGetter?$Object.getPrototypeOf:function(O){var object=toObject(O);if(hasOwnProperty_1(object,IE_PROTO))return object[IE_PROTO];var constructor=object.constructor;return isCallable(constructor)&&object instanceof constructor?constructor.prototype:object instanceof $Object?ObjectPrototype:null},ITERATOR$5=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=!isObject(IteratorPrototype$2)||fails((function(){var test={};return IteratorPrototype$2[ITERATOR$5].call(test)!==test}));NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={}),isCallable(IteratorPrototype$2[ITERATOR$5])||defineBuiltIn(IteratorPrototype$2,ITERATOR$5,(function(){return this}));var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},defineProperty$3=objectDefineProperty.f,TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),setToStringTag=function(target,TAG,STATIC){target&&!STATIC&&(target=target.prototype),target&&!hasOwnProperty_1(target,TO_STRING_TAG$2)&&defineProperty$3(target,TO_STRING_TAG$2,{configurable:!0,value:TAG})},iterators={},IteratorPrototype$1=iteratorsCore.IteratorPrototype,returnThis$1=function(){return this},iteratorCreateConstructor=function(IteratorConstructor,NAME,next,ENUMERABLE_NEXT){var TO_STRING_TAG=NAME+" Iterator";return IteratorConstructor.prototype=objectCreate(IteratorPrototype$1,{next:createPropertyDescriptor(+!ENUMERABLE_NEXT,next)}),setToStringTag(IteratorConstructor,TO_STRING_TAG,!1),iterators[TO_STRING_TAG]=returnThis$1,IteratorConstructor},$String=String,$TypeError$8=TypeError,aPossiblePrototype=function(argument){if("object"==typeof argument||isCallable(argument))return argument;throw $TypeError$8("Can't set "+$String(argument)+" as a prototype")},objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var setter,CORRECT_SETTER=!1,test={};try{(setter=functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(test,[]),CORRECT_SETTER=test instanceof Array}catch(error){}return function(O,proto){return anObject(O),aPossiblePrototype(proto),CORRECT_SETTER?setter(O,proto):O.__proto__=proto,O}}():void 0),PROPER_FUNCTION_NAME=functionName.PROPER,CONFIGURABLE_FUNCTION_NAME=functionName.CONFIGURABLE,IteratorPrototype=iteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=iteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},iteratorDefine=function(Iterable,NAME,IteratorConstructor,next,DEFAULT,IS_SET,FORCED){iteratorCreateConstructor(IteratorConstructor,NAME,next);var CurrentIteratorPrototype,methods,KEY,getIterationMethod=function(KIND){if(KIND===DEFAULT&&defaultIterator)return defaultIterator;if(!BUGGY_SAFARI_ITERATORS&&KIND in IterablePrototype)return IterablePrototype[KIND];switch(KIND){case KEYS:case VALUES:case ENTRIES:return function(){return new IteratorConstructor(this,KIND)}}return function(){return new IteratorConstructor(this)}},TO_STRING_TAG=NAME+" Iterator",INCORRECT_VALUES_NAME=!1,IterablePrototype=Iterable.prototype,nativeIterator=IterablePrototype[ITERATOR$4]||IterablePrototype["@@iterator"]||DEFAULT&&IterablePrototype[DEFAULT],defaultIterator=!BUGGY_SAFARI_ITERATORS&&nativeIterator||getIterationMethod(DEFAULT),anyNativeIterator="Array"==NAME&&IterablePrototype.entries||nativeIterator;if(anyNativeIterator&&(CurrentIteratorPrototype=objectGetPrototypeOf(anyNativeIterator.call(new Iterable)))!==Object.prototype&&CurrentIteratorPrototype.next&&(objectGetPrototypeOf(CurrentIteratorPrototype)!==IteratorPrototype&&(objectSetPrototypeOf?objectSetPrototypeOf(CurrentIteratorPrototype,IteratorPrototype):isCallable(CurrentIteratorPrototype[ITERATOR$4])||defineBuiltIn(CurrentIteratorPrototype,ITERATOR$4,returnThis)),setToStringTag(CurrentIteratorPrototype,TO_STRING_TAG,!0)),PROPER_FUNCTION_NAME&&DEFAULT==VALUES&&nativeIterator&&nativeIterator.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty(IterablePrototype,"name",VALUES):(INCORRECT_VALUES_NAME=!0,defaultIterator=function(){return functionCall(nativeIterator,this)})),DEFAULT)if(methods={values:getIterationMethod(VALUES),keys:IS_SET?defaultIterator:getIterationMethod(KEYS),entries:getIterationMethod(ENTRIES)},FORCED)for(KEY in methods)(BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME||!(KEY in IterablePrototype))&&defineBuiltIn(IterablePrototype,KEY,methods[KEY]);else _export({target:NAME,proto:!0,forced:BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME},methods);return IterablePrototype[ITERATOR$4]!==defaultIterator&&defineBuiltIn(IterablePrototype,ITERATOR$4,defaultIterator,{name:DEFAULT}),iterators[NAME]=defaultIterator,methods},createIterResultObject=function(value,done){return{value:value,done:done}},charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState$1=internalState.getterFor(STRING_ITERATOR);iteratorDefine(String,"String",(function(iterated){setInternalState$2(this,{type:STRING_ITERATOR,string:toString_1(iterated),index:0})}),(function(){var point,state=getInternalState$1(this),string=state.string,index=state.index;return index>=string.length?createIterResultObject(void 0,!0):(point=charAt(string,index),state.index+=point.length,createIterResultObject(point,!1))}));var functionUncurryThisClause=function(fn){if("Function"===classofRaw(fn))return functionUncurryThis(fn)},bind$1=functionUncurryThisClause(functionUncurryThisClause.bind),functionBindContext=function(fn,that){return aCallable(fn),void 0===that?fn:functionBindNative?bind$1(fn,that):function(){return fn.apply(that,arguments)}},iteratorClose=function(iterator,kind,value){var innerResult,innerError;anObject(iterator);try{if(!(innerResult=getMethod(iterator,"return"))){if("throw"===kind)throw value;return value}innerResult=functionCall(innerResult,iterator)}catch(error){innerError=!0,innerResult=error}if("throw"===kind)throw value;if(innerError)throw innerResult;return anObject(innerResult),value},callWithSafeIterationClosing=function(iterator,fn,value,ENTRIES){try{return ENTRIES?fn(anObject(value)[0],value[1]):fn(value)}catch(error){iteratorClose(iterator,"throw",error)}},ITERATOR$3=wellKnownSymbol("iterator"),ArrayPrototype$1=Array.prototype,isArrayIteratorMethod=function(it){return void 0!==it&&(iterators.Array===it||ArrayPrototype$1[ITERATOR$3]===it)},noop$1=function(){},empty=[],construct=getBuiltIn("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=functionUncurryThis(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop$1),isConstructorModern=function(argument){if(!isCallable(argument))return!1;try{return construct(noop$1,empty,argument),!0}catch(error){return!1}},isConstructorLegacy=function(argument){if(!isCallable(argument))return!1;switch(classof(argument)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource(argument))}catch(error){return!0}};isConstructorLegacy.sham=!0;var isConstructor=!construct||fails((function(){var called;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern((function(){called=!0}))||called}))?isConstructorLegacy:isConstructorModern,createProperty=function(object,key,value){var propertyKey=toPropertyKey(key);propertyKey in object?objectDefineProperty.f(object,propertyKey,createPropertyDescriptor(0,value)):object[propertyKey]=value},ITERATOR$2=wellKnownSymbol("iterator"),getIteratorMethod=function(it){if(!isNullOrUndefined(it))return getMethod(it,ITERATOR$2)||getMethod(it,"@@iterator")||iterators[classof(it)]},$TypeError$7=TypeError,getIterator=function(argument,usingIterator){var iteratorMethod=arguments.length<2?getIteratorMethod(argument):usingIterator;if(aCallable(iteratorMethod))return anObject(functionCall(iteratorMethod,argument));throw $TypeError$7(tryToString(argument)+" is not iterable")},$Array$1=Array,arrayFrom=function(arrayLike){var O=toObject(arrayLike),IS_CONSTRUCTOR=isConstructor(this),argumentsLength=arguments.length,mapfn=argumentsLength>1?arguments[1]:void 0,mapping=void 0!==mapfn;mapping&&(mapfn=functionBindContext(mapfn,argumentsLength>2?arguments[2]:void 0));var length,result,step,iterator,next,value,iteratorMethod=getIteratorMethod(O),index=0;if(!iteratorMethod||this===$Array$1&&isArrayIteratorMethod(iteratorMethod))for(length=lengthOfArrayLike(O),result=IS_CONSTRUCTOR?new this(length):$Array$1(length);length>index;index++)value=mapping?mapfn(O[index],index):O[index],createProperty(result,index,value);else for(next=(iterator=getIterator(O,iteratorMethod)).next,result=IS_CONSTRUCTOR?new this:[];!(step=functionCall(next,iterator)).done;index++)value=mapping?callWithSafeIterationClosing(iterator,mapfn,[step.value,index],!0):step.value,createProperty(result,index,value);return result.length=index,result},ITERATOR$1=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$1]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(error){}var checkCorrectnessOfIteration=function(exec,SKIP_CLOSING){if(!SKIP_CLOSING&&!SAFE_CLOSING)return!1;var ITERATION_SUPPORT=!1;try{var object={};object[ITERATOR$1]=function(){return{next:function(){return{done:ITERATION_SUPPORT=!0}}}},exec(object)}catch(error){}return ITERATION_SUPPORT},INCORRECT_ITERATION=!checkCorrectnessOfIteration((function(iterable){Array.from(iterable)}));_export({target:"Array",stat:!0,forced:INCORRECT_ITERATION},{from:arrayFrom});var path=global_1;path.Array.from;var defineProperty$2=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;null==ArrayPrototype[UNSCOPABLES]&&defineProperty$2(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:objectCreate(null)});var addToUnscopables=function(key){ArrayPrototype[UNSCOPABLES][key]=!0},$includes=arrayIncludes.includes,BROKEN_ON_SPARSE=fails((function(){return!Array(1).includes()}));_export({target:"Array",proto:!0,forced:BROKEN_ON_SPARSE},{includes:function(el){return $includes(this,el,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("includes");var entryUnbind=function(CONSTRUCTOR,METHOD){return functionUncurryThis(global_1[CONSTRUCTOR].prototype[METHOD])};entryUnbind("Array","includes");var isArray=Array.isArray||function(argument){return"Array"==classofRaw(argument)},$TypeError$6=TypeError,MAX_SAFE_INTEGER=9007199254740991,doesNotExceedSafeInteger=function(it){if(it>MAX_SAFE_INTEGER)throw $TypeError$6("Maximum allowed index exceeded");return it},flattenIntoArray=function(target,original,source,sourceLen,start,depth,mapper,thisArg){for(var element,elementLen,targetIndex=start,sourceIndex=0,mapFn=!!mapper&&functionBindContext(mapper,thisArg);sourceIndex0&&isArray(element)?(elementLen=lengthOfArrayLike(element),targetIndex=flattenIntoArray(target,original,element,elementLen,targetIndex,depth-1)-1):(doesNotExceedSafeInteger(targetIndex+1),target[targetIndex]=element),targetIndex++),sourceIndex++;return targetIndex},flattenIntoArray_1=flattenIntoArray,SPECIES$3=wellKnownSymbol("species"),$Array=Array,arraySpeciesConstructor=function(originalArray){var C;return isArray(originalArray)&&(C=originalArray.constructor,(isConstructor(C)&&(C===$Array||isArray(C.prototype))||isObject(C)&&null===(C=C[SPECIES$3]))&&(C=void 0)),void 0===C?$Array:C},arraySpeciesCreate=function(originalArray,length){return new(arraySpeciesConstructor(originalArray))(0===length?0:length)};_export({target:"Array",proto:!0},{flat:function(){var depthArg=arguments.length?arguments[0]:void 0,O=toObject(this),sourceLen=lengthOfArrayLike(O),A=arraySpeciesCreate(O,0);return A.length=flattenIntoArray_1(A,O,O,sourceLen,0,void 0===depthArg?1:toIntegerOrInfinity(depthArg)),A}}),addToUnscopables("flat"),entryUnbind("Array","flat");var push$2=functionUncurryThis([].push),createMethod$1=function(TYPE){var IS_MAP=1==TYPE,IS_FILTER=2==TYPE,IS_SOME=3==TYPE,IS_EVERY=4==TYPE,IS_FIND_INDEX=6==TYPE,IS_FILTER_REJECT=7==TYPE,NO_HOLES=5==TYPE||IS_FIND_INDEX;return function($this,callbackfn,that,specificCreate){for(var value,result,O=toObject($this),self=indexedObject(O),boundFunction=functionBindContext(callbackfn,that),length=lengthOfArrayLike(self),index=0,create=specificCreate||arraySpeciesCreate,target=IS_MAP?create($this,length):IS_FILTER||IS_FILTER_REJECT?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(result=boundFunction(value=self[index],index,O),TYPE))if(IS_MAP)target[index]=result;else if(result)switch(TYPE){case 3:return!0;case 5:return value;case 6:return index;case 2:push$2(target,value)}else switch(TYPE){case 4:return!1;case 7:push$2(target,value)}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:target}},arrayIteration={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6),filterReject:createMethod$1(7)},$find=arrayIteration.find,FIND="find",SKIPS_HOLES=!0;FIND in[]&&Array(1)[FIND]((function(){SKIPS_HOLES=!1})),_export({target:"Array",proto:!0,forced:SKIPS_HOLES},{find:function(callbackfn){return $find(this,callbackfn,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables(FIND),entryUnbind("Array","find");var $assign=Object.assign,defineProperty$1=Object.defineProperty,concat=functionUncurryThis([].concat),objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty$1({},"a",{enumerable:!0,get:function(){defineProperty$1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var A={},B={},symbol=Symbol();return A[symbol]=7,"abcdefghijklmnopqrst".split("").forEach((function(chr){B[chr]=chr})),7!=$assign({},A)[symbol]||"abcdefghijklmnopqrst"!=objectKeys($assign({},B)).join("")}))?function(target,source){for(var T=toObject(target),argumentsLength=arguments.length,index=1,getOwnPropertySymbols=objectGetOwnPropertySymbols.f,propertyIsEnumerable=objectPropertyIsEnumerable.f;argumentsLength>index;)for(var key,S=indexedObject(arguments[index++]),keys=getOwnPropertySymbols?concat(objectKeys(S),getOwnPropertySymbols(S)):objectKeys(S),length=keys.length,j=0;length>j;)key=keys[j++],descriptors&&!functionCall(propertyIsEnumerable,S,key)||(T[key]=S[key]);return T}:$assign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==objectAssign},{assign:objectAssign}),path.Object.assign;var $propertyIsEnumerable=objectPropertyIsEnumerable.f,propertyIsEnumerable=functionUncurryThis($propertyIsEnumerable),push$1=functionUncurryThis([].push),createMethod=function(TO_ENTRIES){return function(it){for(var key,O=toIndexedObject(it),keys=objectKeys(O),length=keys.length,i=0,result=[];length>i;)key=keys[i++],descriptors&&!propertyIsEnumerable(O,key)||push$1(result,TO_ENTRIES?[key,O[key]]:O[key]);return result}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$entries=objectToArray.entries;_export({target:"Object",stat:!0},{entries:function(O){return $entries(O)}}),path.Object.entries;var $values=objectToArray.values;_export({target:"Object",stat:!0},{values:function(O){return $values(O)}}),path.Object.values;var $Error$1=Error,replace=functionUncurryThis("".replace),TEST=String($Error$1("zxcasd").stack),V8_OR_CHAKRA_STACK_ENTRY=/\n\s*at [^:]*:[^\n]*/,IS_V8_OR_CHAKRA_STACK=V8_OR_CHAKRA_STACK_ENTRY.test(TEST),errorStackClear=function(stack,dropEntries){if(IS_V8_OR_CHAKRA_STACK&&"string"==typeof stack&&!$Error$1.prepareStackTrace)for(;dropEntries--;)stack=replace(stack,V8_OR_CHAKRA_STACK_ENTRY,"");return stack},installErrorCause=function(O,options){isObject(options)&&"cause"in options&&createNonEnumerableProperty(O,"cause",options.cause)},$TypeError$5=TypeError,Result=function(stopped,result){this.stopped=stopped,this.result=result},ResultPrototype=Result.prototype,iterate=function(iterable,unboundFunction,options){var iterator,iterFn,index,length,result,next,step,that=options&&options.that,AS_ENTRIES=!(!options||!options.AS_ENTRIES),IS_RECORD=!(!options||!options.IS_RECORD),IS_ITERATOR=!(!options||!options.IS_ITERATOR),INTERRUPTED=!(!options||!options.INTERRUPTED),fn=functionBindContext(unboundFunction,that),stop=function(condition){return iterator&&iteratorClose(iterator,"normal",condition),new Result(!0,condition)},callFn=function(value){return AS_ENTRIES?(anObject(value),INTERRUPTED?fn(value[0],value[1],stop):fn(value[0],value[1])):INTERRUPTED?fn(value,stop):fn(value)};if(IS_RECORD)iterator=iterable.iterator;else if(IS_ITERATOR)iterator=iterable;else{if(!(iterFn=getIteratorMethod(iterable)))throw $TypeError$5(tryToString(iterable)+" is not iterable");if(isArrayIteratorMethod(iterFn)){for(index=0,length=lengthOfArrayLike(iterable);length>index;index++)if((result=callFn(iterable[index]))&&objectIsPrototypeOf(ResultPrototype,result))return result;return new Result(!1)}iterator=getIterator(iterable,iterFn)}for(next=IS_RECORD?iterable.next:iterator.next;!(step=functionCall(next,iterator)).done;){try{result=callFn(step.value)}catch(error){iteratorClose(iterator,"throw",error)}if("object"==typeof result&&result&&objectIsPrototypeOf(ResultPrototype,result))return result}return new Result(!1)},normalizeStringArgument=function(argument,$default){return void 0===argument?arguments.length<2?"":$default:toString_1(argument)},errorStackInstallable=!fails((function(){var error=Error("a");return!("stack"in error)||(Object.defineProperty(error,"stack",createPropertyDescriptor(1,7)),7!==error.stack)})),TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),$Error=Error,push=[].push,$AggregateError=function(errors,message){var that,options=arguments.length>2?arguments[2]:void 0,isInstance=objectIsPrototypeOf(AggregateErrorPrototype,this);objectSetPrototypeOf?that=objectSetPrototypeOf($Error(),isInstance?objectGetPrototypeOf(this):AggregateErrorPrototype):(that=isInstance?this:objectCreate(AggregateErrorPrototype),createNonEnumerableProperty(that,TO_STRING_TAG$1,"Error")),void 0!==message&&createNonEnumerableProperty(that,"message",normalizeStringArgument(message)),errorStackInstallable&&createNonEnumerableProperty(that,"stack",errorStackClear(that.stack,1)),installErrorCause(that,options);var errorsArray=[];return iterate(errors,push,{that:errorsArray}),createNonEnumerableProperty(that,"errors",errorsArray),that};objectSetPrototypeOf?objectSetPrototypeOf($AggregateError,$Error):copyConstructorProperties($AggregateError,$Error,{name:!0});var AggregateErrorPrototype=$AggregateError.prototype=objectCreate($Error.prototype,{constructor:createPropertyDescriptor(1,$AggregateError),message:createPropertyDescriptor(1,""),name:createPropertyDescriptor(1,"AggregateError")});_export({global:!0,constructor:!0,arity:2},{AggregateError:$AggregateError});var defineProperty=objectDefineProperty.f,ARRAY_ITERATOR="Array Iterator",setInternalState$1=internalState.set,getInternalState=internalState.getterFor(ARRAY_ITERATOR),es_array_iterator=iteratorDefine(Array,"Array",(function(iterated,kind){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(iterated),index:0,kind:kind})}),(function(){var state=getInternalState(this),target=state.target,kind=state.kind,index=state.index++;return!target||index>=target.length?(state.target=void 0,createIterResultObject(void 0,!0)):createIterResultObject("keys"==kind?index:"values"==kind?target[index]:[index,target[index]],!1)}),"values"),values=iterators.Arguments=iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),descriptors&&"values"!==values.name)try{defineProperty(values,"name",{value:"values"})}catch(error){}var objectToString=toStringTagSupport?{}.toString:function(){return"[object "+classof(this)+"]"};toStringTagSupport||defineBuiltIn(Object.prototype,"toString",objectToString,{unsafe:!0});var engineIsNode="process"==classofRaw(global_1.process),SPECIES$2=wellKnownSymbol("species"),setSpecies=function(CONSTRUCTOR_NAME){var Constructor=getBuiltIn(CONSTRUCTOR_NAME),defineProperty=objectDefineProperty.f;descriptors&&Constructor&&!Constructor[SPECIES$2]&&defineProperty(Constructor,SPECIES$2,{configurable:!0,get:function(){return this}})},$TypeError$4=TypeError,anInstance=function(it,Prototype){if(objectIsPrototypeOf(Prototype,it))return it;throw $TypeError$4("Incorrect invocation")},$TypeError$3=TypeError,aConstructor=function(argument){if(isConstructor(argument))return argument;throw $TypeError$3(tryToString(argument)+" is not a constructor")},SPECIES$1=wellKnownSymbol("species"),speciesConstructor=function(O,defaultConstructor){var S,C=anObject(O).constructor;return void 0===C||isNullOrUndefined(S=anObject(C)[SPECIES$1])?defaultConstructor:aConstructor(S)},FunctionPrototype=Function.prototype,apply=FunctionPrototype.apply,call=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(functionBindNative?call.bind(apply):function(){return call.apply(apply,arguments)}),arraySlice=functionUncurryThis([].slice),$TypeError$2=TypeError,validateArgumentsLength=function(passed,required){if(passed1?arguments[1]:void 0,that.length)),search=toString_1(searchString);return nativeStartsWith?nativeStartsWith(that,search,index):stringSlice(that,index,index+search.length)===search}}),entryUnbind("String","startsWith");var global$1="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==global$1&&global$1,support={searchParams:"URLSearchParams"in global$1,iterable:"Symbol"in global$1&&"iterator"in Symbol,blob:"FileReader"in global$1&&"Blob"in global$1&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in global$1,arrayBuffer:"ArrayBuffer"in global$1};function isDataView(obj){return obj&&DataView.prototype.isPrototypeOf(obj)}if(support.arrayBuffer)var viewClasses=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],isArrayBufferView=ArrayBuffer.isView||function(obj){return obj&&viewClasses.indexOf(Object.prototype.toString.call(obj))>-1};function normalizeName(name){if("string"!=typeof name&&(name=String(name)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name)||""===name)throw new TypeError('Invalid character in header field name: "'+name+'"');return name.toLowerCase()}function normalizeValue(value){return"string"!=typeof value&&(value=String(value)),value}function iteratorFor(items){var iterator={next:function(){var value=items.shift();return{done:void 0===value,value:value}}};return support.iterable&&(iterator[Symbol.iterator]=function(){return iterator}),iterator}function Headers(headers){this.map={},headers instanceof Headers?headers.forEach((function(value,name){this.append(name,value)}),this):Array.isArray(headers)?headers.forEach((function(header){this.append(header[0],header[1])}),this):headers&&Object.getOwnPropertyNames(headers).forEach((function(name){this.append(name,headers[name])}),this)}function consumed(body){if(body.bodyUsed)return Promise.reject(new TypeError("Already read"));body.bodyUsed=!0}function fileReaderReady(reader){return new Promise((function(resolve,reject){reader.onload=function(){resolve(reader.result)},reader.onerror=function(){reject(reader.error)}}))}function readBlobAsArrayBuffer(blob){var reader=new FileReader,promise=fileReaderReady(reader);return reader.readAsArrayBuffer(blob),promise}function readBlobAsText(blob){var reader=new FileReader,promise=fileReaderReady(reader);return reader.readAsText(blob),promise}function readArrayBufferAsText(buf){for(var view=new Uint8Array(buf),chars=new Array(view.length),i=0;i-1?upcased:method}function Request(input,options){if(!(this instanceof Request))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var body=(options=options||{}).body;if(input instanceof Request){if(input.bodyUsed)throw new TypeError("Already read");this.url=input.url,this.credentials=input.credentials,options.headers||(this.headers=new Headers(input.headers)),this.method=input.method,this.mode=input.mode,this.signal=input.signal,body||null==input._bodyInit||(body=input._bodyInit,input.bodyUsed=!0)}else this.url=String(input);if(this.credentials=options.credentials||this.credentials||"same-origin",!options.headers&&this.headers||(this.headers=new Headers(options.headers)),this.method=normalizeMethod(options.method||this.method||"GET"),this.mode=options.mode||this.mode||null,this.signal=options.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&body)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(body),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==options.cache&&"no-cache"!==options.cache)){var reParamSearch=/([?&])_=[^&]*/;if(reParamSearch.test(this.url))this.url=this.url.replace(reParamSearch,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function decode(body){var form=new FormData;return body.trim().split("&").forEach((function(bytes){if(bytes){var split=bytes.split("="),name=split.shift().replace(/\+/g," "),value=split.join("=").replace(/\+/g," ");form.append(decodeURIComponent(name),decodeURIComponent(value))}})),form}function parseHeaders(rawHeaders){var headers=new Headers;return rawHeaders.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(header){return 0===header.indexOf("\n")?header.substr(1,header.length):header})).forEach((function(line){var parts=line.split(":"),key=parts.shift().trim();if(key){var value=parts.join(":").trim();headers.append(key,value)}})),headers}function Response(bodyInit,options){if(!(this instanceof Response))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');options||(options={}),this.type="default",this.status=void 0===options.status?200:options.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===options.statusText?"":""+options.statusText,this.headers=new Headers(options.headers),this.url=options.url||"",this._initBody(bodyInit)}Request.prototype.clone=function(){return new Request(this,{body:this._bodyInit})},Body.call(Request.prototype),Body.call(Response.prototype),Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url})},Response.error=function(){var response=new Response(null,{status:0,statusText:""});return response.type="error",response};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(-1===redirectStatuses.indexOf(status))throw new RangeError("Invalid status code");return new Response(null,{status:status,headers:{location:url}})};var DOMException=global$1.DOMException;try{new DOMException}catch(err){DOMException=function(message,name){this.message=message,this.name=name;var error=Error(message);this.stack=error.stack},DOMException.prototype=Object.create(Error.prototype),DOMException.prototype.constructor=DOMException}function fetch$1(input,init){return new Promise((function(resolve,reject){var request=new Request(input,init);if(request.signal&&request.signal.aborted)return reject(new DOMException("Aborted","AbortError"));var xhr=new XMLHttpRequest;function abortXhr(){xhr.abort()}xhr.onload=function(){var options={status:xhr.status,statusText:xhr.statusText,headers:parseHeaders(xhr.getAllResponseHeaders()||"")};options.url="responseURL"in xhr?xhr.responseURL:options.headers.get("X-Request-URL");var body="response"in xhr?xhr.response:xhr.responseText;setTimeout((function(){resolve(new Response(body,options))}),0)},xhr.onerror=function(){setTimeout((function(){reject(new TypeError("Network request failed"))}),0)},xhr.ontimeout=function(){setTimeout((function(){reject(new TypeError("Network request failed"))}),0)},xhr.onabort=function(){setTimeout((function(){reject(new DOMException("Aborted","AbortError"))}),0)},xhr.open(request.method,function(url){try{return""===url&&global$1.location.href?global$1.location.href:url}catch(e){return url}}(request.url),!0),"include"===request.credentials?xhr.withCredentials=!0:"omit"===request.credentials&&(xhr.withCredentials=!1),"responseType"in xhr&&(support.blob?xhr.responseType="blob":support.arrayBuffer&&request.headers.get("Content-Type")&&-1!==request.headers.get("Content-Type").indexOf("application/octet-stream")&&(xhr.responseType="arraybuffer")),!init||"object"!=typeof init.headers||init.headers instanceof Headers?request.headers.forEach((function(value,name){xhr.setRequestHeader(name,value)})):Object.getOwnPropertyNames(init.headers).forEach((function(name){xhr.setRequestHeader(name,normalizeValue(init.headers[name]))})),request.signal&&(request.signal.addEventListener("abort",abortXhr),xhr.onreadystatechange=function(){4===xhr.readyState&&request.signal.removeEventListener("abort",abortXhr)}),xhr.send(void 0===request._bodyInit?null:request._bodyInit)}))}fetch$1.polyfill=!0,global$1.fetch||(global$1.fetch=fetch$1,global$1.Headers=Headers,global$1.Request=Request,global$1.Response=Response),null==Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){for(var attributes=this.attributes,length=attributes.length,result=new Array(length),i=0;i=0&&matches.item(i)!==this;);return i>-1}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(s){var el=this;do{if(el.matches(s))return el;el=el.parentElement||el.parentNode}while(null!==el&&1===el.nodeType);return null});var Connection=function(){function Connection(){_classCallCheck(this,Connection),this.headers={}}return _createClass(Connection,[{key:"onMessage",value:function(message,payload){message.component.receiveMessage(message,payload)}},{key:"onError",value:function(message,status,response){return message.component.messageSendFailed(),store$2.onErrorCallback(status,response)}},{key:"showExpiredMessage",value:function(response,message){store$2.sessionHasExpiredCallback?store$2.sessionHasExpiredCallback(response,message):confirm("This page has expired.\nWould you like to refresh the page?")&&window.location.reload()}},{key:"sendMessage",value:function(message){var _this=this,payload=message.payload(),csrfToken=getCsrfToken(),socketId=this.getSocketId(),appUrl=window.livewire_app_url;if(this.shouldUseLocalePrefix(payload)&&(appUrl="".concat(appUrl,"/").concat(payload.fingerprint.locale)),window.__testing_request_interceptor)return window.__testing_request_interceptor(payload,this);fetch("".concat(appUrl,"/livewire/message/").concat(payload.fingerprint.name),{method:"POST",body:JSON.stringify(payload),credentials:"same-origin",headers:_objectSpread2(_objectSpread2(_objectSpread2({"Content-Type":"application/json",Accept:"text/html, application/xhtml+xml","X-Livewire":!0},this.headers),{},{Referer:window.location.href},csrfToken&&{"X-CSRF-TOKEN":csrfToken}),socketId&&{"X-Socket-ID":socketId})}).then((function(response){if(response.ok)response.text().then((function(response){_this.isOutputFromDump(response)?(_this.onError(message),_this.showHtmlModal(response)):_this.onMessage(message,JSON.parse(response))}));else{if(!1===_this.onError(message,response.status,response))return;if(419===response.status){if(store$2.sessionHasExpired)return;store$2.sessionHasExpired=!0,_this.showExpiredMessage(response,message)}else response.text().then((function(response){_this.showHtmlModal(response)}))}})).catch((function(){_this.onError(message)}))}},{key:"shouldUseLocalePrefix",value:function(payload){var path=payload.fingerprint.path,locale=payload.fingerprint.locale;return path.split("/")[0]==locale}},{key:"isOutputFromDump",value:function(output){return!!output.match(/ + + diff --git a/resources/js/Components/Checkbox.vue b/resources/js/Components/Checkbox.vue new file mode 100644 index 0000000..f70153c --- /dev/null +++ b/resources/js/Components/Checkbox.vue @@ -0,0 +1,36 @@ + + + + diff --git a/resources/js/Pages/Auth/ConfirmPassword.vue b/resources/js/Pages/Auth/ConfirmPassword.vue new file mode 100644 index 0000000..a0fb4a4 --- /dev/null +++ b/resources/js/Pages/Auth/ConfirmPassword.vue @@ -0,0 +1,63 @@ + + + diff --git a/resources/js/Pages/Auth/ForgotPassword.vue b/resources/js/Pages/Auth/ForgotPassword.vue new file mode 100644 index 0000000..8124fd4 --- /dev/null +++ b/resources/js/Pages/Auth/ForgotPassword.vue @@ -0,0 +1,61 @@ + + + diff --git a/resources/js/Pages/Auth/Login.vue b/resources/js/Pages/Auth/Login.vue new file mode 100644 index 0000000..b6c54dc --- /dev/null +++ b/resources/js/Pages/Auth/Login.vue @@ -0,0 +1,90 @@ + + + diff --git a/resources/js/Pages/Auth/Register.vue b/resources/js/Pages/Auth/Register.vue new file mode 100644 index 0000000..ef375c1 --- /dev/null +++ b/resources/js/Pages/Auth/Register.vue @@ -0,0 +1,112 @@ + + + diff --git a/resources/js/Pages/Auth/ResetPassword.vue b/resources/js/Pages/Auth/ResetPassword.vue new file mode 100644 index 0000000..3d38fed --- /dev/null +++ b/resources/js/Pages/Auth/ResetPassword.vue @@ -0,0 +1,85 @@ + + + diff --git a/resources/js/Pages/Auth/TwoFactorChallenge.vue b/resources/js/Pages/Auth/TwoFactorChallenge.vue new file mode 100644 index 0000000..b3be963 --- /dev/null +++ b/resources/js/Pages/Auth/TwoFactorChallenge.vue @@ -0,0 +1,104 @@ + + + diff --git a/resources/js/Pages/Auth/VerifyEmail.vue b/resources/js/Pages/Auth/VerifyEmail.vue new file mode 100644 index 0000000..b531fdb --- /dev/null +++ b/resources/js/Pages/Auth/VerifyEmail.vue @@ -0,0 +1,62 @@ + + + diff --git a/resources/lang/vendor/grid_view/en/grid.php b/resources/lang/vendor/grid_view/en/grid.php new file mode 100644 index 0000000..fbb8e09 --- /dev/null +++ b/resources/lang/vendor/grid_view/en/grid.php @@ -0,0 +1,11 @@ + 'Showing :start to :end of :total entries', + 'select' => 'Select', + 'actions' => 'Actions', + 'delete' => 'Delete', + 'deletion' => 'Deletion', + 'search' => 'Search', + 'reset' => 'Reset', + 'send' => 'Send', +]; diff --git a/resources/lang/vendor/grid_view/ru/grid.php b/resources/lang/vendor/grid_view/ru/grid.php new file mode 100644 index 0000000..5049c84 --- /dev/null +++ b/resources/lang/vendor/grid_view/ru/grid.php @@ -0,0 +1,11 @@ + 'Показаны :start-:end из :total записей', + 'select' => 'Выбрать', + 'actions' => 'Действия', + 'delete' => 'Удалить', + 'deletion' => 'Удаление', + 'search' => 'Найти', + 'reset' => 'Сброс', + 'send' => 'Отправить', +]; diff --git a/resources/lang/vendor/rbac/en/main.php b/resources/lang/vendor/rbac/en/main.php new file mode 100644 index 0000000..5bf6d86 --- /dev/null +++ b/resources/lang/vendor/rbac/en/main.php @@ -0,0 +1,15 @@ + 'Name', + 'description' => 'Description', + 'slug' => 'Slug', + 'attribute' => 'Attribute', + 'value' => 'Value', + 'created' => 'Created', + 'create' => 'Create', + 'edit' => 'Edit', + 'delete' => 'Delete', + 'delete_confirm' => 'Are you sure you want to delete?', + 'generated_automatically' => 'Generated automatically', +]; diff --git a/resources/lang/vendor/rbac/en/permissions.php b/resources/lang/vendor/rbac/en/permissions.php new file mode 100644 index 0000000..1e37052 --- /dev/null +++ b/resources/lang/vendor/rbac/en/permissions.php @@ -0,0 +1,9 @@ + 'Permissions', + 'create_permission' => 'Create permission', + 'edit_permission' => 'Edit permission', + 'delete_permission' => 'Delete permission', + 'permission_details' => 'Permission details', +]; diff --git a/resources/lang/vendor/rbac/en/roles.php b/resources/lang/vendor/rbac/en/roles.php new file mode 100644 index 0000000..43c3c81 --- /dev/null +++ b/resources/lang/vendor/rbac/en/roles.php @@ -0,0 +1,9 @@ + 'Roles', + 'create_role' => 'Create role', + 'edit_role' => 'Edit role', + 'delete_role' => 'Delete role', + 'role_details' => 'Role details', +]; diff --git a/resources/lang/vendor/rbac/en/users.php b/resources/lang/vendor/rbac/en/users.php new file mode 100644 index 0000000..8e77194 --- /dev/null +++ b/resources/lang/vendor/rbac/en/users.php @@ -0,0 +1,10 @@ + 'Users', + 'user_details' => 'User details', + 'assign_roles' => 'Assign roles', + 'assign_roles_for_user' => 'Assign roles for user', + 'delete_user' => 'Delete user', + 'name' => 'Name', +]; diff --git a/resources/lang/vendor/rbac/en/validation.php b/resources/lang/vendor/rbac/en/validation.php new file mode 100644 index 0000000..208021e --- /dev/null +++ b/resources/lang/vendor/rbac/en/validation.php @@ -0,0 +1,11 @@ + 'The ":attribute" field is required.', + 'string' => 'The ":attribute" field must be a string.', + 'regex' => 'The ":attribute" field must contain latin characters.', + 'min' => 'The ":attribute" field must contain at least :min characters.', + 'max' => 'The ":attribute" field may contain no more :max characters.', + 'unique' => 'The ":attribute" already exists with this value ":input" in database.', + 'required_to_delete' => 'Select items to delete.', +]; diff --git a/resources/lang/vendor/rbac/ru/main.php b/resources/lang/vendor/rbac/ru/main.php new file mode 100644 index 0000000..eebf4f7 --- /dev/null +++ b/resources/lang/vendor/rbac/ru/main.php @@ -0,0 +1,15 @@ + 'Название', + 'description' => 'Описание', + 'slug' => 'Слаг', + 'attribute' => 'Атрибут', + 'value' => 'Значение', + 'created' => 'Создано', + 'create' => 'Создать', + 'edit' => 'Редактировать', + 'delete' => 'Удалить', + 'delete_confirm' => 'Вы уверены что хотите это удалить?', + 'generated_automatically' => 'Сгенерирован автоматически', +]; diff --git a/resources/lang/vendor/rbac/ru/permissions.php b/resources/lang/vendor/rbac/ru/permissions.php new file mode 100644 index 0000000..4d1cc2a --- /dev/null +++ b/resources/lang/vendor/rbac/ru/permissions.php @@ -0,0 +1,9 @@ + 'Полномочия', + 'create_permission' => 'Создать полномочие', + 'edit_permission' => 'Редактировать полномочие', + 'delete_permission' => 'Удалить полномочие', + 'permission_details' => 'Детали полномочия', +]; diff --git a/resources/lang/vendor/rbac/ru/roles.php b/resources/lang/vendor/rbac/ru/roles.php new file mode 100644 index 0000000..5ae6188 --- /dev/null +++ b/resources/lang/vendor/rbac/ru/roles.php @@ -0,0 +1,9 @@ + 'Роли', + 'create_role' => 'Создать роль', + 'edit_role' => 'Редактировать роль', + 'delete_role' => 'Удалить роль', + 'role_details' => 'Детали роли', +]; diff --git a/resources/lang/vendor/rbac/ru/users.php b/resources/lang/vendor/rbac/ru/users.php new file mode 100644 index 0000000..778b2ed --- /dev/null +++ b/resources/lang/vendor/rbac/ru/users.php @@ -0,0 +1,10 @@ + 'Пользователи', + 'user_details' => 'Детали пользователя', + 'assign_roles' => 'Назначить роли', + 'assign_roles_for_user' => 'Назначить роли пользователю', + 'delete_user' => 'Удалить пользователя', + 'name' => 'Имя', +]; diff --git a/resources/lang/vendor/rbac/ru/validation.php b/resources/lang/vendor/rbac/ru/validation.php new file mode 100644 index 0000000..38df18e --- /dev/null +++ b/resources/lang/vendor/rbac/ru/validation.php @@ -0,0 +1,11 @@ + 'Атрибут ":attribute" обязательный.', + 'string' => 'Атрибут ":attribute" должен быть строкой.', + 'regex' => 'Атрибут ":attribute" должен содержать латинские символы.', + 'min' => 'Атрибут ":attribute" должен содержать минимум :min символов.', + 'max' => 'Атрибут ":attribute" может содержать не более :max символов.', + 'unique' => 'Атрибут ":attribute" уже есть с таким значением ":input" в базе данных.', + 'required_to_delete' => 'Выберите позиции для удаления.', +]; diff --git a/resources/views/errors/401.blade.php b/resources/views/errors/401.blade.php new file mode 100644 index 0000000..5c586db --- /dev/null +++ b/resources/views/errors/401.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Unauthorized')) +@section('code', '401') +@section('message', __('Unauthorized')) diff --git a/resources/views/errors/402.blade.php b/resources/views/errors/402.blade.php new file mode 100644 index 0000000..3bc23ef --- /dev/null +++ b/resources/views/errors/402.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Payment Required')) +@section('code', '402') +@section('message', __('Payment Required')) diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php new file mode 100644 index 0000000..a5506f0 --- /dev/null +++ b/resources/views/errors/403.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Forbidden')) +@section('code', '403') +@section('message', __($exception->getMessage() ?: 'Forbidden')) diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php new file mode 100644 index 0000000..7549540 --- /dev/null +++ b/resources/views/errors/404.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Not Found')) +@section('code', '404') +@section('message', __('Not Found')) diff --git a/resources/views/errors/419.blade.php b/resources/views/errors/419.blade.php new file mode 100644 index 0000000..c09216e --- /dev/null +++ b/resources/views/errors/419.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Page Expired')) +@section('code', '419') +@section('message', __('Page Expired')) diff --git a/resources/views/errors/429.blade.php b/resources/views/errors/429.blade.php new file mode 100644 index 0000000..f01b07b --- /dev/null +++ b/resources/views/errors/429.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Too Many Requests')) +@section('code', '429') +@section('message', __('Too Many Requests')) diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php new file mode 100644 index 0000000..d9e95d9 --- /dev/null +++ b/resources/views/errors/500.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Server Error')) +@section('code', '500') +@section('message', __('Server Error')) diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php new file mode 100644 index 0000000..c5a9dde --- /dev/null +++ b/resources/views/errors/503.blade.php @@ -0,0 +1,5 @@ +@extends('errors::minimal') + +@section('title', __('Service Unavailable')) +@section('code', '503') +@section('message', __('Service Unavailable')) diff --git a/resources/views/errors/layout.blade.php b/resources/views/errors/layout.blade.php new file mode 100644 index 0000000..019c2cd --- /dev/null +++ b/resources/views/errors/layout.blade.php @@ -0,0 +1,53 @@ + + + + + + + @yield('title') + + + + + +
+
+
+ @yield('message') +
+
+
+ + diff --git a/resources/views/errors/minimal.blade.php b/resources/views/errors/minimal.blade.php new file mode 100644 index 0000000..db69f25 --- /dev/null +++ b/resources/views/errors/minimal.blade.php @@ -0,0 +1,34 @@ + + + + + + + @yield('title') + + + + + + +
+
+
+
+ @yield('code') +
+ +
+ @yield('message') +
+
+
+
+ + diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index e85a103..9117d87 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -34,7 +34,10 @@
- {{ $slot }} + @if(isset($slot)) + {{ $slot }} + @endif + @stack('content')
diff --git a/resources/views/vendor/cashier/payment.blade.php b/resources/views/vendor/cashier/payment.blade.php new file mode 100644 index 0000000..250efa0 --- /dev/null +++ b/resources/views/vendor/cashier/payment.blade.php @@ -0,0 +1,385 @@ + + + + + + + {{ __('Payment Confirmation') }} - {{ config('app.name', 'Laravel') }} + + + + + + + +
+
+

+ Your {{ $amount }} payment +

+ + +

+ + + + + + @{{ errorMessage }} +

+ +
+
+

+ Payment Successful +

+ +

+ This payment was successfully confirmed. +

+
+ +
+

+ Payment Processing +

+ +

+ This payment is currently processing. Refresh this page from time to time to see its status. +

+
+ +
+

+ Payment Canceled +

+ +

+ This payment was canceled. +

+
+ +
+ +
+ +

+ Confirm Your Payment +

+ +

+ A valid payment method is needed to process your payment. Please confirm your payment by filling out your payment details below. +

+ + + + +
+

+ Please select the payment method which you'd like to use. +

+ + +
+
+

+ Your payment will be processed by @{{ paymentMethodTitle }}. +

+
+ + + + + + + + + + + +
+ + + +
+
+ +
+ + + +

+ By providing your payment information and confirming this payment, you authorise (A) and Stripe, our payment service provider, to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with those instructions. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. Your rights are explained in a statement that you can obtain from your bank. You agree to receive notifications for future debits up to 2 days before they occur. +

+
+
+ + + +
+ + +
+ +

+ © {{ date('Y') }} {{ config('app.name') }}. All rights reserved. +

+
+
+ + + + diff --git a/resources/views/vendor/cashier/receipt.blade.php b/resources/views/vendor/cashier/receipt.blade.php new file mode 100644 index 0000000..5f4876e --- /dev/null +++ b/resources/views/vendor/cashier/receipt.blade.php @@ -0,0 +1,323 @@ + + + + + + + Invoice + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + Receipt + + + +

+ @isset ($product) + Product: {{ $product }}
+ @endisset + + Date: {{ $invoice->date()->toFormattedDateString() }}
+ + @if ($dueDate = $invoice->dueDate()) + Due date: {{ $dueDate->toFormattedDateString() }}
+ @endif + + @if ($invoiceId = $id ?? $invoice->number) + Invoice Number: {{ $invoiceId }}
+ @endif +

+
+ + {{ $header ?? $vendor ?? $invoice->account_name }} + +
+ + {{ $vendor ?? $invoice->account_name }}
+ + @isset($street) + {{ $street }}
+ @endisset + + @isset($location) + {{ $location }}
+ @endisset + + @isset($country) + {{ $country }}
+ @endisset + + @isset($phone) + {{ $phone }}
+ @endisset + + @isset($email) + {{ $email }}
+ @endisset + + @isset($url) + {{ $url }}
+ @endisset + + @isset($vendorVat) + {{ $vendorVat }}
+ @else + @foreach ($invoice->accountTaxIds() as $taxId) + {{ $taxId->value }}
+ @endforeach + @endisset +
+ + Recipient
+ + {{ $invoice->customer_name ?? $invoice->customer_email }}
+ + @if ($address = $invoice->customer_address) + @if ($address->line1) + {{ $address->line1 }}
+ @endif + + @if ($address->line2) + {{ $address->line2 }}
+ @endif + + @if ($address->city) + {{ $address->city }}
+ @endif + + @if ($address->state || $address->postal_code) + {{ implode(' ', [$address->state, $address->postal_code]) }}
+ @endif + + @if ($address->country) + {{ $address->country }}
+ @endif + @endif + + @if ($invoice->customer_phone) + {{ $invoice->customer_phone }}
+ @endif + + @if ($invoice->customer_name) + {{ $invoice->customer_email }}
+ @endif + + @foreach ($invoice->customerTaxIds() as $taxId) + {{ $taxId->value }}
+ @endforeach +
+ + @if ($invoice->description) +

+ {{ $invoice->description }} +

+ @endif + + + @if (isset($vat)) +

+ {{ $vat }} +

+ @endif +
+ + + + + + + + @if ($invoice->hasTax()) + + @endif + + + + + + @foreach ($invoice->invoiceLineItems() as $item) + + + + + + + @if ($invoice->hasTax()) + + @endif + + + + @endforeach + + + @if ($invoice->hasDiscount() || $invoice->hasTax() || $invoice->hasStartingBalance()) + + + + + + @endif + + + @if ($invoice->hasDiscount()) + @foreach ($invoice->discounts() as $discount) + @php($coupon = $discount->coupon()) + + + + + + + + @endforeach + @endif + + + @unless ($invoice->isNotTaxExempt()) + + + + + + @else + @foreach ($invoice->taxes() as $tax) + + + + + + @endforeach + @endunless + + + + + + + + + + @if ($invoice->hasAppliedBalance()) + + + + + + @endif + + + + + + + +
DescriptionQtyUnit priceTaxAmount
+ {{ $item->description }} + + @if ($item->hasPeriod() && ! $item->periodStartAndEndAreEqual()) +
+ {{ $item->startDate() }} - {{ $item->endDate() }} + + @endif +
{{ $item->quantity }}{{ $item->unitAmountExcludingTax() }} + @if ($inclusiveTaxPercentage = $item->inclusiveTaxPercentage()) + {{ $inclusiveTaxPercentage }}% incl. + @endif + + @if ($item->hasBothInclusiveAndExclusiveTax()) + + + @endif + + @if ($exclusiveTaxPercentage = $item->exclusiveTaxPercentage()) + {{ $exclusiveTaxPercentage }}% + @endif + {{ $item->total() }}
Subtotal{{ $invoice->subtotal() }}
+ @if ($coupon->isPercentage()) + {{ $coupon->name() }} ({{ $coupon->percentOff() }}% Off) + @else + {{ $coupon->name() }} ({{ $coupon->amountOff() }} Off) + @endif + -{{ $invoice->discountFor($discount) }}
+ @if ($invoice->isTaxExempt()) + Tax is exempted + @else + Tax to be paid on reverse charge basis + @endif +
+ {{ $tax->display_name }} {{ $tax->jurisdiction ? ' - '.$tax->jurisdiction : '' }} + ({{ $tax->percentage }}%{{ $tax->isInclusive() ? ' incl.' : '' }}) + {{ $tax->amount() }}
+ Total + + {{ $invoice->realTotal() }} +
+ Applied balance + {{ $invoice->appliedBalance() }}
+ Amount due + + {{ $invoice->amountDue() }} +
+
+
+ + + diff --git a/resources/views/vendor/grid_view/actions/delete.blade.php b/resources/views/vendor/grid_view/actions/delete.blade.php new file mode 100644 index 0000000..89fa6eb --- /dev/null +++ b/resources/views/vendor/grid_view/actions/delete.blade.php @@ -0,0 +1,9 @@ + +
 
\ No newline at end of file diff --git a/resources/views/vendor/grid_view/actions/edit.blade.php b/resources/views/vendor/grid_view/actions/edit.blade.php new file mode 100644 index 0000000..faf4acf --- /dev/null +++ b/resources/views/vendor/grid_view/actions/edit.blade.php @@ -0,0 +1,9 @@ + +
 
\ No newline at end of file diff --git a/resources/views/vendor/grid_view/actions/view.blade.php b/resources/views/vendor/grid_view/actions/view.blade.php new file mode 100644 index 0000000..3ae3a23 --- /dev/null +++ b/resources/views/vendor/grid_view/actions/view.blade.php @@ -0,0 +1,9 @@ + +
 
\ No newline at end of file diff --git a/resources/views/vendor/grid_view/columns/checkbox-stub.blade.php b/resources/views/vendor/grid_view/columns/checkbox-stub.blade.php new file mode 100644 index 0000000..91dd2e6 --- /dev/null +++ b/resources/views/vendor/grid_view/columns/checkbox-stub.blade.php @@ -0,0 +1,9 @@ +
+
+ + + + + +
+
\ No newline at end of file diff --git a/resources/views/vendor/grid_view/columns/checkbox.blade.php b/resources/views/vendor/grid_view/columns/checkbox.blade.php new file mode 100644 index 0000000..471f0d0 --- /dev/null +++ b/resources/views/vendor/grid_view/columns/checkbox.blade.php @@ -0,0 +1,9 @@ +@php +/** @var string $field */ +/** @var mixed $value */ +@endphp +
+
+ +
+
\ No newline at end of file diff --git a/resources/views/vendor/grid_view/filters/dropdown.blade.php b/resources/views/vendor/grid_view/filters/dropdown.blade.php new file mode 100644 index 0000000..041ac67 --- /dev/null +++ b/resources/views/vendor/grid_view/filters/dropdown.blade.php @@ -0,0 +1,11 @@ +@php + /** @var string $name */ + /** @var array $data */ + /** @var mixed $value */ +@endphp + diff --git a/resources/views/vendor/grid_view/filters/stub.blade.php b/resources/views/vendor/grid_view/filters/stub.blade.php new file mode 100644 index 0000000..4c8a6f4 --- /dev/null +++ b/resources/views/vendor/grid_view/filters/stub.blade.php @@ -0,0 +1 @@ +  \ No newline at end of file diff --git a/resources/views/vendor/grid_view/filters/text.blade.php b/resources/views/vendor/grid_view/filters/text.blade.php new file mode 100644 index 0000000..b58e4ea --- /dev/null +++ b/resources/views/vendor/grid_view/filters/text.blade.php @@ -0,0 +1,5 @@ +@php +/** @var string $name */ +/** @var string $value */ +@endphp + diff --git a/resources/views/vendor/grid_view/grid.blade.php b/resources/views/vendor/grid_view/grid.blade.php new file mode 100644 index 0000000..aef119d --- /dev/null +++ b/resources/views/vendor/grid_view/grid.blade.php @@ -0,0 +1,138 @@ +@php + /** @var \Itstructure\GridView\Columns\BaseColumn[] $columnObjects */ + /** @var \Illuminate\Pagination\LengthAwarePaginator $paginator */ + /** @var boolean $useFilters */ + $checkboxesExist = false; +@endphp + +
+
+ @if($title) +

{!! $title !!}

+ @endif +
+ @if ($paginator->onFirstPage()) + {!! trans('grid_view::grid.page-info', [ + 'start' => '1', + 'end' => '' . $paginator->perPage() . '', + 'total' => '' . $paginator->total() . '', + ]) !!} + @elseif ($paginator->currentPage() == $paginator->lastPage()) + {!! trans('grid_view::grid.page-info', [ + 'start' => '' . (($paginator->currentPage() - 1) * $paginator->perPage() + 1) . '', + 'end' => '' . $paginator->total() . '', + 'total' => '' . $paginator->total() . '', + ]) !!} + @else + {!! trans('grid_view::grid.page-info', [ + 'start' => '' . (($paginator->currentPage() - 1) * $paginator->perPage() + 1) . '', + 'end' => '' . (($paginator->currentPage()) * $paginator->perPage()) . '', + 'total' => '' . $paginator->total() . '', + ]) !!} + @endif +
+
+
+ + + + + @foreach($columnObjects as $column_obj) + + @endforeach + + @if ($useFilters) + + + + @foreach($columnObjects as $column_obj) + + @endforeach + + + + @endif + + + + + @foreach($paginator->items() as $key => $row) + + + @foreach($columnObjects as $column_obj) + + @endforeach + + @endforeach + + + + + + + + + +
#buildHtmlAttributes() !!}> + + @if($column_obj->getSort() === false || $column_obj instanceof \Itstructure\GridView\Columns\ActionColumn) + {{ $column_obj->getLabel() }} + + @elseif($column_obj instanceof \Itstructure\GridView\Columns\CheckboxColumn) + @php($checkboxesExist = true) + @if($useFilters) + {{ $column_obj->getLabel() }} + @else + count() == 0) disabled="disabled" @endif /> + @endif + + @else + {{ $column_obj->getLabel() }} + @endif + +
+ @if($column_obj instanceof \Itstructure\GridView\Columns\CheckboxColumn) + count() == 0) disabled="disabled" @endif /> + @else + {!! $column_obj->getFilter()->render() !!} + @endif +
{{ ($paginator->currentPage() - 1) * $paginator->perPage() + $key + 1 }}{!! $column_obj->render($row) !!}
+
+
+
+ {{ $paginator->render('grid_view::pagination') }} +
+
+ @if ($useFilters) + + + @endif + @if (($checkboxesExist || $useSendButtonAnyway) && $paginator->count() > 0) + + @endif +
+
+
+
+
+
+ \ No newline at end of file diff --git a/resources/views/vendor/grid_view/pagination.blade.php b/resources/views/vendor/grid_view/pagination.blade.php new file mode 100644 index 0000000..eb44c46 --- /dev/null +++ b/resources/views/vendor/grid_view/pagination.blade.php @@ -0,0 +1,51 @@ +@php +/** + * @var \Illuminate\Pagination\LengthAwarePaginator $paginator + * @var array[] $elements + */ +@endphp + +@if ($paginator->hasPages()) + +
+@endif diff --git a/resources/views/vendor/livewire/bootstrap.blade.php b/resources/views/vendor/livewire/bootstrap.blade.php new file mode 100644 index 0000000..9f08a7f --- /dev/null +++ b/resources/views/vendor/livewire/bootstrap.blade.php @@ -0,0 +1,50 @@ +
+ @if ($paginator->hasPages()) + @php(isset($this->numberOfPaginatorsRendered[$paginator->getPageName()]) ? $this->numberOfPaginatorsRendered[$paginator->getPageName()]++ : $this->numberOfPaginatorsRendered[$paginator->getPageName()] = 1) + + + @endif +
diff --git a/resources/views/vendor/livewire/simple-bootstrap.blade.php b/resources/views/vendor/livewire/simple-bootstrap.blade.php new file mode 100644 index 0000000..f06e6a9 --- /dev/null +++ b/resources/views/vendor/livewire/simple-bootstrap.blade.php @@ -0,0 +1,41 @@ +
+ @if ($paginator->hasPages()) + + @endif +
diff --git a/resources/views/vendor/livewire/simple-tailwind.blade.php b/resources/views/vendor/livewire/simple-tailwind.blade.php new file mode 100644 index 0000000..0d626a9 --- /dev/null +++ b/resources/views/vendor/livewire/simple-tailwind.blade.php @@ -0,0 +1,43 @@ +
+ @if ($paginator->hasPages()) + + @endif +
diff --git a/resources/views/vendor/livewire/tailwind.blade.php b/resources/views/vendor/livewire/tailwind.blade.php new file mode 100644 index 0000000..81d372c --- /dev/null +++ b/resources/views/vendor/livewire/tailwind.blade.php @@ -0,0 +1,116 @@ +
+ @if ($paginator->hasPages()) + @php(isset($this->numberOfPaginatorsRendered[$paginator->getPageName()]) ? $this->numberOfPaginatorsRendered[$paginator->getPageName()]++ : $this->numberOfPaginatorsRendered[$paginator->getPageName()] = 1) + + + @endif +
diff --git a/resources/views/vendor/mail/html/button.blade.php b/resources/views/vendor/mail/html/button.blade.php new file mode 100644 index 0000000..4a9bf7d --- /dev/null +++ b/resources/views/vendor/mail/html/button.blade.php @@ -0,0 +1,24 @@ +@props([ + 'url', + 'color' => 'primary', + 'align' => 'center', +]) + + + + + diff --git a/resources/views/vendor/mail/html/footer.blade.php b/resources/views/vendor/mail/html/footer.blade.php new file mode 100644 index 0000000..3ff41f8 --- /dev/null +++ b/resources/views/vendor/mail/html/footer.blade.php @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php new file mode 100644 index 0000000..56197f8 --- /dev/null +++ b/resources/views/vendor/mail/html/header.blade.php @@ -0,0 +1,12 @@ +@props(['url']) + + + +@if (trim($slot) === 'Laravel') + +@else +{{ $slot }} +@endif + + + diff --git a/resources/views/vendor/mail/html/layout.blade.php b/resources/views/vendor/mail/html/layout.blade.php new file mode 100644 index 0000000..e55f6a6 --- /dev/null +++ b/resources/views/vendor/mail/html/layout.blade.php @@ -0,0 +1,57 @@ + + + +{{ config('app.name') }} + + + + + + + + + + + + + + + diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php new file mode 100644 index 0000000..f272460 --- /dev/null +++ b/resources/views/vendor/mail/html/message.blade.php @@ -0,0 +1,27 @@ + +{{-- Header --}} + + +{{ config('app.name') }} + + + +{{-- Body --}} +{{ $slot }} + +{{-- Subcopy --}} +@isset($subcopy) + + +{{ $subcopy }} + + +@endisset + +{{-- Footer --}} + + +© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') + + + diff --git a/resources/views/vendor/mail/html/panel.blade.php b/resources/views/vendor/mail/html/panel.blade.php new file mode 100644 index 0000000..2975a60 --- /dev/null +++ b/resources/views/vendor/mail/html/panel.blade.php @@ -0,0 +1,14 @@ + + + + + + diff --git a/resources/views/vendor/mail/html/subcopy.blade.php b/resources/views/vendor/mail/html/subcopy.blade.php new file mode 100644 index 0000000..790ce6c --- /dev/null +++ b/resources/views/vendor/mail/html/subcopy.blade.php @@ -0,0 +1,7 @@ + + + + + diff --git a/resources/views/vendor/mail/html/table.blade.php b/resources/views/vendor/mail/html/table.blade.php new file mode 100644 index 0000000..a5f3348 --- /dev/null +++ b/resources/views/vendor/mail/html/table.blade.php @@ -0,0 +1,3 @@ +
+{{ Illuminate\Mail\Markdown::parse($slot) }} +
diff --git a/resources/views/vendor/mail/html/themes/default.css b/resources/views/vendor/mail/html/themes/default.css new file mode 100644 index 0000000..2483b11 --- /dev/null +++ b/resources/views/vendor/mail/html/themes/default.css @@ -0,0 +1,290 @@ +/* Base */ + +body, +body *:not(html):not(style):not(br):not(tr):not(code) { + box-sizing: border-box; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + position: relative; +} + +body { + -webkit-text-size-adjust: none; + background-color: #ffffff; + color: #718096; + height: 100%; + line-height: 1.4; + margin: 0; + padding: 0; + width: 100% !important; +} + +p, +ul, +ol, +blockquote { + line-height: 1.4; + text-align: left; +} + +a { + color: #3869d4; +} + +a img { + border: none; +} + +/* Typography */ + +h1 { + color: #3d4852; + font-size: 18px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +h2 { + font-size: 16px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +h3 { + font-size: 14px; + font-weight: bold; + margin-top: 0; + text-align: left; +} + +p { + font-size: 16px; + line-height: 1.5em; + margin-top: 0; + text-align: left; +} + +p.sub { + font-size: 12px; +} + +img { + max-width: 100%; +} + +/* Layout */ + +.wrapper { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + background-color: #edf2f7; + margin: 0; + padding: 0; + width: 100%; +} + +.content { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 0; + padding: 0; + width: 100%; +} + +/* Header */ + +.header { + padding: 25px 0; + text-align: center; +} + +.header a { + color: #3d4852; + font-size: 19px; + font-weight: bold; + text-decoration: none; +} + +/* Logo */ + +.logo { + height: 75px; + max-height: 75px; + width: 75px; +} + +/* Body */ + +.body { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + background-color: #edf2f7; + border-bottom: 1px solid #edf2f7; + border-top: 1px solid #edf2f7; + margin: 0; + padding: 0; + width: 100%; +} + +.inner-body { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 570px; + background-color: #ffffff; + border-color: #e8e5ef; + border-radius: 2px; + border-width: 1px; + box-shadow: 0 2px 0 rgba(0, 0, 150, 0.025), 2px 4px 0 rgba(0, 0, 150, 0.015); + margin: 0 auto; + padding: 0; + width: 570px; +} + +/* Subcopy */ + +.subcopy { + border-top: 1px solid #e8e5ef; + margin-top: 25px; + padding-top: 25px; +} + +.subcopy p { + font-size: 14px; +} + +/* Footer */ + +.footer { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 570px; + margin: 0 auto; + padding: 0; + text-align: center; + width: 570px; +} + +.footer p { + color: #b0adc5; + font-size: 12px; + text-align: center; +} + +.footer a { + color: #b0adc5; + text-decoration: underline; +} + +/* Tables */ + +.table table { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 30px auto; + width: 100%; +} + +.table th { + border-bottom: 1px solid #edeff2; + margin: 0; + padding-bottom: 8px; +} + +.table td { + color: #74787e; + font-size: 15px; + line-height: 18px; + margin: 0; + padding: 10px 0; +} + +.content-cell { + max-width: 100vw; + padding: 32px; +} + +/* Buttons */ + +.action { + -premailer-cellpadding: 0; + -premailer-cellspacing: 0; + -premailer-width: 100%; + margin: 30px auto; + padding: 0; + text-align: center; + width: 100%; +} + +.button { + -webkit-text-size-adjust: none; + border-radius: 4px; + color: #fff; + display: inline-block; + overflow: hidden; + text-decoration: none; +} + +.button-blue, +.button-primary { + background-color: #2d3748; + border-bottom: 8px solid #2d3748; + border-left: 18px solid #2d3748; + border-right: 18px solid #2d3748; + border-top: 8px solid #2d3748; +} + +.button-green, +.button-success { + background-color: #48bb78; + border-bottom: 8px solid #48bb78; + border-left: 18px solid #48bb78; + border-right: 18px solid #48bb78; + border-top: 8px solid #48bb78; +} + +.button-red, +.button-error { + background-color: #e53e3e; + border-bottom: 8px solid #e53e3e; + border-left: 18px solid #e53e3e; + border-right: 18px solid #e53e3e; + border-top: 8px solid #e53e3e; +} + +/* Panels */ + +.panel { + border-left: #2d3748 solid 4px; + margin: 21px 0; +} + +.panel-content { + background-color: #edf2f7; + color: #718096; + padding: 16px; +} + +.panel-content p { + color: #718096; +} + +.panel-item { + padding: 0; +} + +.panel-item p:last-of-type { + margin-bottom: 0; + padding-bottom: 0; +} + +/* Utilities */ + +.break-all { + word-break: break-all; +} diff --git a/resources/views/vendor/mail/text/button.blade.php b/resources/views/vendor/mail/text/button.blade.php new file mode 100644 index 0000000..97444eb --- /dev/null +++ b/resources/views/vendor/mail/text/button.blade.php @@ -0,0 +1 @@ +{{ $slot }}: {{ $url }} diff --git a/resources/views/vendor/mail/text/footer.blade.php b/resources/views/vendor/mail/text/footer.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/resources/views/vendor/mail/text/footer.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/vendor/mail/text/header.blade.php b/resources/views/vendor/mail/text/header.blade.php new file mode 100644 index 0000000..aaa3e57 --- /dev/null +++ b/resources/views/vendor/mail/text/header.blade.php @@ -0,0 +1 @@ +[{{ $slot }}]({{ $url }}) diff --git a/resources/views/vendor/mail/text/layout.blade.php b/resources/views/vendor/mail/text/layout.blade.php new file mode 100644 index 0000000..9378baa --- /dev/null +++ b/resources/views/vendor/mail/text/layout.blade.php @@ -0,0 +1,9 @@ +{!! strip_tags($header) !!} + +{!! strip_tags($slot) !!} +@isset($subcopy) + +{!! strip_tags($subcopy) !!} +@endisset + +{!! strip_tags($footer) !!} diff --git a/resources/views/vendor/mail/text/message.blade.php b/resources/views/vendor/mail/text/message.blade.php new file mode 100644 index 0000000..80bce21 --- /dev/null +++ b/resources/views/vendor/mail/text/message.blade.php @@ -0,0 +1,27 @@ + + {{-- Header --}} + + + {{ config('app.name') }} + + + + {{-- Body --}} + {{ $slot }} + + {{-- Subcopy --}} + @isset($subcopy) + + + {{ $subcopy }} + + + @endisset + + {{-- Footer --}} + + + © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') + + + diff --git a/resources/views/vendor/mail/text/panel.blade.php b/resources/views/vendor/mail/text/panel.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/resources/views/vendor/mail/text/panel.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/vendor/mail/text/subcopy.blade.php b/resources/views/vendor/mail/text/subcopy.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/resources/views/vendor/mail/text/subcopy.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/vendor/mail/text/table.blade.php b/resources/views/vendor/mail/text/table.blade.php new file mode 100644 index 0000000..3338f62 --- /dev/null +++ b/resources/views/vendor/mail/text/table.blade.php @@ -0,0 +1 @@ +{{ $slot }} diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php new file mode 100644 index 0000000..678e259 --- /dev/null +++ b/resources/views/vendor/notifications/email.blade.php @@ -0,0 +1,58 @@ + +{{-- Greeting --}} +@if (! empty($greeting)) +# {{ $greeting }} +@else +@if ($level === 'error') +# @lang('Whoops!') +@else +# @lang('Hello!') +@endif +@endif + +{{-- Intro Lines --}} +@foreach ($introLines as $line) +{{ $line }} + +@endforeach + +{{-- Action Button --}} +@isset($actionText) + $level, + default => 'primary', + }; +?> + +{{ $actionText }} + +@endisset + +{{-- Outro Lines --}} +@foreach ($outroLines as $line) +{{ $line }} + +@endforeach + +{{-- Salutation --}} +@if (! empty($salutation)) +{{ $salutation }} +@else +@lang('Regards'),
+{{ config('app.name') }} +@endif + +{{-- Subcopy --}} +@isset($actionText) + +@lang( + "If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\n". + 'into your web browser:', + [ + 'actionText' => $actionText, + ] +) [{{ $displayableActionUrl }}]({{ $actionUrl }}) + +@endisset +
diff --git a/resources/views/vendor/pagination/bootstrap-4.blade.php b/resources/views/vendor/pagination/bootstrap-4.blade.php new file mode 100644 index 0000000..63c6f56 --- /dev/null +++ b/resources/views/vendor/pagination/bootstrap-4.blade.php @@ -0,0 +1,46 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/bootstrap-5.blade.php b/resources/views/vendor/pagination/bootstrap-5.blade.php new file mode 100644 index 0000000..a1795a4 --- /dev/null +++ b/resources/views/vendor/pagination/bootstrap-5.blade.php @@ -0,0 +1,88 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php new file mode 100644 index 0000000..0db70b5 --- /dev/null +++ b/resources/views/vendor/pagination/default.blade.php @@ -0,0 +1,46 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/semantic-ui.blade.php b/resources/views/vendor/pagination/semantic-ui.blade.php new file mode 100644 index 0000000..ef0dbb1 --- /dev/null +++ b/resources/views/vendor/pagination/semantic-ui.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/simple-bootstrap-4.blade.php b/resources/views/vendor/pagination/simple-bootstrap-4.blade.php new file mode 100644 index 0000000..4bb4917 --- /dev/null +++ b/resources/views/vendor/pagination/simple-bootstrap-4.blade.php @@ -0,0 +1,27 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/simple-bootstrap-5.blade.php b/resources/views/vendor/pagination/simple-bootstrap-5.blade.php new file mode 100644 index 0000000..a89005e --- /dev/null +++ b/resources/views/vendor/pagination/simple-bootstrap-5.blade.php @@ -0,0 +1,29 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/simple-default.blade.php b/resources/views/vendor/pagination/simple-default.blade.php new file mode 100644 index 0000000..36bdbc1 --- /dev/null +++ b/resources/views/vendor/pagination/simple-default.blade.php @@ -0,0 +1,19 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/simple-tailwind.blade.php b/resources/views/vendor/pagination/simple-tailwind.blade.php new file mode 100644 index 0000000..6872cca --- /dev/null +++ b/resources/views/vendor/pagination/simple-tailwind.blade.php @@ -0,0 +1,25 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/pagination/tailwind.blade.php b/resources/views/vendor/pagination/tailwind.blade.php new file mode 100644 index 0000000..5bf323b --- /dev/null +++ b/resources/views/vendor/pagination/tailwind.blade.php @@ -0,0 +1,106 @@ +@if ($paginator->hasPages()) + +@endif diff --git a/resources/views/vendor/rbac/permissions/_fields.blade.php b/resources/views/vendor/rbac/permissions/_fields.blade.php new file mode 100644 index 0000000..de0e058 --- /dev/null +++ b/resources/views/vendor/rbac/permissions/_fields.blade.php @@ -0,0 +1,40 @@ +
+
+
+ + + @if ($errors->has('name')) +
+ {{ $errors->first('name') }} +
+ @endif +
+
+
+ +
+
+
+ + + @if ($errors->has('description')) +
+ {{ $errors->first('description') }} +
+ @endif +
+
+
+ +@if($edit) +
+
+
+ + +
+
+
+@endif \ No newline at end of file diff --git a/resources/views/vendor/rbac/permissions/create.blade.php b/resources/views/vendor/rbac/permissions/create.blade.php new file mode 100644 index 0000000..b485fd9 --- /dev/null +++ b/resources/views/vendor/rbac/permissions/create.blade.php @@ -0,0 +1,25 @@ +@extends($rbacLayout) +@section('title', __('rbac::permissions.create_permission')) +@section('content') + +
+
+
+ +

{!! __('rbac::permissions.create_permission') !!}

+ +
+ + @include('rbac::permissions._fields', ['edit' => false]) + + + + + +
+ +
+
+
+ +@stop diff --git a/resources/views/vendor/rbac/permissions/edit.blade.php b/resources/views/vendor/rbac/permissions/edit.blade.php new file mode 100644 index 0000000..5d5d20a --- /dev/null +++ b/resources/views/vendor/rbac/permissions/edit.blade.php @@ -0,0 +1,25 @@ +@extends($rbacLayout) +@section('title', __('rbac::permissions.edit_permission')) +@section('content') + +
+
+
+ +

{!! __('rbac::permissions.edit_permission') !!}: {{ $permission->name }}

+ +
+ + @include('rbac::permissions._fields', ['edit' => true]) + + + + + +
+ +
+
+
+ +@stop diff --git a/resources/views/vendor/rbac/permissions/index.blade.php b/resources/views/vendor/rbac/permissions/index.blade.php new file mode 100644 index 0000000..a0ef1e4 --- /dev/null +++ b/resources/views/vendor/rbac/permissions/index.blade.php @@ -0,0 +1,91 @@ +@extends($rbacLayout) +@section('title', __('rbac::permissions.permissions')) +@section('content') + +
+ +

{!! __('rbac::permissions.create_permission') !!}

+ + @if ($errors->has('items')) +
+
+ +
+
+ @endif + + @php + $gridData = [ + 'dataProvider' => $dataProvider, + 'paginatorOptions' => [ + 'pageName' => 'p', + ], + 'rowsPerPage' => $rbacRowsPerPage, + 'title' => __('rbac::permissions.permissions'), + 'rowsFormAction' => route('delete_permission'), + 'columnFields' => [ + [ + 'label' => 'ID', + 'attribute' => 'id', + 'htmlAttributes' => [ + 'width' => '5%', + ], + 'filter' => false + ], + [ + 'label' => __('rbac::main.name'), + 'value' => function ($permission) { + return '' . $permission->name .''; + }, + 'filter' => [ + 'class' => Itstructure\GridView\Filters\TextFilter::class, + 'name' => 'name' + ], + 'sort' => 'name', + 'format' => 'html', + ], + [ + 'label' => __('rbac::main.slug'), + 'attribute' => 'slug', + ], + [ + 'label' => __('rbac::main.description'), + 'attribute' => 'description', + 'filter' => false, + 'sort' => false + ], + [ + 'label' => __('rbac::main.created'), + 'attribute' => 'created_at', + 'filter' => false, + ], + [ + 'class' => Itstructure\GridView\Columns\ActionColumn::class, + 'actionTypes' => [ + 'view' => function ($permission) { + return route('show_permission', ['id' => $permission->id]); + }, + 'edit' => function ($permission) { + return route('edit_permission', ['permission' => $permission->id]); + } + ], + 'htmlAttributes' => [ + 'width' => '130', + ], + ], + [ + 'class' => Itstructure\GridView\Columns\CheckboxColumn::class, + 'field' => 'items', + 'attribute' => 'id' + ], + ], + ]; + @endphp + + @gridView($gridData) + +
+ +@endsection diff --git a/resources/views/vendor/rbac/permissions/show.blade.php b/resources/views/vendor/rbac/permissions/show.blade.php new file mode 100644 index 0000000..d8117cf --- /dev/null +++ b/resources/views/vendor/rbac/permissions/show.blade.php @@ -0,0 +1,47 @@ +@extends($rbacLayout) +@section('title', __('rbac::permissions.permission_details')) +@section('content') + +
+

{!! __('rbac::permissions.permission_details') !!}: {{ $permission->name }}

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
{!! __('rbac::main.attribute') !!}{!! __('rbac::main.value') !!}
{!! __('rbac::main.name') !!}{{ $permission->name }}
{!! __('rbac::main.slug') !!}{{ $permission->slug }}
{!! __('rbac::main.description') !!}{{ $permission->description }}
+
+
+
+ +@endsection diff --git a/resources/views/vendor/rbac/roles/_fields.blade.php b/resources/views/vendor/rbac/roles/_fields.blade.php new file mode 100644 index 0000000..fc1b13c --- /dev/null +++ b/resources/views/vendor/rbac/roles/_fields.blade.php @@ -0,0 +1,64 @@ +
+
+
+ + + @if ($errors->has('name')) +
+ {{ $errors->first('name') }} +
+ @endif +
+
+
+ +
+
+
+ + + @if ($errors->has('description')) +
+ {{ $errors->first('description') }} +
+ @endif +
+
+
+ +@if($edit) +
+
+
+ + +
+
+
+@endif + +
+
+ + +
+ @foreach($allPermissions as $id => $name) +
+ + +
+ @endforeach +
+ + @if ($errors->has('permissions')) + + @endif +
+
diff --git a/resources/views/vendor/rbac/roles/create.blade.php b/resources/views/vendor/rbac/roles/create.blade.php new file mode 100644 index 0000000..de118fe --- /dev/null +++ b/resources/views/vendor/rbac/roles/create.blade.php @@ -0,0 +1,25 @@ +@extends($rbacLayout) +@section('title', __('rbac::roles.create_role')) +@section('content') + +
+
+
+ +

{!! __('rbac::roles.create_role') !!}

+ +
+ + @include('rbac::roles._fields', ['edit' => false]) + + + + + +
+ +
+
+
+ +@stop diff --git a/resources/views/vendor/rbac/roles/edit.blade.php b/resources/views/vendor/rbac/roles/edit.blade.php new file mode 100644 index 0000000..bdbd744 --- /dev/null +++ b/resources/views/vendor/rbac/roles/edit.blade.php @@ -0,0 +1,25 @@ +@extends($rbacLayout) +@section('title', __('rbac::roles.edit_role')) +@section('content') + +
+
+
+ +

{!! __('rbac::roles.edit_role') !!}: {{ $role->name }}

+ +
+ + @include('rbac::roles._fields', ['edit' => true]) + + + + + +
+ +
+
+
+ +@stop diff --git a/resources/views/vendor/rbac/roles/index.blade.php b/resources/views/vendor/rbac/roles/index.blade.php new file mode 100644 index 0000000..6fbae78 --- /dev/null +++ b/resources/views/vendor/rbac/roles/index.blade.php @@ -0,0 +1,104 @@ +@extends($rbacLayout) +@section('title', __('rbac::roles.roles')) +@section('content') + +
+ +

{!! __('rbac::roles.create_role') !!}

+ + @if ($errors->has('items')) +
+
+ +
+
+ @endif + + @php + $gridData = [ + 'dataProvider' => $dataProvider, + 'paginatorOptions' => [ + 'pageName' => 'p', + ], + 'rowsPerPage' => $rbacRowsPerPage, + 'title' => __('rbac::roles.roles'), + 'rowsFormAction' => route('delete_role'), + 'columnFields' => [ + [ + 'label' => 'ID', + 'attribute' => 'id', + 'htmlAttributes' => [ + 'width' => '5%', + ], + 'filter' => false + ], + [ + 'label' => __('rbac::main.name'), + 'value' => function ($role) { + return '' . $role->name .''; + }, + 'filter' => [ + 'class' => Itstructure\GridView\Filters\TextFilter::class, + 'name' => 'name' + ], + 'sort' => 'name', + 'format' => 'html', + ], + [ + 'label' => __('rbac::main.slug'), + 'attribute' => 'slug', + ], + [ + 'label' => __('rbac::main.description'), + 'attribute' => 'description', + 'filter' => false, + 'sort' => false + ], + [ + 'label' => __('rbac::permissions.permissions'), + 'value' => function ($role) { + $output = ''; + }, + 'filter' => false, + 'sort' => false, + 'format' => 'html', + ], + [ + 'label' => __('rbac::main.created'), + 'attribute' => 'created_at', + 'filter' => false, + ], + [ + 'class' => Itstructure\GridView\Columns\ActionColumn::class, + 'actionTypes' => [ + 'view' => function ($role) { + return route('show_role', ['id' => $role->id]); + }, + 'edit' => function ($role) { + return route('edit_role', ['role' => $role->id]); + } + ], + 'htmlAttributes' => [ + 'width' => '130', + ], + ], + [ + 'class' => Itstructure\GridView\Columns\CheckboxColumn::class, + 'field' => 'items', + 'attribute' => 'id' + ], + ], + ]; + @endphp + + @gridView($gridData) + +
+ +@endsection diff --git a/resources/views/vendor/rbac/roles/show.blade.php b/resources/views/vendor/rbac/roles/show.blade.php new file mode 100644 index 0000000..99aebad --- /dev/null +++ b/resources/views/vendor/rbac/roles/show.blade.php @@ -0,0 +1,61 @@ +@extends($rbacLayout) +@section('title', __('rbac::roles.role_details')) +@section('content') + +
+

{!! __('rbac::roles.role_details') !!}: {{ $role->name }}

+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
{!! __('rbac::main.attribute') !!}{!! __('rbac::main.value') !!}
{!! __('rbac::main.name') !!}{{ $role->name }}
{!! __('rbac::main.slug') !!}{{ $role->slug }}
{!! __('rbac::main.description') !!}{{ $role->description }}
{!! __('rbac::permissions.permissions') !!} + +
+
+
+
+ +@endsection diff --git a/resources/views/vendor/rbac/users/_fields.blade.php b/resources/views/vendor/rbac/users/_fields.blade.php new file mode 100644 index 0000000..5fc59da --- /dev/null +++ b/resources/views/vendor/rbac/users/_fields.blade.php @@ -0,0 +1,33 @@ +
+
+ +
+ @foreach($allRoles as $key => $role) +
+ id, $currentRoles)) checked @endif > + +
+ + @if(isset($currentRoles) && in_array($role->id, $currentRoles)) + @cannot(Itstructure\LaRbac\Models\Permission::ASSIGN_ROLE_FLAG, Itstructure\LaRbac\Classes\MemberToRole::make($user, $role)) + + @endcannot + @endif + @endforeach +
+
+
+ +@if ($errors->has('roles')) +
+
+ +
+
+@endif \ No newline at end of file diff --git a/resources/views/vendor/rbac/users/edit.blade.php b/resources/views/vendor/rbac/users/edit.blade.php new file mode 100644 index 0000000..fc7ebe1 --- /dev/null +++ b/resources/views/vendor/rbac/users/edit.blade.php @@ -0,0 +1,25 @@ +@extends($rbacLayout) +@section('title', __('rbac::users.assign_roles')) +@section('content') + +
+
+
+ +

{!! __('rbac::users.assign_roles_for_user') !!}: {{ $user->memberName }}

+ +
+ + @include('rbac::users._fields') + + + + + +
+ +
+
+
+ +@stop diff --git a/resources/views/vendor/rbac/users/index.blade.php b/resources/views/vendor/rbac/users/index.blade.php new file mode 100644 index 0000000..1f92f8b --- /dev/null +++ b/resources/views/vendor/rbac/users/index.blade.php @@ -0,0 +1,96 @@ +@extends($rbacLayout) +@section('title', __('rbac::users.users')) +@section('content') + +
+ + @if ($errors->has('items')) +
+
+ +
+
+ @endif + + @php + $gridData = [ + 'dataProvider' => $dataProvider, + 'paginatorOptions' => [ + 'pageName' => 'p', + ], + 'rowsPerPage' => $rbacRowsPerPage, + 'title' => __('rbac::users.users'), + 'rowsFormAction' => route('delete_user'), + 'columnFields' => [ + [ + 'label' => 'ID', + 'attribute' => 'memberKey', + 'htmlAttributes' => [ + 'width' => '5%', + ], + 'filter' => false, + 'sort' => $authIdentifierName + ], + [ + 'label' => __('rbac::users.name'), + 'value' => function ($user) { + return '' . $user->memberName .''; + }, + 'filter' => [ + 'class' => Itstructure\GridView\Filters\TextFilter::class, + 'name' => 'name' + ], + 'sort' => 'name', + 'format' => 'html', + ], + [ + 'label' => __('rbac::roles.roles'), + 'value' => function ($user) { + $output = '
    '; + foreach($user->roles as $role) { + $output .= '
  • ' . $role->name . '
  • '; + } + return $output . '
'; + }, + 'filter' => false, + 'sort' => false, + 'format' => 'html', + ], + [ + 'label' => __('rbac::main.created'), + 'attribute' => 'created_at', + 'filter' => false, + ], + [ + 'class' => Itstructure\GridView\Columns\ActionColumn::class, + 'actionTypes' => [ + 'view' => function ($user) { + return route('show_user', ['id' => $user->memberKey]); + }, + 'edit' => function ($user) { + return route('edit_user', ['id' => $user->memberKey]); + } + ], + 'htmlAttributes' => [ + 'width' => '130', + ], + ], + [ + 'class' => Itstructure\GridView\Columns\CheckboxColumn::class, + 'field' => 'items', + 'attribute' => 'memberKey', + 'display' => function ($user) { + return Gate::allows(Itstructure\LaRbac\Models\Permission::DELETE_MEMBER_FLAG, $user->memberKey); + } + ], + ], + ]; + @endphp + + @gridView($gridData) + +
+ +@endsection diff --git a/resources/views/vendor/rbac/users/show.blade.php b/resources/views/vendor/rbac/users/show.blade.php new file mode 100644 index 0000000..1564415 --- /dev/null +++ b/resources/views/vendor/rbac/users/show.blade.php @@ -0,0 +1,53 @@ +@extends($rbacLayout) +@section('title', __('rbac::users.user_details')) +@section('content') + +
+

{!! __('rbac::users.user_details') !!}: {{ $user->memberName }}

+ +
+
+
+ {!! __('rbac::users.assign_roles') !!} + @can(Itstructure\LaRbac\Models\Permission::DELETE_MEMBER_FLAG, $user->memberKey) + + + + @endcan +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + +
{!! __('rbac::main.attribute') !!}{!! __('rbac::main.value') !!}
{!! __('rbac::users.name') !!}{{ $user->memberName }}
{!! __('rbac::roles.roles') !!} + +
+
+
+
+ +@endsection diff --git a/routes/jetstream.php b/routes/jetstream.php new file mode 100644 index 0000000..8de58fc --- /dev/null +++ b/routes/jetstream.php @@ -0,0 +1,49 @@ + config('jetstream.middleware', ['web'])], function () { + if (Jetstream::hasTermsAndPrivacyPolicyFeature()) { + Route::get('/terms-of-service', [TermsOfServiceController::class, 'show'])->name('terms.show'); + Route::get('/privacy-policy', [PrivacyPolicyController::class, 'show'])->name('policy.show'); + } + + $authMiddleware = config('jetstream.guard') + ? 'auth:'.config('jetstream.guard') + : 'auth'; + + $authSessionMiddleware = config('jetstream.auth_session', false) + ? config('jetstream.auth_session') + : null; + + Route::group(['middleware' => array_values(array_filter([$authMiddleware, $authSessionMiddleware]))], function () { + // User & Profile... + Route::get('/user/profile', [UserProfileController::class, 'show'])->name('profile.show'); + + Route::group(['middleware' => 'verified'], function () { + // API... + if (Jetstream::hasApiFeatures()) { + Route::get('/user/api-tokens', [ApiTokenController::class, 'index'])->name('api-tokens.index'); + } + + // Teams... + if (Jetstream::hasTeamFeatures()) { + Route::get('/teams/create', [TeamController::class, 'create'])->name('teams.create'); + Route::get('/teams/{team}', [TeamController::class, 'show'])->name('teams.show'); + Route::put('/current-team', [CurrentTeamController::class, 'update'])->name('current-team.update'); + + Route::get('/team-invitations/{invitation}', [TeamInvitationController::class, 'accept']) + ->middleware(['signed']) + ->name('team-invitations.accept'); + } + }); + }); +}); diff --git a/sail b/sail new file mode 100644 index 0000000..810a32e --- /dev/null +++ b/sail @@ -0,0 +1,518 @@ +#!/usr/bin/env bash + +UNAMEOUT="$(uname -s)" + +# Verify operating system is supported... +case "${UNAMEOUT}" in + Linux*) MACHINE=linux;; + Darwin*) MACHINE=mac;; + *) MACHINE="UNKNOWN" +esac + +if [ "$MACHINE" == "UNKNOWN" ]; then + echo "Unsupported operating system [$(uname -s)]. Laravel Sail supports macOS, Linux, and Windows (WSL2)." >&2 + + exit 1 +fi + +# Determine if stdout is a terminal... +if test -t 1; then + # Determine if colors are supported... + ncolors=$(tput colors) + + if test -n "$ncolors" && test "$ncolors" -ge 8; then + BOLD="$(tput bold)" + YELLOW="$(tput setaf 3)" + GREEN="$(tput setaf 2)" + NC="$(tput sgr0)" + fi +fi + +# Function that prints the available commands... +function display_help { + echo "Laravel Sail" + echo + echo "${YELLOW}Usage:${NC}" >&2 + echo " sail COMMAND [options] [arguments]" + echo + echo "Unknown commands are passed to the docker-compose binary." + echo + echo "${YELLOW}docker-compose Commands:${NC}" + echo " ${GREEN}sail up${NC} Start the application" + echo " ${GREEN}sail up -d${NC} Start the application in the background" + echo " ${GREEN}sail stop${NC} Stop the application" + echo " ${GREEN}sail restart${NC} Restart the application" + echo " ${GREEN}sail ps${NC} Display the status of all containers" + echo + echo "${YELLOW}Artisan Commands:${NC}" + echo " ${GREEN}sail artisan ...${NC} Run an Artisan command" + echo " ${GREEN}sail artisan queue:work${NC}" + echo + echo "${YELLOW}PHP Commands:${NC}" + echo " ${GREEN}sail php ...${NC} Run a snippet of PHP code" + echo " ${GREEN}sail php -v${NC}" + echo + echo "${YELLOW}Composer Commands:${NC}" + echo " ${GREEN}sail composer ...${NC} Run a Composer command" + echo " ${GREEN}sail composer require laravel/sanctum${NC}" + echo + echo "${YELLOW}Node Commands:${NC}" + echo " ${GREEN}sail node ...${NC} Run a Node command" + echo " ${GREEN}sail node --version${NC}" + echo + echo "${YELLOW}NPM Commands:${NC}" + echo " ${GREEN}sail npm ...${NC} Run a npm command" + echo " ${GREEN}sail npx${NC} Run a npx command" + echo " ${GREEN}sail npm run prod${NC}" + echo + echo "${YELLOW}Yarn Commands:${NC}" + echo " ${GREEN}sail yarn ...${NC} Run a Yarn command" + echo " ${GREEN}sail yarn run prod${NC}" + echo + echo "${YELLOW}Database Commands:${NC}" + echo " ${GREEN}sail mysql${NC} Start a MySQL CLI session within the 'mysql' container" + echo " ${GREEN}sail mariadb${NC} Start a MySQL CLI session within the 'mariadb' container" + echo " ${GREEN}sail psql${NC} Start a PostgreSQL CLI session within the 'pgsql' container" + echo " ${GREEN}sail redis${NC} Start a Redis CLI session within the 'redis' container" + echo + echo "${YELLOW}Debugging:${NC}" + echo " ${GREEN}sail debug ...${NC} Run an Artisan command in debug mode" + echo " ${GREEN}sail debug queue:work${NC}" + echo + echo "${YELLOW}Running Tests:${NC}" + echo " ${GREEN}sail test${NC} Run the PHPUnit tests via the Artisan test command" + echo " ${GREEN}sail phpunit ...${NC} Run PHPUnit" + echo " ${GREEN}sail pest ...${NC} Run Pest" + echo " ${GREEN}sail pint ...${NC} Run Pint" + echo " ${GREEN}sail dusk${NC} Run the Dusk tests (Requires the laravel/dusk package)" + echo " ${GREEN}sail dusk:fails${NC} Re-run previously failed Dusk tests (Requires the laravel/dusk package)" + echo + echo "${YELLOW}Container CLI:${NC}" + echo " ${GREEN}sail shell${NC} Start a shell session within the application container" + echo " ${GREEN}sail bash${NC} Alias for 'sail shell'" + echo " ${GREEN}sail root-shell${NC} Start a root shell session within the application container" + echo " ${GREEN}sail root-bash${NC} Alias for 'sail root-shell'" + echo " ${GREEN}sail tinker${NC} Start a new Laravel Tinker session" + echo + echo "${YELLOW}Sharing:${NC}" + echo " ${GREEN}sail share${NC} Share the application publicly via a temporary URL" + echo " ${GREEN}sail open${NC} Open the site in your browser" + echo + echo "${YELLOW}Binaries:${NC}" + echo " ${GREEN}sail bin ...${NC} Run Composer binary scripts from the vendor/bin directory" + echo + echo "${YELLOW}Customization:${NC}" + echo " ${GREEN}sail artisan sail:publish${NC} Publish the Sail configuration files" + echo " ${GREEN}sail build --no-cache${NC} Rebuild all of the Sail containers" + + exit 1 +} + +# Proxy the "help" command... +if [ $# -gt 0 ]; then + if [ "$1" == "help" ] || [ "$1" == "-h" ] || [ "$1" == "-help" ] || [ "$1" == "--help" ]; then + display_help + fi +else + display_help +fi + +# Source the ".env" file so Laravel's environment variables are available... +if [ ! -z "$APP_ENV" ] && [ -f ./.env.$APP_ENV ]; then + source ./.env.$APP_ENV; +elif [ -f ./.env ]; then + source ./.env; +fi + +# Define environment variables... +export APP_PORT=${APP_PORT:-80} +export APP_SERVICE=${APP_SERVICE:-"laravel.test"} +export DB_PORT=${DB_PORT:-3306} +export WWWUSER=${WWWUSER:-$UID} +export WWWGROUP=${WWWGROUP:-$(id -g)} + +export SAIL_FILES=${SAIL_FILES:-""} +export SAIL_SHARE_DASHBOARD=${SAIL_SHARE_DASHBOARD:-4040} +export SAIL_SHARE_SERVER_HOST=${SAIL_SHARE_SERVER_HOST:-"laravel-sail.site"} +export SAIL_SHARE_SERVER_PORT=${SAIL_SHARE_SERVER_PORT:-8080} +export SAIL_SHARE_SUBDOMAIN=${SAIL_SHARE_SUBDOMAIN:-""} +export SAIL_SHARE_DOMAIN=${SAIL_SHARE_DOMAIN:-"$SAIL_SHARE_SERVER_HOST"} +export SAIL_SHARE_SERVER=${SAIL_SHARE_SERVER:-""} + +# Function that outputs Sail is not running... +function sail_is_not_running { + echo "${BOLD}Sail is not running.${NC}" >&2 + echo "" >&2 + echo "${BOLD}You may Sail using the following commands:${NC} './vendor/bin/sail up' or './vendor/bin/sail up -d'" >&2 + + exit 1 +} + +# Define Docker Compose command prefix... +docker compose &> /dev/null +if [ $? == 0 ]; then + DOCKER_COMPOSE=(docker compose) +else + DOCKER_COMPOSE=(docker-compose) +fi + +if [ -n "$SAIL_FILES" ]; then + # Convert SAIL_FILES to an array... + IFS=':' read -ra SAIL_FILES <<< "$SAIL_FILES" + + for FILE in "${SAIL_FILES[@]}"; do + if [ -f "$FILE" ]; then + DOCKER_COMPOSE+=(-f "$FILE") + else + echo "${BOLD}Unable to find Docker Compose file: '${FILE}'${NC}" >&2 + + exit 1 + fi + done +fi + +EXEC="yes" + +if [ -z "$SAIL_SKIP_CHECKS" ]; then + # Ensure that Docker is running... + if ! docker info > /dev/null 2>&1; then + echo "${BOLD}Docker is not running.${NC}" >&2 + + exit 1 + fi + + # Determine if Sail is currently up... + if "${DOCKER_COMPOSE[@]}" ps "$APP_SERVICE" 2>&1 | grep 'Exit\|exited'; then + echo "${BOLD}Shutting down old Sail processes...${NC}" >&2 + + "${DOCKER_COMPOSE[@]}" down > /dev/null 2>&1 + + EXEC="no" + elif [ -z "$("${DOCKER_COMPOSE[@]}" ps -q)" ]; then + EXEC="no" + fi +fi + +ARGS=() + +# Proxy PHP commands to the "php" binary on the application container... +if [ "$1" == "php" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" "php" "$@") + else + sail_is_not_running + fi + +# Proxy vendor binary commands on the application container... +elif [ "$1" == "bin" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" ./vendor/bin/"$@") + else + sail_is_not_running + fi + +# Proxy docker-compose commands to the docker-compose binary on the application container... +elif [ "$1" == "docker-compose" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" "${DOCKER_COMPOSE[@]}") + else + sail_is_not_running + fi + +# Proxy Composer commands to the "composer" binary on the application container... +elif [ "$1" == "composer" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" "composer" "$@") + else + sail_is_not_running + fi + +# Proxy Artisan commands to the "artisan" binary on the application container... +elif [ "$1" == "artisan" ] || [ "$1" == "art" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" php artisan "$@") + else + sail_is_not_running + fi + +# Proxy the "debug" command to the "php artisan" binary on the application container with xdebug enabled... +elif [ "$1" == "debug" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail -e XDEBUG_SESSION=1) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" php artisan "$@") + else + sail_is_not_running + fi + +# Proxy the "test" command to the "php artisan test" Artisan command... +elif [ "$1" == "test" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" php artisan test "$@") + else + sail_is_not_running + fi + +# Proxy the "phpunit" command to "php vendor/bin/phpunit"... +elif [ "$1" == "phpunit" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" php vendor/bin/phpunit "$@") + else + sail_is_not_running + fi + +# Proxy the "pest" command to "php vendor/bin/pest"... +elif [ "$1" == "pest" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" php vendor/bin/pest "$@") + else + sail_is_not_running + fi + +# Proxy the "pint" command to "php vendor/bin/pint"... +elif [ "$1" == "pint" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" php vendor/bin/pint "$@") + else + sail_is_not_running + fi + +# Proxy the "dusk" command to the "php artisan dusk" Artisan command... +elif [ "$1" == "dusk" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=(-e "APP_URL=http://${APP_SERVICE}") + ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub") + ARGS+=("$APP_SERVICE" php artisan dusk "$@") + else + sail_is_not_running + fi + +# Proxy the "dusk:fails" command to the "php artisan dusk:fails" Artisan command... +elif [ "$1" == "dusk:fails" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=(-e "APP_URL=http://${APP_SERVICE}") + ARGS+=(-e "DUSK_DRIVER_URL=http://selenium:4444/wd/hub") + ARGS+=("$APP_SERVICE" php artisan dusk:fails "$@") + else + sail_is_not_running + fi + +# Initiate a Laravel Tinker session within the application container... +elif [ "$1" == "tinker" ] ; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" php artisan tinker) + else + sail_is_not_running + fi + +# Proxy Node commands to the "node" binary on the application container... +elif [ "$1" == "node" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" node "$@") + else + sail_is_not_running + fi + +# Proxy NPM commands to the "npm" binary on the application container... +elif [ "$1" == "npm" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" npm "$@") + else + sail_is_not_running + fi + +# Proxy NPX commands to the "npx" binary on the application container... +elif [ "$1" == "npx" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" npx "$@") + else + sail_is_not_running + fi + +# Proxy YARN commands to the "yarn" binary on the application container... +elif [ "$1" == "yarn" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" yarn "$@") + else + sail_is_not_running + fi + +# Initiate a MySQL CLI terminal session within the "mysql" container... +elif [ "$1" == "mysql" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=(mysql bash -c) + ARGS+=("MYSQL_PWD=\${MYSQL_PASSWORD} mysql -u \${MYSQL_USER} \${MYSQL_DATABASE}") + else + sail_is_not_running + fi + +# Initiate a MySQL CLI terminal session within the "mariadb" container... +elif [ "$1" == "mariadb" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=(mariadb bash -c) + ARGS+=("MYSQL_PWD=\${MYSQL_PASSWORD} mysql -u \${MYSQL_USER} \${MYSQL_DATABASE}") + else + sail_is_not_running + fi + +# Initiate a PostgreSQL CLI terminal session within the "pgsql" container... +elif [ "$1" == "psql" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=(pgsql bash -c) + ARGS+=("PGPASSWORD=\${PGPASSWORD} psql -U \${POSTGRES_USER} \${POSTGRES_DB}") + else + sail_is_not_running + fi + +# Initiate a Bash shell within the application container... +elif [ "$1" == "shell" ] || [ "$1" == "bash" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec -u sail) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" bash "$@") + else + sail_is_not_running + fi + +# Initiate a root user Bash shell within the application container... +elif [ "$1" == "root-shell" ] || [ "$1" == "root-bash" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=("$APP_SERVICE" bash "$@") + else + sail_is_not_running + fi + +# Initiate a Redis CLI terminal session within the "redis" container... +elif [ "$1" == "redis" ] ; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + ARGS+=(exec) + [ ! -t 0 ] && ARGS+=(-T) + ARGS+=(redis redis-cli) + else + sail_is_not_running + fi + +# Share the site... +elif [ "$1" == "share" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + docker run --init --rm -p "$SAIL_SHARE_DASHBOARD":4040 -t beyondcodegmbh/expose-server:latest share http://host.docker.internal:"$APP_PORT" \ + --server-host="$SAIL_SHARE_SERVER_HOST" \ + --server-port="$SAIL_SHARE_SERVER_PORT" \ + --auth="$SAIL_SHARE_TOKEN" \ + --server="$SAIL_SHARE_SERVER" \ + --subdomain="$SAIL_SHARE_SUBDOMAIN" \ + --domain="$SAIL_SHARE_DOMAIN" \ + "$@" + + exit + else + sail_is_not_running + fi + +# Open the site... +elif [ "$1" == "open" ]; then + shift 1 + + if [ "$EXEC" == "yes" ]; then + open $APP_URL + + exit + else + sail_is_not_running + fi + +# Pass unknown commands to the "docker-compose" binary... +else + ARGS+=("$@") +fi + +# Run Docker Compose with the defined arguments... +"${DOCKER_COMPOSE[@]}" "${ARGS[@]}"