<commit_before>/* Copyright (c) 2012-2015 The TagSpaces Authors. All rights reserved.
 * Use of this source code is governed by a AGPL3 license that 
 * can be found in the LICENSE file. */
/* global define, requirejs, _  */

// the value of this var is replaced to "true" by the build script
var PRODUCTION = "@@PRODUCTION";
var PRO = "@@PROVERSION";

// Disabling all output to console in production mode
if (PRODUCTION == "true") {
  console = console || {};
  console.log = function(){};
  console.error = function(){};
}

var isFirefox = document.URL.indexOf( 'resource://' ) === 0;
var isFirefoxOS = document.URL.indexOf( 'app://' ) === 0;
var isChrome =  document.URL.indexOf( 'chrome-extension://' ) === 0;
var isNode;
var isCordovaAndroid = document.URL.indexOf( 'file:///android_asset' ) === 0;
var isCordovaiOS= navigator.isCordovaApp == true;
var isCordova = isCordovaAndroid  == true || isCordovaiOS == true;
var isWeb = document.URL.indexOf( 'http' ) === 0;
var isOSX = navigator.appVersion.indexOf("Mac")!==-1;
var isWin = navigator.appVersion.indexOf("Win")!==-1;
//cordova ios handleOpenURL is global 
var handleOpenURL;

// Check for running in node-webkit
try {
  var fs = require('fs');
  var pathUtils = require('path');
  var gui = require('nw.gui');
  isNode = true;
} catch(e) {
  isNode = false;
  console.log("node-webkit not found!");
}

// Setting up the IO functionality according to the platform
var IO_JS = "web/web.api";
if( isFirefox ) {
  IO_JS = "mozilla/mozilla.api";
} else if ( isFirefoxOS ) {
  IO_JS = "mozilla/firefoxos.api";
} else if ( isChrome ) {
  IO_JS = "chromelight/chrome.api";
} else if (isNode){
  IO_JS = "node-webkit/node-webkit.api";
} else if (isCordova){
  IO_JS = "cordova/cordova.api";
} else if (isWeb){
  IO_JS = "web/web.api";
}

var PRO_JS = "js/pro";
if(PRO != "false") {
  PRO_JS = 'pro/js/pro.api';
}

console.log("Loading Loader - Firefox: "+isFirefox+" | ChromeExt: "+isChrome+" | Node: "+isNode+" | Cordova: "+isCordova+" | Web: "+isWeb+" | isWin: "+isWin);

requirejs.config({
  map: {
    '*': {
      'css':   'libs/requirecss/css',
      'text':  'libs/requiretext/text'
    }
  },
  paths: {
    jquery:                 'libs/jquery/jquery-2.1.1.min',
    jqueryui:               'libs/jqueryui/jquery.ui.core',
    jqueryuiwidget:         'libs/jqueryui/jquery.ui.widget',
    jqueryuimouse:          'libs/jqueryui/jquery.ui.mouse',<commit_msg>fixing the issue with hanging up by no pro version<commit_after>/* Copyright (c) 2012-2015 The TagSpaces Authors. All rights reserved.
 * Use of this source code is governed by a AGPL3 license that 
 * can be found in the LICENSE file. */
/* global define, requirejs, _  */

// the value of this var is replaced to "true" by the build script
var PRODUCTION = "@@PRODUCTION";
var PRO = "@@PROVERSION";

// Disabling all output to console in production mode
if (PRODUCTION == "true") {
  console = console || {};
  console.log = function(){};
  console.error = function(){};
}

var isFirefox = document.URL.indexOf( 'resource://' ) === 0;
var isFirefoxOS = document.URL.indexOf( 'app://' ) === 0;
var isChrome =  document.URL.indexOf( 'chrome-extension://' ) === 0;
var isNode;
var isCordovaAndroid = document.URL.indexOf( 'file:///android_asset' ) === 0;
var isCordovaiOS= navigator.isCordovaApp == true;
var isCordova = isCordovaAndroid  == true || isCordovaiOS == true;
var isWeb = document.URL.indexOf( 'http' ) === 0;
var isOSX = navigator.appVersion.indexOf("Mac")!==-1;
var isWin = navigator.appVersion.indexOf("Win")!==-1;
//cordova ios handleOpenURL is global 
var handleOpenURL;

// Check for running in node-webkit
try {
  var fs = require('fs');
  var pathUtils = require('path');
  var gui = require('nw.gui');
  isNode = true;
} catch(e) {
  isNode = false;
  console.log("node-webkit not found!");
}

// Setting up the IO functionality according to the platform
var IO_JS = "web/web.api";
if( isFirefox ) {
  IO_JS = "mozilla/mozilla.api";
} else if ( isFirefoxOS ) {
  IO_JS = "mozilla/firefoxos.api";
} else if ( isChrome ) {
  IO_JS = "chromelight/chrome.api";
} else if (isNode){
  IO_JS = "node-webkit/node-webkit.api";
} else if (isCordova){
  IO_JS = "cordova/cordova.api";
} else if (isWeb){
  IO_JS = "web/web.api";
}

var PRO_JS = "pro/js/pro.api";
// Comment this line to test the pro version if available
if(PRO == "false" || PRO == "@@PROVERSION") { PRO_JS = 'js/pro'; }

console.log("Loading Loader - Firefox: "+isFirefox+" | ChromeExt: "+isChrome+" | Node: "+isNode+" | Cordova: "+isCordova+" | Web: "+isWeb+" | isWin: "+isWin);

requirejs.config({
  map: {
    '*': {
      'css':   'libs/requirecss/css',
      'text':  'libs/requiretext/text'
    }
  },
  paths: {
    jquery:                 'libs/jquery/jquery-2.1.1.min',
    jqueryui:               'libs/jqueryui/jquery.ui.core',
    jqueryuiwidget:         'libs/jqueryui/jquery.ui.widget',
    jqueryuimouse:          'libs/jqueryui/jquery.ui.mouse',
{'fraction_non_alphanumeric': 0.1674062121823316, 'fraction_numerical': 0.007664380798709157, 'mean_word_length': 3.4796747967479673, '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': '5472448', 'n_tokens_mistral': 1794, 'n_tokens_neox': 1727, 'n_words': 456}