text: var mvcc;!function(a){"use strict";a.isString=function(a){return"string"==typeof a},a.isNumber=function(a){return"number"==typeof a},a.isBoolean=function(a){return"boolean"==typeof a},a.isArray=function(a){return a.constructor===Array},a.isFunction=function(a){return"function"==typeof a},a.isObject=function(a){return"object"==typeof a},a.isDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)},a.isDefined=function(a){return"undefined"!=typeof a},a.isUndefined=function(a){return"undefined"==typeof a},a.concat=function(){return Array.prototype.slice.call(arguments).join("")},a.extend=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},a.template=function(b,c){return b.replace(/{{(.+?)}}/g,function(b,d){return d.split(".").reduce(function(b,c){return a.isFunction(b[c])?b[c]():b[c]},c)})},a.http=function(){var b=function(b){var c=new window.XMLHttpRequest;return c.open(b.method,b.url,!0,b.username,b.password),{then:function(d,e){c.onreadystatechange=function(){4==c.readyState?200==c.status&&a.isFunction(d)&&d(c.responseText):a.isFunction(e)&&e(c.statusText)},c.send(b.data)}}},c=function(b,c){return c={method:"GET",url:b}||c,{then:function(b,d){a.http.request(c).then(b,d)}}},d=function(b,c){return c={method:"DELETE",url:b}||c,{then:function(b,d){a.http.request(c).then(b,d)}}},e=function(b,c){return c={method:"HEAD",url:b}||c,{then:function(b,d){a.http.request(c).then(b,d)}}},f=function(b,c){return c={method:"JSONP",url:b}||c,{then:function(b,d){a.http.request(c).then(b,d)}}},g=function(b,c,d){return d={method:"POST",url:b,data:c}||d,{then:function(b,c){a.http.request(d).then(b,c)}}},h=function(b,c,d){return d={method:"PUT",url:b,data:c}||d,{then:function(b,c){a.http.request(d).then(b,c)}}},i=function(b,c,d){return d={method:"PATCH",url:b,data:c}||d,{then:function(b,c){a.http.request(d).then(b,c)}}},j=function(b,c,d,e){a.http.get(b).then(function(b){document.querySelector(c).innerHTML=b,a.isFunction(d)&&d()},function(){a.isFunction(e)&&e()})};return{request:b,get:c,del:d,head:e,jsonp:f,post:g,put:h,patch:i,include:j}}(),a.com=function(){var b={},c=function(a,c){b[c]=a},d=function(c){a.isDefined(b[c])&&delete b[c]},e=function(){b={}},f=function(c){return a.isDefined(b[c])},g=function(c){for(var d=b[c],e=document.querySelectorAll(d.selector),f=0,g=e.length;g>f;f++){var h=e[f];a.isFunction(d.init)&&d.init(h),a.isFunction(d.draw)&&(h.innerHTML=a.template(d.draw(h),d)),a.isFunction(d.done)&&d.done(h)}},h=function(){for(var a in b)g(a)};return{item:b,create:c,remove:d,clear:e,contains:f,render:g,renderAll:h}}();var b=function(){function b(b){this._cbs={},this._keys=b,a.isFunction(b.init)&&b.init()}return b.prototype.get=function(a){return this._keys[a]},b.prototype.set=function(a,b){this._keys[a]=b,this._cbs[a]&&this._cbs[a].forEach(function(a){a(b)})},b.prototype.on=function(a,b){this._cbs[a]||(this._cbs[a]=[]),this._cbs[a].push(b)},b.prototype.un=function(b){a.isFunction(this._cbs[b])&&delete this._cbs[b]},b.prototype.each=function(a){for(var b in this._keys)a(b,this.get(b))},b.prototype.contains=function(a){return a in this._keys},b}();a.Model=b,a.route=function(){var b={},c=function(){g(location.hash)},d=function(a,c){b[a]=c},e=function(c){a.isDefined(b[c])&&delete b[c]},f=function(){b={}},g=function(a){for(var c in b)a.toLowerCase().substring(0,c.length)===c.toLowerCase()&&b[c]()},h=function(){window.addEventListener("load",c),window.addEventListener("hashchange",c)},i=function(){window.removeEventListener("load",c),window.removeEventListener("hashchange",c)};return{item:b,map:d,unmap:e,clear:f,call:g,listen:h,ignore:i}}(),a.request=function(){var a=function(a){return decodeURIComponent((new RegExp("[?|&]"+a+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null};return{queryString:a}}(),a.route.listen()}(mvcc||(mvcc={})),mvcc.com.create({selector:"[mv-include]",init:function(a){var b=a.getAttribute("mv-include");mvcc.http.get(b).then(function(b){a.innerHTML=b})},done:function(a){a.removeAttribute("mv-cloak")}},"mv-include"),mvcc.com.create({selector:"[mv-repeat]",init:function(a){var b=this;mvcc.http.get(a.getAttribute("mv-repeat")).then(function(c){b.load(a,JSON.parse(c))})},load:function(a,b){var c="",d=a.innerHTML;for(var e in b)c+=mvcc.template(d,b[e]);a.innerHTML=c},done:function(a){a.removeAttribute("mv-cloak")}},"mv-repeat"),mvcc.com.create({selector:"[mv-template]",data:{},init:function(a){data=window[a.getAttribute("mv-template")]},draw:function(a){return mvcc.template(a.innerHTML,data)},done:function(a){a.removeAttribute("mv-cloak")}},"mv-template");