text: /*!
   * u.js - Version 0.8.0 - incl. IE 9 fix
   * micro framework, utility library
   * Author: Steve Ottoz <so@dev.so>
   * Build date: 2015-05-20
   * Copyright (c) 2015 Steve Ottoz
   * Released under the MIT license
   */
  !function(a,b,c,d,e){"use strict";function f(a){c.push.apply(this,a&&(a.nodeType||/^o/.test(typeof a))&&!u.isArray(a)&&null!==a?[a]:u.isArray(a)?a:""+a===a?u.isHtml(a)?u.toHtml(a):b.querySelectorAll(a):e)}a.u=function(a){return/^f/.test(typeof a)?/c/.test(b.readyState)?a():u(b).on("DOMContentLoaded",a):new f(a)},u.version="0.8.0",u.fn=u[d]=f[d]={length:0,on:function(a,b){return this.each(function(c,d){var e=a.split(" ");u.each(e,function(a,c){d.addEventListener(c,b)})})},one:function(a,b){return this.each(function(c,d){var e=a.split(" ");u.each(e,function(a,c){d.addEventListener(c,function e(a){d.removeEventListener(c,e),b.call(this,a)})})})},off:function(a,b){return this.each(function(c,d){var e=a.split(" ");u.each(e,function(a,c){d.removeEventListener(c,b)})})},each:function(a){return u.each(u.toArray(this),a),this},hasClass:function(a){return this[0].classList.contains(a)},position:function(){return{left:this[0].offsetLeft,top:this[0].offsetTop}},offset:function(){var a=this[0].getBoundingClientRect();return{top:a.top+b.body.scrollTop,left:a.left+b.body.scrollLeft}},scrollTop:function(a){return a===e?this[0].scrollTop:this.each(function(b,c){c.scrollTop=a})},width:function(a){return a===e?this[0].clientWidth||this[0].innerWidth:this.each(function(b,c){c.style.width=a+"px"})},outerWidth:function(a){return a?this[0].offsetWidth+parseInt(getComputedStyle(this[0]).marginLeft)+parseInt(getComputedStyle(this[0]).marginRight):this[0].offsetWidth},height:function(a){return a===e?this[0].clientHeight||this[0].innerHeight:this.each(function(b,c){c.style.height=a+"px"})},outerHeight:function(a){return a?this[0].offsetHeight+parseInt(getComputedStyle(this[0]).marginTop)+parseInt(getComputedStyle(this[0]).marginBottom):this[0].offsetHeight},hide:function(){return this.each(function(a,b){b.style.display="none"})},show:function(){return this.each(function(a,b){b.style.display=""})},attr:function(a,b){return b===e?this[0].getAttribute(a):this.each(function(c,d){d.setAttribute(a,b)})},removeAttr:function(a){return this.each(function(b,c){c.removeAttribute(a)})},hasAttr:function(a){return this[0].hasAttribute(a)},data:function(a,b,c,d,f){return b===e?(c=this[0],(d=c[u._id])===e?(f={},f[a]=this[0].getAttribute("data-"+a),c[u._id]=d=u._data.push(f)-1,f[a]):u._data[d][a]?u._data[d][a]:u._data[d][a]=this[0].getAttribute("data-"+a)):this.each(function(c,d){(c=d[u._id])===e?(f={},f[a]=b,d[u._id]=c=u._data.push(f)-1):u._data[c][a]=b})},css:function(a,b){if("object"==typeof a){for(var c in a)this.each(function(b,d){d.style[c]=a[c]});return this}return b===e?this[0].style[a]:this.each(function(c,d){d.style[a]=b})},append:function(a){return this.each(function(b,c){a.each(function(a,b){c.appendChild(b)})})},prepend:function(a){return this.each(function(b,c,d){d=c.firstChild,a.each(function(a,b){c.insertBefore(b,d)})})},before:function(a){return this.each(function(b,c){a.each(function(a,b){c.insertAdjacentHTML("beforebegin",b.outerHTML)})})},after:function(a){return this.each(function(b,c){a.each(function(a,b){c.insertAdjacentHTML("afterend",b.outerHTML)})})},first:function(){return u(this[0])},last:function(){return u(this[this.length-1])},get:function(a){return u(this[a])},clone:function(){return u(this[0].cloneNode(!0))},contains:function(a){return/^o/.test(typeof a)?this[0]!==a[0]&&this[0].contains(a[0]):null!==this[0].querySelector(a)},find:function(a){return u(u.toArray(this[0].querySelectorAll(a)))},children:function(){return u(u.toArray(this[0].children))},prev:function(){return u(this[0].previousElementSibling)},next:function(){return u(this[0].nextElementSibling)},siblings:function(a){var b=this[0];return u(c.filter.call(b.parentNode.children,function(c){return a?c!==b&&u(c).is(a):c!==b}))},filter:function(a){return u(c.filter.call(this,function(b,c){return/^f/.test(typeof a)?a(c,b):u(b).is(a)}))},text:function(a){return a===e?this[0].textContent:this.each(function(b,c){c.textContent=a})},html:function(a){return a===e?this[0].innerHTML:this.each(function(b,c){c.innerHTML=a})},outerHTML:function(a){return a===e?this[0].outerHTML:this.each(function(b,c){c.outerHTML=a})},val:function(a){return a===e?this[0].value:this.each(function(b,c){c.value=a})},empty:function(){return this.each(function(a,b){b.innerHTML=""})},bytes:function(){return u.bytes(this[0].value||this[0].textContent)},parent:function(){return this.length<2?u(this[0].parentNode):[]},parents:function(a){for(var b=[],c=!1,d=this[0];!c;)d=d.parentNode,d?a===e?b.push(d):u(d).is(a)&&b.push(d):c=!0;return u(b)},remove:function(){return this.each(function(a,b){b.parentNode.removeChild(b)})},trigger:function(a){if(document.createEvent){var b=document.createEvent("HTMLEvents");return b.initEvent(a,!0,!1),this.each(function(a,c){c.dispatchEvent(b)})}return this.each(function(b,c){c.fireEvent("on"+a)})},is:function(a){var b=this[0].matches||this[0].matchesSelector||this[0].msMatchesSelector||this[0].mozMatchesSelector||this[0].webkitMatchesSelector||this[0].oMatchesSelector;if(b)return b.call(this[0],a);if(this[0].parentNode)for(var c=this[0].parentNode.querySelectorAll(a),d=c.length;d--;)if(c[d]===this[0])return!0;return!1},focus:function(){return this[0].focus(),this},blur:function(){return this.each(function(a,b){b.blur()})},splice:c.splice},u.each=function(a,b){for(var c in a)b.call(a[c],c,a[c]);return a};var g=["addClass","removeClass","toggleClass"],h=["add","remove","toggle"];g.forEach(function(a,b){u[d][a]=function(a){return this.each(function(c,d){var e=a.split(" ");u.each(e,function(a,c){d.classList[h[b]](c)})})}}),u.trim=function(a){return a.replace(/^\s+|\s+$/g,"")},u.extend=u.fn.extend=function(a,b){var c,d={};arguments[1]||(b=a,a=d=u.fn);for(c in a)d[c]=b[c]===e?a[c]:b[c];for(c in b)d[c]=b[c];return d},"push pop shift unshift filter map splice".split(" ").forEach(function(a){u[a]=function(b,c){return b[a](c)}}),u.inArray=function(a,b){return b.indexOf(a)},u.isArray=function(a){return Array.isArray(a)},u.toArray=function(a){return c.slice.call(a)},u.toDash=function(a){return a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},u.toCamel=function(a){return a.toLowerCase().replace(/\b-([a-z])/g,function(a,b){return b.toUpperCase()})},u.isHtml=function(a){return/<[a-z][\s\S]*>/i.test(a)},u.toHtml=function(a,b){return b=document.createElement("div"),b.innerHTML=a,a?b.childNodes:[]},u.bytes=function(a){return~-encodeURI(a).split(/%..|./).length},u.uuid=function j(a){return a?(a^16*Math.random()>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,j)},u.rid=function(a,b){return b=b||16,Array(a||32).join(0).replace(/./g,function(){return(0|Math.random()*b).toString(b)})},u.prfx=function k(a,b,c,d){for(d?d=b.toUpperCase():b=4;!d&&b--;d=(d=d.replace(/-(.)/g,k))in(new Image).style&&d)d=[["Moz-","Webkit-","Ms-","O-"][b]]+a;return d},u.stop=function(a){return a.preventDefault?a.preventDefault():a.returnValue=!1,a},u.param=function(a,b,c){if(b)return JSON.stringify(a);var d=[];for(var e in a){var f=c?c+"["+e+"]":e,g=a[e];d.push("object"==typeof g?u.param(g,b,f):encodeURIComponent(f)+"="+encodeURIComponent(g))}return d.join("&")},u.parse=function(a){try{return JSON.parse(a)}catch(b){return a}},u.tpl=function(a,b){return a.replace(/{{*([^}]+)*}}/g,function(a,c){return a=b,c.replace(/[^.]+/g,function(b){a=a[b]}),a})},u.ajax={opts:{sync:!0,json:!0,auth:null,success:function(){},error:function(){},up:function(){},down:function(){}},cts:{form:"application/x-www-form-urlencoded",json:"application/json"},_send:function(a,b){var c=this.cts,d=new XMLHttpRequest,e=u.param(a.data,a.json);return d.onreadystatechange=function(){4===d.readyState&&(d.status>=200&&d.status<400?a.success(u.parse(d.response),d.statusText):a.error(u.parse(d.response),d.statusText))},d.upload.onprogress=function(b){b.lengthComputable&&a.up(b.total,b.loaded)},d.onprogress=function(b){b.lengthComputable&&a.down(b.total,b.loaded)},d.open(b,a.url,a.sync),d.setRequestHeader("Content-type",a.json?c.json:c.form),d.setRequestHeader("Accept",c.json),d.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.auth&&d.setRequestHeader("Authorization",a.auth),d.send(e||null),d},defaults:function(a){this.opts=u.extend(this.opts,a)}},u.get=function(a){return a=u.extend(u.ajax.opts,a),a.json=!1,a.url+="?"+(u.param(a.data)||""),u.ajax._send(a,"GET")};var i=["post","put","patch","options","delete"];i.forEach(function(a){u[a]=function(b){return b=u.extend(u.ajax.opts,b),u.ajax._send(b,a.toUpperCase())}}),u.defer=function(a,b){return a=[],{resolve:function(){for(b=arguments;a.length;)a.shift().apply({},b);a=0},then:function(c){a?a.push(c):c.apply({},b)}}},u._id=u.uuid(),u._data=[],a.$=a.$||u,a.µ=u}(window,document,[],"prototype"),function(u,a,b){"use strict";b.body.classList||(u.fn.hasClass=function(a){return new RegExp("(^| )"+a+"( |$)","gi").test(el.className)},u.fn.addClass=function(a){return this.each(function(b){b.className+=" "+a})},u.fn.removeClass=function(a){return this.each(function(b){b.className=b.className.replace(new RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," ")})},u.fn.toggleClass=function(a){return this.each(function(b){var c=b.className.split(" "),d=c.indexOf(a);d>=0?c.splice(d,1):c.push(a),b.className=c.join(" ")})})}(u,window,document);
  //# sourceMappingURL=u.packed.min.js.map