<commit_before>$(function() {
    StateManager.init([{
        type: 'smartphone',
        enter: '0px',
        exit: '767px'
    }, {
        type: 'tablet',
        enter: '768px',
        exit: '1023px'
    }, {
        type: 'tabletLandscape',
        enter: '1024px',
        exit: '1259px'
    }, {
        type: 'desktop',
        enter: '1260px',
        exit: '5160px'
    }]);

    StateManager.registerListener([{
        type: 'smartphone',
        enter: function() {
            $('.sidebar-main').insertBefore($('.page-wrap'));
            $('*[data-offcanvas="true"]').offcanvasMenu();
            $('*[data-search-dropdown="true"]').searchFieldDropDown();
            $('*[data-slide-panel="true"]').slidePanel();
            $('.product--supplier').appendTo($('.product--info'));
            $('.category--teaser .hero--text').collapseText();
        },
        exit: function() {
            $('.sidebar-main').prependTo($('.content-main--inner'));
            $('*[data-offcanvas="true"]').data('plugin_offcanvasMenu').destroy();
            $('*[data-search-dropdown="true"]').data('plugin_searchFieldDropDown').destroy();
            $('*[data-slide-panel="true"]').data('plugin_slidePanel').destroy();
            $('.product--supplier').appendTo($('.product--header'));
            $('.category--teaser .hero--text').data('plugin_collapseText').destroy();
        }
    }, {
        type: 'tablet',
        enter: function() {
            $('*[data-search-dropdown="true"]').searchFieldDropDown();
            $('nav.product--actions').insertBefore($('.additional-info--tabs'));
            $('.filter--trigger').collapsePanel();
        },
        exit: function() {
            $('*[data-search-dropdown="true"]').data('plugin_searchFieldDropDown').destroy();
            $('nav.product--actions').insertAfter($('.buybox--form'));
            $('.filter--trigger').data('plugin_collapsePanel').destroy();
        }
    }, {
        type: 'desktop',
        enter: function() {
            $('.filter--trigger').collapsePanel();
        },
        exit: function() {
            $('.filter--trigger').data('plugin_collapsePanel').destroy();
        }
    }]);

    $('*[data-tab-content="true"]').tabContent();
    $('*[data-emotions="true"]').emotions();
    $('*[data-image-slider="true"]').imageSlider();
    $('input[data-quantity-field="true"]').quantityField();

    // Deferred loading of the captcha
    $("div.captcha--placeholder[data-src]").each(function() {
        var $this = $(this),
            requestURL = $this.attr('data-src') || '';

        if (!requestURL || !requestURL.length) {
            return false;
        }

        $this.load(requestURL);
    });

    // Select box replacement<commit_msg>SW-8364 Added new handling for inline widget configs<commit_after>$(function() {
    StateManager.init([{
        type: 'smartphone',
        enter: '0px',
        exit: '767px'
    }, {
        type: 'tablet',
        enter: '768px',
        exit: '1023px'
    }, {
        type: 'tabletLandscape',
        enter: '1024px',
        exit: '1259px'
    }, {
        type: 'desktop',
        enter: '1260px',
        exit: '5160px'
    }]);

    StateManager.registerListener([{
        type: 'smartphone',
        enter: function() {
            $('.sidebar-main').insertBefore($('.page-wrap'));
            $('*[data-offcanvas="true"]').offcanvasMenu();
            $('*[data-search-dropdown="true"]').searchFieldDropDown();
            $('*[data-slide-panel="true"]').slidePanel();
            $('.product--supplier').appendTo($('.product--info'));
            $('.category--teaser .hero--text').collapseText();
        },
        exit: function() {
            $('.sidebar-main').prependTo($('.content-main--inner'));
            $('*[data-offcanvas="true"]').data('plugin_offcanvasMenu').destroy();
            $('*[data-search-dropdown="true"]').data('plugin_searchFieldDropDown').destroy();
            $('*[data-slide-panel="true"]').data('plugin_slidePanel').destroy();
            $('.product--supplier').appendTo($('.product--header'));
            $('.category--teaser .hero--text').data('plugin_collapseText').destroy();
        }
    }, {
        type: 'tablet',
        enter: function() {
            $('*[data-search-dropdown="true"]').searchFieldDropDown();
            $('nav.product--actions').insertBefore($('.additional-info--tabs'));
            $('.filter--trigger').collapsePanel();
        },
        exit: function() {
            $('*[data-search-dropdown="true"]').data('plugin_searchFieldDropDown').destroy();
            $('nav.product--actions').insertAfter($('.buybox--form'));
            $('.filter--trigger').data('plugin_collapsePanel').destroy();
        }
    }, {
        type: 'desktop',
        enter: function() {
            $('.filter--trigger').collapsePanel();
        },
        exit: function() {
            $('.filter--trigger').data('plugin_collapsePanel').destroy();
        }
    }]);

    if (window.widgets !== 'undefined' && window.widgets.length > 0) {
        $.each(window.widgets, function(index, widget) {
            StateManager.registerListener([{
                type: 'smartphone',
                enter: function() {
                    $(widget.selector)[widget.plugin](widget.configSmartphone);
                },
                exit: function() {
                    $(widget.selector).data('plugin_' + widget.plugin).destroy();
                }
            }, {
                type: 'tablet',
                enter: function() {
                    $(widget.selector)[widget.plugin](widget.configTablet);
                },
                exit: function() {
                    $(widget.selector).data('plugin_' + widget.plugin).destroy();
                }
            }, {
                type: 'desktop',
                enter: function() {
                    $(widget.selector)[widget.plugin](widget.configDesktop);
                },
                exit: function() {
                    $(widget.selector).data('plugin_' + widget.plugin).destroy();
                }
            }]);
        });
    }

    $('*[data-tab-content="true"]').tabContent();
    $('*[data-emotions="true"]').emotions();
    $('*[data-image-slider="true"]').imageSlider();
    $('*[data-collapse-panel="true"]').collapsePanel();
    $('input[data-quantity-field="true"]').quantityField();

    // Deferred loading of the captcha
    $("div.captcha--placeholder[data-src]").each(function() {
        var $this = $(this),
            requestURL = $this.attr('data-src') || '';

        if (!requestURL || !requestURL.length) {
            return false;
        }

        $this.load(requestURL);
    });

    // Select box replacement
{'fraction_non_alphanumeric': 0.21008902077151334, 'fraction_numerical': 0.008753709198813056, 'mean_word_length': 2.041967509025271, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '1094063', 'n_tokens_mistral': 1950, 'n_tokens_neox': 1859, 'n_words': 225}