/*! Dust - Asynchronous Templating - v2.2.3
* http://linkedin.github.io/dustjs/
* Copyright (c) 2013 Aleksander Williams; Released under the MIT License */
function getGlobal(){return function(){return this.dust}.call(null)}var dust={};!function(dust){function Context(a,b,c,d){this.stack=a,this.global=b,this.blocks=c,this.templateName=d}function Stack(a,b,c,d){this.tail=b,this.isObject=a&&"object"==typeof a,this.head=a,this.index=c,this.of=d}function Stub(a){this.head=new Chunk(this),this.callback=a,this.out=""}function Stream(){this.head=new Chunk(this)}function Chunk(a,b,c){this.root=a,this.next=b,this.data=[],this.flushable=!1,this.taps=c}function Tap(a,b){this.head=a,this.tail=b}if(dust){var ERROR="ERROR",WARN="WARN",INFO="INFO",DEBUG="DEBUG",levels=[DEBUG,INFO,WARN,ERROR],EMPTY_FUNC=function(){},logger=EMPTY_FUNC;dust.isDebug=!1,dust.debugLevel=INFO,"undefined"!=typeof window&&window&&window.console&&window.console.log?logger=window.console.log:"undefined"!=typeof console&&console&&console.log&&(logger=console.log),dust.log=function(a,b){b=b||INFO,dust.isDebug&&levels.indexOf(b)>=levels.indexOf(dust.debugLevel)&&(dust.logQueue||(dust.logQueue=[]),dust.logQueue.push({message:a,type:b}),logger.call(console||window.console,"[DUST "+b+"]: "+a))},dust.onError=function(a,b){if(dust.log(a.message||a,ERROR),dust.isDebug)throw a;return b},dust.helpers={},dust.cache={},dust.register=function(a,b){a&&(dust.cache[a]=b)},dust.render=function(a,b,c){var d=new Stub(c).head;try{dust.load(a,d,Context.wrap(b,a)).end()}catch(e){dust.onError(e,d)}},dust.stream=function(a,b){var c=new Stream;return dust.nextTick(function(){try{dust.load(a,c.head,Context.wrap(b,a)).end()}catch(d){dust.onError(d,c.head)}}),c},dust.renderSource=function(a,b,c){return dust.compileFn(a)(b,c)},dust.compileFn=function(a,b){var c=dust.loadSource(dust.compile(a,b));return function(a,d){var e=d?new Stub(d):new Stream;return dust.nextTick(function(){"function"==typeof c?c(e.head,Context.wrap(a,b)).end():dust.onError(new Error("Template ["+b+"] cannot be resolved to a Dust function"))}),e}},dust.load=function(a,b,c){var d=dust.cache[a];return d?d(b,c):dust.onLoad?b.map(function(b){dust.onLoad(a,function(d,e){return d?b.setError(d):(dust.cache[a]||dust.loadSource(dust.compile(e,a)),dust.cache[a](b,c).end(),void 0)})}):b.setError(new Error("Template Not Found: "+a))},dust.loadSource=function(source,path){return eval(source)},dust.isArray=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},dust.nextTick=function(){return"undefined"!=typeof process?process.nextTick:function(a){setTimeout(a,0)}}(),dust.isEmpty=function(a){return dust.isArray(a)&&!a.length?!0:0===a?!1:!a},dust.filter=function(a,b,c){if(c)for(var d=0,e=c.length;e>d;d++){var f=c[d];"s"===f?(b=null,dust.log("Using unescape filter on ["+a+"]",DEBUG)):"function"==typeof dust.filters[f]?a=dust.filters[f](a):dust.onError(new Error("Invalid filter ["+f+"]"))}return b&&(a=dust.filters[b](a)),a},dust.filters={h:function(a){return dust.escapeHtml(a)},j:function(a){return dust.escapeJs(a)},u:encodeURI,uc:encodeURIComponent,js:function(a){return JSON?JSON.stringify(a):(dust.log("JSON is undefined. JSON stringify has not been used on ["+a+"]",WARN),a)},jp:function(a){return JSON?JSON.parse(a):(dust.log("JSON is undefined. JSON parse has not been used on ["+a+"]",WARN),a)}},dust.makeBase=function(a){return new Context(new Stack,a)},Context.wrap=function(a,b){return a instanceof Context?a:new Context(new Stack(a),{},null,b)},Context.prototype.get=function(a,b){return"string"==typeof a&&("."===a[0]&&(b=!0,a=a.substr(1)),a=a.split(".")),this._get(b,a)},Context.prototype._get=function(a,b){var c,d,e,f,g=this.stack,h=1;if(dust.log("Searching for reference [{"+b.join(".")+"}] in template ["+this.getTemplateName()+"]",DEBUG),d=b[0],e=b.length,a&&0===e)f=g,g=g.head;else{if(a)g=g.head[d];else{for(;g&&(!g.isObject||(f=g.head,c=g.head[d],void 0===c));)g=g.tail;g=void 0!==c?c:this.global?this.global[d]:void 0}for(;g&&e>h;)f=g,g=g[b[h]],h++}if("function"==typeof g){var i=function(){return g.apply(f,arguments)};return i.isFunction=!0,i}return void 0===g&&dust.log("Cannot find the value for reference [{"+b.join(".")+"}] in template ["+this.getTemplateName()+"]"),g},Context.prototype.getPath=function(a,b){return this._get(a,b)},Context.prototype.push=function(a,b,c){return new Context(new Stack(a,this.stack,b,c),this.global,this.blocks,this.getTemplateName())},Context.prototype.rebase=function(a){return new Context(new Stack(a),this.global,this.blocks,this.getTemplateName())},Context.prototype.current=function(){return this.stack.head},Context.prototype.getBlock=function(a){if("function"==typeof a){var b=new Chunk;a=a(b,this).data.join("")}var c=this.blocks;if(!c)return dust.log("No blocks for context[{"+a+"}] in template ["+this.getTemplateName()+"]",DEBUG),void 0;for(var d,e=c.length;e--;)if(d=c[e][a])return d},Context.prototype.shiftBlocks=function(a){var b,c=this.blocks;return a?(b=c?c.concat([a]):[a],new Context(this.stack,this.global,b,this.getTemplateName())):this},Context.prototype.getTemplateName=function(){return this.templateName},Stub.prototype.flush=function(){for(var a=this.head;a;){if(!a.flushable)return a.error?(this.callback(a.error),dust.onError(new Error("Chunk error ["+a.error+"] thrown. Ceasing to render this template.")),this.flush=EMPTY_FUNC,void 0):void 0;this.out+=a.data.join(""),a=a.next,this.head=a}this.callback(null,this.out)},Stream.prototype.flush=function(){for(var a=this.head;a;){if(!a.flushable)return a.error?(this.emit("error",a.error),dust.onError(new Error("Chunk error ["+a.error+"] thrown. Ceasing to render this template.")),this.flush=EMPTY_FUNC,void 0):void 0;this.emit("data",a.data.join("")),a=a.next,this.head=a}this.emit("end")},Stream.prototype.emit=function(a,b){if(!this.events)return dust.log("No events to emit",INFO),!1;var c=this.events[a];if(!c)return dust.log("Event type ["+a+"] does not exist",WARN),!1;if("function"==typeof c)c(b);else if(dust.isArray(c))for(var d=c.slice(0),e=0,f=d.length;f>e;e++)d[e](b);else dust.onError(new Error("Event Handler ["+c+"] is not of a type that is handled by emit"))},Stream.prototype.on=function(a,b){return this.events||(this.events={}),this.events[a]?"function"==typeof this.events[a]?this.events[a]=[this.events[a],b]:this.events[a].push(b):(dust.log("Event type ["+a+"] does not exist. Using just the specified callback.",WARN),b?this.events[a]=b:dust.log("Callback for type ["+a+"] does not exist. Listener not registered.",WARN)),this},Stream.prototype.pipe=function(a){return this.on("data",function(b){try{a.write(b,"utf8")}catch(c){dust.onError(c,a.head)}}).on("end",function(){try{return a.end()}catch(b){dust.onError(b,a.head)}}).on("error",function(b){a.error(b)}),this},Chunk.prototype.write=function(a){var b=this.taps;return b&&(a=b.go(a)),this.data.push(a),this},Chunk.prototype.end=function(a){return a&&this.write(a),this.flushable=!0,this.root.flush(),this},Chunk.prototype.map=function(a){var b=new Chunk(this.root,this.next,this.taps),c=new Chunk(this.root,b,this.taps);return this.next=c,this.flushable=!0,a(c),b},Chunk.prototype.tap=function(a){var b=this.taps;return this.taps=b?b.push(a):new Tap(a),this},Chunk.prototype.untap=function(){return this.taps=this.taps.tail,this},Chunk.prototype.render=function(a,b){return a(this,b)},Chunk.prototype.reference=function(a,b,c,d){return"function"==typeof a&&(a.isFunction=!0,a=a.apply(b.current(),[this,b,null,{auto:c,filters:d}]),a instanceof Chunk)?a:dust.isEmpty(a)?this:this.write(dust.filter(a,c,d))},Chunk.prototype.section=function(a,b,c,d){if("function"==typeof a&&(a=a.apply(b.current(),[this,b,c,d]),a instanceof Chunk))return a;var e=c.block,f=c["else"];if(d&&(b=b.push(d)),dust.isArray(a)){if(e){var g=a.length,h=this;if(g>0){b.stack.head&&(b.stack.head.$len=g);for(var i=0;g>i;i++)b.stack.head&&(b.stack.head.$idx=i),h=e(h,b.push(a[i],i,g));return b.stack.head&&(b.stack.head.$idx=void 0,b.stack.head.$len=void 0),h}if(f)return f(this,b)}}else if(a===!0){if(e)return e(this,b)}else if(a||0===a){if(e)return e(this,b.push(a))}else if(f)return f(this,b);return dust.log("Not rendering section (#) block in template ["+b.getTemplateName()+"], because above key was not found",DEBUG),this},Chunk.prototype.exists=function(a,b,c){var d=c.block,e=c["else"];if(dust.isEmpty(a)){if(e)return e(this,b)}else if(d)return d(this,b);return dust.log("Not rendering exists (?) block in template ["+b.getTemplateName()+"], because above key was not found",DEBUG),this},Chunk.prototype.notexists=function(a,b,c){var d=c.block,e=c["else"];if(dust.isEmpty(a)){if(d)return d(this,b)}else if(e)return e(this,b);return dust.log("Not rendering not exists (^) block check in template ["+b.getTemplateName()+"], because above key was found",DEBUG),this},Chunk.prototype.block=function(a,b,c){var d=c.block;return a&&(d=a),d?d(this,b):this},Chunk.prototype.partial=function(a,b,c){var d;d=dust.makeBase(b.global),d.blocks=b.blocks,b.stack&&b.stack.tail&&(d.stack=b.stack.tail),c&&(d=d.push(c)),"string"==typeof a&&(d.templateName=a),d=d.push(b.stack.head);var e;return e="function"==typeof a?this.capture(a,d,function(a,b){d.templateName=d.templateName||a,dust.load(a,b,d).end()}):dust.load(a,this,d)},Chunk.prototype.helper=function(a,b,c,d){var e=this;try{return dust.helpers[a]?dust.helpers[a](e,b,c,d):dust.onError(new Error("Invalid helper ["+a+"]"),e)}catch(f){return dust.onError(f,e)}},Chunk.prototype.capture=function(a,b,c){return this.map(function(d){var e=new Stub(function(a,b){a?d.setError(a):c(b,d)});a(e.head,b).end()})},Chunk.prototype.setError=function(a){return this.error=a,this.root.flush(),this},Tap.prototype.push=function(a){return new Tap(a,this)},Tap.prototype.go=function(a){for(var b=this;b;)a=b.head(a),b=b.tail;return a};var HCHARS=new RegExp(/[&<>\"\']/),AMP=/&/g,LT=/</g,GT=/>/g,QUOT=/\"/g,SQUOT=/\'/g;dust.escapeHtml=function(a){return"string"==typeof a?HCHARS.test(a)?a.replace(AMP,"&").replace(LT,"<").replace(GT,">").replace(QUOT,""").replace(SQUOT,"'"):a:a};var BS=/\\/g,FS=/\//g,CR=/\r/g,LS=/\u2028/g,PS=/\u2029/g,NL=/\n/g,LF=/\f/g,SQ=/'/g,DQ=/"/g,TB=/\t/g;dust.escapeJs=function(a){return"string"==typeof a?a.replace(BS,"\\\\").replace(FS,"\\/").replace(DQ,'\\"').replace(SQ,"\\'").replace(CR,"\\r").replace(LS,"\\u2028").replace(PS,"\\u2029").replace(NL,"\\n").replace(LF,"\\f").replace(TB,"\\t"):a}}}(dust),"undefined"!=typeof exports&&("undefined"!=typeof process&&require("./server")(dust),module.exports=dust);var dustCompiler=function(dust){function a(a){var b={};return dust.filterNode(b,a)}function b(a,b){var c,d,e,f=[b[0]];for(c=1,d=b.length;d>c;c++)e=dust.filterNode(a,b[c]),e&&f.push(e);return f}function c(a,b){var c,d,e,f,g=[b[0]];for(d=1,e=b.length;e>d;d++)f=dust.filterNode(a,b[d]),f&&("buffer"===f[0]?c?c[1]+=f[1]:(c=f,g.push(f)):(c=null,g.push(f)));return g}function d(a,b){return["buffer",l[b[1]]]}function e(a,b){return b}function f(){}function g(a,b){var c={name:b,bodies:[],blocks:{},index:0,auto:"h"};return"(function(){dust.register("+(b?'"'+b+'"':"null")+","+dust.compileNode(c,a)+");"+h(c)+i(c)+"return body_0;})();"}function h(a){var b,c=[],d=a.blocks;for(b in d)c.push('"'+b+'":'+d[b]);return c.length?(a.blocks="ctx=ctx.shiftBlocks(blocks);","var blocks={"+c.join(",")+"};"):a.blocks=""}function i(a){var b,c,d=[],e=a.bodies,f=a.blocks;for(b=0,c=e.length;c>b;b++)d[b]="function body_"+b+"(chk,ctx){"+f+"return chk"+e[b]+";}";return d.join("")}function j(a,b){var c,d,e="";for(c=1,d=b.length;d>c;c++)e+=dust.compileNode(a,b[c]);return e}function k(a,b,c){return"."+c+"("+dust.compileNode(a,b[1])+","+dust.compileNode(a,b[2])+","+dust.compileNode(a,b[4])+","+dust.compileNode(a,b[3])+")"}dust.compile=function(b,c){try{var d=a(dust.parse(b));return g(d,c)}catch(e){if(!e.line||!e.column)throw e;throw new SyntaxError(e.message+" At line : "+e.line+", column : "+e.column)}},dust.filterNode=function(a,b){return dust.optimizers[b[0]](a,b)},dust.optimizers={body:c,buffer:e,special:d,format:f,reference:b,"#":b,"?":b,"^":b,"<":b,"+":b,"@":b,"%":b,partial:b,context:b,params:b,bodies:b,param:b,filters:e,key:e,path:e,literal:e,comment:f,line:f,col:f},dust.pragmas={esc:function(a,b,c){var d,e=a.auto;return b||(b="h"),a.auto="s"===b?"":b,d=j(a,c.block),a.auto=e,d}};var l={s:" ",n:"\n",r:"\r",lb:"{",rb:"}"};dust.compileNode=function(a,b){return dust.nodes[b[0]](a,b)},dust.nodes={body:function(a,b){var c=a.index++,d="body_"+c;return a.bodies[c]=j(a,b),d},buffer:function(a,b){return".write("+m(b[1])+")"},format:function(a,b){return".write("+m(b[1]+b[2])+")"},reference:function(a,b){return".reference("+dust.compileNode(a,b[1])+",ctx,"+dust.compileNode(a,b[2])+")"},"#":function(a,b){return k(a,b,"section")},"?":function(a,b){return k(a,b,"exists")},"^":function(a,b){return k(a,b,"notexists")},"<":function(a,b){for(var c=b[4],d=1,e=c.length;e>d;d++){var f=c[d],g=f[1][1];if("block"===g)return a.blocks[b[1].text]=dust.compileNode(a,f[2]),""}return""},"+":function(a,b){return"undefined"==typeof b[1].text&&"undefined"==typeof b[4]?".block(ctx.getBlock("+dust.compileNode(a,b[1])+",chk, ctx),"+dust.compileNode(a,b[2])+", {},"+dust.compileNode(a,b[3])+")":".block(ctx.getBlock("+m(b[1].text)+"),"+dust.compileNode(a,b[2])+","+dust.compileNode(a,b[4])+","+dust.compileNode(a,b[3])+")"},"@":function(a,b){return".helper("+m(b[1].text)+","+dust.compileNode(a,b[2])+","+dust.compileNode(a,b[4])+","+dust.compileNode(a,b[3])+")"},"%":function(a,b){var c,d,e,f,g,h,i,j,k,l=b[1][1];if(!dust.pragmas[l])return"";for(c=b[4],d={},j=1,k=c.length;k>j;j++)h=c[j],d[h[1][1]]=h[2];for(e=b[3],f={},j=1,k=e.length;k>j;j++)i=e[j],f[i[1][1]]=i[2][1];return g=b[2][1]?b[2][1].text:null,dust.pragmas[l](a,g,d,f)},partial:function(a,b){return".partial("+dust.compileNode(a,b[1])+","+dust.compileNode(a,b[2])+","+dust.compileNode(a,b[3])+")"},context:function(a,b){return b[1]?"ctx.rebase("+dust.compileNode(a,b[1])+")":"ctx"},params:function(a,b){for(var c=[],d=1,e=b.length;e>d;d++)c.push(dust.compileNode(a,b[d]));return c.length?"{"+c.join(",")+"}":"null"},bodies:function(a,b){for(var c=[],d=1,e=b.length;e>d;d++)c.push(dust.compileNode(a,b[d]));return"{"+c.join(",")+"}"},param:function(a,b){return dust.compileNode(a,b[1])+":"+dust.compileNode(a,b[2])},filters:function(a,b){for(var c=[],d=1,e=b.length;e>d;d++){var f=b[d];c.push('"'+f+'"')}return'"'+a.auto+'"'+(c.length?",["+c.join(",")+"]":"")},key:function(a,b){return'ctx._get(false, ["'+b[1]+'"])'},path:function(a,b){for(var c=b[1],d=b[2],e=[],f=0,g=d.length;g>f;f++)dust.isArray(d[f])?e.push(dust.compileNode(a,d[f])):e.push('"'+d[f]+'"');return"ctx._get("+c+",["+e.join(",")+"])"},literal:function(a,b){return m(b[1])}};var m="undefined"==typeof JSON?function(a){return'"'+dust.escapeJs(a)+'"'}:JSON.stringify;return dust};"undefined"!=typeof exports?module.exports=dustCompiler:dustCompiler(getGlobal()),function(dust){var a=function(){function b(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var c={parse:function(c,d){function e(a){var b={};for(var c in a)b[c]=a[c];return b}function f(a,b){for(var d=a.offset+b,e=a.offset;d>e;e++){var f=c.charAt(e);"\n"===f?(a.seenCR||a.line++,a.column=1,a.seenCR=!1):"\r"===f||"\u2028"===f||"\u2029"===f?(a.line++,a.column=1,a.seenCR=!0):(a.column++,a.seenCR=!1)}a.offset+=b}function g(a){Q.offset<S.offset||(Q.offset>S.offset&&(S=e(Q),T=[]),T.push(a))}function h(){var a,b,c;for(c=e(Q),a=[],b=i();null!==b;)a.push(b),b=i();return null!==a&&(a=function(a,b,c,d){return["body"].concat(d).concat([["line",b],["col",c]])}(c.offset,c.line,c.column,a)),null===a&&(Q=e(c)),a}function i(){var a;return a=G(),null===a&&(a=j(),null===a&&(a=q(),null===a&&(a=s(),null===a&&(a=p(),null===a&&(a=D()))))),a}function j(){var a,b,d,i,j,m,n,p,q;if(R++,p=e(Q),q=e(Q),a=k(),null!==a){for(b=[],d=N();null!==d;)b.push(d),d=N();null!==b?(d=J(),null!==d?(i=h(),null!==i?(j=o(),null!==j?(m=l(),m=null!==m?m:"",null!==m?(n=function(a,b,c,d,e,f,g){if(!g||d[1].text!==g.text)throw new Error("Expected end tag for "+d[1].text+" but it was not found. At line : "+b+", column : "+c);return!0}(Q.offset,Q.line,Q.column,a,i,j,m)?"":null,null!==n?a=[a,b,d,i,j,m,n]:(a=null,Q=e(q))):(a=null,Q=e(q))):(a=null,Q=e(q))):(a=null,Q=e(q))):(a=null,Q=e(q))):(a=null,Q=e(q))}else a=null,Q=e(q);if(null!==a&&(a=function(a,b,c,d,e,f){return f.push(["param",["literal","block"],e]),d.push(f),d.concat([["line",b],["col",c]])}(p.offset,p.line,p.column,a[0],a[3],a[4],a[5])),null===a&&(Q=e(p)),null===a){if(p=e(Q),q=e(Q),a=k(),null!==a){for(b=[],d=N();null!==d;)b.push(d),d=N();null!==b?(47===c.charCodeAt(Q.offset)?(d="/",f(Q,1)):(d=null,0===R&&g('"/"')),null!==d?(i=J(),null!==i?a=[a,b,d,i]:(a=null,Q=e(q))):(a=null,Q=e(q))):(a=null,Q=e(q))}else a=null,Q=e(q);null!==a&&(a=function(a,b,c,d){return d.push(["bodies"]),d.concat([["line",b],["col",c]])}(p.offset,p.line,p.column,a[0])),null===a&&(Q=e(p))}return R--,0===R&&null===a&&g("section"),a}function k(){var a,b,d,h,i,j,k,l;if(k=e(Q),l=e(Q),a=I(),null!==a)if(/^[#?^<+@%]/.test(c.charAt(Q.offset))?(b=c.charAt(Q.offset),f(Q,1)):(b=null,0===R&&g("[#?^<+@%]")),null!==b){for(d=[],h=N();null!==h;)d.push(h),h=N();null!==d?(h=t(),null!==h?(i=m(),null!==i?(j=n(),null!==j?a=[a,b,d,h,i,j]:(a=null,Q=e(l))):(a=null,Q=e(l))):(a=null,Q=e(l))):(a=null,Q=e(l))}else a=null,Q=e(l);else a=null,Q=e(l);return null!==a&&(a=function(a,b,c,d,e,f,g){return[d,e,f,g]}(k.offset,k.line,k.column,a[1],a[3],a[4],a[5])),null===a&&(Q=e(k)),a}function l(){var a,b,d,h,i,j,k,l;if(R++,k=e(Q),l=e(Q),a=I(),null!==a)if(47===c.charCodeAt(Q.offset)?(b="/",f(Q,1)):(b=null,0===R&&g('"/"')),null!==b){for(d=[],h=N();null!==h;)d.push(h),h=N();if(null!==d)if(h=t(),null!==h){for(i=[],j=N();null!==j;)i.push(j),j=N();null!==i?(j=J(),null!==j?a=[a,b,d,h,i,j]:(a=null,Q=e(l))):(a=null,Q=e(l))}else a=null,Q=e(l);else a=null,Q=e(l)}else a=null,Q=e(l);else a=null,Q=e(l);return null!==a&&(a=function(a,b,c,d){return d}(k.offset,k.line,k.column,a[3])),null===a&&(Q=e(k)),R--,0===R&&null===a&&g("end tag"),a}function m(){var a,b,d,h,i;return d=e(Q),h=e(Q),i=e(Q),58===c.charCodeAt(Q.offset)?(a=":",f(Q,1)):(a=null,0===R&&g('":"')),null!==a?(b=t(),null!==b?a=[a,b]:(a=null,Q=e(i))):(a=null,Q=e(i)),null!==a&&(a=function(a,b,c,d){return d}(h.offset,h.line,h.column,a[1])),null===a&&(Q=e(h)),a=null!==a?a:"",null!==a&&(a=function(a,b,c,d){return d?["context",d]:["context"]}(d.offset,d.line,d.column,a)),null===a&&(Q=e(d)),a}function n(){var a,b,d,h,i,j,k,l;if(R++,j=e(Q),a=[],k=e(Q),l=e(Q),d=N(),null!==d)for(b=[];null!==d;)b.push(d),d=N();else b=null;for(null!==b?(d=y(),null!==d?(61===c.charCodeAt(Q.offset)?(h="=",f(Q,1)):(h=null,0===R&&g('"="')),null!==h?(i=u(),null===i&&(i=t(),null===i&&(i=B())),null!==i?b=[b,d,h,i]:(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l)),null!==b&&(b=function(a,b,c,d,e){return["param",["literal",d],e]}(k.offset,k.line,k.column,b[1],b[3])),null===b&&(Q=e(k));null!==b;){if(a.push(b),k=e(Q),l=e(Q),d=N(),null!==d)for(b=[];null!==d;)b.push(d),d=N();else b=null;null!==b?(d=y(),null!==d?(61===c.charCodeAt(Q.offset)?(h="=",f(Q,1)):(h=null,0===R&&g('"="')),null!==h?(i=u(),null===i&&(i=t(),null===i&&(i=B())),null!==i?b=[b,d,h,i]:(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l)),null!==b&&(b=function(a,b,c,d,e){return["param",["literal",d],e]}(k.offset,k.line,k.column,b[1],b[3])),null===b&&(Q=e(k))}return null!==a&&(a=function(a,b,c,d){return["params"].concat(d)}(j.offset,j.line,j.column,a)),null===a&&(Q=e(j)),R--,0===R&&null===a&&g("params"),a}function o(){var a,b,d,i,j,k,l,m,n;for(R++,l=e(Q),a=[],m=e(Q),n=e(Q),b=I(),null!==b?(58===c.charCodeAt(Q.offset)?(d=":",f(Q,1)):(d=null,0===R&&g('":"')),null!==d?(i=y(),null!==i?(j=J(),null!==j?(k=h(),null!==k?b=[b,d,i,j,k]:(b=null,Q=e(n))):(b=null,Q=e(n))):(b=null,Q=e(n))):(b=null,Q=e(n))):(b=null,Q=e(n)),null!==b&&(b=function(a,b,c,d,e){return["param",["literal",d],e]}(m.offset,m.line,m.column,b[2],b[4])),null===b&&(Q=e(m));null!==b;)a.push(b),m=e(Q),n=e(Q),b=I(),null!==b?(58===c.charCodeAt(Q.offset)?(d=":",f(Q,1)):(d=null,0===R&&g('":"')),null!==d?(i=y(),null!==i?(j=J(),null!==j?(k=h(),null!==k?b=[b,d,i,j,k]:(b=null,Q=e(n))):(b=null,Q=e(n))):(b=null,Q=e(n))):(b=null,Q=e(n))):(b=null,Q=e(n)),null!==b&&(b=function(a,b,c,d,e){return["param",["literal",d],e]}(m.offset,m.line,m.column,b[2],b[4])),null===b&&(Q=e(m));return null!==a&&(a=function(a,b,c,d){return["bodies"].concat(d)}(l.offset,l.line,l.column,a)),null===a&&(Q=e(l)),R--,0===R&&null===a&&g("bodies"),a}function p(){var a,b,c,d,f,h;return R++,f=e(Q),h=e(Q),a=I(),null!==a?(b=t(),null!==b?(c=r(),null!==c?(d=J(),null!==d?a=[a,b,c,d]:(a=null,Q=e(h))):(a=null,Q=e(h))):(a=null,Q=e(h))):(a=null,Q=e(h)),null!==a&&(a=function(a,b,c,d,e){return["reference",d,e].concat([["line",b],["col",c]])}(f.offset,f.line,f.column,a[1],a[2])),null===a&&(Q=e(f)),R--,0===R&&null===a&&g("reference"),a}function q(){var a,b,d,h,i,j,k,l,o,p,q,r;if(R++,p=e(Q),q=e(Q),a=I(),null!==a)if(62===c.charCodeAt(Q.offset)?(b=">",f(Q,1)):(b=null,0===R&&g('">"')),null===b&&(43===c.charCodeAt(Q.offset)?(b="+",f(Q,1)):(b=null,0===R&&g('"+"'))),null!==b){for(d=[],h=N();null!==h;)d.push(h),h=N();if(null!==d)if(r=e(Q),h=y(),null!==h&&(h=function(a,b,c,d){return["literal",d]}(r.offset,r.line,r.column,h)),null===h&&(Q=e(r)),null===h&&(h=B()),null!==h)if(i=m(),null!==i)if(j=n(),null!==j){for(k=[],l=N();null!==l;)k.push(l),l=N();null!==k?(47===c.charCodeAt(Q.offset)?(l="/",f(Q,1)):(l=null,0===R&&g('"/"')),null!==l?(o=J(),null!==o?a=[a,b,d,h,i,j,k,l,o]:(a=null,Q=e(q))):(a=null,Q=e(q))):(a=null,Q=e(q))}else a=null,Q=e(q);else a=null,Q=e(q);else a=null,Q=e(q);else a=null,Q=e(q)}else a=null,Q=e(q);else a=null,Q=e(q);return null!==a&&(a=function(a,b,c,d,e,f,g){var h=">"===d?"partial":d;return[h,e,f,g].concat([["line",b],["col",c]])}(p.offset,p.line,p.column,a[1],a[3],a[4],a[5])),null===a&&(Q=e(p)),R--,0===R&&null===a&&g("partial"),a}function r(){var a,b,d,h,i,j;for(R++,h=e(Q),a=[],i=e(Q),j=e(Q),124===c.charCodeAt(Q.offset)?(b="|",f(Q,1)):(b=null,0===R&&g('"|"')),null!==b?(d=y(),null!==d?b=[b,d]:(b=null,Q=e(j))):(b=null,Q=e(j)),null!==b&&(b=function(a,b,c,d){return d}(i.offset,i.line,i.column,b[1])),null===b&&(Q=e(i));null!==b;)a.push(b),i=e(Q),j=e(Q),124===c.charCodeAt(Q.offset)?(b="|",f(Q,1)):(b=null,0===R&&g('"|"')),null!==b?(d=y(),null!==d?b=[b,d]:(b=null,Q=e(j))):(b=null,Q=e(j)),null!==b&&(b=function(a,b,c,d){return d}(i.offset,i.line,i.column,b[1])),null===b&&(Q=e(i));return null!==a&&(a=function(a,b,c,d){return["filters"].concat(d)}(h.offset,h.line,h.column,a)),null===a&&(Q=e(h)),R--,0===R&&null===a&&g("filters"),a}function s(){var a,b,d,h,i,j;return R++,i=e(Q),j=e(Q),a=I(),null!==a?(126===c.charCodeAt(Q.offset)?(b="~",f(Q,1)):(b=null,0===R&&g('"~"')),null!==b?(d=y(),null!==d?(h=J(),null!==h?a=[a,b,d,h]:(a=null,Q=e(j))):(a=null,Q=e(j))):(a=null,Q=e(j))):(a=null,Q=e(j)),null!==a&&(a=function(a,b,c,d){return["special",d].concat([["line",b],["col",c]])}(i.offset,i.line,i.column,a[2])),null===a&&(Q=e(i)),R--,0===R&&null===a&&g("special"),a}function t(){var a,b;return R++,b=e(Q),a=x(),null!==a&&(a=function(a,b,c,d){var e=["path"].concat(d);return e.text=d[1].join("."),e}(b.offset,b.line,b.column,a)),null===a&&(Q=e(b)),null===a&&(b=e(Q),a=y(),null!==a&&(a=function(a,b,c,d){var e=["key",d];return e.text=d,e}(b.offset,b.line,b.column,a)),null===a&&(Q=e(b))),R--,0===R&&null===a&&g("identifier"),a}function u(){var a,b;return R++,b=e(Q),a=v(),null===a&&(a=w()),null!==a&&(a=function(a,b,c,d){return["literal",d]}(b.offset,b.line,b.column,a)),null===a&&(Q=e(b)),R--,0===R&&null===a&&g("number"),a}function v(){var a,b,d,h,i,j;if(R++,i=e(Q),j=e(Q),a=w(),null!==a)if(46===c.charCodeAt(Q.offset)?(b=".",f(Q,1)):(b=null,0===R&&g('"."')),null!==b){if(h=w(),null!==h)for(d=[];null!==h;)d.push(h),h=w();else d=null;null!==d?a=[a,b,d]:(a=null,Q=e(j))}else a=null,Q=e(j);else a=null,Q=e(j);return null!==a&&(a=function(a,b,c,d,e){return parseFloat(d+"."+e.join(""))}(i.offset,i.line,i.column,a[0],a[2])),null===a&&(Q=e(i)),R--,0===R&&null===a&&g("float"),a}function w(){var a,b,d;if(R++,d=e(Q),/^[0-9]/.test(c.charAt(Q.offset))?(b=c.charAt(Q.offset),f(Q,1)):(b=null,0===R&&g("[0-9]")),null!==b)for(a=[];null!==b;)a.push(b),/^[0-9]/.test(c.charAt(Q.offset))?(b=c.charAt(Q.offset),f(Q,1)):(b=null,0===R&&g("[0-9]"));else a=null;return null!==a&&(a=function(a,b,c,d){return parseInt(d.join(""),10)}(d.offset,d.line,d.column,a)),null===a&&(Q=e(d)),R--,0===R&&null===a&&g("integer"),a}function x(){var a,b,d,h,i;if(R++,h=e(Q),i=e(Q),a=y(),a=null!==a?a:"",null!==a){if(d=A(),null===d&&(d=z()),null!==d)for(b=[];null!==d;)b.push(d),d=A(),null===d&&(d=z());else b=null;null!==b?a=[a,b]:(a=null,Q=e(i))}else a=null,Q=e(i);if(null!==a&&(a=function(a,b,c,d,e){return e=e[0],d&&e?(e.unshift(d),[!1,e].concat([["line",b],["col",c]])):[!0,e].concat([["line",b],["col",c]])}(h.offset,h.line,h.column,a[0],a[1])),null===a&&(Q=e(h)),null===a){if(h=e(Q),i=e(Q),46===c.charCodeAt(Q.offset)?(a=".",f(Q,1)):(a=null,0===R&&g('"."')),null!==a){for(b=[],d=A(),null===d&&(d=z());null!==d;)b.push(d),d=A(),null===d&&(d=z());null!==b?a=[a,b]:(a=null,Q=e(i))}else a=null,Q=e(i);null!==a&&(a=function(a,b,c,d){return d.length>0?[!0,d[0]].concat([["line",b],["col",c]]):[!0,[]].concat([["line",b],["col",c]])}(h.offset,h.line,h.column,a[1])),null===a&&(Q=e(h))}return R--,0===R&&null===a&&g("path"),a}function y(){var a,b,d,h,i;if(R++,h=e(Q),i=e(Q),/^[a-zA-Z_$]/.test(c.charAt(Q.offset))?(a=c.charAt(Q.offset),f(Q,1)):(a=null,0===R&&g("[a-zA-Z_$]")),null!==a){for(b=[],/^[0-9a-zA-Z_$\-]/.test(c.charAt(Q.offset))?(d=c.charAt(Q.offset),f(Q,1)):(d=null,0===R&&g("[0-9a-zA-Z_$\\-]"));null!==d;)b.push(d),/^[0-9a-zA-Z_$\-]/.test(c.charAt(Q.offset))?(d=c.charAt(Q.offset),f(Q,1)):(d=null,0===R&&g("[0-9a-zA-Z_$\\-]"));null!==b?a=[a,b]:(a=null,Q=e(i))}else a=null,Q=e(i);return null!==a&&(a=function(a,b,c,d,e){return d+e.join("")}(h.offset,h.line,h.column,a[0],a[1])),null===a&&(Q=e(h)),R--,0===R&&null===a&&g("key"),a}function z(){var a,b,d,h,i,j,k,l;if(R++,h=e(Q),i=e(Q),j=e(Q),k=e(Q),a=K(),null!==a){if(l=e(Q),/^[0-9]/.test(c.charAt(Q.offset))?(d=c.charAt(Q.offset),f(Q,1)):(d=null,0===R&&g("[0-9]")),null!==d)for(b=[];null!==d;)b.push(d),/^[0-9]/.test(c.charAt(Q.offset))?(d=c.charAt(Q.offset),f(Q,1)):(d=null,0===R&&g("[0-9]"));else b=null;null!==b&&(b=function(a,b,c,d){return d.join("")}(l.offset,l.line,l.column,b)),null===b&&(Q=e(l)),null===b&&(b=t()),null!==b?(d=L(),null!==d?a=[a,b,d]:(a=null,Q=e(k))):(a=null,Q=e(k))}else a=null,Q=e(k);return null!==a&&(a=function(a,b,c,d){return d}(j.offset,j.line,j.column,a[1])),null===a&&(Q=e(j)),null!==a?(b=A(),b=null!==b?b:"",null!==b?a=[a,b]:(a=null,Q=e(i))):(a=null,Q=e(i)),null!==a&&(a=function(a,b,c,d,e){return e?e.unshift(d):e=[d],e}(h.offset,h.line,h.column,a[0],a[1])),null===a&&(Q=e(h)),R--,0===R&&null===a&&g("array"),a}function A(){var a,b,d,h,i,j,k;if(R++,h=e(Q),i=e(Q),j=e(Q),k=e(Q),46===c.charCodeAt(Q.offset)?(b=".",f(Q,1)):(b=null,0===R&&g('"."')),null!==b?(d=y(),null!==d?b=[b,d]:(b=null,Q=e(k))):(b=null,Q=e(k)),null!==b&&(b=function(a,b,c,d){return d}(j.offset,j.line,j.column,b[1])),null===b&&(Q=e(j)),null!==b)for(a=[];null!==b;)a.push(b),j=e(Q),k=e(Q),46===c.charCodeAt(Q.offset)?(b=".",f(Q,1)):(b=null,0===R&&g('"."')),null!==b?(d=y(),null!==d?b=[b,d]:(b=null,Q=e(k))):(b=null,Q=e(k)),null!==b&&(b=function(a,b,c,d){return d}(j.offset,j.line,j.column,b[1])),null===b&&(Q=e(j));else a=null;return null!==a?(b=z(),b=null!==b?b:"",null!==b?a=[a,b]:(a=null,Q=e(i))):(a=null,Q=e(i)),null!==a&&(a=function(a,b,c,d,e){return e?d.concat(e):d}(h.offset,h.line,h.column,a[0],a[1])),null===a&&(Q=e(h)),R--,0===R&&null===a&&g("array_part"),a}function B(){var a,b,d,h,i;if(R++,h=e(Q),i=e(Q),34===c.charCodeAt(Q.offset)?(a='"',f(Q,1)):(a=null,0===R&&g('"\\""')),null!==a?(34===c.charCodeAt(Q.offset)?(b='"',f(Q,1)):(b=null,0===R&&g('"\\""')),null!==b?a=[a,b]:(a=null,Q=e(i))):(a=null,Q=e(i)),null!==a&&(a=function(a,b,c){return["literal",""].concat([["line",b],["col",c]])}(h.offset,h.line,h.column)),null===a&&(Q=e(h)),null===a&&(h=e(Q),i=e(Q),34===c.charCodeAt(Q.offset)?(a='"',f(Q,1)):(a=null,0===R&&g('"\\""')),null!==a?(b=E(),null!==b?(34===c.charCodeAt(Q.offset)?(d='"',f(Q,1)):(d=null,0===R&&g('"\\""')),null!==d?a=[a,b,d]:(a=null,Q=e(i))):(a=null,Q=e(i))):(a=null,Q=e(i)),null!==a&&(a=function(a,b,c,d){return["literal",d].concat([["line",b],["col",c]])}(h.offset,h.line,h.column,a[1])),null===a&&(Q=e(h)),null===a)){if(h=e(Q),i=e(Q),34===c.charCodeAt(Q.offset)?(a='"',f(Q,1)):(a=null,0===R&&g('"\\""')),null!==a){if(d=C(),null!==d)for(b=[];null!==d;)b.push(d),d=C();else b=null;null!==b?(34===c.charCodeAt(Q.offset)?(d='"',f(Q,1)):(d=null,0===R&&g('"\\""')),null!==d?a=[a,b,d]:(a=null,Q=e(i))):(a=null,Q=e(i))}else a=null,Q=e(i);null!==a&&(a=function(a,b,c,d){return["body"].concat(d).concat([["line",b],["col",c]])}(h.offset,h.line,h.column,a[1])),null===a&&(Q=e(h))}return R--,0===R&&null===a&&g("inline"),a}function C(){var a,b;return a=s(),null===a&&(a=p(),null===a&&(b=e(Q),a=E(),null!==a&&(a=function(a,b,c,d){return["buffer",d]}(b.offset,b.line,b.column,a)),null===a&&(Q=e(b)))),a}function D(){var a,b,d,h,i,j,k,l,m;if(R++,j=e(Q),k=e(Q),a=M(),null!==a){for(b=[],d=N();null!==d;)b.push(d),d=N();null!==b?a=[a,b]:(a=null,Q=e(k))}else a=null,Q=e(k);if(null!==a&&(a=function(a,b,c,d,e){return["format",d,e.join("")].concat([["line",b],["col",c]])}(j.offset,j.line,j.column,a[0],a[1])),null===a&&(Q=e(j)),null===a){if(j=e(Q),k=e(Q),l=e(Q),m=e(Q),R++,b=H(),R--,null===b?b="":(b=null,Q=e(m)),null!==b?(m=e(Q),R++,d=G(),R--,null===d?d="":(d=null,Q=e(m)),null!==d?(m=e(Q),R++,h=M(),R--,null===h?h="":(h=null,Q=e(m)),null!==h?(c.length>Q.offset?(i=c.charAt(Q.offset),f(Q,1)):(i=null,0===R&&g("any character")),null!==i?b=[b,d,h,i]:(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l)),null!==b&&(b=function(a,b,c,d){return d}(k.offset,k.line,k.column,b[3])),null===b&&(Q=e(k)),null!==b)for(a=[];null!==b;)a.push(b),k=e(Q),l=e(Q),m=e(Q),R++,b=H(),R--,null===b?b="":(b=null,Q=e(m)),null!==b?(m=e(Q),R++,d=G(),R--,null===d?d="":(d=null,Q=e(m)),null!==d?(m=e(Q),R++,h=M(),R--,null===h?h="":(h=null,Q=e(m)),null!==h?(c.length>Q.offset?(i=c.charAt(Q.offset),f(Q,1)):(i=null,0===R&&g("any character")),null!==i?b=[b,d,h,i]:(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l))):(b=null,Q=e(l)),null!==b&&(b=function(a,b,c,d){return d}(k.offset,k.line,k.column,b[3])),null===b&&(Q=e(k));else a=null;null!==a&&(a=function(a,b,c,d){return["buffer",d.join("")].concat([["line",b],["col",c]])}(j.offset,j.line,j.column,a)),null===a&&(Q=e(j))}return R--,0===R&&null===a&&g("buffer"),a}function E(){var a,b,d,h,i,j,k;if(R++,h=e(Q),i=e(Q),j=e(Q),k=e(Q),R++,b=H(),R--,null===b?b="":(b=null,Q=e(k)),null!==b?(d=F(),null===d&&(/^[^"]/.test(c.charAt(Q.offset))?(d=c.charAt(Q.offset),f(Q,1)):(d=null,0===R&&g('[^"]'))),null!==d?b=[b,d]:(b=null,Q=e(j))):(b=null,Q=e(j)),null!==b&&(b=function(a,b,c,d){return d}(i.offset,i.line,i.column,b[1])),null===b&&(Q=e(i)),null!==b)for(a=[];null!==b;)a.push(b),i=e(Q),j=e(Q),k=e(Q),R++,b=H(),R--,null===b?b="":(b=null,Q=e(k)),null!==b?(d=F(),null===d&&(/^[^"]/.test(c.charAt(Q.offset))?(d=c.charAt(Q.offset),f(Q,1)):(d=null,0===R&&g('[^"]'))),null!==d?b=[b,d]:(b=null,Q=e(j))):(b=null,Q=e(j)),null!==b&&(b=function(a,b,c,d){return d}(i.offset,i.line,i.column,b[1])),null===b&&(Q=e(i));else a=null;return null!==a&&(a=function(a,b,c,d){return d.join("")}(h.offset,h.line,h.column,a)),null===a&&(Q=e(h)),R--,0===R&&null===a&&g("literal"),a}function F(){var a,b;return b=e(Q),'\\"'===c.substr(Q.offset,2)?(a='\\"',f(Q,2)):(a=null,0===R&&g('"\\\\\\""')),null!==a&&(a=function(){return'"'}(b.offset,b.line,b.column)),null===a&&(Q=e(b)),a}function G(){var a,b,d,h,i,j,k,l,m;if(R++,i=e(Q),j=e(Q),"{!"===c.substr(Q.offset,2)?(a="{!",f(Q,2)):(a=null,0===R&&g('"{!"')),null!==a){for(b=[],k=e(Q),l=e(Q),m=e(Q),R++,"!}"===c.substr(Q.offset,2)?(d="!}",f(Q,2)):(d=null,0===R&&g('"!}"')),R--,null===d?d="":(d=null,Q=e(m)),null!==d?(c.length>Q.offset?(h=c.charAt(Q.offset),f(Q,1)):(h=null,0===R&&g("any character")),null!==h?d=[d,h]:(d=null,Q=e(l))):(d=null,Q=e(l)),null!==d&&(d=function(a,b,c,d){return d
}(k.offset,k.line,k.column,d[1])),null===d&&(Q=e(k));null!==d;)b.push(d),k=e(Q),l=e(Q),m=e(Q),R++,"!}"===c.substr(Q.offset,2)?(d="!}",f(Q,2)):(d=null,0===R&&g('"!}"')),R--,null===d?d="":(d=null,Q=e(m)),null!==d?(c.length>Q.offset?(h=c.charAt(Q.offset),f(Q,1)):(h=null,0===R&&g("any character")),null!==h?d=[d,h]:(d=null,Q=e(l))):(d=null,Q=e(l)),null!==d&&(d=function(a,b,c,d){return d}(k.offset,k.line,k.column,d[1])),null===d&&(Q=e(k));null!==b?("!}"===c.substr(Q.offset,2)?(d="!}",f(Q,2)):(d=null,0===R&&g('"!}"')),null!==d?a=[a,b,d]:(a=null,Q=e(j))):(a=null,Q=e(j))}else a=null,Q=e(j);return null!==a&&(a=function(a,b,c,d){return["comment",d.join("")].concat([["line",b],["col",c]])}(i.offset,i.line,i.column,a[1])),null===a&&(Q=e(i)),R--,0===R&&null===a&&g("comment"),a}function H(){var a,b,d,h,i,j,k,l,m,n,o;if(m=e(Q),a=I(),null!==a){for(b=[],d=N();null!==d;)b.push(d),d=N();if(null!==b)if(/^[#?^><+%:@\/~%]/.test(c.charAt(Q.offset))?(d=c.charAt(Q.offset),f(Q,1)):(d=null,0===R&&g("[#?^><+%:@\\/~%]")),null!==d){for(h=[],i=N();null!==i;)h.push(i),i=N();if(null!==h){if(n=e(Q),o=e(Q),R++,j=J(),R--,null===j?j="":(j=null,Q=e(o)),null!==j?(o=e(Q),R++,k=M(),R--,null===k?k="":(k=null,Q=e(o)),null!==k?(c.length>Q.offset?(l=c.charAt(Q.offset),f(Q,1)):(l=null,0===R&&g("any character")),null!==l?j=[j,k,l]:(j=null,Q=e(n))):(j=null,Q=e(n))):(j=null,Q=e(n)),null!==j)for(i=[];null!==j;)i.push(j),n=e(Q),o=e(Q),R++,j=J(),R--,null===j?j="":(j=null,Q=e(o)),null!==j?(o=e(Q),R++,k=M(),R--,null===k?k="":(k=null,Q=e(o)),null!==k?(c.length>Q.offset?(l=c.charAt(Q.offset),f(Q,1)):(l=null,0===R&&g("any character")),null!==l?j=[j,k,l]:(j=null,Q=e(n))):(j=null,Q=e(n))):(j=null,Q=e(n));else i=null;if(null!==i){for(j=[],k=N();null!==k;)j.push(k),k=N();null!==j?(k=J(),null!==k?a=[a,b,d,h,i,j,k]:(a=null,Q=e(m))):(a=null,Q=e(m))}else a=null,Q=e(m)}else a=null,Q=e(m)}else a=null,Q=e(m);else a=null,Q=e(m)}else a=null,Q=e(m);return null===a&&(a=p()),a}function I(){var a;return 123===c.charCodeAt(Q.offset)?(a="{",f(Q,1)):(a=null,0===R&&g('"{"')),a}function J(){var a;return 125===c.charCodeAt(Q.offset)?(a="}",f(Q,1)):(a=null,0===R&&g('"}"')),a}function K(){var a;return 91===c.charCodeAt(Q.offset)?(a="[",f(Q,1)):(a=null,0===R&&g('"["')),a}function L(){var a;return 93===c.charCodeAt(Q.offset)?(a="]",f(Q,1)):(a=null,0===R&&g('"]"')),a}function M(){var a;return 10===c.charCodeAt(Q.offset)?(a="\n",f(Q,1)):(a=null,0===R&&g('"\\n"')),null===a&&("\r\n"===c.substr(Q.offset,2)?(a="\r\n",f(Q,2)):(a=null,0===R&&g('"\\r\\n"')),null===a&&(13===c.charCodeAt(Q.offset)?(a="\r",f(Q,1)):(a=null,0===R&&g('"\\r"')),null===a&&(8232===c.charCodeAt(Q.offset)?(a="\u2028",f(Q,1)):(a=null,0===R&&g('"\\u2028"')),null===a&&(8233===c.charCodeAt(Q.offset)?(a="\u2029",f(Q,1)):(a=null,0===R&&g('"\\u2029"')))))),a}function N(){var a;return/^[\t\x0B\f \xA0\uFEFF]/.test(c.charAt(Q.offset))?(a=c.charAt(Q.offset),f(Q,1)):(a=null,0===R&&g("[\\t\\x0B\\f \\xA0\\uFEFF]")),null===a&&(a=M()),a}function O(a){a.sort();for(var b=null,c=[],d=0;d<a.length;d++)a[d]!==b&&(c.push(a[d]),b=a[d]);return c}var P={body:h,part:i,section:j,sec_tag_start:k,end_tag:l,context:m,params:n,bodies:o,reference:p,partial:q,filters:r,special:s,identifier:t,number:u,"float":v,integer:w,path:x,key:y,array:z,array_part:A,inline:B,inline_part:C,buffer:D,literal:E,esc:F,comment:G,tag:H,ld:I,rd:J,lb:K,rb:L,eol:M,ws:N};if(void 0!==d){if(void 0===P[d])throw new Error("Invalid rule name: "+b(d)+".")}else d="body";var Q={offset:0,line:1,column:1,seenCR:!1},R=0,S={offset:0,line:1,column:1,seenCR:!1},T=[],U=P[d]();if(null===U||Q.offset!==c.length){var V=Math.max(Q.offset,S.offset),W=V<c.length?c.charAt(V):null,X=Q.offset>S.offset?Q:S;throw new a.SyntaxError(O(T),W,V,X.line,X.column)}return U},toSource:function(){return this._source}};return c.SyntaxError=function(a,c,d,e,f){function g(a,c){var d,e;switch(a.length){case 0:d="end of input";break;case 1:d=a[0];break;default:d=a.slice(0,a.length-1).join(", ")+" or "+a[a.length-1]}return e=c?b(c):"end of input","Expected "+d+" but "+e+" found."}this.name="SyntaxError",this.expected=a,this.found=c,this.message=g(a,c),this.offset=d,this.line=e,this.column=f},c.SyntaxError.prototype=Error.prototype,c}();dust.parse=a.parse}("undefined"!=typeof exports?exports:getGlobal());