<commit_before><template>
    <div id="app">
        <v-header></v-header>
        <div class="main-container">
            <div class="text-center" v-if="keywords">
                <div id="seg" class="btn-group btn-group-lg" role="group">
                    <router-link :to="{path:'/block/'+keywords}" class="btn btn-default">{{$t('header.block')}}
                    </router-link>
                    <router-link :to="{path:'/transaction/'+keywords}" class="btn btn-default">
                        {{$t('header.transaction')}}
                    </router-link>
                    <router-link :to="{path:'/account/'+keywords}" class="btn btn-default">{{$t('header.account')}}
                    </router-link>
                    <router-link :to="{path:'/asset/'+keywords}" class="btn btn-default">{{$t('header.asset')}}
                    </router-link>
                </div>
            </div>
            <router-view></router-view>
        </div>
        <modal-api></modal-api>
        <modal-about></modal-about>
        <v-footer></v-footer>
    </div>
</template>

<script>
    import 'bootstrap';
    import 'bootstrap/dist/css/bootstrap.css';
    import './global.css';
    import modalApi from './components/modals/modal-api.vue';
    import modalAbout from './components/modals/modal-about.vue';
    import header from './components/partial/Header.vue';
    import footer from './components/partial/Footer.vue';
    import { mapGetters, mapActions } from 'vuex';

    export default {
        name: 'app',
        computed: {
            ...mapGetters({
                keywords: 'keywords'
            })
        },
        watch: {
            keywords () {
                this.keywordsChanged();
            }
        },
        created () {
            this.$http.get('//static.gxb.io/gxs/symbols/maps.json').then(resp => {
                this.setSymbolsMap({symbolsMap: resp.body || {}});
            }).catch(ex => { console.error(ex) });
        },
        methods: {
            ...mapActions({
                setSymbolsMap: 'setSymbolsMap'
            }),
            keywordsChanged () {
                if (!this.keywords) {
                    if (this.$route.name !== 'Holdrank') {
                        this.$router.push('/');
                    }
                } else if (/^\d+$/.test(this.keywords)) { // block
                    this.$router.push(`/block/${this.keywords}`);
                } else if (this.keywords.length === 40) { // transaction
                    this.$router.push(`/transaction/${this.keywords}`);
                } else if (/^1.3.\d+$/.test(this.keywords) || (this.keywords.charCodeAt(0) <= 'Z'.charCodeAt(0) && this.keywords.charCodeAt(0) >= 'A'.charCodeAt(0))) { // account
                    this.$router.push(`/asset/${this.keywords}`);
                } else { // account
                    this.$router.push(`/account/${this.keywords}`);
                }
            }
        },
        components: {
            vHeader: header,
            vFooter: footer,
            modalApi,
            modalAbout
        }
    };
</script><commit_msg>chore: get lastest maps.json<commit_after><template>
    <div id="app">
        <v-header></v-header>
        <div class="main-container">
            <div class="text-center" v-if="keywords">
                <div id="seg" class="btn-group btn-group-lg" role="group">
                    <router-link :to="{path:'/block/'+keywords}" class="btn btn-default">{{$t('header.block')}}
                    </router-link>
                    <router-link :to="{path:'/transaction/'+keywords}" class="btn btn-default">
                        {{$t('header.transaction')}}
                    </router-link>
                    <router-link :to="{path:'/account/'+keywords}" class="btn btn-default">{{$t('header.account')}}
                    </router-link>
                    <router-link :to="{path:'/asset/'+keywords}" class="btn btn-default">{{$t('header.asset')}}
                    </router-link>
                </div>
            </div>
            <router-view></router-view>
        </div>
        <modal-api></modal-api>
        <modal-about></modal-about>
        <v-footer></v-footer>
    </div>
</template>

<script>
    import 'bootstrap';
    import 'bootstrap/dist/css/bootstrap.css';
    import './global.css';
    import modalApi from './components/modals/modal-api.vue';
    import modalAbout from './components/modals/modal-about.vue';
    import header from './components/partial/Header.vue';
    import footer from './components/partial/Footer.vue';
    import { mapGetters, mapActions } from 'vuex';

    export default {
        name: 'app',
        computed: {
            ...mapGetters({
                keywords: 'keywords'
            })
        },
        watch: {
            keywords () {
                this.keywordsChanged();
            }
        },
        created () {
            this.$http.get('//static.gxb.io/gxs/symbols/maps.json?v=' + new Date().getTime()).then(resp => {
                this.setSymbolsMap({symbolsMap: resp.body || {}});
            }).catch(ex => { console.error(ex) });
        },
        methods: {
            ...mapActions({
                setSymbolsMap: 'setSymbolsMap'
            }),
            keywordsChanged () {
                if (!this.keywords) {
                    if (this.$route.name !== 'Holdrank') {
                        this.$router.push('/');
                    }
                } else if (/^\d+$/.test(this.keywords)) { // block
                    this.$router.push(`/block/${this.keywords}`);
                } else if (this.keywords.length === 40) { // transaction
                    this.$router.push(`/transaction/${this.keywords}`);
                } else if (/^1.3.\d+$/.test(this.keywords) || (this.keywords.charCodeAt(0) <= 'Z'.charCodeAt(0) && this.keywords.charCodeAt(0) >= 'A'.charCodeAt(0))) { // account
                    this.$router.push(`/asset/${this.keywords}`);
                } else { // account
                    this.$router.push(`/account/${this.keywords}`);
                }
            }
        },
        components: {
            vHeader: header,
            vFooter: footer,
            modalApi,
            modalAbout
        }
    };
</script>
{'fraction_non_alphanumeric': 0.17717097952055882, 'fraction_numerical': 0.0025400857278933165, 'mean_word_length': 1.5069637883008355, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 69, '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': '3247433', 'n_tokens_mistral': 1827, 'n_tokens_neox': 1726, 'n_words': 266}