Unverified Commit ccd5269c authored by Joel Copi's avatar Joel Copi Committed by GitHub
Browse files

Update lib.min.js

parent 47e0bff6
!function(){function t(e,i){if(window===this)return new t(e,i);switch(i=i||document,this.__islib__=!0,this.length=0,!0){case e instanceof HTMLElement:this[this.length++]=e;break;case e instanceof String||"string"==typeof e:if("<"==e[0]&&">"==e[e.length-1]){if(e=e.substring(1,e.length-1),e.replace(/^[^\#\.\$\[]*/,function(t){this[this.length++]=document.createElement(t)}.bind(this)),0===this.length)throw"Invalid Element Creation string";e.replace(/\#[^\#\.\$\[]*/g,function(t){return this[this.length-1].id=t.substring(1,t.length),""}.bind(this)),e.replace(/\.[^\#\.\$\[]*/g,function(t){return this[this.length-1].classList.add(t.substring(1,t.length)),""}.bind(this)),e.replace(/\$[^\#\.\$\[]*/g,function(t){return this[this.length-1].name=t.substring(1,t.length),""}.bind(this)),e.replace(/\[[^\=]+\=(\"[^\"]*|\'[^\']*)\]/g,function(t){t=t.substring(1,t.length);var n=t.indexOf("=");return this[this.length-1].setAttribute(t.substring(0,n),t.substring(n+2,t.length-1)),""}.bind(this))}else{if(!1 in i)throw"querySelectorAll must be supported for lib to work";for(var r=i.querySelectorAll(e),s=0;s<r.length;s++)this[this.length++]=r[s]}break;case e instanceof Number||"number"==typeof e:if("_index"in window._&&e in window._._index)return window._._index[e];throw"Index not defined";case e instanceof Array||e&&e.constructor===Array:for(var s=0;s<e.length||0==s;s++)n.call(this,this,t(e[s]));break;case e instanceof Object||"object"==typeof e:if("__islib__"in e&&e.__islib__===!0)n.call(this,this,e);else if("length"in e)for(var s=0;s<e.length||0==s;s++)n.call(this,this,t(e[s]));else n.call(this,this,t(void 0));break;case e instanceof Function||"function"==typeof e:throw"lib cannot accept an input of type 'Function'";default:this[this.length++]=document}return this}var n=function(){if(0===arguments.length)return null;for(var t=0,n=0;n<arguments.length;n++)for(var e=0;e<arguments[n].length;e++)this[t++]=arguments[n][e];this.length=t};window._=t,t.prototype=window._.fn={index:function(t){if(!(t instanceof Number||"number"==typeof t))throw"Method index only accpets an argument of type Number.";return"_index"in window._||(window._._index={}),window._._index[t]=this,this},include:function(e){return n.call(this,this,t(e)),this},exclude:function(n){for(var e=t(n),i=this.length,r=0,s=[];i--;)for(r=e.length;r--;)this[i]!==e[r]&&s.unshift(this[i]);return t(s)},get:function(t){if(!(t instanceof Number||"number"==typeof t))throw"Method get only accepts an argument of type Number";return this[t]},remove:function(){for(var t=this.length;t--;this[t].parentNode.removeChild(this[t]));return this},each:function(n){if(!(n instanceof Function||"function"==typeof n))throw"Method each only accepts an argument of type Function";for(var e=this.length;e--;n(t(this[e])));return this},filter:function(n){if(!(n instanceof Function||"function"==typeof n))throw"Method each only accepts an argument of type Function";for(var e=[],i=0;i<this.length;i++)n(t(this[i]))&&e.push(this[i]);return t(e)},child:function(n){for(var e=this.length,i=new Array(this.length),e=this.length;e--;i[e]=t(n,this[e]));return t(i)},parent:function(){for(var n=[],e=!0,i=0;i<this.length;i++){for(n.push(this[i].parentNode),ii=i;i--;e=e&&n[i]===n[ii]);e||n.pop()}return t(n)},appendTo:function(n){if(!n)throw"Method appendTo expects an argument";n=t(n);for(var e=0;e<this.length;e++)n[0].appendChild(this[e]);return this},append:function(n){if(!n)throw"Method append expects an argument";n=t(n);for(var e=0;e<n.length;e++)this[0].appendChild(n[e]);return this},toggleClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method toggleClass only accepts an argument of type String";for(var n=0;n<this.length;n++)this[n].classList.contains(t)?this[n].classList.remove(t):this[n].classList.add(t);return this},hasClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method hasClass only accepts an argument of type String";for(var n=0,e=!0;n<this.length&&e;)e&=this[n++].classList.contains(t);return e},addClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method addClass only accepts an argument of type String";for(var n=this.length;n--;this[n].classList.add(t));return this},dropClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method dropClass only accepts an argument of type String";for(var n=this.length;n--;this[n].classList.remove(t));return this},css:function(t){if(0==arguments.length)throw"Method css expects an arguments";if(1==arguments.length){if(t instanceof String||"string"==typeof t){if(-1==selector.indexOf(":"))return this[0].style[t];t=t.split(";");for(var n=0;n<t.length;n++)for(var e=this.length;e--;this[e].style[t[n].split(":")[0].trim()]=t[n].split(":")[1].trim());}else if(t instanceof Array||t.constructor===Array){if(!(t[0]instanceof String))throw"Method css only accepts an input of String Arrays";for(var n=0;n<t.length-t.length%2;n+=2)if(t[n]instanceof String&&t[n+1]instanceof String)for(var n=this.length;n--;this[n].style[t[n]]=t[n+1]);}else if(t instanceof Object||"object"==typeof t)for(var i in t)for(var n=this.length;n--;this[n].style[i]=t[i]);}else for(var n=0;n<arguments.length-arguments.length%2;n+=2)if((arguments[n]instanceof String||"string"==typeof arguments[n])&&(arguments[n+1]instanceof String||"string"==typeof arguments[n+1]))for(var r=this.length;r--;this[r].style[arguments[n]]=arguments[n+1]);return this},attr:function(t){if(0==arguments.length)throw"Method attr expects an argument.";if(1==arguments.length){if(t instanceof String||"string"==typeof t)return this[0].getAttribute(t);throw"Method attr can only accept a single argument of type String"}for(var n=0;n<arguments.length-arguments.length%2;n+=2)for(var e=this.length;e--;this[e].setAttribute(arguments[n],arguments[n+1]));return this},prop:function(t){if(0==arguments.length)throw"Method prop expects an argument.";if(1==arguments.length){if(t instanceof String||"string"==typeof t)return this[0][t];throw"Method prop can only accept a single argument of type String"}for(var n=0;n<arguments.length-arguments.length%2;n+=2)for(var e=this.length;e--;this[e][arguments[n]]=arguments[n+1]);return this},text:function(t){if(!(t instanceof String||"string"==typeof t))return this[0].innerText;for(var n=this.length;n--;this[n].innerText=t);return this},html:function(t){if(!(t instanceof String||"string"==typeof t))return this[0].innerHTML;for(var n=this.length;n--;this[n].innerHTML=t);return this},value:function(t){if(!(t instanceof String||"string"==typeof t))return this[0].value;for(var n=this.length;n--;this[n].value=t);return this},height:function(){return this[0].offsetHeight||this[0].clientHeight||this[0].scrollHeight},width:function(){return this[0].offsetWidth||this[0].clientWidth||this[0].scrollWidth},on:function(t,n){if(0==arguments.length)throw"Method on expects an argument";if(1==arguments.length&&(t instanceof Object||"object"==typeof t))for(var e in t)for(var i=this.length;i--;this[i].addEventListener(e.replace(/^on/,""),t[e]));else for(var i=0;i<arguments.length-arguments.length%2;i+=2)for(var r=this.length;r--;this[r].addEventListener(arguments[i].replace(/^on/,""),arguments[i+1]));return this},trigger:function(t,n){if(!(t instanceof String||"string"==typeof t))throw"Method trigger only accepts a first argument of type String";switch(t=t.replace(/^on/,""),!0){case 0==t.indexOf("key"):for(var e=0;e<this.length;e++){var i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.relatedTarget=this[e];var r=new KeyboardEvent(t,i);this[e].dispatchEvent(r)}break;case"click"==t||"mouseup"==t||"mousedown"==t:for(var e=0;e<this.length;e++){var i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.button=0,i.relatedTarget=this[e];var r=new MouseEvent(t,i);this[e].dispatchEvent(r)}break;case"contextmenu"==t:for(var e=0;e<this.length;e++){var i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.button=2,i.relatedTarget=this[e];var r=new MouseEvent(t,i);this[e].dispatchEvent(r)}break;default:for(var e=0;e<this.length;e++){var i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.relatedTarget=this[e];var r=new MouseEvent(t,i);this[e].dispatchEvent(r)}}return this}},window._.xhr=function(t,n,e,i){var r=new XMLHttpRequest;t instanceof Object||"object"==typeof t?(r.open(t.type,t.url,!0),r.onreadystatechange=function(){4==r.readyState&&200==r.status&&this.cb(r.responseText)}.bind(r),r.cb=t.callback,r.send(t.data||"")):(r.open(t,n,!0),r.onreadystatechange=function(){4==r.readyState&&200==r.status&&this.cb(r.responseText)}.bind(r),r.cb=e,r.send(i||""))},window._.cors=function(t,n,e,i,r){var s="withCredentials"in new XMLHttpRequest?new XMLHttpRequest:null;if(null==s)throw"CORS not supported.";t instanceof Object||"object"==typeof t?(s.open(t.type,t.url,!0),s.withCredentials=t.credentials,s.cb=t.callback,s.onload=function(){this.cb(s.responseText)}.bind(s),s.send(t.data||"")):(s.open(t,n,!0),s.withCredentials=i,s.cb=e,s.onload=function(){this.cb(s.responseText)}.bind(s),s.send(r||""))},window._.jsnop=function(t,n){var e=document.createElement("script"),i=Math.floor(100*Math.random())+1;t instanceof Object||"object"==typeof t?(window["fnctn"+i]=t.callback,e.src=t.url+"fnctn"+i,_("head").append(e),e.onload=function(){_(this).remove()}):(window["fnctn"+i]=n,e.src=t+"fnctn"+i,_("head").append(e),e.onload=function(){_(this).remove()})}}();
!function(){var t=function(){if(0===arguments.length)return null;for(var t=0,n=0;n<arguments.length;n++)for(var e=0;e<arguments[n].length;e++)this[t++]=arguments[n][e];this.length=t};function n(e,i){if(window===this)return new n(e,i);switch(i=i||document,this.__islib__=!0,this.length=0,!0){case e instanceof HTMLElement:this[this.length++]=e;break;case e instanceof String||"string"==typeof e:if("<"==e[0]&&">"==e[e.length-1]){if((e=e.substring(1,e.length-1)).replace(/^[^\#\.\$\[]*/,function(t){this[this.length++]=document.createElement(t)}.bind(this)),0===this.length)throw"Invalid Element Creation string";e.replace(/\#[^\#\.\$\[]*/g,function(t){return this[this.length-1].id=t.substring(1,t.length),""}.bind(this)),e.replace(/\.[^\#\.\$\[]*/g,function(t){return this[this.length-1].classList.add(t.substring(1,t.length)),""}.bind(this)),e.replace(/\$[^\#\.\$\[]*/g,function(t){return this[this.length-1].name=t.substring(1,t.length),""}.bind(this)),e.replace(/\[[^\=]+\=(\"[^\"]*|\'[^\']*)\]/g,function(t){var n=(t=t.substring(1,t.length)).indexOf("=");return this[this.length-1].setAttribute(t.substring(0,n),t.substring(n+2,t.length-1)),""}.bind(this))}else{if(!1 in i)throw"querySelectorAll must be supported for lib to work";for(var r=i.querySelectorAll(e),s=0;s<r.length;s++)this[this.length++]=r[s]}break;case e instanceof Number||"number"==typeof e:if("_index"in window._&&e in window._._index)return window._._index[e];throw"Index not defined";case e instanceof Array||e&&e.constructor===Array:for(s=0;s<e.length||0==s;s++)t.call(this,this,n(e[s]));break;case e instanceof Object||"object"==typeof e:if("__islib__"in e&&!0===e.__islib__)t.call(this,this,e);else if("length"in e)for(s=0;s<e.length||0==s;s++)t.call(this,this,n(e[s]));else t.call(this,this,n(void 0));break;case e instanceof Function||"function"==typeof e:throw"lib cannot accept an input of type 'Function'";default:this[this.length++]=document}return this}window._=n,n.prototype=window._.fn={index:function(t){if(!(t instanceof Number||"number"==typeof t))throw"Method index only accpets an argument of type Number.";return"_index"in window._||(window._._index={}),window._._index[t]=this,this},include:function(e){return t.call(this,this,n(e)),this},exclude:function(t){for(var e=n(t),i=this.length,r=0,s=[];i--;)for(r=e.length;r--;)this[i]!==e[r]&&s.unshift(this[i]);return n(s)},get:function(t){if(!(t instanceof Number||"number"==typeof t))throw"Method get only accepts an argument of type Number";return n(this[t])},raw:function(t){if(!(t instanceof Number||"number"==typeof t))throw"Method get only accepts an argument of type Number";return this[t]},remove:function(){for(var t=this.length;t--;this[t].parentNode.removeChild(this[t]));return this},each:function(t){if(!(t instanceof Function||"function"==typeof t))throw"Method each only accepts an argument of type Function";for(var e=this.length;e--;t(n(this[e])));return this},filter:function(t){if(!(t instanceof Function||"function"==typeof t))throw"Method each only accepts an argument of type Function";for(var e=[],i=0;i<this.length;i++)t(n(this[i]))&&e.push(this[i]);return n(e)},child:function(t){var e=this.length,i=new Array(this.length);for(e=this.length;e--;i[e]=n(t,this[e]));return n(i)},parent:function(){for(var t=[],e=!0,i=0;i<this.length;i++){t.push(this[i].parentNode);for(var r=i;i--;e=e&&t[i]!==t[r]);e||t.pop()}return n(t)},sibling:function(t){for(var e=[],i=!0,r=0;r<this.length;r++)e.push(n(t,this[r]));var s=n(e),o=[];for(r=0;r<s.length;r++){o.push(s[r]);for(var h=r;r--;i=i&&o[r]!==o[h]);i||o.pop()}return n(o)},appendTo:function(t){if(!t)throw"Method appendTo expects an argument";t=n(t);for(var e=0;e<this.length;e++)t[0].appendChild(this[e]);return this},append:function(t){if(!t)throw"Method append expects an argument";t=n(t);for(var e=0;e<t.length;e++)this[0].appendChild(t[e]);return this},prependTo:function(t){if(!t)throw"Method prependTo expects an argument";t=n(t);for(var e=0;e<this.length;e++)t[0].hasChildNodes()?t[0].insertBefore(this[e],t[0].childNodes[0]):t[0].appendChild(this[e]);return this},prepend:function(t){if(!t)throw"Method prepend expects an argument";t=n(t);for(var e=0;e<t.length;e++)this[0].hasChildNodes()?this[0].insertBefore(t[e],this[0].childNodes[0]):this[0].appendChild(t[e]);return this},toggleClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method toggleClass only accepts an argument of type String";for(var n=0;n<this.length;n++)this[n].classList.contains(t)?this[n].classList.remove(t):this[n].classList.add(t);return this},hasClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method hasClass only accepts an argument of type String";for(var n=0,e=!0;n<this.length&&e;)e&=this[n++].classList.contains(t);return e},addClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method addClass only accepts an argument of type String";for(var n=this.length;n--;this[n].classList.add(t));return this},dropClass:function(t){if(!(t instanceof String||"string"==typeof t))throw"Method dropClass only accepts an argument of type String";for(var n=this.length;n--;this[n].classList.remove(t));return this},css:function(t){if(0==arguments.length)throw"Method css expects an arguments";if(1==arguments.length){if(t instanceof String||"string"==typeof t){if(-1==selector.indexOf(":"))return this[0].style[t];t=t.split(";");for(var n=0;n<t.length;n++)for(var e=this.length;e--;this[e].style[t[n].split(":")[0].trim()]=t[n].split(":")[1].trim());}else if(t instanceof Array||t.constructor===Array){if(!(t[0]instanceof String))throw"Method css only accepts an input of String Arrays";for(n=0;n<t.length-t.length%2;n+=2)if(t[n]instanceof String&&t[n+1]instanceof String)for(n=this.length;n--;this[n].style[t[n]]=t[n+1]);}else if(t instanceof Object||"object"==typeof t)for(var i in t)for(n=this.length;n--;this[n].style[i]=t[i]);}else for(n=0;n<arguments.length-arguments.length%2;n+=2)if((arguments[n]instanceof String||"string"==typeof arguments[n])&&(arguments[n+1]instanceof String||"string"==typeof arguments[n+1]))for(var r=this.length;r--;this[r].style[arguments[n]]=arguments[n+1]);return this},attr:function(t){if(0==arguments.length)throw"Method attr expects an argument.";if(1==arguments.length){if(t instanceof String||"string"==typeof t)return this[0].getAttribute(t);throw"Method attr can only accept a single argument of type String"}for(var n=0;n<arguments.length-arguments.length%2;n+=2)for(var e=this.length;e--;this[e].setAttribute(arguments[n],arguments[n+1]));return this},prop:function(t){if(0==arguments.length)throw"Method prop expects an argument.";if(1==arguments.length){if(t instanceof String||"string"==typeof t)return this[0][t];throw"Method prop can only accept a single argument of type String"}for(var n=0;n<arguments.length-arguments.length%2;n+=2)for(var e=this.length;e--;this[e][arguments[n]]=arguments[n+1]);return this},text:function(t){if(!(t instanceof String||"string"==typeof t))return this[0].innerText;for(var n=this.length;n--;this[n].innerText=t);return this},html:function(t){if(!(t instanceof String||"string"==typeof t))return this[0].innerHTML;for(var n=this.length;n--;this[n].innerHTML=t);return this},value:function(t){if(!(t instanceof String||"string"==typeof t))return this[0].value;for(var n=this.length;n--;this[n].value=t);return this},height:function(){return this[0].offsetHeight||this[0].clientHeight||this[0].scrollHeight},width:function(){return this[0].offsetWidth||this[0].clientWidth||this[0].scrollWidth},on:function(t,n){if(0==arguments.length)throw"Method on expects an argument";if(1==arguments.length&&(t instanceof Object||"object"==typeof t))for(var e in t)for(var i=this.length;i--;this[i].addEventListener(e.replace(/^on/,""),t[e]));else for(i=0;i<arguments.length-arguments.length%2;i+=2)for(var r=this.length;r--;this[r].addEventListener(arguments[i].replace(/^on/,""),arguments[i+1]));return this},trigger:function(t,n){if(!(t instanceof String||"string"==typeof t))throw"Method trigger only accepts a first argument of type String";switch(t=t.replace(/^on/,""),!0){case 0==t.indexOf("key"):for(var e=0;e<this.length;e++){var i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.relatedTarget=this[e];var r=new KeyboardEvent(t,i);this[e].dispatchEvent(r)}break;case"click"==t||"mouseup"==t||"mousedown"==t:for(e=0;e<this.length;e++){i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.button=0,i.relatedTarget=this[e];r=new MouseEvent(t,i);this[e].dispatchEvent(r)}break;case"contextmenu"==t:for(e=0;e<this.length;e++){i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.button=2,i.relatedTarget=this[e];r=new MouseEvent(t,i);this[e].dispatchEvent(r)}break;default:for(e=0;e<this.length;e++){i={};(n instanceof Object||"object"==typeof n)&&(i=n),i.relatedTarget=this[e];r=new MouseEvent(t,i);this[e].dispatchEvent(r)}}return this}},window._.xhr=function(t,n,e,i){var r=new XMLHttpRequest;t instanceof Object||"object"==typeof t?(r.open(t.type,t.url,!0),r.onreadystatechange=function(){4==r.readyState&&200==r.status&&this.cb(r.responseText)}.bind(r),r.cb=t.callback,r.send(t.data||"")):(r.open(t,n,!0),r.onreadystatechange=function(){4==r.readyState&&200==r.status&&this.cb(r.responseText)}.bind(r),r.cb=e,r.send(i||""))},window._.cors=function(t,n,e,i,r){var s="withCredentials"in new XMLHttpRequest?new XMLHttpRequest:null;if(null==s)throw"CORS not supported.";t instanceof Object||"object"==typeof t?(s.open(t.type,t.url,!0),s.withCredentials=t.credentials,s.cb=t.callback,s.onload=function(){this.cb(s.responseText)}.bind(s),s.send(t.data||"")):(s.open(t,n,!0),s.withCredentials=i,s.cb=e,s.onload=function(){this.cb(s.responseText)}.bind(s),s.send(r||""))},window._.jsnop=function(t,n){var e=document.createElement("script"),i=Math.floor(100*Math.random())+1;t instanceof Object||"object"==typeof t?(window["fnctn"+i]=t.callback,e.src=t.url+"fnctn"+i,_("head").append(e),e.onload=function(){_(this).remove()}):(window["fnctn"+i]=n,e.src=t+"fnctn"+i,_("head").append(e),e.onload=function(){_(this).remove()})}}();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment