diff --git a/.circleci/config.yml b/.circleci/config.yml index 4725eb32a..ba36559bc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,12 @@ jobs: steps: - checkout - - run: sudo apt update && sudo apt install zlib1g-dev libsqlite3-dev + - run: + name: "Create Environment file and generate app key" + command: | + mv .env.testing .env + + - run: sudo apt install zlib1g-dev libsqlite3-dev # Download and cache dependencies @@ -36,18 +41,17 @@ jobs: - run: composer install -n --prefer-dist - save_cache: - key: composer-v2-{{ checksum "composer.lock" }} + key: v2-dependencies-{{ checksum "composer.json" }} paths: - vendor - - run: cp .env.testing .env - run: php artisan config:cache - run: php artisan route:clear - run: php artisan storage:link - run: php artisan key:generate # run tests with phpunit or codecept - - run: ./vendor/bin/phpunit + - run: php artisan test - store_test_results: path: tests/_output - store_artifacts: diff --git a/app/Console/Commands/AvatarStorage.php b/app/Console/Commands/AvatarStorage.php index 054802f42..a6bb70e3d 100644 --- a/app/Console/Commands/AvatarStorage.php +++ b/app/Console/Commands/AvatarStorage.php @@ -82,7 +82,7 @@ class AvatarStorage extends Command $this->line(' '); - if(config_cache('pixelfed.cloud_storage')) { + if((bool) config_cache('pixelfed.cloud_storage')) { $this->info('✅ - Cloud storage configured'); $this->line(' '); } @@ -92,7 +92,7 @@ class AvatarStorage extends Command $this->line(' '); } - if(config_cache('pixelfed.cloud_storage') && config('instance.avatar.local_to_cloud')) { + if((bool) config_cache('pixelfed.cloud_storage') && config('instance.avatar.local_to_cloud')) { $disk = Storage::disk(config_cache('filesystems.cloud')); $exists = $disk->exists('cache/avatars/default.jpg'); $state = $exists ? '✅' : '❌'; @@ -100,7 +100,7 @@ class AvatarStorage extends Command $this->info($msg); } - $options = config_cache('pixelfed.cloud_storage') && config('instance.avatar.local_to_cloud') ? + $options = (bool) config_cache('pixelfed.cloud_storage') && config('instance.avatar.local_to_cloud') ? [ 'Cancel', 'Upload default avatar to cloud', @@ -164,7 +164,7 @@ class AvatarStorage extends Command protected function uploadAvatarsToCloud() { - if(!config_cache('pixelfed.cloud_storage') || !config('instance.avatar.local_to_cloud')) { + if(!(bool) config_cache('pixelfed.cloud_storage') || !config('instance.avatar.local_to_cloud')) { $this->error('Enable cloud storage and avatar cloud storage to perform this action'); return; } @@ -213,7 +213,7 @@ class AvatarStorage extends Command return; } - if(config_cache('pixelfed.cloud_storage') == false && config_cache('federation.avatars.store_local') == false) { + if((bool) config_cache('pixelfed.cloud_storage') == false && config_cache('federation.avatars.store_local') == false) { $this->error('You have cloud storage disabled and local avatar storage disabled, we cannot refetch avatars.'); return; } diff --git a/app/Console/Commands/AvatarStorageDeepClean.php b/app/Console/Commands/AvatarStorageDeepClean.php index 5840142f5..6f773bd42 100644 --- a/app/Console/Commands/AvatarStorageDeepClean.php +++ b/app/Console/Commands/AvatarStorageDeepClean.php @@ -44,7 +44,7 @@ class AvatarStorageDeepClean extends Command $this->line(' '); $storage = [ - 'cloud' => boolval(config_cache('pixelfed.cloud_storage')), + 'cloud' => (bool) config_cache('pixelfed.cloud_storage'), 'local' => boolval(config_cache('federation.avatars.store_local')) ]; diff --git a/app/Console/Commands/CloudMediaMigrate.php b/app/Console/Commands/CloudMediaMigrate.php index 0f2d177b8..174b33e83 100644 --- a/app/Console/Commands/CloudMediaMigrate.php +++ b/app/Console/Commands/CloudMediaMigrate.php @@ -35,12 +35,16 @@ class CloudMediaMigrate extends Command */ public function handle() { - $enabled = config('pixelfed.cloud_storage'); + $enabled = (bool) config_cache('pixelfed.cloud_storage'); if(!$enabled) { $this->error('Cloud storage not enabled. Exiting...'); return; } + if(!$this->confirm('Are you sure you want to proceed?')) { + return; + } + $limit = $this->option('limit'); $hugeMode = $this->option('huge'); diff --git a/app/Console/Commands/FetchMissingMediaMimeType.php b/app/Console/Commands/FetchMissingMediaMimeType.php index 16aeb5f59..27ae23e4c 100644 --- a/app/Console/Commands/FetchMissingMediaMimeType.php +++ b/app/Console/Commands/FetchMissingMediaMimeType.php @@ -2,11 +2,11 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; use App\Media; -use Illuminate\Support\Facades\Http; use App\Services\MediaService; use App\Services\StatusService; +use Illuminate\Console\Command; +use Illuminate\Support\Facades\Http; class FetchMissingMediaMimeType extends Command { @@ -29,20 +29,20 @@ class FetchMissingMediaMimeType extends Command */ public function handle() { - foreach(Media::whereNotNull(['remote_url', 'status_id'])->whereNull('mime')->lazyByIdDesc(50, 'id') as $media) { + foreach (Media::whereNotNull(['remote_url', 'status_id'])->whereNull('mime')->lazyByIdDesc(50, 'id') as $media) { $res = Http::retry(2, 100, throw: false)->head($media->remote_url); - if(!$res->successful()) { + if (! $res->successful()) { continue; } - if(!in_array($res->header('content-type'), explode(',',config('pixelfed.media_types')))) { + if (! in_array($res->header('content-type'), explode(',', config_cache('pixelfed.media_types')))) { continue; } $media->mime = $res->header('content-type'); - if($res->hasHeader('content-length')) { + if ($res->hasHeader('content-length')) { $media->size = $res->header('content-length'); } @@ -50,7 +50,7 @@ class FetchMissingMediaMimeType extends Command MediaService::del($media->status_id); StatusService::del($media->status_id); - $this->info('mid:'.$media->id . ' (' . $res->header('content-type') . ':' . $res->header('content-length') . ' bytes)'); + $this->info('mid:'.$media->id.' ('.$res->header('content-type').':'.$res->header('content-length').' bytes)'); } } } diff --git a/app/Console/Commands/FixMediaDriver.php b/app/Console/Commands/FixMediaDriver.php index c743d6c64..a20b0574e 100644 --- a/app/Console/Commands/FixMediaDriver.php +++ b/app/Console/Commands/FixMediaDriver.php @@ -37,7 +37,7 @@ class FixMediaDriver extends Command return Command::SUCCESS; } - if(config_cache('pixelfed.cloud_storage') == false) { + if((bool) config_cache('pixelfed.cloud_storage') == false) { $this->error('Cloud storage not enabled, exiting...'); return Command::SUCCESS; } diff --git a/app/Console/Commands/MediaCloudUrlRewrite.php b/app/Console/Commands/MediaCloudUrlRewrite.php index 54329f7c7..367c22d1f 100644 --- a/app/Console/Commands/MediaCloudUrlRewrite.php +++ b/app/Console/Commands/MediaCloudUrlRewrite.php @@ -47,7 +47,7 @@ class MediaCloudUrlRewrite extends Command implements PromptsForMissingInput protected function preflightCheck() { - if(config_cache('pixelfed.cloud_storage') != true) { + if(!(bool) config_cache('pixelfed.cloud_storage')) { $this->info('Error: Cloud storage is not enabled!'); $this->error('Aborting...'); exit; diff --git a/app/Console/Commands/MediaS3GarbageCollector.php b/app/Console/Commands/MediaS3GarbageCollector.php index b6cda43c3..e66fdd2a8 100644 --- a/app/Console/Commands/MediaS3GarbageCollector.php +++ b/app/Console/Commands/MediaS3GarbageCollector.php @@ -45,7 +45,7 @@ class MediaS3GarbageCollector extends Command */ public function handle() { - $enabled = in_array(config_cache('pixelfed.cloud_storage'), ['1', true, 'true']); + $enabled = (bool) config_cache('pixelfed.cloud_storage'); if(!$enabled) { $this->error('Cloud storage not enabled. Exiting...'); return; diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index dcee73ee1..938696a1d 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -33,7 +33,7 @@ class Kernel extends ConsoleKernel $schedule->command('gc:passwordreset')->dailyAt('09:41')->onOneServer(); $schedule->command('gc:sessions')->twiceDaily(13, 23)->onOneServer(); - if (in_array(config_cache('pixelfed.cloud_storage'), ['1', true, 'true']) && config('media.delete_local_after_cloud')) { + if ((bool) config_cache('pixelfed.cloud_storage') && (bool) config_cache('media.delete_local_after_cloud')) { $schedule->command('media:s3gc')->hourlyAt(15); } diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 90810008b..7000ace07 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -157,7 +157,7 @@ class AccountController extends Controller $pid = $request->user()->profile_id; $count = UserFilterService::muteCount($pid); - $maxLimit = intval(config('instance.user_filters.max_user_mutes')); + $maxLimit = (int) config_cache('instance.user_filters.max_user_mutes'); abort_if($count >= $maxLimit, 422, self::FILTER_LIMIT_MUTE_TEXT . $maxLimit . ' accounts'); if($count == 0) { $filterCount = UserFilter::whereUserId($pid)->count(); @@ -260,7 +260,7 @@ class AccountController extends Controller ]); $pid = $request->user()->profile_id; $count = UserFilterService::blockCount($pid); - $maxLimit = intval(config('instance.user_filters.max_user_blocks')); + $maxLimit = (int) config_cache('instance.user_filters.max_user_blocks'); abort_if($count >= $maxLimit, 422, self::FILTER_LIMIT_BLOCK_TEXT . $maxLimit . ' accounts'); if($count == 0) { $filterCount = UserFilter::whereUserId($pid)->whereFilterType('block')->count(); diff --git a/app/Http/Controllers/Admin/AdminDirectoryController.php b/app/Http/Controllers/Admin/AdminDirectoryController.php index 8d3e4b7fc..ce53ea560 100644 --- a/app/Http/Controllers/Admin/AdminDirectoryController.php +++ b/app/Http/Controllers/Admin/AdminDirectoryController.php @@ -2,30 +2,20 @@ namespace App\Http\Controllers\Admin; -use DB, Cache; -use App\{ - DiscoverCategory, - DiscoverCategoryHashtag, - Hashtag, - Media, - Profile, - Status, - StatusHashtag, - User -}; +use App\Http\Controllers\PixelfedDirectoryController; use App\Models\ConfigCache; use App\Services\AccountService; use App\Services\ConfigCacheService; use App\Services\StatusService; -use Carbon\Carbon; +use App\Status; +use App\User; +use Cache; use Illuminate\Http\Request; -use Illuminate\Validation\Rule; -use League\ISO3166\ISO3166; -use Illuminate\Support\Str; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Validator; -use Illuminate\Support\Facades\Http; -use App\Http\Controllers\PixelfedDirectoryController; +use Illuminate\Support\Str; +use League\ISO3166\ISO3166; trait AdminDirectoryController { @@ -41,37 +31,37 @@ trait AdminDirectoryController $res['countries'] = collect((new ISO3166)->all())->pluck('name'); $res['admins'] = User::whereIsAdmin(true) ->where('2fa_enabled', true) - ->get()->map(function($user) { - return [ - 'uid' => (string) $user->id, - 'pid' => (string) $user->profile_id, - 'username' => $user->username, - 'created_at' => $user->created_at - ]; - }); + ->get()->map(function ($user) { + return [ + 'uid' => (string) $user->id, + 'pid' => (string) $user->profile_id, + 'username' => $user->username, + 'created_at' => $user->created_at, + ]; + }); $config = ConfigCache::whereK('pixelfed.directory')->first(); - if($config) { + if ($config) { $data = $config->v ? json_decode($config->v, true) : []; $res = array_merge($res, $data); } - if(empty($res['summary'])) { + if (empty($res['summary'])) { $summary = ConfigCache::whereK('app.short_description')->pluck('v'); $res['summary'] = $summary ? $summary[0] : null; } - if(isset($res['banner_image']) && !empty($res['banner_image'])) { + if (isset($res['banner_image']) && ! empty($res['banner_image'])) { $res['banner_image'] = url(Storage::url($res['banner_image'])); } - if(isset($res['favourite_posts'])) { - $res['favourite_posts'] = collect($res['favourite_posts'])->map(function($id) { + if (isset($res['favourite_posts'])) { + $res['favourite_posts'] = collect($res['favourite_posts'])->map(function ($id) { return StatusService::get($id); }) - ->filter(function($post) { - return $post && isset($post['account']); - }) - ->values(); + ->filter(function ($post) { + return $post && isset($post['account']); + }) + ->values(); } $res['community_guidelines'] = config_cache('app.rules') ? json_decode(config_cache('app.rules'), true) : []; @@ -84,22 +74,22 @@ trait AdminDirectoryController $res['feature_config'] = [ 'media_types' => Str::of(config_cache('pixelfed.media_types'))->explode(','), 'image_quality' => config_cache('pixelfed.image_quality'), - 'optimize_image' => config_cache('pixelfed.optimize_image'), + 'optimize_image' => (bool) config_cache('pixelfed.optimize_image'), 'max_photo_size' => config_cache('pixelfed.max_photo_size'), 'max_caption_length' => config_cache('pixelfed.max_caption_length'), 'max_altext_length' => config_cache('pixelfed.max_altext_length'), - 'enforce_account_limit' => config_cache('pixelfed.enforce_account_limit'), + 'enforce_account_limit' => (bool) config_cache('pixelfed.enforce_account_limit'), 'max_account_size' => config_cache('pixelfed.max_account_size'), 'max_album_length' => config_cache('pixelfed.max_album_length'), - 'account_deletion' => config_cache('pixelfed.account_deletion'), + 'account_deletion' => (bool) config_cache('pixelfed.account_deletion'), ]; - if(config_cache('pixelfed.directory.testimonials')) { - $testimonials = collect(json_decode(config_cache('pixelfed.directory.testimonials'),true)) - ->map(function($t) { + if (config_cache('pixelfed.directory.testimonials')) { + $testimonials = collect(json_decode(config_cache('pixelfed.directory.testimonials'), true)) + ->map(function ($t) { return [ 'profile' => AccountService::get($t['profile_id']), - 'body' => $t['body'] + 'body' => $t['body'], ]; }); $res['testimonials'] = $testimonials; @@ -108,8 +98,8 @@ trait AdminDirectoryController $validator = Validator::make($res['feature_config'], [ 'media_types' => [ 'required', - function ($attribute, $value, $fail) { - if (!in_array('image/jpeg', $value->toArray()) || !in_array('image/png', $value->toArray())) { + function ($attribute, $value, $fail) { + if (! in_array('image/jpeg', $value->toArray()) || ! in_array('image/png', $value->toArray())) { $fail('You must enable image/jpeg and image/png support.'); } }, @@ -120,7 +110,7 @@ trait AdminDirectoryController 'max_account_size' => 'required_if:enforce_account_limit,true|integer|min:1000000', 'max_album_length' => 'required|integer|min:4|max:20', 'account_deletion' => 'required|accepted', - 'max_caption_length' => 'required|integer|min:500|max:10000' + 'max_caption_length' => 'required|integer|min:500|max:10000', ]); $res['requirements_validator'] = $validator->errors(); @@ -146,11 +136,11 @@ trait AdminDirectoryController foreach (new \DirectoryIterator($path) as $io) { $name = $io->getFilename(); $skip = ['vendor']; - if($io->isDot() || in_array($name, $skip)) { + if ($io->isDot() || in_array($name, $skip)) { continue; } - if($io->isDir()) { + if ($io->isDir()) { $langs->push(['code' => $name, 'name' => locale_get_display_name($name)]); } } @@ -159,25 +149,26 @@ trait AdminDirectoryController $res['primary_locale'] = config('app.locale'); $submissionState = Http::withoutVerifying() - ->post('https://pixelfed.org/api/v1/directory/check-submission', [ - 'domain' => config('pixelfed.domain.app') - ]); + ->post('https://pixelfed.org/api/v1/directory/check-submission', [ + 'domain' => config('pixelfed.domain.app'), + ]); $res['submission_state'] = $submissionState->json(); + return $res; } protected function validVal($res, $val, $count = false, $minLen = false) { - if(!isset($res[$val])) { + if (! isset($res[$val])) { return false; } - if($count) { + if ($count) { return count($res[$val]) >= $count; } - if($minLen) { + if ($minLen) { return strlen($res[$val]) >= $minLen; } @@ -194,11 +185,11 @@ trait AdminDirectoryController 'favourite_posts' => 'array|max:12', 'favourite_posts.*' => 'distinct', 'privacy_pledge' => 'sometimes', - 'banner_image' => 'sometimes|mimes:jpg,png|dimensions:width=1920,height:1080|max:5000' + 'banner_image' => 'sometimes|mimes:jpg,png|dimensions:width=1920,height:1080|max:5000', ]); $config = ConfigCache::firstOrNew([ - 'k' => 'pixelfed.directory' + 'k' => 'pixelfed.directory', ]); $res = $config->v ? json_decode($config->v, true) : []; @@ -208,26 +199,27 @@ trait AdminDirectoryController $res['contact_email'] = $request->input('contact_email'); $res['privacy_pledge'] = (bool) $request->input('privacy_pledge'); - if($request->filled('location')) { + if ($request->filled('location')) { $exists = (new ISO3166)->name($request->location); - if($exists) { + if ($exists) { $res['location'] = $request->input('location'); } } - if($request->hasFile('banner_image')) { + if ($request->hasFile('banner_image')) { collect(Storage::files('public/headers')) - ->filter(function($name) { - $protected = [ - 'public/headers/.gitignore', - 'public/headers/default.jpg', - 'public/headers/missing.png' - ]; - return !in_array($name, $protected); - }) - ->each(function($name) { - Storage::delete($name); - }); + ->filter(function ($name) { + $protected = [ + 'public/headers/.gitignore', + 'public/headers/default.jpg', + 'public/headers/missing.png', + ]; + + return ! in_array($name, $protected); + }) + ->each(function ($name) { + Storage::delete($name); + }); $path = $request->file('banner_image')->storePublicly('public/headers'); $res['banner_image'] = $path; ConfigCacheService::put('app.banner_image', url(Storage::url($path))); @@ -240,9 +232,10 @@ trait AdminDirectoryController ConfigCacheService::put('pixelfed.directory', $config->v); $updated = json_decode($config->v, true); - if(isset($updated['banner_image'])) { + if (isset($updated['banner_image'])) { $updated['banner_image'] = url(Storage::url($updated['banner_image'])); } + return $updated; } @@ -253,7 +246,7 @@ trait AdminDirectoryController 'open_registration' => (bool) config_cache('pixelfed.open_registration'), 'curated_onboarding' => (bool) config_cache('instance.curated_registration.enabled'), 'activitypub_enabled' => config_cache('federation.activitypub.enabled'), - 'oauth_enabled' => config_cache('pixelfed.oauth_enabled'), + 'oauth_enabled' => (bool) config_cache('pixelfed.oauth_enabled'), 'media_types' => Str::of(config_cache('pixelfed.media_types'))->explode(','), 'image_quality' => config_cache('pixelfed.image_quality'), 'optimize_image' => config_cache('pixelfed.optimize_image'), @@ -273,8 +266,8 @@ trait AdminDirectoryController 'oauth_enabled' => 'required|accepted', 'media_types' => [ 'required', - function ($attribute, $value, $fail) { - if (!in_array('image/jpeg', $value->toArray()) || !in_array('image/png', $value->toArray())) { + function ($attribute, $value, $fail) { + if (! in_array('image/jpeg', $value->toArray()) || ! in_array('image/png', $value->toArray())) { $fail('You must enable image/jpeg and image/png support.'); } }, @@ -285,10 +278,10 @@ trait AdminDirectoryController 'max_account_size' => 'required_if:enforce_account_limit,true|integer|min:1000000', 'max_album_length' => 'required|integer|min:4|max:20', 'account_deletion' => 'required|accepted', - 'max_caption_length' => 'required|integer|min:500|max:10000' + 'max_caption_length' => 'required|integer|min:500|max:10000', ]); - if(!$validator->validate()) { + if (! $validator->validate()) { return response()->json($validator->errors(), 422); } @@ -297,6 +290,7 @@ trait AdminDirectoryController $data = (new PixelfedDirectoryController())->buildListing(); $res = Http::withoutVerifying()->post('https://pixelfed.org/api/v1/directory/submission', $data); + return 200; } @@ -304,7 +298,7 @@ trait AdminDirectoryController { $bannerImage = ConfigCache::whereK('app.banner_image')->first(); $directory = ConfigCache::whereK('pixelfed.directory')->first(); - if(!$bannerImage && !$directory || empty($directory->v)) { + if (! $bannerImage && ! $directory || empty($directory->v)) { return; } $directoryArr = json_decode($directory->v, true); @@ -312,12 +306,12 @@ trait AdminDirectoryController $protected = [ 'public/headers/.gitignore', 'public/headers/default.jpg', - 'public/headers/missing.png' + 'public/headers/missing.png', ]; - if(!$path || in_array($path, $protected)) { + if (! $path || in_array($path, $protected)) { return; } - if(Storage::exists($directoryArr['banner_image'])) { + if (Storage::exists($directoryArr['banner_image'])) { Storage::delete($directoryArr['banner_image']); } @@ -328,12 +322,13 @@ trait AdminDirectoryController $bannerImage->save(); Cache::forget('api:v1:instance-data-response-v1'); ConfigCacheService::put('pixelfed.directory', $directory); + return $bannerImage->v; } public function directoryGetPopularPosts(Request $request) { - $ids = Cache::remember('admin:api:popular_posts', 86400, function() { + $ids = Cache::remember('admin:api:popular_posts', 86400, function () { return Status::whereLocal(true) ->whereScope('public') ->whereType('photo') @@ -343,21 +338,21 @@ trait AdminDirectoryController ->pluck('id'); }); - $res = $ids->map(function($id) { + $res = $ids->map(function ($id) { return StatusService::get($id); }) - ->filter(function($post) { - return $post && isset($post['account']); - }) - ->values(); + ->filter(function ($post) { + return $post && isset($post['account']); + }) + ->values(); - return response()->json($res, 200, [], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); + return response()->json($res, 200, [], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } public function directoryGetAddPostByIdSearch(Request $request) { $this->validate($request, [ - 'q' => 'required|integer' + 'q' => 'required|integer', ]); $id = $request->input('q'); @@ -380,11 +375,12 @@ trait AdminDirectoryController $profile_id = $request->input('profile_id'); $testimonials = ConfigCache::whereK('pixelfed.directory.testimonials')->firstOrFail(); $existing = collect(json_decode($testimonials->v, true)) - ->filter(function($t) use($profile_id) { + ->filter(function ($t) use ($profile_id) { return $t['profile_id'] !== $profile_id; }) ->values(); ConfigCacheService::put('pixelfed.directory.testimonials', $existing); + return $existing; } @@ -392,13 +388,13 @@ trait AdminDirectoryController { $this->validate($request, [ 'username' => 'required', - 'body' => 'required|string|min:5|max:500' + 'body' => 'required|string|min:5|max:500', ]); $user = User::whereUsername($request->input('username'))->whereNull('status')->firstOrFail(); $configCache = ConfigCache::firstOrCreate([ - 'k' => 'pixelfed.directory.testimonials' + 'k' => 'pixelfed.directory.testimonials', ]); $testimonials = $configCache->v ? collect(json_decode($configCache->v, true)) : collect([]); @@ -409,7 +405,7 @@ trait AdminDirectoryController $testimonials->push([ 'profile_id' => (string) $user->profile_id, 'username' => $request->input('username'), - 'body' => $request->input('body') + 'body' => $request->input('body'), ]); $configCache->v = json_encode($testimonials->toArray()); @@ -417,8 +413,9 @@ trait AdminDirectoryController ConfigCacheService::put('pixelfed.directory.testimonials', $configCache->v); $res = [ 'profile' => AccountService::get($user->profile_id), - 'body' => $request->input('body') + 'body' => $request->input('body'), ]; + return $res; } @@ -426,7 +423,7 @@ trait AdminDirectoryController { $this->validate($request, [ 'profile_id' => 'required', - 'body' => 'required|string|min:5|max:500' + 'body' => 'required|string|min:5|max:500', ]); $profile_id = $request->input('profile_id'); @@ -434,18 +431,19 @@ trait AdminDirectoryController $user = User::whereProfileId($profile_id)->firstOrFail(); $configCache = ConfigCache::firstOrCreate([ - 'k' => 'pixelfed.directory.testimonials' + 'k' => 'pixelfed.directory.testimonials', ]); $testimonials = $configCache->v ? collect(json_decode($configCache->v, true)) : collect([]); - $updated = $testimonials->map(function($t) use($profile_id, $body) { - if($t['profile_id'] == $profile_id) { + $updated = $testimonials->map(function ($t) use ($profile_id, $body) { + if ($t['profile_id'] == $profile_id) { $t['body'] = $body; } + return $t; }) - ->values(); + ->values(); $configCache->v = json_encode($updated); $configCache->save(); diff --git a/app/Http/Controllers/Admin/AdminSettingsController.php b/app/Http/Controllers/Admin/AdminSettingsController.php index 525f6114c..98e16bbc0 100644 --- a/app/Http/Controllers/Admin/AdminSettingsController.php +++ b/app/Http/Controllers/Admin/AdminSettingsController.php @@ -7,7 +7,9 @@ use App\Models\InstanceActor; use App\Page; use App\Profile; use App\Services\AccountService; +use App\Services\AdminSettingsService; use App\Services\ConfigCacheService; +use App\Services\FilesystemService; use App\User; use App\Util\Site\Config; use Artisan; @@ -71,6 +73,7 @@ trait AdminSettingsController 'admin_account_id' => 'nullable', 'regs' => 'required|in:open,filtered,closed', 'account_migration' => 'nullable', + 'rule_delete' => 'sometimes', ]); $orb = false; @@ -310,4 +313,573 @@ trait AdminSettingsController return view('admin.settings.system', compact('sys')); } + + public function settingsApiFetch(Request $request) + { + $cloud_storage = ConfigCacheService::get('pixelfed.cloud_storage'); + $cloud_disk = config('filesystems.cloud'); + $cloud_ready = ! empty(config('filesystems.disks.'.$cloud_disk.'.key')) && ! empty(config('filesystems.disks.'.$cloud_disk.'.secret')); + $types = explode(',', ConfigCacheService::get('pixelfed.media_types')); + $rules = ConfigCacheService::get('app.rules') ? json_decode(ConfigCacheService::get('app.rules'), true) : []; + $jpeg = in_array('image/jpg', $types) || in_array('image/jpeg', $types); + $png = in_array('image/png', $types); + $gif = in_array('image/gif', $types); + $mp4 = in_array('video/mp4', $types); + $webp = in_array('image/webp', $types); + + $availableAdmins = User::whereIsAdmin(true)->get(); + $currentAdmin = config_cache('instance.admin.pid') ? AccountService::get(config_cache('instance.admin.pid'), true) : null; + $openReg = (bool) config_cache('pixelfed.open_registration'); + $curOnboarding = (bool) config_cache('instance.curated_registration.enabled'); + $regState = $openReg ? 'open' : ($curOnboarding ? 'filtered' : 'closed'); + $accountMigration = (bool) config_cache('federation.migration'); + $autoFollow = config_cache('account.autofollow_usernames'); + if (strlen($autoFollow) > 3) { + $autoFollow = explode(',', $autoFollow); + } + + $res = AdminSettingsService::getAll(); + + return response()->json($res); + } + + public function settingsApiRulesAdd(Request $request) + { + $this->validate($request, [ + 'rule' => 'required|string|min:5|max:1000', + ]); + + $rules = ConfigCacheService::get('app.rules'); + $val = $request->input('rule'); + if (! $rules) { + ConfigCacheService::put('app.rules', json_encode([$val])); + } else { + $json = json_decode($rules, true); + $count = count($json); + if ($count >= 30) { + return response()->json(['message' => 'Max rules limit reached, you can set up to 30 rules at a time.'], 400); + } + $json[] = $val; + ConfigCacheService::put('app.rules', json_encode(array_values($json))); + } + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Config::refresh(); + + return [$val]; + } + + public function settingsApiRulesDelete(Request $request) + { + $this->validate($request, [ + 'rule' => 'required|string', + ]); + + $rules = ConfigCacheService::get('app.rules'); + $val = $request->input('rule'); + + if (! $rules) { + return []; + } else { + $json = json_decode($rules, true); + $idx = array_search($val, $json); + if ($idx !== false) { + unset($json[$idx]); + $json = array_values($json); + } + ConfigCacheService::put('app.rules', json_encode(array_values($json))); + } + + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Config::refresh(); + + return response()->json($json); + } + + public function settingsApiRulesDeleteAll(Request $request) + { + $rules = ConfigCacheService::get('app.rules'); + + if (! $rules) { + return []; + } else { + ConfigCacheService::put('app.rules', json_encode([])); + } + + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Config::refresh(); + + return response()->json([]); + } + + public function settingsApiAutofollowDelete(Request $request) + { + $this->validate($request, [ + 'username' => 'required|string', + ]); + + $username = $request->input('username'); + $names = []; + $existing = config_cache('account.autofollow_usernames'); + if ($existing) { + $names = explode(',', $existing); + } + + if (in_array($username, $names)) { + $key = array_search($username, $names); + if ($key !== false) { + unset($names[$key]); + } + } + ConfigCacheService::put('account.autofollow_usernames', implode(',', $names)); + + return response()->json(['accounts' => array_values($names)]); + } + + public function settingsApiAutofollowAdd(Request $request) + { + $this->validate($request, [ + 'username' => 'required|string', + ]); + + $username = $request->input('username'); + $names = []; + $existing = config_cache('account.autofollow_usernames'); + if ($existing) { + $names = explode(',', $existing); + } + + if ($existing && count($names)) { + if (count($names) >= 5) { + return response()->json(['message' => 'You can only add up to 5 accounts to be autofollowed.'], 400); + } + if (in_array(strtolower($username), array_map('strtolower', $names))) { + return response()->json(['message' => 'User already exists, please try again.'], 400); + } + } + + $p = User::whereUsername($username)->whereNull('status')->first(); + if (! $p || in_array($p->username, $names)) { + abort(404); + } + array_push($names, $p->username); + ConfigCacheService::put('account.autofollow_usernames', implode(',', $names)); + + return response()->json(['accounts' => array_values($names)]); + } + + public function settingsApiUpdateType(Request $request, $type) + { + abort_unless(in_array($type, [ + 'posts', + 'platform', + 'home', + 'landing', + 'branding', + 'media', + 'users', + 'storage', + ]), 400); + + switch ($type) { + case 'home': + return $this->settingsApiUpdateHomeType($request); + break; + + case 'landing': + return $this->settingsApiUpdateLandingType($request); + break; + + case 'posts': + return $this->settingsApiUpdatePostsType($request); + break; + + case 'platform': + return $this->settingsApiUpdatePlatformType($request); + break; + + case 'branding': + return $this->settingsApiUpdateBrandingType($request); + break; + + case 'media': + return $this->settingsApiUpdateMediaType($request); + break; + + case 'users': + return $this->settingsApiUpdateUsersType($request); + break; + + case 'storage': + return $this->settingsApiUpdateStorageType($request); + break; + + default: + abort(404); + break; + } + } + + public function settingsApiUpdateHomeType($request) + { + $this->validate($request, [ + 'registration_status' => 'required|in:open,filtered,closed', + 'cloud_storage' => 'required', + 'activitypub_enabled' => 'required', + 'account_migration' => 'required', + 'mobile_apis' => 'required', + 'stories' => 'required', + 'instagram_import' => 'required', + 'autospam_enabled' => 'required', + ]); + + $regStatus = $request->input('registration_status'); + ConfigCacheService::put('pixelfed.open_registration', $regStatus === 'open'); + ConfigCacheService::put('instance.curated_registration.enabled', $regStatus === 'filtered'); + $cloudStorage = $request->boolean('cloud_storage'); + if ($cloudStorage !== (bool) config_cache('pixelfed.cloud_storage')) { + if (! $cloudStorage) { + ConfigCacheService::put('pixelfed.cloud_storage', false); + } else { + $cloud_disk = config('filesystems.cloud'); + $cloud_ready = ! empty(config('filesystems.disks.'.$cloud_disk.'.key')) && ! empty(config('filesystems.disks.'.$cloud_disk.'.secret')); + if (! $cloud_ready) { + return redirect()->back()->withErrors(['cloud_storage' => 'Must configure cloud storage before enabling!']); + } else { + ConfigCacheService::put('pixelfed.cloud_storage', true); + } + } + } + ConfigCacheService::put('federation.activitypub.enabled', $request->boolean('activitypub_enabled')); + ConfigCacheService::put('federation.migration', $request->boolean('account_migration')); + ConfigCacheService::put('pixelfed.oauth_enabled', $request->boolean('mobile_apis')); + ConfigCacheService::put('instance.stories.enabled', $request->boolean('stories')); + ConfigCacheService::put('pixelfed.import.instagram.enabled', $request->boolean('instagram_import')); + ConfigCacheService::put('pixelfed.bouncer.enabled', $request->boolean('autospam_enabled')); + + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Cache::forget('api:v1:instance-data:contact'); + Config::refresh(); + + return $request->all(); + } + + public function settingsApiUpdateLandingType($request) + { + $this->validate($request, [ + 'current_admin' => 'required', + 'show_directory' => 'required', + 'show_explore' => 'required', + ]); + + ConfigCacheService::put('instance.admin.pid', $request->input('current_admin')); + ConfigCacheService::put('instance.landing.show_directory', $request->boolean('show_directory')); + ConfigCacheService::put('instance.landing.show_explore', $request->boolean('show_explore')); + + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Cache::forget('api:v1:instance-data:contact'); + Config::refresh(); + + return $request->all(); + } + + public function settingsApiUpdateMediaType($request) + { + $this->validate($request, [ + 'image_quality' => 'required|integer|min:1|max:100', + 'max_album_length' => 'required|integer|min:1|max:20', + 'max_photo_size' => 'required|integer|min:100|max:50000', + 'media_types' => 'required', + 'optimize_image' => 'required', + 'optimize_video' => 'required', + ]); + + $mediaTypes = $request->input('media_types'); + $mediaArray = explode(',', $mediaTypes); + foreach ($mediaArray as $mediaType) { + if (! in_array($mediaType, ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'video/mp4'])) { + return redirect()->back()->withErrors(['media_types' => 'Invalid media type']); + } + } + + ConfigCacheService::put('pixelfed.media_types', $request->input('media_types')); + ConfigCacheService::put('pixelfed.image_quality', $request->input('image_quality')); + ConfigCacheService::put('pixelfed.max_album_length', $request->input('max_album_length')); + ConfigCacheService::put('pixelfed.max_photo_size', $request->input('max_photo_size')); + ConfigCacheService::put('pixelfed.optimize_image', $request->boolean('optimize_image')); + ConfigCacheService::put('pixelfed.optimize_video', $request->boolean('optimize_video')); + + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Cache::forget('api:v1:instance-data:contact'); + Config::refresh(); + + return $request->all(); + } + + public function settingsApiUpdateBrandingType($request) + { + $this->validate($request, [ + 'name' => 'required', + 'short_description' => 'required', + 'long_description' => 'required', + ]); + + ConfigCacheService::put('app.name', $request->input('name')); + ConfigCacheService::put('app.short_description', $request->input('short_description')); + ConfigCacheService::put('app.description', $request->input('long_description')); + + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Cache::forget('api:v1:instance-data:contact'); + Config::refresh(); + + return $request->all(); + } + + public function settingsApiUpdatePostsType($request) + { + $this->validate($request, [ + 'max_caption_length' => 'required|integer|min:5|max:10000', + 'max_altext_length' => 'required|integer|min:5|max:40000', + ]); + + ConfigCacheService::put('pixelfed.max_caption_length', $request->input('max_caption_length')); + ConfigCacheService::put('pixelfed.max_altext_length', $request->input('max_altext_length')); + $res = [ + 'max_caption_length' => $request->input('max_caption_length'), + 'max_altext_length' => $request->input('max_altext_length'), + ]; + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Config::refresh(); + + return $res; + } + + public function settingsApiUpdatePlatformType($request) + { + $this->validate($request, [ + 'allow_app_registration' => 'required', + 'app_registration_rate_limit_attempts' => 'required|integer|min:1', + 'app_registration_rate_limit_decay' => 'required|integer|min:1', + 'app_registration_confirm_rate_limit_attempts' => 'required|integer|min:1', + 'app_registration_confirm_rate_limit_decay' => 'required|integer|min:1', + 'allow_post_embeds' => 'required', + 'allow_profile_embeds' => 'required', + 'captcha_enabled' => 'required', + 'captcha_on_login' => 'required_if_accepted:captcha_enabled', + 'captcha_on_register' => 'required_if_accepted:captcha_enabled', + 'captcha_secret' => 'required_if_accepted:captcha_enabled', + 'captcha_sitekey' => 'required_if_accepted:captcha_enabled', + 'custom_emoji_enabled' => 'required', + ]); + + ConfigCacheService::put('pixelfed.allow_app_registration', $request->boolean('allow_app_registration')); + ConfigCacheService::put('pixelfed.app_registration_rate_limit_attempts', $request->input('app_registration_rate_limit_attempts')); + ConfigCacheService::put('pixelfed.app_registration_rate_limit_decay', $request->input('app_registration_rate_limit_decay')); + ConfigCacheService::put('pixelfed.app_registration_confirm_rate_limit_attempts', $request->input('app_registration_confirm_rate_limit_attempts')); + ConfigCacheService::put('pixelfed.app_registration_confirm_rate_limit_decay', $request->input('app_registration_confirm_rate_limit_decay')); + ConfigCacheService::put('instance.embed.post', $request->boolean('allow_post_embeds')); + ConfigCacheService::put('instance.embed.profile', $request->boolean('allow_profile_embeds')); + ConfigCacheService::put('federation.custom_emoji.enabled', $request->boolean('custom_emoji_enabled')); + $captcha = $request->boolean('captcha_enabled'); + if ($captcha) { + $secret = $request->input('captcha_secret'); + $sitekey = $request->input('captcha_sitekey'); + if (config_cache('captcha.secret') != $secret && strpos($secret, '*') === false) { + ConfigCacheService::put('captcha.secret', $secret); + } + if (config_cache('captcha.sitekey') != $sitekey && strpos($sitekey, '*') === false) { + ConfigCacheService::put('captcha.sitekey', $sitekey); + } + ConfigCacheService::put('captcha.active.login', $request->boolean('captcha_on_login')); + ConfigCacheService::put('captcha.active.register', $request->boolean('captcha_on_register')); + ConfigCacheService::put('captcha.triggers.login.enabled', $request->boolean('captcha_on_login')); + ConfigCacheService::put('captcha.enabled', true); + } else { + ConfigCacheService::put('captcha.enabled', false); + } + $res = [ + 'allow_app_registration' => $request->boolean('allow_app_registration'), + 'app_registration_rate_limit_attempts' => $request->input('app_registration_rate_limit_attempts'), + 'app_registration_rate_limit_decay' => $request->input('app_registration_rate_limit_decay'), + 'app_registration_confirm_rate_limit_attempts' => $request->input('app_registration_confirm_rate_limit_attempts'), + 'app_registration_confirm_rate_limit_decay' => $request->input('app_registration_confirm_rate_limit_decay'), + 'allow_post_embeds' => $request->boolean('allow_post_embeds'), + 'allow_profile_embeds' => $request->boolean('allow_profile_embeds'), + 'captcha_enabled' => $request->boolean('captcha_enabled'), + 'captcha_on_login' => $request->boolean('captcha_on_login'), + 'captcha_on_register' => $request->boolean('captcha_on_register'), + 'captcha_secret' => $request->input('captcha_secret'), + 'captcha_sitekey' => $request->input('captcha_sitekey'), + 'custom_emoji_enabled' => $request->boolean('custom_emoji_enabled'), + ]; + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Config::refresh(); + + return $res; + } + + public function settingsApiUpdateUsersType($request) + { + $this->validate($request, [ + 'require_email_verification' => 'required', + 'enforce_account_limit' => 'required', + 'max_account_size' => 'required|integer|min:50000', + 'admin_autofollow' => 'required', + 'admin_autofollow_accounts' => 'sometimes', + 'max_user_blocks' => 'required|integer|min:0|max:5000', + 'max_user_mutes' => 'required|integer|min:0|max:5000', + 'max_domain_blocks' => 'required|integer|min:0|max:5000', + ]); + + $adminAutofollow = $request->boolean('admin_autofollow'); + $adminAutofollowAccounts = $request->input('admin_autofollow_accounts'); + if ($adminAutofollow) { + if ($request->filled('admin_autofollow_accounts')) { + $names = []; + $existing = config_cache('account.autofollow_usernames'); + if ($existing) { + $names = explode(',', $existing); + foreach (array_map('strtolower', $adminAutofollowAccounts) as $afc) { + if (in_array(strtolower($afc), array_map('strtolower', $names))) { + continue; + } + $names[] = $afc; + } + } else { + $names = $adminAutofollowAccounts; + } + if (! $names || count($names) == 0) { + return response()->json(['message' => 'You need to assign autofollow accounts before you can enable it.'], 400); + } + if (count($names) > 5) { + return response()->json(['message' => 'You can only add up to 5 accounts to be autofollowed.'.json_encode($names)], 400); + } + $autofollows = User::whereIn('username', $names)->whereNull('status')->pluck('username'); + $adminAutofollowAccounts = $autofollows->implode(','); + ConfigCacheService::put('account.autofollow_usernames', $adminAutofollowAccounts); + } else { + return response()->json(['message' => 'You need to assign autofollow accounts before you can enable it.'], 400); + } + } + + ConfigCacheService::put('pixelfed.enforce_email_verification', $request->boolean('require_email_verification')); + ConfigCacheService::put('pixelfed.enforce_account_limit', $request->boolean('enforce_account_limit')); + ConfigCacheService::put('pixelfed.max_account_size', $request->input('max_account_size')); + ConfigCacheService::put('account.autofollow', $request->boolean('admin_autofollow')); + ConfigCacheService::put('instance.user_filters.max_user_blocks', (int) $request->input('max_user_blocks')); + ConfigCacheService::put('instance.user_filters.max_user_mutes', (int) $request->input('max_user_mutes')); + ConfigCacheService::put('instance.user_filters.max_domain_blocks', (int) $request->input('max_domain_blocks')); + $res = [ + 'require_email_verification' => $request->boolean('require_email_verification'), + 'enforce_account_limit' => $request->boolean('enforce_account_limit'), + 'admin_autofollow' => $request->boolean('admin_autofollow'), + 'admin_autofollow_accounts' => $adminAutofollowAccounts, + 'max_user_blocks' => $request->input('max_user_blocks'), + 'max_user_mutes' => $request->input('max_user_mutes'), + 'max_domain_blocks' => $request->input('max_domain_blocks'), + ]; + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Config::refresh(); + + return $res; + } + + public function settingsApiUpdateStorageType($request) + { + $this->validate($request, [ + 'primary_disk' => 'required|in:local,cloud', + 'update_disk' => 'sometimes', + 'disk_config' => 'required_if_accepted:update_disk', + 'disk_config.driver' => 'required|in:s3,spaces', + 'disk_config.key' => 'required', + 'disk_config.secret' => 'required', + 'disk_config.region' => 'required', + 'disk_config.bucket' => 'required', + 'disk_config.visibility' => 'required', + 'disk_config.endpoint' => 'required', + 'disk_config.url' => 'nullable', + ]); + + ConfigCacheService::put('pixelfed.cloud_storage', $request->input('primary_disk') === 'cloud'); + $res = [ + 'primary_disk' => $request->input('primary_disk'), + ]; + if ($request->has('update_disk')) { + $res['disk_config'] = $request->input('disk_config'); + $changes = []; + $dkey = $request->input('disk_config.driver') === 's3' ? 'filesystems.disks.s3.' : 'filesystems.disks.spaces.'; + $key = $request->input('disk_config.key'); + $ckey = null; + $secret = $request->input('disk_config.secret'); + $csecret = null; + $region = $request->input('disk_config.region'); + $bucket = $request->input('disk_config.bucket'); + $visibility = $request->input('disk_config.visibility'); + $url = $request->input('disk_config.url'); + $endpoint = $request->input('disk_config.endpoint'); + if (strpos($key, '*') === false && $key != config_cache($dkey.'key')) { + array_push($changes, 'key'); + } else { + $ckey = config_cache($dkey.'key'); + } + if (strpos($secret, '*') === false && $secret != config_cache($dkey.'secret')) { + array_push($changes, 'secret'); + } else { + $csecret = config_cache($dkey.'secret'); + } + if ($region != config_cache($dkey.'region')) { + array_push($changes, 'region'); + } + if ($bucket != config_cache($dkey.'bucket')) { + array_push($changes, 'bucket'); + } + if ($visibility != config_cache($dkey.'visibility')) { + array_push($changes, 'visibility'); + } + if ($url != config_cache($dkey.'url')) { + array_push($changes, 'url'); + } + if ($endpoint != config_cache($dkey.'endpoint')) { + array_push($changes, 'endpoint'); + } + + if ($changes && count($changes)) { + $isValid = FilesystemService::getVerifyCredentials( + $ckey ?? $key, + $csecret ?? $secret, + $region, + $bucket, + $endpoint, + ); + if (! $isValid) { + return response()->json(['error' => true, 's3_vce' => true, 'message' => "
The S3/Spaces credentials you provided are invalid, or the bucket does not have the proper permissions.

Please check all fields and try again.

Any cloud storage configuration changes you made have NOT been saved due to invalid credentials."], 400); + } + } + $res['changes'] = json_encode($changes); + } + Cache::forget('api:v1:instance-data:rules'); + Cache::forget('api:v1:instance-data-response-v1'); + Cache::forget('api:v2:instance-data-response-v2'); + Config::refresh(); + + return $res; + } } diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index e54908a41..102c1a901 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -424,7 +424,7 @@ class AdminController extends Controller public function customEmojiHome(Request $request) { - if(!config('federation.custom_emoji.enabled')) { + if(!(bool) config_cache('federation.custom_emoji.enabled')) { return view('admin.custom-emoji.not-enabled'); } $this->validate($request, [ @@ -497,7 +497,7 @@ class AdminController extends Controller public function customEmojiToggleActive(Request $request, $id) { - abort_unless(config('federation.custom_emoji.enabled'), 404); + abort_unless((bool) config_cache('federation.custom_emoji.enabled'), 404); $emoji = CustomEmoji::findOrFail($id); $emoji->disabled = !$emoji->disabled; $emoji->save(); @@ -508,13 +508,13 @@ class AdminController extends Controller public function customEmojiAdd(Request $request) { - abort_unless(config('federation.custom_emoji.enabled'), 404); + abort_unless((bool) config_cache('federation.custom_emoji.enabled'), 404); return view('admin.custom-emoji.add'); } public function customEmojiStore(Request $request) { - abort_unless(config('federation.custom_emoji.enabled'), 404); + abort_unless((bool) config_cache('federation.custom_emoji.enabled'), 404); $this->validate($request, [ 'shortcode' => [ 'required', @@ -545,7 +545,7 @@ class AdminController extends Controller public function customEmojiDelete(Request $request, $id) { - abort_unless(config('federation.custom_emoji.enabled'), 404); + abort_unless((bool) config_cache('federation.custom_emoji.enabled'), 404); $emoji = CustomEmoji::findOrFail($id); Storage::delete("public/{$emoji->media_path}"); Cache::forget('pf:custom_emoji'); @@ -555,7 +555,7 @@ class AdminController extends Controller public function customEmojiShowDuplicates(Request $request, $id) { - abort_unless(config('federation.custom_emoji.enabled'), 404); + abort_unless((bool) config_cache('federation.custom_emoji.enabled'), 404); $emoji = CustomEmoji::orderBy('id')->whereDisabled(false)->whereShortcode($id)->firstOrFail(); $emojis = CustomEmoji::whereShortcode($id)->where('id', '!=', $emoji->id)->cursorPaginate(10); return view('admin.custom-emoji.duplicates', compact('emoji', 'emojis')); diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 0463e681e..fefc85442 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -131,7 +131,7 @@ class ApiV1Controller extends Controller */ public function apps(Request $request) { - abort_if(! config_cache('pixelfed.oauth_enabled'), 404); + abort_if(! (bool) config_cache('pixelfed.oauth_enabled'), 404); $this->validate($request, [ 'client_name' => 'required', @@ -1103,7 +1103,7 @@ class ApiV1Controller extends Controller } $count = UserFilterService::blockCount($pid); - $maxLimit = intval(config('instance.user_filters.max_user_blocks')); + $maxLimit = (int) config_cache('instance.user_filters.max_user_blocks'); if ($count == 0) { $filterCount = UserFilter::whereUserId($pid) ->whereFilterType('block') @@ -1632,7 +1632,7 @@ class ApiV1Controller extends Controller return [ 'uri' => config('pixelfed.domain.app'), - 'title' => config('app.name'), + 'title' => config_cache('app.name'), 'short_description' => config_cache('app.short_description'), 'description' => config_cache('app.description'), 'email' => config('instance.email'), @@ -1650,11 +1650,11 @@ class ApiV1Controller extends Controller 'configuration' => [ 'media_attachments' => [ 'image_matrix_limit' => 16777216, - 'image_size_limit' => config('pixelfed.max_photo_size') * 1024, - 'supported_mime_types' => explode(',', config('pixelfed.media_types')), + 'image_size_limit' => config_cache('pixelfed.max_photo_size') * 1024, + 'supported_mime_types' => explode(',', config_cache('pixelfed.media_types')), 'video_frame_rate_limit' => 120, 'video_matrix_limit' => 2304000, - 'video_size_limit' => config('pixelfed.max_photo_size') * 1024, + 'video_size_limit' => config_cache('pixelfed.max_photo_size') * 1024, ], 'polls' => [ 'max_characters_per_option' => 50, @@ -1665,7 +1665,7 @@ class ApiV1Controller extends Controller 'statuses' => [ 'characters_reserved_per_url' => 23, 'max_characters' => (int) config_cache('pixelfed.max_caption_length'), - 'max_media_attachments' => (int) config('pixelfed.max_album_length'), + 'max_media_attachments' => (int) config_cache('pixelfed.max_album_length'), ], ], ]; @@ -2145,7 +2145,7 @@ class ApiV1Controller extends Controller } $count = UserFilterService::muteCount($pid); - $maxLimit = intval(config('instance.user_filters.max_user_mutes')); + $maxLimit = (int) config_cache('instance.user_filters.max_user_mutes'); if ($count == 0) { $filterCount = UserFilter::whereUserId($pid) ->whereFilterType('mute') @@ -3308,9 +3308,9 @@ class ApiV1Controller extends Controller abort_unless($request->user()->tokenCan('write'), 403); $this->validate($request, [ - 'status' => 'nullable|string|max:' . config_cache('pixelfed.max_caption_length'), + 'status' => 'nullable|string|max:'.(int) config_cache('pixelfed.max_caption_length'), 'in_reply_to_id' => 'nullable', - 'media_ids' => 'sometimes|array|max:'.config_cache('pixelfed.max_album_length'), + 'media_ids' => 'sometimes|array|max:'.(int) config_cache('pixelfed.max_album_length'), 'sensitive' => 'nullable', 'visibility' => 'string|in:private,unlisted,public', 'spoiler_text' => 'sometimes|max:140', @@ -3436,7 +3436,7 @@ class ApiV1Controller extends Controller $mimes = []; foreach ($ids as $k => $v) { - if ($k + 1 > config_cache('pixelfed.max_album_length')) { + if ($k + 1 > (int) config_cache('pixelfed.max_album_length')) { continue; } $m = Media::whereUserId($user->id)->whereNull('status_id')->findOrFail($v); diff --git a/app/Http/Controllers/Api/V1/DomainBlockController.php b/app/Http/Controllers/Api/V1/DomainBlockController.php index 5a2698361..3b6730789 100644 --- a/app/Http/Controllers/Api/V1/DomainBlockController.php +++ b/app/Http/Controllers/Api/V1/DomainBlockController.php @@ -72,7 +72,7 @@ class DomainBlockController extends Controller abort_if(config_cache('pixelfed.domain.app') == $domain, 400, 'Cannot ban your own server'); $existingCount = UserDomainBlock::whereProfileId($pid)->count(); - $maxLimit = config('instance.user_filters.max_domain_blocks'); + $maxLimit = (int) config_cache('instance.user_filters.max_domain_blocks'); $errorMsg = __('profile.block.domain.max', ['max' => $maxLimit]); abort_if($existingCount >= $maxLimit, 400, $errorMsg); diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 618c495e2..22562e985 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -62,7 +62,7 @@ class ForgotPasswordController extends Controller usleep(random_int(100000, 3000000)); - if(config('captcha.enabled')) { + if((bool) config_cache('captcha.enabled')) { $rules = [ 'email' => 'required|email', 'h-captcha-response' => 'required|captcha' diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 627a879cc..86ee52c84 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -74,10 +74,10 @@ class LoginController extends Controller $messages = []; if( - config('captcha.enabled') || - config('captcha.active.login') || + (bool) config_cache('captcha.enabled') && + (bool) config_cache('captcha.active.login') || ( - config('captcha.triggers.login.enabled') && + (bool) config_cache('captcha.triggers.login.enabled') && request()->session()->has('login_attempts') && request()->session()->get('login_attempts') >= config('captcha.triggers.login.attempts') ) diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 8bdd57bf8..7568fca09 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -137,7 +137,7 @@ class RegisterController extends Controller 'password' => 'required|string|min:'.config('pixelfed.min_password_length').'|confirmed', ]; - if(config('captcha.enabled') || config('captcha.active.register')) { + if((bool) config_cache('captcha.enabled') && (bool) config_cache('captcha.active.register')) { $rules['h-captcha-response'] = 'required|captcha'; } diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index a92c4e38d..166ec01e3 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -50,7 +50,7 @@ class ResetPasswordController extends Controller { usleep(random_int(100000, 3000000)); - if(config('captcha.enabled')) { + if((bool) config_cache('captcha.enabled')) { return [ 'token' => 'required', 'email' => 'required|email', diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 341d56ea8..4c27aa18e 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -741,7 +741,7 @@ class ComposeController extends Controller case 'image/jpeg': case 'image/png': case 'video/mp4': - $finished = config_cache('pixelfed.cloud_storage') ? (bool) $media->cdn_url : (bool) $media->processed_at; + $finished = (bool) config_cache('pixelfed.cloud_storage') ? (bool) $media->cdn_url : (bool) $media->processed_at; break; default: diff --git a/app/Http/Controllers/FederationController.php b/app/Http/Controllers/FederationController.php index 55c7b4393..54ad03227 100644 --- a/app/Http/Controllers/FederationController.php +++ b/app/Http/Controllers/FederationController.php @@ -2,57 +2,42 @@ namespace App\Http\Controllers; -use App\Jobs\InboxPipeline\{ - DeleteWorker, - InboxWorker, - InboxValidator -}; -use App\Jobs\RemoteFollowPipeline\RemoteFollowPipeline; -use App\{ - AccountLog, - Like, - Profile, - Status, - User -}; -use App\Util\Lexer\Nickname; -use App\Util\Webfinger\Webfinger; -use Auth; -use Cache; -use Carbon\Carbon; -use Illuminate\Http\Request; -use League\Fractal; -use App\Util\Site\Nodeinfo; -use App\Util\ActivityPub\{ - Helpers, - HttpSignature, - Outbox -}; -use Zttp\Zttp; -use App\Services\InstanceService; +use App\Jobs\InboxPipeline\DeleteWorker; +use App\Jobs\InboxPipeline\InboxValidator; +use App\Jobs\InboxPipeline\InboxWorker; +use App\Profile; use App\Services\AccountService; +use App\Services\InstanceService; +use App\Status; +use App\Util\Lexer\Nickname; +use App\Util\Site\Nodeinfo; +use App\Util\Webfinger\Webfinger; +use Cache; +use Illuminate\Http\Request; class FederationController extends Controller { public function nodeinfoWellKnown() { - abort_if(!config('federation.nodeinfo.enabled'), 404); + abort_if(! config('federation.nodeinfo.enabled'), 404); + return response()->json(Nodeinfo::wellKnown(), 200, [], JSON_UNESCAPED_SLASHES) - ->header('Access-Control-Allow-Origin','*'); + ->header('Access-Control-Allow-Origin', '*'); } public function nodeinfo() { - abort_if(!config('federation.nodeinfo.enabled'), 404); + abort_if(! config('federation.nodeinfo.enabled'), 404); + return response()->json(Nodeinfo::get(), 200, [], JSON_UNESCAPED_SLASHES) - ->header('Access-Control-Allow-Origin','*'); + ->header('Access-Control-Allow-Origin', '*'); } public function webfinger(Request $request) { - if (!config('federation.webfinger.enabled') || - !$request->has('resource') || - !$request->filled('resource') + if (! config('federation.webfinger.enabled') || + ! $request->has('resource') || + ! $request->filled('resource') ) { return response('', 400); } @@ -60,55 +45,56 @@ class FederationController extends Controller $resource = $request->input('resource'); $domain = config('pixelfed.domain.app'); - if(config('federation.activitypub.sharedInbox') && - $resource == 'acct:' . $domain . '@' . $domain) { + if (config('federation.activitypub.sharedInbox') && + $resource == 'acct:'.$domain.'@'.$domain) { $res = [ - 'subject' => 'acct:' . $domain . '@' . $domain, + 'subject' => 'acct:'.$domain.'@'.$domain, 'aliases' => [ - 'https://' . $domain . '/i/actor' + 'https://'.$domain.'/i/actor', ], 'links' => [ [ 'rel' => 'http://webfinger.net/rel/profile-page', 'type' => 'text/html', - 'href' => 'https://' . $domain . '/site/kb/instance-actor' + 'href' => 'https://'.$domain.'/site/kb/instance-actor', ], [ 'rel' => 'self', 'type' => 'application/activity+json', - 'href' => 'https://' . $domain . '/i/actor' - ] - ] + 'href' => 'https://'.$domain.'/i/actor', + ], + ], ]; + return response()->json($res, 200, [], JSON_UNESCAPED_SLASHES); } $hash = hash('sha256', $resource); - $key = 'federation:webfinger:sha256:' . $hash; - if($cached = Cache::get($key)) { + $key = 'federation:webfinger:sha256:'.$hash; + if ($cached = Cache::get($key)) { return response()->json($cached, 200, [], JSON_UNESCAPED_SLASHES); } - if(strpos($resource, $domain) == false) { + if (strpos($resource, $domain) == false) { return response('', 400); } $parsed = Nickname::normalizeProfileUrl($resource); - if(empty($parsed) || $parsed['domain'] !== $domain) { + if (empty($parsed) || $parsed['domain'] !== $domain) { return response('', 400); } $username = $parsed['username']; $profile = Profile::whereNull('domain')->whereUsername($username)->first(); - if(!$profile || $profile->status !== null) { + if (! $profile || $profile->status !== null) { return response('', 400); } $webfinger = (new Webfinger($profile))->generate(); Cache::put($key, $webfinger, 1209600); return response()->json($webfinger, 200, [], JSON_UNESCAPED_SLASHES) - ->header('Access-Control-Allow-Origin','*'); + ->header('Access-Control-Allow-Origin', '*'); } public function hostMeta(Request $request) { - abort_if(!config('federation.webfinger.enabled'), 404); + abort_if(! config('federation.webfinger.enabled'), 404); $path = route('well-known.webfinger'); $xml = ''; @@ -118,19 +104,19 @@ class FederationController extends Controller public function userOutbox(Request $request, $username) { - abort_if(!config_cache('federation.activitypub.enabled'), 404); + abort_if(! (bool) config_cache('federation.activitypub.enabled'), 404); - if(!$request->wantsJson()) { - return redirect('/' . $username); + if (! $request->wantsJson()) { + return redirect('/'.$username); } $id = AccountService::usernameToId($username); - abort_if(!$id, 404); + abort_if(! $id, 404); $account = AccountService::get($id); - abort_if(!$account || !isset($account['statuses_count']), 404); + abort_if(! $account || ! isset($account['statuses_count']), 404); $res = [ '@context' => 'https://www.w3.org/ns/activitystreams', - 'id' => 'https://' . config('pixelfed.domain.app') . '/users/' . $username . '/outbox', + 'id' => 'https://'.config('pixelfed.domain.app').'/users/'.$username.'/outbox', 'type' => 'OrderedCollection', 'totalItems' => $account['statuses_count'] ?? 0, ]; @@ -140,135 +126,145 @@ class FederationController extends Controller public function userInbox(Request $request, $username) { - abort_if(!config_cache('federation.activitypub.enabled'), 404); - abort_if(!config('federation.activitypub.inbox'), 404); + abort_if(! (bool) config_cache('federation.activitypub.enabled'), 404); + abort_if(! config('federation.activitypub.inbox'), 404); $headers = $request->headers->all(); $payload = $request->getContent(); - if(!$payload || empty($payload)) { + if (! $payload || empty($payload)) { return; } $obj = json_decode($payload, true, 8); - if(!isset($obj['id'])) { + if (! isset($obj['id'])) { return; } $domain = parse_url($obj['id'], PHP_URL_HOST); - if(in_array($domain, InstanceService::getBannedDomains())) { + if (in_array($domain, InstanceService::getBannedDomains())) { return; } - if(isset($obj['type']) && $obj['type'] === 'Delete') { - if(isset($obj['object']) && isset($obj['object']['type']) && isset($obj['object']['id'])) { - if($obj['object']['type'] === 'Person') { - if(Profile::whereRemoteUrl($obj['object']['id'])->exists()) { + if (isset($obj['type']) && $obj['type'] === 'Delete') { + if (isset($obj['object']) && isset($obj['object']['type']) && isset($obj['object']['id'])) { + if ($obj['object']['type'] === 'Person') { + if (Profile::whereRemoteUrl($obj['object']['id'])->exists()) { dispatch(new DeleteWorker($headers, $payload))->onQueue('inbox'); + return; } } - if($obj['object']['type'] === 'Tombstone') { - if(Status::whereObjectUrl($obj['object']['id'])->exists()) { + if ($obj['object']['type'] === 'Tombstone') { + if (Status::whereObjectUrl($obj['object']['id'])->exists()) { dispatch(new DeleteWorker($headers, $payload))->onQueue('delete'); + return; } } - if($obj['object']['type'] === 'Story') { + if ($obj['object']['type'] === 'Story') { dispatch(new DeleteWorker($headers, $payload))->onQueue('story'); + return; } } + return; - } else if( isset($obj['type']) && in_array($obj['type'], ['Follow', 'Accept'])) { + } elseif (isset($obj['type']) && in_array($obj['type'], ['Follow', 'Accept'])) { dispatch(new InboxValidator($username, $headers, $payload))->onQueue('follow'); } else { dispatch(new InboxValidator($username, $headers, $payload))->onQueue('high'); } - return; + } public function sharedInbox(Request $request) { - abort_if(!config_cache('federation.activitypub.enabled'), 404); - abort_if(!config('federation.activitypub.sharedInbox'), 404); + abort_if(! (bool) config_cache('federation.activitypub.enabled'), 404); + abort_if(! config('federation.activitypub.sharedInbox'), 404); $headers = $request->headers->all(); $payload = $request->getContent(); - if(!$payload || empty($payload)) { + if (! $payload || empty($payload)) { return; } $obj = json_decode($payload, true, 8); - if(!isset($obj['id'])) { + if (! isset($obj['id'])) { return; } $domain = parse_url($obj['id'], PHP_URL_HOST); - if(in_array($domain, InstanceService::getBannedDomains())) { + if (in_array($domain, InstanceService::getBannedDomains())) { return; } - if(isset($obj['type']) && $obj['type'] === 'Delete') { - if(isset($obj['object']) && isset($obj['object']['type']) && isset($obj['object']['id'])) { - if($obj['object']['type'] === 'Person') { - if(Profile::whereRemoteUrl($obj['object']['id'])->exists()) { + if (isset($obj['type']) && $obj['type'] === 'Delete') { + if (isset($obj['object']) && isset($obj['object']['type']) && isset($obj['object']['id'])) { + if ($obj['object']['type'] === 'Person') { + if (Profile::whereRemoteUrl($obj['object']['id'])->exists()) { dispatch(new DeleteWorker($headers, $payload))->onQueue('inbox'); + return; } } - if($obj['object']['type'] === 'Tombstone') { - if(Status::whereObjectUrl($obj['object']['id'])->exists()) { + if ($obj['object']['type'] === 'Tombstone') { + if (Status::whereObjectUrl($obj['object']['id'])->exists()) { dispatch(new DeleteWorker($headers, $payload))->onQueue('delete'); + return; } } - if($obj['object']['type'] === 'Story') { + if ($obj['object']['type'] === 'Story') { dispatch(new DeleteWorker($headers, $payload))->onQueue('story'); + return; } } + return; - } else if( isset($obj['type']) && in_array($obj['type'], ['Follow', 'Accept'])) { + } elseif (isset($obj['type']) && in_array($obj['type'], ['Follow', 'Accept'])) { dispatch(new InboxWorker($headers, $payload))->onQueue('follow'); } else { dispatch(new InboxWorker($headers, $payload))->onQueue('shared'); } - return; + } public function userFollowing(Request $request, $username) { - abort_if(!config_cache('federation.activitypub.enabled'), 404); + abort_if(! (bool) config_cache('federation.activitypub.enabled'), 404); $id = AccountService::usernameToId($username); - abort_if(!$id, 404); + abort_if(! $id, 404); $account = AccountService::get($id); - abort_if(!$account || !isset($account['following_count']), 404); + abort_if(! $account || ! isset($account['following_count']), 404); $obj = [ '@context' => 'https://www.w3.org/ns/activitystreams', - 'id' => $request->getUri(), - 'type' => 'OrderedCollection', + 'id' => $request->getUri(), + 'type' => 'OrderedCollection', 'totalItems' => $account['following_count'] ?? 0, ]; + return response()->json($obj)->header('Content-Type', 'application/activity+json'); } public function userFollowers(Request $request, $username) { - abort_if(!config_cache('federation.activitypub.enabled'), 404); + abort_if(! (bool) config_cache('federation.activitypub.enabled'), 404); $id = AccountService::usernameToId($username); - abort_if(!$id, 404); + abort_if(! $id, 404); $account = AccountService::get($id); - abort_if(!$account || !isset($account['followers_count']), 404); + abort_if(! $account || ! isset($account['followers_count']), 404); $obj = [ '@context' => 'https://www.w3.org/ns/activitystreams', - 'id' => $request->getUri(), - 'type' => 'OrderedCollection', + 'id' => $request->getUri(), + 'type' => 'OrderedCollection', 'totalItems' => $account['followers_count'] ?? 0, ]; + return response()->json($obj)->header('Content-Type', 'application/activity+json'); } } diff --git a/app/Http/Controllers/Import/Instagram.php b/app/Http/Controllers/Import/Instagram.php index 95d290f61..f1b886d52 100644 --- a/app/Http/Controllers/Import/Instagram.php +++ b/app/Http/Controllers/Import/Instagram.php @@ -17,7 +17,7 @@ trait Instagram { public function instagram() { - if(config_cache('pixelfed.import.instagram.enabled') != true) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { abort(404, 'Feature not enabled'); } return view('settings.import.instagram.home'); @@ -25,6 +25,9 @@ trait Instagram public function instagramStart(Request $request) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $completed = ImportJob::whereProfileId(Auth::user()->profile->id) ->whereService('instagram') ->whereNotNull('completed_at') @@ -38,6 +41,9 @@ trait Instagram protected function instagramRedirectOrNew() { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $profile = Auth::user()->profile; $exists = ImportJob::whereProfileId($profile->id) ->whereService('instagram') @@ -61,6 +67,9 @@ trait Instagram public function instagramStepOne(Request $request, $uuid) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $profile = Auth::user()->profile; $job = ImportJob::whereProfileId($profile->id) ->whereNull('completed_at') @@ -72,6 +81,9 @@ trait Instagram public function instagramStepOneStore(Request $request, $uuid) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $max = 'max:' . config('pixelfed.import.instagram.limits.size'); $this->validate($request, [ 'media.*' => 'required|mimes:bin,jpeg,png,gif|'.$max, @@ -114,6 +126,9 @@ trait Instagram public function instagramStepTwo(Request $request, $uuid) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $profile = Auth::user()->profile; $job = ImportJob::whereProfileId($profile->id) ->whereNull('completed_at') @@ -125,6 +140,9 @@ trait Instagram public function instagramStepTwoStore(Request $request, $uuid) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $this->validate($request, [ 'media' => 'required|file|max:1000' ]); @@ -150,6 +168,9 @@ trait Instagram public function instagramStepThree(Request $request, $uuid) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $profile = Auth::user()->profile; $job = ImportJob::whereProfileId($profile->id) ->whereService('instagram') @@ -162,6 +183,9 @@ trait Instagram public function instagramStepThreeStore(Request $request, $uuid) { + if((bool) config_cache('pixelfed.import.instagram.enabled') != true) { + abort(404, 'Feature not enabled'); + } $profile = Auth::user()->profile; try { diff --git a/app/Http/Controllers/ImportPostController.php b/app/Http/Controllers/ImportPostController.php index 55f575a6e..84f230622 100644 --- a/app/Http/Controllers/ImportPostController.php +++ b/app/Http/Controllers/ImportPostController.php @@ -179,7 +179,7 @@ class ImportPostController extends Controller 'required', 'file', $mimes, - 'max:' . config('pixelfed.max_photo_size') + 'max:' . config_cache('pixelfed.max_photo_size') ] ]); diff --git a/app/Http/Controllers/LandingController.php b/app/Http/Controllers/LandingController.php index 5f9f0bba1..f90d84bc2 100644 --- a/app/Http/Controllers/LandingController.php +++ b/app/Http/Controllers/LandingController.php @@ -2,44 +2,43 @@ namespace App\Http\Controllers; -use Illuminate\Http\Request; -use App\Profile; -use App\Services\AccountService; use App\Http\Resources\DirectoryProfile; +use App\Profile; +use Illuminate\Http\Request; class LandingController extends Controller { public function directoryRedirect(Request $request) { - if($request->user()) { - return redirect('/'); - } + if ($request->user()) { + return redirect('/'); + } - abort_if(config_cache('instance.landing.show_directory') == false, 404); + abort_if((bool) config_cache('instance.landing.show_directory') == false, 404); - return view('site.index'); + return view('site.index'); } public function exploreRedirect(Request $request) { - if($request->user()) { - return redirect('/'); - } + if ($request->user()) { + return redirect('/'); + } - abort_if(config_cache('instance.landing.show_explore') == false, 404); + abort_if((bool) config_cache('instance.landing.show_explore') == false, 404); - return view('site.index'); + return view('site.index'); } public function getDirectoryApi(Request $request) { - abort_if(config_cache('instance.landing.show_directory') == false, 404); + abort_if((bool) config_cache('instance.landing.show_directory') == false, 404); - return DirectoryProfile::collection( - Profile::whereNull('domain') - ->whereIsSuggestable(true) - ->orderByDesc('updated_at') - ->cursorPaginate(20) - ); + return DirectoryProfile::collection( + Profile::whereNull('domain') + ->whereIsSuggestable(true) + ->orderByDesc('updated_at') + ->cursorPaginate(20) + ); } } diff --git a/app/Http/Controllers/MediaController.php b/app/Http/Controllers/MediaController.php index b10e75795..cbc08cb5a 100644 --- a/app/Http/Controllers/MediaController.php +++ b/app/Http/Controllers/MediaController.php @@ -2,30 +2,31 @@ namespace App\Http\Controllers; -use Illuminate\Http\Request; use App\Media; +use Illuminate\Http\Request; class MediaController extends Controller { - public function index(Request $request) - { - //return view('settings.drive.index'); - } + public function index(Request $request) + { + //return view('settings.drive.index'); + abort(404); + } - public function composeUpdate(Request $request, $id) - { + public function composeUpdate(Request $request, $id) + { abort(400, 'Endpoint deprecated'); - } + } - public function fallbackRedirect(Request $request, $pid, $mhash, $uhash, $f) - { - abort_if(!config_cache('pixelfed.cloud_storage'), 404); - $path = 'public/m/_v2/' . $pid . '/' . $mhash . '/' . $uhash . '/' . $f; - $media = Media::whereProfileId($pid) - ->whereMediaPath($path) - ->whereNotNull('cdn_url') - ->firstOrFail(); + public function fallbackRedirect(Request $request, $pid, $mhash, $uhash, $f) + { + abort_if(! (bool) config_cache('pixelfed.cloud_storage'), 404); + $path = 'public/m/_v2/'.$pid.'/'.$mhash.'/'.$uhash.'/'.$f; + $media = Media::whereProfileId($pid) + ->whereMediaPath($path) + ->whereNotNull('cdn_url') + ->firstOrFail(); - return redirect()->away($media->cdn_url); - } + return redirect()->away($media->cdn_url); + } } diff --git a/app/Http/Controllers/PixelfedDirectoryController.php b/app/Http/Controllers/PixelfedDirectoryController.php index cfe3f690a..0d2113a04 100644 --- a/app/Http/Controllers/PixelfedDirectoryController.php +++ b/app/Http/Controllers/PixelfedDirectoryController.php @@ -2,37 +2,41 @@ namespace App\Http\Controllers; -use Illuminate\Http\Request; use App\Models\ConfigCache; -use Storage; use App\Services\AccountService; use App\Services\StatusService; +use Illuminate\Http\Request; use Illuminate\Support\Str; +use Cache; +use Storage; +use App\Status; +use App\User; class PixelfedDirectoryController extends Controller { public function get(Request $request) { - if(!$request->filled('sk')) { + if (! $request->filled('sk')) { abort(404); } - if(!config_cache('pixelfed.directory.submission-key')) { + if (! config_cache('pixelfed.directory.submission-key')) { abort(404); } - if(!hash_equals(config_cache('pixelfed.directory.submission-key'), $request->input('sk'))) { + if (! hash_equals(config_cache('pixelfed.directory.submission-key'), $request->input('sk'))) { abort(403); } $res = $this->buildListing(); - return response()->json($res, 200, [], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); + + return response()->json($res, 200, [], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } public function buildListing() { $res = config_cache('pixelfed.directory'); - if($res) { + if ($res) { $res = is_string($res) ? json_decode($res, true) : $res; } @@ -41,40 +45,40 @@ class PixelfedDirectoryController extends Controller $res['_ts'] = config_cache('pixelfed.directory.submission-ts'); $res['version'] = config_cache('pixelfed.version'); - if(empty($res['summary'])) { + if (empty($res['summary'])) { $summary = ConfigCache::whereK('app.short_description')->pluck('v'); $res['summary'] = $summary ? $summary[0] : null; } - if(isset($res['admin'])) { + if (isset($res['admin'])) { $res['admin'] = AccountService::get($res['admin'], true); } - if(isset($res['banner_image']) && !empty($res['banner_image'])) { + if (isset($res['banner_image']) && ! empty($res['banner_image'])) { $res['banner_image'] = url(Storage::url($res['banner_image'])); } - if(isset($res['favourite_posts'])) { - $res['favourite_posts'] = collect($res['favourite_posts'])->map(function($id) { + if (isset($res['favourite_posts'])) { + $res['favourite_posts'] = collect($res['favourite_posts'])->map(function ($id) { return StatusService::get($id); }) - ->filter(function($post) { - return $post && isset($post['account']); - }) - ->map(function($post) { - return [ - 'avatar' => $post['account']['avatar'], - 'display_name' => $post['account']['display_name'], - 'username' => $post['account']['username'], - 'media' => $post['media_attachments'][0]['url'], - 'url' => $post['url'] - ]; - }) - ->values(); + ->filter(function ($post) { + return $post && isset($post['account']); + }) + ->map(function ($post) { + return [ + 'avatar' => $post['account']['avatar'], + 'display_name' => $post['account']['display_name'], + 'username' => $post['account']['username'], + 'media' => $post['media_attachments'][0]['url'], + 'url' => $post['url'], + ]; + }) + ->values(); } $guidelines = ConfigCache::whereK('app.rules')->first(); - if($guidelines) { + if ($guidelines) { $res['community_guidelines'] = json_decode($guidelines->v, true); } @@ -85,27 +89,27 @@ class PixelfedDirectoryController extends Controller $res['curated_onboarding'] = $curatedOnboarding; $oauthEnabled = ConfigCache::whereK('pixelfed.oauth_enabled')->first(); - if($oauthEnabled) { + if ($oauthEnabled) { $keys = file_exists(storage_path('oauth-public.key')) && file_exists(storage_path('oauth-private.key')); $res['oauth_enabled'] = (bool) $oauthEnabled && $keys; } $activityPubEnabled = ConfigCache::whereK('federation.activitypub.enabled')->first(); - if($activityPubEnabled) { + if ($activityPubEnabled) { $res['activitypub_enabled'] = (bool) $activityPubEnabled; } $res['feature_config'] = [ 'media_types' => Str::of(config_cache('pixelfed.media_types'))->explode(','), 'image_quality' => config_cache('pixelfed.image_quality'), - 'optimize_image' => config_cache('pixelfed.optimize_image'), + 'optimize_image' => (bool) config_cache('pixelfed.optimize_image'), 'max_photo_size' => config_cache('pixelfed.max_photo_size'), 'max_caption_length' => config_cache('pixelfed.max_caption_length'), 'max_altext_length' => config_cache('pixelfed.max_altext_length'), - 'enforce_account_limit' => config_cache('pixelfed.enforce_account_limit'), + 'enforce_account_limit' => (bool) config_cache('pixelfed.enforce_account_limit'), 'max_account_size' => config_cache('pixelfed.max_account_size'), 'max_album_length' => config_cache('pixelfed.max_album_length'), - 'account_deletion' => config_cache('pixelfed.account_deletion'), + 'account_deletion' => (bool) config_cache('pixelfed.account_deletion'), ]; $res['is_eligible'] = $this->validVal($res, 'admin') && @@ -115,29 +119,36 @@ class PixelfedDirectoryController extends Controller $this->validVal($res, 'privacy_pledge') && $this->validVal($res, 'location'); - if(config_cache('pixelfed.directory.testimonials')) { + if (config_cache('pixelfed.directory.testimonials')) { $res['testimonials'] = collect(json_decode(config_cache('pixelfed.directory.testimonials'), true)) - ->map(function($testimonial) { + ->map(function ($testimonial) { $profile = AccountService::get($testimonial['profile_id']); + return [ 'profile' => [ 'username' => $profile['username'], 'display_name' => $profile['display_name'], 'avatar' => $profile['avatar'], - 'created_at' => $profile['created_at'] + 'created_at' => $profile['created_at'], ], - 'body' => $testimonial['body'] + 'body' => $testimonial['body'], ]; }); } $res['features_enabled'] = [ - 'stories' => (bool) config_cache('instance.stories.enabled') + 'stories' => (bool) config_cache('instance.stories.enabled'), ]; + $statusesCount = Cache::remember('api:nodeinfo:statuses', 21600, function() { + return Status::whereLocal(true)->count(); + }); + $usersCount = Cache::remember('api:nodeinfo:users', 43200, function() { + return User::count(); + }); $res['stats'] = [ - 'user_count' => \App\User::count(), - 'post_count' => \App\Status::whereNull('uri')->count(), + 'user_count' => (int) $usersCount, + 'post_count' => (int) $statusesCount, ]; $res['primary_locale'] = config('app.locale'); @@ -150,19 +161,18 @@ class PixelfedDirectoryController extends Controller protected function validVal($res, $val, $count = false, $minLen = false) { - if(!isset($res[$val])) { + if (! isset($res[$val])) { return false; } - if($count) { + if ($count) { return count($res[$val]) >= $count; } - if($minLen) { + if ($minLen) { return strlen($res[$val]) >= $minLen; } return $res[$val]; } - } diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 6471ed760..65a756eaf 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -172,6 +172,8 @@ class ProfileController extends Controller $user = $this->getCachedUser($username); + abort_if(!$user, 404); + return redirect($user->url()); } @@ -371,7 +373,7 @@ class ProfileController extends Controller public function stories(Request $request, $username) { - abort_if(! config_cache('instance.stories.enabled') || ! $request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $profile = Profile::whereNull('domain')->whereUsername($username)->firstOrFail(); $pid = $profile->id; $authed = Auth::user()->profile_id; diff --git a/app/Http/Controllers/RemoteAuthController.php b/app/Http/Controllers/RemoteAuthController.php index e068f5d75..e0afd82ef 100644 --- a/app/Http/Controllers/RemoteAuthController.php +++ b/app/Http/Controllers/RemoteAuthController.php @@ -2,22 +2,20 @@ namespace App\Http\Controllers; -use Illuminate\Support\Str; -use Illuminate\Http\Request; -use App\Services\Account\RemoteAuthService; use App\Models\RemoteAuth; -use App\Profile; -use App\Instance; -use App\User; -use Purify; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Hash; -use Illuminate\Auth\Events\Registered; -use App\Util\Lexer\RestrictedNames; +use App\Services\Account\RemoteAuthService; use App\Services\EmailService; use App\Services\MediaStorageService; +use App\User; use App\Util\ActivityPub\Helpers; +use App\Util\Lexer\RestrictedNames; +use Illuminate\Auth\Events\Registered; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Hash; +use Illuminate\Support\Str; use InvalidArgumentException; +use Purify; class RemoteAuthController extends Controller { @@ -30,9 +28,10 @@ class RemoteAuthController extends Controller config('remote-auth.mastodon.ignore_closed_state') && config('remote-auth.mastodon.enabled') ), 404); - if($request->user()) { + if ($request->user()) { return redirect('/'); } + return view('auth.remote.start'); } @@ -51,25 +50,27 @@ class RemoteAuthController extends Controller config('remote-auth.mastodon.enabled') ), 404); - if(config('remote-auth.mastodon.domains.only_custom')) { + if (config('remote-auth.mastodon.domains.only_custom')) { $res = config('remote-auth.mastodon.domains.custom'); - if(!$res || !strlen($res)) { + if (! $res || ! strlen($res)) { return []; } $res = explode(',', $res); + return response()->json($res); } - if( config('remote-auth.mastodon.domains.custom') && - !config('remote-auth.mastodon.domains.only_default') && + if (config('remote-auth.mastodon.domains.custom') && + ! config('remote-auth.mastodon.domains.only_default') && strlen(config('remote-auth.mastodon.domains.custom')) > 3 && strpos(config('remote-auth.mastodon.domains.custom'), '.') > -1 ) { $res = config('remote-auth.mastodon.domains.custom'); - if(!$res || !strlen($res)) { + if (! $res || ! strlen($res)) { return []; } $res = explode(',', $res); + return response()->json($res); } @@ -93,57 +94,62 @@ class RemoteAuthController extends Controller $domain = $request->input('domain'); - if(str_starts_with(strtolower($domain), 'http')) { + if (str_starts_with(strtolower($domain), 'http')) { $res = [ 'domain' => $domain, 'ready' => false, - 'action' => 'incompatible_domain' + 'action' => 'incompatible_domain', ]; + return response()->json($res); } - $validateInstance = Helpers::validateUrl('https://' . $domain . '/?block-check=' . time()); + $validateInstance = Helpers::validateUrl('https://'.$domain.'/?block-check='.time()); - if(!$validateInstance) { - $res = [ + if (! $validateInstance) { + $res = [ 'domain' => $domain, 'ready' => false, - 'action' => 'blocked_domain' + 'action' => 'blocked_domain', ]; + return response()->json($res); } $compatible = RemoteAuthService::isDomainCompatible($domain); - if(!$compatible) { + if (! $compatible) { $res = [ 'domain' => $domain, 'ready' => false, - 'action' => 'incompatible_domain' + 'action' => 'incompatible_domain', ]; + return response()->json($res); } - if(config('remote-auth.mastodon.domains.only_default')) { + if (config('remote-auth.mastodon.domains.only_default')) { $defaultDomains = explode(',', config('remote-auth.mastodon.domains.default')); - if(!in_array($domain, $defaultDomains)) { + if (! in_array($domain, $defaultDomains)) { $res = [ 'domain' => $domain, 'ready' => false, - 'action' => 'incompatible_domain' + 'action' => 'incompatible_domain', ]; + return response()->json($res); } } - if(config('remote-auth.mastodon.domains.only_custom') && config('remote-auth.mastodon.domains.custom')) { + if (config('remote-auth.mastodon.domains.only_custom') && config('remote-auth.mastodon.domains.custom')) { $customDomains = explode(',', config('remote-auth.mastodon.domains.custom')); - if(!in_array($domain, $customDomains)) { + if (! in_array($domain, $customDomains)) { $res = [ 'domain' => $domain, 'ready' => false, - 'action' => 'incompatible_domain' + 'action' => 'incompatible_domain', ]; + return response()->json($res); } } @@ -163,13 +169,13 @@ class RemoteAuthController extends Controller 'state' => $state, ]); - $request->session()->put('oauth_redirect_to', 'https://' . $domain . '/oauth/authorize?' . $query); + $request->session()->put('oauth_redirect_to', 'https://'.$domain.'/oauth/authorize?'.$query); $dsh = Str::random(17); $res = [ 'domain' => $domain, 'ready' => true, - 'dsh' => $dsh + 'dsh' => $dsh, ]; return response()->json($res); @@ -185,7 +191,7 @@ class RemoteAuthController extends Controller config('remote-auth.mastodon.enabled') ), 404); - if(!$request->filled('d') || !$request->filled('dsh') || !$request->session()->exists('oauth_redirect_to')) { + if (! $request->filled('d') || ! $request->filled('dsh') || ! $request->session()->exists('oauth_redirect_to')) { return redirect('/login'); } @@ -204,7 +210,7 @@ class RemoteAuthController extends Controller $domain = $request->session()->get('oauth_domain'); - if($request->filled('code')) { + if ($request->filled('code')) { $code = $request->input('code'); $state = $request->session()->pull('state'); @@ -216,12 +222,14 @@ class RemoteAuthController extends Controller $res = RemoteAuthService::getToken($domain, $code); - if(!$res || !isset($res['access_token'])) { + if (! $res || ! isset($res['access_token'])) { $request->session()->regenerate(); + return redirect('/login'); } $request->session()->put('oauth_remote_session_token', $res['access_token']); + return redirect('/auth/mastodon/getting-started'); } @@ -237,9 +245,10 @@ class RemoteAuthController extends Controller config('remote-auth.mastodon.ignore_closed_state') && config('remote-auth.mastodon.enabled') ), 404); - if($request->user()) { + if ($request->user()) { return redirect('/'); } + return view('auth.remote.onboarding'); } @@ -261,36 +270,36 @@ class RemoteAuthController extends Controller $res = RemoteAuthService::getVerifyCredentials($domain, $token); - abort_if(!$res || !isset($res['acct']), 403, 'Invalid credentials'); + abort_if(! $res || ! isset($res['acct']), 403, 'Invalid credentials'); - $webfinger = strtolower('@' . $res['acct'] . '@' . $domain); + $webfinger = strtolower('@'.$res['acct'].'@'.$domain); $request->session()->put('oauth_masto_webfinger', $webfinger); - if(config('remote-auth.mastodon.max_uses.enabled')) { + if (config('remote-auth.mastodon.max_uses.enabled')) { $limit = config('remote-auth.mastodon.max_uses.limit'); $uses = RemoteAuthService::lookupWebfingerUses($webfinger); - if($uses >= $limit) { + if ($uses >= $limit) { return response()->json([ 'code' => 200, 'msg' => 'Success!', - 'action' => 'max_uses_reached' + 'action' => 'max_uses_reached', ]); } } $exists = RemoteAuth::whereDomain($domain)->where('webfinger', $webfinger)->whereNotNull('user_id')->first(); - if($exists && $exists->user_id) { + if ($exists && $exists->user_id) { return response()->json([ 'code' => 200, 'msg' => 'Success!', - 'action' => 'redirect_existing_user' + 'action' => 'redirect_existing_user', ]); } return response()->json([ 'code' => 200, 'msg' => 'Success!', - 'action' => 'onboard' + 'action' => 'onboard', ]); } @@ -311,7 +320,7 @@ class RemoteAuthController extends Controller $token = $request->session()->get('oauth_remote_session_token'); $res = RemoteAuthService::getVerifyCredentials($domain, $token); - $res['_webfinger'] = strtolower('@' . $res['acct'] . '@' . $domain); + $res['_webfinger'] = strtolower('@'.$res['acct'].'@'.$domain); $res['_domain'] = strtolower($domain); $request->session()->put('oauth_remasto_id', $res['id']); @@ -324,7 +333,7 @@ class RemoteAuthController extends Controller 'bearer_token' => $token, 'verify_credentials' => $res, 'last_verify_credentials_at' => now(), - 'last_successful_login_at' => now() + 'last_successful_login_at' => now(), ]); $request->session()->put('oauth_masto_raid', $ra->id); @@ -355,24 +364,24 @@ class RemoteAuthController extends Controller $underscore = substr_count($value, '_'); $period = substr_count($value, '.'); - if(ends_with($value, ['.php', '.js', '.css'])) { + if (ends_with($value, ['.php', '.js', '.css'])) { return $fail('Username is invalid.'); } - if(($dash + $underscore + $period) > 1) { + if (($dash + $underscore + $period) > 1) { return $fail('Username is invalid. Can only contain one dash (-), period (.) or underscore (_).'); } - if (!ctype_alnum($value[0])) { + if (! ctype_alnum($value[0])) { return $fail('Username is invalid. Must start with a letter or number.'); } - if (!ctype_alnum($value[strlen($value) - 1])) { + if (! ctype_alnum($value[strlen($value) - 1])) { return $fail('Username is invalid. Must end with a letter or number.'); } $val = str_replace(['_', '.', '-'], '', $value); - if(!ctype_alnum($val)) { + if (! ctype_alnum($val)) { return $fail('Username is invalid. Username must be alpha-numeric and may contain dashes (-), periods (.) and underscores (_).'); } @@ -380,8 +389,8 @@ class RemoteAuthController extends Controller if (in_array(strtolower($value), array_map('strtolower', $restricted))) { return $fail('Username cannot be used.'); } - } - ] + }, + ], ]); $username = strtolower($request->input('username')); @@ -390,7 +399,7 @@ class RemoteAuthController extends Controller return response()->json([ 'code' => 200, 'username' => $username, - 'exists' => $exists + 'exists' => $exists, ]); } @@ -411,7 +420,7 @@ class RemoteAuthController extends Controller 'email' => [ 'required', 'email:strict,filter_unicode,dns,spoof', - ] + ], ]); $email = $request->input('email'); @@ -422,7 +431,7 @@ class RemoteAuthController extends Controller 'code' => 200, 'email' => $email, 'exists' => $exists, - 'banned' => $banned + 'banned' => $banned, ]); } @@ -445,18 +454,18 @@ class RemoteAuthController extends Controller $res = RemoteAuthService::getFollowing($domain, $token, $id); - if(!$res) { + if (! $res) { return response()->json([ 'code' => 200, - 'following' => [] + 'following' => [], ]); } - $res = collect($res)->filter(fn($acct) => Helpers::validateUrl($acct['url']))->values()->toArray(); + $res = collect($res)->filter(fn ($acct) => Helpers::validateUrl($acct['url']))->values()->toArray(); return response()->json([ 'code' => 200, - 'following' => $res + 'following' => $res, ]); } @@ -487,24 +496,24 @@ class RemoteAuthController extends Controller $underscore = substr_count($value, '_'); $period = substr_count($value, '.'); - if(ends_with($value, ['.php', '.js', '.css'])) { + if (ends_with($value, ['.php', '.js', '.css'])) { return $fail('Username is invalid.'); } - if(($dash + $underscore + $period) > 1) { + if (($dash + $underscore + $period) > 1) { return $fail('Username is invalid. Can only contain one dash (-), period (.) or underscore (_).'); } - if (!ctype_alnum($value[0])) { + if (! ctype_alnum($value[0])) { return $fail('Username is invalid. Must start with a letter or number.'); } - if (!ctype_alnum($value[strlen($value) - 1])) { + if (! ctype_alnum($value[strlen($value) - 1])) { return $fail('Username is invalid. Must end with a letter or number.'); } $val = str_replace(['_', '.', '-'], '', $value); - if(!ctype_alnum($val)) { + if (! ctype_alnum($val)) { return $fail('Username is invalid. Username must be alpha-numeric and may contain dashes (-), periods (.) and underscores (_).'); } @@ -512,10 +521,10 @@ class RemoteAuthController extends Controller if (in_array(strtolower($value), array_map('strtolower', $restricted))) { return $fail('Username cannot be used.'); } - } + }, ], 'password' => 'required|string|min:8|confirmed', - 'name' => 'nullable|max:30' + 'name' => 'nullable|max:30', ]); $email = $request->input('email'); @@ -527,7 +536,7 @@ class RemoteAuthController extends Controller 'name' => $name, 'username' => $username, 'password' => $password, - 'email' => $email + 'email' => $email, ]); $raid = $request->session()->pull('oauth_masto_raid'); @@ -541,7 +550,7 @@ class RemoteAuthController extends Controller return [ 'code' => 200, 'msg' => 'Success', - 'token' => $token + 'token' => $token, ]; } @@ -585,7 +594,7 @@ class RemoteAuthController extends Controller abort_unless($request->session()->exists('oauth_remasto_id'), 403); $this->validate($request, [ - 'account' => 'required|url' + 'account' => 'required|url', ]); $account = $request->input('account'); @@ -594,10 +603,10 @@ class RemoteAuthController extends Controller $host = strtolower(config('pixelfed.domain.app')); $domain = strtolower(parse_url($account, PHP_URL_HOST)); - if($domain == $host) { + if ($domain == $host) { $username = Str::of($account)->explode('/')->last(); $user = User::where('username', $username)->first(); - if($user) { + if ($user) { return ['id' => (string) $user->profile_id]; } else { return []; @@ -605,7 +614,7 @@ class RemoteAuthController extends Controller } else { try { $profile = Helpers::profileFetch($account); - if($profile) { + if ($profile) { return ['id' => (string) $profile->id]; } else { return []; @@ -635,13 +644,13 @@ class RemoteAuthController extends Controller $user = $request->user(); $profile = $user->profile; - abort_if(!$profile->avatar, 404, 'Missing avatar'); + abort_if(! $profile->avatar, 404, 'Missing avatar'); $avatar = $profile->avatar; $avatar->remote_url = $request->input('avatar_url'); $avatar->save(); - MediaStorageService::avatar($avatar, config_cache('pixelfed.cloud_storage') == false); + MediaStorageService::avatar($avatar, (bool) config_cache('pixelfed.cloud_storage') == false); return [200]; } @@ -657,7 +666,7 @@ class RemoteAuthController extends Controller ), 404); abort_unless($request->user(), 404); - $currentWebfinger = '@' . $request->user()->username . '@' . config('pixelfed.domain.app'); + $currentWebfinger = '@'.$request->user()->username.'@'.config('pixelfed.domain.app'); $ra = RemoteAuth::where('user_id', $request->user()->id)->firstOrFail(); RemoteAuthService::submitToBeagle( $ra->webfinger, @@ -691,19 +700,20 @@ class RemoteAuthController extends Controller $user = User::findOrFail($ra->user_id); abort_if($user->is_admin || $user->status != null, 422, 'Invalid auth action'); Auth::loginUsingId($ra->user_id); + return [200]; } protected function createUser($data) { event(new Registered($user = User::create([ - 'name' => Purify::clean($data['name']), + 'name' => Purify::clean($data['name']), 'username' => $data['username'], - 'email' => $data['email'], + 'email' => $data['email'], 'password' => Hash::make($data['password']), 'email_verified_at' => config('remote-auth.mastodon.contraints.skip_email_verification') ? now() : null, 'app_register_ip' => request()->ip(), - 'register_source' => 'mastodon' + 'register_source' => 'mastodon', ]))); $this->guarder()->login($user); diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index cbf21518b..9388d3abd 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -2,368 +2,367 @@ namespace App\Http\Controllers; -use Auth; use App\Hashtag; use App\Place; use App\Profile; +use App\Services\WebfingerService; use App\Status; -use Illuminate\Http\Request; use App\Util\ActivityPub\Helpers; +use Auth; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Str; -use App\Transformer\Api\{ - AccountTransformer, - HashtagTransformer, - StatusTransformer, -}; -use App\Services\WebfingerService; class SearchController extends Controller { - public $tokens = []; - public $term = ''; - public $hash = ''; - public $cacheKey = 'api:search:tag:'; + public $tokens = []; - public function __construct() - { - $this->middleware('auth'); - } + public $term = ''; - public function searchAPI(Request $request) - { - $this->validate($request, [ - 'q' => 'required|string|min:3|max:120', - 'src' => 'required|string|in:metro', - 'v' => 'required|integer|in:2', - 'scope' => 'required|in:all,hashtag,profile,remote,webfinger' - ]); + public $hash = ''; - $scope = $request->input('scope') ?? 'all'; - $this->term = e(urldecode($request->input('q'))); - $this->hash = hash('sha256', $this->term); + public $cacheKey = 'api:search:tag:'; - switch ($scope) { - case 'all': - $this->getHashtags(); - $this->getPosts(); - $this->getProfiles(); - // $this->getPlaces(); - break; + public function __construct() + { + $this->middleware('auth'); + } - case 'hashtag': - $this->getHashtags(); - break; + public function searchAPI(Request $request) + { + $this->validate($request, [ + 'q' => 'required|string|min:3|max:120', + 'src' => 'required|string|in:metro', + 'v' => 'required|integer|in:2', + 'scope' => 'required|in:all,hashtag,profile,remote,webfinger', + ]); - case 'profile': - $this->getProfiles(); - break; + $scope = $request->input('scope') ?? 'all'; + $this->term = e(urldecode($request->input('q'))); + $this->hash = hash('sha256', $this->term); - case 'webfinger': - $this->webfingerSearch(); - break; + switch ($scope) { + case 'all': + $this->getHashtags(); + $this->getPosts(); + $this->getProfiles(); + // $this->getPlaces(); + break; - case 'remote': - $this->remoteLookupSearch(); - break; + case 'hashtag': + $this->getHashtags(); + break; - case 'place': - $this->getPlaces(); - break; + case 'profile': + $this->getProfiles(); + break; - default: - break; - } + case 'webfinger': + $this->webfingerSearch(); + break; - return response()->json($this->tokens, 200, [], JSON_PRETTY_PRINT); - } + case 'remote': + $this->remoteLookupSearch(); + break; - protected function getPosts() - { - $tag = $this->term; - $hash = hash('sha256', $tag); - if( Helpers::validateUrl($tag) != false && - Helpers::validateLocalUrl($tag) != true && - config_cache('federation.activitypub.enabled') == true && - config('federation.activitypub.remoteFollow') == true - ) { - $remote = Helpers::fetchFromUrl($tag); - if( isset($remote['type']) && - $remote['type'] == 'Note') { - $item = Helpers::statusFetch($tag); - $this->tokens['posts'] = [[ - 'count' => 0, - 'url' => $item->url(), - 'type' => 'status', - 'value' => "by {$item->profile->username} {$item->created_at->diffForHumans(null, true, true)}", - 'tokens' => [$item->caption], - 'name' => $item->caption, - 'thumb' => $item->thumb(), - ]]; - } - } else { - $posts = Status::select('id', 'profile_id', 'caption', 'created_at') - ->whereHas('media') - ->whereNull('in_reply_to_id') - ->whereNull('reblog_of_id') - ->whereProfileId(Auth::user()->profile_id) - ->where('caption', 'like', '%'.$tag.'%') - ->latest() - ->limit(10) - ->get(); + case 'place': + $this->getPlaces(); + break; - if($posts->count() > 0) { - $posts = $posts->map(function($item, $key) { - return [ - 'count' => 0, - 'url' => $item->url(), - 'type' => 'status', - 'value' => "by {$item->profile->username} {$item->created_at->diffForHumans(null, true, true)}", - 'tokens' => [$item->caption], - 'name' => $item->caption, - 'thumb' => $item->thumb(), - 'filter' => $item->firstMedia()->filter_class - ]; - }); - $this->tokens['posts'] = $posts; - } - } - } + default: + break; + } - protected function getHashtags() - { - $tag = $this->term; - $key = $this->cacheKey . 'hashtags:' . $this->hash; - $ttl = now()->addMinutes(1); - $tokens = Cache::remember($key, $ttl, function() use($tag) { - $htag = Str::startsWith($tag, '#') == true ? mb_substr($tag, 1) : $tag; - $hashtags = Hashtag::select('id', 'name', 'slug') - ->where('slug', 'like', '%'.$htag.'%') - ->whereHas('posts') - ->limit(20) - ->get(); - if($hashtags->count() > 0) { - $tags = $hashtags->map(function ($item, $key) { - return [ - 'count' => $item->posts()->count(), - 'url' => $item->url(), - 'type' => 'hashtag', - 'value' => $item->name, - 'tokens' => '', - 'name' => null, - ]; - }); - return $tags; - } - }); - $this->tokens['hashtags'] = $tokens; - } + return response()->json($this->tokens, 200, [], JSON_PRETTY_PRINT); + } - protected function getPlaces() - { - $tag = $this->term; - // $key = $this->cacheKey . 'places:' . $this->hash; - // $ttl = now()->addHours(12); - // $tokens = Cache::remember($key, $ttl, function() use($tag) { - $htag = Str::contains($tag, ',') == true ? explode(',', $tag) : [$tag]; - $hashtags = Place::select('id', 'name', 'slug', 'country') - ->where('name', 'like', '%'.$htag[0].'%') - ->paginate(20); - $tags = []; - if($hashtags->count() > 0) { - $tags = $hashtags->map(function ($item, $key) { - return [ - 'count' => null, - 'url' => $item->url(), - 'type' => 'place', - 'value' => $item->name . ', ' . $item->country, - 'tokens' => '', - 'name' => null, - 'city' => $item->name, - 'country' => $item->country - ]; - }); - // return $tags; - } - // }); - $this->tokens['places'] = $tags; - $this->tokens['placesPagination'] = [ - 'total' => $hashtags->total(), - 'current_page' => $hashtags->currentPage(), - 'last_page' => $hashtags->lastPage() - ]; - } + protected function getPosts() + { + $tag = $this->term; + $hash = hash('sha256', $tag); + if (Helpers::validateUrl($tag) != false && + Helpers::validateLocalUrl($tag) != true && + (bool) config_cache('federation.activitypub.enabled') == true && + config('federation.activitypub.remoteFollow') == true + ) { + $remote = Helpers::fetchFromUrl($tag); + if (isset($remote['type']) && + in_array($remote['type'], ['Note', 'Question']) + ) { + $item = Helpers::statusFetch($tag); + $this->tokens['posts'] = [[ + 'count' => 0, + 'url' => $item->url(), + 'type' => 'status', + 'value' => "by {$item->profile->username} {$item->created_at->diffForHumans(null, true, true)}", + 'tokens' => [$item->caption], + 'name' => $item->caption, + 'thumb' => $item->thumb(), + ]]; + } + } else { + $posts = Status::select('id', 'profile_id', 'caption', 'created_at') + ->whereHas('media') + ->whereNull('in_reply_to_id') + ->whereNull('reblog_of_id') + ->whereProfileId(Auth::user()->profile_id) + ->where('caption', 'like', '%'.$tag.'%') + ->latest() + ->limit(10) + ->get(); - protected function getProfiles() - { - $tag = $this->term; - $remoteKey = $this->cacheKey . 'profiles:remote:' . $this->hash; - $key = $this->cacheKey . 'profiles:' . $this->hash; - $remoteTtl = now()->addMinutes(15); - $ttl = now()->addHours(2); - if( Helpers::validateUrl($tag) != false && - Helpers::validateLocalUrl($tag) != true && - config_cache('federation.activitypub.enabled') == true && - config('federation.activitypub.remoteFollow') == true - ) { - $remote = Helpers::fetchFromUrl($tag); - if( isset($remote['type']) && - $remote['type'] == 'Person' - ) { - $this->tokens['profiles'] = Cache::remember($remoteKey, $remoteTtl, function() use($tag) { - $item = Helpers::profileFirstOrNew($tag); - $tokens = [[ - 'count' => 1, - 'url' => $item->url(), - 'type' => 'profile', - 'value' => $item->username, - 'tokens' => [$item->username], - 'name' => $item->name, - 'entity' => [ - 'id' => (string) $item->id, - 'following' => $item->followedBy(Auth::user()->profile), - 'follow_request' => $item->hasFollowRequestById(Auth::user()->profile_id), - 'thumb' => $item->avatarUrl(), - 'local' => (bool) !$item->domain, - 'post_count' => $item->statuses()->count() - ] - ]]; - return $tokens; - }); - } - } + if ($posts->count() > 0) { + $posts = $posts->map(function ($item, $key) { + return [ + 'count' => 0, + 'url' => $item->url(), + 'type' => 'status', + 'value' => "by {$item->profile->username} {$item->created_at->diffForHumans(null, true, true)}", + 'tokens' => [$item->caption], + 'name' => $item->caption, + 'thumb' => $item->thumb(), + 'filter' => $item->firstMedia()->filter_class, + ]; + }); + $this->tokens['posts'] = $posts; + } + } + } - else { - $this->tokens['profiles'] = Cache::remember($key, $ttl, function() use($tag) { - if(Str::startsWith($tag, '@')) { - $tag = substr($tag, 1); - } - $users = Profile::select('status', 'domain', 'username', 'name', 'id') - ->whereNull('status') - ->where('username', 'like', '%'.$tag.'%') - ->limit(20) - ->orderBy('domain') - ->get(); + protected function getHashtags() + { + $tag = $this->term; + $key = $this->cacheKey.'hashtags:'.$this->hash; + $ttl = now()->addMinutes(1); + $tokens = Cache::remember($key, $ttl, function () use ($tag) { + $htag = Str::startsWith($tag, '#') == true ? mb_substr($tag, 1) : $tag; + $hashtags = Hashtag::select('id', 'name', 'slug') + ->where('slug', 'like', '%'.$htag.'%') + ->whereHas('posts') + ->limit(20) + ->get(); + if ($hashtags->count() > 0) { + $tags = $hashtags->map(function ($item, $key) { + return [ + 'count' => $item->posts()->count(), + 'url' => $item->url(), + 'type' => 'hashtag', + 'value' => $item->name, + 'tokens' => '', + 'name' => null, + ]; + }); - if($users->count() > 0) { - return $users->map(function ($item, $key) { - return [ - 'count' => 0, - 'url' => $item->url(), - 'type' => 'profile', - 'value' => $item->username, - 'tokens' => [$item->username], - 'name' => $item->name, - 'avatar' => $item->avatarUrl(), - 'id' => (string) $item->id, - 'entity' => [ - 'id' => (string) $item->id, - 'following' => $item->followedBy(Auth::user()->profile), - 'follow_request' => $item->hasFollowRequestById(Auth::user()->profile_id), - 'thumb' => $item->avatarUrl(), - 'local' => (bool) !$item->domain, - 'post_count' => $item->statuses()->count() - ] - ]; - }); - } - }); - } - } + return $tags; + } + }); + $this->tokens['hashtags'] = $tokens; + } - public function results(Request $request) - { - $this->validate($request, [ - 'q' => 'required|string|min:1', - ]); + protected function getPlaces() + { + $tag = $this->term; + // $key = $this->cacheKey . 'places:' . $this->hash; + // $ttl = now()->addHours(12); + // $tokens = Cache::remember($key, $ttl, function() use($tag) { + $htag = Str::contains($tag, ',') == true ? explode(',', $tag) : [$tag]; + $hashtags = Place::select('id', 'name', 'slug', 'country') + ->where('name', 'like', '%'.$htag[0].'%') + ->paginate(20); + $tags = []; + if ($hashtags->count() > 0) { + $tags = $hashtags->map(function ($item, $key) { + return [ + 'count' => null, + 'url' => $item->url(), + 'type' => 'place', + 'value' => $item->name.', '.$item->country, + 'tokens' => '', + 'name' => null, + 'city' => $item->name, + 'country' => $item->country, + ]; + }); + // return $tags; + } + // }); + $this->tokens['places'] = $tags; + $this->tokens['placesPagination'] = [ + 'total' => $hashtags->total(), + 'current_page' => $hashtags->currentPage(), + 'last_page' => $hashtags->lastPage(), + ]; + } - return view('search.results'); - } + protected function getProfiles() + { + $tag = $this->term; + $remoteKey = $this->cacheKey.'profiles:remote:'.$this->hash; + $key = $this->cacheKey.'profiles:'.$this->hash; + $remoteTtl = now()->addMinutes(15); + $ttl = now()->addHours(2); + if (Helpers::validateUrl($tag) != false && + Helpers::validateLocalUrl($tag) != true && + (bool) config_cache('federation.activitypub.enabled') == true && + config('federation.activitypub.remoteFollow') == true + ) { + $remote = Helpers::fetchFromUrl($tag); + if (isset($remote['type']) && + $remote['type'] == 'Person' + ) { + $this->tokens['profiles'] = Cache::remember($remoteKey, $remoteTtl, function () use ($tag) { + $item = Helpers::profileFirstOrNew($tag); + $tokens = [[ + 'count' => 1, + 'url' => $item->url(), + 'type' => 'profile', + 'value' => $item->username, + 'tokens' => [$item->username], + 'name' => $item->name, + 'entity' => [ + 'id' => (string) $item->id, + 'following' => $item->followedBy(Auth::user()->profile), + 'follow_request' => $item->hasFollowRequestById(Auth::user()->profile_id), + 'thumb' => $item->avatarUrl(), + 'local' => (bool) ! $item->domain, + 'post_count' => $item->statuses()->count(), + ], + ]]; - protected function webfingerSearch() - { - $wfs = WebfingerService::lookup($this->term); + return $tokens; + }); + } + } else { + $this->tokens['profiles'] = Cache::remember($key, $ttl, function () use ($tag) { + if (Str::startsWith($tag, '@')) { + $tag = substr($tag, 1); + } + $users = Profile::select('status', 'domain', 'username', 'name', 'id') + ->whereNull('status') + ->where('username', 'like', '%'.$tag.'%') + ->limit(20) + ->orderBy('domain') + ->get(); - if(empty($wfs)) { - return; - } + if ($users->count() > 0) { + return $users->map(function ($item, $key) { + return [ + 'count' => 0, + 'url' => $item->url(), + 'type' => 'profile', + 'value' => $item->username, + 'tokens' => [$item->username], + 'name' => $item->name, + 'avatar' => $item->avatarUrl(), + 'id' => (string) $item->id, + 'entity' => [ + 'id' => (string) $item->id, + 'following' => $item->followedBy(Auth::user()->profile), + 'follow_request' => $item->hasFollowRequestById(Auth::user()->profile_id), + 'thumb' => $item->avatarUrl(), + 'local' => (bool) ! $item->domain, + 'post_count' => $item->statuses()->count(), + ], + ]; + }); + } + }); + } + } - $this->tokens['profiles'] = [ - [ - 'count' => 1, - 'url' => $wfs['url'], - 'type' => 'profile', - 'value' => $wfs['username'], - 'tokens' => [$wfs['username']], - 'name' => $wfs['display_name'], - 'entity' => [ - 'id' => (string) $wfs['id'], - 'following' => null, - 'follow_request' => null, - 'thumb' => $wfs['avatar'], - 'local' => (bool) $wfs['local'] - ] - ] - ]; - return; - } + public function results(Request $request) + { + $this->validate($request, [ + 'q' => 'required|string|min:1', + ]); - protected function remotePostLookup() - { - $tag = $this->term; - $hash = hash('sha256', $tag); - $local = Helpers::validateLocalUrl($tag); - $valid = Helpers::validateUrl($tag); + return view('search.results'); + } - if($valid == false || $local == true) { - return; - } + protected function webfingerSearch() + { + $wfs = WebfingerService::lookup($this->term); - if(Status::whereUri($tag)->whereLocal(false)->exists()) { - $item = Status::whereUri($tag)->first(); - $media = $item->firstMedia(); - $url = null; - if($media) { - $url = $media->remote_url; - } - $this->tokens['posts'] = [[ - 'count' => 0, - 'url' => "/i/web/post/_/$item->profile_id/$item->id", - 'type' => 'status', - 'username' => $item->profile->username, - 'caption' => $item->rendered ?? $item->caption, - 'thumb' => $url, - 'timestamp' => $item->created_at->diffForHumans() - ]]; - } + if (empty($wfs)) { + return; + } - $remote = Helpers::fetchFromUrl($tag); + $this->tokens['profiles'] = [ + [ + 'count' => 1, + 'url' => $wfs['url'], + 'type' => 'profile', + 'value' => $wfs['username'], + 'tokens' => [$wfs['username']], + 'name' => $wfs['display_name'], + 'entity' => [ + 'id' => (string) $wfs['id'], + 'following' => null, + 'follow_request' => null, + 'thumb' => $wfs['avatar'], + 'local' => (bool) $wfs['local'], + ], + ], + ]; - if(isset($remote['type']) && $remote['type'] == 'Note') { - $item = Helpers::statusFetch($tag); - $media = $item->firstMedia(); - $url = null; - if($media) { - $url = $media->remote_url; - } - $this->tokens['posts'] = [[ - 'count' => 0, - 'url' => "/i/web/post/_/$item->profile_id/$item->id", - 'type' => 'status', - 'username' => $item->profile->username, - 'caption' => $item->rendered ?? $item->caption, - 'thumb' => $url, - 'timestamp' => $item->created_at->diffForHumans() - ]]; - } - } + } - protected function remoteLookupSearch() - { - if(!Helpers::validateUrl($this->term)) { - return; - } - $this->getProfiles(); - $this->remotePostLookup(); - } + protected function remotePostLookup() + { + $tag = $this->term; + $hash = hash('sha256', $tag); + $local = Helpers::validateLocalUrl($tag); + $valid = Helpers::validateUrl($tag); + + if ($valid == false || $local == true) { + return; + } + + if (Status::whereUri($tag)->whereLocal(false)->exists()) { + $item = Status::whereUri($tag)->first(); + $media = $item->firstMedia(); + $url = null; + if ($media) { + $url = $media->remote_url; + } + $this->tokens['posts'] = [[ + 'count' => 0, + 'url' => "/i/web/post/_/$item->profile_id/$item->id", + 'type' => 'status', + 'username' => $item->profile->username, + 'caption' => $item->rendered ?? $item->caption, + 'thumb' => $url, + 'timestamp' => $item->created_at->diffForHumans(), + ]]; + } + + $remote = Helpers::fetchFromUrl($tag); + + if (isset($remote['type']) && $remote['type'] == 'Note') { + $item = Helpers::statusFetch($tag); + $media = $item->firstMedia(); + $url = null; + if ($media) { + $url = $media->remote_url; + } + $this->tokens['posts'] = [[ + 'count' => 0, + 'url' => "/i/web/post/_/$item->profile_id/$item->id", + 'type' => 'status', + 'username' => $item->profile->username, + 'caption' => $item->rendered ?? $item->caption, + 'thumb' => $url, + 'timestamp' => $item->created_at->diffForHumans(), + ]]; + } + } + + protected function remoteLookupSearch() + { + if (! Helpers::validateUrl($this->term)) { + return; + } + $this->getProfiles(); + $this->remotePostLookup(); + } } diff --git a/app/Http/Controllers/StatusController.php b/app/Http/Controllers/StatusController.php index 4a3b3552d..7f77f9a81 100644 --- a/app/Http/Controllers/StatusController.php +++ b/app/Http/Controllers/StatusController.php @@ -78,7 +78,7 @@ class StatusController extends Controller ]); } - if ($request->wantsJson() && config_cache('federation.activitypub.enabled')) { + if ($request->wantsJson() && (bool) config_cache('federation.activitypub.enabled')) { return $this->showActivityPub($request, $status); } diff --git a/app/Http/Controllers/Stories/StoryApiV1Controller.php b/app/Http/Controllers/Stories/StoryApiV1Controller.php index ca6a24791..5d0a15160 100644 --- a/app/Http/Controllers/Stories/StoryApiV1Controller.php +++ b/app/Http/Controllers/Stories/StoryApiV1Controller.php @@ -2,54 +2,56 @@ namespace App\Http\Controllers\Stories; -use App\Http\Controllers\Controller; -use Illuminate\Http\Request; -use Illuminate\Support\Str; -use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\Storage; -use App\Models\Conversation; use App\DirectMessage; -use App\Notification; -use App\Story; -use App\Status; -use App\StoryView; +use App\Http\Controllers\Controller; +use App\Http\Resources\StoryView as StoryViewResource; use App\Jobs\StoryPipeline\StoryDelete; use App\Jobs\StoryPipeline\StoryFanout; use App\Jobs\StoryPipeline\StoryReplyDeliver; use App\Jobs\StoryPipeline\StoryViewDeliver; +use App\Models\Conversation; +use App\Notification; use App\Services\AccountService; use App\Services\MediaPathService; use App\Services\StoryService; -use App\Http\Resources\StoryView as StoryViewResource; +use App\Status; +use App\Story; +use App\StoryView; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Storage; +use Illuminate\Support\Str; class StoryApiV1Controller extends Controller { const RECENT_KEY = 'pf:stories:recent-by-id:'; + const RECENT_TTL = 300; public function carousel(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $pid = $request->user()->profile_id; - if(config('database.default') == 'pgsql') { - $s = Cache::remember(self::RECENT_KEY . $pid, self::RECENT_TTL, function() use($pid) { + if (config('database.default') == 'pgsql') { + $s = Cache::remember(self::RECENT_KEY.$pid, self::RECENT_TTL, function () use ($pid) { return Story::select('stories.*', 'followers.following_id') ->leftJoin('followers', 'followers.following_id', 'stories.profile_id') ->where('followers.profile_id', $pid) ->where('stories.active', true) - ->map(function($s) { - $r = new \StdClass; + ->map(function ($s) { + $r = new \StdClass; $r->id = $s->id; $r->profile_id = $s->profile_id; $r->type = $s->type; $r->path = $s->path; + return $r; }) ->unique('profile_id'); }); } else { - $s = Cache::remember(self::RECENT_KEY . $pid, self::RECENT_TTL, function() use($pid) { + $s = Cache::remember(self::RECENT_KEY.$pid, self::RECENT_TTL, function () use ($pid) { return Story::select('stories.*', 'followers.following_id') ->leftJoin('followers', 'followers.following_id', 'stories.profile_id') ->where('followers.profile_id', $pid) @@ -59,9 +61,9 @@ class StoryApiV1Controller extends Controller }); } - $nodes = $s->map(function($s) use($pid) { + $nodes = $s->map(function ($s) use ($pid) { $profile = AccountService::get($s->profile_id, true); - if(!$profile || !isset($profile['id'])) { + if (! $profile || ! isset($profile['id'])) { return false; } @@ -72,50 +74,51 @@ class StoryApiV1Controller extends Controller 'src' => url(Storage::url($s->path)), 'duration' => $s->duration ?? 3, 'seen' => StoryService::hasSeen($pid, $s->id), - 'created_at' => $s->created_at->format('c') + 'created_at' => $s->created_at->format('c'), ]; }) - ->filter() - ->groupBy('pid') - ->map(function($item) use($pid) { - $profile = AccountService::get($item[0]['pid'], true); - $url = $profile['local'] ? url("/stories/{$profile['username']}") : - url("/i/rs/{$profile['id']}"); - return [ - 'id' => 'pfs:' . $profile['id'], - 'user' => [ - 'id' => (string) $profile['id'], - 'username' => $profile['username'], - 'username_acct' => $profile['acct'], - 'avatar' => $profile['avatar'], - 'local' => $profile['local'], - 'is_author' => $profile['id'] == $pid - ], - 'nodes' => $item, - 'url' => $url, - 'seen' => StoryService::hasSeen($pid, StoryService::latest($profile['id'])), - ]; - }) - ->sortBy('seen') - ->values(); + ->filter() + ->groupBy('pid') + ->map(function ($item) use ($pid) { + $profile = AccountService::get($item[0]['pid'], true); + $url = $profile['local'] ? url("/stories/{$profile['username']}") : + url("/i/rs/{$profile['id']}"); + + return [ + 'id' => 'pfs:'.$profile['id'], + 'user' => [ + 'id' => (string) $profile['id'], + 'username' => $profile['username'], + 'username_acct' => $profile['acct'], + 'avatar' => $profile['avatar'], + 'local' => $profile['local'], + 'is_author' => $profile['id'] == $pid, + ], + 'nodes' => $item, + 'url' => $url, + 'seen' => StoryService::hasSeen($pid, StoryService::latest($profile['id'])), + ]; + }) + ->sortBy('seen') + ->values(); $res = [ 'self' => [], 'nodes' => $nodes, ]; - if(Story::whereProfileId($pid)->whereActive(true)->exists()) { + if (Story::whereProfileId($pid)->whereActive(true)->exists()) { $selfStories = Story::whereProfileId($pid) ->whereActive(true) ->get() - ->map(function($s) use($pid) { + ->map(function ($s) { return [ 'id' => (string) $s->id, 'type' => $s->type, 'src' => url(Storage::url($s->path)), 'duration' => $s->duration, 'seen' => true, - 'created_at' => $s->created_at->format('c') + 'created_at' => $s->created_at->format('c'), ]; }) ->sortBy('id') @@ -127,38 +130,40 @@ class StoryApiV1Controller extends Controller 'username' => $selfProfile['acct'], 'avatar' => $selfProfile['avatar'], 'local' => $selfProfile['local'], - 'is_author' => true + 'is_author' => true, ], 'nodes' => $selfStories, ]; } - return response()->json($res, 200, [], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); + + return response()->json($res, 200, [], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } public function selfCarousel(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $pid = $request->user()->profile_id; - if(config('database.default') == 'pgsql') { - $s = Cache::remember(self::RECENT_KEY . $pid, self::RECENT_TTL, function() use($pid) { + if (config('database.default') == 'pgsql') { + $s = Cache::remember(self::RECENT_KEY.$pid, self::RECENT_TTL, function () use ($pid) { return Story::select('stories.*', 'followers.following_id') ->leftJoin('followers', 'followers.following_id', 'stories.profile_id') ->where('followers.profile_id', $pid) ->where('stories.active', true) - ->map(function($s) { - $r = new \StdClass; + ->map(function ($s) { + $r = new \StdClass; $r->id = $s->id; $r->profile_id = $s->profile_id; $r->type = $s->type; $r->path = $s->path; + return $r; }) ->unique('profile_id'); }); } else { - $s = Cache::remember(self::RECENT_KEY . $pid, self::RECENT_TTL, function() use($pid) { + $s = Cache::remember(self::RECENT_KEY.$pid, self::RECENT_TTL, function () use ($pid) { return Story::select('stories.*', 'followers.following_id') ->leftJoin('followers', 'followers.following_id', 'stories.profile_id') ->where('followers.profile_id', $pid) @@ -168,9 +173,9 @@ class StoryApiV1Controller extends Controller }); } - $nodes = $s->map(function($s) use($pid) { + $nodes = $s->map(function ($s) use ($pid) { $profile = AccountService::get($s->profile_id, true); - if(!$profile || !isset($profile['id'])) { + if (! $profile || ! isset($profile['id'])) { return false; } @@ -181,32 +186,33 @@ class StoryApiV1Controller extends Controller 'src' => url(Storage::url($s->path)), 'duration' => $s->duration ?? 3, 'seen' => StoryService::hasSeen($pid, $s->id), - 'created_at' => $s->created_at->format('c') + 'created_at' => $s->created_at->format('c'), ]; }) - ->filter() - ->groupBy('pid') - ->map(function($item) use($pid) { - $profile = AccountService::get($item[0]['pid'], true); - $url = $profile['local'] ? url("/stories/{$profile['username']}") : - url("/i/rs/{$profile['id']}"); - return [ - 'id' => 'pfs:' . $profile['id'], - 'user' => [ - 'id' => (string) $profile['id'], - 'username' => $profile['username'], - 'username_acct' => $profile['acct'], - 'avatar' => $profile['avatar'], - 'local' => $profile['local'], - 'is_author' => $profile['id'] == $pid - ], - 'nodes' => $item, - 'url' => $url, - 'seen' => StoryService::hasSeen($pid, StoryService::latest($profile['id'])), - ]; - }) - ->sortBy('seen') - ->values(); + ->filter() + ->groupBy('pid') + ->map(function ($item) use ($pid) { + $profile = AccountService::get($item[0]['pid'], true); + $url = $profile['local'] ? url("/stories/{$profile['username']}") : + url("/i/rs/{$profile['id']}"); + + return [ + 'id' => 'pfs:'.$profile['id'], + 'user' => [ + 'id' => (string) $profile['id'], + 'username' => $profile['username'], + 'username_acct' => $profile['acct'], + 'avatar' => $profile['avatar'], + 'local' => $profile['local'], + 'is_author' => $profile['id'] == $pid, + ], + 'nodes' => $item, + 'url' => $url, + 'seen' => StoryService::hasSeen($pid, StoryService::latest($profile['id'])), + ]; + }) + ->sortBy('seen') + ->values(); $selfProfile = AccountService::get($pid, true); $res = [ @@ -216,7 +222,7 @@ class StoryApiV1Controller extends Controller 'username' => $selfProfile['acct'], 'avatar' => $selfProfile['avatar'], 'local' => $selfProfile['local'], - 'is_author' => true + 'is_author' => true, ], 'nodes' => [], @@ -224,40 +230,41 @@ class StoryApiV1Controller extends Controller 'nodes' => $nodes, ]; - if(Story::whereProfileId($pid)->whereActive(true)->exists()) { + if (Story::whereProfileId($pid)->whereActive(true)->exists()) { $selfStories = Story::whereProfileId($pid) ->whereActive(true) ->get() - ->map(function($s) use($pid) { + ->map(function ($s) { return [ 'id' => (string) $s->id, 'type' => $s->type, 'src' => url(Storage::url($s->path)), 'duration' => $s->duration, 'seen' => true, - 'created_at' => $s->created_at->format('c') + 'created_at' => $s->created_at->format('c'), ]; }) ->sortBy('id') ->values(); $res['self']['nodes'] = $selfStories; } - return response()->json($res, 200, [], JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); + + return response()->json($res, 200, [], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } public function add(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ - 'file' => function() { + 'file' => function () { return [ 'required', 'mimetypes:image/jpeg,image/png,video/mp4', - 'max:' . config_cache('pixelfed.max_photo_size'), + 'max:'.config_cache('pixelfed.max_photo_size'), ]; }, - 'duration' => 'sometimes|integer|min:0|max:30' + 'duration' => 'sometimes|integer|min:0|max:30', ]); $user = $request->user(); @@ -267,7 +274,7 @@ class StoryApiV1Controller extends Controller ->where('expires_at', '>', now()) ->count(); - if($count >= Story::MAX_PER_DAY) { + if ($count >= Story::MAX_PER_DAY) { abort(418, 'You have reached your limit for new Stories today.'); } @@ -277,7 +284,7 @@ class StoryApiV1Controller extends Controller $story = new Story(); $story->duration = $request->input('duration', 3); $story->profile_id = $user->profile_id; - $story->type = Str::endsWith($photo->getMimeType(), 'mp4') ? 'video' :'photo'; + $story->type = Str::endsWith($photo->getMimeType(), 'mp4') ? 'video' : 'photo'; $story->mime = $photo->getMimeType(); $story->path = $path; $story->local = true; @@ -290,10 +297,10 @@ class StoryApiV1Controller extends Controller $res = [ 'code' => 200, - 'msg' => 'Successfully added', + 'msg' => 'Successfully added', 'media_id' => (string) $story->id, - 'media_url' => url(Storage::url($url)) . '?v=' . time(), - 'media_type' => $story->type + 'media_url' => url(Storage::url($url)).'?v='.time(), + 'media_type' => $story->type, ]; return $res; @@ -301,13 +308,13 @@ class StoryApiV1Controller extends Controller public function publish(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'media_id' => 'required', 'duration' => 'required|integer|min:0|max:30', 'can_reply' => 'required|boolean', - 'can_react' => 'required|boolean' + 'can_react' => 'required|boolean', ]); $id = $request->input('media_id'); @@ -327,13 +334,13 @@ class StoryApiV1Controller extends Controller return [ 'code' => 200, - 'msg' => 'Successfully published', + 'msg' => 'Successfully published', ]; } public function delete(Request $request, $id) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $user = $request->user(); @@ -346,16 +353,16 @@ class StoryApiV1Controller extends Controller return [ 'code' => 200, - 'msg' => 'Successfully deleted' + 'msg' => 'Successfully deleted', ]; } public function viewed(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ - 'id' => 'required|min:1', + 'id' => 'required|min:1', ]); $id = $request->input('id'); @@ -367,44 +374,45 @@ class StoryApiV1Controller extends Controller $profile = $story->profile; - if($story->profile_id == $authed->id) { + if ($story->profile_id == $authed->id) { return []; } $publicOnly = (bool) $profile->followedBy($authed); - abort_if(!$publicOnly, 403); + abort_if(! $publicOnly, 403); $v = StoryView::firstOrCreate([ 'story_id' => $id, - 'profile_id' => $authed->id + 'profile_id' => $authed->id, ]); - if($v->wasRecentlyCreated) { + if ($v->wasRecentlyCreated) { Story::findOrFail($story->id)->increment('view_count'); - if($story->local == false) { + if ($story->local == false) { StoryViewDeliver::dispatch($story, $authed)->onQueue('story'); } } - Cache::forget('stories:recent:by_id:' . $authed->id); + Cache::forget('stories:recent:by_id:'.$authed->id); StoryService::addSeen($authed->id, $story->id); + return ['code' => 200]; } public function comment(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'sid' => 'required', - 'caption' => 'required|string' + 'caption' => 'required|string', ]); $pid = $request->user()->profile_id; $text = $request->input('caption'); $story = Story::findOrFail($request->input('sid')); - abort_if(!$story->can_reply, 422); + abort_if(! $story->can_reply, 422); $status = new Status; $status->type = 'story:reply'; @@ -415,7 +423,7 @@ class StoryApiV1Controller extends Controller $status->visibility = 'direct'; $status->in_reply_to_profile_id = $story->profile_id; $status->entities = json_encode([ - 'story_id' => $story->id + 'story_id' => $story->id, ]); $status->save(); @@ -429,24 +437,24 @@ class StoryApiV1Controller extends Controller 'story_actor_username' => $request->user()->username, 'story_id' => $story->id, 'story_media_url' => url(Storage::url($story->path)), - 'caption' => $text + 'caption' => $text, ]); $dm->save(); Conversation::updateOrInsert( [ 'to_id' => $story->profile_id, - 'from_id' => $pid + 'from_id' => $pid, ], [ 'type' => 'story:comment', 'status_id' => $status->id, 'dm_id' => $dm->id, - 'is_hidden' => false + 'is_hidden' => false, ] ); - if($story->local) { + if ($story->local) { $n = new Notification; $n->profile_id = $dm->to_id; $n->actor_id = $dm->from_id; @@ -460,33 +468,35 @@ class StoryApiV1Controller extends Controller return [ 'code' => 200, - 'msg' => 'Sent!' + 'msg' => 'Sent!', ]; } protected function storeMedia($photo, $user) { $mimes = explode(',', config_cache('pixelfed.media_types')); - if(in_array($photo->getMimeType(), [ + if (in_array($photo->getMimeType(), [ 'image/jpeg', 'image/png', - 'video/mp4' + 'video/mp4', ]) == false) { abort(400, 'Invalid media type'); + return; } $storagePath = MediaPathService::story($user->profile); - $path = $photo->storePubliclyAs($storagePath, Str::random(random_int(2, 12)) . '_' . Str::random(random_int(32, 35)) . '_' . Str::random(random_int(1, 14)) . '.' . $photo->extension()); + $path = $photo->storePubliclyAs($storagePath, Str::random(random_int(2, 12)).'_'.Str::random(random_int(32, 35)).'_'.Str::random(random_int(1, 14)).'.'.$photo->extension()); + return $path; } public function viewers(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ - 'sid' => 'required|string|min:1|max:50' + 'sid' => 'required|string|min:1|max:50', ]); $pid = $request->user()->profile_id; diff --git a/app/Http/Controllers/StoryComposeController.php b/app/Http/Controllers/StoryComposeController.php index eb2d859c0..c8b0599a6 100644 --- a/app/Http/Controllers/StoryComposeController.php +++ b/app/Http/Controllers/StoryComposeController.php @@ -2,59 +2,52 @@ namespace App\Http\Controllers; -use Illuminate\Http\Request; -use Illuminate\Support\Str; -use App\Media; -use App\Profile; -use App\Report; use App\DirectMessage; -use App\Notification; -use App\Status; -use App\Story; -use App\StoryView; -use App\Models\Poll; -use App\Models\PollVote; -use App\Services\ProfileService; -use App\Services\StoryService; -use Cache, Storage; -use Image as Intervention; -use App\Services\FollowerService; -use App\Services\MediaPathService; -use FFMpeg; -use FFMpeg\Coordinate\Dimension; -use FFMpeg\Format\Video\X264; +use App\Jobs\StoryPipeline\StoryDelete; +use App\Jobs\StoryPipeline\StoryFanout; use App\Jobs\StoryPipeline\StoryReactionDeliver; use App\Jobs\StoryPipeline\StoryReplyDeliver; -use App\Jobs\StoryPipeline\StoryFanout; -use App\Jobs\StoryPipeline\StoryDelete; -use ImageOptimizer; use App\Models\Conversation; +use App\Models\Poll; +use App\Models\PollVote; +use App\Notification; +use App\Report; +use App\Services\FollowerService; +use App\Services\MediaPathService; +use App\Services\StoryService; use App\Services\UserRoleService; +use App\Status; +use App\Story; +use FFMpeg; +use Illuminate\Http\Request; +use Illuminate\Support\Str; +use Image as Intervention; +use Storage; class StoryComposeController extends Controller { public function apiV1Add(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ - 'file' => function() { + 'file' => function () { return [ 'required', 'mimetypes:image/jpeg,image/png,video/mp4', - 'max:' . config_cache('pixelfed.max_photo_size'), + 'max:'.config_cache('pixelfed.max_photo_size'), ]; }, ]); $user = $request->user(); - abort_if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); + abort_if($user->has_roles && ! UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); $count = Story::whereProfileId($user->profile_id) ->whereActive(true) ->where('expires_at', '>', now()) ->count(); - if($count >= Story::MAX_PER_DAY) { + if ($count >= Story::MAX_PER_DAY) { abort(418, 'You have reached your limit for new Stories today.'); } @@ -64,7 +57,7 @@ class StoryComposeController extends Controller $story = new Story(); $story->duration = 3; $story->profile_id = $user->profile_id; - $story->type = Str::endsWith($photo->getMimeType(), 'mp4') ? 'video' :'photo'; + $story->type = Str::endsWith($photo->getMimeType(), 'mp4') ? 'video' : 'photo'; $story->mime = $photo->getMimeType(); $story->path = $path; $story->local = true; @@ -77,21 +70,22 @@ class StoryComposeController extends Controller $res = [ 'code' => 200, - 'msg' => 'Successfully added', + 'msg' => 'Successfully added', 'media_id' => (string) $story->id, - 'media_url' => url(Storage::url($url)) . '?v=' . time(), - 'media_type' => $story->type + 'media_url' => url(Storage::url($url)).'?v='.time(), + 'media_type' => $story->type, ]; - if($story->type === 'video') { + if ($story->type === 'video') { $video = FFMpeg::open($path); $duration = $video->getDurationInSeconds(); $res['media_duration'] = $duration; - if($duration > 500) { + if ($duration > 500) { Storage::delete($story->path); $story->delete(); + return response()->json([ - 'message' => 'Video duration cannot exceed 60 seconds' + 'message' => 'Video duration cannot exceed 60 seconds', ], 422); } } @@ -102,37 +96,39 @@ class StoryComposeController extends Controller protected function storePhoto($photo, $user) { $mimes = explode(',', config_cache('pixelfed.media_types')); - if(in_array($photo->getMimeType(), [ + if (in_array($photo->getMimeType(), [ 'image/jpeg', 'image/png', - 'video/mp4' + 'video/mp4', ]) == false) { abort(400, 'Invalid media type'); + return; } $storagePath = MediaPathService::story($user->profile); - $path = $photo->storePubliclyAs($storagePath, Str::random(random_int(2, 12)) . '_' . Str::random(random_int(32, 35)) . '_' . Str::random(random_int(1, 14)) . '.' . $photo->extension()); - if(in_array($photo->getMimeType(), ['image/jpeg','image/png'])) { - $fpath = storage_path('app/' . $path); + $path = $photo->storePubliclyAs($storagePath, Str::random(random_int(2, 12)).'_'.Str::random(random_int(32, 35)).'_'.Str::random(random_int(1, 14)).'.'.$photo->extension()); + if (in_array($photo->getMimeType(), ['image/jpeg', 'image/png'])) { + $fpath = storage_path('app/'.$path); $img = Intervention::make($fpath); $img->orientate(); $img->save($fpath, config_cache('pixelfed.image_quality')); $img->destroy(); } + return $path; } public function cropPhoto(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'media_id' => 'required|integer|min:1', 'width' => 'required', 'height' => 'required', 'x' => 'required', - 'y' => 'required' + 'y' => 'required', ]); $user = $request->user(); @@ -144,13 +140,13 @@ class StoryComposeController extends Controller $story = Story::whereProfileId($user->profile_id)->findOrFail($id); - $path = storage_path('app/' . $story->path); + $path = storage_path('app/'.$story->path); - if(!is_file($path)) { + if (! is_file($path)) { abort(400, 'Invalid or missing media.'); } - if($story->type === 'photo') { + if ($story->type === 'photo') { $img = Intervention::make($path); $img->crop($width, $height, $x, $y); $img->resize(1080, 1920, function ($constraint) { @@ -161,24 +157,24 @@ class StoryComposeController extends Controller return [ 'code' => 200, - 'msg' => 'Successfully cropped', + 'msg' => 'Successfully cropped', ]; } public function publishStory(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'media_id' => 'required', 'duration' => 'required|integer|min:3|max:120', 'can_reply' => 'required|boolean', - 'can_react' => 'required|boolean' + 'can_react' => 'required|boolean', ]); $id = $request->input('media_id'); $user = $request->user(); - abort_if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); + abort_if($user->has_roles && ! UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); $story = Story::whereProfileId($user->profile_id) ->findOrFail($id); @@ -194,13 +190,13 @@ class StoryComposeController extends Controller return [ 'code' => 200, - 'msg' => 'Successfully published', + 'msg' => 'Successfully published', ]; } public function apiV1Delete(Request $request, $id) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $user = $request->user(); @@ -213,40 +209,40 @@ class StoryComposeController extends Controller return [ 'code' => 200, - 'msg' => 'Successfully deleted' + 'msg' => 'Successfully deleted', ]; } public function compose(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $user = $request->user(); - abort_if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); + abort_if($user->has_roles && ! UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); return view('stories.compose'); } public function createPoll(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); - abort_if(!config_cache('instance.polls.enabled'), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); + abort_if(! config_cache('instance.polls.enabled'), 404); return $request->all(); } public function publishStoryPoll(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'question' => 'required|string|min:6|max:140', 'options' => 'required|array|min:2|max:4', 'can_reply' => 'required|boolean', - 'can_react' => 'required|boolean' + 'can_react' => 'required|boolean', ]); $user = $request->user(); - abort_if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); + abort_if($user->has_roles && ! UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); $pid = $request->user()->profile_id; $count = Story::whereProfileId($pid) @@ -254,7 +250,7 @@ class StoryComposeController extends Controller ->where('expires_at', '>', now()) ->count(); - if($count >= Story::MAX_PER_DAY) { + if ($count >= Story::MAX_PER_DAY) { abort(418, 'You have reached your limit for new Stories today.'); } @@ -262,7 +258,7 @@ class StoryComposeController extends Controller $story->type = 'poll'; $story->story = json_encode([ 'question' => $request->input('question'), - 'options' => $request->input('options') + 'options' => $request->input('options'), ]); $story->public = false; $story->local = true; @@ -278,7 +274,7 @@ class StoryComposeController extends Controller $poll->profile_id = $pid; $poll->poll_options = $request->input('options'); $poll->expires_at = $story->expires_at; - $poll->cached_tallies = collect($poll->poll_options)->map(function($o) { + $poll->cached_tallies = collect($poll->poll_options)->map(function ($o) { return 0; })->toArray(); $poll->save(); @@ -290,23 +286,23 @@ class StoryComposeController extends Controller return [ 'code' => 200, - 'msg' => 'Successfully published', + 'msg' => 'Successfully published', ]; } public function storyPollVote(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'sid' => 'required', - 'ci' => 'required|integer|min:0|max:3' + 'ci' => 'required|integer|min:0|max:3', ]); $pid = $request->user()->profile_id; $ci = $request->input('ci'); $story = Story::findOrFail($request->input('sid')); - abort_if(!FollowerService::follows($pid, $story->profile_id), 403); + abort_if(! FollowerService::follows($pid, $story->profile_id), 403); $poll = Poll::whereStoryId($story->id)->firstOrFail(); $vote = new PollVote; @@ -318,7 +314,7 @@ class StoryComposeController extends Controller $vote->save(); $poll->votes_count = $poll->votes_count + 1; - $poll->cached_tallies = collect($poll->getTallies())->map(function($tally, $key) use($ci) { + $poll->cached_tallies = collect($poll->getTallies())->map(function ($tally, $key) use ($ci) { return $ci == $key ? $tally + 1 : $tally; })->toArray(); $poll->save(); @@ -328,15 +324,15 @@ class StoryComposeController extends Controller public function storeReport(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ - 'type' => 'required|alpha_dash', - 'id' => 'required|integer|min:1', + 'type' => 'required|alpha_dash', + 'id' => 'required|integer|min:1', ]); $user = $request->user(); - abort_if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); + abort_if($user->has_roles && ! UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); $pid = $request->user()->profile_id; $sid = $request->input('id'); @@ -353,24 +349,24 @@ class StoryComposeController extends Controller 'copyright', 'impersonation', 'scam', - 'terrorism' + 'terrorism', ]; - abort_if(!in_array($type, $types), 422, 'Invalid story report type'); + abort_if(! in_array($type, $types), 422, 'Invalid story report type'); $story = Story::findOrFail($sid); abort_if($story->profile_id == $pid, 422, 'Cannot report your own story'); - abort_if(!FollowerService::follows($pid, $story->profile_id), 422, 'Cannot report a story from an account you do not follow'); + abort_if(! FollowerService::follows($pid, $story->profile_id), 422, 'Cannot report a story from an account you do not follow'); - if( Report::whereProfileId($pid) + if (Report::whereProfileId($pid) ->whereObjectType('App\Story') ->whereObjectId($story->id) ->exists() ) { return response()->json(['error' => [ 'code' => 409, - 'message' => 'Cannot report the same story again' + 'message' => 'Cannot report the same story again', ]], 409); } @@ -389,18 +385,18 @@ class StoryComposeController extends Controller public function react(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'sid' => 'required', - 'reaction' => 'required|string' + 'reaction' => 'required|string', ]); $pid = $request->user()->profile_id; $text = $request->input('reaction'); $user = $request->user(); - abort_if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); + abort_if($user->has_roles && ! UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); $story = Story::findOrFail($request->input('sid')); - abort_if(!$story->can_react, 422); + abort_if(! $story->can_react, 422); abort_if(StoryService::reactCounter($story->id, $pid) >= 5, 422, 'You have already reacted to this story'); $status = new Status; @@ -413,7 +409,7 @@ class StoryComposeController extends Controller $status->in_reply_to_profile_id = $story->profile_id; $status->entities = json_encode([ 'story_id' => $story->id, - 'reaction' => $text + 'reaction' => $text, ]); $status->save(); @@ -427,24 +423,24 @@ class StoryComposeController extends Controller 'story_actor_username' => $request->user()->username, 'story_id' => $story->id, 'story_media_url' => url(Storage::url($story->path)), - 'reaction' => $text + 'reaction' => $text, ]); $dm->save(); Conversation::updateOrInsert( [ 'to_id' => $story->profile_id, - 'from_id' => $pid + 'from_id' => $pid, ], [ 'type' => 'story:react', 'status_id' => $status->id, 'dm_id' => $dm->id, - 'is_hidden' => false + 'is_hidden' => false, ] ); - if($story->local) { + if ($story->local) { // generate notification $n = new Notification; $n->profile_id = $dm->to_id; @@ -464,18 +460,18 @@ class StoryComposeController extends Controller public function comment(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(! (bool) config_cache('instance.stories.enabled') || ! $request->user(), 404); $this->validate($request, [ 'sid' => 'required', - 'caption' => 'required|string' + 'caption' => 'required|string', ]); $pid = $request->user()->profile_id; $text = $request->input('caption'); $user = $request->user(); - abort_if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); + abort_if($user->has_roles && ! UserRoleService::can('can-use-stories', $user->id), 403, 'Invalid permissions for this action'); $story = Story::findOrFail($request->input('sid')); - abort_if(!$story->can_reply, 422); + abort_if(! $story->can_reply, 422); $status = new Status; $status->type = 'story:reply'; @@ -486,7 +482,7 @@ class StoryComposeController extends Controller $status->visibility = 'direct'; $status->in_reply_to_profile_id = $story->profile_id; $status->entities = json_encode([ - 'story_id' => $story->id + 'story_id' => $story->id, ]); $status->save(); @@ -500,24 +496,24 @@ class StoryComposeController extends Controller 'story_actor_username' => $request->user()->username, 'story_id' => $story->id, 'story_media_url' => url(Storage::url($story->path)), - 'caption' => $text + 'caption' => $text, ]); $dm->save(); Conversation::updateOrInsert( [ 'to_id' => $story->profile_id, - 'from_id' => $pid + 'from_id' => $pid, ], [ 'type' => 'story:comment', 'status_id' => $status->id, 'dm_id' => $dm->id, - 'is_hidden' => false + 'is_hidden' => false, ] ); - if($story->local) { + if ($story->local) { // generate notification $n = new Notification; $n->profile_id = $dm->to_id; diff --git a/app/Http/Controllers/StoryController.php b/app/Http/Controllers/StoryController.php index 692e27961..fede7c6d9 100644 --- a/app/Http/Controllers/StoryController.php +++ b/app/Http/Controllers/StoryController.php @@ -34,7 +34,7 @@ class StoryController extends StoryComposeController { public function recent(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $user = $request->user(); if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id)) { return []; @@ -117,7 +117,7 @@ class StoryController extends StoryComposeController public function profile(Request $request, $id) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $user = $request->user(); if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id)) { @@ -176,7 +176,7 @@ class StoryController extends StoryComposeController public function viewed(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $this->validate($request, [ 'id' => 'required|min:1', @@ -221,7 +221,7 @@ class StoryController extends StoryComposeController public function exists(Request $request, $id) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $user = $request->user(); if($user->has_roles && !UserRoleService::can('can-use-stories', $user->id)) { return response()->json(false); @@ -233,7 +233,7 @@ class StoryController extends StoryComposeController public function iRedirect(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $user = $request->user(); abort_if(!$user, 404); @@ -243,7 +243,7 @@ class StoryController extends StoryComposeController public function viewers(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $this->validate($request, [ 'sid' => 'required|string' @@ -274,7 +274,7 @@ class StoryController extends StoryComposeController public function remoteStory(Request $request, $id) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $profile = Profile::findOrFail($id); if($profile->user_id != null || $profile->domain == null) { @@ -286,7 +286,7 @@ class StoryController extends StoryComposeController public function pollResults(Request $request) { - abort_if(!config_cache('instance.stories.enabled') || !$request->user(), 404); + abort_if(!(bool) config_cache('instance.stories.enabled') || !$request->user(), 404); $this->validate($request, [ 'sid' => 'required|string' @@ -304,7 +304,7 @@ class StoryController extends StoryComposeController public function getActivityObject(Request $request, $username, $id) { - abort_if(!config_cache('instance.stories.enabled'), 404); + abort_if(!(bool) config_cache('instance.stories.enabled'), 404); if(!$request->wantsJson()) { return redirect('/stories/' . $username); diff --git a/app/Http/Controllers/UserEmailForgotController.php b/app/Http/Controllers/UserEmailForgotController.php index 33378c4d0..3889b9802 100644 --- a/app/Http/Controllers/UserEmailForgotController.php +++ b/app/Http/Controllers/UserEmailForgotController.php @@ -34,7 +34,7 @@ class UserEmailForgotController extends Controller 'username.exists' => 'This username is no longer active or does not exist!' ]; - if(config('captcha.enabled') || config('captcha.active.login') || config('captcha.active.register')) { + if((bool) config_cache('captcha.enabled')) { $rules['h-captcha-response'] = 'required|captcha'; $messages['h-captcha-response.required'] = 'You need to complete the captcha!'; } diff --git a/app/Http/Requests/Status/StoreStatusEditRequest.php b/app/Http/Requests/Status/StoreStatusEditRequest.php index aa9364ca6..e8e2d22f5 100644 --- a/app/Http/Requests/Status/StoreStatusEditRequest.php +++ b/app/Http/Requests/Status/StoreStatusEditRequest.php @@ -2,10 +2,10 @@ namespace App\Http\Requests\Status; -use Illuminate\Foundation\Http\FormRequest; use App\Media; use App\Status; use Closure; +use Illuminate\Foundation\Http\FormRequest; class StoreStatusEditRequest extends FormRequest { @@ -14,24 +14,25 @@ class StoreStatusEditRequest extends FormRequest */ public function authorize(): bool { - $profile = $this->user()->profile; - if($profile->status != null) { - return false; - } - if($profile->unlisted == true && $profile->cw == true) { - return false; - } - $types = [ - "photo", - "photo:album", - "photo:video:album", - "reply", - "text", - "video", - "video:album" - ]; - $scopes = ['public', 'unlisted', 'private']; - $status = Status::whereNull('reblog_of_id')->whereIn('type', $types)->whereIn('scope', $scopes)->find($this->route('id')); + $profile = $this->user()->profile; + if ($profile->status != null) { + return false; + } + if ($profile->unlisted == true && $profile->cw == true) { + return false; + } + $types = [ + 'photo', + 'photo:album', + 'photo:video:album', + 'reply', + 'text', + 'video', + 'video:album', + ]; + $scopes = ['public', 'unlisted', 'private']; + $status = Status::whereNull('reblog_of_id')->whereIn('type', $types)->whereIn('scope', $scopes)->find($this->route('id')); + return $status && $this->user()->profile_id === $status->profile_id; } @@ -47,18 +48,18 @@ class StoreStatusEditRequest extends FormRequest 'spoiler_text' => 'nullable|string|max:140', 'sensitive' => 'sometimes|boolean', 'media_ids' => [ - 'nullable', - 'required_without:status', - 'array', - 'max:' . config('pixelfed.max_album_length'), - function (string $attribute, mixed $value, Closure $fail) { - Media::whereProfileId($this->user()->profile_id) - ->where(function($query) { - return $query->whereNull('status_id') - ->orWhere('status_id', '=', $this->route('id')); - }) - ->findOrFail($value); - }, + 'nullable', + 'required_without:status', + 'array', + 'max:'.(int) config_cache('pixelfed.max_album_length'), + function (string $attribute, mixed $value, Closure $fail) { + Media::whereProfileId($this->user()->profile_id) + ->where(function ($query) { + return $query->whereNull('status_id') + ->orWhere('status_id', '=', $this->route('id')); + }) + ->findOrFail($value); + }, ], 'location' => 'sometimes|nullable', 'location.id' => 'sometimes|integer|min:1|max:128769', diff --git a/app/Jobs/AvatarPipeline/AvatarOptimize.php b/app/Jobs/AvatarPipeline/AvatarOptimize.php index 4464dff4e..8b50d8330 100644 --- a/app/Jobs/AvatarPipeline/AvatarOptimize.php +++ b/app/Jobs/AvatarPipeline/AvatarOptimize.php @@ -2,9 +2,9 @@ namespace App\Jobs\AvatarPipeline; -use Cache; use App\Avatar; use App\Profile; +use Cache; use Carbon\Carbon; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; @@ -17,88 +17,88 @@ use Storage; class AvatarOptimize implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $profile; - protected $current; + protected $profile; - /** - * Delete the job if its models no longer exist. - * - * @var bool - */ - public $deleteWhenMissingModels = true; + protected $current; - /** - * Create a new job instance. - * - * @return void - */ - public function __construct(Profile $profile, $current) - { - $this->profile = $profile; - $this->current = $current; - } + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - $avatar = $this->profile->avatar; - $file = storage_path("app/$avatar->media_path"); + /** + * Create a new job instance. + * + * @return void + */ + public function __construct(Profile $profile, $current) + { + $this->profile = $profile; + $this->current = $current; + } - try { - $img = Intervention::make($file)->orientate(); - $img->fit(200, 200, function ($constraint) { - $constraint->upsize(); - }); - $quality = config_cache('pixelfed.image_quality'); - $img->save($file, $quality); + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + $avatar = $this->profile->avatar; + $file = storage_path("app/$avatar->media_path"); - $avatar = Avatar::whereProfileId($this->profile->id)->firstOrFail(); - $avatar->change_count = ++$avatar->change_count; - $avatar->last_processed_at = Carbon::now(); - $avatar->save(); - Cache::forget('avatar:' . $avatar->profile_id); - $this->deleteOldAvatar($avatar->media_path, $this->current); + try { + $img = Intervention::make($file)->orientate(); + $img->fit(200, 200, function ($constraint) { + $constraint->upsize(); + }); + $quality = config_cache('pixelfed.image_quality'); + $img->save($file, $quality); - if(config_cache('pixelfed.cloud_storage') && config('instance.avatar.local_to_cloud')) { - $this->uploadToCloud($avatar); - } else { - $avatar->cdn_url = null; - $avatar->save(); - } - } catch (Exception $e) { - } - } + $avatar = Avatar::whereProfileId($this->profile->id)->firstOrFail(); + $avatar->change_count = ++$avatar->change_count; + $avatar->last_processed_at = Carbon::now(); + $avatar->save(); + Cache::forget('avatar:'.$avatar->profile_id); + $this->deleteOldAvatar($avatar->media_path, $this->current); - protected function deleteOldAvatar($new, $current) - { - if ( storage_path('app/'.$new) == $current || - Str::endsWith($current, 'avatars/default.png') || - Str::endsWith($current, 'avatars/default.jpg')) - { - return; - } - if (is_file($current)) { - @unlink($current); - } - } + if ((bool) config_cache('pixelfed.cloud_storage') && (bool) config_cache('instance.avatar.local_to_cloud')) { + $this->uploadToCloud($avatar); + } else { + $avatar->cdn_url = null; + $avatar->save(); + } + } catch (Exception $e) { + } + } - protected function uploadToCloud($avatar) - { - $base = 'cache/avatars/' . $avatar->profile_id; - $disk = Storage::disk(config('filesystems.cloud')); - $disk->deleteDirectory($base); - $path = $base . '/' . 'avatar_' . strtolower(Str::random(random_int(3,6))) . $avatar->change_count . '.' . pathinfo($avatar->media_path, PATHINFO_EXTENSION); - $url = $disk->put($path, Storage::get($avatar->media_path)); - $avatar->media_path = $path; - $avatar->cdn_url = $disk->url($path); - $avatar->save(); - Storage::delete($avatar->media_path); - Cache::forget('avatar:' . $avatar->profile_id); - } + protected function deleteOldAvatar($new, $current) + { + if (storage_path('app/'.$new) == $current || + Str::endsWith($current, 'avatars/default.png') || + Str::endsWith($current, 'avatars/default.jpg')) { + return; + } + if (is_file($current)) { + @unlink($current); + } + } + + protected function uploadToCloud($avatar) + { + $base = 'cache/avatars/'.$avatar->profile_id; + $disk = Storage::disk(config('filesystems.cloud')); + $disk->deleteDirectory($base); + $path = $base.'/'.'avatar_'.strtolower(Str::random(random_int(3, 6))).$avatar->change_count.'.'.pathinfo($avatar->media_path, PATHINFO_EXTENSION); + $url = $disk->put($path, Storage::get($avatar->media_path)); + $avatar->media_path = $path; + $avatar->cdn_url = $disk->url($path); + $avatar->save(); + Storage::delete($avatar->media_path); + Cache::forget('avatar:'.$avatar->profile_id); + } } diff --git a/app/Jobs/AvatarPipeline/RemoteAvatarFetch.php b/app/Jobs/AvatarPipeline/RemoteAvatarFetch.php index 4e4a1b2ec..c2a2b2a16 100644 --- a/app/Jobs/AvatarPipeline/RemoteAvatarFetch.php +++ b/app/Jobs/AvatarPipeline/RemoteAvatarFetch.php @@ -4,112 +4,107 @@ namespace App\Jobs\AvatarPipeline; use App\Avatar; use App\Profile; +use App\Services\MediaStorageService; +use App\Util\ActivityPub\Helpers; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use App\Util\ActivityPub\Helpers; -use Illuminate\Support\Str; -use Zttp\Zttp; -use App\Http\Controllers\AvatarController; -use Storage; -use Log; -use Illuminate\Http\File; -use App\Services\MediaStorageService; -use App\Services\ActivityPubFetchService; class RemoteAvatarFetch implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $profile; + protected $profile; - /** - * Delete the job if its models no longer exist. - * - * @var bool - */ - public $deleteWhenMissingModels = true; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; - /** - * The number of times the job may be attempted. - * - * @var int - */ - public $tries = 1; - public $timeout = 300; - public $maxExceptions = 1; + /** + * The number of times the job may be attempted. + * + * @var int + */ + public $tries = 1; - /** - * Create a new job instance. - * - * @return void - */ - public function __construct(Profile $profile) - { - $this->profile = $profile; - } + public $timeout = 300; - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - $profile = $this->profile; + public $maxExceptions = 1; - if(boolval(config_cache('pixelfed.cloud_storage')) == false && boolval(config_cache('federation.avatars.store_local')) == false) { - return 1; - } + /** + * Create a new job instance. + * + * @return void + */ + public function __construct(Profile $profile) + { + $this->profile = $profile; + } - if($profile->domain == null || $profile->private_key) { - return 1; - } + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + $profile = $this->profile; - $avatar = Avatar::whereProfileId($profile->id)->first(); + if ((bool) config_cache('pixelfed.cloud_storage') == false && (bool) config_cache('federation.avatars.store_local') == false) { + return 1; + } - if(!$avatar) { - $avatar = new Avatar; - $avatar->profile_id = $profile->id; - $avatar->save(); - } + if ($profile->domain == null || $profile->private_key) { + return 1; + } - if($avatar->media_path == null && $avatar->remote_url == null) { - $avatar->media_path = 'public/avatars/default.jpg'; - $avatar->is_remote = true; - $avatar->save(); - } + $avatar = Avatar::whereProfileId($profile->id)->first(); - $person = Helpers::fetchFromUrl($profile->remote_url); + if (! $avatar) { + $avatar = new Avatar; + $avatar->profile_id = $profile->id; + $avatar->save(); + } - if(!$person || !isset($person['@context'])) { - return 1; - } + if ($avatar->media_path == null && $avatar->remote_url == null) { + $avatar->media_path = 'public/avatars/default.jpg'; + $avatar->is_remote = true; + $avatar->save(); + } - if( !isset($person['icon']) || - !isset($person['icon']['type']) || - !isset($person['icon']['url']) - ) { - return 1; - } + $person = Helpers::fetchFromUrl($profile->remote_url); - if($person['icon']['type'] !== 'Image') { - return 1; - } + if (! $person || ! isset($person['@context'])) { + return 1; + } - if(!Helpers::validateUrl($person['icon']['url'])) { - return 1; - } + if (! isset($person['icon']) || + ! isset($person['icon']['type']) || + ! isset($person['icon']['url']) + ) { + return 1; + } - $icon = $person['icon']; + if ($person['icon']['type'] !== 'Image') { + return 1; + } - $avatar->remote_url = $icon['url']; - $avatar->save(); + if (! Helpers::validateUrl($person['icon']['url'])) { + return 1; + } - MediaStorageService::avatar($avatar, boolval(config_cache('pixelfed.cloud_storage')) == false, true); + $icon = $person['icon']; - return 1; - } + $avatar->remote_url = $icon['url']; + $avatar->save(); + + MediaStorageService::avatar($avatar, (bool) config_cache('pixelfed.cloud_storage') == false, true); + + return 1; + } } diff --git a/app/Jobs/AvatarPipeline/RemoteAvatarFetchFromUrl.php b/app/Jobs/AvatarPipeline/RemoteAvatarFetchFromUrl.php index c8c6820e4..f8a63c5bd 100644 --- a/app/Jobs/AvatarPipeline/RemoteAvatarFetchFromUrl.php +++ b/app/Jobs/AvatarPipeline/RemoteAvatarFetchFromUrl.php @@ -4,93 +4,88 @@ namespace App\Jobs\AvatarPipeline; use App\Avatar; use App\Profile; +use App\Services\AccountService; +use App\Services\MediaStorageService; +use Cache; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use App\Util\ActivityPub\Helpers; -use Illuminate\Support\Str; -use Zttp\Zttp; -use App\Http\Controllers\AvatarController; -use Cache; -use Storage; -use Log; -use Illuminate\Http\File; -use App\Services\AccountService; -use App\Services\MediaStorageService; -use App\Services\ActivityPubFetchService; class RemoteAvatarFetchFromUrl implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $profile; - protected $url; + protected $profile; - /** - * Delete the job if its models no longer exist. - * - * @var bool - */ - public $deleteWhenMissingModels = true; + protected $url; - /** - * The number of times the job may be attempted. - * - * @var int - */ - public $tries = 1; - public $timeout = 300; - public $maxExceptions = 1; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; - /** - * Create a new job instance. - * - * @return void - */ - public function __construct(Profile $profile, $url) - { - $this->profile = $profile; - $this->url = $url; - } + /** + * The number of times the job may be attempted. + * + * @var int + */ + public $tries = 1; - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - $profile = $this->profile; + public $timeout = 300; - Cache::forget('avatar:' . $profile->id); - AccountService::del($profile->id); + public $maxExceptions = 1; - if(boolval(config_cache('pixelfed.cloud_storage')) == false && boolval(config_cache('federation.avatars.store_local')) == false) { - return 1; - } + /** + * Create a new job instance. + * + * @return void + */ + public function __construct(Profile $profile, $url) + { + $this->profile = $profile; + $this->url = $url; + } - if($profile->domain == null || $profile->private_key) { - return 1; - } + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + $profile = $this->profile; - $avatar = Avatar::whereProfileId($profile->id)->first(); + Cache::forget('avatar:'.$profile->id); + AccountService::del($profile->id); - if(!$avatar) { - $avatar = new Avatar; - $avatar->profile_id = $profile->id; - $avatar->is_remote = true; - $avatar->remote_url = $this->url; - $avatar->save(); - } else { - $avatar->remote_url = $this->url; - $avatar->is_remote = true; - $avatar->save(); - } + if ((bool) config_cache('pixelfed.cloud_storage') == false && (bool) config_cache('federation.avatars.store_local') == false) { + return 1; + } - MediaStorageService::avatar($avatar, boolval(config_cache('pixelfed.cloud_storage')) == false, true); + if ($profile->domain == null || $profile->private_key) { + return 1; + } - return 1; - } + $avatar = Avatar::whereProfileId($profile->id)->first(); + + if (! $avatar) { + $avatar = new Avatar; + $avatar->profile_id = $profile->id; + $avatar->is_remote = true; + $avatar->remote_url = $this->url; + $avatar->save(); + } else { + $avatar->remote_url = $this->url; + $avatar->is_remote = true; + $avatar->save(); + } + + MediaStorageService::avatar($avatar, (bool) config_cache('pixelfed.cloud_storage') == false, true); + + return 1; + } } diff --git a/app/Jobs/ImageOptimizePipeline/ImageOptimize.php b/app/Jobs/ImageOptimizePipeline/ImageOptimize.php index 0448ade6a..e2d558143 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageOptimize.php +++ b/app/Jobs/ImageOptimizePipeline/ImageOptimize.php @@ -45,7 +45,7 @@ class ImageOptimize implements ShouldQueue return; } - if(config('pixelfed.optimize_image') == false) { + if((bool) config_cache('pixelfed.optimize_image') == false) { ImageThumbnail::dispatch($media)->onQueue('mmo'); return; } else { diff --git a/app/Jobs/ImageOptimizePipeline/ImageResize.php b/app/Jobs/ImageOptimizePipeline/ImageResize.php index c1b4ea7f0..2aa51a532 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageResize.php +++ b/app/Jobs/ImageOptimizePipeline/ImageResize.php @@ -51,7 +51,7 @@ class ImageResize implements ShouldQueue return; } - if(!config('pixelfed.optimize_image')) { + if((bool) config_cache('pixelfed.optimize_image') === false) { ImageThumbnail::dispatch($media)->onQueue('mmo'); return; } diff --git a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php index 550448699..9012529f2 100644 --- a/app/Jobs/ImageOptimizePipeline/ImageUpdate.php +++ b/app/Jobs/ImageOptimizePipeline/ImageUpdate.php @@ -61,7 +61,7 @@ class ImageUpdate implements ShouldQueue return; } - if(config('pixelfed.optimize_image')) { + if((bool) config_cache('pixelfed.optimize_image')) { if (in_array($media->mime, $this->protectedMimes) == true) { ImageOptimizer::optimize($thumb); if(!$media->skip_optimize) { diff --git a/app/Jobs/MediaPipeline/MediaDeletePipeline.php b/app/Jobs/MediaPipeline/MediaDeletePipeline.php index 55df84948..df16a42d5 100644 --- a/app/Jobs/MediaPipeline/MediaDeletePipeline.php +++ b/app/Jobs/MediaPipeline/MediaDeletePipeline.php @@ -3,27 +3,30 @@ namespace App\Jobs\MediaPipeline; use App\Media; +use App\Services\Media\MediaHlsService; use Illuminate\Bus\Queueable; +use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\SerializesModels; -use Illuminate\Support\Facades\Redis; -use Illuminate\Support\Facades\Storage; -use App\Services\Media\MediaHlsService; use Illuminate\Queue\Middleware\WithoutOverlapping; -use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing; +use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Storage; -class MediaDeletePipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing +class MediaDeletePipeline implements ShouldBeUniqueUntilProcessing, ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $media; + protected $media; public $timeout = 300; + public $tries = 3; + public $maxExceptions = 1; + public $failOnTimeout = true; + public $deleteWhenMissingModels = true; /** @@ -38,7 +41,7 @@ class MediaDeletePipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing */ public function uniqueId(): string { - return 'media:purge-job:id-' . $this->media->id; + return 'media:purge-job:id-'.$this->media->id; } /** @@ -51,58 +54,58 @@ class MediaDeletePipeline implements ShouldQueue, ShouldBeUniqueUntilProcessing return [(new WithoutOverlapping("media:purge-job:id-{$this->media->id}"))->shared()->dontRelease()]; } - public function __construct(Media $media) - { - $this->media = $media; - } + public function __construct(Media $media) + { + $this->media = $media; + } - public function handle() - { - $media = $this->media; - $path = $media->media_path; - $thumb = $media->thumbnail_path; + public function handle() + { + $media = $this->media; + $path = $media->media_path; + $thumb = $media->thumbnail_path; - if(!$path) { - return 1; - } + if (! $path) { + return 1; + } - $e = explode('/', $path); - array_pop($e); - $i = implode('/', $e); + $e = explode('/', $path); + array_pop($e); + $i = implode('/', $e); - if(config_cache('pixelfed.cloud_storage') == true) { - $disk = Storage::disk(config('filesystems.cloud')); + if ((bool) config_cache('pixelfed.cloud_storage') == true) { + $disk = Storage::disk(config('filesystems.cloud')); - if($path && $disk->exists($path)) { - $disk->delete($path); - } + if ($path && $disk->exists($path)) { + $disk->delete($path); + } - if($thumb && $disk->exists($thumb)) { - $disk->delete($thumb); - } - } + if ($thumb && $disk->exists($thumb)) { + $disk->delete($thumb); + } + } - $disk = Storage::disk(config('filesystems.local')); + $disk = Storage::disk(config('filesystems.local')); - if($path && $disk->exists($path)) { - $disk->delete($path); - } + if ($path && $disk->exists($path)) { + $disk->delete($path); + } - if($thumb && $disk->exists($thumb)) { - $disk->delete($thumb); - } + if ($thumb && $disk->exists($thumb)) { + $disk->delete($thumb); + } - if($media->hls_path != null) { + if ($media->hls_path != null) { $files = MediaHlsService::allFiles($media); - if($files && count($files)) { - foreach($files as $file) { + if ($files && count($files)) { + foreach ($files as $file) { $disk->delete($file); } } - } + } - $media->delete(); + $media->delete(); - return 1; - } + return 1; + } } diff --git a/app/Jobs/MediaPipeline/MediaFixLocalFilesystemCleanupPipeline.php b/app/Jobs/MediaPipeline/MediaFixLocalFilesystemCleanupPipeline.php index bbd3851b9..a972f1f86 100644 --- a/app/Jobs/MediaPipeline/MediaFixLocalFilesystemCleanupPipeline.php +++ b/app/Jobs/MediaPipeline/MediaFixLocalFilesystemCleanupPipeline.php @@ -8,68 +8,69 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Storage; class MediaFixLocalFilesystemCleanupPipeline implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public $timeout = 1800; - public $tries = 5; - public $maxExceptions = 1; + public $timeout = 1800; - public function handle() - { - if(config_cache('pixelfed.cloud_storage') == false) { - // Only run if cloud storage is enabled - return; - } + public $tries = 5; - $disk = Storage::disk('local'); - $cloud = Storage::disk(config('filesystems.cloud')); + public $maxExceptions = 1; - Media::whereNotNull(['status_id', 'cdn_url', 'replicated_at']) - ->chunk(20, function ($medias) use($disk, $cloud) { - foreach($medias as $media) { - if(!str_starts_with($media->media_path, 'public')) { - continue; - } + public function handle() + { + if ((bool) config_cache('pixelfed.cloud_storage') == false) { + // Only run if cloud storage is enabled + return; + } - if($disk->exists($media->media_path) && $cloud->exists($media->media_path)) { - $disk->delete($media->media_path); - } + $disk = Storage::disk('local'); + $cloud = Storage::disk(config('filesystems.cloud')); - if($media->thumbnail_path) { - if($disk->exists($media->thumbnail_path)) { - $disk->delete($media->thumbnail_path); - } - } + Media::whereNotNull(['status_id', 'cdn_url', 'replicated_at']) + ->chunk(20, function ($medias) use ($disk, $cloud) { + foreach ($medias as $media) { + if (! str_starts_with($media->media_path, 'public')) { + continue; + } - $paths = explode('/', $media->media_path); - if(count($paths) === 7) { - array_pop($paths); - $baseDir = implode('/', $paths); + if ($disk->exists($media->media_path) && $cloud->exists($media->media_path)) { + $disk->delete($media->media_path); + } - if(count($disk->allFiles($baseDir)) === 0) { - $disk->deleteDirectory($baseDir); + if ($media->thumbnail_path) { + if ($disk->exists($media->thumbnail_path)) { + $disk->delete($media->thumbnail_path); + } + } - array_pop($paths); - $baseDir = implode('/', $paths); + $paths = explode('/', $media->media_path); + if (count($paths) === 7) { + array_pop($paths); + $baseDir = implode('/', $paths); - if(count($disk->allFiles($baseDir)) === 0) { - $disk->deleteDirectory($baseDir); + if (count($disk->allFiles($baseDir)) === 0) { + $disk->deleteDirectory($baseDir); - array_pop($paths); - $baseDir = implode('/', $paths); + array_pop($paths); + $baseDir = implode('/', $paths); - if(count($disk->allFiles($baseDir)) === 0) { - $disk->deleteDirectory($baseDir); - } - } - } - } - } - }); - } + if (count($disk->allFiles($baseDir)) === 0) { + $disk->deleteDirectory($baseDir); + + array_pop($paths); + $baseDir = implode('/', $paths); + + if (count($disk->allFiles($baseDir)) === 0) { + $disk->deleteDirectory($baseDir); + } + } + } + } + } + }); + } } diff --git a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php index 5b413ecc1..394c2cfb8 100644 --- a/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php +++ b/app/Jobs/RemoteFollowPipeline/RemoteFollowImportRecent.php @@ -17,6 +17,7 @@ use Log; use Storage; use Zttp\Zttp; use App\Util\ActivityPub\Helpers; +use App\Services\MediaPathService; class RemoteFollowImportRecent implements ShouldQueue { @@ -45,7 +46,6 @@ class RemoteFollowImportRecent implements ShouldQueue 'image/jpg', 'image/jpeg', 'image/png', - 'image/gif', ]; } @@ -208,9 +208,7 @@ class RemoteFollowImportRecent implements ShouldQueue public function importMedia($url, $mime, $status) { $user = $this->profile; - $monthHash = hash('sha1', date('Y').date('m')); - $userHash = hash('sha1', $user->id.(string) $user->created_at); - $storagePath = "public/m/{$monthHash}/{$userHash}"; + $storagePath = MediaPathService::get($user, 2); try { $info = pathinfo($url); diff --git a/app/Jobs/SharePipeline/SharePipeline.php b/app/Jobs/SharePipeline/SharePipeline.php index 4eca4e1ab..734c44231 100644 --- a/app/Jobs/SharePipeline/SharePipeline.php +++ b/app/Jobs/SharePipeline/SharePipeline.php @@ -2,9 +2,15 @@ namespace App\Jobs\SharePipeline; -use Cache, Log; -use Illuminate\Support\Facades\Redis; -use App\{Status, Notification}; +use App\Jobs\HomeFeedPipeline\FeedInsertPipeline; +use App\Notification; +use App\Services\ReblogService; +use App\Services\StatusService; +use App\Status; +use App\Transformer\ActivityPub\Verb\Announce; +use App\Util\ActivityPub\HttpSignature; +use GuzzleHttp\Client; +use GuzzleHttp\Pool; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -12,141 +18,136 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use League\Fractal; use League\Fractal\Serializer\ArraySerializer; -use App\Transformer\ActivityPub\Verb\Announce; -use GuzzleHttp\{Pool, Client, Promise}; -use App\Util\ActivityPub\HttpSignature; -use App\Services\ReblogService; -use App\Services\StatusService; -use App\Jobs\HomeFeedPipeline\FeedInsertPipeline; class SharePipeline implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $status; + protected $status; - /** - * Delete the job if its models no longer exist. - * - * @var bool - */ - public $deleteWhenMissingModels = true; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; - /** - * Create a new job instance. - * - * @return void - */ - public function __construct(Status $status) - { - $this->status = $status; - } + /** + * Create a new job instance. + * + * @return void + */ + public function __construct(Status $status) + { + $this->status = $status; + } - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - $status = $this->status; - $parent = Status::find($this->status->reblog_of_id); - if(!$parent) { + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + $status = $this->status; + $parent = Status::find($this->status->reblog_of_id); + if (! $parent) { return; } - $actor = $status->profile; - $target = $parent->profile; + $actor = $status->profile; + $target = $parent->profile; - if ($status->uri !== null) { - // Ignore notifications to remote statuses - return; - } + if ($status->uri !== null) { + // Ignore notifications to remote statuses + return; + } - if($target->id === $status->profile_id) { - $this->remoteAnnounceDeliver(); - return true; - } + if ($target->id === $status->profile_id) { + $this->remoteAnnounceDeliver(); - ReblogService::addPostReblog($parent->profile_id, $status->id); + return true; + } - $parent->reblogs_count = $parent->reblogs_count + 1; - $parent->save(); - StatusService::del($parent->id); + ReblogService::addPostReblog($parent->profile_id, $status->id); - Notification::firstOrCreate( - [ - 'profile_id' => $target->id, - 'actor_id' => $actor->id, - 'action' => 'share', - 'item_type' => 'App\Status', - 'item_id' => $status->reblog_of_id ?? $status->id, - ] - ); + $parent->reblogs_count = $parent->reblogs_count + 1; + $parent->save(); + StatusService::del($parent->id); - FeedInsertPipeline::dispatch($status->id, $status->profile_id)->onQueue('feed'); + Notification::firstOrCreate( + [ + 'profile_id' => $target->id, + 'actor_id' => $actor->id, + 'action' => 'share', + 'item_type' => 'App\Status', + 'item_id' => $status->reblog_of_id ?? $status->id, + ] + ); - return $this->remoteAnnounceDeliver(); - } + FeedInsertPipeline::dispatch($status->id, $status->profile_id)->onQueue('feed'); - public function remoteAnnounceDeliver() - { - if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) { - return true; - } - $status = $this->status; - $profile = $status->profile; + return $this->remoteAnnounceDeliver(); + } - $fractal = new Fractal\Manager(); - $fractal->setSerializer(new ArraySerializer()); - $resource = new Fractal\Resource\Item($status, new Announce()); - $activity = $fractal->createData($resource)->toArray(); + public function remoteAnnounceDeliver() + { + if (config('app.env') !== 'production' || (bool) config_cache('federation.activitypub.enabled') == false) { + return true; + } + $status = $this->status; + $profile = $status->profile; - $audience = $status->profile->getAudienceInbox(); + $fractal = new Fractal\Manager(); + $fractal->setSerializer(new ArraySerializer()); + $resource = new Fractal\Resource\Item($status, new Announce()); + $activity = $fractal->createData($resource)->toArray(); - if(empty($audience) || $status->scope != 'public') { - // Return on profiles with no remote followers - return; - } + $audience = $status->profile->getAudienceInbox(); - $payload = json_encode($activity); + if (empty($audience) || $status->scope != 'public') { + // Return on profiles with no remote followers + return; + } - $client = new Client([ - 'timeout' => config('federation.activitypub.delivery.timeout') - ]); + $payload = json_encode($activity); - $version = config('pixelfed.version'); - $appUrl = config('app.url'); - $userAgent = "(Pixelfed/{$version}; +{$appUrl})"; + $client = new Client([ + 'timeout' => config('federation.activitypub.delivery.timeout'), + ]); - $requests = function($audience) use ($client, $activity, $profile, $payload, $userAgent) { - foreach($audience as $url) { - $headers = HttpSignature::sign($profile, $url, $activity, [ - 'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', - 'User-Agent' => $userAgent, - ]); - yield function() use ($client, $url, $headers, $payload) { - return $client->postAsync($url, [ - 'curl' => [ - CURLOPT_HTTPHEADER => $headers, - CURLOPT_POSTFIELDS => $payload, - CURLOPT_HEADER => true - ] - ]); - }; - } - }; + $version = config('pixelfed.version'); + $appUrl = config('app.url'); + $userAgent = "(Pixelfed/{$version}; +{$appUrl})"; - $pool = new Pool($client, $requests($audience), [ - 'concurrency' => config('federation.activitypub.delivery.concurrency'), - 'fulfilled' => function ($response, $index) { - }, - 'rejected' => function ($reason, $index) { - } - ]); + $requests = function ($audience) use ($client, $activity, $profile, $payload, $userAgent) { + foreach ($audience as $url) { + $headers = HttpSignature::sign($profile, $url, $activity, [ + 'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', + 'User-Agent' => $userAgent, + ]); + yield function () use ($client, $url, $headers, $payload) { + return $client->postAsync($url, [ + 'curl' => [ + CURLOPT_HTTPHEADER => $headers, + CURLOPT_POSTFIELDS => $payload, + CURLOPT_HEADER => true, + ], + ]); + }; + } + }; - $promise = $pool->promise(); + $pool = new Pool($client, $requests($audience), [ + 'concurrency' => config('federation.activitypub.delivery.concurrency'), + 'fulfilled' => function ($response, $index) { + }, + 'rejected' => function ($reason, $index) { + }, + ]); - $promise->wait(); + $promise = $pool->promise(); - } + $promise->wait(); + + } } diff --git a/app/Jobs/SharePipeline/UndoSharePipeline.php b/app/Jobs/SharePipeline/UndoSharePipeline.php index 1435688d9..af3239953 100644 --- a/app/Jobs/SharePipeline/UndoSharePipeline.php +++ b/app/Jobs/SharePipeline/UndoSharePipeline.php @@ -2,9 +2,15 @@ namespace App\Jobs\SharePipeline; -use Cache, Log; -use Illuminate\Support\Facades\Redis; -use App\{Status, Notification}; +use App\Jobs\HomeFeedPipeline\FeedRemovePipeline; +use App\Notification; +use App\Services\ReblogService; +use App\Services\StatusService; +use App\Status; +use App\Transformer\ActivityPub\Verb\UndoAnnounce; +use App\Util\ActivityPub\HttpSignature; +use GuzzleHttp\Client; +use GuzzleHttp\Pool; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; @@ -12,128 +18,125 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use League\Fractal; use League\Fractal\Serializer\ArraySerializer; -use App\Transformer\ActivityPub\Verb\UndoAnnounce; -use GuzzleHttp\{Pool, Client, Promise}; -use App\Util\ActivityPub\HttpSignature; -use App\Services\ReblogService; -use App\Services\StatusService; -use App\Jobs\HomeFeedPipeline\FeedRemovePipeline; class UndoSharePipeline implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $status; - public $deleteWhenMissingModels = true; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public function __construct(Status $status) - { - $this->status = $status; - } + protected $status; - public function handle() - { - $status = $this->status; - $actor = $status->profile; - $parent = Status::find($status->reblog_of_id); + public $deleteWhenMissingModels = true; - FeedRemovePipeline::dispatch($status->id, $status->profile_id)->onQueue('feed'); + public function __construct(Status $status) + { + $this->status = $status; + } - if($parent) { - $target = $parent->profile_id; - ReblogService::removePostReblog($parent->profile_id, $status->id); + public function handle() + { + $status = $this->status; + $actor = $status->profile; + $parent = Status::find($status->reblog_of_id); - if($parent->reblogs_count > 0) { - $parent->reblogs_count = $parent->reblogs_count - 1; - $parent->save(); - StatusService::del($parent->id); - } + FeedRemovePipeline::dispatch($status->id, $status->profile_id)->onQueue('feed'); - $notification = Notification::whereProfileId($target) - ->whereActorId($status->profile_id) - ->whereAction('share') - ->whereItemId($status->reblog_of_id) - ->whereItemType('App\Status') - ->first(); + if ($parent) { + $target = $parent->profile_id; + ReblogService::removePostReblog($parent->profile_id, $status->id); - if($notification) { - $notification->forceDelete(); - } - } + if ($parent->reblogs_count > 0) { + $parent->reblogs_count = $parent->reblogs_count - 1; + $parent->save(); + StatusService::del($parent->id); + } - if ($status->uri != null) { - return; - } + $notification = Notification::whereProfileId($target) + ->whereActorId($status->profile_id) + ->whereAction('share') + ->whereItemId($status->reblog_of_id) + ->whereItemType('App\Status') + ->first(); - if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) { - return $status->delete(); - } else { - return $this->remoteAnnounceDeliver(); - } - } + if ($notification) { + $notification->forceDelete(); + } + } - public function remoteAnnounceDeliver() - { - if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) { + if ($status->uri != null) { + return; + } + + if (config('app.env') !== 'production' || (bool) config_cache('federation.activitypub.enabled') == false) { + return $status->delete(); + } else { + return $this->remoteAnnounceDeliver(); + } + } + + public function remoteAnnounceDeliver() + { + if (config('app.env') !== 'production' || (bool) config_cache('federation.activitypub.enabled') == false) { $status->delete(); - return 1; - } - $status = $this->status; - $profile = $status->profile; + return 1; + } - $fractal = new Fractal\Manager(); - $fractal->setSerializer(new ArraySerializer()); - $resource = new Fractal\Resource\Item($status, new UndoAnnounce()); - $activity = $fractal->createData($resource)->toArray(); + $status = $this->status; + $profile = $status->profile; - $audience = $status->profile->getAudienceInbox(); + $fractal = new Fractal\Manager(); + $fractal->setSerializer(new ArraySerializer()); + $resource = new Fractal\Resource\Item($status, new UndoAnnounce()); + $activity = $fractal->createData($resource)->toArray(); - if(empty($audience) || $status->scope != 'public') { - return 1; - } + $audience = $status->profile->getAudienceInbox(); - $payload = json_encode($activity); + if (empty($audience) || $status->scope != 'public') { + return 1; + } - $client = new Client([ - 'timeout' => config('federation.activitypub.delivery.timeout') - ]); + $payload = json_encode($activity); - $version = config('pixelfed.version'); - $appUrl = config('app.url'); - $userAgent = "(Pixelfed/{$version}; +{$appUrl})"; + $client = new Client([ + 'timeout' => config('federation.activitypub.delivery.timeout'), + ]); - $requests = function($audience) use ($client, $activity, $profile, $payload, $userAgent) { - foreach($audience as $url) { - $headers = HttpSignature::sign($profile, $url, $activity, [ - 'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', - 'User-Agent' => $userAgent, - ]); - yield function() use ($client, $url, $headers, $payload) { - return $client->postAsync($url, [ - 'curl' => [ - CURLOPT_HTTPHEADER => $headers, - CURLOPT_POSTFIELDS => $payload, - CURLOPT_HEADER => true - ] - ]); - }; - } - }; + $version = config('pixelfed.version'); + $appUrl = config('app.url'); + $userAgent = "(Pixelfed/{$version}; +{$appUrl})"; - $pool = new Pool($client, $requests($audience), [ - 'concurrency' => config('federation.activitypub.delivery.concurrency'), - 'fulfilled' => function ($response, $index) { - }, - 'rejected' => function ($reason, $index) { - } - ]); + $requests = function ($audience) use ($client, $activity, $profile, $payload, $userAgent) { + foreach ($audience as $url) { + $headers = HttpSignature::sign($profile, $url, $activity, [ + 'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', + 'User-Agent' => $userAgent, + ]); + yield function () use ($client, $url, $headers, $payload) { + return $client->postAsync($url, [ + 'curl' => [ + CURLOPT_HTTPHEADER => $headers, + CURLOPT_POSTFIELDS => $payload, + CURLOPT_HEADER => true, + ], + ]); + }; + } + }; - $promise = $pool->promise(); + $pool = new Pool($client, $requests($audience), [ + 'concurrency' => config('federation.activitypub.delivery.concurrency'), + 'fulfilled' => function ($response, $index) { + }, + 'rejected' => function ($reason, $index) { + }, + ]); - $promise->wait(); + $promise = $pool->promise(); - $status->delete(); + $promise->wait(); - return 1; - } + $status->delete(); + + return 1; + } } diff --git a/app/Jobs/StatusPipeline/StatusDelete.php b/app/Jobs/StatusPipeline/StatusDelete.php index dbbfad5ac..d85ebdc4a 100644 --- a/app/Jobs/StatusPipeline/StatusDelete.php +++ b/app/Jobs/StatusPipeline/StatusDelete.php @@ -2,126 +2,122 @@ namespace App\Jobs\StatusPipeline; -use DB, Cache, Storage; -use App\{ - AccountInterstitial, - Bookmark, - CollectionItem, - DirectMessage, - Like, - Media, - MediaTag, - Mention, - Notification, - Report, - Status, - StatusArchived, - StatusHashtag, - StatusView -}; +use App\AccountInterstitial; +use App\Bookmark; +use App\CollectionItem; +use App\DirectMessage; +use App\Jobs\MediaPipeline\MediaDeletePipeline; +use App\Like; +use App\Media; +use App\MediaTag; +use App\Mention; +use App\Notification; +use App\Report; +use App\Services\CollectionService; +use App\Services\NotificationService; +use App\Services\StatusService; +use App\Status; +use App\StatusArchived; +use App\StatusHashtag; +use App\StatusView; +use App\Transformer\ActivityPub\Verb\DeleteNote; +use App\Util\ActivityPub\HttpSignature; +use Cache; +use GuzzleHttp\Client; +use GuzzleHttp\Pool; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use League\Fractal; -use Illuminate\Support\Str; use League\Fractal\Serializer\ArraySerializer; -use App\Transformer\ActivityPub\Verb\DeleteNote; -use App\Util\ActivityPub\Helpers; -use GuzzleHttp\Pool; -use GuzzleHttp\Client; -use GuzzleHttp\Promise; -use App\Util\ActivityPub\HttpSignature; -use App\Services\CollectionService; -use App\Services\StatusService; -use App\Services\NotificationService; -use App\Jobs\MediaPipeline\MediaDeletePipeline; class StatusDelete implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - protected $status; + protected $status; - /** - * Delete the job if its models no longer exist. - * - * @var bool - */ - public $deleteWhenMissingModels = true; + /** + * Delete the job if its models no longer exist. + * + * @var bool + */ + public $deleteWhenMissingModels = true; public $timeout = 900; + public $tries = 2; - /** - * Create a new job instance. - * - * @return void - */ - public function __construct(Status $status) - { - $this->status = $status; - } + /** + * Create a new job instance. + * + * @return void + */ + public function __construct(Status $status) + { + $this->status = $status; + } - /** - * Execute the job. - * - * @return void - */ - public function handle() - { - $status = $this->status; - $profile = $this->status->profile; + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + $status = $this->status; + $profile = $this->status->profile; - StatusService::del($status->id, true); - if($profile) { - if(in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])) { - $profile->status_count = $profile->status_count - 1; - $profile->save(); - } - } + StatusService::del($status->id, true); + if ($profile) { + if (in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])) { + $profile->status_count = $profile->status_count - 1; + $profile->save(); + } + } - Cache::forget('pf:atom:user-feed:by-id:' . $status->profile_id); + Cache::forget('pf:atom:user-feed:by-id:'.$status->profile_id); - if(config_cache('federation.activitypub.enabled') == true) { - return $this->fanoutDelete($status); - } else { - return $this->unlinkRemoveMedia($status); - } - } + if ((bool) config_cache('federation.activitypub.enabled') == true) { + return $this->fanoutDelete($status); + } else { + return $this->unlinkRemoveMedia($status); + } + } - public function unlinkRemoveMedia($status) - { + public function unlinkRemoveMedia($status) + { Media::whereStatusId($status->id) - ->get() - ->each(function($media) { - MediaDeletePipeline::dispatch($media); - }); + ->get() + ->each(function ($media) { + MediaDeletePipeline::dispatch($media); + }); - if($status->in_reply_to_id) { - $parent = Status::findOrFail($status->in_reply_to_id); - --$parent->reply_count; - $parent->save(); - StatusService::del($parent->id); - } + if ($status->in_reply_to_id) { + $parent = Status::findOrFail($status->in_reply_to_id); + $parent->reply_count--; + $parent->save(); + StatusService::del($parent->id); + } Bookmark::whereStatusId($status->id)->delete(); CollectionItem::whereObjectType('App\Status') ->whereObjectId($status->id) ->get() - ->each(function($col) { + ->each(function ($col) { CollectionService::removeItem($col->collection_id, $col->object_id); $col->delete(); - }); + }); $dms = DirectMessage::whereStatusId($status->id)->get(); - foreach($dms as $dm) { + foreach ($dms as $dm) { $not = Notification::whereItemType('App\DirectMessage') ->whereItemId($dm->id) ->first(); - if($not) { + if ($not) { NotificationService::del($not->profile_id, $not->id); $not->forceDeleteQuietly(); } @@ -130,11 +126,11 @@ class StatusDelete implements ShouldQueue Like::whereStatusId($status->id)->delete(); $mediaTags = MediaTag::where('status_id', $status->id)->get(); - foreach($mediaTags as $mtag) { + foreach ($mediaTags as $mtag) { $not = Notification::whereItemType('App\MediaTag') ->whereItemId($mtag->id) ->first(); - if($not) { + if ($not) { NotificationService::del($not->profile_id, $not->id); $not->forceDeleteQuietly(); } @@ -142,85 +138,85 @@ class StatusDelete implements ShouldQueue } Mention::whereStatusId($status->id)->forceDelete(); - Notification::whereItemType('App\Status') - ->whereItemId($status->id) - ->forceDelete(); + Notification::whereItemType('App\Status') + ->whereItemId($status->id) + ->forceDelete(); - Report::whereObjectType('App\Status') - ->whereObjectId($status->id) - ->delete(); + Report::whereObjectType('App\Status') + ->whereObjectId($status->id) + ->delete(); StatusArchived::whereStatusId($status->id)->delete(); StatusHashtag::whereStatusId($status->id)->delete(); StatusView::whereStatusId($status->id)->delete(); - Status::whereInReplyToId($status->id)->update(['in_reply_to_id' => null]); + Status::whereInReplyToId($status->id)->update(['in_reply_to_id' => null]); - AccountInterstitial::where('item_type', 'App\Status') - ->where('item_id', $status->id) - ->delete(); + AccountInterstitial::where('item_type', 'App\Status') + ->where('item_id', $status->id) + ->delete(); - $status->delete(); - - return 1; - } - - public function fanoutDelete($status) - { - $profile = $status->profile; - - if(!$profile) { - return; - } - - $audience = $status->profile->getAudienceInbox(); - - $fractal = new Fractal\Manager(); - $fractal->setSerializer(new ArraySerializer()); - $resource = new Fractal\Resource\Item($status, new DeleteNote()); - $activity = $fractal->createData($resource)->toArray(); - - $this->unlinkRemoveMedia($status); - - $payload = json_encode($activity); - - $client = new Client([ - 'timeout' => config('federation.activitypub.delivery.timeout') - ]); - - $version = config('pixelfed.version'); - $appUrl = config('app.url'); - $userAgent = "(Pixelfed/{$version}; +{$appUrl})"; - - $requests = function($audience) use ($client, $activity, $profile, $payload, $userAgent) { - foreach($audience as $url) { - $headers = HttpSignature::sign($profile, $url, $activity, [ - 'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', - 'User-Agent' => $userAgent, - ]); - yield function() use ($client, $url, $headers, $payload) { - return $client->postAsync($url, [ - 'curl' => [ - CURLOPT_HTTPHEADER => $headers, - CURLOPT_POSTFIELDS => $payload, - CURLOPT_HEADER => true - ] - ]); - }; - } - }; - - $pool = new Pool($client, $requests($audience), [ - 'concurrency' => config('federation.activitypub.delivery.concurrency'), - 'fulfilled' => function ($response, $index) { - }, - 'rejected' => function ($reason, $index) { - } - ]); - - $promise = $pool->promise(); - - $promise->wait(); + $status->delete(); return 1; - } + } + + public function fanoutDelete($status) + { + $profile = $status->profile; + + if (! $profile) { + return; + } + + $audience = $status->profile->getAudienceInbox(); + + $fractal = new Fractal\Manager(); + $fractal->setSerializer(new ArraySerializer()); + $resource = new Fractal\Resource\Item($status, new DeleteNote()); + $activity = $fractal->createData($resource)->toArray(); + + $this->unlinkRemoveMedia($status); + + $payload = json_encode($activity); + + $client = new Client([ + 'timeout' => config('federation.activitypub.delivery.timeout'), + ]); + + $version = config('pixelfed.version'); + $appUrl = config('app.url'); + $userAgent = "(Pixelfed/{$version}; +{$appUrl})"; + + $requests = function ($audience) use ($client, $activity, $profile, $payload, $userAgent) { + foreach ($audience as $url) { + $headers = HttpSignature::sign($profile, $url, $activity, [ + 'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', + 'User-Agent' => $userAgent, + ]); + yield function () use ($client, $url, $headers, $payload) { + return $client->postAsync($url, [ + 'curl' => [ + CURLOPT_HTTPHEADER => $headers, + CURLOPT_POSTFIELDS => $payload, + CURLOPT_HEADER => true, + ], + ]); + }; + } + }; + + $pool = new Pool($client, $requests($audience), [ + 'concurrency' => config('federation.activitypub.delivery.concurrency'), + 'fulfilled' => function ($response, $index) { + }, + 'rejected' => function ($reason, $index) { + }, + ]); + + $promise = $pool->promise(); + + $promise->wait(); + + return 1; + } } diff --git a/app/Jobs/StatusPipeline/StatusEntityLexer.php b/app/Jobs/StatusPipeline/StatusEntityLexer.php index 872594a96..4d19c7d8a 100644 --- a/app/Jobs/StatusPipeline/StatusEntityLexer.php +++ b/app/Jobs/StatusPipeline/StatusEntityLexer.php @@ -3,12 +3,16 @@ namespace App\Jobs\StatusPipeline; use App\Hashtag; +use App\Jobs\HomeFeedPipeline\FeedInsertPipeline; use App\Jobs\MentionPipeline\MentionPipeline; use App\Mention; use App\Profile; +use App\Services\AdminShadowFilterService; +use App\Services\PublicTimelineService; +use App\Services\StatusService; +use App\Services\UserFilterService; use App\Status; use App\StatusHashtag; -use App\Services\PublicTimelineService; use App\Util\Lexer\Autolink; use App\Util\Lexer\Extractor; use App\Util\Sentiment\Bouncer; @@ -19,18 +23,15 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use App\Services\StatusService; -use App\Services\UserFilterService; -use App\Services\AdminShadowFilterService; -use App\Jobs\HomeFeedPipeline\FeedInsertPipeline; -use App\Jobs\HomeFeedPipeline\HashtagInsertFanoutPipeline; class StatusEntityLexer implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; protected $status; + protected $entities; + protected $autolink; /** @@ -60,12 +61,12 @@ class StatusEntityLexer implements ShouldQueue $profile = $this->status->profile; $status = $this->status; - if(in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])) { + if (in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album'])) { $profile->status_count = $profile->status_count + 1; $profile->save(); } - if($profile->no_autolink == false) { + if ($profile->no_autolink == false) { $this->parseEntities(); } } @@ -103,16 +104,16 @@ class StatusEntityLexer implements ShouldQueue $status = $this->status; foreach ($tags as $tag) { - if(mb_strlen($tag) > 124) { + if (mb_strlen($tag) > 124) { continue; } DB::transaction(function () use ($status, $tag) { $slug = str_slug($tag, '-', false); $hashtag = Hashtag::firstOrCreate([ - 'slug' => $slug + 'slug' => $slug, ], [ - 'name' => $tag + 'name' => $tag, ]); StatusHashtag::firstOrCreate( @@ -136,11 +137,11 @@ class StatusEntityLexer implements ShouldQueue foreach ($mentions as $mention) { $mentioned = Profile::whereUsername($mention)->first(); - if (empty($mentioned) || !isset($mentioned->id)) { + if (empty($mentioned) || ! isset($mentioned->id)) { continue; } $blocks = UserFilterService::blocks($mentioned->id); - if($blocks && in_array($status->profile_id, $blocks)) { + if ($blocks && in_array($status->profile_id, $blocks)) { continue; } @@ -161,8 +162,8 @@ class StatusEntityLexer implements ShouldQueue $status = $this->status; StatusService::refresh($status->id); - if(config('exp.cached_home_timeline')) { - if( $status->in_reply_to_id === null && + if (config('exp.cached_home_timeline')) { + if ($status->in_reply_to_id === null && in_array($status->scope, ['public', 'unlisted', 'private']) ) { FeedInsertPipeline::dispatch($status->id, $status->profile_id)->onQueue('feed'); @@ -179,28 +180,28 @@ class StatusEntityLexer implements ShouldQueue 'photo:album', 'video', 'video:album', - 'photo:video:album' + 'photo:video:album', ]; - if(config_cache('pixelfed.bouncer.enabled')) { + if ((bool) config_cache('pixelfed.bouncer.enabled')) { Bouncer::get($status); } - Cache::forget('pf:atom:user-feed:by-id:' . $status->profile_id); + Cache::forget('pf:atom:user-feed:by-id:'.$status->profile_id); $hideNsfw = config('instance.hide_nsfw_on_public_feeds'); - if( $status->uri == null && + if ($status->uri == null && $status->scope == 'public' && in_array($status->type, $types) && $status->in_reply_to_id === null && $status->reblog_of_id === null && ($hideNsfw ? $status->is_nsfw == false : true) ) { - if(AdminShadowFilterService::canAddToPublicFeedByProfileId($status->profile_id)) { + if (AdminShadowFilterService::canAddToPublicFeedByProfileId($status->profile_id)) { PublicTimelineService::add($status->id); } } - if(config_cache('federation.activitypub.enabled') == true && config('app.env') == 'production') { + if ((bool) config_cache('federation.activitypub.enabled') == true && config('app.env') == 'production') { StatusActivityPubDeliver::dispatch($status); } } diff --git a/app/Jobs/StatusPipeline/StatusRemoteUpdatePipeline.php b/app/Jobs/StatusPipeline/StatusRemoteUpdatePipeline.php index 23b8716c1..7ef7a3366 100644 --- a/app/Jobs/StatusPipeline/StatusRemoteUpdatePipeline.php +++ b/app/Jobs/StatusPipeline/StatusRemoteUpdatePipeline.php @@ -2,172 +2,171 @@ namespace App\Jobs\StatusPipeline; +use App\Media; +use App\Models\StatusEdit; +use App\ModLog; +use App\Profile; +use App\Services\StatusService; +use App\Status; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; -use App\Media; -use App\ModLog; -use App\Profile; -use App\Status; -use App\Models\StatusEdit; -use App\Services\StatusService; -use Purify; use Illuminate\Support\Facades\Http; +use Purify; class StatusRemoteUpdatePipeline implements ShouldQueue { - use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; + use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public $activity; + public $activity; - /** - * Create a new job instance. - */ - public function __construct($activity) - { - $this->activity = $activity; - } + /** + * Create a new job instance. + */ + public function __construct($activity) + { + $this->activity = $activity; + } - /** - * Execute the job. - */ - public function handle(): void - { - $activity = $this->activity; - $status = Status::with('media')->whereObjectUrl($activity['id'])->first(); - if(!$status) { - return; - } - $this->createPreviousEdit($status); - $this->updateMedia($status, $activity); - $this->updateImmediateAttributes($status, $activity); - $this->createEdit($status, $activity); - } + /** + * Execute the job. + */ + public function handle(): void + { + $activity = $this->activity; + $status = Status::with('media')->whereObjectUrl($activity['id'])->first(); + if (! $status) { + return; + } + $this->createPreviousEdit($status); + $this->updateMedia($status, $activity); + $this->updateImmediateAttributes($status, $activity); + $this->createEdit($status, $activity); + } - protected function createPreviousEdit($status) - { - if(!$status->edits()->count()) { - StatusEdit::create([ - 'status_id' => $status->id, - 'profile_id' => $status->profile_id, - 'caption' => $status->caption, - 'spoiler_text' => $status->cw_summary, - 'is_nsfw' => $status->is_nsfw, - 'ordered_media_attachment_ids' => $status->media()->orderBy('order')->pluck('id')->toArray(), - 'created_at' => $status->created_at - ]); - } - } + protected function createPreviousEdit($status) + { + if (! $status->edits()->count()) { + StatusEdit::create([ + 'status_id' => $status->id, + 'profile_id' => $status->profile_id, + 'caption' => $status->caption, + 'spoiler_text' => $status->cw_summary, + 'is_nsfw' => $status->is_nsfw, + 'ordered_media_attachment_ids' => $status->media()->orderBy('order')->pluck('id')->toArray(), + 'created_at' => $status->created_at, + ]); + } + } - protected function updateMedia($status, $activity) - { - if(!isset($activity['attachment'])) { - return; - } - $ogm = $status->media->count() ? $status->media()->orderBy('order')->get() : collect([]); - $nm = collect($activity['attachment'])->filter(function($nm) { - return isset( - $nm['type'], - $nm['mediaType'], - $nm['url'] - ) && - in_array($nm['type'], ['Document', 'Image', 'Video']) && - in_array($nm['mediaType'], explode(',', config('pixelfed.media_types'))); - }); + protected function updateMedia($status, $activity) + { + if (! isset($activity['attachment'])) { + return; + } + $ogm = $status->media->count() ? $status->media()->orderBy('order')->get() : collect([]); + $nm = collect($activity['attachment'])->filter(function ($nm) { + return isset( + $nm['type'], + $nm['mediaType'], + $nm['url'] + ) && + in_array($nm['type'], ['Document', 'Image', 'Video']) && + in_array($nm['mediaType'], explode(',', config_cache('pixelfed.media_types'))); + }); - // Skip when no media - if(!$ogm->count() && !$nm->count()) { - return; - } + // Skip when no media + if (! $ogm->count() && ! $nm->count()) { + return; + } - Media::whereProfileId($status->profile_id) - ->whereStatusId($status->id) - ->update([ - 'status_id' => null - ]); + Media::whereProfileId($status->profile_id) + ->whereStatusId($status->id) + ->update([ + 'status_id' => null, + ]); - $nm->each(function($n, $key) use($status) { - $res = Http::withOptions(['allow_redirects' => false])->retry(3, 100, throw: false)->head($n['url']); + $nm->each(function ($n, $key) use ($status) { + $res = Http::withOptions(['allow_redirects' => false])->retry(3, 100, throw: false)->head($n['url']); - if(!$res->successful()) { - return; - } + if (! $res->successful()) { + return; + } - if(!in_array($res->header('content-type'), explode(',',config('pixelfed.media_types')))) { - return; - } + if (! in_array($res->header('content-type'), explode(',', config_cache('pixelfed.media_types')))) { + return; + } - $m = new Media; - $m->status_id = $status->id; - $m->profile_id = $status->profile_id; - $m->remote_media = true; - $m->media_path = $n['url']; + $m = new Media; + $m->status_id = $status->id; + $m->profile_id = $status->profile_id; + $m->remote_media = true; + $m->media_path = $n['url']; $m->mime = $res->header('content-type'); $m->size = $res->hasHeader('content-length') ? $res->header('content-length') : null; - $m->caption = isset($n['name']) && !empty($n['name']) ? Purify::clean($n['name']) : null; - $m->remote_url = $n['url']; + $m->caption = isset($n['name']) && ! empty($n['name']) ? Purify::clean($n['name']) : null; + $m->remote_url = $n['url']; $m->blurhash = isset($n['blurhash']) && (strlen($n['blurhash']) < 50) ? $n['blurhash'] : null; - $m->width = isset($n['width']) && !empty($n['width']) ? $n['width'] : null; - $m->height = isset($n['height']) && !empty($n['height']) ? $n['height'] : null; - $m->skip_optimize = true; - $m->order = $key + 1; - $m->save(); - }); - } + $m->width = isset($n['width']) && ! empty($n['width']) ? $n['width'] : null; + $m->height = isset($n['height']) && ! empty($n['height']) ? $n['height'] : null; + $m->skip_optimize = true; + $m->order = $key + 1; + $m->save(); + }); + } - protected function updateImmediateAttributes($status, $activity) - { - if(isset($activity['content'])) { - $status->caption = strip_tags($activity['content']); - $status->rendered = Purify::clean($activity['content']); - } + protected function updateImmediateAttributes($status, $activity) + { + if (isset($activity['content'])) { + $status->caption = strip_tags($activity['content']); + $status->rendered = Purify::clean($activity['content']); + } - if(isset($activity['sensitive'])) { - if((bool) $activity['sensitive'] == false) { - $status->is_nsfw = false; - $exists = ModLog::whereObjectType('App\Status::class') - ->whereObjectId($status->id) - ->whereAction('admin.status.moderate') - ->exists(); - if($exists == true) { - $status->is_nsfw = true; - } - $profile = Profile::find($status->profile_id); - if(!$profile || $profile->cw == true) { - $status->is_nsfw = true; - } - } else { - $status->is_nsfw = true; - } - } + if (isset($activity['sensitive'])) { + if ((bool) $activity['sensitive'] == false) { + $status->is_nsfw = false; + $exists = ModLog::whereObjectType('App\Status::class') + ->whereObjectId($status->id) + ->whereAction('admin.status.moderate') + ->exists(); + if ($exists == true) { + $status->is_nsfw = true; + } + $profile = Profile::find($status->profile_id); + if (! $profile || $profile->cw == true) { + $status->is_nsfw = true; + } + } else { + $status->is_nsfw = true; + } + } - if(isset($activity['summary'])) { - $status->cw_summary = Purify::clean($activity['summary']); - } else { - $status->cw_summary = null; - } + if (isset($activity['summary'])) { + $status->cw_summary = Purify::clean($activity['summary']); + } else { + $status->cw_summary = null; + } - $status->edited_at = now(); - $status->save(); - StatusService::del($status->id); - } + $status->edited_at = now(); + $status->save(); + StatusService::del($status->id); + } - protected function createEdit($status, $activity) - { - $cleaned = isset($activity['content']) ? Purify::clean($activity['content']) : null; - $spoiler_text = isset($activity['summary']) ? Purify::clean($activity['summary']) : null; - $sensitive = isset($activity['sensitive']) ? $activity['sensitive'] : null; - $mids = $status->media()->count() ? $status->media()->orderBy('order')->pluck('id')->toArray() : null; - StatusEdit::create([ - 'status_id' => $status->id, - 'profile_id' => $status->profile_id, - 'caption' => $cleaned, - 'spoiler_text' => $spoiler_text, - 'is_nsfw' => $sensitive, - 'ordered_media_attachment_ids' => $mids - ]); - } + protected function createEdit($status, $activity) + { + $cleaned = isset($activity['content']) ? Purify::clean($activity['content']) : null; + $spoiler_text = isset($activity['summary']) ? Purify::clean($activity['summary']) : null; + $sensitive = isset($activity['sensitive']) ? $activity['sensitive'] : null; + $mids = $status->media()->count() ? $status->media()->orderBy('order')->pluck('id')->toArray() : null; + StatusEdit::create([ + 'status_id' => $status->id, + 'profile_id' => $status->profile_id, + 'caption' => $cleaned, + 'spoiler_text' => $spoiler_text, + 'is_nsfw' => $sensitive, + 'ordered_media_attachment_ids' => $mids, + ]); + } } diff --git a/app/Models/CustomEmoji.php b/app/Models/CustomEmoji.php index 1ff026a19..47aa0d1a8 100644 --- a/app/Models/CustomEmoji.php +++ b/app/Models/CustomEmoji.php @@ -18,7 +18,7 @@ class CustomEmoji extends Model public static function scan($text, $activitypub = false) { - if(config('federation.custom_emoji.enabled') == false) { + if((bool) config_cache('federation.custom_emoji.enabled') == false) { return []; } diff --git a/app/Observers/AvatarObserver.php b/app/Observers/AvatarObserver.php index b7854e66f..557773ce0 100644 --- a/app/Observers/AvatarObserver.php +++ b/app/Observers/AvatarObserver.php @@ -3,9 +3,9 @@ namespace App\Observers; use App\Avatar; +use App\Services\AccountService; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -use App\Services\AccountService; class AvatarObserver { @@ -19,7 +19,6 @@ class AvatarObserver /** * Handle the avatar "created" event. * - * @param \App\Avatar $avatar * @return void */ public function created(Avatar $avatar) @@ -30,7 +29,6 @@ class AvatarObserver /** * Handle the avatar "updated" event. * - * @param \App\Avatar $avatar * @return void */ public function updated(Avatar $avatar) @@ -41,7 +39,6 @@ class AvatarObserver /** * Handle the avatar "deleted" event. * - * @param \App\Avatar $avatar * @return void */ public function deleted(Avatar $avatar) @@ -52,23 +49,22 @@ class AvatarObserver /** * Handle the avatar "deleting" event. * - * @param \App\Avatar $avatar * @return void */ public function deleting(Avatar $avatar) { $path = storage_path('app/'.$avatar->media_path); - if( is_file($path) && + if (is_file($path) && $avatar->media_path != 'public/avatars/default.png' && $avatar->media_path != 'public/avatars/default.jpg' ) { @unlink($path); } - if(config_cache('pixelfed.cloud_storage')) { + if ((bool) config_cache('pixelfed.cloud_storage')) { $disk = Storage::disk(config('filesystems.cloud')); $base = Str::startsWith($avatar->media_path, 'cache/avatars/'); - if($base && $disk->exists($avatar->media_path)) { + if ($base && $disk->exists($avatar->media_path)) { $disk->delete($avatar->media_path); } } @@ -78,7 +74,6 @@ class AvatarObserver /** * Handle the avatar "restored" event. * - * @param \App\Avatar $avatar * @return void */ public function restored(Avatar $avatar) @@ -89,7 +84,6 @@ class AvatarObserver /** * Handle the avatar "force deleted" event. * - * @param \App\Avatar $avatar * @return void */ public function forceDeleted(Avatar $avatar) diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index d587bd7e8..2b5d46116 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -107,7 +107,7 @@ class UserObserver CreateAvatar::dispatch($profile); }); - if(config_cache('account.autofollow') == true) { + if((bool) config_cache('account.autofollow') == true) { $names = config_cache('account.autofollow_usernames'); $names = explode(',', $names); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 52e992ce0..43d12b592 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,9 +2,9 @@ namespace App\Providers; +use Gate; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Laravel\Passport\Passport; -use Gate; class AuthServiceProvider extends ServiceProvider { @@ -24,11 +24,11 @@ class AuthServiceProvider extends ServiceProvider */ public function boot() { - if(config('app.env') === 'production' && config('pixelfed.oauth_enabled') == true) { + if (config('app.env') === 'production' && (bool) config_cache('pixelfed.oauth_enabled') == true) { Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 356))); Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 400))); Passport::enableImplicitGrant(); - if(config('instance.oauth.pat.enabled')) { + if (config('instance.oauth.pat.enabled')) { Passport::personalAccessClientId(config('instance.oauth.pat.id')); } @@ -38,7 +38,7 @@ class AuthServiceProvider extends ServiceProvider 'follow' => 'Ability to follow other profiles', 'admin:read' => 'Read all data on the server', 'admin:write' => 'Modify all data on the server', - 'push' => 'Receive your push notifications' + 'push' => 'Receive your push notifications', ]); Passport::setDefaultScope([ diff --git a/app/Services/AdminSettingsService.php b/app/Services/AdminSettingsService.php new file mode 100644 index 000000000..57fb6e96f --- /dev/null +++ b/app/Services/AdminSettingsService.php @@ -0,0 +1,166 @@ + self::getFeatures(), + 'landing' => self::getLanding(), + 'branding' => self::getBranding(), + 'media' => self::getMedia(), + 'rules' => self::getRules(), + 'suggested_rules' => self::getSuggestedRules(), + 'users' => self::getUsers(), + 'posts' => self::getPosts(), + 'platform' => self::getPlatform(), + 'storage' => self::getStorage(), + ]; + } + + public static function getFeatures() + { + $cloud_storage = (bool) config_cache('pixelfed.cloud_storage'); + $cloud_disk = config('filesystems.cloud'); + $cloud_ready = ! empty(config('filesystems.disks.'.$cloud_disk.'.key')) && ! empty(config('filesystems.disks.'.$cloud_disk.'.secret')); + $openReg = (bool) config_cache('pixelfed.open_registration'); + $curOnboarding = (bool) config_cache('instance.curated_registration.enabled'); + $regState = $openReg ? 'open' : ($curOnboarding ? 'filtered' : 'closed'); + + return [ + 'registration_status' => $regState, + 'cloud_storage' => $cloud_ready && $cloud_storage, + 'activitypub_enabled' => (bool) config_cache('federation.activitypub.enabled'), + 'account_migration' => (bool) config_cache('federation.migration'), + 'mobile_apis' => (bool) config_cache('pixelfed.oauth_enabled'), + 'stories' => (bool) config_cache('instance.stories.enabled'), + 'instagram_import' => (bool) config_cache('pixelfed.import.instagram.enabled'), + 'autospam_enabled' => (bool) config_cache('pixelfed.bouncer.enabled'), + ]; + } + + public static function getLanding() + { + $availableAdmins = User::whereIsAdmin(true)->get(); + $currentAdmin = config_cache('instance.admin.pid'); + + return [ + 'admins' => $availableAdmins, + 'current_admin' => $currentAdmin, + 'show_directory' => (bool) config_cache('instance.landing.show_directory'), + 'show_explore' => (bool) config_cache('instance.landing.show_explore'), + ]; + } + + public static function getBranding() + { + return [ + 'name' => config_cache('app.name'), + 'short_description' => config_cache('app.short_description'), + 'long_description' => config_cache('app.description'), + ]; + } + + public static function getMedia() + { + return [ + 'max_photo_size' => config_cache('pixelfed.max_photo_size'), + 'max_album_length' => config_cache('pixelfed.max_album_length'), + 'image_quality' => config_cache('pixelfed.image_quality'), + 'media_types' => config_cache('pixelfed.media_types'), + 'optimize_image' => (bool) config_cache('pixelfed.optimize_image'), + 'optimize_video' => (bool) config_cache('pixelfed.optimize_video'), + ]; + } + + public static function getRules() + { + return config_cache('app.rules') ? json_decode(config_cache('app.rules'), true) : []; + } + + public static function getSuggestedRules() + { + return BeagleService::getDefaultRules(); + } + + public static function getUsers() + { + $autoFollow = config_cache('account.autofollow_usernames'); + if (strlen($autoFollow) >= 2) { + $autoFollow = explode(',', $autoFollow); + } else { + $autoFollow = []; + } + + return [ + 'require_email_verification' => (bool) config_cache('pixelfed.enforce_email_verification'), + 'enforce_account_limit' => (bool) config_cache('pixelfed.enforce_account_limit'), + 'max_account_size' => config_cache('pixelfed.max_account_size'), + 'admin_autofollow' => (bool) config_cache('account.autofollow'), + 'admin_autofollow_accounts' => $autoFollow, + 'max_user_blocks' => (int) config_cache('instance.user_filters.max_user_blocks'), + 'max_user_mutes' => (int) config_cache('instance.user_filters.max_user_mutes'), + 'max_domain_blocks' => (int) config_cache('instance.user_filters.max_domain_blocks'), + ]; + } + + public static function getPosts() + { + return [ + 'max_caption_length' => config_cache('pixelfed.max_caption_length'), + 'max_altext_length' => config_cache('pixelfed.max_altext_length'), + ]; + } + + public static function getPlatform() + { + return [ + 'allow_app_registration' => (bool) config_cache('pixelfed.allow_app_registration'), + 'app_registration_rate_limit_attempts' => config_cache('pixelfed.app_registration_rate_limit_attempts'), + 'app_registration_rate_limit_decay' => config_cache('pixelfed.app_registration_rate_limit_decay'), + 'app_registration_confirm_rate_limit_attempts' => config_cache('pixelfed.app_registration_confirm_rate_limit_attempts'), + 'app_registration_confirm_rate_limit_decay' => config_cache('pixelfed.app_registration_confirm_rate_limit_decay'), + 'allow_post_embeds' => (bool) config_cache('instance.embed.post'), + 'allow_profile_embeds' => (bool) config_cache('instance.embed.profile'), + 'captcha_enabled' => (bool) config_cache('captcha.enabled'), + 'captcha_on_login' => (bool) config_cache('captcha.active.login'), + 'captcha_on_register' => (bool) config_cache('captcha.active.register'), + 'captcha_secret' => Str::of(config_cache('captcha.secret'))->mask('*', 4, -4), + 'captcha_sitekey' => Str::of(config_cache('captcha.sitekey'))->mask('*', 4, -4), + 'custom_emoji_enabled' => (bool) config_cache('federation.custom_emoji.enabled'), + ]; + } + + public static function getStorage() + { + $cloud_storage = (bool) config_cache('pixelfed.cloud_storage'); + $cloud_disk = config('filesystems.cloud'); + $cloud_ready = ! empty(config('filesystems.disks.'.$cloud_disk.'.key')) && ! empty(config('filesystems.disks.'.$cloud_disk.'.secret')); + $primaryDisk = (bool) $cloud_ready && $cloud_storage; + $pkey = 'filesystems.disks.'.$cloud_disk.'.'; + $disk = [ + 'driver' => $cloud_disk, + 'key' => Str::of(config_cache($pkey.'key'))->mask('*', 0, -2), + 'secret' => Str::of(config_cache($pkey.'secret'))->mask('*', 0, -2), + 'region' => config_cache($pkey.'region'), + 'bucket' => config_cache($pkey.'bucket'), + 'visibility' => config_cache($pkey.'visibility'), + 'endpoint' => config_cache($pkey.'endpoint'), + 'url' => config_cache($pkey.'url'), + 'use_path_style_endpoint' => config_cache($pkey.'use_path_style_endpoint'), + ]; + + return [ + 'primary_disk' => $primaryDisk ? 'cloud' : 'local', + 'cloud_ready' => (bool) $cloud_ready, + 'cloud_disk' => $cloud_disk, + 'disk_config' => $disk, + ]; + } +} diff --git a/app/Services/AutospamService.php b/app/Services/AutospamService.php index 6986e81e4..3164d14d0 100644 --- a/app/Services/AutospamService.php +++ b/app/Services/AutospamService.php @@ -2,77 +2,82 @@ namespace App\Services; +use App\Util\Lexer\Classifier; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Storage; -use App\Util\Lexer\Classifier; class AutospamService { - const CHCKD_CACHE_KEY = 'pf:services:autospam:nlp:checked'; - const MODEL_CACHE_KEY = 'pf:services:autospam:nlp:model-cache'; - const MODEL_FILE_PATH = 'nlp/active-training-data.json'; - const MODEL_SPAM_PATH = 'nlp/spam.json'; - const MODEL_HAM_PATH = 'nlp/ham.json'; + const CHCKD_CACHE_KEY = 'pf:services:autospam:nlp:checked'; - public static function check($text) - { - if(!$text || strlen($text) == 0) { - false; - } - if(!self::active()) { - return null; - } - $model = self::getCachedModel(); - $classifier = new Classifier; - $classifier->import($model['documents'], $model['words']); - return $classifier->most($text) === 'spam'; - } + const MODEL_CACHE_KEY = 'pf:services:autospam:nlp:model-cache'; - public static function eligible() - { - return Cache::remember(self::CHCKD_CACHE_KEY, 86400, function() { - if(!config_cache('pixelfed.bouncer.enabled') || !config('autospam.enabled')) { - return false; - } + const MODEL_FILE_PATH = 'nlp/active-training-data.json'; - if(!Storage::exists(self::MODEL_SPAM_PATH)) { - return false; - } + const MODEL_SPAM_PATH = 'nlp/spam.json'; - if(!Storage::exists(self::MODEL_HAM_PATH)) { - return false; - } + const MODEL_HAM_PATH = 'nlp/ham.json'; - if(!Storage::exists(self::MODEL_FILE_PATH)) { - return false; - } else { - if(Storage::size(self::MODEL_FILE_PATH) < 1000) { - return false; - } - } + public static function check($text) + { + if (! $text || strlen($text) == 0) { - return true; - }); - } + } + if (! self::active()) { + return null; + } + $model = self::getCachedModel(); + $classifier = new Classifier; + $classifier->import($model['documents'], $model['words']); - public static function active() - { - return config_cache('autospam.nlp.enabled') && self::eligible(); - } + return $classifier->most($text) === 'spam'; + } - public static function getCachedModel() - { - if(!self::active()) { - return null; - } + public static function eligible() + { + return Cache::remember(self::CHCKD_CACHE_KEY, 86400, function () { + if (! (bool) config_cache('pixelfed.bouncer.enabled') || ! (bool) config_cache('autospam.enabled')) { + return false; + } - return Cache::remember(self::MODEL_CACHE_KEY, 86400, function() { - $res = Storage::get(self::MODEL_FILE_PATH); - if(!$res || empty($res)) { - return null; - } + if (! Storage::exists(self::MODEL_SPAM_PATH)) { + return false; + } - return json_decode($res, true); - }); - } + if (! Storage::exists(self::MODEL_HAM_PATH)) { + return false; + } + + if (! Storage::exists(self::MODEL_FILE_PATH)) { + return false; + } else { + if (Storage::size(self::MODEL_FILE_PATH) < 1000) { + return false; + } + } + + return true; + }); + } + + public static function active() + { + return config_cache('autospam.nlp.enabled') && self::eligible(); + } + + public static function getCachedModel() + { + if (! self::active()) { + return null; + } + + return Cache::remember(self::MODEL_CACHE_KEY, 86400, function () { + $res = Storage::get(self::MODEL_FILE_PATH); + if (! $res || empty($res)) { + return null; + } + + return json_decode($res, true); + }); + } } diff --git a/app/Services/ConfigCacheService.php b/app/Services/ConfigCacheService.php index 7537830fc..626982781 100644 --- a/app/Services/ConfigCacheService.php +++ b/app/Services/ConfigCacheService.php @@ -8,6 +8,14 @@ use Cache; class ConfigCacheService { const CACHE_KEY = 'config_cache:_v0-key:'; + const PROTECTED_KEYS = [ + 'filesystems.disks.s3.key', + 'filesystems.disks.s3.secret', + 'filesystems.disks.spaces.key', + 'filesystems.disks.spaces.secret', + 'captcha.secret', + 'captcha.sitekey', + ]; public static function get($key) { @@ -89,6 +97,41 @@ class ConfigCacheService 'pixelfed.app_registration_confirm_rate_limit_decay', 'instance.embed.profile', 'instance.embed.post', + + 'captcha.enabled', + 'captcha.secret', + 'captcha.sitekey', + 'captcha.active.login', + 'captcha.active.register', + 'captcha.triggers.login.enabled', + 'captcha.triggers.login.attempts', + 'federation.custom_emoji.enabled', + + 'pixelfed.optimize_image', + 'pixelfed.optimize_video', + 'pixelfed.max_collection_length', + 'media.delete_local_after_cloud', + 'instance.user_filters.max_user_blocks', + 'instance.user_filters.max_user_mutes', + 'instance.user_filters.max_domain_blocks', + + 'filesystems.disks.s3.key', + 'filesystems.disks.s3.secret', + 'filesystems.disks.s3.region', + 'filesystems.disks.s3.bucket', + 'filesystems.disks.s3.visibility', + 'filesystems.disks.s3.url', + 'filesystems.disks.s3.endpoint', + 'filesystems.disks.s3.use_path_style_endpoint', + + 'filesystems.disks.spaces.key', + 'filesystems.disks.spaces.secret', + 'filesystems.disks.spaces.region', + 'filesystems.disks.spaces.bucket', + 'filesystems.disks.spaces.visibility', + 'filesystems.disks.spaces.url', + 'filesystems.disks.spaces.endpoint', + 'filesystems.disks.spaces.use_path_style_endpoint', // 'system.user_mode' ]; @@ -100,20 +143,34 @@ class ConfigCacheService return config($key); } + $protect = false; + $protected = null; + if(in_array($key, self::PROTECTED_KEYS)) { + $protect = true; + } + $v = config($key); $c = ConfigCacheModel::where('k', $key)->first(); if ($c) { - return $c->v ?? config($key); + if($protect) { + return decrypt($c->v) ?? config($key); + } else { + return $c->v ?? config($key); + } } if (! $v) { return; } + if($protect && $v) { + $protected = encrypt($v); + } + $cc = new ConfigCacheModel; $cc->k = $key; - $cc->v = $v; + $cc->v = $protect ? $protected : $v; $cc->save(); return $v; @@ -124,8 +181,15 @@ class ConfigCacheService { $exists = ConfigCacheModel::whereK($key)->first(); + $protect = false; + $protected = null; + if(in_array($key, self::PROTECTED_KEYS)) { + $protect = true; + $protected = encrypt($val); + } + if ($exists) { - $exists->v = $val; + $exists->v = $protect ? $protected : $val; $exists->save(); Cache::put(self::CACHE_KEY.$key, $val, now()->addHours(12)); @@ -134,7 +198,7 @@ class ConfigCacheService $cc = new ConfigCacheModel; $cc->k = $key; - $cc->v = $val; + $cc->v = $protect ? $protected : $val; $cc->save(); Cache::put(self::CACHE_KEY.$key, $val, now()->addHours(12)); diff --git a/app/Services/CustomEmojiService.php b/app/Services/CustomEmojiService.php index a95c93a2a..468772b5f 100644 --- a/app/Services/CustomEmojiService.php +++ b/app/Services/CustomEmojiService.php @@ -13,7 +13,7 @@ class CustomEmojiService { public static function get($shortcode) { - if(config('federation.custom_emoji.enabled') == false) { + if((bool) config_cache('federation.custom_emoji.enabled') == false) { return; } @@ -22,7 +22,7 @@ class CustomEmojiService public static function import($url, $id = false) { - if(config('federation.custom_emoji.enabled') == false) { + if((bool) config_cache('federation.custom_emoji.enabled') == false) { return; } diff --git a/app/Services/FilesystemService.php b/app/Services/FilesystemService.php new file mode 100644 index 000000000..b52f002f4 --- /dev/null +++ b/app/Services/FilesystemService.php @@ -0,0 +1,82 @@ + 'latest', + 'region' => $region, + 'endpoint' => $endpoint, + 'credentials' => [ + 'key' => $key, + 'secret' => $secret, + ] + ]); + + $adapter = new AwsS3V3Adapter( + $client, + $bucket, + ); + + $throw = false; + $filesystem = new Filesystem($adapter); + + $writable = false; + try { + $filesystem->write(self::VERIFY_FILE_NAME, 'ok', []); + $writable = true; + } catch (FilesystemException | UnableToWriteFile $exception) { + $writable = false; + } + + if(!$writable) { + return false; + } + + try { + $response = $filesystem->read(self::VERIFY_FILE_NAME); + if($response === 'ok') { + $writable = true; + $res[] = self::VERIFY_FILE_NAME; + } else { + $writable = false; + } + } catch (FilesystemException | UnableToReadFile $exception) { + $writable = false; + } + + if(in_array(self::VERIFY_FILE_NAME, $res)) { + try { + $filesystem->delete(self::VERIFY_FILE_NAME); + } catch (FilesystemException | UnableToDeleteFile $exception) { + $writable = false; + } + } + + if(!$writable) { + return false; + } + + if(in_array(self::VERIFY_FILE_NAME, $res)) { + return true; + } + + return false; + } +} diff --git a/app/Services/Internal/BeagleService.php b/app/Services/Internal/BeagleService.php new file mode 100644 index 000000000..60a4f78e4 --- /dev/null +++ b/app/Services/Internal/BeagleService.php @@ -0,0 +1,44 @@ +addDays(7), function() { + try { + $res = Http::withOptions(['allow_redirects' => false]) + ->timeout(5) + ->connectTimeout(5) + ->retry(2, 500) + ->get('https://beagle.pixelfed.net/api/v1/common/suggestions/rules'); + } catch (RequestException $e) { + return; + } catch (ConnectionException $e) { + return; + } catch (Exception $e) { + return; + } + + if(!$res->ok()) { + return; + } + + $json = $res->json(); + + if(!isset($json['rule_suggestions']) || !count($json['rule_suggestions'])) { + return []; + } + return $json['rule_suggestions']; + }); + } + +} diff --git a/app/Services/LandingService.php b/app/Services/LandingService.php index 20759ecf4..f51822df2 100644 --- a/app/Services/LandingService.php +++ b/app/Services/LandingService.php @@ -53,8 +53,8 @@ class LandingService 'name' => config_cache('app.name'), 'url' => config_cache('app.url'), 'domain' => config('pixelfed.domain.app'), - 'show_directory' => config_cache('instance.landing.show_directory'), - 'show_explore_feed' => config_cache('instance.landing.show_explore'), + 'show_directory' => (bool) config_cache('instance.landing.show_directory'), + 'show_explore_feed' => (bool) config_cache('instance.landing.show_explore'), 'open_registration' => (bool) $openReg, 'curated_onboarding' => (bool) config_cache('instance.curated_registration.enabled'), 'version' => config('pixelfed.version'), @@ -85,7 +85,7 @@ class LandingService 'media_types' => config_cache('pixelfed.media_types'), ], 'features' => [ - 'federation' => config_cache('federation.activitypub.enabled'), + 'federation' => (bool) config_cache('federation.activitypub.enabled'), 'timelines' => [ 'local' => true, 'network' => (bool) config_cache('federation.network_timeline'), diff --git a/app/Services/MediaStorageService.php b/app/Services/MediaStorageService.php index 216e37497..87bb9a586 100644 --- a/app/Services/MediaStorageService.php +++ b/app/Services/MediaStorageService.php @@ -2,44 +2,38 @@ namespace App\Services; +use App\Jobs\AvatarPipeline\AvatarStorageCleanup; +use App\Jobs\MediaPipeline\MediaDeletePipeline; +use App\Media; use App\Util\ActivityPub\Helpers; +use GuzzleHttp\Client; +use GuzzleHttp\Exception\RequestException; use Illuminate\Http\File; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Facades\Redis; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -use App\Media; -use App\Profile; -use App\User; -use GuzzleHttp\Client; -use App\Services\AccountService; -use App\Http\Controllers\AvatarController; -use GuzzleHttp\Exception\RequestException; -use App\Jobs\MediaPipeline\MediaDeletePipeline; -use Illuminate\Support\Arr; -use App\Jobs\AvatarPipeline\AvatarStorageCleanup; - -class MediaStorageService { +class MediaStorageService +{ public static function store(Media $media) { - if(config_cache('pixelfed.cloud_storage') == true) { + if ((bool) config_cache('pixelfed.cloud_storage') == true) { (new self())->cloudStore($media); } - return; } public static function move(Media $media) { - if($media->remote_media) { + if ($media->remote_media) { return; } - if(config_cache('pixelfed.cloud_storage') == true) { + if ((bool) config_cache('pixelfed.cloud_storage') == true) { return (new self())->cloudMove($media); } - return; + } public static function avatar($avatar, $local = false, $skipRecentCheck = false) @@ -56,31 +50,31 @@ class MediaStorageService { return false; } - $h = Arr::mapWithKeys($r->getHeaders(), function($item, $key) { + $h = Arr::mapWithKeys($r->getHeaders(), function ($item, $key) { return [strtolower($key) => last($item)]; }); - if(!isset($h['content-length'], $h['content-type'])) { + if (! isset($h['content-length'], $h['content-type'])) { return false; } $len = (int) $h['content-length']; $mime = $h['content-type']; - if($len < 10 || $len > ((config_cache('pixelfed.max_photo_size') * 1000))) { + if ($len < 10 || $len > ((config_cache('pixelfed.max_photo_size') * 1000))) { return false; } return [ 'length' => $len, - 'mime' => $mime + 'mime' => $mime, ]; } protected function cloudStore($media) { - if($media->remote_media == true) { - if(config('media.storage.remote.cloud')) { + if ($media->remote_media == true) { + if (config('media.storage.remote.cloud')) { (new self())->remoteToCloud($media); } } else { @@ -100,7 +94,7 @@ class MediaStorageService { $storagePath = implode('/', $p); $url = ResilientMediaStorageService::store($storagePath, $path, $name); - if($thumb) { + if ($thumb) { $thumbUrl = ResilientMediaStorageService::store($storagePath, $thumb, $thumbname); $media->thumbnail_url = $thumbUrl; } @@ -108,8 +102,8 @@ class MediaStorageService { $media->optimized_url = $url; $media->replicated_at = now(); $media->save(); - if($media->status_id) { - Cache::forget('status:transformer:media:attachments:' . $media->status_id); + if ($media->status_id) { + Cache::forget('status:transformer:media:attachments:'.$media->status_id); MediaService::del($media->status_id); StatusService::del($media->status_id, false); } @@ -119,20 +113,20 @@ class MediaStorageService { { $url = $media->remote_url; - if(!Helpers::validateUrl($url)) { + if (! Helpers::validateUrl($url)) { return; } $head = $this->head($media->remote_url); - if(!$head) { + if (! $head) { return; } $mimes = [ 'image/jpeg', 'image/png', - 'video/mp4' + 'video/mp4', ]; $mime = $head['mime']; @@ -141,11 +135,11 @@ class MediaStorageService { $media->remote_media = true; $media->save(); - if(!in_array($mime, $mimes)) { + if (! in_array($mime, $mimes)) { return; } - if($head['length'] >= $max_size) { + if ($head['length'] >= $max_size) { return; } @@ -168,10 +162,10 @@ class MediaStorageService { } $base = MediaPathService::get($media->profile); - $path = Str::random(40) . $ext; + $path = Str::random(40).$ext; $tmpBase = storage_path('app/remcache/'); - $tmpPath = $media->profile_id . '-' . $path; - $tmpName = $tmpBase . $tmpPath; + $tmpPath = $media->profile_id.'-'.$path; + $tmpName = $tmpBase.$tmpPath; $data = file_get_contents($url, false, null, 0, $head['length']); file_put_contents($tmpName, $data); $hash = hash_file('sha256', $tmpName); @@ -186,8 +180,8 @@ class MediaStorageService { $media->replicated_at = now(); $media->save(); - if($media->status_id) { - Cache::forget('status:transformer:media:attachments:' . $media->status_id); + if ($media->status_id) { + Cache::forget('status:transformer:media:attachments:'.$media->status_id); } unlink($tmpName); @@ -199,13 +193,13 @@ class MediaStorageService { $url = $avatar->remote_url; $driver = $local ? 'local' : config('filesystems.cloud'); - if(empty($url) || Helpers::validateUrl($url) == false) { + if (empty($url) || Helpers::validateUrl($url) == false) { return; } $head = $this->head($url); - if($head == false) { + if ($head == false) { return; } @@ -218,46 +212,47 @@ class MediaStorageService { $mime = $head['mime']; $max_size = (int) config('pixelfed.max_avatar_size') * 1000; - if(!$skipRecentCheck) { - if($avatar->last_fetched_at && $avatar->last_fetched_at->gt(now()->subMonths(3))) { + if (! $skipRecentCheck) { + if ($avatar->last_fetched_at && $avatar->last_fetched_at->gt(now()->subMonths(3))) { return; } } - Cache::forget('avatar:' . $avatar->profile_id); + Cache::forget('avatar:'.$avatar->profile_id); AccountService::del($avatar->profile_id); // handle pleroma edge case - if(Str::endsWith($mime, '; charset=utf-8')) { + if (Str::endsWith($mime, '; charset=utf-8')) { $mime = str_replace('; charset=utf-8', '', $mime); } - if(!in_array($mime, $mimes)) { + if (! in_array($mime, $mimes)) { return; } - if($head['length'] >= $max_size) { + if ($head['length'] >= $max_size) { return; } - $base = ($local ? 'public/cache/' : 'cache/') . 'avatars/' . $avatar->profile_id; + $base = ($local ? 'public/cache/' : 'cache/').'avatars/'.$avatar->profile_id; $ext = $head['mime'] == 'image/jpeg' ? 'jpg' : 'png'; - $path = 'avatar_' . strtolower(Str::random(random_int(3,6))) . '.' . $ext; + $path = 'avatar_'.strtolower(Str::random(random_int(3, 6))).'.'.$ext; $tmpBase = storage_path('app/remcache/'); - $tmpPath = 'avatar_' . $avatar->profile_id . '-' . $path; - $tmpName = $tmpBase . $tmpPath; + $tmpPath = 'avatar_'.$avatar->profile_id.'-'.$path; + $tmpName = $tmpBase.$tmpPath; $data = @file_get_contents($url, false, null, 0, $head['length']); - if(!$data) { + if (! $data) { return; } file_put_contents($tmpName, $data); - $mimeCheck = Storage::mimeType('remcache/' . $tmpPath); + $mimeCheck = Storage::mimeType('remcache/'.$tmpPath); - if(!$mimeCheck || !in_array($mimeCheck, ['image/png', 'image/jpeg'])) { + if (! $mimeCheck || ! in_array($mimeCheck, ['image/png', 'image/jpeg'])) { $avatar->last_fetched_at = now(); $avatar->save(); unlink($tmpName); + return; } @@ -265,15 +260,15 @@ class MediaStorageService { $file = $disk->putFileAs($base, new File($tmpName), $path, 'public'); $permalink = $disk->url($file); - $avatar->media_path = $base . '/' . $path; + $avatar->media_path = $base.'/'.$path; $avatar->is_remote = true; - $avatar->cdn_url = $local ? config('app.url') . $permalink : $permalink; + $avatar->cdn_url = $local ? config('app.url').$permalink : $permalink; $avatar->size = $head['length']; $avatar->change_count = $avatar->change_count + 1; $avatar->last_fetched_at = now(); $avatar->save(); - Cache::forget('avatar:' . $avatar->profile_id); + Cache::forget('avatar:'.$avatar->profile_id); AccountService::del($avatar->profile_id); AvatarStorageCleanup::dispatch($avatar)->onQueue($queue)->delay(now()->addMinutes(random_int(3, 15))); @@ -282,7 +277,7 @@ class MediaStorageService { public static function delete(Media $media, $confirm = false) { - if(!$confirm) { + if (! $confirm) { return; } MediaDeletePipeline::dispatch($media)->onQueue('mmo'); @@ -290,13 +285,13 @@ class MediaStorageService { protected function cloudMove($media) { - if(!Storage::exists($media->media_path)) { + if (! Storage::exists($media->media_path)) { return 'invalid file'; } $path = storage_path('app/'.$media->media_path); $thumb = false; - if($media->thumbnail_path) { + if ($media->thumbnail_path) { $thumb = storage_path('app/'.$media->thumbnail_path); $pt = explode('/', $media->thumbnail_path); $thumbname = array_pop($pt); @@ -307,7 +302,7 @@ class MediaStorageService { $storagePath = implode('/', $p); $url = ResilientMediaStorageService::store($storagePath, $path, $name); - if($thumb) { + if ($thumb) { $thumbUrl = ResilientMediaStorageService::store($storagePath, $thumb, $thumbname); $media->thumbnail_url = $thumbUrl; } @@ -316,8 +311,8 @@ class MediaStorageService { $media->replicated_at = now(); $media->save(); - if($media->status_id) { - Cache::forget('status:transformer:media:attachments:' . $media->status_id); + if ($media->status_id) { + Cache::forget('status:transformer:media:attachments:'.$media->status_id); MediaService::del($media->status_id); StatusService::del($media->status_id, false); } diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index bcf4f359c..2002a8967 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -2,49 +2,34 @@ namespace App\Util\ActivityPub; -use DB, Cache, Purify, Storage, Request, Validator; -use App\{ - Activity, - Follower, - Instance, - Like, - Media, - Notification, - Profile, - Status -}; -use Zttp\Zttp; -use Carbon\Carbon; -use GuzzleHttp\Client; -use Illuminate\Http\File; -use Illuminate\Validation\Rule; -use App\Jobs\AvatarPipeline\CreateAvatar; -use App\Jobs\RemoteFollowPipeline\RemoteFollowImportRecent; -use App\Jobs\ImageOptimizePipeline\{ImageOptimize,ImageThumbnail}; -use App\Jobs\StatusPipeline\NewStatusPipeline; -use App\Jobs\StatusPipeline\StatusReplyPipeline; -use App\Jobs\StatusPipeline\StatusTagsPipeline; -use App\Util\ActivityPub\HttpSignature; -use Illuminate\Support\Str; -use App\Services\ActivityPubFetchService; -use App\Services\ActivityPubDeliveryService; -use App\Services\CustomEmojiService; -use App\Services\InstanceService; -use App\Services\MediaPathService; -use App\Services\MediaStorageService; -use App\Services\NetworkTimelineService; -use App\Jobs\MediaPipeline\MediaStoragePipeline; +use App\Instance; use App\Jobs\AvatarPipeline\RemoteAvatarFetch; use App\Jobs\HomeFeedPipeline\FeedInsertRemotePipeline; -use App\Util\Media\License; +use App\Jobs\MediaPipeline\MediaStoragePipeline; +use App\Jobs\StatusPipeline\StatusReplyPipeline; +use App\Jobs\StatusPipeline\StatusTagsPipeline; +use App\Media; use App\Models\Poll; -use Illuminate\Contracts\Cache\LockTimeoutException; -use App\Services\DomainService; -use App\Services\UserFilterService; +use App\Profile; use App\Services\Account\AccountStatService; +use App\Services\ActivityPubDeliveryService; +use App\Services\ActivityPubFetchService; +use App\Services\DomainService; +use App\Services\InstanceService; +use App\Services\MediaPathService; +use App\Services\NetworkTimelineService; +use App\Services\UserFilterService; +use App\Status; +use App\Util\Media\License; +use Cache; +use Carbon\Carbon; +use Illuminate\Support\Str; +use Illuminate\Validation\Rule; +use Purify; +use Validator; -class Helpers { - +class Helpers +{ public static function validateObject($data) { $verbs = ['Create', 'Announce', 'Like', 'Follow', 'Delete', 'Accept', 'Reject', 'Undo', 'Tombstone']; @@ -53,14 +38,14 @@ class Helpers { 'type' => [ 'required', 'string', - Rule::in($verbs) + Rule::in($verbs), ], 'id' => 'required|string', 'actor' => 'required|string|url', 'object' => 'required', 'object.type' => 'required_if:type,Create', 'object.attributedTo' => 'required_if:type,Create|url', - 'published' => 'required_if:type,Create|date' + 'published' => 'required_if:type,Create|date', ])->passes(); return $valid; @@ -68,8 +53,8 @@ class Helpers { public static function verifyAttachments($data) { - if(!isset($data['object']) || empty($data['object'])) { - $data = ['object'=>$data]; + if (! isset($data['object']) || empty($data['object'])) { + $data = ['object' => $data]; } $activity = $data['object']; @@ -80,7 +65,7 @@ class Helpers { // Peertube // $mediaTypes = in_array('video/mp4', $mimeTypes) ? ['Document', 'Image', 'Video', 'Link'] : ['Document', 'Image']; - if(!isset($activity['attachment']) || empty($activity['attachment'])) { + if (! isset($activity['attachment']) || empty($activity['attachment'])) { return false; } @@ -100,13 +85,13 @@ class Helpers { '*.type' => [ 'required', 'string', - Rule::in($mediaTypes) + Rule::in($mediaTypes), ], '*.url' => 'required|url', - '*.mediaType' => [ + '*.mediaType' => [ 'required', 'string', - Rule::in($mimeTypes) + Rule::in($mimeTypes), ], '*.name' => 'sometimes|nullable|string', '*.blurhash' => 'sometimes|nullable|string|min:6|max:164', @@ -119,7 +104,7 @@ class Helpers { public static function normalizeAudience($data, $localOnly = true) { - if(!isset($data['to'])) { + if (! isset($data['to'])) { return; } @@ -128,32 +113,35 @@ class Helpers { $audience['cc'] = []; $scope = 'private'; - if(is_array($data['to']) && !empty($data['to'])) { + if (is_array($data['to']) && ! empty($data['to'])) { foreach ($data['to'] as $to) { - if($to == 'https://www.w3.org/ns/activitystreams#Public') { + if ($to == 'https://www.w3.org/ns/activitystreams#Public') { $scope = 'public'; + continue; } $url = $localOnly ? self::validateLocalUrl($to) : self::validateUrl($to); - if($url != false) { + if ($url != false) { array_push($audience['to'], $url); } } } - if(is_array($data['cc']) && !empty($data['cc'])) { + if (is_array($data['cc']) && ! empty($data['cc'])) { foreach ($data['cc'] as $cc) { - if($cc == 'https://www.w3.org/ns/activitystreams#Public') { + if ($cc == 'https://www.w3.org/ns/activitystreams#Public') { $scope = 'unlisted'; + continue; } $url = $localOnly ? self::validateLocalUrl($cc) : self::validateUrl($cc); - if($url != false) { + if ($url != false) { array_push($audience['cc'], $url); } } } $audience['scope'] = $scope; + return $audience; } @@ -161,56 +149,57 @@ class Helpers { { $audience = self::normalizeAudience($data); $url = $profile->permalink(); + return in_array($url, $audience['to']) || in_array($url, $audience['cc']); } public static function validateUrl($url) { - if(is_array($url)) { + if (is_array($url)) { $url = $url[0]; } $hash = hash('sha256', $url); $key = "helpers:url:valid:sha256-{$hash}"; - $valid = Cache::remember($key, 900, function() use($url) { + $valid = Cache::remember($key, 900, function () use ($url) { $localhosts = [ - '127.0.0.1', 'localhost', '::1' + '127.0.0.1', 'localhost', '::1', ]; - if(strtolower(mb_substr($url, 0, 8)) !== 'https://') { + if (strtolower(mb_substr($url, 0, 8)) !== 'https://') { return false; } - if(substr_count($url, '://') !== 1) { + if (substr_count($url, '://') !== 1) { return false; } - if(mb_substr($url, 0, 8) !== 'https://') { - $url = 'https://' . substr($url, 8); + if (mb_substr($url, 0, 8) !== 'https://') { + $url = 'https://'.substr($url, 8); } $valid = filter_var($url, FILTER_VALIDATE_URL); - if(!$valid) { + if (! $valid) { return false; } $host = parse_url($valid, PHP_URL_HOST); - if(in_array($host, $localhosts)) { + if (in_array($host, $localhosts)) { return false; } - if(config('security.url.verify_dns')) { - if(DomainService::hasValidDns($host) === false) { + if (config('security.url.verify_dns')) { + if (DomainService::hasValidDns($host) === false) { return false; } } - if(app()->environment() === 'production') { + if (app()->environment() === 'production') { $bannedInstances = InstanceService::getBannedDomains(); - if(in_array($host, $bannedInstances)) { + if (in_array($host, $bannedInstances)) { return false; } } @@ -224,12 +213,14 @@ class Helpers { public static function validateLocalUrl($url) { $url = self::validateUrl($url); - if($url == true) { + if ($url == true) { $domain = config('pixelfed.domain.app'); $host = parse_url($url, PHP_URL_HOST); $url = strtolower($domain) === strtolower($host) ? $url : false; + return $url; } + return false; } @@ -237,15 +228,16 @@ class Helpers { { $version = config('pixelfed.version'); $url = config('app.url'); + return [ - 'Accept' => 'application/activity+json', + 'Accept' => 'application/activity+json', 'User-Agent' => "(Pixelfed/{$version}; +{$url})", ]; } public static function fetchFromUrl($url = false) { - if(self::validateUrl($url) == false) { + if (self::validateUrl($url) == false) { return; } @@ -253,13 +245,13 @@ class Helpers { $key = "helpers:url:fetcher:sha256-{$hash}"; $ttl = now()->addMinutes(15); - return Cache::remember($key, $ttl, function() use($url) { + return Cache::remember($key, $ttl, function () use ($url) { $res = ActivityPubFetchService::get($url); - if(!$res || empty($res)) { + if (! $res || empty($res)) { return false; } $res = json_decode($res, true, 8); - if(json_last_error() == JSON_ERROR_NONE) { + if (json_last_error() == JSON_ERROR_NONE) { return $res; } else { return false; @@ -274,12 +266,12 @@ class Helpers { public static function pluckval($val) { - if(is_string($val)) { + if (is_string($val)) { return $val; } - if(is_array($val)) { - return !empty($val) ? head($val) : null; + if (is_array($val)) { + return ! empty($val) ? head($val) : null; } return null; @@ -288,51 +280,52 @@ class Helpers { public static function statusFirstOrFetch($url, $replyTo = false) { $url = self::validateUrl($url); - if($url == false) { + if ($url == false) { return; } $host = parse_url($url, PHP_URL_HOST); $local = config('pixelfed.domain.app') == $host ? true : false; - if($local) { + if ($local) { $id = (int) last(explode('/', $url)); - return Status::whereNotIn('scope', ['draft','archived'])->findOrFail($id); + + return Status::whereNotIn('scope', ['draft', 'archived'])->findOrFail($id); } - $cached = Status::whereNotIn('scope', ['draft','archived']) + $cached = Status::whereNotIn('scope', ['draft', 'archived']) ->whereUri($url) ->orWhere('object_url', $url) ->first(); - if($cached) { + if ($cached) { return $cached; } $res = self::fetchFromUrl($url); - if(!$res || empty($res) || isset($res['error']) || !isset($res['@context']) || !isset($res['published']) ) { + if (! $res || empty($res) || isset($res['error']) || ! isset($res['@context']) || ! isset($res['published'])) { return; } - if(config('autospam.live_filters.enabled')) { + if (config('autospam.live_filters.enabled')) { $filters = config('autospam.live_filters.filters'); - if(!empty($filters) && isset($res['content']) && !empty($res['content']) && strlen($filters) > 3) { + if (! empty($filters) && isset($res['content']) && ! empty($res['content']) && strlen($filters) > 3) { $filters = array_map('trim', explode(',', $filters)); $content = $res['content']; - foreach($filters as $filter) { + foreach ($filters as $filter) { $filter = trim(strtolower($filter)); - if(!$filter || !strlen($filter)) { + if (! $filter || ! strlen($filter)) { continue; } - if(str_contains(strtolower($content), $filter)) { + if (str_contains(strtolower($content), $filter)) { return; } } } } - if(isset($res['object'])) { + if (isset($res['object'])) { $activity = $res; } else { $activity = ['object' => $res]; @@ -342,37 +335,37 @@ class Helpers { $cw = isset($res['sensitive']) ? (bool) $res['sensitive'] : false; - if(isset($res['to']) == true) { - if(is_array($res['to']) && in_array('https://www.w3.org/ns/activitystreams#Public', $res['to'])) { + if (isset($res['to']) == true) { + if (is_array($res['to']) && in_array('https://www.w3.org/ns/activitystreams#Public', $res['to'])) { $scope = 'public'; } - if(is_string($res['to']) && 'https://www.w3.org/ns/activitystreams#Public' == $res['to']) { + if (is_string($res['to']) && $res['to'] == 'https://www.w3.org/ns/activitystreams#Public') { $scope = 'public'; } } - if(isset($res['cc']) == true) { - if(is_array($res['cc']) && in_array('https://www.w3.org/ns/activitystreams#Public', $res['cc'])) { + if (isset($res['cc']) == true) { + if (is_array($res['cc']) && in_array('https://www.w3.org/ns/activitystreams#Public', $res['cc'])) { $scope = 'unlisted'; } - if(is_string($res['cc']) && 'https://www.w3.org/ns/activitystreams#Public' == $res['cc']) { + if (is_string($res['cc']) && $res['cc'] == 'https://www.w3.org/ns/activitystreams#Public') { $scope = 'unlisted'; } } - if(config('costar.enabled') == true) { + if (config('costar.enabled') == true) { $blockedKeywords = config('costar.keyword.block'); - if($blockedKeywords !== null) { + if ($blockedKeywords !== null) { $keywords = config('costar.keyword.block'); - foreach($keywords as $kw) { - if(Str::contains($res['content'], $kw) == true) { + foreach ($keywords as $kw) { + if (Str::contains($res['content'], $kw) == true) { return; } } } $unlisted = config('costar.domain.unlisted'); - if(in_array(parse_url($url, PHP_URL_HOST), $unlisted) == true) { + if (in_array(parse_url($url, PHP_URL_HOST), $unlisted) == true) { $unlisted = true; $scope = 'unlisted'; } else { @@ -380,7 +373,7 @@ class Helpers { } $cwDomains = config('costar.domain.cw'); - if(in_array(parse_url($url, PHP_URL_HOST), $cwDomains) == true) { + if (in_array(parse_url($url, PHP_URL_HOST), $cwDomains) == true) { $cw = true; } } @@ -389,15 +382,15 @@ class Helpers { $idDomain = parse_url($id, PHP_URL_HOST); $urlDomain = parse_url($url, PHP_URL_HOST); - if($idDomain && $urlDomain && strtolower($idDomain) !== strtolower($urlDomain)) { + if ($idDomain && $urlDomain && strtolower($idDomain) !== strtolower($urlDomain)) { return; } - if(!self::validateUrl($id)) { + if (! self::validateUrl($id)) { return; } - if(!isset($activity['object']['attributedTo'])) { + if (! isset($activity['object']['attributedTo'])) { return; } @@ -405,39 +398,38 @@ class Helpers { $activity['object']['attributedTo'] : (is_array($activity['object']['attributedTo']) ? collect($activity['object']['attributedTo']) - ->filter(function($o) { + ->filter(function ($o) { return $o && isset($o['type']) && $o['type'] == 'Person'; }) ->pluck('id') ->first() : null ); - if($attributedTo) { + if ($attributedTo) { $actorDomain = parse_url($attributedTo, PHP_URL_HOST); - if(!self::validateUrl($attributedTo) || + if (! self::validateUrl($attributedTo) || $idDomain !== $actorDomain || $actorDomain !== $urlDomain - ) - { + ) { return; } } - if($idDomain !== $urlDomain) { + if ($idDomain !== $urlDomain) { return; } $profile = self::profileFirstOrNew($attributedTo); - if(!$profile) { + if (! $profile) { return; } - if(isset($activity['object']['inReplyTo']) && !empty($activity['object']['inReplyTo']) || $replyTo == true) { + if (isset($activity['object']['inReplyTo']) && ! empty($activity['object']['inReplyTo']) || $replyTo == true) { $reply_to = self::statusFirstOrFetch(self::pluckval($activity['object']['inReplyTo']), false); - if($reply_to) { + if ($reply_to) { $blocks = UserFilterService::blocks($reply_to->profile_id); - if(in_array($profile->id, $blocks)) { + if (in_array($profile->id, $blocks)) { return; } } @@ -447,15 +439,15 @@ class Helpers { } $ts = self::pluckval($res['published']); - if($scope == 'public' && in_array($urlDomain, InstanceService::getUnlistedDomains())) { + if ($scope == 'public' && in_array($urlDomain, InstanceService::getUnlistedDomains())) { $scope = 'unlisted'; } - if(in_array($urlDomain, InstanceService::getNsfwDomains())) { + if (in_array($urlDomain, InstanceService::getNsfwDomains())) { $cw = true; } - if($res['type'] === 'Question') { + if ($res['type'] === 'Question') { $status = self::storePoll( $profile, $res, @@ -466,6 +458,7 @@ class Helpers { $scope, $id ); + return $status; } else { $status = self::storeStatus($url, $profile, $res); @@ -482,12 +475,12 @@ class Helpers { $idDomain = parse_url($id, PHP_URL_HOST); $urlDomain = parse_url($url, PHP_URL_HOST); $originalUrlDomain = parse_url($originalUrl, PHP_URL_HOST); - if(!self::validateUrl($id) || !self::validateUrl($url)) { + if (! self::validateUrl($id) || ! self::validateUrl($url)) { return; } - if( strtolower($originalUrlDomain) !== strtolower($idDomain) || - strtolower($originalUrlDomain) !== strtolower($urlDomain) ) { + if (strtolower($originalUrlDomain) !== strtolower($idDomain) || + strtolower($originalUrlDomain) !== strtolower($urlDomain)) { return; } @@ -498,21 +491,21 @@ class Helpers { $cw = self::getSensitive($activity, $url); $pid = is_object($profile) ? $profile->id : (is_array($profile) ? $profile['id'] : null); $isUnlisted = is_object($profile) ? $profile->unlisted : (is_array($profile) ? $profile['unlisted'] : false); - $commentsDisabled = isset($activity['commentsEnabled']) ? !boolval($activity['commentsEnabled']) : false; + $commentsDisabled = isset($activity['commentsEnabled']) ? ! boolval($activity['commentsEnabled']) : false; - if(!$pid) { + if (! $pid) { return; } - if($scope == 'public') { - if($isUnlisted == true) { + if ($scope == 'public') { + if ($isUnlisted == true) { $scope = 'unlisted'; } } $status = Status::updateOrCreate( [ - 'uri' => $url + 'uri' => $url, ], [ 'profile_id' => $pid, 'url' => $url, @@ -527,24 +520,24 @@ class Helpers { 'visibility' => $scope, 'cw_summary' => ($cw == true && isset($activity['summary']) ? Purify::clean(strip_tags($activity['summary'])) : null), - 'comments_disabled' => $commentsDisabled + 'comments_disabled' => $commentsDisabled, ] ); - if($reply_to == null) { + if ($reply_to == null) { self::importNoteAttachment($activity, $status); } else { - if(isset($activity['attachment']) && !empty($activity['attachment'])) { + if (isset($activity['attachment']) && ! empty($activity['attachment'])) { self::importNoteAttachment($activity, $status); } StatusReplyPipeline::dispatch($status); } - if(isset($activity['tag']) && is_array($activity['tag']) && !empty($activity['tag'])) { + if (isset($activity['tag']) && is_array($activity['tag']) && ! empty($activity['tag'])) { StatusTagsPipeline::dispatch($activity, $status); } - if( config('instance.timeline.network.cached') && + if (config('instance.timeline.network.cached') && $status->in_reply_to_id === null && $status->reblog_of_id === null && in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) && @@ -556,8 +549,8 @@ class Helpers { ->unique() ->values() ->toArray(); - if(!in_array($urlDomain, $filteredDomains)) { - if(!$isUnlisted) { + if (! in_array($urlDomain, $filteredDomains)) { + if (! $isUnlisted) { NetworkTimelineService::add($status->id); } } @@ -565,7 +558,7 @@ class Helpers { AccountStatService::incrementPostCount($pid); - if( $status->in_reply_to_id === null && + if ($status->in_reply_to_id === null && in_array($status->type, ['photo', 'photo:album', 'video', 'video:album', 'photo:video:album']) ) { FeedInsertRemotePipeline::dispatch($status->id, $pid)->onQueue('feed'); @@ -576,14 +569,14 @@ class Helpers { public static function getSensitive($activity, $url) { - if(!$url || !strlen($url)) { + if (! $url || ! strlen($url)) { return true; } $urlDomain = parse_url($url, PHP_URL_HOST); $cw = isset($activity['sensitive']) ? (bool) $activity['sensitive'] : false; - if(in_array($urlDomain, InstanceService::getNsfwDomains())) { + if (in_array($urlDomain, InstanceService::getNsfwDomains())) { $cw = true; } @@ -593,13 +586,13 @@ class Helpers { public static function getReplyTo($activity) { $reply_to = null; - $inReplyTo = isset($activity['inReplyTo']) && !empty($activity['inReplyTo']) ? + $inReplyTo = isset($activity['inReplyTo']) && ! empty($activity['inReplyTo']) ? self::pluckval($activity['inReplyTo']) : false; - if($inReplyTo) { + if ($inReplyTo) { $reply_to = self::statusFirstOrFetch($inReplyTo); - if($reply_to) { + if ($reply_to) { $reply_to = optional($reply_to)->id; } } else { @@ -616,25 +609,25 @@ class Helpers { $urlDomain = parse_url(self::pluckval($url), PHP_URL_HOST); $scope = 'private'; - if(isset($activity['to']) == true) { - if(is_array($activity['to']) && in_array('https://www.w3.org/ns/activitystreams#Public', $activity['to'])) { + if (isset($activity['to']) == true) { + if (is_array($activity['to']) && in_array('https://www.w3.org/ns/activitystreams#Public', $activity['to'])) { $scope = 'public'; } - if(is_string($activity['to']) && 'https://www.w3.org/ns/activitystreams#Public' == $activity['to']) { + if (is_string($activity['to']) && $activity['to'] == 'https://www.w3.org/ns/activitystreams#Public') { $scope = 'public'; } } - if(isset($activity['cc']) == true) { - if(is_array($activity['cc']) && in_array('https://www.w3.org/ns/activitystreams#Public', $activity['cc'])) { + if (isset($activity['cc']) == true) { + if (is_array($activity['cc']) && in_array('https://www.w3.org/ns/activitystreams#Public', $activity['cc'])) { $scope = 'unlisted'; } - if(is_string($activity['cc']) && 'https://www.w3.org/ns/activitystreams#Public' == $activity['cc']) { + if (is_string($activity['cc']) && $activity['cc'] == 'https://www.w3.org/ns/activitystreams#Public') { $scope = 'unlisted'; } } - if($scope == 'public' && in_array($urlDomain, InstanceService::getUnlistedDomains())) { + if ($scope == 'public' && in_array($urlDomain, InstanceService::getUnlistedDomains())) { $scope = 'unlisted'; } @@ -643,15 +636,15 @@ class Helpers { private static function storePoll($profile, $res, $url, $ts, $reply_to, $cw, $scope, $id) { - if(!isset($res['endTime']) || !isset($res['oneOf']) || !is_array($res['oneOf']) || count($res['oneOf']) > 4) { + if (! isset($res['endTime']) || ! isset($res['oneOf']) || ! is_array($res['oneOf']) || count($res['oneOf']) > 4) { return; } - $options = collect($res['oneOf'])->map(function($option) { + $options = collect($res['oneOf'])->map(function ($option) { return $option['name']; })->toArray(); - $cachedTallies = collect($res['oneOf'])->map(function($option) { + $cachedTallies = collect($res['oneOf'])->map(function ($option) { return $option['replies']['totalItems'] ?? 0; })->toArray(); @@ -697,9 +690,10 @@ class Helpers { public static function importNoteAttachment($data, Status $status) { - if(self::verifyAttachments($data) == false) { + if (self::verifyAttachments($data) == false) { // \Log::info('importNoteAttachment::failedVerification.', [$data['id']]); $status->viewType(); + return; } $attachments = isset($data['object']) ? $data['object']['attachment'] : $data['attachment']; @@ -712,11 +706,11 @@ class Helpers { $storagePath = MediaPathService::get($user, 2); $allowed = explode(',', config_cache('pixelfed.media_types')); - foreach($attachments as $key => $media) { + foreach ($attachments as $key => $media) { $type = $media['mediaType']; $url = $media['url']; $valid = self::validateUrl($url); - if(in_array($type, $allowed) == false || $valid == false) { + if (in_array($type, $allowed) == false || $valid == false) { continue; } $blurhash = isset($media['blurhash']) ? $media['blurhash'] : null; @@ -735,50 +729,52 @@ class Helpers { $media->remote_url = $url; $media->caption = $caption; $media->order = $key + 1; - if($width) { + if ($width) { $media->width = $width; } - if($height) { + if ($height) { $media->height = $height; } - if($license) { + if ($license) { $media->license = $license; } $media->mime = $type; $media->version = 3; $media->save(); - if(config_cache('pixelfed.cloud_storage') == true) { + if ((bool) config_cache('pixelfed.cloud_storage') == true) { MediaStoragePipeline::dispatch($media); } } $status->viewType(); - return; + } public static function profileFirstOrNew($url) { $url = self::validateUrl($url); - if($url == false) { + if ($url == false) { return; } $host = parse_url($url, PHP_URL_HOST); $local = config('pixelfed.domain.app') == $host ? true : false; - if($local == true) { + if ($local == true) { $id = last(explode('/', $url)); + return Profile::whereNull('status') ->whereNull('domain') ->whereUsername($id) ->firstOrFail(); } - if($profile = Profile::whereRemoteUrl($url)->first()) { - if($profile->last_fetched_at && $profile->last_fetched_at->lt(now()->subHours(24))) { + if ($profile = Profile::whereRemoteUrl($url)->first()) { + if ($profile->last_fetched_at && $profile->last_fetched_at->lt(now()->subHours(24))) { return self::profileUpdateOrCreate($url); } + return $profile; } @@ -788,42 +784,42 @@ class Helpers { public static function profileUpdateOrCreate($url) { $res = self::fetchProfileFromUrl($url); - if(!$res || isset($res['id']) == false) { + if (! $res || isset($res['id']) == false) { return; } $urlDomain = parse_url($url, PHP_URL_HOST); $domain = parse_url($res['id'], PHP_URL_HOST); - if(strtolower($urlDomain) !== strtolower($domain)) { + if (strtolower($urlDomain) !== strtolower($domain)) { return; } - if(!isset($res['preferredUsername']) && !isset($res['nickname'])) { + if (! isset($res['preferredUsername']) && ! isset($res['nickname'])) { return; } // skip invalid usernames - if(!ctype_alnum($res['preferredUsername'])) { + if (! ctype_alnum($res['preferredUsername'])) { $tmpUsername = str_replace(['_', '.', '-'], '', $res['preferredUsername']); - if(!ctype_alnum($tmpUsername)) { + if (! ctype_alnum($tmpUsername)) { return; } } $username = (string) Purify::clean($res['preferredUsername'] ?? $res['nickname']); - if(empty($username)) { + if (empty($username)) { return; } $remoteUsername = $username; $webfinger = "@{$username}@{$domain}"; - if(!self::validateUrl($res['inbox'])) { + if (! self::validateUrl($res['inbox'])) { return; } - if(!self::validateUrl($res['id'])) { + if (! self::validateUrl($res['id'])) { return; } $instance = Instance::updateOrCreate([ - 'domain' => $domain + 'domain' => $domain, ]); - if($instance->wasRecentlyCreated == true) { + if ($instance->wasRecentlyCreated == true) { \App\Jobs\InstancePipeline\FetchNodeinfoPipeline::dispatch($instance)->onQueue('low'); } @@ -846,13 +842,14 @@ class Helpers { ] ); - if( $profile->last_fetched_at == null || + if ($profile->last_fetched_at == null || $profile->last_fetched_at->lt(now()->subMonths(3)) ) { RemoteAvatarFetch::dispatch($profile); } $profile->last_fetched_at = now(); $profile->save(); + return $profile; } @@ -863,7 +860,7 @@ class Helpers { public static function sendSignedObject($profile, $url, $body) { - if(app()->environment() !== 'production') { + if (app()->environment() !== 'production') { return; } ActivityPubDeliveryService::queue() diff --git a/app/Util/ActivityPub/Outbox.php b/app/Util/ActivityPub/Outbox.php index 43adb36e3..aba34955e 100644 --- a/app/Util/ActivityPub/Outbox.php +++ b/app/Util/ActivityPub/Outbox.php @@ -2,34 +2,32 @@ namespace App\Util\ActivityPub; -use App\Profile; -use App\Status; -use League\Fractal; use App\Http\Controllers\ProfileController; -use App\Transformer\ActivityPub\ProfileOutbox; +use App\Status; use App\Transformer\ActivityPub\Verb\CreateNote; +use League\Fractal; -class Outbox { +class Outbox +{ + public static function get($profile) + { + abort_if(! (bool) config_cache('federation.activitypub.enabled'), 404); + abort_if(! config('federation.activitypub.outbox'), 404); - public static function get($profile) - { - abort_if(!config_cache('federation.activitypub.enabled'), 404); - abort_if(!config('federation.activitypub.outbox'), 404); - - if($profile->status != null) { + if ($profile->status != null) { return ProfileController::accountCheck($profile); } - if($profile->is_private) { - return ['error'=>'403', 'msg' => 'private profile']; + if ($profile->is_private) { + return ['error' => '403', 'msg' => 'private profile']; } $timeline = $profile - ->statuses() - ->whereScope('public') - ->orderBy('created_at', 'desc') - ->take(10) - ->get(); + ->statuses() + ->whereScope('public') + ->orderBy('created_at', 'desc') + ->take(10) + ->get(); $count = Status::whereProfileId($profile->id)->count(); @@ -38,14 +36,14 @@ class Outbox { $res = $fractal->createData($resource)->toArray(); $outbox = [ - '@context' => 'https://www.w3.org/ns/activitystreams', - '_debug' => 'Outbox only supports latest 10 objects, pagination is not supported', - 'id' => $profile->permalink('/outbox'), - 'type' => 'OrderedCollection', - 'totalItems' => $count, - 'orderedItems' => $res['data'] + '@context' => 'https://www.w3.org/ns/activitystreams', + '_debug' => 'Outbox only supports latest 10 objects, pagination is not supported', + 'id' => $profile->permalink('/outbox'), + 'type' => 'OrderedCollection', + 'totalItems' => $count, + 'orderedItems' => $res['data'], ]; - return $outbox; - } + return $outbox; + } } diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index 02944defe..e661d82fe 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -30,16 +30,16 @@ class Config 'version' => config('pixelfed.version'), 'open_registration' => (bool) config_cache('pixelfed.open_registration'), 'uploader' => [ - 'max_photo_size' => (int) config('pixelfed.max_photo_size'), + 'max_photo_size' => (int) config_cache('pixelfed.max_photo_size'), 'max_caption_length' => (int) config_cache('pixelfed.max_caption_length'), 'max_altext_length' => (int) config_cache('pixelfed.max_altext_length', 150), 'album_limit' => (int) config_cache('pixelfed.max_album_length'), 'image_quality' => (int) config_cache('pixelfed.image_quality'), - 'max_collection_length' => (int) config('pixelfed.max_collection_length', 18), + 'max_collection_length' => (int) config_cache('pixelfed.max_collection_length', 18), - 'optimize_image' => (bool) config('pixelfed.optimize_image'), - 'optimize_video' => (bool) config('pixelfed.optimize_video'), + 'optimize_image' => (bool) config_cache('pixelfed.optimize_image'), + 'optimize_video' => (bool) config_cache('pixelfed.optimize_video'), 'media_types' => config_cache('pixelfed.media_types'), 'mime_types' => config_cache('pixelfed.media_types') ? explode(',', config_cache('pixelfed.media_types')) : [], diff --git a/database/migrations/2023_02_04_053028_fix_cloud_media_paths.php b/database/migrations/2023_02_04_053028_fix_cloud_media_paths.php index b45ad7f80..31b16de1e 100644 --- a/database/migrations/2023_02_04_053028_fix_cloud_media_paths.php +++ b/database/migrations/2023_02_04_053028_fix_cloud_media_paths.php @@ -19,7 +19,7 @@ return new class extends Migration public function up() { ini_set('memory_limit', '-1'); - if(config_cache('pixelfed.cloud_storage') == false) { + if((bool) config_cache('pixelfed.cloud_storage') == false) { return; } diff --git a/public/css/admin.css b/public/css/admin.css index 658de1dbc..54df3aa46 100644 --- a/public/css/admin.css +++ b/public/css/admin.css @@ -1,4 +1,4 @@ -@charset "UTF-8";@font-face{font-family:NucleoIcons;font-style:normal;font-weight:400;src:url(/fonts/nucleo-icons.eot);src:url(/fonts/nucleo-icons.eot) format("embedded-opentype"),url(/fonts/nucleo-icons.woff2) format("woff2"),url(/fonts/nucleo-icons.woff) format("woff"),url(/fonts/nucleo-icons.ttf) format("truetype"),url(/fonts/nucleo-icons.svg) format("svg")}.ni{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font:normal normal normal 14px/1 NucleoIcons;font-size:inherit;text-rendering:auto}.ni-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.ni-2x{font-size:2em}.ni-3x{font-size:3em}.ni-4x{font-size:4em}.ni-5x{font-size:5em}.ni.circle,.ni.square{background-color:#eee;padding:.33333333em;vertical-align:-16%}.ni.circle{border-radius:50%}.ni-ul{list-style-type:none;margin-left:2.14285714em;padding-left:0}.ni-ul>li{position:relative}.ni-ul>li>.ni{left:-1.57142857em;position:absolute;text-align:center;top:.14285714em}.ni-ul>li>.ni.lg{left:-1.35714286em;top:0}.ni-ul>li>.ni.circle,.ni-ul>li>.ni.square{left:-1.9047619em;top:-.19047619em}.ni.spin{animation:nc-spin 2s linear infinite}@keyframes nc-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ni.rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.ni.rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.ni.rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.ni.flip-y{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);transform:scaleX(-1)}.ni.flip-x{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:scaleY(-1)}.ni-active-40:before{content:"\ea02"}.ni-air-baloon:before{content:"\ea03"}.ni-album-2:before{content:"\ea04"}.ni-align-center:before{content:"\ea05"}.ni-align-left-2:before{content:"\ea06"}.ni-ambulance:before{content:"\ea07"}.ni-app:before{content:"\ea08"}.ni-archive-2:before{content:"\ea09"}.ni-atom:before{content:"\ea0a"}.ni-badge:before{content:"\ea0b"}.ni-bag-17:before{content:"\ea0c"}.ni-basket:before{content:"\ea0d"}.ni-bell-55:before{content:"\ea0e"}.ni-bold-down:before{content:"\ea0f"}.ni-bold-left:before{content:"\ea10"}.ni-bold-right:before{content:"\ea11"}.ni-bold-up:before{content:"\ea12"}.ni-bold:before{content:"\ea13"}.ni-book-bookmark:before{content:"\ea14"}.ni-books:before{content:"\ea15"}.ni-box-2:before{content:"\ea16"}.ni-briefcase-24:before{content:"\ea17"}.ni-building:before{content:"\ea18"}.ni-bulb-61:before{content:"\ea19"}.ni-bullet-list-67:before{content:"\ea1a"}.ni-bus-front-12:before{content:"\ea1b"}.ni-button-pause:before{content:"\ea1c"}.ni-button-play:before{content:"\ea1d"}.ni-button-power:before{content:"\ea1e"}.ni-calendar-grid-58:before{content:"\ea1f"}.ni-camera-compact:before{content:"\ea20"}.ni-caps-small:before{content:"\ea21"}.ni-cart:before{content:"\ea22"}.ni-chart-bar-32:before{content:"\ea23"}.ni-chart-pie-35:before{content:"\ea24"}.ni-chat-round:before{content:"\ea25"}.ni-check-bold:before{content:"\ea26"}.ni-circle-08:before{content:"\ea27"}.ni-cloud-download-95:before{content:"\ea28"}.ni-cloud-upload-96:before{content:"\ea29"}.ni-compass-04:before{content:"\ea2a"}.ni-controller:before{content:"\ea2b"}.ni-credit-card:before{content:"\ea2c"}.ni-curved-next:before{content:"\ea2d"}.ni-delivery-fast:before{content:"\ea2e"}.ni-diamond:before{content:"\ea2f"}.ni-email-83:before{content:"\ea30"}.ni-fat-add:before{content:"\ea31"}.ni-fat-delete:before{content:"\ea32"}.ni-fat-remove:before{content:"\ea33"}.ni-favourite-28:before{content:"\ea34"}.ni-folder-17:before{content:"\ea35"}.ni-glasses-2:before{content:"\ea36"}.ni-hat-3:before{content:"\ea37"}.ni-headphones:before{content:"\ea38"}.ni-html5:before{content:"\ea39"}.ni-istanbul:before{content:"\ea3a"}.ni-key-25:before{content:"\ea3b"}.ni-laptop:before{content:"\ea3c"}.ni-like-2:before{content:"\ea3d"}.ni-lock-circle-open:before{content:"\ea3e"}.ni-map-big:before{content:"\ea3f"}.ni-mobile-button:before{content:"\ea40"}.ni-money-coins:before{content:"\ea41"}.ni-note-03:before{content:"\ea42"}.ni-notification-70:before{content:"\ea43"}.ni-palette:before{content:"\ea44"}.ni-paper-diploma:before{content:"\ea45"}.ni-pin-3:before{content:"\ea46"}.ni-planet:before{content:"\ea47"}.ni-ruler-pencil:before{content:"\ea48"}.ni-satisfied:before{content:"\ea49"}.ni-scissors:before{content:"\ea4a"}.ni-send:before{content:"\ea4b"}.ni-settings-gear-65:before{content:"\ea4c"}.ni-settings:before{content:"\ea4d"}.ni-single-02:before{content:"\ea4e"}.ni-single-copy-04:before{content:"\ea4f"}.ni-sound-wave:before{content:"\ea50"}.ni-spaceship:before{content:"\ea51"}.ni-square-pin:before{content:"\ea52"}.ni-support-16:before{content:"\ea53"}.ni-tablet-button:before{content:"\ea54"}.ni-tag:before{content:"\ea55"}.ni-tie-bow:before{content:"\ea56"}.ni-time-alarm:before{content:"\ea57"}.ni-trophy:before{content:"\ea58"}.ni-tv-2:before{content:"\ea59"}.ni-umbrella-13:before{content:"\ea5a"}.ni-user-run:before{content:"\ea5b"}.ni-vector:before{content:"\ea5c"}.ni-watch-time:before{content:"\ea5d"}.ni-world:before{content:"\ea5e"}.ni-zoom-split-in:before{content:"\ea5f"}.ni-collection:before{content:"\ea60"}.ni-image:before{content:"\ea61"}.ni-shop:before{content:"\ea62"}.ni-ungroup:before{content:"\ea63"}.ni-world-2:before{content:"\ea64"}.ni-ui-04:before{content:"\ea65"}.icon{color:#111;display:inline-block;height:1em;width:1em}.icon use{fill:#7ea6f6}.icon.icon-outline use{stroke:#7ea6f6}.icon-xs{height:.5em;width:.5em}.icon-sm{height:.8em;width:.8em}.icon-lg{height:1.6em;width:1.6em}.icon-xl{height:2em;width:2em}.icon-text-aligner{align-items:center;display:flex}.icon-text-aligner .icon{color:inherit;margin-right:.4em}.icon-text-aligner .icon use{fill:currentColor;color:inherit}.icon-text-aligner .icon.icon-outline use{stroke:currentColor}.icon{fill:currentColor;stroke:none}.icon.icon-outline{fill:none;stroke:currentColor}.icon use{stroke:none}.icon.icon-outline use{fill:none}.icon-outline.icon-stroke-1{stroke-width:1px}.icon-outline.icon-stroke-2{stroke-width:2px}.icon-outline.icon-stroke-3{stroke-width:3px}.icon-outline.icon-stroke-4{stroke-width:4px}.icon-outline.icon-stroke-1 use,.icon-outline.icon-stroke-3 use{transform:translateX(.5px) translateY(.5px)} +@charset "UTF-8";@font-face{font-display:swap;font-family:NucleoIcons;font-style:normal;font-weight:400;src:url(/fonts/nucleo-icons.eot);src:url(/fonts/nucleo-icons.eot) format("embedded-opentype"),url(/fonts/nucleo-icons.woff2) format("woff2"),url(/fonts/nucleo-icons.woff) format("woff"),url(/fonts/nucleo-icons.ttf) format("truetype"),url(/fonts/nucleo-icons.svg) format("svg")}.ni{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font:normal normal normal 14px/1 NucleoIcons;font-size:inherit;text-rendering:auto}.ni-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.ni-2x{font-size:2em}.ni-3x{font-size:3em}.ni-4x{font-size:4em}.ni-5x{font-size:5em}.ni.circle,.ni.square{background-color:#eee;padding:.33333333em;vertical-align:-16%}.ni.circle{border-radius:50%}.ni-ul{list-style-type:none;margin-left:2.14285714em;padding-left:0}.ni-ul>li{position:relative}.ni-ul>li>.ni{left:-1.57142857em;position:absolute;text-align:center;top:.14285714em}.ni-ul>li>.ni.lg{left:-1.35714286em;top:0}.ni-ul>li>.ni.circle,.ni-ul>li>.ni.square{left:-1.9047619em;top:-.19047619em}.ni.spin{animation:nc-spin 2s linear infinite}@keyframes nc-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ni.rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);transform:rotate(90deg)}.ni.rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:rotate(180deg)}.ni.rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);transform:rotate(270deg)}.ni.flip-y{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);transform:scaleX(-1)}.ni.flip-x{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);transform:scaleY(-1)}.ni-active-40:before{content:"\ea02"}.ni-air-baloon:before{content:"\ea03"}.ni-album-2:before{content:"\ea04"}.ni-align-center:before{content:"\ea05"}.ni-align-left-2:before{content:"\ea06"}.ni-ambulance:before{content:"\ea07"}.ni-app:before{content:"\ea08"}.ni-archive-2:before{content:"\ea09"}.ni-atom:before{content:"\ea0a"}.ni-badge:before{content:"\ea0b"}.ni-bag-17:before{content:"\ea0c"}.ni-basket:before{content:"\ea0d"}.ni-bell-55:before{content:"\ea0e"}.ni-bold-down:before{content:"\ea0f"}.ni-bold-left:before{content:"\ea10"}.ni-bold-right:before{content:"\ea11"}.ni-bold-up:before{content:"\ea12"}.ni-bold:before{content:"\ea13"}.ni-book-bookmark:before{content:"\ea14"}.ni-books:before{content:"\ea15"}.ni-box-2:before{content:"\ea16"}.ni-briefcase-24:before{content:"\ea17"}.ni-building:before{content:"\ea18"}.ni-bulb-61:before{content:"\ea19"}.ni-bullet-list-67:before{content:"\ea1a"}.ni-bus-front-12:before{content:"\ea1b"}.ni-button-pause:before{content:"\ea1c"}.ni-button-play:before{content:"\ea1d"}.ni-button-power:before{content:"\ea1e"}.ni-calendar-grid-58:before{content:"\ea1f"}.ni-camera-compact:before{content:"\ea20"}.ni-caps-small:before{content:"\ea21"}.ni-cart:before{content:"\ea22"}.ni-chart-bar-32:before{content:"\ea23"}.ni-chart-pie-35:before{content:"\ea24"}.ni-chat-round:before{content:"\ea25"}.ni-check-bold:before{content:"\ea26"}.ni-circle-08:before{content:"\ea27"}.ni-cloud-download-95:before{content:"\ea28"}.ni-cloud-upload-96:before{content:"\ea29"}.ni-compass-04:before{content:"\ea2a"}.ni-controller:before{content:"\ea2b"}.ni-credit-card:before{content:"\ea2c"}.ni-curved-next:before{content:"\ea2d"}.ni-delivery-fast:before{content:"\ea2e"}.ni-diamond:before{content:"\ea2f"}.ni-email-83:before{content:"\ea30"}.ni-fat-add:before{content:"\ea31"}.ni-fat-delete:before{content:"\ea32"}.ni-fat-remove:before{content:"\ea33"}.ni-favourite-28:before{content:"\ea34"}.ni-folder-17:before{content:"\ea35"}.ni-glasses-2:before{content:"\ea36"}.ni-hat-3:before{content:"\ea37"}.ni-headphones:before{content:"\ea38"}.ni-html5:before{content:"\ea39"}.ni-istanbul:before{content:"\ea3a"}.ni-key-25:before{content:"\ea3b"}.ni-laptop:before{content:"\ea3c"}.ni-like-2:before{content:"\ea3d"}.ni-lock-circle-open:before{content:"\ea3e"}.ni-map-big:before{content:"\ea3f"}.ni-mobile-button:before{content:"\ea40"}.ni-money-coins:before{content:"\ea41"}.ni-note-03:before{content:"\ea42"}.ni-notification-70:before{content:"\ea43"}.ni-palette:before{content:"\ea44"}.ni-paper-diploma:before{content:"\ea45"}.ni-pin-3:before{content:"\ea46"}.ni-planet:before{content:"\ea47"}.ni-ruler-pencil:before{content:"\ea48"}.ni-satisfied:before{content:"\ea49"}.ni-scissors:before{content:"\ea4a"}.ni-send:before{content:"\ea4b"}.ni-settings-gear-65:before{content:"\ea4c"}.ni-settings:before{content:"\ea4d"}.ni-single-02:before{content:"\ea4e"}.ni-single-copy-04:before{content:"\ea4f"}.ni-sound-wave:before{content:"\ea50"}.ni-spaceship:before{content:"\ea51"}.ni-square-pin:before{content:"\ea52"}.ni-support-16:before{content:"\ea53"}.ni-tablet-button:before{content:"\ea54"}.ni-tag:before{content:"\ea55"}.ni-tie-bow:before{content:"\ea56"}.ni-time-alarm:before{content:"\ea57"}.ni-trophy:before{content:"\ea58"}.ni-tv-2:before{content:"\ea59"}.ni-umbrella-13:before{content:"\ea5a"}.ni-user-run:before{content:"\ea5b"}.ni-vector:before{content:"\ea5c"}.ni-watch-time:before{content:"\ea5d"}.ni-world:before{content:"\ea5e"}.ni-zoom-split-in:before{content:"\ea5f"}.ni-collection:before{content:"\ea60"}.ni-image:before{content:"\ea61"}.ni-shop:before{content:"\ea62"}.ni-ungroup:before{content:"\ea63"}.ni-world-2:before{content:"\ea64"}.ni-ui-04:before{content:"\ea65"}.icon{color:#111;display:inline-block;height:1em;width:1em}.icon use{fill:#7ea6f6}.icon.icon-outline use{stroke:#7ea6f6}.icon-xs{height:.5em;width:.5em}.icon-sm{height:.8em;width:.8em}.icon-lg{height:1.6em;width:1.6em}.icon-xl{height:2em;width:2em}.icon-text-aligner{align-items:center;display:flex}.icon-text-aligner .icon{color:inherit;margin-right:.4em}.icon-text-aligner .icon use{fill:currentColor;color:inherit}.icon-text-aligner .icon.icon-outline use{stroke:currentColor}.icon{fill:currentColor;stroke:none}.icon.icon-outline{fill:none;stroke:currentColor}.icon use{stroke:none}.icon.icon-outline use{fill:none}.icon-outline.icon-stroke-1{stroke-width:1px}.icon-outline.icon-stroke-2{stroke-width:2px}.icon-outline.icon-stroke-3{stroke-width:3px}.icon-outline.icon-stroke-4{stroke-width:4px}.icon-outline.icon-stroke-1 use,.icon-outline.icon-stroke-3 use{transform:translateX(.5px) translateY(.5px)} /*! diff --git a/public/css/spa.css b/public/css/spa.css index fd4124d27..a88f8c257 100644 --- a/public/css/spa.css +++ b/public/css/spa.css @@ -1 +1 @@ -@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdzeFaxOedfTDw.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdXeFaxOedfTDw.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdLeFaxOedfTDw.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd7eFaxOedfTDw.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+1ea0-1ef9,u+20ab}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd_eFaxOedfTDw.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdHeFaxOedc.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIxsdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIVsdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIJsdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI5sdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+1ea0-1ef9,u+20ab}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI9sdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIFsdP3pBms.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}:root{--light:#fff;--dark:#000;--body-bg:#f3f4f6;--body-color:#212529;--nav-bg:#fff;--bg-light:#f8f9fa;--primary:#3b82f6;--light-gray:#f8f9fa;--text-lighter:#94a3b8;--card-bg:#fff;--light-hover-bg:#f9fafb;--btn-light-border:#fff;--input-border:#e2e8f0;--comment-bg:#eff2f5;--border-color:#dee2e6;--card-header-accent:#f9fafb;--dropdown-item-hover-bg:#e9ecef;--dropdown-item-hover-color:#16181b;--dropdown-item-color:#64748b;--dropdown-item-active-color:#334155}@media (prefers-color-scheme:dark){:root{--light:#000;--dark:#fff;--body-bg:#000;--body-color:#9ca3af;--nav-bg:#000;--bg-light:#212124;--light-gray:#212124;--text-lighter:#818181;--card-bg:#161618;--light-hover-bg:#212124;--btn-light-border:#161618;--input-border:#161618;--comment-bg:#212124;--border-color:#212124;--card-header-accent:#212124;--dropdown-item-hover-bg:#000;--dropdown-item-hover-color:#818181;--dropdown-item-color:#64748b;--dropdown-item-active-color:#fff}}.force-light-mode{--light:#fff;--dark:#000;--body-bg:#f3f4f6;--body-color:#212529;--nav-bg:#fff;--bg-light:#f8f9fa;--primary:#3b82f6;--light-gray:#f8f9fa;--text-lighter:#94a3b8;--card-bg:#fff;--light-hover-bg:#f9fafb;--btn-light-border:#fff;--input-border:#e2e8f0;--comment-bg:#eff2f5;--border-color:#dee2e6;--card-header-accent:#f9fafb;--dropdown-item-hover-bg:#e9ecef;--dropdown-item-hover-color:#16181b;--dropdown-item-color:#64748b;--dropdown-item-active-color:#334155}.force-dark-mode{--light:#000;--dark:#fff;--body-bg:#000;--body-color:#9ca3af;--nav-bg:#000;--bg-light:#212124;--light-gray:#212124;--text-lighter:#818181;--card-bg:#161618;--light-hover-bg:#212124;--btn-light-border:#161618;--input-border:#161618;--comment-bg:#212124;--border-color:#212124;--card-header-accent:#212124;--dropdown-item-hover-bg:#000;--dropdown-item-hover-color:#818181;--dropdown-item-color:#64748b;--dropdown-item-active-color:#b3b3b3}body{background:var(--body-bg);color:var(--body-color);font-family:IBM Plex Sans,sans-serif}.web-wrapper{margin-bottom:10rem}.container-fluid{max-width:1440px!important}.jumbotron,.rounded-px{border-radius:18px}.doc-body p:last-child{margin-bottom:0}.navbar-laravel{background-color:var(--nav-bg)}.sticky-top{z-index:2}.navbar-light .navbar-brand,.navbar-light .navbar-brand:hover{color:var(--dark)}.primary{color:var(--primary)}.bg-g-amin{background:#8e2de2;background:linear-gradient(270deg,#4a00e0,#8e2de2)}.text-lighter{color:var(--text-lighter)!important}.text-dark{color:var(--body-color)!important}.text-dark:hover,a.text-dark:hover{color:var(--dark)!important}.badge-primary,.btn-primary{background-color:var(--primary)}.btn-primary{color:#fff!important}.btn-outline-light{border-color:var(--light-gray)}.border{border:1px solid var(--border-color)!important}.bg-light,.bg-white{background-color:var(--bg-light)!important;border-color:var(--bg-light)!important}.btn-light{background-color:var(--light-gray)}.btn-light,.btn-light:hover{border-color:var(--btn-light-border);color:var(--body-color)}.btn-light:hover{background-color:var(--card-bg)}.autocomplete-input{border:1px solid var(--light-gray)!important;color:var(--body-color)}.autocomplete-result-list{background:var(--light)!important;z-index:2!important}.dropdown-menu,.form-control,span.twitter-typeahead .tt-menu{background-color:var(--card-bg);border:1px solid var(--border-color)!important;color:var(--body-color)}.dropdown-item,.tribute-container li,span.twitter-typeahead .tt-suggestion{color:var(--body-color)}.dropdown-item:focus,.dropdown-item:hover,span.twitter-typeahead .tt-suggestion:focus,span.twitter-typeahead .tt-suggestion:hover{background-color:var(--dropdown-item-hover-bg);color:var(--dropdown-item-hover-color);text-decoration:none}.card,.card-footer,.card-header,.form-control:focus,.list-group-item,.modal-content,.ph-item,.popover,.tribute-container ul{background-color:var(--card-bg)}.badge-light,.breadcrumb,.ph-avatar,.ph-picture,.ph-row div{background-color:var(--light-gray)}.border-bottom,.border-top,.card-header{border-color:var(--border-color)!important}.modal-footer,.modal-header{border-color:var(--border-color)}.compose-action:hover{background-color:var(--light-gray)!important}.dropdown-divider{border-color:var(--dropdown-item-hover-bg)}.metro-nav.flex-column{background-color:var(--card-bg)}.metro-nav.flex-column .nav-item .nav-link:hover{background-color:var(--light-hover-bg)}.child-reply-form .form-control{border-color:var(--input-border);color:var(--body-color)}.ui-menu .btn-group .btn:first-child{border-bottom-left-radius:50rem;border-top-left-radius:50rem}.ui-menu .btn-group .btn:last-child{border-bottom-right-radius:50rem;border-top-right-radius:50rem}.ui-menu .btn-group .btn-primary{font-weight:700}.ui-menu .b-custom-control-lg{padding-bottom:8px}.content-label-wrapper div:not(.content-label){height:100%}.content-label-text{width:80%}@media (min-width:768px){.content-label-text{width:50%}}.compose-modal-component .form-control:focus{color:var(--body-color)}.modal-body .nav-tabs .nav-item.show .nav-link,.modal-body .nav-tabs .nav-link.active{background-color:transparent;border-color:var(--border-color)}.modal-body .nav-tabs .nav-link:focus,.modal-body .nav-tabs .nav-link:hover{border-color:var(--border-color)}.modal-body .form-control:focus{color:var(--body-color)}.tribute-container{border:0}.tribute-container ul{border-color:var(--border-color);margin-top:0}.tribute-container li{border-left:0;border-right:0;border-top:0;font-size:13px;padding:.5rem 1rem}.tribute-container li:not(:last-child){border-bottom:1px solid var(--border-color)}.tribute-container li.highlight,.tribute-container li:hover{background:rgba(44,120,191,.25);color:var(--body-color);font-weight:700}.ft-std,.timeline-status-component .username{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.timeline-status-component .username{margin-bottom:-3px;word-break:break-word}@media (min-width:768px){.timeline-status-component .username{font-size:17px}} +@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdzeFaxOedfTDw.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdXeFaxOedfTDw.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdLeFaxOedfTDw.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd7eFaxOedfTDw.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+1ea0-1ef9,u+20ab}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhd_eFaxOedfTDw.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:400;src:url(/fonts/zYXgKVElMYYaJe8bpLHnCwDKhdHeFaxOedc.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIxsdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c88,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIVsdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIJsdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0370-03ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI5sdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+1ea0-1ef9,u+20ab}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AI9sdP3pBmtF8A.woff2) format("woff2");unicode-range:u+0100-024f,u+0259,u+1e??,u+2020,u+20a0-20ab,u+20ad-20cf,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-display:swap;font-family:IBM Plex Sans;font-style:normal;font-weight:600;src:url(/fonts/zYX9KVElMYYaJe8bpLHnCwDKjQ76AIFsdP3pBms.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+2000-206f,u+2074,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}:root{--light:#fff;--dark:#000;--body-bg:#f3f4f6;--body-color:#212529;--nav-bg:#fff;--bg-light:#f8f9fa;--primary:#3b82f6;--light-gray:#f8f9fa;--text-lighter:#94a3b8;--card-bg:#fff;--light-hover-bg:#f9fafb;--btn-light-border:#fff;--input-border:#e2e8f0;--comment-bg:#eff2f5;--border-color:#dee2e6;--card-header-accent:#f9fafb;--dropdown-item-hover-bg:#e9ecef;--dropdown-item-hover-color:#16181b;--dropdown-item-color:#64748b;--dropdown-item-active-color:#334155}@media (prefers-color-scheme:dark){:root{--light:#000;--dark:#fff;--body-bg:#000;--body-color:#9ca3af;--nav-bg:#000;--bg-light:#212124;--light-gray:#212124;--text-lighter:#818181;--card-bg:#161618;--light-hover-bg:#212124;--btn-light-border:#161618;--input-border:#161618;--comment-bg:#212124;--border-color:#212124;--card-header-accent:#212124;--dropdown-item-hover-bg:#000;--dropdown-item-hover-color:#818181;--dropdown-item-color:#64748b;--dropdown-item-active-color:#fff}}.force-light-mode{--light:#fff;--dark:#000;--body-bg:#f3f4f6;--body-color:#212529;--nav-bg:#fff;--bg-light:#f8f9fa;--primary:#3b82f6;--light-gray:#f8f9fa;--text-lighter:#94a3b8;--card-bg:#fff;--light-hover-bg:#f9fafb;--btn-light-border:#fff;--input-border:#e2e8f0;--comment-bg:#eff2f5;--border-color:#dee2e6;--card-header-accent:#f9fafb;--dropdown-item-hover-bg:#e9ecef;--dropdown-item-hover-color:#16181b;--dropdown-item-color:#64748b;--dropdown-item-active-color:#334155}.force-dark-mode{--light:#000;--dark:#fff;--body-bg:#000;--body-color:#9ca3af;--nav-bg:#000;--bg-light:#212124;--light-gray:#212124;--text-lighter:#818181;--card-bg:#161618;--light-hover-bg:#212124;--btn-light-border:#161618;--input-border:#161618;--comment-bg:#212124;--border-color:#212124;--card-header-accent:#212124;--dropdown-item-hover-bg:#000;--dropdown-item-hover-color:#818181;--dropdown-item-color:#64748b;--dropdown-item-active-color:#b3b3b3}body{background:var(--body-bg);color:var(--body-color);font-family:IBM Plex Sans,sans-serif}.web-wrapper{margin-bottom:10rem}.container-fluid{max-width:1440px!important}.jumbotron,.rounded-px{border-radius:18px}.doc-body p:last-child{margin-bottom:0}.navbar-laravel{background-color:var(--nav-bg)}.sticky-top{z-index:2}.navbar-light .navbar-brand,.navbar-light .navbar-brand:hover{color:var(--dark)}.primary{color:var(--primary)}.bg-g-amin{background:#8e2de2;background:linear-gradient(270deg,#4a00e0,#8e2de2)}.text-lighter{color:var(--text-lighter)!important}.text-dark{color:var(--body-color)!important}.text-dark:hover,a.text-dark:hover{color:var(--dark)!important}.badge-primary,.btn-primary{background-color:var(--primary)}.btn-primary{color:#fff!important}.btn-outline-light{border-color:var(--light-gray)}.border{border:1px solid var(--border-color)!important}.bg-light,.bg-white{background-color:var(--bg-light)!important;border-color:var(--bg-light)!important}.btn-light{background-color:var(--light-gray)}.btn-light,.btn-light:hover{border-color:var(--btn-light-border);color:var(--body-color)}.btn-light:hover{background-color:var(--card-bg)}.autocomplete-input{border:1px solid var(--light-gray)!important;color:var(--body-color)}.autocomplete-result-list{background:var(--light)!important;z-index:2!important}.dropdown-menu,.form-control,span.twitter-typeahead .tt-menu{background-color:var(--card-bg);border:1px solid var(--border-color)!important;color:var(--body-color)}.dropdown-item,.tribute-container li,span.twitter-typeahead .tt-suggestion{color:var(--body-color)}.dropdown-item:focus,.dropdown-item:hover,span.twitter-typeahead .tt-suggestion:focus,span.twitter-typeahead .tt-suggestion:hover{background-color:var(--dropdown-item-hover-bg);color:var(--dropdown-item-hover-color);text-decoration:none}.card,.card-footer,.card-header,.form-control:focus,.list-group-item,.modal-content,.ph-item,.popover,.tribute-container ul{background-color:var(--card-bg)}.badge-light,.breadcrumb,.ph-avatar,.ph-picture,.ph-row div{background-color:var(--light-gray)}.border-bottom,.border-top,.card-header{border-color:var(--border-color)!important}.modal-footer,.modal-header{border-color:var(--border-color)}.compose-action:hover{background-color:var(--light-gray)!important}.dropdown-divider{border-color:var(--dropdown-item-hover-bg)}.metro-nav.flex-column{background-color:var(--card-bg)}.metro-nav.flex-column .nav-item .nav-link:hover{background-color:var(--light-hover-bg)}.child-reply-form .form-control{border-color:var(--input-border);color:var(--body-color)}.ui-menu .btn-group .btn:first-child{border-bottom-left-radius:50rem;border-top-left-radius:50rem}.ui-menu .btn-group .btn:last-child{border-bottom-right-radius:50rem;border-top-right-radius:50rem}.ui-menu .btn-group .btn-primary{font-weight:700}.ui-menu .b-custom-control-lg{padding-bottom:8px}.content-label-wrapper div:not(.content-label){height:100%}.content-label-text{width:80%}@media (min-width:768px){.content-label-text{width:50%}}.compose-modal-component .form-control:focus{color:var(--body-color)}.modal-body .nav-tabs .nav-item.show .nav-link,.modal-body .nav-tabs .nav-link.active{background-color:transparent;border-color:var(--border-color)}.modal-body .nav-tabs .nav-link:focus,.modal-body .nav-tabs .nav-link:hover{border-color:var(--border-color)}.modal-body .form-control:focus{color:var(--body-color)}.tribute-container{border:0}.tribute-container ul{border-color:var(--border-color);margin-top:0}.tribute-container li{border-left:0;border-right:0;border-top:0;font-size:13px;padding:.5rem 1rem}.tribute-container li:not(:last-child){border-bottom:1px solid var(--border-color)}.tribute-container li.highlight,.tribute-container li:hover{background:rgba(44,120,191,.25);color:var(--body-color);font-weight:700}.ft-std{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.timestamp-overlay-badge{color:var(--dark)}.timeline-status-component .username{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;margin-bottom:-3px;word-break:break-word}@media (min-width:768px){.timeline-status-component .username{font-size:17px}} diff --git a/public/js/admin.js b/public/js/admin.js index 4c442370f..44ec37600 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -1,2 +1,2 @@ /*! For license information please see admin.js.LICENSE.txt */ -(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[9567],{95366:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});var s=a(2e4);a(87980);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(){n=function(){return e};var t,e={},a=Object.prototype,s=a.hasOwnProperty,o=Object.defineProperty||function(t,e,a){t[e]=a.value},r="function"==typeof Symbol?Symbol:{},l=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",d=r.toStringTag||"@@toStringTag";function u(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,a){return t[e]=a}}function p(t,e,a,s){var i=e&&e.prototype instanceof _?e:_,n=Object.create(i.prototype),r=new L(s||[]);return o(n,"_invoke",{value:A(t,a,r)}),n}function m(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",f="suspendedYield",h="executing",g="completed",b={};function _(){}function C(){}function y(){}var w={};u(w,l,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(M([])));k&&k!==a&&s.call(k,l)&&(w=k);var S=y.prototype=_.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function a(n,o,r,l){var c=m(t[n],t,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==i(u)&&s.call(u,"__await")?e.resolve(u.__await).then((function(t){a("next",t,r,l)}),(function(t){a("throw",t,r,l)})):e.resolve(u).then((function(t){d.value=t,r(d)}),(function(t){return a("throw",t,r,l)}))}l(c.arg)}var n;o(this,"_invoke",{value:function(t,s){function i(){return new e((function(e,i){a(t,s,e,i)}))}return n=n?n.then(i,i):i()}})}function A(e,a,s){var i=v;return function(n,o){if(i===h)throw new Error("Generator is already running");if(i===g){if("throw"===n)throw o;return{value:t,done:!0}}for(s.method=n,s.arg=o;;){var r=s.delegate;if(r){var l=I(r,s);if(l){if(l===b)continue;return l}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(i===v)throw i=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);i=h;var c=m(e,a,s);if("normal"===c.type){if(i=s.done?g:f,c.arg===b)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(i=g,s.method="throw",s.arg=c.arg)}}}function I(e,a){var s=a.method,i=e.iterator[s];if(i===t)return a.delegate=null,"throw"===s&&e.iterator.return&&(a.method="return",a.arg=t,I(e,a),"throw"===a.method)||"return"!==s&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+s+"' method")),b;var n=m(i,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,b;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,b):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function M(e){if(e||""===e){var a=e[l];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function a(){for(;++n=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),P(a),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var s=a.completion;if("throw"===s.type){var i=s.arg;P(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,s){return this.delegate={iterator:M(e),resultName:a,nextLoc:s},"next"===this.method&&(this.arg=t),b}},e}function o(t,e,a,s,i,n,o){try{var r=t[n](o),l=r.value}catch(t){return void a(t)}r.done?e(l):Promise.resolve(l).then(s,i)}const r={components:{Autocomplete:s.default},data:function(){return{loaded:!1,tabIndex:0,config:{autospam_enabled:null,open:0,closed:0},closedReports:[],closedReportsFetched:!1,closedReportsCursor:null,closedReportsCanLoadMore:!1,showSpamReportModal:!1,showSpamReportModalLoading:!0,viewingSpamReport:void 0,viewingSpamReportLoading:!1,showNonSpamModal:!1,nonSpamAccounts:[],searchLoading:!1,customTokens:[],customTokensFetched:!1,customTokensCanLoadMore:!1,showCreateTokenModal:!1,customTokenForm:{token:void 0,weight:1,category:"spam",note:void 0,active:!0},showEditTokenModal:!1,editCustomToken:{},editCustomTokenForm:{token:void 0,weight:1,category:"spam",note:void 0,active:!0}}},mounted:function(){var t=this;setTimeout((function(){t.loaded=!0,t.fetchConfig()}),1e3)},methods:{toggleTab:function(t){var e=this;this.tabIndex=t,0==t&&setTimeout((function(){e.initChart()}),500),"closed_reports"!==t||this.closedReportsFetched||this.fetchClosedReports(),"manage_tokens"!==t||this.customTokensFetched||this.fetchCustomTokens()},formatCount:function(t){return App.util.format.count(t)},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},fetchConfig:function(){var t=this;axios.post("/i/admin/api/autospam/config").then((function(e){t.config=e.data,t.loaded=!0})).finally((function(){setTimeout((function(){t.initChart()}),100)}))},initChart:function(){new Chart(document.querySelector("#c1-dark"),{type:"line",options:{scales:{yAxes:[{gridLines:{lineWidth:1,color:"#212529",zeroLineColor:"#212529"}}]}},data:{datasets:[{data:this.config.graph}],labels:this.config.graphLabels}})},fetchClosedReports:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/autospam/reports/closed";axios.post(e).then((function(e){t.closedReports=e.data})).finally((function(){t.closedReportsFetched=!0}))},viewSpamReport:function(t){this.viewingSpamReportLoading=!1,this.viewingSpamReport=t,this.showSpamReportModal=!0,setTimeout((function(){pixelfed.readmore()}),500)},autospamPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.closedReports.links.next:this.closedReports.links.prev;this.fetchClosedReports(e)},autospamTrainSpam:function(){event.currentTarget.blur(),axios.post("/i/admin/api/autospam/train").then((function(t){swal("Training Autospam!","A background job has been dispatched to train Autospam!","success"),setTimeout((function(){window.location.reload()}),1e4)})).catch((function(t){422===t.response.status?swal("Error",t.response.data.error,"error"):swal("Error","Oops, an error occured, please try again later","error")}))},autospamTrainNonSpam:function(){this.showNonSpamModal=!0},composeSearch:function(t){var e=this;return t.length<1?[]:axios.post("/i/admin/api/autospam/search/non-spam",{q:t}).then((function(t){return t.data.filter((function(t){return!e.nonSpamAccounts||!e.nonSpamAccounts.length||e.nonSpamAccounts&&-1==e.nonSpamAccounts.map((function(t){return t.id})).indexOf(t.id)}))}))},getTagResultValue:function(t){return t.username},onSearchResultClick:function(t){-1==this.nonSpamAccounts.map((function(t){return t.id})).indexOf(t.id)&&this.nonSpamAccounts.push(t)},autospamTrainNonSpamRemove:function(t){this.nonSpamAccounts.splice(t,1)},autospamTrainNonSpamSubmit:function(){this.showNonSpamModal=!1,axios.post("/i/admin/api/autospam/train/non-spam",{accounts:this.nonSpamAccounts}).then((function(t){swal("Training Autospam!","A background job has been dispatched to train Autospam!","success"),setTimeout((function(){window.location.reload()}),1e4)})).catch((function(t){422===t.response.status?swal("Error",t.response.data.error,"error"):swal("Error","Oops, an error occured, please try again later","error")}))},fetchCustomTokens:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/autospam/tokens/custom";axios.post(e).then((function(e){t.customTokens=e.data})).finally((function(){t.customTokensFetched=!0}))},handleSaveToken:function(){var t=this;axios.post("/i/admin/api/autospam/tokens/store",this.customTokenForm).then((function(t){console.log(t.data)})).catch((function(t){swal("Oops! An Error Occured",t.response.data.message,"error")})).finally((function(){t.customTokenForm={token:void 0,weight:1,category:"spam",note:void 0,active:!0},t.fetchCustomTokens()}))},openEditTokenModal:function(t){event.currentTarget.blur(),this.editCustomToken=t,this.editCustomTokenForm=t,this.showEditTokenModal=!0},handleUpdateToken:function(){axios.post("/i/admin/api/autospam/tokens/update",this.editCustomTokenForm).then((function(t){console.log(t.data)}))},autospamTokenPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.customTokens.next_page_url:this.customTokens.prev_page_url;this.fetchCustomTokens(e)},downloadExport:function(){event.currentTarget.blur(),axios.post("/i/admin/api/autospam/tokens/export",{},{responseType:"blob"}).then((function(t){var e=document.createElement("a");e.setAttribute("download","pixelfed-autospam-export.json");var a=URL.createObjectURL(t.data);e.href=a,e.setAttribute("target","_blank"),e.click(),URL.revokeObjectURL(a)})).catch(function(){var t,e=(t=n().mark((function t(e){var a;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=e.response.data,!("blob"===e.request.responseType&&e.response.data instanceof Blob&&e.response.data.type&&-1!=e.response.data.type.toLowerCase().indexOf("json"))){t.next=8;break}return t.t0=JSON,t.next=5,e.response.data.text();case 5:t.t1=t.sent,a=t.t0.parse.call(t.t0,t.t1),swal("Export Error",a.error,"error");case 8:case 9:case"end":return t.stop()}}),t)})),function(){var e=this,a=arguments;return new Promise((function(s,i){var n=t.apply(e,a);function r(t){o(n,s,i,r,l,"next",t)}function l(t){o(n,s,i,r,l,"throw",t)}r(void 0)}))});return function(t){return e.apply(this,arguments)}}())},enableAdvanced:function(){event.currentTarget.blur(),!this.config.files.spam.exists||!this.config.files.ham.exists||!this.config.files.combined.exists||this.config.files.spam.size<1e3||this.config.files.ham.size<1e3||this.config.files.combined.size<1e3?swal("Training Required",'Before you can enable Advanced Detection, you need to train the models.\n\n Click on the "Train Autospam" tab and train both categories before proceeding',"error"):swal({title:"Confirm",text:"Are you sure you want to enable Advanced Detection?",icon:"warning",dangerMode:!0,buttons:{cancel:"Cancel",confirm:{text:"Enable",value:"enable"}}}).then((function(t){"enable"===t&&axios.post("/i/admin/api/autospam/config/enable").then((function(t){swal("Success! Advanced Detection is now enabled!\n\n This page will reload in a few seconds!",{icon:"success"}),setTimeout((function(){window.location.reload()}),5e3)})).catch((function(t){swal("Oops!","An error occured, please try again later","error")}))}))},disableAdvanced:function(){event.currentTarget.blur(),swal({title:"Confirm",text:"Are you sure you want to disable Advanced Detection?",icon:"warning",dangerMode:!0,buttons:{cancel:"Cancel",confirm:{text:"Disable",value:"disable"}}}).then((function(t){"disable"===t&&axios.post("/i/admin/api/autospam/config/disable").then((function(t){swal("Success! Advanced Detection is now disabled!\n\n This page will reload in a few seconds!",{icon:"success"}),setTimeout((function(){window.location.reload()}),5e3)})).catch((function(t){swal("Oops!","An error occured, please try again later","error")}))}))},handleImport:function(){event.currentTarget.blur(),swal("Error","You do not have enough data to support importing.","error")}}}},71847:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>i});var s=a(74692);const i={data:function(){return{loaded:!1,initialData:{},tabIndex:1,tabs:[{id:1,title:"Overview",icon:"far fa-home"},{id:3,title:"Server Details",icon:"far fa-info-circle"},{id:4,title:"Admin Contact",icon:"far fa-user-crown"},{id:5,title:"Favourite Posts",icon:"far fa-heart"},{id:6,title:"Privacy Pledge",icon:"far fa-eye-slash"},{id:7,title:"Community Guidelines",icon:"far fa-smile-beam"},{id:8,title:"Feature Requirements",icon:"far fa-bolt"},{id:9,title:"User Testimonials",icon:"far fa-comment-smile"}],form:{summary:"",location:0,contact_account:0,contact_email:"",privacy_pledge:void 0,banner_image:void 0,locale:0},requirements:{activitypub_enabled:void 0,open_registration:void 0,oauth_enabled:void 0,curated_onboarding:void 0},feature_config:[],requirements_validator:[],popularPostsLoaded:!1,popularPosts:[],selectedPopularPosts:[],selectedPosts:[],favouritePostByIdInput:"",favouritePostByIdFetching:!1,communityGuidelines:[],isUploadingBanner:!1,state:{is_eligible:!1,submission_exists:!1,awaiting_approval:!1,is_active:!1,submission_timestamp:void 0},isSubmitting:!1,testimonial:{username:void 0,body:void 0},testimonials:[],isEditingTestimonial:!1,editingTestimonial:void 0}},mounted:function(){this.fetchInitialData()},methods:{toggleTab:function(t){this.tabIndex=t},fetchInitialData:function(){var t=this;axios.get("/i/admin/api/directory/initial-data").then((function(e){t.initialData=e.data,e.data.activitypub_enabled&&(t.requirements.activitypub_enabled=e.data.activitypub_enabled),e.data.open_registration&&(t.requirements.open_registration=e.data.open_registration),e.data.curated_onboarding&&(t.requirements.curated_onboarding=e.data.curated_onboarding),e.data.oauth_enabled&&(t.requirements.oauth_enabled=e.data.oauth_enabled),e.data.summary&&(t.form.summary=e.data.summary),e.data.location&&(t.form.location=e.data.location),e.data.favourite_posts&&(t.selectedPosts=e.data.favourite_posts),e.data.admin&&(t.form.contact_account=e.data.admin),e.data.contact_email&&(t.form.contact_email=e.data.contact_email),e.data.community_guidelines&&(t.communityGuidelines=e.data.community_guidelines),e.data.privacy_pledge&&(t.form.privacy_pledge=e.data.privacy_pledge),e.data.feature_config&&(t.feature_config=e.data.feature_config),e.data.requirements_validator&&(t.requirements_validator=e.data.requirements_validator),e.data.banner_image&&(t.form.banner_image=e.data.banner_image),e.data.primary_locale&&(t.form.primary_locale=e.data.primary_locale),e.data.is_eligible&&(t.state.is_eligible=e.data.is_eligible),e.data.testimonials&&(t.testimonials=e.data.testimonials),e.data.submission_state&&(t.state.is_active=e.data.submission_state.active_submission,t.state.submission_exists=e.data.submission_state.pending_submission,t.state.awaiting_approval=e.data.submission_state.pending_submission)})).then((function(){t.loaded=!0}))},initPopularPosts:function(){var t=this;this.popularPostsLoaded||axios.get("/i/admin/api/directory/popular-posts").then((function(e){t.popularPosts=e.data.filter((function(e){return!t.selectedPosts.map((function(t){return t.id})).includes(e.id)}))})).then((function(){t.popularPostsLoaded=!0}))},formatCount:function(t){return window.App.util.format.count(t)},formatDateTime:function(t){var e=new Date(t);return new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"short"}).format(e)},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("en-US",{month:"short",year:"numeric"}).format(e)},formatTimestamp:function(t){return window.App.util.format.timeAgo(t)},togglePopularPost:function(t,e){if(this.selectedPosts.length)if(this.selectedPosts.map((function(t){return t.id})).includes(t))this.selectedPosts=this.selectedPosts.filter((function(e){return e.id!=t}));else{if(this.selectedPosts.length>=12)return swal("Oops!","You can only select 12 popular posts","error"),void(event.currentTarget.checked=!1);this.selectedPosts.push(e)}else this.selectedPosts.push(e)},toggleSelectedPost:function(t){this.selectedPosts=this.selectedPosts.filter((function(e){return e.id!==t.id}))},handlePostByIdSearch:function(){var t=this;event.currentTarget.blur(),this.selectedPosts.length>=12?swal("Oops","You can only select 12 posts","error"):(this.favouritePostByIdFetching=!0,axios.post("/i/admin/api/directory/add-by-id",{q:this.favouritePostByIdInput}).then((function(e){t.selectedPosts.map((function(t){return t.id})).includes(e.data.id)?swal("Oops!","You already selected this post!","error"):(t.selectedPosts.push(e.data),t.favouritePostByIdInput="",t.popularPosts=t.popularPosts.filter((function(t){return t.id!=e.data.id})))})).then((function(){t.favouritePostByIdFetching=!1,s("#favposts-1-tab").tab("show")})).catch((function(e){swal("Invalid Post","The post id you added is not valid","error"),t.favouritePostByIdFetching=!1})))},save:function(){axios.post("/i/admin/api/directory/save",{location:this.form.location,summary:this.form.summary,admin_uid:this.form.contact_account,contact_email:this.form.contact_email,favourite_posts:this.selectedPosts.map((function(t){return t.id})),privacy_pledge:this.form.privacy_pledge}).then((function(t){swal("Success!","Successfully saved directory settings","success")})).catch((function(t){swal("Oops!",t.response.data.message,"error")}))},uploadBannerImage:function(){var t=this;if(this.isUploadingBanner=!0,window.confirm("Are you sure you want to update your server banner image?")){var e=new FormData;e.append("banner_image",this.$refs.bannerImageRef.files[0]),axios.post("/i/admin/api/directory/save",e,{headers:{"Content-Type":"multipart/form-data"}}).then((function(e){t.form.banner_image=e.data.banner_image,t.isUploadingBanner=!1})).catch((function(e){swal("Error",e.response.data.message,"error"),t.isUploadingBanner=!1}))}else this.isUploadingBanner=!1},deleteBannerImage:function(){var t=this;window.confirm("Are you sure you want to delete your server banner image?")&&axios.delete("/i/admin/api/directory/banner-image").then((function(e){t.form.banner_image=e.data})).catch((function(t){console.log(t)}))},handleSubmit:function(){var t=this;window.confirm("Are you sure you want to submit your server?")&&(this.isSubmitting=!0,axios.post("/i/admin/api/directory/submit").then((function(e){setTimeout((function(){t.isSubmitting=!1,t.state.is_active=!0,console.log(e.data)}),3e3)})).catch((function(t){swal("Error",t.response.data.message,"error")})))},deleteTestimonial:function(t){var e=this;window.confirm("Are you sure you want to delete the testimonial by "+t.profile.username+"?")&&axios.post("/i/admin/api/directory/testimonial/delete",{profile_id:t.profile.id}).then((function(a){e.testimonials=e.testimonials.filter((function(e){return e.profile.id!=t.profile.id}))}))},editTestimonial:function(t){this.isEditingTestimonial=!0,this.editingTestimonial=t},saveTestimonial:function(){var t,e=this;null===(t=event.currentTarget)||void 0===t||t.blur(),axios.post("/i/admin/api/directory/testimonial/save",{username:this.testimonial.username,body:this.testimonial.body}).then((function(t){e.testimonials.push(t.data),e.testimonial={username:void 0,body:void 0}})).catch((function(t){var e=t.response.data.hasOwnProperty("error")?t.response.data.error:t.response.data.message;swal("Oops!",e,"error")}))},cancelEditTestimonial:function(){var t;null===(t=event.currentTarget)||void 0===t||t.blur(),this.isEditingTestimonial=!1,this.editingTestimonial={}},saveEditTestimonial:function(){var t,e=this;null===(t=event.currentTarget)||void 0===t||t.blur(),axios.post("/i/admin/api/directory/testimonial/update",{profile_id:this.editingTestimonial.profile.id,body:this.editingTestimonial.body}).then((function(t){e.isEditingTestimonial=!1,e.editingTestimonial={}}))}},watch:{selectedPosts:function(t){var e=t.map((function(t){return t.id}));this.popularPosts=this.popularPosts.filter((function(t){return!e.includes(t.id)}))}}}},44107:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>i});var s=a(2e4);a(87980);const i={components:{Autocomplete:s.default},data:function(){return{loaded:!1,tabIndex:0,stats:{total_unique:0,total_posts:0,added_14_days:0,total_banned:0,total_nsfw:0},hashtags:[],pagination:[],sortCol:void 0,sortDir:void 0,trendingTags:[],bannedTags:[],showEditModal:!1,editingHashtag:void 0,editSaved:!1,editSavedTimeout:void 0,searchLoading:!1}},mounted:function(){var t=this;this.fetchStats(),this.fetchHashtags(),this.$root.$on("bv::modal::hidden",(function(e,a){t.editSaved=!1,clearTimeout(t.editSavedTimeout),t.editingHashtag=void 0}))},watch:{editingHashtag:{deep:!0,immediate:!0,handler:function(t,e){null!=t&&null!=e&&this.storeHashtagEdit(t)}}},methods:{fetchStats:function(){var t=this;axios.get("/i/admin/api/hashtags/stats").then((function(e){t.stats=e.data}))},fetchHashtags:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/hashtags/query";axios.get(e).then((function(e){t.hashtags=e.data.data,t.pagination={next:e.data.links.next,prev:e.data.links.prev},t.loaded=!0}))},prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):t},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},boolIcon:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text-muted";return t?''):'')},paginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev;this.fetchHashtags(e)},toggleCol:function(t){this.sortCol=t,this.sortDir?this.sortDir="asc"==this.sortDir?"desc":"asc":this.sortDir="desc";var e="/i/admin/api/hashtags/query?sort="+t+"&dir="+this.sortDir;this.fetchHashtags(e)},buildColumn:function(t,e){var a='';return e==this.sortCol&&(a="desc"==this.sortDir?'':''),"".concat(t," ").concat(a)},toggleTab:function(t){var e=this;if(this.loaded=!1,this.tabIndex=t,0===t)this.fetchHashtags();else if(1===t)axios.get("/api/v1.1/discover/posts/hashtags").then((function(t){e.trendingTags=t.data,e.loaded=!0}));else if(2===t){this.fetchHashtags("/i/admin/api/hashtags/query?action=banned")}else if(3===t){this.fetchHashtags("/i/admin/api/hashtags/query?action=nsfw")}},openEditHashtagModal:function(t){var e=this;this.editSaved=!1,clearTimeout(this.editSavedTimeout),this.$nextTick((function(){axios.get("/i/admin/api/hashtags/get",{params:{id:t.id}}).then((function(t){e.editingHashtag=t.data.data,e.showEditModal=!0}))}))},storeHashtagEdit:function(t,e){var a=this;this.editSaved=!1,t.is_banned&&(t.can_trend||t.can_search)&&swal("Banned Hashtag Limits","Banned hashtags cannot trend or be searchable, to allow those you need to unban the hashtag","error"),axios.post("/i/admin/api/hashtags/update",t).then((function(e){a.editSaved=!0,1!==a.tabIndex&&(a.hashtags=a.hashtags.map((function(a){return a.id==t.id&&(a=e.data.data),a}))),a.editSavedTimeout=setTimeout((function(){a.editSaved=!1}),5e3)})).catch((function(t){swal("Oops!","An error occured, please try again.","error"),console.log(t)}))},composeSearch:function(t){return t.length<1?[]:axios.get("/i/admin/api/hashtags/query",{params:{q:t,sort:"cached_count",dir:"desc"}}).then((function(t){return t.data.data}))},getTagResultValue:function(t){return t.name},onSearchResultClick:function(t){this.openEditHashtagModal(t)},clearTrendingCache:function(){event.currentTarget.blur(),window.confirm("Are you sure you want to clear the trending hashtags cache?")&&axios.post("/i/admin/api/hashtags/clear-trending-cache").then((function(t){swal("Cache Cleared!","Successfully cleared the trending hashtag cache!","success")}))}}}},56310:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>u});var s=a(2e4);a(87980);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(){n=function(){return e};var t,e={},a=Object.prototype,s=a.hasOwnProperty,o=Object.defineProperty||function(t,e,a){t[e]=a.value},r="function"==typeof Symbol?Symbol:{},l=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",d=r.toStringTag||"@@toStringTag";function u(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,a){return t[e]=a}}function p(t,e,a,s){var i=e&&e.prototype instanceof _?e:_,n=Object.create(i.prototype),r=new L(s||[]);return o(n,"_invoke",{value:A(t,a,r)}),n}function m(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var v="suspendedStart",f="suspendedYield",h="executing",g="completed",b={};function _(){}function C(){}function y(){}var w={};u(w,l,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(M([])));k&&k!==a&&s.call(k,l)&&(w=k);var S=y.prototype=_.prototype=Object.create(w);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function a(n,o,r,l){var c=m(t[n],t,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==i(u)&&s.call(u,"__await")?e.resolve(u.__await).then((function(t){a("next",t,r,l)}),(function(t){a("throw",t,r,l)})):e.resolve(u).then((function(t){d.value=t,r(d)}),(function(t){return a("throw",t,r,l)}))}l(c.arg)}var n;o(this,"_invoke",{value:function(t,s){function i(){return new e((function(e,i){a(t,s,e,i)}))}return n=n?n.then(i,i):i()}})}function A(e,a,s){var i=v;return function(n,o){if(i===h)throw new Error("Generator is already running");if(i===g){if("throw"===n)throw o;return{value:t,done:!0}}for(s.method=n,s.arg=o;;){var r=s.delegate;if(r){var l=I(r,s);if(l){if(l===b)continue;return l}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(i===v)throw i=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);i=h;var c=m(e,a,s);if("normal"===c.type){if(i=s.done?g:f,c.arg===b)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(i=g,s.method="throw",s.arg=c.arg)}}}function I(e,a){var s=a.method,i=e.iterator[s];if(i===t)return a.delegate=null,"throw"===s&&e.iterator.return&&(a.method="return",a.arg=t,I(e,a),"throw"===a.method)||"return"!==s&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+s+"' method")),b;var n=m(i,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,b;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,b):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function M(e){if(e||""===e){var a=e[l];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function a(){for(;++n=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),P(a),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var s=a.completion;if("throw"===s.type){var i=s.arg;P(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,s){return this.delegate={iterator:M(e),resultName:a,nextLoc:s},"next"===this.method&&(this.arg=t),b}},e}function o(t,e,a,s,i,n,o){try{var r=t[n](o),l=r.value}catch(t){return void a(t)}r.done?e(l):Promise.resolve(l).then(s,i)}function r(t){return function(){var e=this,a=arguments;return new Promise((function(s,i){var n=t.apply(e,a);function r(t){o(n,s,i,r,l,"next",t)}function l(t){o(n,s,i,r,l,"throw",t)}r(void 0)}))}}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/instances/get";axios.get(e).then((function(e){t.instances=e.data.data,t.pagination=c(c({},e.data.links),e.data.meta)})).then((function(){t.$nextTick((function(){t.loaded=!0}))}))},toggleTab:function(t){this.loaded=!1,this.tabIndex=t,this.searchQuery=void 0;var e="/i/admin/api/instances/get?filter="+this.filterMap[t];history.pushState(null,"","/i/admin/instances?filter="+this.filterMap[t]),this.fetchInstances(e)},prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):0},formatCount:function(t){return t?t.toLocaleString("en-CA"):0},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},boolIcon:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text-muted";return t?''):'')},toggleCol:function(t){if(this.filterMap[this.tabIndex]!=t&&!this.searchQuery){this.sortCol=t,this.sortDir?this.sortDir="asc"==this.sortDir?"desc":"asc":this.sortDir="desc";var e=new URL(window.location.origin+"/i/admin/instances");e.searchParams.set("sort",t),e.searchParams.set("dir",this.sortDir),0!=this.tabIndex&&e.searchParams.set("filter",this.filterMap[this.tabIndex]),history.pushState(null,"",e);var a=new URL(window.location.origin+"/i/admin/api/instances/get");a.searchParams.set("sort",t),a.searchParams.set("dir",this.sortDir),0!=this.tabIndex&&a.searchParams.set("filter",this.filterMap[this.tabIndex]),this.fetchInstances(a.toString())}},buildColumn:function(t,e){if(-1!=[1,5,6].indexOf(this.tabIndex)||this.searchQuery&&this.searchQuery.length)return t;if(2===this.tabIndex&&"banned"===e)return t;if(3===this.tabIndex&&"auto_cw"===e)return t;if(4===this.tabIndex&&"unlisted"===e)return t;var a='';return e==this.sortCol&&(a="desc"==this.sortDir?'':''),"".concat(t," ").concat(a)},paginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev,a="next"==t?this.pagination.next_cursor:this.pagination.prev_cursor,s=new URL(window.location.origin+"/i/admin/instances");a&&s.searchParams.set("cursor",a),this.searchQuery&&s.searchParams.set("q",this.searchQuery),this.sortCol&&s.searchParams.set("sort",this.sortCol),this.sortDir&&s.searchParams.set("dir",this.sortDir),history.pushState(null,"",s.toString()),this.fetchInstances(e)},composeSearch:function(t){var e=this;return t.length<1?[]:(this.searchQuery=t,history.pushState(null,"","/i/admin/instances?q="+t),axios.get("/i/admin/api/instances/query",{params:{q:t}}).then((function(t){return t&&t.data?(e.tabIndex=-1,e.instances=t.data.data,e.pagination=c(c({},t.data.links),t.data.meta)):e.fetchInstances(),t.data.data})))},getTagResultValue:function(t){return t.name},onSearchResultClick:function(t){this.openInstanceModal(t.id)},openInstanceModal:function(t){var e=this,a=this.instances.filter((function(e){return e.id===t}))[0];this.refreshedModalStats=!1,this.editingInstanceChanges=!1,this.instanceModalNotes=!1,this.canEditInstance=!1,this.instanceModal=a,this.$nextTick((function(){e.editingInstance=a,e.showInstanceModal=!0,e.canEditInstance=!0}))},showModalNotes:function(){this.instanceModalNotes=!0},saveInstanceModalChanges:function(){var t=this;axios.post("/i/admin/api/instances/update",this.editingInstance).then((function(e){t.showInstanceModal=!1,t.$bvToast.toast("Successfully updated ".concat(e.data.data.domain),{title:"Instance Updated",autoHideDelay:5e3,appendToast:!0,variant:"success"})}))},saveNewInstance:function(){var t=this;axios.post("/i/admin/api/instances/create",this.addNewInstance).then((function(e){t.showInstanceModal=!1,t.instances.unshift(e.data.data)})).catch((function(e){swal("Oops!","An error occured, please try again later.","error"),t.addNewInstance={domain:"",banned:!1,auto_cw:!1,unlisted:!1,notes:void 0}}))},refreshModalStats:function(){var t=this;axios.post("/i/admin/api/instances/refresh-stats",{id:this.instanceModal.id}).then((function(e){t.refreshedModalStats=!0,t.instanceModal=e.data.data,t.editingInstance=e.data.data,t.instances=t.instances.map((function(t){return t.id===e.data.data.id?e.data.data:t}))}))},deleteInstanceModal:function(){var t=this;window.confirm("Are you sure you want to delete this instance? This will not delete posts or profiles from this instance.")&&axios.post("/i/admin/api/instances/delete",{id:this.instanceModal.id}).then((function(e){t.showInstanceModal=!1,t.instances=t.instances.filter((function(e){return e.id!=t.instanceModal.id}))})).then((function(){setTimeout((function(){return t.fetchStats()}),1e3)}))},openImportForm:function(){var t=document.createElement("p");t.classList.add("text-left"),t.classList.add("mb-0"),t.innerHTML='

Import your instance moderation backup.


Import Instructions:

  1. Press OK
  2. Press "Choose File" on Import form input
  3. Select your pixelfed-instances-mod.json file
  4. Review instance moderation actions. Tap on an instance to remove it
  5. Press "Import" button to finish importing
';var e=document.createElement("div");e.appendChild(t),swal({title:"Import Backup",content:e,icon:"info"}),this.showImportForm=!0},downloadBackup:function(t){axios.get("/i/admin/api/instances/download-backup",{responseType:"blob"}).then((function(t){var e=document.createElement("a");e.setAttribute("download","pixelfed-instances-mod.json");var a=URL.createObjectURL(t.data);e.href=a,e.setAttribute("target","_blank"),e.click(),swal("Instance Backup Downloading","Your instance moderation backup is downloading. Use this to import auto_cw, banned and unlisted instances to supported Pixelfed instances.","success")}))},onImportUpload:function(t){var e=this;return r(n().mark((function a(){var s;return n().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e.getParsedImport(t.target.files[0]);case 2:if((s=a.sent).hasOwnProperty("version")&&1===s.version){a.next=8;break}return swal("Invalid Backup","We cannot validate this backup. Please try again later.","error"),e.showImportForm=!1,e.$refs.importInput.reset(),a.abrupt("return");case 8:e.importData=s,e.showImportModal=!0;case 10:case"end":return a.stop()}}),a)})))()},getParsedImport:function(t){var e=this;return r(n().mark((function a(){var s,i;return n().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e.parseJsonFile(t);case 3:return a.abrupt("return",a.sent);case 6:return a.prev=6,a.t0=a.catch(0),(s=document.createElement("p")).classList.add("text-left"),s.classList.add("mb-0"),s.innerHTML='

An error occured when attempting to parse the import file. Please try again later.


Error message:

'+a.t0.message+"
",(i=document.createElement("div")).appendChild(s),swal({title:"Import Error",content:i,icon:"error"}),a.abrupt("return");case 16:case"end":return a.stop()}}),a,null,[[0,6]])})))()},promisedParseJSON:function(t){return r(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,a){try{e(JSON.parse(t))}catch(t){a(t)}})));case 1:case"end":return e.stop()}}),e)})))()},parseJsonFile:function(t){var e=this;return r(n().mark((function a(){return n().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",new Promise((function(a,s){var i=new FileReader;i.onload=function(t){return a(e.promisedParseJSON(t.target.result))},i.onerror=function(t){return s(t)},i.readAsText(t)})));case 1:case"end":return a.stop()}}),a)})))()},filterImportData:function(t,e){switch(t){case"auto_cw":this.importData.auto_cw.splice(e,1);break;case"unlisted":this.importData.unlisted.splice(e,1);break;case"banned":this.importData.banned.splice(e,1)}},completeImport:function(){var t=this;this.showImportForm=!1,axios.post("/i/admin/api/instances/import-data",{banned:this.importData.banned,auto_cw:this.importData.auto_cw,unlisted:this.importData.unlisted}).then((function(t){swal("Import Uploaded","Import successfully uploaded, please allow a few minutes to process.","success")})).then((function(){setTimeout((function(){return t.fetchStats()}),1e3)}))},cancelImport:function(t){if(this.importData.banned.length||this.importData.auto_cw.length||this.importData.unlisted.length){if(!window.confirm("Are you sure you want to cancel importing?"))return void t.preventDefault();this.showImportForm=!1,this.$refs.importInput.value="",this.importData={banned:[],auto_cw:[],unlisted:[]}}},onViewMoreInstance:function(){this.showInstanceModal=!1,window.location.href="/i/admin/instances/show/"+this.instanceModal.id}}}},51839:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(98385),i=a(74692);const n={components:{"admin-report-modal":s.default},data:function(){return{loaded:!1,stats:{total:0,open:0,closed:0,autospam:0,autospam_open:0,remote_open:0},tabIndex:0,reports:[],pagination:{},showReportModal:!1,viewingReport:void 0,viewingReportLoading:!1,autospam:[],autospamPagination:{},autospamLoaded:!1,showSpamReportModal:!1,viewingSpamReport:void 0,viewingSpamReportLoading:!1,remoteReportsLoaded:!1,showRemoteReportModal:void 0,remoteReportModalModel:{}}},mounted:function(){var t=new URLSearchParams(window.location.search);t.has("tab")&&t.has("id")&&"autospam"===t.get("tab")?(this.fetchStats(null,"/i/admin/api/reports/spam/all"),this.fetchSpamReport(t.get("id"))):t.has("tab")&&t.has("id")&&"report"===t.get("tab")?(this.fetchStats(),this.fetchReport(t.get("id"))):(window.history.pushState(null,null,"/i/admin/reports"),this.fetchStats()),this.$root.$on("bv::modal::hide",(function(t,e){window.history.pushState(null,null,"/i/admin/reports")}))},methods:{toggleTab:function(t){switch(t){case 0:this.fetchStats("/i/admin/api/reports/all");break;case 1:this.fetchStats("/i/admin/api/reports/all?filter=closed");break;case 2:this.fetchStats(null,"/i/admin/api/reports/spam/all");break;case 3:this.fetchRemoteReports()}window.history.pushState(null,null,"/i/admin/reports"),this.tabIndex=t},prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):t},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("default",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}).format(e)},reportLabel:function(t){switch(t.object_type){case"App\\Profile":return"".concat(t.type," Profile");case"App\\Status":return"".concat(t.type," Post");case"App\\Story":return"".concat(t.type," Story")}},fetchStats:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/all",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;axios.get("/i/admin/api/reports/stats").then((function(e){t.stats=e.data})).finally((function(){e?t.fetchReports(e):a&&t.fetchAutospam(a),i('[data-toggle="tooltip"]').tooltip()}))},fetchReports:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/all";axios.get(e).then((function(e){t.reports=e.data.data,t.pagination={next:e.data.links.next,prev:e.data.links.prev}})).finally((function(){t.loaded=!0}))},fetchRemoteReports:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/remote";axios.get(e).then((function(e){t.reports=e.data.data,t.pagination={next:e.data.links.next,prev:e.data.links.prev}})).finally((function(){t.loaded=!0,t.remoteReportsLoaded=!0}))},remoteReportPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev;this.fetchRemoteReports(e)},handleCloseRemoteReportModal:function(){this.showRemoteReportModal=!1},showRemoteReport:function(t){this.remoteReportModalModel=t,this.showRemoteReportModal=!0},refreshRemoteReports:function(){var t=this;this.fetchStats(""),this.$nextTick((function(){t.toggleTab(3)}))},paginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev;this.fetchReports(e)},viewReport:function(t){this.viewingReportLoading=!1,this.viewingReport=t,this.showReportModal=!0,window.history.pushState(null,null,"/i/admin/reports?tab=report&id="+t.id),setTimeout((function(){pixelfed.readmore()}),1e3)},handleAction:function(t,e){var a=this;event.currentTarget.blur(),this.viewingReportLoading=!0,"ignore"===e||window.confirm(this.getActionLabel(t,e))?(this.loaded=!1,axios.post("/i/admin/api/reports/handle",{id:this.viewingReport.id,object_id:this.viewingReport.object_id,object_type:this.viewingReport.object_type,action:e,action_type:t}).catch((function(t){swal("Error",t.response.data.error,"error")})).finally((function(){a.viewingReportLoading=!0,a.viewingReport=!1,a.showReportModal=!1,setTimeout((function(){a.fetchStats()}),1e3)}))):this.viewingReportLoading=!1},getActionLabel:function(t,e){if("profile"===t)switch(e){case"ignore":return"Are you sure you want to ignore this profile report?";case"nsfw":return"Are you sure you want to mark this profile as NSFW?";case"unlist":return"Are you sure you want to mark all posts by this profile as unlisted?";case"private":return"Are you sure you want to mark all posts by this profile as private?";case"delete":return"Are you sure you want to delete this profile?"}else if("post"===t)switch(e){case"ignore":return"Are you sure you want to ignore this post report?";case"nsfw":return"Are you sure you want to mark this post as NSFW?";case"unlist":return"Are you sure you want to mark this post as unlisted?";case"private":return"Are you sure you want to mark this post as private?";case"delete":return"Are you sure you want to delete this post?"}else if("story"===t)switch(e){case"ignore":return"Are you sure you want to ignore this story report?";case"delete":return"Are you sure you want to delete this story?";case"delete-all":return"Are you sure you want to delete all stories by this account?"}},fetchAutospam:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/spam/all";axios.get(e).then((function(e){t.autospam=e.data.data,t.autospamPagination={next:e.data.links.next,prev:e.data.links.prev}})).finally((function(){t.autospamLoaded=!0,t.loaded=!0}))},autospamPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.autospamPagination.next:this.autospamPagination.prev;this.fetchAutospam(e)},viewSpamReport:function(t){this.viewingSpamReportLoading=!1,this.viewingSpamReport=t,this.showSpamReportModal=!0,window.history.pushState(null,null,"/i/admin/reports?tab=autospam&id="+t.id),setTimeout((function(){pixelfed.readmore()}),1e3)},getSpamActionLabel:function(t){switch(t){case"mark-all-read":return"Are you sure you want to mark all spam reports by this account as read?";case"mark-all-not-spam":return"Are you sure you want to mark all spam reports by this account as not spam?";case"delete-profile":return"Are you sure you want to delete this profile?"}},handleSpamAction:function(t){var e=this;event.currentTarget.blur(),this.viewingSpamReportLoading=!0,"mark-not-spam"===t||"mark-read"===t||window.confirm(this.getSpamActionLabel(t))?(this.loaded=!1,axios.post("/i/admin/api/reports/spam/handle",{id:this.viewingSpamReport.id,action:t}).catch((function(t){swal("Error",t.response.data.error,"error")})).finally((function(){e.viewingSpamReportLoading=!0,e.viewingSpamReport=!1,e.showSpamReportModal=!1,setTimeout((function(){e.fetchStats(null,"/i/admin/api/reports/spam/all")}),500)}))):this.viewingSpamReportLoading=!1},fetchReport:function(t){var e=this;axios.get("/i/admin/api/reports/get/"+t).then((function(t){e.tabIndex=0,e.viewReport(t.data.data)})).catch((function(t){e.fetchStats(),window.history.pushState(null,null,"/i/admin/reports")}))},fetchSpamReport:function(t){var e=this;axios.get("/i/admin/api/reports/spam/get/"+t).then((function(t){e.tabIndex=2,e.viewSpamReport(t.data.data)})).catch((function(t){e.fetchStats(),window.history.pushState(null,null,"/i/admin/reports")}))}}}},99697:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(18634),i=a(8889);const n={props:{status:{type:Object}},data:function(){return{showInReplyTo:!1}},components:{"admin-read-more":i.default},methods:{toggleLightbox:function(t){(0,s.default)({el:t.target})},toggleVideoLightbox:function(t,e){(0,s.default)({el:event.target,vidSrc:e})},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("default",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}).format(e)}}}},72173:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const s={props:{content:{type:String},maxLength:{type:Number,default:140},fontSize:{type:String,default:"13"},step:{type:Boolean,default:!1},stepLimit:{type:Number,default:140},initialLimit:{type:Number,default:10}},computed:{contentText:{get:function(){if(this.step){var t=this.content.length/this.stepLimit;return(1==this.stepIndex||tthis.maxLength&&(this.canExpand=!0),this.expanded?this.content:this.truncate()}}},data:function(){return{expanded:!1,canExpand:!1,canStepExpand:!1,stepIndex:1}},methods:{expand:function(){this.step?(this.stepIndex++,this.canStepExpand=!0):this.expanded=!0},truncate:function(){if(this.content&&this.content.length)return this.content&&this.content.lengththis.stepLimit,this.content.slice(0,this.initialLimit)):this.canStepExpand&&this.stepIndex{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(27707),i=a(8889);const n={props:{open:{type:Boolean,default:!1},model:{type:Object}},components:{"admin-modal-post":s.default,"admin-read-more":i.default},watch:{open:{handler:function(){this.isOpen=this.open},immediate:!0,deep:!0}},data:function(){return{isLoading:!0,isOpen:!1,actions:["mark-read","cw-posts","unlist-posts","private-posts","delete-posts","mark-all-read-by-domain","mark-all-read-by-username","cw-all-posts","unlist-all-posts","private-all-posts"],actionMap:{"cw-posts":"apply content warnings to all post(s) in this report?","unlist-posts":"unlist all post(s) in this report?","delete-posts":"delete all post(s) in this report?","private-posts":"make all post(s) in this report private/followers-only?","mark-all-read-by-domain":"mark all reports by this instance as closed?","mark-all-read-by-username":"mark all reports against this user as closed?","cw-all-posts":"apply content warnings to all post(s) belonging to this account?","unlist-all-posts":"make all post(s) belonging to this account as unlisted?","private-all-posts":"make all post(s) belonging to this account as private?"}}},mounted:function(){var t=this;setTimeout((function(){t.isLoading=!1}),300)},methods:{prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):t},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("default",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}).format(e)},handleAction:function(t){var e=this;"mark-read"!==t?swal({title:"Confirm",text:"Are you sure you want to "+this.actionMap[t],icon:"warning",buttons:!0,dangerMode:!0}).then((function(a){!0===a&&axios.post("/i/admin/api/reports/remote/handle",{id:e.model.id,action:t}).finally((function(){e.$emit("refresh"),e.$emit("close")}))})):axios.post("/i/admin/api/reports/remote/handle",{id:this.model.id,action:t}).then((function(t){console.log(t.data)})).finally((function(){e.$emit("refresh"),e.$emit("close")}))}}}},69385:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"header bg-primary pb-3 mt-n4"},[e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"header-body"},[e("div",{staticClass:"row align-items-center py-4"},[t._m(0),t._v(" "),e("div",{staticClass:"col-xl-4 col-lg-3 col-md-4"},[e("div",{staticClass:"card card-stats mb-lg-0"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col"},[e("h5",{staticClass:"card-title text-uppercase text-muted mb-0"},[t._v("Active Autospam")]),t._v(" "),e("span",{staticClass:"h2 font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.config.open)))])]),t._v(" "),t._m(1)])])])]),t._v(" "),e("div",{staticClass:"col-xl-4 col-lg-3 col-md-4"},[e("div",{staticClass:"card card-stats bg-dark mb-lg-0"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col"},[e("h5",{staticClass:"card-title text-uppercase text-muted mb-0"},[t._v("Closed Autospam")]),t._v(" "),e("span",{staticClass:"h2 font-weight-bold text-muted mb-0"},[t._v(t._s(t.formatCount(t.config.closed)))])]),t._v(" "),t._m(2)])])])])])])])]),t._v(" "),t.loaded?e("div",{staticClass:"m-n2 m-lg-4"},[e("div",{staticClass:"container-fluid mt-4"},[e("div",{staticClass:"row mb-3 justify-content-between"},[e("div",{staticClass:"col-12"},[e("ul",{staticClass:"nav nav-pills"},[e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:0==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab(0)}}},[t._v("Dashboard")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"about"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("about")}}},[t._v("About / How to Use Autospam")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"train"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("train")}}},[t._v("Train Autospam")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"closed_reports"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("closed_reports")}}},[t._v("Closed Reports")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"manage_tokens"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("manage_tokens")}}},[t._v("Manage Tokens")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"import_export"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("import_export")}}},[t._v("Import/Export")])])])])]),t._v(" "),0===this.tabIndex?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-4"},[null===t.config.autospam_enabled?e("div"):t.config.autospam_enabled?e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[t._m(3)]):e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[t._m(4)]),t._v(" "),null===t.config.nlp_enabled?e("div"):t.config.nlp_enabled?e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[e("div",{staticClass:"card-body text-center"},[t._m(5),t._v(" "),e("p",{staticClass:"lead text-light"},[t._v("Advanced (NLP) Detection Active")]),t._v(" "),e("a",{staticClass:"btn btn-outline-danger btn-block font-weight-bold",class:{disabled:1!=t.config.autospam_enabled},attrs:{href:"#",disabled:1!=t.config.autospam_enabled},on:{click:function(e){return e.preventDefault(),t.disableAdvanced.apply(null,arguments)}}},[t._v("Disable Advanced Detection")])])]):e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[e("div",{staticClass:"card-body text-center"},[t._m(6),t._v(" "),e("p",{staticClass:"lead text-danger font-weight-bold"},[t._v("Advanced (NLP) Detection Inactive")]),t._v(" "),e("a",{staticClass:"btn btn-primary btn-block font-weight-bold",class:{disabled:1!=t.config.autospam_enabled},attrs:{href:"#",disabled:1!=t.config.autospam_enabled},on:{click:function(e){return e.preventDefault(),t.enableAdvanced.apply(null,arguments)}}},[t._v("Enable Advanced Detection")])])])]),t._v(" "),t._m(7)]):"about"===this.tabIndex?e("div",[t._m(8)]):"train"===this.tabIndex?e("div",[t._m(9),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header bg-gradient-primary text-white font-weight-bold"},[t._v("Train Spam Posts")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(10),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Use existing posts marked as spam to train Autospam")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",class:{disabled:t.config.files.spam.exists},attrs:{disabled:t.config.files.spam.exists},on:{click:function(e){return e.preventDefault(),t.autospamTrainSpam.apply(null,arguments)}}},[t._v("\n\t \t\t\t\t\t\t"+t._s(t.config.files.spam.exists?"Already trained":"Train Spam")+"\n\t \t\t\t\t\t")])])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header bg-gradient-primary text-white font-weight-bold"},[t._v("Train Non-Spam Posts")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(11),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Use posts from trusted users to train non-spam posts")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",class:{disabled:t.config.files.ham.exists},attrs:{disabled:t.config.files.ham.exists},on:{click:function(e){return e.preventDefault(),t.autospamTrainNonSpam.apply(null,arguments)}}},[t._v("\n\t \t\t\t\t\t\t"+t._s(t.config.files.ham.exists?"Already trained":"Train Non-Spam")+"\n\t \t\t\t\t\t")])])])])])])]):"closed_reports"===this.tabIndex?e("div",[t.closedReportsFetched?[e("div",{staticClass:"table-responsive rounded"},[e("table",{staticClass:"table table-dark"},[t._m(12),t._v(" "),e("tbody",t._l(t.closedReports.data,(function(a,s){return e("tr",{key:"closed_reports"+a.id+s},[e("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[t._v("\n\t\t \t"+t._s(a.id)+"\n\t\t ")]),t._v(" "),t._m(13,!0),t._v(" "),e("td",{staticClass:"align-middle"},[a.status&&a.status.account?e("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(a.status.account.id),target:"_blank"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[e("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[t._v("@"+t._s(a.status.account.username))]),t._v(" "),e("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[e("span",[t._v(t._s(a.status.account.followers_count)+" Followers")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),e("span",[t._v("Joined "+t._s(t.timeAgo(a.status.account.created_at)))])])])])]):t._e()]),t._v(" "),e("td",{staticClass:"font-weight-bold align-middle"},[t._v(t._s(t.timeAgo(a.created_at)))]),t._v(" "),e("td",{staticClass:"align-middle"},[e("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.viewSpamReport(a)}}},[t._v("View")])])])})),0)])]),t._v(" "),t.closedReportsFetched&&t.closedReports&&t.closedReports.data.length?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.closedReports.links.prev},on:{click:function(e){return t.autospamPaginate("prev")}}},[t._v("\n\t\t Prev\n\t\t ")]),t._v(" "),e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.closedReports.links.next},on:{click:function(e){return t.autospamPaginate("next")}}},[t._v("\n\t\t Next\n\t\t ")])]):t._e()]:[e("div",{staticClass:"d-flex justify-content-center align-items-center py-5"},[e("b-spinner")],1)]],2):"manage_tokens"===this.tabIndex?e("div",[e("div",{staticClass:"row align-items-center mb-3"},[t._m(14),t._v(" "),e("div",{staticClass:"col-12 col-md-3"},[e("a",{staticClass:"btn btn-primary btn-lg btn-block",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showCreateTokenModal=!0}}},[e("i",{staticClass:"far fa-plus fa-lg mr-1"}),t._v("\n \t\t\t\tCreate New Token\n \t\t\t")])])]),t._v(" "),t.customTokensFetched?[t.customTokens&&t.customTokens.data&&t.customTokens.data.length?[e("div",{staticClass:"table-responsive rounded"},[e("table",{staticClass:"table table-dark"},[t._m(15),t._v(" "),e("tbody",t._l(t.customTokens.data,(function(a,s){return e("tr",{key:"ct"+a.id+s},[e("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[t._v("\n\t\t\t \t"+t._s(a.id)+"\n\t\t\t ")]),t._v(" "),e("td",{staticClass:"align-middle"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(a.token))])]),t._v(" "),e("td",{staticClass:"align-middle"},[e("p",{staticClass:"text-capitalize mb-0"},[t._v(t._s(a.category))])]),t._v(" "),e("td",{staticClass:"align-middle"},[e("p",{staticClass:"text-capitalize mb-0"},[t._v(t._s(a.weight))])]),t._v(" "),e("td",{staticClass:"font-weight-bold align-middle"},[t._v(t._s(t.timeAgo(a.created_at)))]),t._v(" "),e("td",{staticClass:"font-weight-bold align-middle"},[e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditTokenModal(a)}}},[t._v("Edit")])])])})),0)])]),t._v(" "),t.customTokensFetched&&t.customTokens&&t.customTokens.data.length?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.customTokens.prev_page_url},on:{click:function(e){return t.autospamTokenPaginate("prev")}}},[t._v("\n\t\t\t Prev\n\t\t\t ")]),t._v(" "),e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.customTokens.next_page_url},on:{click:function(e){return t.autospamTokenPaginate("next")}}},[t._v("\n\t\t\t Next\n\t\t\t ")])]):t._e()]:e("div",[t._m(16)])]:[e("div",{staticClass:"d-flex justify-content-center align-items-center py-5"},[e("b-spinner")],1)]],2):"import_export"===this.tabIndex?e("div",[t._m(17),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header font-weight-bold"},[t._v("Import Training Data")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(18),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Make sure the file you are importing is a valid training data export!")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",on:{click:function(e){return e.preventDefault(),t.handleImport.apply(null,arguments)}}},[t._v("Upload Import")])])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header font-weight-bold"},[t._v("Export Training Data")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(19),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Only share training data with people you trust. It can be used by spammers to bypass detection!")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",on:{click:function(e){return e.preventDefault(),t.downloadExport.apply(null,arguments)}}},[t._v("Download Export")])])])])])])]):t._e()])]):e("div",{staticClass:"my-5 text-center"},[e("b-spinner")],1),t._v(" "),e("b-modal",{attrs:{title:"Autospam Post","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:t.showSpamReportModal,callback:function(e){t.showSpamReportModal=e},expression:"showSpamReportModal"}},[t.viewingSpamReportLoading?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("b-spinner")],1):[e("div",{staticClass:"list-group list-group-horizontal mt-3"},[t.viewingSpamReport&&t.viewingSpamReport.status&&t.viewingSpamReport.status.account?e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[t._v("Reported Account")]),t._v(" "),t.viewingSpamReport.status.account&&t.viewingSpamReport.status.account.id?e("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(t.viewingSpamReport.status.account.id),target:"_blank"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[e("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.viewingSpamReport.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0 text-break",class:[t.viewingSpamReport.status.account.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[t._v("@"+t._s(t.viewingSpamReport.status.account.acct))]),t._v(" "),e("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[e("span",[t._v(t._s(t.viewingSpamReport.status.account.followers_count)+" Followers")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),e("span",[t._v("Joined "+t._s(t.timeAgo(t.viewingSpamReport.status.account.created_at)))])])])])]):t._e()]):t._e()]),t._v(" "),t.viewingSpamReport&&t.viewingSpamReport.status?e("div",{staticClass:"list-group mt-3"},[t.viewingSpamReport&&t.viewingSpamReport.status&&t.viewingSpamReport.status.media_attachments.length?e("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[e("div",[t._v("Reported Post")]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.viewingSpamReport.status.url,target:"_blank"}},[t._v("View")])]),t._v(" "),"image"===t.viewingSpamReport.status.media_attachments[0].type?e("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:t.viewingSpamReport.status.media_attachments[0].url,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===t.viewingSpamReport.status.media_attachments[0].type?e("video",{attrs:{height:"140",controls:"",src:t.viewingSpamReport.status.media_attachments[0].url,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):t._e()]):t._e(),t._v(" "),t.viewingSpamReport&&t.viewingSpamReport.status&&t.viewingSpamReport.status.content_text&&t.viewingSpamReport.status.content_text.length?e("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[e("div",[t._v("Reported Post Caption")]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.viewingSpamReport.status.url,target:"_blank"}},[t._v("View")])]),t._v(" "),e("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[t._v(t._s(t.viewingSpamReport.status.content_text))])]):t._e()]):t._e()]],2),t._v(" "),e("b-modal",{attrs:{title:"Train Non-Spam","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:t.showNonSpamModal,callback:function(e){t.showNonSpamModal=e},expression:"showNonSpamModal"}},[e("p",{staticClass:"small font-weight-bold"},[t._v("Select trusted accounts to train non-spam posts against!")]),t._v(" "),!t.nonSpamAccounts||t.nonSpamAccounts.length<10?e("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,disabled:t.searchLoading,placeholder:"Search by username","aria-label":"Search by username","get-result-value":t.getTagResultValue},on:{submit:t.onSearchResultClick},scopedSlots:t._u([{key:"result",fn:function(a){var s=a.result,i=a.props;return[e("li",t._b({staticClass:"autocomplete-result d-flex align-items-center",staticStyle:{gap:"0.5rem"}},"li",i,!1),[e("img",{staticClass:"rounded-circle",attrs:{src:s.avatar,width:"32",height:"32",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v("\n "+t._s(s.username)+"\n ")])])]}}],null,!1,565605044)}):t._e(),t._v(" "),e("div",{staticClass:"list-group mt-3"},t._l(t.nonSpamAccounts,(function(a,s){return e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex align-items-center justify-content-between"},[e("div",{staticClass:"d-flex flex-row align-items-center",staticStyle:{gap:"0.5rem"}},[e("img",{staticClass:"rounded-circle",attrs:{src:a.avatar,width:"32",height:"32",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v("\n\t "+t._s(a.username)+"\n\t ")])]),t._v(" "),e("a",{staticClass:"text-danger",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.autospamTrainNonSpamRemove(s)}}},[e("i",{staticClass:"fas fa-trash"})])])])})),0),t._v(" "),t.nonSpamAccounts&&t.nonSpamAccounts.length?e("div",{staticClass:"mt-3"},[e("a",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.autospamTrainNonSpamSubmit.apply(null,arguments)}}},[t._v("Train non-spam posts on trusted accounts")])]):t._e()],1),t._v(" "),e("b-modal",{attrs:{title:"Create New Token","cancel-title":"Close","cancel-variant":"outline-primary","ok-title":"Save","ok-variant":"primary"},on:{ok:t.handleSaveToken},model:{value:t.showCreateTokenModal,callback:function(e){t.showCreateTokenModal=e},expression:"showCreateTokenModal"}},[e("div",{staticClass:"list-group mt-3"},[e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Token")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.token,expression:"customTokenForm.token"}],staticClass:"form-control",domProps:{value:t.customTokenForm.token},on:{input:function(e){e.target.composing||t.$set(t.customTokenForm,"token",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Weight")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.weight,expression:"customTokenForm.weight"}],staticClass:"form-control",attrs:{type:"number",min:"-128",max:"128",step:"1"},domProps:{value:t.customTokenForm.weight},on:{input:function(e){e.target.composing||t.$set(t.customTokenForm,"weight",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Category")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.category,expression:"customTokenForm.category"}],staticClass:"form-control",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.customTokenForm,"category",e.target.multiple?a:a[0])}}},[e("option",{attrs:{value:"spam"}},[t._v("Is Spam")]),t._v(" "),e("option",{attrs:{value:"ham"}},[t._v("Is NOT Spam")])])])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Note")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.note,expression:"customTokenForm.note"}],staticClass:"form-control",domProps:{value:t.customTokenForm.note},on:{input:function(e){e.target.composing||t.$set(t.customTokenForm,"note",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Active")])]),t._v(" "),e("div",{staticClass:"col-8 text-right"},[e("div",{staticClass:"custom-control custom-checkbox"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.active,expression:"customTokenForm.active"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customCheck1"},domProps:{checked:Array.isArray(t.customTokenForm.active)?t._i(t.customTokenForm.active,null)>-1:t.customTokenForm.active},on:{change:function(e){var a=t.customTokenForm.active,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.customTokenForm,"active",a.concat([null])):n>-1&&t.$set(t.customTokenForm,"active",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.customTokenForm,"active",i)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customCheck1"}})])])])])])]),t._v(" "),e("b-modal",{attrs:{title:"Edit Token","cancel-title":"Close","cancel-variant":"outline-primary","ok-title":"Update","ok-variant":"primary"},on:{ok:t.handleUpdateToken},model:{value:t.showEditTokenModal,callback:function(e){t.showEditTokenModal=e},expression:"showEditTokenModal"}},[e("div",{staticClass:"list-group mt-3"},[e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Token")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{staticClass:"form-control",attrs:{disabled:""},domProps:{value:t.editCustomTokenForm.token}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Weight")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.weight,expression:"editCustomTokenForm.weight"}],staticClass:"form-control",attrs:{type:"number",min:"-128",max:"128",step:"1"},domProps:{value:t.editCustomTokenForm.weight},on:{input:function(e){e.target.composing||t.$set(t.editCustomTokenForm,"weight",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Category")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.category,expression:"editCustomTokenForm.category"}],staticClass:"form-control",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.editCustomTokenForm,"category",e.target.multiple?a:a[0])}}},[e("option",{attrs:{value:"spam"}},[t._v("Is Spam")]),t._v(" "),e("option",{attrs:{value:"ham"}},[t._v("Is NOT Spam")])])])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Note")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.note,expression:"editCustomTokenForm.note"}],staticClass:"form-control",domProps:{value:t.editCustomTokenForm.note},on:{input:function(e){e.target.composing||t.$set(t.editCustomTokenForm,"note",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Active")])]),t._v(" "),e("div",{staticClass:"col-8 text-right"},[e("div",{staticClass:"custom-control custom-checkbox"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.active,expression:"editCustomTokenForm.active"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customCheck1"},domProps:{checked:Array.isArray(t.editCustomTokenForm.active)?t._i(t.editCustomTokenForm.active,null)>-1:t.editCustomTokenForm.active},on:{change:function(e){var a=t.editCustomTokenForm.active,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.editCustomTokenForm,"active",a.concat([null])):n>-1&&t.$set(t.editCustomTokenForm,"active",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.editCustomTokenForm,"active",i)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customCheck1"}})])])])])])])],1)},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-xl-4 col-lg-6 col-md-4"},[e("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[t._v("Autospam")]),t._v(" "),e("p",{staticClass:"text-lighter"},[t._v("The automated spam detection system")])])},function(){var t=this._self._c;return t("div",{staticClass:"col-auto"},[t("div",{staticClass:"icon icon-shape bg-gradient-primary text-white rounded-circle shadow"},[t("i",{staticClass:"far fa-sensor-alert"})])])},function(){var t=this._self._c;return t("div",{staticClass:"col-auto"},[t("div",{staticClass:"icon icon-shape bg-gradient-primary text-white rounded-circle shadow"},[t("i",{staticClass:"far fa-shield-alt"})])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-body text-center"},[e("p",[e("i",{staticClass:"far fa-check-circle fa-5x text-success"})]),t._v(" "),e("p",{staticClass:"lead text-light mb-0"},[t._v("Autospam Service Operational")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-body text-center"},[e("p",[e("i",{staticClass:"far fa-exclamation-circle fa-5x text-danger"})]),t._v(" "),e("p",{staticClass:"lead text-danger font-weight-bold mb-0"},[t._v("Autospam Service Inactive")]),t._v(" "),e("p",{staticClass:"small text-light mb-0"},[t._v("To activate, "),e("a",{attrs:{href:"/i/admin/settings"}},[t._v("click here")]),t._v(" and enable "),e("span",{staticClass:"font-weight-bold"},[t._v("Spam detection")])])])},function(){var t=this._self._c;return t("p",[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])},function(){var t=this._self._c;return t("p",[t("i",{staticClass:"far fa-exclamation-circle fa-5x text-danger"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8"},[e("div",{staticClass:"card bg-default"},[e("div",{staticClass:"card-header bg-transparent"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col"},[e("h6",{staticClass:"text-light text-uppercase ls-1 mb-1"},[t._v("Stats")]),t._v(" "),e("h5",{staticClass:"h3 text-white mb-0"},[t._v("Autospam Detections")])])])]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"chart"},[e("canvas",{staticClass:"chart-canvas",attrs:{id:"c1-dark"}})])])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card card-body"},[e("h1",[t._v("About Autospam")]),t._v(" "),e("p",{staticClass:"mb-0"},[t._v("To detect and mitigate spam, we built Autospam, an internal tool that uses NLP and other behavioural metrics to classify potential spam posts.")]),t._v(" "),e("hr"),t._v(" "),e("h2",[t._v("Standard Detection")]),t._v(" "),e("p",[t._v('Standard or "Classic" detection works by evaluating several "signals" from the post and it\'s associated account.')]),t._v(" "),e("p",[t._v('Some of the following "signals" may trigger a positive detection from public posts:')]),t._v(" "),e("ul",[e("li",[t._v("Account is less than 6 months old")]),t._v(" "),e("li",[t._v("Account has less than 100 followers")]),t._v(" "),e("li",[t._v("Post contains one or more of: "),e("span",{staticClass:"badge badge-primary"},[t._v("https://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("http://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("hxxps://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("hxxp://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("www.")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v(".com")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v(".net")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v(".org")])])]),t._v(" "),e("p",[t._v("If you've marked atleast one positive detection from an account as "),e("span",{staticClass:"font-weight-bold"},[t._v("Not spam")]),t._v(", any future posts they create will skip detection.")]),t._v(" "),e("hr"),t._v(" "),e("h2",[t._v("Advanced Detection")]),t._v(" "),e("p",[t._v("Advanced Detection works by using a statistical method that combines prior knowledge and observed data to estimate an average value. It assigns weights to both the prior knowledge and the observed data, allowing for a more informed and reliable estimation that adapts to new information.")]),t._v(" "),e("p",[t._v("When you train Spam or Not Spam data, the caption is broken up into words (tokens) and are counted (weights) and then stored in the appropriate category (Spam or Not Spam).")]),t._v(" "),e("p",[t._v("The training data is then used to classify spam on future posts (captions) by calculating each token and associated weights and comparing it to known categories (Spam or Not Spam).")])])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card card-body"},[e("p",{staticClass:"mb-0"},[t._v("\n\t \t\t\t\tIn order for Autospam to be effective, you need to train it by classifying data as spam or not-spam.\n\t \t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("\n\t \t\t\t\tWe recommend atleast 200 classifications for both spam and not-spam, it is important to train Autospam on both so you get more accurate results.\n\t \t\t\t")])])])])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-sensor-alert fa-5x text-danger"})])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Type")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("td",{staticClass:"align-middle"},[t("p",{staticClass:"text-capitalize font-weight-bold mb-0"},[this._v("Autospam Post")])])},function(){var t=this._self._c;return t("div",{staticClass:"col-12 col-md-9"},[t("div",{staticClass:"card card-body mb-0"},[t("p",{staticClass:"mb-0"},[this._v("\n\t \t\t\t\tTokens are used to split paragraphs and sentences into smaller units that can be more easily assigned meaning.\n\t \t\t\t")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Token")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Category")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Weight")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Edit")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-body text-center py-5"},[e("p",{staticClass:"pt-5"},[e("i",{staticClass:"far fa-inbox fa-4x text-light"})]),t._v(" "),e("p",{staticClass:"lead mb-5"},[t._v("No custom tokens found!")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card card-body"},[e("p",{staticClass:"mb-0"},[t._v("\n\t \t\t\t\tYou can import and export Spam training data\n\t \t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("\n\t \t\t\t\tWe recommend exercising caution when importing training data from untrusted parties!\n\t \t\t\t")])])])])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-plus-circle fa-5x text-light"})])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-download fa-5x text-light"})])}]},41298:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return t.loaded?e("div",[e("div",{staticClass:"header bg-primary pb-2 mt-n4"},[e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"header-body"},[e("div",{staticClass:"row align-items-center py-4"},[t._m(0),t._v(" "),e("div",{staticClass:"col-lg-6 col-5"},[e("p",{staticClass:"text-right"},[e("button",{staticClass:"btn btn-outline-white btn-lg px-5 py-2",on:{click:t.save}},[t._v("Save changes")])])])])])])]),t._v(" "),e("div",{staticClass:"container"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-3"},[e("div",{staticClass:"nav-wrapper"},[e("div",{staticClass:"nav flex-column nav-pills",attrs:{id:"tabs-icons-text",role:"tablist","aria-orientation":"vertical"}},t._l(t.tabs,(function(a){return e("div",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3",class:{active:t.tabIndex===a.id},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleTab(a.id)}}},[e("i",{class:a.icon}),t._v(" "),e("span",{staticClass:"ml-2"},[t._v(t._s(a.title))])])])})),0)])]),t._v(" "),e("div",{staticClass:"col-12 col-md-9"},[e("div",{staticClass:"card shadow mt-3"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"tab-content"},[1===t.tabIndex?e("div",{staticClass:"tab-pane fade show active"},[t.isSubmitting||t.state.awaiting_approval||t.state.is_active?t.isSubmitting||!t.state.awaiting_approval||t.state.is_active?!t.isSubmitting&&t.state.awaiting_approval&&t.state.is_active?e("div",[t._m(3)]):t.isSubmitting||t.state.awaiting_approval||!t.state.is_active?t.isSubmitting?e("div",[e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("b-spinner",{attrs:{variant:"primary"}}),t._v(" "),e("p",{staticClass:"lead my-0 text-primary"},[t._v("Sending submission...")])],1)]):e("div",[t._m(6)]):e("div",[e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("h2",{staticClass:"font-weight-bold"},[t._v("Active Listing")]),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),e("button",{staticClass:"btn btn-primary btn-sm mt-3 font-weight-bold px-5 text-uppercase",on:{click:t.handleSubmit}},[t._v("\n Update my listing on pixelfed.org\n ")])])]):e("div",[t._m(2)]):e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("div",{staticClass:"text-center mb-4"},[t._m(1),t._v(" "),e("p",{staticClass:"display-3 mb-1"},[t._v("Awaiting Submission")]),t._v(" "),t.state.is_eligible||t.state.submission_exists?t.state.is_eligible&&!t.state.submission_exists?e("div",{staticClass:"mb-4"},[e("p",{staticClass:"lead mt-0 text-muted"},[t._v("Your directory listing is ready for submission!")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold px-5 text-uppercase",on:{click:t.handleSubmit}},[t._v("\n Submit my Server to pixelfed.org\n ")])]):t._e():e("p",{staticClass:"lead mt-0 text-muted"},[t._v("Your directory listing isn't completed yet")])])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card text-left"},[e("div",{staticClass:"list-group list-group-flush"},[e("div",{staticClass:"list-group-item"},[!0===t.requirements.curated_onboarding?[e("i",{staticClass:"far fa-exclamation-circle text-success"}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n Curated account registration\n ")])]:[e("i",{staticClass:"far",class:[t.requirements.open_registration?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements.open_registration?"Open":"Closed")+" account registration\n ")])]],2),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.requirements.oauth_enabled?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements.oauth_enabled?"Enabled":"Disabled")+" mobile apis/oauth\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.requirements.activitypub_enabled?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements.activitypub_enabled?"Enabled":"Disabled")+" activitypub federation\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.summary&&t.form.summary.length&&t.form.location&&t.form.location.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.summary&&t.form.summary.length&&t.form.location&&t.form.location.length?"Configured":"Missing")+" server details\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.requirements_validator&&0==t.requirements_validator.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements_validator&&0==t.requirements_validator.length?"Valid":"Invalid")+" feature requirements\n ")])])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card text-left"},[e("div",{staticClass:"list-group list-group-flush"},[e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.contact_account?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.contact_account?"Configured":"Missing")+" admin account\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.contact_email?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.contact_email?"Configured":"Missing")+" contact email\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.selectedPosts&&t.selectedPosts.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.selectedPosts&&t.selectedPosts.length?"Configured":"Missing")+" favourite posts\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.privacy_pledge?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.privacy_pledge?"Configured":"Missing")+" privacy pledge\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.communityGuidelines&&t.communityGuidelines.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.communityGuidelines&&t.communityGuidelines.length?"Configured":"Missing")+" community guidelines\n ")])])])])])])]):2===t.tabIndex?e("div",{staticClass:"tab-pane fade show active"},[e("p",{staticClass:"description"},[t._v("Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.")])]):3===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Server Details")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Edit your server details to better describe it")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card shadow-none border card-body"},[e("div",{staticClass:"form-group mb-0"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Summary")]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.summary,expression:"form.summary"}],staticClass:"form-control form-control-muted",attrs:{id:"form-summary",rows:"3",placeholder:"A descriptive summary of your instance up to 140 characters long. HTML is not allowed."},domProps:{value:t.form.summary},on:{input:function(e){e.target.composing||t.$set(t.form,"summary",e.target.value)}}}),t._v(" "),e("p",{staticClass:"help-text small text-muted text-right"},[t._v("\n "+t._s(t.form.summary&&t.form.summary.length?t.form.summary.length:0)+"/140\n ")])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card shadow-none border card-body"},[e("div",{staticClass:"form-group mb-0"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Location")]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.location,expression:"form.location"}],staticClass:"form-control form-control-muted",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"location",e.target.multiple?a:a[0])}}},[e("option",{attrs:{selected:"",disabled:"",value:"0"}},[t._v("Select the country your server is in")]),t._v(" "),t._l(t.initialData.countries,(function(a){return e("option",{domProps:{value:a}},[t._v(t._s(a))])}))],2),t._v(" "),e("p",{staticClass:"form-text small text-muted"},[t._v("Select the country your server is hosted in, even if you are in a different country")])])])])]),t._v(" "),e("div",{staticClass:"list-group mb-4"},[e("div",{staticClass:"list-group-item"},[e("label",{staticClass:"font-weight-bold mb-0"},[t._v("Server Banner")]),t._v(" "),e("p",{staticClass:"small"},[t._v("Add an optional banner image to your directory listing")]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card mb-0 shadow-none border"},[t.form.banner_image?e("div",[e("a",{attrs:{href:t.form.banner_image,target:"_blank"}},[e("img",{staticClass:"card-img-top",attrs:{src:t.form.banner_image}})])]):e("div",{staticClass:"card-body bg-primary text-white"},[t._m(7),t._v(" "),e("p",{staticClass:"text-center mb-0"},[t._v("No banner image")])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[t.isUploadingBanner?e("div",{staticClass:"text-center"},[e("b-spinner",{attrs:{variant:"primary"}})],1):e("div",{staticClass:"custom-file"},[e("input",{ref:"bannerImageRef",staticClass:"custom-file-input",attrs:{type:"file",id:"banner_image"},on:{change:t.uploadBannerImage}}),t._v(" "),e("label",{staticClass:"custom-file-label",attrs:{for:"banner_image"}},[t._v("Choose file")]),t._v(" "),e("p",{staticClass:"form-text text-muted small mb-0"},[t._v("Must be 1920 by 1080 pixels")]),t._v(" "),t._m(8),t._v(" "),t.form.banner_image&&!t.form.banner_image.endsWith("default.jpg")?e("div",[e("button",{staticClass:"btn btn-danger font-weight-bold btn-block mt-5",on:{click:t.deleteBannerImage}},[t._v("Delete banner image")])]):t._e()])])])])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card shadow-none border card-body"},[e("div",{staticClass:"form-group mb-0"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Primary Language")]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.primary_locale,expression:"form.primary_locale"}],staticClass:"form-control form-control-muted",attrs:{disabled:""},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"primary_locale",e.target.multiple?a:a[0])}}},t._l(t.initialData.available_languages,(function(a){return e("option",{domProps:{value:a.code}},[t._v(t._s(a.name))])})),0),t._v(" "),t._m(9)])])])])]):4===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Admin Contact")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Set a designated admin account and public email address")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[t.initialData.admins.length?e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Designated Admin")]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.contact_account,expression:"form.contact_account"}],staticClass:"form-control form-control-muted",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"contact_account",e.target.multiple?a:a[0])}}},[e("option",{attrs:{disabled:"",value:"0"}},[t._v("Select a designated admin")]),t._v(" "),t._l(t.initialData.admins,(function(a,s){return e("option",{key:"pfc-"+a+s,domProps:{value:a.pid}},[t._v(t._s(a.username))])}))],2)]):e("div",{staticClass:"px-3 pb-2 pt-0 border border-danger rounded"},[e("p",{staticClass:"lead font-weight-bold text-danger"},[t._v("No admin(s) found")]),t._v(" "),t._m(10)])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Public Email")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.contact_email,expression:"form.contact_email"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"info@example.org"},domProps:{value:t.form.contact_email},on:{input:function(e){e.target.composing||t.$set(t.form,"contact_email",e.target.value)}}}),t._v(" "),e("p",{staticClass:"help-text small text-muted"},[t._v("\n Must be a valid email address\n ")])])])])]):5===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Favourite Posts")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Show off a few favourite posts from your server")]),t._v(" "),e("hr",{staticClass:"mt-0 mb-1"}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.selectedPosts&&12!==t.selectedPosts.length,expression:"selectedPosts && selectedPosts.length !== 12"}],staticClass:"nav-wrapper"},[e("ul",{staticClass:"nav nav-pills nav-fill flex-column flex-md-row",attrs:{role:"tablist"}},[e("li",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3 mb-md-0 active",attrs:{id:"favposts-1-tab","data-toggle":"tab",href:"#favposts-1",role:"tab","aria-controls":"favposts-1","aria-selected":"true"}},[t._v(t._s(this.selectedPosts.length?this.selectedPosts.length:"")+" Selected Posts")])]),t._v(" "),t.selectedPosts&&t.selectedPosts.length<12?e("li",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3 mb-md-0",attrs:{id:"favposts-2-tab","data-toggle":"tab",href:"#favposts-2",role:"tab","aria-controls":"favposts-2","aria-selected":"false"}},[t._v("Add by post id")])]):t._e(),t._v(" "),t.selectedPosts&&t.selectedPosts.length<12?e("li",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3 mb-md-0",attrs:{id:"favposts-3-tab","data-toggle":"tab",href:"#favposts-3",role:"tab","aria-controls":"favposts-3","aria-selected":"false"},on:{click:t.initPopularPosts}},[t._v("Add by popularity")])]):t._e()])]),t._v(" "),e("div",{staticClass:"tab-content mt-3"},[e("div",{staticClass:"tab-pane fade list-fade-bottom show active",attrs:{id:"favposts-1",role:"tabpanel","aria-labelledby":"favposts-1-tab"}},[t.selectedPosts&&t.selectedPosts.length?e("div",{staticStyle:{"max-height":"520px","overflow-y":"auto"}},[t._l(t.selectedPosts,(function(a){return e("div",{key:"sp-"+a.id,staticClass:"list-group-item border-primary form-control-muted"},[e("div",{staticClass:"media align-items-center"},[e("div",{staticClass:"custom-control custom-checkbox mr-2"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",checked:"",id:"checkbox-sp-".concat(a.id)},on:{change:function(e){return t.toggleSelectedPost(a)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"checkbox-sp-".concat(a.id)}})]),t._v(" "),e("img",{staticClass:"border rounded-sm mr-3",staticStyle:{"object-fit":"cover"},attrs:{src:a.media_attachments[0].url,width:"100",height:"100",loading:"lazy"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"lead mt-0 mb-0 font-weight-bold"},[t._v("@"+t._s(a.account.username))]),t._v(" "),e("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.favourites_count)))]),t._v(" Likes")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.account.followers_count)))]),t._v(" Followers")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[t._v("Created "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatDateTime(a.created_at)))])])])]),t._v(" "),e("a",{staticClass:"btn btn-outline-primary btn-sm rounded-pill",attrs:{href:a.url,target:"_blank"}},[t._v("View")])])])})),t._v(" "),e("div",{staticClass:"mt-5 mb-5 pt-3"})],2):e("div",[t._m(11)])]),t._v(" "),e("div",{staticClass:"tab-pane fade",attrs:{id:"favposts-2",role:"tabpanel","aria-labelledby":"favposts-2-tab"}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold"},[t._v("Find and add by post id")]),t._v(" "),e("div",{staticClass:"input-group mb-3"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.favouritePostByIdInput,expression:"favouritePostByIdInput"}],staticClass:"form-control form-control-muted border",attrs:{type:"number",placeholder:"Post id",min:"1",max:"99999999999999999999",disabled:t.favouritePostByIdFetching},domProps:{value:t.favouritePostByIdInput},on:{input:function(e){e.target.composing||(t.favouritePostByIdInput=e.target.value)}}}),t._v(" "),e("div",{staticClass:"input-group-append"},[t.favouritePostByIdFetching?e("button",{staticClass:"btn btn-outline-primary",attrs:{disabled:""}},[t._m(12)]):e("button",{staticClass:"btn btn-outline-primary",attrs:{type:"button"},on:{click:t.handlePostByIdSearch}},[t._v("\n Search\n ")])])])])]),t._v(" "),t._m(13)])]),t._v(" "),e("div",{staticClass:"tab-pane fade list-fade-bottom mb-0",attrs:{id:"favposts-3",role:"tabpanel","aria-labelledby":"favposts-3-tab"}},[t.popularPostsLoaded?e("div",{staticClass:"list-group",staticStyle:{"max-height":"520px","overflow-y":"auto"}},[t._l(t.popularPosts,(function(a){return e("div",{key:"pp-"+a.id,staticClass:"list-group-item",class:[t.selectedPosts.includes(a)?"border-primary form-control-muted":""]},[e("div",{staticClass:"media align-items-center"},[e("div",{staticClass:"custom-control custom-checkbox mr-2"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"checkbox-pp-".concat(a.id)},domProps:{checked:t.selectedPosts.includes(a)},on:{change:function(e){return t.togglePopularPost(a.id,a)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"checkbox-pp-".concat(a.id)}})]),t._v(" "),e("img",{staticClass:"border rounded-sm mr-3",staticStyle:{"object-fit":"cover"},attrs:{src:a.media_attachments[0].url,width:"100",height:"100",loading:"lazy"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"lead mt-0 mb-0 font-weight-bold"},[t._v("@"+t._s(a.account.username))]),t._v(" "),e("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.favourites_count)))]),t._v(" Likes")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.account.followers_count)))]),t._v(" Followers")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[t._v("Created "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatDateTime(a.created_at)))])])])]),t._v(" "),e("a",{staticClass:"btn btn-outline-primary btn-sm rounded-pill",attrs:{href:a.url,target:"_blank"}},[t._v("View")])])])})),t._v(" "),e("div",{staticClass:"mt-5 mb-3"})],2):e("div",{staticClass:"text-center py-5"},[t._m(14)])])])]):6===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Privacy Pledge")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Pledge to keep you and your data private and securely stored")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("p",[t._v("To qualify for the Privacy Pledge, you must abide by the following rules:")]),t._v(" "),t._m(15),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("You may use 3rd party services like captchas on specific pages, so long as they are clearly defined in your privacy policy")]),t._v(" "),e("hr"),t._v(" "),e("p"),e("div",{staticClass:"custom-control custom-checkbox mr-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.privacy_pledge,expression:"form.privacy_pledge"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"privacy-pledge"},domProps:{checked:Array.isArray(t.form.privacy_pledge)?t._i(t.form.privacy_pledge,null)>-1:t.form.privacy_pledge},on:{change:function(e){var a=t.form.privacy_pledge,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.form,"privacy_pledge",a.concat([null])):n>-1&&t.$set(t.form,"privacy_pledge",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.form,"privacy_pledge",i)}}}),t._v(" "),e("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"privacy-pledge"}},[t._v("I agree to the uphold the Privacy Pledge")])]),t._v(" "),e("p")]):7===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Community Guidelines")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("A few ground rules to keep your community healthy and safe.")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),t.communityGuidelines&&t.communityGuidelines.length?e("ol",{staticClass:"font-weight-bold"},t._l(t.communityGuidelines,(function(a){return e("li",{staticClass:"text-primary"},[e("span",{staticClass:"lead ml-1 text-dark"},[t._v(t._s(a))])])})),0):e("div",{staticClass:"card bg-primary text-white"},[t._m(16)]),t._v(" "),e("hr"),t._v(" "),t._m(17)]):8===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Feature Requirements")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("The minimum requirements for Directory inclusion.")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("media_types")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Media Types")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Allowed MIME types. image/jpeg and image/png by default")]),t._v(" "),t.requirements_validator.hasOwnProperty("media_types")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.media_types[0]))]):t._e()])]),t._v(" "),t.feature_config.optimize_image?e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("image_quality")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Image Quality")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Image optimization is enabled, the image quality must be a value between 1-100.")]),t._v(" "),t.requirements_validator.hasOwnProperty("image_quality")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.image_quality[0]))]):t._e()])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_photo_size")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Photo Size")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Max photo upload size in kb. Must be between 15-100 MB.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_photo_size")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_photo_size[0]))]):t._e()])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_caption_length")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Caption Length")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("The max caption length limit. Must be between 500-10000.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_caption_length")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_caption_length[0]))]):t._e()])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_altext_length")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Alt-text length")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("The alt-text length limit. Must be between 1000-5000.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_altext_length")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_altext_length[0]))]):t._e()])]),t._v(" "),t.feature_config.enforce_account_limit?e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_account_size")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Account Size")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("The account storage limit. Must be 1GB at minimum.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_account_size")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_account_size[0]))]):t._e()])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_album_length")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Album Length")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Max photos per album post. Must be between 4-20.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_album_length")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_album_length[0]))]):t._e()])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("account_deletion")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Account Deletion")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Allow users to delete their own account.")]),t._v(" "),t.requirements_validator.hasOwnProperty("account_deletion")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.account_deletion[0]))]):t._e()])])])])])]):9===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("User Testimonials")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Add testimonials from your users.")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6 list-fade-bottom"},[e("div",{staticClass:"list-group pb-5",staticStyle:{"max-height":"520px","overflow-y":"auto"}},t._l(t.testimonials,(function(a,s){return e("div",{staticClass:"list-group-item",class:[s==t.testimonials.length-1?"mb-5":""]},[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 rounded-circle",attrs:{src:a.profile.avatar,width:"40",h:"40"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("\n "+t._s(a.profile.username)+"\n ")]),t._v(" "),e("p",{staticClass:"small text-muted mt-n1 mb-0"},[t._v("\n Member Since "+t._s(t.formatDate(a.profile.created_at))+"\n ")])])]),t._v(" "),e("div",[e("p",{staticClass:"mb-0 small"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.editTestimonial(a)}}},[t._v("\n Edit\n ")])]),t._v(" "),e("p",{staticClass:"mb-0 small"},[e("a",{staticClass:"text-danger",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.deleteTestimonial(a)}}},[t._v("\n Delete\n ")])])])]),t._v(" "),e("hr",{staticClass:"my-1"}),t._v(" "),e("p",{staticClass:"small font-weight-bold text-muted mb-0 text-center"},[t._v("Testimonial")]),t._v(" "),e("div",{staticClass:"border rounded px-3"},[e("p",{staticClass:"my-2 small",staticStyle:{"white-space":"pre-wrap"},domProps:{innerHTML:t._s(a.body)}})])])})),0)]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[t.isEditingTestimonial?e("div",{staticClass:"card"},[e("div",{staticClass:"card-header font-weight-bold"},[t._v("\n Edit Testimonial\n ")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Username")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.editingTestimonial.profile.username,expression:"editingTestimonial.profile.username"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"test",disabled:""},domProps:{value:t.editingTestimonial.profile.username},on:{input:function(e){e.target.composing||t.$set(t.editingTestimonial.profile,"username",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Testimonial")]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.editingTestimonial.body,expression:"editingTestimonial.body"}],staticClass:"form-control form-control-muted",attrs:{rows:"5"},domProps:{value:t.editingTestimonial.body},on:{input:function(e){e.target.composing||t.$set(t.editingTestimonial,"body",e.target.value)}}}),t._v(" "),e("div",{staticClass:"d-flex justify-content-between"},[e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n Text only, up to 500 characters\n ")]),t._v(" "),e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n "+t._s(t.editingTestimonial.body?t.editingTestimonial.body.length:0)+"/500\n ")])])])]),t._v(" "),e("div",{staticClass:"card-footer"},[e("button",{staticClass:"btn btn-primary btn-block",attrs:{type:"button"},on:{click:t.saveEditTestimonial}},[t._v("\n Save\n ")]),t._v(" "),e("button",{staticClass:"btn btn-secondary btn-block",attrs:{type:"button"},on:{click:t.cancelEditTestimonial}},[t._v("\n Cancel\n ")])])]):e("div",{staticClass:"card"},[t.testimonials.length<10?[e("div",{staticClass:"card-header font-weight-bold"},[t._v("\n Add New Testimonial\n ")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Username")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.testimonial.username,expression:"testimonial.username"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"test"},domProps:{value:t.testimonial.username},on:{input:function(e){e.target.composing||t.$set(t.testimonial,"username",e.target.value)}}}),t._v(" "),e("p",{staticClass:"help-text small text-muted"},[t._v("\n Must be a valid user account\n ")])]),t._v(" "),e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Testimonial")]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.testimonial.body,expression:"testimonial.body"}],staticClass:"form-control form-control-muted",attrs:{rows:"5"},domProps:{value:t.testimonial.body},on:{input:function(e){e.target.composing||t.$set(t.testimonial,"body",e.target.value)}}}),t._v(" "),e("div",{staticClass:"d-flex justify-content-between"},[e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n Text only, up to 500 characters\n ")]),t._v(" "),e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n "+t._s(t.testimonial.body?t.testimonial.body.length:0)+"/500\n ")])])])]),t._v(" "),e("div",{staticClass:"card-footer"},[e("button",{staticClass:"btn btn-primary btn-block",attrs:{type:"button"},on:{click:t.saveTestimonial}},[t._v("Save Testimonial")])])]:[t._m(18)]],2)])])]):t._e()])])])])])])]):e("div",[t._m(19)])},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-lg-6 col-7"},[e("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[t._v("Directory")]),t._v(" "),e("p",{staticClass:"h3 text-white font-weight-light"},[t._v("Manage your server listing on pixelfed.org")])])},function(){var t=this._self._c;return t("p",[t("i",{staticClass:"far fa-exclamation-triangle fa-5x text-lighter"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("p",{staticClass:"display-3 mb-1"},[t._v("Awaiting Approval")]),t._v(" "),e("p",{staticClass:"text-primary mb-1"},[t._v("Awaiting submission approval from pixelfed.org, please check back later!")]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("If you are still waiting for approval after 24 hours please contact the Pixelfed team.")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("p",{staticClass:"display-3 mb-1"},[t._v("Awaiting Update Approval")]),t._v(" "),e("p",{staticClass:"text-primary mb-1"},[t._v("Awaiting updated submission approval from pixelfed.org, please check back later!")]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("If you are still waiting for approval after 24 hours please contact the Pixelfed team.")])])},function(){var t=this._self._c;return t("p",{staticClass:"my-3"},[t("i",{staticClass:"far fa-check-circle fa-4x text-success"})])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mt-2 mb-0"},[t._v("Your server directory listing on "),e("a",{staticClass:"font-weight-bold",attrs:{href:"#"}},[t._v("pixelfed.org")]),t._v(" is active")])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("p",{staticClass:"display-3 mb-1"},[t._v("Oops! An unexpected error occured")]),t._v(" "),e("p",{staticClass:"text-primary mb-1"},[t._v("Ask the Pixelfed team for assistance.")])])},function(){var t=this._self._c;return t("p",{staticClass:"text-center mb-2"},[t("i",{staticClass:"far fa-exclamation-circle fa-2x"})])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"form-text text-muted small mb-0"},[t._v("Must be a "),e("kbd",[t._v("JPEG")]),t._v(" or "),e("kbd",[t._v("PNG")]),t._v(" image no larger than 5MB.")])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"form-text text-muted small mb-0"},[t._v("The primary language of your server, to edit this value you need to set the "),e("kbd",[t._v("APP_LOCALE")]),t._v(" .env value")])},function(){var t=this,e=t._self._c;return e("ul",{staticClass:"text-danger"},[e("li",[t._v("Admins must be active")]),t._v(" "),e("li",[t._v("Admins must have 2FA setup and enabled")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body bg-lighter text-center py-5"},[e("p",{staticClass:"text-light mb-1"},[e("i",{staticClass:"far fa-info-circle fa-3x"})]),t._v(" "),e("p",{staticClass:"h2 mb-0"},[t._v("0 posts selected")]),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v("You can select up to 12 favourite posts by id or popularity")])])},function(){var t=this._self._c;return t("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card card-body bg-primary"},[e("div",{staticClass:"d-flex align-items-center text-white"},[e("i",{staticClass:"far fa-info-circle mr-2"}),t._v(" "),e("p",{staticClass:"small mb-0 font-weight-bold"},[t._v("A post id is the numerical id found in post urls")])])])])},function(){var t=this._self._c;return t("div",{staticClass:"spinner-border text-primary",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this,e=t._self._c;return e("ul",{staticClass:"font-weight-bold"},[e("li",[t._v("No analytics or 3rd party trackers*")]),t._v(" "),e("li",[t._v("User data is not sold to any 3rd parties")]),t._v(" "),e("li",[t._v("Data is stored securely in accordance with industry standards")]),t._v(" "),e("li",[t._v("Admin accounts are protected with 2FA")]),t._v(" "),e("li",[t._v("Follow strict support procedures to keep your accounts safe")]),t._v(" "),e("li",[t._v("Give at least 6 months warning in the event we shut down")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-body text-center py-5"},[e("p",{staticClass:"mb-n3"},[e("i",{staticClass:"far fa-exclamation-circle fa-3x"})]),t._v(" "),e("p",{staticClass:"lead mb-0"},[t._v("No Community Guidelines have been set")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[t._v("You can manage Community Guidelines on the "),e("a",{attrs:{href:"/i/admin/settings"}},[t._v("Settings page")])])},function(){var t=this._self._c;return t("div",{staticClass:"card-body text-center"},[t("p",{staticClass:"lead"},[this._v("You can't add any more testimonials")])])},function(){var t=this._self._c;return t("div",{staticClass:"container my-5 py-5 text-center"},[t("div",{staticClass:"spinner-border text-primary",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])])}]},54449:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"header bg-primary pb-3 mt-n4"},[e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"header-body"},[t._m(0),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Unique Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_unique)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Total Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_posts)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("New (past 14 days)")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.added_14_days)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Banned Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_banned)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("NSFW Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_nsfw)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Clear Trending Cache")]),t._v(" "),e("button",{staticClass:"btn btn-outline-white btn-block btn-sm py-0 mt-1",on:{click:t.clearTrendingCache}},[t._v("Clear Cache")])])])])])])]),t._v(" "),t.loaded?e("div",{staticClass:"m-n2 m-lg-4"},[e("div",{staticClass:"container-fluid mt-4"},[e("div",{staticClass:"row mb-3 justify-content-between"},[e("div",{staticClass:"col-12 col-md-8"},[e("ul",{staticClass:"nav nav-pills"},[e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:0==t.tabIndex}],on:{click:function(e){return t.toggleTab(0)}}},[t._v("All")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:1==t.tabIndex}],on:{click:function(e){return t.toggleTab(1)}}},[t._v("Trending")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:2==t.tabIndex}],on:{click:function(e){return t.toggleTab(2)}}},[t._v("Banned")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:3==t.tabIndex}],on:{click:function(e){return t.toggleTab(3)}}},[t._v("NSFW")])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-4"},[e("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,disabled:t.searchLoading,placeholder:"Search hashtags","aria-label":"Search hashtags","get-result-value":t.getTagResultValue},on:{submit:t.onSearchResultClick},scopedSlots:t._u([{key:"result",fn:function(a){var s=a.result,i=a.props;return[e("li",t._b({staticClass:"autocomplete-result d-flex justify-content-between align-items-center"},"li",i,!1),[e("div",{staticClass:"font-weight-bold",class:{"text-danger":s.is_banned}},[t._v("\n #"+t._s(s.name)+"\n ")]),t._v(" "),e("div",{staticClass:"small text-muted"},[t._v("\n "+t._s(t.prettyCount(s.cached_count))+" posts\n ")])])]}}])})],1)]),t._v(" "),[0,2,3].includes(this.tabIndex)?e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"table table-dark"},[e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("ID","id"))},on:{click:function(e){return t.toggleCol("id")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Hashtag","name"))},on:{click:function(e){return t.toggleCol("name")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Count","cached_count"))},on:{click:function(e){return t.toggleCol("cached_count")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Can Search","can_search"))},on:{click:function(e){return t.toggleCol("can_search")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Can Trend","can_trend"))},on:{click:function(e){return t.toggleCol("can_trend")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("NSFW","is_nsfw"))},on:{click:function(e){return t.toggleCol("is_nsfw")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Banned","is_banned"))},on:{click:function(e){return t.toggleCol("is_banned")}}}),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")])])]),t._v(" "),e("tbody",t._l(t.hashtags,(function(a,s){var i;return e("tr",[e("td",{staticClass:"font-weight-bold text-monospace text-muted"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditHashtagModal(a,s)}}},[t._v("\n "+t._s(a.id)+"\n ")])]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[t._v(t._s(a.name))]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[e("a",{attrs:{href:"/i/web/hashtag/".concat(a.slug)}},[t._v("\n "+t._s(null!==(i=a.cached_count)&&void 0!==i?i:0)+"\n ")])]),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.can_search,"text-success","text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.can_trend,"text-success","text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.is_nsfw,"text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.is_banned,"text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.timeAgo(a.created_at)))])])})),0)])]):t._e(),t._v(" "),[0,2,3].includes(this.tabIndex)?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.pagination.prev},on:{click:function(e){return t.paginate("prev")}}},[t._v("\n Prev\n ")]),t._v(" "),e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.pagination.next},on:{click:function(e){return t.paginate("next")}}},[t._v("\n Next\n ")])]):t._e(),t._v(" "),1==this.tabIndex?e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"table table-dark"},[t._m(1),t._v(" "),e("tbody",t._l(t.trendingTags,(function(a,s){var i;return e("tr",[e("td",{staticClass:"font-weight-bold text-monospace text-muted"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditHashtagModal(a,s)}}},[t._v("\n "+t._s(a.id)+"\n ")])]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[t._v(t._s(a.hashtag))]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[e("a",{attrs:{href:"/i/web/hashtag/".concat(a.hashtag)}},[t._v("\n "+t._s(null!==(i=a.total)&&void 0!==i?i:0)+"\n ")])])])})),0)])]):t._e()])]):e("div",{staticClass:"my-5 text-center"},[e("b-spinner")],1),t._v(" "),e("b-modal",{attrs:{title:"Edit Hashtag","ok-only":!0,lazy:!0,static:!0},model:{value:t.showEditModal,callback:function(e){t.showEditModal=e},expression:"showEditModal"}},[t.editingHashtag&&t.editingHashtag.name?e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v(t._s(t.editingHashtag.name))])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Total Uses")]),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v(t._s(t.editingHashtag.cached_count.toLocaleString("en-CA",{compactDisplay:"short"})))])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Can Trend")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.can_trend,callback:function(e){t.$set(t.editingHashtag,"can_trend",e)},expression:"editingHashtag.can_trend"}})],1)]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Can Search")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.can_search,callback:function(e){t.$set(t.editingHashtag,"can_search",e)},expression:"editingHashtag.can_search"}})],1)]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Banned")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.is_banned,callback:function(e){t.$set(t.editingHashtag,"is_banned",e)},expression:"editingHashtag.is_banned"}})],1)]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("NSFW")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.is_nsfw,callback:function(e){t.$set(t.editingHashtag,"is_nsfw",e)},expression:"editingHashtag.is_nsfw"}})],1)])]):t._e(),t._v(" "),e("transition",{attrs:{name:"fade"}},[t.editingHashtag&&t.editingHashtag.name&&t.editSaved?e("div",[e("p",{staticClass:"text-primary small font-weight-bold text-center mt-1 mb-0"},[t._v("Hashtag changes successfully saved!")])]):t._e()])],1)],1)},i=[function(){var t=this._self._c;return t("div",{staticClass:"row align-items-center py-4"},[t("div",{staticClass:"col-lg-6 col-7"},[t("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[this._v("Hashtags")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Hashtag")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Trending Count")])])])}]},38343:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t,e,a,s=this,i=s._self._c;return i("div",[i("div",{staticClass:"header bg-primary pb-3 mt-n4"},[i("div",{staticClass:"container-fluid"},[i("div",{staticClass:"header-body"},[s._m(0),s._v(" "),i("div",{staticClass:"row"},[i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("Total Instances")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.total_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("New (past 14 days)")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.new_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("Banned Instances")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.banned_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("NSFW Instances")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.nsfw_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("button",{staticClass:"btn btn-outline-white btn-block btn-sm mt-1",on:{click:function(t){t.preventDefault(),s.showAddModal=!0}}},[s._v("Create New Instance")]),s._v(" "),s.showImportForm?i("div",[i("div",{staticClass:"form-group mt-3"},[i("div",{staticClass:"custom-file"},[i("input",{ref:"importInput",staticClass:"custom-file-input",attrs:{type:"file",id:"customFile"},on:{change:s.onImportUpload}}),s._v(" "),i("label",{staticClass:"custom-file-label",attrs:{for:"customFile"}},[s._v("Choose file")])])]),s._v(" "),i("p",{staticClass:"mb-0 mt-n3"},[i("a",{staticClass:"text-white font-weight-bold small",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.showImportForm=!1}}},[s._v("Cancel")])])]):i("div",{staticClass:"d-flex mt-1"},[i("button",{staticClass:"btn btn-outline-white btn-sm mt-1",on:{click:s.openImportForm}},[s._v("Import")]),s._v(" "),i("button",{staticClass:"btn btn-outline-white btn-block btn-sm mt-1",on:{click:function(t){return s.downloadBackup()}}},[s._v("Download Backup")])])])])])])])]),s._v(" "),s.loaded?i("div",{staticClass:"m-n2 m-lg-4"},[i("div",{staticClass:"container-fluid mt-4"},[i("div",{staticClass:"row mb-3 justify-content-between"},[i("div",{staticClass:"col-12 col-md-8"},[i("ul",{staticClass:"nav nav-pills"},[i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:0==s.tabIndex}],on:{click:function(t){return s.toggleTab(0)}}},[s._v("All")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:1==s.tabIndex}],on:{click:function(t){return s.toggleTab(1)}}},[s._v("New")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:2==s.tabIndex}],on:{click:function(t){return s.toggleTab(2)}}},[s._v("Banned")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:3==s.tabIndex}],on:{click:function(t){return s.toggleTab(3)}}},[s._v("NSFW")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:4==s.tabIndex}],on:{click:function(t){return s.toggleTab(4)}}},[s._v("Unlisted")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:5==s.tabIndex}],on:{click:function(t){return s.toggleTab(5)}}},[s._v("Most Users")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:6==s.tabIndex}],on:{click:function(t){return s.toggleTab(6)}}},[s._v("Most Statuses")])])])]),s._v(" "),i("div",{staticClass:"col-12 col-md-4"},[i("autocomplete",{ref:"autocomplete",attrs:{search:s.composeSearch,disabled:s.searchLoading,defaultValue:s.searchQuery,placeholder:"Search instances by domain","aria-label":"Search instances by domain","get-result-value":s.getTagResultValue},on:{submit:s.onSearchResultClick},scopedSlots:s._u([{key:"result",fn:function(t){var e=t.result,a=t.props;return[i("li",s._b({staticClass:"autocomplete-result d-flex justify-content-between align-items-center"},"li",a,!1),[i("div",{staticClass:"font-weight-bold",class:{"text-danger":e.banned}},[s._v("\n\t\t\t\t\t\t\t\t\t"+s._s(e.domain)+"\n\t\t\t\t\t\t\t\t")]),s._v(" "),i("div",{staticClass:"small text-muted"},[s._v("\n\t\t\t\t\t\t\t\t\t"+s._s(s.prettyCount(e.user_count))+" users\n\t\t\t\t\t\t\t\t")])])]}}])})],1)]),s._v(" "),i("div",{staticClass:"table-responsive"},[i("table",{staticClass:"table table-dark"},[i("thead",{staticClass:"thead-dark"},[i("tr",[i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("ID","id"))},on:{click:function(t){return s.toggleCol("id")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Domain","domain"))},on:{click:function(t){return s.toggleCol("domain")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Software","software"))},on:{click:function(t){return s.toggleCol("software")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("User Count","user_count"))},on:{click:function(t){return s.toggleCol("user_count")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Status Count","status_count"))},on:{click:function(t){return s.toggleCol("status_count")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Banned","banned"))},on:{click:function(t){return s.toggleCol("banned")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("NSFW","auto_cw"))},on:{click:function(t){return s.toggleCol("auto_cw")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Unlisted","unlisted"))},on:{click:function(t){return s.toggleCol("unlisted")}}}),s._v(" "),i("th",{attrs:{scope:"col"}},[s._v("Created")])])]),s._v(" "),i("tbody",s._l(s.instances,(function(t,e){return i("tr",[i("td",{staticClass:"font-weight-bold text-monospace text-muted"},[i("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),s.openInstanceModal(t.id)}}},[s._v("\n\t\t\t\t\t\t\t\t\t"+s._s(t.id)+"\n\t\t\t\t\t\t\t\t")])]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(t.domain))]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(t.software))]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(s.prettyCount(t.user_count)))]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(s.prettyCount(t.status_count)))]),s._v(" "),i("td",{staticClass:"font-weight-bold",domProps:{innerHTML:s._s(s.boolIcon(t.banned,"text-danger"))}}),s._v(" "),i("td",{staticClass:"font-weight-bold",domProps:{innerHTML:s._s(s.boolIcon(t.auto_cw,"text-danger"))}}),s._v(" "),i("td",{staticClass:"font-weight-bold",domProps:{innerHTML:s._s(s.boolIcon(t.unlisted,"text-danger"))}}),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(s.timeAgo(t.created_at)))])])})),0)])]),s._v(" "),i("div",{staticClass:"d-flex align-items-center justify-content-center"},[i("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!s.pagination.prev},on:{click:function(t){return s.paginate("prev")}}},[s._v("\n\t\t\t\t\tPrev\n\t\t\t\t")]),s._v(" "),i("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!s.pagination.next},on:{click:function(t){return s.paginate("next")}}},[s._v("\n\t\t\t\t\tNext\n\t\t\t\t")])])])]):i("div",{staticClass:"my-5 text-center"},[i("b-spinner")],1),s._v(" "),i("b-modal",{attrs:{title:"View Instance","header-class":"d-flex align-items-center justify-content-center mb-0 pb-0","ok-title":"Save","ok-disabled":!s.editingInstanceChanges},on:{ok:s.saveInstanceModalChanges},scopedSlots:s._u([{key:"modal-footer",fn:function(){return[i("div",{staticClass:"w-100 d-flex justify-content-between align-items-center"},[i("div",[i("b-button",{attrs:{variant:"outline-danger",size:"sm"},on:{click:s.deleteInstanceModal}},[s._v("\n\t\t\t\t\tDelete\n\t\t\t\t")]),s._v(" "),s.refreshedModalStats?s._e():i("b-button",{attrs:{variant:"outline-primary",size:"sm"},on:{click:s.refreshModalStats}},[s._v("\n\t\t\t\t\tRefresh Stats\n\t\t\t\t")])],1),s._v(" "),i("div",[i("b-button",{attrs:{variant:"link-dark",size:"sm"},on:{click:s.onViewMoreInstance}},[s._v("\n\t\t\t\tView More\n\t\t\t ")]),s._v(" "),i("b-button",{attrs:{variant:"primary"},on:{click:s.saveInstanceModalChanges}},[s._v("\n\t\t\t\tSave\n\t\t\t ")])],1)])]},proxy:!0}]),model:{value:s.showInstanceModal,callback:function(t){s.showInstanceModal=t},expression:"showInstanceModal"}},[s.editingInstance&&s.canEditInstance?i("div",{staticClass:"list-group"},[i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Domain")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(s.editingInstance.domain))])]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[s.editingInstance.software?i("div",[i("div",{staticClass:"text-muted small"},[s._v("Software")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(null!==(t=s.editingInstance.software)&&void 0!==t?t:"Unknown"))])]):s._e(),s._v(" "),i("div",[i("div",{staticClass:"text-muted small"},[s._v("Total Users")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(s.formatCount(null!==(e=s.editingInstance.user_count)&&void 0!==e?e:0)))])]),s._v(" "),i("div",[i("div",{staticClass:"text-muted small"},[s._v("Total Statuses")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(s.formatCount(null!==(a=s.editingInstance.status_count)&&void 0!==a?a:0)))])])]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Banned")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.editingInstance.banned,callback:function(t){s.$set(s.editingInstance,"banned",t)},expression:"editingInstance.banned"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Apply CW to Media")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.editingInstance.auto_cw,callback:function(t){s.$set(s.editingInstance,"auto_cw",t)},expression:"editingInstance.auto_cw"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Unlisted")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.editingInstance.unlisted,callback:function(t){s.$set(s.editingInstance,"unlisted",t)},expression:"editingInstance.unlisted"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex justify-content-between",class:[s.instanceModalNotes?"flex-column gap-2":"align-items-center"]},[i("div",{staticClass:"text-muted small"},[s._v("Notes")]),s._v(" "),i("transition",{attrs:{name:"fade"}},[s.instanceModalNotes?i("div",{staticClass:"w-100"},[i("b-form-textarea",{attrs:{rows:"3","max-rows":"5",maxlength:"500"},model:{value:s.editingInstance.notes,callback:function(t){s.$set(s.editingInstance,"notes",t)},expression:"editingInstance.notes"}}),s._v(" "),i("p",{staticClass:"small text-muted"},[s._v(s._s(s.editingInstance.notes?s.editingInstance.notes.length:0)+"/500")])],1):i("div",{staticClass:"mb-1"},[i("a",{staticClass:"font-weight-bold small",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.showModalNotes()}}},[s._v(s._s(s.editingInstance.notes?"View":"Add"))])])])],1)]):s._e()]),s._v(" "),i("b-modal",{attrs:{title:"Add Instance","ok-title":"Save","ok-disabled":s.addNewInstance.domain.length<2},on:{ok:s.saveNewInstance},model:{value:s.showAddModal,callback:function(t){s.showAddModal=t},expression:"showAddModal"}},[i("div",{staticClass:"list-group"},[i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Domain")]),s._v(" "),i("div",[i("b-form-input",{attrs:{placeholder:"Add domain here"},model:{value:s.addNewInstance.domain,callback:function(t){s.$set(s.addNewInstance,"domain",t)},expression:"addNewInstance.domain"}}),s._v(" "),i("p",{staticClass:"small text-light mb-0"},[s._v("Enter a valid domain without https://")])],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Banned")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.addNewInstance.banned,callback:function(t){s.$set(s.addNewInstance,"banned",t)},expression:"addNewInstance.banned"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Apply CW to Media")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.addNewInstance.auto_cw,callback:function(t){s.$set(s.addNewInstance,"auto_cw",t)},expression:"addNewInstance.auto_cw"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Unlisted")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.addNewInstance.unlisted,callback:function(t){s.$set(s.addNewInstance,"unlisted",t)},expression:"addNewInstance.unlisted"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex flex-column gap-2 justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Notes")]),s._v(" "),i("div",{staticClass:"w-100"},[i("b-form-textarea",{attrs:{rows:"3","max-rows":"5",maxlength:"500",placeholder:"Add optional notes here"},model:{value:s.addNewInstance.notes,callback:function(t){s.$set(s.addNewInstance,"notes",t)},expression:"addNewInstance.notes"}}),s._v(" "),i("p",{staticClass:"small text-muted"},[s._v(s._s(s.addNewInstance.notes?s.addNewInstance.notes.length:0)+"/500")])],1)])])]),s._v(" "),i("b-modal",{attrs:{title:"Import Instance Backup","ok-title":"Import",scrollable:"","ok-disabled":!s.importData||!s.importData.banned.length&&!s.importData.unlisted.length&&!s.importData.auto_cw.length},on:{ok:s.completeImport,cancel:s.cancelImport},model:{value:s.showImportModal,callback:function(t){s.showImportModal=t},expression:"showImportModal"}},[s.showImportModal&&s.importData?i("div",[s.importData.auto_cw&&s.importData.auto_cw.length?i("div",{staticClass:"mb-5"},[i("p",{staticClass:"font-weight-bold text-center my-0"},[s._v("NSFW Instances ("+s._s(s.importData.auto_cw.length)+")")]),s._v(" "),i("p",{staticClass:"small text-center text-muted mb-1"},[s._v("Tap on an instance to remove it.")]),s._v(" "),i("div",{staticClass:"list-group"},s._l(s.importData.auto_cw,(function(t,e){return i("a",{staticClass:"list-group-item d-flex align-items-center justify-content-between",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.filterImportData("auto_cw",e)}}},[s._v("\n\t\t\t\t\t\t"+s._s(t)+"\n\n\t\t\t\t\t\t"),i("span",{staticClass:"badge badge-warning"},[s._v("Auto CW")])])})),0)]):s._e(),s._v(" "),s.importData.unlisted&&s.importData.unlisted.length?i("div",{staticClass:"mb-5"},[i("p",{staticClass:"font-weight-bold text-center my-0"},[s._v("Unlisted Instances ("+s._s(s.importData.unlisted.length)+")")]),s._v(" "),i("p",{staticClass:"small text-center text-muted mb-1"},[s._v("Tap on an instance to remove it.")]),s._v(" "),i("div",{staticClass:"list-group"},s._l(s.importData.unlisted,(function(t,e){return i("a",{staticClass:"list-group-item d-flex align-items-center justify-content-between",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.filterImportData("unlisted",e)}}},[s._v("\n\t\t\t\t\t\t"+s._s(t)+"\n\n\t\t\t\t\t\t"),i("span",{staticClass:"badge badge-primary"},[s._v("Unlisted")])])})),0)]):s._e(),s._v(" "),s.importData.banned&&s.importData.banned.length?i("div",{staticClass:"mb-5"},[i("p",{staticClass:"font-weight-bold text-center my-0"},[s._v("Banned Instances ("+s._s(s.importData.banned.length)+")")]),s._v(" "),i("p",{staticClass:"small text-center text-muted mb-1"},[s._v("Review instances, tap on an instance to remove it.")]),s._v(" "),i("div",{staticClass:"list-group"},s._l(s.importData.banned,(function(t,e){return i("a",{staticClass:"list-group-item d-flex align-items-center justify-content-between",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.filterImportData("banned",e)}}},[s._v("\n\t\t\t\t\t\t"+s._s(t)+"\n\n\t\t\t\t\t\t"),i("span",{staticClass:"badge badge-danger"},[s._v("Banned")])])})),0)]):s._e(),s._v(" "),s.importData.banned.length||s.importData.unlisted.length||s.importData.auto_cw.length?s._e():i("div",[i("div",{staticClass:"text-center"},[i("p",[i("i",{staticClass:"far fa-check-circle fa-4x text-success"})]),s._v(" "),i("p",{staticClass:"lead"},[s._v("Nothing to import!")])])])]):s._e()])],1)},i=[function(){var t=this._self._c;return t("div",{staticClass:"row align-items-center py-4"},[t("div",{staticClass:"col-lg-6 col-7"},[t("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[this._v("Instances")])])])}]},44381:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t,e,a=this,s=a._self._c;return s("div",[s("div",{staticClass:"header bg-primary pb-3 mt-n4"},[s("div",{staticClass:"container-fluid"},[s("div",{staticClass:"header-body"},[a._m(0),a._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Active Reports")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.open+" open reports"}},[a._v("\n "+a._s(a.prettyCount(a.stats.open))+"\n ")])])]),a._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Active Spam Detections")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.autospam_open+" open spam detections"}},[a._v(a._s(a.prettyCount(a.stats.autospam_open)))])])]),a._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Total Reports")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.total+" total reports"}},[a._v(a._s(a.prettyCount(a.stats.total))+"\n ")])])]),a._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Total Spam Detections")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.autospam+" total spam detections"}},[a._v("\n "+a._s(a.prettyCount(a.stats.autospam))+"\n ")])])])])])])]),a._v(" "),a.loaded?s("div",{staticClass:"m-n2 m-lg-4"},[s("div",{staticClass:"container-fluid mt-4"},[s("div",{staticClass:"row mb-3 justify-content-between"},[s("div",{staticClass:"col-12"},[s("ul",{staticClass:"nav nav-pills"},[s("li",{staticClass:"nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:0==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(0)}}},[s("span",[a._v("Open Reports")]),a._v(" "),a.stats.open?s("span",{staticClass:"badge badge-sm badge-floating badge-danger border-white ml-2",staticStyle:{"background-color":"red",color:"white","font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.open))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:2==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(2)}}},[s("span",[a._v("Spam Detections")]),a._v(" "),a.stats.autospam_open?s("span",{staticClass:"badge badge-sm badge-floating badge-danger border-white ml-2",staticStyle:{"background-color":"red",color:"white","font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.autospam_open))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:3==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(3)}}},[s("span",[a._v("Remote Reports")]),a._v(" "),a.stats.remote_open?s("span",{staticClass:"badge badge-sm badge-floating badge-danger border-white ml-2",staticStyle:{"background-color":"red",color:"white","font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.remote_open))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"d-none d-md-block nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:1==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(1)}}},[s("span",[a._v("Closed Reports")]),a._v(" "),a.stats.autospam_open?s("span",{staticClass:"badge badge-sm badge-floating badge-secondary border-white ml-2",staticStyle:{"font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.closed))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"d-none d-md-block nav-item"},[s("a",{staticClass:"nav-link d-flex align-items-center",attrs:{href:"/i/admin/reports/email-verifications"}},[s("span",[a._v("Email Verification Requests")]),a._v(" "),a.stats.email_verification_requests?s("span",{staticClass:"badge badge-sm badge-floating badge-secondary border-white ml-2",staticStyle:{"font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.email_verification_requests))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"d-none d-md-block nav-item"},[s("a",{staticClass:"nav-link d-flex align-items-center",attrs:{href:"/i/admin/reports/appeals"}},[s("span",[a._v("Appeal Requests")]),a._v(" "),a.stats.appeals?s("span",{staticClass:"badge badge-sm badge-floating badge-secondary border-white ml-2",staticStyle:{"font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.appeals))+"\n ")]):a._e()])])])])]),a._v(" "),[0,1].includes(this.tabIndex)?s("div",{staticClass:"table-responsive rounded"},[a.reports&&a.reports.length?s("table",{staticClass:"table table-dark"},[a._m(1),a._v(" "),s("tbody",a._l(a.reports,(function(t,e){return s("tr",[s("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[s("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewReport(t)}}},[a._v("\n "+a._s(t.id)+"\n ")])]),a._v(" "),s("td",{staticClass:"align-middle"},[s("p",{staticClass:"text-capitalize font-weight-bold mb-0",domProps:{innerHTML:a._s(a.reportLabel(t))}})]),a._v(" "),s("td",{staticClass:"align-middle"},[t.reported&&t.reported.id?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.reported.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.reported.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.reported.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.reported.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"align-middle"},[t&&t.reporter&&t.reporter.id?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.reporter.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.reporter.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.reporter.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.reporter.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.reporter.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"font-weight-bold align-middle"},[a._v(a._s(a.timeAgo(t.created_at)))]),a._v(" "),s("td",{staticClass:"align-middle"},[s("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewReport(t)}}},[a._v("View")])])])})),0)]):s("div",[s("div",{staticClass:"card card-body p-5"},[s("div",{staticClass:"d-flex justify-content-between align-items-center flex-column"},[a._m(2),a._v(" "),s("p",{staticClass:"lead"},[a._v(a._s(0===a.tabIndex?"No Active Reports Found!":"No Closed Reports Found!"))])])])])]):a._e(),a._v(" "),[0,1].includes(this.tabIndex)&&a.reports.length&&(a.pagination.prev||a.pagination.next)?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.prev},on:{click:function(t){return a.paginate("prev")}}},[a._v("\n Prev\n ")]),a._v(" "),s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.next},on:{click:function(t){return a.paginate("next")}}},[a._v("\n Next\n ")])]):a._e(),a._v(" "),2===this.tabIndex?s("div",{staticClass:"table-responsive rounded"},[a.autospamLoaded?[a.autospam&&a.autospam.length?s("table",{staticClass:"table table-dark"},[a._m(3),a._v(" "),s("tbody",a._l(a.autospam,(function(t,e){return s("tr",[s("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[s("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewSpamReport(t)}}},[a._v("\n "+a._s(t.id)+"\n ")])]),a._v(" "),a._m(4,!0),a._v(" "),s("td",{staticClass:"align-middle"},[t.status&&t.status.account?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.status.account.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.status.account.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.status.account.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.status.account.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"font-weight-bold align-middle"},[a._v(a._s(a.timeAgo(t.created_at)))]),a._v(" "),s("td",{staticClass:"align-middle"},[s("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewSpamReport(t)}}},[a._v("View")])])])})),0)]):s("div",[a._m(5)])]:s("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{"min-height":"300px"}},[s("b-spinner")],1)],2):a._e(),a._v(" "),2===this.tabIndex&&a.autospamLoaded&&a.autospam&&a.autospam.length?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.autospamPagination.prev},on:{click:function(t){return a.autospamPaginate("prev")}}},[a._v("\n Prev\n ")]),a._v(" "),s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.autospamPagination.next},on:{click:function(t){return a.autospamPaginate("next")}}},[a._v("\n Next\n ")])]):a._e(),a._v(" "),3===this.tabIndex?s("div",{staticClass:"table-responsive rounded"},[a.reports&&a.reports.length?s("table",{staticClass:"table table-dark"},[a._m(6),a._v(" "),s("tbody",a._l(a.reports,(function(t,e){return s("tr",{key:"remote-reports-".concat(t.id,"-").concat(e)},[s("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[s("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.showRemoteReport(t)}}},[a._v("\n "+a._s(t.id)+"\n ")])]),a._v(" "),s("td",{staticClass:"align-middle"},[s("p",{staticClass:"font-weight-bold mb-0"},[a._v(a._s(t.instance))])]),a._v(" "),s("td",{staticClass:"align-middle"},[t.reported&&t.reported.id?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.reported.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.reported.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.reported.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.reported.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"align-middle"},[s("p",{staticClass:"small mb-0 text-wrap",staticStyle:{"max-width":"300px","word-break":"break-all"}},[a._v(a._s(t.message&&t.message.length>120?t.message.slice(0,120)+"...":t.message))])]),a._v(" "),s("td",{staticClass:"font-weight-bold align-middle"},[a._v(a._s(a.timeAgo(t.created_at)))]),a._v(" "),a._m(7,!0)])})),0)]):s("div",[s("div",{staticClass:"card card-body p-5"},[s("div",{staticClass:"d-flex justify-content-between align-items-center flex-column"},[a._m(8),a._v(" "),s("p",{staticClass:"lead"},[a._v(a._s(0===a.tabIndex?"No Active Reports Found!":"No Closed Reports Found!"))])])])])]):a._e(),a._v(" "),3===this.tabIndex&&a.remoteReportsLoaded&&a.reports&&a.reports.length?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.prev},on:{click:function(t){return a.remoteReportPaginate("prev")}}},[a._v("\n Prev\n ")]),a._v(" "),s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.next},on:{click:function(t){return a.remoteReportPaginate("next")}}},[a._v("\n Next\n ")])]):a._e()])]):s("div",{staticClass:"my-5 text-center"},[s("b-spinner")],1),a._v(" "),s("b-modal",{attrs:{title:0===a.tabIndex?"View Report":"Viewing Closed Report","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:a.showReportModal,callback:function(t){a.showReportModal=t},expression:"showReportModal"}},[a.viewingReportLoading?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("b-spinner")],1):[a.viewingReport?s("div",{staticClass:"list-group"},[s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[s("div",{staticClass:"text-muted small"},[a._v("Type")]),a._v(" "),s("div",{staticClass:"font-weight-bold text-capitalize",domProps:{innerHTML:a._s(a.reportLabel(a.viewingReport))}})]),a._v(" "),a.viewingReport.admin_seen_at?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[s("div",{staticClass:"text-muted small"},[a._v("Report Closed")]),a._v(" "),s("div",{staticClass:"font-weight-bold text-capitalize"},[a._v(a._s(a.formatDate(a.viewingReport.admin_seen_at)))])]):a._e(),a._v(" "),a.viewingReport.reporter_message?s("div",{staticClass:"list-group-item d-flex flex-column",staticStyle:{gap:"10px"}},[s("div",{staticClass:"text-muted small"},[a._v("Message")]),a._v(" "),s("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[a._v(a._s(a.viewingReport.reporter_message))])]):a._e()]):a._e(),a._v(" "),s("div",{staticClass:"list-group list-group-horizontal mt-3"},[a.viewingReport&&a.viewingReport.reported?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[a._v("Reported Account")]),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id?s("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(a.viewingReport.reported.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.viewingReport.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0 text-break",class:[a.viewingReport.reported.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[a._v("@"+a._s(a.viewingReport.reported.acct))]),a._v(" "),s("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[s("span",[a._v(a._s(a.viewingReport.reported.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(a.viewingReport.reported.created_at)))])])])])]):a._e()]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reporter?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[a._v("Reporter Account")]),a._v(" "),a.viewingReport.reporter&&null!==(t=a.viewingReport.reporter)&&void 0!==t&&t.id?s("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(null===(e=a.viewingReport.reporter)||void 0===e?void 0:e.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.viewingReport.reporter.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0 text-break",staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[a._v("@"+a._s(a.viewingReport.reporter.acct))]),a._v(" "),s("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[s("span",[a._v(a._s(a.viewingReport.reporter.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(a.viewingReport.reporter.created_at)))])])])])]):a._e()]):a._e()]),a._v(" "),a.viewingReport&&"App\\Status"===a.viewingReport.object_type&&a.viewingReport.status?s("div",{staticClass:"list-group mt-3"},[a.viewingReport&&a.viewingReport.status&&a.viewingReport.status.media_attachments.length?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),"image"===a.viewingReport.status.media_attachments[0].type?s("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.viewingReport.status.media_attachments[0].url,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===a.viewingReport.status.media_attachments[0].type?s("video",{attrs:{height:"140",controls:"",src:a.viewingReport.status.media_attachments[0].url,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):a._e()]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.status?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post Caption")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),s("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[a._v(a._s(a.viewingReport.status.content_text))])]):a._e()]):a.viewingReport&&"App\\Story"===a.viewingReport.object_type&&a.viewingReport.story?s("div",{staticClass:"list-group mt-3"},[a.viewingReport&&a.viewingReport.story?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Story")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingReport.story.url,target:"_blank"}},[a._v("View")])]),a._v(" "),"photo"===a.viewingReport.story.type?s("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.viewingReport.story.media_src,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===a.viewingReport.story.type?s("video",{attrs:{height:"140",controls:"",src:a.viewingReport.story.media_src,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):a._e()]):a._e()]):a._e(),a._v(" "),a.viewingReport&&null===a.viewingReport.admin_seen_at?s("div",{staticClass:"mt-4"},[a.viewingReport&&"App\\Profile"===a.viewingReport.object_type?s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",on:{click:function(t){return a.handleAction("profile","ignore")}}},[a._v("Ignore Report")]),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id&&!a.viewingReport.reported.is_admin?s("hr",{staticClass:"mt-3 mb-1"}):a._e(),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id&&!a.viewingReport.reported.is_admin?s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","nsfw")}}},[a._v("\n Mark all Posts NSFW\n ")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","unlist")}}},[a._v("\n Unlist all Posts\n ")])]):a._e(),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id&&!a.viewingReport.reported.is_admin?s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-2",on:{click:function(t){return a.handleAction("profile","delete")}}},[a._v("\n Delete Profile\n ")]):a._e()]):a.viewingReport&&"App\\Status"===a.viewingReport.object_type?s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",on:{click:function(t){return a.handleAction("post","ignore")}}},[a._v("Ignore Report")]),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("hr",{staticClass:"mt-3 mb-1"}):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","nsfw")}}},[a._v("Mark Post NSFW")]),a._v(" "),"public"===a.viewingReport.status.visibility?s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","unlist")}}},[a._v("Unlist Post")]):"unlisted"===a.viewingReport.status.visibility?s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","private")}}},[a._v("Make Post Private")]):a._e()]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","nsfw")}}},[a._v("Make all NSFW")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","unlist")}}},[a._v("Make all Unlisted")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","private")}}},[a._v("Make all Private")])]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",[s("hr",{staticClass:"my-2"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","delete")}}},[a._v("Delete Post")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","delete")}}},[a._v("Delete Account")])])]):a._e()]):a.viewingReport&&"App\\Story"===a.viewingReport.object_type?s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",on:{click:function(t){return a.handleAction("story","ignore")}}},[a._v("Ignore Report")]),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("hr",{staticClass:"mt-3 mb-1"}):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",[s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-danger btn-block rounded-pill mt-0",on:{click:function(t){return a.handleAction("story","delete")}}},[a._v("Delete Story")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block rounded-pill mt-0",on:{click:function(t){return a.handleAction("story","delete-all")}}},[a._v("Delete All Stories")])])]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",[s("hr",{staticClass:"my-2"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-sm btn-block rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","delete")}}},[a._v("Delete Account")])])]):a._e()]):a._e()]):a._e()]],2),a._v(" "),s("b-modal",{attrs:{title:"Potential Spam Post Detected","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:a.showSpamReportModal,callback:function(t){a.showSpamReportModal=t},expression:"showSpamReportModal"}},[a.viewingSpamReportLoading?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("b-spinner")],1):[s("div",{staticClass:"list-group list-group-horizontal mt-3"},[a.viewingSpamReport&&a.viewingSpamReport.status&&a.viewingSpamReport.status.account?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[a._v("Reported Account")]),a._v(" "),a.viewingSpamReport.status.account&&a.viewingSpamReport.status.account.id?s("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(a.viewingSpamReport.status.account.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.viewingSpamReport.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0 text-break",class:[a.viewingSpamReport.status.account.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[a._v("@"+a._s(a.viewingSpamReport.status.account.acct))]),a._v(" "),s("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[s("span",[a._v(a._s(a.viewingSpamReport.status.account.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(a.viewingSpamReport.status.account.created_at)))])])])])]):a._e()]):a._e()]),a._v(" "),a.viewingSpamReport&&a.viewingSpamReport.status?s("div",{staticClass:"list-group mt-3"},[a.viewingSpamReport&&a.viewingSpamReport.status&&a.viewingSpamReport.status.media_attachments.length?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingSpamReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),"image"===a.viewingSpamReport.status.media_attachments[0].type?s("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.viewingSpamReport.status.media_attachments[0].url,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===a.viewingSpamReport.status.media_attachments[0].type?s("video",{attrs:{height:"140",controls:"",src:a.viewingSpamReport.status.media_attachments[0].url,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):a._e()]):a._e(),a._v(" "),a.viewingSpamReport&&a.viewingSpamReport.status&&a.viewingSpamReport.status.content_text&&a.viewingSpamReport.status.content_text.length?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post Caption")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingSpamReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),s("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[a._v(a._s(a.viewingSpamReport.status.content_text))])]):a._e()]):a._e(),a._v(" "),s("div",{staticClass:"mt-4"},[s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-read")}}},[a._v("\n Mark as Read\n ")]),a._v(" "),s("button",{staticClass:"btn btn-danger btn-block rounded-pill",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-not-spam")}}},[a._v("\n Mark As Not Spam\n ")]),a._v(" "),s("hr",{staticClass:"mt-3 mb-1"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-dark btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-all-read")}}},[a._v("\n Mark All As Read\n ")]),a._v(" "),s("button",{staticClass:"btn btn-dark btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-all-not-spam")}}},[a._v("\n Mark All As Not Spam\n ")])]),a._v(" "),s("div",[s("hr",{staticClass:"my-2"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("delete-profile")}}},[a._v("\n Delete Account\n ")])])])])])]],2),a._v(" "),a.showRemoteReportModal?[s("admin-report-modal",{attrs:{open:a.showRemoteReportModal,model:a.remoteReportModalModel},on:{close:function(t){return a.handleCloseRemoteReportModal()},refresh:function(t){return a.refreshRemoteReports()}}})]:a._e()],2)},i=[function(){var t=this._self._c;return t("div",{staticClass:"row align-items-center py-4"},[t("div",{staticClass:"col-lg-6 col-7"},[t("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[this._v("Moderation")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Report")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported By")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("p",{staticClass:"mt-3 mb-0"},[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Report")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("td",{staticClass:"align-middle"},[t("p",{staticClass:"text-capitalize font-weight-bold mb-0"},[this._v("Spam Post")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body p-5"},[e("div",{staticClass:"d-flex justify-content-between align-items-center flex-column"},[e("p",{staticClass:"mt-3 mb-0"},[e("i",{staticClass:"far fa-check-circle fa-5x text-success"})]),t._v(" "),e("p",{staticClass:"lead"},[t._v("No Spam Reports Found!")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Instance")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Comment")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("td",{staticClass:"align-middle"},[t("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"}},[this._v("View")])])},function(){var t=this._self._c;return t("p",{staticClass:"mt-3 mb-0"},[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])}]},64441:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-3"},[t.status.media_attachments&&t.status.media_attachments.length?e("div",{staticClass:"list-group-item",staticStyle:{gap:"1rem",overflow:"hidden"}},[e("div",{staticClass:"text-center text-muted small font-weight-bold mb-3"},[t._v("Reported Post Media")]),t._v(" "),t.status.media_attachments&&t.status.media_attachments.length?e("div",{staticClass:"d-flex flex-grow-1",staticStyle:{gap:"1rem","overflow-x":"auto"}},[t._l(t.status.media_attachments,(function(a){return["image"===a.type?e("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.url,width:"70",height:"70",onerror:"this.src='/storage/no-preview.png';this.error=null;"},on:{click:t.toggleLightbox}}):"video"===a.type?e("video",{staticClass:"rounded",attrs:{width:"140",height:"90",playsinline:""},on:{click:function(e){return e.preventDefault(),t.toggleVideoLightbox(e,a.url)}}},[e("source",{attrs:{src:a.url,type:a.mime}})]):t._e()]}))],2):t._e()]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item d-flex flex-row flex-grow-1",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"flex-grow-1"},[t.status&&t.status.in_reply_to_id&&t.status.parent&&t.status.parent.account?e("div",{staticClass:"mb-3"},[t.showInReplyTo?[e("div",{staticClass:"mt-n1 text-center text-muted small font-weight-bold mb-1"},[t._v("Reply to")]),t._v(" "),e("div",{staticClass:"media",staticStyle:{gap:"1rem"}},[e("img",{staticClass:"rounded-lg",attrs:{src:t.status.parent.account.avatar,width:"40",height:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"11px"}},[e("a",{attrs:{href:"/i/web/profile/".concat(t.status.parent.account.id),target:"_blank"}},[t._v(t._s(t.status.parent.account.acct))])]),t._v(" "),e("admin-read-more",{attrs:{content:t.status.parent.content_text}}),t._v(" "),e("p",{staticClass:"mb-1"},[e("a",{staticClass:"text-muted",staticStyle:{"font-size":"11px"},attrs:{href:"/i/web/post/".concat(t.status.parent.id),target:"_blank"}},[e("i",{staticClass:"far fa-link mr-1"}),t._v(" "+t._s(t.formatDate(t.status.parent.created_at))+"\n ")])])],1)]),t._v(" "),e("hr",{staticClass:"my-1"})]:e("a",{staticClass:"btn btn-dark font-weight-bold btn-block btn-sm",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showInReplyTo=!0}}},[t._v("Show parent post")])],2):t._e(),t._v(" "),e("div",[e("div",{staticClass:"mt-n1 text-center text-muted small font-weight-bold mb-1"},[t._v("Reported Post")]),t._v(" "),e("div",{staticClass:"media",staticStyle:{gap:"1rem"}},[e("img",{staticClass:"rounded-lg",attrs:{src:t.status.account.avatar,width:"40",height:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"11px"}},[e("a",{attrs:{href:"/i/web/profile/".concat(t.status.account.id),target:"_blank"}},[t._v(t._s(t.status.account.acct))])]),t._v(" "),t.status&&t.status.content_text&&t.status.content_text.length?[e("admin-read-more",{attrs:{content:t.status.content_text}})]:[e("admin-read-more",{staticClass:"font-weight-bold text-muted",attrs:{content:"EMPTY CAPTION"}})],t._v(" "),e("p",{staticClass:"mb-0"},[e("a",{staticClass:"text-muted",staticStyle:{"font-size":"11px"},attrs:{href:"/i/web/post/".concat(t.status.id),target:"_blank"}},[e("i",{staticClass:"far fa-link mr-1"}),t._v(" "+t._s(t.formatDate(t.status.created_at))+"\n ")])])],2)])])])])])},i=[]},62581:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"mb-0",style:{"font-size":"".concat(t.fontSize,"px")}},[t._v(t._s(t.contentText))]),t._v(" "),e("p",{staticClass:"mb-0"},[t.canStepExpand||t.canExpand&&!t.expanded?e("a",{staticClass:"font-weight-bold small",attrs:{href:"#"},on:{click:function(e){return t.expand()}}},[t._v("Read more")]):t._e()])])},i=[]},24664:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("b-modal",{attrs:{title:"Remote Report","ok-only":!0,"ok-title":"Close",lazy:!0,scrollable:!0,"ok-variant":"outline-primary"},on:{hide:function(e){return t.$emit("close")}},model:{value:t.isOpen,callback:function(e){t.isOpen=e},expression:"isOpen"}},[t.isLoading?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("b-spinner")],1):[e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex justify-content-between align-items-center"},[e("div",{staticClass:"text-muted small font-weight-bold"},[t._v("Instance")]),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v(t._s(t.model.instance))])]),t._v(" "),t.model.message&&t.model.message.length?e("div",{staticClass:"list-group-item d-flex justify-content-between align-items-center flex-column gap-1"},[e("div",{staticClass:"text-muted small font-weight-bold mb-2"},[t._v("Message")]),t._v(" "),e("div",{staticClass:"text-wrap w-100",staticStyle:{"word-break":"break-all","font-size":"12.5px"}},[e("admin-read-more",{attrs:{content:t.model.message,"font-size":"11",step:!0,"initial-limit":100,stepLimit:1e3}})],1)]):t._e()]),t._v(" "),e("div",{staticClass:"list-group list-group-horizontal mt-3"},[t.model&&t.model.reported?e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-row flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"text-muted small font-weight-bold"},[t._v("Reported Account")]),t._v(" "),e("div",{staticClass:"d-flex justify-content-end flex-grow-1"},[t.model.reported&&t.model.reported.id?e("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(t.model.reported.id),target:"_blank"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[e("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.model.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0 text-break",class:[t.model.reported.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[t._v("@"+t._s(t.model.reported.acct))]),t._v(" "),e("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[e("span",[t._v(t._s(t.prettyCount(t.model.reported.followers_count))+" Followers")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),e("span",[t._v("Joined "+t._s(t.timeAgo(t.model.reported.created_at)))])])])])]):t._e()])]):e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-center flex-column flex-grow-1"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("Reported Account Unavailable")]),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v("The reported account may have been deleted, or is otherwise not currently active. You can safely "),e("strong",[t._v("Close Report")]),t._v(" to mark this report as read.")])])]),t._v(" "),t.model&&t.model.statuses&&t.model.statuses.length?e("div",{staticClass:"list-group mt-3"},t._l(t.model.statuses,(function(t,a){return e("admin-modal-post",{key:"admin-modal-post-remote-post:".concat(t.id,":").concat(a),attrs:{status:t}})})),1):t._e(),t._v(" "),e("div",{staticClass:"mt-4"},[e("div",[e("button",{staticClass:"btn btn-dark btn-block rounded-pill",attrs:{type:"button"},on:{click:function(e){return t.handleAction("mark-read")}}},[t._v("\n Close Report\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-dark btn-block text-center rounded-pill",staticStyle:{"word-break":"break-all"},attrs:{type:"button"},on:{click:function(e){return t.handleAction("mark-all-read-by-domain")}}},[e("span",{staticClass:"font-weight-light"},[t._v("Close all reports from")]),t._v(" "),e("strong",[t._v(t._s(t.model.instance))])]),t._v(" "),t.model.reported?e("button",{staticClass:"btn btn-outline-dark btn-block rounded-pill flex-grow-1",attrs:{type:"button"},on:{click:function(e){return t.handleAction("mark-all-read-by-username")}}},[e("span",{staticClass:"font-weight-light"},[t._v("Close all reports against")]),t._v(" "),e("strong",[t._v("@"+t._s(t.model.reported.username))])]):t._e(),t._v(" "),t.model&&t.model.statuses&&t.model.statuses.length&&t.model.reported?[e("hr",{staticClass:"mt-3 mb-1"}),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("cw-posts")}}},[t._v("\n Apply CW to Post(s)\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("unlist-posts")}}},[t._v("\n Unlist Post(s)\n ")])]),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2"},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("private-posts")}}},[t._v("\n Make Post(s) Private\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("delete-posts")}}},[t._v("\n Delete Post(s)\n ")])])]:t.model&&t.model.statuses&&!t.model.statuses.length&&t.model.reported?[e("hr",{staticClass:"mt-3 mb-1"}),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("cw-all-posts")}}},[t._v("\n Apply CW to all posts\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("unlist-all-posts")}}},[t._v("\n Unlist all account posts\n ")])]),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("private-all-posts")}}},[t._v("\n Make all posts private\n ")])])]:t._e()],2)])]],2)},i=[]},36671:(t,e,a)=>{a(74692);a(9901),window._=a(2543),window.Popper=a(48851).default,window.pixelfed=window.pixelfed||{},window.$=a(74692),a(52754),window.axios=a(86425),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",a(63899),window.filesize=a(91139),window.Cookies=a(12215),a(81027),a(66482),window.Chart=a(62477),a(83925),Chart.defaults.global.defaultFontFamily="-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif",Array.from(document.querySelectorAll(".pagination .page-link")).filter((function(t){return"« Previous"===t.textContent||"Next »"===t.textContent})).forEach((function(t){return t.textContent="Next »"===t.textContent?"›":"‹"})),Vue.component("admin-autospam",a(80430).default),Vue.component("admin-directory",a(65465).default),Vue.component("admin-reports",a(13929).default),Vue.component("instances-component",a(50828).default),Vue.component("hashtag-component",a(47739).default)},83925:(t,e,a)=>{"use strict";var s=a(74692);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}!function(){function t(){s(".sidenav-toggler").addClass("active"),s(".sidenav-toggler").data("action","sidenav-unpin"),s("body").removeClass("g-sidenav-hidden").addClass("g-sidenav-show g-sidenav-pinned"),s("body").append('
1&&(o+=''+i+""),o+=''+a+n+s+""}}}(t,a),a.update()}return window.Chart&&r(Chart,(t={defaults:{global:{responsive:!0,maintainAspectRatio:!1,defaultColor:o.gray[600],defaultFontColor:o.gray[600],defaultFontFamily:n.base,defaultFontSize:13,layout:{padding:0},legend:{display:!1,position:"bottom",labels:{usePointStyle:!0,padding:16}},elements:{point:{radius:0,backgroundColor:o.theme.primary},line:{tension:.4,borderWidth:4,borderColor:o.theme.primary,backgroundColor:o.transparent,borderCapStyle:"rounded"},rectangle:{backgroundColor:o.theme.warning},arc:{backgroundColor:o.theme.primary,borderColor:o.white,borderWidth:4}},tooltips:{enabled:!0,mode:"index",intersect:!1}},doughnut:{cutoutPercentage:83,legendCallback:function(t){var e=t.data,a="";return e.labels.forEach((function(t,s){var i=e.datasets[0].backgroundColor[s];a+='',a+='',a+=t,a+=""})),a}}}},Chart.scaleService.updateScaleDefaults("linear",{gridLines:{borderDash:[2],borderDashOffset:[2],color:o.gray[300],drawBorder:!1,drawTicks:!1,drawOnChartArea:!0,zeroLineWidth:0,zeroLineColor:"rgba(0,0,0,0)",zeroLineBorderDash:[2],zeroLineBorderDashOffset:[2]},ticks:{beginAtZero:!0,padding:10,callback:function(t){if(!(t%10))return t}}}),Chart.scaleService.updateScaleDefaults("category",{gridLines:{drawBorder:!1,drawOnChartArea:!1,drawTicks:!1},ticks:{padding:20},maxBarThickness:10}),t)),e.on({change:function(){var t=s(this);t.is("[data-add]")&&d(t)},click:function(){var t=s(this);t.is("[data-update]")&&u(t)}}),{colors:o,fonts:n,mode:a}}(),_=((r=s(o=".btn-icon-clipboard")).length&&((n=r).tooltip().on("mouseleave",(function(){n.tooltip("hide")})),new ClipboardJS(o).on("success",(function(t){s(t.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle"),t.clearSelection()}))),l=s(".navbar-nav, .navbar-nav .nav"),c=s(".navbar .collapse"),d=s(".navbar .dropdown"),c.on({"show.bs.collapse":function(){!function(t){t.closest(l).find(c).not(t).collapse("hide")}(s(this))}}),d.on({"hide.bs.dropdown":function(){!function(t){var e=t.find(".dropdown-menu");e.addClass("close"),setTimeout((function(){e.removeClass("close")}),200)}(s(this))}}),function(){s(".navbar-nav");var t=s(".navbar .navbar-custom-collapse");t.length&&(t.on({"hide.bs.collapse":function(){!function(t){t.addClass("collapsing-out")}(t)}}),t.on({"hidden.bs.collapse":function(){!function(t){t.removeClass("collapsing-out")}(t)}}));var e=0;s(".sidenav-toggler").click((function(){if(1==e)s("body").removeClass("nav-open"),e=0,s(".bodyClick").remove();else{s('
').appendTo("body").click((function(){s("body").removeClass("nav-open"),e=0,s(".bodyClick").remove()})),s("body").addClass("nav-open"),e=1}}))}(),u=s('[data-toggle="popover"]'),p="",u.length&&u.each((function(){!function(t){t.data("color")&&(p="popover-"+t.data("color"));var e={trigger:"focus",template:''};t.popover(e)}(s(this))})),function(){var t=s(".scroll-me, [data-scroll-to], .toc-entry a");function e(t){var e=t.attr("href"),a=t.data("scroll-to-offset")?t.data("scroll-to-offset"):0,i={scrollTop:s(e).offset().top-a};s("html, body").stop(!0,!0).animate(i,600),event.preventDefault()}t.length&&t.on("click",(function(t){e(s(this))}))}(),(m=s('[data-toggle="tooltip"]')).length&&m.tooltip(),(v=s(".form-control")).length&&function(t){t.on("focus blur",(function(t){s(this).parents(".form-group").toggleClass("focused","focus"===t.type)})).trigger("blur")}(v),(f=s("#chart-bars")).length&&function(t){var e=new Chart(t,{type:"bar",data:{labels:["Jul","Aug","Sep","Oct","Nov","Dec"],datasets:[{label:"Sales",data:[25,20,30,22,17,29]}]}});t.data("chart",e)}(f),function(){var t=s("#c1-dark");t.length&&function(t){var e=new Chart(t,{type:"line",options:{scales:{yAxes:[{gridLines:{lineWidth:1,color:b.colors.gray[900],zeroLineColor:b.colors.gray[900]},ticks:{callback:function(t){if(!(t%10))return t}}}]},tooltips:{callbacks:{label:function(t,e){var a=e.datasets[t.datasetIndex].label||"",s=t.yLabel,i="";return e.datasets.length>1&&(i+=a),i+(s+" posts")}}}},data:{labels:["7","6","5","4","3","2","1"],datasets:[{label:"",data:s(".posts-this-week").data("update").data.datasets[0].data}]}});t.data("chart",e)}(t)}(),(h=s(".datepicker")).length&&h.each((function(){!function(t){t.datepicker({disableTouchKeyboard:!0,autoclose:!1})}(s(this))})),function(){if(s(".input-slider-container")[0]&&s(".input-slider-container").each((function(){var t=s(this).find(".input-slider"),e=t.attr("id"),a=t.data("range-value-min"),i=t.data("range-value-max"),n=s(this).find(".range-slider-value"),o=n.attr("id"),r=n.data("range-value-low"),l=document.getElementById(e),c=document.getElementById(o);_.create(l,{start:[parseInt(r)],connect:[!0,!1],range:{min:[parseInt(a)],max:[parseInt(i)]}}),l.noUiSlider.on("update",(function(t,e){c.textContent=t[e]}))})),s("#input-slider-range")[0]){var t=document.getElementById("input-slider-range"),e=document.getElementById("input-slider-range-value-low"),a=document.getElementById("input-slider-range-value-high"),i=[e,a];_.create(t,{start:[parseInt(e.getAttribute("data-range-value-low")),parseInt(a.getAttribute("data-range-value-high"))],connect:!0,range:{min:parseInt(t.getAttribute("data-range-value-min")),max:parseInt(t.getAttribute("data-range-value-max"))}}),t.noUiSlider.on("update",(function(t,e){i[e].textContent=t[e]}))}}());(g=s(".scrollbar-inner")).length&&g.scrollbar().scrollLock()},9901:function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}!function(){var e="object"===("undefined"==typeof window?"undefined":t(window))?window:"object"===("undefined"==typeof self?"undefined":t(self))?self:this,a=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder;e.URL=e.URL||e.webkitURL||function(t,e){return(e=document.createElement("a")).href=t,e};var s=e.Blob,i=URL.createObjectURL,n=URL.revokeObjectURL,o=e.Symbol&&e.Symbol.toStringTag,r=!1,c=!1,d=!!e.ArrayBuffer,u=a&&a.prototype.append&&a.prototype.getBlob;try{r=2===new Blob(["ä"]).size,c=2===new Blob([new Uint8Array([1,2])]).size}catch(t){}function p(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var a=new Uint8Array(t.byteLength);a.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=a.buffer}return e}return t}))}function m(t,e){e=e||{};var s=new a;return p(t).forEach((function(t){s.append(t)})),e.type?s.getBlob(e.type):s.getBlob()}function v(t,e){return new s(p(t),e||{})}e.Blob&&(m.prototype=Blob.prototype,v.prototype=Blob.prototype);var f="function"==typeof TextEncoder?TextEncoder.prototype.encode.bind(new TextEncoder):function(t){for(var a=0,s=t.length,i=e.Uint8Array||Array,n=0,o=Math.max(32,s+(s>>1)+7),r=new i(o>>3<<3);a=55296&&l<=56319){if(a=55296&&l<=56319)continue}if(n+4>r.length){o+=8,o=(o*=1+a/t.length*2)>>3<<3;var d=new Uint8Array(o);d.set(r),r=d}if(0!=(4294967168&l)){if(0==(4294965248&l))r[n++]=l>>6&31|192;else if(0==(4294901760&l))r[n++]=l>>12&15|224,r[n++]=l>>6&63|128;else{if(0!=(4292870144&l))continue;r[n++]=l>>18&7|240,r[n++]=l>>12&63|128,r[n++]=l>>6&63|128}r[n++]=63&l|128}else r[n++]=l}return r.slice(0,n)},h="function"==typeof TextDecoder?TextDecoder.prototype.decode.bind(new TextDecoder):function(t){for(var e=t.length,a=[],s=0;s239?4:l>223?3:l>191?2:1;if(s+d<=e)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(i=t[s+1]))&&(r=(31&l)<<6|63&i)>127&&(c=r);break;case 3:i=t[s+1],n=t[s+2],128==(192&i)&&128==(192&n)&&(r=(15&l)<<12|(63&i)<<6|63&n)>2047&&(r<55296||r>57343)&&(c=r);break;case 4:i=t[s+1],n=t[s+2],o=t[s+3],128==(192&i)&&128==(192&n)&&128==(192&o)&&(r=(15&l)<<18|(63&i)<<12|(63&n)<<6|63&o)>65535&&r<1114112&&(c=r)}null===c?(c=65533,d=1):c>65535&&(c-=65536,a.push(c>>>10&1023|55296),c=56320|1023&c),a.push(c),s+=d}var u=a.length,p="";for(s=0;s>2,d=(3&i)<<4|o>>4,u=(15&o)<<2|l>>6,p=63&l;r||(p=64,n||(u=64)),a.push(e[c],e[d],e[u],e[p])}return a.join("")}var s=Object.create||function(t){function e(){}return e.prototype=t,new e};if(d)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function c(a,s){s=null==s?{}:s;for(var i=0,n=(a=a||[]).length;i=e.size&&a.close()}))}})}}catch(t){try{new ReadableStream({}),b=function(t){var e=0;t=this;return new ReadableStream({pull:function(a){return t.slice(e,e+524288).arrayBuffer().then((function(s){e+=s.byteLength;var i=new Uint8Array(s);a.enqueue(i),e==t.size&&a.close()}))}})}}catch(t){try{new Response("").body.getReader().read(),b=function(){return new Response(this).body}}catch(t){b=function(){throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill")}}}}_.arrayBuffer||(_.arrayBuffer=function(){var t=new FileReader;return t.readAsArrayBuffer(this),C(t)}),_.text||(_.text=function(){var t=new FileReader;return t.readAsText(this),C(t)}),_.stream||(_.stream=b)}(),function(t){"use strict";var e,a=t.Uint8Array,s=t.HTMLCanvasElement,i=s&&s.prototype,n=/\s*;\s*base64\s*(?:;|$)/i,o="toDataURL",r=function(t){for(var s,i,n=t.length,o=new a(n/4*3|0),r=0,l=0,c=[0,0],d=0,u=0;n--;)i=t.charCodeAt(r++),255!==(s=e[i-43])&&undefined!==s&&(c[1]=c[0],c[0]=i,u=u<<6|s,4===++d&&(o[l++]=u>>>16,61!==c[1]&&(o[l++]=u>>>8),61!==c[0]&&(o[l++]=u),d=0));return o};a&&(e=new a([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),!s||i.toBlob&&i.toBlobHD||(i.toBlob||(i.toBlob=function(t,e){if(e||(e="image/png"),this.mozGetAsFile)t(this.mozGetAsFile("canvas",e));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(e))t(this.msToBlob());else{var s,i=Array.prototype.slice.call(arguments,1),l=this[o].apply(this,i),c=l.indexOf(","),d=l.substring(c+1),u=n.test(l.substring(0,c));Blob.fake?((s=new Blob).encoding=u?"base64":"URI",s.data=d,s.size=d.length):a&&(s=u?new Blob([r(d)],{type:e}):new Blob([decodeURIComponent(d)],{type:e})),t(s)}}),!i.toBlobHD&&i.toDataURLHD?i.toBlobHD=function(){o="toDataURLHD";var t=this.toBlob();return o="toDataURL",t}:i.toBlobHD=i.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},86700:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(76798),i=a.n(s)()((function(t){return t[1]}));i.push([t.id,".gap-2[data-v-e104c6c0]{gap:1rem}",""]);const n=i},35358:(t,e,a)=>{var s={"./af":25177,"./af.js":25177,"./ar":61509,"./ar-dz":41488,"./ar-dz.js":41488,"./ar-kw":58676,"./ar-kw.js":58676,"./ar-ly":42353,"./ar-ly.js":42353,"./ar-ma":24496,"./ar-ma.js":24496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":82682,"./ar-sa.js":82682,"./ar-tn":89756,"./ar-tn.js":89756,"./ar.js":61509,"./az":95533,"./az.js":95533,"./be":28959,"./be.js":28959,"./bg":47777,"./bg.js":47777,"./bm":54903,"./bm.js":54903,"./bn":61290,"./bn-bd":17357,"./bn-bd.js":17357,"./bn.js":61290,"./bo":31545,"./bo.js":31545,"./br":11470,"./br.js":11470,"./bs":44429,"./bs.js":44429,"./ca":7306,"./ca.js":7306,"./cs":56464,"./cs.js":56464,"./cv":73635,"./cv.js":73635,"./cy":64226,"./cy.js":64226,"./da":93601,"./da.js":93601,"./de":77853,"./de-at":26111,"./de-at.js":26111,"./de-ch":54697,"./de-ch.js":54697,"./de.js":77853,"./dv":60708,"./dv.js":60708,"./el":54691,"./el.js":54691,"./en-au":53872,"./en-au.js":53872,"./en-ca":28298,"./en-ca.js":28298,"./en-gb":56195,"./en-gb.js":56195,"./en-ie":66584,"./en-ie.js":66584,"./en-il":65543,"./en-il.js":65543,"./en-in":9033,"./en-in.js":9033,"./en-nz":79402,"./en-nz.js":79402,"./en-sg":20623,"./en-sg.js":20623,"./eo":32934,"./eo.js":32934,"./es":97650,"./es-do":20838,"./es-do.js":20838,"./es-mx":17730,"./es-mx.js":17730,"./es-us":56575,"./es-us.js":56575,"./es.js":97650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":90527,"./fi.js":90527,"./fil":95995,"./fil.js":95995,"./fo":52477,"./fo.js":52477,"./fr":85498,"./fr-ca":26435,"./fr-ca.js":26435,"./fr-ch":37892,"./fr-ch.js":37892,"./fr.js":85498,"./fy":37071,"./fy.js":37071,"./ga":41734,"./ga.js":41734,"./gd":70217,"./gd.js":70217,"./gl":77329,"./gl.js":77329,"./gom-deva":32124,"./gom-deva.js":32124,"./gom-latn":93383,"./gom-latn.js":93383,"./gu":95050,"./gu.js":95050,"./he":11713,"./he.js":11713,"./hi":43861,"./hi.js":43861,"./hr":26308,"./hr.js":26308,"./hu":90609,"./hu.js":90609,"./hy-am":17160,"./hy-am.js":17160,"./id":74063,"./id.js":74063,"./is":89374,"./is.js":89374,"./it":88383,"./it-ch":21827,"./it-ch.js":21827,"./it.js":88383,"./ja":23827,"./ja.js":23827,"./jv":89722,"./jv.js":89722,"./ka":41794,"./ka.js":41794,"./kk":27088,"./kk.js":27088,"./km":96870,"./km.js":96870,"./kn":84451,"./kn.js":84451,"./ko":63164,"./ko.js":63164,"./ku":98174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":98174,"./ky":78474,"./ky.js":78474,"./lb":79680,"./lb.js":79680,"./lo":15867,"./lo.js":15867,"./lt":45766,"./lt.js":45766,"./lv":69532,"./lv.js":69532,"./me":58076,"./me.js":58076,"./mi":41848,"./mi.js":41848,"./mk":30306,"./mk.js":30306,"./ml":73739,"./ml.js":73739,"./mn":99053,"./mn.js":99053,"./mr":86169,"./mr.js":86169,"./ms":73386,"./ms-my":92297,"./ms-my.js":92297,"./ms.js":73386,"./mt":77075,"./mt.js":77075,"./my":72264,"./my.js":72264,"./nb":22274,"./nb.js":22274,"./ne":8235,"./ne.js":8235,"./nl":92572,"./nl-be":43784,"./nl-be.js":43784,"./nl.js":92572,"./nn":54566,"./nn.js":54566,"./oc-lnc":69330,"./oc-lnc.js":69330,"./pa-in":29849,"./pa-in.js":29849,"./pl":94418,"./pl.js":94418,"./pt":79834,"./pt-br":48303,"./pt-br.js":48303,"./pt.js":79834,"./ro":24457,"./ro.js":24457,"./ru":82271,"./ru.js":82271,"./sd":1221,"./sd.js":1221,"./se":33478,"./se.js":33478,"./si":17538,"./si.js":17538,"./sk":5784,"./sk.js":5784,"./sl":46637,"./sl.js":46637,"./sq":86794,"./sq.js":86794,"./sr":45719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":45719,"./ss":56e3,"./ss.js":56e3,"./sv":41011,"./sv.js":41011,"./sw":40748,"./sw.js":40748,"./ta":11025,"./ta.js":11025,"./te":11885,"./te.js":11885,"./tet":28861,"./tet.js":28861,"./tg":86571,"./tg.js":86571,"./th":55802,"./th.js":55802,"./tk":59527,"./tk.js":59527,"./tl-ph":29231,"./tl-ph.js":29231,"./tlh":31052,"./tlh.js":31052,"./tr":85096,"./tr.js":85096,"./tzl":79846,"./tzl.js":79846,"./tzm":81765,"./tzm-latn":97711,"./tzm-latn.js":97711,"./tzm.js":81765,"./ug-cn":48414,"./ug-cn.js":48414,"./uk":16618,"./uk.js":16618,"./ur":57777,"./ur.js":57777,"./uz":57609,"./uz-latn":72475,"./uz-latn.js":72475,"./uz.js":57609,"./vi":21135,"./vi.js":21135,"./x-pseudo":64051,"./x-pseudo.js":64051,"./yo":82218,"./yo.js":82218,"./zh-cn":52648,"./zh-cn.js":52648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":31541,"./zh-mo.js":31541,"./zh-tw":50304,"./zh-tw.js":50304};function i(t){var e=n(t);return a(e)}function n(t){if(!a.o(s,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return s[t]}i.keys=function(){return Object.keys(s)},i.resolve=n,t.exports=i,i.id=35358},55099:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});var s=a(85072),i=a.n(s),n=a(86700),o={insert:"head",singleton:!1};i()(n.default,o);const r=n.default.locals||{}},80430:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(66196),i=a(45941),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},65465:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(36809),i=a(19990),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},47739:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(77764),i=a(41660),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},50828:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(63152),i=a(32311),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);a(87974);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,"e104c6c0",null).exports},13929:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(31722),i=a(13398),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},27707:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(67774),i=a(41304),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},8889:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(43512),i=a(64814),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},98385:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(1711),i=a(41094),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},45941:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(95366),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},19990:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(71847),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},41660:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(44107),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},32311:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(56310),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},13398:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(51839),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},41304:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(99697),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},64814:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(72173),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},41094:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(47835),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},66196:(t,e,a)=>{"use strict";a.r(e);var s=a(69385),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},36809:(t,e,a)=>{"use strict";a.r(e);var s=a(41298),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},77764:(t,e,a)=>{"use strict";a.r(e);var s=a(54449),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},63152:(t,e,a)=>{"use strict";a.r(e);var s=a(38343),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},31722:(t,e,a)=>{"use strict";a.r(e);var s=a(44381),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},67774:(t,e,a)=>{"use strict";a.r(e);var s=a(64441),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},43512:(t,e,a)=>{"use strict";a.r(e);var s=a(62581),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},1711:(t,e,a)=>{"use strict";a.r(e);var s=a(24664),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},87974:(t,e,a)=>{"use strict";a.r(e);var s=a(55099),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)}},t=>{t.O(0,[3660],(()=>{return e=36671,t(t.s=e);var e}));t.O()}]); \ No newline at end of file +(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[9567],{95366:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});var s=a(2e4);a(87980);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(){n=function(){return e};var t,e={},a=Object.prototype,s=a.hasOwnProperty,o=Object.defineProperty||function(t,e,a){t[e]=a.value},r="function"==typeof Symbol?Symbol:{},l=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",d=r.toStringTag||"@@toStringTag";function u(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,a){return t[e]=a}}function m(t,e,a,s){var i=e&&e.prototype instanceof b?e:b,n=Object.create(i.prototype),r=new D(s||[]);return o(n,"_invoke",{value:A(t,a,r)}),n}function p(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}e.wrap=m;var v="suspendedStart",f="suspendedYield",h="executing",g="completed",_={};function b(){}function C(){}function w(){}var y={};u(y,l,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(M([])));k&&k!==a&&s.call(k,l)&&(y=k);var S=w.prototype=b.prototype=Object.create(y);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function a(n,o,r,l){var c=p(t[n],t,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==i(u)&&s.call(u,"__await")?e.resolve(u.__await).then((function(t){a("next",t,r,l)}),(function(t){a("throw",t,r,l)})):e.resolve(u).then((function(t){d.value=t,r(d)}),(function(t){return a("throw",t,r,l)}))}l(c.arg)}var n;o(this,"_invoke",{value:function(t,s){function i(){return new e((function(e,i){a(t,s,e,i)}))}return n=n?n.then(i,i):i()}})}function A(e,a,s){var i=v;return function(n,o){if(i===h)throw new Error("Generator is already running");if(i===g){if("throw"===n)throw o;return{value:t,done:!0}}for(s.method=n,s.arg=o;;){var r=s.delegate;if(r){var l=I(r,s);if(l){if(l===_)continue;return l}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(i===v)throw i=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);i=h;var c=p(e,a,s);if("normal"===c.type){if(i=s.done?g:f,c.arg===_)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(i=g,s.method="throw",s.arg=c.arg)}}}function I(e,a){var s=a.method,i=e.iterator[s];if(i===t)return a.delegate=null,"throw"===s&&e.iterator.return&&(a.method="return",a.arg=t,I(e,a),"throw"===a.method)||"return"!==s&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+s+"' method")),_;var n=p(i,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,_;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function M(e){if(e||""===e){var a=e[l];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function a(){for(;++n=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),j(a),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var s=a.completion;if("throw"===s.type){var i=s.arg;j(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,s){return this.delegate={iterator:M(e),resultName:a,nextLoc:s},"next"===this.method&&(this.arg=t),_}},e}function o(t,e,a,s,i,n,o){try{var r=t[n](o),l=r.value}catch(t){return void a(t)}r.done?e(l):Promise.resolve(l).then(s,i)}const r={components:{Autocomplete:s.default},data:function(){return{loaded:!1,tabIndex:0,config:{autospam_enabled:null,open:0,closed:0},closedReports:[],closedReportsFetched:!1,closedReportsCursor:null,closedReportsCanLoadMore:!1,showSpamReportModal:!1,showSpamReportModalLoading:!0,viewingSpamReport:void 0,viewingSpamReportLoading:!1,showNonSpamModal:!1,nonSpamAccounts:[],searchLoading:!1,customTokens:[],customTokensFetched:!1,customTokensCanLoadMore:!1,showCreateTokenModal:!1,customTokenForm:{token:void 0,weight:1,category:"spam",note:void 0,active:!0},showEditTokenModal:!1,editCustomToken:{},editCustomTokenForm:{token:void 0,weight:1,category:"spam",note:void 0,active:!0}}},mounted:function(){var t=this;setTimeout((function(){t.loaded=!0,t.fetchConfig()}),1e3)},methods:{toggleTab:function(t){var e=this;this.tabIndex=t,0==t&&setTimeout((function(){e.initChart()}),500),"closed_reports"!==t||this.closedReportsFetched||this.fetchClosedReports(),"manage_tokens"!==t||this.customTokensFetched||this.fetchCustomTokens()},formatCount:function(t){return App.util.format.count(t)},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},fetchConfig:function(){var t=this;axios.post("/i/admin/api/autospam/config").then((function(e){t.config=e.data,t.loaded=!0})).finally((function(){setTimeout((function(){t.initChart()}),100)}))},initChart:function(){new Chart(document.querySelector("#c1-dark"),{type:"line",options:{scales:{yAxes:[{gridLines:{lineWidth:1,color:"#212529",zeroLineColor:"#212529"}}]}},data:{datasets:[{data:this.config.graph}],labels:this.config.graphLabels}})},fetchClosedReports:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/autospam/reports/closed";axios.post(e).then((function(e){t.closedReports=e.data})).finally((function(){t.closedReportsFetched=!0}))},viewSpamReport:function(t){this.viewingSpamReportLoading=!1,this.viewingSpamReport=t,this.showSpamReportModal=!0,setTimeout((function(){pixelfed.readmore()}),500)},autospamPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.closedReports.links.next:this.closedReports.links.prev;this.fetchClosedReports(e)},autospamTrainSpam:function(){event.currentTarget.blur(),axios.post("/i/admin/api/autospam/train").then((function(t){swal("Training Autospam!","A background job has been dispatched to train Autospam!","success"),setTimeout((function(){window.location.reload()}),1e4)})).catch((function(t){422===t.response.status?swal("Error",t.response.data.error,"error"):swal("Error","Oops, an error occured, please try again later","error")}))},autospamTrainNonSpam:function(){this.showNonSpamModal=!0},composeSearch:function(t){var e=this;return t.length<1?[]:axios.post("/i/admin/api/autospam/search/non-spam",{q:t}).then((function(t){return t.data.filter((function(t){return!e.nonSpamAccounts||!e.nonSpamAccounts.length||e.nonSpamAccounts&&-1==e.nonSpamAccounts.map((function(t){return t.id})).indexOf(t.id)}))}))},getTagResultValue:function(t){return t.username},onSearchResultClick:function(t){-1==this.nonSpamAccounts.map((function(t){return t.id})).indexOf(t.id)&&this.nonSpamAccounts.push(t)},autospamTrainNonSpamRemove:function(t){this.nonSpamAccounts.splice(t,1)},autospamTrainNonSpamSubmit:function(){this.showNonSpamModal=!1,axios.post("/i/admin/api/autospam/train/non-spam",{accounts:this.nonSpamAccounts}).then((function(t){swal("Training Autospam!","A background job has been dispatched to train Autospam!","success"),setTimeout((function(){window.location.reload()}),1e4)})).catch((function(t){422===t.response.status?swal("Error",t.response.data.error,"error"):swal("Error","Oops, an error occured, please try again later","error")}))},fetchCustomTokens:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/autospam/tokens/custom";axios.post(e).then((function(e){t.customTokens=e.data})).finally((function(){t.customTokensFetched=!0}))},handleSaveToken:function(){var t=this;axios.post("/i/admin/api/autospam/tokens/store",this.customTokenForm).then((function(t){console.log(t.data)})).catch((function(t){swal("Oops! An Error Occured",t.response.data.message,"error")})).finally((function(){t.customTokenForm={token:void 0,weight:1,category:"spam",note:void 0,active:!0},t.fetchCustomTokens()}))},openEditTokenModal:function(t){event.currentTarget.blur(),this.editCustomToken=t,this.editCustomTokenForm=t,this.showEditTokenModal=!0},handleUpdateToken:function(){axios.post("/i/admin/api/autospam/tokens/update",this.editCustomTokenForm).then((function(t){console.log(t.data)}))},autospamTokenPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.customTokens.next_page_url:this.customTokens.prev_page_url;this.fetchCustomTokens(e)},downloadExport:function(){event.currentTarget.blur(),axios.post("/i/admin/api/autospam/tokens/export",{},{responseType:"blob"}).then((function(t){var e=document.createElement("a");e.setAttribute("download","pixelfed-autospam-export.json");var a=URL.createObjectURL(t.data);e.href=a,e.setAttribute("target","_blank"),e.click(),URL.revokeObjectURL(a)})).catch(function(){var t,e=(t=n().mark((function t(e){var a;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=e.response.data,!("blob"===e.request.responseType&&e.response.data instanceof Blob&&e.response.data.type&&-1!=e.response.data.type.toLowerCase().indexOf("json"))){t.next=8;break}return t.t0=JSON,t.next=5,e.response.data.text();case 5:t.t1=t.sent,a=t.t0.parse.call(t.t0,t.t1),swal("Export Error",a.error,"error");case 8:case 9:case"end":return t.stop()}}),t)})),function(){var e=this,a=arguments;return new Promise((function(s,i){var n=t.apply(e,a);function r(t){o(n,s,i,r,l,"next",t)}function l(t){o(n,s,i,r,l,"throw",t)}r(void 0)}))});return function(t){return e.apply(this,arguments)}}())},enableAdvanced:function(){event.currentTarget.blur(),!this.config.files.spam.exists||!this.config.files.ham.exists||!this.config.files.combined.exists||this.config.files.spam.size<1e3||this.config.files.ham.size<1e3||this.config.files.combined.size<1e3?swal("Training Required",'Before you can enable Advanced Detection, you need to train the models.\n\n Click on the "Train Autospam" tab and train both categories before proceeding',"error"):swal({title:"Confirm",text:"Are you sure you want to enable Advanced Detection?",icon:"warning",dangerMode:!0,buttons:{cancel:"Cancel",confirm:{text:"Enable",value:"enable"}}}).then((function(t){"enable"===t&&axios.post("/i/admin/api/autospam/config/enable").then((function(t){swal("Success! Advanced Detection is now enabled!\n\n This page will reload in a few seconds!",{icon:"success"}),setTimeout((function(){window.location.reload()}),5e3)})).catch((function(t){swal("Oops!","An error occured, please try again later","error")}))}))},disableAdvanced:function(){event.currentTarget.blur(),swal({title:"Confirm",text:"Are you sure you want to disable Advanced Detection?",icon:"warning",dangerMode:!0,buttons:{cancel:"Cancel",confirm:{text:"Disable",value:"disable"}}}).then((function(t){"disable"===t&&axios.post("/i/admin/api/autospam/config/disable").then((function(t){swal("Success! Advanced Detection is now disabled!\n\n This page will reload in a few seconds!",{icon:"success"}),setTimeout((function(){window.location.reload()}),5e3)})).catch((function(t){swal("Oops!","An error occured, please try again later","error")}))}))},handleImport:function(){event.currentTarget.blur(),swal("Error","You do not have enough data to support importing.","error")}}}},71847:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>i});var s=a(74692);const i={data:function(){return{loaded:!1,initialData:{},tabIndex:1,tabs:[{id:1,title:"Overview",icon:"far fa-home"},{id:3,title:"Server Details",icon:"far fa-info-circle"},{id:4,title:"Admin Contact",icon:"far fa-user-crown"},{id:5,title:"Favourite Posts",icon:"far fa-heart"},{id:6,title:"Privacy Pledge",icon:"far fa-eye-slash"},{id:7,title:"Community Guidelines",icon:"far fa-smile-beam"},{id:8,title:"Feature Requirements",icon:"far fa-bolt"},{id:9,title:"User Testimonials",icon:"far fa-comment-smile"}],form:{summary:"",location:0,contact_account:0,contact_email:"",privacy_pledge:void 0,banner_image:void 0,locale:0},requirements:{activitypub_enabled:void 0,open_registration:void 0,oauth_enabled:void 0,curated_onboarding:void 0},feature_config:[],requirements_validator:[],popularPostsLoaded:!1,popularPosts:[],selectedPopularPosts:[],selectedPosts:[],favouritePostByIdInput:"",favouritePostByIdFetching:!1,communityGuidelines:[],isUploadingBanner:!1,state:{is_eligible:!1,submission_exists:!1,awaiting_approval:!1,is_active:!1,submission_timestamp:void 0},isSubmitting:!1,testimonial:{username:void 0,body:void 0},testimonials:[],isEditingTestimonial:!1,editingTestimonial:void 0}},mounted:function(){this.fetchInitialData()},methods:{toggleTab:function(t){this.tabIndex=t},fetchInitialData:function(){var t=this;axios.get("/i/admin/api/directory/initial-data").then((function(e){t.initialData=e.data,e.data.activitypub_enabled&&(t.requirements.activitypub_enabled=e.data.activitypub_enabled),e.data.open_registration&&(t.requirements.open_registration=e.data.open_registration),e.data.curated_onboarding&&(t.requirements.curated_onboarding=e.data.curated_onboarding),e.data.oauth_enabled&&(t.requirements.oauth_enabled=e.data.oauth_enabled),e.data.summary&&(t.form.summary=e.data.summary),e.data.location&&(t.form.location=e.data.location),e.data.favourite_posts&&(t.selectedPosts=e.data.favourite_posts),e.data.admin&&(t.form.contact_account=e.data.admin),e.data.contact_email&&(t.form.contact_email=e.data.contact_email),e.data.community_guidelines&&(t.communityGuidelines=e.data.community_guidelines),e.data.privacy_pledge&&(t.form.privacy_pledge=e.data.privacy_pledge),e.data.feature_config&&(t.feature_config=e.data.feature_config),e.data.requirements_validator&&(t.requirements_validator=e.data.requirements_validator),e.data.banner_image&&(t.form.banner_image=e.data.banner_image),e.data.primary_locale&&(t.form.primary_locale=e.data.primary_locale),e.data.is_eligible&&(t.state.is_eligible=e.data.is_eligible),e.data.testimonials&&(t.testimonials=e.data.testimonials),e.data.submission_state&&(t.state.is_active=e.data.submission_state.active_submission,t.state.submission_exists=e.data.submission_state.pending_submission,t.state.awaiting_approval=e.data.submission_state.pending_submission)})).then((function(){t.loaded=!0}))},initPopularPosts:function(){var t=this;this.popularPostsLoaded||axios.get("/i/admin/api/directory/popular-posts").then((function(e){t.popularPosts=e.data.filter((function(e){return!t.selectedPosts.map((function(t){return t.id})).includes(e.id)}))})).then((function(){t.popularPostsLoaded=!0}))},formatCount:function(t){return window.App.util.format.count(t)},formatDateTime:function(t){var e=new Date(t);return new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"short"}).format(e)},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("en-US",{month:"short",year:"numeric"}).format(e)},formatTimestamp:function(t){return window.App.util.format.timeAgo(t)},togglePopularPost:function(t,e){if(this.selectedPosts.length)if(this.selectedPosts.map((function(t){return t.id})).includes(t))this.selectedPosts=this.selectedPosts.filter((function(e){return e.id!=t}));else{if(this.selectedPosts.length>=12)return swal("Oops!","You can only select 12 popular posts","error"),void(event.currentTarget.checked=!1);this.selectedPosts.push(e)}else this.selectedPosts.push(e)},toggleSelectedPost:function(t){this.selectedPosts=this.selectedPosts.filter((function(e){return e.id!==t.id}))},handlePostByIdSearch:function(){var t=this;event.currentTarget.blur(),this.selectedPosts.length>=12?swal("Oops","You can only select 12 posts","error"):(this.favouritePostByIdFetching=!0,axios.post("/i/admin/api/directory/add-by-id",{q:this.favouritePostByIdInput}).then((function(e){t.selectedPosts.map((function(t){return t.id})).includes(e.data.id)?swal("Oops!","You already selected this post!","error"):(t.selectedPosts.push(e.data),t.favouritePostByIdInput="",t.popularPosts=t.popularPosts.filter((function(t){return t.id!=e.data.id})))})).then((function(){t.favouritePostByIdFetching=!1,s("#favposts-1-tab").tab("show")})).catch((function(e){swal("Invalid Post","The post id you added is not valid","error"),t.favouritePostByIdFetching=!1})))},save:function(){axios.post("/i/admin/api/directory/save",{location:this.form.location,summary:this.form.summary,admin_uid:this.form.contact_account,contact_email:this.form.contact_email,favourite_posts:this.selectedPosts.map((function(t){return t.id})),privacy_pledge:this.form.privacy_pledge}).then((function(t){swal("Success!","Successfully saved directory settings","success")})).catch((function(t){swal("Oops!",t.response.data.message,"error")}))},uploadBannerImage:function(){var t=this;if(this.isUploadingBanner=!0,window.confirm("Are you sure you want to update your server banner image?")){var e=new FormData;e.append("banner_image",this.$refs.bannerImageRef.files[0]),axios.post("/i/admin/api/directory/save",e,{headers:{"Content-Type":"multipart/form-data"}}).then((function(e){t.form.banner_image=e.data.banner_image,t.isUploadingBanner=!1})).catch((function(e){swal("Error",e.response.data.message,"error"),t.isUploadingBanner=!1}))}else this.isUploadingBanner=!1},deleteBannerImage:function(){var t=this;window.confirm("Are you sure you want to delete your server banner image?")&&axios.delete("/i/admin/api/directory/banner-image").then((function(e){t.form.banner_image=e.data})).catch((function(t){console.log(t)}))},handleSubmit:function(){var t=this;window.confirm("Are you sure you want to submit your server?")&&(this.isSubmitting=!0,axios.post("/i/admin/api/directory/submit").then((function(e){setTimeout((function(){t.isSubmitting=!1,t.state.is_active=!0,console.log(e.data)}),3e3)})).catch((function(t){swal("Error",t.response.data.message,"error")})))},deleteTestimonial:function(t){var e=this;window.confirm("Are you sure you want to delete the testimonial by "+t.profile.username+"?")&&axios.post("/i/admin/api/directory/testimonial/delete",{profile_id:t.profile.id}).then((function(a){e.testimonials=e.testimonials.filter((function(e){return e.profile.id!=t.profile.id}))}))},editTestimonial:function(t){this.isEditingTestimonial=!0,this.editingTestimonial=t},saveTestimonial:function(){var t,e=this;null===(t=event.currentTarget)||void 0===t||t.blur(),axios.post("/i/admin/api/directory/testimonial/save",{username:this.testimonial.username,body:this.testimonial.body}).then((function(t){e.testimonials.push(t.data),e.testimonial={username:void 0,body:void 0}})).catch((function(t){var e=t.response.data.hasOwnProperty("error")?t.response.data.error:t.response.data.message;swal("Oops!",e,"error")}))},cancelEditTestimonial:function(){var t;null===(t=event.currentTarget)||void 0===t||t.blur(),this.isEditingTestimonial=!1,this.editingTestimonial={}},saveEditTestimonial:function(){var t,e=this;null===(t=event.currentTarget)||void 0===t||t.blur(),axios.post("/i/admin/api/directory/testimonial/update",{profile_id:this.editingTestimonial.profile.id,body:this.editingTestimonial.body}).then((function(t){e.isEditingTestimonial=!1,e.editingTestimonial={}}))}},watch:{selectedPosts:function(t){var e=t.map((function(t){return t.id}));this.popularPosts=this.popularPosts.filter((function(t){return!e.includes(t.id)}))}}}},44107:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>i});var s=a(2e4);a(87980);const i={components:{Autocomplete:s.default},data:function(){return{loaded:!1,tabIndex:0,stats:{total_unique:0,total_posts:0,added_14_days:0,total_banned:0,total_nsfw:0},hashtags:[],pagination:[],sortCol:void 0,sortDir:void 0,trendingTags:[],bannedTags:[],showEditModal:!1,editingHashtag:void 0,editSaved:!1,editSavedTimeout:void 0,searchLoading:!1}},mounted:function(){var t=this;this.fetchStats(),this.fetchHashtags(),this.$root.$on("bv::modal::hidden",(function(e,a){t.editSaved=!1,clearTimeout(t.editSavedTimeout),t.editingHashtag=void 0}))},watch:{editingHashtag:{deep:!0,immediate:!0,handler:function(t,e){null!=t&&null!=e&&this.storeHashtagEdit(t)}}},methods:{fetchStats:function(){var t=this;axios.get("/i/admin/api/hashtags/stats").then((function(e){t.stats=e.data}))},fetchHashtags:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/hashtags/query";axios.get(e).then((function(e){t.hashtags=e.data.data,t.pagination={next:e.data.links.next,prev:e.data.links.prev},t.loaded=!0}))},prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):t},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},boolIcon:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text-muted";return t?''):'')},paginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev;this.fetchHashtags(e)},toggleCol:function(t){this.sortCol=t,this.sortDir?this.sortDir="asc"==this.sortDir?"desc":"asc":this.sortDir="desc";var e="/i/admin/api/hashtags/query?sort="+t+"&dir="+this.sortDir;this.fetchHashtags(e)},buildColumn:function(t,e){var a='';return e==this.sortCol&&(a="desc"==this.sortDir?'':''),"".concat(t," ").concat(a)},toggleTab:function(t){var e=this;if(this.loaded=!1,this.tabIndex=t,0===t)this.fetchHashtags();else if(1===t)axios.get("/api/v1.1/discover/posts/hashtags").then((function(t){e.trendingTags=t.data,e.loaded=!0}));else if(2===t){this.fetchHashtags("/i/admin/api/hashtags/query?action=banned")}else if(3===t){this.fetchHashtags("/i/admin/api/hashtags/query?action=nsfw")}},openEditHashtagModal:function(t){var e=this;this.editSaved=!1,clearTimeout(this.editSavedTimeout),this.$nextTick((function(){axios.get("/i/admin/api/hashtags/get",{params:{id:t.id}}).then((function(t){e.editingHashtag=t.data.data,e.showEditModal=!0}))}))},storeHashtagEdit:function(t,e){var a=this;this.editSaved=!1,t.is_banned&&(t.can_trend||t.can_search)&&swal("Banned Hashtag Limits","Banned hashtags cannot trend or be searchable, to allow those you need to unban the hashtag","error"),axios.post("/i/admin/api/hashtags/update",t).then((function(e){a.editSaved=!0,1!==a.tabIndex&&(a.hashtags=a.hashtags.map((function(a){return a.id==t.id&&(a=e.data.data),a}))),a.editSavedTimeout=setTimeout((function(){a.editSaved=!1}),5e3)})).catch((function(t){swal("Oops!","An error occured, please try again.","error"),console.log(t)}))},composeSearch:function(t){return t.length<1?[]:axios.get("/i/admin/api/hashtags/query",{params:{q:t,sort:"cached_count",dir:"desc"}}).then((function(t){return t.data.data}))},getTagResultValue:function(t){return t.name},onSearchResultClick:function(t){this.openEditHashtagModal(t)},clearTrendingCache:function(){event.currentTarget.blur(),window.confirm("Are you sure you want to clear the trending hashtags cache?")&&axios.post("/i/admin/api/hashtags/clear-trending-cache").then((function(t){swal("Cache Cleared!","Successfully cleared the trending hashtag cache!","success")}))}}}},56310:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>u});var s=a(2e4);a(87980);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(){n=function(){return e};var t,e={},a=Object.prototype,s=a.hasOwnProperty,o=Object.defineProperty||function(t,e,a){t[e]=a.value},r="function"==typeof Symbol?Symbol:{},l=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",d=r.toStringTag||"@@toStringTag";function u(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,a){return t[e]=a}}function m(t,e,a,s){var i=e&&e.prototype instanceof b?e:b,n=Object.create(i.prototype),r=new D(s||[]);return o(n,"_invoke",{value:A(t,a,r)}),n}function p(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}e.wrap=m;var v="suspendedStart",f="suspendedYield",h="executing",g="completed",_={};function b(){}function C(){}function w(){}var y={};u(y,l,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(M([])));k&&k!==a&&s.call(k,l)&&(y=k);var S=w.prototype=b.prototype=Object.create(y);function R(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function a(n,o,r,l){var c=p(t[n],t,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"==i(u)&&s.call(u,"__await")?e.resolve(u.__await).then((function(t){a("next",t,r,l)}),(function(t){a("throw",t,r,l)})):e.resolve(u).then((function(t){d.value=t,r(d)}),(function(t){return a("throw",t,r,l)}))}l(c.arg)}var n;o(this,"_invoke",{value:function(t,s){function i(){return new e((function(e,i){a(t,s,e,i)}))}return n=n?n.then(i,i):i()}})}function A(e,a,s){var i=v;return function(n,o){if(i===h)throw new Error("Generator is already running");if(i===g){if("throw"===n)throw o;return{value:t,done:!0}}for(s.method=n,s.arg=o;;){var r=s.delegate;if(r){var l=I(r,s);if(l){if(l===_)continue;return l}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(i===v)throw i=g,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);i=h;var c=p(e,a,s);if("normal"===c.type){if(i=s.done?g:f,c.arg===_)continue;return{value:c.arg,done:s.done}}"throw"===c.type&&(i=g,s.method="throw",s.arg=c.arg)}}}function I(e,a){var s=a.method,i=e.iterator[s];if(i===t)return a.delegate=null,"throw"===s&&e.iterator.return&&(a.method="return",a.arg=t,I(e,a),"throw"===a.method)||"return"!==s&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+s+"' method")),_;var n=p(i,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,_;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,_):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function M(e){if(e||""===e){var a=e[l];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function a(){for(;++n=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=s.call(o,"catchLoc"),c=s.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&s.call(i,"finallyLoc")&&this.prev=0;--e){var a=this.tryEntries[e];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),j(a),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var a=this.tryEntries[e];if(a.tryLoc===t){var s=a.completion;if("throw"===s.type){var i=s.arg;j(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,a,s){return this.delegate={iterator:M(e),resultName:a,nextLoc:s},"next"===this.method&&(this.arg=t),_}},e}function o(t,e,a,s,i,n,o){try{var r=t[n](o),l=r.value}catch(t){return void a(t)}r.done?e(l):Promise.resolve(l).then(s,i)}function r(t){return function(){var e=this,a=arguments;return new Promise((function(s,i){var n=t.apply(e,a);function r(t){o(n,s,i,r,l,"next",t)}function l(t){o(n,s,i,r,l,"throw",t)}r(void 0)}))}}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function c(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/instances/get";axios.get(e).then((function(e){t.instances=e.data.data,t.pagination=c(c({},e.data.links),e.data.meta)})).then((function(){t.$nextTick((function(){t.loaded=!0}))}))},toggleTab:function(t){this.loaded=!1,this.tabIndex=t,this.searchQuery=void 0;var e="/i/admin/api/instances/get?filter="+this.filterMap[t];history.pushState(null,"","/i/admin/instances?filter="+this.filterMap[t]),this.fetchInstances(e)},prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):0},formatCount:function(t){return t?t.toLocaleString("en-CA"):0},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},boolIcon:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"text-muted";return t?''):'')},toggleCol:function(t){if(this.filterMap[this.tabIndex]!=t&&!this.searchQuery){this.sortCol=t,this.sortDir?this.sortDir="asc"==this.sortDir?"desc":"asc":this.sortDir="desc";var e=new URL(window.location.origin+"/i/admin/instances");e.searchParams.set("sort",t),e.searchParams.set("dir",this.sortDir),0!=this.tabIndex&&e.searchParams.set("filter",this.filterMap[this.tabIndex]),history.pushState(null,"",e);var a=new URL(window.location.origin+"/i/admin/api/instances/get");a.searchParams.set("sort",t),a.searchParams.set("dir",this.sortDir),0!=this.tabIndex&&a.searchParams.set("filter",this.filterMap[this.tabIndex]),this.fetchInstances(a.toString())}},buildColumn:function(t,e){if(-1!=[1,5,6].indexOf(this.tabIndex)||this.searchQuery&&this.searchQuery.length)return t;if(2===this.tabIndex&&"banned"===e)return t;if(3===this.tabIndex&&"auto_cw"===e)return t;if(4===this.tabIndex&&"unlisted"===e)return t;var a='';return e==this.sortCol&&(a="desc"==this.sortDir?'':''),"".concat(t," ").concat(a)},paginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev,a="next"==t?this.pagination.next_cursor:this.pagination.prev_cursor,s=new URL(window.location.origin+"/i/admin/instances");a&&s.searchParams.set("cursor",a),this.searchQuery&&s.searchParams.set("q",this.searchQuery),this.sortCol&&s.searchParams.set("sort",this.sortCol),this.sortDir&&s.searchParams.set("dir",this.sortDir),history.pushState(null,"",s.toString()),this.fetchInstances(e)},composeSearch:function(t){var e=this;return t.length<1?[]:(this.searchQuery=t,history.pushState(null,"","/i/admin/instances?q="+t),axios.get("/i/admin/api/instances/query",{params:{q:t}}).then((function(t){return t&&t.data?(e.tabIndex=-1,e.instances=t.data.data,e.pagination=c(c({},t.data.links),t.data.meta)):e.fetchInstances(),t.data.data})))},getTagResultValue:function(t){return t.name},onSearchResultClick:function(t){this.openInstanceModal(t.id)},openInstanceModal:function(t){var e=this,a=this.instances.filter((function(e){return e.id===t}))[0];this.refreshedModalStats=!1,this.editingInstanceChanges=!1,this.instanceModalNotes=!1,this.canEditInstance=!1,this.instanceModal=a,this.$nextTick((function(){e.editingInstance=a,e.showInstanceModal=!0,e.canEditInstance=!0}))},showModalNotes:function(){this.instanceModalNotes=!0},saveInstanceModalChanges:function(){var t=this;axios.post("/i/admin/api/instances/update",this.editingInstance).then((function(e){t.showInstanceModal=!1,t.$bvToast.toast("Successfully updated ".concat(e.data.data.domain),{title:"Instance Updated",autoHideDelay:5e3,appendToast:!0,variant:"success"})}))},saveNewInstance:function(){var t=this;axios.post("/i/admin/api/instances/create",this.addNewInstance).then((function(e){t.showInstanceModal=!1,t.instances.unshift(e.data.data)})).catch((function(e){swal("Oops!","An error occured, please try again later.","error"),t.addNewInstance={domain:"",banned:!1,auto_cw:!1,unlisted:!1,notes:void 0}}))},refreshModalStats:function(){var t=this;axios.post("/i/admin/api/instances/refresh-stats",{id:this.instanceModal.id}).then((function(e){t.refreshedModalStats=!0,t.instanceModal=e.data.data,t.editingInstance=e.data.data,t.instances=t.instances.map((function(t){return t.id===e.data.data.id?e.data.data:t}))}))},deleteInstanceModal:function(){var t=this;window.confirm("Are you sure you want to delete this instance? This will not delete posts or profiles from this instance.")&&axios.post("/i/admin/api/instances/delete",{id:this.instanceModal.id}).then((function(e){t.showInstanceModal=!1,t.instances=t.instances.filter((function(e){return e.id!=t.instanceModal.id}))})).then((function(){setTimeout((function(){return t.fetchStats()}),1e3)}))},openImportForm:function(){var t=document.createElement("p");t.classList.add("text-left"),t.classList.add("mb-0"),t.innerHTML='

Import your instance moderation backup.


Import Instructions:

  1. Press OK
  2. Press "Choose File" on Import form input
  3. Select your pixelfed-instances-mod.json file
  4. Review instance moderation actions. Tap on an instance to remove it
  5. Press "Import" button to finish importing
';var e=document.createElement("div");e.appendChild(t),swal({title:"Import Backup",content:e,icon:"info"}),this.showImportForm=!0},downloadBackup:function(t){axios.get("/i/admin/api/instances/download-backup",{responseType:"blob"}).then((function(t){var e=document.createElement("a");e.setAttribute("download","pixelfed-instances-mod.json");var a=URL.createObjectURL(t.data);e.href=a,e.setAttribute("target","_blank"),e.click(),swal("Instance Backup Downloading","Your instance moderation backup is downloading. Use this to import auto_cw, banned and unlisted instances to supported Pixelfed instances.","success")}))},onImportUpload:function(t){var e=this;return r(n().mark((function a(){var s;return n().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e.getParsedImport(t.target.files[0]);case 2:if((s=a.sent).hasOwnProperty("version")&&1===s.version){a.next=8;break}return swal("Invalid Backup","We cannot validate this backup. Please try again later.","error"),e.showImportForm=!1,e.$refs.importInput.reset(),a.abrupt("return");case 8:e.importData=s,e.showImportModal=!0;case 10:case"end":return a.stop()}}),a)})))()},getParsedImport:function(t){var e=this;return r(n().mark((function a(){var s,i;return n().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e.parseJsonFile(t);case 3:return a.abrupt("return",a.sent);case 6:return a.prev=6,a.t0=a.catch(0),(s=document.createElement("p")).classList.add("text-left"),s.classList.add("mb-0"),s.innerHTML='

An error occured when attempting to parse the import file. Please try again later.


Error message:

'+a.t0.message+"
",(i=document.createElement("div")).appendChild(s),swal({title:"Import Error",content:i,icon:"error"}),a.abrupt("return");case 16:case"end":return a.stop()}}),a,null,[[0,6]])})))()},promisedParseJSON:function(t){return r(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,a){try{e(JSON.parse(t))}catch(t){a(t)}})));case 1:case"end":return e.stop()}}),e)})))()},parseJsonFile:function(t){var e=this;return r(n().mark((function a(){return n().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",new Promise((function(a,s){var i=new FileReader;i.onload=function(t){return a(e.promisedParseJSON(t.target.result))},i.onerror=function(t){return s(t)},i.readAsText(t)})));case 1:case"end":return a.stop()}}),a)})))()},filterImportData:function(t,e){switch(t){case"auto_cw":this.importData.auto_cw.splice(e,1);break;case"unlisted":this.importData.unlisted.splice(e,1);break;case"banned":this.importData.banned.splice(e,1)}},completeImport:function(){var t=this;this.showImportForm=!1,axios.post("/i/admin/api/instances/import-data",{banned:this.importData.banned,auto_cw:this.importData.auto_cw,unlisted:this.importData.unlisted}).then((function(t){swal("Import Uploaded","Import successfully uploaded, please allow a few minutes to process.","success")})).then((function(){setTimeout((function(){return t.fetchStats()}),1e3)}))},cancelImport:function(t){if(this.importData.banned.length||this.importData.auto_cw.length||this.importData.unlisted.length){if(!window.confirm("Are you sure you want to cancel importing?"))return void t.preventDefault();this.showImportForm=!1,this.$refs.importInput.value="",this.importData={banned:[],auto_cw:[],unlisted:[]}}},onViewMoreInstance:function(){this.showInstanceModal=!1,window.location.href="/i/admin/instances/show/"+this.instanceModal.id}}}},51839:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(98385),i=a(74692);const n={components:{"admin-report-modal":s.default},data:function(){return{loaded:!1,stats:{total:0,open:0,closed:0,autospam:0,autospam_open:0,remote_open:0},tabIndex:0,reports:[],pagination:{},showReportModal:!1,viewingReport:void 0,viewingReportLoading:!1,autospam:[],autospamPagination:{},autospamLoaded:!1,showSpamReportModal:!1,viewingSpamReport:void 0,viewingSpamReportLoading:!1,remoteReportsLoaded:!1,showRemoteReportModal:void 0,remoteReportModalModel:{}}},mounted:function(){var t=new URLSearchParams(window.location.search);t.has("tab")&&t.has("id")&&"autospam"===t.get("tab")?(this.fetchStats(null,"/i/admin/api/reports/spam/all"),this.fetchSpamReport(t.get("id"))):t.has("tab")&&t.has("id")&&"report"===t.get("tab")?(this.fetchStats(),this.fetchReport(t.get("id"))):(window.history.pushState(null,null,"/i/admin/reports"),this.fetchStats()),this.$root.$on("bv::modal::hide",(function(t,e){window.history.pushState(null,null,"/i/admin/reports")}))},methods:{toggleTab:function(t){switch(t){case 0:this.fetchStats("/i/admin/api/reports/all");break;case 1:this.fetchStats("/i/admin/api/reports/all?filter=closed");break;case 2:this.fetchStats(null,"/i/admin/api/reports/spam/all");break;case 3:this.fetchRemoteReports()}window.history.pushState(null,null,"/i/admin/reports"),this.tabIndex=t},prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):t},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("default",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}).format(e)},reportLabel:function(t){switch(t.object_type){case"App\\Profile":return"".concat(t.type," Profile");case"App\\Status":return"".concat(t.type," Post");case"App\\Story":return"".concat(t.type," Story")}},fetchStats:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/all",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;axios.get("/i/admin/api/reports/stats").then((function(e){t.stats=e.data})).finally((function(){e?t.fetchReports(e):a&&t.fetchAutospam(a),i('[data-toggle="tooltip"]').tooltip()}))},fetchReports:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/all";axios.get(e).then((function(e){t.reports=e.data.data,t.pagination={next:e.data.links.next,prev:e.data.links.prev}})).finally((function(){t.loaded=!0}))},fetchRemoteReports:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/remote";axios.get(e).then((function(e){t.reports=e.data.data,t.pagination={next:e.data.links.next,prev:e.data.links.prev}})).finally((function(){t.loaded=!0,t.remoteReportsLoaded=!0}))},remoteReportPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev;this.fetchRemoteReports(e)},handleCloseRemoteReportModal:function(){this.showRemoteReportModal=!1},showRemoteReport:function(t){this.remoteReportModalModel=t,this.showRemoteReportModal=!0},refreshRemoteReports:function(){var t=this;this.fetchStats(""),this.$nextTick((function(){t.toggleTab(3)}))},paginate:function(t){event.currentTarget.blur();var e="next"==t?this.pagination.next:this.pagination.prev;this.fetchReports(e)},viewReport:function(t){this.viewingReportLoading=!1,this.viewingReport=t,this.showReportModal=!0,window.history.pushState(null,null,"/i/admin/reports?tab=report&id="+t.id),setTimeout((function(){pixelfed.readmore()}),1e3)},handleAction:function(t,e){var a=this;event.currentTarget.blur(),this.viewingReportLoading=!0,"ignore"===e||window.confirm(this.getActionLabel(t,e))?(this.loaded=!1,axios.post("/i/admin/api/reports/handle",{id:this.viewingReport.id,object_id:this.viewingReport.object_id,object_type:this.viewingReport.object_type,action:e,action_type:t}).catch((function(t){swal("Error",t.response.data.error,"error")})).finally((function(){a.viewingReportLoading=!0,a.viewingReport=!1,a.showReportModal=!1,setTimeout((function(){a.fetchStats()}),1e3)}))):this.viewingReportLoading=!1},getActionLabel:function(t,e){if("profile"===t)switch(e){case"ignore":return"Are you sure you want to ignore this profile report?";case"nsfw":return"Are you sure you want to mark this profile as NSFW?";case"unlist":return"Are you sure you want to mark all posts by this profile as unlisted?";case"private":return"Are you sure you want to mark all posts by this profile as private?";case"delete":return"Are you sure you want to delete this profile?"}else if("post"===t)switch(e){case"ignore":return"Are you sure you want to ignore this post report?";case"nsfw":return"Are you sure you want to mark this post as NSFW?";case"unlist":return"Are you sure you want to mark this post as unlisted?";case"private":return"Are you sure you want to mark this post as private?";case"delete":return"Are you sure you want to delete this post?"}else if("story"===t)switch(e){case"ignore":return"Are you sure you want to ignore this story report?";case"delete":return"Are you sure you want to delete this story?";case"delete-all":return"Are you sure you want to delete all stories by this account?"}},fetchAutospam:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/i/admin/api/reports/spam/all";axios.get(e).then((function(e){t.autospam=e.data.data,t.autospamPagination={next:e.data.links.next,prev:e.data.links.prev}})).finally((function(){t.autospamLoaded=!0,t.loaded=!0}))},autospamPaginate:function(t){event.currentTarget.blur();var e="next"==t?this.autospamPagination.next:this.autospamPagination.prev;this.fetchAutospam(e)},viewSpamReport:function(t){this.viewingSpamReportLoading=!1,this.viewingSpamReport=t,this.showSpamReportModal=!0,window.history.pushState(null,null,"/i/admin/reports?tab=autospam&id="+t.id),setTimeout((function(){pixelfed.readmore()}),1e3)},getSpamActionLabel:function(t){switch(t){case"mark-all-read":return"Are you sure you want to mark all spam reports by this account as read?";case"mark-all-not-spam":return"Are you sure you want to mark all spam reports by this account as not spam?";case"delete-profile":return"Are you sure you want to delete this profile?"}},handleSpamAction:function(t){var e=this;event.currentTarget.blur(),this.viewingSpamReportLoading=!0,"mark-not-spam"===t||"mark-read"===t||window.confirm(this.getSpamActionLabel(t))?(this.loaded=!1,axios.post("/i/admin/api/reports/spam/handle",{id:this.viewingSpamReport.id,action:t}).catch((function(t){swal("Error",t.response.data.error,"error")})).finally((function(){e.viewingSpamReportLoading=!0,e.viewingSpamReport=!1,e.showSpamReportModal=!1,setTimeout((function(){e.fetchStats(null,"/i/admin/api/reports/spam/all")}),500)}))):this.viewingSpamReportLoading=!1},fetchReport:function(t){var e=this;axios.get("/i/admin/api/reports/get/"+t).then((function(t){e.tabIndex=0,e.viewReport(t.data.data)})).catch((function(t){e.fetchStats(),window.history.pushState(null,null,"/i/admin/reports")}))},fetchSpamReport:function(t){var e=this;axios.get("/i/admin/api/reports/spam/get/"+t).then((function(t){e.tabIndex=2,e.viewSpamReport(t.data.data)})).catch((function(t){e.fetchStats(),window.history.pushState(null,null,"/i/admin/reports")}))}}}},86871:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});var s=a(8889),i=a(34429),n=a(7210),o=a(62355);const r={components:{"admin-read-more":s.default,"tab-header":i.default,checkbox:n.default,"form-input":o.default},data:function(){return{loaded:!1,initialData:{},tabIndex:1,tabbies:["landing","branding","media","posts","platform","rules","users","storage"],tabs:[{id:1,title:"Overview",icon:"far fa-home"},{id:"landing",title:"Landing",icon:"far fa-info-circle"},{id:"branding",title:"Branding",icon:"far fa-user-crown"},{id:"media",title:"Media",icon:"far fa-image"},{id:"platform",title:"Platform",icon:"far fa-database"},{id:"posts",title:"Posts",icon:"far fa-heart"},{id:"rules",title:"Rules",icon:"far fa-eye-slash"},{id:"storage",title:"Storage",icon:"far fa-hdd"},{id:"users",title:"Users",icon:"far fa-users"}],isSubmitting:!1,isSubmittingTimeout:!1,isSubmittingTimeoutHandler:void 0,features:[],landing:{current_admin:0},branding:[],media:[],mediaTypes:{jpeg:!1,png:!1,gif:!1,webp:!1,avif:!1,heic:!1,mp4:!1,mov:!1},rules:[],users:[],posts:[],platform:[],storage:[],newRule:void 0,isSubmittingNewRule:!1,isDeletingRule:!1,suggestedRules:[],hasDuplicateRules:!1,showAllRules:!1,showDiskConfig:!1}},computed:{maxMediaSizeToMb:{get:function(){return this.media&&this.media.max_photo_size?(this.media.max_photo_size/1e3).toFixed(2)+" MB":"0.00 MB"}},maxAccountSizeToMb:{get:function(){if(!this.users||!this.users.max_account_size)return"0.00 MB";var t=this.users.max_account_size/1024;return t>1e6?(t/1e6).toFixed(1)+"TB":t>1e3?(t/1024).toFixed(2)+"GB":(this.users.max_account_size/1024).toFixed(2)+" MB"}},rulesComputed:{get:function(){return this.rules&&this.rules.length?this.rules.length>2&&!this.showAllRules?this.rules.slice(0,2):this.rules:[]}},suggestedRulesComputed:{get:function(){var t=this;return this.rules&&this.rules.length?this.suggestedRules.filter((function(e){return!t.rules.includes(e)})):this.suggestedRules}},hasDuplicateRulesComputed:{get:function(){if(!this.rules||!this.rules.length)return!1;var t=this.rules;return t.filter((function(e,a){return t.indexOf(e)!==a})).length}},activeMediaTypes:{get:function(){var t="";return this.mediaTypes.jpeg&&(t+="image/jpeg,"),this.mediaTypes.png&&(t+="image/png,"),this.mediaTypes.gif&&(t+="image/gif,"),this.mediaTypes.webp&&(t+="image/webp,"),this.mediaTypes.mp4&&(t+="video/mp4"),t.endsWith(",")&&(t=t.slice(0,-1)),t}}},mounted:function(){this.fetchInitialData();var t=new URL(window.location.href);if(t.searchParams.has("t")){var e=t.searchParams.get("t");this.tabbies.includes(e)?this.tabIndex=e:window.history.pushState(null,null,"/i/admin/settings")}},methods:{toggleTab:function(t){clearTimeout(this.isSubmittingTimeoutHandler),this.isSubmittingTimeout=!1,this.tabIndex=t,this.showAllRules=!1,this.tabbies.includes(t)?window.history.pushState(null,null,"/i/admin/settings?t="+t):window.history.pushState(null,null,"/i/admin/settings")},fetchInitialData:function(){var t=this;axios.get("/i/admin/api/settings/fetch").then((function(e){t.initialData=e.data,t.features=e.data.features,t.landing=e.data.landing,t.branding=e.data.branding,t.media=e.data.media,t.setMediaTypes(),t.rules=e.data.rules,t.users=e.data.users,t.suggestedRules=e.data.suggested_rules,t.posts=e.data.posts,t.platform=e.data.platform,t.storage=e.data.storage})).then((function(){t.loaded=!0}))},setMediaTypes:function(){var t=this,e=this.media.media_types.split(",");e&&e.length&&e.forEach((function(e){var a=e.split("/")[1];["jpeg","png","gif","webp","mp4"].includes(a)&&(t.mediaTypes[a]=!0)}))},formatCount:function(t){return window.App.util.format.count(t)},formatDateTime:function(t){var e=new Date(t);return new Intl.DateTimeFormat("en-US",{dateStyle:"medium",timeStyle:"short"}).format(e)},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("en-US",{month:"short",year:"numeric"}).format(e)},formatTimestamp:function(t){return window.App.util.format.timeAgo(t)},handleSave:function(t){switch(this.isSubmitting=!0,t){case"overview":return this.saveHome();case"landing":return this.saveLanding();case"branding":return this.saveBranding();case"posts":return this.savePosts();case"media":return this.saveMedia();case"platform":return this.savePlatform();case"users":return this.saveUsers();case"storage":return this.saveStorage()}},handleAddRule:function(t){var e,a=this;null===(e=t.currentTarget)||void 0===e||e.blur(),this.isSubmittingNewRule=!0,axios.post("/i/admin/api/settings/rules/add",{rule:this.newRule}).then((function(t){a.rules.push(a.newRule),a.newRule=void 0,a.isSubmittingNewRule=!1,a.showAllRules=!0})).catch((function(t){var e;t.response.data&&null!==(e=t.response.data)&&void 0!==e&&e.message&&swal("Error",t.response.data.message,"error"),a.isSubmittingNewRule=!1}))},addSuggestedRule:function(t,e){var a;null===(a=e.currentTarget)||void 0===a||a.blur(),this.newRule=t},importAllDefaultRules:function(t){var e,a=this;null===(e=t.currentTarget)||void 0===e||e.blur(),this.isSubmittingNewRule=!0,this.showAllRules=!0;for(var s=function(){var t=a.suggestedRules[i];setTimeout((function(){axios.post("/i/admin/api/settings/rules/add",{rule:t}).then((function(e){a.rules.push(t)}))}),300*i)},i=this.suggestedRules.length-1;i>=0;i--)s();this.isSubmittingNewRule=!1},handleDeleteRule:function(t,e,a){var s,i=this;null===(s=a.currentTarget)||void 0===s||s.blur(),this.isDeletingRule=!0,axios.post("/i/admin/api/settings/rules/delete",{rule:t}).then((function(t){i.isDeletingRule=!1,i.rules=t.data})).catch((function(t){}))},handleDeleteAllRules:function(t){var e,a=this;null===(e=t.currentTarget)||void 0===e||e.blur(),this.isDeletingRule=!0,swal({title:"Confirm",text:"Are you sure you want to delete all rules?",buttons:!0,dangerMode:!0}).then((function(t){!0===t?axios.post("/i/admin/api/settings/rules/delete/all").then((function(t){a.isDeletingRule=!1,a.rules=[]})).catch((function(t){})):a.isDeletingRule=!1}))},removeAutofollow:function(t,e){var a,s=this;null===(a=e.currentTarget)||void 0===a||a.blur(),axios.post("/i/admin/api/settings/autofollow/delete",{username:t}).then((function(t){s.users.admin_autofollow_accounts=t.data.accounts})).catch((function(t){swal("Oops!","An error occurred, please try again later!","error")}))},addAutofollow:function(t){var e,a=this;null===(e=t.currentTarget)||void 0===e||e.blur(),swal({text:"Enter account username",content:"input",button:{text:"Add Autofollow",closeModal:!1}}).then((function(t){if(!t)throw null;axios.post("/i/admin/api/settings/autofollow/add",{username:t}).then((function(e){e.data.accounts.map((function(t){return t.toLowerCase()})).includes(t.toLowerCase())||swal("Oops!","The account you attempted to add does not exist or cannot be added!","error"),a.users.admin_autofollow_accounts=e.data.accounts,swal.stopLoading(),swal.close()})).catch((function(t){t.response.data&&t.response.data.message?swal("Error",t.response.data.message,"error"):swal("Oops!","The account you attempted to add does not exist or cannot be added!","error"),swal.stopLoading(),swal.close()}))}))},saveHome:function(){var t=this;axios.post("/i/admin/api/settings/update/home",{registration_status:this.features.registration_status,cloud_storage:this.features.cloud_storage,activitypub_enabled:this.features.activitypub_enabled,account_migration:this.features.account_migration,mobile_apis:this.features.mobile_apis,stories:this.features.stories,instagram_import:this.features.instagram_import,autospam_enabled:this.features.autospam_enabled}).then((function(e){t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)}))},saveLanding:function(){var t=this;axios.post("/i/admin/api/settings/update/landing",{current_admin:this.landing.current_admin,show_directory:this.landing.show_directory,show_explore:this.landing.show_explore}).then((function(e){t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)}))},saveBranding:function(){var t=this;axios.post("/i/admin/api/settings/update/branding",{name:this.branding.name,short_description:this.branding.short_description,long_description:this.branding.long_description}).then((function(e){t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)}))},savePosts:function(){var t=this;axios.post("/i/admin/api/settings/update/posts",{max_caption_length:this.posts.max_caption_length,max_altext_length:this.posts.max_altext_length}).then((function(e){t.posts=e.data,t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)})).catch((function(e){t.isSubmitting=!1,e.response.data&&e.response.data.message?swal("Error",e.response.data.message,"error"):swal("Oops!","An error occured","error")}))},saveMedia:function(){var t=this;axios.post("/i/admin/api/settings/update/media",{image_quality:this.media.image_quality,max_album_length:this.media.max_album_length,max_photo_size:this.media.max_photo_size,media_types:this.activeMediaTypes,optimize_image:this.media.optimize_image,optimize_video:this.media.optimize_video}).then((function(e){t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)})).catch((function(e){t.isSubmitting=!1,e.response.data&&e.response.data.message?swal("Error",e.response.data.message,"error"):swal("Oops!","An error occured","error")}))},savePlatform:function(){var t=this;axios.post("/i/admin/api/settings/update/platform",{allow_app_registration:this.platform.allow_app_registration,app_registration_rate_limit_attempts:this.platform.app_registration_rate_limit_attempts,app_registration_rate_limit_decay:this.platform.app_registration_rate_limit_decay,app_registration_confirm_rate_limit_attempts:this.platform.app_registration_confirm_rate_limit_attempts,app_registration_confirm_rate_limit_decay:this.platform.app_registration_confirm_rate_limit_decay,allow_post_embeds:this.platform.allow_post_embeds,allow_profile_embeds:this.platform.allow_profile_embeds,captcha_enabled:this.platform.captcha_enabled,captcha_secret:this.platform.captcha_secret,captcha_sitekey:this.platform.captcha_sitekey,captcha_on_login:this.platform.captcha_on_login,captcha_on_register:this.platform.captcha_on_register,custom_emoji_enabled:this.platform.custom_emoji_enabled}).then((function(e){t.platform=e.data,t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)})).catch((function(e){t.isSubmitting=!1,e.response.data&&e.response.data.message?swal("Error",e.response.data.message,"error"):swal("Oops!","An error occured","error")}))},saveUsers:function(){var t=this;axios.post("/i/admin/api/settings/update/users",{require_email_verification:this.users.require_email_verification,enforce_account_limit:this.users.enforce_account_limit,max_account_size:this.users.max_account_size,admin_autofollow:this.users.admin_autofollow,admin_autofollow_accounts:this.users.admin_autofollow_accounts,max_user_blocks:this.users.max_user_blocks,max_user_mutes:this.users.max_user_mutes,max_domain_blocks:this.users.max_domain_blocks}).then((function(e){t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)})).catch((function(e){e.response.data.message?swal("Error",e.response.data.message,"error"):swal("Error","An unexpected error occurred, please try again!","error"),t.isSubmitting=!1}))},saveStorage:function(){var t=this,e=this.showDiskConfig?{primary_disk:this.storage.primary_disk,update_disk:!0,disk_config:this.storage.disk_config}:{primary_disk:this.storage.primary_disk};axios.post("/i/admin/api/settings/update/storage",e).then((function(e){t.features.cloud_storage="cloud"===e.data.primary_disk,t.isSubmitting=!1,t.isSubmittingTimeout=!0,t.isSubmittingTimeoutHandler=setTimeout((function(){t.isSubmittingTimeout=!1}),4e3)})).catch((function(e){if(e.response.data.error)if(e.response.data.s3_vce){var a=document.createElement("div");a.classList.add("text-left"),a.innerHTML=e.response.data.message;var s=document.createElement("div");s.appendChild(a),swal({title:"Invalid S3 Credentials",content:s,icon:"error"})}else swal("Error",e.response.data.message,"error");t.isSubmitting=!1}))},handleChange:function(t,e,a){switch(e){case"features":this.features[a]=t;break;case"landing":this.landing[a]=t;break;case"platform":this.platform[a]=t;break;case"media":this.media[a]=t;break;case"users":this.users[a]=t;break;case"storage":this.storage[a]=t}console.log(t),console.log(a)},handleSubChange:function(t,e,a,s){switch(e){case"features":this.features[a][s]=t;break;case"landing":this.landing[a][s]=t;break;case"platform":this.platform[a][s]=t;break;case"media":this.media[a][s]=t;break;case"users":this.users[a][s]=t;break;case"storage":this.storage[a][s]=t}console.log(t),console.log(a)}},watch:{}}},99697:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(18634),i=a(8889);const n={props:{status:{type:Object}},data:function(){return{showInReplyTo:!1}},components:{"admin-read-more":i.default},methods:{toggleLightbox:function(t){(0,s.default)({el:t.target})},toggleVideoLightbox:function(t,e){(0,s.default)({el:event.target,vidSrc:e})},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("default",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}).format(e)}}}},72173:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const s={props:{content:{type:String},maxLength:{type:Number,default:140},fontSize:{type:String,default:"13"},step:{type:Boolean,default:!1},stepLimit:{type:Number,default:140},initialLimit:{type:Number,default:10}},computed:{contentText:{get:function(){if(this.step){var t=this.content.length/this.stepLimit;return(1==this.stepIndex||tthis.maxLength&&(this.canExpand=!0),this.expanded?this.content:this.truncate()}}},data:function(){return{expanded:!1,canExpand:!1,canStepExpand:!1,stepIndex:1}},methods:{expand:function(){this.step?(this.stepIndex++,this.canStepExpand=!0):this.expanded=!0},truncate:function(){if(this.content&&this.content.length)return this.content&&this.content.lengththis.stepLimit,this.content.slice(0,this.initialLimit)):this.canStepExpand&&this.stepIndex{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(27707),i=a(8889);const n={props:{open:{type:Boolean,default:!1},model:{type:Object}},components:{"admin-modal-post":s.default,"admin-read-more":i.default},watch:{open:{handler:function(){this.isOpen=this.open},immediate:!0,deep:!0}},data:function(){return{isLoading:!0,isOpen:!1,actions:["mark-read","cw-posts","unlist-posts","private-posts","delete-posts","mark-all-read-by-domain","mark-all-read-by-username","cw-all-posts","unlist-all-posts","private-all-posts"],actionMap:{"cw-posts":"apply content warnings to all post(s) in this report?","unlist-posts":"unlist all post(s) in this report?","delete-posts":"delete all post(s) in this report?","private-posts":"make all post(s) in this report private/followers-only?","mark-all-read-by-domain":"mark all reports by this instance as closed?","mark-all-read-by-username":"mark all reports against this user as closed?","cw-all-posts":"apply content warnings to all post(s) belonging to this account?","unlist-all-posts":"make all post(s) belonging to this account as unlisted?","private-all-posts":"make all post(s) belonging to this account as private?"}}},mounted:function(){var t=this;setTimeout((function(){t.isLoading=!1}),300)},methods:{prettyCount:function(t){return t?t.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}):t},timeAgo:function(t){return t?App.util.format.timeAgo(t):t},formatDate:function(t){var e=new Date(t);return new Intl.DateTimeFormat("default",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}).format(e)},handleAction:function(t){var e=this;"mark-read"!==t?swal({title:"Confirm",text:"Are you sure you want to "+this.actionMap[t],icon:"warning",buttons:!0,dangerMode:!0}).then((function(a){!0===a&&axios.post("/i/admin/api/reports/remote/handle",{id:e.model.id,action:t}).finally((function(){e.$emit("refresh"),e.$emit("close")}))})):axios.post("/i/admin/api/reports/remote/handle",{id:this.model.id,action:t}).then((function(t){console.log(t.data)})).finally((function(){e.$emit("refresh"),e.$emit("close")}))}}}},4970:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const s={props:{name:{type:String},value:{type:Boolean},description:{type:String}},computed:{elementId:{get:function(){var t=this.name;return"fec_"+(t=(t=(t=(t=t.toLowerCase()).replace(/[^a-z0-9 -]/g," ")).replace(/\s+/g,"-")).replace(/^-+|-+$/g,""))}}}}},45053:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const s={props:{name:{type:String},value:{type:String},placeholder:{type:String},description:{type:String},isCard:{type:Boolean,default:!0},isInline:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},computed:{elementId:{get:function(){var t=this.name;return"fec_"+(t=(t=(t=(t=t.toLowerCase()).replace(/[^a-z0-9 -]/g," ")).replace(/\s+/g,"-")).replace(/^-+|-+$/g,""))}}}}},16563:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>s});const s={props:{title:{type:String},saving:{type:Boolean},saved:{type:Boolean}},computed:{buttonLabel:{get:function(){return this.saved?"Saved":this.saving?"Saving":"Save"}},isSaving:{get:function(){return this.saving}}},methods:{save:function(t){var e;null===(e=t.currentTarget)||void 0===e||e.blur(),this.$emit("save")}}}},69385:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"header bg-primary pb-3 mt-n4"},[e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"header-body"},[e("div",{staticClass:"row align-items-center py-4"},[t._m(0),t._v(" "),e("div",{staticClass:"col-xl-4 col-lg-3 col-md-4"},[e("div",{staticClass:"card card-stats mb-lg-0"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col"},[e("h5",{staticClass:"card-title text-uppercase text-muted mb-0"},[t._v("Active Autospam")]),t._v(" "),e("span",{staticClass:"h2 font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.config.open)))])]),t._v(" "),t._m(1)])])])]),t._v(" "),e("div",{staticClass:"col-xl-4 col-lg-3 col-md-4"},[e("div",{staticClass:"card card-stats bg-dark mb-lg-0"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col"},[e("h5",{staticClass:"card-title text-uppercase text-muted mb-0"},[t._v("Closed Autospam")]),t._v(" "),e("span",{staticClass:"h2 font-weight-bold text-muted mb-0"},[t._v(t._s(t.formatCount(t.config.closed)))])]),t._v(" "),t._m(2)])])])])])])])]),t._v(" "),t.loaded?e("div",{staticClass:"m-n2 m-lg-4"},[e("div",{staticClass:"container-fluid mt-4"},[e("div",{staticClass:"row mb-3 justify-content-between"},[e("div",{staticClass:"col-12"},[e("ul",{staticClass:"nav nav-pills"},[e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:0==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab(0)}}},[t._v("Dashboard")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"about"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("about")}}},[t._v("About / How to Use Autospam")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"train"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("train")}}},[t._v("Train Autospam")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"closed_reports"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("closed_reports")}}},[t._v("Closed Reports")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"manage_tokens"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("manage_tokens")}}},[t._v("Manage Tokens")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:"import_export"==t.tabIndex}],on:{click:function(e){return e.preventDefault(),t.toggleTab("import_export")}}},[t._v("Import/Export")])])])])]),t._v(" "),0===this.tabIndex?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-4"},[null===t.config.autospam_enabled?e("div"):t.config.autospam_enabled?e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[t._m(3)]):e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[t._m(4)]),t._v(" "),null===t.config.nlp_enabled?e("div"):t.config.nlp_enabled?e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[e("div",{staticClass:"card-body text-center"},[t._m(5),t._v(" "),e("p",{staticClass:"lead text-light"},[t._v("Advanced (NLP) Detection Active")]),t._v(" "),e("a",{staticClass:"btn btn-outline-danger btn-block font-weight-bold",class:{disabled:1!=t.config.autospam_enabled},attrs:{href:"#",disabled:1!=t.config.autospam_enabled},on:{click:function(e){return e.preventDefault(),t.disableAdvanced.apply(null,arguments)}}},[t._v("Disable Advanced Detection")])])]):e("div",{staticClass:"card bg-dark",staticStyle:{"min-height":"209px"}},[e("div",{staticClass:"card-body text-center"},[t._m(6),t._v(" "),e("p",{staticClass:"lead text-danger font-weight-bold"},[t._v("Advanced (NLP) Detection Inactive")]),t._v(" "),e("a",{staticClass:"btn btn-primary btn-block font-weight-bold",class:{disabled:1!=t.config.autospam_enabled},attrs:{href:"#",disabled:1!=t.config.autospam_enabled},on:{click:function(e){return e.preventDefault(),t.enableAdvanced.apply(null,arguments)}}},[t._v("Enable Advanced Detection")])])])]),t._v(" "),t._m(7)]):"about"===this.tabIndex?e("div",[t._m(8)]):"train"===this.tabIndex?e("div",[t._m(9),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header bg-gradient-primary text-white font-weight-bold"},[t._v("Train Spam Posts")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(10),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Use existing posts marked as spam to train Autospam")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",class:{disabled:t.config.files.spam.exists},attrs:{disabled:t.config.files.spam.exists},on:{click:function(e){return e.preventDefault(),t.autospamTrainSpam.apply(null,arguments)}}},[t._v("\n\t \t\t\t\t\t\t"+t._s(t.config.files.spam.exists?"Already trained":"Train Spam")+"\n\t \t\t\t\t\t")])])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header bg-gradient-primary text-white font-weight-bold"},[t._v("Train Non-Spam Posts")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(11),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Use posts from trusted users to train non-spam posts")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",class:{disabled:t.config.files.ham.exists},attrs:{disabled:t.config.files.ham.exists},on:{click:function(e){return e.preventDefault(),t.autospamTrainNonSpam.apply(null,arguments)}}},[t._v("\n\t \t\t\t\t\t\t"+t._s(t.config.files.ham.exists?"Already trained":"Train Non-Spam")+"\n\t \t\t\t\t\t")])])])])])])]):"closed_reports"===this.tabIndex?e("div",[t.closedReportsFetched?[e("div",{staticClass:"table-responsive rounded"},[e("table",{staticClass:"table table-dark"},[t._m(12),t._v(" "),e("tbody",t._l(t.closedReports.data,(function(a,s){return e("tr",{key:"closed_reports"+a.id+s},[e("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[t._v("\n\t\t \t"+t._s(a.id)+"\n\t\t ")]),t._v(" "),t._m(13,!0),t._v(" "),e("td",{staticClass:"align-middle"},[a.status&&a.status.account?e("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(a.status.account.id),target:"_blank"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[e("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[t._v("@"+t._s(a.status.account.username))]),t._v(" "),e("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[e("span",[t._v(t._s(a.status.account.followers_count)+" Followers")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),e("span",[t._v("Joined "+t._s(t.timeAgo(a.status.account.created_at)))])])])])]):t._e()]),t._v(" "),e("td",{staticClass:"font-weight-bold align-middle"},[t._v(t._s(t.timeAgo(a.created_at)))]),t._v(" "),e("td",{staticClass:"align-middle"},[e("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.viewSpamReport(a)}}},[t._v("View")])])])})),0)])]),t._v(" "),t.closedReportsFetched&&t.closedReports&&t.closedReports.data.length?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.closedReports.links.prev},on:{click:function(e){return t.autospamPaginate("prev")}}},[t._v("\n\t\t Prev\n\t\t ")]),t._v(" "),e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.closedReports.links.next},on:{click:function(e){return t.autospamPaginate("next")}}},[t._v("\n\t\t Next\n\t\t ")])]):t._e()]:[e("div",{staticClass:"d-flex justify-content-center align-items-center py-5"},[e("b-spinner")],1)]],2):"manage_tokens"===this.tabIndex?e("div",[e("div",{staticClass:"row align-items-center mb-3"},[t._m(14),t._v(" "),e("div",{staticClass:"col-12 col-md-3"},[e("a",{staticClass:"btn btn-primary btn-lg btn-block",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showCreateTokenModal=!0}}},[e("i",{staticClass:"far fa-plus fa-lg mr-1"}),t._v("\n \t\t\t\tCreate New Token\n \t\t\t")])])]),t._v(" "),t.customTokensFetched?[t.customTokens&&t.customTokens.data&&t.customTokens.data.length?[e("div",{staticClass:"table-responsive rounded"},[e("table",{staticClass:"table table-dark"},[t._m(15),t._v(" "),e("tbody",t._l(t.customTokens.data,(function(a,s){return e("tr",{key:"ct"+a.id+s},[e("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[t._v("\n\t\t\t \t"+t._s(a.id)+"\n\t\t\t ")]),t._v(" "),e("td",{staticClass:"align-middle"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(a.token))])]),t._v(" "),e("td",{staticClass:"align-middle"},[e("p",{staticClass:"text-capitalize mb-0"},[t._v(t._s(a.category))])]),t._v(" "),e("td",{staticClass:"align-middle"},[e("p",{staticClass:"text-capitalize mb-0"},[t._v(t._s(a.weight))])]),t._v(" "),e("td",{staticClass:"font-weight-bold align-middle"},[t._v(t._s(t.timeAgo(a.created_at)))]),t._v(" "),e("td",{staticClass:"font-weight-bold align-middle"},[e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditTokenModal(a)}}},[t._v("Edit")])])])})),0)])]),t._v(" "),t.customTokensFetched&&t.customTokens&&t.customTokens.data.length?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.customTokens.prev_page_url},on:{click:function(e){return t.autospamTokenPaginate("prev")}}},[t._v("\n\t\t\t Prev\n\t\t\t ")]),t._v(" "),e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.customTokens.next_page_url},on:{click:function(e){return t.autospamTokenPaginate("next")}}},[t._v("\n\t\t\t Next\n\t\t\t ")])]):t._e()]:e("div",[t._m(16)])]:[e("div",{staticClass:"d-flex justify-content-center align-items-center py-5"},[e("b-spinner")],1)]],2):"import_export"===this.tabIndex?e("div",[t._m(17),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header font-weight-bold"},[t._v("Import Training Data")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(18),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Make sure the file you are importing is a valid training data export!")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",on:{click:function(e){return e.preventDefault(),t.handleImport.apply(null,arguments)}}},[t._v("Upload Import")])])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card bg-dark"},[e("div",{staticClass:"card-header font-weight-bold"},[t._v("Export Training Data")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"d-flex flex-column align-items-center justify-content-center py-4",staticStyle:{gap:"1rem"}},[t._m(19),t._v(" "),e("p",{staticClass:"lead text-lighter"},[t._v("Only share training data with people you trust. It can be used by spammers to bypass detection!")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",on:{click:function(e){return e.preventDefault(),t.downloadExport.apply(null,arguments)}}},[t._v("Download Export")])])])])])])]):t._e()])]):e("div",{staticClass:"my-5 text-center"},[e("b-spinner")],1),t._v(" "),e("b-modal",{attrs:{title:"Autospam Post","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:t.showSpamReportModal,callback:function(e){t.showSpamReportModal=e},expression:"showSpamReportModal"}},[t.viewingSpamReportLoading?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("b-spinner")],1):[e("div",{staticClass:"list-group list-group-horizontal mt-3"},[t.viewingSpamReport&&t.viewingSpamReport.status&&t.viewingSpamReport.status.account?e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[t._v("Reported Account")]),t._v(" "),t.viewingSpamReport.status.account&&t.viewingSpamReport.status.account.id?e("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(t.viewingSpamReport.status.account.id),target:"_blank"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[e("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.viewingSpamReport.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0 text-break",class:[t.viewingSpamReport.status.account.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[t._v("@"+t._s(t.viewingSpamReport.status.account.acct))]),t._v(" "),e("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[e("span",[t._v(t._s(t.viewingSpamReport.status.account.followers_count)+" Followers")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),e("span",[t._v("Joined "+t._s(t.timeAgo(t.viewingSpamReport.status.account.created_at)))])])])])]):t._e()]):t._e()]),t._v(" "),t.viewingSpamReport&&t.viewingSpamReport.status?e("div",{staticClass:"list-group mt-3"},[t.viewingSpamReport&&t.viewingSpamReport.status&&t.viewingSpamReport.status.media_attachments.length?e("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[e("div",[t._v("Reported Post")]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.viewingSpamReport.status.url,target:"_blank"}},[t._v("View")])]),t._v(" "),"image"===t.viewingSpamReport.status.media_attachments[0].type?e("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:t.viewingSpamReport.status.media_attachments[0].url,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===t.viewingSpamReport.status.media_attachments[0].type?e("video",{attrs:{height:"140",controls:"",src:t.viewingSpamReport.status.media_attachments[0].url,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):t._e()]):t._e(),t._v(" "),t.viewingSpamReport&&t.viewingSpamReport.status&&t.viewingSpamReport.status.content_text&&t.viewingSpamReport.status.content_text.length?e("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[e("div",[t._v("Reported Post Caption")]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.viewingSpamReport.status.url,target:"_blank"}},[t._v("View")])]),t._v(" "),e("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[t._v(t._s(t.viewingSpamReport.status.content_text))])]):t._e()]):t._e()]],2),t._v(" "),e("b-modal",{attrs:{title:"Train Non-Spam","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:t.showNonSpamModal,callback:function(e){t.showNonSpamModal=e},expression:"showNonSpamModal"}},[e("p",{staticClass:"small font-weight-bold"},[t._v("Select trusted accounts to train non-spam posts against!")]),t._v(" "),!t.nonSpamAccounts||t.nonSpamAccounts.length<10?e("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,disabled:t.searchLoading,placeholder:"Search by username","aria-label":"Search by username","get-result-value":t.getTagResultValue},on:{submit:t.onSearchResultClick},scopedSlots:t._u([{key:"result",fn:function(a){var s=a.result,i=a.props;return[e("li",t._b({staticClass:"autocomplete-result d-flex align-items-center",staticStyle:{gap:"0.5rem"}},"li",i,!1),[e("img",{staticClass:"rounded-circle",attrs:{src:s.avatar,width:"32",height:"32",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v("\n "+t._s(s.username)+"\n ")])])]}}],null,!1,565605044)}):t._e(),t._v(" "),e("div",{staticClass:"list-group mt-3"},t._l(t.nonSpamAccounts,(function(a,s){return e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"d-flex align-items-center justify-content-between"},[e("div",{staticClass:"d-flex flex-row align-items-center",staticStyle:{gap:"0.5rem"}},[e("img",{staticClass:"rounded-circle",attrs:{src:a.avatar,width:"32",height:"32",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v("\n\t "+t._s(a.username)+"\n\t ")])]),t._v(" "),e("a",{staticClass:"text-danger",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.autospamTrainNonSpamRemove(s)}}},[e("i",{staticClass:"fas fa-trash"})])])])})),0),t._v(" "),t.nonSpamAccounts&&t.nonSpamAccounts.length?e("div",{staticClass:"mt-3"},[e("a",{staticClass:"btn btn-primary btn-lg font-weight-bold btn-block",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.autospamTrainNonSpamSubmit.apply(null,arguments)}}},[t._v("Train non-spam posts on trusted accounts")])]):t._e()],1),t._v(" "),e("b-modal",{attrs:{title:"Create New Token","cancel-title":"Close","cancel-variant":"outline-primary","ok-title":"Save","ok-variant":"primary"},on:{ok:t.handleSaveToken},model:{value:t.showCreateTokenModal,callback:function(e){t.showCreateTokenModal=e},expression:"showCreateTokenModal"}},[e("div",{staticClass:"list-group mt-3"},[e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Token")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.token,expression:"customTokenForm.token"}],staticClass:"form-control",domProps:{value:t.customTokenForm.token},on:{input:function(e){e.target.composing||t.$set(t.customTokenForm,"token",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Weight")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.weight,expression:"customTokenForm.weight"}],staticClass:"form-control",attrs:{type:"number",min:"-128",max:"128",step:"1"},domProps:{value:t.customTokenForm.weight},on:{input:function(e){e.target.composing||t.$set(t.customTokenForm,"weight",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Category")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.category,expression:"customTokenForm.category"}],staticClass:"form-control",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.customTokenForm,"category",e.target.multiple?a:a[0])}}},[e("option",{attrs:{value:"spam"}},[t._v("Is Spam")]),t._v(" "),e("option",{attrs:{value:"ham"}},[t._v("Is NOT Spam")])])])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Note")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.note,expression:"customTokenForm.note"}],staticClass:"form-control",domProps:{value:t.customTokenForm.note},on:{input:function(e){e.target.composing||t.$set(t.customTokenForm,"note",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Active")])]),t._v(" "),e("div",{staticClass:"col-8 text-right"},[e("div",{staticClass:"custom-control custom-checkbox"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.customTokenForm.active,expression:"customTokenForm.active"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customCheck1"},domProps:{checked:Array.isArray(t.customTokenForm.active)?t._i(t.customTokenForm.active,null)>-1:t.customTokenForm.active},on:{change:function(e){var a=t.customTokenForm.active,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.customTokenForm,"active",a.concat([null])):n>-1&&t.$set(t.customTokenForm,"active",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.customTokenForm,"active",i)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customCheck1"}})])])])])])]),t._v(" "),e("b-modal",{attrs:{title:"Edit Token","cancel-title":"Close","cancel-variant":"outline-primary","ok-title":"Update","ok-variant":"primary"},on:{ok:t.handleUpdateToken},model:{value:t.showEditTokenModal,callback:function(e){t.showEditTokenModal=e},expression:"showEditTokenModal"}},[e("div",{staticClass:"list-group mt-3"},[e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Token")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{staticClass:"form-control",attrs:{disabled:""},domProps:{value:t.editCustomTokenForm.token}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Weight")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.weight,expression:"editCustomTokenForm.weight"}],staticClass:"form-control",attrs:{type:"number",min:"-128",max:"128",step:"1"},domProps:{value:t.editCustomTokenForm.weight},on:{input:function(e){e.target.composing||t.$set(t.editCustomTokenForm,"weight",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Category")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("select",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.category,expression:"editCustomTokenForm.category"}],staticClass:"form-control",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.editCustomTokenForm,"category",e.target.multiple?a:a[0])}}},[e("option",{attrs:{value:"spam"}},[t._v("Is Spam")]),t._v(" "),e("option",{attrs:{value:"ham"}},[t._v("Is NOT Spam")])])])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Note")])]),t._v(" "),e("div",{staticClass:"col-8"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.note,expression:"editCustomTokenForm.note"}],staticClass:"form-control",domProps:{value:t.editCustomTokenForm.note},on:{input:function(e){e.target.composing||t.$set(t.editCustomTokenForm,"note",e.target.value)}}})])])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col-4"},[e("p",{staticClass:"mb-0 font-weight-bold small"},[t._v("Active")])]),t._v(" "),e("div",{staticClass:"col-8 text-right"},[e("div",{staticClass:"custom-control custom-checkbox"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.editCustomTokenForm.active,expression:"editCustomTokenForm.active"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customCheck1"},domProps:{checked:Array.isArray(t.editCustomTokenForm.active)?t._i(t.editCustomTokenForm.active,null)>-1:t.editCustomTokenForm.active},on:{change:function(e){var a=t.editCustomTokenForm.active,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.editCustomTokenForm,"active",a.concat([null])):n>-1&&t.$set(t.editCustomTokenForm,"active",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.editCustomTokenForm,"active",i)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"customCheck1"}})])])])])])])],1)},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-xl-4 col-lg-6 col-md-4"},[e("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[t._v("Autospam")]),t._v(" "),e("p",{staticClass:"text-lighter"},[t._v("The automated spam detection system")])])},function(){var t=this._self._c;return t("div",{staticClass:"col-auto"},[t("div",{staticClass:"icon icon-shape bg-gradient-primary text-white rounded-circle shadow"},[t("i",{staticClass:"far fa-sensor-alert"})])])},function(){var t=this._self._c;return t("div",{staticClass:"col-auto"},[t("div",{staticClass:"icon icon-shape bg-gradient-primary text-white rounded-circle shadow"},[t("i",{staticClass:"far fa-shield-alt"})])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-body text-center"},[e("p",[e("i",{staticClass:"far fa-check-circle fa-5x text-success"})]),t._v(" "),e("p",{staticClass:"lead text-light mb-0"},[t._v("Autospam Service Operational")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-body text-center"},[e("p",[e("i",{staticClass:"far fa-exclamation-circle fa-5x text-danger"})]),t._v(" "),e("p",{staticClass:"lead text-danger font-weight-bold mb-0"},[t._v("Autospam Service Inactive")]),t._v(" "),e("p",{staticClass:"small text-light mb-0"},[t._v("To activate, "),e("a",{attrs:{href:"/i/admin/settings"}},[t._v("click here")]),t._v(" and enable "),e("span",{staticClass:"font-weight-bold"},[t._v("Spam detection")])])])},function(){var t=this._self._c;return t("p",[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])},function(){var t=this._self._c;return t("p",[t("i",{staticClass:"far fa-exclamation-circle fa-5x text-danger"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8"},[e("div",{staticClass:"card bg-default"},[e("div",{staticClass:"card-header bg-transparent"},[e("div",{staticClass:"row align-items-center"},[e("div",{staticClass:"col"},[e("h6",{staticClass:"text-light text-uppercase ls-1 mb-1"},[t._v("Stats")]),t._v(" "),e("h5",{staticClass:"h3 text-white mb-0"},[t._v("Autospam Detections")])])])]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"chart"},[e("canvas",{staticClass:"chart-canvas",attrs:{id:"c1-dark"}})])])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card card-body"},[e("h1",[t._v("About Autospam")]),t._v(" "),e("p",{staticClass:"mb-0"},[t._v("To detect and mitigate spam, we built Autospam, an internal tool that uses NLP and other behavioural metrics to classify potential spam posts.")]),t._v(" "),e("hr"),t._v(" "),e("h2",[t._v("Standard Detection")]),t._v(" "),e("p",[t._v('Standard or "Classic" detection works by evaluating several "signals" from the post and it\'s associated account.')]),t._v(" "),e("p",[t._v('Some of the following "signals" may trigger a positive detection from public posts:')]),t._v(" "),e("ul",[e("li",[t._v("Account is less than 6 months old")]),t._v(" "),e("li",[t._v("Account has less than 100 followers")]),t._v(" "),e("li",[t._v("Post contains one or more of: "),e("span",{staticClass:"badge badge-primary"},[t._v("https://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("http://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("hxxps://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("hxxp://")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v("www.")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v(".com")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v(".net")]),t._v(" "),e("span",{staticClass:"badge badge-primary"},[t._v(".org")])])]),t._v(" "),e("p",[t._v("If you've marked atleast one positive detection from an account as "),e("span",{staticClass:"font-weight-bold"},[t._v("Not spam")]),t._v(", any future posts they create will skip detection.")]),t._v(" "),e("hr"),t._v(" "),e("h2",[t._v("Advanced Detection")]),t._v(" "),e("p",[t._v("Advanced Detection works by using a statistical method that combines prior knowledge and observed data to estimate an average value. It assigns weights to both the prior knowledge and the observed data, allowing for a more informed and reliable estimation that adapts to new information.")]),t._v(" "),e("p",[t._v("When you train Spam or Not Spam data, the caption is broken up into words (tokens) and are counted (weights) and then stored in the appropriate category (Spam or Not Spam).")]),t._v(" "),e("p",[t._v("The training data is then used to classify spam on future posts (captions) by calculating each token and associated weights and comparing it to known categories (Spam or Not Spam).")])])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card card-body"},[e("p",{staticClass:"mb-0"},[t._v("\n\t \t\t\t\tIn order for Autospam to be effective, you need to train it by classifying data as spam or not-spam.\n\t \t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("\n\t \t\t\t\tWe recommend atleast 200 classifications for both spam and not-spam, it is important to train Autospam on both so you get more accurate results.\n\t \t\t\t")])])])])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-sensor-alert fa-5x text-danger"})])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Type")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("td",{staticClass:"align-middle"},[t("p",{staticClass:"text-capitalize font-weight-bold mb-0"},[this._v("Autospam Post")])])},function(){var t=this._self._c;return t("div",{staticClass:"col-12 col-md-9"},[t("div",{staticClass:"card card-body mb-0"},[t("p",{staticClass:"mb-0"},[this._v("\n\t \t\t\t\tTokens are used to split paragraphs and sentences into smaller units that can be more easily assigned meaning.\n\t \t\t\t")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Token")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Category")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Weight")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Edit")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-body text-center py-5"},[e("p",{staticClass:"pt-5"},[e("i",{staticClass:"far fa-inbox fa-4x text-light"})]),t._v(" "),e("p",{staticClass:"lead mb-5"},[t._v("No custom tokens found!")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card card-body"},[e("p",{staticClass:"mb-0"},[t._v("\n\t \t\t\t\tYou can import and export Spam training data\n\t \t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("\n\t \t\t\t\tWe recommend exercising caution when importing training data from untrusted parties!\n\t \t\t\t")])])])])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-plus-circle fa-5x text-light"})])},function(){var t=this._self._c;return t("p",{staticClass:"mb-0"},[t("i",{staticClass:"far fa-download fa-5x text-light"})])}]},41298:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return t.loaded?e("div",[e("div",{staticClass:"header bg-primary pb-2 mt-n4"},[e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"header-body"},[e("div",{staticClass:"row align-items-center py-4"},[t._m(0),t._v(" "),e("div",{staticClass:"col-lg-6 col-5"},[e("p",{staticClass:"text-right"},[e("button",{staticClass:"btn btn-outline-white btn-lg px-5 py-2",on:{click:t.save}},[t._v("Save changes")])])])])])])]),t._v(" "),e("div",{staticClass:"container"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-3"},[e("div",{staticClass:"nav-wrapper"},[e("div",{staticClass:"nav flex-column nav-pills",attrs:{id:"tabs-icons-text",role:"tablist","aria-orientation":"vertical"}},t._l(t.tabs,(function(a){return e("div",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3",class:{active:t.tabIndex===a.id},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleTab(a.id)}}},[e("i",{class:a.icon}),t._v(" "),e("span",{staticClass:"ml-2"},[t._v(t._s(a.title))])])])})),0)])]),t._v(" "),e("div",{staticClass:"col-12 col-md-9"},[e("div",{staticClass:"card shadow mt-3"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"tab-content"},[1===t.tabIndex?e("div",{staticClass:"tab-pane fade show active"},[t.isSubmitting||t.state.awaiting_approval||t.state.is_active?t.isSubmitting||!t.state.awaiting_approval||t.state.is_active?!t.isSubmitting&&t.state.awaiting_approval&&t.state.is_active?e("div",[t._m(3)]):t.isSubmitting||t.state.awaiting_approval||!t.state.is_active?t.isSubmitting?e("div",[e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("b-spinner",{attrs:{variant:"primary"}}),t._v(" "),e("p",{staticClass:"lead my-0 text-primary"},[t._v("Sending submission...")])],1)]):e("div",[t._m(6)]):e("div",[e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("h2",{staticClass:"font-weight-bold"},[t._v("Active Listing")]),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),e("button",{staticClass:"btn btn-primary btn-sm mt-3 font-weight-bold px-5 text-uppercase",on:{click:t.handleSubmit}},[t._v("\n Update my listing on pixelfed.org\n ")])])]):e("div",[t._m(2)]):e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("div",{staticClass:"text-center mb-4"},[t._m(1),t._v(" "),e("p",{staticClass:"display-3 mb-1"},[t._v("Awaiting Submission")]),t._v(" "),t.state.is_eligible||t.state.submission_exists?t.state.is_eligible&&!t.state.submission_exists?e("div",{staticClass:"mb-4"},[e("p",{staticClass:"lead mt-0 text-muted"},[t._v("Your directory listing is ready for submission!")]),t._v(" "),e("button",{staticClass:"btn btn-primary btn-lg font-weight-bold px-5 text-uppercase",on:{click:t.handleSubmit}},[t._v("\n Submit my Server to pixelfed.org\n ")])]):t._e():e("p",{staticClass:"lead mt-0 text-muted"},[t._v("Your directory listing isn't completed yet")])])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card text-left"},[e("div",{staticClass:"list-group list-group-flush"},[e("div",{staticClass:"list-group-item"},[!0===t.requirements.curated_onboarding?[e("i",{staticClass:"far fa-exclamation-circle text-success"}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n Curated account registration\n ")])]:[e("i",{staticClass:"far",class:[t.requirements.open_registration?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements.open_registration?"Open":"Closed")+" account registration\n ")])]],2),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.requirements.oauth_enabled?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements.oauth_enabled?"Enabled":"Disabled")+" mobile apis/oauth\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.requirements.activitypub_enabled?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements.activitypub_enabled?"Enabled":"Disabled")+" activitypub federation\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.summary&&t.form.summary.length&&t.form.location&&t.form.location.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.summary&&t.form.summary.length&&t.form.location&&t.form.location.length?"Configured":"Missing")+" server details\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.requirements_validator&&0==t.requirements_validator.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.requirements_validator&&0==t.requirements_validator.length?"Valid":"Invalid")+" feature requirements\n ")])])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card text-left"},[e("div",{staticClass:"list-group list-group-flush"},[e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.contact_account?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.contact_account?"Configured":"Missing")+" admin account\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.contact_email?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.contact_email?"Configured":"Missing")+" contact email\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.selectedPosts&&t.selectedPosts.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.selectedPosts&&t.selectedPosts.length?"Configured":"Missing")+" favourite posts\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.form.privacy_pledge?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.form.privacy_pledge?"Configured":"Missing")+" privacy pledge\n ")])]),t._v(" "),e("div",{staticClass:"list-group-item"},[e("i",{staticClass:"far",class:[t.communityGuidelines&&t.communityGuidelines.length?"fa-check-circle text-success":"fa-exclamation-circle text-danger"]}),t._v(" "),e("span",{staticClass:"ml-2 font-weight-bold"},[t._v("\n "+t._s(t.communityGuidelines&&t.communityGuidelines.length?"Configured":"Missing")+" community guidelines\n ")])])])])])])]):2===t.tabIndex?e("div",{staticClass:"tab-pane fade show active"},[e("p",{staticClass:"description"},[t._v("Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.")])]):3===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Server Details")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Edit your server details to better describe it")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card shadow-none border card-body"},[e("div",{staticClass:"form-group mb-0"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Summary")]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.form.summary,expression:"form.summary"}],staticClass:"form-control form-control-muted",attrs:{id:"form-summary",rows:"3",placeholder:"A descriptive summary of your instance up to 140 characters long. HTML is not allowed."},domProps:{value:t.form.summary},on:{input:function(e){e.target.composing||t.$set(t.form,"summary",e.target.value)}}}),t._v(" "),e("p",{staticClass:"help-text small text-muted text-right"},[t._v("\n "+t._s(t.form.summary&&t.form.summary.length?t.form.summary.length:0)+"/140\n ")])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card shadow-none border card-body"},[e("div",{staticClass:"form-group mb-0"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Location")]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.location,expression:"form.location"}],staticClass:"form-control form-control-muted",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"location",e.target.multiple?a:a[0])}}},[e("option",{attrs:{selected:"",disabled:"",value:"0"}},[t._v("Select the country your server is in")]),t._v(" "),t._l(t.initialData.countries,(function(a){return e("option",{domProps:{value:a}},[t._v(t._s(a))])}))],2),t._v(" "),e("p",{staticClass:"form-text small text-muted"},[t._v("Select the country your server is hosted in, even if you are in a different country")])])])])]),t._v(" "),e("div",{staticClass:"list-group mb-4"},[e("div",{staticClass:"list-group-item"},[e("label",{staticClass:"font-weight-bold mb-0"},[t._v("Server Banner")]),t._v(" "),e("p",{staticClass:"small"},[t._v("Add an optional banner image to your directory listing")]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card mb-0 shadow-none border"},[t.form.banner_image?e("div",[e("a",{attrs:{href:t.form.banner_image,target:"_blank"}},[e("img",{staticClass:"card-img-top",attrs:{src:t.form.banner_image}})])]):e("div",{staticClass:"card-body bg-primary text-white"},[t._m(7),t._v(" "),e("p",{staticClass:"text-center mb-0"},[t._v("No banner image")])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[t.isUploadingBanner?e("div",{staticClass:"text-center"},[e("b-spinner",{attrs:{variant:"primary"}})],1):e("div",{staticClass:"custom-file"},[e("input",{ref:"bannerImageRef",staticClass:"custom-file-input",attrs:{type:"file",id:"banner_image"},on:{change:t.uploadBannerImage}}),t._v(" "),e("label",{staticClass:"custom-file-label",attrs:{for:"banner_image"}},[t._v("Choose file")]),t._v(" "),e("p",{staticClass:"form-text text-muted small mb-0"},[t._v("Must be 1920 by 1080 pixels")]),t._v(" "),t._m(8),t._v(" "),t.form.banner_image&&!t.form.banner_image.endsWith("default.jpg")?e("div",[e("button",{staticClass:"btn btn-danger font-weight-bold btn-block mt-5",on:{click:t.deleteBannerImage}},[t._v("Delete banner image")])]):t._e()])])])])]),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card shadow-none border card-body"},[e("div",{staticClass:"form-group mb-0"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Primary Language")]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.primary_locale,expression:"form.primary_locale"}],staticClass:"form-control form-control-muted",attrs:{disabled:""},on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"primary_locale",e.target.multiple?a:a[0])}}},t._l(t.initialData.available_languages,(function(a){return e("option",{domProps:{value:a.code}},[t._v(t._s(a.name))])})),0),t._v(" "),t._m(9)])])])])]):4===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Admin Contact")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Set a designated admin account and public email address")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[t.initialData.admins.length?e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Designated Admin")]),t._v(" "),e("select",{directives:[{name:"model",rawName:"v-model",value:t.form.contact_account,expression:"form.contact_account"}],staticClass:"form-control form-control-muted",on:{change:function(e){var a=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.form,"contact_account",e.target.multiple?a:a[0])}}},[e("option",{attrs:{disabled:"",value:"0"}},[t._v("Select a designated admin")]),t._v(" "),t._l(t.initialData.admins,(function(a,s){return e("option",{key:"pfc-"+a+s,domProps:{value:a.pid}},[t._v(t._s(a.username))])}))],2)]):e("div",{staticClass:"px-3 pb-2 pt-0 border border-danger rounded"},[e("p",{staticClass:"lead font-weight-bold text-danger"},[t._v("No admin(s) found")]),t._v(" "),t._m(10)])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Public Email")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.contact_email,expression:"form.contact_email"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"info@example.org"},domProps:{value:t.form.contact_email},on:{input:function(e){e.target.composing||t.$set(t.form,"contact_email",e.target.value)}}}),t._v(" "),e("p",{staticClass:"help-text small text-muted"},[t._v("\n Must be a valid email address\n ")])])])])]):5===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Favourite Posts")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Show off a few favourite posts from your server")]),t._v(" "),e("hr",{staticClass:"mt-0 mb-1"}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.selectedPosts&&12!==t.selectedPosts.length,expression:"selectedPosts && selectedPosts.length !== 12"}],staticClass:"nav-wrapper"},[e("ul",{staticClass:"nav nav-pills nav-fill flex-column flex-md-row",attrs:{role:"tablist"}},[e("li",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3 mb-md-0 active",attrs:{id:"favposts-1-tab","data-toggle":"tab",href:"#favposts-1",role:"tab","aria-controls":"favposts-1","aria-selected":"true"}},[t._v(t._s(this.selectedPosts.length?this.selectedPosts.length:"")+" Selected Posts")])]),t._v(" "),t.selectedPosts&&t.selectedPosts.length<12?e("li",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3 mb-md-0",attrs:{id:"favposts-2-tab","data-toggle":"tab",href:"#favposts-2",role:"tab","aria-controls":"favposts-2","aria-selected":"false"}},[t._v("Add by post id")])]):t._e(),t._v(" "),t.selectedPosts&&t.selectedPosts.length<12?e("li",{staticClass:"nav-item"},[e("a",{staticClass:"nav-link mb-sm-3 mb-md-0",attrs:{id:"favposts-3-tab","data-toggle":"tab",href:"#favposts-3",role:"tab","aria-controls":"favposts-3","aria-selected":"false"},on:{click:t.initPopularPosts}},[t._v("Add by popularity")])]):t._e()])]),t._v(" "),e("div",{staticClass:"tab-content mt-3"},[e("div",{staticClass:"tab-pane fade list-fade-bottom show active",attrs:{id:"favposts-1",role:"tabpanel","aria-labelledby":"favposts-1-tab"}},[t.selectedPosts&&t.selectedPosts.length?e("div",{staticStyle:{"max-height":"520px","overflow-y":"auto"}},[t._l(t.selectedPosts,(function(a){return e("div",{key:"sp-"+a.id,staticClass:"list-group-item border-primary form-control-muted"},[e("div",{staticClass:"media align-items-center"},[e("div",{staticClass:"custom-control custom-checkbox mr-2"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",checked:"",id:"checkbox-sp-".concat(a.id)},on:{change:function(e){return t.toggleSelectedPost(a)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"checkbox-sp-".concat(a.id)}})]),t._v(" "),e("img",{staticClass:"border rounded-sm mr-3",staticStyle:{"object-fit":"cover"},attrs:{src:a.media_attachments[0].url,width:"100",height:"100",loading:"lazy"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"lead mt-0 mb-0 font-weight-bold"},[t._v("@"+t._s(a.account.username))]),t._v(" "),e("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.favourites_count)))]),t._v(" Likes")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.account.followers_count)))]),t._v(" Followers")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[t._v("Created "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatDateTime(a.created_at)))])])])]),t._v(" "),e("a",{staticClass:"btn btn-outline-primary btn-sm rounded-pill",attrs:{href:a.url,target:"_blank"}},[t._v("View")])])])})),t._v(" "),e("div",{staticClass:"mt-5 mb-5 pt-3"})],2):e("div",[t._m(11)])]),t._v(" "),e("div",{staticClass:"tab-pane fade",attrs:{id:"favposts-2",role:"tabpanel","aria-labelledby":"favposts-2-tab"}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold"},[t._v("Find and add by post id")]),t._v(" "),e("div",{staticClass:"input-group mb-3"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.favouritePostByIdInput,expression:"favouritePostByIdInput"}],staticClass:"form-control form-control-muted border",attrs:{type:"number",placeholder:"Post id",min:"1",max:"99999999999999999999",disabled:t.favouritePostByIdFetching},domProps:{value:t.favouritePostByIdInput},on:{input:function(e){e.target.composing||(t.favouritePostByIdInput=e.target.value)}}}),t._v(" "),e("div",{staticClass:"input-group-append"},[t.favouritePostByIdFetching?e("button",{staticClass:"btn btn-outline-primary",attrs:{disabled:""}},[t._m(12)]):e("button",{staticClass:"btn btn-outline-primary",attrs:{type:"button"},on:{click:t.handlePostByIdSearch}},[t._v("\n Search\n ")])])])])]),t._v(" "),t._m(13)])]),t._v(" "),e("div",{staticClass:"tab-pane fade list-fade-bottom mb-0",attrs:{id:"favposts-3",role:"tabpanel","aria-labelledby":"favposts-3-tab"}},[t.popularPostsLoaded?e("div",{staticClass:"list-group",staticStyle:{"max-height":"520px","overflow-y":"auto"}},[t._l(t.popularPosts,(function(a){return e("div",{key:"pp-"+a.id,staticClass:"list-group-item",class:[t.selectedPosts.includes(a)?"border-primary form-control-muted":""]},[e("div",{staticClass:"media align-items-center"},[e("div",{staticClass:"custom-control custom-checkbox mr-2"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"checkbox-pp-".concat(a.id)},domProps:{checked:t.selectedPosts.includes(a)},on:{change:function(e){return t.togglePopularPost(a.id,a)}}}),t._v(" "),e("label",{staticClass:"custom-control-label",attrs:{for:"checkbox-pp-".concat(a.id)}})]),t._v(" "),e("img",{staticClass:"border rounded-sm mr-3",staticStyle:{"object-fit":"cover"},attrs:{src:a.media_attachments[0].url,width:"100",height:"100",loading:"lazy"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"lead mt-0 mb-0 font-weight-bold"},[t._v("@"+t._s(a.account.username))]),t._v(" "),e("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.favourites_count)))]),t._v(" Likes")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(a.account.followers_count)))]),t._v(" Followers")]),t._v(" "),e("span",{staticClass:"mx-2"},[t._v("·")]),t._v(" "),e("span",[t._v("Created "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatDateTime(a.created_at)))])])])]),t._v(" "),e("a",{staticClass:"btn btn-outline-primary btn-sm rounded-pill",attrs:{href:a.url,target:"_blank"}},[t._v("View")])])])})),t._v(" "),e("div",{staticClass:"mt-5 mb-3"})],2):e("div",{staticClass:"text-center py-5"},[t._m(14)])])])]):6===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Privacy Pledge")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Pledge to keep you and your data private and securely stored")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("p",[t._v("To qualify for the Privacy Pledge, you must abide by the following rules:")]),t._v(" "),t._m(15),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("You may use 3rd party services like captchas on specific pages, so long as they are clearly defined in your privacy policy")]),t._v(" "),e("hr"),t._v(" "),e("p"),e("div",{staticClass:"custom-control custom-checkbox mr-2"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.form.privacy_pledge,expression:"form.privacy_pledge"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"privacy-pledge"},domProps:{checked:Array.isArray(t.form.privacy_pledge)?t._i(t.form.privacy_pledge,null)>-1:t.form.privacy_pledge},on:{change:function(e){var a=t.form.privacy_pledge,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&t.$set(t.form,"privacy_pledge",a.concat([null])):n>-1&&t.$set(t.form,"privacy_pledge",a.slice(0,n).concat(a.slice(n+1)))}else t.$set(t.form,"privacy_pledge",i)}}}),t._v(" "),e("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"privacy-pledge"}},[t._v("I agree to the uphold the Privacy Pledge")])]),t._v(" "),e("p")]):7===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Community Guidelines")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("A few ground rules to keep your community healthy and safe.")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),t.communityGuidelines&&t.communityGuidelines.length?e("ol",{staticClass:"font-weight-bold"},t._l(t.communityGuidelines,(function(a){return e("li",{staticClass:"text-primary"},[e("span",{staticClass:"lead ml-1 text-dark"},[t._v(t._s(a))])])})),0):e("div",{staticClass:"card bg-primary text-white"},[t._m(16)]),t._v(" "),e("hr"),t._v(" "),t._m(17)]):8===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("Feature Requirements")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("The minimum requirements for Directory inclusion.")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("media_types")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Media Types")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Allowed MIME types. image/jpeg and image/png by default")]),t._v(" "),t.requirements_validator.hasOwnProperty("media_types")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.media_types[0]))]):t._e()])]),t._v(" "),t.feature_config.optimize_image?e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("image_quality")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Image Quality")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Image optimization is enabled, the image quality must be a value between 1-100.")]),t._v(" "),t.requirements_validator.hasOwnProperty("image_quality")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.image_quality[0]))]):t._e()])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_photo_size")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Photo Size")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Max photo upload size in kb. Must be between 15-100 MB.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_photo_size")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_photo_size[0]))]):t._e()])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_caption_length")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Caption Length")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("The max caption length limit. Must be between 500-10000.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_caption_length")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_caption_length[0]))]):t._e()])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_altext_length")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Alt-text length")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("The alt-text length limit. Must be between 1000-5000.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_altext_length")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_altext_length[0]))]):t._e()])]),t._v(" "),t.feature_config.enforce_account_limit?e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_account_size")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Account Size")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("The account storage limit. Must be 1GB at minimum.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_account_size")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_account_size[0]))]):t._e()])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("max_album_length")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Max Album Length")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Max photos per album post. Must be between 4-20.")]),t._v(" "),t.requirements_validator.hasOwnProperty("max_album_length")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.max_album_length[0]))]):t._e()])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center"},[e("div",[e("i",{staticClass:"far fa-2x mr-4",class:[t.requirements_validator.hasOwnProperty("account_deletion")?"fa-exclamation-circle text-danger":"fa-check-circle text-success"]})]),t._v(" "),e("div",[e("p",{staticClass:"font-weight-bold text-dark my-0"},[t._v("Account Deletion")]),t._v(" "),e("p",{staticClass:"mb-0 small text-muted"},[t._v("Allow users to delete their own account.")]),t._v(" "),t.requirements_validator.hasOwnProperty("account_deletion")?e("p",{staticClass:"mb-0 text-danger font-weight-bold"},[t._v(t._s(t.requirements_validator.account_deletion[0]))]):t._e()])])])])])]):9===t.tabIndex?e("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[e("h2",{staticClass:"display-4 mb-0"},[t._v("User Testimonials")]),t._v(" "),e("p",{staticClass:"small text-muted"},[t._v("Add testimonials from your users.")]),t._v(" "),e("hr",{staticClass:"mt-0"}),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 col-md-6 list-fade-bottom"},[e("div",{staticClass:"list-group pb-5",staticStyle:{"max-height":"520px","overflow-y":"auto"}},t._l(t.testimonials,(function(a,s){return e("div",{staticClass:"list-group-item",class:[s==t.testimonials.length-1?"mb-5":""]},[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 rounded-circle",attrs:{src:a.profile.avatar,width:"40",h:"40"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("\n "+t._s(a.profile.username)+"\n ")]),t._v(" "),e("p",{staticClass:"small text-muted mt-n1 mb-0"},[t._v("\n Member Since "+t._s(t.formatDate(a.profile.created_at))+"\n ")])])]),t._v(" "),e("div",[e("p",{staticClass:"mb-0 small"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.editTestimonial(a)}}},[t._v("\n Edit\n ")])]),t._v(" "),e("p",{staticClass:"mb-0 small"},[e("a",{staticClass:"text-danger",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.deleteTestimonial(a)}}},[t._v("\n Delete\n ")])])])]),t._v(" "),e("hr",{staticClass:"my-1"}),t._v(" "),e("p",{staticClass:"small font-weight-bold text-muted mb-0 text-center"},[t._v("Testimonial")]),t._v(" "),e("div",{staticClass:"border rounded px-3"},[e("p",{staticClass:"my-2 small",staticStyle:{"white-space":"pre-wrap"},domProps:{innerHTML:t._s(a.body)}})])])})),0)]),t._v(" "),e("div",{staticClass:"col-12 col-md-6"},[t.isEditingTestimonial?e("div",{staticClass:"card"},[e("div",{staticClass:"card-header font-weight-bold"},[t._v("\n Edit Testimonial\n ")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Username")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.editingTestimonial.profile.username,expression:"editingTestimonial.profile.username"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"test",disabled:""},domProps:{value:t.editingTestimonial.profile.username},on:{input:function(e){e.target.composing||t.$set(t.editingTestimonial.profile,"username",e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Testimonial")]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.editingTestimonial.body,expression:"editingTestimonial.body"}],staticClass:"form-control form-control-muted",attrs:{rows:"5"},domProps:{value:t.editingTestimonial.body},on:{input:function(e){e.target.composing||t.$set(t.editingTestimonial,"body",e.target.value)}}}),t._v(" "),e("div",{staticClass:"d-flex justify-content-between"},[e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n Text only, up to 500 characters\n ")]),t._v(" "),e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n "+t._s(t.editingTestimonial.body?t.editingTestimonial.body.length:0)+"/500\n ")])])])]),t._v(" "),e("div",{staticClass:"card-footer"},[e("button",{staticClass:"btn btn-primary btn-block",attrs:{type:"button"},on:{click:t.saveEditTestimonial}},[t._v("\n Save\n ")]),t._v(" "),e("button",{staticClass:"btn btn-secondary btn-block",attrs:{type:"button"},on:{click:t.cancelEditTestimonial}},[t._v("\n Cancel\n ")])])]):e("div",{staticClass:"card"},[t.testimonials.length<10?[e("div",{staticClass:"card-header font-weight-bold"},[t._v("\n Add New Testimonial\n ")]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Username")]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.testimonial.username,expression:"testimonial.username"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"test"},domProps:{value:t.testimonial.username},on:{input:function(e){e.target.composing||t.$set(t.testimonial,"username",e.target.value)}}}),t._v(" "),e("p",{staticClass:"help-text small text-muted"},[t._v("\n Must be a valid user account\n ")])]),t._v(" "),e("div",{staticClass:"form-group"},[e("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[t._v("Testimonial")]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.testimonial.body,expression:"testimonial.body"}],staticClass:"form-control form-control-muted",attrs:{rows:"5"},domProps:{value:t.testimonial.body},on:{input:function(e){e.target.composing||t.$set(t.testimonial,"body",e.target.value)}}}),t._v(" "),e("div",{staticClass:"d-flex justify-content-between"},[e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n Text only, up to 500 characters\n ")]),t._v(" "),e("p",{staticClass:"help-text small text-muted mb-0"},[t._v("\n "+t._s(t.testimonial.body?t.testimonial.body.length:0)+"/500\n ")])])])]),t._v(" "),e("div",{staticClass:"card-footer"},[e("button",{staticClass:"btn btn-primary btn-block",attrs:{type:"button"},on:{click:t.saveTestimonial}},[t._v("Save Testimonial")])])]:[t._m(18)]],2)])])]):t._e()])])])])])])]):e("div",[t._m(19)])},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-lg-6 col-7"},[e("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[t._v("Directory")]),t._v(" "),e("p",{staticClass:"h3 text-white font-weight-light"},[t._v("Manage your server listing on pixelfed.org")])])},function(){var t=this._self._c;return t("p",[t("i",{staticClass:"far fa-exclamation-triangle fa-5x text-lighter"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("p",{staticClass:"display-3 mb-1"},[t._v("Awaiting Approval")]),t._v(" "),e("p",{staticClass:"text-primary mb-1"},[t._v("Awaiting submission approval from pixelfed.org, please check back later!")]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("If you are still waiting for approval after 24 hours please contact the Pixelfed team.")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("p",{staticClass:"display-3 mb-1"},[t._v("Awaiting Update Approval")]),t._v(" "),e("p",{staticClass:"text-primary mb-1"},[t._v("Awaiting updated submission approval from pixelfed.org, please check back later!")]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("If you are still waiting for approval after 24 hours please contact the Pixelfed team.")])])},function(){var t=this._self._c;return t("p",{staticClass:"my-3"},[t("i",{staticClass:"far fa-check-circle fa-4x text-success"})])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mt-2 mb-0"},[t._v("Your server directory listing on "),e("a",{staticClass:"font-weight-bold",attrs:{href:"#"}},[t._v("pixelfed.org")]),t._v(" is active")])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body shadow-none border d-flex align-items-center justify-content-center py-5"},[e("p",{staticClass:"display-3 mb-1"},[t._v("Oops! An unexpected error occured")]),t._v(" "),e("p",{staticClass:"text-primary mb-1"},[t._v("Ask the Pixelfed team for assistance.")])])},function(){var t=this._self._c;return t("p",{staticClass:"text-center mb-2"},[t("i",{staticClass:"far fa-exclamation-circle fa-2x"})])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"form-text text-muted small mb-0"},[t._v("Must be a "),e("kbd",[t._v("JPEG")]),t._v(" or "),e("kbd",[t._v("PNG")]),t._v(" image no larger than 5MB.")])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"form-text text-muted small mb-0"},[t._v("The primary language of your server, to edit this value you need to set the "),e("kbd",[t._v("APP_LOCALE")]),t._v(" .env value")])},function(){var t=this,e=t._self._c;return e("ul",{staticClass:"text-danger"},[e("li",[t._v("Admins must be active")]),t._v(" "),e("li",[t._v("Admins must have 2FA setup and enabled")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body bg-lighter text-center py-5"},[e("p",{staticClass:"text-light mb-1"},[e("i",{staticClass:"far fa-info-circle fa-3x"})]),t._v(" "),e("p",{staticClass:"h2 mb-0"},[t._v("0 posts selected")]),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v("You can select up to 12 favourite posts by id or popularity")])])},function(){var t=this._self._c;return t("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-6"},[e("div",{staticClass:"card card-body bg-primary"},[e("div",{staticClass:"d-flex align-items-center text-white"},[e("i",{staticClass:"far fa-info-circle mr-2"}),t._v(" "),e("p",{staticClass:"small mb-0 font-weight-bold"},[t._v("A post id is the numerical id found in post urls")])])])])},function(){var t=this._self._c;return t("div",{staticClass:"spinner-border text-primary",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this,e=t._self._c;return e("ul",{staticClass:"font-weight-bold"},[e("li",[t._v("No analytics or 3rd party trackers*")]),t._v(" "),e("li",[t._v("User data is not sold to any 3rd parties")]),t._v(" "),e("li",[t._v("Data is stored securely in accordance with industry standards")]),t._v(" "),e("li",[t._v("Admin accounts are protected with 2FA")]),t._v(" "),e("li",[t._v("Follow strict support procedures to keep your accounts safe")]),t._v(" "),e("li",[t._v("Give at least 6 months warning in the event we shut down")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-body text-center py-5"},[e("p",{staticClass:"mb-n3"},[e("i",{staticClass:"far fa-exclamation-circle fa-3x"})]),t._v(" "),e("p",{staticClass:"lead mb-0"},[t._v("No Community Guidelines have been set")])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mb-0"},[t._v("You can manage Community Guidelines on the "),e("a",{attrs:{href:"/i/admin/settings"}},[t._v("Settings page")])])},function(){var t=this._self._c;return t("div",{staticClass:"card-body text-center"},[t("p",{staticClass:"lead"},[this._v("You can't add any more testimonials")])])},function(){var t=this._self._c;return t("div",{staticClass:"container my-5 py-5 text-center"},[t("div",{staticClass:"spinner-border text-primary",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])])}]},54449:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"header bg-primary pb-3 mt-n4"},[e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"header-body"},[t._m(0),t._v(" "),e("div",{staticClass:"row"},[e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Unique Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_unique)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Total Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_posts)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("New (past 14 days)")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.added_14_days)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Banned Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_banned)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("NSFW Hashtags")]),t._v(" "),e("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[t._v(t._s(t.prettyCount(t.stats.total_nsfw)))])])]),t._v(" "),e("div",{staticClass:"col-xl-2 col-md-6"},[e("div",{staticClass:"mb-3"},[e("h5",{staticClass:"text-light text-uppercase mb-0"},[t._v("Clear Trending Cache")]),t._v(" "),e("button",{staticClass:"btn btn-outline-white btn-block btn-sm py-0 mt-1",on:{click:t.clearTrendingCache}},[t._v("Clear Cache")])])])])])])]),t._v(" "),t.loaded?e("div",{staticClass:"m-n2 m-lg-4"},[e("div",{staticClass:"container-fluid mt-4"},[e("div",{staticClass:"row mb-3 justify-content-between"},[e("div",{staticClass:"col-12 col-md-8"},[e("ul",{staticClass:"nav nav-pills"},[e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:0==t.tabIndex}],on:{click:function(e){return t.toggleTab(0)}}},[t._v("All")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:1==t.tabIndex}],on:{click:function(e){return t.toggleTab(1)}}},[t._v("Trending")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:2==t.tabIndex}],on:{click:function(e){return t.toggleTab(2)}}},[t._v("Banned")])]),t._v(" "),e("li",{staticClass:"nav-item"},[e("button",{class:["nav-link",{active:3==t.tabIndex}],on:{click:function(e){return t.toggleTab(3)}}},[t._v("NSFW")])])])]),t._v(" "),e("div",{staticClass:"col-12 col-md-4"},[e("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,disabled:t.searchLoading,placeholder:"Search hashtags","aria-label":"Search hashtags","get-result-value":t.getTagResultValue},on:{submit:t.onSearchResultClick},scopedSlots:t._u([{key:"result",fn:function(a){var s=a.result,i=a.props;return[e("li",t._b({staticClass:"autocomplete-result d-flex justify-content-between align-items-center"},"li",i,!1),[e("div",{staticClass:"font-weight-bold",class:{"text-danger":s.is_banned}},[t._v("\n #"+t._s(s.name)+"\n ")]),t._v(" "),e("div",{staticClass:"small text-muted"},[t._v("\n "+t._s(t.prettyCount(s.cached_count))+" posts\n ")])])]}}])})],1)]),t._v(" "),[0,2,3].includes(this.tabIndex)?e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"table table-dark"},[e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("ID","id"))},on:{click:function(e){return t.toggleCol("id")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Hashtag","name"))},on:{click:function(e){return t.toggleCol("name")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Count","cached_count"))},on:{click:function(e){return t.toggleCol("cached_count")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Can Search","can_search"))},on:{click:function(e){return t.toggleCol("can_search")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Can Trend","can_trend"))},on:{click:function(e){return t.toggleCol("can_trend")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("NSFW","is_nsfw"))},on:{click:function(e){return t.toggleCol("is_nsfw")}}}),t._v(" "),e("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:t._s(t.buildColumn("Banned","is_banned"))},on:{click:function(e){return t.toggleCol("is_banned")}}}),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")])])]),t._v(" "),e("tbody",t._l(t.hashtags,(function(a,s){var i;return e("tr",[e("td",{staticClass:"font-weight-bold text-monospace text-muted"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditHashtagModal(a,s)}}},[t._v("\n "+t._s(a.id)+"\n ")])]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[t._v(t._s(a.name))]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[e("a",{attrs:{href:"/i/web/hashtag/".concat(a.slug)}},[t._v("\n "+t._s(null!==(i=a.cached_count)&&void 0!==i?i:0)+"\n ")])]),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.can_search,"text-success","text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.can_trend,"text-success","text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.is_nsfw,"text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold",domProps:{innerHTML:t._s(t.boolIcon(a.is_banned,"text-danger"))}}),t._v(" "),e("td",{staticClass:"font-weight-bold"},[t._v(t._s(t.timeAgo(a.created_at)))])])})),0)])]):t._e(),t._v(" "),[0,2,3].includes(this.tabIndex)?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.pagination.prev},on:{click:function(e){return t.paginate("prev")}}},[t._v("\n Prev\n ")]),t._v(" "),e("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!t.pagination.next},on:{click:function(e){return t.paginate("next")}}},[t._v("\n Next\n ")])]):t._e(),t._v(" "),1==this.tabIndex?e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"table table-dark"},[t._m(1),t._v(" "),e("tbody",t._l(t.trendingTags,(function(a,s){var i;return e("tr",[e("td",{staticClass:"font-weight-bold text-monospace text-muted"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditHashtagModal(a,s)}}},[t._v("\n "+t._s(a.id)+"\n ")])]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[t._v(t._s(a.hashtag))]),t._v(" "),e("td",{staticClass:"font-weight-bold"},[e("a",{attrs:{href:"/i/web/hashtag/".concat(a.hashtag)}},[t._v("\n "+t._s(null!==(i=a.total)&&void 0!==i?i:0)+"\n ")])])])})),0)])]):t._e()])]):e("div",{staticClass:"my-5 text-center"},[e("b-spinner")],1),t._v(" "),e("b-modal",{attrs:{title:"Edit Hashtag","ok-only":!0,lazy:!0,static:!0},model:{value:t.showEditModal,callback:function(e){t.showEditModal=e},expression:"showEditModal"}},[t.editingHashtag&&t.editingHashtag.name?e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Name")]),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v(t._s(t.editingHashtag.name))])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Total Uses")]),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v(t._s(t.editingHashtag.cached_count.toLocaleString("en-CA",{compactDisplay:"short"})))])]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Can Trend")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.can_trend,callback:function(e){t.$set(t.editingHashtag,"can_trend",e)},expression:"editingHashtag.can_trend"}})],1)]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Can Search")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.can_search,callback:function(e){t.$set(t.editingHashtag,"can_search",e)},expression:"editingHashtag.can_search"}})],1)]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("Banned")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.is_banned,callback:function(e){t.$set(t.editingHashtag,"is_banned",e)},expression:"editingHashtag.is_banned"}})],1)]),t._v(" "),e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[e("div",{staticClass:"text-muted small"},[t._v("NSFW")]),t._v(" "),e("div",{staticClass:"mr-n2 mb-1"},[e("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:t.editingHashtag.is_nsfw,callback:function(e){t.$set(t.editingHashtag,"is_nsfw",e)},expression:"editingHashtag.is_nsfw"}})],1)])]):t._e(),t._v(" "),e("transition",{attrs:{name:"fade"}},[t.editingHashtag&&t.editingHashtag.name&&t.editSaved?e("div",[e("p",{staticClass:"text-primary small font-weight-bold text-center mt-1 mb-0"},[t._v("Hashtag changes successfully saved!")])]):t._e()])],1)],1)},i=[function(){var t=this._self._c;return t("div",{staticClass:"row align-items-center py-4"},[t("div",{staticClass:"col-lg-6 col-7"},[t("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[this._v("Hashtags")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Hashtag")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Trending Count")])])])}]},38343:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t,e,a,s=this,i=s._self._c;return i("div",[i("div",{staticClass:"header bg-primary pb-3 mt-n4"},[i("div",{staticClass:"container-fluid"},[i("div",{staticClass:"header-body"},[s._m(0),s._v(" "),i("div",{staticClass:"row"},[i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("Total Instances")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.total_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("New (past 14 days)")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.new_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("Banned Instances")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.banned_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("h5",{staticClass:"text-light text-uppercase mb-0"},[s._v("NSFW Instances")]),s._v(" "),i("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size"},[s._v(s._s(s.prettyCount(s.stats.nsfw_count)))])])]),s._v(" "),i("div",{staticClass:"col-xl-2 col-md-6"},[i("div",{staticClass:"mb-3"},[i("button",{staticClass:"btn btn-outline-white btn-block btn-sm mt-1",on:{click:function(t){t.preventDefault(),s.showAddModal=!0}}},[s._v("Create New Instance")]),s._v(" "),s.showImportForm?i("div",[i("div",{staticClass:"form-group mt-3"},[i("div",{staticClass:"custom-file"},[i("input",{ref:"importInput",staticClass:"custom-file-input",attrs:{type:"file",id:"customFile"},on:{change:s.onImportUpload}}),s._v(" "),i("label",{staticClass:"custom-file-label",attrs:{for:"customFile"}},[s._v("Choose file")])])]),s._v(" "),i("p",{staticClass:"mb-0 mt-n3"},[i("a",{staticClass:"text-white font-weight-bold small",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.showImportForm=!1}}},[s._v("Cancel")])])]):i("div",{staticClass:"d-flex mt-1"},[i("button",{staticClass:"btn btn-outline-white btn-sm mt-1",on:{click:s.openImportForm}},[s._v("Import")]),s._v(" "),i("button",{staticClass:"btn btn-outline-white btn-block btn-sm mt-1",on:{click:function(t){return s.downloadBackup()}}},[s._v("Download Backup")])])])])])])])]),s._v(" "),s.loaded?i("div",{staticClass:"m-n2 m-lg-4"},[i("div",{staticClass:"container-fluid mt-4"},[i("div",{staticClass:"row mb-3 justify-content-between"},[i("div",{staticClass:"col-12 col-md-8"},[i("ul",{staticClass:"nav nav-pills"},[i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:0==s.tabIndex}],on:{click:function(t){return s.toggleTab(0)}}},[s._v("All")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:1==s.tabIndex}],on:{click:function(t){return s.toggleTab(1)}}},[s._v("New")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:2==s.tabIndex}],on:{click:function(t){return s.toggleTab(2)}}},[s._v("Banned")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:3==s.tabIndex}],on:{click:function(t){return s.toggleTab(3)}}},[s._v("NSFW")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:4==s.tabIndex}],on:{click:function(t){return s.toggleTab(4)}}},[s._v("Unlisted")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:5==s.tabIndex}],on:{click:function(t){return s.toggleTab(5)}}},[s._v("Most Users")])]),s._v(" "),i("li",{staticClass:"nav-item"},[i("button",{class:["nav-link",{active:6==s.tabIndex}],on:{click:function(t){return s.toggleTab(6)}}},[s._v("Most Statuses")])])])]),s._v(" "),i("div",{staticClass:"col-12 col-md-4"},[i("autocomplete",{ref:"autocomplete",attrs:{search:s.composeSearch,disabled:s.searchLoading,defaultValue:s.searchQuery,placeholder:"Search instances by domain","aria-label":"Search instances by domain","get-result-value":s.getTagResultValue},on:{submit:s.onSearchResultClick},scopedSlots:s._u([{key:"result",fn:function(t){var e=t.result,a=t.props;return[i("li",s._b({staticClass:"autocomplete-result d-flex justify-content-between align-items-center"},"li",a,!1),[i("div",{staticClass:"font-weight-bold",class:{"text-danger":e.banned}},[s._v("\n\t\t\t\t\t\t\t\t\t"+s._s(e.domain)+"\n\t\t\t\t\t\t\t\t")]),s._v(" "),i("div",{staticClass:"small text-muted"},[s._v("\n\t\t\t\t\t\t\t\t\t"+s._s(s.prettyCount(e.user_count))+" users\n\t\t\t\t\t\t\t\t")])])]}}])})],1)]),s._v(" "),i("div",{staticClass:"table-responsive"},[i("table",{staticClass:"table table-dark"},[i("thead",{staticClass:"thead-dark"},[i("tr",[i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("ID","id"))},on:{click:function(t){return s.toggleCol("id")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Domain","domain"))},on:{click:function(t){return s.toggleCol("domain")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Software","software"))},on:{click:function(t){return s.toggleCol("software")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("User Count","user_count"))},on:{click:function(t){return s.toggleCol("user_count")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Status Count","status_count"))},on:{click:function(t){return s.toggleCol("status_count")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Banned","banned"))},on:{click:function(t){return s.toggleCol("banned")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("NSFW","auto_cw"))},on:{click:function(t){return s.toggleCol("auto_cw")}}}),s._v(" "),i("th",{staticClass:"cursor-pointer",attrs:{scope:"col"},domProps:{innerHTML:s._s(s.buildColumn("Unlisted","unlisted"))},on:{click:function(t){return s.toggleCol("unlisted")}}}),s._v(" "),i("th",{attrs:{scope:"col"}},[s._v("Created")])])]),s._v(" "),i("tbody",s._l(s.instances,(function(t,e){return i("tr",[i("td",{staticClass:"font-weight-bold text-monospace text-muted"},[i("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),s.openInstanceModal(t.id)}}},[s._v("\n\t\t\t\t\t\t\t\t\t"+s._s(t.id)+"\n\t\t\t\t\t\t\t\t")])]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(t.domain))]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(t.software))]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(s.prettyCount(t.user_count)))]),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(s.prettyCount(t.status_count)))]),s._v(" "),i("td",{staticClass:"font-weight-bold",domProps:{innerHTML:s._s(s.boolIcon(t.banned,"text-danger"))}}),s._v(" "),i("td",{staticClass:"font-weight-bold",domProps:{innerHTML:s._s(s.boolIcon(t.auto_cw,"text-danger"))}}),s._v(" "),i("td",{staticClass:"font-weight-bold",domProps:{innerHTML:s._s(s.boolIcon(t.unlisted,"text-danger"))}}),s._v(" "),i("td",{staticClass:"font-weight-bold"},[s._v(s._s(s.timeAgo(t.created_at)))])])})),0)])]),s._v(" "),i("div",{staticClass:"d-flex align-items-center justify-content-center"},[i("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!s.pagination.prev},on:{click:function(t){return s.paginate("prev")}}},[s._v("\n\t\t\t\t\tPrev\n\t\t\t\t")]),s._v(" "),i("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!s.pagination.next},on:{click:function(t){return s.paginate("next")}}},[s._v("\n\t\t\t\t\tNext\n\t\t\t\t")])])])]):i("div",{staticClass:"my-5 text-center"},[i("b-spinner")],1),s._v(" "),i("b-modal",{attrs:{title:"View Instance","header-class":"d-flex align-items-center justify-content-center mb-0 pb-0","ok-title":"Save","ok-disabled":!s.editingInstanceChanges},on:{ok:s.saveInstanceModalChanges},scopedSlots:s._u([{key:"modal-footer",fn:function(){return[i("div",{staticClass:"w-100 d-flex justify-content-between align-items-center"},[i("div",[i("b-button",{attrs:{variant:"outline-danger",size:"sm"},on:{click:s.deleteInstanceModal}},[s._v("\n\t\t\t\t\tDelete\n\t\t\t\t")]),s._v(" "),s.refreshedModalStats?s._e():i("b-button",{attrs:{variant:"outline-primary",size:"sm"},on:{click:s.refreshModalStats}},[s._v("\n\t\t\t\t\tRefresh Stats\n\t\t\t\t")])],1),s._v(" "),i("div",[i("b-button",{attrs:{variant:"link-dark",size:"sm"},on:{click:s.onViewMoreInstance}},[s._v("\n\t\t\t\tView More\n\t\t\t ")]),s._v(" "),i("b-button",{attrs:{variant:"primary"},on:{click:s.saveInstanceModalChanges}},[s._v("\n\t\t\t\tSave\n\t\t\t ")])],1)])]},proxy:!0}]),model:{value:s.showInstanceModal,callback:function(t){s.showInstanceModal=t},expression:"showInstanceModal"}},[s.editingInstance&&s.canEditInstance?i("div",{staticClass:"list-group"},[i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Domain")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(s.editingInstance.domain))])]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[s.editingInstance.software?i("div",[i("div",{staticClass:"text-muted small"},[s._v("Software")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(null!==(t=s.editingInstance.software)&&void 0!==t?t:"Unknown"))])]):s._e(),s._v(" "),i("div",[i("div",{staticClass:"text-muted small"},[s._v("Total Users")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(s.formatCount(null!==(e=s.editingInstance.user_count)&&void 0!==e?e:0)))])]),s._v(" "),i("div",[i("div",{staticClass:"text-muted small"},[s._v("Total Statuses")]),s._v(" "),i("div",{staticClass:"font-weight-bold"},[s._v(s._s(s.formatCount(null!==(a=s.editingInstance.status_count)&&void 0!==a?a:0)))])])]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Banned")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.editingInstance.banned,callback:function(t){s.$set(s.editingInstance,"banned",t)},expression:"editingInstance.banned"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Apply CW to Media")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.editingInstance.auto_cw,callback:function(t){s.$set(s.editingInstance,"auto_cw",t)},expression:"editingInstance.auto_cw"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Unlisted")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.editingInstance.unlisted,callback:function(t){s.$set(s.editingInstance,"unlisted",t)},expression:"editingInstance.unlisted"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex justify-content-between",class:[s.instanceModalNotes?"flex-column gap-2":"align-items-center"]},[i("div",{staticClass:"text-muted small"},[s._v("Notes")]),s._v(" "),i("transition",{attrs:{name:"fade"}},[s.instanceModalNotes?i("div",{staticClass:"w-100"},[i("b-form-textarea",{attrs:{rows:"3","max-rows":"5",maxlength:"500"},model:{value:s.editingInstance.notes,callback:function(t){s.$set(s.editingInstance,"notes",t)},expression:"editingInstance.notes"}}),s._v(" "),i("p",{staticClass:"small text-muted"},[s._v(s._s(s.editingInstance.notes?s.editingInstance.notes.length:0)+"/500")])],1):i("div",{staticClass:"mb-1"},[i("a",{staticClass:"font-weight-bold small",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.showModalNotes()}}},[s._v(s._s(s.editingInstance.notes?"View":"Add"))])])])],1)]):s._e()]),s._v(" "),i("b-modal",{attrs:{title:"Add Instance","ok-title":"Save","ok-disabled":s.addNewInstance.domain.length<2},on:{ok:s.saveNewInstance},model:{value:s.showAddModal,callback:function(t){s.showAddModal=t},expression:"showAddModal"}},[i("div",{staticClass:"list-group"},[i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Domain")]),s._v(" "),i("div",[i("b-form-input",{attrs:{placeholder:"Add domain here"},model:{value:s.addNewInstance.domain,callback:function(t){s.$set(s.addNewInstance,"domain",t)},expression:"addNewInstance.domain"}}),s._v(" "),i("p",{staticClass:"small text-light mb-0"},[s._v("Enter a valid domain without https://")])],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Banned")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.addNewInstance.banned,callback:function(t){s.$set(s.addNewInstance,"banned",t)},expression:"addNewInstance.banned"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Apply CW to Media")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.addNewInstance.auto_cw,callback:function(t){s.$set(s.addNewInstance,"auto_cw",t)},expression:"addNewInstance.auto_cw"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Unlisted")]),s._v(" "),i("div",{staticClass:"mr-n2 mb-1"},[i("b-form-checkbox",{attrs:{switch:"",size:"lg"},model:{value:s.addNewInstance.unlisted,callback:function(t){s.$set(s.addNewInstance,"unlisted",t)},expression:"addNewInstance.unlisted"}})],1)]),s._v(" "),i("div",{staticClass:"list-group-item d-flex flex-column gap-2 justify-content-between"},[i("div",{staticClass:"text-muted small"},[s._v("Notes")]),s._v(" "),i("div",{staticClass:"w-100"},[i("b-form-textarea",{attrs:{rows:"3","max-rows":"5",maxlength:"500",placeholder:"Add optional notes here"},model:{value:s.addNewInstance.notes,callback:function(t){s.$set(s.addNewInstance,"notes",t)},expression:"addNewInstance.notes"}}),s._v(" "),i("p",{staticClass:"small text-muted"},[s._v(s._s(s.addNewInstance.notes?s.addNewInstance.notes.length:0)+"/500")])],1)])])]),s._v(" "),i("b-modal",{attrs:{title:"Import Instance Backup","ok-title":"Import",scrollable:"","ok-disabled":!s.importData||!s.importData.banned.length&&!s.importData.unlisted.length&&!s.importData.auto_cw.length},on:{ok:s.completeImport,cancel:s.cancelImport},model:{value:s.showImportModal,callback:function(t){s.showImportModal=t},expression:"showImportModal"}},[s.showImportModal&&s.importData?i("div",[s.importData.auto_cw&&s.importData.auto_cw.length?i("div",{staticClass:"mb-5"},[i("p",{staticClass:"font-weight-bold text-center my-0"},[s._v("NSFW Instances ("+s._s(s.importData.auto_cw.length)+")")]),s._v(" "),i("p",{staticClass:"small text-center text-muted mb-1"},[s._v("Tap on an instance to remove it.")]),s._v(" "),i("div",{staticClass:"list-group"},s._l(s.importData.auto_cw,(function(t,e){return i("a",{staticClass:"list-group-item d-flex align-items-center justify-content-between",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.filterImportData("auto_cw",e)}}},[s._v("\n\t\t\t\t\t\t"+s._s(t)+"\n\n\t\t\t\t\t\t"),i("span",{staticClass:"badge badge-warning"},[s._v("Auto CW")])])})),0)]):s._e(),s._v(" "),s.importData.unlisted&&s.importData.unlisted.length?i("div",{staticClass:"mb-5"},[i("p",{staticClass:"font-weight-bold text-center my-0"},[s._v("Unlisted Instances ("+s._s(s.importData.unlisted.length)+")")]),s._v(" "),i("p",{staticClass:"small text-center text-muted mb-1"},[s._v("Tap on an instance to remove it.")]),s._v(" "),i("div",{staticClass:"list-group"},s._l(s.importData.unlisted,(function(t,e){return i("a",{staticClass:"list-group-item d-flex align-items-center justify-content-between",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.filterImportData("unlisted",e)}}},[s._v("\n\t\t\t\t\t\t"+s._s(t)+"\n\n\t\t\t\t\t\t"),i("span",{staticClass:"badge badge-primary"},[s._v("Unlisted")])])})),0)]):s._e(),s._v(" "),s.importData.banned&&s.importData.banned.length?i("div",{staticClass:"mb-5"},[i("p",{staticClass:"font-weight-bold text-center my-0"},[s._v("Banned Instances ("+s._s(s.importData.banned.length)+")")]),s._v(" "),i("p",{staticClass:"small text-center text-muted mb-1"},[s._v("Review instances, tap on an instance to remove it.")]),s._v(" "),i("div",{staticClass:"list-group"},s._l(s.importData.banned,(function(t,e){return i("a",{staticClass:"list-group-item d-flex align-items-center justify-content-between",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),s.filterImportData("banned",e)}}},[s._v("\n\t\t\t\t\t\t"+s._s(t)+"\n\n\t\t\t\t\t\t"),i("span",{staticClass:"badge badge-danger"},[s._v("Banned")])])})),0)]):s._e(),s._v(" "),s.importData.banned.length||s.importData.unlisted.length||s.importData.auto_cw.length?s._e():i("div",[i("div",{staticClass:"text-center"},[i("p",[i("i",{staticClass:"far fa-check-circle fa-4x text-success"})]),s._v(" "),i("p",{staticClass:"lead"},[s._v("Nothing to import!")])])])]):s._e()])],1)},i=[function(){var t=this._self._c;return t("div",{staticClass:"row align-items-center py-4"},[t("div",{staticClass:"col-lg-6 col-7"},[t("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[this._v("Instances")])])])}]},44381:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t,e,a=this,s=a._self._c;return s("div",[s("div",{staticClass:"header bg-primary pb-3 mt-n4"},[s("div",{staticClass:"container-fluid"},[s("div",{staticClass:"header-body"},[a._m(0),a._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Active Reports")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.open+" open reports"}},[a._v("\n "+a._s(a.prettyCount(a.stats.open))+"\n ")])])]),a._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Active Spam Detections")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.autospam_open+" open spam detections"}},[a._v(a._s(a.prettyCount(a.stats.autospam_open)))])])]),a._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Total Reports")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.total+" total reports"}},[a._v(a._s(a.prettyCount(a.stats.total))+"\n ")])])]),a._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-lg-3"},[s("div",{staticClass:"mb-3"},[s("h5",{staticClass:"text-light text-uppercase mb-0"},[a._v("Total Spam Detections")]),a._v(" "),s("span",{staticClass:"text-white h2 font-weight-bold mb-0 human-size",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.stats.autospam+" total spam detections"}},[a._v("\n "+a._s(a.prettyCount(a.stats.autospam))+"\n ")])])])])])])]),a._v(" "),a.loaded?s("div",{staticClass:"m-n2 m-lg-4"},[s("div",{staticClass:"container-fluid mt-4"},[s("div",{staticClass:"row mb-3 justify-content-between"},[s("div",{staticClass:"col-12"},[s("ul",{staticClass:"nav nav-pills"},[s("li",{staticClass:"nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:0==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(0)}}},[s("span",[a._v("Open Reports")]),a._v(" "),a.stats.open?s("span",{staticClass:"badge badge-sm badge-floating badge-danger border-white ml-2",staticStyle:{"background-color":"red",color:"white","font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.open))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:2==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(2)}}},[s("span",[a._v("Spam Detections")]),a._v(" "),a.stats.autospam_open?s("span",{staticClass:"badge badge-sm badge-floating badge-danger border-white ml-2",staticStyle:{"background-color":"red",color:"white","font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.autospam_open))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:3==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(3)}}},[s("span",[a._v("Remote Reports")]),a._v(" "),a.stats.remote_open?s("span",{staticClass:"badge badge-sm badge-floating badge-danger border-white ml-2",staticStyle:{"background-color":"red",color:"white","font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.remote_open))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"d-none d-md-block nav-item"},[s("a",{class:["nav-link d-flex align-items-center",{active:1==a.tabIndex}],attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),a.toggleTab(1)}}},[s("span",[a._v("Closed Reports")]),a._v(" "),a.stats.autospam_open?s("span",{staticClass:"badge badge-sm badge-floating badge-secondary border-white ml-2",staticStyle:{"font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.closed))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"d-none d-md-block nav-item"},[s("a",{staticClass:"nav-link d-flex align-items-center",attrs:{href:"/i/admin/reports/email-verifications"}},[s("span",[a._v("Email Verification Requests")]),a._v(" "),a.stats.email_verification_requests?s("span",{staticClass:"badge badge-sm badge-floating badge-secondary border-white ml-2",staticStyle:{"font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.email_verification_requests))+"\n ")]):a._e()])]),a._v(" "),s("li",{staticClass:"d-none d-md-block nav-item"},[s("a",{staticClass:"nav-link d-flex align-items-center",attrs:{href:"/i/admin/reports/appeals"}},[s("span",[a._v("Appeal Requests")]),a._v(" "),a.stats.appeals?s("span",{staticClass:"badge badge-sm badge-floating badge-secondary border-white ml-2",staticStyle:{"font-size":"11px"}},[a._v("\n "+a._s(a.prettyCount(a.stats.appeals))+"\n ")]):a._e()])])])])]),a._v(" "),[0,1].includes(this.tabIndex)?s("div",{staticClass:"table-responsive rounded"},[a.reports&&a.reports.length?s("table",{staticClass:"table table-dark"},[a._m(1),a._v(" "),s("tbody",a._l(a.reports,(function(t,e){return s("tr",[s("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[s("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewReport(t)}}},[a._v("\n "+a._s(t.id)+"\n ")])]),a._v(" "),s("td",{staticClass:"align-middle"},[s("p",{staticClass:"text-capitalize font-weight-bold mb-0",domProps:{innerHTML:a._s(a.reportLabel(t))}})]),a._v(" "),s("td",{staticClass:"align-middle"},[t.reported&&t.reported.id?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.reported.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.reported.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.reported.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.reported.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"align-middle"},[t&&t.reporter&&t.reporter.id?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.reporter.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.reporter.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.reporter.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.reporter.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.reporter.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"font-weight-bold align-middle"},[a._v(a._s(a.timeAgo(t.created_at)))]),a._v(" "),s("td",{staticClass:"align-middle"},[s("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewReport(t)}}},[a._v("View")])])])})),0)]):s("div",[s("div",{staticClass:"card card-body p-5"},[s("div",{staticClass:"d-flex justify-content-between align-items-center flex-column"},[a._m(2),a._v(" "),s("p",{staticClass:"lead"},[a._v(a._s(0===a.tabIndex?"No Active Reports Found!":"No Closed Reports Found!"))])])])])]):a._e(),a._v(" "),[0,1].includes(this.tabIndex)&&a.reports.length&&(a.pagination.prev||a.pagination.next)?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.prev},on:{click:function(t){return a.paginate("prev")}}},[a._v("\n Prev\n ")]),a._v(" "),s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.next},on:{click:function(t){return a.paginate("next")}}},[a._v("\n Next\n ")])]):a._e(),a._v(" "),2===this.tabIndex?s("div",{staticClass:"table-responsive rounded"},[a.autospamLoaded?[a.autospam&&a.autospam.length?s("table",{staticClass:"table table-dark"},[a._m(3),a._v(" "),s("tbody",a._l(a.autospam,(function(t,e){return s("tr",[s("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[s("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewSpamReport(t)}}},[a._v("\n "+a._s(t.id)+"\n ")])]),a._v(" "),a._m(4,!0),a._v(" "),s("td",{staticClass:"align-middle"},[t.status&&t.status.account?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.status.account.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.status.account.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.status.account.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.status.account.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"font-weight-bold align-middle"},[a._v(a._s(a.timeAgo(t.created_at)))]),a._v(" "),s("td",{staticClass:"align-middle"},[s("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.viewSpamReport(t)}}},[a._v("View")])])])})),0)]):s("div",[a._m(5)])]:s("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{"min-height":"300px"}},[s("b-spinner")],1)],2):a._e(),a._v(" "),2===this.tabIndex&&a.autospamLoaded&&a.autospam&&a.autospam.length?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.autospamPagination.prev},on:{click:function(t){return a.autospamPaginate("prev")}}},[a._v("\n Prev\n ")]),a._v(" "),s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.autospamPagination.next},on:{click:function(t){return a.autospamPaginate("next")}}},[a._v("\n Next\n ")])]):a._e(),a._v(" "),3===this.tabIndex?s("div",{staticClass:"table-responsive rounded"},[a.reports&&a.reports.length?s("table",{staticClass:"table table-dark"},[a._m(6),a._v(" "),s("tbody",a._l(a.reports,(function(t,e){return s("tr",{key:"remote-reports-".concat(t.id,"-").concat(e)},[s("td",{staticClass:"font-weight-bold text-monospace text-muted align-middle"},[s("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),a.showRemoteReport(t)}}},[a._v("\n "+a._s(t.id)+"\n ")])]),a._v(" "),s("td",{staticClass:"align-middle"},[s("p",{staticClass:"font-weight-bold mb-0"},[a._v(a._s(t.instance))])]),a._v(" "),s("td",{staticClass:"align-middle"},[t.reported&&t.reported.id?s("a",{staticClass:"text-white",attrs:{href:"/i/web/profile/".concat(t.reported.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"14px"}},[a._v("@"+a._s(t.reported.username))]),a._v(" "),s("div",{staticClass:"d-flex small text-muted mb-0",staticStyle:{gap:"0.5rem"}},[s("span",[a._v(a._s(t.reported.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(t.reported.created_at)))])])])])]):a._e()]),a._v(" "),s("td",{staticClass:"align-middle"},[s("p",{staticClass:"small mb-0 text-wrap",staticStyle:{"max-width":"300px","word-break":"break-all"}},[a._v(a._s(t.message&&t.message.length>120?t.message.slice(0,120)+"...":t.message))])]),a._v(" "),s("td",{staticClass:"font-weight-bold align-middle"},[a._v(a._s(a.timeAgo(t.created_at)))]),a._v(" "),a._m(7,!0)])})),0)]):s("div",[s("div",{staticClass:"card card-body p-5"},[s("div",{staticClass:"d-flex justify-content-between align-items-center flex-column"},[a._m(8),a._v(" "),s("p",{staticClass:"lead"},[a._v(a._s(0===a.tabIndex?"No Active Reports Found!":"No Closed Reports Found!"))])])])])]):a._e(),a._v(" "),3===this.tabIndex&&a.remoteReportsLoaded&&a.reports&&a.reports.length?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.prev},on:{click:function(t){return a.remoteReportPaginate("prev")}}},[a._v("\n Prev\n ")]),a._v(" "),s("button",{staticClass:"btn btn-primary rounded-pill",attrs:{disabled:!a.pagination.next},on:{click:function(t){return a.remoteReportPaginate("next")}}},[a._v("\n Next\n ")])]):a._e()])]):s("div",{staticClass:"my-5 text-center"},[s("b-spinner")],1),a._v(" "),s("b-modal",{attrs:{title:0===a.tabIndex?"View Report":"Viewing Closed Report","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:a.showReportModal,callback:function(t){a.showReportModal=t},expression:"showReportModal"}},[a.viewingReportLoading?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("b-spinner")],1):[a.viewingReport?s("div",{staticClass:"list-group"},[s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[s("div",{staticClass:"text-muted small"},[a._v("Type")]),a._v(" "),s("div",{staticClass:"font-weight-bold text-capitalize",domProps:{innerHTML:a._s(a.reportLabel(a.viewingReport))}})]),a._v(" "),a.viewingReport.admin_seen_at?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between"},[s("div",{staticClass:"text-muted small"},[a._v("Report Closed")]),a._v(" "),s("div",{staticClass:"font-weight-bold text-capitalize"},[a._v(a._s(a.formatDate(a.viewingReport.admin_seen_at)))])]):a._e(),a._v(" "),a.viewingReport.reporter_message?s("div",{staticClass:"list-group-item d-flex flex-column",staticStyle:{gap:"10px"}},[s("div",{staticClass:"text-muted small"},[a._v("Message")]),a._v(" "),s("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[a._v(a._s(a.viewingReport.reporter_message))])]):a._e()]):a._e(),a._v(" "),s("div",{staticClass:"list-group list-group-horizontal mt-3"},[a.viewingReport&&a.viewingReport.reported?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[a._v("Reported Account")]),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id?s("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(a.viewingReport.reported.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.viewingReport.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0 text-break",class:[a.viewingReport.reported.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[a._v("@"+a._s(a.viewingReport.reported.acct))]),a._v(" "),s("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[s("span",[a._v(a._s(a.viewingReport.reported.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(a.viewingReport.reported.created_at)))])])])])]):a._e()]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reporter?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[a._v("Reporter Account")]),a._v(" "),a.viewingReport.reporter&&null!==(t=a.viewingReport.reporter)&&void 0!==t&&t.id?s("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(null===(e=a.viewingReport.reporter)||void 0===e?void 0:e.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.viewingReport.reporter.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0 text-break",staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[a._v("@"+a._s(a.viewingReport.reporter.acct))]),a._v(" "),s("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[s("span",[a._v(a._s(a.viewingReport.reporter.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(a.viewingReport.reporter.created_at)))])])])])]):a._e()]):a._e()]),a._v(" "),a.viewingReport&&"App\\Status"===a.viewingReport.object_type&&a.viewingReport.status?s("div",{staticClass:"list-group mt-3"},[a.viewingReport&&a.viewingReport.status&&a.viewingReport.status.media_attachments.length?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),"image"===a.viewingReport.status.media_attachments[0].type?s("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.viewingReport.status.media_attachments[0].url,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===a.viewingReport.status.media_attachments[0].type?s("video",{attrs:{height:"140",controls:"",src:a.viewingReport.status.media_attachments[0].url,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):a._e()]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.status?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post Caption")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),s("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[a._v(a._s(a.viewingReport.status.content_text))])]):a._e()]):a.viewingReport&&"App\\Story"===a.viewingReport.object_type&&a.viewingReport.story?s("div",{staticClass:"list-group mt-3"},[a.viewingReport&&a.viewingReport.story?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Story")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingReport.story.url,target:"_blank"}},[a._v("View")])]),a._v(" "),"photo"===a.viewingReport.story.type?s("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.viewingReport.story.media_src,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===a.viewingReport.story.type?s("video",{attrs:{height:"140",controls:"",src:a.viewingReport.story.media_src,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):a._e()]):a._e()]):a._e(),a._v(" "),a.viewingReport&&null===a.viewingReport.admin_seen_at?s("div",{staticClass:"mt-4"},[a.viewingReport&&"App\\Profile"===a.viewingReport.object_type?s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",on:{click:function(t){return a.handleAction("profile","ignore")}}},[a._v("Ignore Report")]),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id&&!a.viewingReport.reported.is_admin?s("hr",{staticClass:"mt-3 mb-1"}):a._e(),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id&&!a.viewingReport.reported.is_admin?s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","nsfw")}}},[a._v("\n Mark all Posts NSFW\n ")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","unlist")}}},[a._v("\n Unlist all Posts\n ")])]):a._e(),a._v(" "),a.viewingReport.reported&&a.viewingReport.reported.id&&!a.viewingReport.reported.is_admin?s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-2",on:{click:function(t){return a.handleAction("profile","delete")}}},[a._v("\n Delete Profile\n ")]):a._e()]):a.viewingReport&&"App\\Status"===a.viewingReport.object_type?s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",on:{click:function(t){return a.handleAction("post","ignore")}}},[a._v("Ignore Report")]),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("hr",{staticClass:"mt-3 mb-1"}):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","nsfw")}}},[a._v("Mark Post NSFW")]),a._v(" "),"public"===a.viewingReport.status.visibility?s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","unlist")}}},[a._v("Unlist Post")]):"unlisted"===a.viewingReport.status.visibility?s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","private")}}},[a._v("Make Post Private")]):a._e()]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","nsfw")}}},[a._v("Make all NSFW")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","unlist")}}},[a._v("Make all Unlisted")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","private")}}},[a._v("Make all Private")])]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",[s("hr",{staticClass:"my-2"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("post","delete")}}},[a._v("Delete Post")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","delete")}}},[a._v("Delete Account")])])]):a._e()]):a.viewingReport&&"App\\Story"===a.viewingReport.object_type?s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",on:{click:function(t){return a.handleAction("story","ignore")}}},[a._v("Ignore Report")]),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("hr",{staticClass:"mt-3 mb-1"}):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",[s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-danger btn-block rounded-pill mt-0",on:{click:function(t){return a.handleAction("story","delete")}}},[a._v("Delete Story")]),a._v(" "),s("button",{staticClass:"btn btn-outline-danger btn-block rounded-pill mt-0",on:{click:function(t){return a.handleAction("story","delete-all")}}},[a._v("Delete All Stories")])])]):a._e(),a._v(" "),a.viewingReport&&a.viewingReport.reported&&!a.viewingReport.reported.is_admin?s("div",[s("hr",{staticClass:"my-2"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-sm btn-block rounded-pill mt-0",on:{click:function(t){return a.handleAction("profile","delete")}}},[a._v("Delete Account")])])]):a._e()]):a._e()]):a._e()]],2),a._v(" "),s("b-modal",{attrs:{title:"Potential Spam Post Detected","ok-only":!0,"ok-title":"Close","ok-variant":"outline-primary"},model:{value:a.showSpamReportModal,callback:function(t){a.showSpamReportModal=t},expression:"showSpamReportModal"}},[a.viewingSpamReportLoading?s("div",{staticClass:"d-flex align-items-center justify-content-center"},[s("b-spinner")],1):[s("div",{staticClass:"list-group list-group-horizontal mt-3"},[a.viewingSpamReport&&a.viewingSpamReport.status&&a.viewingSpamReport.status.account?s("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"text-muted small font-weight-bold mt-n1"},[a._v("Reported Account")]),a._v(" "),a.viewingSpamReport.status.account&&a.viewingSpamReport.status.account.id?s("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(a.viewingSpamReport.status.account.id),target:"_blank"}},[s("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[s("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:a.viewingSpamReport.status.account.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),a._v(" "),s("div",{staticClass:"d-flex flex-column"},[s("p",{staticClass:"font-weight-bold mb-0 text-break",class:[a.viewingSpamReport.status.account.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[a._v("@"+a._s(a.viewingSpamReport.status.account.acct))]),a._v(" "),s("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[s("span",[a._v(a._s(a.viewingSpamReport.status.account.followers_count)+" Followers")]),a._v(" "),s("span",[a._v("·")]),a._v(" "),s("span",[a._v("Joined "+a._s(a.timeAgo(a.viewingSpamReport.status.account.created_at)))])])])])]):a._e()]):a._e()]),a._v(" "),a.viewingSpamReport&&a.viewingSpamReport.status?s("div",{staticClass:"list-group mt-3"},[a.viewingSpamReport&&a.viewingSpamReport.status&&a.viewingSpamReport.status.media_attachments.length?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingSpamReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),"image"===a.viewingSpamReport.status.media_attachments[0].type?s("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.viewingSpamReport.status.media_attachments[0].url,height:"140",onerror:"this.src='/storage/no-preview.png';this.error=null;"}}):"video"===a.viewingSpamReport.status.media_attachments[0].type?s("video",{attrs:{height:"140",controls:"",src:a.viewingSpamReport.status.media_attachments[0].url,onerror:"this.src='/storage/no-preview.png';this.onerror=null;"}}):a._e()]):a._e(),a._v(" "),a.viewingSpamReport&&a.viewingSpamReport.status&&a.viewingSpamReport.status.content_text&&a.viewingSpamReport.status.content_text.length?s("div",{staticClass:"list-group-item d-flex flex-column flex-grow-1",staticStyle:{gap:"0.4rem"}},[s("div",{staticClass:"d-flex justify-content-between mt-n1 text-muted small font-weight-bold"},[s("div",[a._v("Reported Post Caption")]),a._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:a.viewingSpamReport.status.url,target:"_blank"}},[a._v("View")])]),a._v(" "),s("p",{staticClass:"mb-0 read-more",staticStyle:{"font-size":"12px","overflow-y":"hidden"}},[a._v(a._s(a.viewingSpamReport.status.content_text))])]):a._e()]):a._e(),a._v(" "),s("div",{staticClass:"mt-4"},[s("div",[s("button",{staticClass:"btn btn-dark btn-block rounded-pill",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-read")}}},[a._v("\n Mark as Read\n ")]),a._v(" "),s("button",{staticClass:"btn btn-danger btn-block rounded-pill",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-not-spam")}}},[a._v("\n Mark As Not Spam\n ")]),a._v(" "),s("hr",{staticClass:"mt-3 mb-1"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-dark btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-all-read")}}},[a._v("\n Mark All As Read\n ")]),a._v(" "),s("button",{staticClass:"btn btn-dark btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("mark-all-not-spam")}}},[a._v("\n Mark All As Not Spam\n ")])]),a._v(" "),s("div",[s("hr",{staticClass:"my-2"}),a._v(" "),s("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[s("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(t){return a.handleSpamAction("delete-profile")}}},[a._v("\n Delete Account\n ")])])])])])]],2),a._v(" "),a.showRemoteReportModal?[s("admin-report-modal",{attrs:{open:a.showRemoteReportModal,model:a.remoteReportModalModel},on:{close:function(t){return a.handleCloseRemoteReportModal()},refresh:function(t){return a.refreshRemoteReports()}}})]:a._e()],2)},i=[function(){var t=this._self._c;return t("div",{staticClass:"row align-items-center py-4"},[t("div",{staticClass:"col-lg-6 col-7"},[t("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[this._v("Moderation")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Report")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported By")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("p",{staticClass:"mt-3 mb-0"},[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Report")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("td",{staticClass:"align-middle"},[t("p",{staticClass:"text-capitalize font-weight-bold mb-0"},[this._v("Spam Post")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"card card-body p-5"},[e("div",{staticClass:"d-flex justify-content-between align-items-center flex-column"},[e("p",{staticClass:"mt-3 mb-0"},[e("i",{staticClass:"far fa-check-circle fa-5x text-success"})]),t._v(" "),e("p",{staticClass:"lead"},[t._v("No Spam Reports Found!")])])])},function(){var t=this,e=t._self._c;return e("thead",{staticClass:"thead-dark"},[e("tr",[e("th",{attrs:{scope:"col"}},[t._v("ID")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Instance")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Reported Account")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Comment")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("Created")]),t._v(" "),e("th",{attrs:{scope:"col"}},[t._v("View Report")])])])},function(){var t=this._self._c;return t("td",{staticClass:"align-middle"},[t("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:"#"}},[this._v("View")])])},function(){var t=this._self._c;return t("p",{staticClass:"mt-3 mb-0"},[t("i",{staticClass:"far fa-check-circle fa-5x text-success"})])}]},79535:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t,e=this,a=e._self._c;return e.loaded?a("div",[e._m(0),e._v(" "),a("div",{staticClass:"container"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-3"},[a("div",{staticClass:"nav-wrapper"},[a("div",{staticClass:"nav flex-column nav-pills",attrs:{id:"tabs-icons-text",role:"tablist","aria-orientation":"vertical"}},e._l(e.tabs,(function(t){return a("div",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link mb-sm-3",class:{active:e.tabIndex===t.id},attrs:{href:"#"},on:{click:function(a){return a.preventDefault(),e.toggleTab(t.id)}}},[a("i",{class:t.icon}),e._v(" "),a("span",{staticClass:"ml-2"},[e._v(e._s(t.title))])])])})),0)])]),e._v(" "),a("div",{staticClass:"col-12 col-md-9"},[a("div",{staticClass:"card shadow mt-3"},[a("div",{staticClass:"card-body"},[a("div",{staticClass:"tab-content"},[1===e.tabIndex?a("div",{staticClass:"tab-pane fade show active"},[a("tab-header",{attrs:{title:"Settings",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("overview")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body",staticStyle:{padding:"1.1rem 1.6rem"}},[a("div",{staticClass:"form-group mb-0"},[a("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[e._v("Registration Status")]),e._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:e.features.registration_status,expression:"features.registration_status"}],staticClass:"form-control form-control-muted",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));e.$set(e.features,"registration_status",t.target.multiple?a:a[0])}}},[a("option",{attrs:{value:"open"}},[e._v("Open - Anyone can register")]),e._v(" "),a("option",{attrs:{value:"filtered"}},[e._v("Filtered - Anyone can apply (Curated Onboarding)")]),e._v(" "),a("option",{attrs:{value:"closed"}},[e._v("Closed - Nobody can register")])])])]),e._v(" "),a("checkbox",{attrs:{name:"Cloud Storage",value:e.features.cloud_storage,description:"Store photos and videos on S3 compatible object storage providers."},on:{change:function(t){return e.handleChange(t,"features","cloud_storage")}}}),e._v(" "),a("checkbox",{attrs:{name:"ActivityPub",value:e.features.activitypub_enabled,description:"ActivityPub federation, compatible with Pixelfed, Mastodon and other projects."},on:{change:function(t){return e.handleChange(t,"features","activitypub_enabled")}}}),e._v(" "),a("checkbox",{attrs:{name:"Account Migration",value:e.features.account_migration,description:"Allow local accounts to migrate to other local or remote accounts."},on:{change:function(t){return e.handleChange(t,"features","account_migration")}}})],1),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("checkbox",{attrs:{name:"Mobile APIs",value:e.features.mobile_apis,description:"Enable apis required for official mobile app support and 3rd party apps."},on:{change:function(t){return e.handleChange(t,"features","mobile_apis")}}}),e._v(" "),a("checkbox",{attrs:{name:"Stories",value:e.features.stories,description:"Allow users to share federated ephemeral Stories that disappear after 24 hours."},on:{change:function(t){return e.handleChange(t,"features","stories")}}}),e._v(" "),a("checkbox",{attrs:{name:"Instagram Import",value:e.features.instagram_import,description:"Enable users to use the experimental Instagram Import support."},on:{change:function(t){return e.handleChange(t,"features","instagram_import")}}}),e._v(" "),a("checkbox",{attrs:{name:"Spam detection",value:e.features.autospam_enabled,description:"Detect and remove spam from timelines using the automated Autospam detection."},on:{change:function(t){return e.handleChange(t,"features","autospam_enabled")}}})],1)])],1):"landing"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Landing",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("landing")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body",staticStyle:{padding:"1.1rem 1.6rem"}},[a("div",{staticClass:"form-group mb-0"},[a("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[e._v("Admin Account")]),e._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:e.landing.current_admin,expression:"landing.current_admin"}],staticClass:"form-control form-control-muted",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));e.$set(e.landing,"current_admin",t.target.multiple?a:a[0])}}},[a("option",{attrs:{disabled:"",value:"0"}},[e._v("Select a designated admin")]),e._v(" "),e._l(e.landing.admins,(function(t,s){return a("option",{key:"pfc-"+t+s,domProps:{value:t.profile_id}},[e._v(e._s(t.username))])}))],2)])]),e._v(" "),a("checkbox",{attrs:{name:"Show Directory",value:e.landing.show_directory,description:"Show the account directory on the landing page for guest users."},on:{change:function(t){return e.handleChange(t,"landing","show_directory")}}})],1),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("checkbox",{attrs:{name:"Show Explore Feed",value:e.landing.show_explore,description:"Show the explore feed of popular posts on the landing page for guest users."},on:{change:function(t){return e.handleChange(t,"landing","show_explore")}}})],1)])],1):"branding"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Branding",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("branding")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-8"},[a("div",{staticClass:"card shadow-none border card-body",staticStyle:{padding:"1.1rem 1.6rem"}},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[e._v("Server Name")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.branding.name,expression:"branding.name"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"Pixelfed"},domProps:{value:e.branding.name},on:{input:function(t){t.target.composing||e.$set(e.branding,"name",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n The instance name used in titles, metadata and apis.\n ")])])]),e._v(" "),a("div",{staticClass:"col-12 col-md-8"},[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[e._v("Short Description")]),e._v(" "),a("textarea",{directives:[{name:"model",rawName:"v-model",value:e.branding.short_description,expression:"branding.short_description"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"Pixelfed",rows:"4"},domProps:{value:e.branding.short_description},on:{input:function(t){t.target.composing||e.$set(e.branding,"short_description",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Short description of instance used on various pages and apis.\n ")])]),e._v(" "),a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[e._v("Long Description")]),e._v(" "),a("textarea",{directives:[{name:"model",rawName:"v-model",value:e.branding.long_description,expression:"branding.long_description"}],staticClass:"form-control form-control-muted",attrs:{placeholder:"Pixelfed",rows:"8"},domProps:{value:e.branding.long_description},on:{input:function(t){t.target.composing||e.$set(e.branding,"long_description",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Longer description of instance used on about page.\n ")])])])])],1):"media"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Media",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("media")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("Max Media Size")]),e._v(" "),a("div",{staticClass:"input-group mb-0"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.media.max_photo_size,expression:"media.max_photo_size"}],staticClass:"form-control",attrs:{type:"text",placeholder:"15000","aria-label":"Max media size","aria-describedby":"maxMediaSize"},domProps:{value:e.media.max_photo_size},on:{input:function(t){t.target.composing||e.$set(e.media,"max_photo_size",t.target.value)}}}),e._v(" "),a("div",{staticClass:"input-group-append"},[a("span",{staticClass:"input-group-text",attrs:{id:"maxMediaSize"}},[e._v("= "+e._s(e.maxMediaSizeToMb))])])])]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Maximum file upload size in KB\n ")])]),e._v(" "),a("checkbox",{attrs:{name:"Optimize Images",value:e.media.optimize_image,description:"Enable to optimize images and generate thumbnails for local image media uploads."},on:{change:function(t){return e.handleChange(t,"media","optimize_image")}}}),e._v(" "),a("checkbox",{attrs:{name:"Optimize Video",value:e.media.optimize_video,description:"Enable to generate video thumbnails for local video media uploads."},on:{change:function(t){return e.handleChange(t,"media","optimize_video")}}}),e._v(" "),a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("Media Types")]),e._v(" "),a("div",{staticClass:"list-group"},e._l(e.mediaTypes,(function(t,s){return a("div",{staticClass:"list-group-item py-2"},[a("div",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.mediaTypes[s],expression:"mediaTypes[key]"}],staticClass:"custom-control-input",attrs:{type:"checkbox",name:s,id:s},domProps:{checked:Array.isArray(e.mediaTypes[s])?e._i(e.mediaTypes[s],null)>-1:e.mediaTypes[s]},on:{change:function(t){var a=e.mediaTypes[s],i=t.target,n=!!i.checked;if(Array.isArray(a)){var o=e._i(a,null);i.checked?o<0&&e.$set(e.mediaTypes,s,a.concat([null])):o>-1&&e.$set(e.mediaTypes,s,a.slice(0,o).concat(a.slice(o+1)))}else e.$set(e.mediaTypes,s,n)}}}),e._v(" "),a("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:s}},[e._v(e._s(s))])])])})),0)]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Supported mime types for media uploads\n ")])])],1),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("Photo Album Limit")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.media.max_album_length,expression:"media.max_album_length"}],staticClass:"form-control",attrs:{type:"number",min:"1",max:"20",name:"max_album_length"},domProps:{value:e.media.max_album_length},on:{input:function(t){t.target.composing||e.$set(e.media,"max_album_length",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n The maximum number of photos or videos per album\n ")])]),e._v(" "),a("transition",{attrs:{name:"fade"}},[e.media.optimize_image?a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("Image Quality")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.media.image_quality,expression:"media.image_quality"}],staticClass:"form-control",attrs:{type:"number",min:"20",max:"100",name:"image_quality"},domProps:{value:e.media.image_quality},on:{input:function(t){t.target.composing||e.$set(e.media,"image_quality",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Image optimization quality from 0-100%.\n ")])]):e._e()])],1)])],1):"platform"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Platform",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("platform")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("checkbox",{attrs:{name:"Allow Profile Embeds",value:e.platform.allow_profile_embeds,description:"Allow anyone to embed public profiles on other websites."},on:{change:function(t){return e.handleChange(t,"platform","allow_profile_embeds")}}}),e._v(" "),a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-0"},[a("div",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.allow_app_registration,expression:"platform.allow_app_registration"}],staticClass:"custom-control-input",attrs:{type:"checkbox",name:"allow_app_registrations",id:"platform1",disabled:"open"!==e.features.registration_status},domProps:{checked:Array.isArray(e.platform.allow_app_registration)?e._i(e.platform.allow_app_registration,null)>-1:e.platform.allow_app_registration},on:{change:function(t){var a=e.platform.allow_app_registration,s=t.target,i=!!s.checked;if(Array.isArray(a)){var n=e._i(a,null);s.checked?n<0&&e.$set(e.platform,"allow_app_registration",a.concat([null])):n>-1&&e.$set(e.platform,"allow_app_registration",a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.platform,"allow_app_registration",i)}}}),e._v(" "),a("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"platform1"}},[e._v("Allow App Registrations")])]),e._v(" "),"open"!==e.features.registration_status?a("p",{staticClass:"mb-0 small text-muted"},[e._v("Requires open registration to be enabled.")]):a("p",{staticClass:"mb-0 small"},[e._v("Allow users to register via the official Pixelfed mobile application.")])])]),e._v(" "),a("checkbox",{attrs:{name:"Custom Emoji",value:e.platform.custom_emoji_enabled,description:"Enable federated custom emoji that is compatible with Mastodon, Pleroma and others."},on:{change:function(t){return e.handleChange(t,"platform","custom_emoji_enabled")}}}),e._v(" "),"open"===e.features.registration_status&&e.features.allow_app_registration?[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("app_registration_rate_limit_attempts")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.app_registration_rate_limit_attempts,expression:"platform.app_registration_rate_limit_attempts"}],staticClass:"form-control",attrs:{type:"number",name:"app_registration_rate_limit_attempts"},domProps:{value:e.platform.app_registration_rate_limit_attempts},on:{input:function(t){t.target.composing||e.$set(e.platform,"app_registration_rate_limit_attempts",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n app_registration_rate_limit_attempts.\n ")])]),e._v(" "),a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("app_registration_rate_limit_decay")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.app_registration_rate_limit_decay,expression:"platform.app_registration_rate_limit_decay"}],staticClass:"form-control",attrs:{type:"number",name:"app_registration_rate_limit_decay"},domProps:{value:e.platform.app_registration_rate_limit_decay},on:{input:function(t){t.target.composing||e.$set(e.platform,"app_registration_rate_limit_decay",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n app_registration_rate_limit_decay\n ")])])]:e._e()],2),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("checkbox",{attrs:{name:"Allow Post Embeds",value:e.platform.allow_post_embeds,description:"Allow anyone to embed public posts on other websites."},on:{change:function(t){return e.handleChange(t,"platform","allow_post_embeds")}}}),e._v(" "),a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("div",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.captcha_enabled,expression:"platform.captcha_enabled"}],staticClass:"custom-control-input",attrs:{type:"checkbox",name:"hcaps",id:"hcp"},domProps:{checked:Array.isArray(e.platform.captcha_enabled)?e._i(e.platform.captcha_enabled,null)>-1:e.platform.captcha_enabled},on:{change:function(t){var a=e.platform.captcha_enabled,s=t.target,i=!!s.checked;if(Array.isArray(a)){var n=e._i(a,null);s.checked?n<0&&e.$set(e.platform,"captcha_enabled",a.concat([null])):n>-1&&e.$set(e.platform,"captcha_enabled",a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.platform,"captcha_enabled",i)}}}),e._v(" "),a("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"hcp"}},[e._v("Enable hCaptcha")])])]),e._v(" "),e.platform.captcha_enabled?[a("hr",{staticClass:"my-2"}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"form-group my-1"},[a("label",{staticClass:"text-muted small"},[e._v("hCaptcha Secret")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.captcha_secret,expression:"platform.captcha_secret"}],staticClass:"form-control",attrs:{type:"text",name:"captcha_secret"},domProps:{value:e.platform.captcha_secret},on:{input:function(t){t.target.composing||e.$set(e.platform,"captcha_secret",t.target.value)}}})])]),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"form-group my-1"},[a("label",{staticClass:"text-muted small"},[e._v("hCaptcha Sitekey")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.captcha_sitekey,expression:"platform.captcha_sitekey"}],staticClass:"form-control",attrs:{type:"text",name:"captcha_sitekey"},domProps:{value:e.platform.captcha_sitekey},on:{input:function(t){t.target.composing||e.$set(e.platform,"captcha_sitekey",t.target.value)}}})])])]),e._v(" "),a("hr",{staticClass:"mt-2 mb-4"}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-lg-6"},[a("div",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.captcha_on_login,expression:"platform.captcha_on_login"}],staticClass:"custom-control-input",attrs:{type:"checkbox",name:"captcha_on_login",id:"captcha_on_login"},domProps:{checked:Array.isArray(e.platform.captcha_on_login)?e._i(e.platform.captcha_on_login,null)>-1:e.platform.captcha_on_login},on:{change:function(t){var a=e.platform.captcha_on_login,s=t.target,i=!!s.checked;if(Array.isArray(a)){var n=e._i(a,null);s.checked?n<0&&e.$set(e.platform,"captcha_on_login",a.concat([null])):n>-1&&e.$set(e.platform,"captcha_on_login",a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.platform,"captcha_on_login",i)}}}),e._v(" "),a("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"captcha_on_login"}},[e._v("Login Captcha")])])]),e._v(" "),a("div",{staticClass:"col-12 col-lg-6"},[a("div",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.captcha_on_register,expression:"platform.captcha_on_register"}],staticClass:"custom-control-input",attrs:{type:"checkbox",name:"captcha_on_register",id:"captcha_on_register"},domProps:{checked:Array.isArray(e.platform.captcha_on_register)?e._i(e.platform.captcha_on_register,null)>-1:e.platform.captcha_on_register},on:{change:function(t){var a=e.platform.captcha_on_register,s=t.target,i=!!s.checked;if(Array.isArray(a)){var n=e._i(a,null);s.checked?n<0&&e.$set(e.platform,"captcha_on_register",a.concat([null])):n>-1&&e.$set(e.platform,"captcha_on_register",a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.platform,"captcha_on_register",i)}}}),e._v(" "),a("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"captcha_on_register"}},[e._v("Register Captcha")])])])]),e._v(" "),a("hr",{staticClass:"mt-4 mb-2"})]:e._e(),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Enable hCaptcha on login and register pages\n ")])],2),e._v(" "),"open"===e.features.registration_status&&e.features.allow_app_registration?[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("app_registration_confirm_rate_limit_attempts")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.app_registration_confirm_rate_limit_attempts,expression:"platform.app_registration_confirm_rate_limit_attempts"}],staticClass:"form-control",attrs:{type:"number",name:"app_registration_confirm_rate_limit_attempts"},domProps:{value:e.platform.app_registration_confirm_rate_limit_attempts},on:{input:function(t){t.target.composing||e.$set(e.platform,"app_registration_confirm_rate_limit_attempts",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n app_registration_confirm_rate_limit_attempts.\n ")])]),e._v(" "),a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("app_registration_confirm_rate_limit_decay")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.platform.app_registration_confirm_rate_limit_decay,expression:"platform.app_registration_confirm_rate_limit_decay"}],staticClass:"form-control",attrs:{type:"number",name:"app_registration_confirm_rate_limit_decay"},domProps:{value:e.platform.app_registration_confirm_rate_limit_decay},on:{input:function(t){t.target.composing||e.$set(e.platform,"app_registration_confirm_rate_limit_decay",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n app_registration_confirm_rate_limit_decay.\n ")])])]:e._e()],2)])],1):"posts"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Posts",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("posts")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("Max Caption Length")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.posts.max_caption_length,expression:"posts.max_caption_length"}],staticClass:"form-control",attrs:{type:"number",min:"1",max:"10000",name:"max_caption_limit"},domProps:{value:e.posts.max_caption_length},on:{input:function(t){t.target.composing||e.$set(e.posts,"max_caption_length",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n The maximum character count of post captions. We recommend a limit between 500-2000.\n ")])])]),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("Max Alttext Length")]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.posts.max_altext_length,expression:"posts.max_altext_length"}],staticClass:"form-control",attrs:{type:"number",min:"1",max:"10000",name:"max_altext_length"},domProps:{value:e.posts.max_altext_length},on:{input:function(t){t.target.composing||e.$set(e.posts,"max_altext_length",t.target.value)}}})]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n The maximum character count of post media alttext captions. We recommend a limit between 2000-10000.\n ")])])])])],1):"rules"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Rules",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("rules")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 mb-3"},[e.hasDuplicateRulesComputed?a("div",{staticClass:"alert alert-danger"},[a("p",{staticClass:"font-weight-bold mb-0"},[e._v("Duplicate rules detected, you should fix this!")])]):e._e(),e._v(" "),a("div",{staticClass:"position-relative"},[a("div",{staticClass:"card shadow-none border"},[a("div",{staticClass:"card-header py-2 bg-primary text-white font-weight-bold text-center"},[e._v("Active Rules")]),e._v(" "),a("div",{staticClass:"list-group list-group-flush"},[e._l(e.rulesComputed,(function(t,s){return a("div",{staticClass:"list-group-item"},[a("div",{staticClass:"d-flex justify-content-between align-items-start"},[a("div",{staticClass:"d-flex gap-1 align-items-start"},[a("div",{staticClass:"rule-badge"},[a("div",{staticClass:"rule-badge-inner"},[e._v(e._s(s+1))])]),e._v(" "),a("admin-read-more",{key:t,staticClass:"text-dark rule-text",attrs:{content:t,maxLength:140,initialLimit:30,fontSize:"13"}})],1),e._v(" "),a("button",{staticClass:"btn btn-link btn-sm",attrs:{disabled:e.isDeletingRule},on:{click:function(a){return a.preventDefault(),e.handleDeleteRule(t,s,a)}}},[a("i",{staticClass:"fas fa-trash-alt text-danger"})])])])})),e._v(" "),e.rules&&e.rules.length?e._e():a("div",{staticClass:"list-group-item"},[a("p",{staticClass:"text-center mb-0"},[e._v("No rules set!")])])],2)]),e._v(" "),!e.showAllRules&&e.rules.length>2?a("div",{staticClass:"d-flex justify-content-center",staticStyle:{position:"absolute",width:"100%","padding-top":"10rem",bottom:"0",background:"linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255, 1))"}},[a("button",{staticClass:"btn btn-dark font-weight-bold rounded-pill btn-block",on:{click:function(t){t.preventDefault(),e.showAllRules=!0}}},[e._v("Show all rules")])]):e._e()])]),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-1"},[a("label",{staticClass:"font-weight-bold text-muted"},[e._v("Add New Rule")]),e._v(" "),a("textarea",{directives:[{name:"model",rawName:"v-model",value:e.newRule,expression:"newRule"}],staticClass:"form-control",attrs:{type:"text",name:"new_rule",rows:"5",minlength:"5",maxlength:"1000",placeholder:"Add your new rule here...",disabled:e.isSubmittingNewRule||e.isDeletingRule},domProps:{value:e.newRule},on:{input:function(t){t.target.composing||(e.newRule=t.target.value)}}})]),e._v(" "),a("div",{staticClass:"d-flex justify-content-between align-items-center"},[a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Add a new rule\n ")]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n "+e._s(e.newRule&&e.newRule.length?e.newRule.length:0)+"/1000\n ")])]),e._v(" "),a("hr",{staticClass:"my-2"}),e._v(" "),a("p",{staticClass:"mb-0"},[a("button",{staticClass:"btn btn-primary btn-sm btn-block font-weight-bold rounded-pill",attrs:{disabled:!e.newRule||!e.newRule.length||e.isSubmittingNewRule||e.isDeletingRule},on:{click:function(t){return t.preventDefault(),e.handleAddRule.apply(null,arguments)}}},[e._v("Add Rule")])])]),e._v(" "),e.rules&&e.rules.length?a("button",{staticClass:"btn btn-outline-danger rounded-pill btn-block btn-sm",on:{click:function(t){return t.preventDefault(),e.handleDeleteAllRules.apply(null,arguments)}}},[e._v("Delete all rules")]):e._e()]),e._v(" "),e.suggestedRulesComputed&&e.suggestedRulesComputed.length?a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"border-bottom pb-2 mb-3 d-flex justify-content-between align-items-center"},[a("p",{staticClass:"font-weight-bold mb-0"},[e._v("Suggested Rules")]),e._v(" "),e.rules.length?e._e():a("a",{staticClass:"font-weight-bold small",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.importAllDefaultRules.apply(null,arguments)}}},[e._v("Import All")])]),e._v(" "),a("div",{staticClass:"list-group"},e._l(e.suggestedRulesComputed,(function(t){return a("a",{staticClass:"list-group-item small",attrs:{href:"#"},on:{click:function(a){return a.preventDefault(),e.addSuggestedRule(t,a)}}},[e._v(e._s(t))])})),0)]):e._e()])],1):"storage"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Storage",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("storage")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body",staticStyle:{padding:"1.1rem 1.6rem"}},[a("div",{staticClass:"form-group mb-0"},[a("label",{staticClass:"font-weight-bold",attrs:{for:"form-summary"}},[e._v("Primary Storage Disk")]),e._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:e.storage.primary_disk,expression:"storage.primary_disk"}],staticClass:"form-control form-control-muted",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));e.$set(e.storage,"primary_disk",t.target.multiple?a:a[0])}}},[a("option",{attrs:{value:"local"}},[e._v("Local")]),e._v(" "),a("option",{attrs:{value:"cloud"}},[e._v("Cloud/S3")])])]),e._v(" "),a("p",{staticClass:"help-text small text-muted mt-2 mb-0"},[e._v("\n The storage disk where avatars and media uploads are stored.\n ")])])]),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card border"},[e._m(1),e._v(" "),e.showDiskConfig?a("div",{staticClass:"card-body"},[a("div",{staticClass:"form-group mb-4 d-flex align-items-center gap-1"},[a("label",{staticClass:"font-weight-bold mb-0",attrs:{for:"form-summary"}},[e._v("Disk")]),e._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:e.storage.disk_config.driver,expression:"storage.disk_config.driver"}],staticClass:"form-control form-control-muted mb-0",on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));e.$set(e.storage.disk_config,"driver",t.target.multiple?a:a[0])}}},[a("option",{attrs:{value:"s3"}},[e._v("S3")]),e._v(" "),a("option",{attrs:{value:"spaces"}},[e._v("DigitalOcean Spaces")])])]),e._v(" "),a("form-input",{attrs:{name:"Key",value:e.storage.disk_config.key,description:"",isCard:!1,isInline:!0},on:{change:function(t){return e.handleSubChange(t,"storage","disk_config","key")}}}),e._v(" "),a("form-input",{attrs:{name:"Secret",value:e.storage.disk_config.secret,description:"",isCard:!1,isInline:!0},on:{change:function(t){return e.handleSubChange(t,"storage","disk_config","secret")}}}),e._v(" "),a("form-input",{attrs:{name:"Region",value:e.storage.disk_config.region,description:"",isCard:!1,isInline:!0},on:{change:function(t){return e.handleSubChange(t,"storage","disk_config","region")}}}),e._v(" "),a("form-input",{attrs:{name:"Bucket",value:e.storage.disk_config.bucket,description:"",isCard:!1,isInline:!0},on:{change:function(t){return e.handleSubChange(t,"storage","disk_config","bucket")}}}),e._v(" "),a("form-input",{attrs:{name:"Endpoint",value:e.storage.disk_config.endpoint,description:"",isCard:!1,isInline:!0},on:{change:function(t){return e.handleSubChange(t,"storage","disk_config","endpoint")}}}),e._v(" "),a("form-input",{attrs:{name:"Visibility",value:e.storage.disk_config.visibility,description:"",isCard:!1,isInline:!0,isDisabled:!0},on:{change:function(t){return e.handleSubChange(t,"storage","disk_config","visibility")}}}),e._v(" "),a("form-input",{attrs:{name:"Url",value:e.storage.disk_config.url,description:"",isCard:!1,isInline:!0},on:{change:function(t){return e.handleSubChange(t,"storage","disk_config","url")}}})],1):a("div",{staticClass:"card-body"},[a("p",{staticClass:"text-center mb-0"},[a("a",{staticClass:"btn btn-primary bg-gradient-primary shadow-lg rounded-pill",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),e.showDiskConfig=!0}}},[e._v("\n View/Edit\n ")])])])])])])],1):"users"===e.tabIndex?a("div",{staticClass:"tab-pane fade show active",attrs:{role:"tabpanel"}},[a("tab-header",{attrs:{title:"Users",saving:e.isSubmitting,saved:e.isSubmittingTimeout},on:{save:function(t){return e.handleSave("users")}}}),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-md-6"},[a("checkbox",{attrs:{name:"Require Email Verifications",value:e.users.require_email_verification,description:"Require users to verify their email address is valid before they can use the account."},on:{change:function(t){return e.handleChange(t,"users","require_email_verification")}}}),e._v(" "),a("form-input",{attrs:{name:"Max User Blocks",value:e.users.max_user_blocks.toString(),description:"The max number of account blocks per user."},on:{change:function(t){return e.handleChange(t,"users","max_user_blocks")}}}),e._v(" "),a("form-input",{attrs:{name:"Max User Mutes",value:e.users.max_user_mutes.toString(),description:"The max number of account mutes per user."},on:{change:function(t){return e.handleChange(t,"users","max_user_mutes")}}}),e._v(" "),a("form-input",{attrs:{name:"Max User Domain Blocks",value:e.users.max_domain_blocks.toString(),description:"The max number of domain blocks per user."},on:{change:function(t){return e.handleChange(t,"users","max_domain_blocks")}}})],1),e._v(" "),a("div",{staticClass:"col-12 col-md-6"},[a("div",{staticClass:"card shadow-none border card-body"},[a("div",{staticClass:"form-group mb-0"},[a("div",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.users.enforce_account_limit,expression:"users.enforce_account_limit"}],staticClass:"custom-control-input",attrs:{type:"checkbox",name:"enforce_account_limit",id:"users2"},domProps:{checked:Array.isArray(e.users.enforce_account_limit)?e._i(e.users.enforce_account_limit,null)>-1:e.users.enforce_account_limit},on:{change:function(t){var a=e.users.enforce_account_limit,s=t.target,i=!!s.checked;if(Array.isArray(a)){var n=e._i(a,null);s.checked?n<0&&e.$set(e.users,"enforce_account_limit",a.concat([null])):n>-1&&e.$set(e.users,"enforce_account_limit",a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.users,"enforce_account_limit",i)}}}),e._v(" "),a("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"users2"}},[e._v("Enforce Account Limit")])]),e._v(" "),a("p",{staticClass:"mb-0 small"},[e._v("Set a storage limit per user account for all uploaded media (photo + video).")])]),e._v(" "),a("transition",{attrs:{name:"fade"}},[e.users.enforce_account_limit?a("div",[a("hr",{staticClass:"my-2"}),e._v(" "),a("div",{staticClass:"form-group mb-1"},[a("div",{staticClass:"input-group mb-0"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.users.max_account_size,expression:"users.max_account_size"}],staticClass:"form-control",attrs:{type:"text",placeholder:"15000","aria-label":"Max account size","aria-describedby":"maxMediaSize"},domProps:{value:e.users.max_account_size},on:{input:function(t){t.target.composing||e.$set(e.users,"max_account_size",t.target.value)}}}),e._v(" "),a("div",{staticClass:"input-group-append"},[a("span",{staticClass:"input-group-text"},[e._v("= "+e._s(e.maxAccountSizeToMb))])])])]),e._v(" "),a("p",{staticClass:"help-text small text-muted mb-0"},[e._v("\n Maximum file storage limit per user account.\n ")])]):e._e()])],1),e._v(" "),a("div",{staticClass:"card shadow-none border"},[a("div",{staticClass:"card-body"},[a("div",{staticClass:"form-group mb-0"},[a("div",{staticClass:"custom-control custom-checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.users.admin_autofollow,expression:"users.admin_autofollow"}],staticClass:"custom-control-input",attrs:{type:"checkbox",name:"admin_autofollow",id:"users4"},domProps:{checked:Array.isArray(e.users.admin_autofollow)?e._i(e.users.admin_autofollow,null)>-1:e.users.admin_autofollow},on:{change:function(t){var a=e.users.admin_autofollow,s=t.target,i=!!s.checked;if(Array.isArray(a)){var n=e._i(a,null);s.checked?n<0&&e.$set(e.users,"admin_autofollow",a.concat([null])):n>-1&&e.$set(e.users,"admin_autofollow",a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.users,"admin_autofollow",i)}}}),e._v(" "),a("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"users4"}},[e._v("Autofollow Accounts")])]),e._v(" "),a("p",{staticClass:"mb-0 small"},[e._v("Force new accounts to follow accounts you specify below")])])]),e._v(" "),a("transition",{attrs:{name:"fade"}},[e.users.admin_autofollow?a("div",{staticClass:"list-group list-group-flush"},[null!==(t=e.users.admin_autofollow_accounts)&&void 0!==t&&t.length?a("div",e._l(e.users.admin_autofollow_accounts,(function(t){return a("div",{staticClass:"list-group-item"},[a("div",{staticClass:"d-flex justify-content-between align-items-center"},[a("p",{staticClass:"font-weight-bold mb-0"},[e._v("@"+e._s(t))]),e._v(" "),a("button",{staticClass:"btn btn-link p-0",on:{click:function(a){return a.preventDefault(),e.removeAutofollow(t,a)}}},[a("i",{staticClass:"fas fa-trash-alt text-danger"})])])])})),0):a("div",{staticClass:"list-group-item"},[a("p",{staticClass:"text-center mb-0"},[e._v("No autofollow accounts active.")])])]):e._e()]),e._v(" "),a("transition",{attrs:{name:"fade"}},[e.users.admin_autofollow&&e.users.admin_autofollow_accounts&&e.users.admin_autofollow_accounts.length<5?a("div",{staticClass:"card-footer"},[a("button",{staticClass:"btn btn-primary btn-block rounded-pill",on:{click:function(t){return t.preventDefault(),e.addAutofollow.apply(null,arguments)}}},[e._v("Add Autofollow Account")])]):e._e()])],1)])])],1):e._e()])])])])])])]):a("div",[e._m(2)])},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"header bg-primary pb-2 mt-n4"},[e("div",{staticClass:"container-fluid"},[e("div",{staticClass:"header-body"},[e("div",{staticClass:"row align-items-center py-4"},[e("div",{staticClass:"col-lg-6 col-7"},[e("p",{staticClass:"display-1 text-white d-inline-block mb-0"},[t._v("Settings")]),t._v(" "),e("p",{staticClass:"h3 text-white font-weight-light"},[t._v("Manage your server settings")])])])])])])},function(){var t=this._self._c;return t("div",{staticClass:"card-header bg-gradient-primary"},[t("p",{staticClass:"text-center mb-0 text-white font-weight-bold"},[this._v("Cloud Disk Config")])])},function(){var t=this._self._c;return t("div",{staticClass:"container my-5 py-5 text-center"},[t("div",{staticClass:"spinner-border text-primary",attrs:{role:"status"}},[t("span",{staticClass:"sr-only"},[this._v("Loading...")])])])}]},64441:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-3"},[t.status.media_attachments&&t.status.media_attachments.length?e("div",{staticClass:"list-group-item",staticStyle:{gap:"1rem",overflow:"hidden"}},[e("div",{staticClass:"text-center text-muted small font-weight-bold mb-3"},[t._v("Reported Post Media")]),t._v(" "),t.status.media_attachments&&t.status.media_attachments.length?e("div",{staticClass:"d-flex flex-grow-1",staticStyle:{gap:"1rem","overflow-x":"auto"}},[t._l(t.status.media_attachments,(function(a){return["image"===a.type?e("img",{staticClass:"rounded",staticStyle:{"object-fit":"cover"},attrs:{src:a.url,width:"70",height:"70",onerror:"this.src='/storage/no-preview.png';this.error=null;"},on:{click:t.toggleLightbox}}):"video"===a.type?e("video",{staticClass:"rounded",attrs:{width:"140",height:"90",playsinline:""},on:{click:function(e){return e.preventDefault(),t.toggleVideoLightbox(e,a.url)}}},[e("source",{attrs:{src:a.url,type:a.mime}})]):t._e()]}))],2):t._e()]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item d-flex flex-row flex-grow-1",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"flex-grow-1"},[t.status&&t.status.in_reply_to_id&&t.status.parent&&t.status.parent.account?e("div",{staticClass:"mb-3"},[t.showInReplyTo?[e("div",{staticClass:"mt-n1 text-center text-muted small font-weight-bold mb-1"},[t._v("Reply to")]),t._v(" "),e("div",{staticClass:"media",staticStyle:{gap:"1rem"}},[e("img",{staticClass:"rounded-lg",attrs:{src:t.status.parent.account.avatar,width:"40",height:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"11px"}},[e("a",{attrs:{href:"/i/web/profile/".concat(t.status.parent.account.id),target:"_blank"}},[t._v(t._s(t.status.parent.account.acct))])]),t._v(" "),e("admin-read-more",{attrs:{content:t.status.parent.content_text}}),t._v(" "),e("p",{staticClass:"mb-1"},[e("a",{staticClass:"text-muted",staticStyle:{"font-size":"11px"},attrs:{href:"/i/web/post/".concat(t.status.parent.id),target:"_blank"}},[e("i",{staticClass:"far fa-link mr-1"}),t._v(" "+t._s(t.formatDate(t.status.parent.created_at))+"\n ")])])],1)]),t._v(" "),e("hr",{staticClass:"my-1"})]:e("a",{staticClass:"btn btn-dark font-weight-bold btn-block btn-sm",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showInReplyTo=!0}}},[t._v("Show parent post")])],2):t._e(),t._v(" "),e("div",[e("div",{staticClass:"mt-n1 text-center text-muted small font-weight-bold mb-1"},[t._v("Reported Post")]),t._v(" "),e("div",{staticClass:"media",staticStyle:{gap:"1rem"}},[e("img",{staticClass:"rounded-lg",attrs:{src:t.status.account.avatar,width:"40",height:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0",staticStyle:{"font-size":"11px"}},[e("a",{attrs:{href:"/i/web/profile/".concat(t.status.account.id),target:"_blank"}},[t._v(t._s(t.status.account.acct))])]),t._v(" "),t.status&&t.status.content_text&&t.status.content_text.length?[e("admin-read-more",{attrs:{content:t.status.content_text}})]:[e("admin-read-more",{staticClass:"font-weight-bold text-muted",attrs:{content:"EMPTY CAPTION"}})],t._v(" "),e("p",{staticClass:"mb-0"},[e("a",{staticClass:"text-muted",staticStyle:{"font-size":"11px"},attrs:{href:"/i/web/post/".concat(t.status.id),target:"_blank"}},[e("i",{staticClass:"far fa-link mr-1"}),t._v(" "+t._s(t.formatDate(t.status.created_at))+"\n ")])])],2)])])])])])},i=[]},38391:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"mb-0",style:{"font-size":"".concat(t.fontSize,"px")}},[t._v(t._s(t.contentText))]),t._v(" "),e("p",{staticClass:"mb-0"},[t.canStepExpand||t.canExpand&&!t.expanded?e("a",{staticClass:"font-weight-bold small",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.expand()}}},[t._v("Read more")]):t._e()])])},i=[]},24664:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("b-modal",{attrs:{title:"Remote Report","ok-only":!0,"ok-title":"Close",lazy:!0,scrollable:!0,"ok-variant":"outline-primary"},on:{hide:function(e){return t.$emit("close")}},model:{value:t.isOpen,callback:function(e){t.isOpen=e},expression:"isOpen"}},[t.isLoading?e("div",{staticClass:"d-flex align-items-center justify-content-center"},[e("b-spinner")],1):[e("div",{staticClass:"list-group"},[e("div",{staticClass:"list-group-item d-flex justify-content-between align-items-center"},[e("div",{staticClass:"text-muted small font-weight-bold"},[t._v("Instance")]),t._v(" "),e("div",{staticClass:"font-weight-bold"},[t._v(t._s(t.model.instance))])]),t._v(" "),t.model.message&&t.model.message.length?e("div",{staticClass:"list-group-item d-flex justify-content-between align-items-center flex-column gap-1"},[e("div",{staticClass:"text-muted small font-weight-bold mb-2"},[t._v("Message")]),t._v(" "),e("div",{staticClass:"text-wrap w-100",staticStyle:{"word-break":"break-all","font-size":"12.5px"}},[e("admin-read-more",{attrs:{content:t.model.message,"font-size":"11",step:!0,"initial-limit":100,stepLimit:1e3}})],1)]):t._e()]),t._v(" "),e("div",{staticClass:"list-group list-group-horizontal mt-3"},[t.model&&t.model.reported?e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between flex-row flex-grow-1",staticStyle:{gap:"0.4rem"}},[e("div",{staticClass:"text-muted small font-weight-bold"},[t._v("Reported Account")]),t._v(" "),e("div",{staticClass:"d-flex justify-content-end flex-grow-1"},[t.model.reported&&t.model.reported.id?e("a",{staticClass:"text-primary",attrs:{href:"/i/web/profile/".concat(t.model.reported.id),target:"_blank"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"0.61rem"}},[e("img",{staticStyle:{"object-fit":"cover","border-radius":"30px"},attrs:{src:t.model.reported.avatar,width:"30",height:"30",onerror:"this.src='/storage/avatars/default.png';this.error=null;"}}),t._v(" "),e("div",{staticClass:"d-flex flex-column"},[e("p",{staticClass:"font-weight-bold mb-0 text-break",class:[t.model.reported.is_admin?"text-danger":""],staticStyle:{"font-size":"12px","max-width":"140px","line-height":"16px"}},[t._v("@"+t._s(t.model.reported.acct))]),t._v(" "),e("div",{staticClass:"d-flex text-muted mb-0",staticStyle:{"font-size":"10px",gap:"0.5rem"}},[e("span",[t._v(t._s(t.prettyCount(t.model.reported.followers_count))+" Followers")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),e("span",[t._v("Joined "+t._s(t.timeAgo(t.model.reported.created_at)))])])])])]):t._e()])]):e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-center flex-column flex-grow-1"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("Reported Account Unavailable")]),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v("The reported account may have been deleted, or is otherwise not currently active. You can safely "),e("strong",[t._v("Close Report")]),t._v(" to mark this report as read.")])])]),t._v(" "),t.model&&t.model.statuses&&t.model.statuses.length?e("div",{staticClass:"list-group mt-3"},t._l(t.model.statuses,(function(t,a){return e("admin-modal-post",{key:"admin-modal-post-remote-post:".concat(t.id,":").concat(a),attrs:{status:t}})})),1):t._e(),t._v(" "),e("div",{staticClass:"mt-4"},[e("div",[e("button",{staticClass:"btn btn-dark btn-block rounded-pill",attrs:{type:"button"},on:{click:function(e){return t.handleAction("mark-read")}}},[t._v("\n Close Report\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-dark btn-block text-center rounded-pill",staticStyle:{"word-break":"break-all"},attrs:{type:"button"},on:{click:function(e){return t.handleAction("mark-all-read-by-domain")}}},[e("span",{staticClass:"font-weight-light"},[t._v("Close all reports from")]),t._v(" "),e("strong",[t._v(t._s(t.model.instance))])]),t._v(" "),t.model.reported?e("button",{staticClass:"btn btn-outline-dark btn-block rounded-pill flex-grow-1",attrs:{type:"button"},on:{click:function(e){return t.handleAction("mark-all-read-by-username")}}},[e("span",{staticClass:"font-weight-light"},[t._v("Close all reports against")]),t._v(" "),e("strong",[t._v("@"+t._s(t.model.reported.username))])]):t._e(),t._v(" "),t.model&&t.model.statuses&&t.model.statuses.length&&t.model.reported?[e("hr",{staticClass:"mt-3 mb-1"}),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("cw-posts")}}},[t._v("\n Apply CW to Post(s)\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("unlist-posts")}}},[t._v("\n Unlist Post(s)\n ")])]),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2"},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("private-posts")}}},[t._v("\n Make Post(s) Private\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("delete-posts")}}},[t._v("\n Delete Post(s)\n ")])])]:t.model&&t.model.statuses&&!t.model.statuses.length&&t.model.reported?[e("hr",{staticClass:"mt-3 mb-1"}),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("cw-all-posts")}}},[t._v("\n Apply CW to all posts\n ")]),t._v(" "),e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("unlist-all-posts")}}},[t._v("\n Unlist all account posts\n ")])]),t._v(" "),e("div",{staticClass:"d-flex flex-row mt-2",staticStyle:{gap:"0.3rem"}},[e("button",{staticClass:"btn btn-outline-danger btn-block btn-sm rounded-pill mt-0",attrs:{type:"button"},on:{click:function(e){return t.handleAction("private-all-posts")}}},[t._v("\n Make all posts private\n ")])])]:t._e()],2)])]],2)},i=[]},16231:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"card shadow-none border card-body"},[e("div",{staticClass:"form-group mb-0"},[e("div",{staticClass:"custom-control custom-checkbox"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",name:t.elementId,id:t.elementId},domProps:{checked:t.value},on:{change:function(e){return t.$emit("change",!t.value)}}}),t._v(" "),e("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:t.elementId}},[t._v(t._s(t.name))])]),t._v(" "),e("p",{staticClass:"mt-1 mb-0 small text-muted",domProps:{innerHTML:t._s(t.description)}})])])},i=[]},96858:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",{class:[t.isCard?"card shadow-none border card-body":""]},[e("div",{staticClass:"form-group",class:[t.isInline?"d-flex align-items-center gap-1":"mb-1"]},[e("label",{staticClass:"font-weight-bold mb-0",attrs:{for:t.elementId}},[t._v(t._s(t.name))]),t._v(" "),e("input",{staticClass:"form-control form-control-muted mb-0",attrs:{id:t.elementId,placeholder:t.placeholder,disabled:t.isDisabled},domProps:{value:t.value},on:{input:function(e){return t.$emit("change",e.target.value)}}})]),t._v(" "),t.description&&t.description.length?e("p",{staticClass:"help-text small text-muted mb-0",domProps:{innerHTML:t._s(t.description)}}):t._e()])},i=[]},23075:(t,e,a)=>{"use strict";a.r(e),a.d(e,{render:()=>s,staticRenderFns:()=>i});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",{staticStyle:{width:"100px"}}),t._v(" "),e("div",[e("h2",{staticClass:"display-4 mb-0",staticStyle:{"font-weight":"800"}},[t._v(t._s(t.title))])]),t._v(" "),e("div",[e("button",{staticClass:"btn btn-primary rounded-pill font-weight-bold px-5",attrs:{disabled:t.isSaving||t.saved},on:{click:function(e){return e.preventDefault(),t.save.apply(null,arguments)}}},[!0===t.isSaving?[e("b-spinner",{staticClass:"mx-2",attrs:{small:""}})]:[t._v(t._s(t.buttonLabel))]],2)])]),t._v(" "),e("hr",{staticClass:"mt-3"})])},i=[]},36671:(t,e,a)=>{a(74692);a(9901),window._=a(2543),window.Popper=a(48851).default,window.pixelfed=window.pixelfed||{},window.$=a(74692),a(52754),window.axios=a(86425),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",a(63899),window.filesize=a(91139),window.Cookies=a(12215),a(81027),a(66482),window.Chart=a(62477),a(83925),Chart.defaults.global.defaultFontFamily="-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif",Array.from(document.querySelectorAll(".pagination .page-link")).filter((function(t){return"« Previous"===t.textContent||"Next »"===t.textContent})).forEach((function(t){return t.textContent="Next »"===t.textContent?"›":"‹"})),Vue.component("admin-autospam",a(80430).default),Vue.component("admin-directory",a(65465).default),Vue.component("admin-reports",a(13929).default),Vue.component("admin-settings",a(93139).default),Vue.component("instances-component",a(50828).default),Vue.component("hashtag-component",a(47739).default)},83925:(t,e,a)=>{"use strict";var s=a(74692);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}!function(){function t(){s(".sidenav-toggler").addClass("active"),s(".sidenav-toggler").data("action","sidenav-unpin"),s("body").removeClass("g-sidenav-hidden").addClass("g-sidenav-show g-sidenav-pinned"),s("body").append('
1&&(o+=''+i+""),o+=''+a+n+s+""}}}(t,a),a.update()}return window.Chart&&r(Chart,(t={defaults:{global:{responsive:!0,maintainAspectRatio:!1,defaultColor:o.gray[600],defaultFontColor:o.gray[600],defaultFontFamily:n.base,defaultFontSize:13,layout:{padding:0},legend:{display:!1,position:"bottom",labels:{usePointStyle:!0,padding:16}},elements:{point:{radius:0,backgroundColor:o.theme.primary},line:{tension:.4,borderWidth:4,borderColor:o.theme.primary,backgroundColor:o.transparent,borderCapStyle:"rounded"},rectangle:{backgroundColor:o.theme.warning},arc:{backgroundColor:o.theme.primary,borderColor:o.white,borderWidth:4}},tooltips:{enabled:!0,mode:"index",intersect:!1}},doughnut:{cutoutPercentage:83,legendCallback:function(t){var e=t.data,a="";return e.labels.forEach((function(t,s){var i=e.datasets[0].backgroundColor[s];a+='',a+='',a+=t,a+=""})),a}}}},Chart.scaleService.updateScaleDefaults("linear",{gridLines:{borderDash:[2],borderDashOffset:[2],color:o.gray[300],drawBorder:!1,drawTicks:!1,drawOnChartArea:!0,zeroLineWidth:0,zeroLineColor:"rgba(0,0,0,0)",zeroLineBorderDash:[2],zeroLineBorderDashOffset:[2]},ticks:{beginAtZero:!0,padding:10,callback:function(t){if(!(t%10))return t}}}),Chart.scaleService.updateScaleDefaults("category",{gridLines:{drawBorder:!1,drawOnChartArea:!1,drawTicks:!1},ticks:{padding:20},maxBarThickness:10}),t)),e.on({change:function(){var t=s(this);t.is("[data-add]")&&d(t)},click:function(){var t=s(this);t.is("[data-update]")&&u(t)}}),{colors:o,fonts:n,mode:a}}(),b=((r=s(o=".btn-icon-clipboard")).length&&((n=r).tooltip().on("mouseleave",(function(){n.tooltip("hide")})),new ClipboardJS(o).on("success",(function(t){s(t.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle"),t.clearSelection()}))),l=s(".navbar-nav, .navbar-nav .nav"),c=s(".navbar .collapse"),d=s(".navbar .dropdown"),c.on({"show.bs.collapse":function(){!function(t){t.closest(l).find(c).not(t).collapse("hide")}(s(this))}}),d.on({"hide.bs.dropdown":function(){!function(t){var e=t.find(".dropdown-menu");e.addClass("close"),setTimeout((function(){e.removeClass("close")}),200)}(s(this))}}),function(){s(".navbar-nav");var t=s(".navbar .navbar-custom-collapse");t.length&&(t.on({"hide.bs.collapse":function(){!function(t){t.addClass("collapsing-out")}(t)}}),t.on({"hidden.bs.collapse":function(){!function(t){t.removeClass("collapsing-out")}(t)}}));var e=0;s(".sidenav-toggler").click((function(){if(1==e)s("body").removeClass("nav-open"),e=0,s(".bodyClick").remove();else{s('
').appendTo("body").click((function(){s("body").removeClass("nav-open"),e=0,s(".bodyClick").remove()})),s("body").addClass("nav-open"),e=1}}))}(),u=s('[data-toggle="popover"]'),m="",u.length&&u.each((function(){!function(t){t.data("color")&&(m="popover-"+t.data("color"));var e={trigger:"focus",template:''};t.popover(e)}(s(this))})),function(){var t=s(".scroll-me, [data-scroll-to], .toc-entry a");function e(t){var e=t.attr("href"),a=t.data("scroll-to-offset")?t.data("scroll-to-offset"):0,i={scrollTop:s(e).offset().top-a};s("html, body").stop(!0,!0).animate(i,600),event.preventDefault()}t.length&&t.on("click",(function(t){e(s(this))}))}(),(p=s('[data-toggle="tooltip"]')).length&&p.tooltip(),(v=s(".form-control")).length&&function(t){t.on("focus blur",(function(t){s(this).parents(".form-group").toggleClass("focused","focus"===t.type)})).trigger("blur")}(v),(f=s("#chart-bars")).length&&function(t){var e=new Chart(t,{type:"bar",data:{labels:["Jul","Aug","Sep","Oct","Nov","Dec"],datasets:[{label:"Sales",data:[25,20,30,22,17,29]}]}});t.data("chart",e)}(f),function(){var t=s("#c1-dark");t.length&&function(t){var e=new Chart(t,{type:"line",options:{scales:{yAxes:[{gridLines:{lineWidth:1,color:_.colors.gray[900],zeroLineColor:_.colors.gray[900]},ticks:{callback:function(t){if(!(t%10))return t}}}]},tooltips:{callbacks:{label:function(t,e){var a=e.datasets[t.datasetIndex].label||"",s=t.yLabel,i="";return e.datasets.length>1&&(i+=a),i+(s+" posts")}}}},data:{labels:["7","6","5","4","3","2","1"],datasets:[{label:"",data:s(".posts-this-week").data("update").data.datasets[0].data}]}});t.data("chart",e)}(t)}(),(h=s(".datepicker")).length&&h.each((function(){!function(t){t.datepicker({disableTouchKeyboard:!0,autoclose:!1})}(s(this))})),function(){if(s(".input-slider-container")[0]&&s(".input-slider-container").each((function(){var t=s(this).find(".input-slider"),e=t.attr("id"),a=t.data("range-value-min"),i=t.data("range-value-max"),n=s(this).find(".range-slider-value"),o=n.attr("id"),r=n.data("range-value-low"),l=document.getElementById(e),c=document.getElementById(o);b.create(l,{start:[parseInt(r)],connect:[!0,!1],range:{min:[parseInt(a)],max:[parseInt(i)]}}),l.noUiSlider.on("update",(function(t,e){c.textContent=t[e]}))})),s("#input-slider-range")[0]){var t=document.getElementById("input-slider-range"),e=document.getElementById("input-slider-range-value-low"),a=document.getElementById("input-slider-range-value-high"),i=[e,a];b.create(t,{start:[parseInt(e.getAttribute("data-range-value-low")),parseInt(a.getAttribute("data-range-value-high"))],connect:!0,range:{min:parseInt(t.getAttribute("data-range-value-min")),max:parseInt(t.getAttribute("data-range-value-max"))}}),t.noUiSlider.on("update",(function(t,e){i[e].textContent=t[e]}))}}());(g=s(".scrollbar-inner")).length&&g.scrollbar().scrollLock()},9901:function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}!function(){var e="object"===("undefined"==typeof window?"undefined":t(window))?window:"object"===("undefined"==typeof self?"undefined":t(self))?self:this,a=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder;e.URL=e.URL||e.webkitURL||function(t,e){return(e=document.createElement("a")).href=t,e};var s=e.Blob,i=URL.createObjectURL,n=URL.revokeObjectURL,o=e.Symbol&&e.Symbol.toStringTag,r=!1,c=!1,d=!!e.ArrayBuffer,u=a&&a.prototype.append&&a.prototype.getBlob;try{r=2===new Blob(["ä"]).size,c=2===new Blob([new Uint8Array([1,2])]).size}catch(t){}function m(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var a=new Uint8Array(t.byteLength);a.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=a.buffer}return e}return t}))}function p(t,e){e=e||{};var s=new a;return m(t).forEach((function(t){s.append(t)})),e.type?s.getBlob(e.type):s.getBlob()}function v(t,e){return new s(m(t),e||{})}e.Blob&&(p.prototype=Blob.prototype,v.prototype=Blob.prototype);var f="function"==typeof TextEncoder?TextEncoder.prototype.encode.bind(new TextEncoder):function(t){for(var a=0,s=t.length,i=e.Uint8Array||Array,n=0,o=Math.max(32,s+(s>>1)+7),r=new i(o>>3<<3);a=55296&&l<=56319){if(a=55296&&l<=56319)continue}if(n+4>r.length){o+=8,o=(o*=1+a/t.length*2)>>3<<3;var d=new Uint8Array(o);d.set(r),r=d}if(0!=(4294967168&l)){if(0==(4294965248&l))r[n++]=l>>6&31|192;else if(0==(4294901760&l))r[n++]=l>>12&15|224,r[n++]=l>>6&63|128;else{if(0!=(4292870144&l))continue;r[n++]=l>>18&7|240,r[n++]=l>>12&63|128,r[n++]=l>>6&63|128}r[n++]=63&l|128}else r[n++]=l}return r.slice(0,n)},h="function"==typeof TextDecoder?TextDecoder.prototype.decode.bind(new TextDecoder):function(t){for(var e=t.length,a=[],s=0;s239?4:l>223?3:l>191?2:1;if(s+d<=e)switch(d){case 1:l<128&&(c=l);break;case 2:128==(192&(i=t[s+1]))&&(r=(31&l)<<6|63&i)>127&&(c=r);break;case 3:i=t[s+1],n=t[s+2],128==(192&i)&&128==(192&n)&&(r=(15&l)<<12|(63&i)<<6|63&n)>2047&&(r<55296||r>57343)&&(c=r);break;case 4:i=t[s+1],n=t[s+2],o=t[s+3],128==(192&i)&&128==(192&n)&&128==(192&o)&&(r=(15&l)<<18|(63&i)<<12|(63&n)<<6|63&o)>65535&&r<1114112&&(c=r)}null===c?(c=65533,d=1):c>65535&&(c-=65536,a.push(c>>>10&1023|55296),c=56320|1023&c),a.push(c),s+=d}var u=a.length,m="";for(s=0;s>2,d=(3&i)<<4|o>>4,u=(15&o)<<2|l>>6,m=63&l;r||(m=64,n||(u=64)),a.push(e[c],e[d],e[u],e[m])}return a.join("")}var s=Object.create||function(t){function e(){}return e.prototype=t,new e};if(d)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function c(a,s){s=null==s?{}:s;for(var i=0,n=(a=a||[]).length;i=e.size&&a.close()}))}})}}catch(t){try{new ReadableStream({}),_=function(t){var e=0;t=this;return new ReadableStream({pull:function(a){return t.slice(e,e+524288).arrayBuffer().then((function(s){e+=s.byteLength;var i=new Uint8Array(s);a.enqueue(i),e==t.size&&a.close()}))}})}}catch(t){try{new Response("").body.getReader().read(),_=function(){return new Response(this).body}}catch(t){_=function(){throw new Error("Include https://github.com/MattiasBuelens/web-streams-polyfill")}}}}b.arrayBuffer||(b.arrayBuffer=function(){var t=new FileReader;return t.readAsArrayBuffer(this),C(t)}),b.text||(b.text=function(){var t=new FileReader;return t.readAsText(this),C(t)}),b.stream||(b.stream=_)}(),function(t){"use strict";var e,a=t.Uint8Array,s=t.HTMLCanvasElement,i=s&&s.prototype,n=/\s*;\s*base64\s*(?:;|$)/i,o="toDataURL",r=function(t){for(var s,i,n=t.length,o=new a(n/4*3|0),r=0,l=0,c=[0,0],d=0,u=0;n--;)i=t.charCodeAt(r++),255!==(s=e[i-43])&&undefined!==s&&(c[1]=c[0],c[0]=i,u=u<<6|s,4===++d&&(o[l++]=u>>>16,61!==c[1]&&(o[l++]=u>>>8),61!==c[0]&&(o[l++]=u),d=0));return o};a&&(e=new a([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),!s||i.toBlob&&i.toBlobHD||(i.toBlob||(i.toBlob=function(t,e){if(e||(e="image/png"),this.mozGetAsFile)t(this.mozGetAsFile("canvas",e));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(e))t(this.msToBlob());else{var s,i=Array.prototype.slice.call(arguments,1),l=this[o].apply(this,i),c=l.indexOf(","),d=l.substring(c+1),u=n.test(l.substring(0,c));Blob.fake?((s=new Blob).encoding=u?"base64":"URI",s.data=d,s.size=d.length):a&&(s=u?new Blob([r(d)],{type:e}):new Blob([decodeURIComponent(d)],{type:e})),t(s)}}),!i.toBlobHD&&i.toDataURLHD?i.toBlobHD=function(){o="toDataURLHD";var t=this.toBlob();return o="toDataURL",t}:i.toBlobHD=i.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this)},86700:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(76798),i=a.n(s)()((function(t){return t[1]}));i.push([t.id,".gap-2[data-v-e104c6c0]{gap:1rem}",""]);const n=i},10372:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(76798),i=a.n(s)()((function(t){return t[1]}));i.push([t.id,".rule-badge[data-v-55da510f]{background-color:#fff;border:2px solid var(--primary);border-radius:34px;height:34px;width:34px}.rule-badge[data-v-55da510f],.rule-badge-inner[data-v-55da510f]{align-items:center;display:flex;justify-content:center}.rule-badge-inner[data-v-55da510f]{background-color:var(--primary);border-radius:26px;color:#fff;font-size:13px;font-weight:700;height:26px;width:26px}.rule-text[data-v-55da510f]{font-size:14px;margin-bottom:0;max-width:90%}.gap-1[data-v-55da510f]{gap:1rem}",""]);const n=i},6289:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(76798),i=a.n(s)()((function(t){return t[1]}));i.push([t.id,".gap-1[data-v-a624f3ac]{gap:1rem}",""]);const n=i},35358:(t,e,a)=>{var s={"./af":25177,"./af.js":25177,"./ar":61509,"./ar-dz":41488,"./ar-dz.js":41488,"./ar-kw":58676,"./ar-kw.js":58676,"./ar-ly":42353,"./ar-ly.js":42353,"./ar-ma":24496,"./ar-ma.js":24496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":82682,"./ar-sa.js":82682,"./ar-tn":89756,"./ar-tn.js":89756,"./ar.js":61509,"./az":95533,"./az.js":95533,"./be":28959,"./be.js":28959,"./bg":47777,"./bg.js":47777,"./bm":54903,"./bm.js":54903,"./bn":61290,"./bn-bd":17357,"./bn-bd.js":17357,"./bn.js":61290,"./bo":31545,"./bo.js":31545,"./br":11470,"./br.js":11470,"./bs":44429,"./bs.js":44429,"./ca":7306,"./ca.js":7306,"./cs":56464,"./cs.js":56464,"./cv":73635,"./cv.js":73635,"./cy":64226,"./cy.js":64226,"./da":93601,"./da.js":93601,"./de":77853,"./de-at":26111,"./de-at.js":26111,"./de-ch":54697,"./de-ch.js":54697,"./de.js":77853,"./dv":60708,"./dv.js":60708,"./el":54691,"./el.js":54691,"./en-au":53872,"./en-au.js":53872,"./en-ca":28298,"./en-ca.js":28298,"./en-gb":56195,"./en-gb.js":56195,"./en-ie":66584,"./en-ie.js":66584,"./en-il":65543,"./en-il.js":65543,"./en-in":9033,"./en-in.js":9033,"./en-nz":79402,"./en-nz.js":79402,"./en-sg":20623,"./en-sg.js":20623,"./eo":32934,"./eo.js":32934,"./es":97650,"./es-do":20838,"./es-do.js":20838,"./es-mx":17730,"./es-mx.js":17730,"./es-us":56575,"./es-us.js":56575,"./es.js":97650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":90527,"./fi.js":90527,"./fil":95995,"./fil.js":95995,"./fo":52477,"./fo.js":52477,"./fr":85498,"./fr-ca":26435,"./fr-ca.js":26435,"./fr-ch":37892,"./fr-ch.js":37892,"./fr.js":85498,"./fy":37071,"./fy.js":37071,"./ga":41734,"./ga.js":41734,"./gd":70217,"./gd.js":70217,"./gl":77329,"./gl.js":77329,"./gom-deva":32124,"./gom-deva.js":32124,"./gom-latn":93383,"./gom-latn.js":93383,"./gu":95050,"./gu.js":95050,"./he":11713,"./he.js":11713,"./hi":43861,"./hi.js":43861,"./hr":26308,"./hr.js":26308,"./hu":90609,"./hu.js":90609,"./hy-am":17160,"./hy-am.js":17160,"./id":74063,"./id.js":74063,"./is":89374,"./is.js":89374,"./it":88383,"./it-ch":21827,"./it-ch.js":21827,"./it.js":88383,"./ja":23827,"./ja.js":23827,"./jv":89722,"./jv.js":89722,"./ka":41794,"./ka.js":41794,"./kk":27088,"./kk.js":27088,"./km":96870,"./km.js":96870,"./kn":84451,"./kn.js":84451,"./ko":63164,"./ko.js":63164,"./ku":98174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":98174,"./ky":78474,"./ky.js":78474,"./lb":79680,"./lb.js":79680,"./lo":15867,"./lo.js":15867,"./lt":45766,"./lt.js":45766,"./lv":69532,"./lv.js":69532,"./me":58076,"./me.js":58076,"./mi":41848,"./mi.js":41848,"./mk":30306,"./mk.js":30306,"./ml":73739,"./ml.js":73739,"./mn":99053,"./mn.js":99053,"./mr":86169,"./mr.js":86169,"./ms":73386,"./ms-my":92297,"./ms-my.js":92297,"./ms.js":73386,"./mt":77075,"./mt.js":77075,"./my":72264,"./my.js":72264,"./nb":22274,"./nb.js":22274,"./ne":8235,"./ne.js":8235,"./nl":92572,"./nl-be":43784,"./nl-be.js":43784,"./nl.js":92572,"./nn":54566,"./nn.js":54566,"./oc-lnc":69330,"./oc-lnc.js":69330,"./pa-in":29849,"./pa-in.js":29849,"./pl":94418,"./pl.js":94418,"./pt":79834,"./pt-br":48303,"./pt-br.js":48303,"./pt.js":79834,"./ro":24457,"./ro.js":24457,"./ru":82271,"./ru.js":82271,"./sd":1221,"./sd.js":1221,"./se":33478,"./se.js":33478,"./si":17538,"./si.js":17538,"./sk":5784,"./sk.js":5784,"./sl":46637,"./sl.js":46637,"./sq":86794,"./sq.js":86794,"./sr":45719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":45719,"./ss":56e3,"./ss.js":56e3,"./sv":41011,"./sv.js":41011,"./sw":40748,"./sw.js":40748,"./ta":11025,"./ta.js":11025,"./te":11885,"./te.js":11885,"./tet":28861,"./tet.js":28861,"./tg":86571,"./tg.js":86571,"./th":55802,"./th.js":55802,"./tk":59527,"./tk.js":59527,"./tl-ph":29231,"./tl-ph.js":29231,"./tlh":31052,"./tlh.js":31052,"./tr":85096,"./tr.js":85096,"./tzl":79846,"./tzl.js":79846,"./tzm":81765,"./tzm-latn":97711,"./tzm-latn.js":97711,"./tzm.js":81765,"./ug-cn":48414,"./ug-cn.js":48414,"./uk":16618,"./uk.js":16618,"./ur":57777,"./ur.js":57777,"./uz":57609,"./uz-latn":72475,"./uz-latn.js":72475,"./uz.js":57609,"./vi":21135,"./vi.js":21135,"./x-pseudo":64051,"./x-pseudo.js":64051,"./yo":82218,"./yo.js":82218,"./zh-cn":52648,"./zh-cn.js":52648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":31541,"./zh-mo.js":31541,"./zh-tw":50304,"./zh-tw.js":50304};function i(t){var e=n(t);return a(e)}function n(t){if(!a.o(s,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return s[t]}i.keys=function(){return Object.keys(s)},i.resolve=n,t.exports=i,i.id=35358},55099:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});var s=a(85072),i=a.n(s),n=a(86700),o={insert:"head",singleton:!1};i()(n.default,o);const r=n.default.locals||{}},98437:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});var s=a(85072),i=a.n(s),n=a(10372),o={insert:"head",singleton:!1};i()(n.default,o);const r=n.default.locals||{}},59542:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>r});var s=a(85072),i=a.n(s),n=a(6289),o={insert:"head",singleton:!1};i()(n.default,o);const r=n.default.locals||{}},80430:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(66196),i=a(45941),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},65465:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(36809),i=a(19990),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},47739:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(77764),i=a(41660),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},50828:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(63152),i=a(32311),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);a(87974);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,"e104c6c0",null).exports},13929:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(31722),i=a(13398),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},93139:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(21958),i=a(15568),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);a(93990);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,"55da510f",null).exports},27707:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(67774),i=a(41304),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},8889:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(32754),i=a(64814),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},98385:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(1711),i=a(41094),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},7210:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(90322),i=a(48965),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},62355:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(65781),i=a(62160),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);a(84835);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,"a624f3ac",null).exports},34429:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>o});var s=a(94212),i=a(96634),n={};for(const t in i)"default"!==t&&(n[t]=()=>i[t]);a.d(e,n);const o=(0,a(14486).default)(i.default,s.render,s.staticRenderFns,!1,null,null,null).exports},45941:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(95366),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},19990:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(71847),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},41660:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(44107),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},32311:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(56310),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},13398:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(51839),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},15568:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(86871),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},41304:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(99697),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},64814:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(72173),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},41094:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(47835),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},48965:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(4970),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},62160:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(45053),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},96634:(t,e,a)=>{"use strict";a.r(e),a.d(e,{default:()=>n});var s=a(16563),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i);const n=s.default},66196:(t,e,a)=>{"use strict";a.r(e);var s=a(69385),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},36809:(t,e,a)=>{"use strict";a.r(e);var s=a(41298),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},77764:(t,e,a)=>{"use strict";a.r(e);var s=a(54449),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},63152:(t,e,a)=>{"use strict";a.r(e);var s=a(38343),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},31722:(t,e,a)=>{"use strict";a.r(e);var s=a(44381),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},21958:(t,e,a)=>{"use strict";a.r(e);var s=a(79535),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},67774:(t,e,a)=>{"use strict";a.r(e);var s=a(64441),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},32754:(t,e,a)=>{"use strict";a.r(e);var s=a(38391),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},1711:(t,e,a)=>{"use strict";a.r(e);var s=a(24664),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},90322:(t,e,a)=>{"use strict";a.r(e);var s=a(16231),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},65781:(t,e,a)=>{"use strict";a.r(e);var s=a(96858),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},94212:(t,e,a)=>{"use strict";a.r(e);var s=a(23075),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},87974:(t,e,a)=>{"use strict";a.r(e);var s=a(55099),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},93990:(t,e,a)=>{"use strict";a.r(e);var s=a(98437),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)},84835:(t,e,a)=>{"use strict";a.r(e);var s=a(59542),i={};for(const t in s)"default"!==t&&(i[t]=()=>s[t]);a.d(e,i)}},t=>{t.O(0,[3660],(()=>{return e=36671,t(t.s=e);var e}));t.O()}]); \ No newline at end of file diff --git a/public/js/manifest.js b/public/js/manifest.js index a61ead488..6eea38d8b 100644 --- a/public/js/manifest.js +++ b/public/js/manifest.js @@ -1 +1 @@ -(()=>{"use strict";var e,r,n,o={},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,e=[],a.O=(r,n,o,t)=>{if(!n){var c=1/0;for(l=0;l=t)&&Object.keys(a.O).every((e=>a.O[e](n[d])))?n.splice(d--,1):(i=!1,t0&&e[l-1][2]>t;l--)e[l]=e[l-1];e[l]=[n,o,t]},a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var n in r)a.o(r,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,n)=>(a.f[n](e,r),r)),[])),a.u=e=>"js/"+{1179:"daci.chunk",1240:"discover~myhashtags.chunk",1645:"profile~following.bundle",2156:"dms.chunk",2966:"discover~hashtag.bundle",3688:"discover~serverfeed.chunk",4951:"home.chunk",6250:"discover~settings.chunk",6535:"discover.chunk",6740:"discover~memories.chunk",7399:"dms~message.chunk",7413:"error404.bundle",7521:"discover~findfriends.chunk",7744:"notifications.chunk",8087:"profile.chunk",8119:"i18n.bundle",8408:"post.chunk",8977:"profile~followers.bundle",9124:"compose.chunk",9919:"changelog.bundle"}[e]+"."+{1179:"34dc7bad3a0792cc",1240:"8886fc0d4736d819",1645:"7ca7cfa5aaae75e2",2156:"2b55effc0e8ba89f",2966:"a0f00fc7df1f313c",3688:"262bf7e3bce843c3",4951:"264eeb47bfac56c1",6250:"65d6f3cbe5323ed4",6535:"c2229e1d15bd3ada",6740:"37e0c325f900e163",7399:"976f7edaa6f71137",7413:"b397483e3991ab20",7521:"b1858bea66d9723b",7744:"0c5151643e4534aa",8087:"f74967e7910990ca",8119:"93a02e275ac1a708",8408:"9184101a2b809af1",8977:"5d796e79f32d066c",9124:"a0cfdf07f5062445",9919:"bf44edbbfa14bd53"}[e]+".js",a.miniCssF=e=>({2305:"css/portfolio",2540:"css/landing",3364:"css/admin",6952:"css/appdark",8252:"css/app",8759:"css/spa"}[e]+".css"),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},n="pixelfed:",a.l=(e,o,t,c)=>{if(r[e])r[e].push(o);else{var i,d;if(void 0!==t)for(var s=document.getElementsByTagName("script"),l=0;l{i.onerror=i.onload=null,clearTimeout(b);var t=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),t&&t.forEach((e=>e(o))),n)return n(o)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),d&&document.head.appendChild(i)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.p="/",(()=>{var e={461:0,6952:0,8252:0,2305:0,3364:0,2540:0,8759:0};a.f.j=(r,n)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^((69|82)52|2305|2540|3364|461|8759)$/.test(r))e[r]=0;else{var t=new Promise(((n,t)=>o=e[r]=[n,t]));n.push(o[2]=t);var c=a.p+a.u(r),i=new Error;a.l(c,(n=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var t=n&&("load"===n.type?"missing":n.type),c=n&&n.target&&n.target.src;i.message="Loading chunk "+r+" failed.\n("+t+": "+c+")",i.name="ChunkLoadError",i.type=t,i.request=c,o[1](i)}}),"chunk-"+r,r)}},a.O.j=r=>0===e[r];var r=(r,n)=>{var o,t,[c,i,d]=n,s=0;if(c.some((r=>0!==e[r]))){for(o in i)a.o(i,o)&&(a.m[o]=i[o]);if(d)var l=d(a)}for(r&&r(n);s{"use strict";var e,r,n,o={},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var n=t[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,e=[],a.O=(r,n,o,t)=>{if(!n){var d=1/0;for(l=0;l=t)&&Object.keys(a.O).every((e=>a.O[e](n[c])))?n.splice(c--,1):(i=!1,t0&&e[l-1][2]>t;l--)e[l]=e[l-1];e[l]=[n,o,t]},a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var n in r)a.o(r,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,n)=>(a.f[n](e,r),r)),[])),a.u=e=>"js/"+{1179:"daci.chunk",1240:"discover~myhashtags.chunk",1645:"profile~following.bundle",2156:"dms.chunk",2966:"discover~hashtag.bundle",3688:"discover~serverfeed.chunk",4951:"home.chunk",6250:"discover~settings.chunk",6535:"discover.chunk",6740:"discover~memories.chunk",7399:"dms~message.chunk",7413:"error404.bundle",7521:"discover~findfriends.chunk",7744:"notifications.chunk",8087:"profile.chunk",8119:"i18n.bundle",8408:"post.chunk",8977:"profile~followers.bundle",9124:"compose.chunk",9919:"changelog.bundle"}[e]+"."+{1179:"34dc7bad3a0792cc",1240:"8886fc0d4736d819",1645:"7ca7cfa5aaae75e2",2156:"2b55effc0e8ba89f",2966:"a0f00fc7df1f313c",3688:"262bf7e3bce843c3",4951:"264eeb47bfac56c1",6250:"65d6f3cbe5323ed4",6535:"c2229e1d15bd3ada",6740:"37e0c325f900e163",7399:"976f7edaa6f71137",7413:"b397483e3991ab20",7521:"b1858bea66d9723b",7744:"0c5151643e4534aa",8087:"a2234f891ba86efd",8119:"93a02e275ac1a708",8408:"9184101a2b809af1",8977:"5d796e79f32d066c",9124:"a0cfdf07f5062445",9919:"bf44edbbfa14bd53"}[e]+".js",a.miniCssF=e=>({2305:"css/portfolio",2540:"css/landing",3364:"css/admin",6952:"css/appdark",8252:"css/app",8759:"css/spa"}[e]+".css"),a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},n="pixelfed:",a.l=(e,o,t,d)=>{if(r[e])r[e].push(o);else{var i,c;if(void 0!==t)for(var s=document.getElementsByTagName("script"),l=0;l{i.onerror=i.onload=null,clearTimeout(b);var t=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),t&&t.forEach((e=>e(o))),n)return n(o)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),c&&document.head.appendChild(i)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.p="/",(()=>{var e={461:0,6952:0,8252:0,2305:0,3364:0,2540:0,8759:0};a.f.j=(r,n)=>{var o=a.o(e,r)?e[r]:void 0;if(0!==o)if(o)n.push(o[2]);else if(/^((69|82)52|2305|2540|3364|461|8759)$/.test(r))e[r]=0;else{var t=new Promise(((n,t)=>o=e[r]=[n,t]));n.push(o[2]=t);var d=a.p+a.u(r),i=new Error;a.l(d,(n=>{if(a.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var t=n&&("load"===n.type?"missing":n.type),d=n&&n.target&&n.target.src;i.message="Loading chunk "+r+" failed.\n("+t+": "+d+")",i.name="ChunkLoadError",i.type=t,i.request=d,o[1](i)}}),"chunk-"+r,r)}},a.O.j=r=>0===e[r];var r=(r,n)=>{var o,t,[d,i,c]=n,s=0;if(d.some((r=>0!==e[r]))){for(o in i)a.o(i,o)&&(a.m[o]=i[o]);if(c)var l=c(a)}for(r&&r(n);s{"use strict";s.r(e),s.d(e,{default:()=>l});var i=s(5787),o=s(62457),a=s(99487),n=s(36470),r=s(99234);const l={props:{id:{type:String},profileId:{type:String},username:{type:String},cachedProfile:{type:Object},cachedUser:{type:Object}},components:{drawer:i.default,"profile-feed":o.default,"profile-sidebar":a.default,"profile-followers":n.default,"profile-following":r.default},data:function(){return{isLoaded:!1,curUser:void 0,tab:"index",profile:void 0,relationship:void 0,showMoved:!1}},mounted:function(){this.init()},watch:{$route:"init"},methods:{init:function(){this.tab="index",this.isLoaded=!1,this.relationship=void 0,this.owner=!1,this.cachedProfile&&this.cachedUser?(this.curUser=this.cachedUser,this.profile=this.cachedProfile,this.fetchRelationship()):(this.curUser=window._sharedData.user,this.fetchProfile())},getTabComponentName:function(){return"index"===this.tab?"profile-feed":"profile-".concat(this.tab)},fetchProfile:function(){var t=this,e=this.profileId?this.profileId:this.id;axios.get("/api/pixelfed/v1/accounts/"+e).then((function(e){t.profile=e.data,e.data.id==t.curUser.id?(t.owner=!0,t.fetchRelationship()):(t.owner=!1,t.fetchRelationship())})).catch((function(e){t.$router.push("/i/web/404")}))},fetchRelationship:function(){var t=this;if(this.owner)return this.relationship={},void(this.isLoaded=!0);axios.get("/api/v1/accounts/relationships",{params:{"id[]":this.profile.id}}).then((function(e){t.relationship=e.data[0],t.isLoaded=!0}))},toggleTab:function(t){this.tab=t},goBack:function(){this.$router.go(-1)},unfollow:function(){var t=this;axios.post("/api/v1/accounts/"+this.profile.id+"/unfollow").then((function(e){t.$store.commit("updateRelationship",[e.data]),t.relationship=e.data,t.profile.locked&&location.reload(),t.profile.followers_count--})).catch((function(e){swal("Oops!","An error occured when attempting to unfollow this account.","error"),t.relationship.following=!0}))},follow:function(){var t=this;axios.post("/api/v1/accounts/"+this.profile.id+"/follow").then((function(e){t.$store.commit("updateRelationship",[e.data]),t.relationship=e.data,t.profile.locked&&(t.relationship.requested=!0),t.profile.followers_count++})).catch((function(e){swal("Oops!","An error occured when attempting to follow this account.","error"),t.relationship.following=!1}))},updateRelationship:function(t){this.relationship=t}}}},66655:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(95341);const o={props:{hash:{type:String,required:!0},width:{type:[Number,String],default:32},height:{type:[Number,String],default:32},punch:{type:Number,default:1}},mounted:function(){this.draw()},updated:function(){},beforeDestroy:function(){},methods:{parseNumber:function(t){return"number"==typeof t?t:parseInt(t,10)},draw:function(){var t=this.parseNumber(this.width),e=this.parseNumber(this.height),s=this.parseNumber(this.punch),o=(0,i.decode)(this.hash,t,e,s),a=this.$refs.canvas.getContext("2d"),n=a.createImageData(t,e);n.data.set(o),a.putImageData(n,0,0)}}}},56987:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(20243),o=s(84800),a=s(79110),n=s(27821);const r={props:{status:{type:Object},profile:{type:Object},reactionBar:{type:Boolean,default:!0},useDropdownMenu:{type:Boolean,default:!1}},components:{"comment-drawer":i.default,"post-content":a.default,"post-header":o.default,"post-reactions":n.default},data:function(){return{key:1,menuLoading:!0,sensitive:!1,showCommentDrawer:!1,isReblogging:!1,isBookmarking:!1,owner:!1,admin:!1,license:!1}},mounted:function(){var t=this;this.license=!(!this.shadowStatus.media_attachments||!this.shadowStatus.media_attachments.length)&&this.shadowStatus.media_attachments.filter((function(t){return t.hasOwnProperty("license")&&t.license&&t.license.hasOwnProperty("id")})).map((function(t){return t.license}))[0],this.admin=window._sharedData.user.is_admin,this.owner=this.shadowStatus.account.id==window._sharedData.user.id,this.shadowStatus.reply_count&&this.autoloadComments&&!1===this.shadowStatus.comments_disabled&&setTimeout((function(){t.showCommentDrawer=!0}),1e3)},computed:{hideCounts:{get:function(){return 1==this.$store.state.hideCounts}},fixedHeight:{get:function(){return 1==this.$store.state.fixedHeight}},autoloadComments:{get:function(){return 1==this.$store.state.autoloadComments}},newReactions:{get:function(){return this.$store.state.newReactions}},isReblog:{get:function(){return null!=this.status.reblog}},reblogAccount:{get:function(){return this.status.reblog?this.status.account:null}},shadowStatus:{get:function(){return this.status.reblog?this.status.reblog:this.status}}},watch:{status:{deep:!0,immediate:!0,handler:function(t,e){this.isBookmarking=!1}}},methods:{openMenu:function(){this.$emit("menu")},like:function(){this.$emit("like")},unlike:function(){this.$emit("unlike")},showLikes:function(){this.$emit("likes-modal")},showShares:function(){this.$emit("shares-modal")},showComments:function(){this.showCommentDrawer=!this.showCommentDrawer},copyLink:function(){event.currentTarget.blur(),App.util.clipboard(this.status.url)},shareToOther:function(){navigator.canShare?navigator.share({url:this.status.url}).then((function(){return console.log("Share was successful.")})).catch((function(t){return console.log("Sharing failed",t)})):swal("Not supported","Your current device does not support native sharing.","error")},counterChange:function(t){this.$emit("counter-change",t)},showCommentLikes:function(t){this.$emit("comment-likes-modal",t)},shareStatus:function(){this.$emit("share")},unshareStatus:function(){this.$emit("unshare")},handleReport:function(t){this.$emit("handle-report",t)},follow:function(){this.$emit("follow")},unfollow:function(){this.$emit("unfollow")},handleReblog:function(){var t=this;this.isReblogging=!0,this.status.reblogged?this.$emit("unshare"):this.$emit("share"),setTimeout((function(){t.isReblogging=!1}),5e3)},handleBookmark:function(){var t=this;event.currentTarget.blur(),this.isBookmarking=!0,this.$emit("bookmark"),setTimeout((function(){t.isBookmarking=!1}),5e3)},getStatusAvatar:function(){return window._sharedData.user.id==this.status.account.id?window._sharedData.user.avatar:this.status.account.avatar},openModTools:function(){this.$emit("mod-tools")}}}},50371:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={data:function(){return{user:window._sharedData.user}}}},25054:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{status:{type:Object,default:{}}},data:function(){return{statusId:void 0,tabIndex:0,showFull:!1}},methods:{open:function(){this.$refs.modal.show()},close:function(){var t=this;this.$refs.modal.hide(),setTimeout((function(){t.tabIndex=0}),1e3)},handleReason:function(t){var e=this;this.tabIndex=2,axios.post("/i/report",{id:this.status.id,report:t,type:"post"}).then((function(t){e.tabIndex=3})).catch((function(t){e.tabIndex=5}))}}}},3211:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>l});var i=s(79288),o=s(50294),a=s(34719),n=s(72028),r=s(19138);const l={props:{status:{type:Object}},components:{VueTribute:i.default,ReadMore:o.default,ProfileHoverCard:a.default,CommentReplyForm:r.default,CommentReplies:n.default},data:function(){return{profile:window._sharedData.user,ids:[],feed:[],sortIndex:0,sorts:["all","newest","popular"],replyContent:void 0,nextUrl:void 0,canLoadMore:!1,isPostingReply:!1,showReplyOptions:!1,feedLoading:!1,isUploading:!1,uploadProgress:0,lightboxStatus:null,settings:{expanded:!1,sensitive:!1},tributeSettings:{noMatchTemplate:null,collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){e(),console.log(t)}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){e(),console.log(t)}))}}]},showEmptyRepliesRefresh:!1,commentReplyIndex:void 0,deletingIndex:void 0}},mounted:function(){this.fetchContext()},computed:{hideCounts:{get:function(){return 1==this.$store.state.hideCounts}}},methods:{fetchContext:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),e.data&&e.data.data&&(e.data.data.length||!t.status.reply_count)||(t.showEmptyRepliesRefresh=!0)}))},fetchMore:function(){var t,e=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;event&&(null===(t=event.target)||void 0===t||t.blur());this.nextUrl&&axios.get(this.nextUrl,{params:{limit:s,sort:this.sorts[this.sortIndex]}}).then((function(t){e.feedLoading=!1,t.data.next||(e.canLoadMore=!1),e.nextUrl=t.data.next,t.data.data.forEach((function(t){e.ids&&-1==e.ids.indexOf(t.id)&&(e.ids.push(t.id),e.feed.push(t))}))}))},fetchSortedFeed:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,sort:this.sorts[this.sortIndex]}}).then((function(e){t.feed=e.data.data,t.nextUrl=e.data.next,t.feedLoading=!1}))},forceRefresh:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,refresh_cache:!0}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),t.showEmptyRepliesRefresh=!1}))},timeago:function(t){return App.util.format.timeAgo(t)},prettyCount:function(t){return App.util.format.count(t)},goToPost:function(t){this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},storeComment:function(){var t=this;this.isPostingReply=!0,axios.post("/api/v1/statuses",{status:this.replyContent,in_reply_to_id:this.status.id,sensitive:this.settings.sensitive}).then((function(e){var s=e.data;s.replies=[],t.replyContent=void 0,t.isPostingReply=!1,t.ids.push(e.data.id),t.feed.push(s),t.$emit("counter-change","comment-increment")}))},toggleSort:function(t){this.$refs.sortMenu.hide(),this.feedLoading=!0,this.sortIndex=t,this.fetchSortedFeed()},deleteComment:function(t){var e=this;event.currentTarget.blur(),window.confirm(this.$t("menu.deletePostConfirm"))&&(this.deletingIndex=t,axios.post("/i/delete",{type:"status",item:this.feed[t].id}).then((function(s){e.ids&&e.ids.length&&e.ids.splice(t,1),e.feed&&e.feed.length&&e.feed.splice(t,1),e.$emit("counter-change","comment-decrement")})).then((function(){e.deletingIndex=void 0,e.fetchMore(1)})))},showLikesModal:function(t){this.$emit("show-likes",this.feed[t])},reportComment:function(t){this.$emit("handle-report",this.feed[t])},likeComment:function(t){event.currentTarget.blur();var e=this.feed[t],s=e.favourites_count,i=e.favourited;this.feed[t].favourited=!this.feed[t].favourited,this.feed[t].favourites_count=i?s-1:s+1,axios.post("/api/v1/statuses/"+e.id+"/"+(i?"unfavourite":"favourite")).then((function(t){}))},toggleShowReplyOptions:function(){event.currentTarget.blur(),this.showReplyOptions=!this.showReplyOptions},replyUpload:function(){event.currentTarget.blur(),this.$refs.fileInput.click()},handleImageUpload:function(){var t=this;if(this.$refs.fileInput.files.length){this.isUploading=!0;var e=new FormData;e.append("file",this.$refs.fileInput.files[0]),axios.post("/api/v1/media",e).then((function(e){axios.post("/api/v1/statuses",{status:t.replyContent,media_ids:[e.data.id],in_reply_to_id:t.status.id,sensitive:t.settings.sensitive}).then((function(e){t.feed.push(e.data),t.replyContent=void 0,t.isPostingReply=!1,t.ids.push(e.data.id),t.$emit("counter-change","comment-increment")}))}))}},lightbox:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.lightboxStatus=t.media_attachments[e],this.$refs.lightboxModal.show()},hideLightbox:function(){this.lightboxStatus=null,this.$refs.lightboxModal.hide()},blurhashWidth:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?30:20},blurhashHeight:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?20:30},getMediaSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=t.media_attachments[e];return s.preview_url.endsWith("storage/no-preview.png")?s.url:s.preview_url},toggleReplyExpand:function(){event.currentTarget.blur(),this.settings.expanded=!this.settings.expanded},toggleCommentReply:function(t){this.commentReplyIndex=t,this.showCommentReplies(t)},showCommentReplies:function(t){if(this.feed[t].hasOwnProperty("replies_show")&&this.feed[t].replies_show)return this.feed[t].replies_show=!1,void(this.commentReplyIndex=void 0);this.feed[t].replies_show=!0,this.commentReplyIndex=t,this.fetchCommentReplies(t)},hideCommentReplies:function(t){this.commentReplyIndex=void 0,this.feed[t].replies_show=!1},fetchCommentReplies:function(t){var e=this;axios.get("/api/v2/statuses/"+this.feed[t].id+"/replies",{params:{limit:3}}).then((function(s){e.feed[t].replies=s.data.data}))},getPostAvatar:function(t){return this.profile.id==t.account.id?window._sharedData.user.avatar:t.account.avatar},follow:function(t){var e=this;axios.post("/api/v1/accounts/"+this.feed[t].account.id+"/follow").then((function(s){e.$store.commit("updateRelationship",[s.data]),e.feed[t].account.followers_count=e.feed[t].account.followers_count+1,window._sharedData.user.following_count=window._sharedData.user.following_count+1}))},unfollow:function(t){var e=this;axios.post("/api/v1/accounts/"+this.feed[t].account.id+"/unfollow").then((function(s){e.$store.commit("updateRelationship",[s.data]),e.feed[t].account.followers_count=e.feed[t].account.followers_count-1,window._sharedData.user.following_count=window._sharedData.user.following_count-1}))},handleCounterChange:function(t){this.$emit("counter-change",t)},pushCommentReply:function(t,e){this.feed[t].hasOwnProperty("replies")?this.feed[t].replies.push(e):this.feed[t].replies=[e],this.feed[t].reply_count=this.feed[t].reply_count+1,this.feed[t].replies_show=!0},replyCounterChange:function(t,e){switch(e){case"comment-increment":this.feed[t].reply_count=this.feed[t].reply_count+1;break;case"comment-decrement":this.feed[t].reply_count=this.feed[t].reply_count-1}}}}},24758:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(50294);const o={props:{status:{type:Object},feed:{type:Array}},components:{ReadMore:i.default},data:function(){return{loading:!0,profile:window._sharedData.user,ids:[],nextUrl:void 0,canLoadMore:!1}},watch:{feed:{deep:!0,immediate:!0,handler:function(t,e){this.loading=!1}}},methods:{fetchContext:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),e.data&&e.data.data&&(e.data.data.length||!t.status.reply_count)||(t.showEmptyRepliesRefresh=!0)}))},fetchMore:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;axios.get(this.nextUrl,{params:{limit:e,sort:this.sorts[this.sortIndex]}}).then((function(e){t.feedLoading=!1,e.data.next||(t.canLoadMore=!1),t.nextUrl=e.data.next,e.data.data.forEach((function(e){-1==t.ids.indexOf(e.id)&&(t.ids.push(e.id),t.feed.push(e))}))}))},fetchSortedFeed:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,sort:this.sorts[this.sortIndex]}}).then((function(e){t.feed=e.data.data,t.nextUrl=e.data.next,t.feedLoading=!1}))},forceRefresh:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,refresh_cache:!0}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),t.showEmptyRepliesRefresh=!1}))},timeago:function(t){return App.util.format.timeAgo(t)},prettyCount:function(t){return App.util.format.count(t)},goToPost:function(t){this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},storeComment:function(){var t=this;this.isPostingReply=!0,axios.post("/api/v1/statuses",{status:this.replyContent,in_reply_to_id:this.status.id,sensitive:this.settings.sensitive}).then((function(e){t.replyContent=void 0,t.isPostingReply=!1,t.ids.push(e.data.id),t.feed.push(e.data),t.$emit("new-comment",e.data)}))},toggleSort:function(t){this.$refs.sortMenu.hide(),this.feedLoading=!0,this.sortIndex=t,this.fetchSortedFeed()},deleteComment:function(t){var e=this;event.currentTarget.blur(),window.confirm(this.$t("menu.deletePostConfirm"))&&axios.post("/i/delete",{type:"status",item:this.feed[t].id}).then((function(s){e.feed.splice(t,1),e.$emit("counter-change","comment-decrement"),e.fetchMore(1)})).catch((function(t){}))},showLikesModal:function(t){this.$emit("show-likes",this.feed[t])},reportComment:function(t){this.$emit("handle-report",this.feed[t])},likeComment:function(t){event.currentTarget.blur();var e=this.feed[t],s=e.favourites_count,i=e.favourited;this.feed[t].favourited=!this.feed[t].favourited,this.feed[t].favourites_count=i?s-1:s+1,axios.post("/api/v1/statuses/"+e.id+"/"+(i?"unfavourite":"favourite")).then((function(t){}))},toggleShowReplyOptions:function(){event.currentTarget.blur(),this.showReplyOptions=!this.showReplyOptions},replyUpload:function(){event.currentTarget.blur(),this.$refs.fileInput.click()},handleImageUpload:function(){var t=this;if(this.$refs.fileInput.files.length){this.isUploading=!0;var e=new FormData;e.append("file",this.$refs.fileInput.files[0]),axios.post("/api/v1/media",e).then((function(e){axios.post("/api/v1/statuses",{media_ids:[e.data.id],in_reply_to_id:t.status.id,sensitive:t.settings.sensitive}).then((function(e){t.feed.push(e.data)}))}))}},lightbox:function(t){this.lightboxStatus=t.media_attachments[0],this.$refs.lightboxModal.show()},hideLightbox:function(){this.lightboxStatus=null,this.$refs.lightboxModal.hide()},blurhashWidth:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?30:20},blurhashHeight:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?20:30},getMediaSource:function(t){var e=t.media_attachments[0];return e.preview_url.endsWith("storage/no-preview.png")?e.url:e.preview_url},toggleReplyExpand:function(){event.currentTarget.blur(),this.settings.expanded=!this.settings.expanded},toggleCommentReply:function(t){this.commentReplyIndex=t}}}},85100:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{parentId:{type:String}},data:function(){return{config:App.config,isPostingReply:!1,replyContent:"",profile:window._sharedData.user,sensitive:!1}},methods:{storeComment:function(){var t=this;this.isPostingReply=!0,axios.post("/api/v1/statuses",{status:this.replyContent,in_reply_to_id:this.parentId,sensitive:this.sensitive}).then((function(e){t.replyContent=void 0,t.isPostingReply=!1,t.$emit("new-comment",e.data)}))}}}},49415:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(74692);const o={props:["status","profile"],data:function(){return{config:window.App.config,ctxMenuStatus:!1,ctxMenuRelationship:!1,ctxEmbedPayload:!1,copiedEmbed:!1,replySending:!1,ctxEmbedShowCaption:!0,ctxEmbedShowLikes:!1,ctxEmbedCompactMode:!1,confirmModalTitle:"Are you sure?",confirmModalIdentifer:null,confirmModalType:!1,isDeleting:!1}},watch:{ctxEmbedShowCaption:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var s=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.ctxMenuStatus.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,s)},ctxEmbedShowLikes:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var s=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.ctxMenuStatus.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,s)},ctxEmbedCompactMode:function(t,e){1==t&&(this.ctxEmbedShowCaption=!1,this.ctxEmbedShowLikes=!1);var s=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.ctxMenuStatus.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,s)}},methods:{open:function(){this.ctxMenu()},openModMenu:function(){this.$refs.ctxModModal.show()},ctxMenu:function(){this.ctxMenuStatus=this.status,this.ctxEmbedPayload=window.App.util.embed.post(this.status.url),this.ctxMenuRelationship=!1,this.$refs.ctxModal.show()},closeCtxMenu:function(){this.copiedEmbed=!1,this.ctxMenuStatus=!1,this.ctxMenuRelationship=!1,this.$refs.ctxModal.hide(),this.$refs.ctxReport.hide(),this.$refs.ctxReportOther.hide(),this.closeModals()},ctxMenuCopyLink:function(){var t=this.ctxMenuStatus;navigator.clipboard.writeText(t.url),this.closeModals()},ctxMenuGoToPost:function(){var t=this.ctxMenuStatus;this.statusUrl(t),this.closeCtxMenu()},ctxMenuGoToProfile:function(){var t=this.ctxMenuStatus;this.profileUrl(t),this.closeCtxMenu()},ctxMenuReportPost:function(){this.$refs.ctxModal.hide(),this.$emit("report-modal",this.ctxMenuStatus)},ctxMenuEmbed:function(){this.closeModals(),this.$refs.ctxEmbedModal.show()},ctxMenuShare:function(){this.$refs.ctxModal.hide(),this.$refs.ctxShareModal.show()},closeCtxShareMenu:function(){this.$refs.ctxShareModal.hide(),this.$refs.ctxModal.show()},ctxCopyEmbed:function(){navigator.clipboard.writeText(this.ctxEmbedPayload),this.ctxEmbedShowCaption=!0,this.ctxEmbedShowLikes=!1,this.ctxEmbedCompactMode=!1,this.$refs.ctxEmbedModal.hide()},ctxModMenuShow:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.show()},ctxModOtherMenuShow:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.hide(),this.$refs.ctxModOtherModal.show()},ctxModMenu:function(){this.$refs.ctxModal.hide()},ctxModMenuClose:function(){this.closeModals()},ctxModOtherMenuClose:function(){this.closeModals(),this.$refs.ctxModModal.show()},formatCount:function(t){return App.util.format.count(t)},openCtxReportOtherMenu:function(){var t=this.ctxMenuStatus;this.closeCtxMenu(),this.ctxMenuStatus=t,this.$refs.ctxReportOther.show()},ctxReportMenuGoBack:function(){this.$refs.ctxReportOther.hide(),this.$refs.ctxReport.hide(),this.$refs.ctxModal.show()},ctxReportOtherMenuGoBack:function(){this.$refs.ctxReportOther.hide(),this.$refs.ctxModal.hide(),this.$refs.ctxReport.show()},sendReport:function(t){var e=this,s=this.ctxMenuStatus.id;swal({title:this.$t("menu.confirmReport"),text:this.$t("menu.confirmReportText"),icon:"warning",buttons:!0,dangerMode:!0}).then((function(i){i?axios.post("/i/report/",{report:t,type:"post",id:s}).then((function(t){e.closeCtxMenu(),swal(e.$t("menu.reportSent"),e.$t("menu.reportSentText"),"success")})).catch((function(t){swal(e.$t("common.oops"),e.$t("menu.reportSentError"),"error")})):e.closeCtxMenu()}))},closeModals:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.hide(),this.$refs.ctxModOtherModal.hide(),this.$refs.ctxShareModal.hide(),this.$refs.ctxEmbedModal.hide(),this.$refs.ctxReport.hide(),this.$refs.ctxReportOther.hide(),this.$refs.ctxConfirm.hide()},openCtxStatusModal:function(){this.closeModals(),this.$refs.ctxStatusModal.show()},openConfirmModal:function(){this.closeModals(),this.$refs.ctxConfirm.show()},closeConfirmModal:function(){this.closeModals(),this.confirmModalTitle="Are you sure?",this.confirmModalType=!1,this.confirmModalIdentifer=null},confirmModalConfirm:function(){var t=this;if("post.delete"===this.confirmModalType)axios.post("/i/delete",{type:"status",item:this.confirmModalIdentifer}).then((function(e){t.feed=t.feed.filter((function(e){return e.id!=t.confirmModalIdentifer})),t.closeConfirmModal()})).catch((function(e){t.closeConfirmModal(),swal(t.$t("common.error"),t.$t("common.errorMsg"),"error")}));this.closeConfirmModal()},confirmModalCancel:function(){this.closeConfirmModal()},moderatePost:function(t,e,s){var i=this,o=(t.account.username,t.id,""),a=this;switch(e){case"addcw":o=this.$t("menu.modAddCWConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){swal(i.$t("common.success"),i.$t("menu.modCWSuccess"),"success"),i.$emit("moderate","addcw"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}));break;case"remcw":o=this.$t("menu.modRemoveCWConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){swal(i.$t("common.success"),i.$t("menu.modRemoveCWSuccess"),"success"),i.$emit("moderate","remcw"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}));break;case"unlist":o=this.$t("menu.modUnlistConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){i.$emit("moderate","unlist"),swal(i.$t("common.success"),i.$t("menu.modUnlistSuccess"),"success"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}));break;case"spammer":o=this.$t("menu.modMarkAsSpammerConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){i.$emit("moderate","spammer"),swal(i.$t("common.success"),i.$t("menu.modMarkAsSpammerSuccess"),"success"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}))}},shareStatus:function(t,e){var s=this;0!=i("body").hasClass("loggedIn")&&(this.closeModals(),axios.post("/i/share",{item:t.id}).then((function(e){t.reblogs_count=e.data.count,t.reblogged=!t.reblogged})).catch((function(t){swal(s.$t("common.error"),s.$t("common.errorMsg"),"error")})))},statusUrl:function(t){if(1!=t.account.local)return this.$route.params.hasOwnProperty("id")?void(location.href=t.url):void this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}});this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})},profileUrl:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.account.id),params:{id:t.account.id,cachedProfile:t.account,cachedUser:this.profile}})},deletePost:function(t){var e=this;this.isDeleting=!0,0!=this.ownerOrAdmin(t)&&0!=window.confirm(this.$t("menu.deletePostConfirm"))&&axios.post("/i/delete",{type:"status",item:t.id}).then((function(t){e.$emit("delete"),e.closeModals(),e.isDeleting=!1})).catch((function(t){swal(e.$t("common.error"),e.$t("common.errorMsg"),"error")}))},owner:function(t){return this.profile.id===t.account.id},admin:function(){return 1==this.profile.is_admin},ownerOrAdmin:function(t){return this.owner(t)||this.admin()},archivePost:function(t){var e=this;0!=window.confirm(this.$t("menu.archivePostConfirm"))&&axios.post("/api/pixelfed/v2/status/"+t.id+"/archive").then((function(s){e.$emit("status-delete",t.id),e.$emit("archived",t.id),e.closeModals()}))},unarchivePost:function(t){var e=this;0!=window.confirm(this.$t("menu.unarchivePostConfirm"))&&axios.post("/api/pixelfed/v2/status/"+t.id+"/unarchive").then((function(s){e.$emit("unarchived",t.id),e.closeModals()}))},editPost:function(t){this.closeModals(),this.$emit("edit",t)}}}},37844:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{status:{type:Object}},data:function(){return{isOpen:!1,isLoading:!0,allHistory:[],historyIndex:void 0,user:window._sharedData.user}},methods:{open:function(){var t=this;this.isOpen=!0,this.isLoading=!0,this.historyIndex=void 0,this.allHistory=[],setTimeout((function(){t.fetchHistory()}),300)},fetchHistory:function(){var t=this;axios.get("/api/v1/statuses/".concat(this.status.id,"/history")).then((function(e){t.allHistory=e.data})).finally((function(){t.isLoading=!1}))},getDiff:function(t){if(t==this.allHistory.length-1)return this.allHistory[this.allHistory.length-1].content;var e=document.createElement("div");return r.forEach((function(t){var s=t.added?"green":t.removed?"red":"grey",i=document.createElement("span");(i.style.color=s,console.log(t.value,t.value.length),t.added)?t.value.trim().length?i.appendChild(document.createTextNode(t.value)):i.appendChild(document.createTextNode("·")):i.appendChild(document.createTextNode(t.value));e.appendChild(i)})),e.innerHTML},formatTime:function(t){var e=Date.parse(t),s=Math.floor((new Date-e)/1e3),i=Math.floor(s/63072e3);return i<0?"0s":i>=1?i+(1==i?" year":" years")+" ago":(i=Math.floor(s/604800))>=1?i+(1==i?" week":" weeks")+" ago":(i=Math.floor(s/86400))>=1?i+(1==i?" day":" days")+" ago":(i=Math.floor(s/3600))>=1?i+(1==i?" hour":" hours")+" ago":(i=Math.floor(s/60))>=1?i+(1==i?" minute":" minutes")+" ago":Math.floor(s)+" seconds ago"},postType:function(){if(void 0!==this.historyIndex){var t=this.allHistory[this.historyIndex];if(!t)return"text";var e=t.media_attachments;return e&&e.length?1==e.length?e[0].type:"album":"text"}}}}},67975:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(25100),o=s(29787),a=s(24848);const n={props:{status:{type:Object},profile:{type:Object}},components:{intersect:i.default,"like-placeholder":o.default},data:function(){return{isOpen:!1,isLoading:!0,canLoadMore:!1,isFetchingMore:!1,likes:[],ids:[],cursor:void 0,isUpdatingFollowState:!1,followStateIndex:void 0,user:window._sharedData.user}},methods:{clear:function(){this.isOpen=!1,this.isLoading=!0,this.canLoadMore=!1,this.isFetchingMore=!1,this.likes=[],this.ids=[],this.cursor=void 0},fetchLikes:function(){var t=this;axios.get("/api/v1/statuses/"+this.status.id+"/favourited_by",{params:{limit:40,_pe:1}}).then((function(e){if(t.ids=e.data.map((function(t){return t.id})),t.likes=e.data,e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?(t.cursor=s.prev.cursor,t.canLoadMore=!0):t.canLoadMore=!1}else t.canLoadMore=!1;t.isLoading=!1}))},open:function(){this.cursor&&this.clear(),this.isOpen=!0,this.fetchLikes(),this.$refs.likesModal.show()},enterIntersect:function(){var t=this;this.isFetchingMore||(this.isFetchingMore=!0,axios.get("/api/v1/statuses/"+this.status.id+"/favourited_by",{params:{limit:10,cursor:this.cursor,_pe:1}}).then((function(e){if(!e.data||!e.data.length)return t.canLoadMore=!1,void(t.isFetchingMore=!1);if(e.data.forEach((function(e){-1==t.ids.indexOf(e.id)&&(t.ids.push(e.id),t.likes.push(e))})),e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?t.cursor=s.prev.cursor:t.canLoadMore=!1}else t.canLoadMore=!1;t.isFetchingMore=!1})))},getUsername:function(t){return t.display_name?t.display_name:t.username},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},handleFollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/follow").then((function(s){e.likes[t].follows=!0,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))},handleUnfollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/unfollow").then((function(s){e.likes[t].follows=!1,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))}}}},61746:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(18634),o=s(50294),a=s(75938);const n={props:["status"],components:{"read-more":o.default,"video-player":a.default},data:function(){return{key:1,sensitive:!1}},computed:{fixedHeight:{get:function(){return 1==this.$store.state.fixedHeight}}},methods:{toggleLightbox:function(t){(0,i.default)({el:t.target})},toggleContentWarning:function(){this.key++,this.sensitive=!0,this.status.sensitive=!this.status.sensitive},getPoster:function(t){var e=t.media_attachments[0].preview_url;if(!e.endsWith("no-preview.jpg")&&!e.endsWith("no-preview.png"))return e}}}},22434:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(34719),o=s(49986);const a={props:{status:{type:Object},profile:{type:Object},useDropdownMenu:{type:Boolean,default:!1},isReblog:{type:Boolean,default:!1},reblogAccount:{type:Object}},components:{"profile-hover-card":i.default,"edit-history-modal":o.default},data:function(){return{config:window.App.config,menuLoading:!0,owner:!1,admin:!1,license:!1}},methods:{timeago:function(t){var e=App.util.format.timeAgo(t);return e.endsWith("s")||e.endsWith("m")||e.endsWith("h")?e:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}).format(new Date(t))},openMenu:function(){this.$emit("menu")},scopeIcon:function(t){switch(t){case"public":default:return"far fa-globe";case"unlisted":return"far fa-lock-open";case"private":return"far fa-lock"}},scopeTitle:function(t){switch(t){case"public":return"Visible to everyone";case"unlisted":return"Hidden from public feeds";case"private":return"Only visible to followers";default:return""}},goToPost:function(){location.pathname.split("/").pop()!=this.status.id?this.$router.push({name:"post",path:"/i/web/post/".concat(this.status.id),params:{id:this.status.id,cachedStatus:this.status,cachedProfile:this.profile}}):location.href=this.status.local?this.status.url+"?fs=1":this.status.url},goToProfileById:function(t){var e=this;this.$nextTick((function(){e.$router.push({name:"profile",path:"/i/web/profile/".concat(t),params:{id:t,cachedUser:e.profile}})}))},goToProfile:function(){var t=this;this.$nextTick((function(){t.$router.push({name:"profile",path:"/i/web/profile/".concat(t.status.account.id),params:{id:t.status.account.id,cachedProfile:t.status.account,cachedUser:t.profile}})}))},toggleContentWarning:function(){this.key++,this.sensitive=!0,this.status.sensitive=!this.status.sensitive},like:function(){event.currentTarget.blur(),this.status.favourited?this.$emit("unlike"):this.$emit("like")},toggleMenu:function(t){var e=this;setTimeout((function(){e.menuLoading=!1}),500)},closeMenu:function(t){setTimeout((function(){t.target.parentNode.firstElementChild.blur()}),100)},showLikes:function(){event.currentTarget.blur(),this.$emit("likes-modal")},showShares:function(){event.currentTarget.blur(),this.$emit("shares-modal")},showComments:function(){event.currentTarget.blur(),this.showCommentDrawer=!this.showCommentDrawer},copyLink:function(){event.currentTarget.blur(),App.util.clipboard(this.status.url)},shareToOther:function(){navigator.canShare?navigator.share({url:this.status.url}).then((function(){return console.log("Share was successful.")})).catch((function(t){return console.log("Sharing failed",t)})):swal("Not supported","Your current device does not support native sharing.","error")},counterChange:function(t){this.$emit("counter-change",t)},showCommentLikes:function(t){this.$emit("comment-likes-modal",t)},shareStatus:function(){this.$emit("share")},unshareStatus:function(){this.$emit("unshare")},handleReport:function(t){this.$emit("handle-report",t)},follow:function(){this.$emit("follow")},unfollow:function(){this.$emit("unfollow")},handleReblog:function(){var t=this;this.isReblogging=!0,this.status.reblogged?this.$emit("unshare"):this.$emit("share"),setTimeout((function(){t.isReblogging=!1}),5e3)},handleBookmark:function(){var t=this;event.currentTarget.blur(),this.isBookmarking=!0,this.$emit("bookmark"),setTimeout((function(){t.isBookmarking=!1}),5e3)},getStatusAvatar:function(){return window._sharedData.user.id==this.status.account.id?window._sharedData.user.avatar:this.status.account.avatar},openModTools:function(){this.$emit("mod-tools")},openEditModal:function(){this.$refs.editModal.open()}}}},99397:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(20243),o=s(34719);const a={props:{status:{type:Object},profile:{type:Object},admin:{type:Boolean,default:!1}},components:{"comment-drawer":i.default,"profile-hover-card":o.default},data:function(){return{key:1,menuLoading:!0,sensitive:!1,isReblogging:!1,isBookmarking:!1,owner:!1,license:!1}},computed:{hideCounts:{get:function(){return 1==this.$store.state.hideCounts}},autoloadComments:{get:function(){return 1==this.$store.state.autoloadComments}},newReactions:{get:function(){return this.$store.state.newReactions}},likesCount:function(){return this.status.favourites_count},replyCount:function(){return this.status.reply_count}},methods:{count:function(t){return App.util.format.count(t)},like:function(){event.currentTarget.blur(),this.status.favourited?this.$emit("unlike"):this.$emit("like")},showLikes:function(){event.currentTarget.blur(),this.$emit("likes-modal")},showShares:function(){event.currentTarget.blur(),this.$emit("shares-modal")},showComments:function(){event.currentTarget.blur(),this.$emit("toggle-comments")},copyLink:function(){event.currentTarget.blur(),App.util.clipboard(this.status.url)},shareToOther:function(){navigator.canShare?navigator.share({url:this.status.url}).then((function(){return console.log("Share was successful.")})).catch((function(t){return console.log("Sharing failed",t)})):swal("Not supported","Your current device does not support native sharing.","error")},counterChange:function(t){this.$emit("counter-change",t)},showCommentLikes:function(t){this.$emit("comment-likes-modal",t)},handleReblog:function(){var t=this;this.isReblogging=!0,this.status.reblogged?this.$emit("unshare"):this.$emit("share"),setTimeout((function(){t.isReblogging=!1}),5e3)},handleBookmark:function(){var t=this;event.currentTarget.blur(),this.isBookmarking=!0,this.$emit("bookmark"),setTimeout((function(){t.isBookmarking=!1}),2e3)},getStatusAvatar:function(){return window._sharedData.user.id==this.status.account.id?window._sharedData.user.avatar:this.status.account.avatar},openModTools:function(){this.$emit("mod-tools")}}}},6140:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{status:{type:Object},cursorLimit:{type:Number,default:200}},data:function(){return{preRender:void 0,fullContent:null,content:null,cursor:200}},mounted:function(){this.rewriteLinks()},methods:{readMore:function(){this.cursor=this.cursor+200,this.content=this.fullContent.substr(0,this.cursor)},rewriteLinks:function(){var t=this,e=this.status.content,s=document.createElement("div");s.innerHTML=e,s.querySelectorAll('a[class*="hashtag"]').forEach((function(t){var e=t.innerText;"#"==e.substr(0,1)&&(e=e.substr(1)),t.removeAttribute("target"),t.setAttribute("href","/i/web/hashtag/"+e)})),s.querySelectorAll('a:not(.hashtag)[class*="mention"], a:not(.hashtag)[class*="list-slug"]').forEach((function(e){var s=e.innerText;if("@"==s.substr(0,1)&&(s=s.substr(1)),0==t.status.account.local&&!s.includes("@")){var i=document.createElement("a");i.href=e.getAttribute("href"),s=s+"@"+i.hostname}e.removeAttribute("target"),e.setAttribute("href","/i/web/username/"+s)})),this.content=s.outerHTML,this.injectCustomEmoji()},injectCustomEmoji:function(){var t=this;this.status.emojis.forEach((function(e){var s=''.concat(e.shortcode,'');t.content=t.content.replace(":".concat(e.shortcode,":"),s)}))}}}},85679:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(25100),o=s(29787),a=s(24848);const n={props:{status:{type:Object},profile:{type:Object}},components:{intersect:i.default,"like-placeholder":o.default},data:function(){return{isOpen:!1,isLoading:!0,canLoadMore:!1,isFetchingMore:!1,likes:[],ids:[],cursor:void 0,isUpdatingFollowState:!1,followStateIndex:void 0,user:window._sharedData.user}},methods:{clear:function(){this.isOpen=!1,this.isLoading=!0,this.canLoadMore=!1,this.isFetchingMore=!1,this.likes=[],this.ids=[],this.cursor=void 0},fetchShares:function(){var t=this;axios.get("/api/v1/statuses/"+this.status.id+"/reblogged_by",{params:{limit:40,_pe:1}}).then((function(e){if(t.ids=e.data.map((function(t){return t.id})),t.likes=e.data,e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?(t.cursor=s.prev.cursor,t.canLoadMore=!0):t.canLoadMore=!1}else t.canLoadMore=!1;t.isLoading=!1}))},open:function(){this.cursor&&this.clear(),this.isOpen=!0,this.fetchShares(),this.$refs.sharesModal.show()},enterIntersect:function(){var t=this;this.isFetchingMore||(this.isFetchingMore=!0,axios.get("/api/v1/statuses/"+this.status.id+"/reblogged_by",{params:{limit:10,cursor:this.cursor,_pe:1}}).then((function(e){if(!e.data||!e.data.length)return t.canLoadMore=!1,void(t.isFetchingMore=!1);if(e.data.forEach((function(e){-1==t.ids.indexOf(e.id)&&(t.ids.push(e.id),t.likes.push(e))})),e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?t.cursor=s.prev.cursor:t.canLoadMore=!1}else t.canLoadMore=!1;t.isFetchingMore=!1})))},getUsername:function(t){return t.display_name?t.display_name:t.username},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},handleFollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/follow").then((function(s){e.likes[t].follows=!0,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))},handleUnfollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/unfollow").then((function(s){e.likes[t].follows=!1,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))}}}},24603:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>h});var i=s(25100),o=s(35547),a=s(58741),n=s(20591),r=s(57103),l=s(59515),c=s(99681),d=s(13090),u=s(24848);function f(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return p(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s0})),i=s.map((function(t){return t.id}));t.ids=i,t.max_id=Math.min.apply(Math,f(i)),s.forEach((function(e){t.feed.push(e)})),setTimeout((function(){t.canLoadMore=e.data.length>1,t.feedLoaded=!0}),500)}))},enterIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/statuses",{params:{limit:9,only_media:!0,max_id:this.max_id}}).then((function(e){e.data&&e.data.length||(t.canLoadMore=!1);var s=e.data.filter((function(t){return t.media_attachments.length>0})).filter((function(e){return-1==t.ids.indexOf(e.id)}));if(!s||!s.length)return t.canLoadMore=!1,void(t.isIntersecting=!1);s.forEach((function(e){e.id=1})).catch((function(e){t.canLoadMore=!1})))},toggleLayout:function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&event.currentTarget.blur(),this.layoutIndex=t,this.isIntersecting=!1},toggleTab:function(t){switch(event.currentTarget.blur(),t){case 1:this.isIntersecting=!1,this.tabIndex=1;break;case 2:this.fetchCollections();break;case 3:this.fetchFavourites();break;case"bookmarks":this.fetchBookmarks();break;case"archives":this.fetchArchives()}},fetchCollections:function(){var t=this;this.collectionsLoaded&&(this.tabIndex=2),axios.get("/api/local/profile/collections/"+this.profile.id).then((function(e){t.collections=e.data,t.collectionsLoaded=!0,t.tabIndex=2,t.collectionsPage++,t.canLoadMoreCollections=9===e.data.length}))},enterCollectionsIntersect:function(){var t=this;this.isCollectionsIntersecting||(this.isCollectionsIntersecting=!0,axios.get("/api/local/profile/collections/"+this.profile.id,{params:{limit:9,page:this.collectionsPage}}).then((function(e){var s;e.data&&e.data.length||(t.canLoadMoreCollections=!1),t.collectionsLoaded=!0,(s=t.collections).push.apply(s,f(e.data)),t.collectionsPage++,t.canLoadMoreCollections=e.data.length>0,t.isCollectionsIntersecting=!1})).catch((function(e){t.canLoadMoreCollections=!1,t.isCollectionsIntersecting=!1})))},fetchFavourites:function(){var t=this;this.tabIndex=0,axios.get("/api/pixelfed/v1/favourites").then((function(e){t.tabIndex=3,t.favourites=e.data,t.favouritesPage++,t.favouritesLoaded=!0,0!=e.data.length&&(t.canLoadMoreFavourites=!0)}))},enterFavouritesIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/pixelfed/v1/favourites",{params:{page:this.favouritesPage}}).then((function(e){var s;(s=t.favourites).push.apply(s,f(e.data)),t.favouritesPage++,t.canLoadMoreFavourites=0!=e.data.length,t.isIntersecting=!1})).catch((function(e){t.canLoadMoreFavourites=!1})))},fetchBookmarks:function(){var t=this;this.tabIndex=0,axios.get("/api/v1/bookmarks",{params:{_pe:1}}).then((function(e){if(t.tabIndex="bookmarks",t.bookmarks=e.data,e.headers&&e.headers.link){var s=(0,u.parseLinkHeader)(e.headers.link);s.next?(t.bookmarksPage=s.next.cursor,t.canLoadMoreBookmarks=!0):t.canLoadMoreBookmarks=!1}t.bookmarksLoaded=!0}))},enterBookmarksIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/v1/bookmarks",{params:{_pe:1,cursor:this.bookmarksPage}}).then((function(e){var s;if((s=t.bookmarks).push.apply(s,f(e.data)),e.headers&&e.headers.link){var i=(0,u.parseLinkHeader)(e.headers.link);i.next?(t.bookmarksPage=i.next.cursor,t.canLoadMoreBookmarks=!0):t.canLoadMoreBookmarks=!1}t.isIntersecting=!1})).catch((function(e){t.canLoadMoreBookmarks=!1})))},fetchArchives:function(){var t=this;this.tabIndex=0,axios.get("/api/pixelfed/v2/statuses/archives").then((function(e){t.tabIndex="archives",t.archives=e.data,t.archivesPage++,t.archivesLoaded=!0,0!=e.data.length&&(t.canLoadMoreArchives=!0)}))},formatCount:function(t){return App.util.format.count(t)},statusUrl:function(t){return"/i/web/post/"+t.id},previewUrl:function(t){return t.sensitive?"/storage/no-preview.png?v="+(new Date).getTime():t.media_attachments[0].url},timeago:function(t){return App.util.format.timeAgo(t)},likeStatus:function(t){var e=this,s=this.feed[t],i=(s.favourited,s.favourites_count);this.feed[t].favourites_count=i+1,this.feed[t].favourited=!s.favourited,axios.post("/api/v1/statuses/"+s.id+"/favourite").catch((function(s){e.feed[t].favourites_count=i,e.feed[t].favourited=!1}))},unlikeStatus:function(t){var e=this,s=this.feed[t],i=(s.favourited,s.favourites_count);this.feed[t].favourites_count=i-1,this.feed[t].favourited=!s.favourited,axios.post("/api/v1/statuses/"+s.id+"/unfavourite").catch((function(s){e.feed[t].favourites_count=i,e.feed[t].favourited=!1}))},openContextMenu:function(t){var e=this;switch(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"feed"){case"feed":this.postIndex=t,this.contextMenuPost=this.feed[t];break;case"archive":this.postIndex=t,this.contextMenuPost=this.archives[t]}this.showMenu=!0,this.$nextTick((function(){e.$refs.contextMenu.open()}))},openLikesModal:function(t){var e=this;this.postIndex=t,this.likesModalPost=this.feed[this.postIndex],this.showLikesModal=!0,this.$nextTick((function(){e.$refs.likesModal.open()}))},openSharesModal:function(t){var e=this;this.postIndex=t,this.sharesModalPost=this.feed[this.postIndex],this.showSharesModal=!0,this.$nextTick((function(){e.$refs.sharesModal.open()}))},commitModeration:function(t){var e=this.postIndex;switch(t){case"addcw":this.feed[e].sensitive=!0;break;case"remcw":this.feed[e].sensitive=!1;break;case"unlist":this.feed.splice(e,1);break;case"spammer":var s=this.feed[e].account.id;this.feed=this.feed.filter((function(t){return t.account.id!=s}))}},counterChange:function(t,e){switch(e){case"comment-increment":this.feed[t].reply_count=this.feed[t].reply_count+1;break;case"comment-decrement":this.feed[t].reply_count=this.feed[t].reply_count-1}},openCommentLikesModal:function(t){var e=this;this.likesModalPost=t,this.showLikesModal=!0,this.$nextTick((function(){e.$refs.likesModal.open()}))},shareStatus:function(t){var e=this,s=this.feed[t],i=(s.reblogged,s.reblogs_count);this.feed[t].reblogs_count=i+1,this.feed[t].reblogged=!s.reblogged,axios.post("/api/v1/statuses/"+s.id+"/reblog").catch((function(s){e.feed[t].reblogs_count=i,e.feed[t].reblogged=!1}))},unshareStatus:function(t){var e=this,s=this.feed[t],i=(s.reblogged,s.reblogs_count);this.feed[t].reblogs_count=i-1,this.feed[t].reblogged=!s.reblogged,axios.post("/api/v1/statuses/"+s.id+"/unreblog").catch((function(s){e.feed[t].reblogs_count=i,e.feed[t].reblogged=!1}))},handleReport:function(t){var e=this;this.reportedStatusId=t.id,this.$nextTick((function(){e.reportedStatus=t,e.$refs.reportModal.open()}))},deletePost:function(){this.feed.splice(this.postIndex,1)},handleArchived:function(t){this.feed.splice(this.postIndex,1)},handleUnarchived:function(t){this.feed=[],this.fetchFeed()},enterArchivesIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/pixelfed/v2/statuses/archives",{params:{page:this.archivesPage}}).then((function(e){var s;(s=t.archives).push.apply(s,f(e.data)),t.archivesPage++,t.canLoadMoreArchives=0!=e.data.length,t.isIntersecting=!1})).catch((function(e){t.canLoadMoreArchives=!1})))},handleBookmark:function(t){var e=this;if(window.confirm("Are you sure you want to unbookmark this post?")){var s=this.bookmarks[t];axios.post("/i/bookmark",{item:s.id}).then((function(i){e.bookmarks=e.bookmarks.map((function(t){return t.id==s.id&&(t.bookmarked=!1,delete t.bookmarked_at),t})),e.bookmarks.splice(t,1)})).catch((function(t){e.$bvToast.toast("Cannot bookmark post at this time.",{title:"Bookmark Error",variant:"danger",autoHideDelay:5e3})}))}}}}},19306:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>p});var i=s(25100),o=s(29787),a=s(34719),n=s(95353),r=s(24848);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s)?/g,(function(t){var s=t.slice(1,t.length-1),i=e.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):t}))}return s},goToProfile:function(t){this.$router.push({path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},goBack:function(){this.$emit("back")},setCacheWarmTimeout:function(){var t=this;if(this.cacheWarmInterations>=5)return this.isWarmingCache=!1,void swal("Oops","Its taking longer than expected to collect this account followers. Please try again later","error");this.cacheWarmTimeout=setTimeout((function(){t.cacheWarmInterations++,t.fetchFollowers()}),45e3)}}}},79654:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>p});var i=s(25100),o=s(29787),a=s(34719),n=s(95353),r=s(24848);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s)?/g,(function(t){var s=t.slice(1,t.length-1),i=e.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):t}))}return s},goToProfile:function(t){this.$router.push({path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},goBack:function(){this.$emit("back")},setCacheWarmTimeout:function(){var t=this;if(this.cacheWarmInterations>=5)return this.isWarmingCache=!1,void swal("Oops","Its taking longer than expected to collect following accounts. Please try again later","error");this.cacheWarmTimeout=setTimeout((function(){t.cacheWarmInterations++,t.fetchFollowers()}),45e3)}}}},3223:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>l});var i=s(50294),o=s(95353);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function r(t,e,s){var i;return i=function(t,e){if("object"!=a(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var i=s.call(t,e||"default");if("object"!=a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==a(i)?i:String(i))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}const l={props:{profile:{type:Object}},components:{ReadMore:i.default},data:function(){return{user:window._sharedData.user,bio:void 0,isLoading:!1,relationship:void 0}},mounted:function(){var t=this;this.rewriteLinks(),this.relationship=this.$store.getters.getRelationship(this.profile.id),this.relationship||this.profile.id==this.user.id||axios.get("/api/pixelfed/v1/accounts/relationships",{params:{"id[]":this.profile.id}}).then((function(e){t.relationship=e.data[0],t.$store.commit("updateRelationship",e.data)}))},computed:function(t){for(var e=1;e)?/g,(function(e){var s=e.slice(1,e.length-1),i=t.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):e}))}return s},getUsername:function(){return this.profile.acct},formatCount:function(t){return App.util.format.count(t)},goToProfile:function(){this.$router.push({name:"profile",path:"/i/web/profile/".concat(this.profile.id),params:{id:this.profile.id,cachedProfile:this.profile,cachedUser:this.user}})},rewriteLinks:function(){var t=this,e=this.profile.note,s=document.createElement("div");s.innerHTML=e,s.querySelectorAll('a[class*="hashtag"]').forEach((function(t){var e=t.innerText;"#"==e.substr(0,1)&&(e=e.substr(1)),t.removeAttribute("target"),t.setAttribute("href","/i/web/hashtag/"+e)})),s.querySelectorAll('a:not(.hashtag)[class*="mention"], a:not(.hashtag)[class*="list-slug"]').forEach((function(e){var s=e.innerText;if("@"==s.substr(0,1)&&(s=s.substr(1)),0==t.profile.local&&!s.includes("@")){var i=document.createElement("a");i.href=t.profile.url,s=s+"@"+i.hostname}e.removeAttribute("target"),e.setAttribute("href","/i/web/username/"+s)})),this.bio=s.outerHTML},performFollow:function(){var t=this;this.isLoading=!0,this.$emit("follow"),setTimeout((function(){t.relationship.following=!0,t.isLoading=!1}),1e3)},performUnfollow:function(){var t=this;this.isLoading=!0,this.$emit("unfollow"),setTimeout((function(){t.relationship.following=!1,t.isLoading=!1}),1e3)}}}},82683:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(95353);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function n(t,e,s){var i;return i=function(t,e){if("object"!=o(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var i=s.call(t,e||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==o(i)?i:String(i))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}const r={props:{profile:{type:Object},relationship:{type:Object,default:function(){return{following:!1,followed_by:!1}}},user:{type:Object}},computed:function(t){for(var e=1;e)?/g,(function(e){var s=e.slice(1,e.length-1),i=t.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):e}))}return s},truncate:function(t){if(t)return t.length>15?t.slice(0,15)+"...":t},formatCount:function(t){return App.util.format.count(t)},goBack:function(){this.$emit("back")},showFullBio:function(){this.$refs.fullBio.show()},toggleTab:function(t){event.currentTarget.blur(),["followers","following"].includes(t)?this.$router.push("/i/web/profile/"+this.profile.id+"/"+t):this.$emit("toggletab",t)},getJoinedDate:function(){var t=new Date(this.profile.created_at),e=new Intl.DateTimeFormat("en-US",{month:"long"}).format(t),s=t.getFullYear();return"".concat(e," ").concat(s)},follow:function(){event.currentTarget.blur(),this.$emit("follow")},unfollow:function(){event.currentTarget.blur(),this.$emit("unfollow")},setBio:function(){var t=this;if(this.profile.note.length)if(this.profile.local){var e=this.profile.hasOwnProperty("note_text")?this.profile.note_text:this.profile.note.replace(/(<([^>]+)>)/gi,"");this.renderedBio=window.pftxt.autoLink(e,{usernameUrlBase:"/i/web/profile/@",hashtagUrlBase:"/i/web/hashtag/"})}else{if("

"===this.profile.note)return void(this.renderedBio=null);var s=this.profile.note,i=document.createElement("div");i.innerHTML=s,i.querySelectorAll('a[class*="hashtag"]').forEach((function(t){var e=t.innerText;"#"==e.substr(0,1)&&(e=e.substr(1)),t.removeAttribute("target"),t.setAttribute("href","/i/web/hashtag/"+e)})),i.querySelectorAll('a:not(.hashtag)[class*="mention"], a:not(.hashtag)[class*="list-slug"]').forEach((function(e){var s=e.innerText;if("@"==s.substr(0,1)&&(s=s.substr(1)),0==t.profile.local&&!s.includes("@")){var i=document.createElement("a");i.href=t.profile.url,s=s+"@"+i.hostname}e.removeAttribute("target"),e.setAttribute("href","/i/web/username/"+s)})),this.renderedBio=i.outerHTML}},getAvatar:function(){return this.profile.id==this.user.id?window._sharedData.user.avatar:this.profile.avatar},copyTextToClipboard:function(t){App.util.clipboard(t)},goToOldProfile:function(){this.profile.local?location.href=this.profile.url+"?fs=1":location.href="/i/web/profile/_/"+this.profile.id},handleMute:function(){var t=this,e=this.relationship.muting?"unmuted":"muted",s=1==this.relationship.muting?"/i/unmute":"/i/mute";axios.post(s,{type:"user",item:this.profile.id}).then((function(s){t.$emit("updateRelationship",s.data),swal("Success","You have successfully "+e+" "+t.profile.acct,"success")})).catch((function(t){var e;422===t.response.status?swal({title:"Error",text:null===(e=t.response)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.error,icon:"error",buttons:{review:{text:"Review muted accounts",value:"review",className:"btn-primary"},cancel:!0}}).then((function(t){t&&"review"==t&&(location.href="/settings/privacy/muted-users")})):swal("Error","Something went wrong. Please try again later.","error")}))},handleBlock:function(){var t=this,e=this.relationship.blocking?"unblock":"block",s=1==this.relationship.blocking?"/i/unblock":"/i/block";axios.post(s,{type:"user",item:this.profile.id}).then((function(s){t.$emit("updateRelationship",s.data),swal("Success","You have successfully "+e+"ed "+t.profile.acct,"success")})).catch((function(t){var e;422===t.response.status?swal({title:"Error",text:null===(e=t.response)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.error,icon:"error",buttons:{review:{text:"Review blocked accounts",value:"review",className:"btn-primary"},cancel:!0}}).then((function(t){t&&"review"==t&&(location.href="/settings/privacy/blocked-users")})):swal("Error","Something went wrong. Please try again later.","error")}))},cancelFollowRequest:function(){window.confirm("Are you sure you want to cancel your follow request?")&&(event.currentTarget.blur(),this.$emit("unfollow"))}}}},68910:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(64945),o=(s(34076),s(34330)),a=s.n(o),n=(s(10706),s(71241));const r={props:["status","fixedHeight"],data:function(){return{shouldPlay:!1,hasHls:void 0,hlsConfig:window.App.config.features.hls,liveSyncDurationCount:7,isHlsSupported:!1,isP2PSupported:!1,engine:void 0}},mounted:function(){var t=this;this.$nextTick((function(){t.init()}))},methods:{handleShouldPlay:function(){var t=this;this.shouldPlay=!0,this.isHlsSupported=this.hlsConfig.enabled&&i.default.isSupported(),this.isP2PSupported=this.hlsConfig.enabled&&this.hlsConfig.p2p&&n.Engine.isSupported(),this.$nextTick((function(){t.init()}))},init:function(){var t,e=this;!this.status.sensitive&&null!==(t=this.status.media_attachments[0])&&void 0!==t&&t.hls_manifest&&this.isHlsSupported?(this.hasHls=!0,this.$nextTick((function(){e.initHls()}))):this.hasHls=!1},initHls:function(){var t;if(this.isP2PSupported){var e={loader:{trackerAnnounce:[this.hlsConfig.tracker],rtcConfig:{iceServers:[{urls:[this.hlsConfig.ice]}]}}},s=new n.Engine(e);this.hlsConfig.p2p_debug&&(s.on("peer_connect",(function(t){return console.log("peer_connect",t.id,t.remoteAddress)})),s.on("peer_close",(function(t){return console.log("peer_close",t)})),s.on("segment_loaded",(function(t,e){return console.log("segment_loaded from",e?"peer ".concat(e):"HTTP",t.url)}))),t=s.createLoaderClass()}else t=i.default.DefaultConfig.loader;var o=this.$refs.video,r=this.status.media_attachments[0].hls_manifest,l=(new(a())(o,{captions:{active:!0,update:!0}}),new i.default({liveSyncDurationCount:this.liveSyncDurationCount,loader:t})),c=this;(0,n.initHlsJsPlayer)(l),l.loadSource(r),l.attachMedia(o),l.on(i.default.Events.MANIFEST_PARSED,(function(t,e){this.hlsConfig.debug&&(console.log(t),console.log(e));var s={},n=l.levels.map((function(t){return t.height}));this.hlsConfig.debug&&console.log(n),n.unshift(0),s.quality={default:0,options:n,forced:!0,onChange:function(t){return c.updateQuality(t)}},s.i18n={qualityLabel:{0:"Auto"}},l.on(i.default.Events.LEVEL_SWITCHED,(function(t,e){var s=document.querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span");l.autoLevelEnabled?s.innerHTML="Auto (".concat(l.levels[e.level].height,"p)"):s.innerHTML="Auto"}));new(a())(o,s)}))},updateQuality:function(t){var e=this;0===t?window.hls.currentLevel=-1:window.hls.levels.forEach((function(s,i){s.height===t&&(e.hlsConfig.debug&&console.log("Found quality match with "+t),window.hls.currentLevel=i)}))},getPoster:function(t){var e=t.media_attachments[0].preview_url;if(!e.endsWith("no-preview.jpg")&&!e.endsWith("no-preview.png"))return e}}}},59300:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-timeline-component"},[t.isLoaded?e("div",{staticClass:"container-fluid mt-3"},[t.profile&&t.profile.hasOwnProperty("moved")&&t.profile.moved.hasOwnProperty("id")&&!t.showMoved?e("div",[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-6"},[t._m(0),t._v(" "),e("div",{staticClass:"card shadow-none border",staticStyle:{"border-radius":"20px"}},[e("div",{staticClass:"card-body ft-std"},[e("div",{staticClass:"d-flex justify-content-between align-items-center",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex align-items-center flex-shrink-1",staticStyle:{gap:"1rem"}},[e("img",{staticClass:"rounded-circle",attrs:{src:t.profile.moved.avatar,width:"50",height:"50"}}),t._v(" "),e("p",{staticClass:"h3 font-weight-light mb-0 text-break"},[t._v("@"+t._s(t.profile.moved.acct))])]),t._v(" "),e("div",{staticClass:"d-flex flex-grow-1 justify-content-end",staticStyle:{"min-width":"200px"}},[e("router-link",{staticClass:"btn btn-outline-primary rounded-pill font-weight-bold",attrs:{to:"/i/web/profile/".concat(t.profile.moved.id)}},[t._v("View New Account")])],1)])])]),t._v(" "),e("hr"),t._v(" "),e("p",{staticClass:"lead text-center ft-std"},[e("a",{staticClass:"btn btn-primary btn-lg rounded-pill font-weight-bold px-5",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showMoved=!0}}},[t._v("Proceed")])])])])]):e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-3 d-md-block px-md-3 px-xl-5"},[e("profile-sidebar",{attrs:{profile:t.profile,relationship:t.relationship,user:t.curUser},on:{back:t.goBack,toggletab:t.toggleTab,updateRelationship:t.updateRelationship,follow:t.follow,unfollow:t.unfollow}})],1),t._v(" "),e("div",{staticClass:"col-md-8 px-md-5"},[e(t.getTabComponentName(),{key:t.getTabComponentName()+t.profile.id,tag:"component",attrs:{profile:t.profile,relationship:t.relationship}})],1)]),t._v(" "),e("drawer")],1):t._e()])},o=[function(){var t=this._self._c;return t("div",{staticClass:"card shadow-none border card-body mt-5 mb-3 ft-std",staticStyle:{"border-radius":"20px"}},[t("p",{staticClass:"lead font-weight-bold text-center mb-0"},[t("i",{staticClass:"far fa-exclamation-triangle mr-2"}),this._v("This account has indicated their new account is:")])])}]},98221:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this;return(0,t._self._c)("canvas",{ref:"canvas",attrs:{width:t.parseNumber(t.width),height:t.parseNumber(t.height)}})},o=[]},24853:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){this._self._c;return this._m(0)},o=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"ph-item border-0 shadow-sm",staticStyle:{"border-radius":"15px","margin-bottom":"1rem"}},[e("div",{staticClass:"ph-col-12"},[e("div",{staticClass:"ph-row align-items-center"},[e("div",{staticClass:"ph-avatar mr-3 d-flex",staticStyle:{width:"50px",height:"60px","border-radius":"15px"}}),t._v(" "),e("div",{staticClass:"ph-col-6 big"})]),t._v(" "),e("div",{staticClass:"empty"}),t._v(" "),e("div",{staticClass:"empty"}),t._v(" "),e("div",{staticClass:"ph-picture"}),t._v(" "),e("div",{staticClass:"ph-row"},[e("div",{staticClass:"ph-col-12 empty"}),t._v(" "),e("div",{staticClass:"ph-col-12 big"}),t._v(" "),e("div",{staticClass:"ph-col-12 empty"}),t._v(" "),e("div",{staticClass:"ph-col-12"})])])])}]},70201:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"timeline-status-component"},[e("div",{staticClass:"card shadow-sm",staticStyle:{"border-radius":"15px"}},[e("post-header",{attrs:{profile:t.profile,status:t.shadowStatus,"is-reblog":t.isReblog,"reblog-account":t.reblogAccount},on:{menu:t.openMenu,follow:t.follow,unfollow:t.unfollow}}),t._v(" "),e("post-content",{attrs:{profile:t.profile,status:t.shadowStatus}}),t._v(" "),t.reactionBar?e("post-reactions",{attrs:{status:t.shadowStatus,profile:t.profile,admin:t.admin},on:{like:t.like,unlike:t.unlike,share:t.shareStatus,unshare:t.unshareStatus,"likes-modal":t.showLikes,"shares-modal":t.showShares,"toggle-comments":t.showComments,bookmark:t.handleBookmark,"mod-tools":t.openModTools}}):t._e(),t._v(" "),t.showCommentDrawer?e("div",{staticClass:"card-footer rounded-bottom border-0",staticStyle:{background:"rgba(0,0,0,0.02)","z-index":"3"}},[e("comment-drawer",{attrs:{status:t.shadowStatus,profile:t.profile},on:{"handle-report":t.handleReport,"counter-change":t.counterChange,"show-likes":t.showCommentLikes,follow:t.follow,unfollow:t.unfollow}})],1):t._e()],1)])},o=[]},69831:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-drawer-component"},[e("div",{staticClass:"mobile-footer-spacer d-block d-sm-none mt-5"}),t._v(" "),e("div",{staticClass:"mobile-footer d-block d-sm-none fixed-bottom"},[e("div",{staticClass:"card card-body rounded-0 px-0 pt-2 pb-3 box-shadow",staticStyle:{"border-top":"1px solid var(--border-color)"}},[e("ul",{staticClass:"nav nav-pills nav-fill d-flex align-items-middle"},[e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web"}},[e("p",[e("i",{staticClass:"far fa-home fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Home")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/timeline/local"}},[e("p",[e("i",{staticClass:"far fa-stream fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Local")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/compose"}},[e("p",[e("i",{staticClass:"far fa-plus-circle fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("New")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/notifications"}},[e("p",[e("i",{staticClass:"far fa-bell fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Alerts")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/profile/"+t.user.id}},[e("p",[e("i",{staticClass:"far fa-user fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Profile")])])])],1)])])])])},o=[]},82960:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("b-modal",{ref:"modal",attrs:{centered:"","hide-header":"","hide-footer":"",scrollable:"","body-class":"p-md-5 user-select-none"}},[0===t.tabIndex?e("div",[e("h2",{staticClass:"text-center font-weight-bold"},[t._v(t._s(t.$t("report.report")))]),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.$t("menu.confirmReportText")))]),t._v(" "),t.status&&t.status.hasOwnProperty("account")?e("div",{staticClass:"card shadow-none rounded-lg border my-4"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 rounded",staticStyle:{"border-radius":"8px"},attrs:{src:t.status.account.avatar,width:"40",height:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"h5 primary font-weight-bold mb-1"},[t._v("\n\t\t\t\t\t\t\t@"+t._s(t.status.account.acct)+"\n\t\t\t\t\t\t")]),t._v(" "),t.status.hasOwnProperty("pf_type")&&"text"==t.status.pf_type?e("div",[t.status.content_text.length<=140?e("p",{staticClass:"mb-0"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.status.content_text)+"\n\t\t\t\t\t\t\t")]):e("p",{staticClass:"mb-0"},[t.showFull?e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text)+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!1}}},[t._v("Show less")])]):e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text.substr(0,140)+" ...")+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!0}}},[t._v("Show full post")])])])]):t.status.hasOwnProperty("pf_type")&&"photo"==t.status.pf_type?e("div",[e("div",{staticClass:"w-100 rounded-lg d-flex justify-content-center mt-3",staticStyle:{background:"#000","max-height":"150px"}},[e("img",{staticClass:"rounded-lg shadow",staticStyle:{width:"100%","max-height":"150px","object-fit":"contain"},attrs:{src:t.status.media_attachments[0].url}})]),t._v(" "),t.status.content_text?e("p",{staticClass:"mt-3 mb-0"},[t.showFull?e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text)+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!1}}},[t._v("Show less")])]):e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text.substr(0,80)+" ...")+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!0}}},[t._v("Show full post")])])]):t._e()]):t._e()])])])]):t._e(),t._v(" "),e("p",{staticClass:"text-right mb-0 mb-md-n3"},[e("button",{staticClass:"btn btn-light px-3 py-2 mr-3 font-weight-bold",on:{click:t.close}},[t._v(t._s(t.$t("common.cancel")))]),t._v(" "),e("button",{staticClass:"btn btn-primary px-3 py-2 font-weight-bold",staticStyle:{"background-color":"#3B82F6"},on:{click:function(e){t.tabIndex=1}}},[t._v(t._s(t.$t("common.proceed")))])])]):1===t.tabIndex?e("div",[e("h2",{staticClass:"text-center font-weight-bold"},[t._v(t._s(t.$t("report.report")))]),t._v(" "),e("p",{staticClass:"text-center"},[t._v("\n\t\t\t"+t._s(t.$t("report.selectReason"))+"\n\t\t")]),t._v(" "),e("div",{staticClass:"mt-4"},[e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold text-danger",on:{click:function(e){return t.handleReason("spam")}}},[t._v(t._s(t.$t("menu.spam")))]),t._v(" "),0==t.status.sensitive?e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold text-danger",on:{click:function(e){return t.handleReason("sensitive")}}},[t._v("Adult or "+t._s(t.$t("menu.sensitive")))]):t._e(),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold text-danger",on:{click:function(e){return t.handleReason("abusive")}}},[t._v(t._s(t.$t("menu.abusive")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold",on:{click:function(e){return t.handleReason("underage")}}},[t._v(t._s(t.$t("menu.underageAccount")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold",on:{click:function(e){return t.handleReason("copyright")}}},[t._v(t._s(t.$t("menu.copyrightInfringement")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold",on:{click:function(e){return t.handleReason("impersonation")}}},[t._v(t._s(t.$t("menu.impersonation")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill mt-md-5",on:{click:function(e){t.tabIndex=0}}},[t._v("Go back")])])]):2===t.tabIndex?e("div",[e("div",{staticClass:"my-4 text-center"},[e("b-spinner"),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v(t._s(t.$t("report.sendingReport"))+" ...")])],1)]):3===t.tabIndex?e("div",[e("div",{staticClass:"my-4"},[e("h2",{staticClass:"text-center font-weight-bold mb-3"},[t._v(t._s(t.$t("report.reported")))]),t._v(" "),e("p",{staticClass:"text-center py-2"},[e("span",{staticClass:"fa-stack fa-4x text-success"},[e("i",{staticClass:"far fa-check fa-stack-1x"}),t._v(" "),e("i",{staticClass:"fal fa-circle fa-stack-2x"})])]),t._v(" "),e("p",{staticClass:"lead text-center"},[t._v(t._s(t.$t("report.thanksMsg")))]),t._v(" "),e("hr"),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.$t("report.contactAdminMsg"))+", "),e("a",{staticClass:"font-weight-bold primary",attrs:{href:"/site/contact"}},[t._v(t._s(t.$t("common.clickHere")))]),t._v(".")])]),t._v(" "),e("p",{staticClass:"text-center mb-0 mb-md-n3"},[e("button",{staticClass:"btn btn-light btn-block rounded-pill px-3 py-2 mr-3 font-weight-bold",on:{click:t.close}},[t._v(t._s(t.$t("common.close")))])])]):5===t.tabIndex?e("div",[e("div",{staticClass:"my-4"},[e("h2",{staticClass:"text-center font-weight-bold mb-3"},[t._v(t._s(t.$t("common.oops")))]),t._v(" "),e("p",{staticClass:"text-center py-2"},[e("span",{staticClass:"fa-stack fa-3x text-danger"},[e("i",{staticClass:"far fa-times fa-stack-1x"}),t._v(" "),e("i",{staticClass:"fal fa-circle fa-stack-2x"})])]),t._v(" "),e("p",{staticClass:"lead text-center"},[t._v(t._s(t.$t("common.errorMsg")))]),t._v(" "),e("hr"),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.$t("report.contactAdminMsg"))+", "),e("a",{staticClass:"font-weight-bold primary",attrs:{href:"/site/contact"}},[t._v(t._s(t.$t("common.clickHere")))]),t._v(".")])]),t._v(" "),e("p",{staticClass:"text-center mb-0 mb-md-n3"},[e("button",{staticClass:"btn btn-light btn-block rounded-pill px-3 py-2 mr-3 font-weight-bold",on:{click:t.close}},[t._v(t._s(t.$t("common.close")))])])]):t._e()])},o=[]},55318:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"post-comment-drawer"},[e("input",{ref:"fileInput",staticClass:"d-none",attrs:{type:"file",accept:"image/jpeg,image/png"},on:{change:t.handleImageUpload}}),t._v(" "),e("div",{staticClass:"post-comment-drawer-feed"},[t.feed.length&&t.feed.length>=1?e("div",{staticClass:"mb-2 sort-menu"},[e("b-dropdown",{ref:"sortMenu",attrs:{size:"sm",variant:"link","toggle-class":"text-decoration-none text-dark font-weight-bold","no-caret":""},scopedSlots:t._u([{key:"button-content",fn:function(){return[t._v("\n\t\t\t\t\t\tShow "+t._s(t.sorts[t.sortIndex])+" comments "),e("i",{staticClass:"far fa-chevron-down ml-1"})]},proxy:!0}],null,!1,1870013648)},[t._v(" "),e("b-dropdown-item",{class:{active:0===t.sortIndex},attrs:{href:"#"},on:{click:function(e){return t.toggleSort(0)}}},[e("p",{staticClass:"title mb-0"},[t._v("All")]),t._v(" "),e("p",{staticClass:"description"},[t._v("All comments in chronological order")])]),t._v(" "),e("b-dropdown-item",{class:{active:1===t.sortIndex},attrs:{href:"#"},on:{click:function(e){return t.toggleSort(1)}}},[e("p",{staticClass:"title mb-0"},[t._v("Newest")]),t._v(" "),e("p",{staticClass:"description"},[t._v("Newest comments appear first")])]),t._v(" "),e("b-dropdown-item",{class:{active:2===t.sortIndex},attrs:{href:"#"},on:{click:function(e){return t.toggleSort(2)}}},[e("p",{staticClass:"title mb-0"},[t._v("Popular")]),t._v(" "),e("p",{staticClass:"description"},[t._v("The most relevant comments appear first")])])],1)],1):t._e(),t._v(" "),t.feedLoading?e("div",{staticClass:"post-comment-drawer-feed-loader"},[e("b-spinner")],1):e("div",[e("transition-group",{attrs:{tag:"div","enter-active-class":"animate__animated animate__fadeIn","leave-active-class":"animate__animated animate__fadeOut",mode:"out-in"}},t._l(t.feed,(function(s,i){return e("div",{key:"cd:"+s.id+":"+i,staticClass:"media media-status align-items-top mb-3",style:{opacity:t.deletingIndex&&t.deletingIndex===i?.3:1}},[e("a",{attrs:{href:"#l"}},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:t.getPostAvatar(s),width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("div",{staticClass:"media-body-wrapper"},[s.media_attachments.length?e("div",[e("div",{class:[s.content&&s.content.length||s.media_attachments.length?"media-body-comment":""]},[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n \t\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n \t\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s.sensitive?e("div",{staticClass:"bh-comment",on:{click:function(t){s.sensitive=!1}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash}}),t._v(" "),e("div",{staticClass:"sensitive-warning"},[e("p",{staticClass:"mb-0"},[e("i",{staticClass:"far fa-eye-slash fa-lg"})]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("Tap to view")])])],1):t._e(),t._v(" "),e("read-more",{staticClass:"mb-1",attrs:{status:s}}),t._v(" "),s.sensitive?t._e():e("div",{staticClass:"bh-comment",class:[s.media_attachments.length>1?"bh-comment-borderless":""],style:{"max-width":s.media_attachments.length>1?"100% !important":"160px","max-height":s.media_attachments.length>1?"100% !important":"260px"}},["image"==s.media_attachments[0].type?e("div",[1==s.media_attachments.length?e("div",[e("div",{on:{click:function(e){return t.lightbox(s)}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash,src:t.getMediaSource(s)}})],1)]):e("div",{staticStyle:{display:"grid","grid-auto-flow":"column",gap:"1px","grid-template-rows":"[row1-start] 50% [row1-end row2-start] 50% [row2-end]","grid-template-columns":"[column1-start] 50% [column1-end column2-start] 50% [column2-end]","border-radius":"8px"}},t._l(s.media_attachments.slice(0,4),(function(i,o){return e("div",{on:{click:function(e){return t.lightbox(s,o)}}},[e("blur-hash-image",{staticClass:"img-fluid shadow",attrs:{width:30,height:30,punch:1,hash:s.media_attachments[o].blurhash,src:t.getMediaSource(s,o)}})],1)})),0)]):e("div",[e("div",{staticClass:"cursor-pointer",on:{click:function(e){return t.lightbox(s)}}},[e("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{position:"relative"}},[e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{position:"absolute",width:"40px",height:"40px","background-color":"rgba(0, 0, 0, 0.5)","border-radius":"40px"}},[e("i",{staticClass:"far fa-play pl-1 text-white fa-lg"})]),t._v(" "),e("video",{staticClass:"img-fluid",staticStyle:{"max-height":"200px"},attrs:{src:s.media_attachments[0].url}})])])]),t._v(" "),s.favourites_count&&!t.hideCounts?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()])],1)]):e("div",{staticClass:"media-body-comment"},[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url,id:"acpop_"+s.id,tabindex:"0"},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("b-popover",{attrs:{target:"acpop_"+s.id,triggers:"hover",placement:"bottom","custom-class":"shadow border-0 rounded-px",delay:750}},[e("profile-hover-card",{attrs:{profile:s.account},on:{follow:function(e){return t.follow(i)},unfollow:function(e){return t.unfollow(i)}}})],1)],1),t._v(" "),s.sensitive?e("span",[e("p",{staticClass:"mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(t.$t("common.sensitiveContentWarning"))+"\n\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("a",{staticClass:"small font-weight-bold primary",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.sensitive=!1}}},[t._v("Show")])]):e("read-more",{attrs:{status:s}}),t._v(" "),s.favourites_count&&!t.hideCounts?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()],1)]),t._v(" "),e("p",{staticClass:"media-body-reactions"},[e("button",{staticClass:"btn btn-link font-weight-bold btn-sm p-0",class:[s.favourited?"primary":"text-muted"],on:{click:function(e){return t.likeComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.favourited?"Liked":"Like")+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),"public"!=s.visibility?[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),"unlisted"===s.visibility?e("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip:hover.bottom",arg:"hover",modifiers:{bottom:!0}}],staticClass:"text-lighter",attrs:{title:"This post is unlisted on timelines"}},[e("i",{staticClass:"far fa-unlock fa-sm"})]):"private"===s.visibility?e("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip:hover.bottom",arg:"hover",modifiers:{bottom:!0}}],staticClass:"text-muted",attrs:{title:"This post is only visible to followers of this account"}},[e("i",{staticClass:"far fa-lock fa-sm"})]):t._e()]:t._e(),t._v(" "),e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.toggleCommentReply(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\tReply\n\t\t\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),t._o(e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToPost(s)}}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t\t\t")]),0,"cd:"+s.id+":"+i),t._v(" "),t.profile&&s.account.id===t.profile.id||t.status.account.id===t.profile.id?e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold",class:[t.deletingIndex&&t.deletingIndex===i?"text-danger":"text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.deleteComment(i)}}},[t._v("\n "+t._s(t.deletingIndex&&t.deletingIndex===i?"Deleting...":"Delete")+"\n\t\t\t\t\t\t\t\t\t")])]):e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.reportComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\tReport\n\t\t\t\t\t\t\t\t\t")])])],2),t._v(" "),s.reply_count?[s.replies.replies_show||t.commentReplyIndex===i?e("div",{staticClass:"media-body-show-replies"},[e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.hideCommentReplies(i)}}},[e("i",{staticClass:"media-body-show-replies-icon"}),t._v(" "),e("span",{staticClass:"media-body-show-replies-label"},[t._v("Hide "+t._s(t.prettyCount(s.reply_count))+" replies")])])]):e("div",{staticClass:"media-body-show-replies"},[e("a",{staticClass:"font-weight-bold primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showCommentReplies(i)}}},[e("i",{staticClass:"media-body-show-replies-icon"}),t._v(" "),e("span",{staticClass:"media-body-show-replies-label"},[t._v("Show "+t._s(t.prettyCount(s.reply_count))+" replies")])])])]:t._e(),t._v(" "),t.feed[i].replies_show?e("comment-replies",{key:"cmr-".concat(s.id,"-").concat(t.feed[i].reply_count),staticClass:"mt-3",attrs:{status:s,feed:t.feed[i].replies},on:{"counter-change":function(e){return t.replyCounterChange(i,e)}}}):t._e(),t._v(" "),1==s.replies_show&&t.commentReplyIndex==i&&t.feed[i].reply_count>3?e("div",[e("div",{staticClass:"media-body-show-replies mt-n3"},[e("a",{staticClass:"font-weight-bold text-dark",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goToPost(s)}}},[e("i",{staticClass:"media-body-show-replies-icon"}),t._v(" "),e("span",{staticClass:"media-body-show-replies-label"},[t._v("View full thread")])])])]):t._e(),t._v(" "),t.commentReplyIndex==i?e("comment-reply-form",{attrs:{"parent-id":s.id},on:{"new-comment":function(e){return t.pushCommentReply(i,e)},"counter-change":function(e){return t.replyCounterChange(i,e)}}}):t._e()],2)])})),0)],1)]),t._v(" "),!t.feedLoading&&t.canLoadMore?e("div",{staticClass:"post-comment-drawer-loadmore"},[e("p",[e("a",{staticClass:"font-weight-bold text-dark",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.fetchMore()}}},[t._v("Load more comments…")])])]):t._e(),t._v(" "),t.showEmptyRepliesRefresh?e("div",{staticClass:"post-comment-drawer-loadmore"},[e("p",{staticClass:"text-center mb-4"},[e("a",{staticClass:"btn btn-outline-primary font-weight-bold rounded-pill",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.forceRefresh()}}},[e("i",{staticClass:"far fa-sync mr-2"}),t._v(" Refresh\n\t\t\t\t")])])]):t._e(),t._v(" "),e("div",{staticClass:"d-flex align-items-top reply-form child-reply-form"},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:t.profile.avatar,width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.settings.expanded,expression:"!settings.expanded"}],staticClass:"w-100"},[e("vue-tribute",{attrs:{options:t.tributeSettings}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyContent,expression:"replyContent"}],staticClass:"form-control bg-light rounded-sm shadow-sm rounded-pill",staticStyle:{resize:"none","padding-right":"140px"},attrs:{placeholder:"Write a comment....",rows:"1",disabled:t.isPostingReply},domProps:{value:t.replyContent},on:{input:function(e){e.target.composing||(t.replyContent=e.target.value)}}})])],1),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.settings.expanded,expression:"settings.expanded"}],staticClass:"w-100"},[e("vue-tribute",{attrs:{options:t.tributeSettings}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyContent,expression:"replyContent"}],staticClass:"form-control bg-light rounded-sm shadow-sm",staticStyle:{resize:"none","padding-right":"140px"},attrs:{placeholder:"Write a comment....",rows:"5",disabled:t.isPostingReply},domProps:{value:t.replyContent},on:{input:function(e){e.target.composing||(t.replyContent=e.target.value)}}})])],1),t._v(" "),e("div",{staticClass:"reply-form-input-actions",class:{open:t.settings.expanded}},[e("button",{staticClass:"btn btn-link text-muted px-1 mr-2",on:{click:function(e){return t.replyUpload()}}},[e("i",{staticClass:"far fa-image fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-link text-muted px-1 mr-2",on:{click:function(e){return t.toggleReplyExpand()}}},[e("i",{staticClass:"far fa-text-size fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-link text-muted px-1 small font-weight-bold py-0 rounded-pill text-decoration-none",on:{click:t.toggleShowReplyOptions}},[e("i",{staticClass:"far fa-ellipsis-h"})])])]),t._v(" "),t.showReplyOptions?e("div",{staticClass:"child-reply-form-options mt-2",staticStyle:{"margin-left":"60px"}},[e("b-form-checkbox",{attrs:{switch:""},model:{value:t.settings.sensitive,callback:function(e){t.$set(t.settings,"sensitive",e)},expression:"settings.sensitive"}},[t._v("\n\t\t\t\t"+t._s(t.$t("common.sensitive"))+"\n\t\t\t")])],1):t._e(),t._v(" "),t.replyContent&&t.replyContent.length?e("div",{staticClass:"text-right mt-2"},[e("button",{staticClass:"btn btn-primary btn-sm font-weight-bold primary rounded-pill px-4",on:{click:t.storeComment}},[t._v(t._s(t.$t("common.comment")))])]):t._e(),t._v(" "),e("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":!0,"hide-footer":!0,centered:"",size:"lg","body-class":"p-0","content-class":"bg-transparent border-0 position-relative"}},[t.lightboxStatus&&"image"==t.lightboxStatus.type?e("div",{on:{click:t.hideLightbox}},[e("img",{staticStyle:{width:"100%","max-height":"90vh","object-fit":"contain"},attrs:{src:t.lightboxStatus.url}})]):t.lightboxStatus&&"video"==t.lightboxStatus.type?e("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{position:"relative"}},[e("button",{staticClass:"btn btn-dark d-flex align-items-center justify-content-center",staticStyle:{position:"fixed",top:"10px",right:"10px",width:"56px",height:"56px","border-radius":"56px"},on:{click:t.hideLightbox}},[e("i",{staticClass:"far fa-times-circle fa-2x text-warning",staticStyle:{"padding-top":"2px"}})]),t._v(" "),e("video",{staticStyle:{"max-height":"90vh","object-fit":"contain"},attrs:{src:t.lightboxStatus.url,controls:"",autoplay:""},on:{ended:t.hideLightbox}})]):t._e()])],1)},o=[]},54309:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"comment-replies-component"},[t.loading?e("div",{staticClass:"mt-n2"},[t._m(0)]):[e("transition-group",{attrs:{tag:"div","enter-active-class":"animate__animated animate__fadeIn","leave-active-class":"animate__animated animate__fadeOut",mode:"out-in"}},t._l(t.feed,(function(s,i){return e("div",{key:"cd:"+s.id+":"+i},[e("div",{staticClass:"media media-status align-items-top mb-3"},[e("a",{attrs:{href:"#l"}},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:s.account.avatar,width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("div",{staticClass:"media-body-wrapper"},[s.media_attachments.length?e("div",[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s.sensitive?e("div",{staticClass:"bh-comment",on:{click:function(t){s.sensitive=!1}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash}}),t._v(" "),e("div",{staticClass:"sensitive-warning"},[e("p",{staticClass:"mb-0"},[e("i",{staticClass:"far fa-eye-slash fa-lg"})]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("Click to view")])])],1):e("div",{staticClass:"bh-comment"},[e("div",{on:{click:function(e){return t.lightbox(s)}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash,src:t.getMediaSource(s)}})],1),t._v(" "),s.favourites_count?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()])]):e("div",{staticClass:"media-body-comment"},[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s.sensitive?e("span",[e("p",{staticClass:"mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.$t("common.sensitiveContentWarning"))+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("a",{staticClass:"small font-weight-bold primary",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.sensitive=!1}}},[t._v("Show")])]):e("read-more",{attrs:{status:s}}),t._v(" "),s.favourites_count?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()],1)]),t._v(" "),e("p",{staticClass:"media-body-reactions"},[e("button",{staticClass:"btn btn-link font-weight-bold btn-sm p-0",class:[s.favourited?"primary":"text-muted"],on:{click:function(e){return t.likeComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(s.favourited?"Liked":"Like")+"\n\t\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),t._o(e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToPost(s)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t\t")]),0,"cd:"+s.id+":"+i),t._v(" "),t.profile&&s.account.id===t.profile.id?e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.deleteComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t")])]):e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.reportComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\tReport\n\t\t\t\t\t\t\t\t")])])])])])])})),0)]],2)},o=[function(){var t=this._self._c;return t("div",{staticClass:"ph-item border-0 mb-0 p-0 bg-transparent",staticStyle:{"border-radius":"15px","margin-left":"-14px"}},[t("div",{staticClass:"ph-col-12 mb-0"},[t("div",{staticClass:"ph-row align-items-center mt-0"},[t("div",{staticClass:"ph-avatar mr-3 d-flex",staticStyle:{"min-width":"40px",width:"40px!important",height:"40px!important","border-radius":"8px"}}),this._v(" "),t("div",{staticClass:"ph-col-6"})])])])}]},82285:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"my-3"},[e("div",{staticClass:"d-flex align-items-top reply-form child-reply-form"},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:t.profile.avatar,width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticStyle:{display:"flex","flex-grow":"1",position:"relative"}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyContent,expression:"replyContent"}],staticClass:"form-control bg-light rounded-lg shadow-sm",staticStyle:{resize:"none","padding-right":"60px"},attrs:{placeholder:"Write a comment....",disabled:t.isPostingReply},domProps:{value:t.replyContent},on:{input:function(e){e.target.composing||(t.replyContent=e.target.value)}}}),t._v(" "),e("button",{staticClass:"btn btn-sm py-1 font-weight-bold ml-1 rounded-pill",class:[t.replyContent&&t.replyContent.length?"btn-primary":"btn-outline-muted"],staticStyle:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)"},attrs:{disabled:!t.replyContent||!t.replyContent.length},on:{click:t.storeComment}},[t._v("\n Post\n ")])])]),t._v(" "),e("p",{staticClass:"text-right small font-weight-bold text-lighter"},[t._v(t._s(t.replyContent?t.replyContent.length:0)+"/"+t._s(t.config.uploader.max_caption_length))])])},o=[]},62399:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-stack"},[e("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"list-group text-center"},["archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxMenuGoToPost()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.viewPost"))+"\n\t\t\t\t")]):t._e(),t._v(" "),"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxMenuGoToProfile()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.viewProfile"))+"\n\t\t\t\t")]):t._e(),t._v(" "),"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxMenuShare()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("common.share"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.profile&&1==t.profile.is_admin&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxModMenuShow()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.moderationTools"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.status.account.id!=t.profile.id?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.ctxMenuReportPost()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.report"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.profile.id==t.status.account.id&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.archivePost(t.status)}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.archive"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.profile.id==t.status.account.id&&"archived"==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.unarchivePost(t.status)}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.unarchive"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.config.ab.pue&&t.status&&t.profile.id==t.status.account.id&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.editPost(t.status)}}},[t._v("\n\t\t\t\t\tEdit\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&(t.profile.is_admin||t.profile.id==t.status.account.id)&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.deletePost(t.status)}}},[t.isDeleting?e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[t._v("Loading...")])]):e("div",[t._v("\n\t\t\t\t\t "+t._s(t.$t("common.delete"))+"\n ")])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter font-weight-bold",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("common.cancel"))+"\n\t\t\t\t")])])]),t._v(" "),e("b-modal",{ref:"ctxModModal",attrs:{id:"ctx-mod-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"list-group text-center"},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("menu.moderationTools"))+"\n\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("menu.selectOneOption"))+"\n\t\t\t\t\t")]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"unlist")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.unlistFromTimelines"))+"\n\t\t\t\t")]),t._v(" "),t.status.sensitive?e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"remcw")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.removeCW"))+"\n\t\t\t\t")]):e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"addcw")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.addCW"))+"\n\t\t\t\t")]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"spammer")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.markAsSpammer"))),e("br"),t._v(" "),e("span",{staticClass:"small"},[t._v(t._s(t.$t("menu.markAsSpammerText")))])]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxModMenuClose()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("common.cancel"))+"\n\t\t\t\t")])])]),t._v(" "),e("b-modal",{ref:"ctxModOtherModal",attrs:{id:"ctx-mod-other-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"list-group text-center"},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v(t._s(t.$t("menu.moderationTools")))]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v(t._s(t.$t("menu.selectOneOption")))]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.confirmModal()}}},[t._v("Unlist Posts")]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.confirmModal()}}},[t._v("Moderation Log")]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxModOtherMenuClose()}}},[t._v(t._s(t.$t("common.cancel")))])])]),t._v(" "),e("b-modal",{ref:"ctxShareModal",attrs:{id:"ctx-share-modal",title:"Share","hide-footer":"","hide-header":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded text-center"}},[e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.shareStatus(t.status,e)}}},[t._v(t._s(t.status.reblogged?"Unshare":"Share")+" "+t._s(t.$t("menu.toFollowers")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuCopyLink()}}},[t._v(t._s(t.$t("common.copyLink")))]),t._v(" "),t.status&&1==t.status.local&&!t.status.in_reply_to_id?e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuEmbed()}}},[t._v(t._s(t.$t("menu.embed")))]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxShareMenu()}}},[t._v(t._s(t.$t("common.cancel")))])]),t._v(" "),e("b-modal",{ref:"ctxEmbedModal",attrs:{id:"ctx-embed-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"md","body-class":"p-2 rounded"}},[e("div",[e("div",{staticClass:"form-group"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedPayload,expression:"ctxEmbedPayload"}],staticClass:"form-control disabled text-monospace",staticStyle:{"overflow-y":"hidden",border:"1px solid #efefef","font-size":"12px","line-height":"18px",margin:"0 0 7px",resize:"none"},attrs:{rows:"8",disabled:""},domProps:{value:t.ctxEmbedPayload},on:{input:function(e){e.target.composing||(t.ctxEmbedPayload=e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-group pl-2 d-flex justify-content-center"},[e("div",{staticClass:"form-check mr-3"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowCaption,expression:"ctxEmbedShowCaption"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowCaption)?t._i(t.ctxEmbedShowCaption,null)>-1:t.ctxEmbedShowCaption},on:{change:function(e){var s=t.ctxEmbedShowCaption,i=e.target,o=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.ctxEmbedShowCaption=s.concat([null])):a>-1&&(t.ctxEmbedShowCaption=s.slice(0,a).concat(s.slice(a+1)))}else t.ctxEmbedShowCaption=o}}}),t._v(" "),e("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("menu.showCaption"))+"\n\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"form-check mr-3"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowLikes,expression:"ctxEmbedShowLikes"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowLikes)?t._i(t.ctxEmbedShowLikes,null)>-1:t.ctxEmbedShowLikes},on:{change:function(e){var s=t.ctxEmbedShowLikes,i=e.target,o=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.ctxEmbedShowLikes=s.concat([null])):a>-1&&(t.ctxEmbedShowLikes=s.slice(0,a).concat(s.slice(a+1)))}else t.ctxEmbedShowLikes=o}}}),t._v(" "),e("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("menu.showLikes"))+"\n\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"form-check"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedCompactMode,expression:"ctxEmbedCompactMode"}],staticClass:"form-check-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.ctxEmbedCompactMode)?t._i(t.ctxEmbedCompactMode,null)>-1:t.ctxEmbedCompactMode},on:{change:function(e){var s=t.ctxEmbedCompactMode,i=e.target,o=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.ctxEmbedCompactMode=s.concat([null])):a>-1&&(t.ctxEmbedCompactMode=s.slice(0,a).concat(s.slice(a+1)))}else t.ctxEmbedCompactMode=o}}}),t._v(" "),e("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("menu.compactMode"))+"\n\t\t\t\t\t\t")])])]),t._v(" "),e("hr"),t._v(" "),e("button",{class:t.copiedEmbed?"btn btn-primary btn-block btn-sm py-1 font-weight-bold disabed":"btn btn-primary btn-block btn-sm py-1 font-weight-bold",attrs:{disabled:t.copiedEmbed},on:{click:t.ctxCopyEmbed}},[t._v(t._s(t.copiedEmbed?"Embed Code Copied!":"Copy Embed Code"))]),t._v(" "),e("p",{staticClass:"mb-0 px-2 small text-muted"},[t._v(t._s(t.$t("menu.embedConfirmText"))+" "),e("a",{attrs:{href:"/site/terms"}},[t._v(t._s(t.$t("site.terms")))])])])]),t._v(" "),e("b-modal",{ref:"ctxReport",attrs:{id:"ctx-report","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v(t._s(t.$t("menu.report")))]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v(t._s(t.$t("menu.selectOneOption")))]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group text-center"},[e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("spam")}}},[t._v(t._s(t.$t("menu.spam")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("sensitive")}}},[t._v(t._s(t.$t("menu.sensitive")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("abusive")}}},[t._v(t._s(t.$t("menu.abusive")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.openCtxReportOtherMenu()}}},[t._v(t._s(t.$t("common.other")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxReportMenuGoBack()}}},[t._v(t._s(t.$t("common.cancel")))])])]),t._v(" "),e("b-modal",{ref:"ctxReportOther",attrs:{id:"ctx-report-other","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v(t._s(t.$t("menu.report")))]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v(t._s(t.$t("menu.selectOneOption")))]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group text-center"},[e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("underage")}}},[t._v(t._s(t.$t("menu.underageAccount")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("copyright")}}},[t._v(t._s(t.$t("menu.copyrightInfringement")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("impersonation")}}},[t._v(t._s(t.$t("menu.impersonation")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("scam")}}},[t._v(t._s(t.$t("menu.scamOrFraud")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxReportOtherMenuGoBack()}}},[t._v(t._s(t.$t("common.cancel")))])])]),t._v(" "),e("b-modal",{ref:"ctxConfirm",attrs:{id:"ctx-confirm","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"d-flex align-items-center justify-content-center py-3"},[e("div",[t._v(t._s(this.confirmModalTitle))])]),t._v(" "),e("div",{staticClass:"d-flex border-top btn-group btn-group-block rounded-0",attrs:{role:"group"}},[e("button",{staticClass:"btn btn-outline-lighter border-left-0 border-top-0 border-bottom-0 border-right py-2",staticStyle:{color:"rgb(0,122,255) !important"},attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.confirmModalCancel()}}},[t._v(t._s(t.$t("common.cancel")))]),t._v(" "),e("button",{staticClass:"btn btn-outline-lighter border-0",staticStyle:{color:"rgb(0,122,255) !important"},attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.confirmModalConfirm()}}},[t._v("Confirm")])])])],1)},o=[]},27934:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{attrs:{centered:"",size:"md",scrollable:!0,"hide-footer":"","header-class":"py-2","body-class":"p-0","title-class":"w-100 text-center pl-4 font-weight-bold","title-tag":"p"},scopedSlots:t._u([{key:"modal-header",fn:function(s){var i=s.close;return[void 0===t.historyIndex?[e("div",{staticClass:"d-flex flex-grow-1 justify-content-between align-items-center"},[e("span",{staticStyle:{width:"40px"}}),t._v(" "),e("h5",{staticClass:"font-weight-bold mb-0"},[t._v("Post History")]),t._v(" "),e("b-button",{attrs:{size:"sm",variant:"link"},on:{click:function(t){return i()}}},[e("i",{staticClass:"far fa-times text-dark fa-lg"})])],1)]:[e("div",{staticClass:"d-flex flex-grow-1 justify-content-between align-items-center pt-1"},[e("b-button",{attrs:{size:"sm",variant:"link"},on:{click:function(e){e.preventDefault(),t.historyIndex=void 0}}},[e("i",{staticClass:"fas fa-chevron-left text-primary fa-lg"})]),t._v(" "),e("div",{staticClass:"d-flex align-items-center"},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("img",{staticClass:"rounded-circle",attrs:{src:t.allHistory[0].account.avatar,width:"16",height:"16",onerror:"this.src='/storage/avatars/default.jpg';this.onerror=null;"}}),t._v(" "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.allHistory[0].account.username))])]),t._v(" "),e("div",[t._v(t._s(t.historyIndex==t.allHistory.length-1?"created":"edited")+" "+t._s(t.formatTime(t.allHistory[t.historyIndex].created_at)))])])]),t._v(" "),e("b-button",{attrs:{size:"sm",variant:"link"},on:{click:function(t){return i()}}},[e("i",{staticClass:"fas fa-times text-dark fa-lg"})])],1)]]}}]),model:{value:t.isOpen,callback:function(e){t.isOpen=e},expression:"isOpen"}},[t._v(" "),t.isLoading?e("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{"min-height":"500px"}},[e("b-spinner")],1):[void 0===t.historyIndex?e("div",{staticClass:"list-group border-top-0"},t._l(t.allHistory,(function(s,i){return e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between",staticStyle:{gap:"5px"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("img",{staticClass:"rounded-circle",attrs:{src:s.account.avatar,width:"24",height:"24",onerror:"this.src='/storage/avatars/default.jpg';this.onerror=null;"}}),t._v(" "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(s.account.username))])]),t._v(" "),e("div",[t._v(t._s(i==t.allHistory.length-1?"created":"edited")+" "+t._s(t.formatTime(s.created_at)))])]),t._v(" "),e("a",{staticClass:"stretched-link text-decoration-none",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.historyIndex=i}}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("i",{staticClass:"far fa-chevron-right text-primary fa-lg"})])])])})),0):e("div",{staticClass:"d-flex align-items-center flex-column border-top-0 justify-content-center"},["text"===t.postType()?void 0:"image"===t.postType()?[e("div",{staticStyle:{width:"100%"}},[e("blur-hash-image",{staticClass:"img-contain border-bottom",attrs:{width:32,height:32,punch:1,hash:t.allHistory[t.historyIndex].media_attachments[0].blurhash,src:t.allHistory[t.historyIndex].media_attachments[0].url}})],1)]:"album"===t.postType()?[e("div",{staticStyle:{width:"100%"}},[e("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333"},attrs:{controls:"",indicators:"",background:"#000000"}},t._l(t.allHistory[t.historyIndex].media_attachments,(function(t,s){return e("b-carousel-slide",{key:"pfph:"+t.id+":"+s,attrs:{"img-src":t.url}})})),1)],1)]:"video"===t.postType()?[e("div",{staticStyle:{width:"100%"}},[e("div",{staticClass:"embed-responsive embed-responsive-16by9 border-bottom"},[e("video",{staticClass:"video",attrs:{controls:"",playsinline:"",preload:"metadata",loop:""}},[e("source",{attrs:{src:t.allHistory[t.historyIndex].media_attachments[0].url,type:t.allHistory[t.historyIndex].media_attachments[0].mime}})])])])]:t._e(),t._v(" "),e("div",{staticClass:"w-100 my-4 px-4 text-break justify-content-start"},[e("p",{staticClass:"mb-0",domProps:{innerHTML:t._s(t.allHistory[t.historyIndex].content)}})])],2)]],2)],1)},o=[]},7971:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){this._self._c;return this._m(0)},o=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"list-group-item border-left-0 border-right-0 px-3"},[e("div",{staticClass:"ph-item border-0 p-0 m-0 align-items-center"},[e("div",{staticClass:"p-0 mb-0",staticStyle:{flex:"unset"}},[e("div",{staticClass:"ph-avatar",staticStyle:{"min-width":"40px !important",width:"40px !important",height:"40px"}})]),t._v(" "),e("div",{staticClass:"ph-col-9 mb-0"},[e("div",{staticClass:"ph-row"},[e("div",{staticClass:"ph-col-12"}),t._v(" "),e("div",{staticClass:"ph-col-12"})])])])])}]},92162:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"likesModal",attrs:{centered:"",size:"md",scrollable:!0,"hide-footer":"","header-class":"py-2","body-class":"p-0","title-class":"w-100 text-center pl-4 font-weight-bold","title-tag":"p",title:t.$t("common.likes")}},[t.isLoading?e("div",{staticClass:"likes-loader list-group border-top-0",staticStyle:{"max-height":"500px"}},[e("like-placeholder")],1):e("div",[t.likes.length?e("div",{staticClass:"list-group",staticStyle:{"max-height":"500px"}},[t._l(t.likes,(function(s,i){return e("div",{staticClass:"list-group-item border-left-0 border-right-0 px-3",class:[0===i?"border-top-0":""]},[e("div",{staticClass:"media align-items-center"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("a",{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[t._v(t._s(t.getUsername(s)))])]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-dark font-weight-bold small text-break"},[t._v("@"+t._s(s.acct))])]),t._v(" "),e("div",[null==s.follows||s.id==t.user.id?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},on:{click:function(e){return t.goToProfile(t.profile)}}},[t._v("\n\t\t\t\t\t\t\t\tView Profile\n\t\t\t\t\t\t\t")]):s.follows?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleUnfollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Following")])]):s.follows?t._e():e("button",{staticClass:"btn btn-primary rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleFollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Follow")])])])])])})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("like-placeholder",{staticClass:"border-top-0"})],1),t._v(" "),e("like-placeholder")],1):t._e()],2):e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"140px"}},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.$t("post.noLikes")))])])])])],1)},o=[]},79911:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"timeline-status-component-content"},["poll"===t.status.pf_type?e("div",{staticClass:"postPresenterContainer",staticStyle:{background:"#000"}}):t.fixedHeight?e("div",{staticClass:"card-body p-0"},["photo"===t.status.pf_type?e("div",{class:{fixedHeight:t.fixedHeight}},[1==t.status.sensitive?e("div",{staticClass:"content-label-wrapper"},[e("div",{staticClass:"text-light content-label"},[t._m(0),t._v(" "),e("p",{staticClass:"h4 font-weight-bold text-center"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("common.sensitiveContent"))+"\n\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"text-center py-2 content-label-text"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.status.spoiler_text?t.status.spoiler_text:t.$t("common.sensitiveContentWarning"))+"\n\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0"},[e("button",{staticClass:"btn btn-outline-light btn-block btn-sm font-weight-bold",on:{click:function(e){return t.toggleContentWarning()}}},[t._v("See Post")])])]),t._v(" "),e("blur-hash-image",{staticClass:"blurhash-wrapper",attrs:{width:"32",height:"32",punch:1,hash:t.status.media_attachments[0].blurhash}})],1):e("div",{staticClass:"content-label-wrapper",staticStyle:{position:"relative",width:"100%",height:"400px",overflow:"hidden","z-index":"1"},on:{click:function(e){return e.preventDefault(),t.toggleLightbox.apply(null,arguments)}}},[e("img",{staticStyle:{position:"absolute",width:"105%",height:"410px","object-fit":"cover","z-index":"1",top:"0",left:"0",filter:"brightness(0.35) blur(6px)",margin:"-5px"},attrs:{src:t.status.media_attachments[0].url}}),t._v(" "),e("blur-hash-image",{key:t.key,staticClass:"blurhash-wrapper",staticStyle:{width:"100%",position:"absolute","z-index":"9",top:"0:left:0"},attrs:{width:"32",height:"32",punch:1,hash:t.status.media_attachments[0].blurhash,src:t.status.media_attachments[0].url,alt:t.status.media_attachments[0].description,title:t.status.media_attachments[0].description}}),t._v(" "),!t.status.sensitive&&t.sensitive?e("p",{staticStyle:{"margin-top":"0",padding:"10px",color:"#000","font-size":"10px","text-align":"right",position:"absolute",top:"0",right:"0","border-radius":"11px",cursor:"pointer",background:"rgba(255, 255, 255,.5)"},on:{click:function(e){t.status.sensitive=!0}}},[e("i",{staticClass:"fas fa-eye-slash fa-lg"})]):t._e()],1)]):"video"===t.status.pf_type?e("video-player",{attrs:{status:t.status,fixedHeight:t.fixedHeight}}):"photo:album"===t.status.pf_type?e("div",{staticClass:"card-img-top shadow",staticStyle:{"border-radius":"15px"}},[e("photo-album-presenter",{class:{fixedHeight:t.fixedHeight},staticStyle:{"border-radius":"15px !important","object-fit":"contain","background-color":"#000",overflow:"hidden"},attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){return t.toggleContentWarning()}}})],1):"photo:video:album"===t.status.pf_type?e("div",{staticClass:"card-img-top shadow",staticStyle:{"border-radius":"15px"}},[e("mixed-album-presenter",{class:{fixedHeight:t.fixedHeight},staticStyle:{"border-radius":"15px !important","object-fit":"contain","background-color":"#000",overflow:"hidden","align-items":"center"},attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"text"===t.status.pf_type?e("div",[t.status.sensitive?e("div",{staticClass:"border m-3 p-5 rounded-lg"},[t._m(1),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-0"},[t._v("Sensitive Content")]),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.status.spoiler_text&&t.status.spoiler_text.length?t.status.spoiler_text:"This post may contain sensitive content"))]),t._v(" "),e("p",{staticClass:"text-center mb-0"},[e("button",{staticClass:"btn btn-primary btn-sm font-weight-bold",on:{click:function(e){t.status.sensitive=!1}}},[t._v("See post")])])]):t._e()]):e("div",{staticClass:"bg-light rounded-lg d-flex align-items-center justify-content-center",staticStyle:{height:"400px"}},[e("div",[t._m(2),t._v(" "),e("p",{staticClass:"lead text-center mb-0"},[t._v("\n\t\t\t\t\t\tCannot display post\n\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"small text-center mb-0"},[t._v("\n\t\t\t\t\t\t"+t._s(t.status.pf_type)+":"+t._s(t.status.id)+"\n\t\t\t\t\t")])])])],1):e("div",{staticClass:"postPresenterContainer",staticStyle:{background:"#000"}},["photo"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("video-player",{attrs:{status:t.status,fixedHeight:t.fixedHeight},on:{togglecw:function(e){t.status.sensitive=!1}}})],1):"photo:album"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video:album"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("video-album-presenter",{attrs:{status:t.status},on:{togglecw:function(e){t.status.sensitive=!1}}})],1):"photo:video:album"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):t._e()]),t._v(" "),t.status.content&&!t.status.sensitive?e("div",{staticClass:"card-body status-text",class:["text"===t.status.pf_type?"py-0":"pb-0"]},[e("p",[e("read-more",{attrs:{status:t.status,"cursor-limit":300}})],1)]):t._e()])},o=[function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"far fa-eye-slash fa-2x"})])},function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"far fa-eye-slash fa-2x"})])},function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle fa-4x"})])}]},44516:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[t.isReblog?e("div",{staticClass:"card-header bg-light border-0",staticStyle:{"border-top-left-radius":"15px","border-top-right-radius":"15px"}},[e("div",{staticClass:"media align-items-center",staticStyle:{height:"10px"}},[e("a",{staticClass:"mx-2",attrs:{href:t.reblogAccount.url},on:{click:function(e){return e.preventDefault(),t.goToProfileById(t.reblogAccount.id)}}},[e("img",{staticStyle:{"border-radius":"10px"},attrs:{src:t.reblogAccount.avatar,width:"24",height:"24",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),e("div",{staticStyle:{"font-size":"12px","font-weight":"bold"}},[e("i",{staticClass:"far fa-retweet text-warning mr-1"}),t._v(" Reblogged by "),e("a",{staticClass:"text-dark",attrs:{href:t.reblogAccount.url},on:{click:function(e){return e.preventDefault(),t.goToProfileById(t.reblogAccount.id)}}},[t._v("@"+t._s(t.reblogAccount.acct))])])])]):t._e(),t._v(" "),e("div",{staticClass:"card-header border-0",staticStyle:{"border-top-left-radius":"15px","border-top-right-radius":"15px"}},[e("div",{staticClass:"media align-items-center"},[e("a",{staticStyle:{"margin-right":"10px"},attrs:{href:t.status.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}},[e("img",{staticStyle:{"border-radius":"15px"},attrs:{src:t.getStatusAvatar(),width:"44",height:"44",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"font-weight-bold username"},[e("a",{staticClass:"text-dark",attrs:{href:t.status.account.url,id:"apop_"+t.status.id},on:{click:function(e){return e.preventDefault(),t.goToProfile.apply(null,arguments)}}},[t._v("\n "+t._s(t.status.account.acct)+"\n ")]),t._v(" "),e("b-popover",{attrs:{target:"apop_"+t.status.id,triggers:"hover",placement:"bottom","custom-class":"shadow border-0 rounded-px"}},[e("profile-hover-card",{attrs:{profile:t.status.account},on:{follow:t.follow,unfollow:t.unfollow}})],1)],1),t._v(" "),e("p",{staticClass:"text-lighter mb-0",staticStyle:{"font-size":"13px"}},[t.status.account.is_admin?e("span",{staticClass:"d-none d-md-inline-block"},[e("span",{staticClass:"badge badge-light text-danger user-select-none",attrs:{title:"Admin account"}},[t._v("ADMIN")]),t._v(" "),e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")])]):t._e(),t._v(" "),e("a",{staticClass:"timestamp text-lighter",attrs:{href:t.status.url,title:t.status.created_at},on:{click:function(e){return e.preventDefault(),t.goToPost()}}},[t._v("\n "+t._s(t.timeago(t.status.created_at))+"\n ")]),t._v(" "),t.config.ab.pue&&t.status.hasOwnProperty("edited_at")&&t.status.edited_at?e("span",[e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")]),t._v(" "),e("a",{staticClass:"text-lighter",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditModal.apply(null,arguments)}}},[t._v("Edited")])]):t._e(),t._v(" "),e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")]),t._v(" "),e("span",{staticClass:"visibility text-lighter",attrs:{title:t.scopeTitle(t.status.visibility)}},[e("i",{class:t.scopeIcon(t.status.visibility)})]),t._v(" "),t.status.place&&t.status.place.hasOwnProperty("name")?e("span",{staticClass:"d-none d-md-inline-block"},[e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")]),t._v(" "),e("span",{staticClass:"location text-lighter"},[e("i",{staticClass:"far fa-map-marker-alt"}),t._v(" "+t._s(t.status.place.name)+", "+t._s(t.status.place.country))])]):t._e()])]),t._v(" "),t.useDropdownMenu?e("b-dropdown",{attrs:{"no-caret":"",right:"",variant:"link","toggle-class":"text-lighter",html:""}},[e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("menu.viewPost")))])]),t._v(" "),e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("common.copyLink")))])]),t._v(" "),t.status.local?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("menu.embed")))])]):t._e(),t._v(" "),t.owner?t._e():e("b-dropdown-divider"),t._v(" "),t.owner?t._e():e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("menu.report")))]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Report content that violate our rules")])]),t._v(" "),!t.owner&&t.status.hasOwnProperty("relationship")?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.status.relationship.muting?"Unmute":"Mute"))]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Hide posts from this account in your feeds")])]):t._e(),t._v(" "),!t.owner&&t.status.hasOwnProperty("relationship")?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold text-danger"},[t._v(t._s(t.status.relationship.blocking?"Unblock":"Block"))]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Restrict all content from this account")])]):t._e(),t._v(" "),t.owner||t.admin?e("b-dropdown-divider"):t._e(),t._v(" "),t.owner||t.admin?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold text-danger"},[t._v("\n "+t._s(t.$t("common.delete"))+"\n ")])]):t._e()],1):e("button",{staticClass:"btn btn-link text-lighter",on:{click:t.openMenu}},[e("i",{staticClass:"far fa-ellipsis-v fa-lg"})])],1),t._v(" "),e("edit-history-modal",{ref:"editModal",attrs:{status:t.status}})],1)])},o=[]},51992:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"px-3 my-3",staticStyle:{"z-index":"3"}},[(t.status.favourites_count||t.status.reblogs_count)&&(t.status.hasOwnProperty("liked_by")&&t.status.liked_by.url||t.status.hasOwnProperty("reblogs_count")&&t.status.reblogs_count)?e("div",{staticClass:"mb-0 d-flex justify-content-between"},[!t.hideCounts&&t.status.favourites_count?e("p",{staticClass:"mb-2 reaction-liked-by"},[t._v("\n\t\t\tLiked by\n\t\t\t"),1==t.status.favourites_count&&1==t.status.favourited?e("span",{staticClass:"font-weight-bold"},[t._v("me")]):e("span",[e("router-link",{staticClass:"primary font-weight-bold",attrs:{to:"/i/web/profile/"+t.status.liked_by.id}},[t._v(t._s(t.status.liked_by.username))]),t._v(" "),t.status.liked_by.others||t.status.favourites_count>1?e("span",[t._v("\n\t\t\t\t\tand "),e("a",{staticClass:"primary font-weight-bold",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLikes()}}},[t._v(t._s(t.count(t.status.favourites_count-1))+" others")])]):t._e()],1)]):t._e(),t._v(" "),!t.hideCounts&&t.status.reblogs_count?e("p",{staticClass:"mb-2 reaction-liked-by"},[t._v("\n\t\t\tShared by\n\t\t\t"),1==t.status.reblogs_count&&1==t.status.reblogged?e("span",{staticClass:"font-weight-bold"},[t._v("me")]):e("a",{staticClass:"primary font-weight-bold",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showShares()}}},[t._v("\n\t\t\t\t"+t._s(t.count(t.status.reblogs_count))+" "+t._s(t.status.reblogs_count>1?"others":"other")+"\n\t\t\t")])]):t._e()]):t._e(),t._v(" "),e("div",{staticClass:"d-flex justify-content-between",staticStyle:{"font-size":"14px !important"}},[e("div",[e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill mr-2",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.like()}}},[t.status.favourited?e("span",{staticClass:"primary"},[e("i",{staticClass:"fas fa-heart mr-md-1 text-danger fa-lg"})]):e("span",[e("i",{staticClass:"far fa-heart mr-md-2"})]),t._v(" "),t.likesCount&&!t.hideCounts?e("span",[t._v("\n\t\t\t\t\t"+t._s(t.count(t.likesCount))+"\n\t\t\t\t\t"),e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(1==t.likesCount?t.$t("common.like"):t.$t("common.likes")))])]):e("span",[e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(t.$t("common.like")))])])]),t._v(" "),t.status.comments_disabled?t._e():e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill mr-2 px-3",attrs:{type:"button"},on:{click:function(e){return t.showComments()}}},[e("i",{staticClass:"far fa-comment mr-md-2"}),t._v(" "),t.replyCount&&!t.hideCounts?e("span",[t._v("\n\t\t\t\t\t"+t._s(t.count(t.replyCount))+"\n\t\t\t\t\t"),e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(1==t.replyCount?t.$t("common.comment"):t.$t("common.comments")))])]):e("span",[e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(t.$t("common.comment")))])])])]),t._v(" "),e("div",[e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill",attrs:{type:"button",disabled:t.isReblogging},on:{click:function(e){return t.handleReblog()}}},[t.isReblogging?e("span",[e("b-spinner",{attrs:{variant:"warning",small:""}})],1):e("span",[1==t.status.reblogged?e("i",{staticClass:"fas fa-retweet fa-lg text-warning"}):e("i",{staticClass:"far fa-retweet"}),t._v(" "),t.status.reblogs_count&&!t.hideCounts?e("span",{staticClass:"ml-md-2"},[t._v("\n\t\t\t\t\t\t"+t._s(t.count(t.status.reblogs_count))+"\n\t\t\t\t\t")]):t._e()])]),t._v(" "),t.status.in_reply_to_id||t.status.reblog_of_id?t._e():e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill ml-3",attrs:{type:"button",disabled:t.isBookmarking},on:{click:function(e){return t.handleBookmark()}}},[t.isBookmarking?e("span",[e("b-spinner",{attrs:{variant:"warning",small:""}})],1):e("span",[t.status.hasOwnProperty("bookmarked_at")||t.status.hasOwnProperty("bookmarked")&&1==t.status.bookmarked?e("i",{staticClass:"fas fa-bookmark fa-lg text-warning"}):e("i",{staticClass:"far fa-bookmark"})])]),t._v(" "),t.admin?e("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"ml-3 btn btn-light font-weight-bold rounded-pill",attrs:{type:"button",title:"Moderation Tools"},on:{click:function(e){return t.openModTools()}}},[e("i",{staticClass:"far fa-user-crown"})]):t._e()])])])},o=[]},16331:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"read-more-component",staticStyle:{"word-break":"break-word"}},[e("div",{domProps:{innerHTML:t._s(t.content)}})])},o=[]},66295:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"sharesModal",attrs:{centered:"",size:"md",scrollable:!0,"hide-footer":"","header-class":"py-2","body-class":"p-0","title-class":"w-100 text-center pl-4 font-weight-bold","title-tag":"p",title:"Shared By"}},[t.isLoading?e("div",{staticClass:"likes-loader list-group border-top-0",staticStyle:{"max-height":"500px"}},[e("like-placeholder")],1):e("div",[t.likes.length?e("div",{staticClass:"list-group",staticStyle:{"max-height":"500px"}},[t._l(t.likes,(function(s,i){return e("div",{staticClass:"list-group-item border-left-0 border-right-0 px-3",class:[0===i?"border-top-0":""]},[e("div",{staticClass:"media align-items-center"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("a",{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[t._v(t._s(t.getUsername(s)))])]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-dark font-weight-bold small text-break"},[t._v("@"+t._s(s.acct))])]),t._v(" "),e("div",[s.id==t.user.id?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},on:{click:function(e){return t.goToProfile(t.profile)}}},[t._v("\n\t\t\t\t\t\t\t\tView Profile\n\t\t\t\t\t\t\t")]):s.follows?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleUnfollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Following")])]):s.follows?t._e():e("button",{staticClass:"btn btn-primary rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleFollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Follow")])])])])])})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("like-placeholder",{staticClass:"border-top-0"})],1),t._v(" "),e("like-placeholder")],1):t._e()],2):e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"140px"}},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("Nobody has shared this yet!")])])])])],1)},o=[]},66831:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-feed-component"},[e("div",{staticClass:"profile-feed-component-nav d-flex justify-content-center justify-content-md-between align-items-center mb-4"},[e("div",{staticClass:"d-none d-md-block border-bottom flex-grow-1 profile-nav-btns"},[e("div",{staticClass:"btn-group"},[e("button",{staticClass:"btn btn-link",class:[1===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab(1)}}},[t._v("\n\t\t\t\t\t\tPosts\n\t\t\t\t\t")]),t._v(" "),t.isOwner?e("button",{staticClass:"btn btn-link",class:["archives"===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab("archives")}}},[t._v("\n\t\t\t\t\t\tArchives\n\t\t\t\t\t")]):t._e(),t._v(" "),t.isOwner?e("button",{staticClass:"btn btn-link",class:["bookmarks"===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab("bookmarks")}}},[t._v("\n\t\t\t\t\t\tBookmarks\n\t\t\t\t\t")]):t._e(),t._v(" "),t.canViewCollections?e("button",{staticClass:"btn btn-link",class:[2===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab(2)}}},[t._v("\n\t\t\t\t\t\tCollections\n\t\t\t\t\t")]):t._e(),t._v(" "),t.isOwner?e("button",{staticClass:"btn btn-link",class:[3===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab(3)}}},[t._v("\n\t\t\t\t\t\tLikes\n\t\t\t\t\t")]):t._e()])]),t._v(" "),1===t.tabIndex?e("div",{staticClass:"btn-group layout-sort-toggle"},[e("button",{staticClass:"btn btn-sm",class:[0===t.layoutIndex?"btn-dark":"btn-light"],on:{click:function(e){return t.toggleLayout(0,!0)}}},[e("i",{staticClass:"far fa-th fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-sm",class:[1===t.layoutIndex?"btn-dark":"btn-light"],on:{click:function(e){return t.toggleLayout(1,!0)}}},[e("i",{staticClass:"fas fa-th-large fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-sm",class:[2===t.layoutIndex?"btn-dark":"btn-light"],on:{click:function(e){return t.toggleLayout(2,!0)}}},[e("i",{staticClass:"far fa-bars fa-lg"})])]):t._e()]),t._v(" "),0==t.tabIndex?e("div",{staticClass:"d-flex justify-content-center mt-5"},[e("b-spinner")],1):1==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[0===t.layoutIndex?e("div",{staticClass:"row"},[t._l(t.feed,(function(s,i){return e("div",{key:"tlob:"+i+s.id,staticClass:"col-4 p-1"},[s.hasOwnProperty("pf_type")&&"video"==s.pf_type?e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[s.sensitive?e("div",{staticClass:"square-content"},[t._m(0,!0),t._v(" "),e("blur-hash-canvas",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash}})],1):e("div",{staticClass:"square-content"},[e("blur-hash-image",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash,src:s.media_attachments[0].preview_url}})],1),t._v(" "),e("div",{staticClass:"info-overlay-text"},[e("div",{staticClass:"text-white m-auto"},[e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.favourites_count)))])]),t._v(" "),e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-comment fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reply_count)))])]),t._v(" "),e("p",{staticClass:"mb-0 info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-sync fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reblogs_count)))])])])])]),t._v(" "),t._m(1,!0),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t")])]):e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[s.sensitive?e("div",{staticClass:"square-content"},[t._m(2,!0),t._v(" "),e("blur-hash-canvas",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash}})],1):e("div",{staticClass:"square-content"},[e("blur-hash-image",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash,src:s.media_attachments[0].url}})],1),t._v(" "),e("div",{staticClass:"info-overlay-text"},[e("div",{staticClass:"text-white m-auto"},[e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.favourites_count)))])]),t._v(" "),e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-comment fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reply_count)))])]),t._v(" "),e("p",{staticClass:"mb-0 info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-sync fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reblogs_count)))])])])])]),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t")])])])})),t._v(" "),t.canLoadMore?e("intersect",{on:{enter:t.enterIntersect}},[e("div",{staticClass:"col-4 ph-wrapper"},[e("div",{staticClass:"ph-item"},[e("div",{staticClass:"ph-picture big"})])])]):t._e()],2):1===t.layoutIndex?e("div",{staticClass:"row"},[e("masonry",{attrs:{cols:{default:3,800:2},gutter:{default:"5px"}}},[t._l(t.feed,(function(s,i){return e("div",{key:"tlog:"+i+s.id,staticClass:"p-1"},[s.hasOwnProperty("pf_type")&&"video"==s.pf_type?e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[e("div",{staticClass:"square-content"},[e("blur-hash-image",{staticClass:"rounded",attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash,src:s.media_attachments[0].preview_url}})],1)]),t._v(" "),e("span",{staticClass:"badge badge-light video-overlay-badge"},[e("i",{staticClass:"far fa-video fa-2x"})]),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t\t")])]):s.sensitive?e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[e("div",{staticClass:"square-content"},[e("div",{staticClass:"info-overlay-text-label rounded"},[e("h5",{staticClass:"text-white m-auto font-weight-bold"},[e("span",[e("span",{staticClass:"far fa-eye-slash fa-lg p-2 d-flex-inline"})])])]),t._v(" "),e("blur-hash-canvas",{staticClass:"rounded",attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash}})],1)])]):e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("img",{staticClass:"img-fluid w-100 rounded-lg",attrs:{src:t.previewUrl(s),onerror:"this.onerror=null;this.src='/storage/no-preview.png?v=0'"}}),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t\t")])])])})),t._v(" "),t.canLoadMore?e("intersect",{on:{enter:t.enterIntersect}},[e("div",{staticClass:"p-1 ph-wrapper"},[e("div",{staticClass:"ph-item"},[e("div",{staticClass:"ph-picture big"})])])]):t._e()],2)],1):2===t.layoutIndex?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.feed,(function(s,i){return e("status-card",{key:"prs"+s.id+":"+i,attrs:{profile:t.user,status:s},on:{like:function(e){return t.likeStatus(i)},unlike:function(e){return t.unlikeStatus(i)},share:function(e){return t.shareStatus(i)},unshare:function(e){return t.unshareStatus(i)},menu:function(e){return t.openContextMenu(i)},"counter-change":function(e){return t.counterChange(i,e)},"likes-modal":function(e){return t.openLikesModal(i)},"shares-modal":function(e){return t.openSharesModal(i)},"comment-likes-modal":t.openCommentLikesModal,"handle-report":t.handleReport}})})),1),t._v(" "),t.canLoadMore?e("intersect",{on:{enter:t.enterIntersect}},[e("div",{staticClass:"col-12 col-md-10"},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1)]):t._e()],1):t._e(),t._v(" "),t.feedLoaded&&!t.feed.length?e("div",[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v(t._s(t.$t("profile.emptyPosts")))])])])]):t._e()]):"private"===t.tabIndex?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-secure-feed.svg"}}),t._v(" "),e("p",{staticClass:"h3 text-dark font-weight-bold mt-3 py-3"},[t._v("This profile is private")]),t._v(" "),e("div",{staticClass:"lead text-muted px-3"},[t._v("\n\t\t\t\t\tOnly approved followers can see "),e("span",{staticClass:"font-weight-bold text-dark text-break"},[t._v("@"+t._s(t.profile.acct))]),t._v("'s "),e("br"),t._v("\n\t\t\t\t\tposts. To request access, click "),e("span",{staticClass:"font-weight-bold"},[t._v("Follow")]),t._v(".\n\t\t\t\t")])])]):2==t.tabIndex?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8"},[e("div",{staticClass:"list-group"},t._l(t.collections,(function(s,i){return e("a",{staticClass:"list-group-item text-decoration-none text-dark",attrs:{href:s.url}},[e("div",{staticClass:"media"},[e("img",{staticClass:"rounded-lg border mr-3",staticStyle:{"object-fit":"cover"},attrs:{src:s.thumb,width:"65",height:"65",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}}),t._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"lead mb-0"},[t._v(t._s(s.title?s.title:"Untitled"))]),t._v(" "),e("p",{staticClass:"small text-muted mb-1"},[t._v(t._s(s.description||"No description available"))]),t._v(" "),e("p",{staticClass:"small text-lighter mb-0 font-weight-bold"},[e("span",[t._v(t._s(s.post_count)+" posts")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),"public"===s.visibility?e("span",{staticClass:"text-dark"},[t._v("Public")]):"private"===s.visibility?e("span",{staticClass:"text-dark"},[e("i",{staticClass:"far fa-lock fa-sm"}),t._v(" Followers Only")]):"draft"===s.visibility?e("span",{staticClass:"primary"},[e("i",{staticClass:"far fa-lock fa-sm"}),t._v(" Draft")]):t._e(),t._v(" "),e("span",[t._v("·")]),t._v(" "),s.published_at?e("span",[t._v("Created "+t._s(t.timeago(s.published_at))+" ago")]):e("span",{staticClass:"text-warning"},[t._v("UNPUBLISHED")])])])])])})),0)]),t._v(" "),t.collectionsLoaded&&!t.collections.length?e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v(t._s(t.$t("profile.emptyCollections")))])]):t._e(),t._v(" "),t.canLoadMoreCollections?e("div",{staticClass:"col-12 col-md-8"},[e("intersect",{on:{enter:t.enterCollectionsIntersect}},[e("div",{staticClass:"d-flex justify-content-center mt-5"},[e("b-spinner",{attrs:{small:""}})],1)])],1):t._e()]):3==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.favourites,(function(s,i){return e("status-card",{key:"prs"+s.id+":"+i,attrs:{profile:t.user,status:s},on:{like:function(e){return t.likeStatus(i)},unlike:function(e){return t.unlikeStatus(i)},share:function(e){return t.shareStatus(i)},unshare:function(e){return t.unshareStatus(i)},"counter-change":function(e){return t.counterChange(i,e)},"likes-modal":function(e){return t.openLikesModal(i)},"comment-likes-modal":t.openCommentLikesModal,"handle-report":t.handleReport}})})),1),t._v(" "),t.canLoadMoreFavourites?e("div",{staticClass:"col-12 col-md-10"},[e("intersect",{on:{enter:t.enterFavouritesIntersect}},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1)],1):t._e()]),t._v(" "),t.favourites&&t.favourites.length?t._e():e("div",{staticClass:"row justify-content-center"},[t._m(3)])]):"bookmarks"==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.bookmarks,(function(s,i){return e("status-card",{key:"prs"+s.id+":"+i,attrs:{profile:t.user,"new-reactions":!0,status:s},on:{menu:function(e){return t.openContextMenu(i)},"counter-change":function(e){return t.counterChange(i,e)},"likes-modal":function(e){return t.openLikesModal(i)},bookmark:function(e){return t.handleBookmark(i)},"comment-likes-modal":t.openCommentLikesModal,"handle-report":t.handleReport}})})),1),t._v(" "),e("div",{staticClass:"col-12 col-md-10"},[t.canLoadMoreBookmarks?e("intersect",{on:{enter:t.enterBookmarksIntersect}},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1):t._e()],1)]),t._v(" "),t.bookmarks&&t.bookmarks.length?t._e():e("div",{staticClass:"row justify-content-center"},[t._m(4)])]):"archives"==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.archives,(function(s,i){return e("status-card",{key:"prarc"+s.id+":"+i,attrs:{profile:t.user,"new-reactions":!0,"reaction-bar":!1,status:s},on:{menu:function(e){return t.openContextMenu(i,"archive")}}})})),1),t._v(" "),t.canLoadMoreArchives?e("div",{staticClass:"col-12 col-md-10"},[e("intersect",{on:{enter:t.enterArchivesIntersect}},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1)],1):t._e()]),t._v(" "),t.archives&&t.archives.length?t._e():e("div",{staticClass:"row justify-content-center"},[t._m(5)])]):t._e(),t._v(" "),t.showMenu?e("context-menu",{ref:"contextMenu",attrs:{status:t.contextMenuPost,profile:t.user},on:{moderate:t.commitModeration,delete:t.deletePost,archived:t.handleArchived,unarchived:t.handleUnarchived,"report-modal":t.handleReport}}):t._e(),t._v(" "),t.showLikesModal?e("likes-modal",{ref:"likesModal",attrs:{status:t.likesModalPost,profile:t.user}}):t._e(),t._v(" "),t.showSharesModal?e("shares-modal",{ref:"sharesModal",attrs:{status:t.sharesModalPost,profile:t.profile}}):t._e(),t._v(" "),e("report-modal",{key:t.reportedStatusId,ref:"reportModal",attrs:{status:t.reportedStatus}})],1)},o=[function(){var t=this._self._c;return t("div",{staticClass:"info-overlay-text-label"},[t("h5",{staticClass:"text-white m-auto font-weight-bold"},[t("span",[t("span",{staticClass:"far fa-eye-slash fa-lg p-2 d-flex-inline"})])])])},function(){var t=this._self._c;return t("span",{staticClass:"badge badge-light video-overlay-badge"},[t("i",{staticClass:"far fa-video fa-2x"})])},function(){var t=this._self._c;return t("div",{staticClass:"info-overlay-text-label"},[t("h5",{staticClass:"text-white m-auto font-weight-bold"},[t("span",[t("span",{staticClass:"far fa-eye-slash fa-lg p-2 d-flex-inline"})])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v("We can't seem to find any posts you have liked")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v("We can't seem to find any posts you have bookmarked")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v("We can't seem to find any posts you have bookmarked")])])}]},48281:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-followers-component"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8"},[t.isLoaded?e("div",{staticClass:"d-flex justify-content-between align-items-center mb-4"},[e("div",[e("button",{staticClass:"btn btn-outline-dark rounded-pill font-weight-bold",on:{click:function(e){return t.goBack()}}},[t._v("\n Back\n ")])]),t._v(" "),e("div",{staticClass:"d-flex align-items-center justify-content-center flex-column w-100 overflow-hidden"},[e("p",{staticClass:"small text-muted mb-0 text-uppercase font-weight-light cursor-pointer text-truncate text-center",staticStyle:{width:"70%"},on:{click:function(e){return t.goBack()}}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),e("p",{staticClass:"lead font-weight-bold mt-n1 mb-0"},[t._v(t._s(t.$t("profile.followers")))])]),t._v(" "),t._m(0)]):t._e(),t._v(" "),t.isLoaded?e("div",{staticClass:"list-group scroll-card"},[t._l(t.feed,(function(s,i){return e("div",{staticClass:"list-group-item"},[e("a",{staticClass:"text-decoration-none",attrs:{id:"apop_"+s.id,href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",draggable:"false",loading:"lazy",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("span",{staticClass:"text-dark font-weight-bold text-decoration-none",domProps:{innerHTML:t._s(t.getUsername(s))}})]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-muted small text-break"},[t._v("@"+t._s(s.acct))])])])]),t._v(" "),e("b-popover",{attrs:{target:"apop_"+s.id,triggers:"hover",placement:"left",delay:"1000","custom-class":"shadow border-0 rounded-px"}},[e("profile-hover-card",{attrs:{profile:s}})],1)],1)})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("placeholder")],1)],1):t._e(),t._v(" "),t.canLoadMore||t.feed.length?t._e():e("div",[e("div",{staticClass:"list-group-item text-center"},[t.isWarmingCache?e("div",{staticClass:"px-4"},[e("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v("Loading Followers...")]),t._v(" "),e("div",{staticClass:"py-3"},[e("b-spinner",{staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{variant:"primary"}})],1),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Please wait while we collect followers of this account, this shouldn't take long!")])]):e("p",{staticClass:"mb-0 font-weight-bold"},[t._v("No followers yet!")])])])],2):e("div",{staticClass:"list-group"},[e("placeholder")],1)])])])},o=[function(){var t=this._self._c;return t("div",[t("a",{staticClass:"btn btn-dark rounded-pill font-weight-bold spacer-btn",attrs:{href:"#"}},[this._v("Back")])])}]},29594:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-following-component"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-7"},[t.isLoaded?e("div",{staticClass:"d-flex justify-content-between align-items-center mb-4"},[e("div",[e("button",{staticClass:"btn btn-outline-dark rounded-pill font-weight-bold",on:{click:function(e){return t.goBack()}}},[t._v("\n Back\n ")])]),t._v(" "),e("div",{staticClass:"d-flex align-items-center justify-content-center flex-column w-100 overflow-hidden"},[e("p",{staticClass:"small text-muted mb-0 text-uppercase font-weight-light cursor-pointer text-truncate text-center",staticStyle:{width:"70%"},on:{click:function(e){return t.goBack()}}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),e("p",{staticClass:"lead font-weight-bold mt-n1 mb-0"},[t._v(t._s(t.$t("profile.following")))])]),t._v(" "),t._m(0)]):t._e(),t._v(" "),t.isLoaded?e("div",{staticClass:"list-group scroll-card"},[t._l(t.feed,(function(s,i){return e("div",{staticClass:"list-group-item"},[e("a",{staticClass:"text-decoration-none",attrs:{id:"apop_"+s.id,href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",draggable:"false",loading:"lazy",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("span",{staticClass:"text-dark font-weight-bold text-decoration-none",domProps:{innerHTML:t._s(t.getUsername(s))}})]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-muted small text-break"},[t._v("@"+t._s(s.acct))])])])]),t._v(" "),e("b-popover",{attrs:{target:"apop_"+s.id,triggers:"hover",placement:"left",delay:"1000","custom-class":"shadow border-0 rounded-px"}},[e("profile-hover-card",{attrs:{profile:s}})],1)],1)})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("placeholder")],1)],1):t._e(),t._v(" "),t.canLoadMore||t.feed.length?t._e():e("div",[e("div",{staticClass:"list-group-item text-center"},[t.isWarmingCache?e("div",{staticClass:"px-4"},[e("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v("Loading Following...")]),t._v(" "),e("div",{staticClass:"py-3"},[e("b-spinner",{staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{variant:"primary"}})],1),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Please wait while we collect following accounts, this shouldn't take long!")])]):e("p",{staticClass:"mb-0 font-weight-bold"},[t._v("No following anyone yet!")])])])],2):e("div",{staticClass:"list-group"},[e("placeholder")],1)])])])},o=[function(){var t=this._self._c;return t("div",[t("a",{staticClass:"btn btn-dark rounded-pill font-weight-bold spacer-btn",attrs:{href:"#"}},[this._v("Back")])])}]},53577:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-hover-card"},[e("div",{staticClass:"profile-hover-card-inner"},[e("div",{staticClass:"d-flex justify-content-between align-items-start",staticStyle:{"max-width":"240px"}},[e("a",{attrs:{href:t.profile.url},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}},[e("img",{staticClass:"avatar",attrs:{src:t.profile.avatar,width:"50",height:"50",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),t.user.id==t.profile.id?e("div",[e("a",{staticClass:"btn btn-outline-primary px-3 py-1 font-weight-bold rounded-pill",attrs:{href:"/settings/home"}},[t._v("Edit Profile")])]):t._e(),t._v(" "),t.user.id!=t.profile.id&&t.relationship?e("div",[t.relationship.following?e("button",{staticClass:"btn btn-outline-primary px-3 py-1 font-weight-bold rounded-pill",attrs:{disabled:t.isLoading},on:{click:function(e){return t.performUnfollow()}}},[t.isLoading?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Following")])]):e("div",[t.relationship.requested?e("button",{staticClass:"btn btn-primary primary px-3 py-1 font-weight-bold rounded-pill",attrs:{disabled:""}},[t._v("Follow Requested")]):e("button",{staticClass:"btn btn-primary primary px-3 py-1 font-weight-bold rounded-pill",attrs:{disabled:t.isLoading},on:{click:function(e){return t.performFollow()}}},[t.isLoading?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Follow")])])])]):t._e()]),t._v(" "),e("p",{staticClass:"display-name"},[e("a",{attrs:{href:t.profile.url},domProps:{innerHTML:t._s(t.getDisplayName())},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}})]),t._v(" "),e("div",{staticClass:"username"},[e("a",{staticClass:"username-link",attrs:{href:t.profile.url},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}},[t._v("\n\t\t\t\t@"+t._s(t.getUsername())+"\n\t\t\t")]),t._v(" "),t.user.id!=t.profile.id&&t.relationship&&t.relationship.followed_by?e("p",{staticClass:"username-follows-you"},[e("span",[t._v("Follows You")])]):t._e()]),t._v(" "),t.profile.hasOwnProperty("pronouns")&&t.profile.pronouns&&t.profile.pronouns.length?e("p",{staticClass:"pronouns"},[t._v("\n\t\t\t"+t._s(t.profile.pronouns.join(", "))+"\n\t\t")]):t._e(),t._v(" "),e("p",{staticClass:"bio",domProps:{innerHTML:t._s(t.bio)}}),t._v(" "),e("p",{staticClass:"stats"},[e("span",{staticClass:"stats-following"},[e("span",{staticClass:"following-count"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" Following\n\t\t\t")]),t._v(" "),e("span",{staticClass:"stats-followers"},[e("span",{staticClass:"followers-count"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" Followers\n\t\t\t")])])])])},o=[]},59100:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-sidebar-component"},[e("div",[e("div",{staticClass:"d-block d-md-none"},[e("div",{staticClass:"media user-card user-select-none"},[e("div",{staticStyle:{position:"relative"}},[e("img",{staticClass:"avatar shadow cursor-pointer",attrs:{src:t.profile.avatar,draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"display-name",domProps:{innerHTML:t._s(t.getDisplayName())}}),t._v(" "),e("p",{staticClass:"username",class:{remote:!t.profile.local}},[t.profile.local?e("span",[t._v("@"+t._s(t.profile.acct))]):e("a",{staticClass:"primary",attrs:{href:t.profile.url}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),t.profile.locked?e("span",[e("i",{staticClass:"fal fa-lock ml-1 fa-sm text-lighter"})]):t._e()]),t._v(" "),e("div",{staticClass:"stats"},[e("div",{staticClass:"stats-posts",on:{click:function(e){return t.toggleTab("index")}}},[e("div",{staticClass:"posts-count"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v(" "),e("div",{staticClass:"stats-label"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.$t("profile.posts"))+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"stats-followers",on:{click:function(e){return t.toggleTab("followers")}}},[e("div",{staticClass:"followers-count"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" "),e("div",{staticClass:"stats-label"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.$t("profile.followers"))+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"stats-following",on:{click:function(e){return t.toggleTab("following")}}},[e("div",{staticClass:"following-count"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" "),e("div",{staticClass:"stats-label"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.$t("profile.following"))+"\n\t\t\t\t\t\t\t\t")])])])])])]),t._v(" "),e("div",{staticClass:"d-none d-md-flex justify-content-between align-items-center"},[e("button",{staticClass:"btn btn-link",on:{click:function(e){return t.goBack()}}},[e("i",{staticClass:"far fa-chevron-left fa-lg text-lighter"})]),t._v(" "),e("div",[e("img",{staticClass:"avatar img-fluid shadow border",attrs:{src:t.getAvatar(),onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}}),t._v(" "),t.profile.is_admin?e("p",{staticClass:"text-right",staticStyle:{"margin-top":"-30px"}},[e("span",{staticClass:"admin-label"},[t._v("Admin")])]):t._e()]),t._v(" "),e("b-dropdown",{attrs:{variant:"link",right:"","no-caret":""},scopedSlots:t._u([{key:"button-content",fn:function(){return[e("i",{staticClass:"far fa-lg fa-cog text-lighter"})]},proxy:!0}])},[t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.goToOldProfile()}}},[t._v("View in old UI")]):t._e(),t._v(" "),e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.copyTextToClipboard(t.profile.url)}}},[t._v("Copy Link")]),t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"/users/"+t.profile.username+".atom","link-class":"font-weight-bold"}},[t._v("Atom feed")]):t._e(),t._v(" "),t.profile.id==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{href:"/settings/home","link-class":"font-weight-bold"}},[e("i",{staticClass:"far fa-cog mr-1"}),t._v(" Settings\n\t\t\t\t\t\t")])],1):e("div",[t.profile.local?t._e():e("b-dropdown-item",{attrs:{href:t.profile.url,"link-class":"font-weight-bold"}},[t._v("View Remote Profile")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/web/direct/thread/"+t.profile.id,"link-class":"font-weight-bold"}},[t._v("Direct Message")])],1),t._v(" "),t.profile.id!==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleMute()}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.relationship.muting?"Unmute":"Mute")+"\n\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleBlock()}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.relationship.blocking?"Unblock":"Block")+"\n\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/report?type=user&id="+t.profile.id,"link-class":"text-danger font-weight-bold"}},[t._v("Report")])],1):t._e()],1)],1),t._v(" "),e("div",{staticClass:"d-none d-md-block text-center"},[e("p",{staticClass:"display-name",domProps:{innerHTML:t._s(t.getDisplayName())}}),t._v(" "),e("p",{staticClass:"username",class:{remote:!t.profile.local}},[t.profile.local?e("span",[t._v("@"+t._s(t.profile.acct))]):e("a",{staticClass:"primary",attrs:{href:t.profile.url}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),t.profile.locked?e("span",[e("i",{staticClass:"fal fa-lock ml-1 fa-sm text-lighter"})]):t._e()]),t._v(" "),t.user.id!=t.profile.id&&(t.relationship.followed_by||t.relationship.muting||t.relationship.blocking)?e("p",{staticClass:"mt-n3 text-center"},[t.relationship.followed_by?e("span",{staticClass:"badge badge-primary p-1"},[t._v("Follows you")]):t._e(),t._v(" "),t.relationship.muting?e("span",{staticClass:"badge badge-dark p-1 ml-1"},[t._v("Muted")]):t._e(),t._v(" "),t.relationship.blocking?e("span",{staticClass:"badge badge-danger p-1 ml-1"},[t._v("Blocked")]):t._e()]):t._e()]),t._v(" "),e("div",{staticClass:"d-none d-md-block stats py-2"},[e("div",{staticClass:"d-flex justify-content-between"},[e("button",{staticClass:"btn btn-link stat-item",on:{click:function(e){return t.toggleTab("index")}}},[e("strong",{attrs:{title:t.profile.statuses_count}},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v(" "),e("span",[t._v(t._s(t.$t("profile.posts")))])]),t._v(" "),e("button",{staticClass:"btn btn-link stat-item",on:{click:function(e){return t.toggleTab("followers")}}},[e("strong",{attrs:{title:t.profile.followers_count}},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" "),e("span",[t._v(t._s(t.$t("profile.followers")))])]),t._v(" "),e("button",{staticClass:"btn btn-link stat-item",on:{click:function(e){return t.toggleTab("following")}}},[e("strong",{attrs:{title:t.profile.following_count}},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" "),e("span",[t._v(t._s(t.$t("profile.following")))])])])]),t._v(" "),e("div",{staticClass:"d-flex align-items-center mb-3 mb-md-0"},[t.user.id===t.profile.id?e("div",{staticStyle:{"flex-grow":"1"}},[e("a",{staticClass:"btn btn-light font-weight-bold btn-block follow-btn",attrs:{href:"/settings/home"}},[t._v(t._s(t.$t("profile.editProfile")))]),t._v(" "),t.profile.locked?t._e():e("a",{staticClass:"btn btn-light font-weight-bold btn-block follow-btn mt-md-n4",attrs:{href:"/i/web/my-portfolio"}},[t._v("\n My Portfolio\n "),e("span",{staticClass:"badge badge-success ml-1"},[t._v("NEW")])])]):t.profile.hasOwnProperty("moved")&&t.profile.moved.id?e("div",{staticStyle:{"flex-grow":"1"}},[e("div",{staticClass:"card shadow-none rounded-lg mb-3 bg-danger"},[e("div",{staticClass:"card-body"},[t._m(0),t._v(" "),e("p",{staticClass:"mb-0 lead ft-std text-white text-break"},[e("router-link",{staticClass:"btn btn-outline-light btn-block rounded-pill font-weight-bold",attrs:{to:"/i/web/profile/".concat(t.profile.moved.id)}},[t._v("@"+t._s(t.truncate(t.profile.moved.acct)))])],1)])])]):t.profile.locked?e("div",{staticStyle:{"flex-grow":"1"}},[t.relationship.following||t.relationship.requested?t.relationship.requested?e("div",[e("button",{staticClass:"btn btn-primary font-weight-bold btn-block follow-btn",attrs:{disabled:""}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("profile.followRequested"))+"\n\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"small font-weight-bold text-center mt-n4"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.cancelFollowRequest()}}},[t._v("Cancel Follow Request")])])]):t.relationship.following?e("button",{staticClass:"btn btn-primary font-weight-bold btn-block unfollow-btn",on:{click:t.unfollow}},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.unfollow"))+"\n\t\t\t\t\t")]):t._e():[e("button",{staticClass:"btn btn-primary font-weight-bold btn-block follow-btn",attrs:{disabled:t.relationship.blocking},on:{click:t.follow}},[t._v("\n\t\t\t\t\t\t\tRequest Follow\n\t\t\t\t\t\t")]),t._v(" "),t.relationship.blocking?e("p",{staticClass:"mt-n4 text-lighter",staticStyle:{"font-size":"11px"}},[t._v("You need to unblock this account before you can request to follow.")]):t._e()]],2):e("div",{staticStyle:{"flex-grow":"1"}},[t.relationship.following?e("button",{staticClass:"btn btn-primary font-weight-bold btn-block unfollow-btn",on:{click:t.unfollow}},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.unfollow"))+"\n\t\t\t\t\t")]):[e("button",{staticClass:"btn btn-primary font-weight-bold btn-block follow-btn",attrs:{disabled:t.relationship.blocking},on:{click:t.follow}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("profile.follow"))+"\n\t\t\t\t\t\t")]),t._v(" "),t.relationship.blocking?e("p",{staticClass:"mt-n4 text-lighter",staticStyle:{"font-size":"11px"}},[t._v("You need to unblock this account before you can follow.")]):t._e()]],2),t._v(" "),e("div",{staticClass:"d-block d-md-none ml-3"},[e("b-dropdown",{attrs:{variant:"link",right:"","no-caret":""},scopedSlots:t._u([{key:"button-content",fn:function(){return[e("i",{staticClass:"far fa-lg fa-cog text-lighter"})]},proxy:!0}])},[t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.goToOldProfile()}}},[t._v("View in old UI")]):t._e(),t._v(" "),e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.copyTextToClipboard(t.profile.url)}}},[t._v("Copy Link")]),t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"/users/"+t.profile.username+".atom","link-class":"font-weight-bold"}},[t._v("Atom feed")]):t._e(),t._v(" "),t.profile.id==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{href:"/settings/home","link-class":"font-weight-bold"}},[e("i",{staticClass:"far fa-cog mr-1"}),t._v(" Settings\n\t\t\t\t\t\t\t")])],1):e("div",[t.profile.local?t._e():e("b-dropdown-item",{attrs:{href:t.profile.url,"link-class":"font-weight-bold"}},[t._v("View Remote Profile")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/web/direct/thread/"+t.profile.id,"link-class":"font-weight-bold"}},[t._v("Direct Message")])],1),t._v(" "),t.profile.id!==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleMute()}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.relationship.muting?"Unmute":"Mute")+"\n\t\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleBlock()}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.relationship.blocking?"Unblock":"Block")+"\n\t\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/report?type=user&id="+t.profile.id,"link-class":"text-danger font-weight-bold"}},[t._v("Report")])],1):t._e()],1)],1)]),t._v(" "),t.profile.note&&t.renderedBio&&t.renderedBio.length?e("div",{staticClass:"bio-wrapper card shadow-none"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"bio-body"},[e("div",{domProps:{innerHTML:t._s(t.renderedBio)}})])])]):t._e(),t._v(" "),e("div",{staticClass:"d-none d-md-block card card-body shadow-none py-2"},[t.profile.website?e("p",{staticClass:"small"},[t._m(1),t._v(" "),e("span",[e("a",{staticClass:"font-weight-bold",attrs:{href:t.profile.website}},[t._v(t._s(t.profile.website))])])]):t._e(),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._m(2),t._v(" "),t.profile.local?e("span",[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.joined"))+" "+t._s(t.getJoinedDate())+"\n\t\t\t\t\t")]):e("span",[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.joined"))+" "+t._s(t.getJoinedDate())+"\n\n\t\t\t\t\t\t"),e("span",{staticClass:"float-right primary"},[e("i",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"far fa-info-circle",attrs:{title:"This user is from a remote server and may have created their account before this date"}})])])])]),t._v(" "),e("div",{staticClass:"d-none d-md-flex sidebar-sitelinks"},[e("a",{attrs:{href:"/site/about"}},[t._v(t._s(t.$t("navmenu.about")))]),t._v(" "),e("router-link",{attrs:{to:"/i/web/help"}},[t._v(t._s(t.$t("navmenu.help")))]),t._v(" "),e("router-link",{attrs:{to:"/i/web/language"}},[t._v(t._s(t.$t("navmenu.language")))]),t._v(" "),e("a",{attrs:{href:"/site/terms"}},[t._v(t._s(t.$t("navmenu.privacy")))]),t._v(" "),e("a",{attrs:{href:"/site/terms"}},[t._v(t._s(t.$t("navmenu.terms")))])],1),t._v(" "),t._m(3)]),t._v(" "),e("b-modal",{ref:"fullBio",attrs:{centered:"","hide-footer":"","ok-only":"","ok-title":"Close","ok-variant":"light",scrollable:!0,"body-class":"p-md-5",title:"Bio"}},[e("div",{domProps:{innerHTML:t._s(t.profile.note)}})])],1)},o=[function(){var t=this._self._c;return t("div",{staticClass:"d-flex align-items-center ft-std text-white mb-2"},[t("i",{staticClass:"far fa-exclamation-triangle mr-2 text-white"}),this._v("\n Account has moved to:\n ")])},function(){var t=this._self._c;return t("span",{staticClass:"text-lighter mr-2"},[t("i",{staticClass:"far fa-link"})])},function(){var t=this._self._c;return t("span",{staticClass:"text-lighter mr-2"},[t("i",{staticClass:"far fa-clock"})])},function(){var t=this._self._c;return t("div",{staticClass:"d-none d-md-block sidebar-attribution"},[t("a",{staticClass:"font-weight-bold",attrs:{href:"https://pixelfed.org"}},[this._v("Powered by Pixelfed")])])}]},23875:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[1==t.status.sensitive?e("div",{staticClass:"content-label-wrapper"},[e("div",{staticClass:"text-light content-label"},[t._m(0),t._v(" "),e("p",{staticClass:"h4 font-weight-bold text-center"},[t._v("\n Sensitive Content\n ")]),t._v(" "),e("p",{staticClass:"text-center py-2 content-label-text"},[t._v("\n "+t._s(t.status.spoiler_text?t.status.spoiler_text:"This post may contain sensitive content.")+"\n ")]),t._v(" "),e("p",{staticClass:"mb-0"},[e("button",{staticClass:"btn btn-outline-light btn-block btn-sm font-weight-bold",on:{click:function(e){t.status.sensitive=!1}}},[t._v("See Post")])])])]):[t.shouldPlay?[t.hasHls?e("video",{ref:"video",class:{fixedHeight:t.fixedHeight},staticStyle:{margin:"0"},attrs:{playsinline:"",controls:"",autoplay:"false",poster:t.getPoster(t.status)}}):e("video",{staticClass:"card-img-top shadow",class:{fixedHeight:t.fixedHeight},staticStyle:{"border-radius":"15px","object-fit":"contain","background-color":"#000"},attrs:{autoplay:"false",controls:"",poster:t.getPoster(t.status)}},[e("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])]:e("div",{staticClass:"content-label-wrapper",style:{background:"linear-gradient(rgba(0, 0, 0, 0.2),rgba(0, 0, 0, 0.8)),url(".concat(t.getPoster(t.status),")"),backgroundSize:"cover"}},[e("div",{staticClass:"text-light content-label"},[e("p",{staticClass:"mb-0"},[e("button",{staticClass:"btn btn-link btn-block btn-sm font-weight-bold",on:{click:function(e){return e.preventDefault(),t.handleShouldPlay.apply(null,arguments)}}},[e("i",{staticClass:"fas fa-play fa-5x text-white"})])])])])]],2)},o=[function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"far fa-eye-slash fa-2x"})])}]},49247:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-timeline-component[data-v-5efd4702]{margin-bottom:10rem}",""]);const a=o},35296:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,'.timeline-status-component{margin-bottom:1rem}.timeline-status-component .btn:focus{box-shadow:none!important}.timeline-status-component .avatar{border-radius:15px}.timeline-status-component .VueCarousel-wrapper .VueCarousel-slide img{-o-object-fit:contain;object-fit:contain}.timeline-status-component .status-text{z-index:3}.timeline-status-component .reaction-liked-by,.timeline-status-component .status-text.py-0{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.timeline-status-component .reaction-liked-by{font-size:11px;font-weight:600}.timeline-status-component .location,.timeline-status-component .timestamp,.timeline-status-component .visibility{color:#94a3b8;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.timeline-status-component .invisible{display:none}.timeline-status-component .blurhash-wrapper img{border-radius:0;-o-object-fit:cover;object-fit:cover}.timeline-status-component .blurhash-wrapper canvas{border-radius:0}.timeline-status-component .content-label-wrapper{background-color:#000;border-radius:0;height:400px;overflow:hidden;position:relative;width:100%}.timeline-status-component .content-label-wrapper canvas,.timeline-status-component .content-label-wrapper img{cursor:pointer;max-height:400px}.timeline-status-component .content-label{align-items:center;background:rgba(0,0,0,.2);border-radius:0;display:flex;flex-direction:column;height:100%;justify-content:center;margin:0;position:absolute;width:100%;z-index:2}.timeline-status-component .rounded-bottom{border-bottom-left-radius:15px!important;border-bottom-right-radius:15px!important}.timeline-status-component .card-footer .media{position:relative}.timeline-status-component .card-footer .media .comment-border-link{background-clip:padding-box;background-color:#e5e7eb;border-left:4px solid transparent;border-right:4px solid transparent;display:block;height:calc(100% - 100px);left:11px;position:absolute;top:40px;width:10px}.timeline-status-component .card-footer .media .comment-border-link:hover{background-color:#bfdbfe}.timeline-status-component .card-footer .media .child-reply-form{position:relative}.timeline-status-component .card-footer .media .comment-border-arrow{background-clip:padding-box;background-color:#e5e7eb;border-bottom:2px solid transparent;border-left:4px solid transparent;border-right:4px solid transparent;display:block;height:29px;left:-33px;position:absolute;top:-6px;width:10px}.timeline-status-component .card-footer .media .comment-border-arrow:after{background-color:#e5e7eb;content:"";display:block;height:2px;left:2px;position:absolute;top:25px;width:15px}.timeline-status-component .card-footer .media-status{margin-bottom:1.3rem}.timeline-status-component .card-footer .media-avatar{border-radius:8px;margin-right:12px}.timeline-status-component .card-footer .media-body-comment{background-color:var(--comment-bg);border-radius:.9rem;padding:.4rem .7rem;width:-moz-fit-content;width:fit-content}.timeline-status-component .card-footer .media-body-comment-username{color:var(--body-color);font-size:14px;font-weight:700!important;margin-bottom:.25rem!important}.timeline-status-component .card-footer .media-body-comment-username a{color:var(--body-color);text-decoration:none}.timeline-status-component .card-footer .media-body-comment-content{font-size:16px;margin-bottom:0}.timeline-status-component .card-footer .media-body-reactions{color:#b8c2cc!important;font-size:12px;margin-bottom:0!important;margin-top:.4rem!important}.timeline-status-component .fixedHeight{max-height:400px}.timeline-status-component .fixedHeight .VueCarousel-wrapper{border-radius:15px}.timeline-status-component .fixedHeight .VueCarousel-slide img{max-height:400px}.timeline-status-component .fixedHeight .blurhash-wrapper img{background-color:transparent;height:400px;max-height:400px;-o-object-fit:contain;object-fit:contain}.timeline-status-component .fixedHeight .blurhash-wrapper canvas{max-height:400px}.timeline-status-component .fixedHeight .content-label-wrapper{border-radius:15px}.timeline-status-component .fixedHeight .content-label{border-radius:0;height:400px}',""]);const a=o},35518:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".app-drawer-component .nav-link{padding:.5rem .1rem}.app-drawer-component .nav-link.active{background-color:transparent}.app-drawer-component .nav-link.router-link-exact-active{background-color:transparent;color:var(--primary)!important}.app-drawer-component .nav-link p{margin-bottom:0}.app-drawer-component .nav-link-label{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:10px;font-weight:700;margin-top:0;opacity:.6;text-transform:uppercase}",""]);const a=o},34857:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,'.post-comment-drawer-feed{margin-bottom:1rem}.post-comment-drawer-feed .sort-menu .dropdown{border-radius:18px}.post-comment-drawer-feed .sort-menu .dropdown-menu{padding:0}.post-comment-drawer-feed .sort-menu .dropdown-item:active{background-color:inherit}.post-comment-drawer-feed .sort-menu .title{color:var(--dropdown-item-color)}.post-comment-drawer-feed .sort-menu .description{color:var(--dropdown-item-color);font-size:12px;margin-bottom:0}.post-comment-drawer-feed .sort-menu .active .title{color:var(--dropdown-item-active-color);font-weight:600}.post-comment-drawer-feed .sort-menu .active .description{color:var(--dropdown-item-active-color)}.post-comment-drawer-feed-loader{align-items:center;display:flex;height:200px;justify-content:center}.post-comment-drawer .media-body-comment{min-width:240px;position:relative}.post-comment-drawer .media-body-wrapper .media-body-comment{padding:.7rem}.post-comment-drawer .media-body-wrapper .media-body-likes-count{background-color:var(--body-bg);border-radius:15px;bottom:-10px;font-size:12px;font-weight:600;padding:1px 8px;position:absolute;right:-5px;text-decoration:none;-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;z-index:3}.post-comment-drawer .media-body-wrapper .media-body-likes-count i{margin-right:3px}.post-comment-drawer .media-body-wrapper .media-body-likes-count .count{color:#334155}.post-comment-drawer .media-body-show-replies{font-size:13px;margin-bottom:5px;margin-top:-5px}.post-comment-drawer .media-body-show-replies a{align-items:center;display:flex;text-decoration:none}.post-comment-drawer .media-body-show-replies-icon{display:inline-block;font-family:Font Awesome\\ 5 Free;font-style:normal;font-variant:normal;font-weight:400;line-height:1;margin-right:.25rem;padding-left:.5rem;text-decoration:none;text-rendering:auto;transform:rotate(90deg)}.post-comment-drawer .media-body-show-replies-icon:before{content:"\\f148"}.post-comment-drawer .media-body-show-replies-label{padding-top:9px}.post-comment-drawer-loadmore{font-size:.7875rem}.post-comment-drawer .reply-form-input{flex:1;position:relative}.post-comment-drawer .reply-form-input-actions{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.post-comment-drawer .reply-form-input-actions.open{top:85%;transform:translateY(-85%)}.post-comment-drawer .child-reply-form{position:relative}.post-comment-drawer .bh-comment{height:auto;max-height:260px!important;max-width:160px!important;position:relative;width:100%}.post-comment-drawer .bh-comment .img-fluid,.post-comment-drawer .bh-comment canvas{border-radius:8px}.post-comment-drawer .bh-comment img,.post-comment-drawer .bh-comment span{height:auto;max-height:260px!important;max-width:160px!important;width:100%}.post-comment-drawer .bh-comment img{border-radius:8px;-o-object-fit:cover;object-fit:cover}.post-comment-drawer .bh-comment.bh-comment-borderless{border-radius:8px;margin-bottom:5px;overflow:hidden}.post-comment-drawer .bh-comment.bh-comment-borderless .img-fluid,.post-comment-drawer .bh-comment.bh-comment-borderless canvas,.post-comment-drawer .bh-comment.bh-comment-borderless img{border-radius:0}.post-comment-drawer .bh-comment .sensitive-warning{background:rgba(0,0,0,.4);border-radius:8px;color:#fff;cursor:pointer;left:50%;padding:5px;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.post-comment-drawer .v-tribute{width:100%}',""]);const a=o},49777:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".img-contain img{-o-object-fit:contain;object-fit:contain}",""]);const a=o},24304:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-feed-component{margin-top:0}.profile-feed-component .ph-wrapper{padding:.25rem}.profile-feed-component .ph-wrapper .ph-item{background-color:transparent;border:none;margin:0;padding:0}.profile-feed-component .ph-wrapper .ph-item .ph-picture{border-radius:5px;height:auto;padding-bottom:100%}.profile-feed-component .ph-wrapper .ph-item>*{margin-bottom:0}.profile-feed-component .info-overlay-text-field{font-size:13.5px;margin-bottom:2px}@media (min-width:768px){.profile-feed-component .info-overlay-text-field{font-size:20px;margin-bottom:15px}}.profile-feed-component .video-overlay-badge{color:var(--dark);opacity:.6;padding-bottom:1px;position:absolute;right:10px;top:10px}.profile-feed-component .timestamp-overlay-badge{bottom:10px;opacity:.6;position:absolute;right:10px}.profile-feed-component .profile-nav-btns{margin-right:1rem}.profile-feed-component .profile-nav-btns .btn-group{min-height:45px}.profile-feed-component .profile-nav-btns .btn-link{border-radius:0;color:var(--text-lighter);font-size:14px;font-weight:700;margin-right:1rem}.profile-feed-component .profile-nav-btns .btn-link:hover{color:var(--text-muted);text-decoration:none}.profile-feed-component .profile-nav-btns .btn-link.active{border-bottom:1px solid var(--dark);color:var(--dark);transition:border-bottom .25s ease-in-out}.profile-feed-component .layout-sort-toggle .btn{border:none}.profile-feed-component .layout-sort-toggle .btn.btn-light{opacity:.4}",""]);const a=o},46058:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-followers-component .list-group-item{border:none}.profile-followers-component .list-group-item:not(:last-child){border-bottom:1px solid rgba(0,0,0,.125)}.profile-followers-component .scroll-card{-ms-overflow-style:none;max-height:calc(100vh - 250px);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:none}.profile-followers-component .scroll-card::-webkit-scrollbar{display:none}.profile-followers-component .spacer-btn{opacity:0;pointer-events:none}",""]);const a=o},92519:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-following-component .list-group-item{border:none}.profile-following-component .list-group-item:not(:last-child){border-bottom:1px solid rgba(0,0,0,.125)}.profile-following-component .scroll-card{-ms-overflow-style:none;max-height:calc(100vh - 250px);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:none}.profile-following-component .scroll-card::-webkit-scrollbar{display:none}.profile-following-component .spacer-btn{opacity:0;pointer-events:none}",""]);const a=o},93100:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-hover-card{border:none;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;overflow:hidden;padding:.5rem;width:300px}.profile-hover-card .avatar{border-radius:15px;box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important;margin-bottom:.5rem}.profile-hover-card .display-name{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:16px;font-weight:800;font-weight:800!important;line-height:.8;margin-bottom:2px;margin-top:5px;max-width:240px;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}.profile-hover-card .display-name a{color:var(--body-color);text-decoration:none}.profile-hover-card .username{font-size:12px;font-weight:700;margin-bottom:.6rem;margin-top:0;max-width:240px;overflow:hidden;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}.profile-hover-card .username-link{color:var(--text-lighter);margin-right:4px;text-decoration:none}.profile-hover-card .username-follows-you{margin:4px 0}.profile-hover-card .username-follows-you span{background-color:var(--comment-bg);border-radius:6px;color:var(--dropdown-item-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:12px;font-weight:500;line-height:16px;padding:2px 4px}.profile-hover-card .pronouns{color:#9ca3af;font-size:11px;font-weight:600;margin-bottom:.6rem;margin-top:-.8rem}.profile-hover-card .bio{color:var(--body-color);font-size:12px;line-height:1.2;margin-bottom:0;max-height:60px;max-width:240px;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.profile-hover-card .bio .invisible{display:none}.profile-hover-card .stats{color:var(--body-color);font-size:14px;margin-bottom:0;margin-top:.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.profile-hover-card .stats .stats-following{margin-right:.8rem}.profile-hover-card .stats .followers-count,.profile-hover-card .stats .following-count{font-weight:800}.profile-hover-card .btn.rounded-pill{min-width:80px}",""]);const a=o},34347:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,'.profile-sidebar-component{margin-bottom:1rem}.profile-sidebar-component .avatar{border-radius:15px;margin-bottom:1rem;width:140px}.profile-sidebar-component .display-name{font-size:20px;font-size:15px;font-weight:800!important;line-height:.8;margin-bottom:0;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}.profile-sidebar-component .display-name,.profile-sidebar-component .username{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.profile-sidebar-component .username{color:var(--primary);font-size:14px;font-weight:600}.profile-sidebar-component .username.remote{font-size:11px}.profile-sidebar-component .stats{margin-bottom:1rem}.profile-sidebar-component .stats .stat-item{flex:0 0 33%;margin:0;max-width:33%;padding:0;text-align:center;text-decoration:none}.profile-sidebar-component .stats .stat-item strong{color:var(--body-color);display:block;font-size:18px;line-height:.9}.profile-sidebar-component .stats .stat-item span{color:#b8c2cc;display:block;font-size:12px}@media (min-width:768px){.profile-sidebar-component .follow-btn{margin-bottom:2rem}}.profile-sidebar-component .follow-btn.btn-primary{background-color:var(--primary)}.profile-sidebar-component .follow-btn.btn-light{border-color:var(--input-border)}.profile-sidebar-component .unfollow-btn{background-color:rgba(59,130,246,.7)}@media (min-width:768px){.profile-sidebar-component .unfollow-btn{margin-bottom:2rem}}.profile-sidebar-component .bio-wrapper{margin-bottom:1rem}.profile-sidebar-component .bio-wrapper .bio-body{display:block;font-size:12px!important;position:relative;white-space:pre-wrap}.profile-sidebar-component .bio-wrapper .bio-body .username{font-size:12px!important}.profile-sidebar-component .bio-wrapper .bio-body.long{max-height:80px;overflow:hidden}.profile-sidebar-component .bio-wrapper .bio-body.long:after{background:linear-gradient(180deg,transparent,hsla(0,0%,100%,.9) 60%,#fff 90%);content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:2}.profile-sidebar-component .bio-wrapper .bio-body p{margin-bottom:0!important}.profile-sidebar-component .bio-wrapper .bio-more{position:relative;z-index:3}.profile-sidebar-component .admin-label{background:#fee2e2;border:1px solid #fca5a5;border-radius:8px;color:#b91c1c;display:inline-block;font-size:12px;font-weight:600;padding:1px 5px;text-transform:capitalize}.profile-sidebar-component .sidebar-sitelinks{justify-content:space-between;margin-top:1rem;padding:0}.profile-sidebar-component .sidebar-sitelinks a{color:#b8c2cc;font-size:12px}.profile-sidebar-component .sidebar-sitelinks .active{color:#212529;font-weight:600}.profile-sidebar-component .sidebar-attribution{color:#b8c2cc!important;font-size:12px;margin-top:.5rem}.profile-sidebar-component .sidebar-attribution a{color:#b8c2cc!important}.profile-sidebar-component .user-card{align-items:center}.profile-sidebar-component .user-card .avatar{border:1px solid #e5e7eb;border-radius:15px;height:80px;margin-right:.8rem;width:80px}@media (min-width:390px){.profile-sidebar-component .user-card .avatar{height:100px;width:100px}}.profile-sidebar-component .user-card .avatar-update-btn{background:hsla(0,0%,100%,.9);border:1px solid #dee2e6!important;border-radius:50rem;bottom:0;height:20px;padding:0;position:absolute;right:12px;width:20px}.profile-sidebar-component .user-card .avatar-update-btn-icon{-webkit-font-smoothing:antialiased;display:inline-block;font-family:Font Awesome\\ 5 Free;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-rendering:auto}.profile-sidebar-component .user-card .avatar-update-btn-icon:before{content:"\\f013"}.profile-sidebar-component .user-card .username{font-size:13px;font-weight:600;line-height:12px;margin:4px 0;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}@media (min-width:390px){.profile-sidebar-component .user-card .username{font-size:16px;margin:8px 0}}.profile-sidebar-component .user-card .display-name{color:var(--body-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:20px;font-weight:800!important;line-height:.8;margin-bottom:0;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}@media (min-width:390px){.profile-sidebar-component .user-card .display-name{font-size:24px}}.profile-sidebar-component .user-card .stats{display:flex;flex-direction:row;font-size:16px;justify-content:space-between;margin-bottom:0;margin-top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.profile-sidebar-component .user-card .stats .followers-count,.profile-sidebar-component .user-card .stats .following-count,.profile-sidebar-component .user-card .stats .posts-count{display:flex;font-weight:800}.profile-sidebar-component .user-card .stats .stats-label{color:#94a3b8;font-size:11px;margin-top:-5px}',""]);const a=o},16626:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(49247),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},209:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(35296),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},96259:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(35518),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},48432:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(34857),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},22626:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(49777),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},94219:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(24304),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},51423:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(46058),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},15134:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(92519),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},67621:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(93100),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},31526:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(34347),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},85566:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(37465),o=s(37253),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(24817);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,"5efd4702",null).exports},20591:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(40296),o=s(62392),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},58741:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(17310);const o=(0,s(14486).default)({},i.render,i.staticRenderFns,!1,null,null,null).exports},35547:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(59028),o=s(52548),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(86546);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},5787:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(16286),o=s(80260),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(68840);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},13090:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(54229),o=s(13514),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},20243:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(34727),o=s(88012),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(21883);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},72028:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(46098),o=s(93843),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},19138:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(44982),o=s(43509),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},57103:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(87058),o=s(64672),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},49986:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(32785),o=s(79577),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(67011);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},29787:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(68329);const o=(0,s(14486).default)({},i.render,i.staticRenderFns,!1,null,null,null).exports},59515:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(4607),o=s(38972),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},79110:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(5458),o=s(99369),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},84800:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(43047),o=s(6119),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},27821:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(99421),o=s(28934),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},50294:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(95728),o=s(33417),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},99681:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(9836),o=s(22350),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},62457:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(58532),o=s(19894),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(56930);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},36470:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(7432),o=s(83593),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(94608);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},99234:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(57783),o=s(54293),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(16201);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},34719:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(38888),o=s(42260),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(88814);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},99487:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(75637),o=s(71212),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(18405);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},75938:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(30506),o=s(42909),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},37253:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(21801),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},62392:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(66655),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},52548:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(56987),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},80260:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(50371),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},13514:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(25054),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},88012:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(3211),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},93843:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(24758),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},43509:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(85100),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},64672:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(49415),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},79577:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(37844),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},38972:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(67975),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},99369:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(61746),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},6119:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(22434),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},28934:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(99397),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},33417:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(6140),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},22350:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(85679),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},19894:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(24603),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},83593:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(19306),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},54293:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(79654),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},42260:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(3223),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},71212:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(82683),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},42909:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(68910),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},37465:(t,e,s)=>{"use strict";s.r(e);var i=s(59300),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},40296:(t,e,s)=>{"use strict";s.r(e);var i=s(98221),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},17310:(t,e,s)=>{"use strict";s.r(e);var i=s(24853),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},59028:(t,e,s)=>{"use strict";s.r(e);var i=s(70201),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},16286:(t,e,s)=>{"use strict";s.r(e);var i=s(69831),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},54229:(t,e,s)=>{"use strict";s.r(e);var i=s(82960),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},34727:(t,e,s)=>{"use strict";s.r(e);var i=s(55318),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},46098:(t,e,s)=>{"use strict";s.r(e);var i=s(54309),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},44982:(t,e,s)=>{"use strict";s.r(e);var i=s(82285),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},87058:(t,e,s)=>{"use strict";s.r(e);var i=s(62399),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},32785:(t,e,s)=>{"use strict";s.r(e);var i=s(27934),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},68329:(t,e,s)=>{"use strict";s.r(e);var i=s(7971),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},4607:(t,e,s)=>{"use strict";s.r(e);var i=s(92162),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},5458:(t,e,s)=>{"use strict";s.r(e);var i=s(79911),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},43047:(t,e,s)=>{"use strict";s.r(e);var i=s(44516),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},99421:(t,e,s)=>{"use strict";s.r(e);var i=s(51992),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},95728:(t,e,s)=>{"use strict";s.r(e);var i=s(16331),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},9836:(t,e,s)=>{"use strict";s.r(e);var i=s(66295),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},58532:(t,e,s)=>{"use strict";s.r(e);var i=s(66831),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},7432:(t,e,s)=>{"use strict";s.r(e);var i=s(48281),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},57783:(t,e,s)=>{"use strict";s.r(e);var i=s(29594),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},38888:(t,e,s)=>{"use strict";s.r(e);var i=s(53577),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},75637:(t,e,s)=>{"use strict";s.r(e);var i=s(59100),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},30506:(t,e,s)=>{"use strict";s.r(e);var i=s(23875),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},24817:(t,e,s)=>{"use strict";s.r(e);var i=s(16626),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},86546:(t,e,s)=>{"use strict";s.r(e);var i=s(209),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},68840:(t,e,s)=>{"use strict";s.r(e);var i=s(96259),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},21883:(t,e,s)=>{"use strict";s.r(e);var i=s(48432),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},67011:(t,e,s)=>{"use strict";s.r(e);var i=s(22626),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},56930:(t,e,s)=>{"use strict";s.r(e);var i=s(94219),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},94608:(t,e,s)=>{"use strict";s.r(e);var i=s(51423),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},16201:(t,e,s)=>{"use strict";s.r(e);var i=s(15134),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},88814:(t,e,s)=>{"use strict";s.r(e);var i=s(67621),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},18405:(t,e,s)=>{"use strict";s.r(e);var i=s(31526),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},11220:()=>{},16052:()=>{},40295:()=>{},89858:()=>{},45187:()=>{},87919:()=>{},40264:()=>{},80434:()=>{},18053:()=>{}}]); \ No newline at end of file +(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[8087],{21801:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>l});var i=s(5787),o=s(62457),a=s(99487),n=s(36470),r=s(99234);const l={props:{id:{type:String},profileId:{type:String},username:{type:String},cachedProfile:{type:Object},cachedUser:{type:Object}},components:{drawer:i.default,"profile-feed":o.default,"profile-sidebar":a.default,"profile-followers":n.default,"profile-following":r.default},data:function(){return{isLoaded:!1,curUser:void 0,tab:"index",profile:void 0,relationship:void 0,showMoved:!1}},mounted:function(){this.init()},watch:{$route:"init"},methods:{init:function(){this.tab="index",this.isLoaded=!1,this.relationship=void 0,this.owner=!1,this.cachedProfile&&this.cachedUser?(this.curUser=this.cachedUser,this.profile=this.cachedProfile,this.fetchRelationship()):(this.curUser=window._sharedData.user,this.fetchProfile())},getTabComponentName:function(){return"index"===this.tab?"profile-feed":"profile-".concat(this.tab)},fetchProfile:function(){var t=this,e=this.profileId?this.profileId:this.id;axios.get("/api/pixelfed/v1/accounts/"+e).then((function(e){t.profile=e.data,e.data.id==t.curUser.id?(t.owner=!0,t.fetchRelationship()):(t.owner=!1,t.fetchRelationship())})).catch((function(e){t.$router.push("/i/web/404")}))},fetchRelationship:function(){var t=this;if(this.owner)return this.relationship={},void(this.isLoaded=!0);axios.get("/api/v1/accounts/relationships",{params:{"id[]":this.profile.id}}).then((function(e){t.relationship=e.data[0],t.isLoaded=!0}))},toggleTab:function(t){this.tab=t},goBack:function(){this.$router.go(-1)},unfollow:function(){var t=this;axios.post("/api/v1/accounts/"+this.profile.id+"/unfollow").then((function(e){t.$store.commit("updateRelationship",[e.data]),t.relationship=e.data,t.profile.locked&&location.reload(),t.profile.followers_count--})).catch((function(e){swal("Oops!","An error occured when attempting to unfollow this account.","error"),t.relationship.following=!0}))},follow:function(){var t=this;axios.post("/api/v1/accounts/"+this.profile.id+"/follow").then((function(e){t.$store.commit("updateRelationship",[e.data]),t.relationship=e.data,t.profile.locked&&(t.relationship.requested=!0),t.profile.followers_count++})).catch((function(e){swal("Oops!","An error occured when attempting to follow this account.","error"),t.relationship.following=!1}))},updateRelationship:function(t){this.relationship=t}}}},66655:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(95341);const o={props:{hash:{type:String,required:!0},width:{type:[Number,String],default:32},height:{type:[Number,String],default:32},punch:{type:Number,default:1}},mounted:function(){this.draw()},updated:function(){},beforeDestroy:function(){},methods:{parseNumber:function(t){return"number"==typeof t?t:parseInt(t,10)},draw:function(){var t=this.parseNumber(this.width),e=this.parseNumber(this.height),s=this.parseNumber(this.punch),o=(0,i.decode)(this.hash,t,e,s),a=this.$refs.canvas.getContext("2d"),n=a.createImageData(t,e);n.data.set(o),a.putImageData(n,0,0)}}}},56987:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(20243),o=s(84800),a=s(79110),n=s(27821);const r={props:{status:{type:Object},profile:{type:Object},reactionBar:{type:Boolean,default:!0},useDropdownMenu:{type:Boolean,default:!1}},components:{"comment-drawer":i.default,"post-content":a.default,"post-header":o.default,"post-reactions":n.default},data:function(){return{key:1,menuLoading:!0,sensitive:!1,showCommentDrawer:!1,isReblogging:!1,isBookmarking:!1,owner:!1,admin:!1,license:!1}},mounted:function(){var t=this;this.license=!(!this.shadowStatus.media_attachments||!this.shadowStatus.media_attachments.length)&&this.shadowStatus.media_attachments.filter((function(t){return t.hasOwnProperty("license")&&t.license&&t.license.hasOwnProperty("id")})).map((function(t){return t.license}))[0],this.admin=window._sharedData.user.is_admin,this.owner=this.shadowStatus.account.id==window._sharedData.user.id,this.shadowStatus.reply_count&&this.autoloadComments&&!1===this.shadowStatus.comments_disabled&&setTimeout((function(){t.showCommentDrawer=!0}),1e3)},computed:{hideCounts:{get:function(){return 1==this.$store.state.hideCounts}},fixedHeight:{get:function(){return 1==this.$store.state.fixedHeight}},autoloadComments:{get:function(){return 1==this.$store.state.autoloadComments}},newReactions:{get:function(){return this.$store.state.newReactions}},isReblog:{get:function(){return null!=this.status.reblog}},reblogAccount:{get:function(){return this.status.reblog?this.status.account:null}},shadowStatus:{get:function(){return this.status.reblog?this.status.reblog:this.status}}},watch:{status:{deep:!0,immediate:!0,handler:function(t,e){this.isBookmarking=!1}}},methods:{openMenu:function(){this.$emit("menu")},like:function(){this.$emit("like")},unlike:function(){this.$emit("unlike")},showLikes:function(){this.$emit("likes-modal")},showShares:function(){this.$emit("shares-modal")},showComments:function(){this.showCommentDrawer=!this.showCommentDrawer},copyLink:function(){event.currentTarget.blur(),App.util.clipboard(this.status.url)},shareToOther:function(){navigator.canShare?navigator.share({url:this.status.url}).then((function(){return console.log("Share was successful.")})).catch((function(t){return console.log("Sharing failed",t)})):swal("Not supported","Your current device does not support native sharing.","error")},counterChange:function(t){this.$emit("counter-change",t)},showCommentLikes:function(t){this.$emit("comment-likes-modal",t)},shareStatus:function(){this.$emit("share")},unshareStatus:function(){this.$emit("unshare")},handleReport:function(t){this.$emit("handle-report",t)},follow:function(){this.$emit("follow")},unfollow:function(){this.$emit("unfollow")},handleReblog:function(){var t=this;this.isReblogging=!0,this.status.reblogged?this.$emit("unshare"):this.$emit("share"),setTimeout((function(){t.isReblogging=!1}),5e3)},handleBookmark:function(){var t=this;event.currentTarget.blur(),this.isBookmarking=!0,this.$emit("bookmark"),setTimeout((function(){t.isBookmarking=!1}),5e3)},getStatusAvatar:function(){return window._sharedData.user.id==this.status.account.id?window._sharedData.user.avatar:this.status.account.avatar},openModTools:function(){this.$emit("mod-tools")}}}},50371:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={data:function(){return{user:window._sharedData.user}}}},25054:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{status:{type:Object,default:{}}},data:function(){return{statusId:void 0,tabIndex:0,showFull:!1}},methods:{open:function(){this.$refs.modal.show()},close:function(){var t=this;this.$refs.modal.hide(),setTimeout((function(){t.tabIndex=0}),1e3)},handleReason:function(t){var e=this;this.tabIndex=2,axios.post("/i/report",{id:this.status.id,report:t,type:"post"}).then((function(t){e.tabIndex=3})).catch((function(t){e.tabIndex=5}))}}}},3211:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>l});var i=s(79288),o=s(50294),a=s(34719),n=s(72028),r=s(19138);const l={props:{status:{type:Object}},components:{VueTribute:i.default,ReadMore:o.default,ProfileHoverCard:a.default,CommentReplyForm:r.default,CommentReplies:n.default},data:function(){return{profile:window._sharedData.user,ids:[],feed:[],sortIndex:0,sorts:["all","newest","popular"],replyContent:void 0,nextUrl:void 0,canLoadMore:!1,isPostingReply:!1,showReplyOptions:!1,feedLoading:!1,isUploading:!1,uploadProgress:0,lightboxStatus:null,settings:{expanded:!1,sensitive:!1},tributeSettings:{noMatchTemplate:null,collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){e(),console.log(t)}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){e(),console.log(t)}))}}]},showEmptyRepliesRefresh:!1,commentReplyIndex:void 0,deletingIndex:void 0}},mounted:function(){this.fetchContext()},computed:{hideCounts:{get:function(){return 1==this.$store.state.hideCounts}}},methods:{fetchContext:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),e.data&&e.data.data&&(e.data.data.length||!t.status.reply_count)||(t.showEmptyRepliesRefresh=!0)}))},fetchMore:function(){var t,e=this,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;event&&(null===(t=event.target)||void 0===t||t.blur());this.nextUrl&&axios.get(this.nextUrl,{params:{limit:s,sort:this.sorts[this.sortIndex]}}).then((function(t){e.feedLoading=!1,t.data.next||(e.canLoadMore=!1),e.nextUrl=t.data.next,t.data.data.forEach((function(t){e.ids&&-1==e.ids.indexOf(t.id)&&(e.ids.push(t.id),e.feed.push(t))}))}))},fetchSortedFeed:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,sort:this.sorts[this.sortIndex]}}).then((function(e){t.feed=e.data.data,t.nextUrl=e.data.next,t.feedLoading=!1}))},forceRefresh:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,refresh_cache:!0}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),t.showEmptyRepliesRefresh=!1}))},timeago:function(t){return App.util.format.timeAgo(t)},prettyCount:function(t){return App.util.format.count(t)},goToPost:function(t){this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},storeComment:function(){var t=this;this.isPostingReply=!0,axios.post("/api/v1/statuses",{status:this.replyContent,in_reply_to_id:this.status.id,sensitive:this.settings.sensitive}).then((function(e){var s=e.data;s.replies=[],t.replyContent=void 0,t.isPostingReply=!1,t.ids.push(e.data.id),t.feed.push(s),t.$emit("counter-change","comment-increment")}))},toggleSort:function(t){this.$refs.sortMenu.hide(),this.feedLoading=!0,this.sortIndex=t,this.fetchSortedFeed()},deleteComment:function(t){var e=this;event.currentTarget.blur(),window.confirm(this.$t("menu.deletePostConfirm"))&&(this.deletingIndex=t,axios.post("/i/delete",{type:"status",item:this.feed[t].id}).then((function(s){e.ids&&e.ids.length&&e.ids.splice(t,1),e.feed&&e.feed.length&&e.feed.splice(t,1),e.$emit("counter-change","comment-decrement")})).then((function(){e.deletingIndex=void 0,e.fetchMore(1)})))},showLikesModal:function(t){this.$emit("show-likes",this.feed[t])},reportComment:function(t){this.$emit("handle-report",this.feed[t])},likeComment:function(t){event.currentTarget.blur();var e=this.feed[t],s=e.favourites_count,i=e.favourited;this.feed[t].favourited=!this.feed[t].favourited,this.feed[t].favourites_count=i?s-1:s+1,axios.post("/api/v1/statuses/"+e.id+"/"+(i?"unfavourite":"favourite")).then((function(t){}))},toggleShowReplyOptions:function(){event.currentTarget.blur(),this.showReplyOptions=!this.showReplyOptions},replyUpload:function(){event.currentTarget.blur(),this.$refs.fileInput.click()},handleImageUpload:function(){var t=this;if(this.$refs.fileInput.files.length){this.isUploading=!0;var e=new FormData;e.append("file",this.$refs.fileInput.files[0]),axios.post("/api/v1/media",e).then((function(e){axios.post("/api/v1/statuses",{status:t.replyContent,media_ids:[e.data.id],in_reply_to_id:t.status.id,sensitive:t.settings.sensitive}).then((function(e){t.feed.push(e.data),t.replyContent=void 0,t.isPostingReply=!1,t.ids.push(e.data.id),t.$emit("counter-change","comment-increment")}))}))}},lightbox:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.lightboxStatus=t.media_attachments[e],this.$refs.lightboxModal.show()},hideLightbox:function(){this.lightboxStatus=null,this.$refs.lightboxModal.hide()},blurhashWidth:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?30:20},blurhashHeight:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?20:30},getMediaSource:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=t.media_attachments[e];return s.preview_url.endsWith("storage/no-preview.png")?s.url:s.preview_url},toggleReplyExpand:function(){event.currentTarget.blur(),this.settings.expanded=!this.settings.expanded},toggleCommentReply:function(t){this.commentReplyIndex=t,this.showCommentReplies(t)},showCommentReplies:function(t){if(this.feed[t].hasOwnProperty("replies_show")&&this.feed[t].replies_show)return this.feed[t].replies_show=!1,void(this.commentReplyIndex=void 0);this.feed[t].replies_show=!0,this.commentReplyIndex=t,this.fetchCommentReplies(t)},hideCommentReplies:function(t){this.commentReplyIndex=void 0,this.feed[t].replies_show=!1},fetchCommentReplies:function(t){var e=this;axios.get("/api/v2/statuses/"+this.feed[t].id+"/replies",{params:{limit:3}}).then((function(s){e.feed[t].replies=s.data.data}))},getPostAvatar:function(t){return this.profile.id==t.account.id?window._sharedData.user.avatar:t.account.avatar},follow:function(t){var e=this;axios.post("/api/v1/accounts/"+this.feed[t].account.id+"/follow").then((function(s){e.$store.commit("updateRelationship",[s.data]),e.feed[t].account.followers_count=e.feed[t].account.followers_count+1,window._sharedData.user.following_count=window._sharedData.user.following_count+1}))},unfollow:function(t){var e=this;axios.post("/api/v1/accounts/"+this.feed[t].account.id+"/unfollow").then((function(s){e.$store.commit("updateRelationship",[s.data]),e.feed[t].account.followers_count=e.feed[t].account.followers_count-1,window._sharedData.user.following_count=window._sharedData.user.following_count-1}))},handleCounterChange:function(t){this.$emit("counter-change",t)},pushCommentReply:function(t,e){this.feed[t].hasOwnProperty("replies")?this.feed[t].replies.push(e):this.feed[t].replies=[e],this.feed[t].reply_count=this.feed[t].reply_count+1,this.feed[t].replies_show=!0},replyCounterChange:function(t,e){switch(e){case"comment-increment":this.feed[t].reply_count=this.feed[t].reply_count+1;break;case"comment-decrement":this.feed[t].reply_count=this.feed[t].reply_count-1}}}}},24758:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(50294);const o={props:{status:{type:Object},feed:{type:Array}},components:{ReadMore:i.default},data:function(){return{loading:!0,profile:window._sharedData.user,ids:[],nextUrl:void 0,canLoadMore:!1}},watch:{feed:{deep:!0,immediate:!0,handler:function(t,e){this.loading=!1}}},methods:{fetchContext:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),e.data&&e.data.data&&(e.data.data.length||!t.status.reply_count)||(t.showEmptyRepliesRefresh=!0)}))},fetchMore:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;axios.get(this.nextUrl,{params:{limit:e,sort:this.sorts[this.sortIndex]}}).then((function(e){t.feedLoading=!1,e.data.next||(t.canLoadMore=!1),t.nextUrl=e.data.next,e.data.data.forEach((function(e){-1==t.ids.indexOf(e.id)&&(t.ids.push(e.id),t.feed.push(e))}))}))},fetchSortedFeed:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,sort:this.sorts[this.sortIndex]}}).then((function(e){t.feed=e.data.data,t.nextUrl=e.data.next,t.feedLoading=!1}))},forceRefresh:function(){var t=this;axios.get("/api/v2/statuses/"+this.status.id+"/replies",{params:{limit:3,refresh_cache:!0}}).then((function(e){e.data.next&&(t.nextUrl=e.data.next,t.canLoadMore=!0),e.data.data.forEach((function(e){t.ids.push(e.id),t.feed.push(e)})),t.showEmptyRepliesRefresh=!1}))},timeago:function(t){return App.util.format.timeAgo(t)},prettyCount:function(t){return App.util.format.count(t)},goToPost:function(t){this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},storeComment:function(){var t=this;this.isPostingReply=!0,axios.post("/api/v1/statuses",{status:this.replyContent,in_reply_to_id:this.status.id,sensitive:this.settings.sensitive}).then((function(e){t.replyContent=void 0,t.isPostingReply=!1,t.ids.push(e.data.id),t.feed.push(e.data),t.$emit("new-comment",e.data)}))},toggleSort:function(t){this.$refs.sortMenu.hide(),this.feedLoading=!0,this.sortIndex=t,this.fetchSortedFeed()},deleteComment:function(t){var e=this;event.currentTarget.blur(),window.confirm(this.$t("menu.deletePostConfirm"))&&axios.post("/i/delete",{type:"status",item:this.feed[t].id}).then((function(s){e.feed.splice(t,1),e.$emit("counter-change","comment-decrement"),e.fetchMore(1)})).catch((function(t){}))},showLikesModal:function(t){this.$emit("show-likes",this.feed[t])},reportComment:function(t){this.$emit("handle-report",this.feed[t])},likeComment:function(t){event.currentTarget.blur();var e=this.feed[t],s=e.favourites_count,i=e.favourited;this.feed[t].favourited=!this.feed[t].favourited,this.feed[t].favourites_count=i?s-1:s+1,axios.post("/api/v1/statuses/"+e.id+"/"+(i?"unfavourite":"favourite")).then((function(t){}))},toggleShowReplyOptions:function(){event.currentTarget.blur(),this.showReplyOptions=!this.showReplyOptions},replyUpload:function(){event.currentTarget.blur(),this.$refs.fileInput.click()},handleImageUpload:function(){var t=this;if(this.$refs.fileInput.files.length){this.isUploading=!0;var e=new FormData;e.append("file",this.$refs.fileInput.files[0]),axios.post("/api/v1/media",e).then((function(e){axios.post("/api/v1/statuses",{media_ids:[e.data.id],in_reply_to_id:t.status.id,sensitive:t.settings.sensitive}).then((function(e){t.feed.push(e.data)}))}))}},lightbox:function(t){this.lightboxStatus=t.media_attachments[0],this.$refs.lightboxModal.show()},hideLightbox:function(){this.lightboxStatus=null,this.$refs.lightboxModal.hide()},blurhashWidth:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?30:20},blurhashHeight:function(t){if(!t.media_attachments[0].meta)return 25;var e=t.media_attachments[0].meta.original.aspect;return 1==e?25:e>1?20:30},getMediaSource:function(t){var e=t.media_attachments[0];return e.preview_url.endsWith("storage/no-preview.png")?e.url:e.preview_url},toggleReplyExpand:function(){event.currentTarget.blur(),this.settings.expanded=!this.settings.expanded},toggleCommentReply:function(t){this.commentReplyIndex=t}}}},85100:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{parentId:{type:String}},data:function(){return{config:App.config,isPostingReply:!1,replyContent:"",profile:window._sharedData.user,sensitive:!1}},methods:{storeComment:function(){var t=this;this.isPostingReply=!0,axios.post("/api/v1/statuses",{status:this.replyContent,in_reply_to_id:this.parentId,sensitive:this.sensitive}).then((function(e){t.replyContent=void 0,t.isPostingReply=!1,t.$emit("new-comment",e.data)}))}}}},49415:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(74692);const o={props:["status","profile"],data:function(){return{config:window.App.config,ctxMenuStatus:!1,ctxMenuRelationship:!1,ctxEmbedPayload:!1,copiedEmbed:!1,replySending:!1,ctxEmbedShowCaption:!0,ctxEmbedShowLikes:!1,ctxEmbedCompactMode:!1,confirmModalTitle:"Are you sure?",confirmModalIdentifer:null,confirmModalType:!1,isDeleting:!1}},watch:{ctxEmbedShowCaption:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var s=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.ctxMenuStatus.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,s)},ctxEmbedShowLikes:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var s=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.ctxMenuStatus.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,s)},ctxEmbedCompactMode:function(t,e){1==t&&(this.ctxEmbedShowCaption=!1,this.ctxEmbedShowLikes=!1);var s=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.ctxMenuStatus.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,s)}},methods:{open:function(){this.ctxMenu()},openModMenu:function(){this.$refs.ctxModModal.show()},ctxMenu:function(){this.ctxMenuStatus=this.status,this.ctxEmbedPayload=window.App.util.embed.post(this.status.url),this.ctxMenuRelationship=!1,this.$refs.ctxModal.show()},closeCtxMenu:function(){this.copiedEmbed=!1,this.ctxMenuStatus=!1,this.ctxMenuRelationship=!1,this.$refs.ctxModal.hide(),this.$refs.ctxReport.hide(),this.$refs.ctxReportOther.hide(),this.closeModals()},ctxMenuCopyLink:function(){var t=this.ctxMenuStatus;navigator.clipboard.writeText(t.url),this.closeModals()},ctxMenuGoToPost:function(){var t=this.ctxMenuStatus;this.statusUrl(t),this.closeCtxMenu()},ctxMenuGoToProfile:function(){var t=this.ctxMenuStatus;this.profileUrl(t),this.closeCtxMenu()},ctxMenuReportPost:function(){this.$refs.ctxModal.hide(),this.$emit("report-modal",this.ctxMenuStatus)},ctxMenuEmbed:function(){this.closeModals(),this.$refs.ctxEmbedModal.show()},ctxMenuShare:function(){this.$refs.ctxModal.hide(),this.$refs.ctxShareModal.show()},closeCtxShareMenu:function(){this.$refs.ctxShareModal.hide(),this.$refs.ctxModal.show()},ctxCopyEmbed:function(){navigator.clipboard.writeText(this.ctxEmbedPayload),this.ctxEmbedShowCaption=!0,this.ctxEmbedShowLikes=!1,this.ctxEmbedCompactMode=!1,this.$refs.ctxEmbedModal.hide()},ctxModMenuShow:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.show()},ctxModOtherMenuShow:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.hide(),this.$refs.ctxModOtherModal.show()},ctxModMenu:function(){this.$refs.ctxModal.hide()},ctxModMenuClose:function(){this.closeModals()},ctxModOtherMenuClose:function(){this.closeModals(),this.$refs.ctxModModal.show()},formatCount:function(t){return App.util.format.count(t)},openCtxReportOtherMenu:function(){var t=this.ctxMenuStatus;this.closeCtxMenu(),this.ctxMenuStatus=t,this.$refs.ctxReportOther.show()},ctxReportMenuGoBack:function(){this.$refs.ctxReportOther.hide(),this.$refs.ctxReport.hide(),this.$refs.ctxModal.show()},ctxReportOtherMenuGoBack:function(){this.$refs.ctxReportOther.hide(),this.$refs.ctxModal.hide(),this.$refs.ctxReport.show()},sendReport:function(t){var e=this,s=this.ctxMenuStatus.id;swal({title:this.$t("menu.confirmReport"),text:this.$t("menu.confirmReportText"),icon:"warning",buttons:!0,dangerMode:!0}).then((function(i){i?axios.post("/i/report/",{report:t,type:"post",id:s}).then((function(t){e.closeCtxMenu(),swal(e.$t("menu.reportSent"),e.$t("menu.reportSentText"),"success")})).catch((function(t){swal(e.$t("common.oops"),e.$t("menu.reportSentError"),"error")})):e.closeCtxMenu()}))},closeModals:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.hide(),this.$refs.ctxModOtherModal.hide(),this.$refs.ctxShareModal.hide(),this.$refs.ctxEmbedModal.hide(),this.$refs.ctxReport.hide(),this.$refs.ctxReportOther.hide(),this.$refs.ctxConfirm.hide()},openCtxStatusModal:function(){this.closeModals(),this.$refs.ctxStatusModal.show()},openConfirmModal:function(){this.closeModals(),this.$refs.ctxConfirm.show()},closeConfirmModal:function(){this.closeModals(),this.confirmModalTitle="Are you sure?",this.confirmModalType=!1,this.confirmModalIdentifer=null},confirmModalConfirm:function(){var t=this;if("post.delete"===this.confirmModalType)axios.post("/i/delete",{type:"status",item:this.confirmModalIdentifer}).then((function(e){t.feed=t.feed.filter((function(e){return e.id!=t.confirmModalIdentifer})),t.closeConfirmModal()})).catch((function(e){t.closeConfirmModal(),swal(t.$t("common.error"),t.$t("common.errorMsg"),"error")}));this.closeConfirmModal()},confirmModalCancel:function(){this.closeConfirmModal()},moderatePost:function(t,e,s){var i=this,o=(t.account.username,t.id,""),a=this;switch(e){case"addcw":o=this.$t("menu.modAddCWConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){swal(i.$t("common.success"),i.$t("menu.modCWSuccess"),"success"),i.$emit("moderate","addcw"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}));break;case"remcw":o=this.$t("menu.modRemoveCWConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){swal(i.$t("common.success"),i.$t("menu.modRemoveCWSuccess"),"success"),i.$emit("moderate","remcw"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}));break;case"unlist":o=this.$t("menu.modUnlistConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){i.$emit("moderate","unlist"),swal(i.$t("common.success"),i.$t("menu.modUnlistSuccess"),"success"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}));break;case"spammer":o=this.$t("menu.modMarkAsSpammerConfirm"),swal({title:"Confirm",text:o,icon:"warning",buttons:!0,dangerMode:!0}).then((function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then((function(t){i.$emit("moderate","spammer"),swal(i.$t("common.success"),i.$t("menu.modMarkAsSpammerSuccess"),"success"),a.closeModals(),a.ctxModMenuClose()})).catch((function(t){a.closeModals(),a.ctxModMenuClose(),swal(i.$t("common.error"),i.$t("common.errorMsg"),"error")}))}))}},shareStatus:function(t,e){var s=this;0!=i("body").hasClass("loggedIn")&&(this.closeModals(),axios.post("/i/share",{item:t.id}).then((function(e){t.reblogs_count=e.data.count,t.reblogged=!t.reblogged})).catch((function(t){swal(s.$t("common.error"),s.$t("common.errorMsg"),"error")})))},statusUrl:function(t){if(1!=t.account.local)return this.$route.params.hasOwnProperty("id")?void(location.href=t.url):void this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}});this.$router.push({name:"post",path:"/i/web/post/".concat(t.id),params:{id:t.id,cachedStatus:t,cachedProfile:this.profile}})},profileUrl:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.account.id),params:{id:t.account.id,cachedProfile:t.account,cachedUser:this.profile}})},deletePost:function(t){var e=this;this.isDeleting=!0,0!=this.ownerOrAdmin(t)&&0!=window.confirm(this.$t("menu.deletePostConfirm"))&&axios.post("/i/delete",{type:"status",item:t.id}).then((function(t){e.$emit("delete"),e.closeModals(),e.isDeleting=!1})).catch((function(t){swal(e.$t("common.error"),e.$t("common.errorMsg"),"error")}))},owner:function(t){return this.profile.id===t.account.id},admin:function(){return 1==this.profile.is_admin},ownerOrAdmin:function(t){return this.owner(t)||this.admin()},archivePost:function(t){var e=this;0!=window.confirm(this.$t("menu.archivePostConfirm"))&&axios.post("/api/pixelfed/v2/status/"+t.id+"/archive").then((function(s){e.$emit("status-delete",t.id),e.$emit("archived",t.id),e.closeModals()}))},unarchivePost:function(t){var e=this;0!=window.confirm(this.$t("menu.unarchivePostConfirm"))&&axios.post("/api/pixelfed/v2/status/"+t.id+"/unarchive").then((function(s){e.$emit("unarchived",t.id),e.closeModals()}))},editPost:function(t){this.closeModals(),this.$emit("edit",t)}}}},37844:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{status:{type:Object}},data:function(){return{isOpen:!1,isLoading:!0,allHistory:[],historyIndex:void 0,user:window._sharedData.user}},methods:{open:function(){var t=this;this.isOpen=!0,this.isLoading=!0,this.historyIndex=void 0,this.allHistory=[],setTimeout((function(){t.fetchHistory()}),300)},fetchHistory:function(){var t=this;axios.get("/api/v1/statuses/".concat(this.status.id,"/history")).then((function(e){t.allHistory=e.data})).finally((function(){t.isLoading=!1}))},getDiff:function(t){if(t==this.allHistory.length-1)return this.allHistory[this.allHistory.length-1].content;var e=document.createElement("div");return r.forEach((function(t){var s=t.added?"green":t.removed?"red":"grey",i=document.createElement("span");(i.style.color=s,console.log(t.value,t.value.length),t.added)?t.value.trim().length?i.appendChild(document.createTextNode(t.value)):i.appendChild(document.createTextNode("·")):i.appendChild(document.createTextNode(t.value));e.appendChild(i)})),e.innerHTML},formatTime:function(t){var e=Date.parse(t),s=Math.floor((new Date-e)/1e3),i=Math.floor(s/63072e3);return i<0?"0s":i>=1?i+(1==i?" year":" years")+" ago":(i=Math.floor(s/604800))>=1?i+(1==i?" week":" weeks")+" ago":(i=Math.floor(s/86400))>=1?i+(1==i?" day":" days")+" ago":(i=Math.floor(s/3600))>=1?i+(1==i?" hour":" hours")+" ago":(i=Math.floor(s/60))>=1?i+(1==i?" minute":" minutes")+" ago":Math.floor(s)+" seconds ago"},postType:function(){if(void 0!==this.historyIndex){var t=this.allHistory[this.historyIndex];if(!t)return"text";var e=t.media_attachments;return e&&e.length?1==e.length?e[0].type:"album":"text"}}}}},67975:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(25100),o=s(29787),a=s(24848);const n={props:{status:{type:Object},profile:{type:Object}},components:{intersect:i.default,"like-placeholder":o.default},data:function(){return{isOpen:!1,isLoading:!0,canLoadMore:!1,isFetchingMore:!1,likes:[],ids:[],cursor:void 0,isUpdatingFollowState:!1,followStateIndex:void 0,user:window._sharedData.user}},methods:{clear:function(){this.isOpen=!1,this.isLoading=!0,this.canLoadMore=!1,this.isFetchingMore=!1,this.likes=[],this.ids=[],this.cursor=void 0},fetchLikes:function(){var t=this;axios.get("/api/v1/statuses/"+this.status.id+"/favourited_by",{params:{limit:40,_pe:1}}).then((function(e){if(t.ids=e.data.map((function(t){return t.id})),t.likes=e.data,e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?(t.cursor=s.prev.cursor,t.canLoadMore=!0):t.canLoadMore=!1}else t.canLoadMore=!1;t.isLoading=!1}))},open:function(){this.cursor&&this.clear(),this.isOpen=!0,this.fetchLikes(),this.$refs.likesModal.show()},enterIntersect:function(){var t=this;this.isFetchingMore||(this.isFetchingMore=!0,axios.get("/api/v1/statuses/"+this.status.id+"/favourited_by",{params:{limit:10,cursor:this.cursor,_pe:1}}).then((function(e){if(!e.data||!e.data.length)return t.canLoadMore=!1,void(t.isFetchingMore=!1);if(e.data.forEach((function(e){-1==t.ids.indexOf(e.id)&&(t.ids.push(e.id),t.likes.push(e))})),e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?t.cursor=s.prev.cursor:t.canLoadMore=!1}else t.canLoadMore=!1;t.isFetchingMore=!1})))},getUsername:function(t){return t.display_name?t.display_name:t.username},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},handleFollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/follow").then((function(s){e.likes[t].follows=!0,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))},handleUnfollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/unfollow").then((function(s){e.likes[t].follows=!1,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))}}}},61746:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(18634),o=s(50294),a=s(75938);const n={props:["status"],components:{"read-more":o.default,"video-player":a.default},data:function(){return{key:1,sensitive:!1}},computed:{fixedHeight:{get:function(){return 1==this.$store.state.fixedHeight}}},methods:{toggleLightbox:function(t){(0,i.default)({el:t.target})},toggleContentWarning:function(){this.key++,this.sensitive=!0,this.status.sensitive=!this.status.sensitive},getPoster:function(t){var e=t.media_attachments[0].preview_url;if(!e.endsWith("no-preview.jpg")&&!e.endsWith("no-preview.png"))return e}}}},22434:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(34719),o=s(49986);const a={props:{status:{type:Object},profile:{type:Object},useDropdownMenu:{type:Boolean,default:!1},isReblog:{type:Boolean,default:!1},reblogAccount:{type:Object}},components:{"profile-hover-card":i.default,"edit-history-modal":o.default},data:function(){return{config:window.App.config,menuLoading:!0,owner:!1,admin:!1,license:!1}},methods:{timeago:function(t){var e=App.util.format.timeAgo(t);return e.endsWith("s")||e.endsWith("m")||e.endsWith("h")?e:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}).format(new Date(t))},openMenu:function(){this.$emit("menu")},scopeIcon:function(t){switch(t){case"public":default:return"far fa-globe";case"unlisted":return"far fa-lock-open";case"private":return"far fa-lock"}},scopeTitle:function(t){switch(t){case"public":return"Visible to everyone";case"unlisted":return"Hidden from public feeds";case"private":return"Only visible to followers";default:return""}},goToPost:function(){location.pathname.split("/").pop()!=this.status.id?this.$router.push({name:"post",path:"/i/web/post/".concat(this.status.id),params:{id:this.status.id,cachedStatus:this.status,cachedProfile:this.profile}}):location.href=this.status.local?this.status.url+"?fs=1":this.status.url},goToProfileById:function(t){var e=this;this.$nextTick((function(){e.$router.push({name:"profile",path:"/i/web/profile/".concat(t),params:{id:t,cachedUser:e.profile}})}))},goToProfile:function(){var t=this;this.$nextTick((function(){t.$router.push({name:"profile",path:"/i/web/profile/".concat(t.status.account.id),params:{id:t.status.account.id,cachedProfile:t.status.account,cachedUser:t.profile}})}))},toggleContentWarning:function(){this.key++,this.sensitive=!0,this.status.sensitive=!this.status.sensitive},like:function(){event.currentTarget.blur(),this.status.favourited?this.$emit("unlike"):this.$emit("like")},toggleMenu:function(t){var e=this;setTimeout((function(){e.menuLoading=!1}),500)},closeMenu:function(t){setTimeout((function(){t.target.parentNode.firstElementChild.blur()}),100)},showLikes:function(){event.currentTarget.blur(),this.$emit("likes-modal")},showShares:function(){event.currentTarget.blur(),this.$emit("shares-modal")},showComments:function(){event.currentTarget.blur(),this.showCommentDrawer=!this.showCommentDrawer},copyLink:function(){event.currentTarget.blur(),App.util.clipboard(this.status.url)},shareToOther:function(){navigator.canShare?navigator.share({url:this.status.url}).then((function(){return console.log("Share was successful.")})).catch((function(t){return console.log("Sharing failed",t)})):swal("Not supported","Your current device does not support native sharing.","error")},counterChange:function(t){this.$emit("counter-change",t)},showCommentLikes:function(t){this.$emit("comment-likes-modal",t)},shareStatus:function(){this.$emit("share")},unshareStatus:function(){this.$emit("unshare")},handleReport:function(t){this.$emit("handle-report",t)},follow:function(){this.$emit("follow")},unfollow:function(){this.$emit("unfollow")},handleReblog:function(){var t=this;this.isReblogging=!0,this.status.reblogged?this.$emit("unshare"):this.$emit("share"),setTimeout((function(){t.isReblogging=!1}),5e3)},handleBookmark:function(){var t=this;event.currentTarget.blur(),this.isBookmarking=!0,this.$emit("bookmark"),setTimeout((function(){t.isBookmarking=!1}),5e3)},getStatusAvatar:function(){return window._sharedData.user.id==this.status.account.id?window._sharedData.user.avatar:this.status.account.avatar},openModTools:function(){this.$emit("mod-tools")},openEditModal:function(){this.$refs.editModal.open()}}}},99397:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(20243),o=s(34719);const a={props:{status:{type:Object},profile:{type:Object},admin:{type:Boolean,default:!1}},components:{"comment-drawer":i.default,"profile-hover-card":o.default},data:function(){return{key:1,menuLoading:!0,sensitive:!1,isReblogging:!1,isBookmarking:!1,owner:!1,license:!1}},computed:{hideCounts:{get:function(){return 1==this.$store.state.hideCounts}},autoloadComments:{get:function(){return 1==this.$store.state.autoloadComments}},newReactions:{get:function(){return this.$store.state.newReactions}},likesCount:function(){return this.status.favourites_count},replyCount:function(){return this.status.reply_count}},methods:{count:function(t){return App.util.format.count(t)},like:function(){event.currentTarget.blur(),this.status.favourited?this.$emit("unlike"):this.$emit("like")},showLikes:function(){event.currentTarget.blur(),this.$emit("likes-modal")},showShares:function(){event.currentTarget.blur(),this.$emit("shares-modal")},showComments:function(){event.currentTarget.blur(),this.$emit("toggle-comments")},copyLink:function(){event.currentTarget.blur(),App.util.clipboard(this.status.url)},shareToOther:function(){navigator.canShare?navigator.share({url:this.status.url}).then((function(){return console.log("Share was successful.")})).catch((function(t){return console.log("Sharing failed",t)})):swal("Not supported","Your current device does not support native sharing.","error")},counterChange:function(t){this.$emit("counter-change",t)},showCommentLikes:function(t){this.$emit("comment-likes-modal",t)},handleReblog:function(){var t=this;this.isReblogging=!0,this.status.reblogged?this.$emit("unshare"):this.$emit("share"),setTimeout((function(){t.isReblogging=!1}),5e3)},handleBookmark:function(){var t=this;event.currentTarget.blur(),this.isBookmarking=!0,this.$emit("bookmark"),setTimeout((function(){t.isBookmarking=!1}),2e3)},getStatusAvatar:function(){return window._sharedData.user.id==this.status.account.id?window._sharedData.user.avatar:this.status.account.avatar},openModTools:function(){this.$emit("mod-tools")}}}},6140:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});const i={props:{status:{type:Object},cursorLimit:{type:Number,default:200}},data:function(){return{preRender:void 0,fullContent:null,content:null,cursor:200}},mounted:function(){this.rewriteLinks()},methods:{readMore:function(){this.cursor=this.cursor+200,this.content=this.fullContent.substr(0,this.cursor)},rewriteLinks:function(){var t=this,e=this.status.content,s=document.createElement("div");s.innerHTML=e,s.querySelectorAll('a[class*="hashtag"]').forEach((function(t){var e=t.innerText;"#"==e.substr(0,1)&&(e=e.substr(1)),t.removeAttribute("target"),t.setAttribute("href","/i/web/hashtag/"+e)})),s.querySelectorAll('a:not(.hashtag)[class*="mention"], a:not(.hashtag)[class*="list-slug"]').forEach((function(e){var s=e.innerText;if("@"==s.substr(0,1)&&(s=s.substr(1)),0==t.status.account.local&&!s.includes("@")){var i=document.createElement("a");i.href=e.getAttribute("href"),s=s+"@"+i.hostname}e.removeAttribute("target"),e.setAttribute("href","/i/web/username/"+s)})),this.content=s.outerHTML,this.injectCustomEmoji()},injectCustomEmoji:function(){var t=this;this.status.emojis.forEach((function(e){var s=''.concat(e.shortcode,'');t.content=t.content.replace(":".concat(e.shortcode,":"),s)}))}}}},85679:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(25100),o=s(29787),a=s(24848);const n={props:{status:{type:Object},profile:{type:Object}},components:{intersect:i.default,"like-placeholder":o.default},data:function(){return{isOpen:!1,isLoading:!0,canLoadMore:!1,isFetchingMore:!1,likes:[],ids:[],cursor:void 0,isUpdatingFollowState:!1,followStateIndex:void 0,user:window._sharedData.user}},methods:{clear:function(){this.isOpen=!1,this.isLoading=!0,this.canLoadMore=!1,this.isFetchingMore=!1,this.likes=[],this.ids=[],this.cursor=void 0},fetchShares:function(){var t=this;axios.get("/api/v1/statuses/"+this.status.id+"/reblogged_by",{params:{limit:40,_pe:1}}).then((function(e){if(t.ids=e.data.map((function(t){return t.id})),t.likes=e.data,e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?(t.cursor=s.prev.cursor,t.canLoadMore=!0):t.canLoadMore=!1}else t.canLoadMore=!1;t.isLoading=!1}))},open:function(){this.cursor&&this.clear(),this.isOpen=!0,this.fetchShares(),this.$refs.sharesModal.show()},enterIntersect:function(){var t=this;this.isFetchingMore||(this.isFetchingMore=!0,axios.get("/api/v1/statuses/"+this.status.id+"/reblogged_by",{params:{limit:10,cursor:this.cursor,_pe:1}}).then((function(e){if(!e.data||!e.data.length)return t.canLoadMore=!1,void(t.isFetchingMore=!1);if(e.data.forEach((function(e){-1==t.ids.indexOf(e.id)&&(t.ids.push(e.id),t.likes.push(e))})),e.headers&&e.headers.link){var s=(0,a.parseLinkHeader)(e.headers.link);s.prev?t.cursor=s.prev.cursor:t.canLoadMore=!1}else t.canLoadMore=!1;t.isFetchingMore=!1})))},getUsername:function(t){return t.display_name?t.display_name:t.username},goToProfile:function(t){this.$router.push({name:"profile",path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},handleFollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/follow").then((function(s){e.likes[t].follows=!0,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))},handleUnfollow:function(t){var e=this;event.currentTarget.blur(),this.followStateIndex=t,this.isUpdatingFollowState=!0;var s=this.likes[t];axios.post("/api/v1/accounts/"+s.id+"/unfollow").then((function(s){e.likes[t].follows=!1,e.followStateIndex=void 0,e.isUpdatingFollowState=!1}))}}}},24603:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>h});var i=s(25100),o=s(35547),a=s(58741),n=s(20591),r=s(57103),l=s(59515),c=s(99681),d=s(13090),u=s(24848);function f(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return p(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s0})),i=s.map((function(t){return t.id}));t.ids=i,t.max_id=Math.min.apply(Math,f(i)),s.forEach((function(e){t.feed.push(e)})),setTimeout((function(){t.canLoadMore=e.data.length>1,t.feedLoaded=!0}),500)}))},enterIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/statuses",{params:{limit:9,only_media:!0,max_id:this.max_id}}).then((function(e){e.data&&e.data.length||(t.canLoadMore=!1);var s=e.data.filter((function(t){return t.media_attachments.length>0})).filter((function(e){return-1==t.ids.indexOf(e.id)}));if(!s||!s.length)return t.canLoadMore=!1,void(t.isIntersecting=!1);s.forEach((function(e){e.id=1})).catch((function(e){t.canLoadMore=!1})))},toggleLayout:function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&event.currentTarget.blur(),this.layoutIndex=t,this.isIntersecting=!1},toggleTab:function(t){switch(event.currentTarget.blur(),t){case 1:this.isIntersecting=!1,this.tabIndex=1;break;case 2:this.fetchCollections();break;case 3:this.fetchFavourites();break;case"bookmarks":this.fetchBookmarks();break;case"archives":this.fetchArchives()}},fetchCollections:function(){var t=this;this.collectionsLoaded&&(this.tabIndex=2),axios.get("/api/local/profile/collections/"+this.profile.id).then((function(e){t.collections=e.data,t.collectionsLoaded=!0,t.tabIndex=2,t.collectionsPage++,t.canLoadMoreCollections=9===e.data.length}))},enterCollectionsIntersect:function(){var t=this;this.isCollectionsIntersecting||(this.isCollectionsIntersecting=!0,axios.get("/api/local/profile/collections/"+this.profile.id,{params:{limit:9,page:this.collectionsPage}}).then((function(e){var s;e.data&&e.data.length||(t.canLoadMoreCollections=!1),t.collectionsLoaded=!0,(s=t.collections).push.apply(s,f(e.data)),t.collectionsPage++,t.canLoadMoreCollections=e.data.length>0,t.isCollectionsIntersecting=!1})).catch((function(e){t.canLoadMoreCollections=!1,t.isCollectionsIntersecting=!1})))},fetchFavourites:function(){var t=this;this.tabIndex=0,axios.get("/api/pixelfed/v1/favourites").then((function(e){t.tabIndex=3,t.favourites=e.data,t.favouritesPage++,t.favouritesLoaded=!0,0!=e.data.length&&(t.canLoadMoreFavourites=!0)}))},enterFavouritesIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/pixelfed/v1/favourites",{params:{page:this.favouritesPage}}).then((function(e){var s;(s=t.favourites).push.apply(s,f(e.data)),t.favouritesPage++,t.canLoadMoreFavourites=0!=e.data.length,t.isIntersecting=!1})).catch((function(e){t.canLoadMoreFavourites=!1})))},fetchBookmarks:function(){var t=this;this.tabIndex=0,axios.get("/api/v1/bookmarks",{params:{_pe:1}}).then((function(e){if(t.tabIndex="bookmarks",t.bookmarks=e.data,e.headers&&e.headers.link){var s=(0,u.parseLinkHeader)(e.headers.link);s.next?(t.bookmarksPage=s.next.cursor,t.canLoadMoreBookmarks=!0):t.canLoadMoreBookmarks=!1}t.bookmarksLoaded=!0}))},enterBookmarksIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/v1/bookmarks",{params:{_pe:1,cursor:this.bookmarksPage}}).then((function(e){var s;if((s=t.bookmarks).push.apply(s,f(e.data)),e.headers&&e.headers.link){var i=(0,u.parseLinkHeader)(e.headers.link);i.next?(t.bookmarksPage=i.next.cursor,t.canLoadMoreBookmarks=!0):t.canLoadMoreBookmarks=!1}t.isIntersecting=!1})).catch((function(e){t.canLoadMoreBookmarks=!1})))},fetchArchives:function(){var t=this;this.tabIndex=0,axios.get("/api/pixelfed/v2/statuses/archives").then((function(e){t.tabIndex="archives",t.archives=e.data,t.archivesPage++,t.archivesLoaded=!0,0!=e.data.length&&(t.canLoadMoreArchives=!0)}))},formatCount:function(t){return App.util.format.count(t)},statusUrl:function(t){return"/i/web/post/"+t.id},previewUrl:function(t){return t.sensitive?"/storage/no-preview.png?v="+(new Date).getTime():t.media_attachments[0].url},timeago:function(t){return App.util.format.timeAgo(t)},likeStatus:function(t){var e=this,s=this.feed[t],i=(s.favourited,s.favourites_count);this.feed[t].favourites_count=i+1,this.feed[t].favourited=!s.favourited,axios.post("/api/v1/statuses/"+s.id+"/favourite").catch((function(s){e.feed[t].favourites_count=i,e.feed[t].favourited=!1}))},unlikeStatus:function(t){var e=this,s=this.feed[t],i=(s.favourited,s.favourites_count);this.feed[t].favourites_count=i-1,this.feed[t].favourited=!s.favourited,axios.post("/api/v1/statuses/"+s.id+"/unfavourite").catch((function(s){e.feed[t].favourites_count=i,e.feed[t].favourited=!1}))},openContextMenu:function(t){var e=this;switch(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"feed"){case"feed":this.postIndex=t,this.contextMenuPost=this.feed[t];break;case"archive":this.postIndex=t,this.contextMenuPost=this.archives[t]}this.showMenu=!0,this.$nextTick((function(){e.$refs.contextMenu.open()}))},openLikesModal:function(t){var e=this;this.postIndex=t,this.likesModalPost=this.feed[this.postIndex],this.showLikesModal=!0,this.$nextTick((function(){e.$refs.likesModal.open()}))},openSharesModal:function(t){var e=this;this.postIndex=t,this.sharesModalPost=this.feed[this.postIndex],this.showSharesModal=!0,this.$nextTick((function(){e.$refs.sharesModal.open()}))},commitModeration:function(t){var e=this.postIndex;switch(t){case"addcw":this.feed[e].sensitive=!0;break;case"remcw":this.feed[e].sensitive=!1;break;case"unlist":this.feed.splice(e,1);break;case"spammer":var s=this.feed[e].account.id;this.feed=this.feed.filter((function(t){return t.account.id!=s}))}},counterChange:function(t,e){switch(e){case"comment-increment":this.feed[t].reply_count=this.feed[t].reply_count+1;break;case"comment-decrement":this.feed[t].reply_count=this.feed[t].reply_count-1}},openCommentLikesModal:function(t){var e=this;this.likesModalPost=t,this.showLikesModal=!0,this.$nextTick((function(){e.$refs.likesModal.open()}))},shareStatus:function(t){var e=this,s=this.feed[t],i=(s.reblogged,s.reblogs_count);this.feed[t].reblogs_count=i+1,this.feed[t].reblogged=!s.reblogged,axios.post("/api/v1/statuses/"+s.id+"/reblog").catch((function(s){e.feed[t].reblogs_count=i,e.feed[t].reblogged=!1}))},unshareStatus:function(t){var e=this,s=this.feed[t],i=(s.reblogged,s.reblogs_count);this.feed[t].reblogs_count=i-1,this.feed[t].reblogged=!s.reblogged,axios.post("/api/v1/statuses/"+s.id+"/unreblog").catch((function(s){e.feed[t].reblogs_count=i,e.feed[t].reblogged=!1}))},handleReport:function(t){var e=this;this.reportedStatusId=t.id,this.$nextTick((function(){e.reportedStatus=t,e.$refs.reportModal.open()}))},deletePost:function(){this.feed.splice(this.postIndex,1)},handleArchived:function(t){this.feed.splice(this.postIndex,1)},handleUnarchived:function(t){this.feed=[],this.fetchFeed()},enterArchivesIntersect:function(){var t=this;this.isIntersecting||(this.isIntersecting=!0,axios.get("/api/pixelfed/v2/statuses/archives",{params:{page:this.archivesPage}}).then((function(e){var s;(s=t.archives).push.apply(s,f(e.data)),t.archivesPage++,t.canLoadMoreArchives=0!=e.data.length,t.isIntersecting=!1})).catch((function(e){t.canLoadMoreArchives=!1})))},handleBookmark:function(t){var e=this;if(window.confirm("Are you sure you want to unbookmark this post?")){var s=this.bookmarks[t];axios.post("/i/bookmark",{item:s.id}).then((function(i){e.bookmarks=e.bookmarks.map((function(t){return t.id==s.id&&(t.bookmarked=!1,delete t.bookmarked_at),t})),e.bookmarks.splice(t,1)})).catch((function(t){e.$bvToast.toast("Cannot bookmark post at this time.",{title:"Bookmark Error",variant:"danger",autoHideDelay:5e3})}))}}}}},19306:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>p});var i=s(25100),o=s(29787),a=s(34719),n=s(95353),r=s(24848);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s)?/g,(function(t){var s=t.slice(1,t.length-1),i=e.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):t}))}return s},goToProfile:function(t){this.$router.push({path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},goBack:function(){this.$emit("back")},setCacheWarmTimeout:function(){var t=this;if(this.cacheWarmInterations>=5)return this.isWarmingCache=!1,void swal("Oops","Its taking longer than expected to collect this account followers. Please try again later","error");this.cacheWarmTimeout=setTimeout((function(){t.cacheWarmInterations++,t.fetchFollowers()}),45e3)}}}},79654:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>p});var i=s(25100),o=s(29787),a=s(34719),n=s(95353),r=s(24848);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return d(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s)?/g,(function(t){var s=t.slice(1,t.length-1),i=e.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):t}))}return s},goToProfile:function(t){this.$router.push({path:"/i/web/profile/".concat(t.id),params:{id:t.id,cachedProfile:t,cachedUser:this.profile}})},goBack:function(){this.$emit("back")},setCacheWarmTimeout:function(){var t=this;if(this.cacheWarmInterations>=5)return this.isWarmingCache=!1,void swal("Oops","Its taking longer than expected to collect following accounts. Please try again later","error");this.cacheWarmTimeout=setTimeout((function(){t.cacheWarmInterations++,t.fetchFollowers()}),45e3)}}}},3223:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>l});var i=s(50294),o=s(95353);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function r(t,e,s){var i;return i=function(t,e){if("object"!=a(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var i=s.call(t,e||"default");if("object"!=a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==a(i)?i:String(i))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}const l={props:{profile:{type:Object}},components:{ReadMore:i.default},data:function(){return{user:window._sharedData.user,bio:void 0,isLoading:!1,relationship:void 0}},mounted:function(){var t=this;this.rewriteLinks(),this.relationship=this.$store.getters.getRelationship(this.profile.id),this.relationship||this.profile.id==this.user.id||axios.get("/api/pixelfed/v1/accounts/relationships",{params:{"id[]":this.profile.id}}).then((function(e){t.relationship=e.data[0],t.$store.commit("updateRelationship",e.data)}))},computed:function(t){for(var e=1;e)?/g,(function(e){var s=e.slice(1,e.length-1),i=t.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):e}))}return s},getUsername:function(){return this.profile.acct},formatCount:function(t){return App.util.format.count(t)},goToProfile:function(){this.$router.push({name:"profile",path:"/i/web/profile/".concat(this.profile.id),params:{id:this.profile.id,cachedProfile:this.profile,cachedUser:this.user}})},rewriteLinks:function(){var t=this,e=this.profile.note,s=document.createElement("div");s.innerHTML=e,s.querySelectorAll('a[class*="hashtag"]').forEach((function(t){var e=t.innerText;"#"==e.substr(0,1)&&(e=e.substr(1)),t.removeAttribute("target"),t.setAttribute("href","/i/web/hashtag/"+e)})),s.querySelectorAll('a:not(.hashtag)[class*="mention"], a:not(.hashtag)[class*="list-slug"]').forEach((function(e){var s=e.innerText;if("@"==s.substr(0,1)&&(s=s.substr(1)),0==t.profile.local&&!s.includes("@")){var i=document.createElement("a");i.href=t.profile.url,s=s+"@"+i.hostname}e.removeAttribute("target"),e.setAttribute("href","/i/web/username/"+s)})),this.bio=s.outerHTML},performFollow:function(){var t=this;this.isLoading=!0,this.$emit("follow"),setTimeout((function(){t.relationship.following=!0,t.isLoading=!1}),1e3)},performUnfollow:function(){var t=this;this.isLoading=!0,this.$emit("unfollow"),setTimeout((function(){t.relationship.following=!1,t.isLoading=!1}),1e3)}}}},82683:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(95353);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function n(t,e,s){var i;return i=function(t,e){if("object"!=o(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var i=s.call(t,e||"default");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==o(i)?i:String(i))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}const r={props:{profile:{type:Object},relationship:{type:Object,default:function(){return{following:!1,followed_by:!1}}},user:{type:Object}},computed:function(t){for(var e=1;e)?/g,(function(e){var s=e.slice(1,e.length-1),i=t.getCustomEmoji.filter((function(t){return t.shortcode==s}));return i.length?''.concat(i[0].shortcode,''):e}))}return s},truncate:function(t){if(t)return t.length>15?t.slice(0,15)+"...":t},formatCount:function(t){return App.util.format.count(t)},goBack:function(){this.$emit("back")},showFullBio:function(){this.$refs.fullBio.show()},toggleTab:function(t){event.currentTarget.blur(),["followers","following"].includes(t)?this.$router.push("/i/web/profile/"+this.profile.id+"/"+t):this.$emit("toggletab",t)},getJoinedDate:function(){var t=new Date(this.profile.created_at),e=new Intl.DateTimeFormat("en-US",{month:"long"}).format(t),s=t.getFullYear();return"".concat(e," ").concat(s)},follow:function(){event.currentTarget.blur(),this.$emit("follow")},unfollow:function(){event.currentTarget.blur(),this.$emit("unfollow")},setBio:function(){var t=this;if(this.profile.note.length)if(this.profile.local){var e=this.profile.hasOwnProperty("note_text")?this.profile.note_text:this.profile.note.replace(/(<([^>]+)>)/gi,"");this.renderedBio=window.pftxt.autoLink(e,{usernameUrlBase:"/i/web/profile/@",hashtagUrlBase:"/i/web/hashtag/"})}else{if("

"===this.profile.note)return void(this.renderedBio=null);var s=this.profile.note,i=document.createElement("div");i.innerHTML=s,i.querySelectorAll('a[class*="hashtag"]').forEach((function(t){var e=t.innerText;"#"==e.substr(0,1)&&(e=e.substr(1)),t.removeAttribute("target"),t.setAttribute("href","/i/web/hashtag/"+e)})),i.querySelectorAll('a:not(.hashtag)[class*="mention"], a:not(.hashtag)[class*="list-slug"]').forEach((function(e){var s=e.innerText;if("@"==s.substr(0,1)&&(s=s.substr(1)),0==t.profile.local&&!s.includes("@")){var i=document.createElement("a");i.href=t.profile.url,s=s+"@"+i.hostname}e.removeAttribute("target"),e.setAttribute("href","/i/web/username/"+s)})),this.renderedBio=i.outerHTML}},getAvatar:function(){return this.profile.id==this.user.id?window._sharedData.user.avatar:this.profile.avatar},copyTextToClipboard:function(t){App.util.clipboard(t)},goToOldProfile:function(){this.profile.local?location.href=this.profile.url+"?fs=1":location.href="/i/web/profile/_/"+this.profile.id},handleMute:function(){var t=this,e=this.relationship.muting?"unmuted":"muted",s=1==this.relationship.muting?"/i/unmute":"/i/mute";axios.post(s,{type:"user",item:this.profile.id}).then((function(s){t.$emit("updateRelationship",s.data),swal("Success","You have successfully "+e+" "+t.profile.acct,"success")})).catch((function(t){var e;422===t.response.status?swal({title:"Error",text:null===(e=t.response)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.error,icon:"error",buttons:{review:{text:"Review muted accounts",value:"review",className:"btn-primary"},cancel:!0}}).then((function(t){t&&"review"==t&&(location.href="/settings/privacy/muted-users")})):swal("Error","Something went wrong. Please try again later.","error")}))},handleBlock:function(){var t=this,e=this.relationship.blocking?"unblock":"block",s=1==this.relationship.blocking?"/i/unblock":"/i/block";axios.post(s,{type:"user",item:this.profile.id}).then((function(s){t.$emit("updateRelationship",s.data),swal("Success","You have successfully "+e+"ed "+t.profile.acct,"success")})).catch((function(t){var e;422===t.response.status?swal({title:"Error",text:null===(e=t.response)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.error,icon:"error",buttons:{review:{text:"Review blocked accounts",value:"review",className:"btn-primary"},cancel:!0}}).then((function(t){t&&"review"==t&&(location.href="/settings/privacy/blocked-users")})):swal("Error","Something went wrong. Please try again later.","error")}))},cancelFollowRequest:function(){window.confirm("Are you sure you want to cancel your follow request?")&&(event.currentTarget.blur(),this.$emit("unfollow"))}}}},68910:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(64945),o=(s(34076),s(34330)),a=s.n(o),n=(s(10706),s(71241));const r={props:["status","fixedHeight"],data:function(){return{shouldPlay:!1,hasHls:void 0,hlsConfig:window.App.config.features.hls,liveSyncDurationCount:7,isHlsSupported:!1,isP2PSupported:!1,engine:void 0}},mounted:function(){var t=this;this.$nextTick((function(){t.init()}))},methods:{handleShouldPlay:function(){var t=this;this.shouldPlay=!0,this.isHlsSupported=this.hlsConfig.enabled&&i.default.isSupported(),this.isP2PSupported=this.hlsConfig.enabled&&this.hlsConfig.p2p&&n.Engine.isSupported(),this.$nextTick((function(){t.init()}))},init:function(){var t,e=this;!this.status.sensitive&&null!==(t=this.status.media_attachments[0])&&void 0!==t&&t.hls_manifest&&this.isHlsSupported?(this.hasHls=!0,this.$nextTick((function(){e.initHls()}))):this.hasHls=!1},initHls:function(){var t;if(this.isP2PSupported){var e={loader:{trackerAnnounce:[this.hlsConfig.tracker],rtcConfig:{iceServers:[{urls:[this.hlsConfig.ice]}]}}},s=new n.Engine(e);this.hlsConfig.p2p_debug&&(s.on("peer_connect",(function(t){return console.log("peer_connect",t.id,t.remoteAddress)})),s.on("peer_close",(function(t){return console.log("peer_close",t)})),s.on("segment_loaded",(function(t,e){return console.log("segment_loaded from",e?"peer ".concat(e):"HTTP",t.url)}))),t=s.createLoaderClass()}else t=i.default.DefaultConfig.loader;var o=this.$refs.video,r=this.status.media_attachments[0].hls_manifest,l=(new(a())(o,{captions:{active:!0,update:!0}}),new i.default({liveSyncDurationCount:this.liveSyncDurationCount,loader:t})),c=this;(0,n.initHlsJsPlayer)(l),l.loadSource(r),l.attachMedia(o),l.on(i.default.Events.MANIFEST_PARSED,(function(t,e){this.hlsConfig.debug&&(console.log(t),console.log(e));var s={},n=l.levels.map((function(t){return t.height}));this.hlsConfig.debug&&console.log(n),n.unshift(0),s.quality={default:0,options:n,forced:!0,onChange:function(t){return c.updateQuality(t)}},s.i18n={qualityLabel:{0:"Auto"}},l.on(i.default.Events.LEVEL_SWITCHED,(function(t,e){var s=document.querySelector(".plyr__menu__container [data-plyr='quality'][value='0'] span");l.autoLevelEnabled?s.innerHTML="Auto (".concat(l.levels[e.level].height,"p)"):s.innerHTML="Auto"}));new(a())(o,s)}))},updateQuality:function(t){var e=this;0===t?window.hls.currentLevel=-1:window.hls.levels.forEach((function(s,i){s.height===t&&(e.hlsConfig.debug&&console.log("Found quality match with "+t),window.hls.currentLevel=i)}))},getPoster:function(t){var e=t.media_attachments[0].preview_url;if(!e.endsWith("no-preview.jpg")&&!e.endsWith("no-preview.png"))return e}}}},59300:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-timeline-component"},[t.isLoaded?e("div",{staticClass:"container-fluid mt-3"},[t.profile&&t.profile.hasOwnProperty("moved")&&t.profile.moved.hasOwnProperty("id")&&!t.showMoved?e("div",[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-6"},[t._m(0),t._v(" "),e("div",{staticClass:"card shadow-none border",staticStyle:{"border-radius":"20px"}},[e("div",{staticClass:"card-body ft-std"},[e("div",{staticClass:"d-flex justify-content-between align-items-center",staticStyle:{gap:"1rem"}},[e("div",{staticClass:"d-flex align-items-center flex-shrink-1",staticStyle:{gap:"1rem"}},[e("img",{staticClass:"rounded-circle",attrs:{src:t.profile.moved.avatar,width:"50",height:"50"}}),t._v(" "),e("p",{staticClass:"h3 font-weight-light mb-0 text-break"},[t._v("@"+t._s(t.profile.moved.acct))])]),t._v(" "),e("div",{staticClass:"d-flex flex-grow-1 justify-content-end",staticStyle:{"min-width":"200px"}},[e("router-link",{staticClass:"btn btn-outline-primary rounded-pill font-weight-bold",attrs:{to:"/i/web/profile/".concat(t.profile.moved.id)}},[t._v("View New Account")])],1)])])]),t._v(" "),e("hr"),t._v(" "),e("p",{staticClass:"lead text-center ft-std"},[e("a",{staticClass:"btn btn-primary btn-lg rounded-pill font-weight-bold px-5",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showMoved=!0}}},[t._v("Proceed")])])])])]):e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-3 d-md-block px-md-3 px-xl-5"},[e("profile-sidebar",{attrs:{profile:t.profile,relationship:t.relationship,user:t.curUser},on:{back:t.goBack,toggletab:t.toggleTab,updateRelationship:t.updateRelationship,follow:t.follow,unfollow:t.unfollow}})],1),t._v(" "),e("div",{staticClass:"col-md-8 px-md-5"},[e(t.getTabComponentName(),{key:t.getTabComponentName()+t.profile.id,tag:"component",attrs:{profile:t.profile,relationship:t.relationship}})],1)]),t._v(" "),e("drawer")],1):t._e()])},o=[function(){var t=this._self._c;return t("div",{staticClass:"card shadow-none border card-body mt-5 mb-3 ft-std",staticStyle:{"border-radius":"20px"}},[t("p",{staticClass:"lead font-weight-bold text-center mb-0"},[t("i",{staticClass:"far fa-exclamation-triangle mr-2"}),this._v("This account has indicated their new account is:")])])}]},98221:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this;return(0,t._self._c)("canvas",{ref:"canvas",attrs:{width:t.parseNumber(t.width),height:t.parseNumber(t.height)}})},o=[]},24853:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){this._self._c;return this._m(0)},o=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"ph-item border-0 shadow-sm",staticStyle:{"border-radius":"15px","margin-bottom":"1rem"}},[e("div",{staticClass:"ph-col-12"},[e("div",{staticClass:"ph-row align-items-center"},[e("div",{staticClass:"ph-avatar mr-3 d-flex",staticStyle:{width:"50px",height:"60px","border-radius":"15px"}}),t._v(" "),e("div",{staticClass:"ph-col-6 big"})]),t._v(" "),e("div",{staticClass:"empty"}),t._v(" "),e("div",{staticClass:"empty"}),t._v(" "),e("div",{staticClass:"ph-picture"}),t._v(" "),e("div",{staticClass:"ph-row"},[e("div",{staticClass:"ph-col-12 empty"}),t._v(" "),e("div",{staticClass:"ph-col-12 big"}),t._v(" "),e("div",{staticClass:"ph-col-12 empty"}),t._v(" "),e("div",{staticClass:"ph-col-12"})])])])}]},70201:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"timeline-status-component"},[e("div",{staticClass:"card shadow-sm",staticStyle:{"border-radius":"15px"}},[e("post-header",{attrs:{profile:t.profile,status:t.shadowStatus,"is-reblog":t.isReblog,"reblog-account":t.reblogAccount},on:{menu:t.openMenu,follow:t.follow,unfollow:t.unfollow}}),t._v(" "),e("post-content",{attrs:{profile:t.profile,status:t.shadowStatus}}),t._v(" "),t.reactionBar?e("post-reactions",{attrs:{status:t.shadowStatus,profile:t.profile,admin:t.admin},on:{like:t.like,unlike:t.unlike,share:t.shareStatus,unshare:t.unshareStatus,"likes-modal":t.showLikes,"shares-modal":t.showShares,"toggle-comments":t.showComments,bookmark:t.handleBookmark,"mod-tools":t.openModTools}}):t._e(),t._v(" "),t.showCommentDrawer?e("div",{staticClass:"card-footer rounded-bottom border-0",staticStyle:{background:"rgba(0,0,0,0.02)","z-index":"3"}},[e("comment-drawer",{attrs:{status:t.shadowStatus,profile:t.profile},on:{"handle-report":t.handleReport,"counter-change":t.counterChange,"show-likes":t.showCommentLikes,follow:t.follow,unfollow:t.unfollow}})],1):t._e()],1)])},o=[]},69831:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-drawer-component"},[e("div",{staticClass:"mobile-footer-spacer d-block d-sm-none mt-5"}),t._v(" "),e("div",{staticClass:"mobile-footer d-block d-sm-none fixed-bottom"},[e("div",{staticClass:"card card-body rounded-0 px-0 pt-2 pb-3 box-shadow",staticStyle:{"border-top":"1px solid var(--border-color)"}},[e("ul",{staticClass:"nav nav-pills nav-fill d-flex align-items-middle"},[e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web"}},[e("p",[e("i",{staticClass:"far fa-home fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Home")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/timeline/local"}},[e("p",[e("i",{staticClass:"far fa-stream fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Local")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/compose"}},[e("p",[e("i",{staticClass:"far fa-plus-circle fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("New")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/notifications"}},[e("p",[e("i",{staticClass:"far fa-bell fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Alerts")])])])],1),t._v(" "),e("li",{staticClass:"nav-item"},[e("router-link",{staticClass:"nav-link text-dark",attrs:{to:"/i/web/profile/"+t.user.id}},[e("p",[e("i",{staticClass:"far fa-user fa-lg"})]),t._v(" "),e("p",{staticClass:"nav-link-label"},[e("span",[t._v("Profile")])])])],1)])])])])},o=[]},82960:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("b-modal",{ref:"modal",attrs:{centered:"","hide-header":"","hide-footer":"",scrollable:"","body-class":"p-md-5 user-select-none"}},[0===t.tabIndex?e("div",[e("h2",{staticClass:"text-center font-weight-bold"},[t._v(t._s(t.$t("report.report")))]),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.$t("menu.confirmReportText")))]),t._v(" "),t.status&&t.status.hasOwnProperty("account")?e("div",{staticClass:"card shadow-none rounded-lg border my-4"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 rounded",staticStyle:{"border-radius":"8px"},attrs:{src:t.status.account.avatar,width:"40",height:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"h5 primary font-weight-bold mb-1"},[t._v("\n\t\t\t\t\t\t\t@"+t._s(t.status.account.acct)+"\n\t\t\t\t\t\t")]),t._v(" "),t.status.hasOwnProperty("pf_type")&&"text"==t.status.pf_type?e("div",[t.status.content_text.length<=140?e("p",{staticClass:"mb-0"},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.status.content_text)+"\n\t\t\t\t\t\t\t")]):e("p",{staticClass:"mb-0"},[t.showFull?e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text)+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!1}}},[t._v("Show less")])]):e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text.substr(0,140)+" ...")+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!0}}},[t._v("Show full post")])])])]):t.status.hasOwnProperty("pf_type")&&"photo"==t.status.pf_type?e("div",[e("div",{staticClass:"w-100 rounded-lg d-flex justify-content-center mt-3",staticStyle:{background:"#000","max-height":"150px"}},[e("img",{staticClass:"rounded-lg shadow",staticStyle:{width:"100%","max-height":"150px","object-fit":"contain"},attrs:{src:t.status.media_attachments[0].url}})]),t._v(" "),t.status.content_text?e("p",{staticClass:"mt-3 mb-0"},[t.showFull?e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text)+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!1}}},[t._v("Show less")])]):e("span",[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text.substr(0,80)+" ...")+"\n\t\t\t\t\t\t\t\t\t"),e("a",{staticClass:"font-weight-bold primary ml-1",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showFull=!0}}},[t._v("Show full post")])])]):t._e()]):t._e()])])])]):t._e(),t._v(" "),e("p",{staticClass:"text-right mb-0 mb-md-n3"},[e("button",{staticClass:"btn btn-light px-3 py-2 mr-3 font-weight-bold",on:{click:t.close}},[t._v(t._s(t.$t("common.cancel")))]),t._v(" "),e("button",{staticClass:"btn btn-primary px-3 py-2 font-weight-bold",staticStyle:{"background-color":"#3B82F6"},on:{click:function(e){t.tabIndex=1}}},[t._v(t._s(t.$t("common.proceed")))])])]):1===t.tabIndex?e("div",[e("h2",{staticClass:"text-center font-weight-bold"},[t._v(t._s(t.$t("report.report")))]),t._v(" "),e("p",{staticClass:"text-center"},[t._v("\n\t\t\t"+t._s(t.$t("report.selectReason"))+"\n\t\t")]),t._v(" "),e("div",{staticClass:"mt-4"},[e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold text-danger",on:{click:function(e){return t.handleReason("spam")}}},[t._v(t._s(t.$t("menu.spam")))]),t._v(" "),0==t.status.sensitive?e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold text-danger",on:{click:function(e){return t.handleReason("sensitive")}}},[t._v("Adult or "+t._s(t.$t("menu.sensitive")))]):t._e(),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold text-danger",on:{click:function(e){return t.handleReason("abusive")}}},[t._v(t._s(t.$t("menu.abusive")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold",on:{click:function(e){return t.handleReason("underage")}}},[t._v(t._s(t.$t("menu.underageAccount")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold",on:{click:function(e){return t.handleReason("copyright")}}},[t._v(t._s(t.$t("menu.copyrightInfringement")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill font-weight-bold",on:{click:function(e){return t.handleReason("impersonation")}}},[t._v(t._s(t.$t("menu.impersonation")))]),t._v(" "),e("button",{staticClass:"btn btn-light btn-block rounded-pill mt-md-5",on:{click:function(e){t.tabIndex=0}}},[t._v("Go back")])])]):2===t.tabIndex?e("div",[e("div",{staticClass:"my-4 text-center"},[e("b-spinner"),t._v(" "),e("p",{staticClass:"small mb-0"},[t._v(t._s(t.$t("report.sendingReport"))+" ...")])],1)]):3===t.tabIndex?e("div",[e("div",{staticClass:"my-4"},[e("h2",{staticClass:"text-center font-weight-bold mb-3"},[t._v(t._s(t.$t("report.reported")))]),t._v(" "),e("p",{staticClass:"text-center py-2"},[e("span",{staticClass:"fa-stack fa-4x text-success"},[e("i",{staticClass:"far fa-check fa-stack-1x"}),t._v(" "),e("i",{staticClass:"fal fa-circle fa-stack-2x"})])]),t._v(" "),e("p",{staticClass:"lead text-center"},[t._v(t._s(t.$t("report.thanksMsg")))]),t._v(" "),e("hr"),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.$t("report.contactAdminMsg"))+", "),e("a",{staticClass:"font-weight-bold primary",attrs:{href:"/site/contact"}},[t._v(t._s(t.$t("common.clickHere")))]),t._v(".")])]),t._v(" "),e("p",{staticClass:"text-center mb-0 mb-md-n3"},[e("button",{staticClass:"btn btn-light btn-block rounded-pill px-3 py-2 mr-3 font-weight-bold",on:{click:t.close}},[t._v(t._s(t.$t("common.close")))])])]):5===t.tabIndex?e("div",[e("div",{staticClass:"my-4"},[e("h2",{staticClass:"text-center font-weight-bold mb-3"},[t._v(t._s(t.$t("common.oops")))]),t._v(" "),e("p",{staticClass:"text-center py-2"},[e("span",{staticClass:"fa-stack fa-3x text-danger"},[e("i",{staticClass:"far fa-times fa-stack-1x"}),t._v(" "),e("i",{staticClass:"fal fa-circle fa-stack-2x"})])]),t._v(" "),e("p",{staticClass:"lead text-center"},[t._v(t._s(t.$t("common.errorMsg")))]),t._v(" "),e("hr"),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.$t("report.contactAdminMsg"))+", "),e("a",{staticClass:"font-weight-bold primary",attrs:{href:"/site/contact"}},[t._v(t._s(t.$t("common.clickHere")))]),t._v(".")])]),t._v(" "),e("p",{staticClass:"text-center mb-0 mb-md-n3"},[e("button",{staticClass:"btn btn-light btn-block rounded-pill px-3 py-2 mr-3 font-weight-bold",on:{click:t.close}},[t._v(t._s(t.$t("common.close")))])])]):t._e()])},o=[]},55318:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"post-comment-drawer"},[e("input",{ref:"fileInput",staticClass:"d-none",attrs:{type:"file",accept:"image/jpeg,image/png"},on:{change:t.handleImageUpload}}),t._v(" "),e("div",{staticClass:"post-comment-drawer-feed"},[t.feed.length&&t.feed.length>=1?e("div",{staticClass:"mb-2 sort-menu"},[e("b-dropdown",{ref:"sortMenu",attrs:{size:"sm",variant:"link","toggle-class":"text-decoration-none text-dark font-weight-bold","no-caret":""},scopedSlots:t._u([{key:"button-content",fn:function(){return[t._v("\n\t\t\t\t\t\tShow "+t._s(t.sorts[t.sortIndex])+" comments "),e("i",{staticClass:"far fa-chevron-down ml-1"})]},proxy:!0}],null,!1,1870013648)},[t._v(" "),e("b-dropdown-item",{class:{active:0===t.sortIndex},attrs:{href:"#"},on:{click:function(e){return t.toggleSort(0)}}},[e("p",{staticClass:"title mb-0"},[t._v("All")]),t._v(" "),e("p",{staticClass:"description"},[t._v("All comments in chronological order")])]),t._v(" "),e("b-dropdown-item",{class:{active:1===t.sortIndex},attrs:{href:"#"},on:{click:function(e){return t.toggleSort(1)}}},[e("p",{staticClass:"title mb-0"},[t._v("Newest")]),t._v(" "),e("p",{staticClass:"description"},[t._v("Newest comments appear first")])]),t._v(" "),e("b-dropdown-item",{class:{active:2===t.sortIndex},attrs:{href:"#"},on:{click:function(e){return t.toggleSort(2)}}},[e("p",{staticClass:"title mb-0"},[t._v("Popular")]),t._v(" "),e("p",{staticClass:"description"},[t._v("The most relevant comments appear first")])])],1)],1):t._e(),t._v(" "),t.feedLoading?e("div",{staticClass:"post-comment-drawer-feed-loader"},[e("b-spinner")],1):e("div",[e("transition-group",{attrs:{tag:"div","enter-active-class":"animate__animated animate__fadeIn","leave-active-class":"animate__animated animate__fadeOut",mode:"out-in"}},t._l(t.feed,(function(s,i){return e("div",{key:"cd:"+s.id+":"+i,staticClass:"media media-status align-items-top mb-3",style:{opacity:t.deletingIndex&&t.deletingIndex===i?.3:1}},[e("a",{attrs:{href:"#l"}},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:t.getPostAvatar(s),width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("div",{staticClass:"media-body-wrapper"},[s.media_attachments.length?e("div",[e("div",{class:[s.content&&s.content.length||s.media_attachments.length?"media-body-comment":""]},[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n \t\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n \t\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s.sensitive?e("div",{staticClass:"bh-comment",on:{click:function(t){s.sensitive=!1}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash}}),t._v(" "),e("div",{staticClass:"sensitive-warning"},[e("p",{staticClass:"mb-0"},[e("i",{staticClass:"far fa-eye-slash fa-lg"})]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("Tap to view")])])],1):t._e(),t._v(" "),e("read-more",{staticClass:"mb-1",attrs:{status:s}}),t._v(" "),s.sensitive?t._e():e("div",{staticClass:"bh-comment",class:[s.media_attachments.length>1?"bh-comment-borderless":""],style:{"max-width":s.media_attachments.length>1?"100% !important":"160px","max-height":s.media_attachments.length>1?"100% !important":"260px"}},["image"==s.media_attachments[0].type?e("div",[1==s.media_attachments.length?e("div",[e("div",{on:{click:function(e){return t.lightbox(s)}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash,src:t.getMediaSource(s)}})],1)]):e("div",{staticStyle:{display:"grid","grid-auto-flow":"column",gap:"1px","grid-template-rows":"[row1-start] 50% [row1-end row2-start] 50% [row2-end]","grid-template-columns":"[column1-start] 50% [column1-end column2-start] 50% [column2-end]","border-radius":"8px"}},t._l(s.media_attachments.slice(0,4),(function(i,o){return e("div",{on:{click:function(e){return t.lightbox(s,o)}}},[e("blur-hash-image",{staticClass:"img-fluid shadow",attrs:{width:30,height:30,punch:1,hash:s.media_attachments[o].blurhash,src:t.getMediaSource(s,o)}})],1)})),0)]):e("div",[e("div",{staticClass:"cursor-pointer",on:{click:function(e){return t.lightbox(s)}}},[e("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{position:"relative"}},[e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{position:"absolute",width:"40px",height:"40px","background-color":"rgba(0, 0, 0, 0.5)","border-radius":"40px"}},[e("i",{staticClass:"far fa-play pl-1 text-white fa-lg"})]),t._v(" "),e("video",{staticClass:"img-fluid",staticStyle:{"max-height":"200px"},attrs:{src:s.media_attachments[0].url}})])])]),t._v(" "),s.favourites_count&&!t.hideCounts?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()])],1)]):e("div",{staticClass:"media-body-comment"},[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url,id:"acpop_"+s.id,tabindex:"0"},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("b-popover",{attrs:{target:"acpop_"+s.id,triggers:"hover",placement:"bottom","custom-class":"shadow border-0 rounded-px",delay:750}},[e("profile-hover-card",{attrs:{profile:s.account},on:{follow:function(e){return t.follow(i)},unfollow:function(e){return t.unfollow(i)}}})],1)],1),t._v(" "),s.sensitive?e("span",[e("p",{staticClass:"mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(t.$t("common.sensitiveContentWarning"))+"\n\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("a",{staticClass:"small font-weight-bold primary",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.sensitive=!1}}},[t._v("Show")])]):e("read-more",{attrs:{status:s}}),t._v(" "),s.favourites_count&&!t.hideCounts?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()],1)]),t._v(" "),e("p",{staticClass:"media-body-reactions"},[e("button",{staticClass:"btn btn-link font-weight-bold btn-sm p-0",class:[s.favourited?"primary":"text-muted"],on:{click:function(e){return t.likeComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.favourited?"Liked":"Like")+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),"public"!=s.visibility?[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),"unlisted"===s.visibility?e("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip:hover.bottom",arg:"hover",modifiers:{bottom:!0}}],staticClass:"text-lighter",attrs:{title:"This post is unlisted on timelines"}},[e("i",{staticClass:"far fa-unlock fa-sm"})]):"private"===s.visibility?e("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip:hover.bottom",arg:"hover",modifiers:{bottom:!0}}],staticClass:"text-muted",attrs:{title:"This post is only visible to followers of this account"}},[e("i",{staticClass:"far fa-lock fa-sm"})]):t._e()]:t._e(),t._v(" "),e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.toggleCommentReply(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\tReply\n\t\t\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),t._o(e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToPost(s)}}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t\t\t")]),0,"cd:"+s.id+":"+i),t._v(" "),t.profile&&s.account.id===t.profile.id||t.status.account.id===t.profile.id?e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold",class:[t.deletingIndex&&t.deletingIndex===i?"text-danger":"text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.deleteComment(i)}}},[t._v("\n "+t._s(t.deletingIndex&&t.deletingIndex===i?"Deleting...":"Delete")+"\n\t\t\t\t\t\t\t\t\t")])]):e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.reportComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\tReport\n\t\t\t\t\t\t\t\t\t")])])],2),t._v(" "),s.reply_count?[s.replies.replies_show||t.commentReplyIndex===i?e("div",{staticClass:"media-body-show-replies"},[e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.hideCommentReplies(i)}}},[e("i",{staticClass:"media-body-show-replies-icon"}),t._v(" "),e("span",{staticClass:"media-body-show-replies-label"},[t._v("Hide "+t._s(t.prettyCount(s.reply_count))+" replies")])])]):e("div",{staticClass:"media-body-show-replies"},[e("a",{staticClass:"font-weight-bold primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showCommentReplies(i)}}},[e("i",{staticClass:"media-body-show-replies-icon"}),t._v(" "),e("span",{staticClass:"media-body-show-replies-label"},[t._v("Show "+t._s(t.prettyCount(s.reply_count))+" replies")])])])]:t._e(),t._v(" "),t.feed[i].replies_show?e("comment-replies",{key:"cmr-".concat(s.id,"-").concat(t.feed[i].reply_count),staticClass:"mt-3",attrs:{status:s,feed:t.feed[i].replies},on:{"counter-change":function(e){return t.replyCounterChange(i,e)}}}):t._e(),t._v(" "),1==s.replies_show&&t.commentReplyIndex==i&&t.feed[i].reply_count>3?e("div",[e("div",{staticClass:"media-body-show-replies mt-n3"},[e("a",{staticClass:"font-weight-bold text-dark",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goToPost(s)}}},[e("i",{staticClass:"media-body-show-replies-icon"}),t._v(" "),e("span",{staticClass:"media-body-show-replies-label"},[t._v("View full thread")])])])]):t._e(),t._v(" "),t.commentReplyIndex==i?e("comment-reply-form",{attrs:{"parent-id":s.id},on:{"new-comment":function(e){return t.pushCommentReply(i,e)},"counter-change":function(e){return t.replyCounterChange(i,e)}}}):t._e()],2)])})),0)],1)]),t._v(" "),!t.feedLoading&&t.canLoadMore?e("div",{staticClass:"post-comment-drawer-loadmore"},[e("p",[e("a",{staticClass:"font-weight-bold text-dark",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.fetchMore()}}},[t._v("Load more comments…")])])]):t._e(),t._v(" "),t.showEmptyRepliesRefresh?e("div",{staticClass:"post-comment-drawer-loadmore"},[e("p",{staticClass:"text-center mb-4"},[e("a",{staticClass:"btn btn-outline-primary font-weight-bold rounded-pill",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.forceRefresh()}}},[e("i",{staticClass:"far fa-sync mr-2"}),t._v(" Refresh\n\t\t\t\t")])])]):t._e(),t._v(" "),e("div",{staticClass:"d-flex align-items-top reply-form child-reply-form"},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:t.profile.avatar,width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.settings.expanded,expression:"!settings.expanded"}],staticClass:"w-100"},[e("vue-tribute",{attrs:{options:t.tributeSettings}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyContent,expression:"replyContent"}],staticClass:"form-control bg-light rounded-sm shadow-sm rounded-pill",staticStyle:{resize:"none","padding-right":"140px"},attrs:{placeholder:"Write a comment....",rows:"1",disabled:t.isPostingReply},domProps:{value:t.replyContent},on:{input:function(e){e.target.composing||(t.replyContent=e.target.value)}}})])],1),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.settings.expanded,expression:"settings.expanded"}],staticClass:"w-100"},[e("vue-tribute",{attrs:{options:t.tributeSettings}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyContent,expression:"replyContent"}],staticClass:"form-control bg-light rounded-sm shadow-sm",staticStyle:{resize:"none","padding-right":"140px"},attrs:{placeholder:"Write a comment....",rows:"5",disabled:t.isPostingReply},domProps:{value:t.replyContent},on:{input:function(e){e.target.composing||(t.replyContent=e.target.value)}}})])],1),t._v(" "),e("div",{staticClass:"reply-form-input-actions",class:{open:t.settings.expanded}},[e("button",{staticClass:"btn btn-link text-muted px-1 mr-2",on:{click:function(e){return t.replyUpload()}}},[e("i",{staticClass:"far fa-image fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-link text-muted px-1 mr-2",on:{click:function(e){return t.toggleReplyExpand()}}},[e("i",{staticClass:"far fa-text-size fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-link text-muted px-1 small font-weight-bold py-0 rounded-pill text-decoration-none",on:{click:t.toggleShowReplyOptions}},[e("i",{staticClass:"far fa-ellipsis-h"})])])]),t._v(" "),t.showReplyOptions?e("div",{staticClass:"child-reply-form-options mt-2",staticStyle:{"margin-left":"60px"}},[e("b-form-checkbox",{attrs:{switch:""},model:{value:t.settings.sensitive,callback:function(e){t.$set(t.settings,"sensitive",e)},expression:"settings.sensitive"}},[t._v("\n\t\t\t\t"+t._s(t.$t("common.sensitive"))+"\n\t\t\t")])],1):t._e(),t._v(" "),t.replyContent&&t.replyContent.length?e("div",{staticClass:"text-right mt-2"},[e("button",{staticClass:"btn btn-primary btn-sm font-weight-bold primary rounded-pill px-4",on:{click:t.storeComment}},[t._v(t._s(t.$t("common.comment")))])]):t._e(),t._v(" "),e("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":!0,"hide-footer":!0,centered:"",size:"lg","body-class":"p-0","content-class":"bg-transparent border-0 position-relative"}},[t.lightboxStatus&&"image"==t.lightboxStatus.type?e("div",{on:{click:t.hideLightbox}},[e("img",{staticStyle:{width:"100%","max-height":"90vh","object-fit":"contain"},attrs:{src:t.lightboxStatus.url}})]):t.lightboxStatus&&"video"==t.lightboxStatus.type?e("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{position:"relative"}},[e("button",{staticClass:"btn btn-dark d-flex align-items-center justify-content-center",staticStyle:{position:"fixed",top:"10px",right:"10px",width:"56px",height:"56px","border-radius":"56px"},on:{click:t.hideLightbox}},[e("i",{staticClass:"far fa-times-circle fa-2x text-warning",staticStyle:{"padding-top":"2px"}})]),t._v(" "),e("video",{staticStyle:{"max-height":"90vh","object-fit":"contain"},attrs:{src:t.lightboxStatus.url,controls:"",autoplay:""},on:{ended:t.hideLightbox}})]):t._e()])],1)},o=[]},54309:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"comment-replies-component"},[t.loading?e("div",{staticClass:"mt-n2"},[t._m(0)]):[e("transition-group",{attrs:{tag:"div","enter-active-class":"animate__animated animate__fadeIn","leave-active-class":"animate__animated animate__fadeOut",mode:"out-in"}},t._l(t.feed,(function(s,i){return e("div",{key:"cd:"+s.id+":"+i},[e("div",{staticClass:"media media-status align-items-top mb-3"},[e("a",{attrs:{href:"#l"}},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:s.account.avatar,width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("div",{staticClass:"media-body-wrapper"},[s.media_attachments.length?e("div",[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s.sensitive?e("div",{staticClass:"bh-comment",on:{click:function(t){s.sensitive=!1}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash}}),t._v(" "),e("div",{staticClass:"sensitive-warning"},[e("p",{staticClass:"mb-0"},[e("i",{staticClass:"far fa-eye-slash fa-lg"})]),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._v("Click to view")])])],1):e("div",{staticClass:"bh-comment"},[e("div",{on:{click:function(e){return t.lightbox(s)}}},[e("blur-hash-image",{staticClass:"img-fluid border shadow",attrs:{width:t.blurhashWidth(s),height:t.blurhashHeight(s),punch:1,hash:s.media_attachments[0].blurhash,src:t.getMediaSource(s)}})],1),t._v(" "),s.favourites_count?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()])]):e("div",{staticClass:"media-body-comment"},[e("p",{staticClass:"media-body-comment-username"},[e("a",{attrs:{href:s.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s.account)}}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.account.acct)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s.sensitive?e("span",[e("p",{staticClass:"mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.$t("common.sensitiveContentWarning"))+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("a",{staticClass:"small font-weight-bold primary",attrs:{href:"#"},on:{click:function(t){t.preventDefault(),s.sensitive=!1}}},[t._v("Show")])]):e("read-more",{attrs:{status:s}}),t._v(" "),s.favourites_count?e("button",{staticClass:"btn btn-link media-body-likes-count shadow-sm",on:{click:function(e){return e.preventDefault(),t.showLikesModal(i)}}},[e("i",{staticClass:"far fa-thumbs-up primary"}),t._v(" "),e("span",{staticClass:"count"},[t._v(t._s(t.prettyCount(s.favourites_count)))])]):t._e()],1)]),t._v(" "),e("p",{staticClass:"media-body-reactions"},[e("button",{staticClass:"btn btn-link font-weight-bold btn-sm p-0",class:[s.favourited?"primary":"text-muted"],on:{click:function(e){return t.likeComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(s.favourited?"Liked":"Like")+"\n\t\t\t\t\t\t\t")]),t._v(" "),e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),t._o(e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToPost(s)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t\t")]),0,"cd:"+s.id+":"+i),t._v(" "),t.profile&&s.account.id===t.profile.id?e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.deleteComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t")])]):e("span",[e("span",{staticClass:"mx-1"},[t._v("·")]),t._v(" "),e("a",{staticClass:"font-weight-bold text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.reportComment(i)}}},[t._v("\n\t\t\t\t\t\t\t\t\tReport\n\t\t\t\t\t\t\t\t")])])])])])])})),0)]],2)},o=[function(){var t=this._self._c;return t("div",{staticClass:"ph-item border-0 mb-0 p-0 bg-transparent",staticStyle:{"border-radius":"15px","margin-left":"-14px"}},[t("div",{staticClass:"ph-col-12 mb-0"},[t("div",{staticClass:"ph-row align-items-center mt-0"},[t("div",{staticClass:"ph-avatar mr-3 d-flex",staticStyle:{"min-width":"40px",width:"40px!important",height:"40px!important","border-radius":"8px"}}),this._v(" "),t("div",{staticClass:"ph-col-6"})])])])}]},82285:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"my-3"},[e("div",{staticClass:"d-flex align-items-top reply-form child-reply-form"},[e("img",{staticClass:"shadow-sm media-avatar border",attrs:{src:t.profile.avatar,width:"40",height:"40",draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg?v=0';"}}),t._v(" "),e("div",{staticStyle:{display:"flex","flex-grow":"1",position:"relative"}},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyContent,expression:"replyContent"}],staticClass:"form-control bg-light rounded-lg shadow-sm",staticStyle:{resize:"none","padding-right":"60px"},attrs:{placeholder:"Write a comment....",disabled:t.isPostingReply},domProps:{value:t.replyContent},on:{input:function(e){e.target.composing||(t.replyContent=e.target.value)}}}),t._v(" "),e("button",{staticClass:"btn btn-sm py-1 font-weight-bold ml-1 rounded-pill",class:[t.replyContent&&t.replyContent.length?"btn-primary":"btn-outline-muted"],staticStyle:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)"},attrs:{disabled:!t.replyContent||!t.replyContent.length},on:{click:t.storeComment}},[t._v("\n Post\n ")])])]),t._v(" "),e("p",{staticClass:"text-right small font-weight-bold text-lighter"},[t._v(t._s(t.replyContent?t.replyContent.length:0)+"/"+t._s(t.config.uploader.max_caption_length))])])},o=[]},62399:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"modal-stack"},[e("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"list-group text-center"},["archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxMenuGoToPost()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.viewPost"))+"\n\t\t\t\t")]):t._e(),t._v(" "),"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxMenuGoToProfile()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.viewProfile"))+"\n\t\t\t\t")]):t._e(),t._v(" "),"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxMenuShare()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("common.share"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.profile&&1==t.profile.is_admin&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.ctxModMenuShow()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.moderationTools"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.status.account.id!=t.profile.id?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.ctxMenuReportPost()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.report"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.profile.id==t.status.account.id&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.archivePost(t.status)}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.archive"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&t.profile.id==t.status.account.id&&"archived"==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.unarchivePost(t.status)}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.unarchive"))+"\n\t\t\t\t")]):t._e(),t._v(" "),t.config.ab.pue&&t.status&&t.profile.id==t.status.account.id&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.editPost(t.status)}}},[t._v("\n\t\t\t\t\tEdit\n\t\t\t\t")]):t._e(),t._v(" "),t.status&&(t.profile.is_admin||t.profile.id==t.status.account.id)&&"archived"!==t.status.visibility?e("div",{staticClass:"list-group-item rounded cursor-pointer text-danger font-weight-bold",on:{click:function(e){return t.deletePost(t.status)}}},[t.isDeleting?e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[t._v("Loading...")])]):e("div",[t._v("\n\t\t\t\t\t "+t._s(t.$t("common.delete"))+"\n ")])]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter font-weight-bold",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("common.cancel"))+"\n\t\t\t\t")])])]),t._v(" "),e("b-modal",{ref:"ctxModModal",attrs:{id:"ctx-mod-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"list-group text-center"},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("menu.moderationTools"))+"\n\t\t\t\t\t")]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("menu.selectOneOption"))+"\n\t\t\t\t\t")]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"unlist")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.unlistFromTimelines"))+"\n\t\t\t\t")]),t._v(" "),t.status.sensitive?e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"remcw")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.removeCW"))+"\n\t\t\t\t")]):e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"addcw")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.addCW"))+"\n\t\t\t\t")]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.status,"spammer")}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("menu.markAsSpammer"))),e("br"),t._v(" "),e("span",{staticClass:"small"},[t._v(t._s(t.$t("menu.markAsSpammerText")))])]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxModMenuClose()}}},[t._v("\n\t\t\t\t\t"+t._s(t.$t("common.cancel"))+"\n\t\t\t\t")])])]),t._v(" "),e("b-modal",{ref:"ctxModOtherModal",attrs:{id:"ctx-mod-other-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"list-group text-center"},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v(t._s(t.$t("menu.moderationTools")))]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v(t._s(t.$t("menu.selectOneOption")))]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.confirmModal()}}},[t._v("Unlist Posts")]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.confirmModal()}}},[t._v("Moderation Log")]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxModOtherMenuClose()}}},[t._v(t._s(t.$t("common.cancel")))])])]),t._v(" "),e("b-modal",{ref:"ctxShareModal",attrs:{id:"ctx-share-modal",title:"Share","hide-footer":"","hide-header":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded text-center"}},[e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.shareStatus(t.status,e)}}},[t._v(t._s(t.status.reblogged?"Unshare":"Share")+" "+t._s(t.$t("menu.toFollowers")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuCopyLink()}}},[t._v(t._s(t.$t("common.copyLink")))]),t._v(" "),t.status&&1==t.status.local&&!t.status.in_reply_to_id?e("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuEmbed()}}},[t._v(t._s(t.$t("menu.embed")))]):t._e(),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxShareMenu()}}},[t._v(t._s(t.$t("common.cancel")))])]),t._v(" "),e("b-modal",{ref:"ctxEmbedModal",attrs:{id:"ctx-embed-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"md","body-class":"p-2 rounded"}},[e("div",[e("div",{staticClass:"form-group"},[e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedPayload,expression:"ctxEmbedPayload"}],staticClass:"form-control disabled text-monospace",staticStyle:{"overflow-y":"hidden",border:"1px solid #efefef","font-size":"12px","line-height":"18px",margin:"0 0 7px",resize:"none"},attrs:{rows:"8",disabled:""},domProps:{value:t.ctxEmbedPayload},on:{input:function(e){e.target.composing||(t.ctxEmbedPayload=e.target.value)}}})]),t._v(" "),e("div",{staticClass:"form-group pl-2 d-flex justify-content-center"},[e("div",{staticClass:"form-check mr-3"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowCaption,expression:"ctxEmbedShowCaption"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowCaption)?t._i(t.ctxEmbedShowCaption,null)>-1:t.ctxEmbedShowCaption},on:{change:function(e){var s=t.ctxEmbedShowCaption,i=e.target,o=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.ctxEmbedShowCaption=s.concat([null])):a>-1&&(t.ctxEmbedShowCaption=s.slice(0,a).concat(s.slice(a+1)))}else t.ctxEmbedShowCaption=o}}}),t._v(" "),e("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("menu.showCaption"))+"\n\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"form-check mr-3"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowLikes,expression:"ctxEmbedShowLikes"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowLikes)?t._i(t.ctxEmbedShowLikes,null)>-1:t.ctxEmbedShowLikes},on:{change:function(e){var s=t.ctxEmbedShowLikes,i=e.target,o=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.ctxEmbedShowLikes=s.concat([null])):a>-1&&(t.ctxEmbedShowLikes=s.slice(0,a).concat(s.slice(a+1)))}else t.ctxEmbedShowLikes=o}}}),t._v(" "),e("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("menu.showLikes"))+"\n\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"form-check"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedCompactMode,expression:"ctxEmbedCompactMode"}],staticClass:"form-check-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.ctxEmbedCompactMode)?t._i(t.ctxEmbedCompactMode,null)>-1:t.ctxEmbedCompactMode},on:{change:function(e){var s=t.ctxEmbedCompactMode,i=e.target,o=!!i.checked;if(Array.isArray(s)){var a=t._i(s,null);i.checked?a<0&&(t.ctxEmbedCompactMode=s.concat([null])):a>-1&&(t.ctxEmbedCompactMode=s.slice(0,a).concat(s.slice(a+1)))}else t.ctxEmbedCompactMode=o}}}),t._v(" "),e("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("menu.compactMode"))+"\n\t\t\t\t\t\t")])])]),t._v(" "),e("hr"),t._v(" "),e("button",{class:t.copiedEmbed?"btn btn-primary btn-block btn-sm py-1 font-weight-bold disabed":"btn btn-primary btn-block btn-sm py-1 font-weight-bold",attrs:{disabled:t.copiedEmbed},on:{click:t.ctxCopyEmbed}},[t._v(t._s(t.copiedEmbed?"Embed Code Copied!":"Copy Embed Code"))]),t._v(" "),e("p",{staticClass:"mb-0 px-2 small text-muted"},[t._v(t._s(t.$t("menu.embedConfirmText"))+" "),e("a",{attrs:{href:"/site/terms"}},[t._v(t._s(t.$t("site.terms")))])])])]),t._v(" "),e("b-modal",{ref:"ctxReport",attrs:{id:"ctx-report","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v(t._s(t.$t("menu.report")))]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v(t._s(t.$t("menu.selectOneOption")))]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group text-center"},[e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("spam")}}},[t._v(t._s(t.$t("menu.spam")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("sensitive")}}},[t._v(t._s(t.$t("menu.sensitive")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("abusive")}}},[t._v(t._s(t.$t("menu.abusive")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.openCtxReportOtherMenu()}}},[t._v(t._s(t.$t("common.other")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxReportMenuGoBack()}}},[t._v(t._s(t.$t("common.cancel")))])])]),t._v(" "),e("b-modal",{ref:"ctxReportOther",attrs:{id:"ctx-report-other","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("p",{staticClass:"py-2 px-3 mb-0"}),e("div",{staticClass:"text-center font-weight-bold text-danger"},[t._v(t._s(t.$t("menu.report")))]),t._v(" "),e("div",{staticClass:"small text-center text-muted"},[t._v(t._s(t.$t("menu.selectOneOption")))]),t._v(" "),e("p"),t._v(" "),e("div",{staticClass:"list-group text-center"},[e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("underage")}}},[t._v(t._s(t.$t("menu.underageAccount")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("copyright")}}},[t._v(t._s(t.$t("menu.copyrightInfringement")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("impersonation")}}},[t._v(t._s(t.$t("menu.impersonation")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold",on:{click:function(e){return t.sendReport("scam")}}},[t._v(t._s(t.$t("menu.scamOrFraud")))]),t._v(" "),e("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxReportOtherMenuGoBack()}}},[t._v(t._s(t.$t("common.cancel")))])])]),t._v(" "),e("b-modal",{ref:"ctxConfirm",attrs:{id:"ctx-confirm","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[e("div",{staticClass:"d-flex align-items-center justify-content-center py-3"},[e("div",[t._v(t._s(this.confirmModalTitle))])]),t._v(" "),e("div",{staticClass:"d-flex border-top btn-group btn-group-block rounded-0",attrs:{role:"group"}},[e("button",{staticClass:"btn btn-outline-lighter border-left-0 border-top-0 border-bottom-0 border-right py-2",staticStyle:{color:"rgb(0,122,255) !important"},attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.confirmModalCancel()}}},[t._v(t._s(t.$t("common.cancel")))]),t._v(" "),e("button",{staticClass:"btn btn-outline-lighter border-0",staticStyle:{color:"rgb(0,122,255) !important"},attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.confirmModalConfirm()}}},[t._v("Confirm")])])])],1)},o=[]},27934:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{attrs:{centered:"",size:"md",scrollable:!0,"hide-footer":"","header-class":"py-2","body-class":"p-0","title-class":"w-100 text-center pl-4 font-weight-bold","title-tag":"p"},scopedSlots:t._u([{key:"modal-header",fn:function(s){var i=s.close;return[void 0===t.historyIndex?[e("div",{staticClass:"d-flex flex-grow-1 justify-content-between align-items-center"},[e("span",{staticStyle:{width:"40px"}}),t._v(" "),e("h5",{staticClass:"font-weight-bold mb-0"},[t._v("Post History")]),t._v(" "),e("b-button",{attrs:{size:"sm",variant:"link"},on:{click:function(t){return i()}}},[e("i",{staticClass:"far fa-times text-dark fa-lg"})])],1)]:[e("div",{staticClass:"d-flex flex-grow-1 justify-content-between align-items-center pt-1"},[e("b-button",{attrs:{size:"sm",variant:"link"},on:{click:function(e){e.preventDefault(),t.historyIndex=void 0}}},[e("i",{staticClass:"fas fa-chevron-left text-primary fa-lg"})]),t._v(" "),e("div",{staticClass:"d-flex align-items-center"},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("img",{staticClass:"rounded-circle",attrs:{src:t.allHistory[0].account.avatar,width:"16",height:"16",onerror:"this.src='/storage/avatars/default.jpg';this.onerror=null;"}}),t._v(" "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.allHistory[0].account.username))])]),t._v(" "),e("div",[t._v(t._s(t.historyIndex==t.allHistory.length-1?"created":"edited")+" "+t._s(t.formatTime(t.allHistory[t.historyIndex].created_at)))])])]),t._v(" "),e("b-button",{attrs:{size:"sm",variant:"link"},on:{click:function(t){return i()}}},[e("i",{staticClass:"fas fa-times text-dark fa-lg"})])],1)]]}}]),model:{value:t.isOpen,callback:function(e){t.isOpen=e},expression:"isOpen"}},[t._v(" "),t.isLoading?e("div",{staticClass:"d-flex align-items-center justify-content-center",staticStyle:{"min-height":"500px"}},[e("b-spinner")],1):[void 0===t.historyIndex?e("div",{staticClass:"list-group border-top-0"},t._l(t.allHistory,(function(s,i){return e("div",{staticClass:"list-group-item d-flex align-items-center justify-content-between",staticStyle:{gap:"5px"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("img",{staticClass:"rounded-circle",attrs:{src:s.account.avatar,width:"24",height:"24",onerror:"this.src='/storage/avatars/default.jpg';this.onerror=null;"}}),t._v(" "),e("span",{staticClass:"font-weight-bold"},[t._v(t._s(s.account.username))])]),t._v(" "),e("div",[t._v(t._s(i==t.allHistory.length-1?"created":"edited")+" "+t._s(t.formatTime(s.created_at)))])]),t._v(" "),e("a",{staticClass:"stretched-link text-decoration-none",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.historyIndex=i}}},[e("div",{staticClass:"d-flex align-items-center",staticStyle:{gap:"5px"}},[e("i",{staticClass:"far fa-chevron-right text-primary fa-lg"})])])])})),0):e("div",{staticClass:"d-flex align-items-center flex-column border-top-0 justify-content-center"},["text"===t.postType()?void 0:"image"===t.postType()?[e("div",{staticStyle:{width:"100%"}},[e("blur-hash-image",{staticClass:"img-contain border-bottom",attrs:{width:32,height:32,punch:1,hash:t.allHistory[t.historyIndex].media_attachments[0].blurhash,src:t.allHistory[t.historyIndex].media_attachments[0].url}})],1)]:"album"===t.postType()?[e("div",{staticStyle:{width:"100%"}},[e("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333"},attrs:{controls:"",indicators:"",background:"#000000"}},t._l(t.allHistory[t.historyIndex].media_attachments,(function(t,s){return e("b-carousel-slide",{key:"pfph:"+t.id+":"+s,attrs:{"img-src":t.url}})})),1)],1)]:"video"===t.postType()?[e("div",{staticStyle:{width:"100%"}},[e("div",{staticClass:"embed-responsive embed-responsive-16by9 border-bottom"},[e("video",{staticClass:"video",attrs:{controls:"",playsinline:"",preload:"metadata",loop:""}},[e("source",{attrs:{src:t.allHistory[t.historyIndex].media_attachments[0].url,type:t.allHistory[t.historyIndex].media_attachments[0].mime}})])])])]:t._e(),t._v(" "),e("div",{staticClass:"w-100 my-4 px-4 text-break justify-content-start"},[e("p",{staticClass:"mb-0",domProps:{innerHTML:t._s(t.allHistory[t.historyIndex].content)}})])],2)]],2)],1)},o=[]},7971:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){this._self._c;return this._m(0)},o=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"list-group-item border-left-0 border-right-0 px-3"},[e("div",{staticClass:"ph-item border-0 p-0 m-0 align-items-center"},[e("div",{staticClass:"p-0 mb-0",staticStyle:{flex:"unset"}},[e("div",{staticClass:"ph-avatar",staticStyle:{"min-width":"40px !important",width:"40px !important",height:"40px"}})]),t._v(" "),e("div",{staticClass:"ph-col-9 mb-0"},[e("div",{staticClass:"ph-row"},[e("div",{staticClass:"ph-col-12"}),t._v(" "),e("div",{staticClass:"ph-col-12"})])])])])}]},92162:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"likesModal",attrs:{centered:"",size:"md",scrollable:!0,"hide-footer":"","header-class":"py-2","body-class":"p-0","title-class":"w-100 text-center pl-4 font-weight-bold","title-tag":"p",title:t.$t("common.likes")}},[t.isLoading?e("div",{staticClass:"likes-loader list-group border-top-0",staticStyle:{"max-height":"500px"}},[e("like-placeholder")],1):e("div",[t.likes.length?e("div",{staticClass:"list-group",staticStyle:{"max-height":"500px"}},[t._l(t.likes,(function(s,i){return e("div",{staticClass:"list-group-item border-left-0 border-right-0 px-3",class:[0===i?"border-top-0":""]},[e("div",{staticClass:"media align-items-center"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("a",{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[t._v(t._s(t.getUsername(s)))])]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-dark font-weight-bold small text-break"},[t._v("@"+t._s(s.acct))])]),t._v(" "),e("div",[null==s.follows||s.id==t.user.id?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},on:{click:function(e){return t.goToProfile(t.profile)}}},[t._v("\n\t\t\t\t\t\t\t\tView Profile\n\t\t\t\t\t\t\t")]):s.follows?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleUnfollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Following")])]):s.follows?t._e():e("button",{staticClass:"btn btn-primary rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleFollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Follow")])])])])])})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("like-placeholder",{staticClass:"border-top-0"})],1),t._v(" "),e("like-placeholder")],1):t._e()],2):e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"140px"}},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.$t("post.noLikes")))])])])])],1)},o=[]},79911:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"timeline-status-component-content"},["poll"===t.status.pf_type?e("div",{staticClass:"postPresenterContainer",staticStyle:{background:"#000"}}):t.fixedHeight?e("div",{staticClass:"card-body p-0"},["photo"===t.status.pf_type?e("div",{class:{fixedHeight:t.fixedHeight}},[1==t.status.sensitive?e("div",{staticClass:"content-label-wrapper"},[e("div",{staticClass:"text-light content-label"},[t._m(0),t._v(" "),e("p",{staticClass:"h4 font-weight-bold text-center"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("common.sensitiveContent"))+"\n\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"text-center py-2 content-label-text"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.status.spoiler_text?t.status.spoiler_text:t.$t("common.sensitiveContentWarning"))+"\n\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0"},[e("button",{staticClass:"btn btn-outline-light btn-block btn-sm font-weight-bold",on:{click:function(e){return t.toggleContentWarning()}}},[t._v("See Post")])])]),t._v(" "),e("blur-hash-image",{staticClass:"blurhash-wrapper",attrs:{width:"32",height:"32",punch:1,hash:t.status.media_attachments[0].blurhash}})],1):e("div",{staticClass:"content-label-wrapper",staticStyle:{position:"relative",width:"100%",height:"400px",overflow:"hidden","z-index":"1"},on:{click:function(e){return e.preventDefault(),t.toggleLightbox.apply(null,arguments)}}},[e("img",{staticStyle:{position:"absolute",width:"105%",height:"410px","object-fit":"cover","z-index":"1",top:"0",left:"0",filter:"brightness(0.35) blur(6px)",margin:"-5px"},attrs:{src:t.status.media_attachments[0].url}}),t._v(" "),e("blur-hash-image",{key:t.key,staticClass:"blurhash-wrapper",staticStyle:{width:"100%",position:"absolute","z-index":"9",top:"0:left:0"},attrs:{width:"32",height:"32",punch:1,hash:t.status.media_attachments[0].blurhash,src:t.status.media_attachments[0].url,alt:t.status.media_attachments[0].description,title:t.status.media_attachments[0].description}}),t._v(" "),!t.status.sensitive&&t.sensitive?e("p",{staticStyle:{"margin-top":"0",padding:"10px",color:"#000","font-size":"10px","text-align":"right",position:"absolute",top:"0",right:"0","border-radius":"11px",cursor:"pointer",background:"rgba(255, 255, 255,.5)"},on:{click:function(e){t.status.sensitive=!0}}},[e("i",{staticClass:"fas fa-eye-slash fa-lg"})]):t._e()],1)]):"video"===t.status.pf_type?e("video-player",{attrs:{status:t.status,fixedHeight:t.fixedHeight}}):"photo:album"===t.status.pf_type?e("div",{staticClass:"card-img-top shadow",staticStyle:{"border-radius":"15px"}},[e("photo-album-presenter",{class:{fixedHeight:t.fixedHeight},staticStyle:{"border-radius":"15px !important","object-fit":"contain","background-color":"#000",overflow:"hidden"},attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){return t.toggleContentWarning()}}})],1):"photo:video:album"===t.status.pf_type?e("div",{staticClass:"card-img-top shadow",staticStyle:{"border-radius":"15px"}},[e("mixed-album-presenter",{class:{fixedHeight:t.fixedHeight},staticStyle:{"border-radius":"15px !important","object-fit":"contain","background-color":"#000",overflow:"hidden","align-items":"center"},attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"text"===t.status.pf_type?e("div",[t.status.sensitive?e("div",{staticClass:"border m-3 p-5 rounded-lg"},[t._m(1),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-0"},[t._v("Sensitive Content")]),t._v(" "),e("p",{staticClass:"text-center"},[t._v(t._s(t.status.spoiler_text&&t.status.spoiler_text.length?t.status.spoiler_text:"This post may contain sensitive content"))]),t._v(" "),e("p",{staticClass:"text-center mb-0"},[e("button",{staticClass:"btn btn-primary btn-sm font-weight-bold",on:{click:function(e){t.status.sensitive=!1}}},[t._v("See post")])])]):t._e()]):e("div",{staticClass:"bg-light rounded-lg d-flex align-items-center justify-content-center",staticStyle:{height:"400px"}},[e("div",[t._m(2),t._v(" "),e("p",{staticClass:"lead text-center mb-0"},[t._v("\n\t\t\t\t\t\tCannot display post\n\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"small text-center mb-0"},[t._v("\n\t\t\t\t\t\t"+t._s(t.status.pf_type)+":"+t._s(t.status.id)+"\n\t\t\t\t\t")])])])],1):e("div",{staticClass:"postPresenterContainer",staticStyle:{background:"#000"}},["photo"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("video-player",{attrs:{status:t.status,fixedHeight:t.fixedHeight},on:{togglecw:function(e){t.status.sensitive=!1}}})],1):"photo:album"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video:album"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("video-album-presenter",{attrs:{status:t.status},on:{togglecw:function(e){t.status.sensitive=!1}}})],1):"photo:video:album"===t.status.pf_type?e("div",{staticClass:"w-100"},[e("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.toggleLightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):t._e()]),t._v(" "),t.status.content&&!t.status.sensitive?e("div",{staticClass:"card-body status-text",class:["text"===t.status.pf_type?"py-0":"pb-0"]},[e("p",[e("read-more",{attrs:{status:t.status,"cursor-limit":300}})],1)]):t._e()])},o=[function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"far fa-eye-slash fa-2x"})])},function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"far fa-eye-slash fa-2x"})])},function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle fa-4x"})])}]},44516:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[t.isReblog?e("div",{staticClass:"card-header bg-light border-0",staticStyle:{"border-top-left-radius":"15px","border-top-right-radius":"15px"}},[e("div",{staticClass:"media align-items-center",staticStyle:{height:"10px"}},[e("a",{staticClass:"mx-2",attrs:{href:t.reblogAccount.url},on:{click:function(e){return e.preventDefault(),t.goToProfileById(t.reblogAccount.id)}}},[e("img",{staticStyle:{"border-radius":"10px"},attrs:{src:t.reblogAccount.avatar,width:"24",height:"24",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),e("div",{staticStyle:{"font-size":"12px","font-weight":"bold"}},[e("i",{staticClass:"far fa-retweet text-warning mr-1"}),t._v(" Reblogged by "),e("a",{staticClass:"text-dark",attrs:{href:t.reblogAccount.url},on:{click:function(e){return e.preventDefault(),t.goToProfileById(t.reblogAccount.id)}}},[t._v("@"+t._s(t.reblogAccount.acct))])])])]):t._e(),t._v(" "),e("div",{staticClass:"card-header border-0",staticStyle:{"border-top-left-radius":"15px","border-top-right-radius":"15px"}},[e("div",{staticClass:"media align-items-center"},[e("a",{staticStyle:{"margin-right":"10px"},attrs:{href:t.status.account.url},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}},[e("img",{staticStyle:{"border-radius":"15px"},attrs:{src:t.getStatusAvatar(),width:"44",height:"44",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"font-weight-bold username"},[e("a",{staticClass:"text-dark",attrs:{href:t.status.account.url,id:"apop_"+t.status.id},on:{click:function(e){return e.preventDefault(),t.goToProfile.apply(null,arguments)}}},[t._v("\n "+t._s(t.status.account.acct)+"\n ")]),t._v(" "),e("b-popover",{attrs:{target:"apop_"+t.status.id,triggers:"hover",placement:"bottom","custom-class":"shadow border-0 rounded-px"}},[e("profile-hover-card",{attrs:{profile:t.status.account},on:{follow:t.follow,unfollow:t.unfollow}})],1)],1),t._v(" "),e("p",{staticClass:"text-lighter mb-0",staticStyle:{"font-size":"13px"}},[t.status.account.is_admin?e("span",{staticClass:"d-none d-md-inline-block"},[e("span",{staticClass:"badge badge-light text-danger user-select-none",attrs:{title:"Admin account"}},[t._v("ADMIN")]),t._v(" "),e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")])]):t._e(),t._v(" "),e("a",{staticClass:"timestamp text-lighter",attrs:{href:t.status.url,title:t.status.created_at},on:{click:function(e){return e.preventDefault(),t.goToPost()}}},[t._v("\n "+t._s(t.timeago(t.status.created_at))+"\n ")]),t._v(" "),t.config.ab.pue&&t.status.hasOwnProperty("edited_at")&&t.status.edited_at?e("span",[e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")]),t._v(" "),e("a",{staticClass:"text-lighter",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.openEditModal.apply(null,arguments)}}},[t._v("Edited")])]):t._e(),t._v(" "),e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")]),t._v(" "),e("span",{staticClass:"visibility text-lighter",attrs:{title:t.scopeTitle(t.status.visibility)}},[e("i",{class:t.scopeIcon(t.status.visibility)})]),t._v(" "),t.status.place&&t.status.place.hasOwnProperty("name")?e("span",{staticClass:"d-none d-md-inline-block"},[e("span",{staticClass:"mx-1 text-lighter"},[t._v("·")]),t._v(" "),e("span",{staticClass:"location text-lighter"},[e("i",{staticClass:"far fa-map-marker-alt"}),t._v(" "+t._s(t.status.place.name)+", "+t._s(t.status.place.country))])]):t._e()])]),t._v(" "),t.useDropdownMenu?e("b-dropdown",{attrs:{"no-caret":"",right:"",variant:"link","toggle-class":"text-lighter",html:""}},[e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("menu.viewPost")))])]),t._v(" "),e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("common.copyLink")))])]),t._v(" "),t.status.local?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("menu.embed")))])]):t._e(),t._v(" "),t.owner?t._e():e("b-dropdown-divider"),t._v(" "),t.owner?t._e():e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.$t("menu.report")))]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Report content that violate our rules")])]),t._v(" "),!t.owner&&t.status.hasOwnProperty("relationship")?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.status.relationship.muting?"Unmute":"Mute"))]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Hide posts from this account in your feeds")])]):t._e(),t._v(" "),!t.owner&&t.status.hasOwnProperty("relationship")?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold text-danger"},[t._v(t._s(t.status.relationship.blocking?"Unblock":"Block"))]),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Restrict all content from this account")])]):t._e(),t._v(" "),t.owner||t.admin?e("b-dropdown-divider"):t._e(),t._v(" "),t.owner||t.admin?e("b-dropdown-item",[e("p",{staticClass:"mb-0 font-weight-bold text-danger"},[t._v("\n "+t._s(t.$t("common.delete"))+"\n ")])]):t._e()],1):e("button",{staticClass:"btn btn-link text-lighter",on:{click:t.openMenu}},[e("i",{staticClass:"far fa-ellipsis-v fa-lg"})])],1),t._v(" "),e("edit-history-modal",{ref:"editModal",attrs:{status:t.status}})],1)])},o=[]},51992:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"px-3 my-3",staticStyle:{"z-index":"3"}},[(t.status.favourites_count||t.status.reblogs_count)&&(t.status.hasOwnProperty("liked_by")&&t.status.liked_by.url||t.status.hasOwnProperty("reblogs_count")&&t.status.reblogs_count)?e("div",{staticClass:"mb-0 d-flex justify-content-between"},[!t.hideCounts&&t.status.favourites_count?e("p",{staticClass:"mb-2 reaction-liked-by"},[t._v("\n\t\t\tLiked by\n\t\t\t"),1==t.status.favourites_count&&1==t.status.favourited?e("span",{staticClass:"font-weight-bold"},[t._v("me")]):e("span",[e("router-link",{staticClass:"primary font-weight-bold",attrs:{to:"/i/web/profile/"+t.status.liked_by.id}},[t._v(t._s(t.status.liked_by.username))]),t._v(" "),t.status.liked_by.others||t.status.favourites_count>1?e("span",[t._v("\n\t\t\t\t\tand "),e("a",{staticClass:"primary font-weight-bold",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLikes()}}},[t._v(t._s(t.count(t.status.favourites_count-1))+" others")])]):t._e()],1)]):t._e(),t._v(" "),!t.hideCounts&&t.status.reblogs_count?e("p",{staticClass:"mb-2 reaction-liked-by"},[t._v("\n\t\t\tShared by\n\t\t\t"),1==t.status.reblogs_count&&1==t.status.reblogged?e("span",{staticClass:"font-weight-bold"},[t._v("me")]):e("a",{staticClass:"primary font-weight-bold",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showShares()}}},[t._v("\n\t\t\t\t"+t._s(t.count(t.status.reblogs_count))+" "+t._s(t.status.reblogs_count>1?"others":"other")+"\n\t\t\t")])]):t._e()]):t._e(),t._v(" "),e("div",{staticClass:"d-flex justify-content-between",staticStyle:{"font-size":"14px !important"}},[e("div",[e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill mr-2",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.like()}}},[t.status.favourited?e("span",{staticClass:"primary"},[e("i",{staticClass:"fas fa-heart mr-md-1 text-danger fa-lg"})]):e("span",[e("i",{staticClass:"far fa-heart mr-md-2"})]),t._v(" "),t.likesCount&&!t.hideCounts?e("span",[t._v("\n\t\t\t\t\t"+t._s(t.count(t.likesCount))+"\n\t\t\t\t\t"),e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(1==t.likesCount?t.$t("common.like"):t.$t("common.likes")))])]):e("span",[e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(t.$t("common.like")))])])]),t._v(" "),t.status.comments_disabled?t._e():e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill mr-2 px-3",attrs:{type:"button"},on:{click:function(e){return t.showComments()}}},[e("i",{staticClass:"far fa-comment mr-md-2"}),t._v(" "),t.replyCount&&!t.hideCounts?e("span",[t._v("\n\t\t\t\t\t"+t._s(t.count(t.replyCount))+"\n\t\t\t\t\t"),e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(1==t.replyCount?t.$t("common.comment"):t.$t("common.comments")))])]):e("span",[e("span",{staticClass:"d-none d-md-inline"},[t._v(t._s(t.$t("common.comment")))])])])]),t._v(" "),e("div",[e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill",attrs:{type:"button",disabled:t.isReblogging},on:{click:function(e){return t.handleReblog()}}},[t.isReblogging?e("span",[e("b-spinner",{attrs:{variant:"warning",small:""}})],1):e("span",[1==t.status.reblogged?e("i",{staticClass:"fas fa-retweet fa-lg text-warning"}):e("i",{staticClass:"far fa-retweet"}),t._v(" "),t.status.reblogs_count&&!t.hideCounts?e("span",{staticClass:"ml-md-2"},[t._v("\n\t\t\t\t\t\t"+t._s(t.count(t.status.reblogs_count))+"\n\t\t\t\t\t")]):t._e()])]),t._v(" "),t.status.in_reply_to_id||t.status.reblog_of_id?t._e():e("button",{staticClass:"btn btn-light font-weight-bold rounded-pill ml-3",attrs:{type:"button",disabled:t.isBookmarking},on:{click:function(e){return t.handleBookmark()}}},[t.isBookmarking?e("span",[e("b-spinner",{attrs:{variant:"warning",small:""}})],1):e("span",[t.status.hasOwnProperty("bookmarked_at")||t.status.hasOwnProperty("bookmarked")&&1==t.status.bookmarked?e("i",{staticClass:"fas fa-bookmark fa-lg text-warning"}):e("i",{staticClass:"far fa-bookmark"})])]),t._v(" "),t.admin?e("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"ml-3 btn btn-light font-weight-bold rounded-pill",attrs:{type:"button",title:"Moderation Tools"},on:{click:function(e){return t.openModTools()}}},[e("i",{staticClass:"far fa-user-crown"})]):t._e()])])])},o=[]},16331:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"read-more-component",staticStyle:{"word-break":"break-word"}},[e("div",{domProps:{innerHTML:t._s(t.content)}})])},o=[]},66295:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"sharesModal",attrs:{centered:"",size:"md",scrollable:!0,"hide-footer":"","header-class":"py-2","body-class":"p-0","title-class":"w-100 text-center pl-4 font-weight-bold","title-tag":"p",title:"Shared By"}},[t.isLoading?e("div",{staticClass:"likes-loader list-group border-top-0",staticStyle:{"max-height":"500px"}},[e("like-placeholder")],1):e("div",[t.likes.length?e("div",{staticClass:"list-group",staticStyle:{"max-height":"500px"}},[t._l(t.likes,(function(s,i){return e("div",{staticClass:"list-group-item border-left-0 border-right-0 px-3",class:[0===i?"border-top-0":""]},[e("div",{staticClass:"media align-items-center"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("a",{staticClass:"text-dark font-weight-bold text-decoration-none",attrs:{href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[t._v(t._s(t.getUsername(s)))])]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-dark font-weight-bold small text-break"},[t._v("@"+t._s(s.acct))])]),t._v(" "),e("div",[s.id==t.user.id?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},on:{click:function(e){return t.goToProfile(t.profile)}}},[t._v("\n\t\t\t\t\t\t\t\tView Profile\n\t\t\t\t\t\t\t")]):s.follows?e("button",{staticClass:"btn btn-outline-muted rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleUnfollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Following")])]):s.follows?t._e():e("button",{staticClass:"btn btn-primary rounded-pill btn-sm font-weight-bold",staticStyle:{width:"110px"},attrs:{disabled:t.isUpdatingFollowState},on:{click:function(e){return t.handleFollow(i)}}},[t.isUpdatingFollowState&&t.followStateIndex===i?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Follow")])])])])])})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("like-placeholder",{staticClass:"border-top-0"})],1),t._v(" "),e("like-placeholder")],1):t._e()],2):e("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"140px"}},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v("Nobody has shared this yet!")])])])])],1)},o=[]},9143:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-feed-component"},[e("div",{staticClass:"profile-feed-component-nav d-flex justify-content-center justify-content-md-between align-items-center mb-4"},[e("div",{staticClass:"d-none d-md-block border-bottom flex-grow-1 profile-nav-btns"},[e("div",{staticClass:"btn-group"},[e("button",{staticClass:"btn btn-link",class:[1===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab(1)}}},[t._v("\n\t\t\t\t\tPosts\n\t\t\t\t")]),t._v(" "),t.isOwner?e("button",{staticClass:"btn btn-link",class:["archives"===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab("archives")}}},[t._v("\n\t\t\t\t\tArchives\n\t\t\t\t")]):t._e(),t._v(" "),t.isOwner?e("button",{staticClass:"btn btn-link",class:["bookmarks"===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab("bookmarks")}}},[t._v("\n\t\t\t\t\tBookmarks\n\t\t\t\t")]):t._e(),t._v(" "),t.canViewCollections?e("button",{staticClass:"btn btn-link",class:[2===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab(2)}}},[t._v("\n\t\t\t\t\tCollections\n\t\t\t\t")]):t._e(),t._v(" "),t.isOwner?e("button",{staticClass:"btn btn-link",class:[3===t.tabIndex?"active":""],on:{click:function(e){return t.toggleTab(3)}}},[t._v("\n\t\t\t\t\tLikes\n\t\t\t\t")]):t._e()])]),t._v(" "),1===t.tabIndex?e("div",{staticClass:"btn-group layout-sort-toggle"},[e("button",{staticClass:"btn btn-sm",class:[0===t.layoutIndex?"btn-dark":"btn-light"],on:{click:function(e){return t.toggleLayout(0,!0)}}},[e("i",{staticClass:"far fa-th fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-sm",class:[1===t.layoutIndex?"btn-dark":"btn-light"],on:{click:function(e){return t.toggleLayout(1,!0)}}},[e("i",{staticClass:"fas fa-th-large fa-lg"})]),t._v(" "),e("button",{staticClass:"btn btn-sm",class:[2===t.layoutIndex?"btn-dark":"btn-light"],on:{click:function(e){return t.toggleLayout(2,!0)}}},[e("i",{staticClass:"far fa-bars fa-lg"})])]):t._e()]),t._v(" "),0==t.tabIndex?e("div",{staticClass:"d-flex justify-content-center mt-5"},[e("b-spinner")],1):1==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[0===t.layoutIndex?e("div",{staticClass:"row"},[t._l(t.feed,(function(s,i){return e("div",{key:"tlob:"+i+s.id,staticClass:"col-4 p-1"},[s.hasOwnProperty("pf_type")&&"video"==s.pf_type?e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[s.sensitive?e("div",{staticClass:"square-content"},[t._m(0,!0),t._v(" "),e("blur-hash-canvas",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash}})],1):e("div",{staticClass:"square-content"},[e("blur-hash-image",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash,src:s.media_attachments[0].preview_url}})],1),t._v(" "),e("div",{staticClass:"info-overlay-text"},[e("div",{staticClass:"text-white m-auto"},[e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.favourites_count)))])]),t._v(" "),e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-comment fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reply_count)))])]),t._v(" "),e("p",{staticClass:"mb-0 info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-sync fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reblogs_count)))])])])])]),t._v(" "),t._m(1,!0),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t")])]):e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[s.sensitive?e("div",{staticClass:"square-content"},[t._m(2,!0),t._v(" "),e("blur-hash-canvas",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash}})],1):e("div",{staticClass:"square-content"},[e("blur-hash-image",{attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash,src:s.media_attachments[0].url}})],1),t._v(" "),e("div",{staticClass:"info-overlay-text"},[e("div",{staticClass:"text-white m-auto"},[e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.favourites_count)))])]),t._v(" "),e("p",{staticClass:"info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-comment fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reply_count)))])]),t._v(" "),e("p",{staticClass:"mb-0 info-overlay-text-field font-weight-bold"},[e("span",{staticClass:"far fa-sync fa-lg p-2 d-flex-inline"}),t._v(" "),e("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(s.reblogs_count)))])])])])]),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t")])])])})),t._v(" "),t.canLoadMore?e("intersect",{on:{enter:t.enterIntersect}},[e("div",{staticClass:"col-4 ph-wrapper"},[e("div",{staticClass:"ph-item"},[e("div",{staticClass:"ph-picture big"})])])]):t._e()],2):1===t.layoutIndex?e("div",{staticClass:"row"},[e("masonry",{attrs:{cols:{default:3,800:2},gutter:{default:"5px"}}},[t._l(t.feed,(function(s,i){return e("div",{key:"tlog:"+i+s.id,staticClass:"p-1"},[s.hasOwnProperty("pf_type")&&"video"==s.pf_type?e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[e("div",{staticClass:"square-content"},[e("blur-hash-image",{staticClass:"rounded",attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash,src:s.media_attachments[0].preview_url}})],1)]),t._v(" "),e("span",{staticClass:"badge badge-light video-overlay-badge"},[e("i",{staticClass:"far fa-video fa-2x"})]),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t")])]):s.sensitive?e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("div",{staticClass:"square"},[e("div",{staticClass:"square-content"},[e("div",{staticClass:"info-overlay-text-label rounded"},[e("h5",{staticClass:"text-white m-auto font-weight-bold"},[e("span",[e("span",{staticClass:"far fa-eye-slash fa-lg p-2 d-flex-inline"})])])]),t._v(" "),e("blur-hash-canvas",{staticClass:"rounded",attrs:{width:"32",height:"32",hash:s.media_attachments[0].blurhash}})],1)])]):e("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(s)}},[e("img",{staticClass:"img-fluid w-100 rounded-lg",attrs:{src:t.previewUrl(s),onerror:"this.onerror=null;this.src='/storage/no-preview.png?v=0'"}}),t._v(" "),e("span",{staticClass:"badge badge-light timestamp-overlay-badge"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.timeago(s.created_at))+"\n\t\t\t\t\t\t")])])])})),t._v(" "),t.canLoadMore?e("intersect",{on:{enter:t.enterIntersect}},[e("div",{staticClass:"p-1 ph-wrapper"},[e("div",{staticClass:"ph-item"},[e("div",{staticClass:"ph-picture big"})])])]):t._e()],2)],1):2===t.layoutIndex?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.feed,(function(s,i){return e("status-card",{key:"prs"+s.id+":"+i,attrs:{profile:t.user,status:s},on:{like:function(e){return t.likeStatus(i)},unlike:function(e){return t.unlikeStatus(i)},share:function(e){return t.shareStatus(i)},unshare:function(e){return t.unshareStatus(i)},menu:function(e){return t.openContextMenu(i)},"counter-change":function(e){return t.counterChange(i,e)},"likes-modal":function(e){return t.openLikesModal(i)},"shares-modal":function(e){return t.openSharesModal(i)},"comment-likes-modal":t.openCommentLikesModal,"handle-report":t.handleReport}})})),1),t._v(" "),t.canLoadMore?e("intersect",{on:{enter:t.enterIntersect}},[e("div",{staticClass:"col-12 col-md-10"},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1)]):t._e()],1):t._e(),t._v(" "),t.feedLoaded&&!t.feed.length?e("div",[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v(t._s(t.$t("profile.emptyPosts")))])])])]):t._e()]):"private"===t.tabIndex?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-secure-feed.svg"}}),t._v(" "),e("p",{staticClass:"h3 text-dark font-weight-bold mt-3 py-3"},[t._v("This profile is private")]),t._v(" "),e("div",{staticClass:"lead text-muted px-3"},[t._v("\n\t\t\t\tOnly approved followers can see "),e("span",{staticClass:"font-weight-bold text-dark text-break"},[t._v("@"+t._s(t.profile.acct))]),t._v("'s "),e("br"),t._v("\n\t\t\t\tposts. To request access, click "),e("span",{staticClass:"font-weight-bold"},[t._v("Follow")]),t._v(".\n\t\t\t")])])]):2==t.tabIndex?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8"},[e("div",{staticClass:"list-group"},t._l(t.collections,(function(s,i){return e("a",{staticClass:"list-group-item text-decoration-none text-dark",attrs:{href:s.url}},[e("div",{staticClass:"media"},[e("img",{staticClass:"rounded-lg border mr-3",staticStyle:{"object-fit":"cover"},attrs:{src:s.thumb,width:"65",height:"65",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}}),t._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"lead mb-0"},[t._v(t._s(s.title?s.title:"Untitled"))]),t._v(" "),e("p",{staticClass:"small text-muted mb-1"},[t._v(t._s(s.description||"No description available"))]),t._v(" "),e("p",{staticClass:"small text-lighter mb-0 font-weight-bold"},[e("span",[t._v(t._s(s.post_count)+" posts")]),t._v(" "),e("span",[t._v("·")]),t._v(" "),"public"===s.visibility?e("span",{staticClass:"text-dark"},[t._v("Public")]):"private"===s.visibility?e("span",{staticClass:"text-dark"},[e("i",{staticClass:"far fa-lock fa-sm"}),t._v(" Followers Only")]):"draft"===s.visibility?e("span",{staticClass:"primary"},[e("i",{staticClass:"far fa-lock fa-sm"}),t._v(" Draft")]):t._e(),t._v(" "),e("span",[t._v("·")]),t._v(" "),s.published_at?e("span",[t._v("Created "+t._s(t.timeago(s.published_at))+" ago")]):e("span",{staticClass:"text-warning"},[t._v("UNPUBLISHED")])])])])])})),0)]),t._v(" "),t.collectionsLoaded&&!t.collections.length?e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v(t._s(t.$t("profile.emptyCollections")))])]):t._e(),t._v(" "),t.canLoadMoreCollections?e("div",{staticClass:"col-12 col-md-8"},[e("intersect",{on:{enter:t.enterCollectionsIntersect}},[e("div",{staticClass:"d-flex justify-content-center mt-5"},[e("b-spinner",{attrs:{small:""}})],1)])],1):t._e()]):3==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.favourites,(function(s,i){return e("status-card",{key:"prs"+s.id+":"+i,attrs:{profile:t.user,status:s},on:{like:function(e){return t.likeStatus(i)},unlike:function(e){return t.unlikeStatus(i)},share:function(e){return t.shareStatus(i)},unshare:function(e){return t.unshareStatus(i)},"counter-change":function(e){return t.counterChange(i,e)},"likes-modal":function(e){return t.openLikesModal(i)},"comment-likes-modal":t.openCommentLikesModal,"handle-report":t.handleReport}})})),1),t._v(" "),t.canLoadMoreFavourites?e("div",{staticClass:"col-12 col-md-10"},[e("intersect",{on:{enter:t.enterFavouritesIntersect}},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1)],1):t._e()]),t._v(" "),t.favourites&&t.favourites.length?t._e():e("div",{staticClass:"row justify-content-center"},[t._m(3)])]):"bookmarks"==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.bookmarks,(function(s,i){return e("status-card",{key:"prs"+s.id+":"+i,attrs:{profile:t.user,"new-reactions":!0,status:s},on:{menu:function(e){return t.openContextMenu(i)},"counter-change":function(e){return t.counterChange(i,e)},"likes-modal":function(e){return t.openLikesModal(i)},bookmark:function(e){return t.handleBookmark(i)},"comment-likes-modal":t.openCommentLikesModal,"handle-report":t.handleReport}})})),1),t._v(" "),e("div",{staticClass:"col-12 col-md-10"},[t.canLoadMoreBookmarks?e("intersect",{on:{enter:t.enterBookmarksIntersect}},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1):t._e()],1)]),t._v(" "),t.bookmarks&&t.bookmarks.length?t._e():e("div",{staticClass:"row justify-content-center"},[t._m(4)])]):"archives"==t.tabIndex?e("div",{staticClass:"px-0 mx-0"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-10"},t._l(t.archives,(function(s,i){return e("status-card",{key:"prarc"+s.id+":"+i,attrs:{profile:t.user,"new-reactions":!0,"reaction-bar":!1,status:s},on:{menu:function(e){return t.openContextMenu(i,"archive")}}})})),1),t._v(" "),t.canLoadMoreArchives?e("div",{staticClass:"col-12 col-md-10"},[e("intersect",{on:{enter:t.enterArchivesIntersect}},[e("status-placeholder",{staticStyle:{"margin-bottom":"10rem"}})],1)],1):t._e()]),t._v(" "),t.archives&&t.archives.length?t._e():e("div",{staticClass:"row justify-content-center"},[t._m(5)])]):t._e(),t._v(" "),t.showMenu?e("context-menu",{ref:"contextMenu",attrs:{status:t.contextMenuPost,profile:t.user},on:{moderate:t.commitModeration,delete:t.deletePost,archived:t.handleArchived,unarchived:t.handleUnarchived,"report-modal":t.handleReport}}):t._e(),t._v(" "),t.showLikesModal?e("likes-modal",{ref:"likesModal",attrs:{status:t.likesModalPost,profile:t.user}}):t._e(),t._v(" "),t.showSharesModal?e("shares-modal",{ref:"sharesModal",attrs:{status:t.sharesModalPost,profile:t.profile}}):t._e(),t._v(" "),e("report-modal",{key:t.reportedStatusId,ref:"reportModal",attrs:{status:t.reportedStatus}})],1)},o=[function(){var t=this._self._c;return t("div",{staticClass:"info-overlay-text-label"},[t("h5",{staticClass:"text-white m-auto font-weight-bold"},[t("span",[t("span",{staticClass:"far fa-eye-slash fa-lg p-2 d-flex-inline"})])])])},function(){var t=this._self._c;return t("span",{staticClass:"badge badge-light video-overlay-badge"},[t("i",{staticClass:"far fa-video fa-2x"})])},function(){var t=this._self._c;return t("div",{staticClass:"info-overlay-text-label"},[t("h5",{staticClass:"text-white m-auto font-weight-bold"},[t("span",[t("span",{staticClass:"far fa-eye-slash fa-lg p-2 d-flex-inline"})])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v("We can't seem to find any posts you have liked")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v("We can't seem to find any posts you have bookmarked")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-12 col-md-8 text-center"},[e("img",{staticClass:"img-fluid",staticStyle:{opacity:"0.6"},attrs:{src:"/img/illustrations/dk-nature-man-monochrome.svg"}}),t._v(" "),e("p",{staticClass:"lead text-muted font-weight-bold"},[t._v("We can't seem to find any posts you have bookmarked")])])}]},48281:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-followers-component"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-8"},[t.isLoaded?e("div",{staticClass:"d-flex justify-content-between align-items-center mb-4"},[e("div",[e("button",{staticClass:"btn btn-outline-dark rounded-pill font-weight-bold",on:{click:function(e){return t.goBack()}}},[t._v("\n Back\n ")])]),t._v(" "),e("div",{staticClass:"d-flex align-items-center justify-content-center flex-column w-100 overflow-hidden"},[e("p",{staticClass:"small text-muted mb-0 text-uppercase font-weight-light cursor-pointer text-truncate text-center",staticStyle:{width:"70%"},on:{click:function(e){return t.goBack()}}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),e("p",{staticClass:"lead font-weight-bold mt-n1 mb-0"},[t._v(t._s(t.$t("profile.followers")))])]),t._v(" "),t._m(0)]):t._e(),t._v(" "),t.isLoaded?e("div",{staticClass:"list-group scroll-card"},[t._l(t.feed,(function(s,i){return e("div",{staticClass:"list-group-item"},[e("a",{staticClass:"text-decoration-none",attrs:{id:"apop_"+s.id,href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",draggable:"false",loading:"lazy",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("span",{staticClass:"text-dark font-weight-bold text-decoration-none",domProps:{innerHTML:t._s(t.getUsername(s))}})]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-muted small text-break"},[t._v("@"+t._s(s.acct))])])])]),t._v(" "),e("b-popover",{attrs:{target:"apop_"+s.id,triggers:"hover",placement:"left",delay:"1000","custom-class":"shadow border-0 rounded-px"}},[e("profile-hover-card",{attrs:{profile:s}})],1)],1)})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("placeholder")],1)],1):t._e(),t._v(" "),t.canLoadMore||t.feed.length?t._e():e("div",[e("div",{staticClass:"list-group-item text-center"},[t.isWarmingCache?e("div",{staticClass:"px-4"},[e("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v("Loading Followers...")]),t._v(" "),e("div",{staticClass:"py-3"},[e("b-spinner",{staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{variant:"primary"}})],1),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Please wait while we collect followers of this account, this shouldn't take long!")])]):e("p",{staticClass:"mb-0 font-weight-bold"},[t._v("No followers yet!")])])])],2):e("div",{staticClass:"list-group"},[e("placeholder")],1)])])])},o=[function(){var t=this._self._c;return t("div",[t("a",{staticClass:"btn btn-dark rounded-pill font-weight-bold spacer-btn",attrs:{href:"#"}},[this._v("Back")])])}]},29594:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-following-component"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-12 col-md-7"},[t.isLoaded?e("div",{staticClass:"d-flex justify-content-between align-items-center mb-4"},[e("div",[e("button",{staticClass:"btn btn-outline-dark rounded-pill font-weight-bold",on:{click:function(e){return t.goBack()}}},[t._v("\n Back\n ")])]),t._v(" "),e("div",{staticClass:"d-flex align-items-center justify-content-center flex-column w-100 overflow-hidden"},[e("p",{staticClass:"small text-muted mb-0 text-uppercase font-weight-light cursor-pointer text-truncate text-center",staticStyle:{width:"70%"},on:{click:function(e){return t.goBack()}}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),e("p",{staticClass:"lead font-weight-bold mt-n1 mb-0"},[t._v(t._s(t.$t("profile.following")))])]),t._v(" "),t._m(0)]):t._e(),t._v(" "),t.isLoaded?e("div",{staticClass:"list-group scroll-card"},[t._l(t.feed,(function(s,i){return e("div",{staticClass:"list-group-item"},[e("a",{staticClass:"text-decoration-none",attrs:{id:"apop_"+s.id,href:s.url},on:{click:function(e){return e.preventDefault(),t.goToProfile(s)}}},[e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3 shadow-sm",staticStyle:{"border-radius":"8px"},attrs:{src:s.avatar,width:"40",height:"40",draggable:"false",loading:"lazy",onerror:"this.src='/storage/avatars/default.jpg?v=0';this.onerror=null;"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate"},[e("span",{staticClass:"text-dark font-weight-bold text-decoration-none",domProps:{innerHTML:t._s(t.getUsername(s))}})]),t._v(" "),e("p",{staticClass:"mb-0 mt-n1 text-muted small text-break"},[t._v("@"+t._s(s.acct))])])])]),t._v(" "),e("b-popover",{attrs:{target:"apop_"+s.id,triggers:"hover",placement:"left",delay:"1000","custom-class":"shadow border-0 rounded-px"}},[e("profile-hover-card",{attrs:{profile:s}})],1)],1)})),t._v(" "),t.canLoadMore?e("div",[e("intersect",{on:{enter:t.enterIntersect}},[e("placeholder")],1)],1):t._e(),t._v(" "),t.canLoadMore||t.feed.length?t._e():e("div",[e("div",{staticClass:"list-group-item text-center"},[t.isWarmingCache?e("div",{staticClass:"px-4"},[e("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v("Loading Following...")]),t._v(" "),e("div",{staticClass:"py-3"},[e("b-spinner",{staticStyle:{width:"1.5rem",height:"1.5rem"},attrs:{variant:"primary"}})],1),t._v(" "),e("p",{staticClass:"small text-muted mb-0"},[t._v("Please wait while we collect following accounts, this shouldn't take long!")])]):e("p",{staticClass:"mb-0 font-weight-bold"},[t._v("No following anyone yet!")])])])],2):e("div",{staticClass:"list-group"},[e("placeholder")],1)])])])},o=[function(){var t=this._self._c;return t("div",[t("a",{staticClass:"btn btn-dark rounded-pill font-weight-bold spacer-btn",attrs:{href:"#"}},[this._v("Back")])])}]},53577:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-hover-card"},[e("div",{staticClass:"profile-hover-card-inner"},[e("div",{staticClass:"d-flex justify-content-between align-items-start",staticStyle:{"max-width":"240px"}},[e("a",{attrs:{href:t.profile.url},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}},[e("img",{staticClass:"avatar",attrs:{src:t.profile.avatar,width:"50",height:"50",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),t.user.id==t.profile.id?e("div",[e("a",{staticClass:"btn btn-outline-primary px-3 py-1 font-weight-bold rounded-pill",attrs:{href:"/settings/home"}},[t._v("Edit Profile")])]):t._e(),t._v(" "),t.user.id!=t.profile.id&&t.relationship?e("div",[t.relationship.following?e("button",{staticClass:"btn btn-outline-primary px-3 py-1 font-weight-bold rounded-pill",attrs:{disabled:t.isLoading},on:{click:function(e){return t.performUnfollow()}}},[t.isLoading?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Following")])]):e("div",[t.relationship.requested?e("button",{staticClass:"btn btn-primary primary px-3 py-1 font-weight-bold rounded-pill",attrs:{disabled:""}},[t._v("Follow Requested")]):e("button",{staticClass:"btn btn-primary primary px-3 py-1 font-weight-bold rounded-pill",attrs:{disabled:t.isLoading},on:{click:function(e){return t.performFollow()}}},[t.isLoading?e("span",[e("b-spinner",{attrs:{small:""}})],1):e("span",[t._v("Follow")])])])]):t._e()]),t._v(" "),e("p",{staticClass:"display-name"},[e("a",{attrs:{href:t.profile.url},domProps:{innerHTML:t._s(t.getDisplayName())},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}})]),t._v(" "),e("div",{staticClass:"username"},[e("a",{staticClass:"username-link",attrs:{href:t.profile.url},on:{click:function(e){return e.preventDefault(),t.goToProfile()}}},[t._v("\n\t\t\t\t@"+t._s(t.getUsername())+"\n\t\t\t")]),t._v(" "),t.user.id!=t.profile.id&&t.relationship&&t.relationship.followed_by?e("p",{staticClass:"username-follows-you"},[e("span",[t._v("Follows You")])]):t._e()]),t._v(" "),t.profile.hasOwnProperty("pronouns")&&t.profile.pronouns&&t.profile.pronouns.length?e("p",{staticClass:"pronouns"},[t._v("\n\t\t\t"+t._s(t.profile.pronouns.join(", "))+"\n\t\t")]):t._e(),t._v(" "),e("p",{staticClass:"bio",domProps:{innerHTML:t._s(t.bio)}}),t._v(" "),e("p",{staticClass:"stats"},[e("span",{staticClass:"stats-following"},[e("span",{staticClass:"following-count"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" Following\n\t\t\t")]),t._v(" "),e("span",{staticClass:"stats-followers"},[e("span",{staticClass:"followers-count"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" Followers\n\t\t\t")])])])])},o=[]},59100:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"profile-sidebar-component"},[e("div",[e("div",{staticClass:"d-block d-md-none"},[e("div",{staticClass:"media user-card user-select-none"},[e("div",{staticStyle:{position:"relative"}},[e("img",{staticClass:"avatar shadow cursor-pointer",attrs:{src:t.profile.avatar,draggable:"false",onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}})]),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"display-name",domProps:{innerHTML:t._s(t.getDisplayName())}}),t._v(" "),e("p",{staticClass:"username",class:{remote:!t.profile.local}},[t.profile.local?e("span",[t._v("@"+t._s(t.profile.acct))]):e("a",{staticClass:"primary",attrs:{href:t.profile.url}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),t.profile.locked?e("span",[e("i",{staticClass:"fal fa-lock ml-1 fa-sm text-lighter"})]):t._e()]),t._v(" "),e("div",{staticClass:"stats"},[e("div",{staticClass:"stats-posts",on:{click:function(e){return t.toggleTab("index")}}},[e("div",{staticClass:"posts-count"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v(" "),e("div",{staticClass:"stats-label"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.$t("profile.posts"))+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"stats-followers",on:{click:function(e){return t.toggleTab("followers")}}},[e("div",{staticClass:"followers-count"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" "),e("div",{staticClass:"stats-label"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.$t("profile.followers"))+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"stats-following",on:{click:function(e){return t.toggleTab("following")}}},[e("div",{staticClass:"following-count"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" "),e("div",{staticClass:"stats-label"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.$t("profile.following"))+"\n\t\t\t\t\t\t\t\t")])])])])])]),t._v(" "),e("div",{staticClass:"d-none d-md-flex justify-content-between align-items-center"},[e("button",{staticClass:"btn btn-link",on:{click:function(e){return t.goBack()}}},[e("i",{staticClass:"far fa-chevron-left fa-lg text-lighter"})]),t._v(" "),e("div",[e("img",{staticClass:"avatar img-fluid shadow border",attrs:{src:t.getAvatar(),onerror:"this.onerror=null;this.src='/storage/avatars/default.png?v=0';"}}),t._v(" "),t.profile.is_admin?e("p",{staticClass:"text-right",staticStyle:{"margin-top":"-30px"}},[e("span",{staticClass:"admin-label"},[t._v("Admin")])]):t._e()]),t._v(" "),e("b-dropdown",{attrs:{variant:"link",right:"","no-caret":""},scopedSlots:t._u([{key:"button-content",fn:function(){return[e("i",{staticClass:"far fa-lg fa-cog text-lighter"})]},proxy:!0}])},[t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.goToOldProfile()}}},[t._v("View in old UI")]):t._e(),t._v(" "),e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.copyTextToClipboard(t.profile.url)}}},[t._v("Copy Link")]),t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"/users/"+t.profile.username+".atom","link-class":"font-weight-bold"}},[t._v("Atom feed")]):t._e(),t._v(" "),t.profile.id==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{href:"/settings/home","link-class":"font-weight-bold"}},[e("i",{staticClass:"far fa-cog mr-1"}),t._v(" Settings\n\t\t\t\t\t\t")])],1):e("div",[t.profile.local?t._e():e("b-dropdown-item",{attrs:{href:t.profile.url,"link-class":"font-weight-bold"}},[t._v("View Remote Profile")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/web/direct/thread/"+t.profile.id,"link-class":"font-weight-bold"}},[t._v("Direct Message")])],1),t._v(" "),t.profile.id!==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleMute()}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.relationship.muting?"Unmute":"Mute")+"\n\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleBlock()}}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.relationship.blocking?"Unblock":"Block")+"\n\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/report?type=user&id="+t.profile.id,"link-class":"text-danger font-weight-bold"}},[t._v("Report")])],1):t._e()],1)],1),t._v(" "),e("div",{staticClass:"d-none d-md-block text-center"},[e("p",{staticClass:"display-name",domProps:{innerHTML:t._s(t.getDisplayName())}}),t._v(" "),e("p",{staticClass:"username",class:{remote:!t.profile.local}},[t.profile.local?e("span",[t._v("@"+t._s(t.profile.acct))]):e("a",{staticClass:"primary",attrs:{href:t.profile.url}},[t._v("@"+t._s(t.profile.acct))]),t._v(" "),t.profile.locked?e("span",[e("i",{staticClass:"fal fa-lock ml-1 fa-sm text-lighter"})]):t._e()]),t._v(" "),t.user.id!=t.profile.id&&(t.relationship.followed_by||t.relationship.muting||t.relationship.blocking)?e("p",{staticClass:"mt-n3 text-center"},[t.relationship.followed_by?e("span",{staticClass:"badge badge-primary p-1"},[t._v("Follows you")]):t._e(),t._v(" "),t.relationship.muting?e("span",{staticClass:"badge badge-dark p-1 ml-1"},[t._v("Muted")]):t._e(),t._v(" "),t.relationship.blocking?e("span",{staticClass:"badge badge-danger p-1 ml-1"},[t._v("Blocked")]):t._e()]):t._e()]),t._v(" "),e("div",{staticClass:"d-none d-md-block stats py-2"},[e("div",{staticClass:"d-flex justify-content-between"},[e("button",{staticClass:"btn btn-link stat-item",on:{click:function(e){return t.toggleTab("index")}}},[e("strong",{attrs:{title:t.profile.statuses_count}},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v(" "),e("span",[t._v(t._s(t.$t("profile.posts")))])]),t._v(" "),e("button",{staticClass:"btn btn-link stat-item",on:{click:function(e){return t.toggleTab("followers")}}},[e("strong",{attrs:{title:t.profile.followers_count}},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" "),e("span",[t._v(t._s(t.$t("profile.followers")))])]),t._v(" "),e("button",{staticClass:"btn btn-link stat-item",on:{click:function(e){return t.toggleTab("following")}}},[e("strong",{attrs:{title:t.profile.following_count}},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" "),e("span",[t._v(t._s(t.$t("profile.following")))])])])]),t._v(" "),e("div",{staticClass:"d-flex align-items-center mb-3 mb-md-0"},[t.user.id===t.profile.id?e("div",{staticStyle:{"flex-grow":"1"}},[e("a",{staticClass:"btn btn-light font-weight-bold btn-block follow-btn",attrs:{href:"/settings/home"}},[t._v(t._s(t.$t("profile.editProfile")))]),t._v(" "),t.profile.locked?t._e():e("a",{staticClass:"btn btn-light font-weight-bold btn-block follow-btn mt-md-n4",attrs:{href:"/i/web/my-portfolio"}},[t._v("\n My Portfolio\n "),e("span",{staticClass:"badge badge-success ml-1"},[t._v("NEW")])])]):t.profile.hasOwnProperty("moved")&&t.profile.moved.id?e("div",{staticStyle:{"flex-grow":"1"}},[e("div",{staticClass:"card shadow-none rounded-lg mb-3 bg-danger"},[e("div",{staticClass:"card-body"},[t._m(0),t._v(" "),e("p",{staticClass:"mb-0 lead ft-std text-white text-break"},[e("router-link",{staticClass:"btn btn-outline-light btn-block rounded-pill font-weight-bold",attrs:{to:"/i/web/profile/".concat(t.profile.moved.id)}},[t._v("@"+t._s(t.truncate(t.profile.moved.acct)))])],1)])])]):t.profile.locked?e("div",{staticStyle:{"flex-grow":"1"}},[t.relationship.following||t.relationship.requested?t.relationship.requested?e("div",[e("button",{staticClass:"btn btn-primary font-weight-bold btn-block follow-btn",attrs:{disabled:""}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("profile.followRequested"))+"\n\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"small font-weight-bold text-center mt-n4"},[e("a",{attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.cancelFollowRequest()}}},[t._v("Cancel Follow Request")])])]):t.relationship.following?e("button",{staticClass:"btn btn-primary font-weight-bold btn-block unfollow-btn",on:{click:t.unfollow}},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.unfollow"))+"\n\t\t\t\t\t")]):t._e():[e("button",{staticClass:"btn btn-primary font-weight-bold btn-block follow-btn",attrs:{disabled:t.relationship.blocking},on:{click:t.follow}},[t._v("\n\t\t\t\t\t\t\tRequest Follow\n\t\t\t\t\t\t")]),t._v(" "),t.relationship.blocking?e("p",{staticClass:"mt-n4 text-lighter",staticStyle:{"font-size":"11px"}},[t._v("You need to unblock this account before you can request to follow.")]):t._e()]],2):e("div",{staticStyle:{"flex-grow":"1"}},[t.relationship.following?e("button",{staticClass:"btn btn-primary font-weight-bold btn-block unfollow-btn",on:{click:t.unfollow}},[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.unfollow"))+"\n\t\t\t\t\t")]):[e("button",{staticClass:"btn btn-primary font-weight-bold btn-block follow-btn",attrs:{disabled:t.relationship.blocking},on:{click:t.follow}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.$t("profile.follow"))+"\n\t\t\t\t\t\t")]),t._v(" "),t.relationship.blocking?e("p",{staticClass:"mt-n4 text-lighter",staticStyle:{"font-size":"11px"}},[t._v("You need to unblock this account before you can follow.")]):t._e()]],2),t._v(" "),e("div",{staticClass:"d-block d-md-none ml-3"},[e("b-dropdown",{attrs:{variant:"link",right:"","no-caret":""},scopedSlots:t._u([{key:"button-content",fn:function(){return[e("i",{staticClass:"far fa-lg fa-cog text-lighter"})]},proxy:!0}])},[t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.goToOldProfile()}}},[t._v("View in old UI")]):t._e(),t._v(" "),e("b-dropdown-item",{attrs:{href:"#","link-class":"font-weight-bold"},on:{click:function(e){return e.preventDefault(),t.copyTextToClipboard(t.profile.url)}}},[t._v("Copy Link")]),t._v(" "),t.profile.local?e("b-dropdown-item",{attrs:{href:"/users/"+t.profile.username+".atom","link-class":"font-weight-bold"}},[t._v("Atom feed")]):t._e(),t._v(" "),t.profile.id==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{href:"/settings/home","link-class":"font-weight-bold"}},[e("i",{staticClass:"far fa-cog mr-1"}),t._v(" Settings\n\t\t\t\t\t\t\t")])],1):e("div",[t.profile.local?t._e():e("b-dropdown-item",{attrs:{href:t.profile.url,"link-class":"font-weight-bold"}},[t._v("View Remote Profile")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/web/direct/thread/"+t.profile.id,"link-class":"font-weight-bold"}},[t._v("Direct Message")])],1),t._v(" "),t.profile.id!==t.user.id?e("div",[e("b-dropdown-divider"),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleMute()}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.relationship.muting?"Unmute":"Mute")+"\n\t\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{"link-class":"font-weight-bold"},on:{click:function(e){return t.handleBlock()}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.relationship.blocking?"Unblock":"Block")+"\n\t\t\t\t\t\t\t")]),t._v(" "),e("b-dropdown-item",{attrs:{href:"/i/report?type=user&id="+t.profile.id,"link-class":"text-danger font-weight-bold"}},[t._v("Report")])],1):t._e()],1)],1)]),t._v(" "),t.profile.note&&t.renderedBio&&t.renderedBio.length?e("div",{staticClass:"bio-wrapper card shadow-none"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"bio-body"},[e("div",{domProps:{innerHTML:t._s(t.renderedBio)}})])])]):t._e(),t._v(" "),e("div",{staticClass:"d-none d-md-block card card-body shadow-none py-2"},[t.profile.website?e("p",{staticClass:"small"},[t._m(1),t._v(" "),e("span",[e("a",{staticClass:"font-weight-bold",attrs:{href:t.profile.website}},[t._v(t._s(t.profile.website))])])]):t._e(),t._v(" "),e("p",{staticClass:"mb-0 small"},[t._m(2),t._v(" "),t.profile.local?e("span",[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.joined"))+" "+t._s(t.getJoinedDate())+"\n\t\t\t\t\t")]):e("span",[t._v("\n\t\t\t\t\t\t"+t._s(t.$t("profile.joined"))+" "+t._s(t.getJoinedDate())+"\n\n\t\t\t\t\t\t"),e("span",{staticClass:"float-right primary"},[e("i",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"far fa-info-circle",attrs:{title:"This user is from a remote server and may have created their account before this date"}})])])])]),t._v(" "),e("div",{staticClass:"d-none d-md-flex sidebar-sitelinks"},[e("a",{attrs:{href:"/site/about"}},[t._v(t._s(t.$t("navmenu.about")))]),t._v(" "),e("router-link",{attrs:{to:"/i/web/help"}},[t._v(t._s(t.$t("navmenu.help")))]),t._v(" "),e("router-link",{attrs:{to:"/i/web/language"}},[t._v(t._s(t.$t("navmenu.language")))]),t._v(" "),e("a",{attrs:{href:"/site/terms"}},[t._v(t._s(t.$t("navmenu.privacy")))]),t._v(" "),e("a",{attrs:{href:"/site/terms"}},[t._v(t._s(t.$t("navmenu.terms")))])],1),t._v(" "),t._m(3)]),t._v(" "),e("b-modal",{ref:"fullBio",attrs:{centered:"","hide-footer":"","ok-only":"","ok-title":"Close","ok-variant":"light",scrollable:!0,"body-class":"p-md-5",title:"Bio"}},[e("div",{domProps:{innerHTML:t._s(t.profile.note)}})])],1)},o=[function(){var t=this._self._c;return t("div",{staticClass:"d-flex align-items-center ft-std text-white mb-2"},[t("i",{staticClass:"far fa-exclamation-triangle mr-2 text-white"}),this._v("\n Account has moved to:\n ")])},function(){var t=this._self._c;return t("span",{staticClass:"text-lighter mr-2"},[t("i",{staticClass:"far fa-link"})])},function(){var t=this._self._c;return t("span",{staticClass:"text-lighter mr-2"},[t("i",{staticClass:"far fa-clock"})])},function(){var t=this._self._c;return t("div",{staticClass:"d-none d-md-block sidebar-attribution"},[t("a",{staticClass:"font-weight-bold",attrs:{href:"https://pixelfed.org"}},[this._v("Powered by Pixelfed")])])}]},23875:(t,e,s)=>{"use strict";s.r(e),s.d(e,{render:()=>i,staticRenderFns:()=>o});var i=function(){var t=this,e=t._self._c;return e("div",[1==t.status.sensitive?e("div",{staticClass:"content-label-wrapper"},[e("div",{staticClass:"text-light content-label"},[t._m(0),t._v(" "),e("p",{staticClass:"h4 font-weight-bold text-center"},[t._v("\n Sensitive Content\n ")]),t._v(" "),e("p",{staticClass:"text-center py-2 content-label-text"},[t._v("\n "+t._s(t.status.spoiler_text?t.status.spoiler_text:"This post may contain sensitive content.")+"\n ")]),t._v(" "),e("p",{staticClass:"mb-0"},[e("button",{staticClass:"btn btn-outline-light btn-block btn-sm font-weight-bold",on:{click:function(e){t.status.sensitive=!1}}},[t._v("See Post")])])])]):[t.shouldPlay?[t.hasHls?e("video",{ref:"video",class:{fixedHeight:t.fixedHeight},staticStyle:{margin:"0"},attrs:{playsinline:"",controls:"",autoplay:"false",poster:t.getPoster(t.status)}}):e("video",{staticClass:"card-img-top shadow",class:{fixedHeight:t.fixedHeight},staticStyle:{"border-radius":"15px","object-fit":"contain","background-color":"#000"},attrs:{autoplay:"false",controls:"",poster:t.getPoster(t.status)}},[e("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])]:e("div",{staticClass:"content-label-wrapper",style:{background:"linear-gradient(rgba(0, 0, 0, 0.2),rgba(0, 0, 0, 0.8)),url(".concat(t.getPoster(t.status),")"),backgroundSize:"cover"}},[e("div",{staticClass:"text-light content-label"},[e("p",{staticClass:"mb-0"},[e("button",{staticClass:"btn btn-link btn-block btn-sm font-weight-bold",on:{click:function(e){return e.preventDefault(),t.handleShouldPlay.apply(null,arguments)}}},[e("i",{staticClass:"fas fa-play fa-5x text-white"})])])])])]],2)},o=[function(){var t=this._self._c;return t("p",{staticClass:"text-center"},[t("i",{staticClass:"far fa-eye-slash fa-2x"})])}]},49247:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-timeline-component[data-v-5efd4702]{margin-bottom:10rem}",""]);const a=o},35296:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,'.timeline-status-component{margin-bottom:1rem}.timeline-status-component .btn:focus{box-shadow:none!important}.timeline-status-component .avatar{border-radius:15px}.timeline-status-component .VueCarousel-wrapper .VueCarousel-slide img{-o-object-fit:contain;object-fit:contain}.timeline-status-component .status-text{z-index:3}.timeline-status-component .reaction-liked-by,.timeline-status-component .status-text.py-0{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.timeline-status-component .reaction-liked-by{font-size:11px;font-weight:600}.timeline-status-component .location,.timeline-status-component .timestamp,.timeline-status-component .visibility{color:#94a3b8;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.timeline-status-component .invisible{display:none}.timeline-status-component .blurhash-wrapper img{border-radius:0;-o-object-fit:cover;object-fit:cover}.timeline-status-component .blurhash-wrapper canvas{border-radius:0}.timeline-status-component .content-label-wrapper{background-color:#000;border-radius:0;height:400px;overflow:hidden;position:relative;width:100%}.timeline-status-component .content-label-wrapper canvas,.timeline-status-component .content-label-wrapper img{cursor:pointer;max-height:400px}.timeline-status-component .content-label{align-items:center;background:rgba(0,0,0,.2);border-radius:0;display:flex;flex-direction:column;height:100%;justify-content:center;margin:0;position:absolute;width:100%;z-index:2}.timeline-status-component .rounded-bottom{border-bottom-left-radius:15px!important;border-bottom-right-radius:15px!important}.timeline-status-component .card-footer .media{position:relative}.timeline-status-component .card-footer .media .comment-border-link{background-clip:padding-box;background-color:#e5e7eb;border-left:4px solid transparent;border-right:4px solid transparent;display:block;height:calc(100% - 100px);left:11px;position:absolute;top:40px;width:10px}.timeline-status-component .card-footer .media .comment-border-link:hover{background-color:#bfdbfe}.timeline-status-component .card-footer .media .child-reply-form{position:relative}.timeline-status-component .card-footer .media .comment-border-arrow{background-clip:padding-box;background-color:#e5e7eb;border-bottom:2px solid transparent;border-left:4px solid transparent;border-right:4px solid transparent;display:block;height:29px;left:-33px;position:absolute;top:-6px;width:10px}.timeline-status-component .card-footer .media .comment-border-arrow:after{background-color:#e5e7eb;content:"";display:block;height:2px;left:2px;position:absolute;top:25px;width:15px}.timeline-status-component .card-footer .media-status{margin-bottom:1.3rem}.timeline-status-component .card-footer .media-avatar{border-radius:8px;margin-right:12px}.timeline-status-component .card-footer .media-body-comment{background-color:var(--comment-bg);border-radius:.9rem;padding:.4rem .7rem;width:-moz-fit-content;width:fit-content}.timeline-status-component .card-footer .media-body-comment-username{color:var(--body-color);font-size:14px;font-weight:700!important;margin-bottom:.25rem!important}.timeline-status-component .card-footer .media-body-comment-username a{color:var(--body-color);text-decoration:none}.timeline-status-component .card-footer .media-body-comment-content{font-size:16px;margin-bottom:0}.timeline-status-component .card-footer .media-body-reactions{color:#b8c2cc!important;font-size:12px;margin-bottom:0!important;margin-top:.4rem!important}.timeline-status-component .fixedHeight{max-height:400px}.timeline-status-component .fixedHeight .VueCarousel-wrapper{border-radius:15px}.timeline-status-component .fixedHeight .VueCarousel-slide img{max-height:400px}.timeline-status-component .fixedHeight .blurhash-wrapper img{background-color:transparent;height:400px;max-height:400px;-o-object-fit:contain;object-fit:contain}.timeline-status-component .fixedHeight .blurhash-wrapper canvas{max-height:400px}.timeline-status-component .fixedHeight .content-label-wrapper{border-radius:15px}.timeline-status-component .fixedHeight .content-label{border-radius:0;height:400px}',""]);const a=o},35518:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".app-drawer-component .nav-link{padding:.5rem .1rem}.app-drawer-component .nav-link.active{background-color:transparent}.app-drawer-component .nav-link.router-link-exact-active{background-color:transparent;color:var(--primary)!important}.app-drawer-component .nav-link p{margin-bottom:0}.app-drawer-component .nav-link-label{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:10px;font-weight:700;margin-top:0;opacity:.6;text-transform:uppercase}",""]);const a=o},34857:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,'.post-comment-drawer-feed{margin-bottom:1rem}.post-comment-drawer-feed .sort-menu .dropdown{border-radius:18px}.post-comment-drawer-feed .sort-menu .dropdown-menu{padding:0}.post-comment-drawer-feed .sort-menu .dropdown-item:active{background-color:inherit}.post-comment-drawer-feed .sort-menu .title{color:var(--dropdown-item-color)}.post-comment-drawer-feed .sort-menu .description{color:var(--dropdown-item-color);font-size:12px;margin-bottom:0}.post-comment-drawer-feed .sort-menu .active .title{color:var(--dropdown-item-active-color);font-weight:600}.post-comment-drawer-feed .sort-menu .active .description{color:var(--dropdown-item-active-color)}.post-comment-drawer-feed-loader{align-items:center;display:flex;height:200px;justify-content:center}.post-comment-drawer .media-body-comment{min-width:240px;position:relative}.post-comment-drawer .media-body-wrapper .media-body-comment{padding:.7rem}.post-comment-drawer .media-body-wrapper .media-body-likes-count{background-color:var(--body-bg);border-radius:15px;bottom:-10px;font-size:12px;font-weight:600;padding:1px 8px;position:absolute;right:-5px;text-decoration:none;-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important;z-index:3}.post-comment-drawer .media-body-wrapper .media-body-likes-count i{margin-right:3px}.post-comment-drawer .media-body-wrapper .media-body-likes-count .count{color:#334155}.post-comment-drawer .media-body-show-replies{font-size:13px;margin-bottom:5px;margin-top:-5px}.post-comment-drawer .media-body-show-replies a{align-items:center;display:flex;text-decoration:none}.post-comment-drawer .media-body-show-replies-icon{display:inline-block;font-family:Font Awesome\\ 5 Free;font-style:normal;font-variant:normal;font-weight:400;line-height:1;margin-right:.25rem;padding-left:.5rem;text-decoration:none;text-rendering:auto;transform:rotate(90deg)}.post-comment-drawer .media-body-show-replies-icon:before{content:"\\f148"}.post-comment-drawer .media-body-show-replies-label{padding-top:9px}.post-comment-drawer-loadmore{font-size:.7875rem}.post-comment-drawer .reply-form-input{flex:1;position:relative}.post-comment-drawer .reply-form-input-actions{position:absolute;right:10px;top:50%;transform:translateY(-50%)}.post-comment-drawer .reply-form-input-actions.open{top:85%;transform:translateY(-85%)}.post-comment-drawer .child-reply-form{position:relative}.post-comment-drawer .bh-comment{height:auto;max-height:260px!important;max-width:160px!important;position:relative;width:100%}.post-comment-drawer .bh-comment .img-fluid,.post-comment-drawer .bh-comment canvas{border-radius:8px}.post-comment-drawer .bh-comment img,.post-comment-drawer .bh-comment span{height:auto;max-height:260px!important;max-width:160px!important;width:100%}.post-comment-drawer .bh-comment img{border-radius:8px;-o-object-fit:cover;object-fit:cover}.post-comment-drawer .bh-comment.bh-comment-borderless{border-radius:8px;margin-bottom:5px;overflow:hidden}.post-comment-drawer .bh-comment.bh-comment-borderless .img-fluid,.post-comment-drawer .bh-comment.bh-comment-borderless canvas,.post-comment-drawer .bh-comment.bh-comment-borderless img{border-radius:0}.post-comment-drawer .bh-comment .sensitive-warning{background:rgba(0,0,0,.4);border-radius:8px;color:#fff;cursor:pointer;left:50%;padding:5px;position:absolute;text-align:center;top:50%;transform:translate(-50%,-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.post-comment-drawer .v-tribute{width:100%}',""]);const a=o},49777:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".img-contain img{-o-object-fit:contain;object-fit:contain}",""]);const a=o},88740:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-feed-component{margin-top:0}.profile-feed-component .ph-wrapper{padding:.25rem}.profile-feed-component .ph-wrapper .ph-item{background-color:transparent;border:none;margin:0;padding:0}.profile-feed-component .ph-wrapper .ph-item .ph-picture{border-radius:5px;height:auto;padding-bottom:100%}.profile-feed-component .ph-wrapper .ph-item>*{margin-bottom:0}.profile-feed-component .info-overlay-text-field{font-size:13.5px;margin-bottom:2px}@media (min-width:768px){.profile-feed-component .info-overlay-text-field{font-size:20px;margin-bottom:15px}}.profile-feed-component .video-overlay-badge{color:var(--dark);opacity:.6;padding-bottom:1px;position:absolute;right:10px;top:10px}.profile-feed-component .timestamp-overlay-badge{bottom:10px;opacity:.6;position:absolute;right:10px}.profile-feed-component .profile-nav-btns{margin-right:1rem}.profile-feed-component .profile-nav-btns .btn-group{min-height:45px}.profile-feed-component .profile-nav-btns .btn-link{border-radius:0;color:var(--text-lighter);font-size:14px;font-weight:700;margin-right:1rem}.profile-feed-component .profile-nav-btns .btn-link:hover{color:var(--text-muted);text-decoration:none}.profile-feed-component .profile-nav-btns .btn-link.active{border-bottom:1px solid var(--dark);color:var(--dark);transition:border-bottom .25s ease-in-out}.profile-feed-component .layout-sort-toggle .btn{border:none}.profile-feed-component .layout-sort-toggle .btn.btn-light{opacity:.4}",""]);const a=o},46058:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-followers-component .list-group-item{border:none}.profile-followers-component .list-group-item:not(:last-child){border-bottom:1px solid rgba(0,0,0,.125)}.profile-followers-component .scroll-card{-ms-overflow-style:none;max-height:calc(100vh - 250px);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:none}.profile-followers-component .scroll-card::-webkit-scrollbar{display:none}.profile-followers-component .spacer-btn{opacity:0;pointer-events:none}",""]);const a=o},92519:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-following-component .list-group-item{border:none}.profile-following-component .list-group-item:not(:last-child){border-bottom:1px solid rgba(0,0,0,.125)}.profile-following-component .scroll-card{-ms-overflow-style:none;max-height:calc(100vh - 250px);overflow-y:auto;scroll-behavior:smooth;scrollbar-width:none}.profile-following-component .scroll-card::-webkit-scrollbar{display:none}.profile-following-component .spacer-btn{opacity:0;pointer-events:none}",""]);const a=o},93100:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,".profile-hover-card{border:none;display:block;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;overflow:hidden;padding:.5rem;width:300px}.profile-hover-card .avatar{border-radius:15px;box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important;margin-bottom:.5rem}.profile-hover-card .display-name{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:16px;font-weight:800;font-weight:800!important;line-height:.8;margin-bottom:2px;margin-top:5px;max-width:240px;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}.profile-hover-card .display-name a{color:var(--body-color);text-decoration:none}.profile-hover-card .username{font-size:12px;font-weight:700;margin-bottom:.6rem;margin-top:0;max-width:240px;overflow:hidden;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}.profile-hover-card .username-link{color:var(--text-lighter);margin-right:4px;text-decoration:none}.profile-hover-card .username-follows-you{margin:4px 0}.profile-hover-card .username-follows-you span{background-color:var(--comment-bg);border-radius:6px;color:var(--dropdown-item-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:12px;font-weight:500;line-height:16px;padding:2px 4px}.profile-hover-card .pronouns{color:#9ca3af;font-size:11px;font-weight:600;margin-bottom:.6rem;margin-top:-.8rem}.profile-hover-card .bio{color:var(--body-color);font-size:12px;line-height:1.2;margin-bottom:0;max-height:60px;max-width:240px;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.profile-hover-card .bio .invisible{display:none}.profile-hover-card .stats{color:var(--body-color);font-size:14px;margin-bottom:0;margin-top:.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}.profile-hover-card .stats .stats-following{margin-right:.8rem}.profile-hover-card .stats .followers-count,.profile-hover-card .stats .following-count{font-weight:800}.profile-hover-card .btn.rounded-pill{min-width:80px}",""]);const a=o},34347:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(76798),o=s.n(i)()((function(t){return t[1]}));o.push([t.id,'.profile-sidebar-component{margin-bottom:1rem}.profile-sidebar-component .avatar{border-radius:15px;margin-bottom:1rem;width:140px}.profile-sidebar-component .display-name{font-size:20px;font-size:15px;font-weight:800!important;line-height:.8;margin-bottom:0;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}.profile-sidebar-component .display-name,.profile-sidebar-component .username{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif}.profile-sidebar-component .username{color:var(--primary);font-size:14px;font-weight:600}.profile-sidebar-component .username.remote{font-size:11px}.profile-sidebar-component .stats{margin-bottom:1rem}.profile-sidebar-component .stats .stat-item{flex:0 0 33%;margin:0;max-width:33%;padding:0;text-align:center;text-decoration:none}.profile-sidebar-component .stats .stat-item strong{color:var(--body-color);display:block;font-size:18px;line-height:.9}.profile-sidebar-component .stats .stat-item span{color:#b8c2cc;display:block;font-size:12px}@media (min-width:768px){.profile-sidebar-component .follow-btn{margin-bottom:2rem}}.profile-sidebar-component .follow-btn.btn-primary{background-color:var(--primary)}.profile-sidebar-component .follow-btn.btn-light{border-color:var(--input-border)}.profile-sidebar-component .unfollow-btn{background-color:rgba(59,130,246,.7)}@media (min-width:768px){.profile-sidebar-component .unfollow-btn{margin-bottom:2rem}}.profile-sidebar-component .bio-wrapper{margin-bottom:1rem}.profile-sidebar-component .bio-wrapper .bio-body{display:block;font-size:12px!important;position:relative;white-space:pre-wrap}.profile-sidebar-component .bio-wrapper .bio-body .username{font-size:12px!important}.profile-sidebar-component .bio-wrapper .bio-body.long{max-height:80px;overflow:hidden}.profile-sidebar-component .bio-wrapper .bio-body.long:after{background:linear-gradient(180deg,transparent,hsla(0,0%,100%,.9) 60%,#fff 90%);content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:2}.profile-sidebar-component .bio-wrapper .bio-body p{margin-bottom:0!important}.profile-sidebar-component .bio-wrapper .bio-more{position:relative;z-index:3}.profile-sidebar-component .admin-label{background:#fee2e2;border:1px solid #fca5a5;border-radius:8px;color:#b91c1c;display:inline-block;font-size:12px;font-weight:600;padding:1px 5px;text-transform:capitalize}.profile-sidebar-component .sidebar-sitelinks{justify-content:space-between;margin-top:1rem;padding:0}.profile-sidebar-component .sidebar-sitelinks a{color:#b8c2cc;font-size:12px}.profile-sidebar-component .sidebar-sitelinks .active{color:#212529;font-weight:600}.profile-sidebar-component .sidebar-attribution{color:#b8c2cc!important;font-size:12px;margin-top:.5rem}.profile-sidebar-component .sidebar-attribution a{color:#b8c2cc!important}.profile-sidebar-component .user-card{align-items:center}.profile-sidebar-component .user-card .avatar{border:1px solid #e5e7eb;border-radius:15px;height:80px;margin-right:.8rem;width:80px}@media (min-width:390px){.profile-sidebar-component .user-card .avatar{height:100px;width:100px}}.profile-sidebar-component .user-card .avatar-update-btn{background:hsla(0,0%,100%,.9);border:1px solid #dee2e6!important;border-radius:50rem;bottom:0;height:20px;padding:0;position:absolute;right:12px;width:20px}.profile-sidebar-component .user-card .avatar-update-btn-icon{-webkit-font-smoothing:antialiased;display:inline-block;font-family:Font Awesome\\ 5 Free;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-rendering:auto}.profile-sidebar-component .user-card .avatar-update-btn-icon:before{content:"\\f013"}.profile-sidebar-component .user-card .username{font-size:13px;font-weight:600;line-height:12px;margin:4px 0;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}@media (min-width:390px){.profile-sidebar-component .user-card .username{font-size:16px;margin:8px 0}}.profile-sidebar-component .user-card .display-name{color:var(--body-color);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:20px;font-weight:800!important;line-height:.8;margin-bottom:0;-webkit-user-select:all;-moz-user-select:all;user-select:all;word-break:break-word}@media (min-width:390px){.profile-sidebar-component .user-card .display-name{font-size:24px}}.profile-sidebar-component .user-card .stats{display:flex;flex-direction:row;font-size:16px;justify-content:space-between;margin-bottom:0;margin-top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.profile-sidebar-component .user-card .stats .followers-count,.profile-sidebar-component .user-card .stats .following-count,.profile-sidebar-component .user-card .stats .posts-count{display:flex;font-weight:800}.profile-sidebar-component .user-card .stats .stats-label{color:#94a3b8;font-size:11px;margin-top:-5px}',""]);const a=o},16626:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(49247),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},209:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(35296),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},96259:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(35518),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},48432:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(34857),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},22626:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(49777),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},99003:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(88740),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},51423:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(46058),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},15134:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(92519),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},67621:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(93100),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},31526:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(85072),o=s.n(i),a=s(34347),n={insert:"head",singleton:!1};o()(a.default,n);const r=a.default.locals||{}},85566:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(37465),o=s(37253),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(24817);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,"5efd4702",null).exports},20591:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(40296),o=s(62392),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},58741:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(17310);const o=(0,s(14486).default)({},i.render,i.staticRenderFns,!1,null,null,null).exports},35547:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(59028),o=s(52548),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(86546);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},5787:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(16286),o=s(80260),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(68840);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},13090:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(54229),o=s(13514),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},20243:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(34727),o=s(88012),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(21883);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},72028:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(46098),o=s(93843),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},19138:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(44982),o=s(43509),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},57103:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(87058),o=s(64672),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},49986:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(32785),o=s(79577),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(67011);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},29787:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>o});var i=s(68329);const o=(0,s(14486).default)({},i.render,i.staticRenderFns,!1,null,null,null).exports},59515:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(4607),o=s(38972),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},79110:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(5458),o=s(99369),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},84800:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(43047),o=s(6119),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},27821:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(99421),o=s(28934),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},50294:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(95728),o=s(33417),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},99681:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(9836),o=s(22350),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},62457:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(15040),o=s(19894),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(42254);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},36470:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(7432),o=s(83593),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(94608);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},99234:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(57783),o=s(54293),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(16201);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},34719:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(38888),o=s(42260),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(88814);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},99487:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(75637),o=s(71212),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);s(18405);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},75938:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>n});var i=s(30506),o=s(42909),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const n=(0,s(14486).default)(o.default,i.render,i.staticRenderFns,!1,null,null,null).exports},37253:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(21801),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},62392:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(66655),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},52548:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(56987),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},80260:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(50371),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},13514:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(25054),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},88012:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(3211),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},93843:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(24758),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},43509:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(85100),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},64672:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(49415),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},79577:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(37844),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},38972:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(67975),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},99369:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(61746),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},6119:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(22434),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},28934:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(99397),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},33417:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(6140),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},22350:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(85679),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},19894:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(24603),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},83593:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(19306),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},54293:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(79654),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},42260:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(3223),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},71212:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(82683),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},42909:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});var i=s(68910),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o);const a=i.default},37465:(t,e,s)=>{"use strict";s.r(e);var i=s(59300),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},40296:(t,e,s)=>{"use strict";s.r(e);var i=s(98221),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},17310:(t,e,s)=>{"use strict";s.r(e);var i=s(24853),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},59028:(t,e,s)=>{"use strict";s.r(e);var i=s(70201),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},16286:(t,e,s)=>{"use strict";s.r(e);var i=s(69831),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},54229:(t,e,s)=>{"use strict";s.r(e);var i=s(82960),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},34727:(t,e,s)=>{"use strict";s.r(e);var i=s(55318),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},46098:(t,e,s)=>{"use strict";s.r(e);var i=s(54309),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},44982:(t,e,s)=>{"use strict";s.r(e);var i=s(82285),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},87058:(t,e,s)=>{"use strict";s.r(e);var i=s(62399),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},32785:(t,e,s)=>{"use strict";s.r(e);var i=s(27934),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},68329:(t,e,s)=>{"use strict";s.r(e);var i=s(7971),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},4607:(t,e,s)=>{"use strict";s.r(e);var i=s(92162),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},5458:(t,e,s)=>{"use strict";s.r(e);var i=s(79911),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},43047:(t,e,s)=>{"use strict";s.r(e);var i=s(44516),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},99421:(t,e,s)=>{"use strict";s.r(e);var i=s(51992),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},95728:(t,e,s)=>{"use strict";s.r(e);var i=s(16331),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},9836:(t,e,s)=>{"use strict";s.r(e);var i=s(66295),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},15040:(t,e,s)=>{"use strict";s.r(e);var i=s(9143),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},7432:(t,e,s)=>{"use strict";s.r(e);var i=s(48281),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},57783:(t,e,s)=>{"use strict";s.r(e);var i=s(29594),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},38888:(t,e,s)=>{"use strict";s.r(e);var i=s(53577),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},75637:(t,e,s)=>{"use strict";s.r(e);var i=s(59100),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},30506:(t,e,s)=>{"use strict";s.r(e);var i=s(23875),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},24817:(t,e,s)=>{"use strict";s.r(e);var i=s(16626),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},86546:(t,e,s)=>{"use strict";s.r(e);var i=s(209),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},68840:(t,e,s)=>{"use strict";s.r(e);var i=s(96259),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},21883:(t,e,s)=>{"use strict";s.r(e);var i=s(48432),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},67011:(t,e,s)=>{"use strict";s.r(e);var i=s(22626),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},42254:(t,e,s)=>{"use strict";s.r(e);var i=s(99003),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},94608:(t,e,s)=>{"use strict";s.r(e);var i=s(51423),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},16201:(t,e,s)=>{"use strict";s.r(e);var i=s(15134),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},88814:(t,e,s)=>{"use strict";s.r(e);var i=s(67621),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},18405:(t,e,s)=>{"use strict";s.r(e);var i=s(31526),o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);s.d(e,o)},11220:()=>{},16052:()=>{},40295:()=>{},89858:()=>{},45187:()=>{},87919:()=>{},40264:()=>{},80434:()=>{},18053:()=>{}}]); \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 1d908832a..121124a35 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -16,7 +16,7 @@ "/js/profile-directory.js": "/js/profile-directory.js?id=1615064235d2acf08d84c3e3d1232d7e", "/js/story-compose.js": "/js/story-compose.js?id=50d723634d8d22db14d630a02774e5b7", "/js/direct.js": "/js/direct.js?id=2f7df211df1b62a0637ed87f2457e918", - "/js/admin.js": "/js/admin.js?id=90ebc22c8ae78692cfb2c3e5dd7f6c5a", + "/js/admin.js": "/js/admin.js?id=6b704e46b54b8ec1b0600ff50b33f7b9", "/js/spa.js": "/js/spa.js?id=cd6a07d612c09f17c34a6e8441768020", "/js/stories.js": "/js/stories.js?id=f3d502fa937e5fa90d173d5d7aa64e2c", "/js/portfolio.js": "/js/portfolio.js?id=e8a1f57ef2c7c9ff40265502da5b84ac", @@ -24,11 +24,11 @@ "/js/admin_invite.js": "/js/admin_invite.js?id=0a0036f59cfb186f7698207ae432365b", "/js/landing.js": "/js/landing.js?id=753a52aacb8bb884f50ed3ae9ed99a38", "/js/remote_auth.js": "/js/remote_auth.js?id=37e5bdf3bc1896eee063db7a186b9876", - "/js/manifest.js": "/js/manifest.js?id=7488e498ae41ee645b354823d5ee96be", + "/js/manifest.js": "/js/manifest.js?id=1aecad6992ea1cdb8054608c3604a5cc", "/js/home.chunk.264eeb47bfac56c1.js": "/js/home.chunk.264eeb47bfac56c1.js?id=c5704eda3f241103f1ed1fa6fa4cefad", "/js/compose.chunk.a0cfdf07f5062445.js": "/js/compose.chunk.a0cfdf07f5062445.js?id=71f4bcf44739473ee369521ea785f63e", "/js/post.chunk.9184101a2b809af1.js": "/js/post.chunk.9184101a2b809af1.js?id=b24c0c9949fba5b3e76cb95ea8bb6e5a", - "/js/profile.chunk.f74967e7910990ca.js": "/js/profile.chunk.f74967e7910990ca.js?id=9b7dc3907736376f18db109b9d70c0fa", + "/js/profile.chunk.a2234f891ba86efd.js": "/js/profile.chunk.a2234f891ba86efd.js?id=2c9f83cb28d3893a169200c8341dbbb1", "/js/discover~memories.chunk.37e0c325f900e163.js": "/js/discover~memories.chunk.37e0c325f900e163.js?id=02137ba179f0f2f3819597f262f423b8", "/js/discover~myhashtags.chunk.8886fc0d4736d819.js": "/js/discover~myhashtags.chunk.8886fc0d4736d819.js?id=0397f095e24b2bbdffd84be14bb9d8c4", "/js/daci.chunk.34dc7bad3a0792cc.js": "/js/daci.chunk.34dc7bad3a0792cc.js?id=53da4c2b40ecc1164592bd0f66767284", @@ -48,8 +48,8 @@ "/css/appdark.css": "/css/appdark.css?id=7f9ba0a926020571e9c8fbedd2ec6a6f", "/css/app.css": "/css/app.css?id=838b7d90a81e16b8a9adc8644237606a", "/css/portfolio.css": "/css/portfolio.css?id=d98e354f173c6a8b729626384dceaa90", - "/css/admin.css": "/css/admin.css?id=0a66549bf79b75a0ca8cb83d11a4e2f4", + "/css/admin.css": "/css/admin.css?id=20cdb9cce61b0e1bd9fb1aad30efcd2f", "/css/landing.css": "/css/landing.css?id=589f3fa192867727925921b0f68ce022", - "/css/spa.css": "/css/spa.css?id=1bdfa6eb676f51cb5931729abfa6dfd8", + "/css/spa.css": "/css/spa.css?id=24b025007b418a7e7efd18d47fa56b85", "/js/vendor.js": "/js/vendor.js?id=9e8c3caac2c4d0119e99070a0bb36dfc" } diff --git a/resources/assets/components/Hashtag.vue b/resources/assets/components/Hashtag.vue index e2ac77681..01094a85b 100644 --- a/resources/assets/components/Hashtag.vue +++ b/resources/assets/components/Hashtag.vue @@ -202,16 +202,12 @@ if(res.data && res.data.length) { this.feed = res.data; this.maxId = res.data[res.data.length - 1].id; - return true; + this.canLoadMore = true; } else { this.feedLoaded = true; this.isLoaded = true; - return false; } }) - .then(res => { - this.canLoadMore = res; - }) .finally(() => { this.feedLoaded = true; this.isLoaded = true; @@ -242,14 +238,11 @@ if(res.data && res.data.length) { this.feed.push(...res.data); this.maxId = res.data[res.data.length - 1].id; - return true; + this.canLoadMore = true; } else { - return false; + this.canLoadMore = false; } }) - .then(res => { - this.canLoadMore = res; - }) .finally(() => { this.isIntersecting = false; }) diff --git a/resources/assets/components/admin/AdminInstances.vue b/resources/assets/components/admin/AdminInstances.vue index e1c242d14..b0ecc098b 100644 --- a/resources/assets/components/admin/AdminInstances.vue +++ b/resources/assets/components/admin/AdminInstances.vue @@ -251,10 +251,11 @@
- Close + View More diff --git a/resources/assets/components/admin/AdminSettings.vue b/resources/assets/components/admin/AdminSettings.vue new file mode 100644 index 000000000..78ffd1b14 --- /dev/null +++ b/resources/assets/components/admin/AdminSettings.vue @@ -0,0 +1,1550 @@ + + + + + diff --git a/resources/assets/components/admin/partial/AdminReadMore.vue b/resources/assets/components/admin/partial/AdminReadMore.vue index 1a1b3d6ee..b5c1e47f2 100644 --- a/resources/assets/components/admin/partial/AdminReadMore.vue +++ b/resources/assets/components/admin/partial/AdminReadMore.vue @@ -1,7 +1,7 @@ diff --git a/resources/assets/components/admin/partial/AdminSettingsCheckbox.vue b/resources/assets/components/admin/partial/AdminSettingsCheckbox.vue new file mode 100644 index 000000000..bb8cfec96 --- /dev/null +++ b/resources/assets/components/admin/partial/AdminSettingsCheckbox.vue @@ -0,0 +1,42 @@ + + + diff --git a/resources/assets/components/admin/partial/AdminSettingsInput.vue b/resources/assets/components/admin/partial/AdminSettingsInput.vue new file mode 100644 index 000000000..25309134d --- /dev/null +++ b/resources/assets/components/admin/partial/AdminSettingsInput.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/resources/assets/components/admin/partial/AdminSettingsTabHeader.vue b/resources/assets/components/admin/partial/AdminSettingsTabHeader.vue new file mode 100644 index 000000000..ac75d3f37 --- /dev/null +++ b/resources/assets/components/admin/partial/AdminSettingsTabHeader.vue @@ -0,0 +1,63 @@ + + + diff --git a/resources/assets/js/admin.js b/resources/assets/js/admin.js index 8d2b82ca1..e5a74d8e6 100644 --- a/resources/assets/js/admin.js +++ b/resources/assets/js/admin.js @@ -36,11 +36,21 @@ Vue.component( require('./../components/admin/AdminReports.vue').default ); +Vue.component( + 'admin-settings', + require('./../components/admin/AdminSettings.vue').default +); + Vue.component( 'instances-component', require('./../components/admin/AdminInstances.vue').default ); +// Vue.component( +// 'instance-details-component', +// require('./../components/admin/AdminInstanceDetails.vue').default +// ); + Vue.component( 'hashtag-component', require('./../components/admin/AdminHashtags.vue').default diff --git a/resources/assets/sass/lib/nucleo.css b/resources/assets/sass/lib/nucleo.css index b03698950..4171a5523 100644 --- a/resources/assets/sass/lib/nucleo.css +++ b/resources/assets/sass/lib/nucleo.css @@ -10,6 +10,7 @@ License - nucleoapp.com/license/ src: url('/fonts/nucleo-icons.eot') format('embedded-opentype'), url('/fonts/nucleo-icons.woff2') format('woff2'), url('/fonts/nucleo-icons.woff') format('woff'), url('/fonts/nucleo-icons.ttf') format('truetype'), url('/fonts/nucleo-icons.svg') format('svg'); font-weight: normal; font-style: normal; + font-display: swap; } /*------------------------ base class definition diff --git a/resources/assets/sass/spa.scss b/resources/assets/sass/spa.scss index 72e08e16b..5b36b6ed1 100644 --- a/resources/assets/sass/spa.scss +++ b/resources/assets/sass/spa.scss @@ -392,6 +392,10 @@ span.twitter-typeahead .tt-suggestion:focus { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; } +.timestamp-overlay-badge { + color: var(--dark); +} + .timeline-status-component { .username { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; diff --git a/resources/views/account/moderation/post/autospam.blade.php b/resources/views/account/moderation/post/autospam.blade.php index 91296759d..d16d85f3e 100644 --- a/resources/views/account/moderation/post/autospam.blade.php +++ b/resources/views/account/moderation/post/autospam.blade.php @@ -69,7 +69,7 @@

Review the Community Guidelines

-

We want to keep {{config('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

+

We want to keep {{config_cache('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

@@ -100,4 +100,4 @@ ctx.putImageData(imageData, 0, 0); @endif -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/account/moderation/post/cw.blade.php b/resources/views/account/moderation/post/cw.blade.php index d1e1d3537..bffa7a186 100644 --- a/resources/views/account/moderation/post/cw.blade.php +++ b/resources/views/account/moderation/post/cw.blade.php @@ -70,7 +70,7 @@

Review the Community Guidelines

-

We want to keep {{config('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

+

We want to keep {{config_cache('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

@@ -127,4 +127,4 @@ ctx.putImageData(imageData, 0, 0); @endif -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/account/moderation/post/removed.blade.php b/resources/views/account/moderation/post/removed.blade.php index 123863489..4b8a1fee4 100644 --- a/resources/views/account/moderation/post/removed.blade.php +++ b/resources/views/account/moderation/post/removed.blade.php @@ -62,7 +62,7 @@

Review the Community Guidelines

-

We want to keep {{config('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

+

We want to keep {{config_cache('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

@@ -96,4 +96,4 @@ ctx.putImageData(imageData, 0, 0); @endif -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/account/moderation/post/unlist.blade.php b/resources/views/account/moderation/post/unlist.blade.php index 3c86acb76..4f62a10bb 100644 --- a/resources/views/account/moderation/post/unlist.blade.php +++ b/resources/views/account/moderation/post/unlist.blade.php @@ -69,7 +69,7 @@

Review the Community Guidelines

-

We want to keep {{config('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

+

We want to keep {{config_cache('app.name')}} a safe place for everyone, and we created these Community Guidelines to support and protect our community.

@@ -125,4 +125,4 @@ ctx.putImageData(imageData, 0, 0); @endif -@endpush \ No newline at end of file +@endpush diff --git a/resources/views/admin/diagnostics/home.blade.php b/resources/views/admin/diagnostics/home.blade.php index db44a2332..b23652b51 100644 --- a/resources/views/admin/diagnostics/home.blade.php +++ b/resources/views/admin/diagnostics/home.blade.php @@ -66,7 +66,7 @@
  • OAUTH enabled: - {{ config_cache('pixelfed.oauth_enabled') ? '✅ true' : '❌ false' }} + {{ (bool) config_cache('pixelfed.oauth_enabled') ? '✅ true' : '❌ false' }}
  • OAUTH token_expiration @@ -298,7 +298,7 @@ FEDERATION ACTIVITY_PUB - {{config_cache('federation.activitypub.enabled') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('federation.activitypub.enabled') ? '✅ true' : '❌ false' }} FEDERATION @@ -358,7 +358,7 @@ FEDERATION PF_NETWORK_TIMELINE - {{config_cache('federation.network_timeline') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('federation.network_timeline') ? '✅ true' : '❌ false' }} FEDERATION @@ -368,7 +368,7 @@ FEDERATION CUSTOM_EMOJI - {{config_cache('federation.custom_emoji.enabled') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('federation.custom_emoji.enabled') ? '✅ true' : '❌ false' }} FEDERATION @@ -545,7 +545,7 @@ INSTANCE STORIES_ENABLED - {{config_cache('instance.stories.enabled') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('instance.stories.enabled') ? '✅ true' : '❌ false' }} INSTANCE @@ -740,7 +740,7 @@ PIXELFED PF_ENABLE_CLOUD - {{config_cache('pixelfed.cloud_storage') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('pixelfed.cloud_storage') ? '✅ true' : '❌ false' }} PIXELFED @@ -750,12 +750,12 @@ PIXELFED PF_OPTIMIZE_IMAGES - {{config_cache('pixelfed.optimize_image') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('pixelfed.optimize_image') ? '✅ true' : '❌ false' }} PIXELFED PF_OPTIMIZE_VIDEOS - {{config_cache('pixelfed.optimize_video') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('pixelfed.optimize_video') ? '✅ true' : '❌ false' }} PIXELFED @@ -810,12 +810,12 @@ PIXELFED OAUTH_ENABLED - {{config_cache('pixelfed.oauth_enabled') ? '✅ true' : '❌ false' }} + {{ (bool) config_cache('pixelfed.oauth_enabled') ? '✅ true' : '❌ false' }} PIXELFED PF_BOUNCER_ENABLED - {{config_cache('pixelfed.bouncer.enabled') ? '✅ true' : '❌ false' }} + {{(bool) config_cache('pixelfed.bouncer.enabled') ? '✅ true' : '❌ false' }} PIXELFED diff --git a/resources/views/admin/settings/home.blade.php b/resources/views/admin/settings/home.blade.php index c2254f700..d78780878 100644 --- a/resources/views/admin/settings/home.blade.php +++ b/resources/views/admin/settings/home.blade.php @@ -1,421 +1,12 @@ @extends('admin.partial.template-full') @section('section') -
    -

    Settings

    -@if(config('instance.enable_cc')) -

    Manage instance settings

    -
    - @csrf - -
    - -
    - {{--
    - -
      -
    • - Max Upload Size: - {{$system['max_upload_size']}} -
    • -
    • - Image Driver: - {{$system['image_driver']}} -
    • -
    • - Image Driver Loaded: - - @if($system['image_driver_loaded']) - - @else - - @endif - -
    • -
    • - File Permissions: - - @if($system['permissions']) - - @else - - @endif - -
    • -
    • - - -
    • -
    -
    --}} -
    -
    - - -
    - -
    - -
    -
    - - @if($cloud_ready) -
    - - -
    -

    Store photos & videos on S3 compatible object storage providers.

    - @endif - -
    - - -
    -

    ActivityPub federation, compatible with Pixelfed, Mastodon and other projects.

    - -
    - - -
    - @if((bool) config_cache('federation.activitypub.enabled')) -

    Allow local accounts to migrate to other local or remote accounts.

    - @else -

    ActivityPub Required Allow local accounts to migrate to other local or remote accounts.

    - @endif - - {{--
    - - -
    -

    Allow new user registrations.

    --}} - - - {{--
    - - -
    -

    Manually review new account registration applications.

    --}} - -
    - - -
    -

    Enable apis required for mobile app support.

    - -
    - - -
    -

    Allow users to share ephemeral Stories.

    - -
    - - -
    -

    Allow experimental Instagram Import support.

    - -
    - - -
    -

    Detect and remove spam from timelines.

    -
    -
    - {{--
    -
    - - -

    The instance name used in titles, metadata and apis.

    -
    -
    -
    -
    - - -

    Short description of instance used on various pages and apis.

    -
    -
    -
    -
    - - -

    Longer description of instance used on about page.

    -
    -
    --}} -
    - -
    -
    -
    -

    Configure your landing page

    -
    -
    -
    -
    -

    Discovery

    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    -

    Admin Account

    - -
    - -
    -
    -
    -
    - -
    -
    -
    - - -

    The instance name used in titles, metadata and apis.

    -
    -
    -
    -
    - - -

    Short description of instance used on various pages and apis.

    -
    -
    -
    -
    - - -

    Longer description of instance used on about page.

    -
    -
    -
    -
    - - -

    The header title used on the about page.

    -
    -
    -
    - -
    -
    -
    -
    - - -
    -
    -
    - -
    -
    -
    - - -

    Set a storage limit per user account.

    -
    - - -

    Account limit size in KB.

    -

    {{config_cache('pixelfed.max_account_size')}} KB = {{floor(config_cache('pixelfed.max_account_size') / 1024)}} MB

    -
    -
    - -
    -
    -
    - - -

    Enable auto follow accounts, new accounts will follow accounts you set.

    -
    - - -

    Add account usernames to follow separated by commas.

    -
    -
    -
    - -
    -
    -
    - - -

    Maximum file upload size in KB

    -

    {{config_cache('pixelfed.max_photo_size')}} KB = {{number_format(config_cache('pixelfed.max_photo_size') / 1024)}} MB

    -
    -
    -
    -
    - - -

    The maximum number of photos or videos per album

    -
    -
    -
    -
    - - -

    Image optimization quality from 0-100%. Set to 0 to disable image optimization.

    -
    -
    -
    -
    - -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -

    Allowed media types.

    -
    -
    -
    - -
    -
    -

    Add rules that explain what is acceptable use.

    -
    -
    -

    Active Rules

    -
      - @if($rules) - @foreach($rules as $rule) -
    1. -

      - {{$rule}} -

      -

      - -

      -
    2. - @endforeach - @endif -
    -
    -
    -
    - - -
    -
    -
    - -
    -
    -
    - -
    - - -
    - -

    Add custom CSS, will be used on all pages

    -
    -
    -
    - -
    - -
    -
    - -
    -
    -
    -@else -
  • -
    -

    Not enabled

    -

    Add ENABLE_CONFIG_CACHE=true in your .env file
    and run php artisan config:cache

    -
    -@endif + @endsection @push('scripts') @endpush diff --git a/resources/views/auth/email/forgot.blade.php b/resources/views/auth/email/forgot.blade.php index 898d19fb5..e4b67d792 100644 --- a/resources/views/auth/email/forgot.blade.php +++ b/resources/views/auth/email/forgot.blade.php @@ -65,7 +65,7 @@
    - @if(config('captcha.enabled') || config('captcha.active.login') || config('captcha.active.register')) + @if((bool) config_cache('captcha.enabled'))
    {!! Captcha::display(['data-theme' => 'dark']) !!} diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 9df9ea8c9..0f77f778e 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -76,10 +76,10 @@
    @if( - config('captcha.enabled') || - config('captcha.active.login') || + (bool) config_cache('captcha.enabled') && + (bool) config_cache('captcha.active.login') || ( - config('captcha.triggers.login.enabled') && + (bool) config_cache('captcha.triggers.login.enabled') && request()->session()->has('login_attempts') && request()->session()->get('login_attempts') >= config('captcha.triggers.login.attempts') ) diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 4f2825e29..19461fa29 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -54,7 +54,7 @@ - @if(config('captcha.enabled')) + @if((bool) config_cache('captcha.enabled'))
    {!! Captcha::display(['data-theme' => 'dark']) !!} diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 1a740fa7d..ecabcaddf 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -109,7 +109,7 @@
    - @if(config('captcha.enabled')) + @if((bool) config_cache('captcha.enabled'))
    {!! Captcha::display(['data-theme' => 'dark']) !!} diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index a2c008bd7..3cb70c7fe 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -81,7 +81,7 @@
    - @if(config('captcha.enabled') || config('captcha.active.register')) + @if((bool) config_cache('captcha.enabled') && (bool) config_cache('captcha.active.register'))
    {!! Captcha::display() !!}
    diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 2f7b05cd3..e5aed6dad 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app',['title' => 'Welcome to ' . config('app.name')]) +@extends('layouts.app',['title' => 'Welcome to ' . config_cache('app.name')]) @section('content')
    @@ -14,7 +14,7 @@
    @endif -

    Welcome to {{config('app.name')}}!

    +

    Welcome to {{config_cache('app.name')}}!

    diff --git a/resources/views/layouts/app-guest.blade.php b/resources/views/layouts/app-guest.blade.php index 6adcffac4..7d8dbd201 100644 --- a/resources/views/layouts/app-guest.blade.php +++ b/resources/views/layouts/app-guest.blade.php @@ -5,11 +5,11 @@ - {{ $title ?? config('app.name', 'Pixelfed') }} + {{ $title ?? config_cache('app.name', 'Pixelfed') }} - - + + @stack('meta') diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 0136842bb..168992aaf 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -70,11 +70,11 @@ - {{ $title ?? config('app.name', 'Pixelfed') }} + {{ $title ?? config_cache('app.name', 'Pixelfed') }} - + @stack('meta') diff --git a/resources/views/layouts/blank.blade.php b/resources/views/layouts/blank.blade.php index 00042315d..deaf71d62 100644 --- a/resources/views/layouts/blank.blade.php +++ b/resources/views/layouts/blank.blade.php @@ -11,8 +11,8 @@ {{ $title ?? config_cache('app.name') }} - - + + @stack('meta') diff --git a/resources/views/layouts/bundle.blade.php b/resources/views/layouts/bundle.blade.php index 1050a39d6..94e0c2c00 100644 --- a/resources/views/layouts/bundle.blade.php +++ b/resources/views/layouts/bundle.blade.php @@ -9,11 +9,11 @@ - {{ $title ?? config('app.name', 'Laravel') }} + {{ $title ?? config_cache('app.name', 'Pixelfed') }} - - + + @stack('meta') diff --git a/resources/views/layouts/partial/nav.blade.php b/resources/views/layouts/partial/nav.blade.php index 1d89902bf..56fe7da4a 100644 --- a/resources/views/layouts/partial/nav.blade.php +++ b/resources/views/layouts/partial/nav.blade.php @@ -105,7 +105,7 @@ {{__('navmenu.discover')}} - @if(config_cache('instance.stories.enabled')) + @if((bool) config_cache('instance.stories.enabled')) diff --git a/resources/views/layouts/partial/noauthnav.blade.php b/resources/views/layouts/partial/noauthnav.blade.php index 465b51354..004c8497f 100644 --- a/resources/views/layouts/partial/noauthnav.blade.php +++ b/resources/views/layouts/partial/noauthnav.blade.php @@ -2,7 +2,7 @@ diff --git a/resources/views/portfolio/layout.blade.php b/resources/views/portfolio/layout.blade.php index 14158fb37..89e909284 100644 --- a/resources/views/portfolio/layout.blade.php +++ b/resources/views/portfolio/layout.blade.php @@ -11,8 +11,8 @@ {!! $title ?? config_cache('app.name') !!} - - + + @stack('meta') diff --git a/resources/views/profile/embed-removed.blade.php b/resources/views/profile/embed-removed.blade.php index 7a49d2e79..c236eb790 100644 --- a/resources/views/profile/embed-removed.blade.php +++ b/resources/views/profile/embed-removed.blade.php @@ -9,8 +9,8 @@ Pixelfed | 404 Embed Not Found - - + + diff --git a/resources/views/profile/embed.blade.php b/resources/views/profile/embed.blade.php index cc6097e3a..aeb6a5b99 100644 --- a/resources/views/profile/embed.blade.php +++ b/resources/views/profile/embed.blade.php @@ -9,8 +9,8 @@ {{ $title ?? config('app.name', 'Pixelfed') }} - - + + diff --git a/resources/views/profile/private.blade.php b/resources/views/profile/private.blade.php index ffff37d49..118ef643e 100644 --- a/resources/views/profile/private.blade.php +++ b/resources/views/profile/private.blade.php @@ -1,4 +1,4 @@ -@extends('layouts.app-guest',['title' => $user->username . " on " . config('app.name')]) +@extends('layouts.app-guest',['title' => $user->username . " on " . config_cache('app.name')]) @section('content') @if (session('error')) diff --git a/resources/views/settings/applications.blade.php b/resources/views/settings/applications.blade.php index 691ab0c81..97270fb62 100644 --- a/resources/views/settings/applications.blade.php +++ b/resources/views/settings/applications.blade.php @@ -6,7 +6,7 @@

    Applications


    -@if(config_cache('pixelfed.oauth_enabled') == true) +@if((bool) config_cache('pixelfed.oauth_enabled') == true) @else diff --git a/resources/views/settings/developers.blade.php b/resources/views/settings/developers.blade.php index 8b4c94471..22d869580 100644 --- a/resources/views/settings/developers.blade.php +++ b/resources/views/settings/developers.blade.php @@ -6,7 +6,7 @@

    Developers


    -@if(config_cache('pixelfed.oauth_enabled') == true) +@if((bool) config_cache('pixelfed.oauth_enabled') == true) @else

    OAuth has not been enabled on this instance.

    diff --git a/resources/views/settings/parental-controls/invite-register-form.blade.php b/resources/views/settings/parental-controls/invite-register-form.blade.php index 5b894e8d2..a21808efa 100644 --- a/resources/views/settings/parental-controls/invite-register-form.blade.php +++ b/resources/views/settings/parental-controls/invite-register-form.blade.php @@ -91,7 +91,7 @@ - @if(config('captcha.enabled') || config('captcha.active.register')) + @if((bool) config_cache('captcha.enabled'))
    {!! Captcha::display() !!}
    diff --git a/resources/views/settings/partial/sidebar.blade.php b/resources/views/settings/partial/sidebar.blade.php index b971e1f5d..0eadb9773 100644 --- a/resources/views/settings/partial/sidebar.blade.php +++ b/resources/views/settings/partial/sidebar.blade.php @@ -39,7 +39,7 @@
    - @if(config_cache('pixelfed.oauth_enabled') == true) + @if((bool) config_cache('pixelfed.oauth_enabled') == true) diff --git a/resources/views/site/index.blade.php b/resources/views/site/index.blade.php index e6753a727..b7d3befaa 100644 --- a/resources/views/site/index.blade.php +++ b/resources/views/site/index.blade.php @@ -8,7 +8,7 @@ - {{ config('app.name', 'Pixelfed') }} + {{ config_cache('app.name', 'Pixelfed') }} diff --git a/resources/views/status/embed-removed.blade.php b/resources/views/status/embed-removed.blade.php index e5f94525b..b9f0a2df6 100644 --- a/resources/views/status/embed-removed.blade.php +++ b/resources/views/status/embed-removed.blade.php @@ -9,8 +9,8 @@ Pixelfed | 404 Embed Not Found - - + + diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php index deec4a1f4..26c1f7d80 100644 --- a/resources/views/vendor/mail/html/message.blade.php +++ b/resources/views/vendor/mail/html/message.blade.php @@ -2,7 +2,7 @@ {{-- Header --}} @slot('header') @component('mail::header', ['url' => config('app.url')]) -{{ config('app.name') }} +{{ config_cache('app.name') }} @endcomponent @endslot @@ -21,7 +21,7 @@ {{-- Footer --}} @slot('footer') @component('mail::footer') -© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') +© {{ date('Y') }} {{ config_cache('app.name') }}. @lang('All rights reserved.') @endcomponent @endslot @endcomponent diff --git a/resources/views/vendor/mail/text/message.blade.php b/resources/views/vendor/mail/text/message.blade.php index 1ae9ed8f1..3416a9bd4 100644 --- a/resources/views/vendor/mail/text/message.blade.php +++ b/resources/views/vendor/mail/text/message.blade.php @@ -2,7 +2,7 @@ {{-- Header --}} @slot('header') @component('mail::header', ['url' => config('app.url')]) - {{ config('app.name') }} + {{ config_cache('app.name') }} @endcomponent @endslot @@ -21,7 +21,7 @@ {{-- Footer --}} @slot('footer') @component('mail::footer') - © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.') + © {{ date('Y') }} {{ config_cache('app.name') }}. @lang('All rights reserved.') @endcomponent @endslot @endcomponent diff --git a/resources/views/vendor/passport/authorize.blade.php b/resources/views/vendor/passport/authorize.blade.php index 986f76801..a644289ca 100644 --- a/resources/views/vendor/passport/authorize.blade.php +++ b/resources/views/vendor/passport/authorize.blade.php @@ -4,7 +4,7 @@ - {{ config('app.name') }} - Authorization + {{ config_cache('app.name') }} - Authorization