<commit_before><template>
  <div :class="classObject" role="alert" v-show="show">
    <button type="button"
            class="close"
            data-dismiss="alert"
            aria-label="Close"
            v-if="dismissible"
            @click.stop.prevent="dismiss"
    >
      <span aria-hidden="true">&times;</span>
    </button>
    <slot></slot>
  </div>
</template>

<script>
  export default {
    replace: true,
    computed: {
      classObject() {
        return ['alert', this.alertState, this.dismissible ? 'alert-dismissible' : '', 'fade', 'in',]
      },
      alertState() {
        return !this.state || this.state === `default` ? `alert-success` : `alert-${this.state}`
      },
    },
    props: {
      show: {
        type: Boolean,
        default: false,
        required: true
      },
      state: {
        type: String,
        default: 'success'
      },
      dismissible: {
        type: Boolean,
        default: false
      },
    },
    methods: {
      dismiss: function dismiss() {
        // hide an alert
        this.show = false;
        // Emit an event from the current vm that propagates all the way up to its $root
        this.$root.$emit('dismissed::alert')
      },
    }
  }
</script>
<commit_msg>Update alert.vue<commit_after><template>
  <div :class="classObject" role="alert" v-show="localShow">
    <button type="button"
            class="close"
            data-dismiss="alert"
            aria-label="Close"
            v-if="dismissible"
            @click.stop.prevent="dismiss"
    >
      <span aria-hidden="true">&times;</span>
    </button>
    <slot></slot>
  </div>
</template>

<script>
  export default {
    replace: true,
    computed: {
      classObject() {
        return ['alert', this.alertState, this.dismissible ? 'alert-dismissible' : '', 'fade', 'in',]
      },
      alertState() {
        return !this.state || this.state === `default` ? `alert-success` : `alert-${this.state}`
      },
    },
    data() {
      return {
        localShow: this.show
      }
    },
    props: {
      show: {
         type: Boolean,
         default: false,
         required: true
      },
      state: {
        type: String,
        default: 'success'
      },
      dismissible: {
        type: Boolean,
        default: false
      },
    },
    methods: {
      dismiss: function dismiss() {
        // hide an alert
        this.localShow = false
        // Emit an event from the current vm that propagates all the way up to its $root
        this.$root.$emit('dismissed::alert')
      },
    }
  }
</script>

{'fraction_non_alphanumeric': 0.1522665633475397, 'fraction_numerical': 0.0, 'mean_word_length': 1.809575625680087, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '4078460', 'n_tokens_mistral': 784, 'n_tokens_neox': 773, 'n_words': 173}