<commit_before>import Vue from "vue"
import Vuex from "vuex"
import VueLocalStorage from 'vue-localstorage'

import chords from './chords.json'
import keyboards from './keyboards'

Vue.use(Vuex)
Vue.use(VueLocalStorage)

export default new Vuex.Store({
  state: () => ({
    language: Vue.localStorage.get('language') || navigator.language?.split('-')[0] || 'en',
    buttonColors: false,
    chords,
    keyboards,
    keyboard: Vue.localStorage.get('keyboard') || 'rheinische142',
    variants: ['left-open', 'left-close', 'right-open', 'right-close'],
    scaleTypes: ['major', 'minor', 'chromatic'],
    chordTypes: ['M', 'm', '7', 'dim', 'm7', 'M7']
  }),

  getters: {
    currentVariant(state) {
      return state.route.params.variant || 'right-open'
    },

    currentTonic(state) {
      return decodeURIComponent(state.route.params.tonic);
    },

    currentChordType(state) {
      return state.route.params.chordType
    },

    currentScaleType(state) {
      return state.route.params.scaleType
    },
  },

  mutations: {
    setLanguage(state, language) {
      Vue.localStorage.set('language', language)
      state.language = language
    },

    setKeyboard(state, keyboard) {
      if (keyboard in keyboards) {
        state.keyboard = keyboard
        Vue.localStorage.set('keyboard', keyboard)
      }
    },
  }
})
<commit_msg>fix: fix URL decode in store<commit_after>import Vue from "vue"
import Vuex from "vuex"
import VueLocalStorage from 'vue-localstorage'

import chords from './chords.json'
import keyboards from './keyboards'

Vue.use(Vuex)
Vue.use(VueLocalStorage)

export default new Vuex.Store({
  state: () => ({
    language: Vue.localStorage.get('language') || navigator.language?.split('-')[0] || 'en',
    buttonColors: false,
    chords,
    keyboards,
    keyboard: Vue.localStorage.get('keyboard') || 'rheinische142',
    variants: ['left-open', 'left-close', 'right-open', 'right-close'],
    scaleTypes: ['major', 'minor', 'chromatic'],
    chordTypes: ['M', 'm', '7', 'dim', 'm7', 'M7']
  }),

  getters: {
    currentVariant(state) {
      return state.route.params.variant || 'right-open'
    },

    currentTonic(state) {
      return state.route.params.tonic ? decodeURIComponent(state.route.params.tonic) : undefined
    },

    currentChordType(state) {
      return state.route.params.chordType
    },

    currentScaleType(state) {
      return state.route.params.scaleType
    },
  },

  mutations: {
    setLanguage(state, language) {
      Vue.localStorage.set('language', language)
      state.language = language
    },

    setKeyboard(state, keyboard) {
      if (keyboard in keyboards) {
        state.keyboard = keyboard
        Vue.localStorage.set('keyboard', keyboard)
      }
    },
  }
})

{'fraction_non_alphanumeric': 0.15549111997100398, 'fraction_numerical': 0.005074302283436027, 'mean_word_length': 3.2526964560862868, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '722872', 'n_tokens_mistral': 932, 'n_tokens_neox': 917, 'n_words': 177}