<commit_before>const Carto = require('../cartodb3/carto-node/index');
const PACKAGE = require('../../../../package.json');
const version = PACKAGE.version;

window.StaticConfig = window.StaticConfig || {};
window.CartoConfig = window.CartoConfig || {};

(function (window, document) {
  var client = new Carto.AuthenticatedClient();

  function getAssetsVersion () {
    var query = window.location.search.substring(1);
    var vars = query.split('&');

    for (var i = 0; i < vars.length; i++) {
      var pair = vars[i].split('=');

      if (pair[0] === 'v') {
        return pair[1];
      }
    }

    return window.StaticConfig.assetVersion || window.CartoConfig.data.user_frontend_version || version;
  }

  function getAssetsBaseUrl () {
    var data = window.CartoConfig.data;
    var userAssetsHost = data.asset_host;

    return (window.StaticConfig.assetsBaseUrl || userAssetsHost && userAssetsHost + '/assets' || data.config.app_assets_base_url) + '/';
  }

  client.getConfig(function (err, response, data) {
    window.CartoConfig.data = data;

    if (err) {
      console.error('Error getting the config:\n', err);
    } else {
      if (response.statusCode !== 200) {
        window.location.href = '/login';
      }

      var assetsUrl = getAssetsBaseUrl() + getAssetsVersion();

      (function (w, d, a, favicon, stylesheets, scripts, l, h, s, t) {
        l = d.createElement('link');
        l.rel = 'shortcut icon';
        l.href = a + favicon;
        h = d.getElementsByTagName('head')[0];
        h.parentNode.insertBefore(l, h);

        stylesheets.forEach(function (src) {
          l = d.createElement('link');
          l.rel = 'stylesheet';
          l.href = a + src;
          h = d.getElementsByTagName('head')[0];
          h.parentNode.insertBefore(l, h);
        });

        scripts.forEach(function (src) {
          s = d.createElement('script');
          t = d.getElementsByTagName('script')[0];<commit_msg>static: remove redirection<commit_after>const Carto = require('../cartodb3/carto-node/index');
const PACKAGE = require('../../../../package.json');
const version = PACKAGE.version;

window.StaticConfig = window.StaticConfig || {};
window.CartoConfig = window.CartoConfig || {};

(function (window, document) {
  var client = new Carto.AuthenticatedClient();

  function getAssetsVersion () {
    var query = window.location.search.substring(1);
    var vars = query.split('&');

    for (var i = 0; i < vars.length; i++) {
      var pair = vars[i].split('=');

      if (pair[0] === 'v') {
        return pair[1];
      }
    }

    return window.StaticConfig.assetVersion || window.CartoConfig.data.user_frontend_version || version;
  }

  function getAssetsBaseUrl () {
    var data = window.CartoConfig.data;
    var userAssetsHost = data.asset_host;

    return (window.StaticConfig.assetsBaseUrl || userAssetsHost && userAssetsHost + '/assets' || data.config.app_assets_base_url) + '/';
  }

  client.getConfig(function (err, response, data) {
    window.CartoConfig.data = data;

    if (err) {
      console.error('Error getting the config:\n', err);
    } else {
      var assetsUrl = getAssetsBaseUrl() + getAssetsVersion();

      (function (w, d, a, favicon, stylesheets, scripts, l, h, s, t) {
        l = d.createElement('link');
        l.rel = 'shortcut icon';
        l.href = a + favicon;
        h = d.getElementsByTagName('head')[0];
        h.parentNode.insertBefore(l, h);

        stylesheets.forEach(function (src) {
          l = d.createElement('link');
          l.rel = 'stylesheet';
          l.href = a + src;
          h = d.getElementsByTagName('head')[0];
          h.parentNode.insertBefore(l, h);
        });

        scripts.forEach(function (src) {
          s = d.createElement('script');
          t = d.getElementsByTagName('script')[0];
{'fraction_non_alphanumeric': 0.15822454308093994, 'fraction_numerical': 0.004960835509138381, 'mean_word_length': 2.7448680351906156, 'pattern_counts': {'":': 0, '<': 5, '<?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': '963076', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1196, 'n_words': 248}