<commit_before>var CloudCmd, Util, DOM, olark;

(function(CloudCmd, Util, DOM) {
    'use strict';
    
    CloudCmd.Contact = ContactProto;
    
    function ContactProto(callback) {
        var Contact = this,
            Events  = DOM.Events,
            Images  = DOM.Images,
            Key     = CloudCmd.Key,
            Inited  = false;
        
        function init(callback) {
            if (!Inited) {
                Contact.show = show;
                Contact.hide = hide;
                
                load(function() {
                    Inited = true;
                    
                    olark.identify('6216-545-10-4223');
                    olark('api.box.onExpand',   Contact.show);
                    olark('api.box.onShow',     Contact.show);
                    olark('api.box.onShrink',   Contact.hide);
                    
                    Util.exec(callback);
                });
                
                Events.addKey(onKey);
            }
        }
        
        function load(callback) {
            var prefix  = CloudCmd.PREFIX,
                path    = prefix + '/modules/olark/olark.min.js';
            
            Images.show.load('top');
            
            DOM.load.js(path, callback);
        }
        
        function show() {
            Key.unsetBind();
            Images.hide();
            
            if (Inited)
                olark('api.box.expand');
            else
                init(Contact.show);
        }
        
        function hide() {
            Key.setBind();
            olark('api.box.hide');
        }<commit_msg>refactor(contact) init: early return<commit_after>var CloudCmd, Util, DOM, olark;

(function(CloudCmd, Util, DOM) {
    'use strict';
    
    CloudCmd.Contact = ContactProto;
    
    function ContactProto(callback) {
        var Contact = this,
            Events  = DOM.Events,
            Images  = DOM.Images,
            Key     = CloudCmd.Key,
            Inited  = false;
        
        function init(callback) {
            if (Inited)
                return;
            
            Contact.show = show;
            Contact.hide = hide;
            
            load(function() {
                Inited = true;
                
                olark.identify('6216-545-10-4223');
                olark('api.box.onExpand',   Contact.show);
                olark('api.box.onShow',     Contact.show);
                olark('api.box.onShrink',   Contact.hide);
                
                Util.exec(callback);
            });
            
            Events.addKey(onKey);
        }
        
        function load(callback) {
            var prefix  = CloudCmd.PREFIX,
                path    = prefix + '/modules/olark/olark.min.js';
            
            Images.show.load('top');
            
            DOM.load.js(path, callback);
        }
        
        function show() {
            Key.unsetBind();
            Images.hide();
            
            if (Inited)
                olark('api.box.expand');
            else
                init(Contact.show);
        }
        
        function hide() {
            Key.setBind();
            olark('api.box.hide');
        }
{'fraction_non_alphanumeric': 0.10779745262503883, 'fraction_numerical': 0.00807704255980118, 'mean_word_length': 0.9975186104218362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '461197', 'n_tokens_mistral': 879, 'n_tokens_neox': 835, 'n_words': 142}