<commit_before>import $ from 'jquery';
// import log from './log';

window.$ = window.jQuery = $;

// Helper
function scrollTo(elem) {
  $('html, body').animate({
    scrollTop: $(elem).offset().top
  }, 400);
}

// Landing full page slide
if ($(window).height() > $('.landing').height() + 109) {
  $('.landing').css('height', $(window).height());
}

// Landing down button
$('.landing .down').click(() => {
  scrollTo('.benefit');
});

// Pricing Select
$('.pricing button').click((e) => {
  const acc = $(e.currentTarget).data('account');
  $('form .accounts button').removeClass('active');
  $(`.reserve .accounts button.${acc}`).addClass('active');
  scrollTo('.reserve');
});

// Signup
const thanksMessage = '<h3>Thank you, we\'ll get back to you soon!</h3>';
const errorMessage = '<h3>Woops, something went wrong, please contact us via: <EMAIL></h3>';

function validateEmail(email) {
  const re = new RegExp(
    /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))/.source
    + /@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.source);
  return re.test(email);
}
function validate(elem) {
  function shake() {
    elem.addClass('shake');
    setTimeout(() => {
      elem.removeClass('shake');
    }, 300);
  }
  if (!elem.val()) {
    shake();
    return false;
  } else if (elem.data('type') === 'email' && !validateEmail(elem.val())) {
    shake();
    return false;
  }
  return true;
}

function feedback(template) {
  $('section.reserve form').remove();
  $('section.reserve').append(template);
}

$('form .accounts button').click((e) => {<commit_msg>signup form feedback dom level fix<commit_after>import $ from 'jquery';
// import log from './log';

window.$ = window.jQuery = $;

// Helper
function scrollTo(elem) {
  $('html, body').animate({
    scrollTop: $(elem).offset().top
  }, 400);
}

// Landing full page slide
if ($(window).height() > $('.landing').height() + 109) {
  $('.landing').css('height', $(window).height());
}

// Landing down button
$('.landing .down').click(() => {
  scrollTo('.benefit');
});

// Pricing Select
$('.pricing button').click((e) => {
  const acc = $(e.currentTarget).data('account');
  $('form .accounts button').removeClass('active');
  $(`.reserve .accounts button.${acc}`).addClass('active');
  scrollTo('.reserve');
});

// Signup
const thanksMessage = '<h3>Thank you, we\'ll get back to you soon!</h3>';
const errorMessage = '<h3>Woops, something went wrong, please contact us via: <EMAIL></h3>';

function validateEmail(email) {
  const re = new RegExp(
    /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))/.source
    + /@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.source);
  return re.test(email);
}
function validate(elem) {
  function shake() {
    elem.addClass('shake');
    setTimeout(() => {
      elem.removeClass('shake');
    }, 300);
  }
  if (!elem.val()) {
    shake();
    return false;
  } else if (elem.data('type') === 'email' && !validateEmail(elem.val())) {
    shake();
    return false;
  }
  return true;
}

function feedback(template) {
  const html = `<div class="row">
  <div class="col-lg-10 col-lg-offset-1 col-md-8 col-md-offset-2">
    ${template}
  </div>
  </div>`;
  $('section.reserve form').remove();
  $('section.reserve .container').append(html);
}

$('form .accounts button').click((e) => {
{'fraction_non_alphanumeric': 0.27665198237885463, 'fraction_numerical': 0.02026431718061674, 'mean_word_length': 3.6593707250342, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 31, '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': '6223381', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1241, 'n_words': 238}