<commit_before><commit_msg>reminified code<commit_after>(function(d){d.fn.toggles=function(k){var k=k||{},b={dragable:!0,clickable:!0,ontext:"ON",offtext:"OFF",on:!0,animtime:300,click:this},h;for(h in k)b[h]=k[h];this.each(function(){var c=d(this);b.click=k.click||c;var a=c.height(),e=c.width();if(0===a||0===e)c.height(a=20),c.width(e=50);var i=d('<div class="slide" />'),j=d('<div class="inner" />'),h=d('<div class="on" />'),l=d('<div class="off" />'),g=d('<div class="blob" />');h.css({height:a,width:e-a/2,textAlign:"center",textIndent:-a/2,lineHeight:a+
"px"}).text(b.ontext);l.css({height:a,width:e-a/2,marginLeft:-a/2,textAlign:"center",textIndent:a/2,lineHeight:a+"px"}).text(b.offtext);g.css({height:a,width:a,marginLeft:-a/2});j.css({width:2*e-a,marginLeft:b.on?0:-e+a});b.on&&(i.addClass("active"),b.checkbox&&d(b.checkbox).attr("checked",!0));c.html("");c.append(i.append(j.append(h,g,l)));var f=0,m;c.on("toggle",function(){var c=e,f=a,g=i.find(".inner");i.toggleClass("active");if(i.hasClass("active")){g.animate({marginLeft:0},b.animtime);b.checkbox&&
d(b.checkbox).attr("checked",true)}else{g.animate({marginLeft:-c+f},b.animtime);b.checkbox&&d(b.checkbox).attr("checked",false)}});b.clickable&&b.click.click(function(a){(a.target!=g[0]||!b.dragable)&&c.trigger("toggle")});if(b.dragable)g.on("mousedown",function(d){g.off("mouseup mouseleave");m=+new Date;var h=d.pageX;c.on("mousemove",g,function(b){f=b.pageX-h;i.hasClass("active")?j.css({marginLeft:f<0?f<-e+a?-e+a:f:0}):j.css({marginLeft:f>0?f-e+a:-e+a})});g.on("mouseup mouseleave",function(d){c.off("mousemove");
i.hasClass("active")?f<(-e+a)/2?c.trigger("toggle"):j.animate({marginLeft:0},b.animtime/2):f>(e-a)/2?c.trigger("toggle"):j.animate({marginLeft:-e+a},b.animtime/2);(+new Date-100<m||f===0)&&(b.clickable&&d.type!="mouseleave")&&c.trigger("toggle")})})})}})(jQuery);
{'fraction_non_alphanumeric': 0.31911447084233263, 'fraction_numerical': 0.019438444924406047, 'mean_word_length': 13.364341085271318, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 10, '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': '5482281', 'n_tokens_mistral': 825, 'n_tokens_neox': 812, 'n_words': 28}