<commit_before>{% macro flash(type, message, close, use_raw, class, domain) %}
    <div class="alert{{ type ? ' alert-'~type : '' }} fade in {{ class|default('') }} {% if close|default(false) %}alert-dismissable{% endif %}">
    {% if close|default(false) %}
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    {% endif %}
    {% if use_raw|default(false) %}
        {{ message|trans({}, domain|default('messages'))|raw }}
    {% else %}
        {{ message|trans({}, domain|default('messages')) }}
    {% endif %}
    </div>
{% endmacro %}

{% macro advanced_flash(type, heading, message, close_tag, use_raw, class, domain) %}
    <div class="alert{{ type ? ' alert-'~type : '' }} fade in {{ class|default('') }} {% if close_tag|default(false) %}alert-dismissable{% endif %}">
    {% if close_tag|default(false) %}
        {% if close_tag == true %}
            {% set close_tag = 'a' %}
        {% endif %}
        <{{ close_tag }} class="close" data-dismiss="alert" aria-hidden="true" {% if close_tag == 'a' %}href="#"{% elseif close_tag =='button' %}type="button"{% endif %}>&times;</{{ close_tag }}>
    {% endif %}
    {% if heading|default(false) %}
    <h4 class="alert-heading">{{ heading }}</h4>
    {% endif %}
    {% if use_raw|default(false) %}
        {{ message|trans({}, domain|default('messages'))|raw }}
    {% else %}
        {{ message|trans({}, domain|default('messages')) }}
    {% endif %}
    </div>
{% endmacro %}

{% macro session_flash(close, use_raw, class, domain) %}
    {% import _self as flash_messages %}

    {% if app.session.flashbag.peekAll|length > 0 %}
        {% set mapping = mopa_bootstrap_flash_mapping()|merge({'fos_user_success':'success'}) %}
        {% set flashes = {} %}

        {% for type in mapping|keys %}
            {% set flashes = flashes | merge({ (type) : app.session.flashbag.get(type) }) %}
        {% endfor %}

        {% for type, messages in flashes %}
            {% if type == 'fos_user_success' %}
                {% set domain = 'FOSUserBundle' %}<commit_msg>use vic prefixed twig extensions<commit_after>{% macro flash(type, message, close, use_raw, class, domain) %}
    <div class="alert{{ type ? ' alert-'~type : '' }} fade in {{ class|default('') }} {% if close|default(false) %}alert-dismissable{% endif %}">
    {% if close|default(false) %}
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    {% endif %}
    {% if use_raw|default(false) %}
        {{ message|trans({}, domain|default('messages'))|raw }}
    {% else %}
        {{ message|trans({}, domain|default('messages')) }}
    {% endif %}
    </div>
{% endmacro %}

{% macro advanced_flash(type, heading, message, close_tag, use_raw, class, domain) %}
    <div class="alert{{ type ? ' alert-'~type : '' }} fade in {{ class|default('') }} {% if close_tag|default(false) %}alert-dismissable{% endif %}">
    {% if close_tag|default(false) %}
        {% if close_tag == true %}
            {% set close_tag = 'a' %}
        {% endif %}
        <{{ close_tag }} class="close" data-dismiss="alert" aria-hidden="true" {% if close_tag == 'a' %}href="#"{% elseif close_tag =='button' %}type="button"{% endif %}>&times;</{{ close_tag }}>
    {% endif %}
    {% if heading|default(false) %}
    <h4 class="alert-heading">{{ heading }}</h4>
    {% endif %}
    {% if use_raw|default(false) %}
        {{ message|trans({}, domain|default('messages'))|raw }}
    {% else %}
        {{ message|trans({}, domain|default('messages')) }}
    {% endif %}
    </div>
{% endmacro %}

{% macro session_flash(close, use_raw, class, domain) %}
    {% import _self as flash_messages %}

    {% if app.session.flashbag.peekAll|length > 0 %}
        {% set mapping = vic_mopa_bootstrap_flash_mapping()|merge({'fos_user_success':'success'}) %}
        {% set flashes = {} %}

        {% for type in mapping|keys %}
            {% set flashes = flashes | merge({ (type) : app.session.flashbag.get(type) }) %}
        {% endfor %}

        {% for type, messages in flashes %}
            {% if type == 'fos_user_success' %}
                {% set domain = 'FOSUserBundle' %}
{'fraction_non_alphanumeric': 0.20931899641577062, 'fraction_numerical': 0.0014336917562724014, 'mean_word_length': 3.207035175879397, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, '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': '3011344', 'n_tokens_mistral': 1467, 'n_tokens_neox': 1266, 'n_words': 278}