!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).liquidjs={})}(this,function(l){"use strict";var P=function(e,t){return(P=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}P(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var T=function(){return(T=Object.assign||function(e){for(var t,r=1,n=arguments.length;ra[0]&&t[1]=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||0> ":" ",r=W(String(e),String(o).length),t="".concat(t).concat(r,"| "),r=e===n?"\n"+W("^",i+t.length):"";return t+s[e-1]+r}).join("\n")),enumerable:!1}),this.message=(e=this.message,(t=this.token).file&&(e+=", file:".concat(t.file)),t=d(t.getPosition(),2),r=t[0],t=t[1],e+=", line:".concat(r,", col:").concat(t)),this.stack=this.message+"\n"+this.context+"\n"+this.stack,this.originalError&&(this.stack+="\nFrom "+this.originalError.stack)},re.is=function(e){return"LiquidError"===(null==e?void 0:e[ee])},re);function re(e,t){var r=X.call(this,"string"==typeof e?e:e.message)||this;return r.context="","string"!=typeof e&&Object.defineProperty(r,"originalError",{value:e,enumerable:!1}),Object.defineProperty(r,"token",{value:t,enumerable:!1}),Object.defineProperty(r,ee,{value:"LiquidError",enumerable:!1}),r}s(se,ne=te);var ne,ie=se;function se(e,t){e=ne.call(this,e,t)||this;return e.name="TokenizationError",ne.prototype.update.call(e),e}s(ue,oe=te);var oe,ae=ue;function ue(e,t){t=oe.call(this,e,t)||this;return t.name="ParseError",t.message=e.message,oe.prototype.update.call(t),t}s(he,ce=te),he.is=function(e){return"RenderError"===e.name};var ce,le=he;function he(e,t){t=ce.call(this,e,t.token)||this;return t.name="RenderError",t.message=e.message,ce.prototype.update.call(t),t}s(de,pe=te);var pe,fe=de;function de(e,t){t=pe.call(this,e,t)||this;return t.name="UndefinedVariableError",t.message=e.message,pe.prototype.update.call(t),t}s(ye,ve=Error);var ve,ge=ye;function ye(e){var t=ve.call(this,"undefined variable: ".concat(e))||this;return t.name="InternalUndefinedVariableError",t.variableName=e,t}s(we,me=Error);var me,be=we;function we(e){var t=me.call(this,e)||this;return t.name="AssertionError",t.message=e+"",t}var p=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],ke=1,Te=4,xe=16;function z(e,t){if(!e)throw t="function"==typeof t?t():t||"expect ".concat(e," to be true"),new be(t)}p[160]=p[5760]=p[6158]=p[8192]=p[8193]=p[8194]=p[8195]=p[8196]=p[8197]=p[8198]=p[8199]=p[8200]=p[8201]=p[8202]=p[8232]=p[8233]=p[8239]=p[8287]=p[12288]=Te;s(ze,Oe=o),ze.prototype.equals=function(e){return h(y(e))},ze.prototype.gt=function(){return!1},ze.prototype.geq=function(){return!1},ze.prototype.lt=function(){return!1},ze.prototype.leq=function(){return!1},ze.prototype.valueOf=function(){return null};var Oe,r=ze;function ze(){return null!==Oe&&Oe.apply(this,arguments)||this}s(n,_e=o),n.prototype.equals=function(e){return!(e instanceof n||(u(e=y(e))||g(e)?0!==e.length:!$(e)||0!==Object.keys(e).length))},n.prototype.gt=function(){return!1},n.prototype.geq=function(){return!1},n.prototype.lt=function(){return!1},n.prototype.leq=function(){return!1},n.prototype.valueOf=function(){return""};var _e,Se=n;function n(){return null!==_e&&_e.apply(this,arguments)||this}s(Fe,Re=Se),Fe.prototype.equals=function(e){return!1===e||!!h(y(e))||(u(e)?/^\s*$/.test(e):Re.prototype.equals.call(this,e))};var Re,i=Fe;function Fe(){return null!==Re&&Re.apply(this,arguments)||this}s(m,qe=o),m.prototype.next=function(){this.i++},m.prototype.index0=function(){return this.i},m.prototype.index=function(){return this.i+1},m.prototype.first=function(){return 0===this.i},m.prototype.last=function(){return this.i===this.length-1},m.prototype.rindex=function(){return this.length-this.i},m.prototype.rindex0=function(){return this.length-this.i-1},m.prototype.valueOf=function(){return JSON.stringify(this)};var qe,Le=m;function m(e,t,r){var n=qe.call(this)||this;return n.i=0,n.length=e,n.name="".concat(r,"-").concat(t),n}s(je,Ee=o),je.prototype.super=function(){return this.superBlockRender()};var Ee,De=je;function je(e){void 0===e&&(e=function(){return""});var t=Ee.call(this)||this;return t.superBlockRender=e,t}function b(e){return e&&c(e.equals)}var r=new r,Me={true:!0,false:!1,nil:r,null:r,empty:new Se,blank:new i};function Pe(e){var t,r,n={};try{for(var i=O(Object.entries(e)),s=i.next();!s.done;s=i.next()){for(var o=d(s.value,2),a=o[0],u=o[1],c=n,l=0;l":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},kt={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0},Tt=(s(xt,bt=e),xt.prototype.getPrecedence=function(){var e=this.getText();return e in wt?wt[e]:1},xt);function xt(e,t,r,n){var i=bt.call(this,l.TokenKind.Operator,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.operator=i.getText(),i}s(_t,Ot=e);var Ot,zt=_t;function _t(e,t,r,n,i,s){r=Ot.call(this,l.TokenKind.PropertyAccess,r,n,i,s)||this;return r.variable=e,r.props=t,r}s(Ft,St=e);var St,Rt=Ft;function Ft(e,t,r,n,i,s){r=St.call(this,l.TokenKind.Filter,r,n,i,s)||this;return r.name=e,r.args=t,r}s(Et,qt=e);var qt,Lt=Et;function Et(e,t,r,n,i,s){var o=qt.call(this,l.TokenKind.Hash,e,t,r,s)||this;return o.input=e,o.begin=t,o.end=r,o.name=n,o.value=i,o.file=s,o}var Dt=/[\da-fA-F]/,jt=/[0-7]/,Mt={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v"};function Pt(e){e=e.charCodeAt(0);return 97<=e?e-87:65<=e?e-55:e-48}s(At,Nt=e);var Nt,Vt=At;function At(e,t,r,n){var i=Nt.call(this,l.TokenKind.Quoted,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=function(e){for(var t="",r=1;rs.getPrecedence()?[4,r.pop()]:[3,5];case 4:return e.sent(),[3,3];case 5:return r.push(s),[3,8];case 6:return[4,s];case 7:e.sent(),e.label=8;case 8:return i=n.next(),[3,2];case 9:return[3,12];case 10:return o=e.sent(),o={error:o},[3,12];case 11:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}return[7];case 12:return r.length?[4,r.pop()]:[3,14];case 13:return e.sent(),[3,12];case 14:return[2]}})}(e)),!1)}function R(t,r,n){return void 0===n&&(n=!1),x(this,function(e){switch(e.label){case 0:return t?"content"in t?[2,t.content]:Yr(t)?[4,function(t,r,n){var i,s,o,a,u,c,l,h,p,f;return x(this,function(e){switch(e.label){case 0:return i=[],[4,R(t.variable,r,n)];case 1:s=e.sent(),e.label=2;case 2:e.trys.push([2,7,8,9]),o=O(t.props),a=o.next(),e.label=3;case 3:return a.done?[3,6]:(l=a.value,c=(u=i).push,[4,R(l,r,!1)]);case 4:c.apply(u,[e.sent()]),e.label=5;case 5:return a=o.next(),[3,3];case 6:return[3,9];case 7:return l=e.sent(),p={error:l},[3,9];case 8:try{a&&!a.done&&(f=o.return)&&f.call(o)}finally{if(p)throw p.error}return[7];case 9:return(e.trys.push([9,14,,15]),t.variable)?[4,r._getFromScope(s,i)]:[3,11];case 10:return[2,e.sent()];case 11:return[4,r._get(i)];case 12:return[2,e.sent()];case 13:return[3,15];case 14:if(h=e.sent(),n&&"InternalUndefinedVariableError"===h.name)return[2,null];throw new fe(h,t);case 15:return[2]}})}(t,r,n)]:[3,2]:[2];case 1:return[2,e.sent()];case 2:return Jr(t)?[4,function(t,r){var n,i;return x(this,function(e){switch(e.label){case 0:return[4,R(t.lhs,r)];case 1:return n=e.sent(),[4,R(t.rhs,r)];case 2:return i=e.sent(),[2,Q(+n,+i+1)]}})}(t,r)]:[3,4];case 3:return[2,e.sent()];case 4:return[2]}})}function ir(e){return e.content}function sr(e,t){return!or(e,t)}function or(e,t){return t.opts.jsTruthy?!e:!1===e||null==e}Se={"==":ar,"!=":function(e,t){return!ar(e,t)},">":function(e,t){return b(e)?e.gt(t):b(t)?t.lt(e):y(e)>y(t)},"<":function(e,t){return b(e)?e.lt(t):b(t)?t.gt(e):y(e)=":function(e,t){return b(e)?e.geq(t):b(t)?t.leq(e):y(e)>=y(t)},"<=":function(e,t){return b(e)?e.leq(t):b(t)?t.geq(e):y(e)<=y(t)},contains:function(e,t){return e=y(e),t=y(t),!(!e||!c(e.indexOf))&&-1this.limit&&this.remove(this.tail.prev.key)},lr);function lr(e,t){void 0===t&&(t=0),this.limit=e,this.size=t,this.cache={},this.head=new ur("HEAD",null,null,null),this.tail=new ur("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}function hr(e,t){var r=document.createElement("base"),e=(r.href=e,document.getElementsByTagName("head")[0]),n=(e.insertBefore(r,e.firstChild),document.createElement("a")),t=(n.href=t,n.href);return e.removeChild(r),t}i=Object.freeze({__proto__:null,resolve:function(e,t,i){return e.length&&"/"!==U(e)&&(e+="/"),hr(e,t).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(e,t,r){var n=r.split("/").pop();return/\.\w+$/.test(n)?e:t+r+i})},readFile:function(n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,new Promise(function(e,t){var r=new XMLHttpRequest;r.onload=function(){200<=r.status&&r.status<300?e(r.responseText):t(new Error(r.statusText))},r.onerror=function(){t(new Error("An error occurred whilst receiving the response."))},r.open("GET",n),r.send()})]})})},readFileSync:function(e){var t=new XMLHttpRequest;if(t.open("GET",e,!1),t.send(),t.status<200||300<=t.status)throw new Error(t.statusText);return t.responseText},exists:function(e){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,!0]})})},existsSync:function(e){return!0},dirname:function(e){return hr(e,".")},sep:"/"});function pr(e,t){return void 0===t&&(t=0),JSON.stringify(e,null,t)}var r={raw:!0,handler:J},fr={"&":"&","<":"<",">":">",'"':""","'":"'"},dr={"&":"&","<":"<",">":">",""":'"',"'":"'"};function vr(e){return f(e).replace(/&|<|>|"|'/g,function(e){return fr[e]})}var gr=Object.freeze({__proto__:null,escape:vr,escape_once:function(e){return vr((e=f(e),f(e).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return dr[e]})))},newline_to_br:function(e){return f(e).replace(/\r?\n/gm,"
\n")},strip_html:function(e){return f(e).replace(/||<.*?>|/g,"")}}),yr={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:i,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:Se};function mr(e){var t;return e.hasOwnProperty("root")&&(e.hasOwnProperty("partials")||(e.partials=e.root),e.hasOwnProperty("layouts")||(e.layouts=e.root)),e.hasOwnProperty("cache")&&(t=void 0,t="number"==typeof e.cache?0t?e.slice(0,t-3)+"...":e));var t},F.prototype.readWord=function(){return this.readIdentifier()},F.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;!this.end()&&this.peekType()&ke;)++this.p;return new dt(this.input,e,this.p,this.file)},F.prototype.readTagName=function(){return this.skipBlank(),"#"===this.input[this.p]?this.input.slice(this.p,++this.p):this.readIdentifier().getText()},F.prototype.readHashes=function(e){for(var t=[];;){var r=this.readHash(e);if(!r)return t;t.push(r)}},F.prototype.readHash=function(e){this.skipBlank(),","===this.peek()&&++this.p;var t,r=this.p,n=this.readIdentifier();if(n.size())return this.skipBlank(),e=e?"=":":",this.peek()===e&&(++this.p,t=this.readValue()),new Lt(this.input,r,this.p,n,t,this.file)},F.prototype.remaining=function(){return this.input.slice(this.p,this.N)},F.prototype.advance=function(e){this.p+=e=void 0===e?1:e},F.prototype.end=function(){return this.p>=this.N},F.prototype.readTo=function(e){for(;this.p=this.N?0:p[this.input.charCodeAt(this.p+e)]},F.prototype.peek=function(e){return this.p+(e=void 0===e?0:e)>=this.N?"":this.input[this.p+e]},F.prototype.skipBlank=function(){for(;this.peekType()&Te;)++this.p};var kr=F;function F(e,t,r,n){void 0===t&&(t=yr.operators),this.input=e,this.file=r,this.range=n,this.rawBeginAt=-1,this.p=n?n[0]:0,this.N=n?n[1]:e.length,this.opTrie=Pe(t),this.literalTrie=Pe(Me)}xr.prototype.on=function(e,t){return this.handlers[e]=t,this},xr.prototype.trigger=function(e,t){e=this.handlers[e];return!!e&&(e.call(this,t),!0)},xr.prototype.start=function(){var e,t;for(this.trigger("start");!this.stopRequested&&(e=this.tokens.shift());)this.trigger("token",e)||Qr(e)&&this.trigger("tag:".concat(e.name),e)||(t=this.parseToken(e,this.tokens),this.trigger("template",t));return this.stopRequested||this.trigger("end"),this},xr.prototype.stop=function(){return this.stopRequested=!0,this};var Tr=xr;function xr(e,t){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=t}function Or(e){this.token=e}s(_r,zr=Or);var zr,q=_r;function _r(e,t,r){var n=zr.call(this,e)||this;return n.name=e.name,n.liquid=r,n.tokenizer=e.tokenizer,n}Rr.prototype.render=function(t){var r,n,i,s,o,a,u,c,l;return x(this,function(e){switch(e.label){case 0:r={},e.label=1;case 1:e.trys.push([1,8,9,10]),n=O(Object.keys(this.hash)),i=n.next(),e.label=2;case 2:return i.done?[3,7]:(s=i.value,o=r,a=s,void 0!==this.hash[s]?[3,3]:(u=!0,[3,5]));case 3:return[4,R(this.hash[s],t)];case 4:u=e.sent(),e.label=5;case 5:o[a]=u,e.label=6;case 6:return i=n.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),c={error:c},[3,10];case 9:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(c)throw c.error}return[7];case 10:return[2,r]}})};var Sr=Rr;function Rr(e,t){this.hash={};var r,n,e=new kr(e,{});try{for(var i=O(e.readHashes(t)),s=i.next();!s.done;s=i.next()){var o=s.value;this.hash[o.name.content]=o.value}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}qr.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,h,p,f;return x(this,function(e){switch(e.label){case 0:n=[],e.label=1;case 1:e.trys.push([1,8,9,10]),i=O(this.args),s=i.next(),e.label=2;case 2:return s.done?[3,7]:g(o=s.value)?(u=(a=n).push,c=[o[0]],[4,R(o[1],r)]):[3,4];case 3:return u.apply(a,[c.concat([e.sent()])]),[3,6];case 4:return h=(l=n).push,[4,R(o,r)];case 5:h.apply(l,[e.sent()]),e.label=6;case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return p=e.sent(),p={error:p},[3,10];case 9:try{s&&!s.done&&(f=i.return)&&f.call(i)}finally{if(p)throw p.error}return[7];case 10:return[4,this.handler.apply({context:r,liquid:this.liquid},v([t],d(n),!1))];case 11:return[2,e.sent()]}})};var Fr=qr;function qr(e,t,r,n){this.name=e,this.handler=c(t)?t:c(null==t?void 0:t.handler)?t.handler:J,this.raw=!c(t)&&!(null==t||!t.raw),this.args=r,this.liquid=n}Lr.prototype.value=function(t,r){var n,i,s,o,a;return x(this,function(e){switch(e.label){case 0:return r=r||t.opts.lenientIf&&0=t&&(n+=r),n}}),hn=T(T(T(T(T(T(T({},gr),j),Xr),sn),on),an),{json:pr,raw:r,default:function(e,t){for(var r=[],n=2;n"),r.write(''))),r.write('')),[4,s.renderTemplates(this.templates,t,r)]):[3,6];case 4:e.sent(),r.write(""),e.label=5;case 5:return u++,o.next(),[3,3];case 6:return n.length&&r.write(""),t.pop(),[2]}})};var Yn,Jn=Zn;function Zn(e,t,r){var n,i=Yn.call(this,e,t,r)||this,r=i.tokenizer.readIdentifier(),s=(i.tokenizer.skipBlank(),i.tokenizer.readIdentifier()),o=i.tokenizer.readValue();if("in"!==s.content||!o)throw new Error("illegal tag: ".concat(e.getText()));i.variable=r.content,i.collection=o,i.args=new Sr(i.tokenizer.remaining()),i.templates=[];var a=i.liquid.parser.parseStream(t).on("start",function(){return n=i.templates}).on("tag:endtablerow",function(){return a.stop()}).on("template",function(e){return n.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return a.start(),i}s(ei,Gn=q),ei.prototype.render=function(t,r){var n,i,s,o,a,u,c,l;return x(this,function(e){switch(e.label){case 0:n=this.liquid.renderer,e.label=1;case 1:e.trys.push([1,7,8,9]),i=O(this.branches),s=i.next(),e.label=2;case 2:return s.done?[3,6]:(a=s.value,u=a.value,o=a.test,a=a.templates,[4,u.value(t,t.opts.lenientIf)]);case 3:return(u=e.sent(),o(u,t))?[4,n.renderTemplates(a,t,r)]:[3,5];case 4:return e.sent(),[2];case 5:return s=i.next(),[3,2];case 6:return[3,9];case 7:return c=e.sent(),c={error:c},[3,9];case 8:try{s&&!s.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}return[7];case 9:return[4,n.renderTemplates(this.elseTemplates,t,r)];case 10:return e.sent(),[2]}})};var Gn,Xn=ei;function ei(e,t,r){var n,i=Gn.call(this,e,t,r)||this;return i.branches=[],i.elseTemplates=[],i.liquid.parser.parseStream(t).on("start",function(){return i.branches.push({value:new L(e.args,i.liquid),test:or,templates:n=[]})}).on("tag:elsif",function(e){return i.branches.push({value:new L(e.args,i.liquid),test:sr,templates:n=[]})}).on("tag:else",function(){return n=i.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",function(e){return n.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))}).start(),i}s(ni,ti=q),ni.prototype.render=function(e,t){t.break=!0};var ti,ri=ni;function ni(){return null!==ti&&ti.apply(this,arguments)||this}s(oi,ii=q),oi.prototype.render=function(e,t){t.continue=!0};var ii,si=oi;function oi(){return null!==ii&&ii.apply(this,arguments)||this}s(ci,ai=q),ci.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return this.value?[4,this.value.value(t,!1)]:[2];case 1:return n=e.sent(),r.write(n),[2]}})};var ai,ui=ci;function ci(e,t,r){e=ai.call(this,e,t,r)||this;return e.tokenizer.skipBlank(),e.tokenizer.end()||(e.value=new L(e.tokenizer.readFilteredValue(),e.liquid)),e}s(pi,li=q),pi.prototype.render=function(t,r){return x(this,function(e){switch(e.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,t,r)];case 1:return e.sent(),[2]}})};var li,hi=pi;function pi(e,t,r){e=li.call(this,e,t,r)||this,t=e.tokenizer.readLiquidTagTokens(e.liquid.options);return e.templates=e.liquid.parser.parseTokens(t),e}s(vi,fi=q),vi.prototype.render=function(){};var fi,di=vi;function vi(e,t,r){t=fi.call(this,e,t,r)||this;if(-1!==e.args.search(/\n\s*[^#\s]/g))throw new Error("every line of an inline comment must start with a '#' character");return t}var gi={assign:en,for:tn,capture:rn,case:nn,comment:gr,include:Xr,render:j,decrement:sn,increment:r,cycle:on,if:an,layout:Vn,block:Bn,raw:Kn,tablerow:Jn,unless:Xn,break:ri,continue:si,echo:ui,liquid:hi,"#":di},yi=(M.prototype.parse=function(e,t){return this.parser.parse(e,t)},M.prototype._render=function(e,t,r){t=t instanceof Gr?t:new Gr(t,this.options,r);return this.renderer.renderTemplates(e,t)},M.prototype.render=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._render(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.renderSync=function(e,t,r){return k(this._render(e,t,T(T({},r),{sync:!0})))},M.prototype.renderToNodeStream=function(e,t,r){t=new Gr(t,this.options,r=void 0===r?{}:r);return this.renderer.renderTemplatesToNodeStream(e,t)},M.prototype._parseAndRender=function(e,t,r){e=this.parse(e);return this._render(e,t,r)},M.prototype.parseAndRender=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._parseAndRender(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.parseAndRenderSync=function(e,t,r){return k(this._parseAndRender(e,t,T(T({},r),{sync:!0})))},M.prototype._parsePartialFile=function(e,t,r){return this.parser.parseFile(e,t,Pr.Partials,r)},M.prototype._parseLayoutFile=function(e,t,r){return this.parser.parseFile(e,t,Pr.Layouts,r)},M.prototype._parseFile=function(e,t,r,n){return this.parser.parseFile(e,t,r,n)},M.prototype.parseFile=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this.parser.parseFile(t,!1,r))]})})},M.prototype.parseFileSync=function(e,t){return k(this.parser.parseFile(e,!0,t))},M.prototype._renderFile=function(t,r,n){var i;return x(this,function(e){switch(e.label){case 0:return[4,this._parseFile(t,n.sync,n.lookupType)];case 1:return i=e.sent(),[4,this._render(i,r,n)];case 2:return[2,e.sent()]}})},M.prototype.renderFile=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._renderFile(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.renderFileSync=function(e,t,r){return k(this._renderFile(e,t,T(T({},r),{sync:!0})))},M.prototype.renderFileToNodeStream=function(r,n,i){return a(this,void 0,void 0,function(){var t;return x(this,function(e){switch(e.label){case 0:return[4,this.parseFile(r)];case 1:return t=e.sent(),[2,this.renderToNodeStream(t,n,i)]}})})},M.prototype._evalValue=function(e,t){e=new L(e,this),t=t instanceof Gr?t:new Gr(t,this.options);return e.value(t)},M.prototype.evalValue=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._evalValue(t,r))]})})},M.prototype.evalValueSync=function(e,t){return k(this._evalValue(e,t))},M.prototype.registerFilter=function(e,t){this.filters[e]=t},M.prototype.registerTag=function(e,t){function r(e,t,r){r=n.call(this,e,t,r)||this;return c(i.parse)&&i.parse.call(r,e,t),r}var i,n;this.tags[e]=c(t)?t:(i=t,s(r,n=q),r.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return[4,new Sr(this.token.args).render(t)];case 1:return n=e.sent(),[4,i.render.call(this,t,r,n)];case 2:return[2,e.sent()]}})},r)},M.prototype.plugin=function(e){return e.call(this,M)},M.prototype.express=function(){var s=this,o=!0;return function(e,t,r){var n,i;o&&(o=!1,i=br(this.root),(n=s.options.root).unshift.apply(n,v([],d(i),!1)),(n=s.options.layouts).unshift.apply(n,v([],d(i),!1)),(n=s.options.partials).unshift.apply(n,v([],d(i),!1))),s.renderFile(e,t).then(function(e){return r(null,e)},r)}},M);function M(e){void 0===e&&(e={});var r=this;this.renderer=new er,this.filters={},this.tags={},this.options=mr(e),this.parser=new Br(this),K(gi,function(e,t){return r.registerTag(t,e)}),K(hn,function(e,t){return r.registerFilter(t,e)})}l.AssertionError=be,l.AssignTag=en,l.BlockTag=Bn,l.BreakTag=ri,l.CaptureTag=rn,l.CaseTag=nn,l.CommentTag=gr,l.Context=Gr,l.ContinueTag=si,l.CycleTag=on,l.DecrementTag=sn,l.Drop=o,l.EchoTag=ui,l.Expression=rr,l.Filter=Fr,l.ForTag=tn,l.Hash=Sr,l.IfTag=an,l.IncludeTag=Xr,l.IncrementTag=r,l.InlineCommentTag=di,l.LayoutTag=Vn,l.Liquid=yi,l.LiquidError=te,l.LiquidTag=hi,l.Output=Dr,l.ParseError=ae,l.ParseStream=Tr,l.RawTag=Kn,l.RenderError=le,l.RenderTag=j,l.TablerowTag=Jn,l.Tag=q,l.TagToken=rt,l.TimezoneDate=Ge,l.Token=e,l.TokenizationError=ie,l.Tokenizer=kr,l.TypeGuards=i,l.UndefinedVariableError=fe,l.UnlessTag=Xn,l.Value=L,l.assert=z,l.createTrie=Pe,l.defaultOperators=Se,l.defaultOptions=yr,l.evalQuotedToken=ir,l.evalToken=R,l.filters=hn,l.isFalsy=or,l.isTruthy=sr,l.tags=gi,l.toPromise=w,l.toValue=y,l.toValueSync=k,l.version="10.9.2",Object.defineProperty(l,"__esModule",{value:!0})}); //# sourceMappingURL=liquid.browser.min.js.map