text: var Hogan={};(function(e,t){function a(e){return String(e===null||e===undefined?"":e)}function f(e){e=a(e);return u.test(e)?e.replace(n,"&").replace(r,"&lt;").replace(i,"&gt;").replace(s,"&#39;").replace(o,"&quot;"):e}e.Template=function(e,n,r,i){this.r=e||this.r;this.c=r;this.options=i;this.text=n||"";this.buf=t?[]:""};e.Template.prototype={r:function(e,t,n){return""},v:f,t:a,render:function(t,n,r){return this.ri([t],n||{},r)},ri:function(e,t,n){return this.r(e,t,n)},rp:function(e,t,n,r){var i=n[e];if(!i){return""}if(this.c&&typeof i=="string"){i=this.c.compile(i,this.options)}return i.ri(t,n,r)},rs:function(e,t,n){var r=e[e.length-1];if(!l(r)){n(e,t,this);return}for(var i=0;i<r.length;i++){e.push(r[i]);n(e,t,this);e.pop()}},s:function(e,t,n,r,i,s,o){var u;if(l(e)&&e.length===0){return false}if(typeof e=="function"){e=this.ls(e,t,n,r,i,s,o)}u=e===""||!!e;if(!r&&u&&t){t.push(typeof e=="object"?e:t[t.length-1])}return u},d:function(e,t,n,r){var i=e.split("."),s=this.f(i[0],t,n,r),o=null;if(e==="."&&l(t[t.length-2])){return t[t.length-1]}for(var u=1;u<i.length;u++){if(s&&typeof s=="object"&&i[u]in s){o=s;s=s[i[u]]}else{s=""}}if(r&&!s){return false}if(!r&&typeof s=="function"){t.push(o);s=this.lv(s,t,n);t.pop()}return s},f:function(e,t,n,r){var i=false,s=null,o=false;for(var u=t.length-1;u>=0;u--){s=t[u];if(s&&typeof s=="object"&&e in s){i=s[e];o=true;break}}if(!o){return r?false:""}if(!r&&typeof i=="function"){i=this.lv(i,t,n)}return i},ho:function(e,t,n,r,i){var s=this.c;var o=this.options;o.delimiters=i;var r=e.call(t,r);r=r==null?String(r):r.toString();this.b(s.compile(r,o).render(t,n));return false},b:t?function(e){this.buf.push(e)}:function(e){this.buf+=e},fl:t?function(){var e=this.buf.join("");this.buf=[];return e}:function(){var e=this.buf;this.buf="";return e},ls:function(e,t,n,r,i,s,o){var u=t[t.length-1],a=null;if(!r&&this.c&&e.length>0){return this.ho(e,u,n,this.text.substring(i,s),o)}a=e.call(u);if(typeof a=="function"){if(r){return true}else{if(this.c){return this.ho(a,u,n,this.text.substring(i,s),o)}}}return a},lv:function(e,t,n){var r=t[t.length-1];var i=e.call(r);if(typeof i=="function"){i=a(i.call(r));if(this.c&&~i.indexOf("{{")){return this.c.compile(i,this.options).render(r,n)}}return a(i)}};var n=/&/g,r=/</g,i=/>/g,s=/\'/g,o=/\"/g,u=/[&<>\"\']/;var l=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}})(typeof exports!=="undefined"?exports:Hogan);(function(e){function u(e){if(e.n.substr(e.n.length-1)==="}"){e.n=e.n.substring(0,e.n.length-1)}}function a(e){if(e.trim){return e.trim()}return e.replace(/^\s*|\s*$/g,"")}function f(e,t,n){if(t.charAt(n)!=e.charAt(0)){return false}for(var r=1,i=e.length;r<i;r++){if(t.charAt(n+r)!=e.charAt(r)){return false}}return true}function l(e,t,n,r){var i=[],s=null,o=null;while(e.length>0){o=e.shift();if(o.tag=="#"||o.tag=="^"||c(o,r)){n.push(o);o.nodes=l(e,o.tag,n,r);i.push(o)}else{if(o.tag=="/"){if(n.length===0){throw new Error("Closing tag without opener: /"+o.n)}s=n.pop();if(o.n!=s.n&&!h(o.n,s.n,r)){throw new Error("Nesting error: "+s.n+" vs. "+o.n)}s.end=o.i;return i}else{i.push(o)}}}if(n.length>0){throw new Error("missing closing tag: "+n.pop().n)}return i}function c(e,t){for(var n=0,r=t.length;n<r;n++){if(t[n].o==e.n){e.tag="#";return true}}}function h(e,t,n){for(var r=0,i=n.length;r<i;r++){if(n[r].c==e&&n[r].o==t){return true}}}function p(e){return e.replace(s,"\\\\").replace(n,'\\"').replace(r,"\\n").replace(i,"\\r")}function d(e){return~e.indexOf(".")?"d":"f"}function v(e){var t="";for(var n=0,r=e.length;n<r;n++){var i=e[n].tag;if(i=="#"){t+=m(e[n].nodes,e[n].n,d(e[n].n),e[n].i,e[n].end,e[n].otag+" "+e[n].ctag)}else{if(i=="^"){t+=g(e[n].nodes,e[n].n,d(e[n].n))}else{if(i=="<"||i==">"){t+=y(e[n])}else{if(i=="{"||i=="&"){t+=b(e[n].n,d(e[n].n))}else{if(i=="\n"){t+=E('"\\n"'+(e.length-1==n?"":" + i"))}else{if(i=="_v"){t+=w(e[n].n,d(e[n].n))}else{if(i===undefined){t+=E('"'+p(e[n])+'"')}}}}}}}}return t}function m(e,t,n,r,i,s){return"if(_.s(_."+n+'("'+p(t)+'",c,p,1),c,p,0,'+r+","+i+',"'+s+'")){_.rs(c,p,function(c,p,_){'+v(e)+"});c.pop();}"}function g(e,t,n){return"if(!_.s(_."+n+'("'+p(t)+'",c,p,1),c,p,1,0,0,"")){'+v(e)+"};"}function y(e){return'_.b(_.rp("'+p(e.n)+'",c,p,"'+(e.indent||"")+'"));'}function b(e,t){return"_.b(_.t(_."+t+'("'+p(e)+'",c,p,0)));'}function w(e,t){return"_.b(_.v(_."+t+'("'+p(e)+'",c,p,0)));'}function E(e){return"_.b("+e+");"}var t=/\S/,n=/\"/g,r=/\n/g,i=/\r/g,s=/\\/g,o={"#":1,"^":2,"/":3,"!":4,">":5,"<":6,"=":7,_v:8,"{":9,"&":10};e.scan=function(n,r){function S(){if(v.length>0){m.push(new String(v));v=""}}function x(){var e=true;for(var n=b;n<m.length;n++){e=m[n].tag&&o[m[n].tag]<o._v||!m[n].tag&&m[n].match(t)===null;if(!e){return false}}return e}function T(e,t){S();if(e&&x()){for(var n=b,r;n<m.length;n++){if(!m[n].tag){if((r=m[n+1])&&r.tag==">"){r.indent=m[n].toString()}m.splice(n,1)}}}else{if(!t){m.push({tag:"\n"})}}g=false;b=m.length}function N(e,t){var n="="+E,r=e.indexOf(n,t),i=a(e.substring(e.indexOf("=",t)+1,r)).split(" ");w=i[0];E=i[1];return r+n.length-1}var i=n.length,s=0,l=1,c=2,h=s,p=null,d=null,v="",m=[],g=false,y=0,b=0,w="{{",E="}}";if(r){r=r.split(" ");w=r[0];E=r[1]}for(y=0;y<i;y++){if(h==s){if(f(w,n,y)){--y;S();h=l}else{if(n.charAt(y)=="\n"){T(g)}else{v+=n.charAt(y)}}}else{if(h==l){y+=w.length-1;d=o[n.charAt(y+1)];p=d?n.charAt(y+1):"_v";if(p=="="){y=N(n,y);h=s}else{if(d){y++}h=c}g=y}else{if(f(E,n,y)){m.push({tag:p,n:a(v),otag:w,ctag:E,i:p=="/"?g-E.length:y+w.length});v="";y+=E.length-1;h=s;if(p=="{"){if(E=="}}"){y++}else{u(m[m.length-1])}}}else{v+=n.charAt(y)}}}}T(g,true);return m};e.generate=function(t,n,r){var i='var _=this;_.b(i=i||"");'+v(t)+"return _.fl();";if(r.asString){return"function(c,p,i){"+i+";}"}return new e.Template(new Function("c","p","i",i),n,e,r)};e.parse=function(e,t,n){n=n||{};return l(e,"",[],n.sectionTags||[])},e.cache={};e.compile=function(e,t){t=t||{};var n=e+"||"+!!t.asString;var r=this.cache[n];if(r){return r}r=this.generate(this.parse(this.scan(e,t.delimiters),e,t),e,t);return this.cache[n]=r}})(typeof exports!=="undefined"?exports:Hogan)