text: /* Riot v2.2.1, @license MIT, (c) 2015 Muut Inc. + contributors */
  (function(e){"use strict";var t={version:"v2.2.1",settings:{}};var n="string";var r="object";var i=Array.isArray||function(){var e=Object.prototype.toString;return function(t){return e.call(t)==="[object Array]"}}();var o=function(e){return(e&&e.document||{}).documentMode|0}(e);t.observable=function(e){e=e||{};var t={},n=0;e.on=function(r,i){if(b(i)){i._id=typeof i._id=="undefined"?n++:i._id;r.replace(/\S+/g,function(e,n){(t[e]=t[e]||[]).push(i);i.typed=n>0})}return e};e.off=function(n,r){if(n=="*")t={};else{n.replace(/\S+/g,function(e){if(r){var n=t[e];for(var i=0,o;o=n&&n[i];++i){if(o._id==r._id){n.splice(i,1);i--}}}else{t[e]=[]}})}return e};e.one=function(t,n){function r(){e.off(t,r);n.apply(e,arguments)}return e.on(t,r)};e.trigger=function(n){var r=[].slice.call(arguments,1),i=t[n]||[];for(var o=0,u;u=i[o];++o){if(!u.busy){u.busy=1;u.apply(e,u.typed?[n].concat(r):r);if(i[o]!==u){o--}u.busy=0}}if(t.all&&n!="all"){e.trigger.apply(e,["all",n].concat(r))}return e};return e};t.mixin=function(){var e={};return function(t,n){if(!n)return e[t];e[t]=n}}();(function(e,t,n){if(!n)return;var r=n.location,i=e.observable(),o=n,u=false,a;function f(){return r.href.split("#")[1]||""}function s(e){return e.split("/")}function c(e){if(e.type)e=f();if(e!=a){i.trigger.apply(null,["H"].concat(s(e)));a=e}}var l=e.route=function(e){if(e[0]){r.hash=e;c(e)}else{i.on("H",e)}};l.exec=function(e){e.apply(null,s(f()))};l.parser=function(e){s=e};l.stop=function(){if(!u)return;o.removeEventListener?o.removeEventListener(t,c,false):o.detachEvent("on"+t,c);i.off("*");u=false};l.start=function(){if(u)return;o.addEventListener?o.addEventListener(t,c,false):o.attachEvent("on"+t,c);u=true};l.start()})(t,"hashchange",e);var u=function(e){var n,r,i,o=/[{}]/g;return function(u){var a=t.settings.brackets||e;if(n!==a){n=a;i=a.split(" ");r=i.map(function(e){return e.replace(/(?=.)/g,"\\")})}return u instanceof RegExp?a===e?u:new RegExp(u.source.replace(o,function(e){return r[~~(e==="}")]}),u.global?"g":""):i[u]}}("{ }");var a=function(){var t={},n=/(['"\/]).*?[^\\]\1|\.\w*|\w*:|\b(?:(?:new|typeof|in|instanceof) |(?:this|true|false|null|undefined)\b|function *\()|([a-z_$]\w*)/gi;return function(e,n){return e&&(t[e]=t[e]||r(e))(n)};function r(e,t){e=(e||u(0)+u(1)).replace(u(/\\{/g),"￰").replace(u(/\\}/g),"￱");t=a(e,f(e,u(/{/),u(/}/)));return new Function("d","return "+(!t[0]&&!t[2]&&!t[3]?i(t[1]):"["+t.map(function(e,t){return t%2?i(e,true):'"'+e.replace(/\n/g,"\\n").replace(/"/g,'\\"')+'"'}).join(",")+'].join("")').replace(/\uFFF0/g,u(0)).replace(/\uFFF1/g,u(1))+";")}function i(e,t){e=e.replace(/\n/g," ").replace(u(/^[{ ]+|[ }]+$|\/\*.+?\*\//g),"");return/^\s*[\w- "']+ *:/.test(e)?"["+f(e,/["' ]*[\w- ]+["' ]*:/,/,(?=["' ]*[\w- ]+["' ]*:)|}|$/).map(function(e){return e.replace(/^[ "']*(.+?)[ "']*: *(.+?),? *$/,function(e,t,n){return n.replace(/[^&|=!><]+/g,o)+'?"'+t+'":"",'})}).join("")+'].join(" ").trim()':o(e,t)}function o(t,r){t=t.trim();return!t?"":"(function(v){try{v="+(t.replace(n,function(t,n,r){return r?"(d."+r+"===undefined?"+(typeof e=="undefined"?"global.":"window.")+r+":d."+r+")":t})||"x")+"}catch(e){"+"}finally{return "+(r===true?'!v&&v!==0?"":v':"v")+"}}).call(d)"}function a(e,t){var n=[];t.map(function(t,r){r=e.indexOf(t);n.push(e.slice(0,r),t);e=e.slice(r+t.length)});return n.concat(e)}function f(e,t,n){var r,i=0,o=[],u=new RegExp("("+t.source+")|("+n.source+")","g");e.replace(u,function(t,n,u,a){if(!i&&n)r=a;i+=n?1:-1;if(!i&&u!=null)o.push(e.slice(r,a+u.length))});return o}}();function f(e){var t=u(0),n=e.slice(t.length).match(/\s*(\S+?)\s*(?:,\s*(\S)+)?\s+in\s+(.+)/);return n?{key:n[1],pos:n[2],val:t+n[3]}:{val:e}}function s(e,t,n){var r={};r[e.key]=t;if(e.pos)r[e.pos]=n;return r}function c(e,t,n){y(e,"each");var r=e.outerHTML,o=e.parentNode,u=document.createComment("riot placeholder"),c=[],l=q(e),p;o.insertBefore(u,e);n=f(n);t.one("premount",function(){if(o.stub)o=t.root;e.parentNode.removeChild(e)}).on("update",function(){var f=a(n.val,t),m;if(!i(f)){m=p;p=f?JSON.stringify(f):"";if(p===m)return;f=!f?[]:Object.keys(f).map(function(e){return s(n,e,f[e])})}var g=document.createDocumentFragment(),v=c.length,h=f.length;while(v>h)c[--v].unmount();c.length=h;m=!p&&!!n.key;for(v=0;v<h;++v){var b=m?s(n,f[v],v):f[v];if(!c[v]){(c[v]=new d({tmpl:r},{parent:t,isLoop:true,root:o,item:b})).mount();g.appendChild(c[v].root)}c[v]._item=b;c[v].update(b)}o.insertBefore(g,u);if(l)t.tags[x(e)]=c}).one("updated",function(){var e=Object.keys(t);_(o,function(n){if(n.nodeType==1&&!n.isLoop&&!n._looped){n._visited=false;n._looped=true;E(n,t,e)}})})}function l(e,t,n){_(e,function(e){if(e.nodeType==1){e.isLoop=e.parentNode&&e.parentNode.isLoop||e.getAttribute("each")?1:0;var r=q(e);if(r&&!e.isLoop){var o=new d(r,{root:e,parent:t},e.innerHTML),u=x(e),a=t,f;while(!q(a.root)){if(!a.parent)break;a=a.parent}o.parent=a;f=a.tags[u];if(f){if(!i(f))a.tags[u]=[f];a.tags[u].push(o)}else{a.tags[u]=o}e.innerHTML="";n.push(o)}if(!e.isLoop)E(e,t,[])}})}function p(e,t,n){function r(e,t,r){if(t.indexOf(u(0))>=0){var i={dom:e,expr:t};n.push(L(i,r))}}_(e,function(e){var n=e.nodeType;if(n==3&&e.parentNode.tagName!="STYLE")r(e,e.nodeValue);if(n!=1)return;var i=e.getAttribute("each");if(i){c(e,t,i);return false}h(e.attributes,function(t){var n=t.name,i=n.split("__")[1];r(e,t.value,{attr:i||n,bool:i});if(i){y(e,n);return false}});if(q(e))return false})}function d(e,n,r){var o=t.observable(this),f=N(n.opts)||{},s=C(e.tmpl),c=n.parent,d=n.isLoop,m=n.item,g=[],b=[],y=n.root,x=e.fn,_=y.tagName.toLowerCase(),M={},A,E=/([\w\-]+)\s?=\s?['"]([^'"]+)["']/gim;if(x&&y._tag){y._tag.unmount(true)}this.isMounted=false;if(e.attrs){var S=e.attrs.match(E);h(S,function(e){var t=e.split(/\s?=\s?/);y.setAttribute(t[0],t[1].replace(/['"]/g,""))})}y._tag=this;this._id=w(~~((new Date).getTime()*Math.random()));L(this,{parent:c,root:y,opts:f,tags:{}},m);h(y.attributes,function(e){var t=e.value;if(u(/\{.*\}/).test(t))M[e.name]=t});if(s.innerHTML&&!/select|select|optgroup|tbody|tr/.test(_))s.innerHTML=k(s.innerHTML,r);function j(){h(y.attributes,function(e){f[e.name]=a(e.value,c||o)});h(Object.keys(M),function(e){f[e]=a(M[e],c||o)})}this.update=function(e){L(o,e);j();o.trigger("update",e);v(g,o,e);o.trigger("updated")};this.mixin=function(){h(arguments,function(e){e=typeof e=="string"?t.mixin(e):e;h(Object.keys(e),function(t){if(t!="init")o[t]=typeof e[t]=="function"?e[t].bind(o):e[t]});if(e.init)e.init.bind(o)()})};this.mount=function(){j();x&&x.call(o,f);H(true);p(s,o,g);if(!o.parent)o.update();o.trigger("premount");if(d){o.root=y=A=s.firstChild}else{while(s.firstChild)y.appendChild(s.firstChild);if(y.stub)o.root=y=c.root}if(!o.parent||o.parent.isMounted){o.isMounted=true;o.trigger("mount")}else o.parent.one("mount",function(){if(!T(o.root)){o.parent.isMounted=o.isMounted=true;o.trigger("mount")}})};this.unmount=function(e){var t=A||y,n=t.parentNode;if(n){if(c){if(i(c.tags[_])){h(c.tags[_],function(e,t){if(e._id==o._id)c.tags[_].splice(t,1)})}else c.tags[_]=undefined}else{while(t.firstChild)t.removeChild(t.firstChild)}if(!e)n.removeChild(t)}o.trigger("unmount");H();o.off("*");y._tag=null};function H(e){h(b,function(t){t[e?"mount":"unmount"]()});if(c){var t=e?"on":"off";if(d)c[t]("unmount",o.unmount);else c[t]("update",o.update)[t]("unmount",o.unmount)}}l(s,this,b)}function m(t,n,r,i,o){r[t]=function(t){t=t||e.event;if(!t.which)t.which=t.charCode||t.keyCode;if(!t.target)t.target=t.srcElement;try{t.currentTarget=r}catch(u){""}t.item=i._item?i._item:o;if(n.call(i,t)!==true&&!/radio|check/.test(r.type)){t.preventDefault&&t.preventDefault();t.returnValue=false}if(!t.preventUpdate){var a=o?i.parent:i;a.update()}}}function g(e,t,n){if(e){e.insertBefore(n,t);e.removeChild(t)}}function v(e,t,n){h(e,function(e,r){var i=e.dom,o=e.attr,u=a(e.expr,t),f=e.dom.parentNode;if(u==null)u="";if(f&&f.tagName=="TEXTAREA")u=u.replace(/riot-/g,"");if(e.value===u)return;e.value=u;if(!o)return i.nodeValue=u.toString();y(i,o);if(typeof u=="function"){m(o,u,i,t,n)}else if(o=="if"){var s=e.stub;if(u){if(s){g(s.parentNode,s,i);i.inStub=false;if(!T(i)){_(i,function(e){if(e._tag&&!e._tag.isMounted)e._tag.isMounted=!!e._tag.trigger("mount")})}}}else{s=e.stub=s||document.createTextNode("");g(i.parentNode,i,s);i.inStub=true}}else if(/^(show|hide)$/.test(o)){if(o=="hide")u=!u;i.style.display=u?"":"none"}else if(o=="value"){i.value=u}else if(o.slice(0,5)=="riot-"&&o!="riot-tag"){o=o.slice(5);u?i.setAttribute(o,u):y(i,o)}else{if(e.bool){i[o]=u;if(!u)return;u=o}if(typeof u!="object")i.setAttribute(o,u)}})}function h(e,t){for(var n=0,r=(e||[]).length,i;n<r;n++){i=e[n];if(i!=null&&t(i,n)===false)n--}return e}function b(e){return typeof e==="function"||false}function y(e,t){e.removeAttribute(t)}function w(e){return(e^e>>31)-(e>>31)}function x(e){var t=q(e),n=e.getAttribute("name"),r=n&&n.indexOf(u(0))<0?n:t.name;return r}function L(e){var t,n=arguments;for(var r=1;r<n.length;++r){if(t=n[r]){for(var i in t){e[i]=t[i]}}}return e}function C(e){var t=o&&o<10,n=/^\s*<([\w-]+)/.exec(e),r=n?n[1].toLowerCase():"",i=r==="th"||r==="td"?"tr":r==="tr"?"tbody":"div",u=M(i);u.stub=true;if(t){if(r==="optgroup")H(u,e);else if(r==="option")j(u,e);else if(i!=="div")S(u,e,r);else t=0}if(!t)u.innerHTML=e;return u}function _(e,t){if(e){if(t(e)===false)_(e.nextSibling,t);else{e=e.firstChild;while(e){_(e,t);e=e.nextSibling}}}}function T(e){while(e){if(e.inStub)return true;e=e.parentNode}return false}function M(e){return document.createElement(e)}function k(e,t){return e.replace(/<(yield)\/?>(<\/\1>)?/gim,t||"")}function A(e,t){return(t||document).querySelectorAll(e)}function N(e){function t(){}t.prototype=e;return new t}function E(e,t,n){h(e.attributes,function(r){if(e._visited)return;if(r.name==="id"||r.name==="name"){e._visited=true;var o,u=r.value;if(~n.indexOf(u))return;o=t[u];if(!o)t[u]=e;else i(o)?o.push(e):t[u]=[o,e]}})}function S(e,t,n){var r=M("div"),i=/td|th/.test(n)?3:2,o;r.innerHTML="<table>"+t+"</table>";o=r.firstChild;while(i--){o=o.firstChild}e.appendChild(o)}function j(e,t){var n=M("option"),r=/value=[\"'](.+?)[\"']/,i=/selected=[\"'](.+?)[\"']/,o=/each=[\"'](.+?)[\"']/,u=/if=[\"'](.+?)[\"']/,a=/>([^<]*)</,f=t.match(r),s=t.match(i),c=t.match(a),l=t.match(o),p=t.match(u);if(c){n.innerHTML=c[1]}else{n.innerHTML=t}if(f){n.value=f[1]}if(s){n.setAttribute("riot-selected",s[1])}if(l){n.setAttribute("each",l[1])}if(p){n.setAttribute("if",p[1])}e.appendChild(n)}function H(e,t){var n=M("optgroup"),r=/label=[\"'](.+?)[\"']/,i=/^<([^>]*)>/,o=/^<([^ \>]*)/,u=t.match(r),a=t.match(i),f=t.match(o),s=t;if(a){var c=t.slice(a[1].length+2,-f[1].length-3).trim();s=c}if(u){n.setAttribute("riot-label",u[1])}if(s){var l=M("div");j(l,s);n.appendChild(l.firstChild)}e.appendChild(n)}var O=[],$={},F;var R="riot-tag";function q(e){return $[e.getAttribute(R)||e.tagName.toLowerCase()]}function B(e){F=F||M("style");if(!document.head)return;if(F.styleSheet)F.styleSheet.cssText+=e;else F.innerHTML+=e;if(!F._rendered)if(F.styleSheet){document.body.appendChild(F)}else{var t=A("style[type=riot]")[0];if(t){t.parentNode.insertBefore(F,t);t.parentNode.removeChild(t)}else{document.head.appendChild(F)}}F._rendered=true}function D(e,t,n){var r=$[t],i=e._innerHTML=e._innerHTML||e.innerHTML;e.innerHTML="";if(r&&e)r=new d(r,{root:e,opts:n},i);if(r&&r.mount){r.mount();O.push(r);return r.on("unmount",function(){O.splice(O.indexOf(r),1)})}}t.tag=function(e,t,n,r,i){if(b(r)){i=r;if(/^[\w\-]+\s?=/.test(n)){r=n;n=""}else r=""}if(n){if(b(n))i=n;else B(n)}$[e]={name:e,tmpl:t,attrs:r,fn:i};return e};t.mount=function(e,t,i){var o,u,a=[];function f(e){var t="";h(e,function(e){t+=', *[riot-tag="'+e.trim()+'"]'});return t}function s(){var e=Object.keys($);return e+f(e)}function c(e){if(e.tagName){if(t&&!e.getAttribute(R))e.setAttribute(R,t);var n=D(e,t||e.getAttribute(R)||e.tagName.toLowerCase(),i);if(n)a.push(n)}else if(e.length){h(e,c)}}if(typeof t===r){i=t;t=0}if(typeof e===n){if(e==="*"){e=u=s()}else{e+=f(e.split(","))}o=A(e)}else o=e;if(t==="*"){t=u||s();if(o.tagName){o=A(t,o)}else{var l=[];h(o,function(e){l.push(A(t,e))});o=l}t=0}if(o.tagName)c(o);else h(o,c);return a};t.update=function(){return h(O,function(e){e.update()})};t.mountTo=t.mount;t.util={brackets:u,tmpl:a};if(typeof exports==="object")module.exports=t;else if(typeof define==="function"&&define.amd)define(function(){return t});else e.riot=t})(typeof window!="undefined"?window:undefined);(function(e){riot.parsers={html:{},css:{},js:{coffee:function(e){return CoffeeScript.compile(e,{bare:true})},es6:function(e){return babel.transform(e,{blacklist:["useStrict"]}).code},none:function(e){return e}}};riot.parsers.js.coffeescript=riot.parsers.js.coffee;var t=("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,"+"defaultchecked,defaultmuted,defaultselected,defer,disabled,draggable,enabled,formnovalidate,hidden,"+"indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,"+"pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,spellcheck,translate,truespeed,"+"typemustmatch,visible").split(","),n="area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr".split(","),r=["style","src","d"],i=/^<([\w\-]+)>(.*)<\/\1>/gim,o=/=({[^}]+})([\s\/\>])/g,u=/([\w\-]+)=(["'])([^\2]+?)\2/g,a=/{\s*([^}]+)\s*}/g,f=/^<([\w\-]+)\s?([^>]*)>([^\x00]*[\w\/}"']>$)?([^\x00]*?)^<\/\1>/gim,s=/<script(\s+type=['"]?([^>'"]+)['"]?)?>([^\x00]*?)<\/script>/gm,c=/<style(\s+type=['"]?([^>'"]+)['"]?|\s+scoped)?>([^\x00]*?)<\/style>/gm,l=/(^|\}|\{)\s*([^\{\}]+)\s*(?=\{)/g,p=/\/\*[^\x00]*?\*\//gm,d=/<!--.*?-->/g,m=/<([\w\-]+)([^>]*)\/\s*>/g,g=/^\s*\/\/.*$/gm,v=/\/\*[^\x00]*?\*\//gm,h=/(<input\s[^>]*?)type=['"]number['"]/gm;function b(e,t,n,r,i){return"riot.tag('"+e+"', '"+t+"'"+(n?", '"+n+"'":"")+(r?", '"+r.replace(/'/g,"\\'")+"'":"")+", function(opts) {"+i+"\n});"}function y(e,i,f){var s=riot.util.brackets;e=e.replace(s(o),'="$1"$2');e=i.whitespace?e.replace(/\n/g,"\\n"):e.replace(/\s+/g," ");e=e.trim().replace(d,"");e=e.replace(h,"$1riot-type="+s(0)+'"number"'+s(1));e=e.replace(u,function(e,n,i,o){if(o.indexOf(s(0))>=0){n=n.toLowerCase();if(r.indexOf(n)>=0)n="riot-"+n;else if(t.indexOf(n)>=0)n="__"+n}return n+'="'+o+'"'});if(i.expr){e=e.replace(s(a),function(e,t){var n=L(t,i,f).trim().replace(/\r?\n|\r/g,"").trim();if(n.slice(-1)==";")n=n.slice(0,-1);return s(0)+n+s(1)})}e=e.replace(m,function(e,t,r){var i="<"+t+(r?" "+r.trim():"")+">";if(n.indexOf(t.toLowerCase())==-1)i+="</"+t+">";return i});e=e.replace(/'/g,"\\'");e=e.replace(s(/\\{|\\}/g),"\\$&");if(i.compact)e=e.replace(/> </g,"><");return e}function w(e){e=e.replace(g,"").replace(v,"");var t=e.split("\n"),n="";t.forEach(function(e,r){var i=e.trim();if(i[0]!="}"&&i.indexOf("(")>0&&i.indexOf("function")==-1){var o=/[{}]/.exec(i.slice(-1)),u=o&&/(\s+)([\w]+)\s*\(([\w,\s]*)\)\s*\{/.exec(e);if(u&&!/^(if|while|switch|for|catch)$/.test(u[2])){t[r]=u[1]+"this."+u[2]+" = function("+u[3]+") {";if(o[0]=="}"){t[r]+=" "+i.slice(u[0].length-1,-1)+"}.bind(this)"}else{n=u[1]}}}if(e.slice(0,n.length+1)==n+"}"){t[r]=n+"}.bind(this);";n=""}});return t.join("\n")}function x(e,t,n){return t.replace(p,"").replace(l,function(t,n,r){return n+" "+r.split(/\s*,\s*/g).map(function(t){var n=t.trim().replace(/:scope\s*/,"");return n[0]=="@"||n=="from"||n=="to"||/%$/.test(n)?n:e+" "+n+', [riot-tag="'+e+'"] '+n}).join(",")}).trim()}function L(e,t,n){var r=t.parser||(n?riot.parsers.js[n]:w);if(!r)throw new Error('Parser not found "'+n+'"');return r(e,t)}function C(e,t){var n=riot.parsers.html[e];if(!n)throw new Error('Template parser not found "'+e+'"');return n(t)}function _(e,t,n){if(n=="scoped-css")e=x(t,e);else if(riot.parsers.css[n])e=riot.parsers.css[n](t,e);return e.replace(/\s+/g," ").replace(/\\/g,"\\\\").replace(/'/g,"\\'").trim()}function T(e,t){t=t||{};if(t.brackets)riot.settings.brackets=t.brackets;if(t.template)e=C(t.template,e);e=e.replace(i,function(e,n,r){return b(n,y(r,t),"","","")});return e.replace(f,function(e,n,r,i,o){i=i||"";var u=t.type;if(!o.trim()){i=i.replace(s,function(e,t,n,r){if(n)u=n.replace("text/","");o=r;return""})}var a="css",f="";i=i.replace(c,function(e,t,n,r){if(t&&t.trim()=="scoped")a="scoped-css";else if(n)a=n.replace("text/","");f=r;return""});return b(n,y(i,t,u),_(f,n,a),r,L(o,t,u))})}var M=e.document,k,A;function N(e,t){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState==4&&n.status==200)t(n.responseText)};n.open("GET",e,true);n.send("")}function E(e){var t=/[ \t]+/.exec(e);if(t)e=e.replace(new RegExp("^"+t[0],"gm"),"");return e}function S(e){var t=M.createElement("script"),n=M.documentElement;t.text=T(e);n.appendChild(t);n.removeChild(t)}function j(e){var t=M.querySelectorAll('script[type="riot/tag"]'),n=t.length;function r(){k.trigger("ready");A=true;e&&e()}if(!n){r()}else{[].map.call(t,function(e){var t=e.getAttribute("src");function i(e){S(e);n--;if(!n){r()}}return t?N(t,i):i(E(e.innerHTML))})}}riot.compile=function(e,t){if(typeof e=="string"){if(e.trim()[0]=="<"){var n=E(T(e));if(!t)S(n);return n}else{return N(e,function(e){var n=E(T(e));S(n);t&&t(n,e)})}}if(typeof e!="function")e=undefined;if(A)return e&&e();if(k){e&&k.on("ready",e)}else{k=riot.observable();j(e)}};var H=riot.mount;riot.mount=function(e,t,n){var r;riot.compile(function(){r=H(e,t,n)});return r};riot.mountTo=riot.mount})(this);