"undefined"!==typeofdocument&&!("classList"indocument.createElement("a"))&&function(g){varg=(g.HTMLElement||g.Element).prototype,f=Object,d=String.prototype.trim||function(){returnthis.replace(/^\s+|\s+$/g,"")},b=Array.prototype.indexOf||function(a){for(varc=0,b=this.length;c<b;c++)if(cinthis&&this[c]===a)returnc;return-1},a=function(a,c){this.name=a;this.code=DOMException[a];this.message=c},c=function(c,e){if(""===e)thrownewa("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))thrownewa("INVALID_CHARACTER_ERR",
"String contains an invalid character");returnb.call(c,e)},e=function(a){for(varc=d.call(a.className),c=c?c.split(/\s+/):[],b=0,e=c.length;b<e;b++)this.push(c[b]);this._updateClassName=function(){a.className=this.toString()}},j=e.prototype=[],i=function(){returnnewe(this)};a.prototype=Error.prototype;j.item=function(a){returnthis[a]||null};j.contains=function(a){return-1!==c(this,a+"")};j.add=function(a){a+="";-1===c(this,a)&&(this.push(a),this._updateClassName())};j.remove=function(a){a=c(this,
(function(){functiong(b,a,c){vare,d;"undefined"!==typeofb.hasAttribute?(b.hasAttribute(a)&&(e=b.getAttribute(a)),d=!0):"undefined"!==typeofb[a]?(e=b[a],d=!1):"class"===a&&"undefined"!==typeofb.className&&(a="className",e=b.className,d=!1);if("undefined"===typeofe&&("undefined"===typeofc||null===c))console.log(c),console.log(b),console.log("Element does not have the selected attribute");else{if("undefined"===typeofc)returne;"undefined"!==typeofc&&null!==c?!0===d?b.setAttribute(a,c):b[a]=
c:console.log("Property "+a+" nor an equivalent seems to exist")}$_.ext("dom",{addClass:function(b){$_.each(function(a){a.classList.add(b)})},removeClass:function(b){$_.each(function(a){a.classList.remove(b)})},hide:function(){this.css("display","none")},show:function(b){"undefined"===typeofb&&(b="block");this.css("display",b)},attr:function(b,a){varc=this.el;if(1<c.length&&"undefined"===typeofa)console.log(c),console.log("Must be a singular element");elseif(1<c.length&&"undefined"!==typeofa)$_.each(function(c){returng(c,
_listener:d})):console.log("Failed to _attach event:"+c+" on "+a)},f=function(a,c,b){if("undefined"!==typeofa.detachEvent){vard=a.KIS_0_5_0;if(d&&d.listeners&&d.listeners[c])for(varf=d.listeners[c],g=f.length,k=0;k<g;k++)if(f[k].callback===b){a.detachEvent("on"+c,f[k]._listener);f.splice(k,1);0===f.length&&deleted.listeners[c];break}}});d=function(a,c,b,j){vari,h;if("undefined"===typeofa)returnconsole.log(arguments),console.log(c),!1;if(c.match(/^([\w\-]+)$/))!0===j?g(a,c,b):f(a,c,b);else{c=
(function(){if("undefined"!==$_.ajax){varg,f;g={};f={};$_.ext("template",{get:function(d){varb;b=this.el.innerHTML;if(""===b)console.log("Template is empty or cannot be found");elsereturng[d]=b},parse:function(d,b){vara=g[d],c=[],e=/\{([A-Z0-9_\-]+)\}(.*)\{\/\1\}/gim,j=/\{([A-Z0-9_\-]+)\}/gim,c=[],i=0,h=i=0,k=0,l="",o={},m="",n,a=(""+a).replace(/\s+/gim," "),a=a.replace(/>\s+</gim,"><"),a=a.replace(/>\s+\{/gim,">{"),a=a.replace(/\}\s+</gim,"}<"),c=a.match(e);if(null!=c){i=c.length;for(h=0;h<
for(nine)e[n].parentNode&&e[n].parentNode.removeChild(e[n]);returnf[d]=a},apply:function(d,b,a){"undefined"===typeofb&&"undefined"===typeofa?this.el.innerHTML="undefined"!==typeoff[d]?f[d]:d:$_.get(b,{},function(b){""===b?console.log("Template is empty or can not be found"):(g[d]=b,b=this.parse(d,a),f[d]=b,this.el.innerHTML=b)})}})}})();
"array"!==$_.type(b)&&(b=this.object_values(b));c=d.length;if(c!==b.length)returnconsole.log("Object combine requires two arrays of the same size"),!1;for(e=0;e<c;e++)a[d[e]]=b[e];returna},object_merge:function(){vard=Array.prototype.slice.call(arguments),b=d.length,a={},c,e=0,f,g,h;c=!0;for(f=0;f<b;f++)if("array"!==$_.type(d[f])){c=!1;break}if(c){a=[];for(f=0;f<b;f++)a=a.contact(d[f]);returna}for(f=0,h=0;f<b;f++)if(c=d[f],"array"==$_.type(c))for(g=0,e=c.length;g<e;g++)a[h++]=c[g];elsefor(ginc)c.hasOwnProperty(g)&&