<commit_before>/** 
 * @fileOverview
 * @author <NAME>
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */

/**
 * 
 * 
 * @class
 * @constructor
 */
Exhibit.UIContext = function() {
    this._parent = null;
    
    this._exhibit = null;
    this._collection = null;
    this._lensRegistry = new Exhibit.LensRegistry();
    this._settings = {};
    
    this._formatters = {};
    this._listFormatter = null;
    
    this._editModeRegistry = {};
    
    this._popupFunc = null;

    this._settingSpecs = {
        "bubbleWidth": { type: "int" },
        "bubbleHeight": { type: "int" }
    };
};

/**
 * @param {Object} configuration
 * @param {Exhibit} exhibit
 * @returns {Exhibit.UIContext}
 */
Exhibit.UIContext.createRootContext = function(configuration, exhibit) {
    var context, settings, n, formats;

    context = new Exhibit.UIContext();
    context._exhibit = exhibit;
    
    // This used to be localized but it is unclear as to why; moving it
    // here.
    settings = {
        "bubbleWidth": 400,
        "bubbleHeight": 300
    };

    for (n in settings) {
        if (settings.hasOwnProperty(n)) {
            context._settings[n] = settings[n];
        }<commit_msg>move settings to accessible place<commit_after>/** 
 * @fileOverview
 * @author <NAME>
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */

/**
 * 
 * 
 * @class
 * @constructor
 */
Exhibit.UIContext = function() {
    this._parent = null;
    
    this._exhibit = null;
    this._collection = null;
    this._lensRegistry = new Exhibit.LensRegistry();
    this._settings = {};
    
    this._formatters = {};
    this._listFormatter = null;
    
    this._editModeRegistry = {};
    
    this._popupFunc = null;

    this._settingSpecs = {
        "bubbleWidth": { type: "int" },
        "bubbleHeight": { type: "int" }
    };

    // This used to be localized but it is unclear as to why; moving it
    // here.
    this.initialSettings = {
        "bubbleWidth": 400,
        "bubbleHeight": 300
    };
};

/**
 * @param {Object} configuration
 * @param {Exhibit} exhibit
 * @returns {Exhibit.UIContext}
 */
Exhibit.UIContext.createRootContext = function(configuration, exhibit) {
    var context, settings, n, formats;

    context = new Exhibit.UIContext();
    context._exhibit = exhibit;
    
    settings = Exhibit.UIContext.initialSettings;

    for (n in settings) {
        if (settings.hasOwnProperty(n)) {
            context._settings[n] = settings[n];
        }
{'fraction_non_alphanumeric': 0.14471017430077016, 'fraction_numerical': 0.004864207539521687, 'mean_word_length': 2.4957507082152977, 'pattern_counts': {'":': 8, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2217260', 'n_tokens_mistral': 808, 'n_tokens_neox': 758, 'n_words': 172}