vendor: 7,827 bytes, lines 1-9
1/*! 2 * iCheck v1.0.2, http://git.io/arlzeA 3 * =================================== 4 * Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization 5 * 6 * (c) 2013 Damir Sultanov, http://fronteed.com 7 * MIT Licensed 8 */ 9(function($){var _iCheck="iCheck",_iCheckHelper=_iCheck+"-helper",_checkbox="checkbox",_radio="radio",_checked="checked",_unchecked="un"+_checked,_disabled="disabled",_determinate="determinate",_indeterminate="in"+_determinate,_update="update",_type="type",_click="click",_touch="touchbegin.i touchend.i",_add="addClass",_remove="removeClass",_callback="trigger",_label="label",_cursor="cursor",_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);$.fn[_iCheck]=function(options,fire){var handle='input[type="'+_checkbox+'"], input[type="'+_radio+'"]',stack=$(),walker=function(object){object.each(function(){var self=$(this);if(self.is(handle)){stack=stack.add(self);}else{stack=stack.add(self.find(handle));}});};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(options)){options=options.toLowerCase();walker(this);return stack.each(function(){var self=$(this);if(options=="destroy"){tidy(self,"ifDestroyed");}else{operate(self,true,options);}if($.isFunction(fire)){fire();}});}else{if(typeof options=="object"||!options){var settings=$.extend({checkedClass:_checked,disabledClass:_disabled,indeterminateClass:_indeterminate,labelHover:true},options),selector=settings.handle,hoverClass=settings.hoverClass||"hover",focusClass=settings.focusClass||"focus",activeClass=settings.activeClass||"active",labelHover=!!settings.labelHover,labelHoverClass=settings.labelHoverClass||"hover",area=(""+settings.increaseArea).replace("%","")|0;if(selector==_checkbox||selector==_radio){handle='input[type="'+selector+'"]';}if(area<-50){area=-50;}walker(this);return stack.each(function(){var self=$(this);tidy(self);var node=this,id=node.id,offset=-area+"%",size=100+(area*2)+"%",layer={position:"absolute",top:offset,left:offset,display:"block",width:size,height:size,margin:0,padding:0,background:"#fff",border:0,opacity:0},hide=_mobile?{position:"absolute",visibility:"hidden"}:area?layer:{position:"absolute",opacity:0},className=node[_type]==_checkbox?settings.checkboxClass||"i"+_checkbox:settings.radioClass||"i"+_radio,label=$(_label+'[for="'+id+'"]').add(self.closest(_label)),aria=!!settings.aria,ariaID=_iCheck+"-"+Math.random().toString(36).substr(2,6),parent='<div class="'+className+'" '+(aria?'role="'+node[_type]+'" ':""),helper;if(aria){label.each(function(){parent+='aria-labelledby="';if(this.id){parent+=this.id;}else{this.id=ariaID;parent+=ariaID;}parent+='"';});}parent=self.wrap(parent+"/>")[_callback]("ifCreated").parent().append(settings.insert);helper=$('<ins class="'+_iCheckHelper+'"/>').css(layer).appendTo(parent);self.data(_iCheck,{o:settings,s:self.attr("style")}).css(hide);!!settings.inheritClass&&parent[_add](node.className||"");!!settings.inheritID&&id&&parent.attr("id",_iCheck+"-"+id);parent.css("position")=="static"&&parent.css("position","relative");operate(self,true,_update);if(label.length){label.on(_click+".i mouseover.i mouseout.i "+_touch,function(event){var type=event[_type],item=$(this);if(!node[_disabled]){if(type==_click){if($(event.target).is("a")){return;}operate(self,false,true);}else{if(labelHover){if(/ut|nd/.test(type)){parent[_remove](hoverClass);item[_remove](labelHoverClass);}else{parent[_add](hoverClass);item[_add](labelHoverClass);}}}if(_mobile){event.stopPropagation();}else{return false;}}});}self.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(event){var type=event[_type],key=event.keyCode;if(type==_click){return false;}else{if(type=="keydown"&&key==32){if(!(node[_type]==_radio&&node[_checked])){if(node[_checked]){off(self,_checked);}else{on(self,_checked);}}return false;}else{if(type=="keyup"&&node[_type]==_radio){!node[_checked]&&on(self,_checked);}else{if(/us|ur/.test(type)){parent[type=="blur"?_remove:_add](focusClass);}}}}});helper.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(event){var type=event[_type],toggle=/wn|up/.test(type)?activeClass:hoverClass;if(!node[_disabled]){if(type==_click){operate(self,false,true);}else{if(/wn|er|in/.test(type)){parent[_add](toggle);}else{parent[_remove](toggle+" "+activeClass);}if(label.length&&labelHover&&toggle==hoverClass){label[/ut|nd/.test(type)?_remove:_add](labelHoverClass);}}if(_mobile){event.stopPropagation();}else{return false;}}});});}else{return this;}}};function operate(input,direct,method){var node=input[0],state=/er/.test(method)?_indeterminate:/bl/.test(method)?_disabled:_checked,active=method==_update?{checked:node[_checked],disabled:node[_disabled],indeterminate:input.attr(_indeterminate)=="true"||input.attr(_determinate)=="false"}:node[state];if(/^(ch|di|in)/.test(method)&&!active){on(input,state);}else{if(/^(un|en|de)/.test(method)&&active){off(input,state);}else{if(method==_update){for(var each in active){if(active[each]){on(input,each,true);}else{off(input,each,true);}}}else{if(!direct||method=="toggle"){if(!direct){input[_callback]("ifClicked");}if(active){if(node[_type]!==_radio){off(input,state);}}else{on(input,state);}}}}}}function on(input,state,keep){var node=input[0],parent=input.parent(),checked=state==_checked,indeterminate=state==_indeterminate,disabled=state==_disabled,callback=indeterminate?_determinate:checked?_unchecked:"enabled",regular=option(input,callback+capitalize(node[_type])),specific=option(input,state+capitalize(node[_type]));if(node[state]!==true){if(!keep&&state==_checked&&node[_type]==_radio&&node.name){var form=input.closest("form"),inputs='input[name="'+node.name+'"]';inputs=form.length?form.find(inputs):$(inputs);inputs.each(function(){if(this!==node&&$(this).data(_iCheck)){off($(this),state);}});}if(indeterminate){node[state]=true;if(node[_checked]){off(input,_checked,"force");}}else{if(!keep){node[state]=true;}if(checked&&node[_indeterminate]){off(input,_indeterminate,false);}}callbacks(input,checked,state,keep);}if(node[_disabled]&&!!option(input,_cursor,true)){parent.find("."+_iCheckHelper).css(_cursor,"default");}parent[_add](specific||option(input,state)||"");if(!!parent.attr("role")&&!indeterminate){parent.attr("aria-"+(disabled?_disabled:_checked),"true");}parent[_remove](regular||option(input,callback)||"");}function off(input,state,keep){var node=input[0],parent=input.parent(),checked=state==_checked,indeterminate=state==_indeterminate,disabled=state==_disabled,callback=indeterminate?_determinate:checked?_unchecked:"enabled",regular=option(input,callback+capitalize(node[_type])),specific=option(input,state+capitalize(node[_type]));if(node[state]!==false){if(indeterminate||!keep||keep=="force"){node[state]=false;}callbacks(input,checked,callback,keep);}if(!node[_disabled]&&!!option(input,_cursor,true)){parent.find("."+_iCheckHelper).css(_cursor,"pointer");}parent[_remove](specific||option(input,state)||"");if(!!parent.attr("role")&&!indeterminate){parent.attr("aria-"+(disabled?_disabled:_checked),"false");}parent[_add](regular||option(input,callback)||"");}function tidy(input,callback){if(input.data(_iCheck)){input.parent().html(input.attr("style",input.data(_iCheck).s||""));if(callback){input[_callback](callback);}input.off(".i").unwrap();$(_label+'[for="'+input[0].id+'"]').add(input.closest(_label)).off(".i");}}function option(input,state,regular){if(input.data(_iCheck)){return input.data(_iCheck).o[state+(regular?"":"Class")];}}function capitalize(string){return string.charAt(0).toUpperCase()+string.slice(1);}function callbacks(input,checked,callback,keep){if(!keep){if(checked){input[_callback]("ifToggled");}input[_callback]("ifChanged")[_callback]("if"+capitalize(callback));}}})(window.jQuery||window.Zepto);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.