<commit_before>import sha512 from '../../node_modules/sha512/lib/sha512.js'
var raw = window.location.search,
refined = raw.length ? raw.replace('?',''):false,
[...rawQueryData] = refined ? refined.split('&').map((chunk) => chunk.split('=')):false,
queryParams = false;

if (rawQueryData.length) {
  queryParams = {};
  rawQueryData.map((chunk) => queryParams[chunk[0]] = chunk[1]);
}

const config = {
  debug: !!(queryParams && queryParams.debug) || false,
  wireframe: !!(queryParams && queryParams.wireframe) || false,
  autoRotate: !!(queryParams && queryParams.autoRotate) || false,
  w: queryParams && queryParams.w || 720,
  h: queryParams && queryParams.h || 480,
  fov: queryParams && queryParams.fov || 75,
  near: queryParams && queryParams.near || 0.1,
  far: queryParams && queryParams.far || 1000,
  zoom: queryParams && queryParams.zoom || 2,
  levelMax: queryParams && queryParams.levelMax || 0,
  size: parseInt(queryParams && queryParams.size || 4),
  originalSeed: queryParams && queryParams.seed || 'proc.edu.ria'
}
let maxSeedLength = 512/4
let maxSize = 32
config.size = maxSize < config.size ? maxSize:config.size
config.cubicSize = Math.pow(config.size, 3)
var mkSha = (string) => sha512(string).toString('hex')
config.rawSeed = mkSha(config.originalSeed)
while (config.rawSeed.length < config.cubicSize) {
  let rest = config.cubicSize - config.rawSeed.length
  if (config.debug) console.info(`filling up to ${rest} hex chars with seed generated from rawSeed`)
  config.rawSeed += mkSha(config.rawSeed).substr(0, rest)
}

let sizeToUse = 'cubicSize'
config.seed = config.rawSeed.substr(0, config.cubicSize).substr(0, config[sizeToUse])
if (config.debug) console.info('config:', config)
console.info('size', config.size)
console.info('cubicSize', config.cubicSize)
console.info('rawSeed', config.rawSeed.length, config.rawSeed)
console.info('seed', config.seed.length, config.seed)

export default config<commit_msg>masking config message for debug mode ON only<commit_after>import sha512 from '../../node_modules/sha512/lib/sha512.js'
var raw = window.location.search,
refined = raw.length ? raw.replace('?',''):false,
[...rawQueryData] = refined ? refined.split('&').map((chunk) => chunk.split('=')):false,
queryParams = false;

if (rawQueryData.length) {
  queryParams = {};
  rawQueryData.map((chunk) => queryParams[chunk[0]] = chunk[1]);
}

const config = {
  debug: !!(queryParams && queryParams.debug) || false,
  wireframe: !!(queryParams && queryParams.wireframe) || false,
  autoRotate: !!(queryParams && queryParams.autoRotate) || false,
  w: queryParams && queryParams.w || 720,
  h: queryParams && queryParams.h || 480,
  fov: queryParams && queryParams.fov || 75,
  near: queryParams && queryParams.near || 0.1,
  far: queryParams && queryParams.far || 1000,
  zoom: queryParams && queryParams.zoom || 2,
  levelMax: queryParams && queryParams.levelMax || 0,
  size: parseInt(queryParams && queryParams.size || 4),
  originalSeed: queryParams && queryParams.seed || 'proc.edu.ria'
}
let maxSeedLength = 512/4
let maxSize = 32
config.size = maxSize < config.size ? maxSize:config.size
config.cubicSize = Math.pow(config.size, 3)
var mkSha = (string) => sha512(string).toString('hex')
config.rawSeed = mkSha(config.originalSeed)
while (config.rawSeed.length < config.cubicSize) {
  let rest = config.cubicSize - config.rawSeed.length
  if (config.debug) console.info(`filling up to ${rest} hex chars with seed generated from rawSeed`)
  config.rawSeed += mkSha(config.rawSeed).substr(0, rest)
}

let sizeToUse = 'cubicSize'
config.seed = config.rawSeed.substr(0, config.cubicSize).substr(0, config[sizeToUse])
if (config.debug) {
  console.info('config:', config)
  console.info('size', config.size)
  console.info('cubicSize', config.cubicSize)
  console.info('rawSeed', config.rawSeed.length, config.rawSeed)
  console.info('seed', config.seed.length, config.seed)
}

export default config
{'fraction_non_alphanumeric': 0.16395112016293278, 'fraction_numerical': 0.020875763747454174, 'mean_word_length': 5.1390625, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5958432', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1325, 'n_words': 282}