<commit_before>function setLiteMode() {
   if (jQuery.browser.mobile) {
      tierOptions.liteMode = true;
   } else {
      tierOptions.liteMode = true;
   };
};
var environment;
var printOuts;
var tierOptions;
$(document).ready(function() {
   $.fn.exists = function () {
      return this.length !== 0;
   };

   environment = new Environment(0, 6);
   printOuts = {};
   tierOptions = {
      tiers: {
         'uber' : false,
         'ou' : true,
         'uu' : true,
         'ru' : false,
         'nu' : false,
         'lc' : false,
         'vgc' : false,
      },
      tier : TIER_TO_NUMBER['ou'],
      boostedSweepers : false,
      enablePriority : false,
      outSpeed : 0,
      wmt : false,
      liteMode : false,
   };
   setLiteMode();
   // check for importing from URL.
   importFromUrl(environment, tierOptions);

   // initiate sliders
   $(".cHPSlider").slider({
      value:0,
      min: 0,
      max: 0,
      step: 1,
      slide: function( event, ui ) {
         var pokemonData = $(this).closest('.pokemon');
         var pokemon = getPokemonObject(pokemonData);
         pokemon.changeCurrentHP(ui.value);
         updateStaticData();
         updateUpdateTableButton(true);
         saveData();
      }
   });

   // initialise tooltip
   $('#bSweepersTooltip').tooltip({
      placement: 'top',
      title: 'This assumes Pokemon with boosting moves use them once',
   });
   $('#priorityTooltip').tooltip({
      placement: 'top',
      title: 'Attackers use a priority move if they are slower than the defending pokemon',
   });
   $('#outspeedTooltip').tooltip({
      placement: 'top',
      title: 'This filters out Pokemon that do not outspeed at least this many Pokemon on your team',
   });
   $('.cHPTooltip').tooltip({
      placement: 'top',
      title: 'Current HP',
   });

   initialiseAutocomplete();

   generateSweeperPokemon();
   updateStaticData();
   updateForm(true);
   // trigger a change to start off
   $(".input-tier").trigger('change');
   updateTable();
   saveData();

   
   // on show results button click
   $(".breakMyTeam").on('click', function() {
      tierOptions.wmt = false;
      if ($('#topleftimage').html() !== '<img src="../css/images/brmt-tl.png">') {
         $('#topleftimage').html('<img src="../css/images/brmt-tl.png">');
      };
      $('#topleftimage').css("background-color", COLOR_RED);
      updateTable();
   });

   // on show results button click
   $(".wallMyTeam").on('click', function() {
      tierOptions.wmt = true;
      if ($('#topleftimage').html() !== '<img src="../css/images/wmt-tl.png">') {
         $('#topleftimage').html('<img src="../css/images/wmt-tl.png">');
      };
      $('#topleftimage').css("background-color", COLOR_GREEN);
      updateTable();
   });

   // on change in environment input
   $(".input-enviro").on('click change keyup keydown mouseup', function() {
      updateEnvironment(true, $(this));
      updateStaticData();
      updateUpdateTableButton(true);
      saveData();
   });

   // on change in tier selection input
   $(".input-tier").on('change', function() {
      var tier = parseInt($('input[name="tier"]:checked').val());
      tierOptions.tier = tier;
      if (tierOptions.tier <= 5) {
         // We have a standard tier
         // "Check" everything underneath the tier
         for (var i = 0; i <= tierOptions.tier; i++) {
            $('#tier-' + i).addClass('checked');
         };
         for (var i = tierOptions.tier + 1; i < NUM_TIERS; i++) {
            $('#tier-' + i).removeClass('checked');
         };
      } else {
         // We have a non-standard tier
         for (var i = 0; i < NUM_TIERS; i++) {
            if (i !== tierOptions.tier) {
               $('#tier-' + i).removeClass('checked');
            } else {
               $('#tier-' + i).addClass('checked');
            }
         };
      }
      if (tierOptions.tier === TIER_TO_NUMBER['vgc']) {
         // make doubles and set to level 50.
         $('#doubles').prop('checked', true);
         // set levels to 50
         $('#l50').prop('checked', true);
      } else if (tierOptions.tier === TIER_TO_NUMBER['lc']) {
         // set levels to 5
         $('#l5').prop('checked', true);
         $('#doubles').prop('checked', false);
      } else {
         // set levels to 100
         $('#l100').prop('checked', true);
         // turn off doubles
         $('#doubles').prop('checked', false);
      };
      tierOptions.boostedSweepers = $('#boostedSweeper').prop('checked');
      tierOptions.enablePriority = $('#enablePriority').prop('checked');
      if ($(this).hasClass('outspeed')) {
         // we have an outspeed change.
         var number = parseInt($(this).attr('id').split('-')[1]);
         if (number != tierOptions.outSpeed) {<commit_msg>implemented litemode button<commit_after>var environment;
var printOuts;
var tierOptions;
$(document).ready(function() {
   $.fn.exists = function () {
      return this.length !== 0;
   };

   environment = new Environment(0, 6);
   printOuts = {};
   tierOptions = {
      tiers: {
         'uber' : false,
         'ou' : true,
         'uu' : true,
         'ru' : false,
         'nu' : false,
         'lc' : false,
         'vgc' : false,
      },
      tier : TIER_TO_NUMBER['ou'],
      boostedSweepers : false,
      enablePriority : false,
      outSpeed : 0,
      wmt : false,
      liteMode : true,
   };
   // check for importing from URL.
   importFromUrl(environment, tierOptions);

   // initiate sliders
   $(".cHPSlider").slider({
      value:0,
      min: 0,
      max: 0,
      step: 1,
      slide: function( event, ui ) {
         var pokemonData = $(this).closest('.pokemon');
         var pokemon = getPokemonObject(pokemonData);
         pokemon.changeCurrentHP(ui.value);
         updateStaticData();
         updateUpdateTableButton(true);
         saveData();
      }
   });

   // initialise tooltip
   $('#bSweepersTooltip').tooltip({
      placement: 'top',
      title: 'This assumes Pokemon with boosting moves use them once',
   });
   $('#priorityTooltip').tooltip({
      placement: 'top',
      title: 'Attackers use a priority move if they are slower than the defending pokemon',
   });
   $('#outspeedTooltip').tooltip({
      placement: 'top',
      title: 'This filters out Pokemon that do not outspeed at least this many Pokemon on your team',
   });
   $('.cHPTooltip').tooltip({
      placement: 'top',
      title: 'Current HP',
   });

   initialiseAutocomplete();

   generateSweeperPokemon();
   updateStaticData();
   updateForm(true);
   // trigger a change to start off
   $(".input-tier").trigger('change');
   updateTable();
   saveData();

   
   // on show results button click
   $(".breakMyTeam").on('click', function() {
      tierOptions.wmt = false;
      if ($('#topleftimage').html() !== '<img src="../css/images/brmt-tl.png">') {
         $('#topleftimage').html('<img src="../css/images/brmt-tl.png">');
      };
      $('#topleftimage').css("background-color", COLOR_RED);
      updateTable();
   });

   // on show results button click
   $(".wallMyTeam").on('click', function() {
      tierOptions.wmt = true;
      if ($('#topleftimage').html() !== '<img src="../css/images/wmt-tl.png">') {
         $('#topleftimage').html('<img src="../css/images/wmt-tl.png">');
      };
      $('#topleftimage').css("background-color", COLOR_GREEN);
      updateTable();
   });

   // on change in environment input
   $(".input-enviro").on('click change keyup keydown mouseup', function() {
      updateEnvironment(true, $(this));
      updateStaticData();
      updateUpdateTableButton(true);
      saveData();
   });

   // on change in tier selection input
   $(".input-tier").on('change', function() {
      var tier = parseInt($('input[name="tier"]:checked').val());
      tierOptions.tier = tier;
      if (tierOptions.tier <= 5) {
         // We have a standard tier
         // "Check" everything underneath the tier
         for (var i = 0; i <= tierOptions.tier; i++) {
            $('#tier-' + i).addClass('checked');
         };
         for (var i = tierOptions.tier + 1; i < NUM_TIERS; i++) {
            $('#tier-' + i).removeClass('checked');
         };
      } else {
         // We have a non-standard tier
         for (var i = 0; i < NUM_TIERS; i++) {
            if (i !== tierOptions.tier) {
               $('#tier-' + i).removeClass('checked');
            } else {
               $('#tier-' + i).addClass('checked');
            }
         };
      }
      if (tierOptions.tier === TIER_TO_NUMBER['vgc']) {
         // make doubles and set to level 50.
         $('#doubles').prop('checked', true);
         // set levels to 50
         $('#l50').prop('checked', true);
      } else if (tierOptions.tier === TIER_TO_NUMBER['lc']) {
         // set levels to 5
         $('#l5').prop('checked', true);
         $('#doubles').prop('checked', false);
      } else {
         // set levels to 100
         $('#l100').prop('checked', true);
         // turn off doubles
         $('#doubles').prop('checked', false);
      };
      tierOptions.boostedSweepers = $('#boostedSweeper').prop('checked');
      tierOptions.enablePriority = $('#enablePriority').prop('checked');
      tierOptions.liteMode = $('#topThreats').prop('checked');
      if ($(this).hasClass('outspeed')) {
         // we have an outspeed change.
         var number = parseInt($(this).attr('id').split('-')[1]);
         if (number != tierOptions.outSpeed) {
{'fraction_non_alphanumeric': 0.1795330248212032, 'fraction_numerical': 0.005679427850231384, 'mean_word_length': 2.2654532967032965, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 11, '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': '5174502', 'n_tokens_mistral': 2937, 'n_tokens_neox': 2855, 'n_words': 662}