(function () {
  'use strict';

  function initialize() {
    const message = document.querySelector('.errors-resetpsw');

    if (!message) {
      return;
    }

    window.setTimeout(function () {
      message.classList.add('fadeout');

      window.setTimeout(function () {
        message.remove();
      }, 3500);
    }, 6000);
  }

  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', initialize);
  } else {
    initialize();
  }
}());
