<commit_before><template>
    <div class="kiwi-statebrowser">
        <div
            v-if="bufferForPopup"
            class="kiwi-statebrowser-channel-popup"
            v-bind:style="{
                top: popup_top + 'px'
            }"
            @click.stop=""
        >
            <buffer-settings v-bind:buffer="bufferForPopup"></buffer-settings>
        </div>

        <div class="kiwi-statebrowser-scrollarea">
            <div class="kiwi-statebrowser-networks">
                <div class="kiwi-statebrowser-network" v-for="network in networks">
                    <a class="kiwi-statebrowser-network-name u-link" @click="setActiveBuffer(network.serverBuffer())">{{network.name}}</a>

                        <transition name="kiwi-statebrowser-network-status-transition">
                        <div v-if="network.state !== 'connected'" class="kiwi-statebrowser-network-status">
                            <template v-if="network.state === 'disconnected'">
                                Not connected.
                                <a @click="network.ircClient.connect()" class="u-link">Connect</a>
                            </template>
                            <template v-else-if="network.state === 'connecting'">
                                Connecting...
                            </template>
                        </div>
                        </transition>

                    <div class="kiwi-statebrowser-channels">
                        <div
                            v-for="buffer in orderedBuffers(network.buffers)"
                            class="kiwi-statebrowser-channel"
                            v-bind:class="{
                                'kiwi-statebrowser-channel-active': isActiveBuffer(buffer),
                                'kiwi-statebrowser-channel-notjoined': buffer.isChannel() && !buffer.joined
                            }"
                        >
                            <div class="kiwi-statebrowser-channel-name u-link" @click="setActiveBuffer(buffer)">{{buffer.name}}</div>
                            <div class="kiwi-statebrowser-channel-labels">
                                <transition name="kiwi-statebrowser-channel-label-transition">
                                <div v-if="buffer.flags.unread" class="kiwi-statebrowser-channel-label">
                                    {{buffer.flags.unread}}
                                </div>
                                </transition>
                            </div>

                            <div
                                class="kiwi-statebrowser-channel-settings"
                                @click.stop="showBufferPopup(buffer, $event.clientY)"
                            >
                                <i class="fa fa-cog" aria-hidden="true"></i>
                            </div>
                        </div>
                    </div>

                    <form
                        v-if="network.state === 'connected' && network.connection.server !== ''"
                        @submit.prevent="submitNewChannelForm"
                        class="kiwi-statebrowser-newchannel"
                    >
                        <div class="kiwi-statebrowser-newchannel-inputwrap">
                            <input type="text" placeholder="Join new #channel" v-model="new_channel_input" /> <i @click="submitNewChannelForm" class="fa fa-plus" aria-hidden="true"></i>
                        </div>
                    </form>
                </div><commit_msg>Redundant check when showing new channel box<commit_after><template>
    <div class="kiwi-statebrowser">
        <div
            v-if="bufferForPopup"
            class="kiwi-statebrowser-channel-popup"
            v-bind:style="{
                top: popup_top + 'px'
            }"
            @click.stop=""
        >
            <buffer-settings v-bind:buffer="bufferForPopup"></buffer-settings>
        </div>

        <div class="kiwi-statebrowser-scrollarea">
            <div class="kiwi-statebrowser-networks">
                <div class="kiwi-statebrowser-network" v-for="network in networks">
                    <a class="kiwi-statebrowser-network-name u-link" @click="setActiveBuffer(network.serverBuffer())">{{network.name}}</a>

                        <transition name="kiwi-statebrowser-network-status-transition">
                        <div v-if="network.state !== 'connected'" class="kiwi-statebrowser-network-status">
                            <template v-if="network.state === 'disconnected'">
                                Not connected.
                                <a @click="network.ircClient.connect()" class="u-link">Connect</a>
                            </template>
                            <template v-else-if="network.state === 'connecting'">
                                Connecting...
                            </template>
                        </div>
                        </transition>

                    <div class="kiwi-statebrowser-channels">
                        <div
                            v-for="buffer in orderedBuffers(network.buffers)"
                            class="kiwi-statebrowser-channel"
                            v-bind:class="{
                                'kiwi-statebrowser-channel-active': isActiveBuffer(buffer),
                                'kiwi-statebrowser-channel-notjoined': buffer.isChannel() && !buffer.joined
                            }"
                        >
                            <div class="kiwi-statebrowser-channel-name u-link" @click="setActiveBuffer(buffer)">{{buffer.name}}</div>
                            <div class="kiwi-statebrowser-channel-labels">
                                <transition name="kiwi-statebrowser-channel-label-transition">
                                <div v-if="buffer.flags.unread" class="kiwi-statebrowser-channel-label">
                                    {{buffer.flags.unread}}
                                </div>
                                </transition>
                            </div>

                            <div
                                class="kiwi-statebrowser-channel-settings"
                                @click.stop="showBufferPopup(buffer, $event.clientY)"
                            >
                                <i class="fa fa-cog" aria-hidden="true"></i>
                            </div>
                        </div>
                    </div>

                    <form
                        v-if="network.state === 'connected'"
                        @submit.prevent="submitNewChannelForm"
                        class="kiwi-statebrowser-newchannel"
                    >
                        <div class="kiwi-statebrowser-newchannel-inputwrap">
                            <input type="text" placeholder="Join new #channel" v-model="new_channel_input" /> <i @click="submitNewChannelForm" class="fa fa-plus" aria-hidden="true"></i>
                        </div>
                    </form>
                </div>
{'fraction_non_alphanumeric': 0.11964966803220795, 'fraction_numerical': 0.0, 'mean_word_length': 1.1242124212421243, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '795665', 'n_tokens_mistral': 1699, 'n_tokens_neox': 1602, 'n_words': 224}