<commit_before>/**
 * Form functionalities
 * @package zork
 * @subpackage form
 * @author <NAME> <<EMAIL>>
 */
( function ( global, $, js )
{
    "use strict";

    if ( typeof js.form.element.tagList !== "undefined" )
    {
        return;
    }

    js.style( "/styles/scripts/taglist.css" );

    /**
     * Tags element
     *
     * @memberOf Zork.Form.Element
     */
    global.Zork.Form.Element.prototype.tagList = function ( element )
    {
        element = $( element ).addClass( "js-tag-list ui-widget" );

        var name   = element.data( "name" ),
            search = $( '<input type="search" class="ui-state-default" />' ),
            seadiv = $( '<div class="js-tag-search" />' ),
            add    = function ( event, ui ) {
                var val   = String( ui && ui.item ? ui.item.value : search.val() ),
                    found = false;

                if ( val )
                {
                    element.find( ":input[type=hidden]" )
                           .each( function () {
                               found = found || (
                                   String( val ).toLowerCase() ===
                                   String( $( this ).val() ).toLowerCase()
                               );
                           } );

                    if ( found )
                    {
                        setTimeout( function () { search.val( "" ); }, 100 );<commit_msg>bugfix #215<commit_after>/**
 * Form functionalities
 * @package zork
 * @subpackage form
 * @author <NAME> <<EMAIL>>
 */
( function ( global, $, js )
{
    "use strict";

    if ( typeof js.form.element.tagList !== "undefined" )
    {
        return;
    }

    js.style( "/styles/scripts/taglist.css" );

    /**
     * Tags element
     *
     * @memberOf Zork.Form.Element
     */
    global.Zork.Form.Element.prototype.tagList = function ( element )
    {
        element = $( element ).addClass( "js-tag-list ui-widget" );

        var name   = element.data( "name" ),
            search = $( '<input type="search" class="ui-state-default" />' )
                        .attr( "placeholder", js.core.translate( "default.autoCompletePlaceholder" ) ),
            seadiv = $( '<div class="js-tag-search" />' ),
            add    = function ( event, ui ) {
                var val   = String( ui && ui.item ? ui.item.value : search.val() ),
                    found = false;

                if ( val )
                {
                    element.find( ":input[type=hidden]" )
                           .each( function () {
                               found = found || (
                                   String( val ).toLowerCase() ===
                                   String( $( this ).val() ).toLowerCase()
                               );
                           } );

                    if ( found )
                    {
                        setTimeout( function () { search.val( "" ); }, 100 );
{'fraction_non_alphanumeric': 0.14736842105263157, 'fraction_numerical': 0.0030560271646859084, 'mean_word_length': 1.1822222222222223, 'pattern_counts': {'":': 2, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7554733', 'n_tokens_mistral': 805, 'n_tokens_neox': 771, 'n_words': 163}