<commit_before>// main.js
import "babel-polyfill";

var React = require('react');
var ReactDOM = require('react-dom');
import { Provider } from 'react-redux'
import rpc from 'app/rpc'
import store from 'app/utils/store'
import plugin from 'app/utils/plugin'
import Command from 'app/utils/command'
import {pretty_ago} from 'app/utils'
import moment from 'moment'
import * as d3 from 'd3'
import graphs from 'app/graphs'
import perms from 'app/utils/perms'
import event from 'app/utils/event'
import cache from 'app/utils/cache'
import i18n from 'app/utils/i18n'
import {set_lang} from 'app/actions/i18n'
import lodash from 'lodash'
import utils from 'app/utils'

require('moment-range');

require("sass/serverboards.sass")

import Main from 'app/containers/main.js'

import Flash from 'app/flash'
import FlashActions from 'app/actions/flash'

Flash.log=function(message, options={}){
  options=Object.assign({level: "success"}, {timeout: 1000 + (message.length*200)}, options)
  store.dispatch( FlashActions.add(message, options) )
  var close =function(){
    store.dispatch(FlashActions.remove(message))
  }
  setTimeout(close, options.timeout)
  return {close}
}

window.Serverboards = {
  rpc,
  i18n,
  store,
  Flash,
  React,
  ReactDOM,
  Components: require("app/components").default,
  utils,
  location: { goto: store.goto, back: store.back, location: store.location },
  add_screen: plugin.add_screen,
  add_widget: plugin.add_widget,
  add_command_search: Command.add_command_search,
  pretty_ago,
  plugin,
  moment,
  d3,
  graphs,
  perms,
  cache,
  event,
  lodash
}

let root = ReactDOM.render(
  (
    <Provider store={store}>
      <Main/>
    </Provider>
  ),
  document.getElementById('react')
);

{
  // Get the main language component of the first language or "en"
  const lang = (navigator.languages || ["en"])[0].split("-")[0]
  store.dispatch( set_lang(lang) )
}

export { root }
<commit_msg>Export properly moment-range<commit_after>// main.js
import "babel-polyfill";

var React = require('react');
var ReactDOM = require('react-dom');
import { Provider } from 'react-redux'
import rpc from 'app/rpc'
import store from 'app/utils/store'
import plugin from 'app/utils/plugin'
import Command from 'app/utils/command'
import {pretty_ago} from 'app/utils'
import Moment from 'moment'
import { extendMoment } from 'moment-range';
import * as d3 from 'd3'
import graphs from 'app/graphs'
import perms from 'app/utils/perms'
import event from 'app/utils/event'
import cache from 'app/utils/cache'
import i18n from 'app/utils/i18n'
import {set_lang} from 'app/actions/i18n'
import lodash from 'lodash'
import utils from 'app/utils'

const moment = extendMoment(Moment);

require('moment-range');

require("sass/serverboards.sass")

import Main from 'app/containers/main.js'

import Flash from 'app/flash'
import FlashActions from 'app/actions/flash'

Flash.log=function(message, options={}){
  options=Object.assign({level: "success"}, {timeout: 1000 + (message.length*200)}, options)
  store.dispatch( FlashActions.add(message, options) )
  var close =function(){
    store.dispatch(FlashActions.remove(message))
  }
  setTimeout(close, options.timeout)
  return {close}
}

window.Serverboards = {
  rpc,
  i18n,
  store,
  Flash,
  React,
  ReactDOM,
  Components: require("app/components").default,
  utils,
  location: { goto: store.goto, back: store.back, location: store.location },
  add_screen: plugin.add_screen,
  add_widget: plugin.add_widget,
  add_command_search: Command.add_command_search,
  pretty_ago,
  plugin,
  moment,
  d3,
  graphs,
  perms,
  cache,
  event,
  lodash
}

let root = ReactDOM.render(
  (
    <Provider store={store}>
      <Main/>
    </Provider>
  ),
  document.getElementById('react')
);

{
  // Get the main language component of the first language or "en"
  const lang = (navigator.languages || ["en"])[0].split("-")[0]
  store.dispatch( set_lang(lang) )
}

export { root }

{'fraction_non_alphanumeric': 0.13737938039614017, 'fraction_numerical': 0.01015744032503809, 'mean_word_length': 4.516806722689076, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3705196', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1321, 'n_words': 343}