/*
YUI 3.6.0pr3 (build 1)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("handlebars-compiler",function(e){
/*!
Handlebars.js - Copyright (C) 2011 Yehuda Katz
https://raw.github.com/wycats/handlebars.js/master/LICENSE
*/
var d=e.Handlebars;var a=(function(){var l={trace:function h(){},yy:{},symbols_:{"error":2,"root":3,"program":4,"EOF":5,"statements":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"OPEN_PARTIAL":24,"params":25,"hash":26,"param":27,"STRING":28,"INTEGER":29,"BOOLEAN":30,"hashSegments":31,"hashSegment":32,"ID":33,"EQUALS":34,"pathSegments":35,"SEP":36,"$accept":0,"$end":1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function g(m,p,q,t,s,o,r){var n=o.length-1;switch(s){case 1:return o[n-1];break;case 2:this.$=new t.ProgramNode(o[n-2],o[n]);break;case 3:this.$=new t.ProgramNode(o[n]);break;case 4:this.$=new t.ProgramNode([]);break;case 5:this.$=[o[n]];break;case 6:o[n-1].push(o[n]);this.$=o[n-1];break;case 7:this.$=new t.BlockNode(o[n-2],o[n-1].inverse,o[n-1],o[n]);break;case 8:this.$=new t.BlockNode(o[n-2],o[n-1],o[n-1].inverse,o[n]);break;case 9:this.$=o[n];break;case 10:this.$=o[n];break;case 11:this.$=new t.ContentNode(o[n]);break;case 12:this.$=new t.CommentNode(o[n]);break;case 13:this.$=new t.MustacheNode(o[n-1][0],o[n-1][1]);break;case 14:this.$=new t.MustacheNode(o[n-1][0],o[n-1][1]);break;case 15:this.$=o[n-1];break;case 16:this.$=new t.MustacheNode(o[n-1][0],o[n-1][1]);break;case 17:this.$=new t.MustacheNode(o[n-1][0],o[n-1][1],true);break;case 18:this.$=new t.PartialNode(o[n-1]);break;case 19:this.$=new t.PartialNode(o[n-2],o[n-1]);break;case 20:break;case 21:this.$=[[o[n-2]].concat(o[n-1]),o[n]];break;case 22:this.$=[[o[n-1]].concat(o[n]),null];break;case 23:this.$=[[o[n-1]],o[n]];break;case 24:this.$=[[o[n]],null];break;case 25:o[n-1].push(o[n]);this.$=o[n-1];break;case 26:this.$=[o[n]];break;case 27:this.$=o[n];break;case 28:this.$=new t.StringNode(o[n]);break;case 29:this.$=new t.IntegerNode(o[n]);break;case 30:this.$=new t.BooleanNode(o[n]);break;case 31:this.$=new t.HashNode(o[n]);break;case 32:o[n-1].push(o[n]);this.$=o[n-1];break;case 33:this.$=[o[n]];break;case 34:this.$=[o[n-2],o[n]];break;case 35:this.$=[o[n-2],new t.StringNode(o[n])];break;case 36:this.$=[o[n-2],new t.IntegerNode(o[n])];break;case 37:this.$=[o[n-2],new t.BooleanNode(o[n])];break;case 38:this.$=new t.IdNode(o[n]);break;case 39:o[n-2].push(o[n]);this.$=o[n-2];break;case 40:this.$=[o[n]];break;}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function i(n,m){throw new Error(n);
},parse:function k(w){var D=this,t=[0],M=[null],y=[],N=this.table,n="",x=0,K=0,q=0,v=2,A=1;this.lexer.setInput(w);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined"){this.lexer.yylloc={};}var o=this.lexer.yylloc;y.push(o);if(typeof this.yy.parseError==="function"){this.parseError=this.yy.parseError;}function C(p){t.length=t.length-2*p;M.length=M.length-p;y.length=y.length-p;}function B(){var p;p=D.lexer.lex()||1;if(typeof p!=="number"){p=D.symbols_[p]||p;}return p;}var J,F,s,I,O,z,H={},E,L,m,u;while(true){s=t[t.length-1];if(this.defaultActions[s]){I=this.defaultActions[s];}else{if(J===null||typeof J=="undefined"){J=B();}I=N[s]&&N[s][J];}_handle_error:if(typeof I==="undefined"||!I.length||!I[0]){var G="";if(!q){u=[];for(E in N[s]){if(this.terminals_[E]&&E>2){u.push("'"+this.terminals_[E]+"'");}}if(this.lexer.showPosition){G="Parse error on line "+(x+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+u.join(", ")+", got '"+(this.terminals_[J]||J)+"'";}else{G="Parse error on line "+(x+1)+": Unexpected "+(J==1?"end of input":("'"+(this.terminals_[J]||J)+"'"));}this.parseError(G,{text:this.lexer.match,token:this.terminals_[J]||J,line:this.lexer.yylineno,loc:o,expected:u});}if(q==3){if(J==A){throw new Error(G||"Parsing halted.");}K=this.lexer.yyleng;n=this.lexer.yytext;x=this.lexer.yylineno;o=this.lexer.yylloc;J=B();}while(1){if((v.toString()) in N[s]){break;}if(s===0){throw new Error(G||"Parsing halted.");}C(1);s=t[t.length-1];}F=J==2?null:J;J=v;s=t[t.length-1];I=N[s]&&N[s][v];q=3;}if(I[0] instanceof Array&&I.length>1){throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+J);}switch(I[0]){case 1:t.push(J);M.push(this.lexer.yytext);y.push(this.lexer.yylloc);t.push(I[1]);J=null;if(!F){K=this.lexer.yyleng;n=this.lexer.yytext;x=this.lexer.yylineno;o=this.lexer.yylloc;if(q>0){q--;}}else{J=F;F=null;}break;case 2:L=this.productions_[I[1]][1];H.$=M[M.length-L];H._$={first_line:y[y.length-(L||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(L||1)].first_column,last_column:y[y.length-1].last_column};z=this.performAction.call(H,n,K,x,this.yy,I[1],M,y);if(typeof z!=="undefined"){return z;}if(L){t=t.slice(0,-1*L*2);M=M.slice(0,-1*L);y=y.slice(0,-1*L);}t.push(this.productions_[I[1]][0]);M.push(H.$);y.push(H._$);m=N[t[t.length-2]][t[t.length-1]];t.push(m);break;case 3:return true;}}return true;}};var f=(function(){var p=({EOF:1,parseError:function r(u,t){if(this.yy.parser){this.yy.parser.parseError(u,t);}else{throw new Error(u);}},setInput:function(t){this._input=t;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};return this;},input:function(){var u=this._input[0];this.yytext+=u;this.yyleng++;this.match+=u;this.matched+=u;var t=u.match(/\n/);if(t){this.yylineno++;}this._input=this._input.slice(1);return u;},unput:function(t){this._input=t+this._input;return this;},more:function(){this._more=true;return this;},less:function(t){this._input=this.match.slice(t)+this._input;},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"");},upcomingInput:function(){var t=this.match;if(t.length<20){t+=this._input.substr(0,20-t.length);}return(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"");},showPosition:function(){var t=this.pastInput();var u=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+u+"^";},next:function(){if(this.done){return this.EOF;}if(!this._input){this.done=true;}var z,x,u,w,v,t;if(!this._more){this.yytext="";this.match="";}var A=this._currentRules();for(var y=0;y<A.length;y++){u=this._input.match(this.rules[A[y]]);if(u&&(!x||u[0].length>x[0].length)){x=u;w=y;if(!this.options.flex){break;}}}if(x){t=x[0].match(/\n.*/g);if(t){this.yylineno+=t.length;}this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:t?t[t.length-1].length-1:this.yylloc.last_column+x[0].length};this.yytext+=x[0];this.match+=x[0];this.yyleng=this.yytext.length;this._more=false;this._input=this._input.slice(x[0].length);this.matched+=x[0];z=this.performAction.call(this,this.yy,this,A[w],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input){this.done=false;}if(z){return z;}else{return;}}if(this._input===""){return this.EOF;}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno});}},lex:function m(){var t=this.next();if(typeof t!=="undefined"){return t;}else{return this.lex();}},begin:function n(t){this.conditionStack.push(t);},popState:function s(){return this.conditionStack.pop();},_currentRules:function q(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;},topState:function(){return this.conditionStack[this.conditionStack.length-2];},pushState:function n(t){this.begin(t);}});p.options={};p.performAction=function o(x,u,w,t){var v=t;switch(w){case 0:if(u.yytext.slice(-1)!=="\\"){this.begin("mu");}if(u.yytext.slice(-1)==="\\"){u.yytext=u.yytext.substr(0,u.yyleng-1),this.begin("emu");}if(u.yytext){return 14;}break;case 1:return 14;break;case 2:this.popState();return 14;break;case 3:return 24;break;case 4:return 16;break;case 5:return 20;break;case 6:return 19;break;case 7:return 19;break;case 8:return 23;break;case 9:return 23;break;case 10:u.yytext=u.yytext.substr(3,u.yyleng-5);this.popState();return 15;break;case 11:return 22;break;case 12:return 34;break;case 13:return 33;break;case 14:return 33;break;case 15:return 36;break;case 16:break;case 17:this.popState();return 18;break;case 18:this.popState();return 18;break;case 19:u.yytext=u.yytext.substr(1,u.yyleng-2).replace(/\\"/g,'"');return 28;break;case 20:return 30;break;case 21:return 30;break;
case 22:return 29;break;case 23:return 33;break;case 24:u.yytext=u.yytext.substr(1,u.yyleng-2);return 33;break;case 25:return"INVALID";break;case 26:return 5;break;}};p.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{)))/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[} ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:[0-9]+(?=[}\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];p.conditions={"mu":{"rules":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"INITIAL":{"rules":[0,1,26],"inclusive":true}};return p;})();l.lexer=f;function j(){this.yy={};}j.prototype=l;l.Parser=j;return new j;})();if(typeof require!=="undefined"&&typeof exports!=="undefined"){exports.parser=a;exports.Parser=a.Parser;exports.parse=function(){return a.parse.apply(a,arguments);};exports.main=function b(f){if(!f[1]){throw new Error("Usage: "+f[0]+" FILE");}var h,g;if(typeof process!=="undefined"){h=require("fs").readFileSync(require("path").resolve(f[1]),"utf8");}else{h=require("file").path(require("file").cwd()).join(f[1]).read({charset:"utf-8"});}return exports.parser.parse(h);};if(typeof module!=="undefined"&&require.main===module){exports.main(typeof process!=="undefined"?process.argv.slice(1):require("system").args);}}d.Parser=a;d.parse=function(f){d.Parser.yy=d.AST;return d.Parser.parse(f);};d.print=function(f){return new d.PrintVisitor().accept(f);};d.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(g,f){}};d.log=function(g,f){d.logger.log(g,f);};(function(){d.AST={};d.AST.ProgramNode=function(h,g){this.type="program";this.statements=h;if(g){this.inverse=new d.AST.ProgramNode(g);}};d.AST.MustacheNode=function(l,i,h){this.type="mustache";this.escaped=!h;this.hash=i;var k=this.id=l[0];var j=this.params=l.slice(1);var g=this.eligibleHelper=k.isSimple;this.isHelper=g&&(j.length||i);};d.AST.PartialNode=function(h,g){this.type="partial";this.id=h;this.context=g;};var f=function(g,h){if(g.original!==h.original){throw new d.Exception(g.original+" doesn't match "+h.original);}};d.AST.BlockNode=function(i,h,g,j){f(i.id,j);this.type="block";this.mustache=i;this.program=h;this.inverse=g;if(this.inverse&&!this.program){this.isInverse=true;}};d.AST.ContentNode=function(g){this.type="content";this.string=g;};d.AST.HashNode=function(g){this.type="hash";this.pairs=g;};d.AST.IdNode=function(m){this.type="ID";this.original=m.join(".");var j=[],n=0;for(var k=0,g=m.length;k<g;k++){var h=m[k];if(h===".."){n++;}else{if(h==="."||h==="this"){this.isScoped=true;}else{j.push(h);}}}this.parts=j;this.string=j.join(".");this.depth=n;this.isSimple=m.length===1&&!this.isScoped&&n===0;};d.AST.StringNode=function(g){this.type="STRING";this.string=g;};d.AST.IntegerNode=function(g){this.type="INTEGER";this.integer=g;};d.AST.BooleanNode=function(g){this.type="BOOLEAN";this.bool=g;};d.AST.CommentNode=function(g){this.type="comment";this.comment=g;};})();d.Compiler=function(){};d.JavaScriptCompiler=function(){};(function(n,m){n.prototype={compiler:n,disassemble:function(){var t=this.opcodes,s,q=[],v,u;for(var r=0,o=t.length;r<o;r++){s=t[r];if(s.opcode==="DECLARE"){q.push("DECLARE "+s.name+"="+s.value);}else{v=[];for(var p=0;p<s.args.length;p++){u=s.args[p];if(typeof u==="string"){u='"'+u.replace("\n","\\n")+'"';}v.push(u);}q.push(s.opcode+" "+v.join(" "));}}return q.join("\n");},guid:0,compile:function(i,o){this.children=[];this.depths={list:[]};this.options=o;var p=this.options.knownHelpers;this.options.knownHelpers={"helperMissing":true,"blockHelperMissing":true,"each":true,"if":true,"unless":true,"with":true,"log":true};if(p){for(var l in p){this.options.knownHelpers[l]=p[l];}}return this.program(i);},accept:function(i){return this[i.type](i);},program:function(q){var p=q.statements,s;this.opcodes=[];for(var r=0,o=p.length;r<o;r++){s=p[r];this[s.type](s);}this.isSimple=o===1;this.depths.list=this.depths.list.sort(function(l,i){return l-i;});return this;},compileProgram:function(q){var o=new this.compiler().compile(q,this.options);var r=this.guid++,t;this.usePartial=this.usePartial||o.usePartial;this.children[r]=o;for(var s=0,p=o.depths.list.length;s<p;s++){t=o.depths.list[s];if(t<2){continue;}else{this.addDepth(t-1);}}return r;},block:function(q){var p=q.mustache,l=q.program,i=q.inverse;if(l){l=this.compileProgram(l);}if(i){i=this.compileProgram(i);}var o=this.classifyMustache(p);if(o==="helper"){this.helperMustache(p,l,i);}else{if(o==="simple"){this.simpleMustache(p);this.opcode("pushProgram",l);this.opcode("pushProgram",i);this.opcode("pushLiteral","{}");this.opcode("blockValue");}else{this.ambiguousMustache(p,l,i);this.opcode("pushProgram",l);this.opcode("pushProgram",i);this.opcode("pushLiteral","{}");this.opcode("ambiguousBlockValue");}}this.opcode("append");},hash:function(r){var q=r.pairs,t,s;this.opcode("push","{}");for(var p=0,o=q.length;p<o;p++){t=q[p];s=t[1];this.accept(s);this.opcode("assignToHash",t[0]);}},partial:function(i){var l=i.id;this.usePartial=true;if(i.context){this.ID(i.context);}else{this.opcode("push","depth0");}this.opcode("invokePartial",l.original);this.opcode("append");},content:function(i){this.opcode("appendContent",i.string);},mustache:function(o){var i=this.options;var l=this.classifyMustache(o);if(l==="simple"){this.simpleMustache(o);}else{if(l==="helper"){this.helperMustache(o);}else{this.ambiguousMustache(o);}}if(o.escaped&&!i.noEscape){this.opcode("appendEscaped");}else{this.opcode("append");}},ambiguousMustache:function(p,l,i){var q=p.id,o=q.parts[0];this.opcode("getContext",q.depth);this.opcode("pushProgram",l);this.opcode("pushProgram",i);this.opcode("invokeAmbiguous",o);},simpleMustache:function(s,q,p){var t=s.id;this.addDepth(t.depth);this.opcode("getContext",t.depth);
if(t.parts.length){this.opcode("lookupOnContext",t.parts[0]);for(var r=1,o=t.parts.length;r<o;r++){this.opcode("lookup",t.parts[r]);}}else{this.opcode("pushContext");}this.opcode("resolvePossibleLambda");},helperMustache:function(p,l,i){var q=this.setupFullMustacheParams(p,l,i),o=p.id.parts[0];if(this.options.knownHelpers[o]){this.opcode("invokeKnownHelper",q.length,o);}else{if(this.knownHelpersOnly){throw new Error("You specified knownHelpersOnly, but used the unknown helper "+o);}else{this.opcode("invokeHelper",q.length,o);}}},ID:function(q){this.addDepth(q.depth);this.opcode("getContext",q.depth);this.opcode("lookupOnContext",q.parts[0]);for(var p=1,o=q.parts.length;p<o;p++){this.opcode("lookup",q.parts[p]);}},STRING:function(i){this.opcode("pushString",i.string);},INTEGER:function(i){this.opcode("pushLiteral",i.integer);},BOOLEAN:function(i){this.opcode("pushLiteral",i.bool);},comment:function(){},opcode:function(i){this.opcodes.push({opcode:i,args:[].slice.call(arguments,1)});},declare:function(i,l){this.opcodes.push({opcode:"DECLARE",name:i,value:l});},addDepth:function(i){if(i===0){return;}if(!this.depths[i]){this.depths[i]=true;this.depths.list.push(i);}},classifyMustache:function(p){var o=p.isHelper;var q=p.eligibleHelper;var l=this.options;if(q&&!o){var i=p.id.parts[0];if(l.knownHelpers[i]){o=true;}else{if(l.knownHelpersOnly){q=false;}}}if(o){return"helper";}else{if(q){return"ambiguous";}else{return"simple";}}},pushParams:function(p){var l=p.length,o;while(l--){o=p[l];if(this.options.stringParams){if(o.depth){this.addDepth(o.depth);}this.opcode("getContext",o.depth||0);this.opcode("pushStringParam",o.string);}else{this[o.type](o);}}},setupMustacheParams:function(i){var l=i.params;this.pushParams(l);if(i.hash){this.hash(i.hash);}else{this.opcode("pushLiteral","{}");}return l;},setupFullMustacheParams:function(o,l,i){var p=o.params;this.pushParams(p);this.opcode("pushProgram",l);this.opcode("pushProgram",i);if(o.hash){this.hash(o.hash);}else{this.opcode("pushLiteral","{}");}return p;}};var h=function(i){this.value=i;};m.prototype={nameLookup:function(o,i,l){if(/^[0-9]+$/.test(i)){return o+"["+i+"]";}else{if(m.isValidJavaScriptVariableName(i)){return o+"."+i;}else{return o+"['"+i+"']";}}},appendToBuffer:function(i){if(this.environment.isSimple){return"return "+i+";";}else{return"buffer += "+i+";";}},initializeBuffer:function(){return this.quotedString("");},namespace:"Handlebars",compile:function(i,l,p,o){this.environment=i;this.options=l||{};d.log(d.logger.DEBUG,this.environment.disassemble()+"\n\n");this.name=this.environment.name;this.isChild=!!p;this.context=p||{programs:[],aliases:{}};this.preamble();this.stackSlot=0;this.stackVars=[];this.registers={list:[]};this.compileStack=[];this.compileChildren(i,l);var r=i.opcodes,q;this.i=0;for(g=r.length;this.i<g;this.i++){q=r[this.i];if(q.opcode==="DECLARE"){this[q.name]=q.value;}else{this[q.opcode].apply(this,q.args);}}return this.createFunctionContext(o);},nextOpcode:function(){var l=this.environment.opcodes,i=l[this.i+1];return l[this.i+1];},eat:function(i){this.i=this.i+1;},preamble:function(){var i=[];if(!this.isChild){var l=this.namespace;var o="helpers = helpers || "+l+".helpers;";if(this.environment.usePartial){o=o+" partials = partials || "+l+".partials;";}i.push(o);}else{i.push("");}if(!this.environment.isSimple){i.push(", buffer = "+this.initializeBuffer());}else{i.push("");}this.lastContext=0;this.source=i;},createFunctionContext:function(t){var u=this.stackVars.concat(this.registers.list);if(u.length>0){this.source[1]=this.source[1]+", "+u.join(", ");}if(!this.isChild){var p=[];for(var s in this.context.aliases){this.source[1]=this.source[1]+", "+s+"="+this.context.aliases[s];}}if(this.source[1]){this.source[1]="var "+this.source[1].substring(2)+";";}if(!this.isChild){this.source[1]+="\n"+this.context.programs.join("\n")+"\n";}if(!this.environment.isSimple){this.source.push("return buffer;");}var v=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var r=0,o=this.environment.depths.list.length;r<o;r++){v.push("depth"+this.environment.depths.list[r]);}if(t){v.push(this.source.join("\n  "));return Function.apply(this,v);}else{var q="function "+(this.name||"")+"("+v.join(",")+") {\n  "+this.source.join("\n  ")+"}";d.log(d.logger.DEBUG,q+"\n\n");return q;}},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var i=["depth0"];this.setupParams(0,i);this.replaceStack(function(l){i.splice(1,0,l);return l+" = blockHelperMissing.call("+i.join(", ")+")";});},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var l=["depth0"];this.setupParams(0,l);var i=this.topStack();l.splice(1,0,i);this.source.push("if (!"+this.lastHelper+") { "+i+" = blockHelperMissing.call("+l.join(", ")+"); }");},appendContent:function(i){this.source.push(this.appendToBuffer(this.quotedString(i)));},append:function(){var i=this.popStack();this.source.push("if("+i+" || "+i+" === 0) { "+this.appendToBuffer(i)+" }");if(this.environment.isSimple){this.source.push("else { "+this.appendToBuffer("''")+" }");}},appendEscaped:function(){var l=this.nextOpcode(),i="";this.context.aliases.escapeExpression="this.escapeExpression";if(l&&l.opcode==="appendContent"){i=" + "+this.quotedString(l.args[0]);this.eat(l);}this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+i));},getContext:function(i){if(this.lastContext!==i){this.lastContext=i;}},lookupOnContext:function(i){this.pushStack(this.nameLookup("depth"+this.lastContext,i,"context"));},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext);},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"';this.replaceStack(function(i){return"typeof "+i+" === functionType ? "+i+"() : "+i;});},lookup:function(i){this.replaceStack(function(l){return l+" == null || "+l+" === false ? "+l+" : "+this.nameLookup(l,i,"context");});},pushStringParam:function(i){this.pushStackLiteral("depth"+this.lastContext);
this.pushString(i);},pushString:function(i){this.pushStackLiteral(this.quotedString(i));},push:function(i){this.pushStack(i);},pushLiteral:function(i){this.pushStackLiteral(i);},pushProgram:function(i){if(i!=null){this.pushStackLiteral(this.programExpression(i));}else{this.pushStackLiteral(null);}},invokeHelper:function(o,i){this.context.aliases.helperMissing="helpers.helperMissing";var l=this.lastHelper=this.setupHelper(o,i);this.register("foundHelper",l.name);this.pushStack("foundHelper ? foundHelper.call("+l.callParams+") "+": helperMissing.call("+l.helperMissingParams+")");},invokeKnownHelper:function(o,i){var l=this.setupHelper(o,i);this.pushStack(l.name+".call("+l.callParams+")");},invokeAmbiguous:function(i){this.context.aliases.functionType='"function"';this.pushStackLiteral("{}");var l=this.setupHelper(0,i);var o=this.lastHelper=this.nameLookup("helpers",i,"helper");this.register("foundHelper",o);var q=this.nameLookup("depth"+this.lastContext,i,"context");var p=this.nextStack();this.source.push("if (foundHelper) { "+p+" = foundHelper.call("+l.callParams+"); }");this.source.push("else { "+p+" = "+q+"; "+p+" = typeof "+p+" === functionType ? "+p+"() : "+p+"; }");},invokePartial:function(i){var l=[this.nameLookup("partials",i,"partial"),"'"+i+"'",this.popStack(),"helpers","partials"];if(this.options.data){l.push("data");}this.context.aliases.self="this";this.pushStack("self.invokePartial("+l.join(", ")+");");},assignToHash:function(i){var l=this.popStack();var o=this.topStack();this.source.push(o+"['"+i+"'] = "+l+";");},compiler:m,compileChildren:function(o,r){var t=o.children,v,u;for(var s=0,p=t.length;s<p;s++){v=t[s];u=new this.compiler();this.context.programs.push("");var q=this.context.programs.length;v.index=q;v.name="program"+q;this.context.programs[q]=u.compile(v,r,this.context);}},programExpression:function(p){this.context.aliases.self="this";if(p==null){return"self.noop";}var u=this.environment.children[p],t=u.depths.list,s;var r=[u.index,u.name,"data"];for(var q=0,o=t.length;q<o;q++){s=t[q];if(s===1){r.push("depth0");}else{r.push("depth"+(s-1));}}if(t.length===0){return"self.program("+r.join(", ")+")";}else{r.shift();return"self.programWithDepth("+r.join(", ")+")";}},register:function(i,l){this.useRegister(i);this.source.push(i+" = "+l+";");},useRegister:function(i){if(!this.registers[i]){this.registers[i]=true;this.registers.list.push(i);}},pushStackLiteral:function(i){this.compileStack.push(new h(i));return i;},pushStack:function(i){this.source.push(this.incrStack()+" = "+i+";");this.compileStack.push("stack"+this.stackSlot);return"stack"+this.stackSlot;},replaceStack:function(l){var i=l.call(this,this.topStack());this.source.push(this.topStack()+" = "+i+";");return"stack"+this.stackSlot;},nextStack:function(i){var l=this.incrStack();this.compileStack.push("stack"+this.stackSlot);return l;},incrStack:function(){this.stackSlot++;if(this.stackSlot>this.stackVars.length){this.stackVars.push("stack"+this.stackSlot);}return"stack"+this.stackSlot;},popStack:function(){var i=this.compileStack.pop();if(i instanceof h){return i.value;}else{this.stackSlot--;return i;}},topStack:function(){var i=this.compileStack[this.compileStack.length-1];if(i instanceof h){return i.value;}else{return i;}},quotedString:function(i){return'"'+i.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"';},setupHelper:function(p,l){var o=[];this.setupParams(p,o);var i=this.nameLookup("helpers",l,"helper");return{params:o,name:i,callParams:["depth0"].concat(o).join(", "),helperMissingParams:["depth0",this.quotedString(l)].concat(o).join(", ")};},setupParams:function(t,s){var p=[],u=[],r,l,o;p.push("hash:"+this.popStack());l=this.popStack();o=this.popStack();if(o||l){if(!o){this.context.aliases.self="this";o="self.noop";}if(!l){this.context.aliases.self="this";l="self.noop";}p.push("inverse:"+l);p.push("fn:"+o);}for(var q=0;q<t;q++){r=this.popStack();s.push(r);if(this.options.stringParams){u.push(this.popStack());}}if(this.options.stringParams){p.push("contexts:["+u.join(",")+"]");}if(this.options.data){p.push("data:data");}s.push("{"+p.join(",")+"}");return s.join(", ");}};var f=("break else new var"+" case finally return void"+" catch for switch while"+" continue function this with"+" default if throw"+" delete in try"+" do instanceof typeof"+" abstract enum int short"+" boolean export interface static"+" byte extends long super"+" char final native synchronized"+" class float package throws"+" const goto private transient"+" debugger implements protected volatile"+" double import public let yield").split(" ");var k=m.RESERVED_WORDS={};for(var j=0,g=f.length;j<g;j++){k[f[j]]=true;}m.isValidJavaScriptVariableName=function(i){if(!m.RESERVED_WORDS[i]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(i)){return true;}return false;};})(d.Compiler,d.JavaScriptCompiler);d.precompile=function(i,h){h=h||{};var g=d.parse(i);var f=new d.Compiler().compile(g,h);return new d.JavaScriptCompiler().compile(f,h);};d.compile=function(g,f){f=f||{};var i;function h(){var l=d.parse(g);var k=new d.Compiler().compile(l,f);var j=new d.JavaScriptCompiler().compile(k,f,undefined,true);return d.template(j);}return function(k,j){if(!i){i=h();}return i.call(this,k,j);};};var c=["debug","info","warn","error"];d.logger.log=function(g,f){};d.render=function(g,h,f){return d.compile(g)(h,f);};},"3.6.0pr3",{requires:["handlebars-base"]});