<commit_before>(function($){$.fn.toggles=function(b){b=b||{};var a=$.extend({drag:!0,click:!0,text:{on:"ON",off:"OFF"},on:!0,animate:250,transition:"ease-in-out",checkbox:null,clicker:null,width:50,height:20,type:"compact"},b),h="select"==a.type;a.checkbox=$(a.checkbox);a.clicker&&(a.clicker=$(a.clicker));b="margin-left "+a.animate+"ms "+a.transition;var t={"-webkit-transition":b,"-moz-transition":b,transition:b},u={"-webkit-transition":"","-moz-transition":"",transition:""};return this.each(function(){var c=$(this),d=c.height(),
j=c.width();if(!d||!j)c.height(d=a.height),c.width(j=a.width);var g=$('<div class="toggle-slide">'),b=$('<div class="toggle-inner">'),n=$('<div class="toggle-on">'),q=$('<div class="toggle-off">'),e=$('<div class="toggle-blob">');a.on&&n.addClass("active");var k=d/2,p=j-k;n.css({height:d,width:p,textAlign:"center",textIndent:h?"":-k,lineHeight:d+"px"}).text(a.text.on);q.css({height:d,width:p,marginLeft:h?"":-k,textAlign:"center",textIndent:h?"":k,lineHeight:d+"px"}).text(a.text.off);e.css({height:d,
width:d,marginLeft:-k});b.css("width",2*j-d);h&&(c.css("width",2*p),e.hide());a.on&&(g.addClass("active"),a.checkbox.attr("checked",!0));c.html(g.html(b.append(n,e,q)));c.on("toggle",function(){var c=j,b=d,f=g.toggleClass("active").hasClass("active"),e=g.find(".inner").css(t);g.find(".toggle-off").toggleClass("active");g.find(".toggle-on").toggleClass("active");var h=f?0:-c+b;e.css("margin-left",h);a.checkbox.attr("checked",f);setTimeout(function(){e.css(u);e.css("margin-left",h)},a.animate)});if(a.click&&
(!a.clicker||!a.clicker.has(c).length))c.on("click",function(b){(b.target!=e[0]||!a.drag)&&c.trigger("toggle",!g.hasClass("active"))});if(a.clicker)a.clicker.on("click",function(b){(b.target!=e[0]||!a.drag)&&c.trigger("toggle",!g.hasClass("active"))});if(a.drag&&!h){var f,r=(j-d)/4,s=function(h){c.off("mousemove");g.off("mouseleave");e.off("mouseup");var m=g.hasClass("active");!f&&a.click&&"mouseleave"!==h.type?c.trigger("toggle",!m):m?f<-r?c.trigger("toggle",!m):b.animate({marginLeft:0},a.animate/
2):f>r?c.trigger("toggle",!m):b.animate({marginLeft:-j+d},a.animate/2)},l=-j+d;e.on("mousedown",function(a){f=0;e.off("mouseup");g.off("mouseleave");var d=a.pageX;c.on("mousemove",e,function(a){f=a.pageX-d;g.hasClass("active")?(a=f,0<f&&(a=0),f<l&&(a=l)):(a=f+l,0>f&&(a=l),f>-l&&(a=0));b.css("margin-left",a)});e.on("mouseup",s);g.on("mouseleave",s)})}})};})(jQuery);<commit_msg>reminify<commit_after>(function($){$.fn.toggles=function(b){b=b||{};var a=$.extend({drag:!0,click:!0,text:{on:"ON",off:"OFF"},on:!0,animate:250,transition:"ease-in-out",checkbox:null,clicker:null,width:50,height:20,type:"compact"},b),h="select"==a.type;a.checkbox=$(a.checkbox);a.clicker&&(a.clicker=$(a.clicker));b="margin-left "+a.animate+"ms "+a.transition;var u={"-webkit-transition":b,"-moz-transition":b,transition:b},v={"-webkit-transition":"","-moz-transition":"",transition:""};return this.each(function(){var g=$(this),d=g.height(),
j=g.width();if(!d||!j)g.height(d=a.height),g.width(j=a.width);var c=$('<div class="toggle-slide">'),b=$('<div class="toggle-inner">'),n=$('<div class="toggle-on">'),q=$('<div class="toggle-off">'),e=$('<div class="toggle-blob">');a.on&&n.addClass("active");var k=d/2,p=j-k;n.css({height:d,width:p,textAlign:"center",textIndent:h?"":-k,lineHeight:d+"px"}).text(a.text.on);q.css({height:d,width:p,marginLeft:h?"":-k,textAlign:"center",textIndent:h?"":k,lineHeight:d+"px"}).text(a.text.off);e.css({height:d,
width:d,marginLeft:-k});b.css("width",2*j-d);h&&(g.css("width",2*p),e.hide());a.on&&(c.addClass("active"),a.checkbox.attr("checked",!0));g.html(c.html(b.append(n,e,q)));c.on("toggle",function(b){g.trigger("toggle",b);b=j;var f=d,r=c.toggleClass("active").hasClass("active"),e=c.find(".inner").css(u);c.find(".toggle-off").toggleClass("active");c.find(".toggle-on").toggleClass("active");var h=r?0:-b+f;e.css("margin-left",h);a.checkbox.attr("checked",r);setTimeout(function(){e.css(v);e.css("margin-left",
h)},a.animate)});if(a.click&&(!a.clicker||!a.clicker.has(g).length))g.on("click",function(b){(b.target!=e[0]||!a.drag)&&c.trigger("toggle",!c.hasClass("active"))});if(a.clicker)a.clicker.on("click",function(b){(b.target!=e[0]||!a.drag)&&c.trigger("toggle",!c.hasClass("active"))});if(a.drag&&!h){var f,s=(j-d)/4,t=function(h){g.off("mousemove");c.off("mouseleave");e.off("mouseup");var m=c.hasClass("active");!f&&a.click&&"mouseleave"!==h.type?c.trigger("toggle",!m):m?f<-s?c.trigger("toggle",!m):b.animate({marginLeft:0},
a.animate/2):f>s?c.trigger("toggle",!m):b.animate({marginLeft:-j+d},a.animate/2)},l=-j+d;e.on("mousedown",function(a){f=0;e.off("mouseup");c.off("mouseleave");var d=a.pageX;g.on("mousemove",e,function(a){f=a.pageX-d;c.hasClass("active")?(a=f,0<f&&(a=0),f<l&&(a=l)):(a=f+l,0>f&&(a=l),f>-l&&(a=0));b.css("margin-left",a)});e.on("mouseup",t);c.on("mouseleave",t)})}})};})(jQuery);
{'fraction_non_alphanumeric': 0.34008179959100204, 'fraction_numerical': 0.01063394683026585, 'mean_word_length': 14.477848101265822, 'pattern_counts': {'":': 14, '<': 19, '<?xml version=': 0, '>': 19, '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': '863614', 'n_tokens_mistral': 2129, 'n_tokens_neox': 2084, 'n_words': 45}