(function(){if("undefined"!==typeof document.querySelector){var d,o,p,e;d=function(g){e="undefined"===typeof g?"undefined"!==typeof d.el?d.el:document.documentElement:"object"!==typeof g?o(g):g;d.prototype.el=e;var g=p(d),i;for(i in g)"object"===typeof g[i]&&(g[i].el=e);g.el=e;return g};o=function(g,d){var e;if("string"!=typeof g||"undefined"===typeof g)return g;e=null!=d&&1===d.nodeType?d:document;if(g.match(/^#([\w\-]+$)/))return document.getElementById(g.split("#")[1]);e=e.querySelectorAll(g); return 1===e.length?e[0]:e};p=function(d){var e;if("undefined"!==typeof d){if("undefined"!==typeof Object.create)return Object.create(d);e=typeof d;if(!("object"!==e&&"function"!==e))return e=function(){},e.prototype=d,new e}};d.ext=function(g,i){i.el=e;d[g]=i};d.ext("each",function(d){if("undefined"!==typeof e.length&&e!==window)if("undefined"!==typeof Array.prototype.forEach)[].forEach.call(e,d);else{var i=e.length;if(0!==i)for(var l,k=0;k1&&typeof b==="undefined"){console.log(c);console.log("Must be a singular element")}else if(c.length> 1&&typeof b!=="undefined")d.each(function(c){return o(c,a,b)});else return o(c,a,b)},text:function(a){var b,c,f;f=this.el;c=typeof f.textContent!=="undefined"?"textContent":typeof f.innerText!=="undefined"?"innerText":"innerHTML";b=f[c];if(typeof a!=="undefined")return f[c]=a;return b},css:function(a,b){if(typeof b==="undefined")return e(this.el,a);d.each(function(c){e(c,a,b)})},append:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("beforeend",a):this.el.innerHTML= this.el.innerHTML+a},prepend:function(a){typeof document.insertAdjacentHTML!=="undefined"?this.el.insertAdjacentHTML("afterbegin",a):this.el.innerHTML=a+this.el.innerHTML},html:function(a){if(typeof a!=="undefined")this.el.innerHTML=a;return this.el.innerHTML}});if(typeof window.XMLHttpRequest!=="undefined"){var g={_do:function(a,b,c,f,j){var d=new XMLHttpRequest;typeof c==="undefined"&&(c=function(){});j=j?"POST":"GET";a=a+(j==="GET"?"?"+this._serialize(b):"");d.open(j,a);d.onreadystatechange=function(){d.readyState=== 4&&(d.status===200?c.call(d.responseText,d.responseText):typeof f!=="undefined"&&f.call(d.status,d.status))};if(j==="POST"){d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.send(this._serialize(b))}else d.send(null)},_serialize:function(a){var b,c,f=[];for(b in a)if(a.hasOwnProperty(b)&&typeof a[b]!=="function"){c=a[b].toString();b=encodeURIComponent(b);c=encodeURIComponent(c);f.push(b+"="+c)}return f.join("&")}};d.ext("get",function(a,b,c,f){g._do(a,b,c,f,false)});d.ext("post", function(a,b,c,f){g._do(a,b,c,f,true)});d.ext("sse",function(a,b){var c;if(typeof EventSource!=="undefined"){c=new EventSource(a);c.onmessage=function(a){b.call(a.data,a.data)}}});var i,l,k,q;if(typeof document.addEventListener!=="undefined"){i=function(a,b,c){typeof a.addEventListener!=="undefined"&&a.addEventListener(b,c,false)};l=function(a,b,c){typeof a.removeEventListener!=="undefined"&&a.removeEventListener(b,c,false)}}else if(typeof document.attachEvent!=="undefined"){i=function(a,b,c){function f(a){c.apply(a)} if(typeof a.attachEvent!=="undefined"){l(b,c);a.attachEvent("on"+b,f);a=a.KIS_0_6_0=a.KIS_0_6_0||{};a.listeners=a.listeners||{};a.listeners[b]=a.listeners[b]||[];a.listeners[b].push({callback:c,_listener:f})}else console.log("Failed to _attach event:"+b+" on "+a)};l=function(a,b,c){if(typeof a.detachEvent!=="undefined"){var f=a.KIS_0_6_0;if(f&&f.listeners&&f.listeners[b])for(var d=f.listeners[b],e=d.length,h=0;hd?1:ca?1:b