<commit_before>module ImprovedInitiative {
    export class StatBlockLibrary {
        constructor() {
            Store.List(Store.SavedEncounters).forEach(e => this.SavedEncounterIndex.push(e));
            
            Store.List(Store.PlayerCharacters).forEach(id => {
                var statBlock = { ...StatBlock.Default(), ...Store.Load<StatBlock>(Store.PlayerCharacters, id) };
                this.PCStatBlocks.push(new StatBlockListing(id, statBlock.Name, statBlock.Type, null, "localStorage", statBlock));
            });

            if (this.PCStatBlocks().length == 0) {
                this.AddSamplePlayersFromUrl('/sample_players.json');
            }

            Store.List(Store.StatBlocks).forEach(id => {
                var statBlock = { ...StatBlock.Default(), ...Store.Load<StatBlock>(Store.StatBlocks, id) };
                this.NPCStatBlocks.push(new StatBlockListing(id, statBlock.Name, statBlock.Type, null, "localStorage", statBlock));
            })

            const appInsights = window["appInsights"];
            appInsights.trackEvent("SavedEncounters", { Count: this.SavedEncounterIndex().length });
            appInsights.trackEvent("CustomCreatures", { Count: this.PCStatBlocks().length });
            appInsights.trackEvent("CustomPlayerCharacters", { Count: this.NPCStatBlocks().length});
        }

        NPCStatBlocks = ko.observableArray<StatBlockListing>([]);
        PCStatBlocks = ko.observableArray<StatBlockListing>([]);<commit_msg>Switch statblock tracking events I'm an idiot.<commit_after>module ImprovedInitiative {
    export class StatBlockLibrary {
        constructor() {
            Store.List(Store.SavedEncounters).forEach(e => this.SavedEncounterIndex.push(e));
            
            Store.List(Store.PlayerCharacters).forEach(id => {
                var statBlock = { ...StatBlock.Default(), ...Store.Load<StatBlock>(Store.PlayerCharacters, id) };
                this.PCStatBlocks.push(new StatBlockListing(id, statBlock.Name, statBlock.Type, null, "localStorage", statBlock));
            });

            if (this.PCStatBlocks().length == 0) {
                this.AddSamplePlayersFromUrl('/sample_players.json');
            }

            Store.List(Store.StatBlocks).forEach(id => {
                var statBlock = { ...StatBlock.Default(), ...Store.Load<StatBlock>(Store.StatBlocks, id) };
                this.NPCStatBlocks.push(new StatBlockListing(id, statBlock.Name, statBlock.Type, null, "localStorage", statBlock));
            })

            const appInsights = window["appInsights"];
            appInsights.trackEvent("SavedEncounters", { Count: this.SavedEncounterIndex().length });
            appInsights.trackEvent("CustomPlayerCharacters", { Count: this.PCStatBlocks().length });
            appInsights.trackEvent("CustomCreatures", { Count: this.NPCStatBlocks().length});
        }

        NPCStatBlocks = ko.observableArray<StatBlockListing>([]);
        PCStatBlocks = ko.observableArray<StatBlockListing>([]);
{'fraction_non_alphanumeric': 0.13625789298770355, 'fraction_numerical': 0.0006646726487205051, 'mean_word_length': 2.7344913151364763, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '3595540', 'n_tokens_mistral': 828, 'n_tokens_neox': 808, 'n_words': 113}