{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 679ff8296d850238baf3","../nunjucks/src/lib.js","../nunjucks/src/object.js","../nunjucks/src/runtime.js","../nunjucks/src/nodes.js","../nunjucks/src/compiler.js","../nunjucks/src/loader.js","../nunjucks/src/environment.js","../nunjucks/src/parser.js","../nunjucks/src/lexer.js","../nunjucks/src/web-loaders.js","../nunjucks/index.js","../node_modules/asap/browser-asap.js","../node_modules/asap/browser-raw.js","../node_modules/webpack/buildin/global.js","../node_modules/a-sync-waterfall/index.js","../node_modules/webpack/node_modules/events/events.js","../nunjucks/src/transformer.js","../nunjucks/src/filters.js","../nunjucks/src/precompiled-loader.js","../nunjucks/src/tests.js","../nunjucks/src/globals.js","../nunjucks/src/express-app.js","../nunjucks/src/precompile.js","../nunjucks/src/precompile-global.js","../nunjucks/src/jinja-compat.js"],"names":["ArrayProto","Array","prototype","ObjProto","Object","escapeMap","escapeRegex","exports","module","hasOwnProp","obj","k","hasOwnProperty","call","lookupEscape","ch","_prettifyError","path","withInternals","err","Update","TemplateError","old","Error","message","name","lineno","colno","cause","setPrototypeOf","defineProperty","enumerable","writable","value","captureStackTrace","constructor","getStack","stackDescriptor","getOwnPropertyDescriptor","get","stack","firstUpdate","msg","create","escape","val","replace","isFunction","toString","isArray","isString","isObject","_prepareAttributeParts","attr","split","getAttrGetter","attribute","parts","attrGetter","item","_item","i","length","part","undefined","groupBy","throwOnUndefined","result","iterator","key","TypeError","push","toArray","slice","without","array","contains","arguments","index","indexOf","repeat","char_","n","str","each","func","context","forEach","l","map","results","asyncIter","arr","iter","cb","next","asyncFor","keys","keys_","len","searchElement","fromIndex","_entries","_values","extend","obj1","obj2","_assign","inOperator","EventEmitter","require","lib","parentWrap","parent","prop","wrap","tmp","res","apply","extendClass","cls","props","subclass","Obj","init","EmitterObj","arrayFrom","from","supportsIterators","Symbol","Frame","isolateWrites","variables","topLevel","set","resolveUp","frame","resolve","id","lookup","p","forWrite","pop","makeMacro","argNames","kwargNames","macro","macroArgs","argCount","numArgs","args","kwargs","getKeywordArgs","arg","makeKeywordArgs","__keywords","isKeywordArgs","lastArg","SafeString","String","configurable","valueOf","copySafeness","dest","target","markSafe","type","wrapSafe","ret","suppressValue","autoescape","ensureDefined","memberLookup","callWrap","contextOrFrameLookup","handleError","error","asyncEach","dimen","iterCallback","asyncAll","finished","outputArr","done","output","join","fromIterator","traverseAndCheck","Node","findAll","fields","field","NodeList","children","child","iterFields","Value","nodes","addChild","node","Root","Literal","Group","ArrayNode","Pair","Dict","LookupVal","If","IfAsync","InlineIf","For","AsyncEach","AsyncAll","Macro","Caller","Import","FromImport","template","names","withContext","FunCall","Filter","FilterAsync","KeywordArgs","Block","Super","TemplateRef","Extends","Include","Set","Switch","Case","Output","Capture","TemplateData","UnaryOp","BinOp","In","Is","Or","And","Not","Add","Concat","Sub","Mul","Div","FloorDiv","Mod","Pow","Neg","Pos","Compare","CompareOperand","CallExtension","ext","contentArgs","extName","__name","CallExtensionAsync","print","indent","inline","lines","line","process","stdout","write","nl","printNodes","typename","fieldName","JSON","stringify","parser","transformer","compareOps","Compiler","templateName","codebuf","lastId","buffer","bufferStack","_scopeClosers","inBlock","fail","_pushBuffer","_tmpid","_emit","_popBuffer","code","_emitLine","_emitLines","_emitFuncBegin","_emitFuncEnd","noReturn","_closeScopeLevels","_addScopeLevel","_withScopedSyntax","_makeCallback","_templateName","_compileChildren","compile","_compileAggregate","startChar","endChar","_compileExpression","assertType","types","some","t","compileCallExtension","async","compileCallExtensionAsync","compileNodeList","compileLiteral","compileSymbol","v","compileGroup","compileArray","compileDict","compilePair","compileInlineIf","cond","body","else_","compileIn","left","right","compileIs","_binOpEmitter","compileOr","compileAnd","compileAdd","compileConcat","compileSub","compileMul","compileDiv","compileMod","compileNot","compileFloorDiv","compilePow","compileNeg","compilePos","compileCompare","expr","ops","op","compileLookupVal","_getNodeName","compileFunCall","compileFilter","compileFilterAsync","symbol","compileKeywordArgs","compileSet","ids","targets","charAt","compileSwitch","cases","c","default","compileIf","compileIfAsync","_emitLoopBindings","bindings","b","compileFor","u","tid","_compileAsyncLoop","parallel","asyncMethod","arrayLen","buf","compileAsyncEach","compileAsyncAll","_compileMacro","funcId","keepFrame","realNames","currFrame","pair","bufferId","compileMacro","compileCaller","_compileGetTemplate","eagerCompile","ignoreMissing","parentTemplateId","parentName","eagerCompileArg","ignoreMissingArg","compileImport","compileFromImport","importedId","nameNode","alias","compileBlock","compileSuper","blockName","compileExtends","compileInclude","id2","compileTemplateData","compileCapture","compileOutput","compileRoot","blockNames","blocks","block","tmpFrame","_compile","getCode","src","asyncFilters","extensions","opts","preprocessors","preprocess","filter","f","processedSrc","reduce","s","processor","transform","parse","to","dirname","isRelative","filename","asap","waterfall","compiler","filters","FileSystemLoader","WebLoader","PrecompiledLoader","tests","globals","globalRuntime","expressApp","callbackAsap","noopTmplSrc","root","env","runtime","e","Environment","loaders","dev","trimBlocks","lstripBlocks","window","nunjucksPrecompiled","unshift","_initLoaders","extensionsList","addFilter","test","addTest","loader","cache","on","fullname","emit","source","invalidateCache","addExtension","extension","removeExtension","getExtension","hasExtension","addGlobal","getGlobal","wrapped","getFilter","getTest","resolveTemplate","getTemplate","that","tmpl","raw","Template","syncResult","createTemplate","info","newTmpl","noCache","handle","getSource","express","app","render","ctx","renderString","tasks","callback","forceAsync","Context","exported","addBlock","setVariable","getVariables","getBlock","getSuper","idx","blk","addExport","getExported","tmplProps","tmplStr","compiled","parentFrame","didError","rootRenderFunc","Function","_getBlocks","lexer","Parser","tokens","peeked","breakOnBlocks","dropLeadingWhitespace","nextToken","withWhitespace","tok","TOKEN_WHITESPACE","peekToken","pushToken","skip","expect","skipValue","skipSymbol","TOKEN_SYMBOL","advanceAfterBlockEnd","TOKEN_BLOCK_END","advanceAfterVariableEnd","TOKEN_VARIABLE_END","tags","VARIABLE_END","parseFor","forTok","endBlock","parsePrimary","TOKEN_COMMA","prim","parseExpression","parseUntilBlocks","parseMacro","macroTok","parseSignature","parseCall","callTok","callerArgs","macroCall","callerName","callerNode","parseWithContext","parseImport","importTok","parseFrom","fromTok","nextTok","parseBlock","tag","parseExtends","tagName","parseInclude","parseIf","parseSet","TOKEN_OPERATOR","parseSwitch","switchStart","switchEnd","caseStart","caseDefault","defaultCase","col","parseStatement","parseRaw","parseFilterStatement","endTagName","rawBlockRegex","RegExp","rawLevel","matches","begun","_extractRegex","all","pre","backN","parsePostfix","TOKEN_LEFT_PAREN","TOKEN_LEFT_BRACKET","parseAggregate","parseInlineIf","parseOr","condNode","bodyNode","parseAnd","node2","parseNot","parseIn","parseIs","invert","parseCompare","not","parseConcat","parseAdd","TOKEN_TILDE","parseSub","parseMul","parseDiv","parseFloorDiv","parseMod","parsePow","parseUnary","noFilters","parseFilter","noPostfix","TOKEN_STRING","TOKEN_INT","parseInt","TOKEN_FLOAT","parseFloat","TOKEN_BOOLEAN","TOKEN_NONE","TOKEN_REGEX","flags","parseFilterName","parseFilterArgs","TOKEN_PIPE","concat","filterTok","TOKEN_LEFT_CURLY","TOKEN_RIGHT_PAREN","TOKEN_RIGHT_BRACKET","TOKEN_RIGHT_CURLY","TOKEN_COLON","tolerant","noParens","checkComma","prev","parseNodes","TOKEN_DATA","data","nextVal","TOKEN_BLOCK_START","TOKEN_VARIABLE_START","VARIABLE_START","TOKEN_COMMENT","COMMENT_START","COMMENT_END","parseAsRoot","lex","whitespaceChars","delimChars","intChars","BLOCK_START","BLOCK_END","TOKEN_SPECIAL","token","Tokenizer","in_code","blockStart","blockEnd","variableStart","variableEnd","commentStart","commentEnd","cur","current","isFinished","_parseString","_extract","_extractString","forward","back","forwardN","regexBody","previous","POSSIBLE_FLAGS","regexFlags","isCurrentAFlag","complexOps","curComplex","_extractUntil","match","dec","beginChars","inComment","_matches","lastLine","delimiter","m","charString","_extractMatching","breakOnMatch","first","regex","currentStr","lastIndexOf","substr","Loader","baseURL","useCache","fetch","content","status","url","ajax","XMLHttpRequest","loading","onreadystatechange","readyState","responseText","Date","getTime","open","send","precompile","installJinjaCompat","configure","templatesPath","TemplateLoader","watch","web","NodeResolveLoader","reset","precompileString","sym","gensym","mapCOW","walk","ast","depthFirst","astT","propsT","depthWalk","_liftFilters","walked","descNode","liftFilters","liftSuper","blockNode","hasSuper","convertStatements","cps","r","normalize","defaultValue","abs","Math","isNaN","num","batch","linecount","fillWith","capitalize","toLowerCase","toUpperCase","center","width","spaces","post","default_","def","bool","dictsort","caseSensitive","by","si","sort","t1","t2","a","dump","safe","forceescape","groupby","indentfirst","sp","del","last","lengthFilter","Map","size","list","lower","nl2br","random","floor","getSelectOrReject","expectedTestResult","testName","secondArg","examineTestResult","reject","rejectattr","select","selectattr","new_","maxCount","originalStr","nextIndex","pos","count","substring","reverse","round","precision","method","factor","pow","rounder","ceil","slices","sliceLength","extra","offset","start","end","currSlice","sum","sortFilter","reversed","caseSens","getAttribute","x","y","string","striptags","input","preserveLinebreaks","trimmedInput","trim","title","words","word","truncate","killwords","orig","upper","urlencode","enc","encodeURIComponent","keyvals","puncRe","emailRe","httpHttpsRe","wwwRe","tldRe","urlize","nofollow","Infinity","noFollowAttr","possibleUrl","shortUrl","wordcount","float","intFilter","doInt","base","int","d","compiledTemplates","precompiled","callable","defined","divisibleby","one","two","escaped","equalto","eq","sameas","even","falsy","ge","greaterthan","gt","le","lessthan","lt","ne","nullTest","null","number","odd","truthy","undefinedTest","iterable","mapping","cycler","items","joiner","sep","range","stop","step","NunjucksView","defaultEngine","extname","fs","precompileGlobal","patterns","pattern","wrapper","_precompile","pathStats","existsSync","statSync","templates","addTemplates","dir","readdirSync","file","filepath","subpath","stat","isDirectory","exclude","include","isFile","readFileSync","force","console","out","asFunction","installCompat","orig_contextOrFrameLookup","orig_memberLookup","orig_Compiler_assertType","orig_Parser_parseAggregate","uninstall","getTokensState","Slice","compileSlice","origState","errState","rethrow","isSlice","sliceLookup","ARRAY_MEMBERS","splice","append","element","remove","find","insert","elem","OBJECT_MEMBERS","values","has_key","popitem","setdefault","update","iteritems","itervalues","iterkeys","bind"],"mappings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AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACjEA,8CAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,kBAAkB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9NA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;ACpBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA,MAAM,IAA2C;AACjD,IAAI,iCAAO,EAAE,mCAAE;AACf;AACA,KAAK;AAAA,oGAAC,CAAC;AACP,GAAG;AACH,+BAA+B;AAC/B,GAAG;AACH,kCAAkC;AAClC;AACA,CAAC;;;;;;;;AClFD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;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;AAED,WAAO45B,iBAAiB,CAAChzB,KAAlB,CAAwB,IAAxB,EAA8BzC,SAA9B,CAAP;AACD,GAhBD;;AAkBA,SAAO41B,SAAP;AACD;;AAEDj6B,MAAM,CAACD,OAAP,GAAiB65B,aAAjB,C","file":"nunjucks.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"nunjucks\"] = factory();\n\telse\n\t\troot[\"nunjucks\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 11);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 679ff8296d850238baf3","'use strict';\n\nvar ArrayProto = Array.prototype;\nvar ObjProto = Object.prototype;\n\nvar escapeMap = {\n '&': '&',\n '\"': '"',\n '\\'': ''',\n '<': '<',\n '>': '>'\n};\n\nvar escapeRegex = /[&\"'<>]/g;\n\nvar exports = module.exports = {};\n\nfunction hasOwnProp(obj, k) {\n return ObjProto.hasOwnProperty.call(obj, k);\n}\n\nexports.hasOwnProp = hasOwnProp;\n\nfunction lookupEscape(ch) {\n return escapeMap[ch];\n}\n\nfunction _prettifyError(path, withInternals, err) {\n if (!err.Update) {\n // not one of ours, cast it\n err = new exports.TemplateError(err);\n }\n err.Update(path);\n\n // Unless they marked the dev flag, show them a trace from here\n if (!withInternals) {\n const old = err;\n err = new Error(old.message);\n err.name = old.name;\n }\n\n return err;\n}\n\nexports._prettifyError = _prettifyError;\n\nfunction TemplateError(message, lineno, colno) {\n var err;\n var cause;\n\n if (message instanceof Error) {\n cause = message;\n message = `${cause.name}: ${cause.message}`;\n }\n\n if (Object.setPrototypeOf) {\n err = new Error(message);\n Object.setPrototypeOf(err, TemplateError.prototype);\n } else {\n err = this;\n Object.defineProperty(err, 'message', {\n enumerable: false,\n writable: true,\n value: message,\n });\n }\n\n Object.defineProperty(err, 'name', {\n value: 'Template render error',\n });\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(err, this.constructor);\n }\n\n let getStack;\n\n if (cause) {\n const stackDescriptor = Object.getOwnPropertyDescriptor(cause, 'stack');\n getStack = stackDescriptor && (stackDescriptor.get || (() => stackDescriptor.value));\n if (!getStack) {\n getStack = () => cause.stack;\n }\n } else {\n const stack = (new Error(message)).stack;\n getStack = (() => stack);\n }\n\n Object.defineProperty(err, 'stack', {\n get: () => getStack.call(err),\n });\n\n Object.defineProperty(err, 'cause', {\n value: cause\n });\n\n err.lineno = lineno;\n err.colno = colno;\n err.firstUpdate = true;\n\n err.Update = function Update(path) {\n let msg = '(' + (path || 'unknown path') + ')';\n\n // only show lineno + colno next to path of template\n // where error occurred\n if (this.firstUpdate) {\n if (this.lineno && this.colno) {\n msg += ` [Line ${this.lineno}, Column ${this.colno}]`;\n } else if (this.lineno) {\n msg += ` [Line ${this.lineno}]`;\n }\n }\n\n msg += '\\n ';\n if (this.firstUpdate) {\n msg += ' ';\n }\n\n this.message = msg + (this.message || '');\n this.firstUpdate = false;\n return this;\n };\n\n return err;\n}\n\n\nif (Object.setPrototypeOf) {\n Object.setPrototypeOf(TemplateError.prototype, Error.prototype);\n} else {\n TemplateError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: TemplateError,\n },\n });\n}\n\nexports.TemplateError = TemplateError;\n\nfunction escape(val) {\n return val.replace(escapeRegex, lookupEscape);\n}\n\nexports.escape = escape;\n\nfunction isFunction(obj) {\n return ObjProto.toString.call(obj) === '[object Function]';\n}\n\nexports.isFunction = isFunction;\n\nfunction isArray(obj) {\n return ObjProto.toString.call(obj) === '[object Array]';\n}\n\nexports.isArray = isArray;\n\nfunction isString(obj) {\n return ObjProto.toString.call(obj) === '[object String]';\n}\n\nexports.isString = isString;\n\nfunction isObject(obj) {\n return ObjProto.toString.call(obj) === '[object Object]';\n}\n\nexports.isObject = isObject;\n\n/**\n * @param {string|number} attr\n * @returns {(string|number)[]}\n * @private\n */\nfunction _prepareAttributeParts(attr) {\n if (!attr) {\n return [];\n }\n\n if (typeof attr === 'string') {\n return attr.split('.');\n }\n\n return [attr];\n}\n\n/**\n * @param {string} attribute Attribute value. Dots allowed.\n * @returns {function(Object): *}\n */\nfunction getAttrGetter(attribute) {\n const parts = _prepareAttributeParts(attribute);\n\n return function attrGetter(item) {\n let _item = item;\n\n for (let i = 0; i < parts.length; i++) {\n const part = parts[i];\n\n // If item is not an object, and we still got parts to handle, it means\n // that something goes wrong. Just roll out to undefined in that case.\n if (hasOwnProp(_item, part)) {\n _item = _item[part];\n } else {\n return undefined;\n }\n }\n\n return _item;\n };\n}\n\nexports.getAttrGetter = getAttrGetter;\n\nfunction groupBy(obj, val, throwOnUndefined) {\n const result = {};\n const iterator = isFunction(val) ? val : getAttrGetter(val);\n for (let i = 0; i < obj.length; i++) {\n const value = obj[i];\n const key = iterator(value, i);\n if (key === undefined && throwOnUndefined === true) {\n throw new TypeError(`groupby: attribute \"${val}\" resolved to undefined`);\n }\n (result[key] || (result[key] = [])).push(value);\n }\n return result;\n}\n\nexports.groupBy = groupBy;\n\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj);\n}\n\nexports.toArray = toArray;\n\nfunction without(array) {\n const result = [];\n if (!array) {\n return result;\n }\n const length = array.length;\n const contains = toArray(arguments).slice(1);\n let index = -1;\n\n while (++index < length) {\n if (indexOf(contains, array[index]) === -1) {\n result.push(array[index]);\n }\n }\n return result;\n}\n\nexports.without = without;\n\nfunction repeat(char_, n) {\n var str = '';\n for (let i = 0; i < n; i++) {\n str += char_;\n }\n return str;\n}\n\nexports.repeat = repeat;\n\nfunction each(obj, func, context) {\n if (obj == null) {\n return;\n }\n\n if (ArrayProto.forEach && obj.forEach === ArrayProto.forEach) {\n obj.forEach(func, context);\n } else if (obj.length === +obj.length) {\n for (let i = 0, l = obj.length; i < l; i++) {\n func.call(context, obj[i], i, obj);\n }\n }\n}\n\nexports.each = each;\n\nfunction map(obj, func) {\n var results = [];\n if (obj == null) {\n return results;\n }\n\n if (ArrayProto.map && obj.map === ArrayProto.map) {\n return obj.map(func);\n }\n\n for (let i = 0; i < obj.length; i++) {\n results[results.length] = func(obj[i], i);\n }\n\n if (obj.length === +obj.length) {\n results.length = obj.length;\n }\n\n return results;\n}\n\nexports.map = map;\n\nfunction asyncIter(arr, iter, cb) {\n let i = -1;\n\n function next() {\n i++;\n\n if (i < arr.length) {\n iter(arr[i], i, next, cb);\n } else {\n cb();\n }\n }\n\n next();\n}\n\nexports.asyncIter = asyncIter;\n\nfunction asyncFor(obj, iter, cb) {\n const keys = keys_(obj || {});\n const len = keys.length;\n let i = -1;\n\n function next() {\n i++;\n const k = keys[i];\n\n if (i < len) {\n iter(k, obj[k], i, len, next);\n } else {\n cb();\n }\n }\n\n next();\n}\n\nexports.asyncFor = asyncFor;\n\nfunction indexOf(arr, searchElement, fromIndex) {\n return Array.prototype.indexOf.call(arr || [], searchElement, fromIndex);\n}\n\nexports.indexOf = indexOf;\n\nfunction keys_(obj) {\n /* eslint-disable no-restricted-syntax */\n const arr = [];\n for (let k in obj) {\n if (hasOwnProp(obj, k)) {\n arr.push(k);\n }\n }\n return arr;\n}\n\nexports.keys = keys_;\n\nfunction _entries(obj) {\n return keys_(obj).map((k) => [k, obj[k]]);\n}\n\nexports._entries = _entries;\n\nfunction _values(obj) {\n return keys_(obj).map((k) => obj[k]);\n}\n\nexports._values = _values;\n\nfunction extend(obj1, obj2) {\n obj1 = obj1 || {};\n keys_(obj2).forEach(k => {\n obj1[k] = obj2[k];\n });\n return obj1;\n}\n\nexports._assign = exports.extend = extend;\n\nfunction inOperator(key, val) {\n if (isArray(val) || isString(val)) {\n return val.indexOf(key) !== -1;\n } else if (isObject(val)) {\n return key in val;\n }\n throw new Error('Cannot use \"in\" operator to search for \"'\n + key + '\" in unexpected types.');\n}\n\nexports.inOperator = inOperator;\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/lib.js","'use strict';\n\n// A simple class system, more documentation to come\nconst EventEmitter = require('events');\nconst lib = require('./lib');\n\nfunction parentWrap(parent, prop) {\n if (typeof parent !== 'function' || typeof prop !== 'function') {\n return prop;\n }\n return function wrap() {\n // Save the current parent method\n const tmp = this.parent;\n\n // Set parent to the previous method, call, and restore\n this.parent = parent;\n const res = prop.apply(this, arguments);\n this.parent = tmp;\n\n return res;\n };\n}\n\nfunction extendClass(cls, name, props) {\n props = props || {};\n\n lib.keys(props).forEach(k => {\n props[k] = parentWrap(cls.prototype[k], props[k]);\n });\n\n class subclass extends cls {\n get typename() {\n return name;\n }\n }\n\n lib._assign(subclass.prototype, props);\n\n return subclass;\n}\n\nclass Obj {\n constructor(...args) {\n // Unfortunately necessary for backwards compatibility\n this.init(...args);\n }\n\n init() {}\n\n get typename() {\n return this.constructor.name;\n }\n\n static extend(name, props) {\n if (typeof name === 'object') {\n props = name;\n name = 'anonymous';\n }\n return extendClass(this, name, props);\n }\n}\n\nclass EmitterObj extends EventEmitter {\n constructor(...args) {\n super();\n // Unfortunately necessary for backwards compatibility\n this.init(...args);\n }\n\n init() {}\n\n get typename() {\n return this.constructor.name;\n }\n\n static extend(name, props) {\n if (typeof name === 'object') {\n props = name;\n name = 'anonymous';\n }\n return extendClass(this, name, props);\n }\n}\n\nmodule.exports = { Obj, EmitterObj };\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/object.js","'use strict';\n\nvar lib = require('./lib');\nvar arrayFrom = Array.from;\nvar supportsIterators = (\n typeof Symbol === 'function' && Symbol.iterator && typeof arrayFrom === 'function'\n);\n\n\n// Frames keep track of scoping both at compile-time and run-time so\n// we know how to access variables. Block tags can introduce special\n// variables, for example.\nclass Frame {\n constructor(parent, isolateWrites) {\n this.variables = Object.create(null);\n this.parent = parent;\n this.topLevel = false;\n // if this is true, writes (set) should never propagate upwards past\n // this frame to its parent (though reads may).\n this.isolateWrites = isolateWrites;\n }\n\n set(name, val, resolveUp) {\n // Allow variables with dots by automatically creating the\n // nested structure\n var parts = name.split('.');\n var obj = this.variables;\n var frame = this;\n\n if (resolveUp) {\n if ((frame = this.resolve(parts[0], true))) {\n frame.set(name, val);\n return;\n }\n }\n\n for (let i = 0; i < parts.length - 1; i++) {\n const id = parts[i];\n\n if (!obj[id]) {\n obj[id] = {};\n }\n obj = obj[id];\n }\n\n obj[parts[parts.length - 1]] = val;\n }\n\n get(name) {\n var val = this.variables[name];\n if (val !== undefined) {\n return val;\n }\n return null;\n }\n\n lookup(name) {\n var p = this.parent;\n var val = this.variables[name];\n if (val !== undefined) {\n return val;\n }\n return p && p.lookup(name);\n }\n\n resolve(name, forWrite) {\n var p = (forWrite && this.isolateWrites) ? undefined : this.parent;\n var val = this.variables[name];\n if (val !== undefined) {\n return this;\n }\n return p && p.resolve(name);\n }\n\n push(isolateWrites) {\n return new Frame(this, isolateWrites);\n }\n\n pop() {\n return this.parent;\n }\n}\n\nfunction makeMacro(argNames, kwargNames, func) {\n return function macro(...macroArgs) {\n var argCount = numArgs(macroArgs);\n var args;\n var kwargs = getKeywordArgs(macroArgs);\n\n if (argCount > argNames.length) {\n args = macroArgs.slice(0, argNames.length);\n\n // Positional arguments that should be passed in as\n // keyword arguments (essentially default values)\n macroArgs.slice(args.length, argCount).forEach((val, i) => {\n if (i < kwargNames.length) {\n kwargs[kwargNames[i]] = val;\n }\n });\n args.push(kwargs);\n } else if (argCount < argNames.length) {\n args = macroArgs.slice(0, argCount);\n\n for (let i = argCount; i < argNames.length; i++) {\n const arg = argNames[i];\n\n // Keyword arguments that should be passed as\n // positional arguments, i.e. the caller explicitly\n // used the name of a positional arg\n args.push(kwargs[arg]);\n delete kwargs[arg];\n }\n args.push(kwargs);\n } else {\n args = macroArgs;\n }\n\n return func.apply(this, args);\n };\n}\n\nfunction makeKeywordArgs(obj) {\n obj.__keywords = true;\n return obj;\n}\n\nfunction isKeywordArgs(obj) {\n return obj && Object.prototype.hasOwnProperty.call(obj, '__keywords');\n}\n\nfunction getKeywordArgs(args) {\n var len = args.length;\n if (len) {\n const lastArg = args[len - 1];\n if (isKeywordArgs(lastArg)) {\n return lastArg;\n }\n }\n return {};\n}\n\nfunction numArgs(args) {\n var len = args.length;\n if (len === 0) {\n return 0;\n }\n\n const lastArg = args[len - 1];\n if (isKeywordArgs(lastArg)) {\n return len - 1;\n } else {\n return len;\n }\n}\n\n// A SafeString object indicates that the string should not be\n// autoescaped. This happens magically because autoescaping only\n// occurs on primitive string objects.\nfunction SafeString(val) {\n if (typeof val !== 'string') {\n return val;\n }\n\n this.val = val;\n this.length = val.length;\n}\n\nSafeString.prototype = Object.create(String.prototype, {\n length: {\n writable: true,\n configurable: true,\n value: 0\n }\n});\nSafeString.prototype.valueOf = function valueOf() {\n return this.val;\n};\nSafeString.prototype.toString = function toString() {\n return this.val;\n};\n\nfunction copySafeness(dest, target) {\n if (dest instanceof SafeString) {\n return new SafeString(target);\n }\n return target.toString();\n}\n\nfunction markSafe(val) {\n var type = typeof val;\n\n if (type === 'string') {\n return new SafeString(val);\n } else if (type !== 'function') {\n return val;\n } else {\n return function wrapSafe(args) {\n var ret = val.apply(this, arguments);\n\n if (typeof ret === 'string') {\n return new SafeString(ret);\n }\n\n return ret;\n };\n }\n}\n\nfunction suppressValue(val, autoescape) {\n val = (val !== undefined && val !== null) ? val : '';\n\n if (autoescape && !(val instanceof SafeString)) {\n val = lib.escape(val.toString());\n }\n\n return val;\n}\n\nfunction ensureDefined(val, lineno, colno) {\n if (val === null || val === undefined) {\n throw new lib.TemplateError(\n 'attempted to output null or undefined value',\n lineno + 1,\n colno + 1\n );\n }\n return val;\n}\n\nfunction memberLookup(obj, val) {\n if (obj === undefined || obj === null) {\n return undefined;\n }\n\n if (typeof obj[val] === 'function') {\n return (...args) => obj[val].apply(obj, args);\n }\n\n return obj[val];\n}\n\nfunction callWrap(obj, name, context, args) {\n if (!obj) {\n throw new Error('Unable to call `' + name + '`, which is undefined or falsey');\n } else if (typeof obj !== 'function') {\n throw new Error('Unable to call `' + name + '`, which is not a function');\n }\n\n return obj.apply(context, args);\n}\n\nfunction contextOrFrameLookup(context, frame, name) {\n var val = frame.lookup(name);\n return (val !== undefined) ?\n val :\n context.lookup(name);\n}\n\nfunction handleError(error, lineno, colno) {\n if (error.lineno) {\n return error;\n } else {\n return new lib.TemplateError(error, lineno, colno);\n }\n}\n\nfunction asyncEach(arr, dimen, iter, cb) {\n if (lib.isArray(arr)) {\n const len = arr.length;\n\n lib.asyncIter(arr, function iterCallback(item, i, next) {\n switch (dimen) {\n case 1:\n iter(item, i, len, next);\n break;\n case 2:\n iter(item[0], item[1], i, len, next);\n break;\n case 3:\n iter(item[0], item[1], item[2], i, len, next);\n break;\n default:\n item.push(i, len, next);\n iter.apply(this, item);\n }\n }, cb);\n } else {\n lib.asyncFor(arr, function iterCallback(key, val, i, len, next) {\n iter(key, val, i, len, next);\n }, cb);\n }\n}\n\nfunction asyncAll(arr, dimen, func, cb) {\n var finished = 0;\n var len;\n var outputArr;\n\n function done(i, output) {\n finished++;\n outputArr[i] = output;\n\n if (finished === len) {\n cb(null, outputArr.join(''));\n }\n }\n\n if (lib.isArray(arr)) {\n len = arr.length;\n outputArr = new Array(len);\n\n if (len === 0) {\n cb(null, '');\n } else {\n for (let i = 0; i < arr.length; i++) {\n const item = arr[i];\n\n switch (dimen) {\n case 1:\n func(item, i, len, done);\n break;\n case 2:\n func(item[0], item[1], i, len, done);\n break;\n case 3:\n func(item[0], item[1], item[2], i, len, done);\n break;\n default:\n item.push(i, len, done);\n func.apply(this, item);\n }\n }\n }\n } else {\n const keys = lib.keys(arr || {});\n len = keys.length;\n outputArr = new Array(len);\n\n if (len === 0) {\n cb(null, '');\n } else {\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n func(k, arr[k], i, len, done);\n }\n }\n }\n}\n\nfunction fromIterator(arr) {\n if (typeof arr !== 'object' || arr === null || lib.isArray(arr)) {\n return arr;\n } else if (supportsIterators && Symbol.iterator in arr) {\n return arrayFrom(arr);\n } else {\n return arr;\n }\n}\n\nmodule.exports = {\n Frame: Frame,\n makeMacro: makeMacro,\n makeKeywordArgs: makeKeywordArgs,\n numArgs: numArgs,\n suppressValue: suppressValue,\n ensureDefined: ensureDefined,\n memberLookup: memberLookup,\n contextOrFrameLookup: contextOrFrameLookup,\n callWrap: callWrap,\n handleError: handleError,\n isArray: lib.isArray,\n keys: lib.keys,\n SafeString: SafeString,\n copySafeness: copySafeness,\n markSafe: markSafe,\n asyncEach: asyncEach,\n asyncAll: asyncAll,\n inOperator: lib.inOperator,\n fromIterator: fromIterator\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/runtime.js","'use strict';\n\nconst {Obj} = require('./object');\n\nfunction traverseAndCheck(obj, type, results) {\n if (obj instanceof type) {\n results.push(obj);\n }\n\n if (obj instanceof Node) {\n obj.findAll(type, results);\n }\n}\n\nclass Node extends Obj {\n init(lineno, colno, ...args) {\n this.lineno = lineno;\n this.colno = colno;\n\n this.fields.forEach((field, i) => {\n // The first two args are line/col numbers, so offset by 2\n var val = arguments[i + 2];\n\n // Fields should never be undefined, but null. It makes\n // testing easier to normalize values.\n if (val === undefined) {\n val = null;\n }\n\n this[field] = val;\n });\n }\n\n findAll(type, results) {\n results = results || [];\n\n if (this instanceof NodeList) {\n this.children.forEach(child => traverseAndCheck(child, type, results));\n } else {\n this.fields.forEach(field => traverseAndCheck(this[field], type, results));\n }\n\n return results;\n }\n\n iterFields(func) {\n this.fields.forEach((field) => {\n func(this[field], field);\n });\n }\n}\n\n// Abstract nodes\nclass Value extends Node {\n get typename() { return 'Value'; }\n get fields() {\n return ['value'];\n }\n}\n\n// Concrete nodes\nclass NodeList extends Node {\n get typename() { return 'NodeList'; }\n get fields() { return ['children']; }\n\n init(lineno, colno, nodes) {\n super.init(lineno, colno, nodes || []);\n }\n\n addChild(node) {\n this.children.push(node);\n }\n}\n\nconst Root = NodeList.extend('Root');\nconst Literal = Value.extend('Literal');\nconst Symbol = Value.extend('Symbol');\nconst Group = NodeList.extend('Group');\nconst ArrayNode = NodeList.extend('Array');\nconst Pair = Node.extend('Pair', { fields: ['key', 'value'] });\nconst Dict = NodeList.extend('Dict');\nconst LookupVal = Node.extend('LookupVal', { fields: ['target', 'val'] });\nconst If = Node.extend('If', { fields: ['cond', 'body', 'else_'] });\nconst IfAsync = If.extend('IfAsync');\nconst InlineIf = Node.extend('InlineIf', { fields: ['cond', 'body', 'else_'] });\nconst For = Node.extend('For', { fields: ['arr', 'name', 'body', 'else_'] });\nconst AsyncEach = For.extend('AsyncEach');\nconst AsyncAll = For.extend('AsyncAll');\nconst Macro = Node.extend('Macro', { fields: ['name', 'args', 'body'] });\nconst Caller = Macro.extend('Caller');\nconst Import = Node.extend('Import', { fields: ['template', 'target', 'withContext'] });\n\nclass FromImport extends Node {\n get typename() { return 'FromImport'; }\n get fields() { return ['template', 'names', 'withContext']; }\n\n init(lineno, colno, template, names, withContext) {\n super.init(lineno, colno, template, names || new NodeList(), withContext);\n }\n}\n\nconst FunCall = Node.extend('FunCall', { fields: ['name', 'args'] });\nconst Filter = FunCall.extend('Filter');\nconst FilterAsync = Filter.extend('FilterAsync', { fields: ['name', 'args', 'symbol'] });\nconst KeywordArgs = Dict.extend('KeywordArgs');\nconst Block = Node.extend('Block', { fields: ['name', 'body'] });\nconst Super = Node.extend('Super', { fields: ['blockName', 'symbol'] });\nconst TemplateRef = Node.extend('TemplateRef', { fields: ['template'] });\nconst Extends = TemplateRef.extend('Extends');\nconst Include = Node.extend('Include', { fields: ['template', 'ignoreMissing'] });\nconst Set = Node.extend('Set', { fields: ['targets', 'value'] });\nconst Switch = Node.extend('Switch', { fields: ['expr', 'cases', 'default'] });\nconst Case = Node.extend('Case', { fields: ['cond', 'body'] });\nconst Output = NodeList.extend('Output');\nconst Capture = Node.extend('Capture', { fields: ['body'] });\nconst TemplateData = Literal.extend('TemplateData');\nconst UnaryOp = Node.extend('UnaryOp', { fields: ['target'] });\nconst BinOp = Node.extend('BinOp', { fields: ['left', 'right'] });\nconst In = BinOp.extend('In');\nconst Is = BinOp.extend('Is');\nconst Or = BinOp.extend('Or');\nconst And = BinOp.extend('And');\nconst Not = UnaryOp.extend('Not');\nconst Add = BinOp.extend('Add');\nconst Concat = BinOp.extend('Concat');\nconst Sub = BinOp.extend('Sub');\nconst Mul = BinOp.extend('Mul');\nconst Div = BinOp.extend('Div');\nconst FloorDiv = BinOp.extend('FloorDiv');\nconst Mod = BinOp.extend('Mod');\nconst Pow = BinOp.extend('Pow');\nconst Neg = UnaryOp.extend('Neg');\nconst Pos = UnaryOp.extend('Pos');\nconst Compare = Node.extend('Compare', { fields: ['expr', 'ops'] });\nconst CompareOperand = Node.extend('CompareOperand', { fields: ['expr', 'type'] });\nconst CallExtension = Node.extend('CallExtension', {\n init(ext, prop, args, contentArgs) {\n this.parent();\n this.extName = ext.__name || ext;\n this.prop = prop;\n this.args = args || new NodeList();\n this.contentArgs = contentArgs || [];\n this.autoescape = ext.autoescape;\n },\n fields: ['extName', 'prop', 'args', 'contentArgs']\n});\nconst CallExtensionAsync = CallExtension.extend('CallExtensionAsync');\n\n// This is hacky, but this is just a debugging function anyway\nfunction print(str, indent, inline) {\n var lines = str.split('\\n');\n\n lines.forEach((line, i) => {\n if (line && ((inline && i > 0) || !inline)) {\n process.stdout.write((' ').repeat(indent));\n }\n const nl = (i === lines.length - 1) ? '' : '\\n';\n process.stdout.write(`${line}${nl}`);\n });\n}\n\n// Print the AST in a nicely formatted tree format for debuggin\nfunction printNodes(node, indent) {\n indent = indent || 0;\n\n print(node.typename + ': ', indent);\n\n if (node instanceof NodeList) {\n print('\\n');\n node.children.forEach((n) => {\n printNodes(n, indent + 2);\n });\n } else if (node instanceof CallExtension) {\n print(`${node.extName}.${node.prop}\\n`);\n\n if (node.args) {\n printNodes(node.args, indent + 2);\n }\n\n if (node.contentArgs) {\n node.contentArgs.forEach((n) => {\n printNodes(n, indent + 2);\n });\n }\n } else {\n let nodes = [];\n let props = null;\n\n node.iterFields((val, fieldName) => {\n if (val instanceof Node) {\n nodes.push([fieldName, val]);\n } else {\n props = props || {};\n props[fieldName] = val;\n }\n });\n\n if (props) {\n print(JSON.stringify(props, null, 2) + '\\n', null, true);\n } else {\n print('\\n');\n }\n\n nodes.forEach(([fieldName, n]) => {\n print(`[${fieldName}] =>`, indent + 2);\n printNodes(n, indent + 4);\n });\n }\n}\n\nmodule.exports = {\n Node: Node,\n Root: Root,\n NodeList: NodeList,\n Value: Value,\n Literal: Literal,\n Symbol: Symbol,\n Group: Group,\n Array: ArrayNode,\n Pair: Pair,\n Dict: Dict,\n Output: Output,\n Capture: Capture,\n TemplateData: TemplateData,\n If: If,\n IfAsync: IfAsync,\n InlineIf: InlineIf,\n For: For,\n AsyncEach: AsyncEach,\n AsyncAll: AsyncAll,\n Macro: Macro,\n Caller: Caller,\n Import: Import,\n FromImport: FromImport,\n FunCall: FunCall,\n Filter: Filter,\n FilterAsync: FilterAsync,\n KeywordArgs: KeywordArgs,\n Block: Block,\n Super: Super,\n Extends: Extends,\n Include: Include,\n Set: Set,\n Switch: Switch,\n Case: Case,\n LookupVal: LookupVal,\n BinOp: BinOp,\n In: In,\n Is: Is,\n Or: Or,\n And: And,\n Not: Not,\n Add: Add,\n Concat: Concat,\n Sub: Sub,\n Mul: Mul,\n Div: Div,\n FloorDiv: FloorDiv,\n Mod: Mod,\n Pow: Pow,\n Neg: Neg,\n Pos: Pos,\n Compare: Compare,\n CompareOperand: CompareOperand,\n\n CallExtension: CallExtension,\n CallExtensionAsync: CallExtensionAsync,\n\n printNodes: printNodes\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/nodes.js","'use strict';\n\nconst parser = require('./parser');\nconst transformer = require('./transformer');\nconst nodes = require('./nodes');\nconst {TemplateError} = require('./lib');\nconst {Frame} = require('./runtime');\nconst {Obj} = require('./object');\n\n// These are all the same for now, but shouldn't be passed straight\n// through\nconst compareOps = {\n '==': '==',\n '===': '===',\n '!=': '!=',\n '!==': '!==',\n '<': '<',\n '>': '>',\n '<=': '<=',\n '>=': '>='\n};\n\nclass Compiler extends Obj {\n init(templateName, throwOnUndefined) {\n this.templateName = templateName;\n this.codebuf = [];\n this.lastId = 0;\n this.buffer = null;\n this.bufferStack = [];\n this._scopeClosers = '';\n this.inBlock = false;\n this.throwOnUndefined = throwOnUndefined;\n }\n\n fail(msg, lineno, colno) {\n if (lineno !== undefined) {\n lineno += 1;\n }\n if (colno !== undefined) {\n colno += 1;\n }\n\n throw new TemplateError(msg, lineno, colno);\n }\n\n _pushBuffer() {\n const id = this._tmpid();\n this.bufferStack.push(this.buffer);\n this.buffer = id;\n this._emit(`var ${this.buffer} = \"\";`);\n return id;\n }\n\n _popBuffer() {\n this.buffer = this.bufferStack.pop();\n }\n\n _emit(code) {\n this.codebuf.push(code);\n }\n\n _emitLine(code) {\n this._emit(code + '\\n');\n }\n\n _emitLines(...lines) {\n lines.forEach((line) => this._emitLine(line));\n }\n\n _emitFuncBegin(node, name) {\n this.buffer = 'output';\n this._scopeClosers = '';\n this._emitLine(`function ${name}(env, context, frame, runtime, cb) {`);\n this._emitLine(`var lineno = ${node.lineno};`);\n this._emitLine(`var colno = ${node.colno};`);\n this._emitLine(`var ${this.buffer} = \"\";`);\n this._emitLine('try {');\n }\n\n _emitFuncEnd(noReturn) {\n if (!noReturn) {\n this._emitLine('cb(null, ' + this.buffer + ');');\n }\n\n this._closeScopeLevels();\n this._emitLine('} catch (e) {');\n this._emitLine(' cb(runtime.handleError(e, lineno, colno));');\n this._emitLine('}');\n this._emitLine('}');\n this.buffer = null;\n }\n\n _addScopeLevel() {\n this._scopeClosers += '})';\n }\n\n _closeScopeLevels() {\n this._emitLine(this._scopeClosers + ';');\n this._scopeClosers = '';\n }\n\n _withScopedSyntax(func) {\n var _scopeClosers = this._scopeClosers;\n this._scopeClosers = '';\n\n func.call(this);\n\n this._closeScopeLevels();\n this._scopeClosers = _scopeClosers;\n }\n\n _makeCallback(res) {\n var err = this._tmpid();\n\n return 'function(' + err + (res ? ',' + res : '') + ') {\\n' +\n 'if(' + err + ') { cb(' + err + '); return; }';\n }\n\n _tmpid() {\n this.lastId++;\n return 't_' + this.lastId;\n }\n\n _templateName() {\n return this.templateName == null ? 'undefined' : JSON.stringify(this.templateName);\n }\n\n _compileChildren(node, frame) {\n node.children.forEach((child) => {\n this.compile(child, frame);\n });\n }\n\n _compileAggregate(node, frame, startChar, endChar) {\n if (startChar) {\n this._emit(startChar);\n }\n\n node.children.forEach((child, i) => {\n if (i > 0) {\n this._emit(',');\n }\n\n this.compile(child, frame);\n });\n\n if (endChar) {\n this._emit(endChar);\n }\n }\n\n _compileExpression(node, frame) {\n // TODO: I'm not really sure if this type check is worth it or\n // not.\n this.assertType(\n node,\n nodes.Literal,\n nodes.Symbol,\n nodes.Group,\n nodes.Array,\n nodes.Dict,\n nodes.FunCall,\n nodes.Caller,\n nodes.Filter,\n nodes.LookupVal,\n nodes.Compare,\n nodes.InlineIf,\n nodes.In,\n nodes.Is,\n nodes.And,\n nodes.Or,\n nodes.Not,\n nodes.Add,\n nodes.Concat,\n nodes.Sub,\n nodes.Mul,\n nodes.Div,\n nodes.FloorDiv,\n nodes.Mod,\n nodes.Pow,\n nodes.Neg,\n nodes.Pos,\n nodes.Compare,\n nodes.NodeList\n );\n this.compile(node, frame);\n }\n\n assertType(node, ...types) {\n if (!types.some(t => node instanceof t)) {\n this.fail(`assertType: invalid type: ${node.typename}`, node.lineno, node.colno);\n }\n }\n\n compileCallExtension(node, frame, async) {\n var args = node.args;\n var contentArgs = node.contentArgs;\n var autoescape = typeof node.autoescape === 'boolean' ? node.autoescape : true;\n\n if (!async) {\n this._emit(`${this.buffer} += runtime.suppressValue(`);\n }\n\n this._emit(`env.getExtension(\"${node.extName}\")[\"${node.prop}\"](`);\n this._emit('context');\n\n if (args || contentArgs) {\n this._emit(',');\n }\n\n if (args) {\n if (!(args instanceof nodes.NodeList)) {\n this.fail('compileCallExtension: arguments must be a NodeList, ' +\n 'use `parser.parseSignature`');\n }\n\n args.children.forEach((arg, i) => {\n // Tag arguments are passed normally to the call. Note\n // that keyword arguments are turned into a single js\n // object as the last argument, if they exist.\n this._compileExpression(arg, frame);\n\n if (i !== args.children.length - 1 || contentArgs.length) {\n this._emit(',');\n }\n });\n }\n\n if (contentArgs.length) {\n contentArgs.forEach((arg, i) => {\n if (i > 0) {\n this._emit(',');\n }\n\n if (arg) {\n this._emitLine('function(cb) {');\n this._emitLine('if(!cb) { cb = function(err) { if(err) { throw err; }}}');\n const id = this._pushBuffer();\n\n this._withScopedSyntax(() => {\n this.compile(arg, frame);\n this._emitLine(`cb(null, ${id});`);\n });\n\n this._popBuffer();\n this._emitLine(`return ${id};`);\n this._emitLine('}');\n } else {\n this._emit('null');\n }\n });\n }\n\n if (async) {\n const res = this._tmpid();\n this._emitLine(', ' + this._makeCallback(res));\n this._emitLine(\n `${this.buffer} += runtime.suppressValue(${res}, ${autoescape} && env.opts.autoescape);`);\n this._addScopeLevel();\n } else {\n this._emit(')');\n this._emit(`, ${autoescape} && env.opts.autoescape);\\n`);\n }\n }\n\n compileCallExtensionAsync(node, frame) {\n this.compileCallExtension(node, frame, true);\n }\n\n compileNodeList(node, frame) {\n this._compileChildren(node, frame);\n }\n\n compileLiteral(node) {\n if (typeof node.value === 'string') {\n let val = node.value.replace(/\\\\/g, '\\\\\\\\');\n val = val.replace(/\"/g, '\\\\\"');\n val = val.replace(/\\n/g, '\\\\n');\n val = val.replace(/\\r/g, '\\\\r');\n val = val.replace(/\\t/g, '\\\\t');\n val = val.replace(/\\u2028/g, '\\\\u2028');\n this._emit(`\"${val}\"`);\n } else if (node.value === null) {\n this._emit('null');\n } else {\n this._emit(node.value.toString());\n }\n }\n\n compileSymbol(node, frame) {\n var name = node.value;\n var v = frame.lookup(name);\n\n if (v) {\n this._emit(v);\n } else {\n this._emit('runtime.contextOrFrameLookup(' +\n 'context, frame, \"' + name + '\")');\n }\n }\n\n compileGroup(node, frame) {\n this._compileAggregate(node, frame, '(', ')');\n }\n\n compileArray(node, frame) {\n this._compileAggregate(node, frame, '[', ']');\n }\n\n compileDict(node, frame) {\n this._compileAggregate(node, frame, '{', '}');\n }\n\n compilePair(node, frame) {\n var key = node.key;\n var val = node.value;\n\n if (key instanceof nodes.Symbol) {\n key = new nodes.Literal(key.lineno, key.colno, key.value);\n } else if (!(key instanceof nodes.Literal &&\n typeof key.value === 'string')) {\n this.fail('compilePair: Dict keys must be strings or names',\n key.lineno,\n key.colno);\n }\n\n this.compile(key, frame);\n this._emit(': ');\n this._compileExpression(val, frame);\n }\n\n compileInlineIf(node, frame) {\n this._emit('(');\n this.compile(node.cond, frame);\n this._emit('?');\n this.compile(node.body, frame);\n this._emit(':');\n if (node.else_ !== null) {\n this.compile(node.else_, frame);\n } else {\n this._emit('\"\"');\n }\n this._emit(')');\n }\n\n compileIn(node, frame) {\n this._emit('runtime.inOperator(');\n this.compile(node.left, frame);\n this._emit(',');\n this.compile(node.right, frame);\n this._emit(')');\n }\n\n compileIs(node, frame) {\n // first, we need to try to get the name of the test function, if it's a\n // callable (i.e., has args) and not a symbol.\n var right = node.right.name\n ? node.right.name.value\n // otherwise go with the symbol value\n : node.right.value;\n this._emit('env.getTest(\"' + right + '\").call(context, ');\n this.compile(node.left, frame);\n // compile the arguments for the callable if they exist\n if (node.right.args) {\n this._emit(',');\n this.compile(node.right.args, frame);\n }\n this._emit(') === true');\n }\n\n _binOpEmitter(node, frame, str) {\n this.compile(node.left, frame);\n this._emit(str);\n this.compile(node.right, frame);\n }\n\n // ensure concatenation instead of addition\n // by adding empty string in between\n compileOr(node, frame) {\n return this._binOpEmitter(node, frame, ' || ');\n }\n\n compileAnd(node, frame) {\n return this._binOpEmitter(node, frame, ' && ');\n }\n\n compileAdd(node, frame) {\n return this._binOpEmitter(node, frame, ' + ');\n }\n\n compileConcat(node, frame) {\n return this._binOpEmitter(node, frame, ' + \"\" + ');\n }\n\n compileSub(node, frame) {\n return this._binOpEmitter(node, frame, ' - ');\n }\n\n compileMul(node, frame) {\n return this._binOpEmitter(node, frame, ' * ');\n }\n\n compileDiv(node, frame) {\n return this._binOpEmitter(node, frame, ' / ');\n }\n\n compileMod(node, frame) {\n return this._binOpEmitter(node, frame, ' % ');\n }\n\n compileNot(node, frame) {\n this._emit('!');\n this.compile(node.target, frame);\n }\n\n compileFloorDiv(node, frame) {\n this._emit('Math.floor(');\n this.compile(node.left, frame);\n this._emit(' / ');\n this.compile(node.right, frame);\n this._emit(')');\n }\n\n compilePow(node, frame) {\n this._emit('Math.pow(');\n this.compile(node.left, frame);\n this._emit(', ');\n this.compile(node.right, frame);\n this._emit(')');\n }\n\n compileNeg(node, frame) {\n this._emit('-');\n this.compile(node.target, frame);\n }\n\n compilePos(node, frame) {\n this._emit('+');\n this.compile(node.target, frame);\n }\n\n compileCompare(node, frame) {\n this.compile(node.expr, frame);\n\n node.ops.forEach((op) => {\n this._emit(` ${compareOps[op.type]} `);\n this.compile(op.expr, frame);\n });\n }\n\n compileLookupVal(node, frame) {\n this._emit('runtime.memberLookup((');\n this._compileExpression(node.target, frame);\n this._emit('),');\n this._compileExpression(node.val, frame);\n this._emit(')');\n }\n\n _getNodeName(node) {\n switch (node.typename) {\n case 'Symbol':\n return node.value;\n case 'FunCall':\n return 'the return value of (' + this._getNodeName(node.name) + ')';\n case 'LookupVal':\n return this._getNodeName(node.target) + '[\"' +\n this._getNodeName(node.val) + '\"]';\n case 'Literal':\n return node.value.toString();\n default:\n return '--expression--';\n }\n }\n\n compileFunCall(node, frame) {\n // Keep track of line/col info at runtime by settings\n // variables within an expression. An expression in javascript\n // like (x, y, z) returns the last value, and x and y can be\n // anything\n this._emit('(lineno = ' + node.lineno +\n ', colno = ' + node.colno + ', ');\n\n this._emit('runtime.callWrap(');\n // Compile it as normal.\n this._compileExpression(node.name, frame);\n\n // Output the name of what we're calling so we can get friendly errors\n // if the lookup fails.\n this._emit(', \"' + this._getNodeName(node.name).replace(/\"/g, '\\\\\"') + '\", context, ');\n\n this._compileAggregate(node.args, frame, '[', '])');\n\n this._emit(')');\n }\n\n compileFilter(node, frame) {\n var name = node.name;\n this.assertType(name, nodes.Symbol);\n this._emit('env.getFilter(\"' + name.value + '\").call(context, ');\n this._compileAggregate(node.args, frame);\n this._emit(')');\n }\n\n compileFilterAsync(node, frame) {\n var name = node.name;\n var symbol = node.symbol.value;\n\n this.assertType(name, nodes.Symbol);\n\n frame.set(symbol, symbol);\n\n this._emit('env.getFilter(\"' + name.value + '\").call(context, ');\n this._compileAggregate(node.args, frame);\n this._emitLine(', ' + this._makeCallback(symbol));\n\n this._addScopeLevel();\n }\n\n compileKeywordArgs(node, frame) {\n this._emit('runtime.makeKeywordArgs(');\n this.compileDict(node, frame);\n this._emit(')');\n }\n\n compileSet(node, frame) {\n var ids = [];\n\n // Lookup the variable names for each identifier and create\n // new ones if necessary\n node.targets.forEach((target) => {\n var name = target.value;\n var id = frame.lookup(name);\n\n if (id === null || id === undefined) {\n id = this._tmpid();\n\n // Note: This relies on js allowing scope across\n // blocks, in case this is created inside an `if`\n this._emitLine('var ' + id + ';');\n }\n\n ids.push(id);\n });\n\n if (node.value) {\n this._emit(ids.join(' = ') + ' = ');\n this._compileExpression(node.value, frame);\n this._emitLine(';');\n } else {\n this._emit(ids.join(' = ') + ' = ');\n this.compile(node.body, frame);\n this._emitLine(';');\n }\n\n node.targets.forEach((target, i) => {\n var id = ids[i];\n var name = target.value;\n\n // We are running this for every var, but it's very\n // uncommon to assign to multiple vars anyway\n this._emitLine(`frame.set(\"${name}\", ${id}, true);`);\n\n this._emitLine('if(frame.topLevel) {');\n this._emitLine(`context.setVariable(\"${name}\", ${id});`);\n this._emitLine('}');\n\n if (name.charAt(0) !== '_') {\n this._emitLine('if(frame.topLevel) {');\n this._emitLine(`context.addExport(\"${name}\", ${id});`);\n this._emitLine('}');\n }\n });\n }\n\n compileSwitch(node, frame) {\n this._emit('switch (');\n this.compile(node.expr, frame);\n this._emit(') {');\n node.cases.forEach((c, i) => {\n this._emit('case ');\n this.compile(c.cond, frame);\n this._emit(': ');\n this.compile(c.body, frame);\n // preserve fall-throughs\n if (c.body.children.length) {\n this._emitLine('break;');\n }\n });\n if (node.default) {\n this._emit('default:');\n this.compile(node.default, frame);\n }\n this._emit('}');\n }\n\n compileIf(node, frame, async) {\n this._emit('if(');\n this._compileExpression(node.cond, frame);\n this._emitLine(') {');\n\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n\n if (async) {\n this._emit('cb()');\n }\n });\n\n if (node.else_) {\n this._emitLine('}\\nelse {');\n\n this._withScopedSyntax(() => {\n this.compile(node.else_, frame);\n\n if (async) {\n this._emit('cb()');\n }\n });\n } else if (async) {\n this._emitLine('}\\nelse {');\n this._emit('cb()');\n }\n\n this._emitLine('}');\n }\n\n compileIfAsync(node, frame) {\n this._emit('(function(cb) {');\n this.compileIf(node, frame, true);\n this._emit('})(' + this._makeCallback());\n this._addScopeLevel();\n }\n\n _emitLoopBindings(node, arr, i, len) {\n const bindings = [\n {name: 'index', val: `${i} + 1`},\n {name: 'index0', val: i},\n {name: 'revindex', val: `${len} - ${i}`},\n {name: 'revindex0', val: `${len} - ${i} - 1`},\n {name: 'first', val: `${i} === 0`},\n {name: 'last', val: `${i} === ${len} - 1`},\n {name: 'length', val: len},\n ];\n\n bindings.forEach((b) => {\n this._emitLine(`frame.set(\"loop.${b.name}\", ${b.val});`);\n });\n }\n\n compileFor(node, frame) {\n // Some of this code is ugly, but it keeps the generated code\n // as fast as possible. ForAsync also shares some of this, but\n // not much.\n\n const i = this._tmpid();\n const len = this._tmpid();\n const arr = this._tmpid();\n frame = frame.push();\n\n this._emitLine('frame = frame.push();');\n\n this._emit(`var ${arr} = `);\n this._compileExpression(node.arr, frame);\n this._emitLine(';');\n\n this._emit(`if(${arr}) {`);\n this._emitLine(arr + ' = runtime.fromIterator(' + arr + ');');\n\n // If multiple names are passed, we need to bind them\n // appropriately\n if (node.name instanceof nodes.Array) {\n this._emitLine(`var ${i};`);\n\n // The object could be an arroy or object. Note that the\n // body of the loop is duplicated for each condition, but\n // we are optimizing for speed over size.\n this._emitLine(`if(runtime.isArray(${arr})) {`);\n this._emitLine(`var ${len} = ${arr}.length;`);\n this._emitLine(`for(${i}=0; ${i} < ${arr}.length; ${i}++) {`);\n\n // Bind each declared var\n node.name.children.forEach((child, u) => {\n var tid = this._tmpid();\n this._emitLine(`var ${tid} = ${arr}[${i}][${u}];`);\n this._emitLine(`frame.set(\"${child}\", ${arr}[${i}][${u}]);`);\n frame.set(node.name.children[u].value, tid);\n });\n\n this._emitLoopBindings(node, arr, i, len);\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n this._emitLine('}');\n\n this._emitLine('} else {');\n // Iterate over the key/values of an object\n const [key, val] = node.name.children;\n const k = this._tmpid();\n const v = this._tmpid();\n frame.set(key.value, k);\n frame.set(val.value, v);\n\n this._emitLine(`${i} = -1;`);\n this._emitLine(`var ${len} = runtime.keys(${arr}).length;`);\n this._emitLine(`for(var ${k} in ${arr}) {`);\n this._emitLine(`${i}++;`);\n this._emitLine(`var ${v} = ${arr}[${k}];`);\n this._emitLine(`frame.set(\"${key.value}\", ${k});`);\n this._emitLine(`frame.set(\"${val.value}\", ${v});`);\n\n this._emitLoopBindings(node, arr, i, len);\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n this._emitLine('}');\n\n this._emitLine('}');\n } else {\n // Generate a typical array iteration\n const v = this._tmpid();\n frame.set(node.name.value, v);\n\n this._emitLine(`var ${len} = ${arr}.length;`);\n this._emitLine(`for(var ${i}=0; ${i} < ${arr}.length; ${i}++) {`);\n this._emitLine(`var ${v} = ${arr}[${i}];`);\n this._emitLine(`frame.set(\"${node.name.value}\", ${v});`);\n\n this._emitLoopBindings(node, arr, i, len);\n\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n\n this._emitLine('}');\n }\n\n this._emitLine('}');\n if (node.else_) {\n this._emitLine('if (!' + len + ') {');\n this.compile(node.else_, frame);\n this._emitLine('}');\n }\n\n this._emitLine('frame = frame.pop();');\n }\n\n _compileAsyncLoop(node, frame, parallel) {\n // This shares some code with the For tag, but not enough to\n // worry about. This iterates across an object asynchronously,\n // but not in parallel.\n\n var i = this._tmpid();\n var len = this._tmpid();\n var arr = this._tmpid();\n var asyncMethod = parallel ? 'asyncAll' : 'asyncEach';\n frame = frame.push();\n\n this._emitLine('frame = frame.push();');\n\n this._emit('var ' + arr + ' = runtime.fromIterator(');\n this._compileExpression(node.arr, frame);\n this._emitLine(');');\n\n if (node.name instanceof nodes.Array) {\n const arrayLen = node.name.children.length;\n this._emit(`runtime.${asyncMethod}(${arr}, ${arrayLen}, function(`);\n\n node.name.children.forEach((name) => {\n this._emit(`${name.value},`);\n });\n\n this._emit(i + ',' + len + ',next) {');\n\n node.name.children.forEach((name) => {\n const id = name.value;\n frame.set(id, id);\n this._emitLine(`frame.set(\"${id}\", ${id});`);\n });\n } else {\n const id = node.name.value;\n this._emitLine(`runtime.${asyncMethod}(${arr}, 1, function(${id}, ${i}, ${len},next) {`);\n this._emitLine('frame.set(\"' + id + '\", ' + id + ');');\n frame.set(id, id);\n }\n\n this._emitLoopBindings(node, arr, i, len);\n\n this._withScopedSyntax(() => {\n let buf;\n if (parallel) {\n buf = this._pushBuffer();\n }\n\n this.compile(node.body, frame);\n this._emitLine('next(' + i + (buf ? ',' + buf : '') + ');');\n\n if (parallel) {\n this._popBuffer();\n }\n });\n\n const output = this._tmpid();\n this._emitLine('}, ' + this._makeCallback(output));\n this._addScopeLevel();\n\n if (parallel) {\n this._emitLine(this.buffer + ' += ' + output + ';');\n }\n\n if (node.else_) {\n this._emitLine('if (!' + arr + '.length) {');\n this.compile(node.else_, frame);\n this._emitLine('}');\n }\n\n this._emitLine('frame = frame.pop();');\n }\n\n compileAsyncEach(node, frame) {\n this._compileAsyncLoop(node, frame);\n }\n\n compileAsyncAll(node, frame) {\n this._compileAsyncLoop(node, frame, true);\n }\n\n _compileMacro(node, frame) {\n var args = [];\n var kwargs = null;\n var funcId = 'macro_' + this._tmpid();\n var keepFrame = (frame !== undefined);\n\n // Type check the definition of the args\n node.args.children.forEach((arg, i) => {\n if (i === node.args.children.length - 1 && arg instanceof nodes.Dict) {\n kwargs = arg;\n } else {\n this.assertType(arg, nodes.Symbol);\n args.push(arg);\n }\n });\n\n const realNames = [...args.map((n) => `l_${n.value}`), 'kwargs'];\n\n // Quoted argument names\n const argNames = args.map((n) => `\"${n.value}\"`);\n const kwargNames = ((kwargs && kwargs.children) || []).map((n) => `\"${n.key.value}\"`);\n\n // We pass a function to makeMacro which destructures the\n // arguments so support setting positional args with keywords\n // args and passing keyword args as positional args\n // (essentially default values). See runtime.js.\n let currFrame;\n if (keepFrame) {\n currFrame = frame.push(true);\n } else {\n currFrame = new Frame();\n }\n this._emitLines(\n `var ${funcId} = runtime.makeMacro(`,\n `[${argNames.join(', ')}], `,\n `[${kwargNames.join(', ')}], `,\n `function (${realNames.join(', ')}) {`,\n 'var callerFrame = frame;',\n 'frame = ' + ((keepFrame) ? 'frame.push(true);' : 'new runtime.Frame();'),\n 'kwargs = kwargs || {};',\n 'if (Object.prototype.hasOwnProperty.call(kwargs, \"caller\")) {',\n 'frame.set(\"caller\", kwargs.caller); }');\n\n // Expose the arguments to the template. Don't need to use\n // random names because the function\n // will create a new run-time scope for us\n args.forEach((arg) => {\n this._emitLine(`frame.set(\"${arg.value}\", l_${arg.value});`);\n currFrame.set(arg.value, `l_${arg.value}`);\n });\n\n // Expose the keyword arguments\n if (kwargs) {\n kwargs.children.forEach((pair) => {\n const name = pair.key.value;\n this._emit(`frame.set(\"${name}\", `);\n this._emit(`Object.prototype.hasOwnProperty.call(kwargs, \"${name}\")`);\n this._emit(` ? kwargs[\"${name}\"] : `);\n this._compileExpression(pair.value, currFrame);\n this._emit(');');\n });\n }\n\n const bufferId = this._pushBuffer();\n\n this._withScopedSyntax(() => {\n this.compile(node.body, currFrame);\n });\n\n this._emitLine('frame = ' + ((keepFrame) ? 'frame.pop();' : 'callerFrame;'));\n this._emitLine(`return new runtime.SafeString(${bufferId});`);\n this._emitLine('});');\n this._popBuffer();\n\n return funcId;\n }\n\n compileMacro(node, frame) {\n var funcId = this._compileMacro(node);\n\n // Expose the macro to the templates\n var name = node.name.value;\n frame.set(name, funcId);\n\n if (frame.parent) {\n this._emitLine(`frame.set(\"${name}\", ${funcId});`);\n } else {\n if (node.name.value.charAt(0) !== '_') {\n this._emitLine(`context.addExport(\"${name}\");`);\n }\n this._emitLine(`context.setVariable(\"${name}\", ${funcId});`);\n }\n }\n\n compileCaller(node, frame) {\n // basically an anonymous \"macro expression\"\n this._emit('(function (){');\n const funcId = this._compileMacro(node, frame);\n this._emit(`return ${funcId};})()`);\n }\n\n _compileGetTemplate(node, frame, eagerCompile, ignoreMissing) {\n const parentTemplateId = this._tmpid();\n const parentName = this._templateName();\n const cb = this._makeCallback(parentTemplateId);\n const eagerCompileArg = (eagerCompile) ? 'true' : 'false';\n const ignoreMissingArg = (ignoreMissing) ? 'true' : 'false';\n this._emit('env.getTemplate(');\n this._compileExpression(node.template, frame);\n this._emitLine(`, ${eagerCompileArg}, ${parentName}, ${ignoreMissingArg}, ${cb}`);\n return parentTemplateId;\n }\n\n compileImport(node, frame) {\n const target = node.target.value;\n const id = this._compileGetTemplate(node, frame, false, false);\n this._addScopeLevel();\n\n this._emitLine(id + '.getExported(' +\n (node.withContext ? 'context.getVariables(), frame, ' : '') +\n this._makeCallback(id));\n this._addScopeLevel();\n\n frame.set(target, id);\n\n if (frame.parent) {\n this._emitLine(`frame.set(\"${target}\", ${id});`);\n } else {\n this._emitLine(`context.setVariable(\"${target}\", ${id});`);\n }\n }\n\n compileFromImport(node, frame) {\n const importedId = this._compileGetTemplate(node, frame, false, false);\n this._addScopeLevel();\n\n this._emitLine(importedId + '.getExported(' +\n (node.withContext ? 'context.getVariables(), frame, ' : '') +\n this._makeCallback(importedId));\n this._addScopeLevel();\n\n node.names.children.forEach((nameNode) => {\n var name;\n var alias;\n var id = this._tmpid();\n\n if (nameNode instanceof nodes.Pair) {\n name = nameNode.key.value;\n alias = nameNode.value.value;\n } else {\n name = nameNode.value;\n alias = name;\n }\n\n this._emitLine(`if(Object.prototype.hasOwnProperty.call(${importedId}, \"${name}\")) {`);\n this._emitLine(`var ${id} = ${importedId}.${name};`);\n this._emitLine('} else {');\n this._emitLine(`cb(new Error(\"cannot import '${name}'\")); return;`);\n this._emitLine('}');\n\n frame.set(alias, id);\n\n if (frame.parent) {\n this._emitLine(`frame.set(\"${alias}\", ${id});`);\n } else {\n this._emitLine(`context.setVariable(\"${alias}\", ${id});`);\n }\n });\n }\n\n compileBlock(node) {\n var id = this._tmpid();\n\n // If we are executing outside a block (creating a top-level\n // block), we really don't want to execute its code because it\n // will execute twice: once when the child template runs and\n // again when the parent template runs. Note that blocks\n // within blocks will *always* execute immediately *and*\n // wherever else they are invoked (like used in a parent\n // template). This may have behavioral differences from jinja\n // because blocks can have side effects, but it seems like a\n // waste of performance to always execute huge top-level\n // blocks twice\n if (!this.inBlock) {\n this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(\"\"); } : ');\n }\n this._emit(`context.getBlock(\"${node.name.value}\")`);\n if (!this.inBlock) {\n this._emit(')');\n }\n this._emitLine('(env, context, frame, runtime, ' + this._makeCallback(id));\n this._emitLine(`${this.buffer} += ${id};`);\n this._addScopeLevel();\n }\n\n compileSuper(node, frame) {\n var name = node.blockName.value;\n var id = node.symbol.value;\n\n const cb = this._makeCallback(id);\n this._emitLine(`context.getSuper(env, \"${name}\", b_${name}, frame, runtime, ${cb}`);\n this._emitLine(`${id} = runtime.markSafe(${id});`);\n this._addScopeLevel();\n frame.set(id, id);\n }\n\n compileExtends(node, frame) {\n var k = this._tmpid();\n\n const parentTemplateId = this._compileGetTemplate(node, frame, true, false);\n\n // extends is a dynamic tag and can occur within a block like\n // `if`, so if this happens we need to capture the parent\n // template in the top-level scope\n this._emitLine(`parentTemplate = ${parentTemplateId}`);\n\n this._emitLine(`for(var ${k} in parentTemplate.blocks) {`);\n this._emitLine(`context.addBlock(${k}, parentTemplate.blocks[${k}]);`);\n this._emitLine('}');\n\n this._addScopeLevel();\n }\n\n compileInclude(node, frame) {\n this._emitLine('var tasks = [];');\n this._emitLine('tasks.push(');\n this._emitLine('function(callback) {');\n const id = this._compileGetTemplate(node, frame, false, node.ignoreMissing);\n this._emitLine(`callback(null,${id});});`);\n this._emitLine('});');\n\n const id2 = this._tmpid();\n this._emitLine('tasks.push(');\n this._emitLine('function(template, callback){');\n this._emitLine('template.render(context.getVariables(), frame, ' + this._makeCallback(id2));\n this._emitLine('callback(null,' + id2 + ');});');\n this._emitLine('});');\n\n this._emitLine('tasks.push(');\n this._emitLine('function(result, callback){');\n this._emitLine(`${this.buffer} += result;`);\n this._emitLine('callback(null);');\n this._emitLine('});');\n this._emitLine('env.waterfall(tasks, function(){');\n this._addScopeLevel();\n }\n\n compileTemplateData(node, frame) {\n this.compileLiteral(node, frame);\n }\n\n compileCapture(node, frame) {\n // we need to temporarily override the current buffer id as 'output'\n // so the set block writes to the capture output instead of the buffer\n var buffer = this.buffer;\n this.buffer = 'output';\n this._emitLine('(function() {');\n this._emitLine('var output = \"\";');\n this._withScopedSyntax(() => {\n this.compile(node.body, frame);\n });\n this._emitLine('return output;');\n this._emitLine('})()');\n // and of course, revert back to the old buffer id\n this.buffer = buffer;\n }\n\n compileOutput(node, frame) {\n const children = node.children;\n children.forEach(child => {\n // TemplateData is a special case because it is never\n // autoescaped, so simply output it for optimization\n if (child instanceof nodes.TemplateData) {\n if (child.value) {\n this._emit(`${this.buffer} += `);\n this.compileLiteral(child, frame);\n this._emitLine(';');\n }\n } else {\n this._emit(`${this.buffer} += runtime.suppressValue(`);\n if (this.throwOnUndefined) {\n this._emit('runtime.ensureDefined(');\n }\n this.compile(child, frame);\n if (this.throwOnUndefined) {\n this._emit(`,${node.lineno},${node.colno})`);\n }\n this._emit(', env.opts.autoescape);\\n');\n }\n });\n }\n\n compileRoot(node, frame) {\n if (frame) {\n this.fail('compileRoot: root node can\\'t have frame');\n }\n\n frame = new Frame();\n\n this._emitFuncBegin(node, 'root');\n this._emitLine('var parentTemplate = null;');\n this._compileChildren(node, frame);\n this._emitLine('if(parentTemplate) {');\n this._emitLine('parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);');\n this._emitLine('} else {');\n this._emitLine(`cb(null, ${this.buffer});`);\n this._emitLine('}');\n this._emitFuncEnd(true);\n\n this.inBlock = true;\n\n const blockNames = [];\n\n const blocks = node.findAll(nodes.Block);\n\n blocks.forEach((block, i) => {\n const name = block.name.value;\n\n if (blockNames.indexOf(name) !== -1) {\n throw new Error(`Block \"${name}\" defined more than once.`);\n }\n blockNames.push(name);\n\n this._emitFuncBegin(block, `b_${name}`);\n\n const tmpFrame = new Frame();\n this._emitLine('var frame = frame.push(true);');\n this.compile(block.body, tmpFrame);\n this._emitFuncEnd();\n });\n\n this._emitLine('return {');\n\n blocks.forEach((block, i) => {\n const blockName = `b_${block.name.value}`;\n this._emitLine(`${blockName}: ${blockName},`);\n });\n\n this._emitLine('root: root\\n};');\n }\n\n compile(node, frame) {\n var _compile = this['compile' + node.typename];\n if (_compile) {\n _compile.call(this, node, frame);\n } else {\n this.fail(`compile: Cannot compile node: ${node.typename}`, node.lineno, node.colno);\n }\n }\n\n getCode() {\n return this.codebuf.join('');\n }\n}\n\nmodule.exports = {\n compile: function compile(src, asyncFilters, extensions, name, opts = {}) {\n const c = new Compiler(name, opts.throwOnUndefined);\n\n // Run the extension preprocessors against the source.\n const preprocessors = (extensions || []).map(ext => ext.preprocess).filter(f => !!f);\n\n const processedSrc = preprocessors.reduce((s, processor) => processor(s), src);\n\n c.compile(transformer.transform(\n parser.parse(processedSrc, extensions, opts),\n asyncFilters,\n name\n ));\n return c.getCode();\n },\n\n Compiler: Compiler\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/compiler.js","'use strict';\n\nconst path = require('path');\nconst {EmitterObj} = require('./object');\n\nmodule.exports = class Loader extends EmitterObj {\n resolve(from, to) {\n return path.resolve(path.dirname(from), to);\n }\n\n isRelative(filename) {\n return (filename.indexOf('./') === 0 || filename.indexOf('../') === 0);\n }\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/loader.js","'use strict';\n\nconst asap = require('asap');\nconst waterfall = require('a-sync-waterfall');\nconst lib = require('./lib');\nconst compiler = require('./compiler');\nconst filters = require('./filters');\nconst {FileSystemLoader, WebLoader, PrecompiledLoader} = require('./loaders');\nconst tests = require('./tests');\nconst globals = require('./globals');\nconst {Obj, EmitterObj} = require('./object');\nconst globalRuntime = require('./runtime');\nconst {handleError, Frame} = globalRuntime;\nconst expressApp = require('./express-app');\n\n// If the user is using the async API, *always* call it\n// asynchronously even if the template was synchronous.\nfunction callbackAsap(cb, err, res) {\n asap(() => {\n cb(err, res);\n });\n}\n\n/**\n * A no-op template, for use with {% include ignore missing %}\n */\nconst noopTmplSrc = {\n type: 'code',\n obj: {\n root(env, context, frame, runtime, cb) {\n try {\n cb(null, '');\n } catch (e) {\n cb(handleError(e, null, null));\n }\n }\n }\n};\n\nclass Environment extends EmitterObj {\n init(loaders, opts) {\n // The dev flag determines the trace that'll be shown on errors.\n // If set to true, returns the full trace from the error point,\n // otherwise will return trace starting from Template.render\n // (the full trace from within nunjucks may confuse developers using\n // the library)\n // defaults to false\n opts = this.opts = opts || {};\n this.opts.dev = !!opts.dev;\n\n // The autoescape flag sets global autoescaping. If true,\n // every string variable will be escaped by default.\n // If false, strings can be manually escaped using the `escape` filter.\n // defaults to true\n this.opts.autoescape = opts.autoescape != null ? opts.autoescape : true;\n\n // If true, this will make the system throw errors if trying\n // to output a null or undefined value\n this.opts.throwOnUndefined = !!opts.throwOnUndefined;\n this.opts.trimBlocks = !!opts.trimBlocks;\n this.opts.lstripBlocks = !!opts.lstripBlocks;\n\n this.loaders = [];\n\n if (!loaders) {\n // The filesystem loader is only available server-side\n if (FileSystemLoader) {\n this.loaders = [new FileSystemLoader('views')];\n } else if (WebLoader) {\n this.loaders = [new WebLoader('/views')];\n }\n } else {\n this.loaders = lib.isArray(loaders) ? loaders : [loaders];\n }\n\n // It's easy to use precompiled templates: just include them\n // before you configure nunjucks and this will automatically\n // pick it up and use it\n if (typeof window !== 'undefined' && window.nunjucksPrecompiled) {\n this.loaders.unshift(\n new PrecompiledLoader(window.nunjucksPrecompiled)\n );\n }\n\n this._initLoaders();\n\n this.globals = globals();\n this.filters = {};\n this.tests = {};\n this.asyncFilters = [];\n this.extensions = {};\n this.extensionsList = [];\n\n lib._entries(filters).forEach(([name, filter]) => this.addFilter(name, filter));\n lib._entries(tests).forEach(([name, test]) => this.addTest(name, test));\n }\n\n _initLoaders() {\n this.loaders.forEach((loader) => {\n // Caching and cache busting\n loader.cache = {};\n if (typeof loader.on === 'function') {\n loader.on('update', (name, fullname) => {\n loader.cache[name] = null;\n this.emit('update', name, fullname, loader);\n });\n loader.on('load', (name, source) => {\n this.emit('load', name, source, loader);\n });\n }\n });\n }\n\n invalidateCache() {\n this.loaders.forEach((loader) => {\n loader.cache = {};\n });\n }\n\n addExtension(name, extension) {\n extension.__name = name;\n this.extensions[name] = extension;\n this.extensionsList.push(extension);\n return this;\n }\n\n removeExtension(name) {\n var extension = this.getExtension(name);\n if (!extension) {\n return;\n }\n\n this.extensionsList = lib.without(this.extensionsList, extension);\n delete this.extensions[name];\n }\n\n getExtension(name) {\n return this.extensions[name];\n }\n\n hasExtension(name) {\n return !!this.extensions[name];\n }\n\n addGlobal(name, value) {\n this.globals[name] = value;\n return this;\n }\n\n getGlobal(name) {\n if (typeof this.globals[name] === 'undefined') {\n throw new Error('global not found: ' + name);\n }\n return this.globals[name];\n }\n\n addFilter(name, func, async) {\n var wrapped = func;\n\n if (async) {\n this.asyncFilters.push(name);\n }\n this.filters[name] = wrapped;\n return this;\n }\n\n getFilter(name) {\n if (!this.filters[name]) {\n throw new Error('filter not found: ' + name);\n }\n return this.filters[name];\n }\n\n addTest(name, func) {\n this.tests[name] = func;\n return this;\n }\n\n getTest(name) {\n if (!this.tests[name]) {\n throw new Error('test not found: ' + name);\n }\n return this.tests[name];\n }\n\n resolveTemplate(loader, parentName, filename) {\n var isRelative = (loader.isRelative && parentName) ? loader.isRelative(filename) : false;\n return (isRelative && loader.resolve) ? loader.resolve(parentName, filename) : filename;\n }\n\n getTemplate(name, eagerCompile, parentName, ignoreMissing, cb) {\n var that = this;\n var tmpl = null;\n if (name && name.raw) {\n // this fixes autoescape for templates referenced in symbols\n name = name.raw;\n }\n\n if (lib.isFunction(parentName)) {\n cb = parentName;\n parentName = null;\n eagerCompile = eagerCompile || false;\n }\n\n if (lib.isFunction(eagerCompile)) {\n cb = eagerCompile;\n eagerCompile = false;\n }\n\n if (name instanceof Template) {\n tmpl = name;\n } else if (typeof name !== 'string') {\n throw new Error('template names must be a string: ' + name);\n } else {\n for (let i = 0; i < this.loaders.length; i++) {\n const loader = this.loaders[i];\n tmpl = loader.cache[this.resolveTemplate(loader, parentName, name)];\n if (tmpl) {\n break;\n }\n }\n }\n\n if (tmpl) {\n if (eagerCompile) {\n tmpl.compile();\n }\n\n if (cb) {\n cb(null, tmpl);\n return undefined;\n } else {\n return tmpl;\n }\n }\n let syncResult;\n\n const createTemplate = (err, info) => {\n if (!info && !err && !ignoreMissing) {\n err = new Error('template not found: ' + name);\n }\n\n if (err) {\n if (cb) {\n cb(err);\n return;\n } else {\n throw err;\n }\n }\n let newTmpl;\n if (!info) {\n newTmpl = new Template(noopTmplSrc, this, '', eagerCompile);\n } else {\n newTmpl = new Template(info.src, this, info.path, eagerCompile);\n if (!info.noCache) {\n info.loader.cache[name] = newTmpl;\n }\n }\n if (cb) {\n cb(null, newTmpl);\n } else {\n syncResult = newTmpl;\n }\n };\n\n lib.asyncIter(this.loaders, (loader, i, next, done) => {\n function handle(err, src) {\n if (err) {\n done(err);\n } else if (src) {\n src.loader = loader;\n done(null, src);\n } else {\n next();\n }\n }\n\n // Resolve name relative to parentName\n name = that.resolveTemplate(loader, parentName, name);\n\n if (loader.async) {\n loader.getSource(name, handle);\n } else {\n handle(null, loader.getSource(name));\n }\n }, createTemplate);\n\n return syncResult;\n }\n\n express(app) {\n return expressApp(this, app);\n }\n\n render(name, ctx, cb) {\n if (lib.isFunction(ctx)) {\n cb = ctx;\n ctx = null;\n }\n\n // We support a synchronous API to make it easier to migrate\n // existing code to async. This works because if you don't do\n // anything async work, the whole thing is actually run\n // synchronously.\n let syncResult = null;\n\n this.getTemplate(name, (err, tmpl) => {\n if (err && cb) {\n callbackAsap(cb, err);\n } else if (err) {\n throw err;\n } else {\n syncResult = tmpl.render(ctx, cb);\n }\n });\n\n return syncResult;\n }\n\n renderString(src, ctx, opts, cb) {\n if (lib.isFunction(opts)) {\n cb = opts;\n opts = {};\n }\n opts = opts || {};\n\n const tmpl = new Template(src, this, opts.path);\n return tmpl.render(ctx, cb);\n }\n\n waterfall(tasks, callback, forceAsync) {\n return waterfall(tasks, callback, forceAsync);\n }\n}\n\nclass Context extends Obj {\n init(ctx, blocks, env) {\n // Has to be tied to an environment so we can tap into its globals.\n this.env = env || new Environment();\n\n // Make a duplicate of ctx\n this.ctx = lib.extend({}, ctx);\n\n this.blocks = {};\n this.exported = [];\n\n lib.keys(blocks).forEach(name => {\n this.addBlock(name, blocks[name]);\n });\n }\n\n lookup(name) {\n // This is one of the most called functions, so optimize for\n // the typical case where the name isn't in the globals\n if (name in this.env.globals && !(name in this.ctx)) {\n return this.env.globals[name];\n } else {\n return this.ctx[name];\n }\n }\n\n setVariable(name, val) {\n this.ctx[name] = val;\n }\n\n getVariables() {\n return this.ctx;\n }\n\n addBlock(name, block) {\n this.blocks[name] = this.blocks[name] || [];\n this.blocks[name].push(block);\n return this;\n }\n\n getBlock(name) {\n if (!this.blocks[name]) {\n throw new Error('unknown block \"' + name + '\"');\n }\n\n return this.blocks[name][0];\n }\n\n getSuper(env, name, block, frame, runtime, cb) {\n var idx = lib.indexOf(this.blocks[name] || [], block);\n var blk = this.blocks[name][idx + 1];\n var context = this;\n\n if (idx === -1 || !blk) {\n throw new Error('no super block available for \"' + name + '\"');\n }\n\n blk(env, context, frame, runtime, cb);\n }\n\n addExport(name) {\n this.exported.push(name);\n }\n\n getExported() {\n var exported = {};\n this.exported.forEach((name) => {\n exported[name] = this.ctx[name];\n });\n return exported;\n }\n}\n\nclass Template extends Obj {\n init(src, env, path, eagerCompile) {\n this.env = env || new Environment();\n\n if (lib.isObject(src)) {\n switch (src.type) {\n case 'code':\n this.tmplProps = src.obj;\n break;\n case 'string':\n this.tmplStr = src.obj;\n break;\n default:\n throw new Error(\n `Unexpected template object type ${src.type}; expected 'code', or 'string'`);\n }\n } else if (lib.isString(src)) {\n this.tmplStr = src;\n } else {\n throw new Error('src must be a string or an object describing the source');\n }\n\n this.path = path;\n\n if (eagerCompile) {\n try {\n this._compile();\n } catch (err) {\n throw lib._prettifyError(this.path, this.env.opts.dev, err);\n }\n } else {\n this.compiled = false;\n }\n }\n\n render(ctx, parentFrame, cb) {\n if (typeof ctx === 'function') {\n cb = ctx;\n ctx = {};\n } else if (typeof parentFrame === 'function') {\n cb = parentFrame;\n parentFrame = null;\n }\n\n // If there is a parent frame, we are being called from internal\n // code of another template, and the internal system\n // depends on the sync/async nature of the parent template\n // to be inherited, so force an async callback\n const forceAsync = !parentFrame;\n\n // Catch compile errors for async rendering\n try {\n this.compile();\n } catch (e) {\n const err = lib._prettifyError(this.path, this.env.opts.dev, e);\n if (cb) {\n return callbackAsap(cb, err);\n } else {\n throw err;\n }\n }\n\n const context = new Context(ctx || {}, this.blocks, this.env);\n const frame = parentFrame ? parentFrame.push(true) : new Frame();\n frame.topLevel = true;\n let syncResult = null;\n let didError = false;\n\n this.rootRenderFunc(this.env, context, frame, globalRuntime, (err, res) => {\n // TODO: this is actually a bug in the compiled template (because waterfall\n // tasks are both not passing errors up the chain of callbacks AND are not\n // causing a return from the top-most render function). But fixing that\n // will require a more substantial change to the compiler.\n if (didError && cb && typeof res !== 'undefined') {\n // prevent multiple calls to cb\n return;\n }\n\n if (err) {\n err = lib._prettifyError(this.path, this.env.opts.dev, err);\n didError = true;\n }\n\n if (cb) {\n if (forceAsync) {\n callbackAsap(cb, err, res);\n } else {\n cb(err, res);\n }\n } else {\n if (err) {\n throw err;\n }\n syncResult = res;\n }\n });\n\n return syncResult;\n }\n\n\n getExported(ctx, parentFrame, cb) { // eslint-disable-line consistent-return\n if (typeof ctx === 'function') {\n cb = ctx;\n ctx = {};\n }\n\n if (typeof parentFrame === 'function') {\n cb = parentFrame;\n parentFrame = null;\n }\n\n // Catch compile errors for async rendering\n try {\n this.compile();\n } catch (e) {\n if (cb) {\n return cb(e);\n } else {\n throw e;\n }\n }\n\n const frame = parentFrame ? parentFrame.push() : new Frame();\n frame.topLevel = true;\n\n // Run the rootRenderFunc to populate the context with exported vars\n const context = new Context(ctx || {}, this.blocks, this.env);\n this.rootRenderFunc(this.env, context, frame, globalRuntime, (err) => {\n if (err) {\n cb(err, null);\n } else {\n cb(null, context.getExported());\n }\n });\n }\n\n compile() {\n if (!this.compiled) {\n this._compile();\n }\n }\n\n _compile() {\n var props;\n\n if (this.tmplProps) {\n props = this.tmplProps;\n } else {\n const source = compiler.compile(this.tmplStr,\n this.env.asyncFilters,\n this.env.extensionsList,\n this.path,\n this.env.opts);\n\n const func = new Function(source); // eslint-disable-line no-new-func\n props = func();\n }\n\n this.blocks = this._getBlocks(props);\n this.rootRenderFunc = props.root;\n this.compiled = true;\n }\n\n _getBlocks(props) {\n var blocks = {};\n\n lib.keys(props).forEach((k) => {\n if (k.slice(0, 2) === 'b_') {\n blocks[k.slice(2)] = props[k];\n }\n });\n\n return blocks;\n }\n}\n\nmodule.exports = {\n Environment: Environment,\n Template: Template\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/environment.js","'use strict';\n\nvar lexer = require('./lexer');\nvar nodes = require('./nodes');\nvar Obj = require('./object').Obj;\nvar lib = require('./lib');\n\nclass Parser extends Obj {\n init(tokens) {\n this.tokens = tokens;\n this.peeked = null;\n this.breakOnBlocks = null;\n this.dropLeadingWhitespace = false;\n\n this.extensions = [];\n }\n\n nextToken(withWhitespace) {\n var tok;\n\n if (this.peeked) {\n if (!withWhitespace && this.peeked.type === lexer.TOKEN_WHITESPACE) {\n this.peeked = null;\n } else {\n tok = this.peeked;\n this.peeked = null;\n return tok;\n }\n }\n\n tok = this.tokens.nextToken();\n\n if (!withWhitespace) {\n while (tok && tok.type === lexer.TOKEN_WHITESPACE) {\n tok = this.tokens.nextToken();\n }\n }\n\n return tok;\n }\n\n peekToken() {\n this.peeked = this.peeked || this.nextToken();\n return this.peeked;\n }\n\n pushToken(tok) {\n if (this.peeked) {\n throw new Error('pushToken: can only push one token on between reads');\n }\n this.peeked = tok;\n }\n\n error(msg, lineno, colno) {\n if (lineno === undefined || colno === undefined) {\n const tok = this.peekToken() || {};\n lineno = tok.lineno;\n colno = tok.colno;\n }\n if (lineno !== undefined) {\n lineno += 1;\n }\n if (colno !== undefined) {\n colno += 1;\n }\n return new lib.TemplateError(msg, lineno, colno);\n }\n\n fail(msg, lineno, colno) {\n throw this.error(msg, lineno, colno);\n }\n\n skip(type) {\n var tok = this.nextToken();\n if (!tok || tok.type !== type) {\n this.pushToken(tok);\n return false;\n }\n return true;\n }\n\n expect(type) {\n var tok = this.nextToken();\n if (tok.type !== type) {\n this.fail('expected ' + type + ', got ' + tok.type,\n tok.lineno,\n tok.colno);\n }\n return tok;\n }\n\n skipValue(type, val) {\n var tok = this.nextToken();\n if (!tok || tok.type !== type || tok.value !== val) {\n this.pushToken(tok);\n return false;\n }\n return true;\n }\n\n skipSymbol(val) {\n return this.skipValue(lexer.TOKEN_SYMBOL, val);\n }\n\n advanceAfterBlockEnd(name) {\n var tok;\n if (!name) {\n tok = this.peekToken();\n\n if (!tok) {\n this.fail('unexpected end of file');\n }\n\n if (tok.type !== lexer.TOKEN_SYMBOL) {\n this.fail('advanceAfterBlockEnd: expected symbol token or ' +\n 'explicit name to be passed');\n }\n\n name = this.nextToken().value;\n }\n\n tok = this.nextToken();\n\n if (tok && tok.type === lexer.TOKEN_BLOCK_END) {\n if (tok.value.charAt(0) === '-') {\n this.dropLeadingWhitespace = true;\n }\n } else {\n this.fail('expected block end in ' + name + ' statement');\n }\n\n return tok;\n }\n\n advanceAfterVariableEnd() {\n var tok = this.nextToken();\n\n if (tok && tok.type === lexer.TOKEN_VARIABLE_END) {\n this.dropLeadingWhitespace = tok.value.charAt(\n tok.value.length - this.tokens.tags.VARIABLE_END.length - 1\n ) === '-';\n } else {\n this.pushToken(tok);\n this.fail('expected variable end');\n }\n }\n\n parseFor() {\n var forTok = this.peekToken();\n var node;\n var endBlock;\n\n if (this.skipSymbol('for')) {\n node = new nodes.For(forTok.lineno, forTok.colno);\n endBlock = 'endfor';\n } else if (this.skipSymbol('asyncEach')) {\n node = new nodes.AsyncEach(forTok.lineno, forTok.colno);\n endBlock = 'endeach';\n } else if (this.skipSymbol('asyncAll')) {\n node = new nodes.AsyncAll(forTok.lineno, forTok.colno);\n endBlock = 'endall';\n } else {\n this.fail('parseFor: expected for{Async}', forTok.lineno, forTok.colno);\n }\n\n node.name = this.parsePrimary();\n\n if (!(node.name instanceof nodes.Symbol)) {\n this.fail('parseFor: variable name expected for loop');\n }\n\n const type = this.peekToken().type;\n if (type === lexer.TOKEN_COMMA) {\n // key/value iteration\n const key = node.name;\n node.name = new nodes.Array(key.lineno, key.colno);\n node.name.addChild(key);\n\n while (this.skip(lexer.TOKEN_COMMA)) {\n const prim = this.parsePrimary();\n node.name.addChild(prim);\n }\n }\n\n if (!this.skipSymbol('in')) {\n this.fail('parseFor: expected \"in\" keyword for loop',\n forTok.lineno,\n forTok.colno);\n }\n\n node.arr = this.parseExpression();\n this.advanceAfterBlockEnd(forTok.value);\n\n node.body = this.parseUntilBlocks(endBlock, 'else');\n\n if (this.skipSymbol('else')) {\n this.advanceAfterBlockEnd('else');\n node.else_ = this.parseUntilBlocks(endBlock);\n }\n\n this.advanceAfterBlockEnd();\n\n return node;\n }\n\n parseMacro() {\n const macroTok = this.peekToken();\n if (!this.skipSymbol('macro')) {\n this.fail('expected macro');\n }\n\n const name = this.parsePrimary(true);\n const args = this.parseSignature();\n const node = new nodes.Macro(macroTok.lineno, macroTok.colno, name, args);\n\n this.advanceAfterBlockEnd(macroTok.value);\n node.body = this.parseUntilBlocks('endmacro');\n this.advanceAfterBlockEnd();\n\n return node;\n }\n\n parseCall() {\n // a call block is parsed as a normal FunCall, but with an added\n // 'caller' kwarg which is a Caller node.\n var callTok = this.peekToken();\n if (!this.skipSymbol('call')) {\n this.fail('expected call');\n }\n\n const callerArgs = this.parseSignature(true) || new nodes.NodeList();\n const macroCall = this.parsePrimary();\n\n this.advanceAfterBlockEnd(callTok.value);\n const body = this.parseUntilBlocks('endcall');\n this.advanceAfterBlockEnd();\n\n const callerName = new nodes.Symbol(callTok.lineno,\n callTok.colno,\n 'caller');\n const callerNode = new nodes.Caller(callTok.lineno,\n callTok.colno,\n callerName,\n callerArgs,\n body);\n\n // add the additional caller kwarg, adding kwargs if necessary\n const args = macroCall.args.children;\n if (!(args[args.length - 1] instanceof nodes.KeywordArgs)) {\n args.push(new nodes.KeywordArgs());\n }\n const kwargs = args[args.length - 1];\n kwargs.addChild(new nodes.Pair(callTok.lineno,\n callTok.colno,\n callerName,\n callerNode));\n\n return new nodes.Output(callTok.lineno,\n callTok.colno,\n [macroCall]);\n }\n\n parseWithContext() {\n var tok = this.peekToken();\n\n var withContext = null;\n\n if (this.skipSymbol('with')) {\n withContext = true;\n } else if (this.skipSymbol('without')) {\n withContext = false;\n }\n\n if (withContext !== null) {\n if (!this.skipSymbol('context')) {\n this.fail('parseFrom: expected context after with/without',\n tok.lineno,\n tok.colno);\n }\n }\n\n return withContext;\n }\n\n parseImport() {\n var importTok = this.peekToken();\n if (!this.skipSymbol('import')) {\n this.fail('parseImport: expected import',\n importTok.lineno,\n importTok.colno);\n }\n\n const template = this.parseExpression();\n\n if (!this.skipSymbol('as')) {\n this.fail('parseImport: expected \"as\" keyword',\n importTok.lineno,\n importTok.colno);\n }\n\n const target = this.parseExpression();\n const withContext = this.parseWithContext();\n const node = new nodes.Import(importTok.lineno,\n importTok.colno,\n template,\n target,\n withContext);\n\n this.advanceAfterBlockEnd(importTok.value);\n\n return node;\n }\n\n parseFrom() {\n const fromTok = this.peekToken();\n if (!this.skipSymbol('from')) {\n this.fail('parseFrom: expected from');\n }\n\n const template = this.parseExpression();\n\n if (!this.skipSymbol('import')) {\n this.fail('parseFrom: expected import',\n fromTok.lineno,\n fromTok.colno);\n }\n\n const names = new nodes.NodeList();\n let withContext;\n\n while (1) { // eslint-disable-line no-constant-condition\n const nextTok = this.peekToken();\n if (nextTok.type === lexer.TOKEN_BLOCK_END) {\n if (!names.children.length) {\n this.fail('parseFrom: Expected at least one import name',\n fromTok.lineno,\n fromTok.colno);\n }\n\n // Since we are manually advancing past the block end,\n // need to keep track of whitespace control (normally\n // this is done in `advanceAfterBlockEnd`\n if (nextTok.value.charAt(0) === '-') {\n this.dropLeadingWhitespace = true;\n }\n\n this.nextToken();\n break;\n }\n\n if (names.children.length > 0 && !this.skip(lexer.TOKEN_COMMA)) {\n this.fail('parseFrom: expected comma',\n fromTok.lineno,\n fromTok.colno);\n }\n\n const name = this.parsePrimary();\n if (name.value.charAt(0) === '_') {\n this.fail('parseFrom: names starting with an underscore cannot be imported',\n name.lineno,\n name.colno);\n }\n\n if (this.skipSymbol('as')) {\n const alias = this.parsePrimary();\n names.addChild(new nodes.Pair(name.lineno,\n name.colno,\n name,\n alias));\n } else {\n names.addChild(name);\n }\n\n withContext = this.parseWithContext();\n }\n\n return new nodes.FromImport(fromTok.lineno,\n fromTok.colno,\n template,\n names,\n withContext);\n }\n\n parseBlock() {\n const tag = this.peekToken();\n if (!this.skipSymbol('block')) {\n this.fail('parseBlock: expected block', tag.lineno, tag.colno);\n }\n\n const node = new nodes.Block(tag.lineno, tag.colno);\n\n node.name = this.parsePrimary();\n if (!(node.name instanceof nodes.Symbol)) {\n this.fail('parseBlock: variable name expected',\n tag.lineno,\n tag.colno);\n }\n\n this.advanceAfterBlockEnd(tag.value);\n\n node.body = this.parseUntilBlocks('endblock');\n this.skipSymbol('endblock');\n this.skipSymbol(node.name.value);\n\n const tok = this.peekToken();\n if (!tok) {\n this.fail('parseBlock: expected endblock, got end of file');\n }\n\n this.advanceAfterBlockEnd(tok.value);\n\n return node;\n }\n\n parseExtends() {\n const tagName = 'extends';\n const tag = this.peekToken();\n if (!this.skipSymbol(tagName)) {\n this.fail('parseTemplateRef: expected ' + tagName);\n }\n\n const node = new nodes.Extends(tag.lineno, tag.colno);\n node.template = this.parseExpression();\n\n this.advanceAfterBlockEnd(tag.value);\n return node;\n }\n\n parseInclude() {\n const tagName = 'include';\n const tag = this.peekToken();\n if (!this.skipSymbol(tagName)) {\n this.fail('parseInclude: expected ' + tagName);\n }\n\n const node = new nodes.Include(tag.lineno, tag.colno);\n node.template = this.parseExpression();\n\n if (this.skipSymbol('ignore') && this.skipSymbol('missing')) {\n node.ignoreMissing = true;\n }\n\n this.advanceAfterBlockEnd(tag.value);\n return node;\n }\n\n parseIf() {\n const tag = this.peekToken();\n let node;\n\n if (this.skipSymbol('if') || this.skipSymbol('elif') || this.skipSymbol('elseif')) {\n node = new nodes.If(tag.lineno, tag.colno);\n } else if (this.skipSymbol('ifAsync')) {\n node = new nodes.IfAsync(tag.lineno, tag.colno);\n } else {\n this.fail('parseIf: expected if, elif, or elseif',\n tag.lineno,\n tag.colno);\n }\n\n node.cond = this.parseExpression();\n this.advanceAfterBlockEnd(tag.value);\n\n node.body = this.parseUntilBlocks('elif', 'elseif', 'else', 'endif');\n const tok = this.peekToken();\n\n switch (tok && tok.value) {\n case 'elseif':\n case 'elif':\n node.else_ = this.parseIf();\n break;\n case 'else':\n this.advanceAfterBlockEnd();\n node.else_ = this.parseUntilBlocks('endif');\n this.advanceAfterBlockEnd();\n break;\n case 'endif':\n node.else_ = null;\n this.advanceAfterBlockEnd();\n break;\n default:\n this.fail('parseIf: expected elif, else, or endif, got end of file');\n }\n\n return node;\n }\n\n parseSet() {\n const tag = this.peekToken();\n if (!this.skipSymbol('set')) {\n this.fail('parseSet: expected set', tag.lineno, tag.colno);\n }\n\n const node = new nodes.Set(tag.lineno, tag.colno, []);\n\n let target;\n while ((target = this.parsePrimary())) {\n node.targets.push(target);\n\n if (!this.skip(lexer.TOKEN_COMMA)) {\n break;\n }\n }\n\n if (!this.skipValue(lexer.TOKEN_OPERATOR, '=')) {\n if (!this.skip(lexer.TOKEN_BLOCK_END)) {\n this.fail('parseSet: expected = or block end in set tag',\n tag.lineno,\n tag.colno);\n } else {\n node.body = new nodes.Capture(\n tag.lineno,\n tag.colno,\n this.parseUntilBlocks('endset')\n );\n node.value = null;\n this.advanceAfterBlockEnd();\n }\n } else {\n node.value = this.parseExpression();\n this.advanceAfterBlockEnd(tag.value);\n }\n\n return node;\n }\n\n parseSwitch() {\n /*\n * Store the tag names in variables in case someone ever wants to\n * customize this.\n */\n const switchStart = 'switch';\n const switchEnd = 'endswitch';\n const caseStart = 'case';\n const caseDefault = 'default';\n\n // Get the switch tag.\n const tag = this.peekToken();\n\n // fail early if we get some unexpected tag.\n if (\n !this.skipSymbol(switchStart)\n && !this.skipSymbol(caseStart)\n && !this.skipSymbol(caseDefault)\n ) {\n this.fail('parseSwitch: expected \"switch,\" \"case\" or \"default\"', tag.lineno, tag.colno);\n }\n\n // parse the switch expression\n const expr = this.parseExpression();\n\n // advance until a start of a case, a default case or an endswitch.\n this.advanceAfterBlockEnd(switchStart);\n this.parseUntilBlocks(caseStart, caseDefault, switchEnd);\n\n // this is the first case. it could also be an endswitch, we'll check.\n let tok = this.peekToken();\n\n // create new variables for our cases and default case.\n const cases = [];\n let defaultCase;\n\n // while we're dealing with new cases nodes...\n do {\n // skip the start symbol and get the case expression\n this.skipSymbol(caseStart);\n const cond = this.parseExpression();\n this.advanceAfterBlockEnd(switchStart);\n // get the body of the case node and add it to the array of cases.\n const body = this.parseUntilBlocks(caseStart, caseDefault, switchEnd);\n cases.push(new nodes.Case(tok.line, tok.col, cond, body));\n // get our next case\n tok = this.peekToken();\n } while (tok && tok.value === caseStart);\n\n // we either have a default case or a switch end.\n switch (tok.value) {\n case caseDefault:\n this.advanceAfterBlockEnd();\n defaultCase = this.parseUntilBlocks(switchEnd);\n this.advanceAfterBlockEnd();\n break;\n case switchEnd:\n this.advanceAfterBlockEnd();\n break;\n default:\n // otherwise bail because EOF\n this.fail('parseSwitch: expected \"case,\" \"default\" or \"endswitch,\" got EOF.');\n }\n\n // and return the switch node.\n return new nodes.Switch(tag.lineno, tag.colno, expr, cases, defaultCase);\n }\n\n parseStatement() {\n var tok = this.peekToken();\n var node;\n\n if (tok.type !== lexer.TOKEN_SYMBOL) {\n this.fail('tag name expected', tok.lineno, tok.colno);\n }\n\n if (this.breakOnBlocks &&\n lib.indexOf(this.breakOnBlocks, tok.value) !== -1) {\n return null;\n }\n\n switch (tok.value) {\n case 'raw':\n return this.parseRaw();\n case 'verbatim':\n return this.parseRaw('verbatim');\n case 'if':\n case 'ifAsync':\n return this.parseIf();\n case 'for':\n case 'asyncEach':\n case 'asyncAll':\n return this.parseFor();\n case 'block':\n return this.parseBlock();\n case 'extends':\n return this.parseExtends();\n case 'include':\n return this.parseInclude();\n case 'set':\n return this.parseSet();\n case 'macro':\n return this.parseMacro();\n case 'call':\n return this.parseCall();\n case 'import':\n return this.parseImport();\n case 'from':\n return this.parseFrom();\n case 'filter':\n return this.parseFilterStatement();\n case 'switch':\n return this.parseSwitch();\n default:\n if (this.extensions.length) {\n for (let i = 0; i < this.extensions.length; i++) {\n const ext = this.extensions[i];\n if (lib.indexOf(ext.tags || [], tok.value) !== -1) {\n return ext.parse(this, nodes, lexer);\n }\n }\n }\n this.fail('unknown block tag: ' + tok.value, tok.lineno, tok.colno);\n }\n\n return node;\n }\n\n parseRaw(tagName) {\n tagName = tagName || 'raw';\n const endTagName = 'end' + tagName;\n // Look for upcoming raw blocks (ignore all other kinds of blocks)\n const rawBlockRegex = new RegExp('([\\\\s\\\\S]*?){%\\\\s*(' + tagName + '|' + endTagName + ')\\\\s*(?=%})%}');\n let rawLevel = 1;\n let str = '';\n let matches = null;\n\n // Skip opening raw token\n // Keep this token to track line and column numbers\n const begun = this.advanceAfterBlockEnd();\n\n // Exit when there's nothing to match\n // or when we've found the matching \"endraw\" block\n while ((matches = this.tokens._extractRegex(rawBlockRegex)) && rawLevel > 0) {\n const all = matches[0];\n const pre = matches[1];\n const blockName = matches[2];\n\n // Adjust rawlevel\n if (blockName === tagName) {\n rawLevel += 1;\n } else if (blockName === endTagName) {\n rawLevel -= 1;\n }\n\n // Add to str\n if (rawLevel === 0) {\n // We want to exclude the last \"endraw\"\n str += pre;\n // Move tokenizer to beginning of endraw block\n this.tokens.backN(all.length - pre.length);\n } else {\n str += all;\n }\n }\n\n return new nodes.Output(\n begun.lineno,\n begun.colno,\n [new nodes.TemplateData(begun.lineno, begun.colno, str)]\n );\n }\n\n parsePostfix(node) {\n let lookup;\n let tok = this.peekToken();\n\n while (tok) {\n if (tok.type === lexer.TOKEN_LEFT_PAREN) {\n // Function call\n node = new nodes.FunCall(tok.lineno,\n tok.colno,\n node,\n this.parseSignature());\n } else if (tok.type === lexer.TOKEN_LEFT_BRACKET) {\n // Reference\n lookup = this.parseAggregate();\n if (lookup.children.length > 1) {\n this.fail('invalid index');\n }\n\n node = new nodes.LookupVal(tok.lineno,\n tok.colno,\n node,\n lookup.children[0]);\n } else if (tok.type === lexer.TOKEN_OPERATOR && tok.value === '.') {\n // Reference\n this.nextToken();\n const val = this.nextToken();\n\n if (val.type !== lexer.TOKEN_SYMBOL) {\n this.fail('expected name as lookup value, got ' + val.value,\n val.lineno,\n val.colno);\n }\n\n // Make a literal string because it's not a variable\n // reference\n lookup = new nodes.Literal(val.lineno,\n val.colno,\n val.value);\n\n node = new nodes.LookupVal(tok.lineno,\n tok.colno,\n node,\n lookup);\n } else {\n break;\n }\n\n tok = this.peekToken();\n }\n\n return node;\n }\n\n parseExpression() {\n var node = this.parseInlineIf();\n return node;\n }\n\n parseInlineIf() {\n let node = this.parseOr();\n if (this.skipSymbol('if')) {\n const condNode = this.parseOr();\n const bodyNode = node;\n node = new nodes.InlineIf(node.lineno, node.colno);\n node.body = bodyNode;\n node.cond = condNode;\n if (this.skipSymbol('else')) {\n node.else_ = this.parseOr();\n } else {\n node.else_ = null;\n }\n }\n\n return node;\n }\n\n parseOr() {\n let node = this.parseAnd();\n while (this.skipSymbol('or')) {\n const node2 = this.parseAnd();\n node = new nodes.Or(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseAnd() {\n let node = this.parseNot();\n while (this.skipSymbol('and')) {\n const node2 = this.parseNot();\n node = new nodes.And(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseNot() {\n const tok = this.peekToken();\n if (this.skipSymbol('not')) {\n return new nodes.Not(tok.lineno,\n tok.colno,\n this.parseNot());\n }\n return this.parseIn();\n }\n\n parseIn() {\n let node = this.parseIs();\n while (1) { // eslint-disable-line no-constant-condition\n // check if the next token is 'not'\n const tok = this.nextToken();\n if (!tok) {\n break;\n }\n const invert = tok.type === lexer.TOKEN_SYMBOL && tok.value === 'not';\n // if it wasn't 'not', put it back\n if (!invert) {\n this.pushToken(tok);\n }\n if (this.skipSymbol('in')) {\n const node2 = this.parseIs();\n node = new nodes.In(node.lineno,\n node.colno,\n node,\n node2);\n if (invert) {\n node = new nodes.Not(node.lineno,\n node.colno,\n node);\n }\n } else {\n // if we'd found a 'not' but this wasn't an 'in', put back the 'not'\n if (invert) {\n this.pushToken(tok);\n }\n break;\n }\n }\n return node;\n }\n\n // I put this right after \"in\" in the operator precedence stack. That can\n // obviously be changed to be closer to Jinja.\n parseIs() {\n let node = this.parseCompare();\n // look for an is\n if (this.skipSymbol('is')) {\n // look for a not\n const not = this.skipSymbol('not');\n // get the next node\n const node2 = this.parseCompare();\n // create an Is node using the next node and the info from our Is node.\n node = new nodes.Is(node.lineno, node.colno, node, node2);\n // if we have a Not, create a Not node from our Is node.\n if (not) {\n node = new nodes.Not(node.lineno, node.colno, node);\n }\n }\n // return the node.\n return node;\n }\n\n parseCompare() {\n const compareOps = ['==', '===', '!=', '!==', '<', '>', '<=', '>='];\n const expr = this.parseConcat();\n const ops = [];\n\n while (1) { // eslint-disable-line no-constant-condition\n const tok = this.nextToken();\n\n if (!tok) {\n break;\n } else if (compareOps.indexOf(tok.value) !== -1) {\n ops.push(new nodes.CompareOperand(tok.lineno,\n tok.colno,\n this.parseConcat(),\n tok.value));\n } else {\n this.pushToken(tok);\n break;\n }\n }\n\n if (ops.length) {\n return new nodes.Compare(ops[0].lineno,\n ops[0].colno,\n expr,\n ops);\n } else {\n return expr;\n }\n }\n\n // finds the '~' for string concatenation\n parseConcat() {\n let node = this.parseAdd();\n while (this.skipValue(lexer.TOKEN_TILDE, '~')) {\n const node2 = this.parseAdd();\n node = new nodes.Concat(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseAdd() {\n let node = this.parseSub();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '+')) {\n const node2 = this.parseSub();\n node = new nodes.Add(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseSub() {\n let node = this.parseMul();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {\n const node2 = this.parseMul();\n node = new nodes.Sub(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseMul() {\n let node = this.parseDiv();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '*')) {\n const node2 = this.parseDiv();\n node = new nodes.Mul(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseDiv() {\n let node = this.parseFloorDiv();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '/')) {\n const node2 = this.parseFloorDiv();\n node = new nodes.Div(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseFloorDiv() {\n let node = this.parseMod();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '//')) {\n const node2 = this.parseMod();\n node = new nodes.FloorDiv(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseMod() {\n let node = this.parsePow();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '%')) {\n const node2 = this.parsePow();\n node = new nodes.Mod(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parsePow() {\n let node = this.parseUnary();\n while (this.skipValue(lexer.TOKEN_OPERATOR, '**')) {\n const node2 = this.parseUnary();\n node = new nodes.Pow(node.lineno,\n node.colno,\n node,\n node2);\n }\n return node;\n }\n\n parseUnary(noFilters) {\n const tok = this.peekToken();\n let node;\n\n if (this.skipValue(lexer.TOKEN_OPERATOR, '-')) {\n node = new nodes.Neg(tok.lineno,\n tok.colno,\n this.parseUnary(true));\n } else if (this.skipValue(lexer.TOKEN_OPERATOR, '+')) {\n node = new nodes.Pos(tok.lineno,\n tok.colno,\n this.parseUnary(true));\n } else {\n node = this.parsePrimary();\n }\n\n if (!noFilters) {\n node = this.parseFilter(node);\n }\n\n return node;\n }\n\n parsePrimary(noPostfix) {\n const tok = this.nextToken();\n let val;\n let node = null;\n\n if (!tok) {\n this.fail('expected expression, got end of file');\n } else if (tok.type === lexer.TOKEN_STRING) {\n val = tok.value;\n } else if (tok.type === lexer.TOKEN_INT) {\n val = parseInt(tok.value, 10);\n } else if (tok.type === lexer.TOKEN_FLOAT) {\n val = parseFloat(tok.value);\n } else if (tok.type === lexer.TOKEN_BOOLEAN) {\n if (tok.value === 'true') {\n val = true;\n } else if (tok.value === 'false') {\n val = false;\n } else {\n this.fail('invalid boolean: ' + tok.value,\n tok.lineno,\n tok.colno);\n }\n } else if (tok.type === lexer.TOKEN_NONE) {\n val = null;\n } else if (tok.type === lexer.TOKEN_REGEX) {\n val = new RegExp(tok.value.body, tok.value.flags);\n }\n\n if (val !== undefined) {\n node = new nodes.Literal(tok.lineno, tok.colno, val);\n } else if (tok.type === lexer.TOKEN_SYMBOL) {\n node = new nodes.Symbol(tok.lineno, tok.colno, tok.value);\n } else {\n // See if it's an aggregate type, we need to push the\n // current delimiter token back on\n this.pushToken(tok);\n node = this.parseAggregate();\n }\n\n if (!noPostfix) {\n node = this.parsePostfix(node);\n }\n\n if (node) {\n return node;\n } else {\n throw this.error(`unexpected token: ${tok.value}`, tok.lineno, tok.colno);\n }\n }\n\n parseFilterName() {\n const tok = this.expect(lexer.TOKEN_SYMBOL);\n let name = tok.value;\n\n while (this.skipValue(lexer.TOKEN_OPERATOR, '.')) {\n name += '.' + this.expect(lexer.TOKEN_SYMBOL).value;\n }\n\n return new nodes.Symbol(tok.lineno, tok.colno, name);\n }\n\n parseFilterArgs(node) {\n if (this.peekToken().type === lexer.TOKEN_LEFT_PAREN) {\n // Get a FunCall node and add the parameters to the\n // filter\n const call = this.parsePostfix(node);\n return call.args.children;\n }\n return [];\n }\n\n parseFilter(node) {\n while (this.skip(lexer.TOKEN_PIPE)) {\n const name = this.parseFilterName();\n\n node = new nodes.Filter(\n name.lineno,\n name.colno,\n name,\n new nodes.NodeList(\n name.lineno,\n name.colno,\n [node].concat(this.parseFilterArgs(node))\n )\n );\n }\n\n return node;\n }\n\n parseFilterStatement() {\n var filterTok = this.peekToken();\n if (!this.skipSymbol('filter')) {\n this.fail('parseFilterStatement: expected filter');\n }\n\n const name = this.parseFilterName();\n const args = this.parseFilterArgs(name);\n\n this.advanceAfterBlockEnd(filterTok.value);\n const body = new nodes.Capture(\n name.lineno,\n name.colno,\n this.parseUntilBlocks('endfilter')\n );\n this.advanceAfterBlockEnd();\n\n const node = new nodes.Filter(\n name.lineno,\n name.colno,\n name,\n new nodes.NodeList(\n name.lineno,\n name.colno,\n [body].concat(args)\n )\n );\n\n return new nodes.Output(\n name.lineno,\n name.colno,\n [node]\n );\n }\n\n parseAggregate() {\n var tok = this.nextToken();\n var node;\n\n switch (tok.type) {\n case lexer.TOKEN_LEFT_PAREN:\n node = new nodes.Group(tok.lineno, tok.colno);\n break;\n case lexer.TOKEN_LEFT_BRACKET:\n node = new nodes.Array(tok.lineno, tok.colno);\n break;\n case lexer.TOKEN_LEFT_CURLY:\n node = new nodes.Dict(tok.lineno, tok.colno);\n break;\n default:\n return null;\n }\n\n while (1) { // eslint-disable-line no-constant-condition\n const type = this.peekToken().type;\n if (type === lexer.TOKEN_RIGHT_PAREN ||\n type === lexer.TOKEN_RIGHT_BRACKET ||\n type === lexer.TOKEN_RIGHT_CURLY) {\n this.nextToken();\n break;\n }\n\n if (node.children.length > 0) {\n if (!this.skip(lexer.TOKEN_COMMA)) {\n this.fail('parseAggregate: expected comma after expression',\n tok.lineno,\n tok.colno);\n }\n }\n\n if (node instanceof nodes.Dict) {\n // TODO: check for errors\n const key = this.parsePrimary();\n\n // We expect a key/value pair for dicts, separated by a\n // colon\n if (!this.skip(lexer.TOKEN_COLON)) {\n this.fail('parseAggregate: expected colon after dict key',\n tok.lineno,\n tok.colno);\n }\n\n // TODO: check for errors\n const value = this.parseExpression();\n node.addChild(new nodes.Pair(key.lineno,\n key.colno,\n key,\n value));\n } else {\n // TODO: check for errors\n const expr = this.parseExpression();\n node.addChild(expr);\n }\n }\n\n return node;\n }\n\n parseSignature(tolerant, noParens) {\n let tok = this.peekToken();\n if (!noParens && tok.type !== lexer.TOKEN_LEFT_PAREN) {\n if (tolerant) {\n return null;\n } else {\n this.fail('expected arguments', tok.lineno, tok.colno);\n }\n }\n\n if (tok.type === lexer.TOKEN_LEFT_PAREN) {\n tok = this.nextToken();\n }\n\n const args = new nodes.NodeList(tok.lineno, tok.colno);\n const kwargs = new nodes.KeywordArgs(tok.lineno, tok.colno);\n let checkComma = false;\n\n while (1) { // eslint-disable-line no-constant-condition\n tok = this.peekToken();\n if (!noParens && tok.type === lexer.TOKEN_RIGHT_PAREN) {\n this.nextToken();\n break;\n } else if (noParens && tok.type === lexer.TOKEN_BLOCK_END) {\n break;\n }\n\n if (checkComma && !this.skip(lexer.TOKEN_COMMA)) {\n this.fail('parseSignature: expected comma after expression',\n tok.lineno,\n tok.colno);\n } else {\n const arg = this.parseExpression();\n\n if (this.skipValue(lexer.TOKEN_OPERATOR, '=')) {\n kwargs.addChild(\n new nodes.Pair(arg.lineno,\n arg.colno,\n arg,\n this.parseExpression())\n );\n } else {\n args.addChild(arg);\n }\n }\n\n checkComma = true;\n }\n\n if (kwargs.children.length) {\n args.addChild(kwargs);\n }\n\n return args;\n }\n\n parseUntilBlocks(...blockNames) {\n const prev = this.breakOnBlocks;\n this.breakOnBlocks = blockNames;\n\n const ret = this.parse();\n\n this.breakOnBlocks = prev;\n return ret;\n }\n\n parseNodes() {\n let tok;\n const buf = [];\n\n while ((tok = this.nextToken())) {\n if (tok.type === lexer.TOKEN_DATA) {\n let data = tok.value;\n const nextToken = this.peekToken();\n const nextVal = nextToken && nextToken.value;\n\n // If the last token has \"-\" we need to trim the\n // leading whitespace of the data. This is marked with\n // the `dropLeadingWhitespace` variable.\n if (this.dropLeadingWhitespace) {\n // TODO: this could be optimized (don't use regex)\n data = data.replace(/^\\s*/, '');\n this.dropLeadingWhitespace = false;\n }\n\n // Same for the succeeding block start token\n if (nextToken &&\n ((nextToken.type === lexer.TOKEN_BLOCK_START &&\n nextVal.charAt(nextVal.length - 1) === '-') ||\n (nextToken.type === lexer.TOKEN_VARIABLE_START &&\n nextVal.charAt(this.tokens.tags.VARIABLE_START.length)\n === '-') ||\n (nextToken.type === lexer.TOKEN_COMMENT &&\n nextVal.charAt(this.tokens.tags.COMMENT_START.length)\n === '-'))) {\n // TODO: this could be optimized (don't use regex)\n data = data.replace(/\\s*$/, '');\n }\n\n buf.push(new nodes.Output(tok.lineno,\n tok.colno,\n [new nodes.TemplateData(tok.lineno,\n tok.colno,\n data)]));\n } else if (tok.type === lexer.TOKEN_BLOCK_START) {\n this.dropLeadingWhitespace = false;\n const n = this.parseStatement();\n if (!n) {\n break;\n }\n buf.push(n);\n } else if (tok.type === lexer.TOKEN_VARIABLE_START) {\n const e = this.parseExpression();\n this.dropLeadingWhitespace = false;\n this.advanceAfterVariableEnd();\n buf.push(new nodes.Output(tok.lineno, tok.colno, [e]));\n } else if (tok.type === lexer.TOKEN_COMMENT) {\n this.dropLeadingWhitespace = tok.value.charAt(\n tok.value.length - this.tokens.tags.COMMENT_END.length - 1\n ) === '-';\n } else {\n // Ignore comments, otherwise this should be an error\n this.fail('Unexpected token at top-level: ' +\n tok.type, tok.lineno, tok.colno);\n }\n }\n\n return buf;\n }\n\n parse() {\n return new nodes.NodeList(0, 0, this.parseNodes());\n }\n\n parseAsRoot() {\n return new nodes.Root(0, 0, this.parseNodes());\n }\n}\n\n// var util = require('util');\n\n// var l = lexer.lex('{%- if x -%}\\n hello {% endif %}');\n// var t;\n// while((t = l.nextToken())) {\n// console.log(util.inspect(t));\n// }\n\n// var p = new Parser(lexer.lex('hello {% filter title %}' +\n// 'Hello madam how are you' +\n// '{% endfilter %}'));\n// var n = p.parseAsRoot();\n// nodes.printNodes(n);\n\nmodule.exports = {\n parse(src, extensions, opts) {\n var p = new Parser(lexer.lex(src, opts));\n if (extensions !== undefined) {\n p.extensions = extensions;\n }\n return p.parseAsRoot();\n },\n Parser: Parser\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/parser.js","'use strict';\n\nconst lib = require('./lib');\n\nlet whitespaceChars = ' \\n\\t\\r\\u00A0';\nlet delimChars = '()[]{}%*-+~/#,:|.<>=!';\nlet intChars = '0123456789';\n\nlet BLOCK_START = '{%';\nlet BLOCK_END = '%}';\nlet VARIABLE_START = '{{';\nlet VARIABLE_END = '}}';\nlet COMMENT_START = '{#';\nlet COMMENT_END = '#}';\n\nlet TOKEN_STRING = 'string';\nlet TOKEN_WHITESPACE = 'whitespace';\nlet TOKEN_DATA = 'data';\nlet TOKEN_BLOCK_START = 'block-start';\nlet TOKEN_BLOCK_END = 'block-end';\nlet TOKEN_VARIABLE_START = 'variable-start';\nlet TOKEN_VARIABLE_END = 'variable-end';\nlet TOKEN_COMMENT = 'comment';\nlet TOKEN_LEFT_PAREN = 'left-paren';\nlet TOKEN_RIGHT_PAREN = 'right-paren';\nlet TOKEN_LEFT_BRACKET = 'left-bracket';\nlet TOKEN_RIGHT_BRACKET = 'right-bracket';\nlet TOKEN_LEFT_CURLY = 'left-curly';\nlet TOKEN_RIGHT_CURLY = 'right-curly';\nlet TOKEN_OPERATOR = 'operator';\nlet TOKEN_COMMA = 'comma';\nlet TOKEN_COLON = 'colon';\nlet TOKEN_TILDE = 'tilde';\nlet TOKEN_PIPE = 'pipe';\nlet TOKEN_INT = 'int';\nlet TOKEN_FLOAT = 'float';\nlet TOKEN_BOOLEAN = 'boolean';\nlet TOKEN_NONE = 'none';\nlet TOKEN_SYMBOL = 'symbol';\nlet TOKEN_SPECIAL = 'special';\nlet TOKEN_REGEX = 'regex';\n\nfunction token(type, value, lineno, colno) {\n return {\n type: type,\n value: value,\n lineno: lineno,\n colno: colno\n };\n}\n\nclass Tokenizer {\n constructor(str, opts) {\n this.str = str;\n this.index = 0;\n this.len = str.length;\n this.lineno = 0;\n this.colno = 0;\n\n this.in_code = false;\n\n opts = opts || {};\n\n let tags = opts.tags || {};\n this.tags = {\n BLOCK_START: tags.blockStart || BLOCK_START,\n BLOCK_END: tags.blockEnd || BLOCK_END,\n VARIABLE_START: tags.variableStart || VARIABLE_START,\n VARIABLE_END: tags.variableEnd || VARIABLE_END,\n COMMENT_START: tags.commentStart || COMMENT_START,\n COMMENT_END: tags.commentEnd || COMMENT_END\n };\n\n this.trimBlocks = !!opts.trimBlocks;\n this.lstripBlocks = !!opts.lstripBlocks;\n }\n\n nextToken() {\n let lineno = this.lineno;\n let colno = this.colno;\n let tok;\n\n if (this.in_code) {\n // Otherwise, if we are in a block parse it as code\n let cur = this.current();\n\n if (this.isFinished()) {\n // We have nothing else to parse\n return null;\n } else if (cur === '\"' || cur === '\\'') {\n // We've hit a string\n return token(TOKEN_STRING, this._parseString(cur), lineno, colno);\n } else if ((tok = this._extract(whitespaceChars))) {\n // We hit some whitespace\n return token(TOKEN_WHITESPACE, tok, lineno, colno);\n } else if ((tok = this._extractString(this.tags.BLOCK_END)) ||\n (tok = this._extractString('-' + this.tags.BLOCK_END))) {\n // Special check for the block end tag\n //\n // It is a requirement that start and end tags are composed of\n // delimiter characters (%{}[] etc), and our code always\n // breaks on delimiters so we can assume the token parsing\n // doesn't consume these elsewhere\n this.in_code = false;\n if (this.trimBlocks) {\n cur = this.current();\n if (cur === '\\n') {\n // Skip newline\n this.forward();\n } else if (cur === '\\r') {\n // Skip CRLF newline\n this.forward();\n cur = this.current();\n if (cur === '\\n') {\n this.forward();\n } else {\n // Was not a CRLF, so go back\n this.back();\n }\n }\n }\n return token(TOKEN_BLOCK_END, tok, lineno, colno);\n } else if ((tok = this._extractString(this.tags.VARIABLE_END)) ||\n (tok = this._extractString('-' + this.tags.VARIABLE_END))) {\n // Special check for variable end tag (see above)\n this.in_code = false;\n return token(TOKEN_VARIABLE_END, tok, lineno, colno);\n } else if (cur === 'r' && this.str.charAt(this.index + 1) === '/') {\n // Skip past 'r/'.\n this.forwardN(2);\n\n // Extract until the end of the regex -- / ends it, \\/ does not.\n let regexBody = '';\n while (!this.isFinished()) {\n if (this.current() === '/' && this.previous() !== '\\\\') {\n this.forward();\n break;\n } else {\n regexBody += this.current();\n this.forward();\n }\n }\n\n // Check for flags.\n // The possible flags are according to https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n let POSSIBLE_FLAGS = ['g', 'i', 'm', 'y'];\n let regexFlags = '';\n while (!this.isFinished()) {\n let isCurrentAFlag = POSSIBLE_FLAGS.indexOf(this.current()) !== -1;\n if (isCurrentAFlag) {\n regexFlags += this.current();\n this.forward();\n } else {\n break;\n }\n }\n\n return token(TOKEN_REGEX, {\n body: regexBody,\n flags: regexFlags\n }, lineno, colno);\n } else if (delimChars.indexOf(cur) !== -1) {\n // We've hit a delimiter (a special char like a bracket)\n this.forward();\n let complexOps = ['==', '===', '!=', '!==', '<=', '>=', '//', '**'];\n let curComplex = cur + this.current();\n let type;\n\n if (lib.indexOf(complexOps, curComplex) !== -1) {\n this.forward();\n cur = curComplex;\n\n // See if this is a strict equality/inequality comparator\n if (lib.indexOf(complexOps, curComplex + this.current()) !== -1) {\n cur = curComplex + this.current();\n this.forward();\n }\n }\n\n switch (cur) {\n case '(':\n type = TOKEN_LEFT_PAREN;\n break;\n case ')':\n type = TOKEN_RIGHT_PAREN;\n break;\n case '[':\n type = TOKEN_LEFT_BRACKET;\n break;\n case ']':\n type = TOKEN_RIGHT_BRACKET;\n break;\n case '{':\n type = TOKEN_LEFT_CURLY;\n break;\n case '}':\n type = TOKEN_RIGHT_CURLY;\n break;\n case ',':\n type = TOKEN_COMMA;\n break;\n case ':':\n type = TOKEN_COLON;\n break;\n case '~':\n type = TOKEN_TILDE;\n break;\n case '|':\n type = TOKEN_PIPE;\n break;\n default:\n type = TOKEN_OPERATOR;\n }\n\n return token(type, cur, lineno, colno);\n } else {\n // We are not at whitespace or a delimiter, so extract the\n // text and parse it\n tok = this._extractUntil(whitespaceChars + delimChars);\n\n if (tok.match(/^[-+]?[0-9]+$/)) {\n if (this.current() === '.') {\n this.forward();\n let dec = this._extract(intChars);\n return token(TOKEN_FLOAT, tok + '.' + dec, lineno, colno);\n } else {\n return token(TOKEN_INT, tok, lineno, colno);\n }\n } else if (tok.match(/^(true|false)$/)) {\n return token(TOKEN_BOOLEAN, tok, lineno, colno);\n } else if (tok === 'none') {\n return token(TOKEN_NONE, tok, lineno, colno);\n /*\n * Added to make the test `null is null` evaluate truthily.\n * Otherwise, Nunjucks will look up null in the context and\n * return `undefined`, which is not what we want. This *may* have\n * consequences is someone is using null in their templates as a\n * variable.\n */\n } else if (tok === 'null') {\n return token(TOKEN_NONE, tok, lineno, colno);\n } else if (tok) {\n return token(TOKEN_SYMBOL, tok, lineno, colno);\n } else {\n throw new Error('Unexpected value while parsing: ' + tok);\n }\n }\n } else {\n // Parse out the template text, breaking on tag\n // delimiters because we need to look for block/variable start\n // tags (don't use the full delimChars for optimization)\n let beginChars = (this.tags.BLOCK_START.charAt(0) +\n this.tags.VARIABLE_START.charAt(0) +\n this.tags.COMMENT_START.charAt(0) +\n this.tags.COMMENT_END.charAt(0));\n\n if (this.isFinished()) {\n return null;\n } else if ((tok = this._extractString(this.tags.BLOCK_START + '-')) ||\n (tok = this._extractString(this.tags.BLOCK_START))) {\n this.in_code = true;\n return token(TOKEN_BLOCK_START, tok, lineno, colno);\n } else if ((tok = this._extractString(this.tags.VARIABLE_START + '-')) ||\n (tok = this._extractString(this.tags.VARIABLE_START))) {\n this.in_code = true;\n return token(TOKEN_VARIABLE_START, tok, lineno, colno);\n } else {\n tok = '';\n let data;\n let inComment = false;\n\n if (this._matches(this.tags.COMMENT_START)) {\n inComment = true;\n tok = this._extractString(this.tags.COMMENT_START);\n }\n\n // Continually consume text, breaking on the tag delimiter\n // characters and checking to see if it's a start tag.\n //\n // We could hit the end of the template in the middle of\n // our looping, so check for the null return value from\n // _extractUntil\n while ((data = this._extractUntil(beginChars)) !== null) {\n tok += data;\n\n if ((this._matches(this.tags.BLOCK_START) ||\n this._matches(this.tags.VARIABLE_START) ||\n this._matches(this.tags.COMMENT_START)) &&\n !inComment) {\n if (this.lstripBlocks &&\n this._matches(this.tags.BLOCK_START) &&\n this.colno > 0 &&\n this.colno <= tok.length) {\n let lastLine = tok.slice(-this.colno);\n if (/^\\s+$/.test(lastLine)) {\n // Remove block leading whitespace from beginning of the string\n tok = tok.slice(0, -this.colno);\n if (!tok.length) {\n // All data removed, collapse to avoid unnecessary nodes\n // by returning next token (block start)\n return this.nextToken();\n }\n }\n }\n // If it is a start tag, stop looping\n break;\n } else if (this._matches(this.tags.COMMENT_END)) {\n if (!inComment) {\n throw new Error('unexpected end of comment');\n }\n tok += this._extractString(this.tags.COMMENT_END);\n break;\n } else {\n // It does not match any tag, so add the character and\n // carry on\n tok += this.current();\n this.forward();\n }\n }\n\n if (data === null && inComment) {\n throw new Error('expected end of comment, got end of file');\n }\n\n return token(inComment ? TOKEN_COMMENT : TOKEN_DATA,\n tok,\n lineno,\n colno);\n }\n }\n }\n\n _parseString(delimiter) {\n this.forward();\n\n let str = '';\n\n while (!this.isFinished() && this.current() !== delimiter) {\n let cur = this.current();\n\n if (cur === '\\\\') {\n this.forward();\n switch (this.current()) {\n case 'n':\n str += '\\n';\n break;\n case 't':\n str += '\\t';\n break;\n case 'r':\n str += '\\r';\n break;\n default:\n str += this.current();\n }\n this.forward();\n } else {\n str += cur;\n this.forward();\n }\n }\n\n this.forward();\n return str;\n }\n\n _matches(str) {\n if (this.index + str.length > this.len) {\n return null;\n }\n\n let m = this.str.slice(this.index, this.index + str.length);\n return m === str;\n }\n\n _extractString(str) {\n if (this._matches(str)) {\n this.forwardN(str.length);\n return str;\n }\n return null;\n }\n\n _extractUntil(charString) {\n // Extract all non-matching chars, with the default matching set\n // to everything\n return this._extractMatching(true, charString || '');\n }\n\n _extract(charString) {\n // Extract all matching chars (no default, so charString must be\n // explicit)\n return this._extractMatching(false, charString);\n }\n\n _extractMatching(breakOnMatch, charString) {\n // Pull out characters until a breaking char is hit.\n // If breakOnMatch is false, a non-matching char stops it.\n // If breakOnMatch is true, a matching char stops it.\n\n if (this.isFinished()) {\n return null;\n }\n\n let first = charString.indexOf(this.current());\n\n // Only proceed if the first character doesn't meet our condition\n if ((breakOnMatch && first === -1) ||\n (!breakOnMatch && first !== -1)) {\n let t = this.current();\n this.forward();\n\n // And pull out all the chars one at a time until we hit a\n // breaking char\n let idx = charString.indexOf(this.current());\n\n while (((breakOnMatch && idx === -1) ||\n (!breakOnMatch && idx !== -1)) && !this.isFinished()) {\n t += this.current();\n this.forward();\n\n idx = charString.indexOf(this.current());\n }\n\n return t;\n }\n\n return '';\n }\n\n _extractRegex(regex) {\n let matches = this.currentStr().match(regex);\n if (!matches) {\n return null;\n }\n\n // Move forward whatever was matched\n this.forwardN(matches[0].length);\n\n return matches;\n }\n\n isFinished() {\n return this.index >= this.len;\n }\n\n forwardN(n) {\n for (let i = 0; i < n; i++) {\n this.forward();\n }\n }\n\n forward() {\n this.index++;\n\n if (this.previous() === '\\n') {\n this.lineno++;\n this.colno = 0;\n } else {\n this.colno++;\n }\n }\n\n backN(n) {\n for (let i = 0; i < n; i++) {\n this.back();\n }\n }\n\n back() {\n this.index--;\n\n if (this.current() === '\\n') {\n this.lineno--;\n\n let idx = this.src.lastIndexOf('\\n', this.index - 1);\n if (idx === -1) {\n this.colno = this.index;\n } else {\n this.colno = this.index - idx;\n }\n } else {\n this.colno--;\n }\n }\n\n // current returns current character\n current() {\n if (!this.isFinished()) {\n return this.str.charAt(this.index);\n }\n return '';\n }\n\n // currentStr returns what's left of the unparsed string\n currentStr() {\n if (!this.isFinished()) {\n return this.str.substr(this.index);\n }\n return '';\n }\n\n previous() {\n return this.str.charAt(this.index - 1);\n }\n}\n\nmodule.exports = {\n lex(src, opts) {\n return new Tokenizer(src, opts);\n },\n\n TOKEN_STRING: TOKEN_STRING,\n TOKEN_WHITESPACE: TOKEN_WHITESPACE,\n TOKEN_DATA: TOKEN_DATA,\n TOKEN_BLOCK_START: TOKEN_BLOCK_START,\n TOKEN_BLOCK_END: TOKEN_BLOCK_END,\n TOKEN_VARIABLE_START: TOKEN_VARIABLE_START,\n TOKEN_VARIABLE_END: TOKEN_VARIABLE_END,\n TOKEN_COMMENT: TOKEN_COMMENT,\n TOKEN_LEFT_PAREN: TOKEN_LEFT_PAREN,\n TOKEN_RIGHT_PAREN: TOKEN_RIGHT_PAREN,\n TOKEN_LEFT_BRACKET: TOKEN_LEFT_BRACKET,\n TOKEN_RIGHT_BRACKET: TOKEN_RIGHT_BRACKET,\n TOKEN_LEFT_CURLY: TOKEN_LEFT_CURLY,\n TOKEN_RIGHT_CURLY: TOKEN_RIGHT_CURLY,\n TOKEN_OPERATOR: TOKEN_OPERATOR,\n TOKEN_COMMA: TOKEN_COMMA,\n TOKEN_COLON: TOKEN_COLON,\n TOKEN_TILDE: TOKEN_TILDE,\n TOKEN_PIPE: TOKEN_PIPE,\n TOKEN_INT: TOKEN_INT,\n TOKEN_FLOAT: TOKEN_FLOAT,\n TOKEN_BOOLEAN: TOKEN_BOOLEAN,\n TOKEN_NONE: TOKEN_NONE,\n TOKEN_SYMBOL: TOKEN_SYMBOL,\n TOKEN_SPECIAL: TOKEN_SPECIAL,\n TOKEN_REGEX: TOKEN_REGEX\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/lexer.js","'use strict';\n\nconst Loader = require('./loader');\nconst {PrecompiledLoader} = require('./precompiled-loader.js');\n\nclass WebLoader extends Loader {\n constructor(baseURL, opts) {\n super();\n this.baseURL = baseURL || '.';\n opts = opts || {};\n\n // By default, the cache is turned off because there's no way\n // to \"watch\" templates over HTTP, so they are re-downloaded\n // and compiled each time. (Remember, PRECOMPILE YOUR\n // TEMPLATES in production!)\n this.useCache = !!opts.useCache;\n\n // We default `async` to false so that the simple synchronous\n // API can be used when you aren't doing anything async in\n // your templates (which is most of the time). This performs a\n // sync ajax request, but that's ok because it should *only*\n // happen in development. PRECOMPILE YOUR TEMPLATES.\n this.async = !!opts.async;\n }\n\n resolve(from, to) {\n throw new Error('relative templates not support in the browser yet');\n }\n\n getSource(name, cb) {\n var useCache = this.useCache;\n var result;\n this.fetch(this.baseURL + '/' + name, (err, src) => {\n if (err) {\n if (cb) {\n cb(err.content);\n } else if (err.status === 404) {\n result = null;\n } else {\n throw err.content;\n }\n } else {\n result = {\n src: src,\n path: name,\n noCache: !useCache\n };\n this.emit('load', name, result);\n if (cb) {\n cb(null, result);\n }\n }\n });\n\n // if this WebLoader isn't running asynchronously, the\n // fetch above would actually run sync and we'll have a\n // result here\n return result;\n }\n\n fetch(url, cb) {\n // Only in the browser please\n if (typeof window === 'undefined') {\n throw new Error('WebLoader can only by used in a browser');\n }\n\n const ajax = new XMLHttpRequest();\n let loading = true;\n\n ajax.onreadystatechange = () => {\n if (ajax.readyState === 4 && loading) {\n loading = false;\n if (ajax.status === 0 || ajax.status === 200) {\n cb(null, ajax.responseText);\n } else {\n cb({\n status: ajax.status,\n content: ajax.responseText\n });\n }\n }\n };\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + 's=' +\n (new Date().getTime());\n\n ajax.open('GET', url, this.async);\n ajax.send();\n }\n}\n\nmodule.exports = {\n WebLoader: WebLoader,\n PrecompiledLoader: PrecompiledLoader\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/src/web-loaders.js","'use strict';\n\nconst lib = require('./src/lib');\nconst {Environment, Template} = require('./src/environment');\nconst Loader = require('./src/loader');\nconst loaders = require('./src/loaders');\nconst precompile = require('./src/precompile');\nconst compiler = require('./src/compiler');\nconst parser = require('./src/parser');\nconst lexer = require('./src/lexer');\nconst runtime = require('./src/runtime');\nconst nodes = require('./src/nodes');\nconst installJinjaCompat = require('./src/jinja-compat');\n\n// A single instance of an environment, since this is so commonly used\nlet e;\n\nfunction configure(templatesPath, opts) {\n opts = opts || {};\n if (lib.isObject(templatesPath)) {\n opts = templatesPath;\n templatesPath = null;\n }\n\n let TemplateLoader;\n if (loaders.FileSystemLoader) {\n TemplateLoader = new loaders.FileSystemLoader(templatesPath, {\n watch: opts.watch,\n noCache: opts.noCache\n });\n } else if (loaders.WebLoader) {\n TemplateLoader = new loaders.WebLoader(templatesPath, {\n useCache: opts.web && opts.web.useCache,\n async: opts.web && opts.web.async\n });\n }\n\n e = new Environment(TemplateLoader, opts);\n\n if (opts && opts.express) {\n e.express(opts.express);\n }\n\n return e;\n}\n\nmodule.exports = {\n Environment: Environment,\n Template: Template,\n Loader: Loader,\n FileSystemLoader: loaders.FileSystemLoader,\n NodeResolveLoader: loaders.NodeResolveLoader,\n PrecompiledLoader: loaders.PrecompiledLoader,\n WebLoader: loaders.WebLoader,\n compiler: compiler,\n parser: parser,\n lexer: lexer,\n runtime: runtime,\n lib: lib,\n nodes: nodes,\n installJinjaCompat: installJinjaCompat,\n configure: configure,\n reset() {\n e = undefined;\n },\n compile(src, env, path, eagerCompile) {\n if (!e) {\n configure();\n }\n return new Template(src, env, path, eagerCompile);\n },\n render(name, ctx, cb) {\n if (!e) {\n configure();\n }\n\n return e.render(name, ctx, cb);\n },\n renderString(src, ctx, cb) {\n if (!e) {\n configure();\n }\n\n return e.renderString(src, ctx, cb);\n },\n precompile: (precompile) ? precompile.precompile : undefined,\n precompileString: (precompile) ? precompile.precompileString : undefined,\n};\n\n\n\n// WEBPACK FOOTER //\n// ./nunjucks/index.js","\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-asap.js\n// module id = 12\n// module chunks = 0","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-raw.js\n// module id = 13\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 14\n// module chunks = 0","// MIT license (by Elan Shanker).\n(function(globals) {\n 'use strict';\n\n var executeSync = function(){\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'function'){\n args[0].apply(null, args.splice(1));\n }\n };\n\n var executeAsync = function(fn){\n if (typeof setImmediate === 'function') {\n setImmediate(fn);\n } else if (typeof process !== 'undefined' && process.nextTick) {\n process.nextTick(fn);\n } else {\n setTimeout(fn, 0);\n }\n };\n\n var makeIterator = function (tasks) {\n var makeCallback = function (index) {\n var fn = function () {\n if (tasks.length) {\n tasks[index].apply(null, arguments);\n }\n return fn.next();\n };\n fn.next = function () {\n return (index < tasks.length - 1) ? makeCallback(index + 1): null;\n };\n return fn;\n };\n return makeCallback(0);\n };\n \n var _isArray = Array.isArray || function(maybeArray){\n return Object.prototype.toString.call(maybeArray) === '[object Array]';\n };\n\n var waterfall = function (tasks, callback, forceAsync) {\n var nextTick = forceAsync ? executeAsync : executeSync;\n callback = callback || function () {};\n if (!_isArray(tasks)) {\n var err = new Error('First argument to waterfall must be an array of functions');\n return callback(err);\n }\n if (!tasks.length) {\n return callback();\n }\n var wrapIterator = function (iterator) {\n return function (err) {\n if (err) {\n callback.apply(null, arguments);\n callback = function () {};\n } else {\n var args = Array.prototype.slice.call(arguments, 1);\n var next = iterator.next();\n if (next) {\n args.push(wrapIterator(next));\n } else {\n args.push(callback);\n }\n nextTick(function () {\n iterator.apply(null, args);\n });\n }\n };\n };\n wrapIterator(makeIterator(tasks))();\n };\n\n if (typeof define !== 'undefined' && define.amd) {\n define([], function () {\n return waterfall;\n }); // RequireJS\n } else if (typeof module !== 'undefined' && module.exports) {\n module.exports = waterfall; // CommonJS\n } else {\n globals.waterfall = waterfall; //