<commit_before><template>
    <div role="progressbar"
         :class="progressBarClasses"
         :style="progressBarStyles"
         :aria-valuenow="value"
         :aria-valuemin="0"
         :aria-valuemax="computedMax"
    >
        <slot>
            <span v-if="label" v-html="label"></span>
            <template v-else-if="computedShowProgress">{{ progress.toFixed(this.computedPrecision) }}%</template>
            <template v-else-if="computedShowValue">{{ value.toFixed(this.computedPrecision) }}</template>
        </slot>
    </div>
</template>

<script>
    export default {
        computed: {
            progressBarClasses() {
                return [
                    'progress-bar',
                    this.computedVariant ? `bg-${this.computedVariant}` : '',
                    (this.computedStriped || this.computedAnimated) ? 'progress-bar-striped' : '',
                    this.computedAnimated ? 'progress-bar-animated' : ''
                ];
            },
            progressBarStyles() {
                return {
                    width: this.progress + '%',
                    height: this.computedHeight,
                    lineHeight: this.computedHeight
                };
            },
            progress() {
                const p = Math.pow(10, this.computedPrecision);
                return Math.round((100 * p * this.value) / this.computedMax) / p;
            },
            computedMax() {
                // Prefer our max over parent setting
                return typeof this.max === 'number' ? this.max : (this.$parent.max || 100);
            },
            computedHeight() {
                // Prefer parent height over our height
                return this.$parent.height || this.height || '1rem';
            },
            computedVariant() {
                // Prefer our variant over parent setting
                return this.variant || this.$parent.variant;
            },
            computedPrecision() {
                // Prefer our precision over parent setting<commit_msg>fix(progress-bar): Minor adjutment to style calculation<commit_after><template>
    <div role="progressbar"
         :class="progressBarClasses"
         :style="progressBarStyles"
         :aria-valuenow="value.toFixed(this.computedPrecision)"
         :aria-valuemin="0"
         :aria-valuemax="computedMax"
    >
        <slot>
            <span v-if="label" v-html="label"></span>
            <template v-else-if="computedShowProgress">{{ progress.toFixed(this.computedPrecision) }}%</template>
            <template v-else-if="computedShowValue">{{ value.toFixed(this.computedPrecision) }}</template>
        </slot>
    </div>
</template>

<script>
    export default {
        computed: {
            progressBarClasses() {
                return [
                    'progress-bar',
                    this.computedVariant ? `bg-${this.computedVariant}` : '',
                    (this.computedStriped || this.computedAnimated) ? 'progress-bar-striped' : '',
                    this.computedAnimated ? 'progress-bar-animated' : ''
                ];
            },
            progressBarStyles() {
                return {
                    width: (this.value / this.computedMax) + '%',
                    height: this.computedHeight,
                    lineHeight: this.computedHeight
                };
            },
            progress() {
                const p = Math.pow(10, this.computedPrecision);
                return Math.round((100 * p * this.value) / this.computedMax) / p;
            },
            computedMax() {
                // Prefer our max over parent setting
                return typeof this.max === 'number' ? this.max : (this.$parent.max || 100);
            },
            computedHeight() {
                // Prefer parent height over our height
                return this.$parent.height || this.height || '1rem';
            },
            computedVariant() {
                // Prefer our variant over parent setting
                return this.variant || this.$parent.variant;
            },
            computedPrecision() {
                // Prefer our precision over parent setting
{'fraction_non_alphanumeric': 0.12356870229007634, 'fraction_numerical': 0.004770992366412214, 'mean_word_length': 1.509275882704967, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '4988055', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1070, 'n_words': 201}