<commit_before><template>
    <div id="dungeons_and_dragons__character_sheet" class="pseudo-body">
        <app-navigation></app-navigation>

        <router-view :user="character"></router-view>

        <app-footer></app-footer>
    </div>
</template>

<script>
    import Vue from "vue"
    import Navigation from "./Navigation.vue"
    import Footer from "./Footer.vue"

    require("promise-polyfill")
    require("fetch-ie8")

    Vue.component("app-navigation", Navigation)
    Vue.component("app-footer", Footer)

    export default {
        name: "app",
        mounted() {
            this.fetch_user_data()
        },
        data() {
            return {
                character: [],
                loading: true
            }
        },
        methods: {
            fetch_user_data() {
                fetch(`./data/character_sheet__player_name.json`)
                    .then(response => response.json())
                    .then(data => {
                        this.character = data[0]

                        this.loading = false
                    })
            }
        },
        created() {
            // Filters
            Vue.filter("number", entry => entry.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","))
            Vue.filter("sign", number => number >= 0 ? `+${number}` : `${number}`)
            Vue.filter("modifier", saving_throw => this.user.saving_throw_modifiers[saving_throw])

            // Directives
            Vue.directive("focus", {
                inserted: el => el.focus()<commit_msg>Update name of global data ref from user to character<commit_after><template>
    <div id="dungeons_and_dragons__character_sheet" class="pseudo-body">
        <app-navigation></app-navigation>

        <router-view :user="character"></router-view>

        <app-footer></app-footer>
    </div>
</template>

<script>
    import Vue from "vue"
    import Navigation from "./Navigation.vue"
    import Footer from "./Footer.vue"

    require("promise-polyfill")
    require("fetch-ie8")

    Vue.component("app-navigation", Navigation)
    Vue.component("app-footer", Footer)

    export default {
        name: "app",
        mounted() {
            this.fetch_user_data()
        },
        data() {
            return {
                character: [],
                loading: true
            }
        },
        methods: {
            fetch_user_data() {
                fetch(`./data/character_sheet__player_name.json`)
                    .then(response => response.json())
                    .then(data => {
                        this.character = data[0]

                        this.loading = false
                    })
            }
        },
        created() {
            // Filters
            Vue.filter("number", entry => entry.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","))
            Vue.filter("sign", number => number >= 0 ? `+${number}` : `${number}`)
            Vue.filter("modifier", saving_throw => this.character.saving_throw_modifiers[saving_throw])

            // Directives
            Vue.directive("focus", {
                inserted: el => el.focus()
{'fraction_non_alphanumeric': 0.14982467325470195, 'fraction_numerical': 0.002550207204335352, 'mean_word_length': 1.6369747899159663, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 39, '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': '6932528', 'n_tokens_mistral': 896, 'n_tokens_neox': 853, 'n_words': 146}