<commit_before>import store from '../store'

const initialState = {
  appMode: 'full',
  navigationMode: 'forward',
  isRouterEnabled: false,
  router: {},
  history: [],
  backwardNavigation: false,
  componentList: {},
  goBackView: '',
  diameters: {},
  usePercentSizes: false,
  percentSizes: {
    xxl: 30,
    xl: 20,
    l: 16,
    m: 8,
    s: 6,
    xs: 4,
    xxs: 2
  },
  minSizesInPixels: {
    xxl: 180,
    xl: 150,
    l: 100,
    m: 80,
    s: 50,
    xs: 30,
    xxs: 20
  },
  appStyle: {
    theme: 'theme-black',
    mode: 'mode-dark',
    shape: 'circle'
  },
  currentPage: 0,
  items: [],
  pages: [],
  params: {},
  debug: false
}
const app = {
  getAppMode () {
    return store.state.appMode
  },
  isUsingPercentSizes () {
    return store.state.usePercentSizes
  },
  resetConfig () {
    store.state = initialState
  },
  config (config) {
    if (typeof config.debug === 'boolean') store.state.debug = config.debug
    if (store.state.debug === true) store.actions.setLog('- Debug enabled')
    if (config.mode === 'full' || config.mode === 'mixed') {
      store.state.appMode = config.mode
      store.actions.setLog('- Mode: ' + config.mode)
    }
    if (typeof config.usePercentSizes === 'boolean') {
      store.state.usePercentSizes = config.usePercentSizes
      store.actions.setLog(`- Percent sizes ${config.usePercentSizes ? 'ON' : 'OFF'}`)
    }
    if (config.percentSizes) {
      store.state.percentSizes = config.percentSizes
      store.actions.setLog('- Component percentSizes: ' + JSON.stringify(config.percentSizes))
    }
    if (config.minSizesInPixels) {
      store.state.minSizesInPixels = config.minSizesInPixels
      store.actions.setLog('- Component minSizesInPixels: ' + JSON.stringify(config.minSizesInPixels))
    }
    if (config.style && config.style.theme) {
      store.state.appStyle.theme = 'theme-' + config.style.theme
      store.actions.setLog('- Theme: ' + config.style.theme)
    }
    if (config.style && config.style.mode) {
      store.state.appStyle.mode = 'mode-' + config.style.mode
      store.actions.setLog('- Theme mode: ' + config.style.mode)
    }<commit_msg>fix(resetConfig): set state's data property instead of state directly<commit_after>import store from '../store'

const initialState = {
  appMode: 'full',
  navigationMode: 'forward',
  isRouterEnabled: false,
  router: {},
  history: [],
  backwardNavigation: false,
  componentList: {},
  goBackView: '',
  diameters: {},
  usePercentSizes: false,
  percentSizes: {
    xxl: 30,
    xl: 20,
    l: 16,
    m: 8,
    s: 6,
    xs: 4,
    xxs: 2
  },
  minSizesInPixels: {
    xxl: 180,
    xl: 150,
    l: 100,
    m: 80,
    s: 50,
    xs: 30,
    xxs: 20
  },
  appStyle: {
    theme: 'theme-black',
    mode: 'mode-dark',
    shape: 'circle'
  },
  currentPage: 0,
  items: [],
  pages: [],
  params: {},
  debug: false
}
const app = {
  getAppMode () {
    return store.state.appMode
  },
  isUsingPercentSizes () {
    return store.state.usePercentSizes
  },
  resetConfig () {
    store.state.data = initialState
  },
  config (config) {
    if (typeof config.debug === 'boolean') store.state.debug = config.debug
    if (store.state.debug === true) store.actions.setLog('- Debug enabled')
    if (config.mode === 'full' || config.mode === 'mixed') {
      store.state.appMode = config.mode
      store.actions.setLog('- Mode: ' + config.mode)
    }
    if (typeof config.usePercentSizes === 'boolean') {
      store.state.usePercentSizes = config.usePercentSizes
      store.actions.setLog(`- Percent sizes ${config.usePercentSizes ? 'ON' : 'OFF'}`)
    }
    if (config.percentSizes) {
      store.state.percentSizes = config.percentSizes
      store.actions.setLog('- Component percentSizes: ' + JSON.stringify(config.percentSizes))
    }
    if (config.minSizesInPixels) {
      store.state.minSizesInPixels = config.minSizesInPixels
      store.actions.setLog('- Component minSizesInPixels: ' + JSON.stringify(config.minSizesInPixels))
    }
    if (config.style && config.style.theme) {
      store.state.appStyle.theme = 'theme-' + config.style.theme
      store.actions.setLog('- Theme: ' + config.style.theme)
    }
    if (config.style && config.style.mode) {
      store.state.appStyle.mode = 'mode-' + config.style.mode
      store.actions.setLog('- Theme mode: ' + config.style.mode)
    }
{'fraction_non_alphanumeric': 0.15262795501491852, 'fraction_numerical': 0.012852880422308928, 'mean_word_length': 2.829525483304042, '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': '4771727', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1492, 'n_words': 302}