@aswin.dev/editor 0.6.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/AccessibilityPanel-CvQGLdu6.js +108 -0
  2. package/dist/AiChatSidebar-B3SJIKG_.js +229 -0
  3. package/dist/AiFeatureMenu-BLLKoOos.js +63 -0
  4. package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
  5. package/dist/CloudEditor-BCz1ZTYC.js +1172 -0
  6. package/dist/CollaboratorBar-DuPYW5iF.js +95 -0
  7. package/dist/CommentsSidebar-B1pvJdqF.js +441 -0
  8. package/dist/CountdownBlock-BNSj1jvJ.js +92 -0
  9. package/dist/CountdownToolbar-ClJr2GzL.js +210 -0
  10. package/dist/DesignReferenceSidebar-B8V_F2yF.js +276 -0
  11. package/dist/LoadingTrack-B0CWFHXQ.js +10 -0
  12. package/dist/ModuleBrowserModal-DrUFMTDx.js +206 -0
  13. package/dist/ModulePreviewCanvas-CHdOwV_4.js +106 -0
  14. package/dist/NumberWithSuffix-DkXUez9t.js +422 -0
  15. package/dist/ParagraphEditor-D75wl3BX.js +695 -0
  16. package/dist/RichTextEditorContent-DYkIauIk.js +137 -0
  17. package/dist/SaveModuleDialog-FZ9lxY7_.js +123 -0
  18. package/dist/SnapshotHistory-BR3eV120.js +127 -0
  19. package/dist/TemplateScoringPanel-4GTNHej5.js +256 -0
  20. package/dist/TestEmailModal--ue5w9fT.js +94 -0
  21. package/dist/TitleEditor-fStSADI-.js +172 -0
  22. package/dist/TplModal-BwSfxIHf.js +44 -0
  23. package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
  24. package/dist/accessibility-e8JYu_zd.js +27 -0
  25. package/dist/blockTypeIcons-BcTrDjmH.js +126 -0
  26. package/dist/bundle-stats.json +10 -0
  27. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +97 -0
  28. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +1 -0
  29. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +59 -0
  30. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +1 -0
  31. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +33 -0
  32. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +1 -0
  33. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +1143 -0
  34. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +1 -0
  35. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +51 -0
  36. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +1 -0
  37. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +93 -0
  38. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +1 -0
  39. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +212 -0
  40. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +1 -0
  41. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +195 -0
  42. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +1 -0
  43. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +107 -0
  44. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +1 -0
  45. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +423 -0
  46. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +1 -0
  47. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +544 -0
  48. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +1 -0
  49. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +106 -0
  50. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +1 -0
  51. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +119 -0
  52. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +1 -0
  53. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +171 -0
  54. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +1 -0
  55. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +22 -0
  56. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +1 -0
  57. package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
  58. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
  59. package/dist/cdn/chunks/de-D8CnZxV9.js +523 -0
  60. package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
  61. package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
  62. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
  63. package/dist/cdn/chunks/draggable-Bcb86AsV.js +11572 -0
  64. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
  65. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
  66. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
  67. package/dist/cdn/chunks/en-8FHaQv4V.js +523 -0
  68. package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
  69. package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
  70. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
  71. package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
  72. package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
  73. package/dist/cdn/chunks/extensions-DIxF31tA.js +598 -0
  74. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +1 -0
  75. package/dist/cdn/chunks/features-DEMb13KS.js +6814 -0
  76. package/dist/cdn/chunks/features-DEMb13KS.js.map +1 -0
  77. package/dist/cdn/chunks/icons-CsLTcirh.js +700 -0
  78. package/dist/cdn/chunks/icons-CsLTcirh.js.map +1 -0
  79. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
  80. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
  81. package/dist/cdn/chunks/media-library-CVaNvhpM.js +6014 -0
  82. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +1 -0
  83. package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
  84. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
  85. package/dist/cdn/chunks/quality-BaBfc54_.js +1456 -0
  86. package/dist/cdn/chunks/quality-BaBfc54_.js.map +1 -0
  87. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
  88. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
  89. package/dist/cdn/chunks/renderer-CUxvx7ro.js +548 -0
  90. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +1 -0
  91. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
  92. package/dist/cdn/chunks/src-CRaqN-p8.js +497 -0
  93. package/dist/cdn/chunks/src-CRaqN-p8.js.map +1 -0
  94. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +57 -0
  95. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -0
  96. package/dist/cdn/chunks/styles-BHJULjNR.js +2947 -0
  97. package/dist/cdn/chunks/styles-BHJULjNR.js.map +1 -0
  98. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +14654 -0
  99. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +1 -0
  100. package/dist/cdn/editor.css +2 -0
  101. package/dist/cdn/editor.js +250 -0
  102. package/dist/cdn/editor.js.map +1 -0
  103. package/dist/check-Da05j8yl.js +7 -0
  104. package/dist/chevron-down-R2uY34iD.js +7 -0
  105. package/dist/circle-alert-DZuGWPX-.js +25 -0
  106. package/dist/clock-CRp2sIub.js +12 -0
  107. package/dist/cloud-DEk_b4CR.js +1733 -0
  108. package/dist/createLucideIcon-C3pa2siy.js +43 -0
  109. package/dist/de-Brqvgr43.js +521 -0
  110. package/dist/de-DCaaCE5s.js +207 -0
  111. package/dist/dist-B1IR0bpH.js +326 -0
  112. package/dist/dist-BFawx6IS.js +519 -0
  113. package/dist/dist-BaQIYPsn.js +35 -0
  114. package/dist/dist-Cp0zXPAD.js +189 -0
  115. package/dist/dist-D6uC2xhi.js +5 -0
  116. package/dist/dist-D90y8dvT.js +2082 -0
  117. package/dist/dist-DDJIWTRY.js +776 -0
  118. package/dist/dist-DJmnUmW9.js +362 -0
  119. package/dist/dist-DjviJBCi.js +74 -0
  120. package/dist/dist-KoBJjK1G.js +61 -0
  121. package/dist/dist-aRzjfSRN.js +35 -0
  122. package/dist/dist-iLBdeBDR.js +10658 -0
  123. package/dist/dist-us-RpCWN.js +47 -0
  124. package/dist/dist-wzMIGj-D.js +5 -0
  125. package/dist/emojiData-PQyVa4bU.js +17 -0
  126. package/dist/en-DXCyK4-X.js +207 -0
  127. package/dist/en-WDVp87TE.js +521 -0
  128. package/dist/extensions-CUcl9Ok4.js +799 -0
  129. package/dist/formatRelativeTime-BOEf47hq.js +12 -0
  130. package/dist/image-up-MBZKKg9p.js +23 -0
  131. package/dist/index.d.ts +275 -0
  132. package/dist/info-CJEC7piy.js +19 -0
  133. package/dist/keys-ciNfSSGj.js +10 -0
  134. package/dist/liquid.browser-CdMv1BTn.js +3277 -0
  135. package/dist/loader-circle-DsY5Yg33.js +7 -0
  136. package/dist/message-circle-yElBbR2C.js +7 -0
  137. package/dist/readableTextColor-CY3SiRnt.js +30 -0
  138. package/dist/refresh-cw-CE_AGtn8.js +29 -0
  139. package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
  140. package/dist/scan-line-D0vcUekt.js +25 -0
  141. package/dist/send-DH4oDQqC.js +10 -0
  142. package/dist/shield-check-CfJgs2Hd.js +10 -0
  143. package/dist/sparkles-CvRXGqFs.js +23 -0
  144. package/dist/style.css +2 -0
  145. package/dist/styleConstants-fWzlIIwN.js +55 -0
  146. package/dist/styles-DEXEkBvg.js +3176 -0
  147. package/dist/templatical-editor.js +249 -0
  148. package/dist/text-align-start-BT9VUDxK.js +43 -0
  149. package/dist/timeouts-BSGxjuUF.js +4 -0
  150. package/dist/trash-2-DbP2Y6t2.js +25 -0
  151. package/dist/triangle-alert-aOXceTSe.js +17 -0
  152. package/dist/useCloudI18n-BuIwR6OE.js +23 -0
  153. package/dist/useEditorCore-C6ost42Q.js +9342 -0
  154. package/dist/useI18n-lb2DHDiu.js +17 -0
  155. package/dist/useMergeTag-CBwKnnNB.js +34 -0
  156. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +5775 -0
  157. package/dist/x-u2oVmjN_.js +10 -0
  158. package/package.json +1 -1
@@ -0,0 +1,3279 @@
1
+ //#region ../../node_modules/.pnpm/liquidjs@10.25.7/node_modules/liquidjs/dist/liquid.browser.mjs
2
+ var e = class {
3
+ constructor(e, t, n, r, i) {
4
+ this.kind = e, this.input = t, this.begin = n, this.end = r, this.file = i;
5
+ }
6
+ getText() {
7
+ return this.input.slice(this.begin, this.end);
8
+ }
9
+ getPosition() {
10
+ let [e, t] = [1, 1];
11
+ for (let n = 0; n < this.begin; n++) this.input[n] === "\n" ? (e++, t = 1) : t++;
12
+ return [e, t];
13
+ }
14
+ size() {
15
+ return this.end - this.begin;
16
+ }
17
+ }, t = class {
18
+ liquidMethodMissing(e, t) {}
19
+ }, n = Object.prototype.toString, r = String.prototype.toLowerCase, i = Object.hasOwnProperty;
20
+ function a(e) {
21
+ return typeof e == "string";
22
+ }
23
+ function o(e) {
24
+ return typeof e == "function";
25
+ }
26
+ function s(e) {
27
+ return e && o(e.then);
28
+ }
29
+ function c(e) {
30
+ return e && o(e.next) && o(e.throw) && o(e.return);
31
+ }
32
+ function l(e) {
33
+ return e = f(e), a(e) ? e : p(e) ? "" : m(e) ? e.map((e) => l(e)).join("") : String(e);
34
+ }
35
+ function u(e) {
36
+ return e = f(e), m(e) ? e : a(e) && e.length > 0 ? [e] : ae(e) ? Array.from(e) : h(e) ? Object.keys(e).map((t) => [t, e[t]]) : [];
37
+ }
38
+ function d(e) {
39
+ return e = f(e), p(e) ? [] : m(e) ? e : [e];
40
+ }
41
+ function f(e) {
42
+ return e instanceof t && o(e.valueOf) ? e.valueOf() : e;
43
+ }
44
+ function ee(e) {
45
+ return +f(e) || 0;
46
+ }
47
+ function te(e) {
48
+ return typeof e == "number";
49
+ }
50
+ function ne(e) {
51
+ return e && o(e.toLiquid) ? ne(e.toLiquid()) : e;
52
+ }
53
+ function p(e) {
54
+ return e == null;
55
+ }
56
+ function re(e) {
57
+ return e === void 0;
58
+ }
59
+ function m(e) {
60
+ return n.call(e) === "[object Array]";
61
+ }
62
+ function ie(e) {
63
+ return e && te(e.length);
64
+ }
65
+ function ae(e) {
66
+ return h(e) && Symbol.iterator in e;
67
+ }
68
+ function oe(e, t) {
69
+ e ||= {};
70
+ for (let n in e) if (i.call(e, n) && t(e[n], n, e) === !1) break;
71
+ return e;
72
+ }
73
+ function se(e) {
74
+ return e[e.length - 1];
75
+ }
76
+ function h(e) {
77
+ let t = typeof e;
78
+ return e !== null && (t === "object" || t === "function");
79
+ }
80
+ function ce(e, t, n = 1) {
81
+ let r = [];
82
+ for (let i = e; i < t; i += n) r.push(i);
83
+ return r;
84
+ }
85
+ function g(e, t, n = " ") {
86
+ return ue(e, t, n, (e, t) => t + e);
87
+ }
88
+ function le(e, t, n = " ") {
89
+ return ue(e, t, n, (e, t) => e + t);
90
+ }
91
+ function ue(e, t, n, r) {
92
+ e = String(e);
93
+ let i = t - e.length;
94
+ for (; i-- > 0;) e = r(e, n);
95
+ return e;
96
+ }
97
+ function de(e) {
98
+ return e;
99
+ }
100
+ function fe(e) {
101
+ return [...e].some((e) => e >= "a" && e <= "z") ? e.toUpperCase() : e.toLowerCase();
102
+ }
103
+ function pe(e, t) {
104
+ return e.length > t ? e.slice(0, t - 3) + "..." : e;
105
+ }
106
+ function me(e, t) {
107
+ return p(e) && p(t) ? 0 : p(e) ? 1 : p(t) || e < t ? -1 : +(e > t);
108
+ }
109
+ function he(e, t) {
110
+ return p(e) && p(t) ? 0 : p(e) ? 1 : p(t) || (e = r.call(e), t = r.call(t), e < t) ? -1 : +(e > t);
111
+ }
112
+ function ge(e) {
113
+ return function(...t) {
114
+ return e.call(this, ...t.map(f));
115
+ };
116
+ }
117
+ function _(e) {
118
+ return function(...t) {
119
+ return e.call(this, ...t.map(ee));
120
+ };
121
+ }
122
+ function* v(e) {
123
+ let t = /* @__PURE__ */ new Set();
124
+ for (let n of e) {
125
+ let e = JSON.stringify(n);
126
+ t.has(e) || (t.add(e), yield n);
127
+ }
128
+ }
129
+ var _e = "__liquidClass__", y = class extends Error {
130
+ constructor(e, t) {
131
+ super(typeof e == "string" ? e : e.message), this.context = "", typeof e != "string" && Object.defineProperty(this, "originalError", {
132
+ value: e,
133
+ enumerable: !1
134
+ }), Object.defineProperty(this, "token", {
135
+ value: t,
136
+ enumerable: !1
137
+ }), Object.defineProperty(this, _e, {
138
+ value: "LiquidError",
139
+ enumerable: !1
140
+ });
141
+ }
142
+ update() {
143
+ Object.defineProperty(this, "context", {
144
+ value: Te(this.token),
145
+ enumerable: !1
146
+ }), this.message = Ee(this.message, this.token), this.stack = this.message + "\n" + this.context + "\n" + this.stack, this.originalError && (this.stack += "\nFrom " + this.originalError.stack);
147
+ }
148
+ static is(e) {
149
+ return e?.[_e] === "LiquidError";
150
+ }
151
+ }, ve = class extends y {
152
+ constructor(e, t) {
153
+ super(e, t), this.name = "TokenizationError", super.update();
154
+ }
155
+ }, ye = class extends y {
156
+ constructor(e, t) {
157
+ super(e, t), this.name = "ParseError", this.message = e.message, super.update();
158
+ }
159
+ }, be = class extends y {
160
+ constructor(e, t) {
161
+ super(e, t.token), this.name = "RenderError", this.message = e.message, super.update();
162
+ }
163
+ static is(e) {
164
+ return e.name === "RenderError";
165
+ }
166
+ }, xe = class extends y {
167
+ constructor(e) {
168
+ super(e[0], e[0].token), this.errors = e, this.name = "LiquidErrors";
169
+ let t = e.length > 1 ? "s" : "";
170
+ this.message = `${e.length} error${t} found`, super.update();
171
+ }
172
+ static is(e) {
173
+ return e.name === "LiquidErrors";
174
+ }
175
+ }, Se = class extends y {
176
+ constructor(e, t) {
177
+ super(e, t), this.name = "UndefinedVariableError", this.message = e.message, super.update();
178
+ }
179
+ }, Ce = class extends Error {
180
+ constructor(e) {
181
+ super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
182
+ }
183
+ }, we = class extends Error {
184
+ constructor(e) {
185
+ super(e), this.name = "AssertionError", this.message = e + "";
186
+ }
187
+ };
188
+ function Te(e) {
189
+ let [t, n] = e.getPosition(), r = e.input.split("\n"), i = Math.max(t - 2, 1), a = Math.min(t + 3, r.length);
190
+ return ce(i, a + 1).map((e) => {
191
+ let i = `${e === t ? ">> " : " "}${g(String(e), String(a).length)}| `, o = e === t ? "\n" + g("^", n + i.length) : "";
192
+ return i += r[e - 1], i += o, i;
193
+ }).join("\n");
194
+ }
195
+ function Ee(e, t) {
196
+ t.file && (e += `, file:${t.file}`);
197
+ let [n, r] = t.getPosition();
198
+ return e += `, line:${n}, col:${r}`, e;
199
+ }
200
+ var b = [
201
+ 0,
202
+ 0,
203
+ 0,
204
+ 0,
205
+ 0,
206
+ 0,
207
+ 0,
208
+ 0,
209
+ 0,
210
+ 20,
211
+ 4,
212
+ 4,
213
+ 4,
214
+ 20,
215
+ 0,
216
+ 0,
217
+ 0,
218
+ 0,
219
+ 0,
220
+ 0,
221
+ 0,
222
+ 0,
223
+ 0,
224
+ 0,
225
+ 0,
226
+ 0,
227
+ 0,
228
+ 0,
229
+ 0,
230
+ 0,
231
+ 0,
232
+ 0,
233
+ 20,
234
+ 2,
235
+ 8,
236
+ 0,
237
+ 0,
238
+ 0,
239
+ 0,
240
+ 8,
241
+ 0,
242
+ 0,
243
+ 0,
244
+ 64,
245
+ 0,
246
+ 65,
247
+ 0,
248
+ 0,
249
+ 33,
250
+ 33,
251
+ 33,
252
+ 33,
253
+ 33,
254
+ 33,
255
+ 33,
256
+ 33,
257
+ 33,
258
+ 33,
259
+ 0,
260
+ 0,
261
+ 2,
262
+ 2,
263
+ 2,
264
+ 1,
265
+ 0,
266
+ 1,
267
+ 1,
268
+ 1,
269
+ 1,
270
+ 1,
271
+ 1,
272
+ 1,
273
+ 1,
274
+ 1,
275
+ 1,
276
+ 1,
277
+ 1,
278
+ 1,
279
+ 1,
280
+ 1,
281
+ 1,
282
+ 1,
283
+ 1,
284
+ 1,
285
+ 1,
286
+ 1,
287
+ 1,
288
+ 1,
289
+ 1,
290
+ 1,
291
+ 1,
292
+ 0,
293
+ 0,
294
+ 0,
295
+ 0,
296
+ 1,
297
+ 0,
298
+ 1,
299
+ 1,
300
+ 1,
301
+ 1,
302
+ 1,
303
+ 1,
304
+ 1,
305
+ 1,
306
+ 1,
307
+ 1,
308
+ 1,
309
+ 1,
310
+ 1,
311
+ 1,
312
+ 1,
313
+ 1,
314
+ 1,
315
+ 1,
316
+ 1,
317
+ 1,
318
+ 1,
319
+ 1,
320
+ 1,
321
+ 1,
322
+ 1,
323
+ 1,
324
+ 0,
325
+ 0,
326
+ 0,
327
+ 0,
328
+ 0
329
+ ], De = 1, x = 4, Oe = 8, ke = 16, Ae = 32, je = 64, Me = 128;
330
+ function S(e) {
331
+ let t = e.charCodeAt(0);
332
+ return t >= 128 ? !b[t] : !!(b[t] & De);
333
+ }
334
+ b[160] = b[5760] = b[6158] = b[8192] = b[8193] = b[8194] = b[8195] = b[8196] = b[8197] = b[8198] = b[8199] = b[8200] = b[8201] = b[8202] = b[8232] = b[8233] = b[8239] = b[8287] = b[12288] = x, b[8220] = b[8221] = Me;
335
+ function C(e, t) {
336
+ if (!e) throw new we(typeof t == "function" ? t() : t || `expect ${e} to be true`);
337
+ }
338
+ function w(e, t = `unexpected ${JSON.stringify(e)}`) {
339
+ C(!e, t);
340
+ }
341
+ var Ne = class extends t {
342
+ equals(e) {
343
+ return p(f(e));
344
+ }
345
+ gt() {
346
+ return !1;
347
+ }
348
+ geq() {
349
+ return !1;
350
+ }
351
+ lt() {
352
+ return !1;
353
+ }
354
+ leq() {
355
+ return !1;
356
+ }
357
+ valueOf() {
358
+ return null;
359
+ }
360
+ }, Pe = class e extends t {
361
+ equals(t) {
362
+ return t instanceof e ? !1 : (t = f(t), a(t) || m(t) ? t.length === 0 : h(t) ? Object.keys(t).length === 0 : !1);
363
+ }
364
+ gt() {
365
+ return !1;
366
+ }
367
+ geq() {
368
+ return !1;
369
+ }
370
+ lt() {
371
+ return !1;
372
+ }
373
+ leq() {
374
+ return !1;
375
+ }
376
+ valueOf() {
377
+ return "";
378
+ }
379
+ static is(t) {
380
+ return t instanceof e;
381
+ }
382
+ }, Fe = class e extends Pe {
383
+ equals(e) {
384
+ return e === !1 || p(f(e)) ? !0 : a(e) ? /^\s*$/.test(e) : super.equals(e);
385
+ }
386
+ static is(t) {
387
+ return t instanceof e;
388
+ }
389
+ }, Ie = class extends t {
390
+ constructor(e, t, n) {
391
+ super(), this.i = 0, this.length = e, this.name = `${n}-${t}`;
392
+ }
393
+ next() {
394
+ this.i++;
395
+ }
396
+ index0() {
397
+ return this.i;
398
+ }
399
+ index() {
400
+ return this.i + 1;
401
+ }
402
+ first() {
403
+ return this.i === 0;
404
+ }
405
+ last() {
406
+ return this.i === this.length - 1;
407
+ }
408
+ rindex() {
409
+ return this.length - this.i;
410
+ }
411
+ rindex0() {
412
+ return this.length - this.i - 1;
413
+ }
414
+ valueOf() {
415
+ return JSON.stringify(this);
416
+ }
417
+ }, Le = class {
418
+ constructor() {
419
+ this.buffer = "";
420
+ }
421
+ write(e) {
422
+ this.buffer += l(e);
423
+ }
424
+ }, Re = class {
425
+ constructor() {
426
+ throw this.buffer = "", this.stream = null, Error("streaming not supported in browser");
427
+ }
428
+ }, ze = class {
429
+ constructor() {
430
+ this.buffer = "";
431
+ }
432
+ write(e) {
433
+ e = f(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = l(this.buffer) + l(e);
434
+ }
435
+ }, Be = class extends t {
436
+ constructor(e = () => "") {
437
+ super(), this.superBlockRender = e;
438
+ }
439
+ *super() {
440
+ let e = new Le();
441
+ return yield this.superBlockRender(e), e.buffer;
442
+ }
443
+ };
444
+ function T(e) {
445
+ return e && o(e.equals) && o(e.gt) && o(e.geq) && o(e.lt) && o(e.leq);
446
+ }
447
+ var Ve = new Ne(), He = {
448
+ true: !0,
449
+ false: !1,
450
+ nil: Ve,
451
+ null: Ve,
452
+ empty: new Pe(),
453
+ blank: new Fe()
454
+ };
455
+ function Ue(e) {
456
+ let t = {};
457
+ for (let [n, r] of Object.entries(e)) {
458
+ let e = t;
459
+ for (let t = 0; t < n.length; t++) {
460
+ let r = n[t];
461
+ e[r] = e[r] || {}, t === n.length - 1 && S(n[t]) && (e[r].needBoundary = !0), e = e[r];
462
+ }
463
+ e.data = r, e.end = !0;
464
+ }
465
+ return t;
466
+ }
467
+ var We = function() {
468
+ return We = Object.assign || function(e) {
469
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
470
+ return e;
471
+ }, We.apply(this, arguments);
472
+ };
473
+ function E(e, t, n, r) {
474
+ function i(e) {
475
+ return e instanceof n ? e : new n(function(t) {
476
+ t(e);
477
+ });
478
+ }
479
+ return new (n ||= Promise)(function(n, a) {
480
+ function o(e) {
481
+ try {
482
+ c(r.next(e));
483
+ } catch (e) {
484
+ a(e);
485
+ }
486
+ }
487
+ function s(e) {
488
+ try {
489
+ c(r.throw(e));
490
+ } catch (e) {
491
+ a(e);
492
+ }
493
+ }
494
+ function c(e) {
495
+ e.done ? n(e.value) : i(e.value).then(o, s);
496
+ }
497
+ c((r = r.apply(e, t || [])).next());
498
+ });
499
+ }
500
+ function Ge(e, t) {
501
+ let n = t || e;
502
+ return (t, ...r) => t ? n(...r) : e(...r);
503
+ }
504
+ function D(e) {
505
+ return E(this, void 0, void 0, function* () {
506
+ if (!c(e)) return e;
507
+ let t, n = !1, r = "next";
508
+ do {
509
+ let i = e[r](t);
510
+ n = i.done, t = i.value, r = "next";
511
+ try {
512
+ c(t) && (t = D(t)), s(t) && (t = yield t);
513
+ } catch (e) {
514
+ r = "throw", t = e;
515
+ }
516
+ } while (!n);
517
+ return t;
518
+ });
519
+ }
520
+ function O(e) {
521
+ if (!c(e)) return e;
522
+ let t, n = !1, r = "next";
523
+ do {
524
+ let i = e[r](t);
525
+ if (n = i.done, t = i.value, r = "next", c(t)) try {
526
+ t = O(t);
527
+ } catch (e) {
528
+ r = "throw", t = e;
529
+ }
530
+ } while (!n);
531
+ return t;
532
+ }
533
+ var Ke = /%([-_0^#:]+)?(\d+)?([EO])?(.)/;
534
+ function qe(e) {
535
+ return [
536
+ 31,
537
+ Xe(e) ? 29 : 28,
538
+ 31,
539
+ 30,
540
+ 31,
541
+ 30,
542
+ 31,
543
+ 31,
544
+ 30,
545
+ 31,
546
+ 30,
547
+ 31
548
+ ];
549
+ }
550
+ function Je(e) {
551
+ let t = 0;
552
+ for (let n = 0; n < e.getMonth(); ++n) t += qe(e)[n];
553
+ return t + e.getDate();
554
+ }
555
+ function Ye(e, t) {
556
+ let n = Je(e) + (t - e.getDay()), r = 7 - new Date(e.getFullYear(), 0, 1).getDay() + t;
557
+ return String(Math.floor((n - r) / 7) + 1);
558
+ }
559
+ function Xe(e) {
560
+ let t = e.getFullYear();
561
+ return !!(!(t & 3) && (t % 100 || t % 400 == 0 && t));
562
+ }
563
+ function Ze(e) {
564
+ let t = e.getDate();
565
+ if ([
566
+ 11,
567
+ 12,
568
+ 13
569
+ ].includes(t)) return "th";
570
+ switch (t % 10) {
571
+ case 1: return "st";
572
+ case 2: return "nd";
573
+ case 3: return "rd";
574
+ default: return "th";
575
+ }
576
+ }
577
+ function Qe(e) {
578
+ return parseInt(e.getFullYear().toString().substring(0, 2), 10);
579
+ }
580
+ var $e = {
581
+ d: 2,
582
+ e: 2,
583
+ H: 2,
584
+ I: 2,
585
+ j: 3,
586
+ k: 2,
587
+ l: 2,
588
+ L: 3,
589
+ m: 2,
590
+ M: 2,
591
+ S: 2,
592
+ U: 2,
593
+ W: 2
594
+ }, et = /* @__PURE__ */ new Set("aAbBceklpP");
595
+ function tt(e, t) {
596
+ let n = Math.abs(e.getTimezoneOffset()), r = Math.floor(n / 60), i = n % 60;
597
+ return (e.getTimezoneOffset() > 0 ? "-" : "+") + g(r, 2, "0") + (t.flags[":"] ? ":" : "") + g(i, 2, "0");
598
+ }
599
+ var nt = {
600
+ a: (e) => e.getShortWeekdayName(),
601
+ A: (e) => e.getLongWeekdayName(),
602
+ b: (e) => e.getShortMonthName(),
603
+ B: (e) => e.getLongMonthName(),
604
+ c: (e) => e.toLocaleString(),
605
+ C: (e) => Qe(e),
606
+ d: (e) => e.getDate(),
607
+ e: (e) => e.getDate(),
608
+ H: (e) => e.getHours(),
609
+ I: (e) => String(e.getHours() % 12 || 12),
610
+ j: (e) => Je(e),
611
+ k: (e) => e.getHours(),
612
+ l: (e) => String(e.getHours() % 12 || 12),
613
+ L: (e) => e.getMilliseconds(),
614
+ m: (e) => e.getMonth() + 1,
615
+ M: (e) => e.getMinutes(),
616
+ N: (e, t) => {
617
+ let n = Number(t.width) || 9;
618
+ return le(String(e.getMilliseconds()).slice(0, n), n, "0");
619
+ },
620
+ p: (e) => e.getHours() < 12 ? "AM" : "PM",
621
+ P: (e) => e.getHours() < 12 ? "am" : "pm",
622
+ q: (e) => Ze(e),
623
+ s: (e) => Math.round(e.getTime() / 1e3),
624
+ S: (e) => e.getSeconds(),
625
+ u: (e) => e.getDay() || 7,
626
+ U: (e) => Ye(e, 0),
627
+ w: (e) => e.getDay(),
628
+ W: (e) => Ye(e, 1),
629
+ x: (e) => e.toLocaleDateString(),
630
+ X: (e) => e.toLocaleTimeString(),
631
+ y: (e) => e.getFullYear().toString().slice(2, 4),
632
+ Y: (e) => e.getFullYear(),
633
+ z: tt,
634
+ Z: (e, t) => e.getTimeZoneName() || tt(e, t),
635
+ t: () => " ",
636
+ n: () => "\n",
637
+ "%": () => "%"
638
+ };
639
+ nt.h = nt.b;
640
+ function k(e, t) {
641
+ let n = "", r = t, i;
642
+ for (; i = Ke.exec(r);) n += r.slice(0, i.index), r = r.slice(i.index + i[0].length), n += rt(e, i);
643
+ return n + r;
644
+ }
645
+ function rt(e, t) {
646
+ let [n, r = "", i, a, o] = t, s = nt[o];
647
+ if (!s) return n;
648
+ let c = {};
649
+ for (let e of r) c[e] = !0;
650
+ let l = String(s(e, {
651
+ flags: c,
652
+ width: i,
653
+ modifier: a
654
+ })), u = et.has(o) ? " " : "0", d = i || $e[o] || 0;
655
+ return c["^"] ? l = l.toUpperCase() : c["#"] && (l = fe(l)), c._ ? u = " " : c[0] && (u = "0"), c["-"] && (d = 0), g(l, d, u);
656
+ }
657
+ function it() {
658
+ return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
659
+ }
660
+ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
661
+ "January",
662
+ "February",
663
+ "March",
664
+ "April",
665
+ "May",
666
+ "June",
667
+ "July",
668
+ "August",
669
+ "September",
670
+ "October",
671
+ "November",
672
+ "December"
673
+ ], ct = st.map((e) => e.slice(0, 3)), lt = [
674
+ "Sunday",
675
+ "Monday",
676
+ "Tuesday",
677
+ "Wednesday",
678
+ "Thursday",
679
+ "Friday",
680
+ "Saturday"
681
+ ], ut = lt.map((e) => e.slice(0, 3)), A = class e {
682
+ constructor(t, n, r) {
683
+ this.locale = n, this.DateTimeFormat = it(), this.date = new Date(t), this.timezoneFixed = r !== void 0, r === void 0 && (r = this.date.getTimezoneOffset()), this.timezoneOffset = a(r) ? e.getTimezoneOffset(r, this.date) : r, this.timezoneName = a(r) ? r : "";
684
+ let i = (this.date.getTimezoneOffset() - this.timezoneOffset) * at, o = this.date.getTime() + i;
685
+ this.displayDate = new Date(o);
686
+ }
687
+ getTime() {
688
+ return this.displayDate.getTime();
689
+ }
690
+ getMilliseconds() {
691
+ return this.displayDate.getMilliseconds();
692
+ }
693
+ getSeconds() {
694
+ return this.displayDate.getSeconds();
695
+ }
696
+ getMinutes() {
697
+ return this.displayDate.getMinutes();
698
+ }
699
+ getHours() {
700
+ return this.displayDate.getHours();
701
+ }
702
+ getDay() {
703
+ return this.displayDate.getDay();
704
+ }
705
+ getDate() {
706
+ return this.displayDate.getDate();
707
+ }
708
+ getMonth() {
709
+ return this.displayDate.getMonth();
710
+ }
711
+ getFullYear() {
712
+ return this.displayDate.getFullYear();
713
+ }
714
+ toLocaleString(e, t) {
715
+ return t?.timeZone ? this.date.toLocaleString(e, t) : this.displayDate.toLocaleString(e, t);
716
+ }
717
+ toLocaleTimeString(e) {
718
+ return this.displayDate.toLocaleTimeString(e);
719
+ }
720
+ toLocaleDateString(e) {
721
+ return this.displayDate.toLocaleDateString(e);
722
+ }
723
+ getTimezoneOffset() {
724
+ return this.timezoneOffset;
725
+ }
726
+ getTimeZoneName() {
727
+ if (this.timezoneFixed) return this.timezoneName;
728
+ if (this.DateTimeFormat) return this.DateTimeFormat().resolvedOptions().timeZone;
729
+ }
730
+ getLongMonthName() {
731
+ return this.format({ month: "long" }) ?? st[this.getMonth()];
732
+ }
733
+ getShortMonthName() {
734
+ return this.format({ month: "short" }) ?? ct[this.getMonth()];
735
+ }
736
+ getLongWeekdayName() {
737
+ return this.format({ weekday: "long" }) ?? lt[this.displayDate.getDay()];
738
+ }
739
+ getShortWeekdayName() {
740
+ return this.format({ weekday: "short" }) ?? ut[this.displayDate.getDay()];
741
+ }
742
+ valid() {
743
+ return !isNaN(this.getTime());
744
+ }
745
+ format(e) {
746
+ return this.DateTimeFormat && this.DateTimeFormat(this.locale, e).format(this.displayDate);
747
+ }
748
+ static createDateFixedToTimezone(t, n) {
749
+ let r = t.match(ot);
750
+ if (r && r[1] === "Z") return new e(+new Date(t), n, 0);
751
+ if (r && r[2] && r[3] && r[4]) {
752
+ let [, , i, a, o] = r, s = (i === "+" ? -1 : 1) * (parseInt(a, 10) * 60 + parseInt(o, 10));
753
+ return new e(+new Date(t), n, s);
754
+ }
755
+ return new e(t, n);
756
+ }
757
+ static getTimezoneOffset(e, t) {
758
+ let n = t.toLocaleString("en-US", { timeZone: e }), r = t.toLocaleString("en-US", { timeZone: "UTC" }), i = new Date(n);
759
+ return (new Date(r) - +i) / (60 * 1e3);
760
+ }
761
+ }, dt = class {
762
+ constructor(e, t) {
763
+ this.base = 0, this.message = `${e} limit exceeded`, this.limit = t;
764
+ }
765
+ use(e) {
766
+ +e > 0 && (C(this.base + +e <= this.limit, this.message), this.base += +e);
767
+ }
768
+ check(e) {
769
+ +e > 0 && C(+e <= this.limit, this.message);
770
+ }
771
+ }, ft = class extends e {
772
+ constructor(e, [t, n], r, i, a, o, s, c) {
773
+ super(e, r, i, a, c), this.trimLeft = !1, this.trimRight = !1;
774
+ let l = r[t] === "-", u = r[n - 1] === "-", d = l ? t + 1 : t, f = u ? n - 1 : n;
775
+ for (; d < f && b[r.charCodeAt(d)] & x;) d++;
776
+ for (; f > d && b[r.charCodeAt(f - 1)] & x;) f--;
777
+ this.contentRange = [d, f], this.trimLeft = l || o, this.trimRight = u || s;
778
+ }
779
+ get content() {
780
+ return this.input.slice(this.contentRange[0], this.contentRange[1]);
781
+ }
782
+ }, pt = class extends ft {
783
+ constructor(e, t, n, r, i) {
784
+ let { trimTagLeft: a, trimTagRight: o, tagDelimiterLeft: s, tagDelimiterRight: c } = r, [l, u] = [t + s.length, n - c.length];
785
+ super(J.Tag, [l, u], e, t, n, a, o, i), this.tokenizer = new L(e, r.operators, i, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal tag syntax, tag name expected"), this.tokenizer.skipBlank(), this.args = this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
786
+ }
787
+ }, mt = class extends ft {
788
+ constructor(e, t, n, r, i) {
789
+ let { trimOutputLeft: a, trimOutputRight: o, outputDelimiterLeft: s, outputDelimiterRight: c } = r, l = [t + s.length, n - c.length];
790
+ super(J.Output, l, e, t, n, a, o, i);
791
+ }
792
+ }, ht = class extends e {
793
+ constructor(e, t, n, r) {
794
+ super(J.HTML, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.trimLeft = 0, this.trimRight = 0;
795
+ }
796
+ getContent() {
797
+ return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
798
+ }
799
+ }, gt = class extends e {
800
+ constructor(e, t, n, r) {
801
+ super(J.Number, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.content = Number(this.getText());
802
+ }
803
+ }, _t = class extends e {
804
+ constructor(e, t, n, r) {
805
+ super(J.Word, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.content = this.getText();
806
+ }
807
+ }, vt = class extends e {
808
+ constructor(e, t, n, r) {
809
+ super(J.Literal, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.literal = this.getText(), this.content = He[this.literal];
810
+ }
811
+ }, yt = {
812
+ "==": 2,
813
+ "!=": 2,
814
+ ">": 2,
815
+ "<": 2,
816
+ ">=": 2,
817
+ "<=": 2,
818
+ contains: 2,
819
+ not: 1,
820
+ and: 0,
821
+ or: 0
822
+ }, bt = {
823
+ "==": 0,
824
+ "!=": 0,
825
+ ">": 0,
826
+ "<": 0,
827
+ ">=": 0,
828
+ "<=": 0,
829
+ contains: 0,
830
+ not: 1,
831
+ and: 0,
832
+ or: 0
833
+ }, xt = class extends e {
834
+ constructor(e, t, n, r) {
835
+ super(J.Operator, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.operator = this.getText();
836
+ }
837
+ getPrecedence() {
838
+ let e = this.getText();
839
+ return e in yt ? yt[e] : 1;
840
+ }
841
+ }, St = class extends e {
842
+ constructor(e, t, n, r, i, a) {
843
+ super(J.PropertyAccess, n, r, i, a), this.variable = e, this.props = t;
844
+ }
845
+ }, Ct = class extends e {
846
+ constructor(e, t, n, r, i, a) {
847
+ super(J.Filter, n, r, i, a), this.name = e, this.args = t;
848
+ }
849
+ }, wt = class extends e {
850
+ constructor(e, t, n, r, i, a) {
851
+ super(J.Hash, e, t, n, a), this.input = e, this.begin = t, this.end = n, this.name = r, this.value = i, this.file = a;
852
+ }
853
+ }, Tt = /[\da-fA-F]/, Et = /[0-7]/, Dt = {
854
+ b: "\b",
855
+ f: "\f",
856
+ n: "\n",
857
+ r: "\r",
858
+ t: " ",
859
+ v: "\v"
860
+ };
861
+ function Ot(e) {
862
+ let t = e.charCodeAt(0);
863
+ return t >= 97 ? t - 87 : t >= 65 ? t - 55 : t - 48;
864
+ }
865
+ function kt(e) {
866
+ let t = "";
867
+ for (let n = 1; n < e.length - 1; n++) {
868
+ if (e[n] !== "\\") {
869
+ t += e[n];
870
+ continue;
871
+ }
872
+ if (Dt[e[n + 1]] !== void 0) t += Dt[e[++n]];
873
+ else if (e[n + 1] === "u") {
874
+ let r = 0, i = n + 2;
875
+ for (; i <= n + 5 && Tt.test(e[i]);) r = r * 16 + Ot(e[i++]);
876
+ n = i - 1, t += String.fromCharCode(r);
877
+ } else if (!Et.test(e[n + 1])) t += e[++n];
878
+ else {
879
+ let r = n + 1, i = 0;
880
+ for (; r <= n + 3 && Et.test(e[r]);) i = i * 8 + Ot(e[r++]);
881
+ n = r - 1, t += String.fromCharCode(i);
882
+ }
883
+ }
884
+ return t;
885
+ }
886
+ var At = class extends e {
887
+ constructor(e, t, n, r) {
888
+ super(J.Quoted, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.content = kt(this.getText());
889
+ }
890
+ }, jt = class extends e {
891
+ constructor(e, t, n, r, i, a) {
892
+ super(J.Range, e, t, n, a), this.input = e, this.begin = t, this.end = n, this.lhs = r, this.rhs = i, this.file = a;
893
+ }
894
+ }, Mt = class extends ft {
895
+ constructor(e, t, n, r, i) {
896
+ super(J.Tag, [t, n], e, t, n, !1, !1, i), this.tokenizer = new L(e, r.operators, i, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank();
897
+ }
898
+ get args() {
899
+ return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
900
+ }
901
+ }, Nt = class extends e {
902
+ constructor(e, t, n, r, i, a) {
903
+ super(J.FilteredValue, n, r, i, a), this.initial = e, this.filters = t, this.input = n, this.begin = r, this.end = i, this.file = a;
904
+ }
905
+ }, Pt = { now: () => Date.now() };
906
+ function Ft() {
907
+ return typeof global == "object" && global.performance || typeof window == "object" && window.performance || Pt;
908
+ }
909
+ var It = class {
910
+ renderTemplatesToNodeStream(e, t) {
911
+ let n = new Re();
912
+ return Promise.resolve().then(() => D(this.renderTemplates(e, t, n))).then(() => n.end(), (e) => n.error(e)), n.stream;
913
+ }
914
+ *renderTemplates(e, t, n) {
915
+ n ||= t.opts.keepOutputType ? new ze() : new Le();
916
+ let r = [];
917
+ for (let i of e) {
918
+ t.renderLimit.check(Ft().now());
919
+ try {
920
+ let e = yield i.render(t, n);
921
+ if (e && n.write(e), t.breakCalled || t.continueCalled) break;
922
+ } catch (e) {
923
+ let n = y.is(e) ? e : new be(e, i);
924
+ if (t.opts.catchAllErrors) r.push(n);
925
+ else throw n;
926
+ }
927
+ }
928
+ if (r.length) throw new xe(r);
929
+ return n.buffer;
930
+ }
931
+ }, Lt = class {
932
+ constructor(e) {
933
+ this.postfix = [...Vt(e)];
934
+ }
935
+ *evaluate(e, t) {
936
+ C(e, "unable to evaluate: context not defined");
937
+ let n = [];
938
+ for (let r of this.postfix) if (zn(r)) {
939
+ let t = n.pop(), i;
940
+ if (bt[r.operator] === 1) i = yield e.opts.operators[r.operator](t, e);
941
+ else {
942
+ let a = n.pop();
943
+ i = yield e.opts.operators[r.operator](a, t, e);
944
+ }
945
+ n.push(i);
946
+ } else n.push(yield j(r, e, t));
947
+ return n[0];
948
+ }
949
+ valid() {
950
+ return !!this.postfix.length;
951
+ }
952
+ };
953
+ function* j(e, t, n = !1) {
954
+ if (e) {
955
+ if ("content" in e) return e.content;
956
+ if (Wn(e)) return yield Rt(e, t, n);
957
+ if (Kn(e)) return yield Bt(e, t);
958
+ }
959
+ }
960
+ function* Rt(e, t, n) {
961
+ let r = [];
962
+ for (let n of e.props) r.push(yield j(n, t, !1));
963
+ try {
964
+ if (e.variable) {
965
+ let i = yield j(e.variable, t, n);
966
+ return yield t._getFromScope(i, r);
967
+ } else return yield t._get(r);
968
+ } catch (t) {
969
+ if (n && t.name === "InternalUndefinedVariableError") return null;
970
+ throw new Se(t, e);
971
+ }
972
+ }
973
+ function zt(e) {
974
+ return e.content;
975
+ }
976
+ function* Bt(e, t) {
977
+ let n = yield j(e.lhs, t), r = yield j(e.rhs, t);
978
+ return t.memoryLimit.use(r - n + 1), ce(+n, +r + 1);
979
+ }
980
+ function* Vt(e) {
981
+ let t = [];
982
+ for (let n of e) if (zn(n)) {
983
+ for (; t.length && t[t.length - 1].getPrecedence() > n.getPrecedence();) yield t.pop();
984
+ t.push(n);
985
+ } else yield n;
986
+ for (; t.length;) yield t.pop();
987
+ }
988
+ function M(e, t) {
989
+ return !N(e, t);
990
+ }
991
+ function N(e, t) {
992
+ return e = f(e), t.opts.jsTruthy ? !e : e === !1 || e == null;
993
+ }
994
+ var Ht = {
995
+ "==": P,
996
+ "!=": (e, t) => !P(e, t),
997
+ ">": (e, t) => T(e) ? e.gt(t) : T(t) ? t.lt(e) : f(e) > f(t),
998
+ "<": (e, t) => T(e) ? e.lt(t) : T(t) ? t.gt(e) : f(e) < f(t),
999
+ ">=": (e, t) => T(e) ? e.geq(t) : T(t) ? t.leq(e) : f(e) >= f(t),
1000
+ "<=": (e, t) => T(e) ? e.leq(t) : T(t) ? t.geq(e) : f(e) <= f(t),
1001
+ contains: (e, t) => (e = f(e), m(e) ? e.some((e) => P(e, t)) : o(e?.indexOf) ? e.indexOf(f(t)) > -1 : !1),
1002
+ not: (e, t) => N(f(e), t),
1003
+ and: (e, t, n) => M(f(e), n) && M(f(t), n),
1004
+ or: (e, t, n) => M(f(e), n) || M(f(t), n)
1005
+ };
1006
+ function P(e, t) {
1007
+ return T(e) ? e.equals(t) : T(t) ? t.equals(e) : (e = f(e), t = f(t), m(e) ? m(t) && Ut(e, t) : e === t);
1008
+ }
1009
+ function Ut(e, t) {
1010
+ return e.length === t.length ? !e.some((e, n) => !P(e, t[n])) : !1;
1011
+ }
1012
+ function Wt(e, t) {
1013
+ return e.some((e) => P(e, t));
1014
+ }
1015
+ var Gt = class {
1016
+ constructor(e, t, n, r) {
1017
+ this.key = e, this.value = t, this.next = n, this.prev = r;
1018
+ }
1019
+ }, Kt = class {
1020
+ constructor(e, t = 0) {
1021
+ this.limit = e, this.size = t, this.cache = {}, this.head = new Gt("HEAD", null, null, null), this.tail = new Gt("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
1022
+ }
1023
+ write(e, t) {
1024
+ if (this.cache[e]) this.cache[e].value = t;
1025
+ else {
1026
+ let n = new Gt(e, t, this.head.next, this.head);
1027
+ this.head.next.prev = n, this.head.next = n, this.cache[e] = n, this.size++, this.ensureLimit();
1028
+ }
1029
+ }
1030
+ read(e) {
1031
+ if (!this.cache[e]) return;
1032
+ let { value: t } = this.cache[e];
1033
+ return this.remove(e), this.write(e, t), t;
1034
+ }
1035
+ remove(e) {
1036
+ let t = this.cache[e];
1037
+ t.prev.next = t.next, t.next.prev = t.prev, delete this.cache[e], this.size--;
1038
+ }
1039
+ clear() {
1040
+ this.head.next = this.tail, this.tail.prev = this.head, this.size = 0, this.cache = {};
1041
+ }
1042
+ ensureLimit() {
1043
+ this.size > this.limit && this.remove(this.tail.prev.key);
1044
+ }
1045
+ };
1046
+ function qt(e, t) {
1047
+ let n = document.createElement("base");
1048
+ n.href = e;
1049
+ let r = document.getElementsByTagName("head")[0];
1050
+ r.insertBefore(n, r.firstChild);
1051
+ let i = document.createElement("a");
1052
+ i.href = t;
1053
+ let a = i.href;
1054
+ return r.removeChild(n), a;
1055
+ }
1056
+ function Jt(e, t, n) {
1057
+ return e.length && se(e) !== "/" && (e += "/"), qt(e, t).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (e, t, r) => {
1058
+ let i = r.split("/").pop();
1059
+ return /\.\w+$/.test(i) ? e : t + r + n;
1060
+ });
1061
+ }
1062
+ function Yt(e) {
1063
+ return E(this, void 0, void 0, function* () {
1064
+ return new Promise((t, n) => {
1065
+ let r = new XMLHttpRequest();
1066
+ r.onload = () => {
1067
+ r.status >= 200 && r.status < 300 ? t(r.responseText) : n(Error(r.statusText));
1068
+ }, r.onerror = () => {
1069
+ n(/* @__PURE__ */ Error("An error occurred whilst receiving the response."));
1070
+ }, r.open("GET", e), r.send();
1071
+ });
1072
+ });
1073
+ }
1074
+ function Xt(e) {
1075
+ let t = new XMLHttpRequest();
1076
+ if (t.open("GET", e, !1), t.send(), t.status < 200 || t.status >= 300) throw Error(t.statusText);
1077
+ return t.responseText;
1078
+ }
1079
+ function Zt(e) {
1080
+ return E(this, void 0, void 0, function* () {
1081
+ return !0;
1082
+ });
1083
+ }
1084
+ function Qt(e) {
1085
+ return !0;
1086
+ }
1087
+ function $t(e) {
1088
+ return qt(e, ".");
1089
+ }
1090
+ var en = /* @__PURE__ */ Object.freeze({
1091
+ __proto__: null,
1092
+ resolve: Jt,
1093
+ readFile: Yt,
1094
+ readFileSync: Xt,
1095
+ exists: Zt,
1096
+ existsSync: Qt,
1097
+ dirname: $t,
1098
+ sep: "/"
1099
+ });
1100
+ function tn(e, t, ...n) {
1101
+ return e = f(e), m(e) || a(e) ? e.length ? e : t : e === !1 && new Map(n).get("allow_false") ? !1 : N(e, this.context) ? t : e;
1102
+ }
1103
+ function nn(e, t = 0) {
1104
+ return JSON.stringify(e, null, t);
1105
+ }
1106
+ function rn(e, t = 0) {
1107
+ let n = [];
1108
+ return JSON.stringify(e, function(e, t) {
1109
+ if (typeof t != "object" || !t) return t;
1110
+ for (; n.length > 0 && n[n.length - 1] !== this;) n.pop();
1111
+ return n.includes(t) ? "[Circular]" : (n.push(t), t);
1112
+ }, t);
1113
+ }
1114
+ function an(e) {
1115
+ return Number(e);
1116
+ }
1117
+ var on = {
1118
+ default: tn,
1119
+ raw: {
1120
+ raw: !0,
1121
+ handler: de
1122
+ },
1123
+ jsonify: nn,
1124
+ to_integer: an,
1125
+ json: nn,
1126
+ inspect: rn
1127
+ }, sn = {
1128
+ "&": "&amp;",
1129
+ "<": "&lt;",
1130
+ ">": "&gt;",
1131
+ "\"": "&#34;",
1132
+ "'": "&#39;"
1133
+ }, cn = {
1134
+ "&amp;": "&",
1135
+ "&lt;": "<",
1136
+ "&gt;": ">",
1137
+ "&#34;": "\"",
1138
+ "&#39;": "'"
1139
+ };
1140
+ function ln(e) {
1141
+ return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&|<|>|"|'/g, (e) => sn[e]);
1142
+ }
1143
+ function un(e) {
1144
+ return ln.call(this, e);
1145
+ }
1146
+ function dn(e) {
1147
+ return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&(amp|lt|gt|#34|#39);/g, (e) => cn[e]);
1148
+ }
1149
+ function fn(e) {
1150
+ return ln.call(this, dn.call(this, e));
1151
+ }
1152
+ function pn(e) {
1153
+ let t = l(e);
1154
+ return this.context.memoryLimit.use(t.length), t.replace(/\r?\n/gm, "<br />\n");
1155
+ }
1156
+ function mn(e) {
1157
+ let t = l(e);
1158
+ return this.context.memoryLimit.use(t.length), t.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g, "");
1159
+ }
1160
+ var hn = /* @__PURE__ */ Object.freeze({
1161
+ __proto__: null,
1162
+ escape: ln,
1163
+ xml_escape: un,
1164
+ escape_once: fn,
1165
+ newline_to_br: pn,
1166
+ strip_html: mn
1167
+ }), gn = class {
1168
+ constructor(e) {
1169
+ this.mapping = e, this.sep = "/";
1170
+ }
1171
+ exists(e) {
1172
+ return E(this, void 0, void 0, function* () {
1173
+ return this.existsSync(e);
1174
+ });
1175
+ }
1176
+ existsSync(e) {
1177
+ return !p(this.mapping[e]);
1178
+ }
1179
+ readFile(e) {
1180
+ return E(this, void 0, void 0, function* () {
1181
+ return this.readFileSync(e);
1182
+ });
1183
+ }
1184
+ readFileSync(e) {
1185
+ let t = this.mapping[e];
1186
+ if (p(t)) throw Error(`ENOENT: ${e}`);
1187
+ return t;
1188
+ }
1189
+ dirname(e) {
1190
+ let t = e.split(this.sep);
1191
+ return t.pop(), t.join(this.sep);
1192
+ }
1193
+ resolve(e, t, n) {
1194
+ if (t += n, e === ".") return t;
1195
+ let r = e.split(/\/+/);
1196
+ for (let e of t.split(this.sep)) if (e === "." || e === "") continue;
1197
+ else e === ".." ? (r.length > 1 || r[0] !== "") && r.pop() : r.push(e);
1198
+ return r.join(this.sep);
1199
+ }
1200
+ }, F = {
1201
+ root: ["."],
1202
+ layouts: ["."],
1203
+ partials: ["."],
1204
+ relativeReference: !0,
1205
+ jekyllInclude: !1,
1206
+ keyValueSeparator: ":",
1207
+ cache: void 0,
1208
+ extname: "",
1209
+ fs: en,
1210
+ dynamicPartials: !0,
1211
+ jsTruthy: !1,
1212
+ dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
1213
+ locale: "",
1214
+ trimTagRight: !1,
1215
+ trimTagLeft: !1,
1216
+ trimOutputRight: !1,
1217
+ trimOutputLeft: !1,
1218
+ greedy: !0,
1219
+ tagDelimiterLeft: "{%",
1220
+ tagDelimiterRight: "%}",
1221
+ outputDelimiterLeft: "{{",
1222
+ outputDelimiterRight: "}}",
1223
+ preserveTimezones: !1,
1224
+ strictFilters: !1,
1225
+ strictVariables: !1,
1226
+ ownPropertyOnly: !0,
1227
+ lenientIf: !1,
1228
+ globals: {},
1229
+ keepOutputType: !1,
1230
+ operators: Ht,
1231
+ memoryLimit: Infinity,
1232
+ parseLimit: Infinity,
1233
+ renderLimit: Infinity
1234
+ };
1235
+ function _n(e) {
1236
+ if (e.hasOwnProperty("root") && (e.hasOwnProperty("partials") || (e.partials = e.root), e.hasOwnProperty("layouts") || (e.layouts = e.root)), e.hasOwnProperty("cache")) {
1237
+ let t;
1238
+ t = typeof e.cache == "number" ? e.cache > 0 ? new Kt(e.cache) : void 0 : typeof e.cache == "object" ? e.cache : e.cache ? new Kt(1024) : void 0, e.cache = t;
1239
+ }
1240
+ return e = Object.assign(Object.assign(Object.assign({}, F), e.jekyllInclude ? { dynamicPartials: !1 } : {}), e), (!e.fs.dirname || !e.fs.sep) && e.relativeReference && (console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"), e.relativeReference = !1), e.root = I(e.root), e.partials = I(e.partials), e.layouts = I(e.layouts), e.outputEscape = e.outputEscape && vn(e.outputEscape), e.locale ||= it()?.().resolvedOptions().locale ?? "en-US", e.templates && (e.fs = new gn(e.templates), e.relativeReference = !0, e.root = e.partials = e.layouts = "."), e;
1241
+ }
1242
+ function vn(e) {
1243
+ return e === "escape" ? ln : e === "json" ? on.json : (C(o(e), "`outputEscape` need to be of type string or function"), e);
1244
+ }
1245
+ function I(e) {
1246
+ let t = [];
1247
+ return m(e) && (t = e), a(e) && (t = [e]), t;
1248
+ }
1249
+ function yn(e, t) {
1250
+ let n = !1;
1251
+ for (let r = 0; r < e.length; r++) {
1252
+ let i = e[r];
1253
+ Rn(i) && (!n && i.trimLeft && bn(e[r - 1], t.greedy), Y(i) && (i.name === "raw" ? n = !0 : i.name === "endraw" && (n = !1)), !n && i.trimRight && xn(e[r + 1], t.greedy));
1254
+ }
1255
+ }
1256
+ function bn(e, t) {
1257
+ if (!e || !Bn(e)) return;
1258
+ let n = t ? x : ke;
1259
+ for (; b[e.input.charCodeAt(e.end - 1 - e.trimRight)] & n;) e.trimRight++;
1260
+ }
1261
+ function xn(e, t) {
1262
+ if (!e || !Bn(e)) return;
1263
+ let n = t ? x : ke;
1264
+ for (; b[e.input.charCodeAt(e.begin + e.trimLeft)] & n;) e.trimLeft++;
1265
+ e.input.charAt(e.begin + e.trimLeft) === "\n" && e.trimLeft++;
1266
+ }
1267
+ var L = class {
1268
+ constructor(e, t = F.operators, n, r) {
1269
+ this.input = e, this.file = n, this.rawBeginAt = -1, this.p = r ? r[0] : 0, this.N = r ? r[1] : e.length, this.opTrie = Ue(t), this.literalTrie = Ue(He);
1270
+ }
1271
+ readExpression() {
1272
+ return new Lt(this.readExpressionTokens());
1273
+ }
1274
+ *readExpressionTokens() {
1275
+ for (; this.p < this.N;) {
1276
+ let e = this.readOperator();
1277
+ if (e) {
1278
+ yield e;
1279
+ continue;
1280
+ }
1281
+ let t = this.readValue();
1282
+ if (t) {
1283
+ yield t;
1284
+ continue;
1285
+ }
1286
+ return;
1287
+ }
1288
+ }
1289
+ readOperator() {
1290
+ this.skipBlank();
1291
+ let e = this.matchTrie(this.opTrie);
1292
+ if (e !== -1) return new xt(this.input, this.p, this.p = e, this.file);
1293
+ }
1294
+ matchTrie(e) {
1295
+ let t = e, n = this.p, r;
1296
+ for (; t[this.input[n]] && n < this.N;) t = t[this.input[n++]], t.end && (r = t);
1297
+ return !r || r.needBoundary && S(this.peek(n - this.p)) ? -1 : n;
1298
+ }
1299
+ readFilteredValue() {
1300
+ let e = this.p, t = this.readExpression();
1301
+ return this.assert(t.valid(), `invalid value expression: ${this.snapshot()}`), new Nt(t, this.readFilters(), this.input, e, this.p, this.file);
1302
+ }
1303
+ readFilters() {
1304
+ let e = [];
1305
+ for (;;) {
1306
+ let t = this.readFilter();
1307
+ if (!t) return e;
1308
+ e.push(t);
1309
+ }
1310
+ }
1311
+ readFilter() {
1312
+ if (this.skipBlank(), this.end()) return null;
1313
+ this.assert(this.read() === "|", "expected \"|\" before filter");
1314
+ let e = this.readIdentifier();
1315
+ if (!e.size()) return this.assert(this.end(), "expected filter name"), null;
1316
+ let t = [];
1317
+ if (this.skipBlank(), this.peek() === ":") do {
1318
+ ++this.p;
1319
+ let e = this.readFilterArg();
1320
+ e && t.push(e), this.skipBlank(), this.assert(this.end() || this.peek() === "," || this.peek() === "|", () => `unexpected character ${this.snapshot()}`);
1321
+ } while (this.peek() === ",");
1322
+ else if (!(this.peek() === "|" || this.end())) throw this.error("expected \":\" after filter name");
1323
+ return new Ct(e.getText(), t, this.input, e.begin, this.p, this.file);
1324
+ }
1325
+ readFilterArg() {
1326
+ let e = this.readValue();
1327
+ if (!e) return;
1328
+ if (this.skipBlank(), this.peek() !== ":") return e;
1329
+ ++this.p;
1330
+ let t = this.readValue();
1331
+ return [e.getText(), t];
1332
+ }
1333
+ readTopLevelTokens(e = F) {
1334
+ let t = [];
1335
+ for (; this.p < this.N;) {
1336
+ let n = this.readTopLevelToken(e);
1337
+ t.push(n);
1338
+ }
1339
+ return yn(t, e), t;
1340
+ }
1341
+ readTopLevelToken(e) {
1342
+ let { tagDelimiterLeft: t, outputDelimiterLeft: n } = e;
1343
+ return this.rawBeginAt > -1 ? this.readEndrawOrRawContent(e) : this.match(t) ? this.readTagToken(e) : this.match(n) ? this.readOutputToken(e) : this.readHTMLToken([t, n]);
1344
+ }
1345
+ readHTMLToken(e) {
1346
+ let t = this.p;
1347
+ for (; this.p < this.N && !e.some((e) => this.match(e));) ++this.p;
1348
+ return new ht(this.input, t, this.p, this.file);
1349
+ }
1350
+ readTagToken(e) {
1351
+ let { file: t, input: n } = this, r = this.p;
1352
+ if (this.readToDelimiter(e.tagDelimiterRight) === -1) throw this.error(`tag ${this.snapshot(r)} not closed`, r);
1353
+ let i = new pt(n, r, this.p, e, t);
1354
+ return i.name === "raw" && (this.rawBeginAt = r), i;
1355
+ }
1356
+ readToDelimiter(e, t = !1) {
1357
+ for (this.skipBlank(); this.p < this.N;) {
1358
+ if (t && this.peekType() & Oe) {
1359
+ this.readQuoted();
1360
+ continue;
1361
+ }
1362
+ if (++this.p, this.rmatch(e)) return this.p;
1363
+ }
1364
+ return -1;
1365
+ }
1366
+ readOutputToken(e = F) {
1367
+ let { file: t, input: n } = this, { outputDelimiterRight: r } = e, i = this.p;
1368
+ if (this.readToDelimiter(r, !0) === -1) throw this.error(`output ${this.snapshot(i)} not closed`, i);
1369
+ return new mt(n, i, this.p, e, t);
1370
+ }
1371
+ readEndrawOrRawContent(e) {
1372
+ let { tagDelimiterLeft: t, tagDelimiterRight: n } = e, r = this.p, i = this.readTo(t) - t.length;
1373
+ for (; this.p < this.N;) {
1374
+ if (this.readIdentifier().getText() !== "endraw") {
1375
+ i = this.readTo(t) - t.length;
1376
+ continue;
1377
+ }
1378
+ for (; this.p <= this.N;) {
1379
+ if (this.rmatch(n)) {
1380
+ let t = this.p;
1381
+ return r === i ? (this.rawBeginAt = -1, new pt(this.input, r, t, e, this.file)) : (this.p = i, new ht(this.input, r, i, this.file));
1382
+ }
1383
+ if (this.rmatch(t)) break;
1384
+ this.p++;
1385
+ }
1386
+ }
1387
+ throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, r);
1388
+ }
1389
+ readLiquidTagTokens(e = F) {
1390
+ let t = [];
1391
+ for (; this.p < this.N;) {
1392
+ let n = this.readLiquidTagToken(e);
1393
+ n && t.push(n);
1394
+ }
1395
+ return t;
1396
+ }
1397
+ readLiquidTagToken(e) {
1398
+ if (this.skipBlank(), this.end()) return;
1399
+ let t = this.p;
1400
+ this.readToDelimiter("\n");
1401
+ let n = this.p;
1402
+ return new Mt(this.input, t, n, e, this.file);
1403
+ }
1404
+ error(e, t = this.p) {
1405
+ return new ve(e, new _t(this.input, t, this.N, this.file));
1406
+ }
1407
+ assert(e, t, n) {
1408
+ if (!e) throw this.error(typeof t == "function" ? t() : t, n);
1409
+ }
1410
+ snapshot(e = this.p) {
1411
+ return JSON.stringify(pe(this.input.slice(e, this.N), 32));
1412
+ }
1413
+ readWord() {
1414
+ return this.readIdentifier();
1415
+ }
1416
+ readIdentifier() {
1417
+ this.skipBlank();
1418
+ let e = this.p;
1419
+ for (; !this.end() && S(this.peek());) ++this.p;
1420
+ return new _t(this.input, e, this.p, this.file);
1421
+ }
1422
+ readNonEmptyIdentifier() {
1423
+ let e = this.readIdentifier();
1424
+ return e.size() ? e : void 0;
1425
+ }
1426
+ readTagName() {
1427
+ return this.skipBlank(), this.input[this.p] === "#" ? this.input.slice(this.p, ++this.p) : this.readIdentifier().getText();
1428
+ }
1429
+ readHashes(e) {
1430
+ let t = [];
1431
+ for (;;) {
1432
+ let n = this.readHash(e);
1433
+ if (!n) return t;
1434
+ t.push(n);
1435
+ }
1436
+ }
1437
+ readHash(e) {
1438
+ this.skipBlank(), this.peek() === "," && ++this.p;
1439
+ let t = this.p, n = this.readNonEmptyIdentifier();
1440
+ if (!n) return;
1441
+ let r;
1442
+ this.skipBlank();
1443
+ let i = a(e) ? e : e ? "=" : ":";
1444
+ return this.peek() === i && (++this.p, r = this.readValue()), new wt(this.input, t, this.p, n, r, this.file);
1445
+ }
1446
+ remaining() {
1447
+ return this.input.slice(this.p, this.N);
1448
+ }
1449
+ advance(e = 1) {
1450
+ this.p += e;
1451
+ }
1452
+ end() {
1453
+ return this.p >= this.N;
1454
+ }
1455
+ read() {
1456
+ return this.input[this.p++];
1457
+ }
1458
+ readTo(e) {
1459
+ for (; this.p < this.N;) if (++this.p, this.rmatch(e)) return this.p;
1460
+ return -1;
1461
+ }
1462
+ readValue() {
1463
+ this.skipBlank();
1464
+ let e = this.p, t = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber(), n = this.readProperties(!t);
1465
+ return n.length ? new St(t, n, this.input, e, this.p) : t;
1466
+ }
1467
+ readScopeValue() {
1468
+ this.skipBlank();
1469
+ let e = this.p, t = this.readProperties();
1470
+ if (t.length) return new St(void 0, t, this.input, e, this.p);
1471
+ }
1472
+ readProperties(e = !0) {
1473
+ let t = [];
1474
+ for (;;) {
1475
+ if (this.peek() === "[") {
1476
+ this.p++;
1477
+ let e = this.readValue() || new _t(this.input, this.p, this.p, this.file);
1478
+ this.assert(this.readTo("]") !== -1, "[ not closed"), t.push(e);
1479
+ continue;
1480
+ }
1481
+ if (e && !t.length) {
1482
+ let e = this.readNonEmptyIdentifier();
1483
+ if (e) {
1484
+ t.push(e);
1485
+ continue;
1486
+ }
1487
+ }
1488
+ if (this.peek() === "." && this.peek(1) !== ".") {
1489
+ this.p++;
1490
+ let e = this.readNonEmptyIdentifier();
1491
+ if (!e) break;
1492
+ t.push(e);
1493
+ continue;
1494
+ }
1495
+ break;
1496
+ }
1497
+ return t;
1498
+ }
1499
+ readNumber() {
1500
+ this.skipBlank();
1501
+ let e = !1, t = !1, n = 0;
1502
+ for (this.peekType() & je && n++; this.p + n <= this.N;) if (this.peekType(n) & Ae) t = !0, n++;
1503
+ else if (this.peek(n) === "." && this.peek(n + 1) !== ".") {
1504
+ if (e || !t) return;
1505
+ e = !0, n++;
1506
+ } else break;
1507
+ if (t && !S(this.peek(n))) {
1508
+ let e = new gt(this.input, this.p, this.p + n, this.file);
1509
+ return this.advance(n), e;
1510
+ }
1511
+ }
1512
+ readLiteral() {
1513
+ this.skipBlank();
1514
+ let e = this.matchTrie(this.literalTrie);
1515
+ if (e === -1) return;
1516
+ let t = new vt(this.input, this.p, e, this.file);
1517
+ return this.p = e, t;
1518
+ }
1519
+ readRange() {
1520
+ this.skipBlank();
1521
+ let e = this.p;
1522
+ if (this.peek() !== "(") return;
1523
+ ++this.p;
1524
+ let t = this.readValueOrThrow();
1525
+ this.skipBlank(), this.assert(this.read() === "." && this.read() === ".", "invalid range syntax");
1526
+ let n = this.readValueOrThrow();
1527
+ return this.skipBlank(), this.assert(this.read() === ")", "invalid range syntax"), new jt(this.input, e, this.p, t, n, this.file);
1528
+ }
1529
+ readValueOrThrow() {
1530
+ let e = this.readValue();
1531
+ return this.assert(e, () => `unexpected token ${this.snapshot()}, value expected`), e;
1532
+ }
1533
+ readQuoted() {
1534
+ this.skipBlank();
1535
+ let e = this.p;
1536
+ if (!(this.peekType() & Oe)) return;
1537
+ ++this.p;
1538
+ let t = !1;
1539
+ for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !t));) t ? t = !1 : this.input[this.p - 1] === "\\" && (t = !0);
1540
+ return new At(this.input, e, this.p, this.file);
1541
+ }
1542
+ *readFileNameTemplate(e) {
1543
+ let { outputDelimiterLeft: t } = e, n = [
1544
+ ",",
1545
+ " ",
1546
+ "\r",
1547
+ "\n",
1548
+ " ",
1549
+ t
1550
+ ], r = new Set(n);
1551
+ for (; this.p < this.N && !r.has(this.peek());) yield this.match(t) ? this.readOutputToken(e) : this.readHTMLToken(n);
1552
+ }
1553
+ match(e) {
1554
+ for (let t = 0; t < e.length; t++) if (e[t] !== this.input[this.p + t]) return !1;
1555
+ return !0;
1556
+ }
1557
+ rmatch(e) {
1558
+ for (let t = 0; t < e.length; t++) if (e[e.length - 1 - t] !== this.input[this.p - 1 - t]) return !1;
1559
+ return !0;
1560
+ }
1561
+ peekType(e = 0) {
1562
+ return this.p + e >= this.N ? 0 : b[this.input.charCodeAt(this.p + e)];
1563
+ }
1564
+ peek(e = 0) {
1565
+ return this.p + e >= this.N ? "" : this.input[this.p + e];
1566
+ }
1567
+ skipBlank() {
1568
+ for (; this.peekType() & x;) ++this.p;
1569
+ }
1570
+ }, Sn = class {
1571
+ constructor(e, t) {
1572
+ this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = t;
1573
+ }
1574
+ on(e, t) {
1575
+ return this.handlers[e] = t, this;
1576
+ }
1577
+ trigger(e, t) {
1578
+ let n = this.handlers[e];
1579
+ return n ? (n.call(this, t), !0) : !1;
1580
+ }
1581
+ start() {
1582
+ this.trigger("start");
1583
+ let e;
1584
+ for (; !this.stopRequested && (e = this.tokens.shift());) {
1585
+ if (this.trigger("token", e) || Y(e) && this.trigger(`tag:${e.name}`, e)) continue;
1586
+ let t = this.parseToken(e, this.tokens);
1587
+ this.trigger("template", t);
1588
+ }
1589
+ return this.stopRequested || this.trigger("end"), this;
1590
+ }
1591
+ stop() {
1592
+ return this.stopRequested = !0, this;
1593
+ }
1594
+ }, Cn = class {
1595
+ constructor(e) {
1596
+ this.token = e;
1597
+ }
1598
+ }, R = class extends Cn {
1599
+ constructor(e, t, n) {
1600
+ super(e), this.name = e.name, this.liquid = n, this.tokenizer = e.tokenizer;
1601
+ }
1602
+ }, z = class {
1603
+ constructor(e, t) {
1604
+ this.hash = {};
1605
+ let n = e instanceof L ? e : new L(e, {});
1606
+ for (let e of n.readHashes(t)) this.hash[e.name.content] = e.value;
1607
+ }
1608
+ *render(e) {
1609
+ let t = {};
1610
+ for (let n of Object.keys(this.hash)) t[n] = this.hash[n] === void 0 ? !0 : yield j(this.hash[n], e);
1611
+ return t;
1612
+ }
1613
+ };
1614
+ function wn(e) {
1615
+ return class extends R {
1616
+ constructor(t, n, r) {
1617
+ super(t, n, r), o(e.parse) && e.parse.call(this, t, n);
1618
+ }
1619
+ *render(t, n) {
1620
+ let r = yield new z(this.token.args, t.opts.keyValueSeparator).render(t);
1621
+ return yield e.render.call(this, t, n, r);
1622
+ }
1623
+ };
1624
+ }
1625
+ function Tn(e) {
1626
+ return m(e);
1627
+ }
1628
+ var En = class {
1629
+ constructor(e, t, n) {
1630
+ this.token = e, this.name = e.name, this.handler = o(t) ? t : o(t?.handler) ? t.handler : de, this.raw = !o(t) && !!t?.raw, this.args = e.args, this.liquid = n;
1631
+ }
1632
+ *render(e, t) {
1633
+ let n = [];
1634
+ for (let e of this.args) Tn(e) ? n.push([e[0], yield j(e[1], t)]) : n.push(yield j(e, t));
1635
+ return yield this.handler.apply({
1636
+ context: t,
1637
+ token: this.token,
1638
+ liquid: this.liquid
1639
+ }, [e, ...n]);
1640
+ }
1641
+ }, B = class {
1642
+ constructor(e, t) {
1643
+ this.filters = [];
1644
+ let n = typeof e == "string" ? new L(e, t.options.operators).readFilteredValue() : e;
1645
+ this.initial = n.initial, this.filters = n.filters.map((e) => new En(e, this.getFilter(t, e.name), t));
1646
+ }
1647
+ *value(e, t) {
1648
+ t ||= e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
1649
+ let n = yield this.initial.evaluate(e, t);
1650
+ for (let t of this.filters) n = yield t.render(n, e);
1651
+ return n;
1652
+ }
1653
+ getFilter(e, t) {
1654
+ let n = e.filters[t];
1655
+ return C(n || !e.options.strictFilters, () => `undefined filter: ${t}`), n;
1656
+ }
1657
+ }, Dn = class extends Cn {
1658
+ constructor(e, t) {
1659
+ super(e);
1660
+ let n = new L(e.input, t.options.operators, e.file, e.contentRange);
1661
+ this.value = new B(n.readFilteredValue(), t);
1662
+ let r = this.value.filters, i = t.options.outputEscape;
1663
+ if (!r[r.length - 1]?.raw && i) {
1664
+ let e = new Ct(toString.call(i), [], "", 0, 0);
1665
+ r.push(new En(e, i, t));
1666
+ }
1667
+ }
1668
+ *render(e, t) {
1669
+ let n = yield this.value.value(e, !1);
1670
+ t.write(n);
1671
+ }
1672
+ *arguments() {
1673
+ yield this.value;
1674
+ }
1675
+ }, On = class extends Cn {
1676
+ constructor(e) {
1677
+ super(e), this.str = e.getContent();
1678
+ }
1679
+ *render(e, t) {
1680
+ t.write(this.str);
1681
+ }
1682
+ }, V = class e {
1683
+ constructor(e, t) {
1684
+ this.segments = e, this.location = t;
1685
+ }
1686
+ toString() {
1687
+ return G(this.segments, !0);
1688
+ }
1689
+ toArray() {
1690
+ function* t(...n) {
1691
+ for (let r of n) r instanceof e ? yield Array.from(t(...r.segments)) : yield r;
1692
+ }
1693
+ return Array.from(t(...this.segments));
1694
+ }
1695
+ }, kn = class {
1696
+ constructor() {
1697
+ this.map = /* @__PURE__ */ new Map();
1698
+ }
1699
+ get(e) {
1700
+ let t = G([e.segments[0]]);
1701
+ return this.map.has(t) || this.map.set(t, []), this.map.get(t);
1702
+ }
1703
+ has(e) {
1704
+ return this.map.has(G([e.segments[0]]));
1705
+ }
1706
+ push(e) {
1707
+ this.get(e).push(e);
1708
+ }
1709
+ asObject() {
1710
+ return Object.fromEntries(this.map);
1711
+ }
1712
+ }, An = { partials: !0 };
1713
+ function* jn(e, t, n) {
1714
+ let r = new kn(), i = new kn(), o = new kn(), s = new Mn(/* @__PURE__ */ new Set()), c = /* @__PURE__ */ new Set();
1715
+ function l(e, t) {
1716
+ r.push(e);
1717
+ let n = t.alias(e);
1718
+ if (n !== void 0) {
1719
+ let e = n.segments[0];
1720
+ a(e) && !s.has(e) && i.push(n);
1721
+ } else {
1722
+ let n = e.segments[0];
1723
+ a(n) && !t.has(n) && i.push(e);
1724
+ }
1725
+ for (let n of e.segments) n instanceof V && l(n, t);
1726
+ }
1727
+ function* u(e, r) {
1728
+ if (e.arguments) for (let t of e.arguments()) for (let e of Nn(t)) l(e, r);
1729
+ if (e.localScope) for (let t of e.localScope()) {
1730
+ r.add(t.content), r.deleteAlias(t.content);
1731
+ let [e, n] = t.getPosition();
1732
+ o.push(new V([t.content], {
1733
+ row: e,
1734
+ col: n,
1735
+ file: t.file
1736
+ }));
1737
+ }
1738
+ if (e.children) if (e.partialScope) {
1739
+ let i = e.partialScope();
1740
+ if (i === void 0) {
1741
+ for (let i of yield e.children(t, n)) yield u(i, r);
1742
+ return;
1743
+ }
1744
+ if (c.has(i.name)) return;
1745
+ let o = /* @__PURE__ */ new Set(), s = i.isolated ? new Mn(o) : r.push(o);
1746
+ for (let e of i.scope) if (a(e)) o.add(e);
1747
+ else {
1748
+ let [t, n] = e;
1749
+ o.add(t);
1750
+ let r = Array.from(Nn(n));
1751
+ r.length && s.setAlias(t, r[0].segments);
1752
+ }
1753
+ for (let r of yield e.children(t, n)) yield u(r, s), c.add(i.name);
1754
+ s.pop();
1755
+ } else {
1756
+ e.blockScope && r.push(new Set(e.blockScope()));
1757
+ for (let i of yield e.children(t, n)) yield u(i, r);
1758
+ e.blockScope && r.pop();
1759
+ }
1760
+ }
1761
+ for (let t of e) yield u(t, s);
1762
+ return {
1763
+ variables: r.asObject(),
1764
+ globals: i.asObject(),
1765
+ locals: o.asObject()
1766
+ };
1767
+ }
1768
+ function H(e, t = {}) {
1769
+ return D(jn(e, Object.assign(Object.assign({}, An), t).partials, !1));
1770
+ }
1771
+ function U(e, t = {}) {
1772
+ return O(jn(e, Object.assign(Object.assign({}, An), t).partials, !0));
1773
+ }
1774
+ var Mn = class {
1775
+ constructor(e) {
1776
+ this.stack = [{
1777
+ names: e,
1778
+ aliases: /* @__PURE__ */ new Map()
1779
+ }];
1780
+ }
1781
+ has(e) {
1782
+ for (let t of this.stack) if (t.names.has(e)) return !0;
1783
+ return !1;
1784
+ }
1785
+ push(e) {
1786
+ return this.stack.push({
1787
+ names: e,
1788
+ aliases: /* @__PURE__ */ new Map()
1789
+ }), this;
1790
+ }
1791
+ pop() {
1792
+ return this.stack.pop()?.names;
1793
+ }
1794
+ add(e) {
1795
+ this.stack[0].names.add(e);
1796
+ }
1797
+ alias(e) {
1798
+ let t = e.segments[0];
1799
+ if (!a(t)) return;
1800
+ let n = this.getAlias(t);
1801
+ if (n !== void 0) return new V([...n, ...e.segments.slice(1)], e.location);
1802
+ }
1803
+ setAlias(e, t) {
1804
+ this.stack[this.stack.length - 1].aliases.set(e, t);
1805
+ }
1806
+ deleteAlias(e) {
1807
+ this.stack[this.stack.length - 1].aliases.delete(e);
1808
+ }
1809
+ getAlias(e) {
1810
+ for (let t of this.stack) {
1811
+ if (t.aliases.has(e)) return t.aliases.get(e);
1812
+ if (t.names.has(e)) return;
1813
+ }
1814
+ }
1815
+ };
1816
+ function* Nn(e) {
1817
+ X(e) ? yield* W(e) : e instanceof B && (yield* Pn(e));
1818
+ }
1819
+ function* Pn(e) {
1820
+ for (let t of e.initial.postfix) X(t) && (yield* W(t));
1821
+ for (let t of e.filters) for (let e of t.args) Tn(e) && e[1] ? yield* W(e[1]) : X(e) && (yield* W(e));
1822
+ }
1823
+ function* W(e) {
1824
+ Kn(e) ? (yield* W(e.lhs), yield* W(e.rhs)) : Wn(e) && (yield Fn(e));
1825
+ }
1826
+ function Fn(e) {
1827
+ let t = [], n = e.file, r = e.props[0];
1828
+ n ||= r.file, Hn(r) || Un(r) || Gn(r) ? t.push(r.content) : Wn(r) && t.push(...Fn(r).segments);
1829
+ for (let r of e.props.slice(1)) n ||= r.file, Hn(r) || Un(r) || Gn(r) ? t.push(r.content) : Wn(r) && t.push(Fn(r));
1830
+ let [i, a] = e.getPosition();
1831
+ return new V(t, {
1832
+ row: i,
1833
+ col: a,
1834
+ file: n
1835
+ });
1836
+ }
1837
+ var In = /^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;
1838
+ function G(e, t = !1) {
1839
+ let n = [], r = e[0];
1840
+ a(r) && (!t || r.match(In) ? n.push(`${r}`) : n.push(`['${r}']`));
1841
+ for (let t of e.slice(1)) t instanceof V ? n.push(`[${G(t.segments)}]`) : a(t) ? t.match(In) ? n.push(`.${t}`) : n.push(`['${t}']`) : n.push(`[${t}]`);
1842
+ return n.join("");
1843
+ }
1844
+ var K;
1845
+ (function(e) {
1846
+ e.Partials = "partials", e.Layouts = "layouts", e.Root = "root";
1847
+ })(K ||= {});
1848
+ var Ln = class {
1849
+ constructor(e) {
1850
+ if (this.options = e, e.relativeReference) {
1851
+ let t = e.fs.sep;
1852
+ C(t, "`fs.sep` is required for relative reference");
1853
+ let n = [
1854
+ "." + t,
1855
+ ".." + t,
1856
+ "./",
1857
+ "../"
1858
+ ];
1859
+ this.shouldLoadRelative = (e) => n.some((t) => e.startsWith(t));
1860
+ } else this.shouldLoadRelative = (e) => !1;
1861
+ let t = e.fs;
1862
+ this.contains = Ge(t.contains?.bind(t) || (() => E(this, void 0, void 0, function* () {
1863
+ return !0;
1864
+ })), t.containsSync?.bind(t) || (() => !0)), this.exists = Ge(t.exists?.bind(t) || (() => E(this, void 0, void 0, function* () {
1865
+ return !1;
1866
+ })), t.existsSync?.bind(t));
1867
+ }
1868
+ *lookup(e, t, n, r) {
1869
+ let i = this.options[t];
1870
+ for (let t of this.candidates(e, i, r)) {
1871
+ let e = !1;
1872
+ for (let r of i) if (yield this.contains(!!n, r, t)) {
1873
+ e = !0;
1874
+ break;
1875
+ }
1876
+ if (e && (yield this.exists(!!n, t))) return t;
1877
+ }
1878
+ throw this.lookupError(e, i);
1879
+ }
1880
+ *candidates(e, t, n) {
1881
+ let { fs: r, extname: i } = this.options;
1882
+ this.shouldLoadRelative(e) && n && (yield r.resolve(this.dirname(n), e, i));
1883
+ for (let n of t) yield r.resolve(n, e, i);
1884
+ if (r.fallback !== void 0) {
1885
+ let t = r.fallback(e);
1886
+ t !== void 0 && (yield t);
1887
+ }
1888
+ }
1889
+ dirname(e) {
1890
+ let t = this.options.fs;
1891
+ return C(t.dirname, "`fs.dirname` is required for relative reference"), t.dirname(e);
1892
+ }
1893
+ lookupError(e, t) {
1894
+ let n = /* @__PURE__ */ Error("ENOENT");
1895
+ return n.message = `ENOENT: Failed to lookup "${e}" in "${t}"`, n.code = "ENOENT", n;
1896
+ }
1897
+ }, q = class {
1898
+ constructor(e) {
1899
+ 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 Ln(this.liquid.options), this.parseLimit = new dt("parse length", e.options.parseLimit), this.readFile = Ge(this.fs.readFile?.bind(this.fs) || (() => E(this, void 0, void 0, function* () {
1900
+ throw Error("readFile not implemented");
1901
+ })), this.fs.readFileSync?.bind(this.fs));
1902
+ }
1903
+ parse(e, t) {
1904
+ e = String(e), this.parseLimit.use(e.length);
1905
+ let n = new L(e, this.liquid.options.operators, t).readTopLevelTokens(this.liquid.options);
1906
+ return this.parseTokens(n);
1907
+ }
1908
+ parseTokens(e) {
1909
+ let t, n = [], r = [];
1910
+ for (; t = e.shift();) try {
1911
+ n.push(this.parseToken(t, e));
1912
+ } catch (e) {
1913
+ if (this.liquid.options.catchAllErrors) r.push(e);
1914
+ else throw e;
1915
+ }
1916
+ if (r.length) throw new xe(r);
1917
+ return n;
1918
+ }
1919
+ parseToken(e, t) {
1920
+ try {
1921
+ if (Y(e)) {
1922
+ let n = this.liquid.tags[e.name];
1923
+ return C(n, `tag "${e.name}" not found`), new n(e, t, this.liquid, this);
1924
+ }
1925
+ return Vn(e) ? new Dn(e, this.liquid) : new On(e);
1926
+ } catch (t) {
1927
+ throw y.is(t) ? t : new ye(t, e);
1928
+ }
1929
+ }
1930
+ parseStream(e) {
1931
+ return new Sn(e, (e, t) => this.parseToken(e, t));
1932
+ }
1933
+ *_parseFileCached(e, t, n = K.Root, r) {
1934
+ let i = this.cache, a = this.loader.shouldLoadRelative(e) ? r + "," + e : n + ":" + e, o = yield i.read(a);
1935
+ if (o) return o;
1936
+ let s = this._parseFile(e, t, n, r), c = t ? yield s : D(s);
1937
+ i.write(a, c);
1938
+ try {
1939
+ return yield c;
1940
+ } catch (e) {
1941
+ throw i.remove(a), e;
1942
+ }
1943
+ }
1944
+ *_parseFile(e, t, n = K.Root, r) {
1945
+ let i = yield this.loader.lookup(e, n, t, r);
1946
+ return this.parse(yield this.readFile(!!t, i), i);
1947
+ }
1948
+ }, J;
1949
+ (function(e) {
1950
+ e[e.Number = 1] = "Number", e[e.Literal = 2] = "Literal", e[e.Tag = 4] = "Tag", e[e.Output = 8] = "Output", e[e.HTML = 16] = "HTML", e[e.Filter = 32] = "Filter", e[e.Hash = 64] = "Hash", e[e.PropertyAccess = 128] = "PropertyAccess", e[e.Word = 256] = "Word", e[e.Range = 512] = "Range", e[e.Quoted = 1024] = "Quoted", e[e.Operator = 2048] = "Operator", e[e.FilteredValue = 4096] = "FilteredValue", e[e.Delimited = 12] = "Delimited";
1951
+ })(J ||= {});
1952
+ function Rn(e) {
1953
+ return !!(Z(e) & J.Delimited);
1954
+ }
1955
+ function zn(e) {
1956
+ return Z(e) === J.Operator;
1957
+ }
1958
+ function Bn(e) {
1959
+ return Z(e) === J.HTML;
1960
+ }
1961
+ function Vn(e) {
1962
+ return Z(e) === J.Output;
1963
+ }
1964
+ function Y(e) {
1965
+ return Z(e) === J.Tag;
1966
+ }
1967
+ function Hn(e) {
1968
+ return Z(e) === J.Quoted;
1969
+ }
1970
+ function Un(e) {
1971
+ return Z(e) === J.Number;
1972
+ }
1973
+ function Wn(e) {
1974
+ return Z(e) === J.PropertyAccess;
1975
+ }
1976
+ function Gn(e) {
1977
+ return Z(e) === J.Word;
1978
+ }
1979
+ function Kn(e) {
1980
+ return Z(e) === J.Range;
1981
+ }
1982
+ function X(e) {
1983
+ return (Z(e) & 1667) > 0;
1984
+ }
1985
+ function Z(e) {
1986
+ return e ? e.kind : -1;
1987
+ }
1988
+ var Q = class e {
1989
+ constructor(e = {}, t = F, n = {}, { memoryLimit: r, renderLimit: i } = {}) {
1990
+ this.scopes = [{}], this.registers = {}, this.breakCalled = !1, this.continueCalled = !1, this.sync = !!n.sync, this.opts = t, this.globals = n.globals ?? t.globals, this.environments = h(e) ? e : Object(e), this.strictVariables = n.strictVariables ?? this.opts.strictVariables, this.ownPropertyOnly = n.ownPropertyOnly ?? t.ownPropertyOnly, this.memoryLimit = r ?? new dt("memory alloc", n.memoryLimit ?? t.memoryLimit), this.renderLimit = i ?? new dt("template render", Ft().now() + (n.renderLimit ?? t.renderLimit));
1991
+ }
1992
+ getRegister(e, t = void 0) {
1993
+ return this.registers[e] = this.registers[e] || t;
1994
+ }
1995
+ setRegister(e, t) {
1996
+ return this.registers[e] = t;
1997
+ }
1998
+ saveRegister(...e) {
1999
+ return e.map((e) => [e, this.getRegister(e)]);
2000
+ }
2001
+ restoreRegister(e) {
2002
+ return e.forEach(([e, t]) => this.setRegister(e, t));
2003
+ }
2004
+ getAll() {
2005
+ return [
2006
+ this.globals,
2007
+ this.environments,
2008
+ ...this.scopes
2009
+ ].reduce((e, t) => We(e, t), {});
2010
+ }
2011
+ get(e) {
2012
+ return this.getSync(e);
2013
+ }
2014
+ getSync(e) {
2015
+ return O(this._get(e));
2016
+ }
2017
+ *_get(e) {
2018
+ let t = this.findScope(e[0]);
2019
+ return yield this._getFromScope(t, e);
2020
+ }
2021
+ getFromScope(e, t) {
2022
+ return O(this._getFromScope(e, t));
2023
+ }
2024
+ *_getFromScope(e, t, n = this.strictVariables) {
2025
+ a(t) && (t = t.split("."));
2026
+ for (let r = 0; r < t.length; r++) if (e = yield this.readProperty(e, t[r]), n && re(e)) throw new Ce(t.slice(0, r + 1).join("."));
2027
+ return e;
2028
+ }
2029
+ push(e) {
2030
+ return this.scopes.push(e);
2031
+ }
2032
+ pop() {
2033
+ return this.scopes.pop();
2034
+ }
2035
+ bottom() {
2036
+ return this.scopes[0];
2037
+ }
2038
+ spawn(t = {}) {
2039
+ return new e(t, this.opts, {
2040
+ sync: this.sync,
2041
+ globals: this.globals,
2042
+ strictVariables: this.strictVariables
2043
+ }, {
2044
+ renderLimit: this.renderLimit,
2045
+ memoryLimit: this.memoryLimit
2046
+ });
2047
+ }
2048
+ findScope(e) {
2049
+ for (let t = this.scopes.length - 1; t >= 0; t--) {
2050
+ let n = this.scopes[t];
2051
+ if (e in n) return n;
2052
+ }
2053
+ return e in this.environments ? this.environments : this.globals;
2054
+ }
2055
+ readProperty(e, n) {
2056
+ if (e = ne(e), n = f(n), p(e)) return e;
2057
+ if (m(e) && n < 0) return e[e.length + +n];
2058
+ let r = qn(e, n, this.ownPropertyOnly);
2059
+ return r === void 0 && e instanceof t ? e.liquidMethodMissing(n, this) : o(r) ? r.call(e) : n === "size" ? Xn(e) : n === "first" ? Jn(e) : n === "last" ? Yn(e) : r;
2060
+ }
2061
+ };
2062
+ function qn(e, n, r) {
2063
+ if (!(r && !i.call(e, n) && !(e instanceof t))) return e[n];
2064
+ }
2065
+ function Jn(e) {
2066
+ return m(e) ? e[0] : e.first;
2067
+ }
2068
+ function Yn(e) {
2069
+ return m(e) ? e[e.length - 1] : e.last;
2070
+ }
2071
+ function Xn(e) {
2072
+ if (i.call(e, "size") || e.size !== void 0) return e.size;
2073
+ if (m(e) || a(e)) return e.length;
2074
+ if (typeof e == "object") return Object.keys(e).length;
2075
+ }
2076
+ var $;
2077
+ (function(e) {
2078
+ e[e.OUTPUT = 0] = "OUTPUT", e[e.STORE = 1] = "STORE";
2079
+ })($ ||= {});
2080
+ var Zn = _(Math.abs), Qn = _(Math.max), $n = _(Math.min), er = _(Math.ceil), tr = _((e, t, n = !1) => n ? Math.floor(e / t) : e / t), nr = _(Math.floor), rr = _((e, t) => e - t), ir = _((e, t) => e + t), ar = _((e, t) => e % t), or = _((e, t) => e * t);
2081
+ function sr(e, t = 0) {
2082
+ e = ee(e), t = ee(t);
2083
+ let n = 10 ** t, r = e * n;
2084
+ return Math.sign(e) * Math.round(Math.abs(r)) / n;
2085
+ }
2086
+ var cr = /* @__PURE__ */ Object.freeze({
2087
+ __proto__: null,
2088
+ abs: Zn,
2089
+ at_least: Qn,
2090
+ at_most: $n,
2091
+ ceil: er,
2092
+ divided_by: tr,
2093
+ floor: nr,
2094
+ minus: rr,
2095
+ plus: ir,
2096
+ modulo: ar,
2097
+ times: or,
2098
+ round: sr
2099
+ }), lr = (e) => decodeURIComponent(l(e)).replace(/\+/g, " "), ur = (e) => encodeURIComponent(l(e)).replace(/%20/g, "+"), dr = (e) => encodeURIComponent(l(e)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), fr = (e) => encodeURI(l(e)).replace(/%5B/g, "[").replace(/%5D/g, "]"), pr = /[^\p{M}\p{L}\p{Nd}]+/gu, mr = {
2100
+ raw: /\s+/g,
2101
+ default: pr,
2102
+ pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/gu,
2103
+ ascii: /[^A-Za-z0-9]+/g,
2104
+ latin: pr,
2105
+ none: null
2106
+ };
2107
+ function hr(e, t = "default", n = !1) {
2108
+ e = l(e);
2109
+ let r = mr[t];
2110
+ return r && (t === "latin" && (e = gr(e)), e = e.replace(r, "-").replace(/^-|-$/g, "")), n ? e : e.toLowerCase();
2111
+ }
2112
+ function gr(e) {
2113
+ return e.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");
2114
+ }
2115
+ var _r = /* @__PURE__ */ Object.freeze({
2116
+ __proto__: null,
2117
+ url_decode: lr,
2118
+ url_encode: ur,
2119
+ cgi_escape: dr,
2120
+ uri_escape: fr,
2121
+ slugify: hr
2122
+ }), vr = ge(function(e, t) {
2123
+ let n = d(e), r = p(t) ? " " : l(t), i = n.length * (1 + r.length);
2124
+ return this.context.memoryLimit.use(i), n.join(r);
2125
+ }), yr = ge((e) => ie(e) ? se(e) : ""), br = ge((e) => ie(e) ? e[0] : ""), xr = ge(function(e) {
2126
+ let t = d(e);
2127
+ return this.context.memoryLimit.use(t.length), [...t].reverse();
2128
+ });
2129
+ function* Sr(e, t, n) {
2130
+ let r = [], i = d(e);
2131
+ this.context.memoryLimit.use(i.length);
2132
+ for (let e of i) r.push([e, t ? yield this.context._getFromScope(e, l(t).split("."), !1) : e]);
2133
+ return r.sort((e, t) => n(e[1], t[1])).map((e) => e[0]);
2134
+ }
2135
+ function* Cr(e, t) {
2136
+ return yield* Sr.call(this, e, t, me);
2137
+ }
2138
+ function* wr(e, t) {
2139
+ return yield* Sr.call(this, e, t, he);
2140
+ }
2141
+ var Tr = (e) => e && e.length || 0;
2142
+ function* Er(e, t) {
2143
+ let n = [], r = d(e);
2144
+ this.context.memoryLimit.use(r.length);
2145
+ for (let e of r) n.push(yield this.context._getFromScope(e, l(t), !1));
2146
+ return n;
2147
+ }
2148
+ function* Dr(e, t) {
2149
+ let n = 0, r = d(e);
2150
+ for (let e of r) {
2151
+ let r = Number(t ? yield this.context._getFromScope(e, l(t), !1) : e);
2152
+ n += Number.isNaN(r) ? 0 : r;
2153
+ }
2154
+ return n;
2155
+ }
2156
+ function Or(e) {
2157
+ let t = d(e);
2158
+ return this.context.memoryLimit.use(t.length), t.filter((e) => !p(f(e)));
2159
+ }
2160
+ function kr(e, t = []) {
2161
+ let n = d(e), r = d(t);
2162
+ return this.context.memoryLimit.use(n.length + r.length), n.concat(r);
2163
+ }
2164
+ function Ar(e, t) {
2165
+ return kr.call(this, e, [t]);
2166
+ }
2167
+ function jr(e, t) {
2168
+ let n = d(e);
2169
+ this.context.memoryLimit.use(n.length);
2170
+ let r = [...n];
2171
+ return r.unshift(t), r;
2172
+ }
2173
+ function Mr(e) {
2174
+ let t = [...d(e)];
2175
+ return t.pop(), t;
2176
+ }
2177
+ function Nr(e) {
2178
+ let t = d(e);
2179
+ this.context.memoryLimit.use(t.length);
2180
+ let n = [...t];
2181
+ return n.shift(), n;
2182
+ }
2183
+ function Pr(e, t, n = 1) {
2184
+ return e = f(e), p(e) ? [] : (m(e) || (e = l(e)), t = t < 0 ? e.length + t : t, this.context.memoryLimit.use(n), e.slice(t, t + n));
2185
+ }
2186
+ function Fr(e) {
2187
+ return this.context.opts.jekyllWhere ? (t) => Pe.is(e) ? P(t, e) : m(t) ? Wt(t, e) : P(t, e) : e === void 0 ? (e) => M(e, this.context) : (t) => P(t, e);
2188
+ }
2189
+ function* Ir(e, t, n, r) {
2190
+ let i = [];
2191
+ t = d(t), this.context.memoryLimit.use(t.length);
2192
+ let a = new L(l(n)).readScopeValue();
2193
+ for (let e of t) i.push(yield j(a, this.context.spawn(e)));
2194
+ let o = Fr.call(this, r);
2195
+ return t.filter((t, n) => o(i[n]) === e);
2196
+ }
2197
+ function* Lr(e, t, n, r) {
2198
+ let i = [], a = new B(l(r), this.liquid), o = d(t);
2199
+ this.context.memoryLimit.use(o.length);
2200
+ for (let t of o) {
2201
+ this.context.push({ [n]: t });
2202
+ let r = yield a.value(this.context);
2203
+ this.context.pop(), r === e && i.push(t);
2204
+ }
2205
+ return i;
2206
+ }
2207
+ function* Rr(e, t, n) {
2208
+ return yield* Ir.call(this, !0, e, t, n);
2209
+ }
2210
+ function* zr(e, t, n) {
2211
+ return yield* Ir.call(this, !1, e, t, n);
2212
+ }
2213
+ function* Br(e, t, n) {
2214
+ return yield* Lr.call(this, !0, e, t, n);
2215
+ }
2216
+ function* Vr(e, t, n) {
2217
+ return yield* Lr.call(this, !1, e, t, n);
2218
+ }
2219
+ function* Hr(e, t) {
2220
+ let n = /* @__PURE__ */ new Map();
2221
+ e = u(e);
2222
+ let r = new L(l(t)).readScopeValue();
2223
+ this.context.memoryLimit.use(e.length);
2224
+ for (let t of e) {
2225
+ let e = yield j(r, this.context.spawn(t));
2226
+ n.has(e) || n.set(e, []), n.get(e).push(t);
2227
+ }
2228
+ return [...n.entries()].map(([e, t]) => ({
2229
+ name: e,
2230
+ items: t
2231
+ }));
2232
+ }
2233
+ function* Ur(e, t, n) {
2234
+ let r = /* @__PURE__ */ new Map(), i = new B(l(n), this.liquid);
2235
+ e = u(e), this.context.memoryLimit.use(e.length);
2236
+ for (let n of e) {
2237
+ this.context.push({ [t]: n });
2238
+ let e = yield i.value(this.context);
2239
+ this.context.pop(), r.has(e) || r.set(e, []), r.get(e).push(n);
2240
+ }
2241
+ return [...r.entries()].map(([e, t]) => ({
2242
+ name: e,
2243
+ items: t
2244
+ }));
2245
+ }
2246
+ function* Wr(e, t, n) {
2247
+ let r = new L(l(t)).readScopeValue(), i = d(e), a = Fr.call(this, n);
2248
+ for (let e = 0; e < i.length; e++) if (a(yield j(r, this.context.spawn(i[e])))) return [e, i[e]];
2249
+ }
2250
+ function* Gr(e, t, n) {
2251
+ let r = new B(l(n), this.liquid), i = d(e);
2252
+ for (let e = 0; e < i.length; e++) {
2253
+ this.context.push({ [t]: i[e] });
2254
+ let n = yield r.value(this.context);
2255
+ if (this.context.pop(), n) return [e, i[e]];
2256
+ }
2257
+ }
2258
+ function* Kr(e, t, n) {
2259
+ return !!(yield* Wr.call(this, e, t, n));
2260
+ }
2261
+ function* qr(e, t, n) {
2262
+ return !!(yield* Gr.call(this, e, t, n));
2263
+ }
2264
+ function* Jr(e, t, n) {
2265
+ let r = yield* Wr.call(this, e, t, n);
2266
+ return r ? r[0] : void 0;
2267
+ }
2268
+ function* Yr(e, t, n) {
2269
+ let r = yield* Gr.call(this, e, t, n);
2270
+ return r ? r[0] : void 0;
2271
+ }
2272
+ function* Xr(e, t, n) {
2273
+ let r = yield* Wr.call(this, e, t, n);
2274
+ return r ? r[1] : void 0;
2275
+ }
2276
+ function* Zr(e, t, n) {
2277
+ let r = yield* Gr.call(this, e, t, n);
2278
+ return r ? r[1] : void 0;
2279
+ }
2280
+ function Qr(e) {
2281
+ return e = d(e), this.context.memoryLimit.use(e.length), [...new Set(e)];
2282
+ }
2283
+ function $r(e, t = 1) {
2284
+ if (e = f(e), p(e)) return [];
2285
+ m(e) || (e = l(e)), this.context.memoryLimit.use(t);
2286
+ let n = [...e].sort(() => Math.random() - .5);
2287
+ return t === 1 ? n[0] : n.slice(0, t);
2288
+ }
2289
+ var ei = /* @__PURE__ */ Object.freeze({
2290
+ __proto__: null,
2291
+ join: vr,
2292
+ last: yr,
2293
+ first: br,
2294
+ reverse: xr,
2295
+ sort: Cr,
2296
+ sort_natural: wr,
2297
+ size: Tr,
2298
+ map: Er,
2299
+ sum: Dr,
2300
+ compact: Or,
2301
+ concat: kr,
2302
+ push: Ar,
2303
+ unshift: jr,
2304
+ pop: Mr,
2305
+ shift: Nr,
2306
+ slice: Pr,
2307
+ where: Rr,
2308
+ reject: zr,
2309
+ where_exp: Br,
2310
+ reject_exp: Vr,
2311
+ group_by: Hr,
2312
+ group_by_exp: Ur,
2313
+ has: Kr,
2314
+ has_exp: qr,
2315
+ find_index: Jr,
2316
+ find_index_exp: Yr,
2317
+ find: Xr,
2318
+ find_exp: Zr,
2319
+ uniq: Qr,
2320
+ sample: $r
2321
+ });
2322
+ function ti(e, t, n) {
2323
+ let r = (e?.length ?? 0) + (t?.length ?? 0) + (n?.length ?? 0);
2324
+ this.context.memoryLimit.use(r);
2325
+ let i = si(e, this.context.opts, n);
2326
+ return i ? (t = f(t), t = p(t) ? this.context.opts.dateFormat : l(t), k(i, t)) : e;
2327
+ }
2328
+ function ni(e) {
2329
+ return ti.call(this, e, "%Y-%m-%dT%H:%M:%S%:z");
2330
+ }
2331
+ function ri(e) {
2332
+ return ti.call(this, e, "%a, %d %b %Y %H:%M:%S %z");
2333
+ }
2334
+ function ii(e, t, n) {
2335
+ return oi.call(this, e, "%b", t, n);
2336
+ }
2337
+ function ai(e, t, n) {
2338
+ return oi.call(this, e, "%B", t, n);
2339
+ }
2340
+ function oi(e, t, n, r) {
2341
+ let i = si(e, this.context.opts);
2342
+ if (!i) return e;
2343
+ if (n === "ordinal") {
2344
+ let e = i.getDate();
2345
+ return r === "US" ? k(i, `${t} ${e}%q, %Y`) : k(i, `${e}%q ${t} %Y`);
2346
+ }
2347
+ return k(i, `%d ${t} %Y`);
2348
+ }
2349
+ function si(e, t, n) {
2350
+ let r, i = n ?? t.timezoneOffset, o = t.locale;
2351
+ if (e = f(e), !p(e)) return r = e === "now" || e === "today" ? new A(Date.now(), o, i) : te(e) ? new A(e * 1e3, o, i) : a(e) ? /^\d+$/.test(e) ? new A(e * 1e3, o, i) : t.preserveTimezones && n === void 0 ? A.createDateFixedToTimezone(e, o) : new A(e, o, i) : new A(e, o, i), r.valid() ? r : void 0;
2352
+ }
2353
+ var ci = /* @__PURE__ */ Object.freeze({
2354
+ __proto__: null,
2355
+ date: ti,
2356
+ date_to_xmlschema: ni,
2357
+ date_to_rfc822: ri,
2358
+ date_to_string: ii,
2359
+ date_to_long_string: ai
2360
+ }), li = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, ui = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
2361
+ function di(e, t) {
2362
+ C(arguments.length === 2, "append expect 2 arguments");
2363
+ let n = l(e), r = l(t);
2364
+ return this.context.memoryLimit.use(n.length + r.length), n + r;
2365
+ }
2366
+ function fi(e, t) {
2367
+ C(arguments.length === 2, "prepend expect 2 arguments");
2368
+ let n = l(e), r = l(t);
2369
+ return this.context.memoryLimit.use(n.length + r.length), r + n;
2370
+ }
2371
+ function pi(e, t) {
2372
+ let n = l(e);
2373
+ if (this.context.memoryLimit.use(n.length), t) {
2374
+ t = l(t), this.context.memoryLimit.use(t.length);
2375
+ for (let e = 0, r = new Set(t); e < n.length; e++) if (!r.has(n[e])) return n.slice(e);
2376
+ return "";
2377
+ }
2378
+ return n.trimStart();
2379
+ }
2380
+ function mi(e) {
2381
+ let t = l(e);
2382
+ return this.context.memoryLimit.use(t.length), t.toLowerCase();
2383
+ }
2384
+ function hi(e) {
2385
+ let t = l(e);
2386
+ return this.context.memoryLimit.use(t.length), l(t).toUpperCase();
2387
+ }
2388
+ function gi(e, t) {
2389
+ let n = l(e);
2390
+ return t = l(t), this.context.memoryLimit.use(n.length + t.length), n.split(t).join("");
2391
+ }
2392
+ function _i(e, t) {
2393
+ let n = l(e);
2394
+ return t = l(t), this.context.memoryLimit.use(n.length + t.length), n.replace(t, "");
2395
+ }
2396
+ function vi(e, t) {
2397
+ let n = l(e), r = l(t);
2398
+ this.context.memoryLimit.use(n.length + r.length);
2399
+ let i = n.lastIndexOf(r);
2400
+ return i === -1 ? n : n.substring(0, i) + n.substring(i + r.length);
2401
+ }
2402
+ function yi(e, t) {
2403
+ if (e = l(e), this.context.memoryLimit.use(e.length), t) {
2404
+ t = l(t), this.context.memoryLimit.use(t.length);
2405
+ for (let n = e.length - 1, r = new Set(t); n >= 0; n--) if (!r.has(e[n])) return e.slice(0, n + 1);
2406
+ return "";
2407
+ }
2408
+ return e.trimEnd();
2409
+ }
2410
+ function bi(e, t) {
2411
+ let n = l(e);
2412
+ this.context.memoryLimit.use(n.length);
2413
+ let r = n.split(l(t));
2414
+ for (; r.length && r[r.length - 1] === "";) r.pop();
2415
+ return r;
2416
+ }
2417
+ function xi(e, t) {
2418
+ let n = l(e);
2419
+ if (this.context.memoryLimit.use(n.length), t) {
2420
+ let e = new Set(l(t));
2421
+ this.context.memoryLimit.use(e.size);
2422
+ let r = 0, i = n.length - 1;
2423
+ for (; e.has(n[r]);) r++;
2424
+ for (; i >= r && e.has(n[i]);) i--;
2425
+ return n.slice(r, i + 1);
2426
+ }
2427
+ return n.trim();
2428
+ }
2429
+ function Si(e) {
2430
+ let t = l(e);
2431
+ return this.context.memoryLimit.use(t.length), t.replace(/\r?\n/gm, "");
2432
+ }
2433
+ function Ci(e) {
2434
+ return e = l(e), this.context.memoryLimit.use(e.length), e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
2435
+ }
2436
+ function wi(e, t, n) {
2437
+ let r = l(e);
2438
+ t = l(t), n = l(n);
2439
+ let i = r.split(t), a = r.length + (i.length - 1) * (n.length - t.length);
2440
+ return this.context.memoryLimit.use(a), i.join(n);
2441
+ }
2442
+ function Ti(e, t, n) {
2443
+ let r = l(e);
2444
+ return t = l(t), n = l(n), this.context.memoryLimit.use(r.length + t.length + n.length), r.replace(t, () => n);
2445
+ }
2446
+ function Ei(e, t, n) {
2447
+ let r = l(e), i = l(t), a = l(n);
2448
+ this.context.memoryLimit.use(r.length + i.length + a.length);
2449
+ let o = r.lastIndexOf(i);
2450
+ return o === -1 ? r : r.substring(0, o) + a + r.substring(o + i.length);
2451
+ }
2452
+ function Di(e, t = 50, n = "...") {
2453
+ let r = l(e);
2454
+ return n = l(n), this.context.memoryLimit.use(r.length + n.length), r.length <= t ? e : r.substring(0, t - n.length) + n;
2455
+ }
2456
+ function Oi(e, t = 15, n = "...") {
2457
+ let r = l(e);
2458
+ n = l(n), this.context.memoryLimit.use(r.length + n.length);
2459
+ let i = r.split(/\s+/);
2460
+ t <= 0 && (t = 1);
2461
+ let a = i.slice(0, t).join(" ");
2462
+ return i.length >= t && (a += n), a;
2463
+ }
2464
+ function ki(e) {
2465
+ let t = l(e);
2466
+ return this.context.memoryLimit.use(t.length), t.replace(/\s+/g, " ");
2467
+ }
2468
+ function Ai(e, t) {
2469
+ let n = l(e);
2470
+ if (this.context.memoryLimit.use(n.length), e = n.trim(), !e) return 0;
2471
+ switch (t) {
2472
+ case "cjk": return (e.match(li) || []).length + (e.match(ui) || []).length;
2473
+ case "auto": return li.test(e) ? e.match(li).length + (e.match(ui) || []).length : e.split(/\s+/).length;
2474
+ default: return e.split(/\s+/).length;
2475
+ }
2476
+ }
2477
+ function ji(e, t = "and") {
2478
+ switch (t = l(t), this.context.memoryLimit.use(e.length + t.length), e.length) {
2479
+ case 0: return "";
2480
+ case 1: return e[0];
2481
+ case 2: return `${e[0]} ${t} ${e[1]}`;
2482
+ default: return `${e.slice(0, -1).join(", ")}, ${t} ${e[e.length - 1]}`;
2483
+ }
2484
+ }
2485
+ var Mi = /* @__PURE__ */ Object.freeze({
2486
+ __proto__: null,
2487
+ append: di,
2488
+ prepend: fi,
2489
+ lstrip: pi,
2490
+ downcase: mi,
2491
+ upcase: hi,
2492
+ remove: gi,
2493
+ remove_first: _i,
2494
+ remove_last: vi,
2495
+ rstrip: yi,
2496
+ split: bi,
2497
+ strip: xi,
2498
+ strip_newlines: Si,
2499
+ capitalize: Ci,
2500
+ replace: wi,
2501
+ replace_first: Ti,
2502
+ replace_last: Ei,
2503
+ truncate: Di,
2504
+ truncatewords: Oi,
2505
+ normalize_whitespace: ki,
2506
+ number_of_words: Ai,
2507
+ array_to_sentence_string: ji
2508
+ });
2509
+ function Ni(e) {
2510
+ return btoa(String.fromCharCode(...new TextEncoder().encode(e)));
2511
+ }
2512
+ function Pi(e) {
2513
+ return new TextDecoder().decode(Uint8Array.from(atob(e), (e) => e.charCodeAt(0)));
2514
+ }
2515
+ function Fi(e) {
2516
+ if (typeof Buffer < "u" && Buffer.isBuffer(e)) return this.context.memoryLimit.use(e.byteLength), e.toString("base64");
2517
+ let t = l(e);
2518
+ return this.context.memoryLimit.use(t.length), Ni(t);
2519
+ }
2520
+ function Ii(e) {
2521
+ let t = l(e);
2522
+ return this.context.memoryLimit.use(t.length), Pi(t);
2523
+ }
2524
+ var Li = /* @__PURE__ */ Object.freeze({
2525
+ __proto__: null,
2526
+ base64_encode: Fi,
2527
+ base64_decode: Ii
2528
+ }), Ri = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, hn), cr), _r), ei), ci), Mi), Li), on), zi = class extends R {
2529
+ constructor(e, t, n) {
2530
+ super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.key = this.identifier.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 B(this.tokenizer.readFilteredValue(), this.liquid);
2531
+ }
2532
+ *render(e) {
2533
+ e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
2534
+ }
2535
+ *arguments() {
2536
+ yield this.value;
2537
+ }
2538
+ *localScope() {
2539
+ yield this.identifier;
2540
+ }
2541
+ }, Bi = [
2542
+ "offset",
2543
+ "limit",
2544
+ "reversed"
2545
+ ], Vi = class extends R {
2546
+ constructor(e, t, n, r) {
2547
+ super(e, t, n);
2548
+ let i = this.tokenizer.readIdentifier(), a = this.tokenizer.readIdentifier(), o = this.tokenizer.readValue();
2549
+ if (!i.size() || a.content !== "in" || !o) throw Error(`illegal tag: ${e.getText()}`);
2550
+ this.variable = i.content, this.collection = o, this.hash = new z(this.tokenizer, n.options.keyValueSeparator), this.templates = [], this.elseTemplates = [];
2551
+ let s, c = r.parseStream(t).on("start", () => s = this.templates).on("tag:else", (e) => {
2552
+ w(e.args), s = this.elseTemplates;
2553
+ }).on("tag:endfor", (e) => {
2554
+ w(e.args), c.stop();
2555
+ }).on("template", (e) => s.push(e)).on("end", () => {
2556
+ throw Error(`tag ${e.getText()} not closed`);
2557
+ });
2558
+ c.start();
2559
+ }
2560
+ *render(e, t) {
2561
+ let n = this.liquid.renderer, r = u(yield j(this.collection, e));
2562
+ if (!r.length) {
2563
+ yield n.renderTemplates(this.elseTemplates, e, t);
2564
+ return;
2565
+ }
2566
+ let i = "continue-" + this.variable + "-" + this.collection.getText();
2567
+ e.push({ continue: e.getRegister(i, {}) });
2568
+ let a = yield this.hash.render(e);
2569
+ e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(a).filter((e) => Bi.includes(e)) : Bi.filter((e) => a[e] !== void 0)).reduce((e, t) => t === "offset" ? Ui(e, a.offset) : t === "limit" ? Wi(e, a.limit) : Hi(e), r), e.setRegister(i, (a.offset || 0) + r.length);
2570
+ let o = { forloop: new Ie(r.length, this.collection.getText(), this.variable) };
2571
+ e.push(o);
2572
+ for (let i of r) {
2573
+ if (o[this.variable] = i, e.continueCalled = e.breakCalled = !1, yield n.renderTemplates(this.templates, e, t), e.breakCalled) break;
2574
+ o.forloop.next();
2575
+ }
2576
+ e.continueCalled = e.breakCalled = !1, e.pop();
2577
+ }
2578
+ *children() {
2579
+ let e = this.templates.slice();
2580
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2581
+ }
2582
+ *arguments() {
2583
+ yield this.collection;
2584
+ for (let e of Object.values(this.hash.hash)) X(e) && (yield e);
2585
+ }
2586
+ blockScope() {
2587
+ return [this.variable, "forloop"];
2588
+ }
2589
+ };
2590
+ function Hi(e) {
2591
+ return [...e].reverse();
2592
+ }
2593
+ function Ui(e, t) {
2594
+ return e.slice(t);
2595
+ }
2596
+ function Wi(e, t) {
2597
+ return e.slice(0, t);
2598
+ }
2599
+ var Gi = class extends R {
2600
+ constructor(e, t, n, r) {
2601
+ for (super(e, t, n), this.templates = [], this.identifier = this.readVariable(), this.variable = this.identifier.content; t.length;) {
2602
+ let e = t.shift();
2603
+ if (Y(e) && e.name === "endcapture") return;
2604
+ this.templates.push(r.parseToken(e, t));
2605
+ }
2606
+ throw Error(`tag ${e.getText()} not closed`);
2607
+ }
2608
+ readVariable() {
2609
+ let e = this.tokenizer.readIdentifier();
2610
+ if (e.content || (e = this.tokenizer.readQuoted(), e)) return e;
2611
+ throw this.tokenizer.error("invalid capture name");
2612
+ }
2613
+ *render(e) {
2614
+ let t = yield this.liquid.renderer.renderTemplates(this.templates, e);
2615
+ e.bottom()[this.variable] = t;
2616
+ }
2617
+ *children() {
2618
+ return this.templates;
2619
+ }
2620
+ *localScope() {
2621
+ yield this.identifier;
2622
+ }
2623
+ }, Ki = class extends R {
2624
+ constructor(e, t, n, r) {
2625
+ super(e, t, n), this.branches = [], this.elseTemplates = [], this.value = new B(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
2626
+ let i = [], a = 0, o = r.parseStream(t).on("tag:when", (e) => {
2627
+ if (a > 0) return;
2628
+ i = [];
2629
+ let t = [];
2630
+ for (; !e.tokenizer.end();) t.push(e.tokenizer.readValueOrThrow()), e.tokenizer.skipBlank(), e.tokenizer.peek() === "," ? e.tokenizer.readTo(",") : e.tokenizer.readTo("or");
2631
+ this.branches.push({
2632
+ values: t,
2633
+ templates: i
2634
+ });
2635
+ }).on("tag:else", () => {
2636
+ a++, i = this.elseTemplates;
2637
+ }).on("tag:endcase", () => o.stop()).on("template", (e) => {
2638
+ (i !== this.elseTemplates || a === 1) && i.push(e);
2639
+ }).on("end", () => {
2640
+ throw Error(`tag ${e.getText()} not closed`);
2641
+ });
2642
+ o.start();
2643
+ }
2644
+ *render(e, t) {
2645
+ let n = this.liquid.renderer, r = f(yield this.value.value(e, e.opts.lenientIf)), i = !1;
2646
+ for (let a of this.branches) for (let o of a.values) if (P(r, yield j(o, e, e.opts.lenientIf))) {
2647
+ yield n.renderTemplates(a.templates, e, t), i = !0;
2648
+ break;
2649
+ }
2650
+ i || (yield n.renderTemplates(this.elseTemplates, e, t));
2651
+ }
2652
+ *arguments() {
2653
+ yield this.value, yield* this.branches.flatMap((e) => e.values);
2654
+ }
2655
+ *children() {
2656
+ let e = this.branches.flatMap((e) => e.templates);
2657
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2658
+ }
2659
+ }, qi = class extends R {
2660
+ constructor(e, t, n) {
2661
+ for (super(e, t, n); t.length;) {
2662
+ let e = t.shift();
2663
+ if (Y(e) && e.name === "endcomment") return;
2664
+ }
2665
+ throw Error(`tag ${e.getText()} not closed`);
2666
+ }
2667
+ render() {}
2668
+ }, Ji = class extends R {
2669
+ constructor(e, t, n, r) {
2670
+ super(e, t, n);
2671
+ let i = this.tokenizer;
2672
+ for (this.file = Yi(i, this.liquid, r), this.currentFile = e.file; !i.end();) {
2673
+ i.skipBlank();
2674
+ let e = i.p, t = i.readIdentifier();
2675
+ if ((t.content === "with" || t.content === "for") && (i.skipBlank(), i.peek() !== ":")) {
2676
+ let e = i.readValue();
2677
+ if (e) {
2678
+ let n = i.p, r = i.readIdentifier(), a;
2679
+ r.content === "as" ? a = i.readIdentifier() : i.p = n, this[t.content] = {
2680
+ value: e,
2681
+ alias: a && a.content
2682
+ }, i.skipBlank(), i.peek() === "," && i.advance();
2683
+ continue;
2684
+ }
2685
+ }
2686
+ i.p = e;
2687
+ break;
2688
+ }
2689
+ this.hash = new z(i, n.options.keyValueSeparator);
2690
+ }
2691
+ *render(e, t) {
2692
+ let { liquid: n, hash: r } = this, i = yield Zi(this.file, e, n);
2693
+ C(i, () => `illegal file path "${i}"`);
2694
+ let a = e.spawn(), o = a.bottom();
2695
+ if (We(o, yield r.render(e)), this.with) {
2696
+ let { value: t, alias: n } = this.with;
2697
+ o[n || i] = yield j(t, e);
2698
+ }
2699
+ if (this.for) {
2700
+ let { value: r, alias: s } = this.for, c = u(yield j(r, e));
2701
+ o.forloop = new Ie(c.length, r.getText(), s);
2702
+ for (let e of c) {
2703
+ o[s] = e;
2704
+ let r = yield n._parsePartialFile(i, a.sync, this.currentFile);
2705
+ yield n.renderer.renderTemplates(r, a, t), o.forloop.next();
2706
+ }
2707
+ } else {
2708
+ let e = yield n._parsePartialFile(i, a.sync, this.currentFile);
2709
+ yield n.renderer.renderTemplates(e, a, t);
2710
+ }
2711
+ }
2712
+ *children(e, t) {
2713
+ return e && a(this.file) ? yield this.liquid._parsePartialFile(this.file, t, this.currentFile) : [];
2714
+ }
2715
+ partialScope() {
2716
+ if (a(this.file)) {
2717
+ let e = Object.keys(this.hash.hash);
2718
+ if (this.with) {
2719
+ let { value: t, alias: n } = this.with;
2720
+ a(n) ? e.push([n, t]) : a(this.file) && e.push([this.file, t]);
2721
+ }
2722
+ if (this.for) {
2723
+ let { value: t, alias: n } = this.for;
2724
+ a(n) ? e.push([n, t]) : a(this.file) && e.push([this.file, t]);
2725
+ }
2726
+ return {
2727
+ name: this.file,
2728
+ isolated: !0,
2729
+ scope: e
2730
+ };
2731
+ }
2732
+ }
2733
+ *arguments() {
2734
+ for (let e of Object.values(this.hash.hash)) X(e) && (yield e);
2735
+ if (this.with) {
2736
+ let { value: e } = this.with;
2737
+ X(e) && (yield e);
2738
+ }
2739
+ if (this.for) {
2740
+ let { value: e } = this.for;
2741
+ X(e) && (yield e);
2742
+ }
2743
+ }
2744
+ };
2745
+ function Yi(e, t, n) {
2746
+ if (t.options.dynamicPartials) {
2747
+ let t = e.readValue();
2748
+ return e.assert(t, "illegal file path"), t.getText() === "none" ? void 0 : Hn(t) ? Xi(n.parse(zt(t))) : t;
2749
+ }
2750
+ let r = [...e.readFileNameTemplate(t.options)], i = Xi(n.parseTokens(r));
2751
+ return i === "none" ? void 0 : i;
2752
+ }
2753
+ function Xi(e) {
2754
+ return e.length === 1 && Bn(e[0].token) ? e[0].token.getContent() : e;
2755
+ }
2756
+ function* Zi(e, t, n) {
2757
+ return typeof e == "string" ? e : Array.isArray(e) ? n.renderer.renderTemplates(e, t) : yield j(e, t);
2758
+ }
2759
+ var Qi = class extends R {
2760
+ constructor(e, t, n, r) {
2761
+ super(e, t, n);
2762
+ let { tokenizer: i } = e;
2763
+ this.file = Yi(i, this.liquid, r), this.currentFile = e.file;
2764
+ let a = i.p;
2765
+ i.readIdentifier().content === "with" ? (i.skipBlank(), i.peek() === ":" ? i.p = a : this.withVar = i.readValue()) : i.p = a, this.hash = new z(i, n.options.jekyllInclude || n.options.keyValueSeparator);
2766
+ }
2767
+ *render(e, t) {
2768
+ let { liquid: n, hash: r, withVar: i } = this, { renderer: a } = n, o = yield Zi(this.file, e, n);
2769
+ C(o, () => `illegal file path "${o}"`);
2770
+ let s = e.saveRegister("blocks", "blockMode");
2771
+ e.setRegister("blocks", {}), e.setRegister("blockMode", $.OUTPUT);
2772
+ let c = yield r.render(e);
2773
+ i && (c[o] = yield j(i, e));
2774
+ let l = yield n._parsePartialFile(o, e.sync, this.currentFile);
2775
+ e.push(e.opts.jekyllInclude ? { include: c } : c), yield a.renderTemplates(l, e, t), e.pop(), e.restoreRegister(s);
2776
+ }
2777
+ *children(e, t) {
2778
+ return e && a(this.file) ? yield this.liquid._parsePartialFile(this.file, t, this.currentFile) : [];
2779
+ }
2780
+ partialScope() {
2781
+ if (a(this.file)) {
2782
+ let e;
2783
+ return this.liquid.options.jekyllInclude ? e = ["include"] : (e = Object.keys(this.hash.hash), this.withVar && e.push([this.file, this.withVar])), {
2784
+ name: this.file,
2785
+ isolated: !1,
2786
+ scope: e
2787
+ };
2788
+ }
2789
+ }
2790
+ *arguments() {
2791
+ yield* Object.values(this.hash.hash).filter(X), X(this.file) && (yield this.file), X(this.withVar) && (yield this.withVar);
2792
+ }
2793
+ }, $i = class extends R {
2794
+ constructor(e, t, n) {
2795
+ super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
2796
+ }
2797
+ render(e, t) {
2798
+ let n = e.environments;
2799
+ te(n[this.variable]) || (n[this.variable] = 0), t.write(l(--n[this.variable]));
2800
+ }
2801
+ *localScope() {
2802
+ yield this.identifier;
2803
+ }
2804
+ }, ea = class extends R {
2805
+ constructor(e, t, n) {
2806
+ super(e, t, n), this.candidates = [];
2807
+ let r = this.tokenizer.readValue();
2808
+ for (this.tokenizer.skipBlank(), r && (this.tokenizer.peek() === ":" ? (this.group = r, this.tokenizer.advance()) : this.candidates.push(r)); !this.tokenizer.end();) {
2809
+ let e = this.tokenizer.readValue();
2810
+ e && this.candidates.push(e), this.tokenizer.readTo(",");
2811
+ }
2812
+ this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
2813
+ }
2814
+ *render(e, t) {
2815
+ let n = `cycle:${yield j(this.group, e)}:` + this.candidates.join(","), r = e.getRegister("cycle", {}), i = r[n];
2816
+ i === void 0 && (i = r[n] = 0);
2817
+ let a = this.candidates[i];
2818
+ return i = (i + 1) % this.candidates.length, r[n] = i, yield j(a, e);
2819
+ }
2820
+ *arguments() {
2821
+ yield* this.candidates, this.group && (yield this.group);
2822
+ }
2823
+ }, ta = class extends R {
2824
+ constructor(e, t, n, r) {
2825
+ super(e, t, n), this.branches = [];
2826
+ let i = [];
2827
+ r.parseStream(t).on("start", () => this.branches.push({
2828
+ value: new B(e.tokenizer.readFilteredValue(), this.liquid),
2829
+ templates: i = []
2830
+ })).on("tag:elsif", (e) => {
2831
+ C(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
2832
+ value: new B(e.tokenizer.readFilteredValue(), this.liquid),
2833
+ templates: i = []
2834
+ });
2835
+ }).on("tag:else", (e) => {
2836
+ w(e.args), C(!this.elseTemplates, "duplicated else"), i = this.elseTemplates = [];
2837
+ }).on("tag:endif", function(e) {
2838
+ w(e.args), this.stop();
2839
+ }).on("template", (e) => i.push(e)).on("end", () => {
2840
+ throw Error(`tag ${e.getText()} not closed`);
2841
+ }).start();
2842
+ }
2843
+ *render(e, t) {
2844
+ let n = this.liquid.renderer;
2845
+ for (let { value: r, templates: i } of this.branches) if (M(yield r.value(e, e.opts.lenientIf), e)) {
2846
+ yield n.renderTemplates(i, e, t);
2847
+ return;
2848
+ }
2849
+ yield n.renderTemplates(this.elseTemplates || [], e, t);
2850
+ }
2851
+ *children() {
2852
+ let e = this.branches.flatMap((e) => e.templates);
2853
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
2854
+ }
2855
+ arguments() {
2856
+ return this.branches.map((e) => e.value);
2857
+ }
2858
+ }, na = class extends R {
2859
+ constructor(e, t, n) {
2860
+ super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
2861
+ }
2862
+ render(e, t) {
2863
+ let n = e.environments;
2864
+ te(n[this.variable]) || (n[this.variable] = 0);
2865
+ let r = n[this.variable];
2866
+ n[this.variable]++, t.write(l(r));
2867
+ }
2868
+ *localScope() {
2869
+ yield this.identifier;
2870
+ }
2871
+ }, ra = class extends R {
2872
+ constructor(e, t, n, r) {
2873
+ super(e, t, n), this.file = Yi(this.tokenizer, this.liquid, r), this.currentFile = e.file, this.args = new z(this.tokenizer, n.options.keyValueSeparator), this.templates = r.parseTokens(t);
2874
+ }
2875
+ *render(e, t) {
2876
+ let { liquid: n, args: r, file: i } = this, { renderer: a } = n;
2877
+ if (i === void 0) {
2878
+ e.setRegister("blockMode", $.OUTPUT), yield a.renderTemplates(this.templates, e, t);
2879
+ return;
2880
+ }
2881
+ let o = yield Zi(this.file, e, n);
2882
+ C(o, () => `illegal file path "${o}"`);
2883
+ let s = yield n._parseLayoutFile(o, e.sync, this.currentFile);
2884
+ e.setRegister("blockMode", $.STORE);
2885
+ let c = yield a.renderTemplates(this.templates, e), l = e.getRegister("blocks", {});
2886
+ l[""] === void 0 && (l[""] = (e, t) => t.write(c)), e.setRegister("blockMode", $.OUTPUT), e.push(yield r.render(e)), yield a.renderTemplates(s, e, t), e.pop();
2887
+ }
2888
+ *children(e) {
2889
+ let t = this.templates.slice();
2890
+ return e && a(this.file) && t.push(...yield this.liquid._parsePartialFile(this.file, !0, this.currentFile)), t;
2891
+ }
2892
+ *arguments() {
2893
+ for (let e of Object.values(this.args.hash)) X(e) && (yield e);
2894
+ X(this.file) && (yield this.file);
2895
+ }
2896
+ partialScope() {
2897
+ if (a(this.file)) return {
2898
+ name: this.file,
2899
+ isolated: !1,
2900
+ scope: Object.keys(this.args.hash)
2901
+ };
2902
+ }
2903
+ }, ia = class extends R {
2904
+ constructor(e, t, n, r) {
2905
+ super(e, t, n), this.templates = [];
2906
+ let i = /\w+/.exec(e.args);
2907
+ for (this.block = i ? i[0] : ""; t.length;) {
2908
+ let e = t.shift();
2909
+ if (Y(e) && e.name === "endblock") return;
2910
+ let n = r.parseToken(e, t);
2911
+ this.templates.push(n);
2912
+ }
2913
+ throw Error(`tag ${e.getText()} not closed`);
2914
+ }
2915
+ *render(e, t) {
2916
+ let n = this.getBlockRender(e);
2917
+ e.getRegister("blockMode") === $.STORE ? e.getRegister("blocks", {})[this.block] = n : yield n(new Be(), t);
2918
+ }
2919
+ getBlockRender(e) {
2920
+ let t = this, { liquid: n, templates: r } = this, i = e.getRegister("blocks", {})[this.block], a = function* (i, a) {
2921
+ let o = e.getRegister("blockStack", []);
2922
+ if (o.includes(t)) throw Error("block tag cannot be nested");
2923
+ o.push(t), e.push({ block: i }), yield n.renderer.renderTemplates(r, e, a), e.pop(), o.pop();
2924
+ };
2925
+ return i ? (e, t) => i(new Be((t) => a(e, t)), t) : a;
2926
+ }
2927
+ *children() {
2928
+ return this.templates;
2929
+ }
2930
+ blockScope() {
2931
+ return ["block"];
2932
+ }
2933
+ }, aa = class extends R {
2934
+ constructor(e, t, n) {
2935
+ for (super(e, t, n), this.tokens = []; t.length;) {
2936
+ let e = t.shift();
2937
+ if (Y(e) && e.name === "endraw") return;
2938
+ this.tokens.push(e);
2939
+ }
2940
+ throw Error(`tag ${e.getText()} not closed`);
2941
+ }
2942
+ render() {
2943
+ return this.tokens.map((e) => e.getText()).join("");
2944
+ }
2945
+ }, oa = class extends Ie {
2946
+ constructor(e, t, n, r) {
2947
+ super(e, n, r), this.length = e, this.cols = t;
2948
+ }
2949
+ row() {
2950
+ return Math.floor(this.i / this.cols) + 1;
2951
+ }
2952
+ col0() {
2953
+ return this.i % this.cols;
2954
+ }
2955
+ col() {
2956
+ return this.col0() + 1;
2957
+ }
2958
+ col_first() {
2959
+ return this.col0() === 0;
2960
+ }
2961
+ col_last() {
2962
+ return this.col() === this.cols;
2963
+ }
2964
+ }, sa = {
2965
+ assign: zi,
2966
+ for: Vi,
2967
+ capture: Gi,
2968
+ case: Ki,
2969
+ comment: qi,
2970
+ include: Qi,
2971
+ render: Ji,
2972
+ decrement: $i,
2973
+ increment: na,
2974
+ cycle: ea,
2975
+ if: ta,
2976
+ layout: ra,
2977
+ block: ia,
2978
+ raw: aa,
2979
+ tablerow: class extends R {
2980
+ constructor(e, t, n, r) {
2981
+ super(e, t, n);
2982
+ let i = this.tokenizer.readIdentifier();
2983
+ this.tokenizer.skipBlank();
2984
+ let a = this.tokenizer.readIdentifier(), o = this.tokenizer.readValue();
2985
+ if (a.content !== "in" || !o) throw Error(`illegal tag: ${e.getText()}`);
2986
+ this.variable = i.content, this.collection = o, this.args = new z(this.tokenizer, n.options.keyValueSeparator), this.templates = [];
2987
+ let s, c = r.parseStream(t).on("start", () => s = this.templates).on("tag:endtablerow", () => c.stop()).on("template", (e) => s.push(e)).on("end", () => {
2988
+ throw Error(`tag ${e.getText()} not closed`);
2989
+ });
2990
+ c.start();
2991
+ }
2992
+ *render(e, t) {
2993
+ let n = u(yield j(this.collection, e)), r = yield this.args.render(e), i = r.offset || 0;
2994
+ n = n.slice(i, i + (r.limit === void 0 ? n.length : r.limit));
2995
+ let a = r.cols || n.length, o = this.liquid.renderer, s = new oa(n.length, a, this.collection.getText(), this.variable), c = { tablerowloop: s };
2996
+ e.push(c);
2997
+ for (let r = 0; r < n.length; r++, s.next()) c[this.variable] = n[r], s.col0() === 0 && (s.row() !== 1 && t.write("</tr>"), t.write(`<tr class="row${s.row()}">`)), t.write(`<td class="col${s.col()}">`), yield o.renderTemplates(this.templates, e, t), t.write("</td>");
2998
+ n.length && t.write("</tr>"), e.pop();
2999
+ }
3000
+ *children() {
3001
+ return this.templates;
3002
+ }
3003
+ *arguments() {
3004
+ yield this.collection;
3005
+ for (let e of Object.values(this.args.hash)) X(e) && (yield e);
3006
+ }
3007
+ blockScope() {
3008
+ return [this.variable, "tablerowloop"];
3009
+ }
3010
+ },
3011
+ unless: class extends R {
3012
+ constructor(e, t, n, r) {
3013
+ super(e, t, n), this.branches = [], this.elseTemplates = [];
3014
+ let i = [], a = 0;
3015
+ r.parseStream(t).on("start", () => this.branches.push({
3016
+ value: new B(e.tokenizer.readFilteredValue(), this.liquid),
3017
+ test: N,
3018
+ templates: i = []
3019
+ })).on("tag:elsif", (e) => {
3020
+ if (a > 0) {
3021
+ i = [];
3022
+ return;
3023
+ }
3024
+ this.branches.push({
3025
+ value: new B(e.tokenizer.readFilteredValue(), this.liquid),
3026
+ test: M,
3027
+ templates: i = []
3028
+ });
3029
+ }).on("tag:else", () => {
3030
+ a++, i = this.elseTemplates;
3031
+ }).on("tag:endunless", function() {
3032
+ this.stop();
3033
+ }).on("template", (e) => {
3034
+ (i !== this.elseTemplates || a === 1) && i.push(e);
3035
+ }).on("end", () => {
3036
+ throw Error(`tag ${e.getText()} not closed`);
3037
+ }).start();
3038
+ }
3039
+ *render(e, t) {
3040
+ let n = this.liquid.renderer;
3041
+ for (let { value: r, test: i, templates: a } of this.branches) if (i(yield r.value(e, e.opts.lenientIf), e)) {
3042
+ yield n.renderTemplates(a, e, t);
3043
+ return;
3044
+ }
3045
+ yield n.renderTemplates(this.elseTemplates, e, t);
3046
+ }
3047
+ *children() {
3048
+ let e = this.branches.flatMap((e) => e.templates);
3049
+ return this.elseTemplates && e.push(...this.elseTemplates), e;
3050
+ }
3051
+ arguments() {
3052
+ return this.branches.map((e) => e.value);
3053
+ }
3054
+ },
3055
+ break: class extends R {
3056
+ render(e, t) {
3057
+ e.breakCalled = !0;
3058
+ }
3059
+ },
3060
+ continue: class extends R {
3061
+ render(e, t) {
3062
+ e.continueCalled = !0;
3063
+ }
3064
+ },
3065
+ echo: class extends R {
3066
+ constructor(e, t, n) {
3067
+ super(e, t, n), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new B(this.tokenizer.readFilteredValue(), this.liquid));
3068
+ }
3069
+ *render(e, t) {
3070
+ if (!this.value) return;
3071
+ let n = yield this.value.value(e, !1);
3072
+ t.write(n);
3073
+ }
3074
+ *arguments() {
3075
+ this.value && (yield this.value);
3076
+ }
3077
+ },
3078
+ liquid: class extends R {
3079
+ constructor(e, t, n, r) {
3080
+ super(e, t, n);
3081
+ let i = this.tokenizer.readLiquidTagTokens(this.liquid.options);
3082
+ this.templates = r.parseTokens(i);
3083
+ }
3084
+ *render(e, t) {
3085
+ yield this.liquid.renderer.renderTemplates(this.templates, e, t);
3086
+ }
3087
+ *children() {
3088
+ return this.templates;
3089
+ }
3090
+ },
3091
+ "#": class extends R {
3092
+ constructor(e, t, n) {
3093
+ if (super(e, t, n), e.args.search(/\n\s*[^#\s]/g) !== -1) throw Error("every line of an inline comment must start with a '#' character");
3094
+ }
3095
+ render() {}
3096
+ }
3097
+ }, ca = class e {
3098
+ constructor(e = {}) {
3099
+ this.renderer = new It(), this.filters = {}, this.tags = {}, this.options = _n(e), this.parser = new q(this), oe(sa, (e, t) => this.registerTag(t, e)), oe(Ri, (e, t) => this.registerFilter(t, e));
3100
+ }
3101
+ parse(e, t) {
3102
+ return new q(this).parse(e, t);
3103
+ }
3104
+ _render(e, t, n) {
3105
+ let r = t instanceof Q ? t : new Q(t, this.options, n);
3106
+ return this.renderer.renderTemplates(e, r);
3107
+ }
3108
+ render(e, t, n) {
3109
+ return E(this, void 0, void 0, function* () {
3110
+ return D(this._render(e, t, Object.assign(Object.assign({}, n), { sync: !1 })));
3111
+ });
3112
+ }
3113
+ renderSync(e, t, n) {
3114
+ return O(this._render(e, t, Object.assign(Object.assign({}, n), { sync: !0 })));
3115
+ }
3116
+ renderToNodeStream(e, t, n = {}) {
3117
+ let r = new Q(t, this.options, n);
3118
+ return this.renderer.renderTemplatesToNodeStream(e, r);
3119
+ }
3120
+ _parseAndRender(e, t, n) {
3121
+ let r = this.parse(e);
3122
+ return this._render(r, t, n);
3123
+ }
3124
+ parseAndRender(e, t, n) {
3125
+ return E(this, void 0, void 0, function* () {
3126
+ return D(this._parseAndRender(e, t, Object.assign(Object.assign({}, n), { sync: !1 })));
3127
+ });
3128
+ }
3129
+ parseAndRenderSync(e, t, n) {
3130
+ return O(this._parseAndRender(e, t, Object.assign(Object.assign({}, n), { sync: !0 })));
3131
+ }
3132
+ _parsePartialFile(e, t, n) {
3133
+ return new q(this).parseFile(e, t, K.Partials, n);
3134
+ }
3135
+ _parseLayoutFile(e, t, n) {
3136
+ return new q(this).parseFile(e, t, K.Layouts, n);
3137
+ }
3138
+ _parseFile(e, t, n, r) {
3139
+ return new q(this).parseFile(e, t, n, r);
3140
+ }
3141
+ parseFile(e, t) {
3142
+ return E(this, void 0, void 0, function* () {
3143
+ return D(new q(this).parseFile(e, !1, t));
3144
+ });
3145
+ }
3146
+ parseFileSync(e, t) {
3147
+ return O(new q(this).parseFile(e, !0, t));
3148
+ }
3149
+ *_renderFile(e, t, n) {
3150
+ let r = yield this._parseFile(e, n.sync, n.lookupType);
3151
+ return yield this._render(r, t, n);
3152
+ }
3153
+ renderFile(e, t, n) {
3154
+ return E(this, void 0, void 0, function* () {
3155
+ return D(this._renderFile(e, t, Object.assign(Object.assign({}, n), { sync: !1 })));
3156
+ });
3157
+ }
3158
+ renderFileSync(e, t, n) {
3159
+ return O(this._renderFile(e, t, Object.assign(Object.assign({}, n), { sync: !0 })));
3160
+ }
3161
+ renderFileToNodeStream(e, t, n) {
3162
+ return E(this, void 0, void 0, function* () {
3163
+ let r = yield this.parseFile(e);
3164
+ return this.renderToNodeStream(r, t, n);
3165
+ });
3166
+ }
3167
+ _evalValue(e, t) {
3168
+ let n = new B(e, this), r = t instanceof Q ? t : new Q(t, this.options);
3169
+ return n.value(r);
3170
+ }
3171
+ evalValue(e, t) {
3172
+ return E(this, void 0, void 0, function* () {
3173
+ return D(this._evalValue(e, t));
3174
+ });
3175
+ }
3176
+ evalValueSync(e, t) {
3177
+ return O(this._evalValue(e, t));
3178
+ }
3179
+ registerFilter(e, t) {
3180
+ this.filters[e] = t;
3181
+ }
3182
+ registerTag(e, t) {
3183
+ this.tags[e] = o(t) ? t : wn(t);
3184
+ }
3185
+ plugin(t) {
3186
+ return t.call(this, e);
3187
+ }
3188
+ express() {
3189
+ let e = this, t = !0;
3190
+ return function(n, r, i) {
3191
+ if (t) {
3192
+ t = !1;
3193
+ let n = I(this.root);
3194
+ e.options.root.unshift(...n), e.options.layouts.unshift(...n), e.options.partials.unshift(...n);
3195
+ }
3196
+ e.renderFile(n, r).then((e) => i(null, e), i);
3197
+ };
3198
+ }
3199
+ analyze(e, t = {}) {
3200
+ return E(this, void 0, void 0, function* () {
3201
+ return H(e, t);
3202
+ });
3203
+ }
3204
+ analyzeSync(e, t = {}) {
3205
+ return U(e, t);
3206
+ }
3207
+ parseAndAnalyze(e, t, n = {}) {
3208
+ return E(this, void 0, void 0, function* () {
3209
+ return H(this.parse(e, t), n);
3210
+ });
3211
+ }
3212
+ parseAndAnalyzeSync(e, t, n = {}) {
3213
+ return U(this.parse(e, t), n);
3214
+ }
3215
+ variables(e, t = {}) {
3216
+ return E(this, void 0, void 0, function* () {
3217
+ let n = yield H(a(e) ? this.parse(e) : e, t);
3218
+ return Object.keys(n.variables);
3219
+ });
3220
+ }
3221
+ variablesSync(e, t = {}) {
3222
+ let n = U(a(e) ? this.parse(e) : e, t);
3223
+ return Object.keys(n.variables);
3224
+ }
3225
+ fullVariables(e, t = {}) {
3226
+ return E(this, void 0, void 0, function* () {
3227
+ let n = yield H(a(e) ? this.parse(e) : e, t);
3228
+ return Array.from(new Set(Object.values(n.variables).flatMap((e) => e.map((e) => String(e)))));
3229
+ });
3230
+ }
3231
+ fullVariablesSync(e, t = {}) {
3232
+ let n = U(a(e) ? this.parse(e) : e, t);
3233
+ return Array.from(new Set(Object.values(n.variables).flatMap((e) => e.map((e) => String(e)))));
3234
+ }
3235
+ variableSegments(e, t = {}) {
3236
+ return E(this, void 0, void 0, function* () {
3237
+ let n = yield H(a(e) ? this.parse(e) : e, t);
3238
+ return Array.from(v(Object.values(n.variables).flatMap((e) => e.map((e) => e.toArray()))));
3239
+ });
3240
+ }
3241
+ variableSegmentsSync(e, t = {}) {
3242
+ let n = U(a(e) ? this.parse(e) : e, t);
3243
+ return Array.from(v(Object.values(n.variables).flatMap((e) => e.map((e) => e.toArray()))));
3244
+ }
3245
+ globalVariables(e, t = {}) {
3246
+ return E(this, void 0, void 0, function* () {
3247
+ let n = yield H(a(e) ? this.parse(e) : e, t);
3248
+ return Object.keys(n.globals);
3249
+ });
3250
+ }
3251
+ globalVariablesSync(e, t = {}) {
3252
+ let n = U(a(e) ? this.parse(e) : e, t);
3253
+ return Object.keys(n.globals);
3254
+ }
3255
+ globalFullVariables(e, t = {}) {
3256
+ return E(this, void 0, void 0, function* () {
3257
+ let n = yield H(a(e) ? this.parse(e) : e, t);
3258
+ return Array.from(new Set(Object.values(n.globals).flatMap((e) => e.map((e) => String(e)))));
3259
+ });
3260
+ }
3261
+ globalFullVariablesSync(e, t = {}) {
3262
+ let n = U(a(e) ? this.parse(e) : e, t);
3263
+ return Array.from(new Set(Object.values(n.globals).flatMap((e) => e.map((e) => String(e)))));
3264
+ }
3265
+ globalVariableSegments(e, t = {}) {
3266
+ return E(this, void 0, void 0, function* () {
3267
+ let n = yield H(a(e) ? this.parse(e) : e, t);
3268
+ return Array.from(v(Object.values(n.globals).flatMap((e) => e.map((e) => e.toArray()))));
3269
+ });
3270
+ }
3271
+ globalVariableSegmentsSync(e, t = {}) {
3272
+ let n = U(a(e) ? this.parse(e) : e, t);
3273
+ return Array.from(v(Object.values(n.globals).flatMap((e) => e.map((e) => e.toArray()))));
3274
+ }
3275
+ };
3276
+ //#endregion
3277
+ export { ca as Liquid };
3278
+
3279
+ //# sourceMappingURL=liquid.browser-lQbkge2E.js.map