halo-pc 1.0.38 → 1.0.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/dist/{Article-H_clf90b.js → Article-DZlstqWL.js} +32 -31
  2. package/dist/{ArticleFooter-BLi4TNA7.js → ArticleFooter-BkduiKh8.js} +4 -3
  3. package/dist/{Autocomplete-CcIzTPSr.js → Autocomplete-0Yf6lJQ7.js} +12 -11
  4. package/dist/{Autocomplete-DMm6oI1g.js → Autocomplete-DMKnFezN.js} +1 -1
  5. package/dist/Autocomplete-bc-9LfGa.js +50 -0
  6. package/dist/{CSharp-CZOchOE-.js → CSharp-q8eOBm4y.js} +1 -1
  7. package/dist/{Calender-BoQV7bhA.js → Calender-CseGNCuW.js} +4 -4
  8. package/dist/Callback-D_dFJlfv.js +21 -0
  9. package/dist/{Cascader-DMhl98vw.js → Cascader-BG5ev35M.js} +28 -27
  10. package/dist/Cascader-Dzeoz7ss.js +47 -0
  11. package/dist/{Checkbox-C6t6S7ii.js → Checkbox-CsCA6iQb.js} +1 -1
  12. package/dist/{Checkbox-DtrXMDBR.js → Checkbox-dw8RNAGt.js} +14 -13
  13. package/dist/{Code-DDacfgvl.js → Code-BE8YLGaE.js} +1 -1
  14. package/dist/Code-BRe68AIa.js +42 -0
  15. package/dist/Code-C5QfTMNw.js +60 -0
  16. package/dist/Code-_XoN6vQE.js +4 -0
  17. package/dist/Code.vue_vue_type_style_index_0_lang-D2hJ7lYF.js +63 -0
  18. package/dist/Column-C-NHhT2v.js +75 -0
  19. package/dist/{Comment-Ixu0gPk3.js → Comment-kTmfTlbF.js} +25 -19
  20. package/dist/{Compare-C1uq4lgK.js → Compare-DVWaiCUC.js} +10 -9
  21. package/dist/{Compare-NN40QJWm.js → Compare-DlyQBCat.js} +11 -10
  22. package/dist/{Copy-BcfSvyWG.js → Copy-DQFJy3uX.js} +12 -11
  23. package/dist/{Custom-Dn9_vPuD.js → Custom-D5HoD0nQ.js} +22 -21
  24. package/dist/{DataExport-DNGgWqsx.js → DataExport-Um1wXyRe.js} +1 -1
  25. package/dist/{DataExport.vue_vue_type_script_setup_true_lang-tTTDFXQV.js → DataExport.vue_vue_type_script_setup_true_lang-2YoqwEmA.js} +25 -24
  26. package/dist/{DataImport-CI9eM5T1.js → DataImport-CPMLup4P.js} +1 -1
  27. package/dist/{DataImport.vue_vue_type_script_setup_true_lang-BCMd1s45.js → DataImport.vue_vue_type_script_setup_true_lang-DsCp0vWo.js} +40 -39
  28. package/dist/{Date-CZGbZKjB.js → Date-BhZ8ltgp.js} +9 -8
  29. package/dist/{Date-CGyzi8yX.js → Date-Cj9lCW_Y.js} +1 -1
  30. package/dist/{DateRange-MbbkmZ_Y.js → DateRange-Bw_Oyawz.js} +10 -9
  31. package/dist/{DateTime-DqUOXGWH.js → DateTime-BU6JaBPk.js} +9 -8
  32. package/dist/{DateTime-DHrHmRLL.js → DateTime-Cv-SRE88.js} +1 -1
  33. package/dist/{DateTimeRange-DgXQkZLx.js → DateTimeRange-B4Ah6LQY.js} +12 -11
  34. package/dist/{Daterange-DLHJuRur.js → Daterange-CSZe4XGO.js} +9 -8
  35. package/dist/{Decimal-BUJuuvfr.js → Decimal-DSDuwW9Z.js} +1 -1
  36. package/dist/{Delete-BGMk0orl.js → Delete-CjPgg-5G.js} +20 -19
  37. package/dist/{Detail-D4KzWdHQ.js → Detail-gj--ICe8.js} +8 -7
  38. package/dist/{Dictionary-Esd3ERAq.js → Dictionary-Ck_02mWa.js} +15 -9
  39. package/dist/{Email-C9K09hwC.js → Email-BSQbDvh1.js} +12 -11
  40. package/dist/{File-ai1eYO7v.js → File-FW4usX43.js} +44 -43
  41. package/dist/{Image-CfY4G1Yn.js → Image-DiAw_6jM.js} +1 -1
  42. package/dist/Index-B_5hshjJ.js +4 -0
  43. package/dist/{Index-DYHrSEZ5.js → Index-BibWDRoP.js} +1 -1
  44. package/dist/Index-BtlD6ocN.js +4 -0
  45. package/dist/Index-C3f38zw0.js +4 -0
  46. package/dist/Index-CB_TnEaw.js +4 -0
  47. package/dist/{Index-B5o7uf36.js → Index-Dq5Vp-ts.js} +16 -15
  48. package/dist/{Index-S1btGSGD.js → Index-MUgqP8jJ.js} +1 -1
  49. package/dist/Index-hgTZyQps.js +174 -0
  50. package/dist/{Index.vue_vue_type_script_setup_true_lang-H8ogKL2I.js → Index.vue_vue_type_script_setup_true_lang-BzPCaYCg.js} +20 -14
  51. package/dist/{Index.vue_vue_type_script_setup_true_lang-BjE0VeTO.js → Index.vue_vue_type_script_setup_true_lang-CiBvC9Cu.js} +7 -6
  52. package/dist/{Install-D-MgafyF.js → Install-Cpp3BDCS.js} +14 -13
  53. package/dist/{Int-CnvfCxgn.js → Int-Ck1SvK7R.js} +10 -9
  54. package/dist/{Int-D3RqVcmN.js → Int-DcQsipaO.js} +14 -13
  55. package/dist/{List-DA4SO_le.js → List-hWB41wF_.js} +19 -18
  56. package/dist/Maintaince-l-Tdveur.js +20 -0
  57. package/dist/{Markdown-hax8By5O.js → Markdown-BEUz4VZ7.js} +1 -1
  58. package/dist/{Month-BDkwv-vc.js → Month-DJGGGrZr.js} +12 -11
  59. package/dist/Month-DkafiRHq.js +38 -0
  60. package/dist/{Month-CnVTSnyK.js → Month-DmUiyF1G.js} +1 -1
  61. package/dist/{Normal-DoE9t7d7.js → Normal-ACcTHsXb.js} +53 -52
  62. package/dist/Paging-Vfz2RDBo.js +93 -0
  63. package/dist/{PagingHeader-BFtE6jSy.js → PagingHeader-DDkmqv98.js} +36 -35
  64. package/dist/{PagingRow-CSB-kwMz.js → PagingRow-B4Nfa2Vk.js} +20 -19
  65. package/dist/{Racebar-Bc-dDRss.js → Racebar-LfnPLNOY.js} +31 -25
  66. package/dist/{Radio-CMGOtMnx.js → Radio-DcEZI4m7.js} +1 -1
  67. package/dist/{Register-8wi0uixs.js → Register-B4x_zgyH.js} +61 -60
  68. package/dist/RichText-B1Iogpgr.js +47 -0
  69. package/dist/{SearchFooter-DOC21dmS.js → SearchFooter-CmM8qnxP.js} +1 -1
  70. package/dist/{SearchFooter.vue_vue_type_style_index_0_lang-CoJZtP84.js → SearchFooter.vue_vue_type_style_index_0_lang-fRS96yRX.js} +3 -3
  71. package/dist/{SearchForm-BMTSPce_.js → SearchForm-DU5QLTbe.js} +1 -1
  72. package/dist/{SearchForm.vue_vue_type_style_index_0_lang-wiTxKu-H.js → SearchForm.vue_vue_type_style_index_0_lang-BHZrYG6_.js} +32 -31
  73. package/dist/{Select-DAxdpZlO.js → Select-C3gUeHmu.js} +16 -15
  74. package/dist/{Select-MBD4Simw.js → Select-CMxubJIV.js} +1 -1
  75. package/dist/{Select-DnFyey0n.js → Select-DrDDVJtz.js} +22 -21
  76. package/dist/{Single-D6x6VV_B.js → Single-De-YyuVk.js} +75 -74
  77. package/dist/{Statistic-BS_DA72m.js → Statistic-SvjQ7uGI.js} +30 -29
  78. package/dist/{Stock-CtmevqBK.js → Stock-C2b9p3-N.js} +1 -1
  79. package/dist/{Stock-CbucObTu.js → Stock-XZkBSQw1.js} +1 -1
  80. package/dist/{Stock.vue_vue_type_style_index_0_lang-LfsWg1Ps.js → Stock.vue_vue_type_style_index_0_lang-DwxyyM7p.js} +18 -17
  81. package/dist/{Switch-BlXAy9qH.js → Switch-PJT-5dDt.js} +1 -1
  82. package/dist/{Table-Da9gan1Y.js → Table-CkoZ8OjZ.js} +62 -61
  83. package/dist/{Table-CqsfAMh7.js → Table-Dy1H2IHN.js} +74 -73
  84. package/dist/Text-Bt5jL_KV.js +49 -0
  85. package/dist/{Text-CbZlEVTJ.js → Text-CytgR_l_.js} +12 -11
  86. package/dist/Text-vHouxGHU.js +4 -0
  87. package/dist/Text.vue_vue_type_style_index_0_lang-CgxtY5ch.js +59 -0
  88. package/dist/{TextLink-SAnZ7BfX.js → TextLink-DINdFWzs.js} +11 -10
  89. package/dist/{Textarea-DphCUpXp.js → Textarea-DakZXfN6.js} +1 -1
  90. package/dist/{Time-DjE8yYdK.js → Time-Bn1Av2wo.js} +11 -10
  91. package/dist/{Timeline-D11vjkpZ.js → Timeline-B32cUvwI.js} +19 -13
  92. package/dist/{Tree-kich05vY.js → Tree-BGfHm4k_.js} +80 -79
  93. package/dist/{Tree-DK73Ou_F.js → Tree-BItAXuSC.js} +41 -35
  94. package/dist/{TreeNode-Dx6cZ31Z.js → TreeNode-DmiM_a2n.js} +11 -10
  95. package/dist/{Update-D2Plm_AG.js → Update-DSTmaeT8.js} +15 -14
  96. package/dist/{UpdateChild-BXV7QqaP.js → UpdateChild-BgBJJwT3.js} +21 -20
  97. package/dist/{Upload-B87EDynn.js → Upload-DMqlcxCt.js} +47 -46
  98. package/dist/Upload-DpQu3z1T.js +71 -0
  99. package/dist/{Year-C93IJgc8.js → Year-Cv92J5pF.js} +9 -8
  100. package/dist/{Year-BPFmIiPX.js → Year-DckBNPK_.js} +1 -1
  101. package/dist/assets/{clipboard-ClN4QccS.js → clipboard-DjQPoCBJ.js} +3 -1
  102. package/dist/assets/clone-BZn0cTAu.js +134 -0
  103. package/dist/assets/file-saver-CwlpTZSc.js +74 -0
  104. package/dist/assets/liquidjs-C2HVw1Ra.js +2901 -0
  105. package/dist/assets/moment-h96o7c8I.js +2578 -0
  106. package/dist/assets/sprintf-js-BPTdvBYM.js +148 -0
  107. package/dist/assets/underscore-B0BCaBxV.js +1070 -0
  108. package/dist/assets/underscore.string-DVXD2SZo.js +425 -0
  109. package/dist/assets/util-deprecate-Dzun97re.js +28 -0
  110. package/dist/main-KNkwb0pq.js +10515 -0
  111. package/dist/main.js +46 -45
  112. package/dist/style.css +1 -1
  113. package/package.json +2 -2
  114. package/dist/Autocomplete-BF9x0F4f.js +0 -49
  115. package/dist/Callback-79Bw4RwY.js +0 -20
  116. package/dist/Cascader-D1Ou5OSg.js +0 -41
  117. package/dist/Code-B8ISTTYK.js +0 -54
  118. package/dist/Code-BMlBvnqa.js +0 -4
  119. package/dist/Code-DIGn8Raz.js +0 -36
  120. package/dist/Code.vue_vue_type_style_index_0_lang-hHYTH50F.js +0 -57
  121. package/dist/Column-DjA11efs.js +0 -69
  122. package/dist/Index-CH3nwnPZ.js +0 -4
  123. package/dist/Index-CTjDkp7e.js +0 -4
  124. package/dist/Index-DSZ8wa7U.js +0 -4
  125. package/dist/Index-DVdiF3gr.js +0 -4
  126. package/dist/Index-DsZPtDYE.js +0 -173
  127. package/dist/Maintaince-BIgEbjrq.js +0 -14
  128. package/dist/Month-5lTUiWin.js +0 -37
  129. package/dist/Paging-5qsCTRWy.js +0 -92
  130. package/dist/RichText-BR4Kvx0J.js +0 -41
  131. package/dist/Text-C72NLZMt.js +0 -48
  132. package/dist/Text-CHvsKR9H.js +0 -4
  133. package/dist/Text.vue_vue_type_style_index_0_lang-aMaBccpg.js +0 -53
  134. package/dist/Upload-CHPjMGFZ.js +0 -65
  135. package/dist/main-nvsTmKXH.js +0 -16321
@@ -0,0 +1,2901 @@
1
+ class F {
2
+ constructor(e, s, r, i, n) {
3
+ this.kind = e, this.input = s, this.begin = r, this.end = i, this.file = n;
4
+ }
5
+ getText() {
6
+ return this.input.slice(this.begin, this.end);
7
+ }
8
+ getPosition() {
9
+ let [e, s] = [1, 1];
10
+ for (let r = 0; r < this.begin; r++)
11
+ this.input[r] === `
12
+ ` ? (e++, s = 1) : s++;
13
+ return [e, s];
14
+ }
15
+ size() {
16
+ return this.end - this.begin;
17
+ }
18
+ }
19
+ class V {
20
+ liquidMethodMissing(e) {
21
+ }
22
+ }
23
+ const ft = Object.prototype.toString, be = String.prototype.toLowerCase, ce = Object.hasOwnProperty;
24
+ function _(t) {
25
+ return typeof t == "string";
26
+ }
27
+ function w(t) {
28
+ return typeof t == "function";
29
+ }
30
+ function pt(t) {
31
+ return t && w(t.then);
32
+ }
33
+ function X(t) {
34
+ return t && w(t.next) && w(t.throw) && w(t.return);
35
+ }
36
+ function gt(t) {
37
+ return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
38
+ }
39
+ function c(t) {
40
+ return t = d(t), _(t) ? t : v(t) ? "" : k(t) ? t.map((e) => c(e)).join("") : String(t);
41
+ }
42
+ function ue(t) {
43
+ return t = d(t), k(t) ? t : _(t) && t.length > 0 ? [t] : yt(t) ? Array.from(t) : te(t) ? Object.keys(t).map((e) => [e, t[e]]) : [];
44
+ }
45
+ function T(t) {
46
+ return t = d(t), v(t) ? [] : k(t) ? t : [t];
47
+ }
48
+ function d(t) {
49
+ return t instanceof V && w(t.valueOf) ? t.valueOf() : t;
50
+ }
51
+ function xe(t) {
52
+ return t = Number(t), isNaN(t) ? 0 : t;
53
+ }
54
+ function de(t) {
55
+ return typeof t == "number";
56
+ }
57
+ function He(t) {
58
+ return t && w(t.toLiquid) ? He(t.toLiquid()) : t;
59
+ }
60
+ function v(t) {
61
+ return t == null;
62
+ }
63
+ function mt(t) {
64
+ return t === void 0;
65
+ }
66
+ function k(t) {
67
+ return ft.call(t) === "[object Array]";
68
+ }
69
+ function yt(t) {
70
+ return te(t) && Symbol.iterator in t;
71
+ }
72
+ function _e(t, e) {
73
+ t = t || {};
74
+ for (const s in t)
75
+ if (ce.call(t, s) && e(t[s], s, t) === !1)
76
+ break;
77
+ return t;
78
+ }
79
+ function We(t) {
80
+ return t[t.length - 1];
81
+ }
82
+ function te(t) {
83
+ const e = typeof t;
84
+ return t !== null && (e === "object" || e === "function");
85
+ }
86
+ function Ye(t, e, s = 1) {
87
+ const r = [];
88
+ for (let i = t; i < e; i += s)
89
+ r.push(i);
90
+ return r;
91
+ }
92
+ function J(t, e, s = " ") {
93
+ return Je(t, e, s, (r, i) => i + r);
94
+ }
95
+ function wt(t, e, s = " ") {
96
+ return Je(t, e, s, (r, i) => r + i);
97
+ }
98
+ function Je(t, e, s, r) {
99
+ t = String(t);
100
+ let i = e - t.length;
101
+ for (; i-- > 0; )
102
+ t = r(t, s);
103
+ return t;
104
+ }
105
+ function Qe(t) {
106
+ return t;
107
+ }
108
+ function Tt(t) {
109
+ return [...t].some((s) => s >= "a" && s <= "z") ? t.toUpperCase() : t.toLowerCase();
110
+ }
111
+ function kt(t, e) {
112
+ return t.length > e ? t.slice(0, e - 3) + "..." : t;
113
+ }
114
+ function ve(t, e) {
115
+ return t == null && e == null ? 0 : t == null ? 1 : e == null || (t = be.call(t), e = be.call(e), t < e) ? -1 : t > e ? 1 : 0;
116
+ }
117
+ function x(t) {
118
+ return function(...e) {
119
+ return t.call(this, ...e.map(d));
120
+ };
121
+ }
122
+ function fe(t) {
123
+ return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
124
+ }
125
+ const Le = "__liquidClass__";
126
+ class B extends Error {
127
+ constructor(e, s) {
128
+ 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, Le, { value: "LiquidError", enumerable: !1 });
129
+ }
130
+ update() {
131
+ Object.defineProperty(this, "context", { value: St(this.token), enumerable: !1 }), this.message = Ot(this.message, this.token), this.stack = this.message + `
132
+ ` + this.context + `
133
+ ` + this.stack, this.originalError && (this.stack += `
134
+ From ` + this.originalError.stack);
135
+ }
136
+ static is(e) {
137
+ return (e == null ? void 0 : e[Le]) === "LiquidError";
138
+ }
139
+ }
140
+ class bt extends B {
141
+ constructor(e, s) {
142
+ super(e, s), this.name = "TokenizationError", super.update();
143
+ }
144
+ }
145
+ class xt extends B {
146
+ constructor(e, s) {
147
+ super(e, s), this.name = "ParseError", this.message = e.message, super.update();
148
+ }
149
+ }
150
+ class _t extends B {
151
+ constructor(e, s) {
152
+ super(e, s.token), this.name = "RenderError", this.message = e.message, super.update();
153
+ }
154
+ static is(e) {
155
+ return e.name === "RenderError";
156
+ }
157
+ }
158
+ class Ze extends B {
159
+ constructor(e) {
160
+ super(e[0], e[0].token), this.errors = e, this.name = "LiquidErrors";
161
+ const s = e.length > 1 ? "s" : "";
162
+ this.message = `${e.length} error${s} found`, super.update();
163
+ }
164
+ static is(e) {
165
+ return e.name === "LiquidErrors";
166
+ }
167
+ }
168
+ class vt extends B {
169
+ constructor(e, s) {
170
+ super(e, s), this.name = "UndefinedVariableError", this.message = e.message, super.update();
171
+ }
172
+ }
173
+ class Lt extends Error {
174
+ constructor(e) {
175
+ super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
176
+ }
177
+ }
178
+ class Ft extends Error {
179
+ constructor(e) {
180
+ super(e), this.name = "AssertionError", this.message = e + "";
181
+ }
182
+ }
183
+ function St(t) {
184
+ const [e, s] = t.getPosition(), r = t.input.split(`
185
+ `), i = Math.max(e - 2, 1), n = Math.min(e + 3, r.length);
186
+ return Ye(i, n + 1).map((a) => {
187
+ const l = a === e ? ">> " : " ", h = J(String(a), String(n).length);
188
+ let u = `${l}${h}| `;
189
+ const p = a === e ? `
190
+ ` + J("^", s + u.length) : "";
191
+ return u += r[a - 1], u += p, u;
192
+ }).join(`
193
+ `);
194
+ }
195
+ function Ot(t, e) {
196
+ e.file && (t += `, file:${e.file}`);
197
+ const [s, r] = e.getPosition();
198
+ return t += `, line:${s}, col:${r}`, t;
199
+ }
200
+ const f = [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], Rt = 1, H = 4, Fe = 8, Ge = 16, Et = 32, zt = 64, Nt = 128;
201
+ function Q(t) {
202
+ const e = t.charCodeAt(0);
203
+ return e >= 128 ? !f[e] : !!(f[e] & Rt);
204
+ }
205
+ f[160] = f[5760] = f[6158] = f[8192] = f[8193] = f[8194] = f[8195] = f[8196] = f[8197] = f[8198] = f[8199] = f[8200] = f[8201] = f[8202] = f[8232] = f[8233] = f[8239] = f[8287] = f[12288] = H;
206
+ f[8220] = f[8221] = Nt;
207
+ function b(t, e) {
208
+ if (!t) {
209
+ const s = typeof e == "function" ? e() : e || `expect ${t} to be true`;
210
+ throw new Ft(s);
211
+ }
212
+ }
213
+ function K(t, e = `unexpected ${JSON.stringify(t)}`) {
214
+ b(!t, e);
215
+ }
216
+ class Dt extends V {
217
+ equals(e) {
218
+ return v(d(e));
219
+ }
220
+ gt() {
221
+ return !1;
222
+ }
223
+ geq() {
224
+ return !1;
225
+ }
226
+ lt() {
227
+ return !1;
228
+ }
229
+ leq() {
230
+ return !1;
231
+ }
232
+ valueOf() {
233
+ return null;
234
+ }
235
+ }
236
+ class se extends V {
237
+ equals(e) {
238
+ return e instanceof se ? !1 : (e = d(e), _(e) || k(e) ? e.length === 0 : te(e) ? Object.keys(e).length === 0 : !1);
239
+ }
240
+ gt() {
241
+ return !1;
242
+ }
243
+ geq() {
244
+ return !1;
245
+ }
246
+ lt() {
247
+ return !1;
248
+ }
249
+ leq() {
250
+ return !1;
251
+ }
252
+ valueOf() {
253
+ return "";
254
+ }
255
+ }
256
+ class qt extends se {
257
+ equals(e) {
258
+ return e === !1 || v(d(e)) ? !0 : _(e) ? /^\s*$/.test(e) : super.equals(e);
259
+ }
260
+ }
261
+ class pe extends V {
262
+ constructor(e, s, r) {
263
+ super(), this.i = 0, this.length = e, this.name = `${r}-${s}`;
264
+ }
265
+ next() {
266
+ this.i++;
267
+ }
268
+ index0() {
269
+ return this.i;
270
+ }
271
+ index() {
272
+ return this.i + 1;
273
+ }
274
+ first() {
275
+ return this.i === 0;
276
+ }
277
+ last() {
278
+ return this.i === this.length - 1;
279
+ }
280
+ rindex() {
281
+ return this.length - this.i;
282
+ }
283
+ rindex0() {
284
+ return this.length - this.i - 1;
285
+ }
286
+ valueOf() {
287
+ return JSON.stringify(this);
288
+ }
289
+ }
290
+ class Se extends V {
291
+ constructor(e = () => "") {
292
+ super(), this.superBlockRender = e;
293
+ }
294
+ /**
295
+ * Provide parent access in child block by
296
+ * {{ block.super }}
297
+ */
298
+ super() {
299
+ return this.superBlockRender();
300
+ }
301
+ }
302
+ function E(t) {
303
+ return t && w(t.equals) && w(t.gt) && w(t.geq) && w(t.lt) && w(t.leq);
304
+ }
305
+ const Oe = new Dt(), Xe = {
306
+ true: !0,
307
+ false: !1,
308
+ nil: Oe,
309
+ null: Oe,
310
+ empty: new se(),
311
+ blank: new qt()
312
+ };
313
+ function Re(t) {
314
+ const e = {};
315
+ for (const [s, r] of Object.entries(t)) {
316
+ let i = e;
317
+ for (let n = 0; n < s.length; n++) {
318
+ const o = s[n];
319
+ i[o] = i[o] || {}, n === s.length - 1 && Q(s[n]) && (i[o].needBoundary = !0), i = i[o];
320
+ }
321
+ i.data = r, i.end = !0;
322
+ }
323
+ return e;
324
+ }
325
+ var ee = function() {
326
+ return ee = Object.assign || function(e) {
327
+ for (var s, r = 1, i = arguments.length; r < i; r++) {
328
+ s = arguments[r];
329
+ for (var n in s) Object.prototype.hasOwnProperty.call(s, n) && (e[n] = s[n]);
330
+ }
331
+ return e;
332
+ }, ee.apply(this, arguments);
333
+ };
334
+ function O(t, e, s, r) {
335
+ function i(n) {
336
+ return n instanceof s ? n : new s(function(o) {
337
+ o(n);
338
+ });
339
+ }
340
+ return new (s || (s = Promise))(function(n, o) {
341
+ function a(u) {
342
+ try {
343
+ h(r.next(u));
344
+ } catch (p) {
345
+ o(p);
346
+ }
347
+ }
348
+ function l(u) {
349
+ try {
350
+ h(r.throw(u));
351
+ } catch (p) {
352
+ o(p);
353
+ }
354
+ }
355
+ function h(u) {
356
+ u.done ? n(u.value) : i(u.value).then(a, l);
357
+ }
358
+ h((r = r.apply(t, [])).next());
359
+ });
360
+ }
361
+ function N(t) {
362
+ return O(this, void 0, void 0, function* () {
363
+ if (!X(t))
364
+ return t;
365
+ let e, s = !1, r = "next";
366
+ do {
367
+ const i = t[r](e);
368
+ s = i.done, e = i.value, r = "next";
369
+ try {
370
+ X(e) && (e = N(e)), pt(e) && (e = yield e);
371
+ } catch (n) {
372
+ r = "throw", e = n;
373
+ }
374
+ } while (!s);
375
+ return e;
376
+ });
377
+ }
378
+ function D(t) {
379
+ if (!X(t))
380
+ return t;
381
+ let e, s = !1, r = "next";
382
+ do {
383
+ const i = t[r](e);
384
+ if (s = i.done, e = i.value, r = "next", X(e))
385
+ try {
386
+ e = D(e);
387
+ } catch (n) {
388
+ r = "throw", e = n;
389
+ }
390
+ } while (!s);
391
+ return e;
392
+ }
393
+ const Mt = /%([-_0^#:]+)?(\d+)?([EO])?(.)/;
394
+ function It(t) {
395
+ return [31, $t(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
396
+ }
397
+ function Ke(t) {
398
+ let e = 0;
399
+ for (let s = 0; s < t.getMonth(); ++s)
400
+ e += It(t)[s];
401
+ return e + t.getDate();
402
+ }
403
+ function Ee(t, e) {
404
+ const s = Ke(t) + (e - t.getDay()), i = 7 - new Date(t.getFullYear(), 0, 1).getDay() + e;
405
+ return String(Math.floor((s - i) / 7) + 1);
406
+ }
407
+ function $t(t) {
408
+ const e = t.getFullYear();
409
+ return !!(!(e & 3) && (e % 100 || e % 400 === 0 && e));
410
+ }
411
+ function Pt(t) {
412
+ const e = t.getDate();
413
+ if ([11, 12, 13].includes(e))
414
+ return "th";
415
+ switch (e % 10) {
416
+ case 1:
417
+ return "st";
418
+ case 2:
419
+ return "nd";
420
+ case 3:
421
+ return "rd";
422
+ default:
423
+ return "th";
424
+ }
425
+ }
426
+ function Ct(t) {
427
+ return parseInt(t.getFullYear().toString().substring(0, 2), 10);
428
+ }
429
+ const At = {
430
+ d: 2,
431
+ e: 2,
432
+ H: 2,
433
+ I: 2,
434
+ j: 3,
435
+ k: 2,
436
+ l: 2,
437
+ L: 3,
438
+ m: 2,
439
+ M: 2,
440
+ S: 2,
441
+ U: 2,
442
+ W: 2
443
+ }, Vt = new Set("aAbBceklpP");
444
+ function ze(t, e) {
445
+ const s = Math.abs(t.getTimezoneOffset()), r = Math.floor(s / 60), i = s % 60;
446
+ return (t.getTimezoneOffset() > 0 ? "-" : "+") + J(r, 2, "0") + (e.flags[":"] ? ":" : "") + J(i, 2, "0");
447
+ }
448
+ const le = {
449
+ a: (t) => t.getShortWeekdayName(),
450
+ A: (t) => t.getLongWeekdayName(),
451
+ b: (t) => t.getShortMonthName(),
452
+ B: (t) => t.getLongMonthName(),
453
+ c: (t) => t.toLocaleString(),
454
+ C: (t) => Ct(t),
455
+ d: (t) => t.getDate(),
456
+ e: (t) => t.getDate(),
457
+ H: (t) => t.getHours(),
458
+ I: (t) => String(t.getHours() % 12 || 12),
459
+ j: (t) => Ke(t),
460
+ k: (t) => t.getHours(),
461
+ l: (t) => String(t.getHours() % 12 || 12),
462
+ L: (t) => t.getMilliseconds(),
463
+ m: (t) => t.getMonth() + 1,
464
+ M: (t) => t.getMinutes(),
465
+ N: (t, e) => {
466
+ const s = Number(e.width) || 9, r = String(t.getMilliseconds()).slice(0, s);
467
+ return wt(r, s, "0");
468
+ },
469
+ p: (t) => t.getHours() < 12 ? "AM" : "PM",
470
+ P: (t) => t.getHours() < 12 ? "am" : "pm",
471
+ q: (t) => Pt(t),
472
+ s: (t) => Math.round(t.getTime() / 1e3),
473
+ S: (t) => t.getSeconds(),
474
+ u: (t) => t.getDay() || 7,
475
+ U: (t) => Ee(t, 0),
476
+ w: (t) => t.getDay(),
477
+ W: (t) => Ee(t, 1),
478
+ x: (t) => t.toLocaleDateString(),
479
+ X: (t) => t.toLocaleTimeString(),
480
+ y: (t) => t.getFullYear().toString().slice(2, 4),
481
+ Y: (t) => t.getFullYear(),
482
+ z: ze,
483
+ Z: (t, e) => t.getTimeZoneName() || ze(t, e),
484
+ t: () => " ",
485
+ n: () => `
486
+ `,
487
+ "%": () => "%"
488
+ };
489
+ le.h = le.b;
490
+ function Z(t, e) {
491
+ let s = "", r = e, i;
492
+ for (; i = Mt.exec(r); )
493
+ s += r.slice(0, i.index), r = r.slice(i.index + i[0].length), s += Bt(t, i);
494
+ return s + r;
495
+ }
496
+ function Bt(t, e) {
497
+ const [s, r = "", i, n, o] = e, a = le[o];
498
+ if (!a)
499
+ return s;
500
+ const l = {};
501
+ for (const S of r)
502
+ l[S] = !0;
503
+ let h = String(a(t, { flags: l, width: i, modifier: n })), u = Vt.has(o) ? " " : "0", p = i || At[o] || 0;
504
+ return l["^"] ? h = h.toUpperCase() : l["#"] && (h = Tt(h)), l._ ? u = " " : l[0] && (u = "0"), l["-"] && (p = 0), J(h, p, u);
505
+ }
506
+ function et() {
507
+ return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
508
+ }
509
+ const jt = 6e4, Ut = /([zZ]|([+-])(\d{2}):(\d{2}))$/, tt = [
510
+ "January",
511
+ "February",
512
+ "March",
513
+ "April",
514
+ "May",
515
+ "June",
516
+ "July",
517
+ "August",
518
+ "September",
519
+ "October",
520
+ "November",
521
+ "December"
522
+ ], Ht = tt.map((t) => t.slice(0, 3)), st = [
523
+ "Sunday",
524
+ "Monday",
525
+ "Tuesday",
526
+ "Wednesday",
527
+ "Thursday",
528
+ "Friday",
529
+ "Saturday"
530
+ ], Wt = st.map((t) => t.slice(0, 3));
531
+ class R {
532
+ constructor(e, s, r) {
533
+ this.locale = s, this.DateTimeFormat = et(), this.date = new Date(e), this.timezoneFixed = r !== void 0, r === void 0 && (r = this.date.getTimezoneOffset()), this.timezoneOffset = _(r) ? R.getTimezoneOffset(r, this.date) : r, this.timezoneName = _(r) ? r : "";
534
+ const i = (this.date.getTimezoneOffset() - this.timezoneOffset) * jt, n = this.date.getTime() + i;
535
+ this.displayDate = new Date(n);
536
+ }
537
+ getTime() {
538
+ return this.displayDate.getTime();
539
+ }
540
+ getMilliseconds() {
541
+ return this.displayDate.getMilliseconds();
542
+ }
543
+ getSeconds() {
544
+ return this.displayDate.getSeconds();
545
+ }
546
+ getMinutes() {
547
+ return this.displayDate.getMinutes();
548
+ }
549
+ getHours() {
550
+ return this.displayDate.getHours();
551
+ }
552
+ getDay() {
553
+ return this.displayDate.getDay();
554
+ }
555
+ getDate() {
556
+ return this.displayDate.getDate();
557
+ }
558
+ getMonth() {
559
+ return this.displayDate.getMonth();
560
+ }
561
+ getFullYear() {
562
+ return this.displayDate.getFullYear();
563
+ }
564
+ toLocaleString(e, s) {
565
+ return s != null && s.timeZone ? this.date.toLocaleString(e, s) : this.displayDate.toLocaleString(e, s);
566
+ }
567
+ toLocaleTimeString(e) {
568
+ return this.displayDate.toLocaleTimeString(e);
569
+ }
570
+ toLocaleDateString(e) {
571
+ return this.displayDate.toLocaleDateString(e);
572
+ }
573
+ getTimezoneOffset() {
574
+ return this.timezoneOffset;
575
+ }
576
+ getTimeZoneName() {
577
+ if (this.timezoneFixed)
578
+ return this.timezoneName;
579
+ if (this.DateTimeFormat)
580
+ return this.DateTimeFormat().resolvedOptions().timeZone;
581
+ }
582
+ getLongMonthName() {
583
+ var e;
584
+ return (e = this.format({ month: "long" })) !== null && e !== void 0 ? e : tt[this.getMonth()];
585
+ }
586
+ getShortMonthName() {
587
+ var e;
588
+ return (e = this.format({ month: "short" })) !== null && e !== void 0 ? e : Ht[this.getMonth()];
589
+ }
590
+ getLongWeekdayName() {
591
+ var e;
592
+ return (e = this.format({ weekday: "long" })) !== null && e !== void 0 ? e : st[this.displayDate.getDay()];
593
+ }
594
+ getShortWeekdayName() {
595
+ var e;
596
+ return (e = this.format({ weekday: "short" })) !== null && e !== void 0 ? e : Wt[this.displayDate.getDay()];
597
+ }
598
+ valid() {
599
+ return !isNaN(this.getTime());
600
+ }
601
+ format(e) {
602
+ return this.DateTimeFormat && this.DateTimeFormat(this.locale, e).format(this.displayDate);
603
+ }
604
+ /**
605
+ * Create a Date object fixed to it's declared Timezone. Both
606
+ * - 2021-08-06T02:29:00.000Z and
607
+ * - 2021-08-06T02:29:00.000+08:00
608
+ * will always be displayed as
609
+ * - 2021-08-06 02:29:00
610
+ * regardless timezoneOffset in JavaScript realm
611
+ *
612
+ * The implementation hack:
613
+ * Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
614
+ * we create a different Date to trick strftime, it's both simpler and more performant.
615
+ * Given that a template is expected to be parsed fewer times than rendered.
616
+ */
617
+ static createDateFixedToTimezone(e, s) {
618
+ const r = e.match(Ut);
619
+ if (r && r[1] === "Z")
620
+ return new R(+new Date(e), s, 0);
621
+ if (r && r[2] && r[3] && r[4]) {
622
+ const [, , i, n, o] = r, a = (i === "+" ? -1 : 1) * (parseInt(n, 10) * 60 + parseInt(o, 10));
623
+ return new R(+new Date(e), s, a);
624
+ }
625
+ return new R(e, s);
626
+ }
627
+ static getTimezoneOffset(e, s) {
628
+ const r = s.toLocaleString("en-US", { timeZone: e }), i = s.toLocaleString("en-US", { timeZone: "UTC" }), n = new Date(r);
629
+ return (+new Date(i) - +n) / (60 * 1e3);
630
+ }
631
+ }
632
+ class he {
633
+ constructor(e, s) {
634
+ this.base = 0, this.message = `${e} limit exceeded`, this.limit = s;
635
+ }
636
+ use(e) {
637
+ e = xe(e), b(this.base + e <= this.limit, this.message), this.base += e;
638
+ }
639
+ check(e) {
640
+ e = xe(e), b(e <= this.limit, this.message);
641
+ }
642
+ }
643
+ class ge extends F {
644
+ constructor(e, [s, r], i, n, o, a, l, h) {
645
+ super(e, i, n, o, h), this.trimLeft = !1, this.trimRight = !1;
646
+ const u = i[s] === "-", p = i[r - 1] === "-";
647
+ let S = u ? s + 1 : s, Y = p ? r - 1 : r;
648
+ for (; S < Y && f[i.charCodeAt(S)] & H; )
649
+ S++;
650
+ for (; Y > S && f[i.charCodeAt(Y - 1)] & H; )
651
+ Y--;
652
+ this.contentRange = [S, Y], this.trimLeft = u || a, this.trimRight = p || l;
653
+ }
654
+ get content() {
655
+ return this.input.slice(this.contentRange[0], this.contentRange[1]);
656
+ }
657
+ }
658
+ class Ne extends ge {
659
+ constructor(e, s, r, i, n) {
660
+ const { trimTagLeft: o, trimTagRight: a, tagDelimiterLeft: l, tagDelimiterRight: h } = i, [u, p] = [s + l.length, r - h.length];
661
+ super(g.Tag, [u, p], e, s, r, o, a, n), this.tokenizer = new z(e, i.operators, n, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal tag syntax, tag name expected"), this.tokenizer.skipBlank();
662
+ }
663
+ get args() {
664
+ return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
665
+ }
666
+ }
667
+ class Yt extends ge {
668
+ constructor(e, s, r, i, n) {
669
+ const { trimOutputLeft: o, trimOutputRight: a, outputDelimiterLeft: l, outputDelimiterRight: h } = i, u = [s + l.length, r - h.length];
670
+ super(g.Output, u, e, s, r, o, a, n);
671
+ }
672
+ }
673
+ class De extends F {
674
+ constructor(e, s, r, i) {
675
+ super(g.HTML, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.trimLeft = 0, this.trimRight = 0;
676
+ }
677
+ getContent() {
678
+ return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
679
+ }
680
+ }
681
+ class Jt extends F {
682
+ constructor(e, s, r, i) {
683
+ super(g.Number, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = Number(this.getText());
684
+ }
685
+ }
686
+ class ne extends F {
687
+ constructor(e, s, r, i) {
688
+ super(g.Word, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = this.getText();
689
+ }
690
+ }
691
+ class Qt extends F {
692
+ constructor(e, s, r, i) {
693
+ super(g.Literal, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.literal = this.getText(), this.content = Xe[this.literal];
694
+ }
695
+ }
696
+ const qe = {
697
+ "==": 2,
698
+ "!=": 2,
699
+ ">": 2,
700
+ "<": 2,
701
+ ">=": 2,
702
+ "<=": 2,
703
+ contains: 2,
704
+ not: 1,
705
+ and: 0,
706
+ or: 0
707
+ }, Zt = {
708
+ "==": 0,
709
+ "!=": 0,
710
+ ">": 0,
711
+ "<": 0,
712
+ ">=": 0,
713
+ "<=": 0,
714
+ contains: 0,
715
+ not: 1,
716
+ and: 0,
717
+ or: 0
718
+ /* OperatorType.Binary */
719
+ };
720
+ class Gt extends F {
721
+ constructor(e, s, r, i) {
722
+ super(g.Operator, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.operator = this.getText();
723
+ }
724
+ getPrecedence() {
725
+ const e = this.getText();
726
+ return e in qe ? qe[e] : 1;
727
+ }
728
+ }
729
+ class Me extends F {
730
+ constructor(e, s, r, i, n, o) {
731
+ super(g.PropertyAccess, r, i, n, o), this.variable = e, this.props = s;
732
+ }
733
+ }
734
+ class Xt extends F {
735
+ constructor(e, s, r, i, n, o) {
736
+ super(g.Filter, r, i, n, o), this.name = e, this.args = s;
737
+ }
738
+ }
739
+ class Kt extends F {
740
+ constructor(e, s, r, i, n, o) {
741
+ super(g.Hash, e, s, r, o), this.input = e, this.begin = s, this.end = r, this.name = i, this.value = n, this.file = o;
742
+ }
743
+ }
744
+ const es = /[\da-fA-F]/, Ie = /[0-7]/, $e = {
745
+ b: "\b",
746
+ f: "\f",
747
+ n: `
748
+ `,
749
+ r: "\r",
750
+ t: " ",
751
+ v: "\v"
752
+ };
753
+ function Pe(t) {
754
+ const e = t.charCodeAt(0);
755
+ return e >= 97 ? e - 87 : e >= 65 ? e - 55 : e - 48;
756
+ }
757
+ function ts(t) {
758
+ let e = "";
759
+ for (let s = 1; s < t.length - 1; s++) {
760
+ if (t[s] !== "\\") {
761
+ e += t[s];
762
+ continue;
763
+ }
764
+ if ($e[t[s + 1]] !== void 0)
765
+ e += $e[t[++s]];
766
+ else if (t[s + 1] === "u") {
767
+ let r = 0, i = s + 2;
768
+ for (; i <= s + 5 && es.test(t[i]); )
769
+ r = r * 16 + Pe(t[i++]);
770
+ s = i - 1, e += String.fromCharCode(r);
771
+ } else if (!Ie.test(t[s + 1]))
772
+ e += t[++s];
773
+ else {
774
+ let r = s + 1, i = 0;
775
+ for (; r <= s + 3 && Ie.test(t[r]); )
776
+ i = i * 8 + Pe(t[r++]);
777
+ s = r - 1, e += String.fromCharCode(i);
778
+ }
779
+ }
780
+ return e;
781
+ }
782
+ class ss extends F {
783
+ constructor(e, s, r, i) {
784
+ super(g.Quoted, e, s, r, i), this.input = e, this.begin = s, this.end = r, this.file = i, this.content = ts(this.getText());
785
+ }
786
+ }
787
+ class rs extends F {
788
+ constructor(e, s, r, i, n, o) {
789
+ super(g.Range, e, s, r, o), this.input = e, this.begin = s, this.end = r, this.lhs = i, this.rhs = n, this.file = o;
790
+ }
791
+ }
792
+ class is extends ge {
793
+ constructor(e, s, r, i, n) {
794
+ super(g.Tag, [s, r], e, s, r, !1, !1, n), this.tokenizer = new z(e, i.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();
795
+ }
796
+ }
797
+ class ns extends F {
798
+ constructor(e, s, r, i, n, o) {
799
+ super(g.FilteredValue, r, i, n, o), this.initial = e, this.filters = s, this.input = r, this.begin = i, this.end = n, this.file = o;
800
+ }
801
+ }
802
+ const os = {
803
+ now: () => Date.now()
804
+ };
805
+ function rt() {
806
+ return typeof global == "object" && global.performance || typeof window == "object" && window.performance || os;
807
+ }
808
+ class as {
809
+ constructor() {
810
+ this.buffer = "";
811
+ }
812
+ write(e) {
813
+ this.buffer += c(e);
814
+ }
815
+ }
816
+ class ls {
817
+ constructor() {
818
+ throw this.buffer = "", this.stream = null, new Error("streaming not supported in browser");
819
+ }
820
+ }
821
+ class hs {
822
+ constructor() {
823
+ this.buffer = "";
824
+ }
825
+ write(e) {
826
+ e = d(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = c(this.buffer) + c(e);
827
+ }
828
+ }
829
+ class cs {
830
+ renderTemplatesToNodeStream(e, s) {
831
+ const r = new ls();
832
+ return Promise.resolve().then(() => N(this.renderTemplates(e, s, r))).then(() => r.end(), (i) => r.error(i)), r.stream;
833
+ }
834
+ *renderTemplates(e, s, r) {
835
+ r || (r = s.opts.keepOutputType ? new hs() : new as());
836
+ const i = [];
837
+ for (const n of e) {
838
+ s.renderLimit.check(rt().now());
839
+ try {
840
+ const o = yield n.render(s, r);
841
+ if (o && r.write(o), r.break || r.continue)
842
+ break;
843
+ } catch (o) {
844
+ const a = B.is(o) ? o : new _t(o, n);
845
+ if (s.opts.catchAllErrors)
846
+ i.push(a);
847
+ else
848
+ throw a;
849
+ }
850
+ }
851
+ if (i.length)
852
+ throw new Ze(i);
853
+ return r.buffer;
854
+ }
855
+ }
856
+ class us {
857
+ constructor(e) {
858
+ this.postfix = [...ps(e)];
859
+ }
860
+ *evaluate(e, s) {
861
+ b(e, "unable to evaluate: context not defined");
862
+ const r = [];
863
+ for (const i of this.postfix)
864
+ if (lt(i)) {
865
+ const n = r.pop();
866
+ let o;
867
+ if (Zt[i.operator] === 1)
868
+ o = yield e.opts.operators[i.operator](n, e);
869
+ else {
870
+ const a = r.pop();
871
+ o = yield e.opts.operators[i.operator](a, n, e);
872
+ }
873
+ r.push(o);
874
+ } else
875
+ r.push(yield y(i, e, s));
876
+ return r[0];
877
+ }
878
+ valid() {
879
+ return !!this.postfix.length;
880
+ }
881
+ }
882
+ function* y(t, e, s = !1) {
883
+ if (t) {
884
+ if ("content" in t)
885
+ return t.content;
886
+ if (Xs(t))
887
+ return yield ds(t, e, s);
888
+ if (Ks(t))
889
+ return yield fs(t, e);
890
+ }
891
+ }
892
+ function* ds(t, e, s) {
893
+ const r = [];
894
+ for (const i of t.props)
895
+ r.push(yield y(i, e, !1));
896
+ try {
897
+ if (t.variable) {
898
+ const i = yield y(t.variable, e, s);
899
+ return yield e._getFromScope(i, r);
900
+ } else
901
+ return yield e._get(r);
902
+ } catch (i) {
903
+ if (s && i.name === "InternalUndefinedVariableError")
904
+ return null;
905
+ throw new vt(i, t);
906
+ }
907
+ }
908
+ function it(t) {
909
+ return t.content;
910
+ }
911
+ function* fs(t, e) {
912
+ const s = yield y(t.lhs, e), r = yield y(t.rhs, e);
913
+ return Ye(+s, +r + 1);
914
+ }
915
+ function* ps(t) {
916
+ const e = [];
917
+ for (const s of t)
918
+ if (lt(s)) {
919
+ for (; e.length && e[e.length - 1].getPrecedence() > s.getPrecedence(); )
920
+ yield e.pop();
921
+ e.push(s);
922
+ } else
923
+ yield s;
924
+ for (; e.length; )
925
+ yield e.pop();
926
+ }
927
+ function $(t, e) {
928
+ return !re(t, e);
929
+ }
930
+ function re(t, e) {
931
+ return t = d(t), e.opts.jsTruthy ? !t : t === !1 || t === void 0 || t === null;
932
+ }
933
+ const gs = {
934
+ "==": P,
935
+ "!=": (t, e) => !P(t, e),
936
+ ">": (t, e) => E(t) ? t.gt(e) : E(e) ? e.lt(t) : d(t) > d(e),
937
+ "<": (t, e) => E(t) ? t.lt(e) : E(e) ? e.gt(t) : d(t) < d(e),
938
+ ">=": (t, e) => E(t) ? t.geq(e) : E(e) ? e.leq(t) : d(t) >= d(e),
939
+ "<=": (t, e) => E(t) ? t.leq(e) : E(e) ? e.geq(t) : d(t) <= d(e),
940
+ contains: (t, e) => (t = d(t), k(t) ? t.some((s) => P(s, e)) : w(t == null ? void 0 : t.indexOf) ? t.indexOf(d(e)) > -1 : !1),
941
+ not: (t, e) => re(d(t), e),
942
+ and: (t, e, s) => $(d(t), s) && $(d(e), s),
943
+ or: (t, e, s) => $(d(t), s) || $(d(e), s)
944
+ };
945
+ function P(t, e) {
946
+ return E(t) ? t.equals(e) : E(e) ? e.equals(t) : (t = d(t), e = d(e), k(t) ? k(e) && ms(t, e) : t === e);
947
+ }
948
+ function ms(t, e) {
949
+ return t.length !== e.length ? !1 : !t.some((s, r) => !P(s, e[r]));
950
+ }
951
+ class oe {
952
+ constructor(e, s, r, i) {
953
+ this.key = e, this.value = s, this.next = r, this.prev = i;
954
+ }
955
+ }
956
+ class Ce {
957
+ constructor(e, s = 0) {
958
+ this.limit = e, this.size = s, this.cache = {}, this.head = new oe("HEAD", null, null, null), this.tail = new oe("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
959
+ }
960
+ write(e, s) {
961
+ if (this.cache[e])
962
+ this.cache[e].value = s;
963
+ else {
964
+ const r = new oe(e, s, this.head.next, this.head);
965
+ this.head.next.prev = r, this.head.next = r, this.cache[e] = r, this.size++, this.ensureLimit();
966
+ }
967
+ }
968
+ read(e) {
969
+ if (!this.cache[e])
970
+ return;
971
+ const { value: s } = this.cache[e];
972
+ return this.remove(e), this.write(e, s), s;
973
+ }
974
+ remove(e) {
975
+ const s = this.cache[e];
976
+ s.prev.next = s.next, s.next.prev = s.prev, delete this.cache[e], this.size--;
977
+ }
978
+ clear() {
979
+ this.head.next = this.tail, this.tail.prev = this.head, this.size = 0, this.cache = {};
980
+ }
981
+ ensureLimit() {
982
+ this.size > this.limit && this.remove(this.tail.prev.key);
983
+ }
984
+ }
985
+ function nt(t, e) {
986
+ const s = document.createElement("base");
987
+ s.href = t;
988
+ const r = document.getElementsByTagName("head")[0];
989
+ r.insertBefore(s, r.firstChild);
990
+ const i = document.createElement("a");
991
+ i.href = e;
992
+ const n = i.href;
993
+ return r.removeChild(s), n;
994
+ }
995
+ function ys(t, e, s) {
996
+ return t.length && We(t) !== "/" && (t += "/"), nt(t, e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (i, n, o) => {
997
+ const a = o.split("/").pop();
998
+ return /\.\w+$/.test(a) ? i : n + o + s;
999
+ });
1000
+ }
1001
+ function ws(t) {
1002
+ return O(this, void 0, void 0, function* () {
1003
+ return new Promise((e, s) => {
1004
+ const r = new XMLHttpRequest();
1005
+ r.onload = () => {
1006
+ r.status >= 200 && r.status < 300 ? e(r.responseText) : s(new Error(r.statusText));
1007
+ }, r.onerror = () => {
1008
+ s(new Error("An error occurred whilst receiving the response."));
1009
+ }, r.open("GET", t), r.send();
1010
+ });
1011
+ });
1012
+ }
1013
+ function Ts(t) {
1014
+ const e = new XMLHttpRequest();
1015
+ if (e.open("GET", t, !1), e.send(), e.status < 200 || e.status >= 300)
1016
+ throw new Error(e.statusText);
1017
+ return e.responseText;
1018
+ }
1019
+ function ks(t) {
1020
+ return O(this, void 0, void 0, function* () {
1021
+ return !0;
1022
+ });
1023
+ }
1024
+ function bs(t) {
1025
+ return !0;
1026
+ }
1027
+ function xs(t) {
1028
+ return nt(t, ".");
1029
+ }
1030
+ const _s = "/";
1031
+ var vs = /* @__PURE__ */ Object.freeze({
1032
+ __proto__: null,
1033
+ resolve: ys,
1034
+ readFile: ws,
1035
+ readFileSync: Ts,
1036
+ exists: ks,
1037
+ existsSync: bs,
1038
+ dirname: xs,
1039
+ sep: _s
1040
+ });
1041
+ function Ls(t, e, ...s) {
1042
+ return t = d(t), k(t) || _(t) ? t.length ? t : e : t === !1 && new Map(s).get("allow_false") ? !1 : re(t, this.context) ? e : t;
1043
+ }
1044
+ function Ae(t, e = 0) {
1045
+ return JSON.stringify(t, null, e);
1046
+ }
1047
+ function Fs(t, e = 0) {
1048
+ const s = [];
1049
+ return JSON.stringify(t, function(r, i) {
1050
+ if (typeof i != "object" || i === null)
1051
+ return i;
1052
+ for (; s.length > 0 && s[s.length - 1] !== this; )
1053
+ s.pop();
1054
+ return s.includes(i) ? "[Circular]" : (s.push(i), i);
1055
+ }, e);
1056
+ }
1057
+ function Ss(t) {
1058
+ return Number(t);
1059
+ }
1060
+ const Os = {
1061
+ raw: !0,
1062
+ handler: Qe
1063
+ };
1064
+ var ot = {
1065
+ default: Ls,
1066
+ raw: Os,
1067
+ jsonify: Ae,
1068
+ to_integer: Ss,
1069
+ json: Ae,
1070
+ inspect: Fs
1071
+ };
1072
+ const Rs = {
1073
+ "&": "&amp;",
1074
+ "<": "&lt;",
1075
+ ">": "&gt;",
1076
+ '"': "&#34;",
1077
+ "'": "&#39;"
1078
+ }, Es = {
1079
+ "&amp;": "&",
1080
+ "&lt;": "<",
1081
+ "&gt;": ">",
1082
+ "&#34;": '"',
1083
+ "&#39;": "'"
1084
+ };
1085
+ function ie(t) {
1086
+ return t = c(t), this.context.memoryLimit.use(t.length), t.replace(/&|<|>|"|'/g, (e) => Rs[e]);
1087
+ }
1088
+ function zs(t) {
1089
+ return ie.call(this, t);
1090
+ }
1091
+ function Ns(t) {
1092
+ return t = c(t), this.context.memoryLimit.use(t.length), t.replace(/&(amp|lt|gt|#34|#39);/g, (e) => Es[e]);
1093
+ }
1094
+ function Ds(t) {
1095
+ return ie.call(this, Ns.call(this, t));
1096
+ }
1097
+ function qs(t) {
1098
+ const e = c(t);
1099
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, `<br />
1100
+ `);
1101
+ }
1102
+ function Ms(t) {
1103
+ const e = c(t);
1104
+ return this.context.memoryLimit.use(e.length), e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g, "");
1105
+ }
1106
+ var Is = /* @__PURE__ */ Object.freeze({
1107
+ __proto__: null,
1108
+ escape: ie,
1109
+ xml_escape: zs,
1110
+ escape_once: Ds,
1111
+ newline_to_br: qs,
1112
+ strip_html: Ms
1113
+ });
1114
+ class $s {
1115
+ constructor(e) {
1116
+ this.mapping = e, this.sep = "/";
1117
+ }
1118
+ exists(e) {
1119
+ return O(this, void 0, void 0, function* () {
1120
+ return this.existsSync(e);
1121
+ });
1122
+ }
1123
+ existsSync(e) {
1124
+ return !v(this.mapping[e]);
1125
+ }
1126
+ readFile(e) {
1127
+ return O(this, void 0, void 0, function* () {
1128
+ return this.readFileSync(e);
1129
+ });
1130
+ }
1131
+ readFileSync(e) {
1132
+ const s = this.mapping[e];
1133
+ if (v(s))
1134
+ throw new Error(`ENOENT: ${e}`);
1135
+ return s;
1136
+ }
1137
+ dirname(e) {
1138
+ const s = e.split(this.sep);
1139
+ return s.pop(), s.join(this.sep);
1140
+ }
1141
+ resolve(e, s, r) {
1142
+ if (s += r, e === ".")
1143
+ return s;
1144
+ const i = e.split(/\/+/);
1145
+ for (const n of s.split(this.sep))
1146
+ n === "." || n === "" || (n === ".." ? (i.length > 1 || i[0] !== "") && i.pop() : i.push(n));
1147
+ return i.join(this.sep);
1148
+ }
1149
+ }
1150
+ const U = {
1151
+ root: ["."],
1152
+ layouts: ["."],
1153
+ partials: ["."],
1154
+ relativeReference: !0,
1155
+ jekyllInclude: !1,
1156
+ keyValueSeparator: ":",
1157
+ cache: void 0,
1158
+ extname: "",
1159
+ fs: vs,
1160
+ dynamicPartials: !0,
1161
+ jsTruthy: !1,
1162
+ dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
1163
+ locale: "",
1164
+ trimTagRight: !1,
1165
+ trimTagLeft: !1,
1166
+ trimOutputRight: !1,
1167
+ trimOutputLeft: !1,
1168
+ greedy: !0,
1169
+ tagDelimiterLeft: "{%",
1170
+ tagDelimiterRight: "%}",
1171
+ outputDelimiterLeft: "{{",
1172
+ outputDelimiterRight: "}}",
1173
+ preserveTimezones: !1,
1174
+ strictFilters: !1,
1175
+ strictVariables: !1,
1176
+ ownPropertyOnly: !0,
1177
+ lenientIf: !1,
1178
+ globals: {},
1179
+ keepOutputType: !1,
1180
+ operators: gs,
1181
+ memoryLimit: 1 / 0,
1182
+ parseLimit: 1 / 0,
1183
+ renderLimit: 1 / 0
1184
+ };
1185
+ function Ps(t) {
1186
+ var e, s;
1187
+ if (t.hasOwnProperty("root") && (t.hasOwnProperty("partials") || (t.partials = t.root), t.hasOwnProperty("layouts") || (t.layouts = t.root)), t.hasOwnProperty("cache")) {
1188
+ let r;
1189
+ typeof t.cache == "number" ? r = t.cache > 0 ? new Ce(t.cache) : void 0 : typeof t.cache == "object" ? r = t.cache : r = t.cache ? new Ce(1024) : void 0, t.cache = r;
1190
+ }
1191
+ return t = Object.assign(Object.assign(Object.assign({}, U), 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 = G(t.root), t.partials = G(t.partials), t.layouts = G(t.layouts), t.outputEscape = t.outputEscape && Cs(t.outputEscape), t.locale || (t.locale = (s = (e = et()) === null || e === void 0 ? void 0 : e().resolvedOptions().locale) !== null && s !== void 0 ? s : "en-US"), t.templates && (t.fs = new $s(t.templates), t.relativeReference = !0, t.root = t.partials = t.layouts = "."), t;
1192
+ }
1193
+ function Cs(t) {
1194
+ return t === "escape" ? ie : t === "json" ? ot.json : (b(w(t), "`outputEscape` need to be of type string or function"), t);
1195
+ }
1196
+ function G(t) {
1197
+ let e = [];
1198
+ return k(t) && (e = t), _(t) && (e = [t]), e;
1199
+ }
1200
+ function As(t, e) {
1201
+ let s = !1;
1202
+ for (let r = 0; r < t.length; r++) {
1203
+ const i = t[r];
1204
+ Qs(i) && (!s && i.trimLeft && Vs(t[r - 1], e.greedy), j(i) && (i.name === "raw" ? s = !0 : i.name === "endraw" && (s = !1)), !s && i.trimRight && Bs(t[r + 1], e.greedy));
1205
+ }
1206
+ }
1207
+ function Vs(t, e) {
1208
+ if (!t || !ye(t))
1209
+ return;
1210
+ const s = e ? H : Ge;
1211
+ for (; f[t.input.charCodeAt(t.end - 1 - t.trimRight)] & s; )
1212
+ t.trimRight++;
1213
+ }
1214
+ function Bs(t, e) {
1215
+ if (!t || !ye(t))
1216
+ return;
1217
+ const s = e ? H : Ge;
1218
+ for (; f[t.input.charCodeAt(t.begin + t.trimLeft)] & s; )
1219
+ t.trimLeft++;
1220
+ t.input.charAt(t.begin + t.trimLeft) === `
1221
+ ` && t.trimLeft++;
1222
+ }
1223
+ class z {
1224
+ constructor(e, s = U.operators, r, i) {
1225
+ this.input = e, this.file = r, this.rawBeginAt = -1, this.p = i ? i[0] : 0, this.N = i ? i[1] : e.length, this.opTrie = Re(s), this.literalTrie = Re(Xe);
1226
+ }
1227
+ readExpression() {
1228
+ return new us(this.readExpressionTokens());
1229
+ }
1230
+ *readExpressionTokens() {
1231
+ for (; this.p < this.N; ) {
1232
+ const e = this.readOperator();
1233
+ if (e) {
1234
+ yield e;
1235
+ continue;
1236
+ }
1237
+ const s = this.readValue();
1238
+ if (s) {
1239
+ yield s;
1240
+ continue;
1241
+ }
1242
+ return;
1243
+ }
1244
+ }
1245
+ readOperator() {
1246
+ this.skipBlank();
1247
+ const e = this.matchTrie(this.opTrie);
1248
+ if (e !== -1)
1249
+ return new Gt(this.input, this.p, this.p = e, this.file);
1250
+ }
1251
+ matchTrie(e) {
1252
+ let s = e, r = this.p, i;
1253
+ for (; s[this.input[r]] && r < this.N; )
1254
+ s = s[this.input[r++]], s.end && (i = s);
1255
+ return !i || i.needBoundary && Q(this.peek(r - this.p)) ? -1 : r;
1256
+ }
1257
+ readFilteredValue() {
1258
+ const e = this.p, s = this.readExpression();
1259
+ this.assert(s.valid(), `invalid value expression: ${this.snapshot()}`);
1260
+ const r = this.readFilters();
1261
+ return new ns(s, r, this.input, e, this.p, this.file);
1262
+ }
1263
+ readFilters() {
1264
+ const e = [];
1265
+ for (; ; ) {
1266
+ const s = this.readFilter();
1267
+ if (!s)
1268
+ return e;
1269
+ e.push(s);
1270
+ }
1271
+ }
1272
+ readFilter() {
1273
+ if (this.skipBlank(), this.end())
1274
+ return null;
1275
+ this.assert(this.peek() === "|", 'expected "|" before filter'), this.p++;
1276
+ const e = this.p, s = this.readIdentifier();
1277
+ if (!s.size())
1278
+ return this.assert(this.end(), "expected filter name"), null;
1279
+ const r = [];
1280
+ if (this.skipBlank(), this.peek() === ":")
1281
+ do {
1282
+ ++this.p;
1283
+ const i = this.readFilterArg();
1284
+ i && r.push(i), this.skipBlank(), this.assert(this.end() || this.peek() === "," || this.peek() === "|", () => `unexpected character ${this.snapshot()}`);
1285
+ } while (this.peek() === ",");
1286
+ else if (!(this.peek() === "|" || this.end())) throw this.error('expected ":" after filter name');
1287
+ return new Xt(s.getText(), r, this.input, e, this.p, this.file);
1288
+ }
1289
+ readFilterArg() {
1290
+ const e = this.readValue();
1291
+ if (!e)
1292
+ return;
1293
+ if (this.skipBlank(), this.peek() !== ":")
1294
+ return e;
1295
+ ++this.p;
1296
+ const s = this.readValue();
1297
+ return [e.getText(), s];
1298
+ }
1299
+ readTopLevelTokens(e = U) {
1300
+ const s = [];
1301
+ for (; this.p < this.N; ) {
1302
+ const r = this.readTopLevelToken(e);
1303
+ s.push(r);
1304
+ }
1305
+ return As(s, e), s;
1306
+ }
1307
+ readTopLevelToken(e) {
1308
+ const { tagDelimiterLeft: s, outputDelimiterLeft: r } = e;
1309
+ return this.rawBeginAt > -1 ? this.readEndrawOrRawContent(e) : this.match(s) ? this.readTagToken(e) : this.match(r) ? this.readOutputToken(e) : this.readHTMLToken([s, r]);
1310
+ }
1311
+ readHTMLToken(e) {
1312
+ const s = this.p;
1313
+ for (; this.p < this.N && !e.some((r) => this.match(r)); )
1314
+ ++this.p;
1315
+ return new De(this.input, s, this.p, this.file);
1316
+ }
1317
+ readTagToken(e) {
1318
+ const { file: s, input: r } = this, i = this.p;
1319
+ if (this.readToDelimiter(e.tagDelimiterRight) === -1)
1320
+ throw this.error(`tag ${this.snapshot(i)} not closed`, i);
1321
+ const n = new Ne(r, i, this.p, e, s);
1322
+ return n.name === "raw" && (this.rawBeginAt = i), n;
1323
+ }
1324
+ readToDelimiter(e, s = !1) {
1325
+ for (this.skipBlank(); this.p < this.N; ) {
1326
+ if (s && this.peekType() & Fe) {
1327
+ this.readQuoted();
1328
+ continue;
1329
+ }
1330
+ if (++this.p, this.rmatch(e))
1331
+ return this.p;
1332
+ }
1333
+ return -1;
1334
+ }
1335
+ readOutputToken(e = U) {
1336
+ const { file: s, input: r } = this, { outputDelimiterRight: i } = e, n = this.p;
1337
+ if (this.readToDelimiter(i, !0) === -1)
1338
+ throw this.error(`output ${this.snapshot(n)} not closed`, n);
1339
+ return new Yt(r, n, this.p, e, s);
1340
+ }
1341
+ readEndrawOrRawContent(e) {
1342
+ const { tagDelimiterLeft: s, tagDelimiterRight: r } = e, i = this.p;
1343
+ let n = this.readTo(s) - s.length;
1344
+ for (; this.p < this.N; ) {
1345
+ if (this.readIdentifier().getText() !== "endraw") {
1346
+ n = this.readTo(s) - s.length;
1347
+ continue;
1348
+ }
1349
+ for (; this.p <= this.N; ) {
1350
+ if (this.rmatch(r)) {
1351
+ const o = this.p;
1352
+ return i === n ? (this.rawBeginAt = -1, new Ne(this.input, i, o, e, this.file)) : (this.p = n, new De(this.input, i, n, this.file));
1353
+ }
1354
+ if (this.rmatch(s))
1355
+ break;
1356
+ this.p++;
1357
+ }
1358
+ }
1359
+ throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, i);
1360
+ }
1361
+ readLiquidTagTokens(e = U) {
1362
+ const s = [];
1363
+ for (; this.p < this.N; ) {
1364
+ const r = this.readLiquidTagToken(e);
1365
+ r && s.push(r);
1366
+ }
1367
+ return s;
1368
+ }
1369
+ readLiquidTagToken(e) {
1370
+ if (this.skipBlank(), this.end())
1371
+ return;
1372
+ const s = this.p;
1373
+ this.readToDelimiter(`
1374
+ `);
1375
+ const r = this.p;
1376
+ return new is(this.input, s, r, e, this.file);
1377
+ }
1378
+ error(e, s = this.p) {
1379
+ return new bt(e, new ne(this.input, s, this.N, this.file));
1380
+ }
1381
+ assert(e, s, r) {
1382
+ if (!e)
1383
+ throw this.error(typeof s == "function" ? s() : s, r);
1384
+ }
1385
+ snapshot(e = this.p) {
1386
+ return JSON.stringify(kt(this.input.slice(e, this.N), 32));
1387
+ }
1388
+ /**
1389
+ * @deprecated use #readIdentifier instead
1390
+ */
1391
+ readWord() {
1392
+ return this.readIdentifier();
1393
+ }
1394
+ readIdentifier() {
1395
+ this.skipBlank();
1396
+ const e = this.p;
1397
+ for (; !this.end() && Q(this.peek()); )
1398
+ ++this.p;
1399
+ return new ne(this.input, e, this.p, this.file);
1400
+ }
1401
+ readNonEmptyIdentifier() {
1402
+ const e = this.readIdentifier();
1403
+ return e.size() ? e : void 0;
1404
+ }
1405
+ readTagName() {
1406
+ return this.skipBlank(), this.input[this.p] === "#" ? this.input.slice(this.p, ++this.p) : this.readIdentifier().getText();
1407
+ }
1408
+ readHashes(e) {
1409
+ const s = [];
1410
+ for (; ; ) {
1411
+ const r = this.readHash(e);
1412
+ if (!r)
1413
+ return s;
1414
+ s.push(r);
1415
+ }
1416
+ }
1417
+ readHash(e) {
1418
+ this.skipBlank(), this.peek() === "," && ++this.p;
1419
+ const s = this.p, r = this.readNonEmptyIdentifier();
1420
+ if (!r)
1421
+ return;
1422
+ let i;
1423
+ this.skipBlank();
1424
+ const n = _(e) ? e : e ? "=" : ":";
1425
+ return this.peek() === n && (++this.p, i = this.readValue()), new Kt(this.input, s, this.p, r, i, this.file);
1426
+ }
1427
+ remaining() {
1428
+ return this.input.slice(this.p, this.N);
1429
+ }
1430
+ advance(e = 1) {
1431
+ this.p += e;
1432
+ }
1433
+ end() {
1434
+ return this.p >= this.N;
1435
+ }
1436
+ readTo(e) {
1437
+ for (; this.p < this.N; )
1438
+ if (++this.p, this.rmatch(e))
1439
+ return this.p;
1440
+ return -1;
1441
+ }
1442
+ readValue() {
1443
+ this.skipBlank();
1444
+ const e = this.p, s = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber(), r = this.readProperties(!s);
1445
+ return r.length ? new Me(s, r, this.input, e, this.p) : s;
1446
+ }
1447
+ readScopeValue() {
1448
+ this.skipBlank();
1449
+ const e = this.p, s = this.readProperties();
1450
+ if (s.length)
1451
+ return new Me(void 0, s, this.input, e, this.p);
1452
+ }
1453
+ readProperties(e = !0) {
1454
+ const s = [];
1455
+ for (; ; ) {
1456
+ if (this.peek() === "[") {
1457
+ this.p++;
1458
+ const r = this.readValue() || new ne(this.input, this.p, this.p, this.file);
1459
+ this.assert(this.readTo("]") !== -1, "[ not closed"), s.push(r);
1460
+ continue;
1461
+ }
1462
+ if (e && !s.length) {
1463
+ const r = this.readNonEmptyIdentifier();
1464
+ if (r) {
1465
+ s.push(r);
1466
+ continue;
1467
+ }
1468
+ }
1469
+ if (this.peek() === "." && this.peek(1) !== ".") {
1470
+ this.p++;
1471
+ const r = this.readNonEmptyIdentifier();
1472
+ if (!r)
1473
+ break;
1474
+ s.push(r);
1475
+ continue;
1476
+ }
1477
+ break;
1478
+ }
1479
+ return s;
1480
+ }
1481
+ readNumber() {
1482
+ this.skipBlank();
1483
+ let e = !1, s = !1, r = 0;
1484
+ for (this.peekType() & zt && r++; this.p + r <= this.N; )
1485
+ if (this.peekType(r) & Et)
1486
+ s = !0, r++;
1487
+ else if (this.peek(r) === "." && this.peek(r + 1) !== ".") {
1488
+ if (e || !s)
1489
+ return;
1490
+ e = !0, r++;
1491
+ } else
1492
+ break;
1493
+ if (s && !Q(this.peek(r))) {
1494
+ const i = new Jt(this.input, this.p, this.p + r, this.file);
1495
+ return this.advance(r), i;
1496
+ }
1497
+ }
1498
+ readLiteral() {
1499
+ this.skipBlank();
1500
+ const e = this.matchTrie(this.literalTrie);
1501
+ if (e === -1)
1502
+ return;
1503
+ const s = new Qt(this.input, this.p, e, this.file);
1504
+ return this.p = e, s;
1505
+ }
1506
+ readRange() {
1507
+ this.skipBlank();
1508
+ const e = this.p;
1509
+ if (this.peek() !== "(")
1510
+ return;
1511
+ ++this.p;
1512
+ const s = this.readValueOrThrow();
1513
+ this.p += 2;
1514
+ const r = this.readValueOrThrow();
1515
+ return ++this.p, new rs(this.input, e, this.p, s, r, this.file);
1516
+ }
1517
+ readValueOrThrow() {
1518
+ const e = this.readValue();
1519
+ return this.assert(e, () => `unexpected token ${this.snapshot()}, value expected`), e;
1520
+ }
1521
+ readQuoted() {
1522
+ this.skipBlank();
1523
+ const e = this.p;
1524
+ if (!(this.peekType() & Fe))
1525
+ return;
1526
+ ++this.p;
1527
+ let s = !1;
1528
+ for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !s)); )
1529
+ s ? s = !1 : this.input[this.p - 1] === "\\" && (s = !0);
1530
+ return new ss(this.input, e, this.p, this.file);
1531
+ }
1532
+ *readFileNameTemplate(e) {
1533
+ const { outputDelimiterLeft: s } = e, r = [",", " ", s], i = new Set(r);
1534
+ for (; this.p < this.N && !i.has(this.peek()); )
1535
+ yield this.match(s) ? this.readOutputToken(e) : this.readHTMLToken(r);
1536
+ }
1537
+ match(e) {
1538
+ for (let s = 0; s < e.length; s++)
1539
+ if (e[s] !== this.input[this.p + s])
1540
+ return !1;
1541
+ return !0;
1542
+ }
1543
+ rmatch(e) {
1544
+ for (let s = 0; s < e.length; s++)
1545
+ if (e[e.length - 1 - s] !== this.input[this.p - 1 - s])
1546
+ return !1;
1547
+ return !0;
1548
+ }
1549
+ peekType(e = 0) {
1550
+ return this.p + e >= this.N ? 0 : f[this.input.charCodeAt(this.p + e)];
1551
+ }
1552
+ peek(e = 0) {
1553
+ return this.p + e >= this.N ? "" : this.input[this.p + e];
1554
+ }
1555
+ skipBlank() {
1556
+ for (; this.peekType() & H; )
1557
+ ++this.p;
1558
+ }
1559
+ }
1560
+ class js {
1561
+ constructor(e, s) {
1562
+ this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = s;
1563
+ }
1564
+ on(e, s) {
1565
+ return this.handlers[e] = s, this;
1566
+ }
1567
+ trigger(e, s) {
1568
+ const r = this.handlers[e];
1569
+ return r ? (r.call(this, s), !0) : !1;
1570
+ }
1571
+ start() {
1572
+ this.trigger("start");
1573
+ let e;
1574
+ for (; !this.stopRequested && (e = this.tokens.shift()); ) {
1575
+ if (this.trigger("token", e) || j(e) && this.trigger(`tag:${e.name}`, e))
1576
+ continue;
1577
+ const s = this.parseToken(e, this.tokens);
1578
+ this.trigger("template", s);
1579
+ }
1580
+ return this.stopRequested || this.trigger("end"), this;
1581
+ }
1582
+ stop() {
1583
+ return this.stopRequested = !0, this;
1584
+ }
1585
+ }
1586
+ class me {
1587
+ constructor(e) {
1588
+ this.token = e;
1589
+ }
1590
+ }
1591
+ class m extends me {
1592
+ constructor(e, s, r) {
1593
+ super(e), this.name = e.name, this.liquid = r, this.tokenizer = e.tokenizer;
1594
+ }
1595
+ }
1596
+ class W {
1597
+ constructor(e, s) {
1598
+ this.hash = {};
1599
+ const r = new z(e, {});
1600
+ for (const i of r.readHashes(s))
1601
+ this.hash[i.name.content] = i.value;
1602
+ }
1603
+ *render(e) {
1604
+ const s = {};
1605
+ for (const r of Object.keys(this.hash))
1606
+ s[r] = this.hash[r] === void 0 ? !0 : yield y(this.hash[r], e);
1607
+ return s;
1608
+ }
1609
+ }
1610
+ function Us(t) {
1611
+ return class extends m {
1612
+ constructor(e, s, r) {
1613
+ super(e, s, r), w(t.parse) && t.parse.call(this, e, s);
1614
+ }
1615
+ *render(e, s) {
1616
+ const r = yield new W(this.token.args, e.opts.keyValueSeparator).render(e);
1617
+ return yield t.render.call(this, e, s, r);
1618
+ }
1619
+ };
1620
+ }
1621
+ function Hs(t) {
1622
+ return k(t);
1623
+ }
1624
+ class at {
1625
+ constructor(e, s, r, i) {
1626
+ this.name = e, this.handler = w(s) ? s : w(s == null ? void 0 : s.handler) ? s.handler : Qe, this.raw = !w(s) && !!(s != null && s.raw), this.args = r, this.liquid = i;
1627
+ }
1628
+ *render(e, s) {
1629
+ const r = [];
1630
+ for (const i of this.args)
1631
+ Hs(i) ? r.push([i[0], yield y(i[1], s)]) : r.push(yield y(i, s));
1632
+ return yield this.handler.apply({ context: s, liquid: this.liquid }, [e, ...r]);
1633
+ }
1634
+ }
1635
+ class L {
1636
+ /**
1637
+ * @param str the value to be valuated, eg.: "foobar" | truncate: 3
1638
+ */
1639
+ constructor(e, s) {
1640
+ this.filters = [];
1641
+ const r = typeof e == "string" ? new z(e, s.options.operators).readFilteredValue() : e;
1642
+ this.initial = r.initial, this.filters = r.filters.map(({ name: i, args: n }) => new at(i, this.getFilter(s, i), n, s));
1643
+ }
1644
+ *value(e, s) {
1645
+ s = s || e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
1646
+ let r = yield this.initial.evaluate(e, s);
1647
+ for (const i of this.filters)
1648
+ r = yield i.render(r, e);
1649
+ return r;
1650
+ }
1651
+ getFilter(e, s) {
1652
+ const r = e.filters[s];
1653
+ return b(r || !e.options.strictFilters, () => `undefined filter: ${s}`), r;
1654
+ }
1655
+ }
1656
+ class Ws extends me {
1657
+ constructor(e, s) {
1658
+ var r;
1659
+ super(e);
1660
+ const i = new z(e.input, s.options.operators, e.file, e.contentRange);
1661
+ this.value = new L(i.readFilteredValue(), s);
1662
+ const n = this.value.filters, o = s.options.outputEscape;
1663
+ !(!((r = n[n.length - 1]) === null || r === void 0) && r.raw) && o && n.push(new at(toString.call(o), o, [], s));
1664
+ }
1665
+ *render(e, s) {
1666
+ const r = yield this.value.value(e, !1);
1667
+ s.write(r);
1668
+ }
1669
+ }
1670
+ class Ys extends me {
1671
+ constructor(e) {
1672
+ super(e), this.str = e.getContent();
1673
+ }
1674
+ *render(e, s) {
1675
+ s.write(this.str);
1676
+ }
1677
+ }
1678
+ var A;
1679
+ (function(t) {
1680
+ t.Partials = "partials", t.Layouts = "layouts", t.Root = "root";
1681
+ })(A || (A = {}));
1682
+ class Js {
1683
+ constructor(e) {
1684
+ if (this.options = e, e.relativeReference) {
1685
+ const s = e.fs.sep;
1686
+ b(s, "`fs.sep` is required for relative reference");
1687
+ const r = new RegExp(["." + s, ".." + s, "./", "../"].map((i) => gt(i)).join("|"));
1688
+ this.shouldLoadRelative = (i) => r.test(i);
1689
+ } else
1690
+ this.shouldLoadRelative = (s) => !1;
1691
+ this.contains = this.options.fs.contains || (() => !0);
1692
+ }
1693
+ *lookup(e, s, r, i) {
1694
+ const { fs: n } = this.options, o = this.options[s];
1695
+ for (const a of this.candidates(e, o, i, s !== A.Root))
1696
+ if (r ? n.existsSync(a) : yield n.exists(a))
1697
+ return a;
1698
+ throw this.lookupError(e, o);
1699
+ }
1700
+ *candidates(e, s, r, i) {
1701
+ const { fs: n, extname: o } = this.options;
1702
+ if (this.shouldLoadRelative(e) && r) {
1703
+ const a = n.resolve(this.dirname(r), e, o);
1704
+ for (const l of s)
1705
+ if (!i || this.contains(l, a)) {
1706
+ yield a;
1707
+ break;
1708
+ }
1709
+ }
1710
+ for (const a of s) {
1711
+ const l = n.resolve(a, e, o);
1712
+ (!i || this.contains(a, l)) && (yield l);
1713
+ }
1714
+ if (n.fallback !== void 0) {
1715
+ const a = n.fallback(e);
1716
+ a !== void 0 && (yield a);
1717
+ }
1718
+ }
1719
+ dirname(e) {
1720
+ const s = this.options.fs;
1721
+ return b(s.dirname, "`fs.dirname` is required for relative reference"), s.dirname(e);
1722
+ }
1723
+ lookupError(e, s) {
1724
+ const r = new Error("ENOENT");
1725
+ return r.message = `ENOENT: Failed to lookup "${e}" in "${s}"`, r.code = "ENOENT", r;
1726
+ }
1727
+ }
1728
+ class M {
1729
+ constructor(e) {
1730
+ 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 Js(this.liquid.options), this.parseLimit = new he("parse length", e.options.parseLimit);
1731
+ }
1732
+ parse(e, s) {
1733
+ e = String(e), this.parseLimit.use(e.length);
1734
+ const i = new z(e, this.liquid.options.operators, s).readTopLevelTokens(this.liquid.options);
1735
+ return this.parseTokens(i);
1736
+ }
1737
+ parseTokens(e) {
1738
+ let s;
1739
+ const r = [], i = [];
1740
+ for (; s = e.shift(); )
1741
+ try {
1742
+ r.push(this.parseToken(s, e));
1743
+ } catch (n) {
1744
+ if (this.liquid.options.catchAllErrors)
1745
+ i.push(n);
1746
+ else
1747
+ throw n;
1748
+ }
1749
+ if (i.length)
1750
+ throw new Ze(i);
1751
+ return r;
1752
+ }
1753
+ parseToken(e, s) {
1754
+ try {
1755
+ if (j(e)) {
1756
+ const r = this.liquid.tags[e.name];
1757
+ return b(r, `tag "${e.name}" not found`), new r(e, s, this.liquid, this);
1758
+ }
1759
+ return Zs(e) ? new Ws(e, this.liquid) : new Ys(e);
1760
+ } catch (r) {
1761
+ throw B.is(r) ? r : new xt(r, e);
1762
+ }
1763
+ }
1764
+ parseStream(e) {
1765
+ return new js(e, (s, r) => this.parseToken(s, r));
1766
+ }
1767
+ *_parseFileCached(e, s, r = A.Root, i) {
1768
+ const n = this.cache, o = this.loader.shouldLoadRelative(e) ? i + "," + e : r + ":" + e, a = yield n.read(o);
1769
+ if (a)
1770
+ return a;
1771
+ const l = this._parseFile(e, s, r, i), h = s ? yield l : N(l);
1772
+ n.write(o, h);
1773
+ try {
1774
+ return yield h;
1775
+ } catch (u) {
1776
+ throw n.remove(o), u;
1777
+ }
1778
+ }
1779
+ *_parseFile(e, s, r = A.Root, i) {
1780
+ const n = yield this.loader.lookup(e, r, s, i);
1781
+ return this.parse(s ? this.fs.readFileSync(n) : yield this.fs.readFile(n), n);
1782
+ }
1783
+ }
1784
+ var g;
1785
+ (function(t) {
1786
+ 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";
1787
+ })(g || (g = {}));
1788
+ function Qs(t) {
1789
+ return !!(q(t) & g.Delimited);
1790
+ }
1791
+ function lt(t) {
1792
+ return q(t) === g.Operator;
1793
+ }
1794
+ function ye(t) {
1795
+ return q(t) === g.HTML;
1796
+ }
1797
+ function Zs(t) {
1798
+ return q(t) === g.Output;
1799
+ }
1800
+ function j(t) {
1801
+ return q(t) === g.Tag;
1802
+ }
1803
+ function Gs(t) {
1804
+ return q(t) === g.Quoted;
1805
+ }
1806
+ function Xs(t) {
1807
+ return q(t) === g.PropertyAccess;
1808
+ }
1809
+ function Ks(t) {
1810
+ return q(t) === g.Range;
1811
+ }
1812
+ function q(t) {
1813
+ return t ? t.kind : -1;
1814
+ }
1815
+ class I {
1816
+ constructor(e = {}, s = U, r = {}, { memoryLimit: i, renderLimit: n } = {}) {
1817
+ var o, a, l, h, u;
1818
+ this.scopes = [{}], this.registers = {}, this.sync = !!r.sync, this.opts = s, this.globals = (o = r.globals) !== null && o !== void 0 ? o : s.globals, this.environments = te(e) ? e : Object(e), this.strictVariables = (a = r.strictVariables) !== null && a !== void 0 ? a : this.opts.strictVariables, this.ownPropertyOnly = (l = r.ownPropertyOnly) !== null && l !== void 0 ? l : s.ownPropertyOnly, this.memoryLimit = i ?? new he("memory alloc", (h = r.memoryLimit) !== null && h !== void 0 ? h : s.memoryLimit), this.renderLimit = n ?? new he("template render", rt().now() + ((u = r.renderLimit) !== null && u !== void 0 ? u : s.renderLimit));
1819
+ }
1820
+ getRegister(e) {
1821
+ return this.registers[e] = this.registers[e] || {};
1822
+ }
1823
+ setRegister(e, s) {
1824
+ return this.registers[e] = s;
1825
+ }
1826
+ saveRegister(...e) {
1827
+ return e.map((s) => [s, this.getRegister(s)]);
1828
+ }
1829
+ restoreRegister(e) {
1830
+ return e.forEach(([s, r]) => this.setRegister(s, r));
1831
+ }
1832
+ getAll() {
1833
+ return [this.globals, this.environments, ...this.scopes].reduce((e, s) => ee(e, s), {});
1834
+ }
1835
+ /**
1836
+ * @deprecated use `_get()` or `getSync()` instead
1837
+ */
1838
+ get(e) {
1839
+ return this.getSync(e);
1840
+ }
1841
+ getSync(e) {
1842
+ return D(this._get(e));
1843
+ }
1844
+ *_get(e) {
1845
+ const s = this.findScope(e[0]);
1846
+ return yield this._getFromScope(s, e);
1847
+ }
1848
+ /**
1849
+ * @deprecated use `_get()` instead
1850
+ */
1851
+ getFromScope(e, s) {
1852
+ return D(this._getFromScope(e, s));
1853
+ }
1854
+ *_getFromScope(e, s, r = this.strictVariables) {
1855
+ _(s) && (s = s.split("."));
1856
+ for (let i = 0; i < s.length; i++)
1857
+ if (e = yield er(e, s[i], this.ownPropertyOnly), r && mt(e))
1858
+ throw new Lt(s.slice(0, i + 1).join("."));
1859
+ return e;
1860
+ }
1861
+ push(e) {
1862
+ return this.scopes.push(e);
1863
+ }
1864
+ pop() {
1865
+ return this.scopes.pop();
1866
+ }
1867
+ bottom() {
1868
+ return this.scopes[0];
1869
+ }
1870
+ spawn(e = {}) {
1871
+ return new I(e, this.opts, {
1872
+ sync: this.sync,
1873
+ globals: this.globals,
1874
+ strictVariables: this.strictVariables
1875
+ }, {
1876
+ renderLimit: this.renderLimit,
1877
+ memoryLimit: this.memoryLimit
1878
+ });
1879
+ }
1880
+ findScope(e) {
1881
+ for (let s = this.scopes.length - 1; s >= 0; s--) {
1882
+ const r = this.scopes[s];
1883
+ if (e in r)
1884
+ return r;
1885
+ }
1886
+ return e in this.environments ? this.environments : this.globals;
1887
+ }
1888
+ }
1889
+ function er(t, e, s) {
1890
+ if (t = He(t), v(t))
1891
+ return t;
1892
+ if (k(t) && e < 0)
1893
+ return t[t.length + +e];
1894
+ const r = tr(t, e, s);
1895
+ return r === void 0 && t instanceof V ? t.liquidMethodMissing(e) : w(r) ? r.call(t) : e === "size" ? ir(t) : e === "first" ? sr(t) : e === "last" ? rr(t) : r;
1896
+ }
1897
+ function tr(t, e, s) {
1898
+ if (!(s && !ce.call(t, e) && !(t instanceof V)))
1899
+ return t[e];
1900
+ }
1901
+ function sr(t) {
1902
+ return k(t) ? t[0] : t.first;
1903
+ }
1904
+ function rr(t) {
1905
+ return k(t) ? t[t.length - 1] : t.last;
1906
+ }
1907
+ function ir(t) {
1908
+ if (ce.call(t, "size") || t.size !== void 0)
1909
+ return t.size;
1910
+ if (k(t) || _(t))
1911
+ return t.length;
1912
+ if (typeof t == "object")
1913
+ return Object.keys(t).length;
1914
+ }
1915
+ var C;
1916
+ (function(t) {
1917
+ t[t.OUTPUT = 0] = "OUTPUT", t[t.STORE = 1] = "STORE";
1918
+ })(C || (C = {}));
1919
+ const nr = x(Math.abs), or = x(Math.max), ar = x(Math.min), lr = x(Math.ceil), hr = x((t, e, s = !1) => s ? Math.floor(t / e) : t / e), cr = x(Math.floor), ur = x((t, e) => t - e), dr = x((t, e) => t % e), fr = x((t, e) => t * e);
1920
+ function pr(t, e = 0) {
1921
+ t = d(t), e = d(e);
1922
+ const s = Math.pow(10, e);
1923
+ return Math.round(t * s) / s;
1924
+ }
1925
+ function gr(t, e) {
1926
+ return t = d(t), e = d(e), Number(t) + Number(e);
1927
+ }
1928
+ var mr = /* @__PURE__ */ Object.freeze({
1929
+ __proto__: null,
1930
+ abs: nr,
1931
+ at_least: or,
1932
+ at_most: ar,
1933
+ ceil: lr,
1934
+ divided_by: hr,
1935
+ floor: cr,
1936
+ minus: ur,
1937
+ modulo: dr,
1938
+ times: fr,
1939
+ round: pr,
1940
+ plus: gr
1941
+ });
1942
+ const yr = (t) => decodeURIComponent(c(t)).replace(/\+/g, " "), wr = (t) => encodeURIComponent(c(t)).replace(/%20/g, "+"), Tr = (t) => encodeURIComponent(c(t)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), kr = (t) => encodeURI(c(t)).replace(/%5B/g, "[").replace(/%5D/g, "]"), Ve = /[^\p{M}\p{L}\p{Nd}]+/ug, br = {
1943
+ raw: /\s+/g,
1944
+ default: Ve,
1945
+ pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,
1946
+ ascii: /[^A-Za-z0-9]+/g,
1947
+ latin: Ve,
1948
+ none: null
1949
+ };
1950
+ function xr(t, e = "default", s = !1) {
1951
+ t = c(t);
1952
+ const r = br[e];
1953
+ return r && (e === "latin" && (t = _r(t)), t = t.replace(r, "-").replace(/^-|-$/g, "")), s ? t : t.toLowerCase();
1954
+ }
1955
+ function _r(t) {
1956
+ 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");
1957
+ }
1958
+ var vr = /* @__PURE__ */ Object.freeze({
1959
+ __proto__: null,
1960
+ url_decode: yr,
1961
+ url_encode: wr,
1962
+ cgi_escape: Tr,
1963
+ uri_escape: kr,
1964
+ slugify: xr
1965
+ });
1966
+ const Lr = x(function(t, e) {
1967
+ const s = T(t), r = v(e) ? " " : c(e), i = s.length * (1 + r.length);
1968
+ return this.context.memoryLimit.use(i), s.join(r);
1969
+ }), Fr = x((t) => k(t) ? We(t) : ""), Sr = x((t) => k(t) ? t[0] : ""), Or = x(function(t) {
1970
+ const e = T(t);
1971
+ return this.context.memoryLimit.use(e.length), [...e].reverse();
1972
+ });
1973
+ function* Rr(t, e) {
1974
+ const s = [], r = T(t);
1975
+ this.context.memoryLimit.use(r.length);
1976
+ for (const i of r)
1977
+ s.push([
1978
+ i,
1979
+ e ? yield this.context._getFromScope(i, c(e).split("."), !1) : i
1980
+ ]);
1981
+ return s.sort((i, n) => {
1982
+ const o = i[1], a = n[1];
1983
+ return o < a ? -1 : o > a ? 1 : 0;
1984
+ }).map((i) => i[0]);
1985
+ }
1986
+ function Er(t, e) {
1987
+ const s = c(e), r = e === void 0 ? ve : (n, o) => ve(n[s], o[s]), i = T(t);
1988
+ return this.context.memoryLimit.use(i.length), [...i].sort(r);
1989
+ }
1990
+ const zr = (t) => t && t.length || 0;
1991
+ function* Nr(t, e) {
1992
+ const s = [], r = T(t);
1993
+ this.context.memoryLimit.use(r.length);
1994
+ for (const i of r)
1995
+ s.push(yield this.context._getFromScope(i, c(e), !1));
1996
+ return s;
1997
+ }
1998
+ function* Dr(t, e) {
1999
+ let s = 0;
2000
+ const r = T(t);
2001
+ for (const i of r) {
2002
+ const n = Number(e ? yield this.context._getFromScope(i, c(e), !1) : i);
2003
+ s += Number.isNaN(n) ? 0 : n;
2004
+ }
2005
+ return s;
2006
+ }
2007
+ function qr(t) {
2008
+ const e = T(t);
2009
+ return this.context.memoryLimit.use(e.length), e.filter((s) => !v(d(s)));
2010
+ }
2011
+ function ht(t, e = []) {
2012
+ const s = T(t), r = T(e);
2013
+ return this.context.memoryLimit.use(s.length + r.length), s.concat(r);
2014
+ }
2015
+ function Mr(t, e) {
2016
+ return ht.call(this, t, [e]);
2017
+ }
2018
+ function Ir(t, e) {
2019
+ const s = T(t);
2020
+ this.context.memoryLimit.use(s.length);
2021
+ const r = [...s];
2022
+ return r.unshift(e), r;
2023
+ }
2024
+ function $r(t) {
2025
+ const e = [...T(t)];
2026
+ return e.pop(), e;
2027
+ }
2028
+ function Pr(t) {
2029
+ const e = T(t);
2030
+ this.context.memoryLimit.use(e.length);
2031
+ const s = [...e];
2032
+ return s.shift(), s;
2033
+ }
2034
+ function Cr(t, e, s = 1) {
2035
+ return t = d(t), v(t) ? [] : (k(t) || (t = c(t)), e = e < 0 ? t.length + e : e, this.context.memoryLimit.use(s), t.slice(e, e + s));
2036
+ }
2037
+ function* Ar(t, e, s) {
2038
+ const r = [];
2039
+ t = T(t), this.context.memoryLimit.use(t.length);
2040
+ const i = new z(c(e)).readScopeValue();
2041
+ for (const n of t)
2042
+ r.push(yield y(i, this.context.spawn(n)));
2043
+ return t.filter((n, o) => s === void 0 ? $(r[o], this.context) : P(r[o], s));
2044
+ }
2045
+ function* Vr(t, e, s) {
2046
+ const r = [], i = new L(c(s), this.liquid), n = T(t);
2047
+ this.context.memoryLimit.use(n.length);
2048
+ for (const o of n)
2049
+ (yield i.value(this.context.spawn({ [e]: o }))) && r.push(o);
2050
+ return r;
2051
+ }
2052
+ function* Br(t, e) {
2053
+ const s = /* @__PURE__ */ new Map();
2054
+ t = T(t);
2055
+ const r = new z(c(e)).readScopeValue();
2056
+ this.context.memoryLimit.use(t.length);
2057
+ for (const i of t) {
2058
+ const n = yield y(r, this.context.spawn(i));
2059
+ s.has(n) || s.set(n, []), s.get(n).push(i);
2060
+ }
2061
+ return [...s.entries()].map(([i, n]) => ({ name: i, items: n }));
2062
+ }
2063
+ function* jr(t, e, s) {
2064
+ const r = /* @__PURE__ */ new Map(), i = new L(c(s), this.liquid);
2065
+ t = T(t), this.context.memoryLimit.use(t.length);
2066
+ for (const n of t) {
2067
+ const o = yield i.value(this.context.spawn({ [e]: n }));
2068
+ r.has(o) || r.set(o, []), r.get(o).push(n);
2069
+ }
2070
+ return [...r.entries()].map(([n, o]) => ({ name: n, items: o }));
2071
+ }
2072
+ function* Ur(t, e, s) {
2073
+ const r = new z(c(e)).readScopeValue(), i = T(t);
2074
+ for (const n of i) {
2075
+ const o = yield y(r, this.context.spawn(n));
2076
+ if (P(o, s))
2077
+ return n;
2078
+ }
2079
+ }
2080
+ function* Hr(t, e, s) {
2081
+ const r = new L(c(s), this.liquid), i = T(t);
2082
+ for (const n of i)
2083
+ if (yield r.value(this.context.spawn({ [e]: n })))
2084
+ return n;
2085
+ }
2086
+ function Wr(t) {
2087
+ return t = T(t), this.context.memoryLimit.use(t.length), [...new Set(t)];
2088
+ }
2089
+ function Yr(t, e = 1) {
2090
+ if (t = d(t), v(t))
2091
+ return [];
2092
+ k(t) || (t = c(t)), this.context.memoryLimit.use(e);
2093
+ const s = [...t].sort(() => Math.random() - 0.5);
2094
+ return e === 1 ? s[0] : s.slice(0, e);
2095
+ }
2096
+ var Jr = /* @__PURE__ */ Object.freeze({
2097
+ __proto__: null,
2098
+ join: Lr,
2099
+ last: Fr,
2100
+ first: Sr,
2101
+ reverse: Or,
2102
+ sort: Rr,
2103
+ sort_natural: Er,
2104
+ size: zr,
2105
+ map: Nr,
2106
+ sum: Dr,
2107
+ compact: qr,
2108
+ concat: ht,
2109
+ push: Mr,
2110
+ unshift: Ir,
2111
+ pop: $r,
2112
+ shift: Pr,
2113
+ slice: Cr,
2114
+ where: Ar,
2115
+ where_exp: Vr,
2116
+ group_by: Br,
2117
+ group_by_exp: jr,
2118
+ find: Ur,
2119
+ find_exp: Hr,
2120
+ uniq: Wr,
2121
+ sample: Yr
2122
+ });
2123
+ function we(t, e, s) {
2124
+ var r, i, n;
2125
+ const o = ((r = t == null ? void 0 : t.length) !== null && r !== void 0 ? r : 0) + ((i = e == null ? void 0 : e.length) !== null && i !== void 0 ? i : 0) + ((n = s == null ? void 0 : s.length) !== null && n !== void 0 ? n : 0);
2126
+ this.context.memoryLimit.use(o);
2127
+ const a = ut(t, this.context.opts, s);
2128
+ return a ? (e = d(e), e = v(e) ? this.context.opts.dateFormat : c(e), Z(a, e)) : t;
2129
+ }
2130
+ function Qr(t) {
2131
+ return we.call(this, t, "%Y-%m-%dT%H:%M:%S%:z");
2132
+ }
2133
+ function Zr(t) {
2134
+ return we.call(this, t, "%a, %d %b %Y %H:%M:%S %z");
2135
+ }
2136
+ function Gr(t, e, s) {
2137
+ return ct.call(this, t, "%b", e, s);
2138
+ }
2139
+ function Xr(t, e, s) {
2140
+ return ct.call(this, t, "%B", e, s);
2141
+ }
2142
+ function ct(t, e, s, r) {
2143
+ const i = ut(t, this.context.opts);
2144
+ if (!i)
2145
+ return t;
2146
+ if (s === "ordinal") {
2147
+ const n = i.getDate();
2148
+ return r === "US" ? Z(i, `${e} ${n}%q, %Y`) : Z(i, `${n}%q ${e} %Y`);
2149
+ }
2150
+ return Z(i, `%d ${e} %Y`);
2151
+ }
2152
+ function ut(t, e, s) {
2153
+ let r;
2154
+ const i = s ?? e.timezoneOffset, n = e.locale;
2155
+ return t = d(t), t === "now" || t === "today" ? r = new R(Date.now(), n, i) : de(t) ? r = new R(t * 1e3, n, i) : _(t) ? /^\d+$/.test(t) ? r = new R(+t * 1e3, n, i) : e.preserveTimezones && s === void 0 ? r = R.createDateFixedToTimezone(t, n) : r = new R(t, n, i) : r = new R(t, n, i), r.valid() ? r : void 0;
2156
+ }
2157
+ var Kr = /* @__PURE__ */ Object.freeze({
2158
+ __proto__: null,
2159
+ date: we,
2160
+ date_to_xmlschema: Qr,
2161
+ date_to_rfc822: Zr,
2162
+ date_to_string: Gr,
2163
+ date_to_long_string: Xr
2164
+ });
2165
+ const ae = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, Be = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
2166
+ function ei(t, e) {
2167
+ b(arguments.length === 2, "append expect 2 arguments");
2168
+ const s = c(t), r = c(e);
2169
+ return this.context.memoryLimit.use(s.length + r.length), s + r;
2170
+ }
2171
+ function ti(t, e) {
2172
+ b(arguments.length === 2, "prepend expect 2 arguments");
2173
+ const s = c(t), r = c(e);
2174
+ return this.context.memoryLimit.use(s.length + r.length), r + s;
2175
+ }
2176
+ function si(t, e) {
2177
+ const s = c(t);
2178
+ return this.context.memoryLimit.use(s.length), e ? (e = fe(c(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "")) : s.replace(/^\s+/, "");
2179
+ }
2180
+ function ri(t) {
2181
+ const e = c(t);
2182
+ return this.context.memoryLimit.use(e.length), e.toLowerCase();
2183
+ }
2184
+ function ii(t) {
2185
+ const e = c(t);
2186
+ return this.context.memoryLimit.use(e.length), c(e).toUpperCase();
2187
+ }
2188
+ function ni(t, e) {
2189
+ const s = c(t);
2190
+ return this.context.memoryLimit.use(s.length), s.split(c(e)).join("");
2191
+ }
2192
+ function oi(t, e) {
2193
+ const s = c(t);
2194
+ return this.context.memoryLimit.use(s.length), s.replace(c(e), "");
2195
+ }
2196
+ function ai(t, e) {
2197
+ const s = c(t);
2198
+ this.context.memoryLimit.use(s.length);
2199
+ const r = c(e), i = s.lastIndexOf(r);
2200
+ return i === -1 ? s : s.substring(0, i) + s.substring(i + r.length);
2201
+ }
2202
+ function li(t, e) {
2203
+ return t = c(t), this.context.memoryLimit.use(t.length), e ? (e = fe(c(e)), t.replace(new RegExp(`[${e}]+$`, "g"), "")) : t.replace(/\s+$/, "");
2204
+ }
2205
+ function hi(t, e) {
2206
+ const s = c(t);
2207
+ this.context.memoryLimit.use(s.length);
2208
+ const r = s.split(c(e));
2209
+ for (; r.length && r[r.length - 1] === ""; )
2210
+ r.pop();
2211
+ return r;
2212
+ }
2213
+ function ci(t, e) {
2214
+ const s = c(t);
2215
+ return this.context.memoryLimit.use(s.length), e ? (e = fe(c(e)), s.replace(new RegExp(`^[${e}]+`, "g"), "").replace(new RegExp(`[${e}]+$`, "g"), "")) : s.trim();
2216
+ }
2217
+ function ui(t) {
2218
+ const e = c(t);
2219
+ return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, "");
2220
+ }
2221
+ function di(t) {
2222
+ return t = c(t), this.context.memoryLimit.use(t.length), t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
2223
+ }
2224
+ function fi(t, e, s) {
2225
+ const r = c(t);
2226
+ return this.context.memoryLimit.use(r.length), r.split(c(e)).join(s);
2227
+ }
2228
+ function pi(t, e, s) {
2229
+ const r = c(t);
2230
+ return this.context.memoryLimit.use(r.length), r.replace(c(e), s);
2231
+ }
2232
+ function gi(t, e, s) {
2233
+ const r = c(t);
2234
+ this.context.memoryLimit.use(r.length);
2235
+ const i = c(e), n = r.lastIndexOf(i);
2236
+ if (n === -1)
2237
+ return r;
2238
+ const o = c(s);
2239
+ return r.substring(0, n) + o + r.substring(n + i.length);
2240
+ }
2241
+ function mi(t, e = 50, s = "...") {
2242
+ const r = c(t);
2243
+ return this.context.memoryLimit.use(r.length), r.length <= e ? t : r.substring(0, e - s.length) + s;
2244
+ }
2245
+ function yi(t, e = 15, s = "...") {
2246
+ const r = c(t);
2247
+ this.context.memoryLimit.use(r.length);
2248
+ const i = r.split(/\s+/);
2249
+ e <= 0 && (e = 1);
2250
+ let n = i.slice(0, e).join(" ");
2251
+ return i.length >= e && (n += s), n;
2252
+ }
2253
+ function wi(t) {
2254
+ const e = c(t);
2255
+ return this.context.memoryLimit.use(e.length), e.replace(/\s+/g, " ");
2256
+ }
2257
+ function Ti(t, e) {
2258
+ const s = c(t);
2259
+ if (this.context.memoryLimit.use(s.length), t = s.trim(), !t)
2260
+ return 0;
2261
+ switch (e) {
2262
+ case "cjk":
2263
+ return (t.match(ae) || []).length + (t.match(Be) || []).length;
2264
+ case "auto":
2265
+ return ae.test(t) ? t.match(ae).length + (t.match(Be) || []).length : t.split(/\s+/).length;
2266
+ default:
2267
+ return t.split(/\s+/).length;
2268
+ }
2269
+ }
2270
+ function ki(t, e = "and") {
2271
+ switch (this.context.memoryLimit.use(t.length), t.length) {
2272
+ case 0:
2273
+ return "";
2274
+ case 1:
2275
+ return t[0];
2276
+ case 2:
2277
+ return `${t[0]} ${e} ${t[1]}`;
2278
+ default:
2279
+ return `${t.slice(0, -1).join(", ")}, ${e} ${t[t.length - 1]}`;
2280
+ }
2281
+ }
2282
+ var bi = /* @__PURE__ */ Object.freeze({
2283
+ __proto__: null,
2284
+ append: ei,
2285
+ prepend: ti,
2286
+ lstrip: si,
2287
+ downcase: ri,
2288
+ upcase: ii,
2289
+ remove: ni,
2290
+ remove_first: oi,
2291
+ remove_last: ai,
2292
+ rstrip: li,
2293
+ split: hi,
2294
+ strip: ci,
2295
+ strip_newlines: ui,
2296
+ capitalize: di,
2297
+ replace: fi,
2298
+ replace_first: pi,
2299
+ replace_last: gi,
2300
+ truncate: mi,
2301
+ truncatewords: yi,
2302
+ normalize_whitespace: wi,
2303
+ number_of_words: Ti,
2304
+ array_to_sentence_string: ki
2305
+ });
2306
+ const xi = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Is), mr), vr), Jr), Kr), bi), ot);
2307
+ class _i extends m {
2308
+ constructor(e, s, r) {
2309
+ super(e, s, r), 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 L(this.tokenizer.readFilteredValue(), this.liquid);
2310
+ }
2311
+ *render(e) {
2312
+ e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
2313
+ }
2314
+ }
2315
+ const je = ["offset", "limit", "reversed"];
2316
+ class vi extends m {
2317
+ constructor(e, s, r, i) {
2318
+ super(e, s, r);
2319
+ const n = this.tokenizer.readIdentifier(), o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
2320
+ if (!n.size() || o.content !== "in" || !a)
2321
+ throw new Error(`illegal tag: ${e.getText()}`);
2322
+ this.variable = n.content, this.collection = a, this.hash = new W(this.tokenizer.remaining(), r.options.keyValueSeparator), this.templates = [], this.elseTemplates = [];
2323
+ let l;
2324
+ const h = i.parseStream(s).on("start", () => l = this.templates).on("tag:else", (u) => {
2325
+ K(u.args), l = this.elseTemplates;
2326
+ }).on("tag:endfor", (u) => {
2327
+ K(u.args), h.stop();
2328
+ }).on("template", (u) => l.push(u)).on("end", () => {
2329
+ throw new Error(`tag ${e.getText()} not closed`);
2330
+ });
2331
+ h.start();
2332
+ }
2333
+ *render(e, s) {
2334
+ const r = this.liquid.renderer;
2335
+ let i = ue(yield y(this.collection, e));
2336
+ if (!i.length) {
2337
+ yield r.renderTemplates(this.elseTemplates, e, s);
2338
+ return;
2339
+ }
2340
+ const n = "continue-" + this.variable + "-" + this.collection.getText();
2341
+ e.push({ continue: e.getRegister(n) });
2342
+ const o = yield this.hash.render(e);
2343
+ e.pop(), i = (this.liquid.options.orderedFilterParameters ? Object.keys(o).filter((h) => je.includes(h)) : je.filter((h) => o[h] !== void 0)).reduce((h, u) => u === "offset" ? Fi(h, o.offset) : u === "limit" ? Si(h, o.limit) : Li(h), i), e.setRegister(n, (o.offset || 0) + i.length);
2344
+ const l = { forloop: new pe(i.length, this.collection.getText(), this.variable) };
2345
+ e.push(l);
2346
+ for (const h of i) {
2347
+ if (l[this.variable] = h, yield r.renderTemplates(this.templates, e, s), s.break) {
2348
+ s.break = !1;
2349
+ break;
2350
+ }
2351
+ s.continue = !1, l.forloop.next();
2352
+ }
2353
+ e.pop();
2354
+ }
2355
+ }
2356
+ function Li(t) {
2357
+ return [...t].reverse();
2358
+ }
2359
+ function Fi(t, e) {
2360
+ return t.slice(e);
2361
+ }
2362
+ function Si(t, e) {
2363
+ return t.slice(0, e);
2364
+ }
2365
+ class Oi extends m {
2366
+ constructor(e, s, r, i) {
2367
+ for (super(e, s, r), this.templates = [], this.variable = this.readVariableName(); s.length; ) {
2368
+ const n = s.shift();
2369
+ if (j(n) && n.name === "endcapture")
2370
+ return;
2371
+ this.templates.push(i.parseToken(n, s));
2372
+ }
2373
+ throw new Error(`tag ${e.getText()} not closed`);
2374
+ }
2375
+ *render(e) {
2376
+ const r = yield this.liquid.renderer.renderTemplates(this.templates, e);
2377
+ e.bottom()[this.variable] = r;
2378
+ }
2379
+ readVariableName() {
2380
+ const e = this.tokenizer.readIdentifier().content;
2381
+ if (e)
2382
+ return e;
2383
+ const s = this.tokenizer.readQuoted();
2384
+ if (s)
2385
+ return it(s);
2386
+ throw this.tokenizer.error("invalid capture name");
2387
+ }
2388
+ }
2389
+ class Ri extends m {
2390
+ constructor(e, s, r, i) {
2391
+ super(e, s, r), this.branches = [], this.elseTemplates = [], this.value = new L(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
2392
+ let n = [], o = 0;
2393
+ const a = i.parseStream(s).on("tag:when", (l) => {
2394
+ if (o > 0)
2395
+ return;
2396
+ n = [];
2397
+ const h = [];
2398
+ for (; !l.tokenizer.end(); )
2399
+ h.push(l.tokenizer.readValueOrThrow()), l.tokenizer.skipBlank(), l.tokenizer.peek() === "," ? l.tokenizer.readTo(",") : l.tokenizer.readTo("or");
2400
+ this.branches.push({
2401
+ values: h,
2402
+ templates: n
2403
+ });
2404
+ }).on("tag:else", () => {
2405
+ o++, n = this.elseTemplates;
2406
+ }).on("tag:endcase", () => a.stop()).on("template", (l) => {
2407
+ (n !== this.elseTemplates || o === 1) && n.push(l);
2408
+ }).on("end", () => {
2409
+ throw new Error(`tag ${e.getText()} not closed`);
2410
+ });
2411
+ a.start();
2412
+ }
2413
+ *render(e, s) {
2414
+ const r = this.liquid.renderer, i = d(yield this.value.value(e, e.opts.lenientIf));
2415
+ let n = !1;
2416
+ for (const o of this.branches)
2417
+ for (const a of o.values) {
2418
+ const l = yield y(a, e, e.opts.lenientIf);
2419
+ if (P(i, l)) {
2420
+ yield r.renderTemplates(o.templates, e, s), n = !0;
2421
+ break;
2422
+ }
2423
+ }
2424
+ n || (yield r.renderTemplates(this.elseTemplates, e, s));
2425
+ }
2426
+ }
2427
+ class Ei extends m {
2428
+ constructor(e, s, r) {
2429
+ for (super(e, s, r); s.length; ) {
2430
+ const i = s.shift();
2431
+ if (j(i) && i.name === "endcomment")
2432
+ return;
2433
+ }
2434
+ throw new Error(`tag ${e.getText()} not closed`);
2435
+ }
2436
+ render() {
2437
+ }
2438
+ }
2439
+ class zi extends m {
2440
+ constructor(e, s, r, i) {
2441
+ super(e, s, r);
2442
+ const n = this.tokenizer;
2443
+ for (this.file = Te(n, this.liquid, i), this.currentFile = e.file; !n.end(); ) {
2444
+ n.skipBlank();
2445
+ const o = n.p, a = n.readIdentifier();
2446
+ if ((a.content === "with" || a.content === "for") && (n.skipBlank(), n.peek() !== ":")) {
2447
+ const l = n.readValue();
2448
+ if (l) {
2449
+ const h = n.p, u = n.readIdentifier();
2450
+ let p;
2451
+ u.content === "as" ? p = n.readIdentifier() : n.p = h, this[a.content] = { value: l, alias: p && p.content }, n.skipBlank(), n.peek() === "," && n.advance();
2452
+ continue;
2453
+ }
2454
+ }
2455
+ n.p = o;
2456
+ break;
2457
+ }
2458
+ this.hash = new W(n.remaining(), r.options.keyValueSeparator);
2459
+ }
2460
+ *render(e, s) {
2461
+ const { liquid: r, hash: i } = this, n = yield ke(this.file, e, r);
2462
+ b(n, () => `illegal file path "${n}"`);
2463
+ const o = e.spawn(), a = o.bottom();
2464
+ if (ee(a, yield i.render(e)), this.with) {
2465
+ const { value: l, alias: h } = this.with;
2466
+ a[h || n] = yield y(l, e);
2467
+ }
2468
+ if (this.for) {
2469
+ const { value: l, alias: h } = this.for, u = ue(yield y(l, e));
2470
+ a.forloop = new pe(u.length, l.getText(), h);
2471
+ for (const p of u) {
2472
+ a[h] = p;
2473
+ const S = yield r._parsePartialFile(n, o.sync, this.currentFile);
2474
+ yield r.renderer.renderTemplates(S, o, s), a.forloop.next();
2475
+ }
2476
+ } else {
2477
+ const l = yield r._parsePartialFile(n, o.sync, this.currentFile);
2478
+ yield r.renderer.renderTemplates(l, o, s);
2479
+ }
2480
+ }
2481
+ }
2482
+ function Te(t, e, s) {
2483
+ if (e.options.dynamicPartials) {
2484
+ const n = t.readValue();
2485
+ if (t.assert(n, "illegal file path"), n.getText() === "none")
2486
+ return;
2487
+ if (Gs(n)) {
2488
+ const o = s.parse(it(n));
2489
+ return Ue(o);
2490
+ }
2491
+ return n;
2492
+ }
2493
+ const r = [...t.readFileNameTemplate(e.options)], i = Ue(s.parseTokens(r));
2494
+ return i === "none" ? void 0 : i;
2495
+ }
2496
+ function Ue(t) {
2497
+ return t.length === 1 && ye(t[0].token) ? t[0].token.getContent() : t;
2498
+ }
2499
+ function* ke(t, e, s) {
2500
+ return typeof t == "string" ? t : Array.isArray(t) ? s.renderer.renderTemplates(t, e) : yield y(t, e);
2501
+ }
2502
+ class Ni extends m {
2503
+ constructor(e, s, r, i) {
2504
+ super(e, s, r);
2505
+ const { tokenizer: n } = e;
2506
+ this.file = Te(n, this.liquid, i), this.currentFile = e.file;
2507
+ const o = n.p;
2508
+ n.readIdentifier().content === "with" ? (n.skipBlank(), n.peek() !== ":" ? this.withVar = n.readValue() : n.p = o) : n.p = o, this.hash = new W(n.remaining(), r.options.jekyllInclude || r.options.keyValueSeparator);
2509
+ }
2510
+ *render(e, s) {
2511
+ const { liquid: r, hash: i, withVar: n } = this, { renderer: o } = r, a = yield ke(this.file, e, r);
2512
+ b(a, () => `illegal file path "${a}"`);
2513
+ const l = e.saveRegister("blocks", "blockMode");
2514
+ e.setRegister("blocks", {}), e.setRegister("blockMode", C.OUTPUT);
2515
+ const h = yield i.render(e);
2516
+ n && (h[a] = yield y(n, e));
2517
+ const u = yield r._parsePartialFile(a, e.sync, this.currentFile);
2518
+ e.push(e.opts.jekyllInclude ? { include: h } : h), yield o.renderTemplates(u, e, s), e.pop(), e.restoreRegister(l);
2519
+ }
2520
+ }
2521
+ class Di extends m {
2522
+ constructor(e, s, r) {
2523
+ super(e, s, r), this.variable = this.tokenizer.readIdentifier().content;
2524
+ }
2525
+ render(e, s) {
2526
+ const r = e.environments;
2527
+ de(r[this.variable]) || (r[this.variable] = 0), s.write(c(--r[this.variable]));
2528
+ }
2529
+ }
2530
+ class qi extends m {
2531
+ constructor(e, s, r) {
2532
+ super(e, s, r), this.candidates = [];
2533
+ const i = this.tokenizer.readValue();
2534
+ for (this.tokenizer.skipBlank(), i && (this.tokenizer.peek() === ":" ? (this.group = i, this.tokenizer.advance()) : this.candidates.push(i)); !this.tokenizer.end(); ) {
2535
+ const n = this.tokenizer.readValue();
2536
+ n && this.candidates.push(n), this.tokenizer.readTo(",");
2537
+ }
2538
+ this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
2539
+ }
2540
+ *render(e, s) {
2541
+ const i = `cycle:${yield y(this.group, e)}:` + this.candidates.join(","), n = e.getRegister("cycle");
2542
+ let o = n[i];
2543
+ o === void 0 && (o = n[i] = 0);
2544
+ const a = this.candidates[o];
2545
+ return o = (o + 1) % this.candidates.length, n[i] = o, yield y(a, e);
2546
+ }
2547
+ }
2548
+ class Mi extends m {
2549
+ constructor(e, s, r, i) {
2550
+ super(e, s, r), this.branches = [];
2551
+ let n = [];
2552
+ i.parseStream(s).on("start", () => this.branches.push({
2553
+ value: new L(e.args, this.liquid),
2554
+ templates: n = []
2555
+ })).on("tag:elsif", (o) => {
2556
+ b(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
2557
+ value: new L(o.args, this.liquid),
2558
+ templates: n = []
2559
+ });
2560
+ }).on("tag:else", (o) => {
2561
+ K(o.args), b(!this.elseTemplates, "duplicated else"), n = this.elseTemplates = [];
2562
+ }).on("tag:endif", function(o) {
2563
+ K(o.args), this.stop();
2564
+ }).on("template", (o) => n.push(o)).on("end", () => {
2565
+ throw new Error(`tag ${e.getText()} not closed`);
2566
+ }).start();
2567
+ }
2568
+ *render(e, s) {
2569
+ const r = this.liquid.renderer;
2570
+ for (const { value: i, templates: n } of this.branches) {
2571
+ const o = yield i.value(e, e.opts.lenientIf);
2572
+ if ($(o, e)) {
2573
+ yield r.renderTemplates(n, e, s);
2574
+ return;
2575
+ }
2576
+ }
2577
+ yield r.renderTemplates(this.elseTemplates || [], e, s);
2578
+ }
2579
+ }
2580
+ class Ii extends m {
2581
+ constructor(e, s, r) {
2582
+ super(e, s, r), this.variable = this.tokenizer.readIdentifier().content;
2583
+ }
2584
+ render(e, s) {
2585
+ const r = e.environments;
2586
+ de(r[this.variable]) || (r[this.variable] = 0);
2587
+ const i = r[this.variable];
2588
+ r[this.variable]++, s.write(c(i));
2589
+ }
2590
+ }
2591
+ class $i extends m {
2592
+ constructor(e, s, r, i) {
2593
+ super(e, s, r), this.file = Te(this.tokenizer, this.liquid, i), this.currentFile = e.file, this.args = new W(this.tokenizer.remaining(), r.options.keyValueSeparator), this.templates = i.parseTokens(s);
2594
+ }
2595
+ *render(e, s) {
2596
+ const { liquid: r, args: i, file: n } = this, { renderer: o } = r;
2597
+ if (n === void 0) {
2598
+ e.setRegister("blockMode", C.OUTPUT), yield o.renderTemplates(this.templates, e, s);
2599
+ return;
2600
+ }
2601
+ const a = yield ke(this.file, e, r);
2602
+ b(a, () => `illegal file path "${a}"`);
2603
+ const l = yield r._parseLayoutFile(a, e.sync, this.currentFile);
2604
+ e.setRegister("blockMode", C.STORE);
2605
+ const h = yield o.renderTemplates(this.templates, e), u = e.getRegister("blocks");
2606
+ u[""] === void 0 && (u[""] = (p, S) => S.write(h)), e.setRegister("blockMode", C.OUTPUT), e.push(yield i.render(e)), yield o.renderTemplates(l, e, s), e.pop();
2607
+ }
2608
+ }
2609
+ class Pi extends m {
2610
+ constructor(e, s, r, i) {
2611
+ super(e, s, r), this.templates = [];
2612
+ const n = /\w+/.exec(e.args);
2613
+ for (this.block = n ? n[0] : ""; s.length; ) {
2614
+ const o = s.shift();
2615
+ if (j(o) && o.name === "endblock")
2616
+ return;
2617
+ const a = i.parseToken(o, s);
2618
+ this.templates.push(a);
2619
+ }
2620
+ throw new Error(`tag ${e.getText()} not closed`);
2621
+ }
2622
+ *render(e, s) {
2623
+ const r = this.getBlockRender(e);
2624
+ e.getRegister("blockMode") === C.STORE ? e.getRegister("blocks")[this.block] = r : yield r(new Se(), s);
2625
+ }
2626
+ getBlockRender(e) {
2627
+ const { liquid: s, templates: r } = this, i = e.getRegister("blocks")[this.block], n = function* (o, a) {
2628
+ e.push({ block: o }), yield s.renderer.renderTemplates(r, e, a), e.pop();
2629
+ };
2630
+ return i ? (o, a) => i(new Se(() => n(o, a)), a) : n;
2631
+ }
2632
+ }
2633
+ class Ci extends m {
2634
+ constructor(e, s, r) {
2635
+ for (super(e, s, r), this.tokens = []; s.length; ) {
2636
+ const i = s.shift();
2637
+ if (j(i) && i.name === "endraw")
2638
+ return;
2639
+ this.tokens.push(i);
2640
+ }
2641
+ throw new Error(`tag ${e.getText()} not closed`);
2642
+ }
2643
+ render() {
2644
+ return this.tokens.map((e) => e.getText()).join("");
2645
+ }
2646
+ }
2647
+ class Ai extends pe {
2648
+ constructor(e, s, r, i) {
2649
+ super(e, r, i), this.length = e, this.cols = s;
2650
+ }
2651
+ row() {
2652
+ return Math.floor(this.i / this.cols) + 1;
2653
+ }
2654
+ col0() {
2655
+ return this.i % this.cols;
2656
+ }
2657
+ col() {
2658
+ return this.col0() + 1;
2659
+ }
2660
+ col_first() {
2661
+ return this.col0() === 0;
2662
+ }
2663
+ col_last() {
2664
+ return this.col() === this.cols;
2665
+ }
2666
+ }
2667
+ class Vi extends m {
2668
+ constructor(e, s, r, i) {
2669
+ super(e, s, r);
2670
+ const n = this.tokenizer.readIdentifier();
2671
+ this.tokenizer.skipBlank();
2672
+ const o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
2673
+ if (o.content !== "in" || !a)
2674
+ throw new Error(`illegal tag: ${e.getText()}`);
2675
+ this.variable = n.content, this.collection = a, this.args = new W(this.tokenizer.remaining(), r.options.keyValueSeparator), this.templates = [];
2676
+ let l;
2677
+ const h = i.parseStream(s).on("start", () => l = this.templates).on("tag:endtablerow", () => h.stop()).on("template", (u) => l.push(u)).on("end", () => {
2678
+ throw new Error(`tag ${e.getText()} not closed`);
2679
+ });
2680
+ h.start();
2681
+ }
2682
+ *render(e, s) {
2683
+ let r = ue(yield y(this.collection, e));
2684
+ const i = yield this.args.render(e), n = i.offset || 0, o = i.limit === void 0 ? r.length : i.limit;
2685
+ r = r.slice(n, n + o);
2686
+ const a = i.cols || r.length, l = this.liquid.renderer, h = new Ai(r.length, a, this.collection.getText(), this.variable), u = { tablerowloop: h };
2687
+ e.push(u);
2688
+ for (let p = 0; p < r.length; p++, h.next())
2689
+ u[this.variable] = r[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>");
2690
+ r.length && s.write("</tr>"), e.pop();
2691
+ }
2692
+ }
2693
+ class Bi extends m {
2694
+ constructor(e, s, r, i) {
2695
+ super(e, s, r), this.branches = [], this.elseTemplates = [];
2696
+ let n = [], o = 0;
2697
+ i.parseStream(s).on("start", () => this.branches.push({
2698
+ value: new L(e.args, this.liquid),
2699
+ test: re,
2700
+ templates: n = []
2701
+ })).on("tag:elsif", (a) => {
2702
+ if (o > 0) {
2703
+ n = [];
2704
+ return;
2705
+ }
2706
+ this.branches.push({
2707
+ value: new L(a.args, this.liquid),
2708
+ test: $,
2709
+ templates: n = []
2710
+ });
2711
+ }).on("tag:else", () => {
2712
+ o++, n = this.elseTemplates;
2713
+ }).on("tag:endunless", function() {
2714
+ this.stop();
2715
+ }).on("template", (a) => {
2716
+ (n !== this.elseTemplates || o === 1) && n.push(a);
2717
+ }).on("end", () => {
2718
+ throw new Error(`tag ${e.getText()} not closed`);
2719
+ }).start();
2720
+ }
2721
+ *render(e, s) {
2722
+ const r = this.liquid.renderer;
2723
+ for (const { value: i, test: n, templates: o } of this.branches) {
2724
+ const a = yield i.value(e, e.opts.lenientIf);
2725
+ if (n(a, e)) {
2726
+ yield r.renderTemplates(o, e, s);
2727
+ return;
2728
+ }
2729
+ }
2730
+ yield r.renderTemplates(this.elseTemplates, e, s);
2731
+ }
2732
+ }
2733
+ class ji extends m {
2734
+ render(e, s) {
2735
+ s.break = !0;
2736
+ }
2737
+ }
2738
+ class Ui extends m {
2739
+ render(e, s) {
2740
+ s.continue = !0;
2741
+ }
2742
+ }
2743
+ class Hi extends m {
2744
+ constructor(e, s, r) {
2745
+ super(e, s, r), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new L(this.tokenizer.readFilteredValue(), this.liquid));
2746
+ }
2747
+ *render(e, s) {
2748
+ if (!this.value)
2749
+ return;
2750
+ const r = yield this.value.value(e, !1);
2751
+ s.write(r);
2752
+ }
2753
+ }
2754
+ class Wi extends m {
2755
+ constructor(e, s, r, i) {
2756
+ super(e, s, r);
2757
+ const n = this.tokenizer.readLiquidTagTokens(this.liquid.options);
2758
+ this.templates = i.parseTokens(n);
2759
+ }
2760
+ *render(e, s) {
2761
+ yield this.liquid.renderer.renderTemplates(this.templates, e, s);
2762
+ }
2763
+ }
2764
+ class Yi extends m {
2765
+ constructor(e, s, r) {
2766
+ if (super(e, s, r), e.args.search(/\n\s*[^#\s]/g) !== -1)
2767
+ throw new Error("every line of an inline comment must start with a '#' character");
2768
+ }
2769
+ render() {
2770
+ }
2771
+ }
2772
+ const Ji = {
2773
+ assign: _i,
2774
+ for: vi,
2775
+ capture: Oi,
2776
+ case: Ri,
2777
+ comment: Ei,
2778
+ include: Ni,
2779
+ render: zi,
2780
+ decrement: Di,
2781
+ increment: Ii,
2782
+ cycle: qi,
2783
+ if: Mi,
2784
+ layout: $i,
2785
+ block: Pi,
2786
+ raw: Ci,
2787
+ tablerow: Vi,
2788
+ unless: Bi,
2789
+ break: ji,
2790
+ continue: Ui,
2791
+ echo: Hi,
2792
+ liquid: Wi,
2793
+ "#": Yi
2794
+ };
2795
+ class dt {
2796
+ constructor(e = {}) {
2797
+ this.renderer = new cs(), this.filters = {}, this.tags = {}, this.options = Ps(e), this.parser = new M(this), _e(Ji, (s, r) => this.registerTag(r, s)), _e(xi, (s, r) => this.registerFilter(r, s));
2798
+ }
2799
+ parse(e, s) {
2800
+ return new M(this).parse(e, s);
2801
+ }
2802
+ _render(e, s, r) {
2803
+ const i = s instanceof I ? s : new I(s, this.options, r);
2804
+ return this.renderer.renderTemplates(e, i);
2805
+ }
2806
+ render(e, s, r) {
2807
+ return O(this, void 0, void 0, function* () {
2808
+ return N(this._render(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
2809
+ });
2810
+ }
2811
+ renderSync(e, s, r) {
2812
+ return D(this._render(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
2813
+ }
2814
+ renderToNodeStream(e, s, r = {}) {
2815
+ const i = new I(s, this.options, r);
2816
+ return this.renderer.renderTemplatesToNodeStream(e, i);
2817
+ }
2818
+ _parseAndRender(e, s, r) {
2819
+ const i = this.parse(e);
2820
+ return this._render(i, s, r);
2821
+ }
2822
+ parseAndRender(e, s, r) {
2823
+ return O(this, void 0, void 0, function* () {
2824
+ return N(this._parseAndRender(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
2825
+ });
2826
+ }
2827
+ parseAndRenderSync(e, s, r) {
2828
+ return D(this._parseAndRender(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
2829
+ }
2830
+ _parsePartialFile(e, s, r) {
2831
+ return new M(this).parseFile(e, s, A.Partials, r);
2832
+ }
2833
+ _parseLayoutFile(e, s, r) {
2834
+ return new M(this).parseFile(e, s, A.Layouts, r);
2835
+ }
2836
+ _parseFile(e, s, r, i) {
2837
+ return new M(this).parseFile(e, s, r, i);
2838
+ }
2839
+ parseFile(e, s) {
2840
+ return O(this, void 0, void 0, function* () {
2841
+ return N(new M(this).parseFile(e, !1, s));
2842
+ });
2843
+ }
2844
+ parseFileSync(e, s) {
2845
+ return D(new M(this).parseFile(e, !0, s));
2846
+ }
2847
+ *_renderFile(e, s, r) {
2848
+ const i = yield this._parseFile(e, r.sync, r.lookupType);
2849
+ return yield this._render(i, s, r);
2850
+ }
2851
+ renderFile(e, s, r) {
2852
+ return O(this, void 0, void 0, function* () {
2853
+ return N(this._renderFile(e, s, Object.assign(Object.assign({}, r), { sync: !1 })));
2854
+ });
2855
+ }
2856
+ renderFileSync(e, s, r) {
2857
+ return D(this._renderFile(e, s, Object.assign(Object.assign({}, r), { sync: !0 })));
2858
+ }
2859
+ renderFileToNodeStream(e, s, r) {
2860
+ return O(this, void 0, void 0, function* () {
2861
+ const i = yield this.parseFile(e);
2862
+ return this.renderToNodeStream(i, s, r);
2863
+ });
2864
+ }
2865
+ _evalValue(e, s) {
2866
+ const r = new L(e, this), i = s instanceof I ? s : new I(s, this.options);
2867
+ return r.value(i);
2868
+ }
2869
+ evalValue(e, s) {
2870
+ return O(this, void 0, void 0, function* () {
2871
+ return N(this._evalValue(e, s));
2872
+ });
2873
+ }
2874
+ evalValueSync(e, s) {
2875
+ return D(this._evalValue(e, s));
2876
+ }
2877
+ registerFilter(e, s) {
2878
+ this.filters[e] = s;
2879
+ }
2880
+ registerTag(e, s) {
2881
+ this.tags[e] = w(s) ? s : Us(s);
2882
+ }
2883
+ plugin(e) {
2884
+ return e.call(this, dt);
2885
+ }
2886
+ express() {
2887
+ const e = this;
2888
+ let s = !0;
2889
+ return function(r, i, n) {
2890
+ if (s) {
2891
+ s = !1;
2892
+ const o = G(this.root);
2893
+ e.options.root.unshift(...o), e.options.layouts.unshift(...o), e.options.partials.unshift(...o);
2894
+ }
2895
+ e.renderFile(r, i).then((o) => n(null, o), n);
2896
+ };
2897
+ }
2898
+ }
2899
+ export {
2900
+ dt as L
2901
+ };