<commit_before>/**
 * @author VovanR <<EMAIL>>
 */

define([
    'jquery',
], function (
    $
) {

    'use strict';

    var Tabs;
    var currentClass = '_state_current';

    /**
     * Tabs module
     *
     * @param {Object} o Options
     * @param {String} o.name
     * @constructor
     */
    Tabs = function (o) {
        this._name = o.name;

        this._bTabs = null;
        this._bPanels = null;

        this._initialize();
    };

    Tabs.prototype = {
        /**
         * Initialize
         *
         * @private
         */
        _initialize: function () {
            console.info('Tabs init');

            var bTabs = $('.b-tabs._name_' + this._name);
            this._bTabs = bTabs.filter('.b-tabs__tabs');
            this._bPanels = bTabs.filter('.b-tabs__panels');

            this._bindControls();
        },

        /**
         * Bindings
         *
         * @private
         */
        _bindControls: function () {
            var _this = this; // Save context

            this._bTabs.on('click', '.b-tabs__tab', function (e) {
                var name = $(this).data('name');

                _this._openTab(name);

                e.preventDefault();
            });

            this._bindArrowKeys();
        },

        /**
         * Binding arrow keys to navigate tabs
         *
         * @private
         */
        _bindArrowKeys: function () {
            this._bTabs.on('keyup', function (e) {
                if (e.keyCode === 39) {
                    this.openNext();<commit_msg>+`_bindClickOnTab`<commit_after>/**
 * @author VovanR <<EMAIL>>
 */

define([
    'jquery',
], function (
    $
) {

    'use strict';

    var Tabs;
    var currentClass = '_state_current';

    /**
     * Tabs module
     *
     * @param {Object} o Options
     * @param {String} o.name
     * @constructor
     */
    Tabs = function (o) {
        this._name = o.name;

        this._bTabs = null;
        this._bPanels = null;

        this._initialize();
    };

    Tabs.prototype = {
        /**
         * Initialize
         *
         * @private
         */
        _initialize: function () {
            console.info('Tabs init');

            var bTabs = $('.b-tabs._name_' + this._name);
            this._bTabs = bTabs.filter('.b-tabs__tabs');
            this._bPanels = bTabs.filter('.b-tabs__panels');

            this._bindControls();
        },

        /**
         * Bindings
         *
         * @private
         */
        _bindControls: function () {
            this._bindClickOnTab();
            this._bindArrowKeys();
        },

        /**
         * Binding click on tabs
         *
         * @private
         */
        _bindClickOnTab: function () {
            var _this = this; // Save context

            this._bTabs.on('click', '.b-tabs__tab', function (e) {
                var name = $(this).data('name');

                _this._openTab(name);

                e.preventDefault();
            });

        },

        /**
         * Binding arrow keys to navigate tabs
         *
         * @private
         */
        _bindArrowKeys: function () {
            this._bTabs.on('keyup', function (e) {
                if (e.keyCode === 39) {
                    this.openNext();
{'fraction_non_alphanumeric': 0.14268218003674218, 'fraction_numerical': 0.001224739742804654, 'mean_word_length': 1.2546583850931676, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3715957', 'n_tokens_mistral': 993, 'n_tokens_neox': 947, 'n_words': 177}