<commit_before>{{--
    Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
    See the LICENCE file in the repository root for full licence text.
--}}
@php
    $class = class_with_modifiers('beatmapset-cover', $modifiers);
    $attributesBag = request()->attributes;
    $userShowNsfw = $attributesBag->get('user_beatmapset_show_nsfw');
    if ($userShowNsfw === null) {
        $user = auth()->user();
        $userShowNsfw = $user !== null
            ? ($user->userProfileCustomization ?? $user->userProfileCustomization()->make())->beatmapset_show_nsfw
            : false;
        $attributesBag->set('user_beatmapset_show_nsfw', $userShowNsfw);
    }
    $style = $userShowNsfw || !$beatmapset->nsfw
        ? css_var_2x('--bg', $beatmapset->coverURL($size))
        : '';
@endphp
<div class="{{ $class }}" style="{{ $style }}"></div><commit_msg>Skip user preferences check if not needed<commit_after>{{--
    Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
    See the LICENCE file in the repository root for full licence text.
--}}
@php
    $class = class_with_modifiers('beatmapset-cover', $modifiers);

    $isNsfw = $beatmapset->nsfw;
    if ($isNsfw) {
        $attributesBag = request()->attributes;
        $userShowNsfw = $attributesBag->get('user_beatmapset_show_nsfw');
        if ($userShowNsfw === null) {
            $user = auth()->user();
            $userShowNsfw = $user !== null
                ? ($user->userProfileCustomization ?? $user->userProfileCustomization()->make())->beatmapset_show_nsfw
                : false;
            $attributesBag->set('user_beatmapset_show_nsfw', $userShowNsfw);
        }
    }

    $style = !$isNsfw || $userShowNsfw
        ? css_var_2x('--bg', $beatmapset->coverURL($size))
        : '';
@endphp
<div class="{{ $class }}" style="{{ $style }}"></div>
{'fraction_non_alphanumeric': 0.1640461215932914, 'fraction_numerical': 0.0031446540880503146, 'mean_word_length': 3.168122270742358, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2885643', 'n_tokens_mistral': 615, 'n_tokens_neox': 606, 'n_words': 131}