PageSourceSearch

https://www.belron.com/chunk-VOGNE4QP.js

js belron.com collected 2026-10-02 16:42:17 UTC 64,238 bytes, 13 lines download raw bytes

1var x=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===`
2`?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}},E=class{liquidMethodMissing(e){}},hs=Object.prototype.toString,vt=String.prototype.toLowerCase,mt=Object.hasOwnProperty;function L(t){return typeof t=="string"}function w(t){return typeof t=="function"}function cs(t){return t&&w(t.then)}function ne(t){return t&&w(t.next)&&w(t.throw)&&w(t.return)}function us(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function c(t){return t=f(t),L(t)?t:S(t)?"":k(t)?t.map(e=>c(e)).join(""):String(t)}function yt(t){return t=f(t),k(t)?t:L(t)&&t.length>0?[t]:ds(t)?Array.from(t):me(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function b(t){return t=f(t),S(t)?[]:k(t)?t:[t]}function f(t){return t instanceof E&&w(t.valueOf)?t.valueOf():t}function Lt(t){return t=Number(t),isNaN(t)?0:t}function wt(t){return typeof t=="number"}function Ht(t){return t&&w(t.toLiquid)?Ht(t.toLiquid()):t}function S(t){return t==null}function fs(t){return t===void 0}function k(t){return hs.call(t)==="[object Array]"}function ds(t){return me(t)&&Symbol.iterator in t}function St(t,e){t=t||{};for(let s in t)if(mt.call(t,s)&&e(t[s],s,t)===!1)break;return t}function Ut(t){return t[t.length-1]}function me(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function Wt(t,e,s=1){let i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function Z(t,e,s=" "){return Yt(t,e,s,(i,r)=>r+i)}function ps(t,e,s=" "){return Yt(t,e,s,(i,r)=>i+r)}function Yt(t,e,s,i){t=String(t);let r=e-t.length;for(;r-- >0;)t=i(t,s);return t}function Jt(t){return t}function gs(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function ms(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Ft(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=vt.call(t),e=vt.call(e),t<e)?-1:t>e?1:0}function v(t){return function(...e){return t.call(this,...e.map(f))}}function bt(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var Ot="__liquidClass__",$=class extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,Ot,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:ys(this.token),enumerable:!1}),this.message=ws(this.message,this.token),this.stack=this.message+`
3`+this.context+`
4`+this.stack,this.originalError&&(this.stack+=`
5From `+this.originalError.stack)}static is(e){return e?.[Ot]==="LiquidError"}},ke=class extends ${constructor(e,s){super(e,s),this.name="TokenizationError",super.update()}},Te=class extends ${constructor(e,s){super(e,s),this.name="ParseError",this.message=e.message,super.update()}},xe=class extends ${constructor(e,s){super(e,s.token),this.name="RenderError",this.message=e.message,super.update()}static is(e){return e.name==="RenderError"}},oe=class extends ${constructor(e){super(e[0],e[0].token),this.errors=e,this.name="LiquidErrors";let s=e.length>1?"s":"";this.message=`${e.length} error${s} found`,super.update()}static is(e){return e.name==="LiquidErrors"}},_e=class extends ${constructor(e,s){super(e,s),this.name="UndefinedVariableError",this.message=e.message,super.update()}},ve=class extends Error{constructor(e){super(`undefined variable: ${e}`),this.name="InternalUndefinedVariableError",this.variableName=e}},Le=class extends Error{constructor(e){super(e),this.name="AssertionError",this.message=e+""}}
5;function ys(t){let[e,s]=t.getPosition(),i=t.input.split(`
6`),r=Math.max(e-2,1),n=Math.min(e+3,i.length);return Wt(r,n+1).map(a=>{let l=a===e?">> ":"   ",h=Z(String(a),String(n).length),u=`${l}${h}| `,p=a===e?`
7`+Z("^",s+u.length):"";return u+=i[a-1],u+=p,u}).join(`
8`)}function ws(t,e){e.file&&(t+=`, file:${e.file}`);let[s,i]=e.getPosition();return t+=`, line:${s}, col:${i}`,t}var d=[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],bs=1,U=4,Rt=8,Qt=16,ks=32,Ts=64,xs=128;function se(t){let e=t.charCodeAt(0);return e>=128?!d[e]:!!(d[e]&bs)}d[160]=d[5760]=d[6158]=d[8192]=d[8193]=d[8194]=d[8195]=d[8196]=d[8197]=d[8198]=d[8199]=d[8200]=d[8201]=d[8202]=d[8232]=d[8233]=d[8239]=d[8287]=d[12288]=U;d[8220]=d[8221]=xs;function T(t,e){if(!t){let s=typeof e=="function"?e():e||`expect ${t} to be true`;throw new Le(s)}}function ae(t,e=`unexpected ${JSON.stringify(t)}`){T(!t,e)}var Se=class extends E{equals(e){return S(f(e))}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return null}},G=class t extends E{equals(e){return e instanceof t?!1:(e=f(e),L(e)||k(e)?e.length===0:me(e)?Object.keys(e).length===0:!1)}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return""}static is(e){return e instanceof t}},Fe=class t extends G{equals(e){return e===!1||S(f(e))?!0:L(e)?/^\s*$/.test(e):super.equals(e)}static is(e){return e instanceof t}},X=class extends E{constructor(e,s,i){super(),this.i=0,this.length=e,this.name=`${i}-${s}`}next(){this.i++}index0(){return this.i}index(){return this.i+1}first(){return this.i===0}last(){return this.i===this.length-1}rindex(){return this.length-this.i}rindex0(){return this.length-this.i-1}valueOf(){return JSON.stringify(this)}},le=class extends E{constructor(e=()=>""){super(),this.superBlockRender=e}super(){return this.superBlockRender()}};function z(t){return t&&w(t.equals)&&w(t.gt)&&w(t.geq)&&w(t.lt)&&w(t.leq)}var zt=new Se,Zt={true:!0,false:!1,nil:zt,null:zt,empty:new G,blank:new Fe};function Nt(t){let e={};for(let[s,i]of Object.entries(t)){let r=e;for(let n=0;n<s.length;n++){let o=s[n];r[o]=r[o]||{},n===s.length-1&&se(s[n])&&(r[o].needBoundary=!0),r=r[o]}r.data=i,r.end=!0}return e}var he=function(){return he=Object.assign||function(e){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},he.apply(this,arguments)};function O(t,e,s,i){function r(n){return n instanceof s?n:new s(function(o){o(n)})}return new(s||(s=Promise))(function(n,o){function a(u){try{h(i.next(u))}catch(p){o(p)}}function l(u){try{h(i.throw(u))}catch(p){o(p)}}function h(u){u.done?n(u.value):r(u.value).then(a,l)}h((i=i.apply(t,e||[])).next())})}function M(t){return O(this,void 0,void 0,function*(){if(!ne(t))return t;let e,s=!1,i="next";do{let r=t[i](e);s=r.done,e=r.value,i="next";try{ne(e)&&(e=M(e)),cs(e)&&(e=yield e)}catch(n){i="throw",e=n}}while(!s);return e})}function I(t){if(!ne(t))return t;let e,s=!1,i="next";do{let r=t[i](e);if(s=r.done,e=r.value,i="next",ne(e))try{e=I(e)}catch(n){i="throw",e=n}}while(!s);return e}var _s=/%([-_0^#:]+)?(\d+)?([EO])?(.)/;function vs(t){return[31,Ls(t)?29:28,31,30,31,30,31,31,30,31,30,31]}function Gt(t){let e=0;for(let s=0;s<t.getMonth();++s)e+=vs(t)[s];return e+t.getDate()}function Dt(t,e){let s=Gt(t)+(e-t.getDay()),r=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((s-r)/7)+1)}function Ls(t){let e=t.getFullYear();return!!((e&3)===0&&(e%100||e%400===0&&e))}function Ss(t){let e=t.getDate();if([11,12,13].includes(e))return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}function Fs(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}var Os={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},Rs=new Set("aAbBceklpP");function Et(t,e){let s=Math.abs(t.getTimezoneOffset()),i=Math.floor(s/60),r=s%60;return(t.getTimezoneOffset()>0?"-":"+")+Z(i,2,"0")+(e.flags[":"]?":":"")+Z(r,2,"0")}var Oe={a:t=>t.getShortWeekdayName(),A:t=>t.getLongWeekdayName(),b:t=>t.getShortMonthName(),B:t=>t.getLongMonthName(),c:t=>
8t.toLocaleString(),C:t=>Fs(t),d:t=>t.getDate(),e:t=>t.getDate(),H:t=>t.getHours(),I:t=>String(t.getHours()%12||12),j:t=>Gt(t),k:t=>t.getHours(),l:t=>String(t.getHours()%12||12),L:t=>t.getMilliseconds(),m:t=>t.getMonth()+1,M:t=>t.getMinutes(),N:(t,e)=>{let s=Number(e.width)||9,i=String(t.getMilliseconds()).slice(0,s);return ps(i,s,"0")},p:t=>t.getHours()<12?"AM":"PM",P:t=>t.getHours()<12?"am":"pm",q:t=>Ss(t),s:t=>Math.round(t.getTime()/1e3),S:t=>t.getSeconds(),u:t=>t.getDay()||7,U:t=>Dt(t,0),w:t=>t.getDay(),W:t=>Dt(t,1),x:t=>t.toLocaleDateString(),X:t=>t.toLocaleTimeString(),y:t=>t.getFullYear().toString().slice(2,4),Y:t=>t.getFullYear(),z:Et,Z:(t,e)=>t.getTimeZoneName()||Et(t,e),t:()=>"	",n:()=>`
9`,"%":()=>"%"};Oe.h=Oe.b;function ie(t,e){let s="",i=e,r;for(;r=_s.exec(i);)s+=i.slice(0,r.index),i=i.slice(r.index+r[0].length),s+=zs(t,r);return s+i}function zs(t,e){let[s,i="",r,n,o]=e,a=Oe[o];if(!a)return s;let l={};for(let F of i)l[F]=!0;let h=String(a(t,{flags:l,width:r,modifier:n})),u=Rs.has(o)?" ":"0",p=r||Os[o]||0;return l["^"]?h=h.toUpperCase():l["#"]&&(h=gs(h)),l._?u=" ":l[0]&&(u="0"),l["-"]&&(p=0),Z(h,p,u)}function Xt(){return typeof Intl<"u"?Intl.DateTimeFormat:void 0}var Ns=6e4,Ds=/([zZ]|([+-])(\d{2}):(\d{2}))$/,Kt=["January","February","March","April","May","June","July","August","September","October","November","December"],Es=Kt.map(t=>t.slice(0,3)),es=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],$s=es.map(t=>t.slice(0,3)),q=class t{constructor(e,s,i){this.locale=s,this.DateTimeFormat=Xt(),this.date=new Date(e),this.timezoneFixed=i!==void 0,i===void 0&&(i=this.date.getTimezoneOffset()),this.timezoneOffset=L(i)?t.getTimezoneOffset(i,this.date):i,this.timezoneName=L(i)?i:"";let r=(this.date.getTimezoneOffset()-this.timezoneOffset)*Ns,n=this.date.getTime()+r;this.displayDate=new Date(n)}getTime(){return this.displayDate.getTime()}getMilliseconds(){return this.displayDate.getMilliseconds()}getSeconds(){return this.displayDate.getSeconds()}getMinutes(){return this.displayDate.getMinutes()}getHours(){return this.displayDate.getHours()}getDay(){return this.displayDate.getDay()}getDate(){return this.displayDate.getDate()}getMonth(){return this.displayDate.getMonth()}getFullYear(){return this.displayDate.getFullYear()}toLocaleString(e,s){return s?.timeZone?this.date.toLocaleString(e,s):this.displayDate.toLocaleString(e,s)}toLocaleTimeString(e){return this.displayDate.toLocaleTimeString(e)}toLocaleDateString(e){return this.displayDate.toLocaleDateString(e)}getTimezoneOffset(){return this.timezoneOffset}getTimeZoneName(){if(this.timezoneFixed)return this.timezoneName;if(this.DateTimeFormat)return this.DateTimeFormat().resolvedOptions().timeZone}getLongMonthName(){var e;return(e=this.format({month:"long"}))!==null&&e!==void 0?e:Kt[this.getMonth()]}getShortMonthName(){var e;return(e=this.format({month:"short"}))!==null&&e!==void 0?e:Es[this.getMonth()]}getLongWeekdayName(){var e;return(e=this.format({weekday:"long"}))!==null&&e!==void 0?e:es[this.displayDate.getDay()]}getShortWeekdayName(){var e;return(e=this.format({weekday:"short"}))!==null&&e!==void 0?e:$s[this.displayDate.getDay()]}valid(){return!isNaN(this.getTime())}format(e){return this.DateTimeFormat&&this.DateTimeFormat(this.locale,e).format(this.displayDate)}static createDateFixedToTimezone(e,s){let i=e.match(Ds);if(i&&i[1]==="Z")return new t(+new Date(e),s,0);if(i&&i[2]&&i[3]&&i[4]){let[,,r,n,o]=i,a=(r==="+"?-1:1)*(parseInt(n,10)*60+parseInt(o,10));return new t(+new Date(e),s,a)}return new t(e,s)}static getTimezoneOffset(e,s){let i=s.toLocaleString("en-US",{timeZone:e}),r=s.toLocaleString("en-US",{timeZone:"UTC"}),n=new Date(i);return(+new Date(r)-+n)/(60*1e3)}},K=class{constructor(e,s){this.base=0,this.message=`${e} limit exceeded`,this.limit=s}use(e){e=Lt(e),T(this.base+e<=this.limit,this.message),this.base+=e}check(e){e=Lt(e),T(e<=this.limit,this.message)}},ee=class extends x{constructor(e,[s,i],r,n,o,a,l,h){super(e,r,n,o,h),this.trimLeft=!1,this.trimRight=!1;let u=r[s]==="-",p=r[i-1]==="-",F=u?s+1:s,Y=p?i-1:i;for(;F<Y&&d[r.charCodeAt(F)]&U;)F++;for(;Y>F&&d[r.charCodeAt(Y-1)]&U;)Y--;this.contentRange=[F,Y],this.trimLeft=u||a,this.trimRight=p||l}get content(){return this.input.slice(this.contentRange[0],this.contentRange[1])}},ce=class extends ee{constructor(e,s,i,r,n){let{trimTagLeft:o,trimTagRight:a,tagDelimiterLeft:l,tagDelimiterRight:h}=r,[u,p]=[s+l.length,i-h.length];super(m.Tag,[u,p],e,s,i,o,a,n),this.tokenizer=new R(e,r.operators,n,this.contentRange),this.name=this.tokenizer.readTagName(),this.tokenizer.assert(this.name,"illegal tag syntax, tag name expected"),this.tokenizer.skipBlank()}get args(){return this.tokenizer.input.slice(this.tokenizer.p,this.contentRange[1])}},Re=class extends ee{constructor(e,s,i,r,n){let{trimOutputLeft:o,trimOutputRight:a,outputDelimiterLeft:l,outputDelimiterRight:h}=r,u=[s+l.length,i-h.length];super(m.Output,u,e,s,i,o,a,n)}},ue=class extends x{constructor(e,s,i,r){super(m.HTML,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.trimLeft=0,this.trimRight=0}getContent(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)}},ze=class extends x{constructor(e,s,i,r){super(m.Number,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=Number(this.getText())}},J=class extends x{constructor(e,s,i,r){super(m.Word,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=this.getText()}},Ne=class extends x{constructor(e,s,i,r){super(m.Literal,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.literal=this.getText(),this.content=Zt[this.literal]}},$t={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},qs={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0},De=class extends x{constructor(e,s,i,r){super(m.Operator,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.operator=this.getText()}getPrecedence(){let e=this.getText();return e in $t?$t[e]:1}},fe=class extends x{constructor(e,s,i,r,n,o){super(m.PropertyAccess,i,r,n,o),this.variable=e,this.props=s}},de=class extends x{constructor(e,s,i,r,n,o){super(m.Filter,i,r,n,o),this.name=e,this.args=s}},Ee=class extends x{constructor(e,s,i,r,n,o){super(m.Hash,e,s,i,o),this.input=e,this.begin=s,this.end=i,this.name=r,this.value=n,this.file=o}},Ms=/[\da-fA-F]/,qt=/[0-7]/,Mt={b:"\b",f:"\f",n:`
10`,r:"\r",t:"	",v:"\v"};function It(t){let e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function Is(t){let e="";for(let s=1;s<t.length-1;s++){if(t[s]!=="\\"){e+=t[s];continue}if(Mt[t[s+1]]!==void 0)e+=Mt[t[++s]];else if(t[s+1]==="u"){let i=0,r=s+2;
10for(;r<=s+5&&Ms.test(t[r]);)i=i*16+It(t[r++]);s=r-1,e+=String.fromCharCode(i)}else if(!qt.test(t[s+1]))e+=t[++s];else{let i=s+1,r=0;for(;i<=s+3&&qt.test(t[i]);)r=r*8+It(t[i++]);s=i-1,e+=String.fromCharCode(r)}}return e}var $e=class extends x{constructor(e,s,i,r){super(m.Quoted,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=Is(this.getText())}},qe=class extends x{constructor(e,s,i,r,n,o){super(m.Range,e,s,i,o),this.input=e,this.begin=s,this.end=i,this.lhs=r,this.rhs=n,this.file=o}},Me=class extends ee{constructor(e,s,i,r,n){super(m.Tag,[s,i],e,s,i,!1,!1,n),this.tokenizer=new R(e,r.operators,n,this.contentRange),this.name=this.tokenizer.readTagName(),this.tokenizer.assert(this.name,"illegal liquid tag syntax"),this.tokenizer.skipBlank(),this.args=this.tokenizer.remaining()}},Ie=class extends x{constructor(e,s,i,r,n,o){super(m.FilteredValue,i,r,n,o),this.initial=e,this.filters=s,this.input=i,this.begin=r,this.end=n,this.file=o}},Ps={now:()=>Date.now()};function ts(){return typeof global=="object"&&global.performance||typeof window=="object"&&window.performance||Ps}var Pe=class{constructor(){this.buffer=""}write(e){this.buffer+=c(e)}},Ae=class{constructor(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")}},Ve=class{constructor(){this.buffer=""}write(e){e=f(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=c(this.buffer)+c(e)}},Ce=class{renderTemplatesToNodeStream(e,s){let i=new Ae;return Promise.resolve().then(()=>M(this.renderTemplates(e,s,i))).then(()=>i.end(),r=>i.error(r)),i.stream}*renderTemplates(e,s,i){i||(i=s.opts.keepOutputType?new Ve:new Pe);let r=[];for(let n of e){s.renderLimit.check(ts().now());try{let o=yield n.render(s,i);if(o&&i.write(o),i.break||i.continue)break}catch(o){let a=$.is(o)?o:new xe(o,n);if(s.opts.catchAllErrors)r.push(a);else throw a}}if(r.length)throw new oe(r);return i.buffer}},je=class{constructor(e){this.postfix=[...Cs(e)]}*evaluate(e,s){T(e,"unable to evaluate: context not defined");let i=[];for(let r of this.postfix)if(ns(r)){let n=i.pop(),o;if(qs[r.operator]===1)o=yield e.opts.operators[r.operator](n,e);else{let a=i.pop();o=yield e.opts.operators[r.operator](a,n,e)}i.push(o)}else i.push(yield y(r,e,s));return i[0]}valid(){return!!this.postfix.length}};function*y(t,e,s=!1){if(t){if("content"in t)return t.content;if(Ti(t))return yield As(t,e,s);if(xi(t))return yield Vs(t,e)}}function*As(t,e,s){let i=[];for(let r of t.props)i.push(yield y(r,e,!1));try{if(t.variable){let r=yield y(t.variable,e,s);return yield e._getFromScope(r,i)}else return yield e._get(i)}catch(r){if(s&&r.name==="InternalUndefinedVariableError")return null;throw new _e(r,t)}}function ss(t){return t.content}function*Vs(t,e){let s=yield y(t.lhs,e),i=yield y(t.rhs,e);return Wt(+s,+i+1)}function*Cs(t){let e=[];for(let s of t)if(ns(s)){for(;e.length&&e[e.length-1].getPrecedence()>s.getPrecedence();)yield e.pop();e.push(s)}else yield s;for(;e.length;)yield e.pop()}function C(t,e){return!ye(t,e)}function ye(t,e){return t=f(t),e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}var js={"==":N,"!=":(t,e)=>!N(t,e),">":(t,e)=>z(t)?t.gt(e):z(e)?e.lt(t):f(t)>f(e),"<":(t,e)=>z(t)?t.lt(e):z(e)?e.gt(t):f(t)<f(e),">=":(t,e)=>z(t)?t.geq(e):z(e)?e.leq(t):f(t)>=f(e),"<=":(t,e)=>z(t)?t.leq(e):z(e)?e.geq(t):f(t)<=f(e),contains:(t,e)=>(t=f(t),k(t)?t.some(s=>N(s,e)):w(t?.indexOf)?t.indexOf(f(e))>-1:!1),not:(t,e)=>ye(f(t),e),and:(t,e,s)=>C(f(t),s)&&C(f(e),s),or:(t,e,s)=>C(f(t),s)||C(f(e),s)};function N(t,e){return z(t)?t.equals(e):z(e)?e.equals(t):(t=f(t),e=f(e),k(t)?k(e)&&Bs(t,e):t===e)}function Bs(t,e){return t.length!==e.length?!1:!t.some((s,i)=>!N(s,e[i]))}function Hs(t,e){return t.some(s=>N(s,e))}var Q=class{constructor(e,s,i,r){this.key=e,this.value=s,this.next=i,this.prev=r}},pe=class{constructor(e,s=0){this.limit=e,this.size=s,this.cache={},this.head=new Q("HEAD",null,null,null),this.tail=new Q("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}write(e,s){if(this.cache[e])this.cache[e].value=s;else{let i=new Q(e,s,this.head.next,this.head);this.head.next.prev=i,this.head.next=i,this.cache[e]=i,this.size++,this.ensureLimit()}}read(e){if(!this.cache[e])return;let{value:s}=this.cache[e];return this.remove(e),this.write(e,s),s}remove(e){let s=this.cache[e];
10s.prev.next=s.next,s.next.prev=s.prev,delete this.cache[e],this.size--}clear(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}}ensureLimit(){this.size>this.limit&&this.remove(this.tail.prev.key)}};function is(t,e){let s=document.createElement("base");s.href=t;let i=document.getElementsByTagName("head")[0];i.insertBefore(s,i.firstChild);let r=document.createElement("a");r.href=e;let n=r.href;return i.removeChild(s),n}function Us(t,e,s){return t.length&&Ut(t)!=="/"&&(t+="/"),is(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,(r,n,o)=>{let a=o.split("/").pop();return/\.\w+$/.test(a)?r:n+o+s})}function Ws(t){return O(this,void 0,void 0,function*(){return new Promise((e,s)=>{let i=new XMLHttpRequest;i.onload=()=>{i.status>=200&&i.status<300?e(i.responseText):s(new Error(i.statusText))},i.onerror=()=>{s(new Error("An error occurred whilst receiving the response."))},i.open("GET",t),i.send()})})}function Ys(t){let e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(),e.status<200||e.status>=300)throw new Error(e.statusText);return e.responseText}function Js(t){return O(this,void 0,void 0,function*(){return!0})}function Qs(t){return!0}function Zs(t){return is(t,".")}var Gs="/",Xs=Object.freeze({__proto__:null,resolve:Us,readFile:Ws,readFileSync:Ys,exists:Js,existsSync:Qs,dirname:Zs,sep:Gs});function Ks(t,e,...s){return t=f(t),k(t)||L(t)?t.length?t:e:t===!1&&new Map(s).get("allow_false")?!1:ye(t,this.context)?e:t}function Pt(t,e=0){return JSON.stringify(t,null,e)}function ei(t,e=0){let s=[];return JSON.stringify(t,function(i,r){if(typeof r!="object"||r===null)return r;for(;s.length>0&&s[s.length-1]!==this;)s.pop();return s.includes(r)?"[Circular]":(s.push(r),r)},e)}function ti(t){return Number(t)}var si={raw:!0,handler:Jt},rs={default:Ks,raw:si,jsonify:Pt,to_integer:ti,json:Pt,inspect:ei},ii={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},ri={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function we(t){return t=c(t),this.context.memoryLimit.use(t.length),t.replace(/&|<|>|"|'/g,e=>ii[e])}function ni(t){return we.call(this,t)}function oi(t){return t=c(t),this.context.memoryLimit.use(t.length),t.replace(/&(amp|lt|gt|#34|#39);/g,e=>ri[e])}function ai(t){return we.call(this,oi.call(this,t))}function li(t){let e=c(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,`<br />
11`)}function hi(t){let e=c(t);return this.context.memoryLimit.use(e.length),e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g,"")}var ci=Object.freeze({__proto__:null,escape:we,xml_escape:ni,escape_once:ai,newline_to_br:li,strip_html:hi}),Be=class{constructor(e){this.mapping=e,this.sep="/"}exists(e){return O(this,void 0,void 0,function*(){return this.existsSync(e)})}existsSync(e){return!S(this.mapping[e])}readFile(e){return O(this,void 0,void 0,function*(){return this.readFileSync(e)})}readFileSync(e){let s=this.mapping[e];if(S(s))throw new Error(`ENOENT: ${e}`);return s}dirname(e){let s=e.split(this.sep);return s.pop(),s.join(this.sep)}resolve(e,s,i){if(s+=i,e===".")return s;let r=e.split(/\/+/);for(let n of s.split(this.sep))n==="."||n===""||(n===".."?(r.length>1||r[0]!=="")&&r.pop():r.push(n));return r.join(this.sep)}},B={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,keyValueSeparator:":",cache:void 0,extname:"",fs:Xs,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",locale:"",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:js,memoryLimit:1/0,parseLimit:1/0,renderLimit:1/0};function ui(t){var e,s;if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let i;typeof t.cache=="number"?i=t.cache>
110?new pe(t.cache):void 0:typeof t.cache=="object"?i=t.cache:i=t.cache?new pe(1024):void 0,t.cache=i}return t=Object.assign(Object.assign(Object.assign({},B),t.jekyllInclude?{dynamicPartials:!1}:{}),t),(!t.fs.dirname||!t.fs.sep)&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"),t.relativeReference=!1),t.root=re(t.root),t.partials=re(t.partials),t.layouts=re(t.layouts),t.outputEscape=t.outputEscape&&fi(t.outputEscape),t.locale||(t.locale=(s=(e=Xt())===null||e===void 0?void 0:e().resolvedOptions().locale)!==null&&s!==void 0?s:"en-US"),t.templates&&(t.fs=new Be(t.templates),t.relativeReference=!0,t.root=t.partials=t.layouts="."),t}function fi(t){return t==="escape"?we:t==="json"?rs.json:(T(w(t),"`outputEscape` need to be of type string or function"),t)}function re(t){let e=[];return k(t)&&(e=t),L(t)&&(e=[t]),e}function di(t,e){let s=!1;for(let i=0;i<t.length;i++){let r=t[i];wi(r)&&(!s&&r.trimLeft&&pi(t[i-1],e.greedy),j(r)&&(r.name==="raw"?s=!0:r.name==="endraw"&&(s=!1)),!s&&r.trimRight&&gi(t[i+1],e.greedy))}}function pi(t,e){if(!t||!kt(t))return;let s=e?U:Qt;for(;d[t.input.charCodeAt(t.end-1-t.trimRight)]&s;)t.trimRight++}function gi(t,e){if(!t||!kt(t))return;let s=e?U:Qt;for(;d[t.input.charCodeAt(t.begin+t.trimLeft)]&s;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
12`&&t.trimLeft++}var R=class{constructor(e,s=B.operators,i,r){this.input=e,this.file=i,this.rawBeginAt=-1,this.p=r?r[0]:0,this.N=r?r[1]:e.length,this.opTrie=Nt(s),this.literalTrie=Nt(Zt)}readExpression(){return new je(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){let e=this.readOperator();if(e){yield e;continue}let s=this.readValue();if(s){yield s;continue}return}}readOperator(){this.skipBlank();let e=this.matchTrie(this.opTrie);if(e!==-1)return new De(this.input,this.p,this.p=e,this.file)}matchTrie(e){let s=e,i=this.p,r;for(;s[this.input[i]]&&i<this.N;)s=s[this.input[i++]],s.end&&(r=s);return!r||r.needBoundary&&se(this.peek(i-this.p))?-1:i}readFilteredValue(){let e=this.p,s=this.readExpression();this.assert(s.valid(),`invalid value expression: ${this.snapshot()}`);let i=this.readFilters();return new Ie(s,i,this.input,e,this.p,this.file)}readFilters(){let e=[];for(;;){let s=this.readFilter();if(!s)return e;e.push(s)}}readFilter(){if(this.skipBlank(),this.end())return null;this.assert(this.read()==="|",'expected "|" before filter');let e=this.readIdentifier();if(!e.size())return this.assert(this.end(),"expected filter name"),null;let s=[];if(this.skipBlank(),this.peek()===":")do{++this.p;let i=this.readFilterArg();i&&s.push(i),this.skipBlank(),this.assert(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");else if(!(this.peek()==="|"||this.end()))throw this.error('expected ":" after filter name');return new de(e.getText(),s,this.input,e.begin,this.p,this.file)}readFilterArg(){let e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;let s=this.readValue();return[e.getText(),s]}readTopLevelTokens(e=B){let s=[];for(;this.p<this.N;){let i=this.readTopLevelToken(e);s.push(i)}return di(s,e),s}readTopLevelToken(e){let{tagDelimiterLeft:s,outputDelimiterLeft:i}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(s)?this.readTagToken(e):this.match(i)?this.readOutputToken(e):this.readHTMLToken([s,i])}readHTMLToken(e){let s=this.p;for(;this.p<this.N&&!e.some(i=>this.match(i));)++this.p;return new ue(this.input,s,this.p,this.file)}readTagToken(e){let{file:s,input:i}=this,r=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.error(`tag ${this.snapshot(r)} not closed`,r);let n=new ce(i,r,this.p,e,s);return n.name==="raw"&&(this.rawBeginAt=r),n}readToDelimiter(e,s=!1){for(this.skipBlank();this.p<this.N;){if(s&&this.peekType()&Rt){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=B){let{file:s,input:i}=this,{outputDelimiterRight:r}=e,n=this.p;if(this.readToDelimiter(r,!0)===-1)throw this.error(`output ${this.snapshot(n)}
12 not closed`,n);return new Re(i,n,this.p,e,s)}readEndrawOrRawContent(e){let{tagDelimiterLeft:s,tagDelimiterRight:i}=e,r=this.p,n=this.readTo(s)-s.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){n=this.readTo(s)-s.length;continue}for(;this.p<=this.N;){if(this.rmatch(i)){let o=this.p;return r===n?(this.rawBeginAt=-1,new ce(this.input,r,o,e,this.file)):(this.p=n,new ue(this.input,r,n,this.file))}if(this.rmatch(s))break;this.p++}}throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`,r)}readLiquidTagTokens(e=B){let s=[];for(;this.p<this.N;){let i=this.readLiquidTagToken(e);i&&s.push(i)}return s}readLiquidTagToken(e){if(this.skipBlank(),this.end())return;let s=this.p;this.readToDelimiter(`
13`);let i=this.p;return new Me(this.input,s,i,e,this.file)}error(e,s=this.p){return new ke(e,new J(this.input,s,this.N,this.file))}assert(e,s,i){if(!e)throw this.error(typeof s=="function"?s():s,i)}snapshot(e=this.p){return JSON.stringify(ms(this.input.slice(e,this.N),32))}readWord(){return this.readIdentifier()}readIdentifier(){this.skipBlank();let e=this.p;for(;!this.end()&&se(this.peek());)++this.p;return new J(this.input,e,this.p,this.file)}readNonEmptyIdentifier(){let e=this.readIdentifier();return e.size()?e:void 0}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){let s=[];for(;;){let i=this.readHash(e);if(!i)return s;s.push(i)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;let s=this.p,i=this.readNonEmptyIdentifier();if(!i)return;let r;this.skipBlank();let n=L(e)?e:e?"=":":";return this.peek()===n&&(++this.p,r=this.readValue()),new Ee(this.input,s,this.p,i,r,this.file)}remaining(){return this.input.slice(this.p,this.N)}advance(e=1){this.p+=e}end(){return this.p>=this.N}read(){return this.input[this.p++]}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){this.skipBlank();let e=this.p,s=this.readLiteral()||this.readQuoted()||this.readRange()||this.readNumber(),i=this.readProperties(!s);return i.length?new fe(s,i,this.input,e,this.p):s}readScopeValue(){this.skipBlank();let e=this.p,s=this.readProperties();if(s.length)return new fe(void 0,s,this.input,e,this.p)}readProperties(e=!0){let s=[];for(;;){if(this.peek()==="["){this.p++;let i=this.readValue()||new J(this.input,this.p,this.p,this.file);this.assert(this.readTo("]")!==-1,"[ not closed"),s.push(i);continue}if(e&&!s.length){let i=this.readNonEmptyIdentifier();if(i){s.push(i);continue}}if(this.peek()==="."&&this.peek(1)!=="."){this.p++;let i=this.readNonEmptyIdentifier();if(!i)break;s.push(i);continue}break}return s}readNumber(){this.skipBlank();let e=!1,s=!1,i=0;for(this.peekType()&Ts&&i++;this.p+i<=this.N;)if(this.peekType(i)&ks)s=!0,i++;else if(this.peek(i)==="."&&this.peek(i+1)!=="."){if(e||!s)return;e=!0,i++}else break;if(s&&!se(this.peek(i))){let r=new ze(this.input,this.p,this.p+i,this.file);return this.advance(i),r}}readLiteral(){this.skipBlank();let e=this.matchTrie(this.literalTrie);if(e===-1)return;let s=new Ne(this.input,this.p,e,this.file);return this.p=e,s}readRange(){this.skipBlank();let e=this.p;
13if(this.peek()!=="(")return;++this.p;let s=this.readValueOrThrow();this.p+=2;let i=this.readValueOrThrow();return++this.p,new qe(this.input,e,this.p,s,i,this.file)}readValueOrThrow(){let e=this.readValue();return this.assert(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();let e=this.p;if(!(this.peekType()&Rt))return;++this.p;let s=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!s));)s?s=!1:this.input[this.p-1]==="\\"&&(s=!0);return new $e(this.input,e,this.p,this.file)}*readFileNameTemplate(e){let{outputDelimiterLeft:s}=e,i=[","," ",s],r=new Set(i);for(;this.p<this.N&&!r.has(this.peek());)yield this.match(s)?this.readOutputToken(e):this.readHTMLToken(i)}match(e){for(let s=0;s<e.length;s++)if(e[s]!==this.input[this.p+s])return!1;return!0}rmatch(e){for(let s=0;s<e.length;s++)if(e[e.length-1-s]!==this.input[this.p-1-s])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:d[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&U;)++this.p}},He=class{constructor(e,s){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=s}on(e,s){return this.handlers[e]=s,this}trigger(e,s){let i=this.handlers[e];return i?(i.call(this,s),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||j(e)&&this.trigger(`tag:${e.name}`,e))continue;let s=this.parseToken(e,this.tokens);this.trigger("template",s)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}},te=class{constructor(e){this.token=e}},g=class extends te{constructor(e,s,i){super(e),this.name=e.name,this.liquid=i,this.tokenizer=e.tokenizer}},P=class{constructor(e,s){this.hash={};let i=new R(e,{});for(let r of i.readHashes(s))this.hash[r.name.content]=r.value}*render(e){let s={};for(let i of Object.keys(this.hash))s[i]=this.hash[i]===void 0?!0:yield y(this.hash[i],e);return s}};function mi(t){return class extends g{constructor(e,s,i){super(e,s,i),w(t.parse)&&t.parse.call(this,e,s)}*render(e,s){let i=yield new P(this.token.args,e.opts.keyValueSeparator).render(e);return yield t.render.call(this,e,s,i)}}}function yi(t){return k(t)}var ge=class{constructor(e,s,i){this.token=e,this.name=e.name,this.handler=w(s)?s:w(s?.handler)?s.handler:Jt,this.raw=!w(s)&&!!s?.raw,this.args=e.args,this.liquid=i}*render(e,s){let i=[];for(let r of this.args)yi(r)?i.push([r[0],yield y(r[1],s)]):i.push(yield y(r,s));return yield this.handler.apply({context:s,token:this.token,liquid:this.liquid},[e,...i])}},_=class{constructor(e,s){this.filters=[];let i=typeof e=="string"?new R(e,s.options.operators).readFilteredValue():e;this.initial=i.initial,this.filters=i.filters.map(r=>new ge(r,this.getFilter(s,r.name),s))}*value(e,s){s=s||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let i=yield this.initial.evaluate(e,s);for(let r of this.filters)i=yield r.render(i,e);return i}getFilter(e,s){let i=e.filters[s];return T(i||!e.options.strictFilters,()=>`undefined filter: ${s}`),i}},Ue=class extends te{constructor(e,s){var i;super(e);let r=new R(e.input,s.options.operators,e.file,e.contentRange);this.value=new _(r.readFilteredValue(),s);let n=this.value.filters,o=s.options.outputEscape;if(!(!((i=n[n.length-1])===null||i===void 0)&&i.raw)&&o){let a=new de(toString.call(o),[],"",0,0);n.push(new ge(a,o,s))}}*render(e,s){let i=yield this.value.value(e,!1);s.write(i)}},We=class extends te{constructor(e){super(e),this.str=e.getContent()}*render(e,s){s.write(this.str)}},W=(function(t){return t.Partials="partials",t.Layouts="layouts",t.Root="root",t})(W||{}),Ye=class{constructor(e){if(this.options=e,e.relativeReference){let s=e.fs.sep;T(s,"`fs.sep` is required for relative reference");let i=new RegExp(["."+s,".."+s,"./","../"].map(r=>us(r)).join("|"));this.shouldLoadRelative=r=>i.test(r)}else this.shouldLoadRelative=s=>!1;this.contains=this.options.fs.contains||(()=>!0)}*lookup(e,s,i,r){let{fs:n}=this.options,o=this.options[s];for(let a of this.candidates(e,o,r,s!==W.Root))if(i?n.existsSync(a):yield n.exists(a)
13)return a;throw this.lookupError(e,o)}*candidates(e,s,i,r){let{fs:n,extname:o}=this.options;if(this.shouldLoadRelative(e)&&i){let a=n.resolve(this.dirname(i),e,o);for(let l of s)if(!r||this.contains(l,a)){yield a;break}}for(let a of s){let l=n.resolve(a,e,o);(!r||this.contains(a,l))&&(yield l)}if(n.fallback!==void 0){let a=n.fallback(e);a!==void 0&&(yield a)}}dirname(e){let s=this.options.fs;return T(s.dirname,"`fs.dirname` is required for relative reference"),s.dirname(e)}lookupError(e,s){let i=new Error("ENOENT");return i.message=`ENOENT: Failed to lookup "${e}" in "${s}"`,i.code="ENOENT",i}},D=class{constructor(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Ye(this.liquid.options),this.parseLimit=new K("parse length",e.options.parseLimit)}parse(e,s){e=String(e),this.parseLimit.use(e.length);let r=new R(e,this.liquid.options.operators,s).readTopLevelTokens(this.liquid.options);return this.parseTokens(r)}
13parseTokens(e){let s,i=[],r=[];for(;s=e.shift();)try{i.push(this.parseToken(s,e))}catch(n){if(this.liquid.options.catchAllErrors)r.push(n);else throw n}if(r.length)throw new oe(r);return i}parseToken(e,s){try{if(j(e)){let i=this.liquid.tags[e.name];return T(i,`tag "${e.name}" not found`),new i(e,s,this.liquid,this)}return bi(e)?new Ue(e,this.liquid):new We(e)}catch(i){throw $.is(i)?i:new Te(i,e)}}parseStream(e){return new He(e,(s,i)=>this.parseToken(s,i))}*_parseFileCached(e,s,i=W.Root,r){let n=this.cache,o=this.loader.shouldLoadRelative(e)?r+","+e:i+":"+e,a=yield n.read(o);if(a)return a;let l=this._parseFile(e,s,i,r),h=s?yield l:M(l);n.write(o,h);try{return yield h}catch(u){throw n.remove(o),u}}*_parseFile(e,s,i=W.Root,r){let n=yield this.loader.lookup(e,i,s,r);return this.parse(s?this.fs.readFileSync(n):yield this.fs.readFile(n),n)}},m=(function(t){return t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.FilteredValue=4096]="FilteredValue",t[t.Delimited=12]="Delimited",t})(m||{});function wi(t){return!!(A(t)&m.Delimited)}function ns(t){return A(t)===m.Operator}function kt(t){return A(t)===m.HTML}function bi(t){return A(t)===m.Output}function j(t){return A(t)===m.Tag}function ki(t){return A(t)===m.Quoted}function Ti(t){return A(t)===m.PropertyAccess}function xi(t){return A(t)===m.Range}function A(t){return t?t.kind:-1}var V=class t{constructor(e={},s=B,i={},{memoryLimit:r,renderLimit:n}={}){var o,a,l,h,u;this.scopes=[{}],this.registers={},this.sync=!!i.sync,this.opts=s,this.globals=(o=i.globals)!==null&&o!==void 0?o:s.globals,this.environments=me(e)?e:Object(e),this.strictVariables=(a=i.strictVariables)!==null&&a!==void 0?a:this.opts.strictVariables,this.ownPropertyOnly=(l=i.ownPropertyOnly)!==null&&l!==void 0?l:s.ownPropertyOnly,this.memoryLimit=r??new K("memory alloc",(h=i.memoryLimit)!==null&&h!==void 0?h:s.memoryLimit),this.renderLimit=n??new K("template render",ts().now()+((u=i.renderLimit)!==null&&u!==void 0?u:s.renderLimit))}getRegister(e){return this.registers[e]=this.registers[e]||{}}setRegister(e,s){return this.registers[e]=s}saveRegister(...e){return e.map(s=>[s,this.getRegister(s)])}restoreRegister(e){return e.forEach(([s,i])=>this.setRegister(s,i))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,s)=>he(e,s),{})}get(e){return this.getSync(e)}getSync(e){return I(this._get(e))}*_get(e){let s=this.findScope(e[0]);return yield this._getFromScope(s,e)}getFromScope(e,s){return I(this._getFromScope(e,s))}*_getFromScope(e,s,i=this.strictVariables){L(s)&&(s=s.split("."));for(let r=0;r<s.length;r++)if(e=yield _i(e,s[r],this.ownPropertyOnly),i&&fs(e))throw new ve(s.slice(0,r+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new t(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let s=this.scopes.length-1;s>=0;s--){let i=this.scopes[s];if(e in i)return i}return e in this.environments?this.environments:this.globals}};function _i(t,e,s){if(t=Ht(t),e=f(e),S(t))return t;if(k(t)&&e<0)return t[t.length+ +e];let i=vi(t,e,s);return i===void 0&&t instanceof E?t.liquidMethodMissing(e):w(i)?i.call(t):e==="size"?Fi(t):e==="first"?Li(t):e==="last"?Si(t):i}function vi(t,e,s){if(!(s&&!mt.call(t,e)&&!(t instanceof E)))return t[e]}function Li(t){return k(t)?t[0]:t.first}function Si(t){return k(t)?t[t.length-1]:t.last}function Fi(t){if(mt.call(t,"size")||t.size!==void 0)return t.size;if(k(t)||L(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var H=(function(t){return t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE",t})(H||{}),Oi=v(Math.abs),Ri=v(Math.max),zi=v(Math.min),Ni=v(Math.ceil),Di=v((t,e,s=!1)=>s?Math.floor(t/e):t/e),Ei=v(Math.floor),$i=v((t,e)=>t-e),qi=v((t,e)=>t%e),Mi=v((t,e)=>t*e);function Ii(t,e=0){t=f(t),e=f(e);let s=Math.pow(10,e);return Math.round(t*s)/s}function Pi(t,e){return t=f(t),e=f(e),Number(t)+Number(e)}var Ai=Object.freeze({__proto__:null,abs:Oi,at_least:Ri,at_most:zi,ceil:Ni,divided_by:Di,floor:Ei,minus:$i,modulo:qi,times:Mi,round:Ii,plus:Pi}),Vi=t=>decodeURIComponent(c(t)).replace(/\+/g," "),Ci=t=>encodeURIComponent(c(t)).replace(/%20/g,"+"),ji=t=>encodeURIComponent(c(t)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Bi=t=>encodeURI(c(t)).replace(/%5B/g,"[").replace(/%5D/g,"]"),At=/[^\p{M}\p{L}\p{Nd}]+/ug,Hi={raw:/\s+/g,default:At,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:At,none:null};function Ui(t,e="default",s=!1){t=c(t);let i=Hi[e];return i&&(e==="latin"&&(t=Wi(t)),t=t.replace(i,"-").replace(/^-|-$/g,"")),s?t:t.toLowerCase()}function Wi(t){return t.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH")}var Yi=Object.freeze({__proto__:null,url_decode:Vi,url_encode:Ci,cgi_escape:ji,uri_escape:Bi,slugify:Ui}),Ji=v(function(t,e){let s=b(t),i=S(e)?" ":c(e),r=s.length*(1+i.length);return this.context.memoryLimit.use(r),s.join(i)}),Qi=v(t=>k(t)?Ut(t):""),Zi=v(t=>k(t)?t[0]:""),Gi=v(function(t){let e=b(t);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*Xi(t,e){let s=[],i=b(t);this.context.memoryLimit.use(i.length);for(let r of i)s.push([r,e?yield this.context._getFromScope(r,c(e).split("."),!1):r]);return s.sort((r,n)=>{let o=r[1],a=n[1];return o<a?-1:o>a?1:0}).map(r=>r[0])}function Ki(t,e){let s=c(e),i=e===void 0?Ft:(n,o)=>Ft(n[s],o[s]),r=b(t);return this.context.memoryLimit.use(r.length),[...r].sort(i)}var er=t=>t&&t.length||0;function*tr(t,e){let s=[],i=b(t);this.context.memoryLimit.use(i.length);for(let r of i)s.push(yield this.context._getFromScope(r,c(e),!1));return s}function*sr(t,e){let s=0,i=b(t);for(let r of i){let n=Number(e?yield this.context._getFromScope(r,c(e),!1):r);s+=Number.isNaN(n)?0:n}return s}function ir(t){let e=b(t);return this.context.memoryLimit.use(e.length),e.filter(s=>!S(f(s)))}function os(t,e=[]){let s=b(t),i=b(e);return this.context.memoryLimit.use(s.length+i.length),s.concat(i)}function rr(t,e){return os.call(this,t,[e])}function nr(t,e){let s=b(t);this.context.memoryLimit.use(s.length);let i=[...s];return i.unshift(e),i}function or(t){let e=[...b(t)];return e.pop(),e}function ar(t){let e=b(t);this.context.memoryLimit.use(e.length);let s=[...e];return s.shift(),s}function lr(t,e,s=1){return t=f(t),S(t)?[]:(k(t)||(t=c(t)),e=e<0?t.length+e:e,this.context.memoryLimit.use(s),t.slice(e,e+s))}function*hr(t,e,s){let i=[];t=b(t),this.context.memoryLimit.use(t.length);let r=new R(c(e)).readScopeValue();for(let o of t)i.push(yield y(r,this.context.spawn(o)));let n=this.context.opts.jekyllWhere?o=>G.is(s)?N(o,s):k(o)?Hs(o,s):N(o,s):o=>N(o,s);return t.filter((o,a)=>s===void 0?C(i[a],this.context):n(i[a]))}
13function*cr(t,e,s){let i=[],r=new _(c(s),this.liquid),n=b(t);this.context.memoryLimit.use(n.length);for(let o of n)(yield r.value(this.context.spawn({[e]:o})))&&i.push(o);return i}function*ur(t,e){let s=new Map;t=b(t);let i=new R(c(e)).readScopeValue();this.context.memoryLimit.use(t.length);for(let r of t){let n=yield y(i,this.context.spawn(r));s.has(n)||s.set(n,[]),s.get(n).push(r)}return[...s.entries()].map(([r,n])=>({name:r,items:n}))}function*fr(t,e,s){let i=new Map,r=new _(c(s),this.liquid);t=b(t),this.context.memoryLimit.use(t.length);for(let n of t){let o=yield r.value(this.context.spawn({[e]:n}));i.has(o)||i.set(o,[]),i.get(o).push(n)}return[...i.entries()].map(([n,o])=>({name:n,items:o}))}function*dr(t,e,s){let i=new R(c(e)).readScopeValue(),r=b(t);for(let n of r){let o=yield y(i,this.context.spawn(n));if(N(o,s))return n}}function*pr(t,e,s){let i=new _(c(s),this.liquid),r=b(t);for(let n of r)if(yield i.value(this.context.spawn({[e]:n})))return n}function gr(t){return t=b(t),this.context.memoryLimit.use(t.length),[...new Set(t)]}function mr(t,e=1){if(t=f(t),S(t))return[];k(t)||(t=c(t)),this.context.memoryLimit.use(e);let s=[...t].sort(()=>Math.random()-.5);return e===1?s[0]:s.slice(0,e)}var yr=Object.freeze({__proto__:null,join:Ji,last:Qi,first:Zi,reverse:Gi,sort:Xi,sort_natural:Ki,size:er,map:tr,sum:sr,compact:ir,concat:os,push:rr,unshift:nr,pop:or,shift:ar,slice:lr,where:hr,where_exp:cr,group_by:ur,group_by_exp:fr,find:dr,find_exp:pr,uniq:gr,sample:mr});function Tt(t,e,s){var i,r,n;let o=((i=t?.length)!==null&&i!==void 0?i:0)+((r=e?.length)!==null&&r!==void 0?r:0)+((n=s?.length)!==null&&n!==void 0?n:0);this.context.memoryLimit.use(o);let a=ls(t,this.context.opts,s);return a?(e=f(e),e=S(e)?this.context.opts.dateFormat:c(e),ie(a,e)):t}function wr(t){return Tt.call(this,t,"%Y-%m-%dT%H:%M:%S%:z")}function br(t){return Tt.call(this,t,"%a, %d %b %Y %H:%M:%S %z")}function kr(t,e,s){return as.call(this,t,"%b",e,s)}function Tr(t,e,s){return as.call(this,t,"%B",e,s)}function as(t,e,s,i){let r=ls(t,this.context.opts);if(!r)return t;if(s==="ordinal"){let n=r.getDate();return i==="US"?ie(r,`${e} ${n}%q, %Y`):ie(r,`${n}%q ${e} %Y`)}return ie(r,`%d ${e} %Y`)}function ls(t,e,s){let i,r=s??e.timezoneOffset,n=e.locale;return t=f(t),t==="now"||t==="today"?i=new q(Date.now(),n,r):wt(t)?i=new q(t*1e3,n,r):L(t)?/^\d+$/.test(t)?i=new q(+t*1e3,n,r):e.preserveTimezones&&s===void 0?i=q.createDateFixedToTimezone(t,n):i=new q(t,n,r):i=new q(t,n,r),i.valid()?i:void 0}var xr=Object.freeze({__proto__:null,date:Tt,date_to_xmlschema:wr,date_to_rfc822:br,date_to_string:kr,date_to_long_string:Tr}),be=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,Vt=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function _r(t,e){T(arguments.length===2,"append expect 2 arguments");let s=c(t),i=c(e);return this.context.memoryLimit.use(s.length+i.length),s+i}function vr(t,e){T(arguments.length===2,"prepend expect 2 arguments");let s=c(t),i=c(e);return this.context.memoryLimit.use(s.length+i.length),i+s}function Lr(t,e){let s=c(t);return this.context.memoryLimit.use(s.length),e?(e=bt(c(e)),s.replace(new RegExp(`^[${e}]+`,"g"),"")):s.replace(/^\s+/,"")}function Sr(t){let e=c(t);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function Fr(t){let e=c(t);return this.context.memoryLimit.use(e.length),c(e).toUpperCase()}function Or(t,e){let s=c(t);return this.context.memoryLimit.use(s.length),s.split(c(e)).join("")}function Rr(t,e){let s=c(t);return this.context.memoryLimit.use(s.length),s.replace(c(e),"")}function zr(t,e){let s=c(t);this.context.memoryLimit.use(s.length);let i=c(e),r=s.lastIndexOf(i);return r===-1?s:s.substring(0,r)+s.substring(r+i.length)}function Nr(t,e){return t=c(t),this.context.memoryLimit.use(t.length),e?(e=bt(c(e)),t.replace(new RegExp(`[${e}]+$`,"g"),"")):t.replace(/\s+$/,"")}function Dr(t,e){let s=c(t);this.context.memoryLimit.use(s.length);let i=s.split(c(e));for(;i.length&&i[i.length-1]==="";)i.pop();return i}function Er(t,e){let s=c(t);return this.context.memoryLimit.use(s.length),e?(e=bt(c(e)),s.replace(new RegExp(`^[${e}
13]+`,"g"),"").replace(new RegExp(`[${e}]+$`,"g"),"")):s.trim()}function $r(t){let e=c(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function qr(t){return t=c(t),this.context.memoryLimit.use(t.length),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Mr(t,e,s){let i=c(t);return this.context.memoryLimit.use(i.length),i.split(c(e)).join(s)}function Ir(t,e,s){let i=c(t);return this.context.memoryLimit.use(i.length),i.replace(c(e),s)}function Pr(t,e,s){let i=c(t);this.context.memoryLimit.use(i.length);let r=c(e),n=i.lastIndexOf(r);if(n===-1)return i;let o=c(s);return i.substring(0,n)+o+i.substring(n+r.length)}function Ar(t,e=50,s="..."){let i=c(t);return this.context.memoryLimit.use(i.length),i.length<=e?t:i.substring(0,e-s.length)+s}function Vr(t,e=15,s="..."){let i=c(t);this.context.memoryLimit.use(i.length);let r=i.split(/\s+/);e<=0&&(e=1);let n=r.slice(0,e).join(" ");return r.length>=e&&(n+=s),n}function Cr(t){let e=c(t);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function jr(t,e){let s=c(t);if(this.context.memoryLimit.use(s.length),t=s.trim(),!t)return 0;switch(e){case"cjk":return(t.match(be)||[]).length+(t.match(Vt)||[]).length;case"auto":return be.test(t)?t.match(be).length+(t.match(Vt)||[]).length:t.split(/\s+/).length;default:return t.split(/\s+/).length}}function Br(t,e="and"){switch(this.context.memoryLimit.use(t.length),t.length){case 0:return"";case 1:return t[0];case 2:return`${t[0]} ${e} ${t[1]}`;default:return`${t.slice(0,-1).join(", ")}, ${e} ${t[t.length-1]}`}}var Hr=Object.freeze({__proto__:null,append:_r,prepend:vr,lstrip:Lr,downcase:Sr,upcase:Fr,remove:Or,remove_first:Rr,remove_last:zr,rstrip:Nr,split:Dr,strip:Er,strip_newlines:$r,capitalize:qr,replace:Mr,replace_first:Ir,replace_last:Pr,truncate:Ar,truncatewords:Vr,normalize_whitespace:Cr,number_of_words:jr,array_to_sentence_string:Br}),Ur=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ci),Ai),Yi),yr),xr),Hr),rs),Je=class extends g{constructor(e,s,i){super(e,s,i),this.key=this.tokenizer.readIdentifier().content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.assert(this.tokenizer.peek()==="=",'expected "="'),this.tokenizer.advance(),this.value=new _(this.tokenizer.readFilteredValue(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}},Ct=["offset","limit","reversed"],Qe=class extends g{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier(),o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(!n.size()||o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.hash=new P(this.tokenizer.remaining(),i.options.keyValueSeparator),this.templates=[],this.elseTemplates=[];let l,h=r.parseStream(s).on("start",()=>l=this.templates).on("tag:else",u=>{ae(u.args),l=this.elseTemplates}).on("tag:endfor",u=>{ae(u.args),h.stop()}).on("template",u=>l.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});h.start()}*render(e,s){let i=this.liquid.renderer,r=yt(yield y(this.collection,e));if(!r.length){yield i.renderTemplates(this.elseTemplates,e,s);return}let n="continue-"+this.variable+"-"+this.collection.getText();e.push({continue:e.getRegister(n)});let o=yield this.hash.render(e);e.pop(),r=(this.liquid.options.orderedFilterParameters?Object.keys(o).filter(h=>Ct.includes(h)):Ct.filter(h=>o[h]!==void 0)).reduce((h,u)=>u==="offset"?Yr(h,o.offset):u==="limit"?Jr(h,o.limit):Wr(h),r),e.setRegister(n,(o.offset||0)+r.length);let l={forloop:new X(r.length,this.collection.getText(),this.variable)};e.push(l);for(let h of r){if(l[this.variable]=h,yield i.renderTemplates(this.templates,e,s),s.break){s.break=!1;break}s.continue=!1,l.forloop.next()}e.pop()}};function Wr(t){return[...t].reverse()}function Yr(t,e){return t.slice(e)}function Jr(t,e){return t.slice(0,e)}var Ze=class extends g{constructor(e,s,i,r){for(super(e,s,i),this.templates=[],this.variable=this.readVariableName();s.length;){let n=s.shift();if(j(n)&&n.name==="endcapture")return;this.templates.push(r.parseToken(n,s))}throw new Error(`tag ${e.getText()} not closed`)}*render(e){let i=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=i}readVariableName(){let e=this.tokenizer.readIdentifier().content;if(e)return e;let s=this.tokenizer.readQuoted();if(s)return ss(s);throw this.tokenizer.error("invalid capture name")}},Ge=class extends g{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[],this.value=new _(this.tokenizer.readFilteredValue(),this.liquid
13),this.elseTemplates=[];let n=[],o=0,a=r.parseStream(s).on("tag:when",l=>{if(o>0)return;n=[];let h=[];for(;!l.tokenizer.end();)h.push(l.tokenizer.readValueOrThrow()),l.tokenizer.skipBlank(),l.tokenizer.peek()===","?l.tokenizer.readTo(","):l.tokenizer.readTo("or");this.branches.push({values:h,templates:n})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endcase",()=>a.stop()).on("template",l=>{(n!==this.elseTemplates||o===1)&&n.push(l)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});a.start()}*render(e,s){let i=this.liquid.renderer,r=f(yield this.value.value(e,e.opts.lenientIf)),n=!1;for(let o of this.branches)for(let a of o.values){let l=yield y(a,e,e.opts.lenientIf);if(N(r,l)){yield i.renderTemplates(o.templates,e,s),n=!0;break}}n||(yield i.renderTemplates(this.elseTemplates,e,s))}},Xe=class extends g{constructor(e,s,i){for(super(e,s,i);s.length;){let r=s.shift();if(j(r)&&r.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}},Ke=class extends g{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer;for(this.file=xt(n,this.liquid,r),this.currentFile=e.file;!n.end();){n.skipBlank();let o=n.p,a=n.readIdentifier();if((a.content==="with"||a.content==="for")&&(n.skipBlank(),n.peek()!==":")){let l=n.readValue();if(l){let h=n.p,u=n.readIdentifier(),p;u.content==="as"?p=n.readIdentifier():n.p=h,this[a.content]={value:l,alias:p&&p.content},n.skipBlank(),n.peek()===","&&n.advance();continue}}n.p=o;break}this.hash=new P(n.remaining(),i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r}=this,n=yield _t(this.file,e,i);T(n,()=>`illegal file path "${n}"`);let o=e.spawn(),a=o.bottom();if(he(a,yield r.render(e)),this.with){let{value:l,alias:h}=this.with;a[h||n]=yield y(l,e)}if(this.for){let{value:l,alias:h}=this.for,u=yt(yield y(l,e));a.forloop=new X(u.length,l.getText(),h);for(let p of u){a[h]=p;let F=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(F,o,s),a.forloop.next()}}else{let l=yield i._parsePartialFile(n,o.sync,this.currentFile);yield i.renderer.renderTemplates(l,o,s)}}};function xt(t,e,s){if(e.options.dynamicPartials){let n=t.readValue();if(t.assert(n,"illegal file path"),n.getText()==="none")return;if(ki(n)){let o=s.parse(ss(n));return jt(o)}return n}let i=[...t.readFileNameTemplate(e.options)],r=jt(s.parseTokens(i));return r==="none"?void 0:r}function jt(t){return t.length===1&&kt(t[0].token)?t[0].token.getContent():t}function*_t(t,e,s){return typeof t=="string"?t:Array.isArray(t)?s.renderer.renderTemplates(t,e):yield y(t,e)}var et=class extends g{constructor(e,s,i,r){super(e,s,i);let{tokenizer:n}=e;this.file=xt(n,this.liquid,r),this.currentFile=e.file;let o=n.p;n.readIdentifier().content==="with"?(n.skipBlank(),n.peek()!==":"?this.withVar=n.readValue():n.p=o):n.p=o,this.hash=new P(n.remaining(),i.options.jekyllInclude||i.options.keyValueSeparator)}*render(e,s){let{liquid:i,hash:r,withVar:n}=this,{renderer:o}=i,a=yield _t(this.file,e,i);T(a,()=>`illegal file path "${a}"`);let l=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",H.OUTPUT);let h=yield r.render(e);n&&(h[a]=yield y(n,e));let u=yield i._parsePartialFile(a,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?{include:h}:h),yield o.renderTemplates(u,e,s),e.pop(),e.restoreRegister(l)}},tt=class extends g{constructor(e,s,i){super(e,s,i),this.variable=this.tokenizer.readIdentifier().content}render(e,s){let i=e.environments;wt(i[this.variable])||(i[this.variable]=0),s.write(c(--i[this.variable]))}},st=class extends g{constructor(e,s,i){super(e,s,i),this.candidates=[];let r=this.tokenizer.readValue();for(this.tokenizer.skipBlank(),r&&(this.tokenizer.peek()===":"?(this.group=r,this.tokenizer.advance()):this.candidates.push(r));!this.tokenizer.end();){let n=this.tokenizer.readValue();n&&this.candidates.push(n),this.tokenizer.readTo(",")}this.tokenizer.assert(this.candidates.length,()=>`empty candidates: "${e.getText()}"`)}*render(e,s){let r=`cycle:${yield y(this.group,e)}:`+this.candidates.join(","),n=e.getRegister("cycle"),o=n[r];o===void 0&&(o=n[r]=0);let a=this.candidates[o];return o=(o+1)%this.candidates.length,n[r]=o,yield y(a,e)}},it=class extends g{constructor(e,s,i,r){super(e,s,i),this.branches=[];let n=[];r.parseStream(s).on("start",()=>
13this.branches.push({value:new _(e.args,this.liquid),templates:n=[]})).on("tag:elsif",o=>{T(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new _(o.args,this.liquid),templates:n=[]})}).on("tag:else",o=>{ae(o.args),T(!this.elseTemplates,"duplicated else"),n=this.elseTemplates=[]}).on("tag:endif",function(o){ae(o.args),this.stop()}).on("template",o=>n.push(o)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,templates:n}of this.branches){let o=yield r.value(e,e.opts.lenientIf);if(C(o,e)){yield i.renderTemplates(n,e,s);return}}yield i.renderTemplates(this.elseTemplates||[],e,s)}},rt=class extends g{constructor(e,s,i){super(e,s,i),this.variable=this.tokenizer.readIdentifier().content}render(e,s){let i=e.environments;wt(i[this.variable])||(i[this.variable]=0);let r=i[this.variable];i[this.variable]++,s.write(c(r))}},nt=class extends g{constructor(e,s,i,r){super(e,s,i),this.file=xt(this.tokenizer,this.liquid,r),this.currentFile=e.file,this.args=new P(this.tokenizer.remaining(),i.options.keyValueSeparator),this.templates=r.parseTokens(s)}*render(e,s){let{liquid:i,args:r,file:n}=this,{renderer:o}=i;if(n===void 0){e.setRegister("blockMode",H.OUTPUT),yield o.renderTemplates(this.templates,e,s);return}let a=yield _t(this.file,e,i);T(a,()=>`illegal file path "${a}"`);let l=yield i._parseLayoutFile(a,e.sync,this.currentFile);e.setRegister("blockMode",H.STORE);let h=yield o.renderTemplates(this.templates,e),u=e.getRegister("blocks");u[""]===void 0&&(u[""]=(p,F)=>F.write(h)),e.setRegister("blockMode",H.OUTPUT),e.push(yield r.render(e)),yield o.renderTemplates(l,e,s),e.pop()}},ot=class extends g{constructor(e,s,i,r){super(e,s,i),this.templates=[];let n=/\w+/.exec(e.args);for(this.block=n?n[0]:"";s.length;){let o=s.shift();if(j(o)&&o.name==="endblock")return;let a=r.parseToken(o,s);this.templates.push(a)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,s){let i=this.getBlockRender(e);e.getRegister("blockMode")===H.STORE?e.getRegister("blocks")[this.block]=i:yield i(new le,s)}getBlockRender(e){let{liquid:s,templates:i}=this,r=e.getRegister("blocks")[this.block],n=function*(o,a){e.push({block:o}),yield s.renderer.renderTemplates(i,e,a),e.pop()};return r?(o,a)=>r(new le(()=>n(o,a)),a):n}},at=class extends g{constructor(e,s,i){for(super(e,s,i),this.tokens=[];s.length;){let r=s.shift();if(j(r)&&r.name==="endraw")return;this.tokens.push(r)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}},lt=class extends X{constructor(e,s,i,r){super(e,i,r),this.length=e,this.cols=s}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}},ht=class extends g{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readIdentifier();this.tokenizer.skipBlank();let o=this.tokenizer.readIdentifier(),a=this.tokenizer.readValue();if(o.content!=="in"||!a)throw new Error(`illegal tag: ${e.getText()}`);this.variable=n.content,this.collection=a,this.args=new P(this.tokenizer.remaining(),i.options.keyValueSeparator),this.templates=[];let l,h=r.parseStream(s).on("start",()=>l=this.templates).on("tag:endtablerow",()=>h.stop()).on("template",u=>l.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});h.start()}*render(e,s){let i=yt(yield y(this.collection,e)),r=yield this.args.render(e),n=r.offset||0,o=r.limit===void 0?i.length:r.limit;i=i.slice(n,n+o);let a=r.cols||i.length,l=this.liquid.renderer,h=new lt(i.length,a,this.collection.getText(),this.variable),u={tablerowloop:h};e.push(u);for(let p=0;p<i.length;p++,h.next())u[this.variable]=i[p],h.col0()===0&&(h.row()!==1&&s.write("</tr>"),s.write(`<tr class="row${h.row()}">`)),s.write(`<td class="col${h.col()}">`),yield l.renderTemplates(this.templates,e,s),s.write("</td>");i.length&&s.write("</tr>"),e.pop()}},ct=class extends g{constructor(e,s,i,r){super(e,s,i),this.branches=[],this.elseTemplates=[];let n=[],o=0;r.parseStream(s).on("start",()=>
13this.branches.push({value:new _(e.args,this.liquid),test:ye,templates:n=[]})).on("tag:elsif",a=>{if(o>0){n=[];return}this.branches.push({value:new _(a.args,this.liquid),test:C,templates:n=[]})}).on("tag:else",()=>{o++,n=this.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",a=>{(n!==this.elseTemplates||o===1)&&n.push(a)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,s){let i=this.liquid.renderer;for(let{value:r,test:n,templates:o}of this.branches){let a=yield r.value(e,e.opts.lenientIf);if(n(a,e)){yield i.renderTemplates(o,e,s);return}}yield i.renderTemplates(this.elseTemplates,e,s)}},ut=class extends g{render(e,s){s.break=!0}},ft=class extends g{render(e,s){s.continue=!0}},dt=class extends g{constructor(e,s,i){super(e,s,i),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new _(this.tokenizer.readFilteredValue(),this.liquid))}*render(e,s){if(!this.value)return;let i=yield this.value.value(e,!1);s.write(i)}},pt=class extends g{constructor(e,s,i,r){super(e,s,i);let n=this.tokenizer.readLiquidTagTokens(this.liquid.options);this.templates=r.parseTokens(n)}*render(e,s){yield this.liquid.renderer.renderTemplates(this.templates,e,s)}},gt=class extends g{constructor(e,s,i){if(super(e,s,i),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}},Qr={assign:Je,for:Qe,capture:Ze,case:Ge,comment:Xe,include:et,render:Ke,decrement:tt,increment:rt,cycle:st,if:it,layout:nt,block:ot,raw:at,tablerow:ht,unless:ct,break:ut,continue:ft,echo:dt,liquid:pt,"#":gt},Bt=class t{constructor(e={}){this.renderer=new Ce,this.filters={},this.tags={},this.options=ui(e),this.parser=new D(this),St(Qr,(s,i)=>this.registerTag(i,s)),St(Ur,(s,i)=>this.registerFilter(i,s))}parse(e,s){return new D(this).parse(e,s)}_render(e,s,i){let r=s instanceof V?s:new V(s,this.options,i);return this.renderer.renderTemplates(e,r)}render(e,s,i){return O(this,void 0,void 0,function*(){return M(this._render(e,s,Object.assign(Object.assign({},i),{sync:!1})))})}renderSync(e,s,i){return I(this._render(e,s,Object.assign(Object.assign({},i),{sync:!0})))}renderToNodeStream(e,s,i={}){let r=new V(s,this.options,i);return this.renderer.renderTemplatesToNodeStream(e,r)}_parseAndRender(e,s,i){let r=this.parse(e);return this._render(r,s,i)}parseAndRender(e,s,i){return O(this,void 0,void 0,function*(){return M(this._parseAndRender(e,s,Object.assign(Object.assign({},i),{sync:!1})))})}parseAndRenderSync(e,s,i){return I(this._parseAndRender(e,s,Object.assign(Object.assign({},i),{sync:!0})))}_parsePartialFile(e,s,i){return new D(this).parseFile(e,s,W.Partials,i)}_parseLayoutFile(e,s,i){return new D(this).parseFile(e,s,W.Layouts,i)}_parseFile(e,s,i,r){return new D(this).parseFile(e,s,i,r)}parseFile(e,s){return O(this,void 0,void 0,function*(){return M(new D(this).parseFile(e,!1,s))})}parseFileSync(e,s){return I(new D(this).parseFile(e,!0,s))}*_renderFile(e,s,i){let r=yield this._parseFile(e,i.sync,i.lookupType);return yield this._render(r,s,i)}renderFile(e,s,i){return O(this,void 0,void 0,function*(){return M(this._renderFile(e,s,Object.assign(Object.assign({},i),{sync:!1})))})}renderFileSync(e,s,i){return I(this._renderFile(e,s,Object.assign(Object.assign({},i),{sync:!0})))}renderFileToNodeStream(e,s,i){return O(this,void 0,void 0,function*(){let r=yield this.parseFile(e);return this.renderToNodeStream(r,s,i)})}_evalValue(e,s){let i=new _(e,this),r=s instanceof V?s:new V(s,this.options);return i.value(r)}evalValue(e,s){return O(this,void 0,void 0,function*(){return M(this._evalValue(e,s))})}evalValueSync(e,s){return I(this._evalValue(e,s))}registerFilter(e,s){this.filters[e]=s}registerTag(e,s){this.tags[e]=w(s)?s:mi(s)}plugin(e){return e.call(this,t)}express(){let e=this,s=!0;return function(i,r,n){if(s){s=!1;let o=re(this.root);e.options.root.unshift(...o),e.options.layouts.unshift(...o),e.options.partials.unshift(...o)}e.renderFile(i,r).then(o=>n(null,o),n)}}};export{Bt as a};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.