Best JavaScript code snippet using storybook-root
handlebars-compiler-coverage.js
Source:handlebars-compiler-coverage.js
1/*2YUI 3.7.3 (build 5687)3Copyright 2012 Yahoo! Inc. All rights reserved.4Licensed under the BSD License.5http://yuilibrary.com/license/6*/7if (typeof _yuitest_coverage == "undefined"){8 _yuitest_coverage = {};9 _yuitest_coverline = function(src, line){10 var coverage = _yuitest_coverage[src];11 if (!coverage.lines[line]){12 coverage.calledLines++;13 }14 coverage.lines[line]++;15 };16 _yuitest_coverfunc = function(src, name, line){17 var coverage = _yuitest_coverage[src],18 funcId = name + ":" + line;19 if (!coverage.functions[funcId]){20 coverage.calledFunctions++;21 }22 coverage.functions[funcId]++;23 };24}25_yuitest_coverage["build/handlebars-compiler/handlebars-compiler.js"] = {26 lines: {},27 functions: {},28 coveredLines: 0,29 calledLines: 0,30 coveredFunctions: 0,31 calledFunctions: 0,32 path: "build/handlebars-compiler/handlebars-compiler.js",33 code: []34};35_yuitest_coverage["build/handlebars-compiler/handlebars-compiler.js"].code=["YUI.add('handlebars-compiler', function (Y, NAME) {","","/*!","Handlebars.js - Copyright (C) 2011 Yehuda Katz","https://raw.github.com/wycats/handlebars.js/master/LICENSE","*/","// This file contains code that will be inserted at the beginning of the","// handlebars-compiler module.","","// This is necessary because the Y.Handlebars object is created in the","// handlebars-base module, but the native Handlebars code expects to use a local","// Handlebars reference.","var Handlebars = Y.Handlebars;","/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */","","/* Jison generated parser */","var handlebars = (function(){","var parser = {trace: function trace() { },","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 anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {","","var $0 = $$.length - 1;","switch (yystate) {","case 1: return $$[$0-1]; ","break;","case 2: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]); ","break;","case 3: this.$ = new yy.ProgramNode($$[$0]); ","break;","case 4: this.$ = new yy.ProgramNode([]); ","break;","case 5: this.$ = [$$[$0]]; ","break;","case 6: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; ","break;","case 7: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]); ","break;","case 8: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]); ","break;","case 9: this.$ = $$[$0]; ","break;","case 10: this.$ = $$[$0]; ","break;","case 11: this.$ = new yy.ContentNode($$[$0]); ","break;","case 12: this.$ = new yy.CommentNode($$[$0]); ","break;","case 13: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); ","break;","case 14: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); ","break;","case 15: this.$ = $$[$0-1]; ","break;","case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); ","break;","case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true); ","break;","case 18: this.$ = new yy.PartialNode($$[$0-1]); ","break;","case 19: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]); ","break;","case 20: ","break;","case 21: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]]; ","break;","case 22: this.$ = [[$$[$0-1]].concat($$[$0]), null]; ","break;","case 23: this.$ = [[$$[$0-1]], $$[$0]]; ","break;","case 24: this.$ = [[$$[$0]], null]; ","break;","case 25: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; ","break;","case 26: this.$ = [$$[$0]]; ","break;","case 27: this.$ = $$[$0]; ","break;","case 28: this.$ = new yy.StringNode($$[$0]); ","break;","case 29: this.$ = new yy.IntegerNode($$[$0]); ","break;","case 30: this.$ = new yy.BooleanNode($$[$0]); ","break;","case 31: this.$ = new yy.HashNode($$[$0]); ","break;","case 32: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; ","break;","case 33: this.$ = [$$[$0]]; ","break;","case 34: this.$ = [$$[$0-2], $$[$0]]; ","break;","case 35: this.$ = [$$[$0-2], new yy.StringNode($$[$0])]; ","break;","case 36: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])]; ","break;","case 37: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])]; ","break;","case 38: this.$ = new yy.IdNode($$[$0]); ","break;","case 39: $$[$0-2].push($$[$0]); this.$ = $$[$0-2]; ","break;","case 40: this.$ = [$$[$0]]; ","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 parseError(str, hash) {"," throw new Error(str);","},","parse: function parse(input) {"," var self = this,"," stack = [0],"," vstack = [null], // semantic value stack"," lstack = [], // location stack"," table = this.table,"," yytext = '',"," yylineno = 0,"," yyleng = 0,"," recovering = 0,"," TERROR = 2,"," EOF = 1;",""," //this.reductionCount = this.shiftCount = 0;",""," this.lexer.setInput(input);"," this.lexer.yy = this.yy;"," this.yy.lexer = this.lexer;"," this.yy.parser = this;"," if (typeof this.lexer.yylloc == 'undefined')"," this.lexer.yylloc = {};"," var yyloc = this.lexer.yylloc;"," lstack.push(yyloc);",""," if (typeof this.yy.parseError === 'function')"," this.parseError = this.yy.parseError;",""," function popStack (n) {"," stack.length = stack.length - 2*n;"," vstack.length = vstack.length - n;"," lstack.length = lstack.length - n;"," }",""," function lex() {"," var token;"," token = self.lexer.lex() || 1; // $end = 1"," // if token isn't its numeric value, convert"," if (typeof token !== 'number') {"," token = self.symbols_[token] || token;"," }"," return token;"," }",""," var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;"," while (true) {"," // retreive state number from top of stack"," state = stack[stack.length-1];",""," // use default actions if available"," if (this.defaultActions[state]) {"," action = this.defaultActions[state];"," } else {"," if (symbol === null || typeof symbol == 'undefined') {"," symbol = lex();"," }"," // read action for current state and first input"," action = table[state] && table[state][symbol];"," }",""," // handle parse error"," _handle_error:"," if (typeof action === 'undefined' || !action.length || !action[0]) {",""," var errStr = '';"," if (!recovering) {"," // Report error"," expected = [];"," for (p in table[state]) if (this.terminals_[p] && p > 2) {"," expected.push(\"'\"+this.terminals_[p]+\"'\");"," }"," if (this.lexer.showPosition) {"," errStr = 'Parse error on line '+(yylineno+1)+\":\\n\"+this.lexer.showPosition()+\"\\nExpecting \"+expected.join(', ') + \", got '\" + (this.terminals_[symbol] || symbol)+ \"'\";"," } else {"," errStr = 'Parse error on line '+(yylineno+1)+\": Unexpected \" +"," (symbol == 1 /*EOF*/ ? \"end of input\" :"," (\"'\"+(this.terminals_[symbol] || symbol)+\"'\"));"," }"," this.parseError(errStr,"," {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});"," }",""," // just recovered from another error"," if (recovering == 3) {"," if (symbol == EOF) {"," throw new Error(errStr || 'Parsing halted.');"," }",""," // discard current lookahead and grab another"," yyleng = this.lexer.yyleng;"," yytext = this.lexer.yytext;"," yylineno = this.lexer.yylineno;"," yyloc = this.lexer.yylloc;"," symbol = lex();"," }",""," // try to recover from error"," while (1) {"," // check for error recovery rule in this state"," if ((TERROR.toString()) in table[state]) {"," break;"," }"," if (state === 0) {"," throw new Error(errStr || 'Parsing halted.');"," }"," popStack(1);"," state = stack[stack.length-1];"," }",""," preErrorSymbol = symbol == 2 ? null : symbol; // save the lookahead token"," symbol = TERROR; // insert generic error symbol as new lookahead"," state = stack[stack.length-1];"," action = table[state] && table[state][TERROR];"," recovering = 3; // allow 3 real symbols to be shifted before reporting a new error"," }",""," // this shouldn't happen, unless resolve defaults are off"," if (action[0] instanceof Array && action.length > 1) {"," throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);"," }",""," switch (action[0]) {",""," case 1: // shift"," //this.shiftCount++;",""," stack.push(symbol);"," vstack.push(this.lexer.yytext);"," lstack.push(this.lexer.yylloc);"," stack.push(action[1]); // push state"," symbol = null;"," if (!preErrorSymbol) { // normal execution/no error"," yyleng = this.lexer.yyleng;"," yytext = this.lexer.yytext;"," yylineno = this.lexer.yylineno;"," yyloc = this.lexer.yylloc;"," if (recovering > 0)"," recovering--;"," } else { // error just occurred, resume old lookahead f/ before error"," symbol = preErrorSymbol;"," preErrorSymbol = null;"," }"," break;",""," case 2: // reduce"," //this.reductionCount++;",""," len = this.productions_[action[1]][1];",""," // perform semantic action"," yyval.$ = vstack[vstack.length-len]; // default to $$ = $1"," // default location, uses first token for firsts, last for lasts"," yyval._$ = {"," first_line: lstack[lstack.length-(len||1)].first_line,"," last_line: lstack[lstack.length-1].last_line,"," first_column: lstack[lstack.length-(len||1)].first_column,"," last_column: lstack[lstack.length-1].last_column"," };"," r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);",""," if (typeof r !== 'undefined') {"," return r;"," }",""," // pop off stack"," if (len) {"," stack = stack.slice(0,-1*len*2);"," vstack = vstack.slice(0, -1*len);"," lstack = lstack.slice(0, -1*len);"," }",""," stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)"," vstack.push(yyval.$);"," lstack.push(yyval._$);"," // goto new state = table[STATE][NONTERMINAL]"," newState = table[stack[stack.length-2]][stack[stack.length-1]];"," stack.push(newState);"," break;",""," case 3: // accept"," return true;"," }",""," }",""," return true;","}};","/* Jison generated lexer */","var lexer = (function(){","var lexer = ({EOF:1,","parseError:function parseError(str, hash) {"," if (this.yy.parser) {"," this.yy.parser.parseError(str, hash);"," } else {"," throw new Error(str);"," }"," },","setInput:function (input) {"," this._input = input;"," 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 ch = this._input[0];"," this.yytext+=ch;"," this.yyleng++;"," this.match+=ch;"," this.matched+=ch;"," var lines = ch.match(/\\n/);"," if (lines) this.yylineno++;"," this._input = this._input.slice(1);"," return ch;"," },","unput:function (ch) {"," this._input = ch + this._input;"," return this;"," },","more:function () {"," this._more = true;"," return this;"," },","less:function (n) {"," this._input = this.match.slice(n) + this._input;"," },","pastInput:function () {"," var past = this.matched.substr(0, this.matched.length - this.match.length);"," return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");"," },","upcomingInput:function () {"," var next = this.match;"," if (next.length < 20) {"," next += this._input.substr(0, 20-next.length);"," }"," return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\\n/g, \"\");"," },","showPosition:function () {"," var pre = this.pastInput();"," var c = new Array(pre.length + 1).join(\"-\");"," return pre + this.upcomingInput() + \"\\n\" + c+\"^\";"," },","next:function () {"," if (this.done) {"," return this.EOF;"," }"," if (!this._input) this.done = true;",""," var token,"," match,"," tempMatch,"," index,"," col,"," lines;"," if (!this._more) {"," this.yytext = '';"," this.match = '';"," }"," var rules = this._currentRules();"," for (var i=0;i < rules.length; i++) {"," tempMatch = this._input.match(this.rules[rules[i]]);"," if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {"," match = tempMatch;"," index = i;"," if (!this.options.flex) break;"," }"," }"," if (match) {"," lines = match[0].match(/\\n.*/g);"," if (lines) this.yylineno += lines.length;"," this.yylloc = {first_line: this.yylloc.last_line,"," last_line: this.yylineno+1,"," first_column: this.yylloc.last_column,"," last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length};"," this.yytext += match[0];"," this.match += match[0];"," this.yyleng = this.yytext.length;"," this._more = false;"," this._input = this._input.slice(match[0].length);"," this.matched += match[0];"," token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);"," if (this.done && this._input) this.done = false;"," if (token) return token;"," 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 lex() {"," var r = this.next();"," if (typeof r !== 'undefined') {"," return r;"," } else {"," return this.lex();"," }"," },","begin:function begin(condition) {"," this.conditionStack.push(condition);"," },","popState:function popState() {"," return this.conditionStack.pop();"," },","_currentRules:function _currentRules() {"," return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;"," },","topState:function () {"," return this.conditionStack[this.conditionStack.length-2];"," },","pushState:function begin(condition) {"," this.begin(condition);"," }});","lexer.options = {};","lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {","","var YYSTATE=YY_START","switch($avoiding_name_collisions) {","case 0:"," if(yy_.yytext.slice(-1) !== \"\\\\\") this.begin(\"mu\");"," if(yy_.yytext.slice(-1) === \"\\\\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin(\"emu\");"," if(yy_.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: yy_.yytext = yy_.yytext.substr(3,yy_.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: /*ignore whitespace*/ ","break;","case 17: this.popState(); return 18; ","break;","case 18: this.popState(); return 18; ","break;","case 19: yy_.yytext = yy_.yytext.substr(1,yy_.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: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 33; ","break;","case 25: return 'INVALID'; ","break;","case 26: return 5; ","break;","}","};","lexer.rules = [/^(?:[^\\x00]*?(?=(\\{\\{)))/,/^(?:[^\\x00]+)/,/^(?:[^\\x00]{2,}?(?=(\\{\\{)))/,/^(?:\\{\\{>)/,/^(?:\\{\\{#)/,/^(?:\\{\\{\\/)/,/^(?:\\{\\{\\^)/,/^(?:\\{\\{\\s*else\\b)/,/^(?:\\{\\{\\{)/,/^(?:\\{\\{&)/,/^(?:\\{\\{![\\s\\S]*?\\}\\})/,/^(?:\\{\\{)/,/^(?:=)/,/^(?:\\.(?=[} ]))/,/^(?:\\.\\.)/,/^(?:[\\/.])/,/^(?:\\s+)/,/^(?:\\}\\}\\})/,/^(?:\\}\\})/,/^(?:\"(\\\\[\"]|[^\"])*\")/,/^(?:true(?=[}\\s]))/,/^(?:false(?=[}\\s]))/,/^(?:[0-9]+(?=[}\\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\\s\\/.]))/,/^(?:\\[[^\\]]*\\])/,/^(?:.)/,/^(?:$)/];","lexer.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 lexer;})()","parser.lexer = lexer;function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;","return new Parser;","})();","if (typeof require !== 'undefined' && typeof exports !== 'undefined') {","exports.parser = handlebars;","exports.Parser = handlebars.Parser;","exports.parse = function () { return handlebars.parse.apply(handlebars, arguments); }","exports.main = function commonjsMain(args) {"," if (!args[1])"," throw new Error('Usage: '+args[0]+' FILE');"," var source, cwd;"," if (typeof process !== 'undefined') {"," source = require('fs').readFileSync(require('path').resolve(args[1]), \"utf8\");"," } else {"," source = require(\"file\").path(require(\"file\").cwd()).join(args[1]).read({charset: \"utf-8\"});"," }"," return exports.parser.parse(source);","}","if (typeof module !== 'undefined' && require.main === module) {"," exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require(\"system\").args);","}","};","/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */","","// BEGIN(BROWSER)","Handlebars.Parser = handlebars;","","Handlebars.parse = function(string) {"," Handlebars.Parser.yy = Handlebars.AST;"," return Handlebars.Parser.parse(string);","};","","Handlebars.print = function(ast) {"," return new Handlebars.PrintVisitor().accept(ast);","};","","Handlebars.logger = {"," DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,",""," // override in the host environment"," log: function(level, str) {}","};","","Handlebars.log = function(level, str) { Handlebars.logger.log(level, str); };","","// END(BROWSER)","/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */","","// BEGIN(BROWSER)","(function() {",""," Handlebars.AST = {};",""," Handlebars.AST.ProgramNode = function(statements, inverse) {"," this.type = \"program\";"," this.statements = statements;"," if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }"," };",""," Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) {"," this.type = \"mustache\";"," this.escaped = !unescaped;"," this.hash = hash;",""," var id = this.id = rawParams[0];"," var params = this.params = rawParams.slice(1);",""," // a mustache is an eligible helper if:"," // * its id is simple (a single part, not `this` or `..`)"," var eligibleHelper = this.eligibleHelper = id.isSimple;",""," // a mustache is definitely a helper if:"," // * it is an eligible helper, and"," // * it has at least one parameter or hash segment"," this.isHelper = eligibleHelper && (params.length || hash);",""," // if a mustache is an eligible helper but not a definite"," // helper, it is ambiguous, and will be resolved in a later"," // pass or at runtime."," };",""," Handlebars.AST.PartialNode = function(id, context) {"," this.type = \"partial\";",""," // TODO: disallow complex IDs",""," this.id = id;"," this.context = context;"," };",""," var verifyMatch = function(open, close) {"," if(open.original !== close.original) {"," throw new Handlebars.Exception(open.original + \" doesn't match \" + close.original);"," }"," };",""," Handlebars.AST.BlockNode = function(mustache, program, inverse, close) {"," verifyMatch(mustache.id, close);"," this.type = \"block\";"," this.mustache = mustache;"," this.program = program;"," this.inverse = inverse;",""," if (this.inverse && !this.program) {"," this.isInverse = true;"," }"," };",""," Handlebars.AST.ContentNode = function(string) {"," this.type = \"content\";"," this.string = string;"," };",""," Handlebars.AST.HashNode = function(pairs) {"," this.type = \"hash\";"," this.pairs = pairs;"," };",""," Handlebars.AST.IdNode = function(parts) {"," this.type = \"ID\";"," this.original = parts.join(\".\");",""," var dig = [], depth = 0;",""," for(var i=0,l=parts.length; i<l; i++) {"," var part = parts[i];",""," if(part === \"..\") { depth++; }"," else if(part === \".\" || part === \"this\") { this.isScoped = true; }"," else { dig.push(part); }"," }",""," this.parts = dig;"," this.string = dig.join('.');"," this.depth = depth;",""," // an ID is simple if it only has one part, and that part is not"," // `..` or `this`."," this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;"," };",""," Handlebars.AST.StringNode = function(string) {"," this.type = \"STRING\";"," this.string = string;"," };",""," Handlebars.AST.IntegerNode = function(integer) {"," this.type = \"INTEGER\";"," this.integer = integer;"," };",""," Handlebars.AST.BooleanNode = function(bool) {"," this.type = \"BOOLEAN\";"," this.bool = bool;"," };",""," Handlebars.AST.CommentNode = function(comment) {"," this.type = \"comment\";"," this.comment = comment;"," };","","})();","// END(BROWSER)","/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */","","// BEGIN(BROWSER)","","/*jshint eqnull:true*/","Handlebars.Compiler = function() {};","Handlebars.JavaScriptCompiler = function() {};","","(function(Compiler, JavaScriptCompiler) {"," // the foundHelper register will disambiguate helper lookup from finding a"," // function in a context. This is necessary for mustache compatibility, which"," // requires that context functions in blocks are evaluated by blockHelperMissing,"," // and then proceed as if the resulting value was provided to blockHelperMissing.",""," Compiler.prototype = {"," compiler: Compiler,",""," disassemble: function() {"," var opcodes = this.opcodes, opcode, out = [], params, param;",""," for (var i=0, l=opcodes.length; i<l; i++) {"," opcode = opcodes[i];",""," if (opcode.opcode === 'DECLARE') {"," out.push(\"DECLARE \" + opcode.name + \"=\" + opcode.value);"," } else {"," params = [];"," for (var j=0; j<opcode.args.length; j++) {"," param = opcode.args[j];"," if (typeof param === \"string\") {"," param = \"\\\"\" + param.replace(\"\\n\", \"\\\\n\") + \"\\\"\";"," }"," params.push(param);"," }"," out.push(opcode.opcode + \" \" + params.join(\" \"));"," }"," }",""," return out.join(\"\\n\");"," },",""," guid: 0,",""," compile: function(program, options) {"," this.children = [];"," this.depths = {list: []};"," this.options = options;",""," // These changes will propagate to the other compiler components"," var knownHelpers = this.options.knownHelpers;"," this.options.knownHelpers = {"," 'helperMissing': true,"," 'blockHelperMissing': true,"," 'each': true,"," 'if': true,"," 'unless': true,"," 'with': true,"," 'log': true"," };"," if (knownHelpers) {"," for (var name in knownHelpers) {"," this.options.knownHelpers[name] = knownHelpers[name];"," }"," }",""," return this.program(program);"," },",""," accept: function(node) {"," return this[node.type](node);"," },",""," program: function(program) {"," var statements = program.statements, statement;"," this.opcodes = [];",""," for(var i=0, l=statements.length; i<l; i++) {"," statement = statements[i];"," this[statement.type](statement);"," }"," this.isSimple = l === 1;",""," this.depths.list = this.depths.list.sort(function(a, b) {"," return a - b;"," });",""," return this;"," },",""," compileProgram: function(program) {"," var result = new this.compiler().compile(program, this.options);"," var guid = this.guid++, depth;",""," this.usePartial = this.usePartial || result.usePartial;",""," this.children[guid] = result;",""," for(var i=0, l=result.depths.list.length; i<l; i++) {"," depth = result.depths.list[i];",""," if(depth < 2) { continue; }"," else { this.addDepth(depth - 1); }"," }",""," return guid;"," },",""," block: function(block) {"," var mustache = block.mustache,"," program = block.program,"," inverse = block.inverse;",""," if (program) {"," program = this.compileProgram(program);"," }",""," if (inverse) {"," inverse = this.compileProgram(inverse);"," }",""," var type = this.classifyMustache(mustache);",""," if (type === \"helper\") {"," this.helperMustache(mustache, program, inverse);"," } else if (type === \"simple\") {"," this.simpleMustache(mustache);",""," // now that the simple mustache is resolved, we need to"," // evaluate it by executing `blockHelperMissing`"," this.opcode('pushProgram', program);"," this.opcode('pushProgram', inverse);"," this.opcode('pushLiteral', '{}');"," this.opcode('blockValue');"," } else {"," this.ambiguousMustache(mustache, program, inverse);",""," // now that the simple mustache is resolved, we need to"," // evaluate it by executing `blockHelperMissing`"," this.opcode('pushProgram', program);"," this.opcode('pushProgram', inverse);"," this.opcode('pushLiteral', '{}');"," this.opcode('ambiguousBlockValue');"," }",""," this.opcode('append');"," },",""," hash: function(hash) {"," var pairs = hash.pairs, pair, val;",""," this.opcode('push', '{}');",""," for(var i=0, l=pairs.length; i<l; i++) {"," pair = pairs[i];"," val = pair[1];",""," this.accept(val);"," this.opcode('assignToHash', pair[0]);"," }"," },",""," partial: function(partial) {"," var id = partial.id;"," this.usePartial = true;",""," if(partial.context) {"," this.ID(partial.context);"," } else {"," this.opcode('push', 'depth0');"," }",""," this.opcode('invokePartial', id.original);"," this.opcode('append');"," },",""," content: function(content) {"," this.opcode('appendContent', content.string);"," },",""," mustache: function(mustache) {"," var options = this.options;"," var type = this.classifyMustache(mustache);",""," if (type === \"simple\") {"," this.simpleMustache(mustache);"," } else if (type === \"helper\") {"," this.helperMustache(mustache);"," } else {"," this.ambiguousMustache(mustache);"," }",""," if(mustache.escaped && !options.noEscape) {"," this.opcode('appendEscaped');"," } else {"," this.opcode('append');"," }"," },",""," ambiguousMustache: function(mustache, program, inverse) {"," var id = mustache.id, name = id.parts[0];",""," this.opcode('getContext', id.depth);",""," this.opcode('pushProgram', program);"," this.opcode('pushProgram', inverse);",""," this.opcode('invokeAmbiguous', name);"," },",""," simpleMustache: function(mustache, program, inverse) {"," var id = mustache.id;",""," this.addDepth(id.depth);"," this.opcode('getContext', id.depth);",""," if (id.parts.length) {"," this.opcode('lookupOnContext', id.parts[0]);"," for(var i=1, l=id.parts.length; i<l; i++) {"," this.opcode('lookup', id.parts[i]);"," }"," } else {"," this.opcode('pushContext');"," }"," this.opcode('resolvePossibleLambda');"," },",""," helperMustache: function(mustache, program, inverse) {"," var params = this.setupFullMustacheParams(mustache, program, inverse),"," name = mustache.id.parts[0];",""," if (this.options.knownHelpers[name]) {"," this.opcode('invokeKnownHelper', params.length, name);"," } else if (this.knownHelpersOnly) {"," throw new Error(\"You specified knownHelpersOnly, but used the unknown helper \" + name);"," } else {"," this.opcode('invokeHelper', params.length, name);"," }"," },",""," ID: function(id) {"," this.addDepth(id.depth);"," this.opcode('getContext', id.depth);"," this.opcode('lookupOnContext', id.parts[0]);",""," for(var i=1, l=id.parts.length; i<l; i++) {"," this.opcode('lookup', id.parts[i]);"," }"," },",""," STRING: function(string) {"," this.opcode('pushString', string.string);"," },",""," INTEGER: function(integer) {"," this.opcode('pushLiteral', integer.integer);"," },",""," BOOLEAN: function(bool) {"," this.opcode('pushLiteral', bool.bool);"," },",""," comment: function() {},",""," // HELPERS"," opcode: function(name) {"," this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });"," },",""," declare: function(name, value) {"," this.opcodes.push({ opcode: 'DECLARE', name: name, value: value });"," },",""," addDepth: function(depth) {"," if(depth === 0) { return; }",""," if(!this.depths[depth]) {"," this.depths[depth] = true;"," this.depths.list.push(depth);"," }"," },",""," classifyMustache: function(mustache) {"," var isHelper = mustache.isHelper;"," var isEligible = mustache.eligibleHelper;"," var options = this.options;",""," // if ambiguous, we can possibly resolve the ambiguity now"," if (isEligible && !isHelper) {"," var name = mustache.id.parts[0];",""," if (options.knownHelpers[name]) {"," isHelper = true;"," } else if (options.knownHelpersOnly) {"," isEligible = false;"," }"," }",""," if (isHelper) { return \"helper\"; }"," else if (isEligible) { return \"ambiguous\"; }"," else { return \"simple\"; }"," },",""," pushParams: function(params) {"," var i = params.length, param;",""," while(i--) {"," param = params[i];",""," if(this.options.stringParams) {"," if(param.depth) {"," this.addDepth(param.depth);"," }",""," this.opcode('getContext', param.depth || 0);"," this.opcode('pushStringParam', param.string);"," } else {"," this[param.type](param);"," }"," }"," },",""," setupMustacheParams: function(mustache) {"," var params = mustache.params;"," this.pushParams(params);",""," if(mustache.hash) {"," this.hash(mustache.hash);"," } else {"," this.opcode('pushLiteral', '{}');"," }",""," return params;"," },",""," // this will replace setupMustacheParams when we're done"," setupFullMustacheParams: function(mustache, program, inverse) {"," var params = mustache.params;"," this.pushParams(params);",""," this.opcode('pushProgram', program);"," this.opcode('pushProgram', inverse);",""," if(mustache.hash) {"," this.hash(mustache.hash);"," } else {"," this.opcode('pushLiteral', '{}');"," }",""," return params;"," }"," };",""," var Literal = function(value) {"," this.value = value;"," };",""," JavaScriptCompiler.prototype = {"," // PUBLIC API: You can override these methods in a subclass to provide"," // alternative compiled forms for name lookup and buffering semantics"," nameLookup: function(parent, name, type) {"," if (/^[0-9]+$/.test(name)) {"," return parent + \"[\" + name + \"]\";"," } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {"," return parent + \".\" + name;"," }"," else {"," return parent + \"['\" + name + \"']\";"," }"," },",""," appendToBuffer: function(string) {"," if (this.environment.isSimple) {"," return \"return \" + string + \";\";"," } else {"," return \"buffer += \" + string + \";\";"," }"," },",""," initializeBuffer: function() {"," return this.quotedString(\"\");"," },",""," namespace: \"Handlebars\","," // END PUBLIC API",""," compile: function(environment, options, context, asObject) {"," this.environment = environment;"," this.options = options || {};",""," Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + \"\\n\\n\");",""," this.name = this.environment.name;"," this.isChild = !!context;"," this.context = context || {"," programs: [],"," aliases: { }"," };",""," this.preamble();",""," this.stackSlot = 0;"," this.stackVars = [];"," this.registers = { list: [] };"," this.compileStack = [];",""," this.compileChildren(environment, options);",""," var opcodes = environment.opcodes, opcode;",""," this.i = 0;",""," for(l=opcodes.length; this.i<l; this.i++) {"," opcode = opcodes[this.i];",""," if(opcode.opcode === 'DECLARE') {"," this[opcode.name] = opcode.value;"," } else {"," this[opcode.opcode].apply(this, opcode.args);"," }"," }",""," return this.createFunctionContext(asObject);"," },",""," nextOpcode: function() {"," var opcodes = this.environment.opcodes, opcode = opcodes[this.i + 1];"," return opcodes[this.i + 1];"," },",""," eat: function(opcode) {"," this.i = this.i + 1;"," },",""," preamble: function() {"," var out = [];",""," if (!this.isChild) {"," var namespace = this.namespace;"," var copies = \"helpers = helpers || \" + namespace + \".helpers;\";"," if(this.environment.usePartial) { copies = copies + \" partials = partials || \" + namespace + \".partials;\"; }"," out.push(copies);"," } else {"," out.push('');"," }",""," if (!this.environment.isSimple) {"," out.push(\", buffer = \" + this.initializeBuffer());"," } else {"," out.push(\"\");"," }",""," // track the last context pushed into place to allow skipping the"," // getContext opcode when it would be a noop"," this.lastContext = 0;"," this.source = out;"," },",""," createFunctionContext: function(asObject) {"," var locals = this.stackVars.concat(this.registers.list);",""," if(locals.length > 0) {"," this.source[1] = this.source[1] + \", \" + locals.join(\", \");"," }",""," // Generate minimizer alias mappings"," if (!this.isChild) {"," var aliases = [];"," for (var alias in this.context.aliases) {"," this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];"," }"," }",""," if (this.source[1]) {"," this.source[1] = \"var \" + this.source[1].substring(2) + \";\";"," }",""," // Merge children"," if (!this.isChild) {"," this.source[1] += '\\n' + this.context.programs.join('\\n') + '\\n';"," }",""," if (!this.environment.isSimple) {"," this.source.push(\"return buffer;\");"," }",""," var params = this.isChild ? [\"depth0\", \"data\"] : [\"Handlebars\", \"depth0\", \"helpers\", \"partials\", \"data\"];",""," for(var i=0, l=this.environment.depths.list.length; i<l; i++) {"," params.push(\"depth\" + this.environment.depths.list[i]);"," }",""," if (asObject) {"," params.push(this.source.join(\"\\n \"));",""," return Function.apply(this, params);"," } else {"," var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\\n ' + this.source.join(\"\\n \") + '}';"," Handlebars.log(Handlebars.logger.DEBUG, functionSource + \"\\n\\n\");"," return functionSource;"," }"," },",""," // [blockValue]"," //"," // On stack, before: hash, inverse, program, value"," // On stack, after: return value of blockHelperMissing"," //"," // The purpose of this opcode is to take a block of the form"," // `{{#foo}}...{{/foo}}`, resolve the value of `foo`, and"," // replace it on the stack with the result of properly"," // invoking blockHelperMissing."," blockValue: function() {"," this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';",""," var params = [\"depth0\"];"," this.setupParams(0, params);",""," this.replaceStack(function(current) {"," params.splice(1, 0, current);"," return current + \" = blockHelperMissing.call(\" + params.join(\", \") + \")\";"," });"," },",""," // [ambiguousBlockValue]"," //"," // On stack, before: hash, inverse, program, value"," // Compiler value, before: lastHelper=value of last found helper, if any"," // On stack, after, if no lastHelper: same as [blockValue]"," // On stack, after, if lastHelper: value"," ambiguousBlockValue: function() {"," this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';",""," var params = [\"depth0\"];"," this.setupParams(0, params);",""," var current = this.topStack();"," params.splice(1, 0, current);",""," this.source.push(\"if (!\" + this.lastHelper + \") { \" + current + \" = blockHelperMissing.call(\" + params.join(\", \") + \"); }\");"," },",""," // [appendContent]"," //"," // On stack, before: ..."," // On stack, after: ..."," //"," // Appends the string value of `content` to the current buffer"," appendContent: function(content) {"," this.source.push(this.appendToBuffer(this.quotedString(content)));"," },",""," // [append]"," //"," // On stack, before: value, ..."," // On stack, after: ..."," //"," // Coerces `value` to a String and appends it to the current buffer."," //"," // If `value` is truthy, or 0, it is coerced into a string and appended"," // Otherwise, the empty string is appended"," append: function() {"," var local = this.popStack();"," this.source.push(\"if(\" + local + \" || \" + local + \" === 0) { \" + this.appendToBuffer(local) + \" }\");"," if (this.environment.isSimple) {"," this.source.push(\"else { \" + this.appendToBuffer(\"''\") + \" }\");"," }"," },",""," // [appendEscaped]"," //"," // On stack, before: value, ..."," // On stack, after: ..."," //"," // Escape `value` and append it to the buffer"," appendEscaped: function() {"," var opcode = this.nextOpcode(), extra = \"\";"," this.context.aliases.escapeExpression = 'this.escapeExpression';",""," if(opcode && opcode.opcode === 'appendContent') {"," extra = \" + \" + this.quotedString(opcode.args[0]);"," this.eat(opcode);"," }",""," this.source.push(this.appendToBuffer(\"escapeExpression(\" + this.popStack() + \")\" + extra));"," },",""," // [getContext]"," //"," // On stack, before: ..."," // On stack, after: ..."," // Compiler value, after: lastContext=depth"," //"," // Set the value of the `lastContext` compiler value to the depth"," getContext: function(depth) {"," if(this.lastContext !== depth) {"," this.lastContext = depth;"," }"," },",""," // [lookupOnContext]"," //"," // On stack, before: ..."," // On stack, after: currentContext[name], ..."," //"," // Looks up the value of `name` on the current context and pushes"," // it onto the stack."," lookupOnContext: function(name) {"," this.pushStack(this.nameLookup('depth' + this.lastContext, name, 'context'));"," },",""," // [pushContext]"," //"," // On stack, before: ..."," // On stack, after: currentContext, ..."," //"," // Pushes the value of the current context onto the stack."," pushContext: function() {"," this.pushStackLiteral('depth' + this.lastContext);"," },",""," // [resolvePossibleLambda]"," //"," // On stack, before: value, ..."," // On stack, after: resolved value, ..."," //"," // If the `value` is a lambda, replace it on the stack by"," // the return value of the lambda"," resolvePossibleLambda: function() {"," this.context.aliases.functionType = '\"function\"';",""," this.replaceStack(function(current) {"," return \"typeof \" + current + \" === functionType ? \" + current + \"() : \" + current;"," });"," },",""," // [lookup]"," //"," // On stack, before: value, ..."," // On stack, after: value[name], ..."," //"," // Replace the value on the stack with the result of looking"," // up `name` on `value`"," lookup: function(name) {"," this.replaceStack(function(current) {"," return current + \" == null || \" + current + \" === false ? \" + current + \" : \" + this.nameLookup(current, name, 'context');"," });"," },",""," // [pushStringParam]"," //"," // On stack, before: ..."," // On stack, after: string, currentContext, ..."," //"," // This opcode is designed for use in string mode, which"," // provides the string value of a parameter along with its"," // depth rather than resolving it immediately."," pushStringParam: function(string) {"," this.pushStackLiteral('depth' + this.lastContext);"," this.pushString(string);"," },",""," // [pushString]"," //"," // On stack, before: ..."," // On stack, after: quotedString(string), ..."," //"," // Push a quoted version of `string` onto the stack"," pushString: function(string) {"," this.pushStackLiteral(this.quotedString(string));"," },",""," // [push]"," //"," // On stack, before: ..."," // On stack, after: expr, ..."," //"," // Push an expression onto the stack"," push: function(expr) {"," this.pushStack(expr);"," },",""," // [pushLiteral]"," //"," // On stack, before: ..."," // On stack, after: value, ..."," //"," // Pushes a value onto the stack. This operation prevents"," // the compiler from creating a temporary variable to hold"," // it."," pushLiteral: function(value) {"," this.pushStackLiteral(value);"," },",""," // [pushProgram]"," //"," // On stack, before: ..."," // On stack, after: program(guid), ..."," //"," // Push a program expression onto the stack. This takes"," // a compile-time guid and converts it into a runtime-accessible"," // expression."," pushProgram: function(guid) {"," if (guid != null) {"," this.pushStackLiteral(this.programExpression(guid));"," } else {"," this.pushStackLiteral(null);"," }"," },",""," // [invokeHelper]"," //"," // On stack, before: hash, inverse, program, params..., ..."," // On stack, after: result of helper invocation"," //"," // Pops off the helper's parameters, invokes the helper,"," // and pushes the helper's return value onto the stack."," //"," // If the helper is not found, `helperMissing` is called."," invokeHelper: function(paramSize, name) {"," this.context.aliases.helperMissing = 'helpers.helperMissing';",""," var helper = this.lastHelper = this.setupHelper(paramSize, name);"," this.register('foundHelper', helper.name);",""," this.pushStack(\"foundHelper ? foundHelper.call(\" +"," helper.callParams + \") \" + \": helperMissing.call(\" +"," helper.helperMissingParams + \")\");"," },",""," // [invokeKnownHelper]"," //"," // On stack, before: hash, inverse, program, params..., ..."," // On stack, after: result of helper invocation"," //"," // This operation is used when the helper is known to exist,"," // so a `helperMissing` fallback is not required."," invokeKnownHelper: function(paramSize, name) {"," var helper = this.setupHelper(paramSize, name);"," this.pushStack(helper.name + \".call(\" + helper.callParams + \")\");"," },",""," // [invokeAmbiguous]"," //"," // On stack, before: hash, inverse, program, params..., ..."," // On stack, after: result of disambiguation"," //"," // This operation is used when an expression like `{{foo}}`"," // is provided, but we don't know at compile-time whether it"," // is a helper or a path."," //"," // This operation emits more code than the other options,"," // and can be avoided by passing the `knownHelpers` and"," // `knownHelpersOnly` flags at compile-time."," invokeAmbiguous: function(name) {"," this.context.aliases.functionType = '\"function\"';",""," this.pushStackLiteral('{}');"," var helper = this.setupHelper(0, name);",""," var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');"," this.register('foundHelper', helperName);",""," var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');"," var nextStack = this.nextStack();",""," this.source.push('if (foundHelper) { ' + nextStack + ' = foundHelper.call(' + helper.callParams + '); }');"," this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '() : ' + nextStack + '; }');"," },",""," // [invokePartial]"," //"," // On stack, before: context, ..."," // On stack after: result of partial invocation"," //"," // This operation pops off a context, invokes a partial with that context,"," // and pushes the result of the invocation back."," invokePartial: function(name) {"," var params = [this.nameLookup('partials', name, 'partial'), \"'\" + name + \"'\", this.popStack(), \"helpers\", \"partials\"];",""," if (this.options.data) {"," params.push(\"data\");"," }",""," this.context.aliases.self = \"this\";"," this.pushStack(\"self.invokePartial(\" + params.join(\", \") + \");\");"," },",""," // [assignToHash]"," //"," // On stack, before: value, hash, ..."," // On stack, after: hash, ..."," //"," // Pops a value and hash off the stack, assigns `hash[key] = value`"," // and pushes the hash back onto the stack."," assignToHash: function(key) {"," var value = this.popStack();"," var hash = this.topStack();",""," this.source.push(hash + \"['\" + key + \"'] = \" + value + \";\");"," },",""," // HELPERS",""," compiler: JavaScriptCompiler,",""," compileChildren: function(environment, options) {"," var children = environment.children, child, compiler;",""," for(var i=0, l=children.length; i<l; i++) {"," child = children[i];"," compiler = new this.compiler();",""," this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children"," var index = this.context.programs.length;"," child.index = index;"," child.name = 'program' + index;"," this.context.programs[index] = compiler.compile(child, options, this.context);"," }"," },",""," programExpression: function(guid) {"," this.context.aliases.self = \"this\";",""," if(guid == null) {"," return \"self.noop\";"," }",""," var child = this.environment.children[guid],"," depths = child.depths.list, depth;",""," var programParams = [child.index, child.name, \"data\"];",""," for(var i=0, l = depths.length; i<l; i++) {"," depth = depths[i];",""," if(depth === 1) { programParams.push(\"depth0\"); }"," else { programParams.push(\"depth\" + (depth - 1)); }"," }",""," if(depths.length === 0) {"," return \"self.program(\" + programParams.join(\", \") + \")\";"," } else {"," programParams.shift();"," return \"self.programWithDepth(\" + programParams.join(\", \") + \")\";"," }"," },",""," register: function(name, val) {"," this.useRegister(name);"," this.source.push(name + \" = \" + val + \";\");"," },",""," useRegister: function(name) {"," if(!this.registers[name]) {"," this.registers[name] = true;"," this.registers.list.push(name);"," }"," },",""," pushStackLiteral: function(item) {"," this.compileStack.push(new Literal(item));"," return item;"," },",""," pushStack: function(item) {"," this.source.push(this.incrStack() + \" = \" + item + \";\");"," this.compileStack.push(\"stack\" + this.stackSlot);"," return \"stack\" + this.stackSlot;"," },",""," replaceStack: function(callback) {"," var item = callback.call(this, this.topStack());",""," this.source.push(this.topStack() + \" = \" + item + \";\");"," return \"stack\" + this.stackSlot;"," },",""," nextStack: function(skipCompileStack) {"," var name = this.incrStack();"," this.compileStack.push(\"stack\" + this.stackSlot);"," return name;"," },",""," incrStack: function() {"," this.stackSlot++;"," if(this.stackSlot > this.stackVars.length) { this.stackVars.push(\"stack\" + this.stackSlot); }"," return \"stack\" + this.stackSlot;"," },",""," popStack: function() {"," var item = this.compileStack.pop();",""," if (item instanceof Literal) {"," return item.value;"," } else {"," this.stackSlot--;"," return item;"," }"," },",""," topStack: function() {"," var item = this.compileStack[this.compileStack.length - 1];",""," if (item instanceof Literal) {"," return item.value;"," } else {"," return item;"," }"," },",""," quotedString: function(str) {"," return '\"' + str"," .replace(/\\\\/g, '\\\\\\\\')"," .replace(/\"/g, '\\\\\"')"," .replace(/\\n/g, '\\\\n')"," .replace(/\\r/g, '\\\\r') + '\"';"," },",""," setupHelper: function(paramSize, name) {"," var params = [];"," this.setupParams(paramSize, params);"," var foundHelper = this.nameLookup('helpers', name, 'helper');",""," return {"," params: params,"," name: foundHelper,"," callParams: [\"depth0\"].concat(params).join(\", \"),"," helperMissingParams: [\"depth0\", this.quotedString(name)].concat(params).join(\", \")"," };"," },",""," // the params and contexts arguments are passed in arrays"," // to fill in"," setupParams: function(paramSize, params) {"," var options = [], contexts = [], param, inverse, program;",""," options.push(\"hash:\" + this.popStack());",""," inverse = this.popStack();"," program = this.popStack();",""," // Avoid setting fn and inverse if neither are set. This allows"," // helpers to do a check for `if (options.fn)`"," if (program || inverse) {"," if (!program) {"," this.context.aliases.self = \"this\";"," program = \"self.noop\";"," }",""," if (!inverse) {"," this.context.aliases.self = \"this\";"," inverse = \"self.noop\";"," }",""," options.push(\"inverse:\" + inverse);"," options.push(\"fn:\" + program);"," }",""," for(var i=0; i<paramSize; i++) {"," param = this.popStack();"," params.push(param);",""," if(this.options.stringParams) {"," contexts.push(this.popStack());"," }"," }",""," if (this.options.stringParams) {"," options.push(\"contexts:[\" + contexts.join(\",\") + \"]\");"," }",""," if(this.options.data) {"," options.push(\"data:data\");"," }",""," params.push(\"{\" + options.join(\",\") + \"}\");"," return params.join(\", \");"," }"," };",""," var reservedWords = ("," \"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 compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};",""," for(var i=0, l=reservedWords.length; i<l; i++) {"," compilerWords[reservedWords[i]] = true;"," }",""," JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {"," if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) {"," return true;"," }"," return false;"," };","","})(Handlebars.Compiler, Handlebars.JavaScriptCompiler);","","Handlebars.precompile = function(string, options) {"," options = options || {};",""," var ast = Handlebars.parse(string);"," var environment = new Handlebars.Compiler().compile(ast, options);"," return new Handlebars.JavaScriptCompiler().compile(environment, options);","};","","Handlebars.compile = function(string, options) {"," options = options || {};",""," var compiled;"," function compile() {"," var ast = Handlebars.parse(string);"," var environment = new Handlebars.Compiler().compile(ast, options);"," var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);"," return Handlebars.template(templateSpec);"," }",""," // Template is only compiled on first use and cached after that point."," return function(context, options) {"," if (!compiled) {"," compiled = compile();"," }"," return compiled.call(this, context, options);"," };","};","","// END(BROWSER)","// This file contains YUI-specific wrapper code and overrides for the","// handlebars-compiler module.","","/**","Handlebars parser and compiler. Use this module when you need to compile","Handlebars templates.","","@module handlebars","@submodule handlebars-compiler","*/","","var levels = ['debug', 'info', 'warn', 'error'];","","/**","Logs a debugging message. Note that messages will only be logged when the","handlebars module is loaded in \"debug\" mode.","","@method log","@param {String} level Log level for this message. Supported levels are \"debug\","," \"info\", \"warn\", and \"error\".","@param {String} message Message to log.","@for Handlebars","*/","Handlebars.logger.log = function (level, message) {","","};","","/**","Compiles and renders a Handlebars template string in a single step.","","If you'll be using a template more than once, it's more efficient to compile it","into a function once using `compile()`, and then render it whenever you need to","by simply executing the compiled function. However, if you only need to compile","and render a template once, `render()` is a handy shortcut for doing both in a","single step.","","@example",""," Y.Handlebars.render('The pie of the day is {{pie}}!', {"," pie: 'Maple Custard'"," });"," // => \"The pie of the day is Maple Custard!\"","","@method render","@param {String} string Handlebars template string to render.","@param {Object} context Context object to pass to the template.","@param {Object} [options] Compile/render options."," @param {Object} [options.helpers] Helper functions."," @param {Object} [options.partials] Partials."," @param {Object} [options.data] Data.","@return {String} Rendered template string.","*/","Handlebars.render = function (string, context, options) {"," return Handlebars.compile(string)(context, options);","};","","// The rest of this file is just API docs for methods defined in Handlebars","// itself.","","/**","Compiles a Handlebars template string into a function. To render the template,","call the function and pass in a context object.","","@example",""," var template = Y.Handlebars.compile('The pie of the day is {{pie}}!.');"," template({pie: 'Pecan'});"," // => \"The pie of the day is Pecan!\"","","@method compile","@param {String} string Handlebars template string to compile.","@param {Object} [options] Compiler options.","@return {Function} Compiled template function.","*/","","/**","Precompiles a Handlebars template string into a string of JavaScript code. This","can be used to precompile a template at build time or on the server, and the","resulting template can then be rendered at runtime or on the client without","needing to go through a compile step.","","To render a precompiled template, evaluate the code and then pass the resulting","function to `Y.Handlebars.template()` to get back an executable template","function.","","@method precompile","@param {String} string Handlebars template string to compile.","@param {Object} [options] Compiler options.","@return {String} Precompiled template code.","*/","","","}, '3.7.3', {\"requires\": [\"handlebars-base\"]});"];36_yuitest_coverage["build/handlebars-compiler/handlebars-compiler.js"].lines = {"1":0,"13":0,"17":0,"18":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"112":0,"115":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"138":0,"139":0,"141":0,"142":0,"143":0,"144":0,"147":0,"148":0,"149":0,"151":0,"152":0,"154":0,"157":0,"158":0,"160":0,"163":0,"164":0,"166":0,"167":0,"170":0,"174":0,"175":0,"177":0,"178":0,"180":0,"181":0,"182":0,"184":0,"185":0,"187":0,"191":0,"196":0,"197":0,"198":0,"202":0,"203":0,"204":0,"205":0,"206":0,"210":0,"212":0,"213":0,"215":0,"216":0,"218":0,"219":0,"222":0,"223":0,"224":0,"225":0,"226":0,"230":0,"231":0,"234":0,"239":0,"240":0,"241":0,"242":0,"243":0,"244":0,"245":0,"246":0,"247":0,"248":0,"249":0,"250":0,"252":0,"253":0,"255":0,"260":0,"263":0,"265":0,"271":0,"273":0,"274":0,"278":0,"279":0,"280":0,"281":0,"284":0,"285":0,"286":0,"288":0,"289":0,"290":0,"293":0,"298":0,"301":0,"302":0,"304":0,"305":0,"307":0,"311":0,"312":0,"313":0,"314":0,"315":0,"316":0,"317":0,"320":0,"321":0,"322":0,"323":0,"324":0,"325":0,"326":0,"327":0,"328":0,"331":0,"332":0,"335":0,"336":0,"339":0,"342":0,"343":0,"346":0,"347":0,"348":0,"350":0,"353":0,"354":0,"355":0,"358":0,"359":0,"361":0,"363":0,"369":0,"370":0,"371":0,"373":0,"374":0,"375":0,"376":0,"377":0,"378":0,"379":0,"382":0,"383":0,"384":0,"385":0,"389":0,"390":0,"391":0,"392":0,"393":0,"394":0,"395":0,"396":0,"397":0,"398":0,"400":0,"401":0,"403":0,"408":0,"409":0,"410":0,"412":0,"416":0,"419":0,"422":0,"425":0,"428":0,"430":0,"431":0,"433":0,"434":0,"436":0,"437":0,"438":0,"440":0,"441":0,"442":0,"443":0,"444":0,"445":0,"446":0,"447":0,"448":0,"449":0,"450":0,"451":0,"452":0,"453":0,"454":0,"455":0,"456":0,"457":0,"458":0,"459":0,"460":0,"461":0,"462":0,"463":0,"464":0,"465":0,"466":0,"467":0,"468":0,"469":0,"470":0,"472":0,"473":0,"474":0,"475":0,"476":0,"477":0,"478":0,"479":0,"480":0,"481":0,"482":0,"483":0,"484":0,"485":0,"486":0,"487":0,"488":0,"489":0,"490":0,"491":0,"492":0,"495":0,"496":0,"497":0,"498":0,"499":0,"501":0,"502":0,"503":0,"504":0,"505":0,"506":0,"507":0,"508":0,"509":0,"510":0,"512":0,"514":0,"516":0,"517":0,"519":0,"523":0,"525":0,"526":0,"527":0,"530":0,"531":0,"534":0,"541":0,"547":0,"549":0,"551":0,"552":0,"553":0,"554":0,"557":0,"558":0,"559":0,"560":0,"562":0,"563":0,"567":0,"572":0,"579":0,"580":0,"584":0,"585":0,"588":0,"589":0,"590":0,"594":0,"595":0,"596":0,"597":0,"598":0,"599":0,"601":0,"602":0,"606":0,"607":0,"608":0,"611":0,"612":0,"613":0,"616":0,"617":0,"618":0,"620":0,"622":0,"623":0,"625":0,"626":0,"630":0,"631":0,"632":0,"636":0,"639":0,"640":0,"641":0,"644":0,"645":0,"646":0,"649":0,"650":0,"651":0,"654":0,"655":0,"656":0,"666":0,"667":0,"669":0,"675":0,"679":0,"681":0,"682":0,"684":0,"685":0,"687":0,"688":0,"689":0,"690":0,"691":0,"693":0,"695":0,"699":0,"705":0,"706":0,"707":0,"710":0,"711":0,"720":0,"721":0,"722":0,"726":0,"730":0,"734":0,"735":0,"737":0,"738":0,"739":0,"741":0,"743":0,"744":0,"747":0,"751":0,"752":0,"754":0,"756":0,"758":0,"759":0,"761":0,"765":0,"769":0,"773":0,"774":0,"777":0,"778":0,"781":0,"783":0,"784":0,"785":0,"786":0,"790":0,"791":0,"792":0,"793":0,"795":0,"799":0,"800":0,"801":0,"802":0,"805":0,"809":0,"811":0,"813":0,"814":0,"815":0,"817":0,"818":0,"823":0,"824":0,"826":0,"827":0,"829":0,"832":0,"833":0,"837":0,"841":0,"842":0,"844":0,"845":0,"846":0,"847":0,"849":0,"852":0,"853":0,"855":0,"860":0,"862":0,"864":0,"865":0,"867":0,"871":0,"873":0,"874":0,"876":0,"877":0,"878":0,"879":0,"882":0,"884":0,"888":0,"891":0,"892":0,"893":0,"894":0,"896":0,"901":0,"902":0,"903":0,"905":0,"906":0,"911":0,"915":0,"919":0,"926":0,"930":0,"934":0,"936":0,"937":0,"938":0,"943":0,"944":0,"945":0,"948":0,"949":0,"951":0,"952":0,"953":0,"954":0,"958":0,"959":0,"964":0,"966":0,"967":0,"969":0,"970":0,"971":0,"974":0,"975":0,"977":0,"983":0,"984":0,"986":0,"987":0,"989":0,"992":0,"997":0,"998":0,"1000":0,"1001":0,"1003":0,"1004":0,"1006":0,"1009":0,"1013":0,"1014":0,"1017":0,"1021":0,"1022":0,"1023":0,"1024":0,"1027":0,"1032":0,"1033":0,"1035":0,"1040":0,"1047":0,"1048":0,"1050":0,"1052":0,"1053":0,"1054":0,"1059":0,"1061":0,"1062":0,"1063":0,"1064":0,"1066":0,"1068":0,"1070":0,"1072":0,"1073":0,"1075":0,"1076":0,"1078":0,"1082":0,"1086":0,"1087":0,"1091":0,"1095":0,"1097":0,"1098":0,"1099":0,"1100":0,"1101":0,"1103":0,"1106":0,"1107":0,"1109":0,"1114":0,"1115":0,"1119":0,"1121":0,"1122":0,"1126":0,"1127":0,"1128":0,"1129":0,"1133":0,"1134":0,"1138":0,"1139":0,"1142":0,"1143":0,"1146":0,"1148":0,"1149":0,"1152":0,"1153":0,"1155":0,"1157":0,"1158":0,"1159":0,"1173":0,"1175":0,"1176":0,"1178":0,"1179":0,"1180":0,"1191":0,"1193":0,"1194":0,"1196":0,"1197":0,"1199":0,"1209":0,"1222":0,"1223":0,"1224":0,"1225":0,"1236":0,"1237":0,"1239":0,"1240":0,"1241":0,"1244":0,"1255":0,"1256":0,"1268":0,"1278":0,"1289":0,"1291":0,"1292":0,"1304":0,"1305":0,"1318":0,"1319":0,"1329":0,"1339":0,"1351":0,"1363":0,"1364":0,"1366":0,"1380":0,"1382":0,"1383":0,"1385":0,"1398":0,"1399":0,"1415":0,"1417":0,"1418":0,"1420":0,"1421":0,"1423":0,"1424":0,"1426":0,"1427":0,"1438":0,"1440":0,"1441":0,"1444":0,"1445":0,"1456":0,"1457":0,"1459":0,"1467":0,"1469":0,"1470":0,"1471":0,"1473":0,"1474":0,"1475":0,"1476":0,"1477":0,"1482":0,"1484":0,"1485":0,"1488":0,"1491":0,"1493":0,"1494":0,"1496":0,"1500":0,"1501":0,"1503":0,"1504":0,"1509":0,"1510":0,"1514":0,"1515":0,"1516":0,"1521":0,"1522":0,"1526":0,"1527":0,"1528":0,"1532":0,"1534":0,"1535":0,"1539":0,"1540":0,"1541":0,"1545":0,"1546":0,"1547":0,"1551":0,"1553":0,"1554":0,"1556":0,"1557":0,"1562":0,"1564":0,"1565":0,"1567":0,"1572":0,"1580":0,"1581":0,"1582":0,"1584":0,"1595":0,"1597":0,"1599":0,"1600":0,"1604":0,"1605":0,"1606":0,"1607":0,"1610":0,"1611":0,"1612":0,"1615":0,"1616":0,"1619":0,"1620":0,"1621":0,"1623":0,"1624":0,"1628":0,"1629":0,"1632":0,"1633":0,"1636":0,"1637":0,"1641":0,"1659":0,"1661":0,"1662":0,"1665":0,"1666":0,"1667":0,"1669":0,"1674":0,"1675":0,"1677":0,"1678":0,"1679":0,"1682":0,"1683":0,"1685":0,"1686":0,"1687":0,"1688":0,"1689":0,"1690":0,"1694":0,"1695":0,"1696":0,"1698":0,"1714":0,"1726":0,"1755":0,"1756":0};37_yuitest_coverage["build/handlebars-compiler/handlebars-compiler.js"].functions = {"anonymous:23":0,"parseError:111":0,"popStack:141":0,"lex:147":0,"parse:114":0,"parseError:303":0,"setInput:310":0,"input:319":0,"unput:330":0,"more:334":0,"less:338":0,"pastInput:341":0,"upcomingInput:345":0,"showPosition:352":0,"next:357":0,"lex:407":0,"begin:415":0,"popState:418":0,"_currentRules:421":0,"topState:424":0,"begin:427":0,"anonymous:431":0,"(anonymous 3):301":0,"Parser:498":0,"(anonymous 2):17":0,"parse:504":0,"commonjsMain:505":0,"parse:525":0,"print:530":0,"log:541":0,"ProgramNode:551":0,"MustacheNode:557":0,"PartialNode:579":0,"verifyMatch:588":0,"BlockNode:594":0,"ContentNode:606":0,"HashNode:611":0,"IdNode:616":0,"StringNode:639":0,"IntegerNode:644":0,"BooleanNode:649":0,"CommentNode:654":0,"(anonymous 4):547":0,"disassemble:678":0,"compile:704":0,"accept:729":0,"(anonymous 6):743":0,"program:733":0,"compileProgram:750":0,"block:768":0,"hash:808":0,"partial:822":0,"content:836":0,"mustache:840":0,"ambiguousMustache:859":0,"simpleMustache:870":0,"helperMustache:887":0,"ID:900":0,"STRING:910":0,"INTEGER:914":0,"BOOLEAN:918":0,"opcode:925":0,"declare:929":0,"addDepth:933":0,"classifyMustache:942":0,"pushParams:963":0,"setupMustacheParams:982":0,"setupFullMustacheParams:996":0,"Literal:1013":0,"nameLookup:1020":0,"appendToBuffer:1031":0,"initializeBuffer:1039":0,"compile:1046":0,"nextOpcode:1085":0,"eat:1090":0,"preamble:1094":0,"createFunctionContext:1118":0,"(anonymous 7):1178":0,"blockValue:1172":0,"ambiguousBlockValue:1190":0,"appendContent:1208":0,"append:1221":0,"appendEscaped:1235":0,"getContext:1254":0,"lookupOnContext:1267":0,"pushContext:1277":0,"(anonymous 8):1291":0,"resolvePossibleLambda:1288":0,"(anonymous 9):1304":0,"lookup:1303":0,"pushStringParam:1317":0,"pushString:1328":0,"push:1338":0,"pushLiteral:1350":0,"pushProgram:1362":0,"invokeHelper:1379":0,"invokeKnownHelper:1397":0,"invokeAmbiguous:1414":0,"invokePartial:1437":0,"assignToHash:1455":0,"compileChildren:1466":0,"programExpression:1481":0,"register:1508":0,"useRegister:1513":0,"pushStackLiteral:1520":0,"pushStack:1525":0,"replaceStack:1531":0,"nextStack:1538":0,"incrStack:1544":0,"popStack:1550":0,"topStack:1561":0,"quotedString:1571":0,"setupHelper:1579":0,"setupParams:1594":0,"isValidJavaScriptVariableName:1665":0,"(anonymous 5):669":0,"precompile:1674":0,"compile:1686":0,"(anonymous 10):1694":0,"compile:1682":0,"render:1755":0,"(anonymous 1):1":0};38_yuitest_coverage["build/handlebars-compiler/handlebars-compiler.js"].coveredLines = 799;39_yuitest_coverage["build/handlebars-compiler/handlebars-compiler.js"].coveredFunctions = 122;40_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1);41YUI.add('handlebars-compiler', function (Y, NAME) {42/*!43Handlebars.js - Copyright (C) 2011 Yehuda Katz44https://raw.github.com/wycats/handlebars.js/master/LICENSE45*/46// This file contains code that will be inserted at the beginning of the47// handlebars-compiler module.48// This is necessary because the Y.Handlebars object is created in the49// handlebars-base module, but the native Handlebars code expects to use a local50// Handlebars reference.51_yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 1)", 1);52_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 13);53var Handlebars = Y.Handlebars;54/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */55/* Jison generated parser */56_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 17);57var handlebars = (function(){58_yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 2)", 17);59_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 18);60var parser = {trace: function trace() { },61yy: {},62symbols_: {"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},63terminals_: {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"},64productions_: [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]],65performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {66_yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "anonymous", 23);67_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 25);68var $0 = $$.length - 1;69_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 26);70switch (yystate) {71case 1: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 27);72return $$[$0-1]; 73_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 28);74break;75case 2: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 29);76this.$ = new yy.ProgramNode($$[$0-2], $$[$0]); 77_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 30);78break;79case 3: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 31);80this.$ = new yy.ProgramNode($$[$0]); 81_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 32);82break;83case 4: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 33);84this.$ = new yy.ProgramNode([]); 85_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 34);86break;87case 5: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 35);88this.$ = [$$[$0]]; 89_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 36);90break;91case 6: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 37);92$$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 93_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 38);94break;95case 7: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 39);96this.$ = new yy.BlockNode($$[$0-2], $$[$0-1].inverse, $$[$0-1], $$[$0]); 97_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 40);98break;99case 8: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 41);100this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0-1].inverse, $$[$0]); 101_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 42);102break;103case 9: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 43);104this.$ = $$[$0]; 105_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 44);106break;107case 10: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 45);108this.$ = $$[$0]; 109_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 46);110break;111case 11: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 47);112this.$ = new yy.ContentNode($$[$0]); 113_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 48);114break;115case 12: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 49);116this.$ = new yy.CommentNode($$[$0]); 117_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 50);118break;119case 13: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 51);120this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); 121_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 52);122break;123case 14: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 53);124this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); 125_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 54);126break;127case 15: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 55);128this.$ = $$[$0-1]; 129_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 56);130break;131case 16: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 57);132this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); 133_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 58);134break;135case 17: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 59);136this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true); 137_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 60);138break;139case 18: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 61);140this.$ = new yy.PartialNode($$[$0-1]); 141_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 62);142break;143case 19: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 63);144this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]); 145_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 64);146break;147case 20: 148_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 66);149break;150case 21: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 67);151this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]]; 152_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 68);153break;154case 22: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 69);155this.$ = [[$$[$0-1]].concat($$[$0]), null]; 156_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 70);157break;158case 23: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 71);159this.$ = [[$$[$0-1]], $$[$0]]; 160_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 72);161break;162case 24: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 73);163this.$ = [[$$[$0]], null]; 164_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 74);165break;166case 25: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 75);167$$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 168_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 76);169break;170case 26: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 77);171this.$ = [$$[$0]]; 172_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 78);173break;174case 27: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 79);175this.$ = $$[$0]; 176_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 80);177break;178case 28: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 81);179this.$ = new yy.StringNode($$[$0]); 180_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 82);181break;182case 29: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 83);183this.$ = new yy.IntegerNode($$[$0]); 184_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 84);185break;186case 30: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 85);187this.$ = new yy.BooleanNode($$[$0]); 188_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 86);189break;190case 31: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 87);191this.$ = new yy.HashNode($$[$0]); 192_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 88);193break;194case 32: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 89);195$$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 196_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 90);197break;198case 33: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 91);199this.$ = [$$[$0]]; 200_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 92);201break;202case 34: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 93);203this.$ = [$$[$0-2], $$[$0]]; 204_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 94);205break;206case 35: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 95);207this.$ = [$$[$0-2], new yy.StringNode($$[$0])]; 208_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 96);209break;210case 36: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 97);211this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])]; 212_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 98);213break;214case 37: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 99);215this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])]; 216_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 100);217break;218case 38: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 101);219this.$ = new yy.IdNode($$[$0]); 220_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 102);221break;222case 39: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 103);223$$[$0-2].push($$[$0]); this.$ = $$[$0-2]; 224_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 104);225break;226case 40: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 105);227this.$ = [$$[$0]]; 228_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 106);229break;230}231},232table: [{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]}],233defaultActions: {16:[2,1],37:[2,23],53:[2,21]},234parseError: function parseError(str, hash) {235 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "parseError", 111);236_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 112);237throw new Error(str);238},239parse: function parse(input) {240 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "parse", 114);241_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 115);242var self = this,243 stack = [0],244 vstack = [null], // semantic value stack245 lstack = [], // location stack246 table = this.table,247 yytext = '',248 yylineno = 0,249 yyleng = 0,250 recovering = 0,251 TERROR = 2,252 EOF = 1;253 //this.reductionCount = this.shiftCount = 0;254 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 129);255this.lexer.setInput(input);256 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 130);257this.lexer.yy = this.yy;258 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 131);259this.yy.lexer = this.lexer;260 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 132);261this.yy.parser = this;262 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 133);263if (typeof this.lexer.yylloc == 'undefined')264 {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 134);265this.lexer.yylloc = {};}266 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 135);267var yyloc = this.lexer.yylloc;268 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 136);269lstack.push(yyloc);270 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 138);271if (typeof this.yy.parseError === 'function')272 {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 139);273this.parseError = this.yy.parseError;}274 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 141);275function popStack (n) {276 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "popStack", 141);277_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 142);278stack.length = stack.length - 2*n;279 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 143);280vstack.length = vstack.length - n;281 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 144);282lstack.length = lstack.length - n;283 }284 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 147);285function lex() {286 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "lex", 147);287_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 148);288var token;289 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 149);290token = self.lexer.lex() || 1; // $end = 1291 // if token isn't its numeric value, convert292 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 151);293if (typeof token !== 'number') {294 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 152);295token = self.symbols_[token] || token;296 }297 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 154);298return token;299 }300 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 157);301var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;302 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 158);303while (true) {304 // retreive state number from top of stack305 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 160);306state = stack[stack.length-1];307 // use default actions if available308 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 163);309if (this.defaultActions[state]) {310 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 164);311action = this.defaultActions[state];312 } else {313 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 166);314if (symbol === null || typeof symbol == 'undefined') {315 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 167);316symbol = lex();317 }318 // read action for current state and first input319 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 170);320action = table[state] && table[state][symbol];321 }322 // handle parse error323 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 174);324_handle_error:325 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 175);326if (typeof action === 'undefined' || !action.length || !action[0]) {327 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 177);328var errStr = '';329 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 178);330if (!recovering) {331 // Report error332 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 180);333expected = [];334 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 181);335for (p in table[state]) {if (this.terminals_[p] && p > 2) {336 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 182);337expected.push("'"+this.terminals_[p]+"'");338 }}339 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 184);340if (this.lexer.showPosition) {341 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 185);342errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + (this.terminals_[symbol] || symbol)+ "'";343 } else {344 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 187);345errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +346 (symbol == 1 /*EOF*/ ? "end of input" :347 ("'"+(this.terminals_[symbol] || symbol)+"'"));348 }349 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 191);350this.parseError(errStr,351 {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});352 }353 // just recovered from another error354 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 196);355if (recovering == 3) {356 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 197);357if (symbol == EOF) {358 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 198);359throw new Error(errStr || 'Parsing halted.');360 }361 // discard current lookahead and grab another362 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 202);363yyleng = this.lexer.yyleng;364 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 203);365yytext = this.lexer.yytext;366 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 204);367yylineno = this.lexer.yylineno;368 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 205);369yyloc = this.lexer.yylloc;370 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 206);371symbol = lex();372 }373 // try to recover from error374 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 210);375while (1) {376 // check for error recovery rule in this state377 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 212);378if ((TERROR.toString()) in table[state]) {379 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 213);380break;381 }382 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 215);383if (state === 0) {384 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 216);385throw new Error(errStr || 'Parsing halted.');386 }387 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 218);388popStack(1);389 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 219);390state = stack[stack.length-1];391 }392 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 222);393preErrorSymbol = symbol == 2 ? null : symbol; // save the lookahead token394 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 223);395symbol = TERROR; // insert generic error symbol as new lookahead396 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 224);397state = stack[stack.length-1];398 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 225);399action = table[state] && table[state][TERROR];400 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 226);401recovering = 3; // allow 3 real symbols to be shifted before reporting a new error402 }403 // this shouldn't happen, unless resolve defaults are off404 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 230);405if (action[0] instanceof Array && action.length > 1) {406 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 231);407throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);408 }409 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 234);410switch (action[0]) {411 case 1: // shift412 //this.shiftCount++;413 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 239);414stack.push(symbol);415 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 240);416vstack.push(this.lexer.yytext);417 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 241);418lstack.push(this.lexer.yylloc);419 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 242);420stack.push(action[1]); // push state421 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 243);422symbol = null;423 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 244);424if (!preErrorSymbol) { // normal execution/no error425 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 245);426yyleng = this.lexer.yyleng;427 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 246);428yytext = this.lexer.yytext;429 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 247);430yylineno = this.lexer.yylineno;431 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 248);432yyloc = this.lexer.yylloc;433 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 249);434if (recovering > 0)435 {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 250);436recovering--;}437 } else { // error just occurred, resume old lookahead f/ before error438 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 252);439symbol = preErrorSymbol;440 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 253);441preErrorSymbol = null;442 }443 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 255);444break;445 case 2: // reduce446 //this.reductionCount++;447 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 260);448len = this.productions_[action[1]][1];449 // perform semantic action450 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 263);451yyval.$ = vstack[vstack.length-len]; // default to $$ = $1452 // default location, uses first token for firsts, last for lasts453 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 265);454yyval._$ = {455 first_line: lstack[lstack.length-(len||1)].first_line,456 last_line: lstack[lstack.length-1].last_line,457 first_column: lstack[lstack.length-(len||1)].first_column,458 last_column: lstack[lstack.length-1].last_column459 };460 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 271);461r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);462 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 273);463if (typeof r !== 'undefined') {464 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 274);465return r;466 }467 // pop off stack468 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 278);469if (len) {470 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 279);471stack = stack.slice(0,-1*len*2);472 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 280);473vstack = vstack.slice(0, -1*len);474 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 281);475lstack = lstack.slice(0, -1*len);476 }477 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 284);478stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)479 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 285);480vstack.push(yyval.$);481 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 286);482lstack.push(yyval._$);483 // goto new state = table[STATE][NONTERMINAL]484 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 288);485newState = table[stack[stack.length-2]][stack[stack.length-1]];486 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 289);487stack.push(newState);488 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 290);489break;490 case 3: // accept491 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 293);492return true;493 }494 }495 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 298);496return true;497}};498/* Jison generated lexer */499_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 301);500var lexer = (function(){501_yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 3)", 301);502_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 302);503var lexer = ({EOF:1,504parseError:function parseError(str, hash) {505 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "parseError", 303);506_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 304);507if (this.yy.parser) {508 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 305);509this.yy.parser.parseError(str, hash);510 } else {511 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 307);512throw new Error(str);513 }514 },515setInput:function (input) {516 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "setInput", 310);517_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 311);518this._input = input;519 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 312);520this._more = this._less = this.done = false;521 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 313);522this.yylineno = this.yyleng = 0;523 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 314);524this.yytext = this.matched = this.match = '';525 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 315);526this.conditionStack = ['INITIAL'];527 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 316);528this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};529 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 317);530return this;531 },532input:function () {533 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "input", 319);534_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 320);535var ch = this._input[0];536 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 321);537this.yytext+=ch;538 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 322);539this.yyleng++;540 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 323);541this.match+=ch;542 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 324);543this.matched+=ch;544 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 325);545var lines = ch.match(/\n/);546 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 326);547if (lines) {this.yylineno++;}548 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 327);549this._input = this._input.slice(1);550 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 328);551return ch;552 },553unput:function (ch) {554 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "unput", 330);555_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 331);556this._input = ch + this._input;557 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 332);558return this;559 },560more:function () {561 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "more", 334);562_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 335);563this._more = true;564 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 336);565return this;566 },567less:function (n) {568 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "less", 338);569_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 339);570this._input = this.match.slice(n) + this._input;571 },572pastInput:function () {573 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pastInput", 341);574_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 342);575var past = this.matched.substr(0, this.matched.length - this.match.length);576 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 343);577return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");578 },579upcomingInput:function () {580 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "upcomingInput", 345);581_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 346);582var next = this.match;583 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 347);584if (next.length < 20) {585 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 348);586next += this._input.substr(0, 20-next.length);587 }588 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 350);589return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");590 },591showPosition:function () {592 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "showPosition", 352);593_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 353);594var pre = this.pastInput();595 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 354);596var c = new Array(pre.length + 1).join("-");597 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 355);598return pre + this.upcomingInput() + "\n" + c+"^";599 },600next:function () {601 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "next", 357);602_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 358);603if (this.done) {604 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 359);605return this.EOF;606 }607 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 361);608if (!this._input) {this.done = true;}609 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 363);610var token,611 match,612 tempMatch,613 index,614 col,615 lines;616 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 369);617if (!this._more) {618 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 370);619this.yytext = '';620 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 371);621this.match = '';622 }623 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 373);624var rules = this._currentRules();625 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 374);626for (var i=0;i < rules.length; i++) {627 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 375);628tempMatch = this._input.match(this.rules[rules[i]]);629 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 376);630if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {631 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 377);632match = tempMatch;633 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 378);634index = i;635 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 379);636if (!this.options.flex) {break;}637 }638 }639 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 382);640if (match) {641 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 383);642lines = match[0].match(/\n.*/g);643 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 384);644if (lines) {this.yylineno += lines.length;}645 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 385);646this.yylloc = {first_line: this.yylloc.last_line,647 last_line: this.yylineno+1,648 first_column: this.yylloc.last_column,649 last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length};650 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 389);651this.yytext += match[0];652 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 390);653this.match += match[0];654 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 391);655this.yyleng = this.yytext.length;656 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 392);657this._more = false;658 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 393);659this._input = this._input.slice(match[0].length);660 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 394);661this.matched += match[0];662 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 395);663token = this.performAction.call(this, this.yy, this, rules[index],this.conditionStack[this.conditionStack.length-1]);664 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 396);665if (this.done && this._input) {this.done = false;}666 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 397);667if (token) {return token;}668 else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 398);669return;}670 }671 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 400);672if (this._input === "") {673 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 401);674return this.EOF;675 } else {676 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 403);677return this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),678 {text: "", token: null, line: this.yylineno});679 }680 },681lex:function lex() {682 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "lex", 407);683_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 408);684var r = this.next();685 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 409);686if (typeof r !== 'undefined') {687 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 410);688return r;689 } else {690 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 412);691return this.lex();692 }693 },694begin:function begin(condition) {695 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "begin", 415);696_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 416);697this.conditionStack.push(condition);698 },699popState:function popState() {700 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "popState", 418);701_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 419);702return this.conditionStack.pop();703 },704_currentRules:function _currentRules() {705 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "_currentRules", 421);706_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 422);707return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;708 },709topState:function () {710 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "topState", 424);711_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 425);712return this.conditionStack[this.conditionStack.length-2];713 },714pushState:function begin(condition) {715 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "begin", 427);716_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 428);717this.begin(condition);718 }});719_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 430);720lexer.options = {};721_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 431);722lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {723_yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "anonymous", 431);724_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 433);725var YYSTATE=YY_START726_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 434);727switch($avoiding_name_collisions) {728case 0:729 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 436);730if(yy_.yytext.slice(-1) !== "\\") {this.begin("mu");}731 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 437);732if(yy_.yytext.slice(-1) === "\\") {yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");}733 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 438);734if(yy_.yytext) {return 14;}735 736_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 440);737break;738case 1: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 441);739return 14; 740_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 442);741break;742case 2: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 443);743this.popState(); return 14; 744_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 444);745break;746case 3: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 445);747return 24; 748_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 446);749break;750case 4: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 447);751return 16; 752_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 448);753break;754case 5: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 449);755return 20; 756_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 450);757break;758case 6: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 451);759return 19; 760_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 452);761break;762case 7: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 453);763return 19; 764_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 454);765break;766case 8: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 455);767return 23; 768_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 456);769break;770case 9: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 457);771return 23; 772_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 458);773break;774case 10: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 459);775yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15; 776_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 460);777break;778case 11: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 461);779return 22; 780_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 462);781break;782case 12: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 463);783return 34; 784_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 464);785break;786case 13: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 465);787return 33; 788_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 466);789break;790case 14: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 467);791return 33; 792_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 468);793break;794case 15: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 469);795return 36; 796_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 470);797break;798case 16: /*ignore whitespace*/ 799_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 472);800break;801case 17: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 473);802this.popState(); return 18; 803_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 474);804break;805case 18: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 475);806this.popState(); return 18; 807_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 476);808break;809case 19: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 477);810yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 28; 811_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 478);812break;813case 20: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 479);814return 30; 815_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 480);816break;817case 21: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 481);818return 30; 819_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 482);820break;821case 22: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 483);822return 29; 823_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 484);824break;825case 23: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 485);826return 33; 827_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 486);828break;829case 24: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 487);830yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 33; 831_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 488);832break;833case 25: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 489);834return 'INVALID'; 835_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 490);836break;837case 26: _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 491);838return 5; 839_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 492);840break;841}842};843_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 495);844lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{)))/,/^(?:\{\{>)/,/^(?:\{\{#)/,/^(?:\{\{\/)/,/^(?:\{\{\^)/,/^(?:\{\{\s*else\b)/,/^(?:\{\{\{)/,/^(?:\{\{&)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{)/,/^(?:=)/,/^(?:\.(?=[} ]))/,/^(?:\.\.)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}\}\})/,/^(?:\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:true(?=[}\s]))/,/^(?:false(?=[}\s]))/,/^(?:[0-9]+(?=[}\s]))/,/^(?:[a-zA-Z0-9_$-]+(?=[=}\s\/.]))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];845_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 496);846lexer.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}};847_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 497);848return lexer;})()849_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 498);850parser.lexer = lexer;function Parser () { _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "Parser", 498);851this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser;852_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 499);853return new Parser;854})();855_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 501);856if (typeof require !== 'undefined' && typeof exports !== 'undefined') {857_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 502);858exports.parser = handlebars;859_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 503);860exports.Parser = handlebars.Parser;861_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 504);862exports.parse = function () { _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "parse", 504);863return handlebars.parse.apply(handlebars, arguments); }864_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 505);865exports.main = function commonjsMain(args) {866 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "commonjsMain", 505);867_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 506);868if (!args[1])869 {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 507);870throw new Error('Usage: '+args[0]+' FILE');}871 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 508);872var source, cwd;873 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 509);874if (typeof process !== 'undefined') {875 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 510);876source = require('fs').readFileSync(require('path').resolve(args[1]), "utf8");877 } else {878 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 512);879source = require("file").path(require("file").cwd()).join(args[1]).read({charset: "utf-8"});880 }881 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 514);882return exports.parser.parse(source);883}884_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 516);885if (typeof module !== 'undefined' && require.main === module) {886 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 517);887exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args);888}889}_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 519);890;891/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */892// BEGIN(BROWSER)893_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 523);894Handlebars.Parser = handlebars;895_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 525);896Handlebars.parse = function(string) {897 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "parse", 525);898_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 526);899Handlebars.Parser.yy = Handlebars.AST;900 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 527);901return Handlebars.Parser.parse(string);902};903_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 530);904Handlebars.print = function(ast) {905 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "print", 530);906_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 531);907return new Handlebars.PrintVisitor().accept(ast);908};909_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 534);910Handlebars.logger = {911 DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,912 // override in the host environment913 log: function(level, str) {}914};915_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 541);916Handlebars.log = function(level, str) { _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "log", 541);917Handlebars.logger.log(level, str); };918// END(BROWSER)919/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */920// BEGIN(BROWSER)921_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 547);922(function() {923 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 4)", 547);924_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 549);925Handlebars.AST = {};926 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 551);927Handlebars.AST.ProgramNode = function(statements, inverse) {928 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "ProgramNode", 551);929_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 552);930this.type = "program";931 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 553);932this.statements = statements;933 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 554);934if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }935 };936 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 557);937Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) {938 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "MustacheNode", 557);939_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 558);940this.type = "mustache";941 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 559);942this.escaped = !unescaped;943 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 560);944this.hash = hash;945 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 562);946var id = this.id = rawParams[0];947 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 563);948var params = this.params = rawParams.slice(1);949 // a mustache is an eligible helper if:950 // * its id is simple (a single part, not `this` or `..`)951 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 567);952var eligibleHelper = this.eligibleHelper = id.isSimple;953 // a mustache is definitely a helper if:954 // * it is an eligible helper, and955 // * it has at least one parameter or hash segment956 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 572);957this.isHelper = eligibleHelper && (params.length || hash);958 // if a mustache is an eligible helper but not a definite959 // helper, it is ambiguous, and will be resolved in a later960 // pass or at runtime.961 };962 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 579);963Handlebars.AST.PartialNode = function(id, context) {964 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "PartialNode", 579);965_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 580);966this.type = "partial";967 // TODO: disallow complex IDs968 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 584);969this.id = id;970 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 585);971this.context = context;972 };973 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 588);974var verifyMatch = function(open, close) {975 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "verifyMatch", 588);976_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 589);977if(open.original !== close.original) {978 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 590);979throw new Handlebars.Exception(open.original + " doesn't match " + close.original);980 }981 };982 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 594);983Handlebars.AST.BlockNode = function(mustache, program, inverse, close) {984 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "BlockNode", 594);985_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 595);986verifyMatch(mustache.id, close);987 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 596);988this.type = "block";989 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 597);990this.mustache = mustache;991 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 598);992this.program = program;993 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 599);994this.inverse = inverse;995 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 601);996if (this.inverse && !this.program) {997 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 602);998this.isInverse = true;999 }1000 };1001 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 606);1002Handlebars.AST.ContentNode = function(string) {1003 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "ContentNode", 606);1004_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 607);1005this.type = "content";1006 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 608);1007this.string = string;1008 };1009 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 611);1010Handlebars.AST.HashNode = function(pairs) {1011 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "HashNode", 611);1012_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 612);1013this.type = "hash";1014 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 613);1015this.pairs = pairs;1016 };1017 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 616);1018Handlebars.AST.IdNode = function(parts) {1019 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "IdNode", 616);1020_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 617);1021this.type = "ID";1022 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 618);1023this.original = parts.join(".");1024 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 620);1025var dig = [], depth = 0;1026 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 622);1027for(var i=0,l=parts.length; i<l; i++) {1028 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 623);1029var part = parts[i];1030 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 625);1031if(part === "..") { depth++; }1032 else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 626);1033if(part === "." || part === "this") { this.isScoped = true; }1034 else { dig.push(part); }}1035 }1036 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 630);1037this.parts = dig;1038 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 631);1039this.string = dig.join('.');1040 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 632);1041this.depth = depth;1042 // an ID is simple if it only has one part, and that part is not1043 // `..` or `this`.1044 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 636);1045this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;1046 };1047 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 639);1048Handlebars.AST.StringNode = function(string) {1049 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "StringNode", 639);1050_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 640);1051this.type = "STRING";1052 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 641);1053this.string = string;1054 };1055 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 644);1056Handlebars.AST.IntegerNode = function(integer) {1057 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "IntegerNode", 644);1058_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 645);1059this.type = "INTEGER";1060 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 646);1061this.integer = integer;1062 };1063 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 649);1064Handlebars.AST.BooleanNode = function(bool) {1065 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "BooleanNode", 649);1066_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 650);1067this.type = "BOOLEAN";1068 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 651);1069this.bool = bool;1070 };1071 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 654);1072Handlebars.AST.CommentNode = function(comment) {1073 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "CommentNode", 654);1074_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 655);1075this.type = "comment";1076 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 656);1077this.comment = comment;1078 };1079})();1080// END(BROWSER)1081/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */1082// BEGIN(BROWSER)1083/*jshint eqnull:true*/1084_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 666);1085Handlebars.Compiler = function() {};1086_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 667);1087Handlebars.JavaScriptCompiler = function() {};1088_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 669);1089(function(Compiler, JavaScriptCompiler) {1090 // the foundHelper register will disambiguate helper lookup from finding a1091 // function in a context. This is necessary for mustache compatibility, which1092 // requires that context functions in blocks are evaluated by blockHelperMissing,1093 // and then proceed as if the resulting value was provided to blockHelperMissing.1094 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 5)", 669);1095_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 675);1096Compiler.prototype = {1097 compiler: Compiler,1098 disassemble: function() {1099 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "disassemble", 678);1100_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 679);1101var opcodes = this.opcodes, opcode, out = [], params, param;1102 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 681);1103for (var i=0, l=opcodes.length; i<l; i++) {1104 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 682);1105opcode = opcodes[i];1106 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 684);1107if (opcode.opcode === 'DECLARE') {1108 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 685);1109out.push("DECLARE " + opcode.name + "=" + opcode.value);1110 } else {1111 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 687);1112params = [];1113 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 688);1114for (var j=0; j<opcode.args.length; j++) {1115 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 689);1116param = opcode.args[j];1117 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 690);1118if (typeof param === "string") {1119 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 691);1120param = "\"" + param.replace("\n", "\\n") + "\"";1121 }1122 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 693);1123params.push(param);1124 }1125 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 695);1126out.push(opcode.opcode + " " + params.join(" "));1127 }1128 }1129 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 699);1130return out.join("\n");1131 },1132 guid: 0,1133 compile: function(program, options) {1134 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "compile", 704);1135_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 705);1136this.children = [];1137 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 706);1138this.depths = {list: []};1139 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 707);1140this.options = options;1141 // These changes will propagate to the other compiler components1142 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 710);1143var knownHelpers = this.options.knownHelpers;1144 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 711);1145this.options.knownHelpers = {1146 'helperMissing': true,1147 'blockHelperMissing': true,1148 'each': true,1149 'if': true,1150 'unless': true,1151 'with': true,1152 'log': true1153 };1154 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 720);1155if (knownHelpers) {1156 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 721);1157for (var name in knownHelpers) {1158 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 722);1159this.options.knownHelpers[name] = knownHelpers[name];1160 }1161 }1162 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 726);1163return this.program(program);1164 },1165 accept: function(node) {1166 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "accept", 729);1167_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 730);1168return this[node.type](node);1169 },1170 program: function(program) {1171 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "program", 733);1172_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 734);1173var statements = program.statements, statement;1174 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 735);1175this.opcodes = [];1176 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 737);1177for(var i=0, l=statements.length; i<l; i++) {1178 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 738);1179statement = statements[i];1180 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 739);1181this[statement.type](statement);1182 }1183 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 741);1184this.isSimple = l === 1;1185 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 743);1186this.depths.list = this.depths.list.sort(function(a, b) {1187 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 6)", 743);1188_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 744);1189return a - b;1190 });1191 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 747);1192return this;1193 },1194 compileProgram: function(program) {1195 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "compileProgram", 750);1196_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 751);1197var result = new this.compiler().compile(program, this.options);1198 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 752);1199var guid = this.guid++, depth;1200 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 754);1201this.usePartial = this.usePartial || result.usePartial;1202 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 756);1203this.children[guid] = result;1204 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 758);1205for(var i=0, l=result.depths.list.length; i<l; i++) {1206 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 759);1207depth = result.depths.list[i];1208 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 761);1209if(depth < 2) { continue; }1210 else { this.addDepth(depth - 1); }1211 }1212 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 765);1213return guid;1214 },1215 block: function(block) {1216 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "block", 768);1217_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 769);1218var mustache = block.mustache,1219 program = block.program,1220 inverse = block.inverse;1221 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 773);1222if (program) {1223 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 774);1224program = this.compileProgram(program);1225 }1226 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 777);1227if (inverse) {1228 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 778);1229inverse = this.compileProgram(inverse);1230 }1231 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 781);1232var type = this.classifyMustache(mustache);1233 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 783);1234if (type === "helper") {1235 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 784);1236this.helperMustache(mustache, program, inverse);1237 } else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 785);1238if (type === "simple") {1239 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 786);1240this.simpleMustache(mustache);1241 // now that the simple mustache is resolved, we need to1242 // evaluate it by executing `blockHelperMissing`1243 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 790);1244this.opcode('pushProgram', program);1245 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 791);1246this.opcode('pushProgram', inverse);1247 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 792);1248this.opcode('pushLiteral', '{}');1249 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 793);1250this.opcode('blockValue');1251 } else {1252 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 795);1253this.ambiguousMustache(mustache, program, inverse);1254 // now that the simple mustache is resolved, we need to1255 // evaluate it by executing `blockHelperMissing`1256 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 799);1257this.opcode('pushProgram', program);1258 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 800);1259this.opcode('pushProgram', inverse);1260 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 801);1261this.opcode('pushLiteral', '{}');1262 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 802);1263this.opcode('ambiguousBlockValue');1264 }}1265 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 805);1266this.opcode('append');1267 },1268 hash: function(hash) {1269 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "hash", 808);1270_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 809);1271var pairs = hash.pairs, pair, val;1272 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 811);1273this.opcode('push', '{}');1274 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 813);1275for(var i=0, l=pairs.length; i<l; i++) {1276 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 814);1277pair = pairs[i];1278 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 815);1279val = pair[1];1280 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 817);1281this.accept(val);1282 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 818);1283this.opcode('assignToHash', pair[0]);1284 }1285 },1286 partial: function(partial) {1287 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "partial", 822);1288_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 823);1289var id = partial.id;1290 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 824);1291this.usePartial = true;1292 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 826);1293if(partial.context) {1294 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 827);1295this.ID(partial.context);1296 } else {1297 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 829);1298this.opcode('push', 'depth0');1299 }1300 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 832);1301this.opcode('invokePartial', id.original);1302 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 833);1303this.opcode('append');1304 },1305 content: function(content) {1306 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "content", 836);1307_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 837);1308this.opcode('appendContent', content.string);1309 },1310 mustache: function(mustache) {1311 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "mustache", 840);1312_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 841);1313var options = this.options;1314 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 842);1315var type = this.classifyMustache(mustache);1316 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 844);1317if (type === "simple") {1318 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 845);1319this.simpleMustache(mustache);1320 } else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 846);1321if (type === "helper") {1322 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 847);1323this.helperMustache(mustache);1324 } else {1325 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 849);1326this.ambiguousMustache(mustache);1327 }}1328 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 852);1329if(mustache.escaped && !options.noEscape) {1330 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 853);1331this.opcode('appendEscaped');1332 } else {1333 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 855);1334this.opcode('append');1335 }1336 },1337 ambiguousMustache: function(mustache, program, inverse) {1338 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "ambiguousMustache", 859);1339_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 860);1340var id = mustache.id, name = id.parts[0];1341 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 862);1342this.opcode('getContext', id.depth);1343 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 864);1344this.opcode('pushProgram', program);1345 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 865);1346this.opcode('pushProgram', inverse);1347 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 867);1348this.opcode('invokeAmbiguous', name);1349 },1350 simpleMustache: function(mustache, program, inverse) {1351 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "simpleMustache", 870);1352_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 871);1353var id = mustache.id;1354 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 873);1355this.addDepth(id.depth);1356 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 874);1357this.opcode('getContext', id.depth);1358 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 876);1359if (id.parts.length) {1360 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 877);1361this.opcode('lookupOnContext', id.parts[0]);1362 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 878);1363for(var i=1, l=id.parts.length; i<l; i++) {1364 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 879);1365this.opcode('lookup', id.parts[i]);1366 }1367 } else {1368 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 882);1369this.opcode('pushContext');1370 }1371 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 884);1372this.opcode('resolvePossibleLambda');1373 },1374 helperMustache: function(mustache, program, inverse) {1375 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "helperMustache", 887);1376_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 888);1377var params = this.setupFullMustacheParams(mustache, program, inverse),1378 name = mustache.id.parts[0];1379 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 891);1380if (this.options.knownHelpers[name]) {1381 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 892);1382this.opcode('invokeKnownHelper', params.length, name);1383 } else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 893);1384if (this.knownHelpersOnly) {1385 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 894);1386throw new Error("You specified knownHelpersOnly, but used the unknown helper " + name);1387 } else {1388 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 896);1389this.opcode('invokeHelper', params.length, name);1390 }}1391 },1392 ID: function(id) {1393 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "ID", 900);1394_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 901);1395this.addDepth(id.depth);1396 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 902);1397this.opcode('getContext', id.depth);1398 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 903);1399this.opcode('lookupOnContext', id.parts[0]);1400 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 905);1401for(var i=1, l=id.parts.length; i<l; i++) {1402 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 906);1403this.opcode('lookup', id.parts[i]);1404 }1405 },1406 STRING: function(string) {1407 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "STRING", 910);1408_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 911);1409this.opcode('pushString', string.string);1410 },1411 INTEGER: function(integer) {1412 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "INTEGER", 914);1413_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 915);1414this.opcode('pushLiteral', integer.integer);1415 },1416 BOOLEAN: function(bool) {1417 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "BOOLEAN", 918);1418_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 919);1419this.opcode('pushLiteral', bool.bool);1420 },1421 comment: function() {},1422 // HELPERS1423 opcode: function(name) {1424 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "opcode", 925);1425_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 926);1426this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });1427 },1428 declare: function(name, value) {1429 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "declare", 929);1430_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 930);1431this.opcodes.push({ opcode: 'DECLARE', name: name, value: value });1432 },1433 addDepth: function(depth) {1434 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "addDepth", 933);1435_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 934);1436if(depth === 0) { return; }1437 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 936);1438if(!this.depths[depth]) {1439 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 937);1440this.depths[depth] = true;1441 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 938);1442this.depths.list.push(depth);1443 }1444 },1445 classifyMustache: function(mustache) {1446 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "classifyMustache", 942);1447_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 943);1448var isHelper = mustache.isHelper;1449 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 944);1450var isEligible = mustache.eligibleHelper;1451 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 945);1452var options = this.options;1453 // if ambiguous, we can possibly resolve the ambiguity now1454 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 948);1455if (isEligible && !isHelper) {1456 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 949);1457var name = mustache.id.parts[0];1458 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 951);1459if (options.knownHelpers[name]) {1460 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 952);1461isHelper = true;1462 } else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 953);1463if (options.knownHelpersOnly) {1464 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 954);1465isEligible = false;1466 }}1467 }1468 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 958);1469if (isHelper) { return "helper"; }1470 else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 959);1471if (isEligible) { return "ambiguous"; }1472 else { return "simple"; }}1473 },1474 pushParams: function(params) {1475 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushParams", 963);1476_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 964);1477var i = params.length, param;1478 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 966);1479while(i--) {1480 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 967);1481param = params[i];1482 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 969);1483if(this.options.stringParams) {1484 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 970);1485if(param.depth) {1486 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 971);1487this.addDepth(param.depth);1488 }1489 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 974);1490this.opcode('getContext', param.depth || 0);1491 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 975);1492this.opcode('pushStringParam', param.string);1493 } else {1494 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 977);1495this[param.type](param);1496 }1497 }1498 },1499 setupMustacheParams: function(mustache) {1500 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "setupMustacheParams", 982);1501_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 983);1502var params = mustache.params;1503 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 984);1504this.pushParams(params);1505 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 986);1506if(mustache.hash) {1507 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 987);1508this.hash(mustache.hash);1509 } else {1510 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 989);1511this.opcode('pushLiteral', '{}');1512 }1513 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 992);1514return params;1515 },1516 // this will replace setupMustacheParams when we're done1517 setupFullMustacheParams: function(mustache, program, inverse) {1518 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "setupFullMustacheParams", 996);1519_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 997);1520var params = mustache.params;1521 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 998);1522this.pushParams(params);1523 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1000);1524this.opcode('pushProgram', program);1525 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1001);1526this.opcode('pushProgram', inverse);1527 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1003);1528if(mustache.hash) {1529 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1004);1530this.hash(mustache.hash);1531 } else {1532 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1006);1533this.opcode('pushLiteral', '{}');1534 }1535 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1009);1536return params;1537 }1538 };1539 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1013);1540var Literal = function(value) {1541 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "Literal", 1013);1542_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1014);1543this.value = value;1544 };1545 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1017);1546JavaScriptCompiler.prototype = {1547 // PUBLIC API: You can override these methods in a subclass to provide1548 // alternative compiled forms for name lookup and buffering semantics1549 nameLookup: function(parent, name, type) {1550 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "nameLookup", 1020);1551_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1021);1552if (/^[0-9]+$/.test(name)) {1553 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1022);1554return parent + "[" + name + "]";1555 } else {_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1023);1556if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {1557 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1024);1558return parent + "." + name;1559 }1560 else {1561 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1027);1562return parent + "['" + name + "']";1563 }}1564 },1565 appendToBuffer: function(string) {1566 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "appendToBuffer", 1031);1567_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1032);1568if (this.environment.isSimple) {1569 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1033);1570return "return " + string + ";";1571 } else {1572 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1035);1573return "buffer += " + string + ";";1574 }1575 },1576 initializeBuffer: function() {1577 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "initializeBuffer", 1039);1578_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1040);1579return this.quotedString("");1580 },1581 namespace: "Handlebars",1582 // END PUBLIC API1583 compile: function(environment, options, context, asObject) {1584 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "compile", 1046);1585_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1047);1586this.environment = environment;1587 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1048);1588this.options = options || {};1589 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1050);1590Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + "\n\n");1591 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1052);1592this.name = this.environment.name;1593 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1053);1594this.isChild = !!context;1595 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1054);1596this.context = context || {1597 programs: [],1598 aliases: { }1599 };1600 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1059);1601this.preamble();1602 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1061);1603this.stackSlot = 0;1604 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1062);1605this.stackVars = [];1606 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1063);1607this.registers = { list: [] };1608 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1064);1609this.compileStack = [];1610 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1066);1611this.compileChildren(environment, options);1612 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1068);1613var opcodes = environment.opcodes, opcode;1614 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1070);1615this.i = 0;1616 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1072);1617for(l=opcodes.length; this.i<l; this.i++) {1618 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1073);1619opcode = opcodes[this.i];1620 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1075);1621if(opcode.opcode === 'DECLARE') {1622 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1076);1623this[opcode.name] = opcode.value;1624 } else {1625 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1078);1626this[opcode.opcode].apply(this, opcode.args);1627 }1628 }1629 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1082);1630return this.createFunctionContext(asObject);1631 },1632 nextOpcode: function() {1633 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "nextOpcode", 1085);1634_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1086);1635var opcodes = this.environment.opcodes, opcode = opcodes[this.i + 1];1636 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1087);1637return opcodes[this.i + 1];1638 },1639 eat: function(opcode) {1640 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "eat", 1090);1641_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1091);1642this.i = this.i + 1;1643 },1644 preamble: function() {1645 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "preamble", 1094);1646_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1095);1647var out = [];1648 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1097);1649if (!this.isChild) {1650 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1098);1651var namespace = this.namespace;1652 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1099);1653var copies = "helpers = helpers || " + namespace + ".helpers;";1654 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1100);1655if(this.environment.usePartial) { copies = copies + " partials = partials || " + namespace + ".partials;"; }1656 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1101);1657out.push(copies);1658 } else {1659 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1103);1660out.push('');1661 }1662 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1106);1663if (!this.environment.isSimple) {1664 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1107);1665out.push(", buffer = " + this.initializeBuffer());1666 } else {1667 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1109);1668out.push("");1669 }1670 // track the last context pushed into place to allow skipping the1671 // getContext opcode when it would be a noop1672 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1114);1673this.lastContext = 0;1674 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1115);1675this.source = out;1676 },1677 createFunctionContext: function(asObject) {1678 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "createFunctionContext", 1118);1679_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1119);1680var locals = this.stackVars.concat(this.registers.list);1681 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1121);1682if(locals.length > 0) {1683 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1122);1684this.source[1] = this.source[1] + ", " + locals.join(", ");1685 }1686 // Generate minimizer alias mappings1687 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1126);1688if (!this.isChild) {1689 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1127);1690var aliases = [];1691 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1128);1692for (var alias in this.context.aliases) {1693 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1129);1694this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];1695 }1696 }1697 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1133);1698if (this.source[1]) {1699 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1134);1700this.source[1] = "var " + this.source[1].substring(2) + ";";1701 }1702 // Merge children1703 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1138);1704if (!this.isChild) {1705 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1139);1706this.source[1] += '\n' + this.context.programs.join('\n') + '\n';1707 }1708 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1142);1709if (!this.environment.isSimple) {1710 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1143);1711this.source.push("return buffer;");1712 }1713 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1146);1714var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];1715 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1148);1716for(var i=0, l=this.environment.depths.list.length; i<l; i++) {1717 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1149);1718params.push("depth" + this.environment.depths.list[i]);1719 }1720 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1152);1721if (asObject) {1722 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1153);1723params.push(this.source.join("\n "));1724 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1155);1725return Function.apply(this, params);1726 } else {1727 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1157);1728var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n ' + this.source.join("\n ") + '}';1729 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1158);1730Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n");1731 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1159);1732return functionSource;1733 }1734 },1735 // [blockValue]1736 //1737 // On stack, before: hash, inverse, program, value1738 // On stack, after: return value of blockHelperMissing1739 //1740 // The purpose of this opcode is to take a block of the form1741 // `{{#foo}}...{{/foo}}`, resolve the value of `foo`, and1742 // replace it on the stack with the result of properly1743 // invoking blockHelperMissing.1744 blockValue: function() {1745 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "blockValue", 1172);1746_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1173);1747this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';1748 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1175);1749var params = ["depth0"];1750 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1176);1751this.setupParams(0, params);1752 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1178);1753this.replaceStack(function(current) {1754 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 7)", 1178);1755_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1179);1756params.splice(1, 0, current);1757 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1180);1758return current + " = blockHelperMissing.call(" + params.join(", ") + ")";1759 });1760 },1761 // [ambiguousBlockValue]1762 //1763 // On stack, before: hash, inverse, program, value1764 // Compiler value, before: lastHelper=value of last found helper, if any1765 // On stack, after, if no lastHelper: same as [blockValue]1766 // On stack, after, if lastHelper: value1767 ambiguousBlockValue: function() {1768 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "ambiguousBlockValue", 1190);1769_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1191);1770this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';1771 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1193);1772var params = ["depth0"];1773 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1194);1774this.setupParams(0, params);1775 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1196);1776var current = this.topStack();1777 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1197);1778params.splice(1, 0, current);1779 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1199);1780this.source.push("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");1781 },1782 // [appendContent]1783 //1784 // On stack, before: ...1785 // On stack, after: ...1786 //1787 // Appends the string value of `content` to the current buffer1788 appendContent: function(content) {1789 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "appendContent", 1208);1790_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1209);1791this.source.push(this.appendToBuffer(this.quotedString(content)));1792 },1793 // [append]1794 //1795 // On stack, before: value, ...1796 // On stack, after: ...1797 //1798 // Coerces `value` to a String and appends it to the current buffer.1799 //1800 // If `value` is truthy, or 0, it is coerced into a string and appended1801 // Otherwise, the empty string is appended1802 append: function() {1803 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "append", 1221);1804_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1222);1805var local = this.popStack();1806 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1223);1807this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");1808 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1224);1809if (this.environment.isSimple) {1810 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1225);1811this.source.push("else { " + this.appendToBuffer("''") + " }");1812 }1813 },1814 // [appendEscaped]1815 //1816 // On stack, before: value, ...1817 // On stack, after: ...1818 //1819 // Escape `value` and append it to the buffer1820 appendEscaped: function() {1821 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "appendEscaped", 1235);1822_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1236);1823var opcode = this.nextOpcode(), extra = "";1824 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1237);1825this.context.aliases.escapeExpression = 'this.escapeExpression';1826 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1239);1827if(opcode && opcode.opcode === 'appendContent') {1828 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1240);1829extra = " + " + this.quotedString(opcode.args[0]);1830 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1241);1831this.eat(opcode);1832 }1833 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1244);1834this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")" + extra));1835 },1836 // [getContext]1837 //1838 // On stack, before: ...1839 // On stack, after: ...1840 // Compiler value, after: lastContext=depth1841 //1842 // Set the value of the `lastContext` compiler value to the depth1843 getContext: function(depth) {1844 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "getContext", 1254);1845_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1255);1846if(this.lastContext !== depth) {1847 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1256);1848this.lastContext = depth;1849 }1850 },1851 // [lookupOnContext]1852 //1853 // On stack, before: ...1854 // On stack, after: currentContext[name], ...1855 //1856 // Looks up the value of `name` on the current context and pushes1857 // it onto the stack.1858 lookupOnContext: function(name) {1859 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "lookupOnContext", 1267);1860_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1268);1861this.pushStack(this.nameLookup('depth' + this.lastContext, name, 'context'));1862 },1863 // [pushContext]1864 //1865 // On stack, before: ...1866 // On stack, after: currentContext, ...1867 //1868 // Pushes the value of the current context onto the stack.1869 pushContext: function() {1870 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushContext", 1277);1871_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1278);1872this.pushStackLiteral('depth' + this.lastContext);1873 },1874 // [resolvePossibleLambda]1875 //1876 // On stack, before: value, ...1877 // On stack, after: resolved value, ...1878 //1879 // If the `value` is a lambda, replace it on the stack by1880 // the return value of the lambda1881 resolvePossibleLambda: function() {1882 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "resolvePossibleLambda", 1288);1883_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1289);1884this.context.aliases.functionType = '"function"';1885 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1291);1886this.replaceStack(function(current) {1887 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 8)", 1291);1888_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1292);1889return "typeof " + current + " === functionType ? " + current + "() : " + current;1890 });1891 },1892 // [lookup]1893 //1894 // On stack, before: value, ...1895 // On stack, after: value[name], ...1896 //1897 // Replace the value on the stack with the result of looking1898 // up `name` on `value`1899 lookup: function(name) {1900 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "lookup", 1303);1901_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1304);1902this.replaceStack(function(current) {1903 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 9)", 1304);1904_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1305);1905return current + " == null || " + current + " === false ? " + current + " : " + this.nameLookup(current, name, 'context');1906 });1907 },1908 // [pushStringParam]1909 //1910 // On stack, before: ...1911 // On stack, after: string, currentContext, ...1912 //1913 // This opcode is designed for use in string mode, which1914 // provides the string value of a parameter along with its1915 // depth rather than resolving it immediately.1916 pushStringParam: function(string) {1917 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushStringParam", 1317);1918_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1318);1919this.pushStackLiteral('depth' + this.lastContext);1920 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1319);1921this.pushString(string);1922 },1923 // [pushString]1924 //1925 // On stack, before: ...1926 // On stack, after: quotedString(string), ...1927 //1928 // Push a quoted version of `string` onto the stack1929 pushString: function(string) {1930 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushString", 1328);1931_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1329);1932this.pushStackLiteral(this.quotedString(string));1933 },1934 // [push]1935 //1936 // On stack, before: ...1937 // On stack, after: expr, ...1938 //1939 // Push an expression onto the stack1940 push: function(expr) {1941 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "push", 1338);1942_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1339);1943this.pushStack(expr);1944 },1945 // [pushLiteral]1946 //1947 // On stack, before: ...1948 // On stack, after: value, ...1949 //1950 // Pushes a value onto the stack. This operation prevents1951 // the compiler from creating a temporary variable to hold1952 // it.1953 pushLiteral: function(value) {1954 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushLiteral", 1350);1955_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1351);1956this.pushStackLiteral(value);1957 },1958 // [pushProgram]1959 //1960 // On stack, before: ...1961 // On stack, after: program(guid), ...1962 //1963 // Push a program expression onto the stack. This takes1964 // a compile-time guid and converts it into a runtime-accessible1965 // expression.1966 pushProgram: function(guid) {1967 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushProgram", 1362);1968_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1363);1969if (guid != null) {1970 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1364);1971this.pushStackLiteral(this.programExpression(guid));1972 } else {1973 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1366);1974this.pushStackLiteral(null);1975 }1976 },1977 // [invokeHelper]1978 //1979 // On stack, before: hash, inverse, program, params..., ...1980 // On stack, after: result of helper invocation1981 //1982 // Pops off the helper's parameters, invokes the helper,1983 // and pushes the helper's return value onto the stack.1984 //1985 // If the helper is not found, `helperMissing` is called.1986 invokeHelper: function(paramSize, name) {1987 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "invokeHelper", 1379);1988_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1380);1989this.context.aliases.helperMissing = 'helpers.helperMissing';1990 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1382);1991var helper = this.lastHelper = this.setupHelper(paramSize, name);1992 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1383);1993this.register('foundHelper', helper.name);1994 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1385);1995this.pushStack("foundHelper ? foundHelper.call(" +1996 helper.callParams + ") " + ": helperMissing.call(" +1997 helper.helperMissingParams + ")");1998 },1999 // [invokeKnownHelper]2000 //2001 // On stack, before: hash, inverse, program, params..., ...2002 // On stack, after: result of helper invocation2003 //2004 // This operation is used when the helper is known to exist,2005 // so a `helperMissing` fallback is not required.2006 invokeKnownHelper: function(paramSize, name) {2007 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "invokeKnownHelper", 1397);2008_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1398);2009var helper = this.setupHelper(paramSize, name);2010 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1399);2011this.pushStack(helper.name + ".call(" + helper.callParams + ")");2012 },2013 // [invokeAmbiguous]2014 //2015 // On stack, before: hash, inverse, program, params..., ...2016 // On stack, after: result of disambiguation2017 //2018 // This operation is used when an expression like `{{foo}}`2019 // is provided, but we don't know at compile-time whether it2020 // is a helper or a path.2021 //2022 // This operation emits more code than the other options,2023 // and can be avoided by passing the `knownHelpers` and2024 // `knownHelpersOnly` flags at compile-time.2025 invokeAmbiguous: function(name) {2026 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "invokeAmbiguous", 1414);2027_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1415);2028this.context.aliases.functionType = '"function"';2029 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1417);2030this.pushStackLiteral('{}');2031 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1418);2032var helper = this.setupHelper(0, name);2033 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1420);2034var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');2035 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1421);2036this.register('foundHelper', helperName);2037 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1423);2038var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');2039 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1424);2040var nextStack = this.nextStack();2041 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1426);2042this.source.push('if (foundHelper) { ' + nextStack + ' = foundHelper.call(' + helper.callParams + '); }');2043 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1427);2044this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '() : ' + nextStack + '; }');2045 },2046 // [invokePartial]2047 //2048 // On stack, before: context, ...2049 // On stack after: result of partial invocation2050 //2051 // This operation pops off a context, invokes a partial with that context,2052 // and pushes the result of the invocation back.2053 invokePartial: function(name) {2054 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "invokePartial", 1437);2055_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1438);2056var params = [this.nameLookup('partials', name, 'partial'), "'" + name + "'", this.popStack(), "helpers", "partials"];2057 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1440);2058if (this.options.data) {2059 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1441);2060params.push("data");2061 }2062 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1444);2063this.context.aliases.self = "this";2064 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1445);2065this.pushStack("self.invokePartial(" + params.join(", ") + ");");2066 },2067 // [assignToHash]2068 //2069 // On stack, before: value, hash, ...2070 // On stack, after: hash, ...2071 //2072 // Pops a value and hash off the stack, assigns `hash[key] = value`2073 // and pushes the hash back onto the stack.2074 assignToHash: function(key) {2075 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "assignToHash", 1455);2076_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1456);2077var value = this.popStack();2078 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1457);2079var hash = this.topStack();2080 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1459);2081this.source.push(hash + "['" + key + "'] = " + value + ";");2082 },2083 // HELPERS2084 compiler: JavaScriptCompiler,2085 compileChildren: function(environment, options) {2086 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "compileChildren", 1466);2087_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1467);2088var children = environment.children, child, compiler;2089 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1469);2090for(var i=0, l=children.length; i<l; i++) {2091 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1470);2092child = children[i];2093 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1471);2094compiler = new this.compiler();2095 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1473);2096this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children2097 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1474);2098var index = this.context.programs.length;2099 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1475);2100child.index = index;2101 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1476);2102child.name = 'program' + index;2103 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1477);2104this.context.programs[index] = compiler.compile(child, options, this.context);2105 }2106 },2107 programExpression: function(guid) {2108 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "programExpression", 1481);2109_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1482);2110this.context.aliases.self = "this";2111 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1484);2112if(guid == null) {2113 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1485);2114return "self.noop";2115 }2116 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1488);2117var child = this.environment.children[guid],2118 depths = child.depths.list, depth;2119 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1491);2120var programParams = [child.index, child.name, "data"];2121 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1493);2122for(var i=0, l = depths.length; i<l; i++) {2123 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1494);2124depth = depths[i];2125 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1496);2126if(depth === 1) { programParams.push("depth0"); }2127 else { programParams.push("depth" + (depth - 1)); }2128 }2129 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1500);2130if(depths.length === 0) {2131 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1501);2132return "self.program(" + programParams.join(", ") + ")";2133 } else {2134 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1503);2135programParams.shift();2136 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1504);2137return "self.programWithDepth(" + programParams.join(", ") + ")";2138 }2139 },2140 register: function(name, val) {2141 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "register", 1508);2142_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1509);2143this.useRegister(name);2144 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1510);2145this.source.push(name + " = " + val + ";");2146 },2147 useRegister: function(name) {2148 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "useRegister", 1513);2149_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1514);2150if(!this.registers[name]) {2151 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1515);2152this.registers[name] = true;2153 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1516);2154this.registers.list.push(name);2155 }2156 },2157 pushStackLiteral: function(item) {2158 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushStackLiteral", 1520);2159_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1521);2160this.compileStack.push(new Literal(item));2161 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1522);2162return item;2163 },2164 pushStack: function(item) {2165 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "pushStack", 1525);2166_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1526);2167this.source.push(this.incrStack() + " = " + item + ";");2168 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1527);2169this.compileStack.push("stack" + this.stackSlot);2170 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1528);2171return "stack" + this.stackSlot;2172 },2173 replaceStack: function(callback) {2174 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "replaceStack", 1531);2175_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1532);2176var item = callback.call(this, this.topStack());2177 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1534);2178this.source.push(this.topStack() + " = " + item + ";");2179 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1535);2180return "stack" + this.stackSlot;2181 },2182 nextStack: function(skipCompileStack) {2183 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "nextStack", 1538);2184_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1539);2185var name = this.incrStack();2186 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1540);2187this.compileStack.push("stack" + this.stackSlot);2188 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1541);2189return name;2190 },2191 incrStack: function() {2192 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "incrStack", 1544);2193_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1545);2194this.stackSlot++;2195 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1546);2196if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }2197 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1547);2198return "stack" + this.stackSlot;2199 },2200 popStack: function() {2201 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "popStack", 1550);2202_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1551);2203var item = this.compileStack.pop();2204 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1553);2205if (item instanceof Literal) {2206 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1554);2207return item.value;2208 } else {2209 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1556);2210this.stackSlot--;2211 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1557);2212return item;2213 }2214 },2215 topStack: function() {2216 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "topStack", 1561);2217_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1562);2218var item = this.compileStack[this.compileStack.length - 1];2219 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1564);2220if (item instanceof Literal) {2221 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1565);2222return item.value;2223 } else {2224 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1567);2225return item;2226 }2227 },2228 quotedString: function(str) {2229 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "quotedString", 1571);2230_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1572);2231return '"' + str2232 .replace(/\\/g, '\\\\')2233 .replace(/"/g, '\\"')2234 .replace(/\n/g, '\\n')2235 .replace(/\r/g, '\\r') + '"';2236 },2237 setupHelper: function(paramSize, name) {2238 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "setupHelper", 1579);2239_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1580);2240var params = [];2241 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1581);2242this.setupParams(paramSize, params);2243 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1582);2244var foundHelper = this.nameLookup('helpers', name, 'helper');2245 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1584);2246return {2247 params: params,2248 name: foundHelper,2249 callParams: ["depth0"].concat(params).join(", "),2250 helperMissingParams: ["depth0", this.quotedString(name)].concat(params).join(", ")2251 };2252 },2253 // the params and contexts arguments are passed in arrays2254 // to fill in2255 setupParams: function(paramSize, params) {2256 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "setupParams", 1594);2257_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1595);2258var options = [], contexts = [], param, inverse, program;2259 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1597);2260options.push("hash:" + this.popStack());2261 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1599);2262inverse = this.popStack();2263 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1600);2264program = this.popStack();2265 // Avoid setting fn and inverse if neither are set. This allows2266 // helpers to do a check for `if (options.fn)`2267 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1604);2268if (program || inverse) {2269 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1605);2270if (!program) {2271 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1606);2272this.context.aliases.self = "this";2273 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1607);2274program = "self.noop";2275 }2276 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1610);2277if (!inverse) {2278 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1611);2279this.context.aliases.self = "this";2280 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1612);2281inverse = "self.noop";2282 }2283 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1615);2284options.push("inverse:" + inverse);2285 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1616);2286options.push("fn:" + program);2287 }2288 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1619);2289for(var i=0; i<paramSize; i++) {2290 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1620);2291param = this.popStack();2292 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1621);2293params.push(param);2294 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1623);2295if(this.options.stringParams) {2296 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1624);2297contexts.push(this.popStack());2298 }2299 }2300 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1628);2301if (this.options.stringParams) {2302 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1629);2303options.push("contexts:[" + contexts.join(",") + "]");2304 }2305 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1632);2306if(this.options.data) {2307 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1633);2308options.push("data:data");2309 }2310 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1636);2311params.push("{" + options.join(",") + "}");2312 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1637);2313return params.join(", ");2314 }2315 };2316 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1641);2317var reservedWords = (2318 "break else new var" +2319 " case finally return void" +2320 " catch for switch while" +2321 " continue function this with" +2322 " default if throw" +2323 " delete in try" +2324 " do instanceof typeof" +2325 " abstract enum int short" +2326 " boolean export interface static" +2327 " byte extends long super" +2328 " char final native synchronized" +2329 " class float package throws" +2330 " const goto private transient" +2331 " debugger implements protected volatile" +2332 " double import public let yield"2333 ).split(" ");2334 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1659);2335var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};2336 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1661);2337for(var i=0, l=reservedWords.length; i<l; i++) {2338 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1662);2339compilerWords[reservedWords[i]] = true;2340 }2341 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1665);2342JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {2343 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "isValidJavaScriptVariableName", 1665);2344_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1666);2345if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) {2346 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1667);2347return true;2348 }2349 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1669);2350return false;2351 };2352})(Handlebars.Compiler, Handlebars.JavaScriptCompiler);2353_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1674);2354Handlebars.precompile = function(string, options) {2355 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "precompile", 1674);2356_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1675);2357options = options || {};2358 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1677);2359var ast = Handlebars.parse(string);2360 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1678);2361var environment = new Handlebars.Compiler().compile(ast, options);2362 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1679);2363return new Handlebars.JavaScriptCompiler().compile(environment, options);2364};2365_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1682);2366Handlebars.compile = function(string, options) {2367 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "compile", 1682);2368_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1683);2369options = options || {};2370 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1685);2371var compiled;2372 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1686);2373function compile() {2374 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "compile", 1686);2375_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1687);2376var ast = Handlebars.parse(string);2377 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1688);2378var environment = new Handlebars.Compiler().compile(ast, options);2379 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1689);2380var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);2381 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1690);2382return Handlebars.template(templateSpec);2383 }2384 // Template is only compiled on first use and cached after that point.2385 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1694);2386return function(context, options) {2387 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "(anonymous 10)", 1694);2388_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1695);2389if (!compiled) {2390 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1696);2391compiled = compile();2392 }2393 _yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1698);2394return compiled.call(this, context, options);2395 };2396};2397// END(BROWSER)2398// This file contains YUI-specific wrapper code and overrides for the2399// handlebars-compiler module.2400/**2401Handlebars parser and compiler. Use this module when you need to compile2402Handlebars templates.2403@module handlebars2404@submodule handlebars-compiler2405*/2406_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1714);2407var levels = ['debug', 'info', 'warn', 'error'];2408/**2409Logs a debugging message. Note that messages will only be logged when the2410handlebars module is loaded in "debug" mode.2411@method log2412@param {String} level Log level for this message. Supported levels are "debug",2413 "info", "warn", and "error".2414@param {String} message Message to log.2415@for Handlebars2416*/2417_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1726);2418Handlebars.logger.log = function (level, message) {2419};2420/**2421Compiles and renders a Handlebars template string in a single step.2422If you'll be using a template more than once, it's more efficient to compile it2423into a function once using `compile()`, and then render it whenever you need to2424by simply executing the compiled function. However, if you only need to compile2425and render a template once, `render()` is a handy shortcut for doing both in a2426single step.2427@example2428 Y.Handlebars.render('The pie of the day is {{pie}}!', {2429 pie: 'Maple Custard'2430 });2431 // => "The pie of the day is Maple Custard!"2432@method render2433@param {String} string Handlebars template string to render.2434@param {Object} context Context object to pass to the template.2435@param {Object} [options] Compile/render options.2436 @param {Object} [options.helpers] Helper functions.2437 @param {Object} [options.partials] Partials.2438 @param {Object} [options.data] Data.2439@return {String} Rendered template string.2440*/2441_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1755);2442Handlebars.render = function (string, context, options) {2443 _yuitest_coverfunc("build/handlebars-compiler/handlebars-compiler.js", "render", 1755);2444_yuitest_coverline("build/handlebars-compiler/handlebars-compiler.js", 1756);2445return Handlebars.compile(string)(context, options);2446};2447// The rest of this file is just API docs for methods defined in Handlebars2448// itself.2449/**2450Compiles a Handlebars template string into a function. To render the template,2451call the function and pass in a context object.2452@example2453 var template = Y.Handlebars.compile('The pie of the day is {{pie}}!.');2454 template({pie: 'Pecan'});2455 // => "The pie of the day is Pecan!"2456@method compile2457@param {String} string Handlebars template string to compile.2458@param {Object} [options] Compiler options.2459@return {Function} Compiled template function.2460*/2461/**2462Precompiles a Handlebars template string into a string of JavaScript code. This2463can be used to precompile a template at build time or on the server, and the2464resulting template can then be rendered at runtime or on the client without2465needing to go through a compile step.2466To render a precompiled template, evaluate the code and then pass the resulting2467function to `Y.Handlebars.template()` to get back an executable template2468function.2469@method precompile2470@param {String} string Handlebars template string to compile.2471@param {Object} [options] Compiler options.2472@return {String} Precompiled template code.2473*/...
handlebars-base-coverage.js
Source:handlebars-base-coverage.js
1/*2YUI 3.7.3 (build 5687)3Copyright 2012 Yahoo! Inc. All rights reserved.4Licensed under the BSD License.5http://yuilibrary.com/license/6*/7if (typeof _yuitest_coverage == "undefined"){8 _yuitest_coverage = {};9 _yuitest_coverline = function(src, line){10 var coverage = _yuitest_coverage[src];11 if (!coverage.lines[line]){12 coverage.calledLines++;13 }14 coverage.lines[line]++;15 };16 _yuitest_coverfunc = function(src, name, line){17 var coverage = _yuitest_coverage[src],18 funcId = name + ":" + line;19 if (!coverage.functions[funcId]){20 coverage.calledFunctions++;21 }22 coverage.functions[funcId]++;23 };24}25_yuitest_coverage["build/handlebars-base/handlebars-base.js"] = {26 lines: {},27 functions: {},28 coveredLines: 0,29 calledLines: 0,30 coveredFunctions: 0,31 calledFunctions: 0,32 path: "build/handlebars-base/handlebars-base.js",33 code: []34};35_yuitest_coverage["build/handlebars-base/handlebars-base.js"].code=["YUI.add('handlebars-base', function (Y, NAME) {","","/*!","Handlebars.js - Copyright (C) 2011 Yehuda Katz","https://raw.github.com/wycats/handlebars.js/master/LICENSE","*/","/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */","","// BEGIN(BROWSER)","","/*jshint eqnull:true*/","var Handlebars = {};","","Handlebars.VERSION = \"1.0.beta.5\";","","Handlebars.helpers = {};","Handlebars.partials = {};","","Handlebars.registerHelper = function(name, fn, inverse) {"," if(inverse) { fn.not = inverse; }"," this.helpers[name] = fn;","};","","Handlebars.registerPartial = function(name, str) {"," this.partials[name] = str;","};","","Handlebars.registerHelper('helperMissing', function(arg) {"," if(arguments.length === 2) {"," return undefined;"," } else {"," throw new Error(\"Could not find property '\" + arg + \"'\");"," }","});","","var toString = Object.prototype.toString, functionType = \"[object Function]\";","","Handlebars.registerHelper('blockHelperMissing', function(context, options) {"," var inverse = options.inverse || function() {}, fn = options.fn;","",""," var ret = \"\";"," var type = toString.call(context);",""," if(type === functionType) { context = context.call(this); }",""," if(context === true) {"," return fn(this);"," } else if(context === false || context == null) {"," return inverse(this);"," } else if(type === \"[object Array]\") {"," if(context.length > 0) {"," for(var i=0, j=context.length; i<j; i++) {"," ret = ret + fn(context[i]);"," }"," } else {"," ret = inverse(this);"," }"," return ret;"," } else {"," return fn(context);"," }","});","","Handlebars.registerHelper('each', function(context, options) {"," var fn = options.fn, inverse = options.inverse;"," var ret = \"\";",""," if(context && context.length > 0) {"," for(var i=0, j=context.length; i<j; i++) {"," ret = ret + fn(context[i]);"," }"," } else {"," ret = inverse(this);"," }"," return ret;","});","","Handlebars.registerHelper('if', function(context, options) {"," var type = toString.call(context);"," if(type === functionType) { context = context.call(this); }",""," if(!context || Handlebars.Utils.isEmpty(context)) {"," return options.inverse(this);"," } else {"," return options.fn(this);"," }","});","","Handlebars.registerHelper('unless', function(context, options) {"," var fn = options.fn, inverse = options.inverse;"," options.fn = inverse;"," options.inverse = fn;",""," return Handlebars.helpers['if'].call(this, context, options);","});","","Handlebars.registerHelper('with', function(context, options) {"," return options.fn(context);","});","","Handlebars.registerHelper('log', function(context) {"," Handlebars.log(context);","});","","// END(BROWSER)","// This file provides a YUI-specific implementation of Handlebars' lib/utils.js","// file. Handlebars unfortunately creates enclosed references to its utils, so","// we have to maintain a complete fork of this file rather than just overriding","// specific parts.","","var Lang = Y.Lang;","","Handlebars.Exception = function (message) {"," var error = Error.prototype.constructor.apply(this, arguments),"," key;",""," for (key in error) {"," if (error.hasOwnProperty(key)) {"," this[key] = error[key];"," }"," }",""," this.message = error.message;","};","","Handlebars.Exception.prototype = new Error();","","Handlebars.SafeString = function (string) {"," this.string = string;","};","","Handlebars.SafeString.prototype.toString = function () {"," return this.string.toString();","};","","Handlebars.Utils = {"," escapeExpression: function (string) {"," // Skip escaping for empty strings."," if (string === '') {"," return string;"," }",""," // Don't escape SafeStrings, since they're already (presumed to be)"," // safe."," if (string instanceof Handlebars.SafeString) {"," return string.toString();"," } else if (string === false || !Lang.isValue(string)) {"," return '';"," }",""," // Unlike Handlebars' escaping implementation, Y.Escape.html() will"," // double-escape existing & entities. This seems much less"," // surprising than avoiding double-escaping, especially since"," // a lack of double-escaping would make it impossible to use Handlebars"," // for things like displaying escaped code snippets."," return Y.Escape.html(string);"," },",""," isEmpty: function (value) {"," if (value === false"," || !Lang.isValue(value)"," || (Lang.isArray(value) && !value.length)) {",""," return true;"," }",""," return false;"," }","};","/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */","","// BEGIN(BROWSER)","Handlebars.VM = {"," template: function(templateSpec) {"," // Just add water"," var container = {"," escapeExpression: Handlebars.Utils.escapeExpression,"," invokePartial: Handlebars.VM.invokePartial,"," programs: [],"," program: function(i, fn, data) {"," var programWrapper = this.programs[i];"," if(data) {"," return Handlebars.VM.program(fn, data);"," } else if(programWrapper) {"," return programWrapper;"," } else {"," programWrapper = this.programs[i] = Handlebars.VM.program(fn);"," return programWrapper;"," }"," },"," programWithDepth: Handlebars.VM.programWithDepth,"," noop: Handlebars.VM.noop"," };",""," return function(context, options) {"," options = options || {};"," return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);"," };"," },",""," programWithDepth: function(fn, data, $depth) {"," var args = Array.prototype.slice.call(arguments, 2);",""," return function(context, options) {"," options = options || {};",""," return fn.apply(this, [context, options.data || data].concat(args));"," };"," },"," program: function(fn, data) {"," return function(context, options) {"," options = options || {};",""," return fn(context, options.data || data);"," };"," },"," noop: function() { return \"\"; },"," invokePartial: function(partial, name, context, helpers, partials, data) {"," var options = { helpers: helpers, partials: partials, data: data };",""," if(partial === undefined) {"," throw new Handlebars.Exception(\"The partial \" + name + \" could not be found\");"," } else if(partial instanceof Function) {"," return partial(context, options);"," } else if (!Handlebars.compile) {"," throw new Handlebars.Exception(\"The partial \" + name + \" could not be compiled when running in runtime-only mode\");"," } else {"," partials[name] = Handlebars.compile(partial);"," return partials[name](context, options);"," }"," }","};","","Handlebars.template = Handlebars.VM.template;","","// END(BROWSER)","// This file contains YUI-specific wrapper code and overrides for the","// handlebars-base module.","","/**","Handlebars is a simple template language inspired by Mustache.","","This is a YUI port of the original Handlebars project, which can be found at","<https://github.com/wycats/handlebars.js>.","","@module handlebars","@main handlebars","@since 3.5.0","*/","","/**","Provides basic Handlebars template rendering functionality. Use this module when","you only need to render pre-compiled templates.","","@module handlebars","@submodule handlebars-base","*/","","/**","Handlebars is a simple template language inspired by Mustache.","","This is a YUI port of the original Handlebars project, which can be found at","<https://github.com/wycats/handlebars.js>.","","@class Handlebars","@since 3.5.0","*/","Y.Handlebars = Handlebars;","","Handlebars.VERSION += '-yui';","","// The rest of this file is just API docs for methods defined in Handlebars","// itself.","","/**","Registers a helper function that will be made available to all templates.","","Helper functions receive the current template context as the `this` object, and","can also receive arguments passed by the template.","","@example",""," Y.Handlebars.registerHelper('linkify', function () {"," return '<a href=\"' + Y.Escape.html(this.url) + '\">' +"," Y.Escape.html(this.text) + '</a>';"," });",""," var source = '<ul>{{#links}}<li>{{{linkify}}}</li>{{/links}}</ul>';",""," Y.Handlebars.render(source, {"," links: ["," {url: '/foo', text: 'Foo'},"," {url: '/bar', text: 'Bar'},"," {url: '/baz', text: 'Baz'}"," ]"," });","","@method registerHelper","@param {String} name Name of this helper.","@param {Function} fn Helper function.","@param {Boolean} [inverse=false] If `true`, this helper will be considered an"," \"inverse\" helper, like \"unless\". This means it will only be called if the"," expression given in the template evaluates to a false or empty value.","*/","","/**","Registers a partial that will be made available to all templates.","","A partial is another template that can be used to render part of a larger","template. For example, a website with a common header and footer across all its","pages might use a template for each page, which would call shared partials to","render the headers and footers.","","Partials may be specified as uncompiled template strings or as compiled template","functions.","","@example",""," Y.Handlebars.registerPartial('header', '<h1>{{title}}</h1>');"," Y.Handlebars.registerPartial('footer', 'Copyright (c) 2011 by Me.');",""," var source = '{{> header}} <p>Mustaches are awesome!</p> {{> footer}}';",""," Y.Handlebars.render(source, {title: 'My Page About Mustaches'});","","@method registerPartial","@param {String} name Name of this partial.","@param {Function|String} partial Template string or compiled template function.","*/","","/**","Converts a precompiled template into a renderable template function.","","@example",""," <script src=\"precompiled-template.js\"></script>"," <script>"," YUI().use('handlebars-base', function (Y) {"," // Convert the precompiled template function into a renderable template"," // function."," var template = Y.Handlebars.template(precompiledTemplate);",""," // Render it."," template({pie: 'Pumpkin'});"," });"," </script>","","@method template","@param {Function} template Precompiled Handlebars template function.","@return {Function} Compiled template function.","*/","","","}, '3.7.3', {\"requires\": [\"escape\"]});"];36_yuitest_coverage["build/handlebars-base/handlebars-base.js"].lines = {"1":0,"12":0,"14":0,"16":0,"17":0,"19":0,"20":0,"21":0,"24":0,"25":0,"28":0,"29":0,"30":0,"32":0,"36":0,"38":0,"39":0,"42":0,"43":0,"45":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"57":0,"59":0,"61":0,"65":0,"66":0,"67":0,"69":0,"70":0,"71":0,"74":0,"76":0,"79":0,"80":0,"81":0,"83":0,"84":0,"86":0,"90":0,"91":0,"92":0,"93":0,"95":0,"98":0,"99":0,"102":0,"103":0,"112":0,"114":0,"115":0,"118":0,"119":0,"120":0,"124":0,"127":0,"129":0,"130":0,"133":0,"134":0,"137":0,"140":0,"141":0,"146":0,"147":0,"148":0,"149":0,"157":0,"161":0,"165":0,"168":0,"174":0,"177":0,"182":0,"183":0,"184":0,"185":0,"186":0,"188":0,"189":0,"196":0,"197":0,"198":0,"203":0,"205":0,"206":0,"208":0,"212":0,"213":0,"215":0,"218":0,"220":0,"222":0,"223":0,"224":0,"225":0,"226":0,"227":0,"229":0,"230":0,"235":0,"269":0,"271":0};37_yuitest_coverage["build/handlebars-base/handlebars-base.js"].functions = {"registerHelper:19":0,"registerPartial:24":0,"(anonymous 2):28":0,"(anonymous 3):38":0,"(anonymous 5):65":0,"(anonymous 6):79":0,"(anonymous 7):90":0,"(anonymous 8):98":0,"(anonymous 9):102":0,"Exception:114":0,"SafeString:129":0,"toString:133":0,"escapeExpression:138":0,"isEmpty:160":0,"program:181":0,"(anonymous 10):196":0,"template:175":0,"(anonymous 11):205":0,"programWithDepth:202":0,"(anonymous 12):212":0,"program:211":0,"noop:218":0,"invokePartial:219":0,"(anonymous 1):1":0};38_yuitest_coverage["build/handlebars-base/handlebars-base.js"].coveredLines = 109;39_yuitest_coverage["build/handlebars-base/handlebars-base.js"].coveredFunctions = 24;40_yuitest_coverline("build/handlebars-base/handlebars-base.js", 1);41YUI.add('handlebars-base', function (Y, NAME) {42/*!43Handlebars.js - Copyright (C) 2011 Yehuda Katz44https://raw.github.com/wycats/handlebars.js/master/LICENSE45*/46/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */47// BEGIN(BROWSER)48/*jshint eqnull:true*/49_yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 1)", 1);50_yuitest_coverline("build/handlebars-base/handlebars-base.js", 12);51var Handlebars = {};52_yuitest_coverline("build/handlebars-base/handlebars-base.js", 14);53Handlebars.VERSION = "1.0.beta.5";54_yuitest_coverline("build/handlebars-base/handlebars-base.js", 16);55Handlebars.helpers = {};56_yuitest_coverline("build/handlebars-base/handlebars-base.js", 17);57Handlebars.partials = {};58_yuitest_coverline("build/handlebars-base/handlebars-base.js", 19);59Handlebars.registerHelper = function(name, fn, inverse) {60 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "registerHelper", 19);61_yuitest_coverline("build/handlebars-base/handlebars-base.js", 20);62if(inverse) { fn.not = inverse; }63 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 21);64this.helpers[name] = fn;65};66_yuitest_coverline("build/handlebars-base/handlebars-base.js", 24);67Handlebars.registerPartial = function(name, str) {68 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "registerPartial", 24);69_yuitest_coverline("build/handlebars-base/handlebars-base.js", 25);70this.partials[name] = str;71};72_yuitest_coverline("build/handlebars-base/handlebars-base.js", 28);73Handlebars.registerHelper('helperMissing', function(arg) {74 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 2)", 28);75_yuitest_coverline("build/handlebars-base/handlebars-base.js", 29);76if(arguments.length === 2) {77 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 30);78return undefined;79 } else {80 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 32);81throw new Error("Could not find property '" + arg + "'");82 }83});84_yuitest_coverline("build/handlebars-base/handlebars-base.js", 36);85var toString = Object.prototype.toString, functionType = "[object Function]";86_yuitest_coverline("build/handlebars-base/handlebars-base.js", 38);87Handlebars.registerHelper('blockHelperMissing', function(context, options) {88 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 3)", 38);89_yuitest_coverline("build/handlebars-base/handlebars-base.js", 39);90var inverse = options.inverse || function() {}, fn = options.fn;91 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 42);92var ret = "";93 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 43);94var type = toString.call(context);95 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 45);96if(type === functionType) { context = context.call(this); }97 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 47);98if(context === true) {99 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 48);100return fn(this);101 } else {_yuitest_coverline("build/handlebars-base/handlebars-base.js", 49);102if(context === false || context == null) {103 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 50);104return inverse(this);105 } else {_yuitest_coverline("build/handlebars-base/handlebars-base.js", 51);106if(type === "[object Array]") {107 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 52);108if(context.length > 0) {109 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 53);110for(var i=0, j=context.length; i<j; i++) {111 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 54);112ret = ret + fn(context[i]);113 }114 } else {115 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 57);116ret = inverse(this);117 }118 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 59);119return ret;120 } else {121 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 61);122return fn(context);123 }}}124});125_yuitest_coverline("build/handlebars-base/handlebars-base.js", 65);126Handlebars.registerHelper('each', function(context, options) {127 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 5)", 65);128_yuitest_coverline("build/handlebars-base/handlebars-base.js", 66);129var fn = options.fn, inverse = options.inverse;130 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 67);131var ret = "";132 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 69);133if(context && context.length > 0) {134 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 70);135for(var i=0, j=context.length; i<j; i++) {136 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 71);137ret = ret + fn(context[i]);138 }139 } else {140 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 74);141ret = inverse(this);142 }143 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 76);144return ret;145});146_yuitest_coverline("build/handlebars-base/handlebars-base.js", 79);147Handlebars.registerHelper('if', function(context, options) {148 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 6)", 79);149_yuitest_coverline("build/handlebars-base/handlebars-base.js", 80);150var type = toString.call(context);151 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 81);152if(type === functionType) { context = context.call(this); }153 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 83);154if(!context || Handlebars.Utils.isEmpty(context)) {155 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 84);156return options.inverse(this);157 } else {158 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 86);159return options.fn(this);160 }161});162_yuitest_coverline("build/handlebars-base/handlebars-base.js", 90);163Handlebars.registerHelper('unless', function(context, options) {164 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 7)", 90);165_yuitest_coverline("build/handlebars-base/handlebars-base.js", 91);166var fn = options.fn, inverse = options.inverse;167 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 92);168options.fn = inverse;169 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 93);170options.inverse = fn;171 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 95);172return Handlebars.helpers['if'].call(this, context, options);173});174_yuitest_coverline("build/handlebars-base/handlebars-base.js", 98);175Handlebars.registerHelper('with', function(context, options) {176 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 8)", 98);177_yuitest_coverline("build/handlebars-base/handlebars-base.js", 99);178return options.fn(context);179});180_yuitest_coverline("build/handlebars-base/handlebars-base.js", 102);181Handlebars.registerHelper('log', function(context) {182 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 9)", 102);183_yuitest_coverline("build/handlebars-base/handlebars-base.js", 103);184Handlebars.log(context);185});186// END(BROWSER)187// This file provides a YUI-specific implementation of Handlebars' lib/utils.js188// file. Handlebars unfortunately creates enclosed references to its utils, so189// we have to maintain a complete fork of this file rather than just overriding190// specific parts.191_yuitest_coverline("build/handlebars-base/handlebars-base.js", 112);192var Lang = Y.Lang;193_yuitest_coverline("build/handlebars-base/handlebars-base.js", 114);194Handlebars.Exception = function (message) {195 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "Exception", 114);196_yuitest_coverline("build/handlebars-base/handlebars-base.js", 115);197var error = Error.prototype.constructor.apply(this, arguments),198 key;199 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 118);200for (key in error) {201 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 119);202if (error.hasOwnProperty(key)) {203 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 120);204this[key] = error[key];205 }206 }207 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 124);208this.message = error.message;209};210_yuitest_coverline("build/handlebars-base/handlebars-base.js", 127);211Handlebars.Exception.prototype = new Error();212_yuitest_coverline("build/handlebars-base/handlebars-base.js", 129);213Handlebars.SafeString = function (string) {214 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "SafeString", 129);215_yuitest_coverline("build/handlebars-base/handlebars-base.js", 130);216this.string = string;217};218_yuitest_coverline("build/handlebars-base/handlebars-base.js", 133);219Handlebars.SafeString.prototype.toString = function () {220 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "toString", 133);221_yuitest_coverline("build/handlebars-base/handlebars-base.js", 134);222return this.string.toString();223};224_yuitest_coverline("build/handlebars-base/handlebars-base.js", 137);225Handlebars.Utils = {226 escapeExpression: function (string) {227 // Skip escaping for empty strings.228 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "escapeExpression", 138);229_yuitest_coverline("build/handlebars-base/handlebars-base.js", 140);230if (string === '') {231 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 141);232return string;233 }234 // Don't escape SafeStrings, since they're already (presumed to be)235 // safe.236 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 146);237if (string instanceof Handlebars.SafeString) {238 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 147);239return string.toString();240 } else {_yuitest_coverline("build/handlebars-base/handlebars-base.js", 148);241if (string === false || !Lang.isValue(string)) {242 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 149);243return '';244 }}245 // Unlike Handlebars' escaping implementation, Y.Escape.html() will246 // double-escape existing & entities. This seems much less247 // surprising than avoiding double-escaping, especially since248 // a lack of double-escaping would make it impossible to use Handlebars249 // for things like displaying escaped code snippets.250 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 157);251return Y.Escape.html(string);252 },253 isEmpty: function (value) {254 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "isEmpty", 160);255_yuitest_coverline("build/handlebars-base/handlebars-base.js", 161);256if (value === false257 || !Lang.isValue(value)258 || (Lang.isArray(value) && !value.length)) {259 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 165);260return true;261 }262 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 168);263return false;264 }265};266/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */267// BEGIN(BROWSER)268_yuitest_coverline("build/handlebars-base/handlebars-base.js", 174);269Handlebars.VM = {270 template: function(templateSpec) {271 // Just add water272 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "template", 175);273_yuitest_coverline("build/handlebars-base/handlebars-base.js", 177);274var container = {275 escapeExpression: Handlebars.Utils.escapeExpression,276 invokePartial: Handlebars.VM.invokePartial,277 programs: [],278 program: function(i, fn, data) {279 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "program", 181);280_yuitest_coverline("build/handlebars-base/handlebars-base.js", 182);281var programWrapper = this.programs[i];282 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 183);283if(data) {284 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 184);285return Handlebars.VM.program(fn, data);286 } else {_yuitest_coverline("build/handlebars-base/handlebars-base.js", 185);287if(programWrapper) {288 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 186);289return programWrapper;290 } else {291 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 188);292programWrapper = this.programs[i] = Handlebars.VM.program(fn);293 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 189);294return programWrapper;295 }}296 },297 programWithDepth: Handlebars.VM.programWithDepth,298 noop: Handlebars.VM.noop299 };300 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 196);301return function(context, options) {302 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 10)", 196);303_yuitest_coverline("build/handlebars-base/handlebars-base.js", 197);304options = options || {};305 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 198);306return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);307 };308 },309 programWithDepth: function(fn, data, $depth) {310 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "programWithDepth", 202);311_yuitest_coverline("build/handlebars-base/handlebars-base.js", 203);312var args = Array.prototype.slice.call(arguments, 2);313 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 205);314return function(context, options) {315 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 11)", 205);316_yuitest_coverline("build/handlebars-base/handlebars-base.js", 206);317options = options || {};318 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 208);319return fn.apply(this, [context, options.data || data].concat(args));320 };321 },322 program: function(fn, data) {323 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "program", 211);324_yuitest_coverline("build/handlebars-base/handlebars-base.js", 212);325return function(context, options) {326 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "(anonymous 12)", 212);327_yuitest_coverline("build/handlebars-base/handlebars-base.js", 213);328options = options || {};329 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 215);330return fn(context, options.data || data);331 };332 },333 noop: function() { _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "noop", 218);334_yuitest_coverline("build/handlebars-base/handlebars-base.js", 218);335return ""; },336 invokePartial: function(partial, name, context, helpers, partials, data) {337 _yuitest_coverfunc("build/handlebars-base/handlebars-base.js", "invokePartial", 219);338_yuitest_coverline("build/handlebars-base/handlebars-base.js", 220);339var options = { helpers: helpers, partials: partials, data: data };340 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 222);341if(partial === undefined) {342 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 223);343throw new Handlebars.Exception("The partial " + name + " could not be found");344 } else {_yuitest_coverline("build/handlebars-base/handlebars-base.js", 224);345if(partial instanceof Function) {346 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 225);347return partial(context, options);348 } else {_yuitest_coverline("build/handlebars-base/handlebars-base.js", 226);349if (!Handlebars.compile) {350 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 227);351throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");352 } else {353 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 229);354partials[name] = Handlebars.compile(partial);355 _yuitest_coverline("build/handlebars-base/handlebars-base.js", 230);356return partials[name](context, options);357 }}}358 }359};360_yuitest_coverline("build/handlebars-base/handlebars-base.js", 235);361Handlebars.template = Handlebars.VM.template;362// END(BROWSER)363// This file contains YUI-specific wrapper code and overrides for the364// handlebars-base module.365/**366Handlebars is a simple template language inspired by Mustache.367This is a YUI port of the original Handlebars project, which can be found at368<https://github.com/wycats/handlebars.js>.369@module handlebars370@main handlebars371@since 3.5.0372*/373/**374Provides basic Handlebars template rendering functionality. Use this module when375you only need to render pre-compiled templates.376@module handlebars377@submodule handlebars-base378*/379/**380Handlebars is a simple template language inspired by Mustache.381This is a YUI port of the original Handlebars project, which can be found at382<https://github.com/wycats/handlebars.js>.383@class Handlebars384@since 3.5.0385*/386_yuitest_coverline("build/handlebars-base/handlebars-base.js", 269);387Y.Handlebars = Handlebars;388_yuitest_coverline("build/handlebars-base/handlebars-base.js", 271);389Handlebars.VERSION += '-yui';390// The rest of this file is just API docs for methods defined in Handlebars391// itself.392/**393Registers a helper function that will be made available to all templates.394Helper functions receive the current template context as the `this` object, and395can also receive arguments passed by the template.396@example397 Y.Handlebars.registerHelper('linkify', function () {398 return '<a href="' + Y.Escape.html(this.url) + '">' +399 Y.Escape.html(this.text) + '</a>';400 });401 var source = '<ul>{{#links}}<li>{{{linkify}}}</li>{{/links}}</ul>';402 Y.Handlebars.render(source, {403 links: [404 {url: '/foo', text: 'Foo'},405 {url: '/bar', text: 'Bar'},406 {url: '/baz', text: 'Baz'}407 ]408 });409@method registerHelper410@param {String} name Name of this helper.411@param {Function} fn Helper function.412@param {Boolean} [inverse=false] If `true`, this helper will be considered an413 "inverse" helper, like "unless". This means it will only be called if the414 expression given in the template evaluates to a false or empty value.415*/416/**417Registers a partial that will be made available to all templates.418A partial is another template that can be used to render part of a larger419template. For example, a website with a common header and footer across all its420pages might use a template for each page, which would call shared partials to421render the headers and footers.422Partials may be specified as uncompiled template strings or as compiled template423functions.424@example425 Y.Handlebars.registerPartial('header', '<h1>{{title}}</h1>');426 Y.Handlebars.registerPartial('footer', 'Copyright (c) 2011 by Me.');427 var source = '{{> header}} <p>Mustaches are awesome!</p> {{> footer}}';428 Y.Handlebars.render(source, {title: 'My Page About Mustaches'});429@method registerPartial430@param {String} name Name of this partial.431@param {Function|String} partial Template string or compiled template function.432*/433/**434Converts a precompiled template into a renderable template function.435@example436 <script src="precompiled-template.js"></script>437 <script>438 YUI().use('handlebars-base', function (Y) {439 // Convert the precompiled template function into a renderable template440 // function.441 var template = Y.Handlebars.template(precompiledTemplate);442 // Render it.443 template({pie: 'Pumpkin'});444 });445 </script>446@method template447@param {Function} template Precompiled Handlebars template function.448@return {Function} Compiled template function.449*/...
handlebars-base.js
Source:handlebars-base.js
1/*2YUI 3.7.3 (build 5687)3Copyright 2012 Yahoo! Inc. All rights reserved.4Licensed under the BSD License.5http://yuilibrary.com/license/6*/7YUI.add('handlebars-base', function (Y, NAME) {8/*!9Handlebars.js - Copyright (C) 2011 Yehuda Katz10https://raw.github.com/wycats/handlebars.js/master/LICENSE11*/12/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */13// BEGIN(BROWSER)14/*jshint eqnull:true*/15var Handlebars = {};16Handlebars.VERSION = "1.0.beta.5";17Handlebars.helpers = {};18Handlebars.partials = {};19Handlebars.registerHelper = function(name, fn, inverse) {20 if(inverse) { fn.not = inverse; }21 this.helpers[name] = fn;22};23Handlebars.registerPartial = function(name, str) {24 this.partials[name] = str;25};26Handlebars.registerHelper('helperMissing', function(arg) {27 if(arguments.length === 2) {28 return undefined;29 } else {30 throw new Error("Could not find property '" + arg + "'");31 }32});33var toString = Object.prototype.toString, functionType = "[object Function]";34Handlebars.registerHelper('blockHelperMissing', function(context, options) {35 var inverse = options.inverse || function() {}, fn = options.fn;36 var ret = "";37 var type = toString.call(context);38 if(type === functionType) { context = context.call(this); }39 if(context === true) {40 return fn(this);41 } else if(context === false || context == null) {42 return inverse(this);43 } else if(type === "[object Array]") {44 if(context.length > 0) {45 for(var i=0, j=context.length; i<j; i++) {46 ret = ret + fn(context[i]);47 }48 } else {49 ret = inverse(this);50 }51 return ret;52 } else {53 return fn(context);54 }55});56Handlebars.registerHelper('each', function(context, options) {57 var fn = options.fn, inverse = options.inverse;58 var ret = "";59 if(context && context.length > 0) {60 for(var i=0, j=context.length; i<j; i++) {61 ret = ret + fn(context[i]);62 }63 } else {64 ret = inverse(this);65 }66 return ret;67});68Handlebars.registerHelper('if', function(context, options) {69 var type = toString.call(context);70 if(type === functionType) { context = context.call(this); }71 if(!context || Handlebars.Utils.isEmpty(context)) {72 return options.inverse(this);73 } else {74 return options.fn(this);75 }76});77Handlebars.registerHelper('unless', function(context, options) {78 var fn = options.fn, inverse = options.inverse;79 options.fn = inverse;80 options.inverse = fn;81 return Handlebars.helpers['if'].call(this, context, options);82});83Handlebars.registerHelper('with', function(context, options) {84 return options.fn(context);85});86Handlebars.registerHelper('log', function(context) {87 Handlebars.log(context);88});89// END(BROWSER)90// This file provides a YUI-specific implementation of Handlebars' lib/utils.js91// file. Handlebars unfortunately creates enclosed references to its utils, so92// we have to maintain a complete fork of this file rather than just overriding93// specific parts.94var Lang = Y.Lang;95Handlebars.Exception = function (message) {96 var error = Error.prototype.constructor.apply(this, arguments),97 key;98 for (key in error) {99 if (error.hasOwnProperty(key)) {100 this[key] = error[key];101 }102 }103 this.message = error.message;104};105Handlebars.Exception.prototype = new Error();106Handlebars.SafeString = function (string) {107 this.string = string;108};109Handlebars.SafeString.prototype.toString = function () {110 return this.string.toString();111};112Handlebars.Utils = {113 escapeExpression: function (string) {114 // Skip escaping for empty strings.115 if (string === '') {116 return string;117 }118 // Don't escape SafeStrings, since they're already (presumed to be)119 // safe.120 if (string instanceof Handlebars.SafeString) {121 return string.toString();122 } else if (string === false || !Lang.isValue(string)) {123 return '';124 }125 // Unlike Handlebars' escaping implementation, Y.Escape.html() will126 // double-escape existing & entities. This seems much less127 // surprising than avoiding double-escaping, especially since128 // a lack of double-escaping would make it impossible to use Handlebars129 // for things like displaying escaped code snippets.130 return Y.Escape.html(string);131 },132 isEmpty: function (value) {133 if (value === false134 || !Lang.isValue(value)135 || (Lang.isArray(value) && !value.length)) {136 return true;137 }138 return false;139 }140};141/* THIS FILE IS GENERATED BY A BUILD SCRIPT - DO NOT EDIT! */142// BEGIN(BROWSER)143Handlebars.VM = {144 template: function(templateSpec) {145 // Just add water146 var container = {147 escapeExpression: Handlebars.Utils.escapeExpression,148 invokePartial: Handlebars.VM.invokePartial,149 programs: [],150 program: function(i, fn, data) {151 var programWrapper = this.programs[i];152 if(data) {153 return Handlebars.VM.program(fn, data);154 } else if(programWrapper) {155 return programWrapper;156 } else {157 programWrapper = this.programs[i] = Handlebars.VM.program(fn);158 return programWrapper;159 }160 },161 programWithDepth: Handlebars.VM.programWithDepth,162 noop: Handlebars.VM.noop163 };164 return function(context, options) {165 options = options || {};166 return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);167 };168 },169 programWithDepth: function(fn, data, $depth) {170 var args = Array.prototype.slice.call(arguments, 2);171 return function(context, options) {172 options = options || {};173 return fn.apply(this, [context, options.data || data].concat(args));174 };175 },176 program: function(fn, data) {177 return function(context, options) {178 options = options || {};179 return fn(context, options.data || data);180 };181 },182 noop: function() { return ""; },183 invokePartial: function(partial, name, context, helpers, partials, data) {184 var options = { helpers: helpers, partials: partials, data: data };185 if(partial === undefined) {186 throw new Handlebars.Exception("The partial " + name + " could not be found");187 } else if(partial instanceof Function) {188 return partial(context, options);189 } else if (!Handlebars.compile) {190 throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");191 } else {192 partials[name] = Handlebars.compile(partial);193 return partials[name](context, options);194 }195 }196};197Handlebars.template = Handlebars.VM.template;198// END(BROWSER)199// This file contains YUI-specific wrapper code and overrides for the200// handlebars-base module.201/**202Handlebars is a simple template language inspired by Mustache.203This is a YUI port of the original Handlebars project, which can be found at204<https://github.com/wycats/handlebars.js>.205@module handlebars206@main handlebars207@since 3.5.0208*/209/**210Provides basic Handlebars template rendering functionality. Use this module when211you only need to render pre-compiled templates.212@module handlebars213@submodule handlebars-base214*/215/**216Handlebars is a simple template language inspired by Mustache.217This is a YUI port of the original Handlebars project, which can be found at218<https://github.com/wycats/handlebars.js>.219@class Handlebars220@since 3.5.0221*/222Y.Handlebars = Handlebars;223Handlebars.VERSION += '-yui';224// The rest of this file is just API docs for methods defined in Handlebars225// itself.226/**227Registers a helper function that will be made available to all templates.228Helper functions receive the current template context as the `this` object, and229can also receive arguments passed by the template.230@example231 Y.Handlebars.registerHelper('linkify', function () {232 return '<a href="' + Y.Escape.html(this.url) + '">' +233 Y.Escape.html(this.text) + '</a>';234 });235 var source = '<ul>{{#links}}<li>{{{linkify}}}</li>{{/links}}</ul>';236 Y.Handlebars.render(source, {237 links: [238 {url: '/foo', text: 'Foo'},239 {url: '/bar', text: 'Bar'},240 {url: '/baz', text: 'Baz'}241 ]242 });243@method registerHelper244@param {String} name Name of this helper.245@param {Function} fn Helper function.246@param {Boolean} [inverse=false] If `true`, this helper will be considered an247 "inverse" helper, like "unless". This means it will only be called if the248 expression given in the template evaluates to a false or empty value.249*/250/**251Registers a partial that will be made available to all templates.252A partial is another template that can be used to render part of a larger253template. For example, a website with a common header and footer across all its254pages might use a template for each page, which would call shared partials to255render the headers and footers.256Partials may be specified as uncompiled template strings or as compiled template257functions.258@example259 Y.Handlebars.registerPartial('header', '<h1>{{title}}</h1>');260 Y.Handlebars.registerPartial('footer', 'Copyright (c) 2011 by Me.');261 var source = '{{> header}} <p>Mustaches are awesome!</p> {{> footer}}';262 Y.Handlebars.render(source, {title: 'My Page About Mustaches'});263@method registerPartial264@param {String} name Name of this partial.265@param {Function|String} partial Template string or compiled template function.266*/267/**268Converts a precompiled template into a renderable template function.269@example270 <script src="precompiled-template.js"></script>271 <script>272 YUI().use('handlebars-base', function (Y) {273 // Convert the precompiled template function into a renderable template274 // function.275 var template = Y.Handlebars.template(precompiledTemplate);276 // Render it.277 template({pie: 'Pumpkin'});278 });279 </script>280@method template281@param {Function} template Precompiled Handlebars template function.282@return {Function} Compiled template function.283*/...
Using AI Code Generation
1import { withKnobs } from '@storybook/addon-knobs';2import { withA11y } from '@storybook/addon-a11y';3import { withContexts } from '@storybook/addon-contexts/react';4import { contexts } from './contexts';5import { withTests } from '@storybook/addon-jest';6import results from '../.jest-test-results.json';7import { withInfo } from '@storybook/addon-info';8import { configure } from '@storybook/react';9import { addDecorator } from '@storybook/react';10import { addParameters } from '@storybook/react';11import { configureActions } from '@storybook/addon-actions';12const req = require.context('../src/components', true, /.stories.js$/);13function loadStories() {14 req.keys().forEach(filename => req(filename));15}16addParameters({17 options: {
Using AI Code Generation
1import { withA11y } from '@storybook/addon-a11y';2import { withKnobs } from '@storybook/addon-knobs';3import { withContexts } from '@storybook/addon-contexts/vue';4import { withInfo } from 'storybook-addon-vue-info';5import { withTests } from '@storybook/addon-jest';6import { withNotes } from '@storybook/addon-notes';7import { withViewport } from '@storybook/addon-viewport';8import { withPerformance } from 'storybook-addon-performance';9import { withConsole } from '@storybook/addon-console';10import { withBackgrounds } from '@storybook/addon-backgrounds';11import { withOptions } from '@storybook/addon-options';12import { withCssResources } from '@storybook/addon-cssresources';13import { withPaddings } from 'storybook-addon-paddings';14import { withDesign } from 'storybook-addon-designs';15import { withHeadings } from 'storybook-addon-headings';16];17export const addDecorator = (decorator) => {18 decorators.push(decorator);19};20export const addParameters = (parameters) => {21 Object.keys(parameters).forEach((key) => {22 if (key === 'options') {23 withOptions(parameters[key]);24 } else if (key === 'viewport') {25 withViewport(parameters[key]);26 } else if (key === 'backgrounds') {27 withBackgrounds(parameters[key]);28 } else if (key === 'cssresources') {29 withCssResources(parameters[key]);30 } else if (key === 'paddings') {31 withPaddings(parameters[key]);32 } else if (key === 'design') {33 withDesign(parameters[key]);34 }35 });36};37export const configure = (loadStories, module) => {38 const req = require.context('../src/components', true, /\.stories\.js$/);39 function loadStories() {40 req.keys().forEach((filename) => req(filename));41 }42 loadStories();43};44export const getStorybook = () => {45 return [];46};
Using AI Code Generation
1import { withKnobs, text, boolean, number } from "@storybook/addon-knobs";2import { withA11y } from "@storybook/addon-a11y";3import { withTests } from "@storybook/addon-jest";4import { withInfo } from "@storybook/addon-info";5import { withBackgrounds } from "@storybook/addon-backgrounds";6import { withOptions } from "@storybook/addon-options";7import { withViewport } from "@storybook/addon-viewport";8import { withConsole } from "@storybook/addon-console";9import { withNotes } from "@storybook/addon-notes";10import { withPropsTable } from "storybook-addon-react-docgen";11import { addDecorator, configure } from "@storybook/react";12import { setOptions } from "@storybook/addon-options";13import { setDefaults } from "@storybook/addon-info";14import { setConsoleOptions } from "@storybook/addon-console";15addDecorator(withKnobs);16addDecorator(withA11y);17addDecorator(withTests);18addDecorator(withInfo);19addDecorator(withBackgrounds);20addDecorator(withViewport);21addDecorator(withConsole);22addDecorator(withNotes);23addDecorator(withPropsTable);24setOptions({
Using AI Code Generation
1import { configure } from '@storybook/react';2import { setOptions } from '@storybook/addon-options';3import { setAddon } from '@storybook/react';4import infoAddon, { setDefaults } from '@storybook/addon-info';5import { setDefaults as setKnobsDefaults } from '@storybook/addon-knobs';6const req = require.context('../src', true, /.stories.js$/);7function loadStories() {8 req.keys().forEach(filename => req(filename));9}10setOptions({
Using AI Code Generation
1import { html } from 'lit-html';2import { withKnobs, text } from '@storybook/addon-knobs';3import { withWebComponentsKnobs } from 'storybook-addon-web-components-knobs';4import '../src/my-component.js';5export default {6};7export const App = () => {8 const name = text('name', 'John Doe');9 <my-component .name=${name}></my-component>10 `;11};12import { addParameters } from '@storybook/web-components';13import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';14addParameters({15 viewport: {16 },17});18import { addons } from '@storybook/addons';19import { themes } from '@storybook/theming';20addons.setConfig({21 theme: {22 },23});24module.exports = {25 core: {26 },27};28module.exports = {29 module: {30 {31 test: /\.(js|ts)$/,32 {33 options: {34 presets: [['@babel/preset-env', { targets: 'defaults' }]],35 },36 },37 },38 },39};40{41 {42 "targets": {43 }44 }45}46{47 "scripts": {48 },
Using AI Code Generation
1import 'storybook-addon-handlebars/register';2import { configure } from '@storybook/react';3import { addDecorator } from '@storybook/react';4import { withHandlebars } from 'storybook-addon-handlebars';5addDecorator(withHandlebars);6configure(require.context('../src', true, /\.stories\.js$/), module);7const path = require('path');8module.exports = async ({ config, mode }) => {9 config.module.rules.push({10 });11 config.resolve.alias = {12 '@': path.resolve(__dirname, '../src'),13 };14 return config;15};16import { addParameters } from '@storybook/react';17import { withHandlebars } from 'storybook-addon-handlebars';18addParameters({19 handlebars: {20 context: {21 {22 {23 },24 {25 },26 },27 {28 {29 },30 {31 },32 },33 },34 partials: {35 myPartial: '<div class="col-md-6"><p>{{content}}</p></div>',36 },37 },38});39addDecorator(withHandlebars);40import React from 'react';41import { storiesOf } from '@storybook/react';42import { withHandlebars } from 'storybook-addon-handle
Using AI Code Generation
1module.exports = {2 parameters: {3 knobs: {4 },5 },6};7import { storiesOf } from '@storybook/react';8import { withKnobs } from '@storybook/addon-knobs/react';9import { withInfo } from '@storybook/addon-info';10import { withA11y } from '@storybook/addon-a11y';11import { withTests } from '@storybook/addon-jest';12import { withConsole } from '@storybook/addon-console';13import { withOptions } from '@storybook/addon-options';14import { withBackgrounds } from '@storybook/addon-backgrounds';15import { withViewport } from '@storybook/addon-viewport';16import { withLinks } from '@storybook/addon-links';17import { action } from '@storybook/addon-actions';18import { linkTo } from '@storybook/addon-links';19import { specs, describe, it } from 'storybook-addon-specifications';20import { configure } from '@storybook/react';21import { setOptions } from '@storybook/addon-options';22import { setDefaults } from '@storybook/addon-info';23import { setConsoleOptions } from '@storybook/addon-console';24import { setDefaults as setViewportDefaults } from '@storybook/addon-viewport';25import { setLinkHandler } from '@storybook/addon-links';26import { setOptions as setA11yOptions } from '@storybook/addon-a11y';27import { setOptions as setKnobsOptions } from '@storybook/addon-knobs';28import { setOptions as setInfoOptions } from '@storybook/addon-info';29import { setDefaults as setConsoleDefaults } from '@storybook/addon-console';30import { setDefaults as setLinksDefaults } from '@storybook/addon-links';31import { setDefaults as setKnobsDefaults } from '@storybook/addon-knobs';32import { setDefaults as setViewportDefaults } from '@storybook/addon-viewport';33import { setDefaults as setA11yDefaults } from '@storybook/addon-a11y';34import { setDefaults as setOptionsDefaults } from '@storybook/addon-options';35import { setDefaults as setTestsDefaults } from '@storybook/addon-jest';36import { setDefaults as setInfoDefaults } from '@storybook/addon-info';37import { setDefaults as setConsoleDefaults } from '@storybook/addon-console';
Using AI Code Generation
1const indexBodyTemplate = require('./index-body.hbs');2const indexBodyTemplateWithData = require('./index-body.hbs');3const indexBodyContent = 'This is the content for the body of the index.html file.';4const indexBodyContentWithData = indexBodyTemplateWithData({indexBodyContent});5const indexPath = path.resolve(__dirname, 'index.html');6const indexPathWithData = path.resolve(__dirname, 'index-with-data.html');7const indexBodyContentWithData = indexBodyTemplateWithData({indexBodyContent});8const indexBodyContentWithData = indexBodyTemplateWithData({indexBodyContent});9const indexBodyContentWithData = indexBodyTemplateWithData({indexBodyContent});10const indexBodyContentWithData = indexBodyTemplateWithData({indexBodyContent});
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!