<commit_before>/**
 * Fangorn: Defining Treebeard options for OSF.
 * For Treebeard and _item API's check: https://github.com/caneruguz/treebeard/wiki
 */

'use strict';

var $ = require('jquery');
var m = require('mithril');
var URI = require('URIjs');
var Raven = require('raven-js');
var Treebeard = require('treebeard');

var $osf = require('js/osfHelpers');
var waterbutler = require('js/waterbutler');

// CSS
require('css/fangorn.css');

var tbOptions;

var noop = function () { };

var tempCounter = 1;

var STATE_MAP = {
    upload: {
        display: 'Upload pending...'
    },
    copy: {
        display: 'Copying '
    },
    delete: {
        display: 'Deleting '
    },
    move: {
        display: 'Moving '
    },
    rename: {
        display: 'Renaming '
    }
};


var OPERATIONS = {
    RENAME: {
        status: 'rename',
        verb: 'Rename',
        passed: 'renamed',
    },
    MOVE: {
        status: 'move',
        verb: 'Move',
        passed: 'moved',
    },
    COPY: {
        status: 'copy',
        verb: 'Copy',
        passed: 'copied',
    }
};

var EXTENSIONS = ['3gp', '7z', 'ace', 'ai', 'aif', 'aiff', 'amr', 'asf', 'asx', 'bat', 'bin', 'bmp', 'bup',
    'cab', 'cbr', 'cda', 'cdl', 'cdr', 'chm', 'dat', 'divx', 'dll', 'dmg', 'doc', 'docx', 'dss', 'dvf', 'dwg',
    'eml', 'eps', 'exe', 'fla', 'flv', 'gif', 'gz', 'hqx', 'htm', 'html', 'ifo', 'indd', 'iso', 'jar',
    'jpeg', 'jpg', 'lnk', 'log', 'm4a', 'm4b', 'm4p', 'm4v', 'mcd', 'md', 'mdb', 'mid', 'mov', 'mp2', 'mp3', 'mp4',
    'mpeg', 'mpg', 'msi', 'mswmm', 'ogg', 'pdf', 'png', 'pps', 'ps', 'psd', 'pst', 'ptb', 'pub', 'qbb',
    'qbw', 'qxd', 'ram', 'rar', 'rm', 'rmvb', 'rtf', 'sea', 'ses', 'sit', 'sitx', 'ss', 'swf', 'tgz', 'thm',
    'tif', 'tmp', 'torrent', 'ttf', 'txt', 'vcd', 'vob', 'wav', 'wma', 'wmv', 'wps', 'xls', 'xpi', 'zip',
    'xlsx', 'py'];

var EXTENSION_MAP = {};
EXTENSIONS.forEach(function(extension) {
    EXTENSION_MAP[extension] = extension;
});
$.extend(EXTENSION_MAP, {
    gdoc: 'docx',
    gsheet: 'xlsx'
});
// Cross browser key codes for the Command key
var COMMAND_KEYS = [224, 17, 91, 93];
var ESCAPE_KEY = 27;
var ENTER_KEY = 13;

var ICON_PATH = '/static/img/hgrid/fatcowicons/';

var getExtensionIconClass = function (name) {<commit_msg>Add action into the operations map<commit_after>/**
 * Fangorn: Defining Treebeard options for OSF.
 * For Treebeard and _item API's check: https://github.com/caneruguz/treebeard/wiki
 */

'use strict';

var $ = require('jquery');
var m = require('mithril');
var URI = require('URIjs');
var Raven = require('raven-js');
var Treebeard = require('treebeard');

var $osf = require('js/osfHelpers');
var waterbutler = require('js/waterbutler');

// CSS
require('css/fangorn.css');

var tbOptions;

var noop = function () { };

var tempCounter = 1;

var STATE_MAP = {
    upload: {
        display: 'Upload pending...'
    },
    copy: {
        display: 'Copying '
    },
    delete: {
        display: 'Deleting '
    },
    move: {
        display: 'Moving '
    },
    rename: {
        display: 'Renaming '
    }
};


var OPERATIONS = {
    RENAME: {
        verb: 'Rename',
        status: 'rename',
        passed: 'renamed',
        action: 'Renaming',
    },
    MOVE: {
        verb: 'Move',
        status: 'move',
        passed: 'moved',
        action: 'Moving',
    },
    COPY: {
        verb: 'Copy',
        status: 'copy',
        passed: 'copied',
        action: 'Copying',
    }
};

var EXTENSIONS = ['3gp', '7z', 'ace', 'ai', 'aif', 'aiff', 'amr', 'asf', 'asx', 'bat', 'bin', 'bmp', 'bup',
    'cab', 'cbr', 'cda', 'cdl', 'cdr', 'chm', 'dat', 'divx', 'dll', 'dmg', 'doc', 'docx', 'dss', 'dvf', 'dwg',
    'eml', 'eps', 'exe', 'fla', 'flv', 'gif', 'gz', 'hqx', 'htm', 'html', 'ifo', 'indd', 'iso', 'jar',
    'jpeg', 'jpg', 'lnk', 'log', 'm4a', 'm4b', 'm4p', 'm4v', 'mcd', 'md', 'mdb', 'mid', 'mov', 'mp2', 'mp3', 'mp4',
    'mpeg', 'mpg', 'msi', 'mswmm', 'ogg', 'pdf', 'png', 'pps', 'ps', 'psd', 'pst', 'ptb', 'pub', 'qbb',
    'qbw', 'qxd', 'ram', 'rar', 'rm', 'rmvb', 'rtf', 'sea', 'ses', 'sit', 'sitx', 'ss', 'swf', 'tgz', 'thm',
    'tif', 'tmp', 'torrent', 'ttf', 'txt', 'vcd', 'vob', 'wav', 'wma', 'wmv', 'wps', 'xls', 'xpi', 'zip',
    'xlsx', 'py'];

var EXTENSION_MAP = {};
EXTENSIONS.forEach(function(extension) {
    EXTENSION_MAP[extension] = extension;
});
$.extend(EXTENSION_MAP, {
    gdoc: 'docx',
    gsheet: 'xlsx'
});
// Cross browser key codes for the Command key
var COMMAND_KEYS = [224, 17, 91, 93];
var ESCAPE_KEY = 27;
var ENTER_KEY = 13;

var ICON_PATH = '/static/img/hgrid/fatcowicons/';

var getExtensionIconClass = function (name) {
{'fraction_non_alphanumeric': 0.23893425010743446, 'fraction_numerical': 0.009883970777825527, 'mean_word_length': 3.1194690265486726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7561983', 'n_tokens_mistral': 1951, 'n_tokens_neox': 1874, 'n_words': 469}