@notificationapi/react 1.7.0 → 1.9.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.
- package/dist/assets/Badge.js +60 -64
- package/dist/assets/Box.js +26 -24
- package/dist/assets/Button.js +22 -19
- package/dist/assets/ButtonBase.js +193 -185
- package/dist/assets/DefaultPropsProvider.js +416 -4199
- package/dist/assets/DefaultPropsProvider2.js +992 -0
- package/dist/assets/Divider.js +22 -18
- package/dist/assets/GlobalStyles.js +23 -0
- package/dist/assets/Grow.js +1513 -120
- package/dist/assets/IconButton.js +8 -7
- package/dist/assets/List.js +12 -11
- package/dist/assets/Modal.js +18 -17
- package/dist/assets/Notification.js +787 -770
- package/dist/assets/Paper.js +8 -8
- package/dist/assets/Popover.js +37 -36
- package/dist/assets/Portal.js +39 -49
- package/dist/assets/Stack.js +32 -30
- package/dist/assets/Typography.js +84 -97
- package/dist/assets/createSvgIcon.js +25 -24
- package/dist/assets/createTheme.js +2828 -0
- package/dist/assets/exactProp.js +13 -0
- package/dist/assets/index.js +19 -148
- package/dist/assets/index2.js +151 -0
- package/dist/assets/useControlled.js +49 -0
- package/dist/assets/usePreviousProps.js +10 -0
- package/dist/assets/useTheme.js +6 -7
- package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
- package/dist/assets/utils.js +4 -4
- package/dist/components/Notifications/Inbox.js +593 -583
- package/dist/components/Notifications/InboxHeader.js +360 -1754
- package/dist/components/Notifications/Notification.js +4 -2
- package/dist/components/Notifications/NotificationFeed.js +40 -32
- package/dist/components/Notifications/NotificationLauncher.js +90 -64
- package/dist/components/Notifications/NotificationPopup.js +76 -65
- package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
- package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
- package/dist/components/Preferences/PreferenceInput.js +427 -414
- package/dist/components/Preferences/Preferences.js +329 -278
- package/dist/components/Provider/index.d.ts +2 -0
- package/dist/components/Provider/index.js +1008 -401
- package/dist/components/Slack/SlackConnect.js +4627 -2024
- package/dist/main.d.ts +2 -0
- package/dist/main.js +6 -3
- package/dist/utils/theme.d.ts +17 -0
- package/dist/utils/theme.js +104 -0
- package/package.json +1 -1
- package/dist/assets/dividerClasses.js +0 -56
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { jsx as _, jsxs as ut } from "react/jsx-runtime";
|
|
2
|
-
import { g as ai,
|
|
2
|
+
import { g as ai, s as $t, m as ui, u as li, c as ci, a as fi, n as hi } from "./DefaultPropsProvider.js";
|
|
3
|
+
import { getThemeColors as pi } from "../utils/theme.js";
|
|
4
|
+
import { a as di, u as mi } from "./ButtonBase.js";
|
|
3
5
|
import * as mt from "react";
|
|
4
|
-
import De, { useMemo as ne, useCallback as
|
|
6
|
+
import De, { useMemo as ne, useCallback as gi, useRef as Kt, useState as yi, useEffect as er } from "react";
|
|
7
|
+
import { g as wi, P as p, v as dn, q as vi } from "./createTheme.js";
|
|
5
8
|
import { c as mn } from "./createSvgIcon.js";
|
|
6
|
-
import { a as yi } from "./ButtonBase.js";
|
|
7
9
|
import { T as tr } from "./Typography.js";
|
|
8
|
-
import { I as
|
|
9
|
-
import { B as
|
|
10
|
-
const
|
|
10
|
+
import { I as bi } from "./IconButton.js";
|
|
11
|
+
import { B as Ti } from "./Badge.js";
|
|
12
|
+
const Oi = mn(/* @__PURE__ */ _("path", {
|
|
11
13
|
d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
12
14
|
}), "Person");
|
|
13
|
-
function
|
|
14
|
-
return
|
|
15
|
+
function Si(t) {
|
|
16
|
+
return wi("MuiAvatar", t);
|
|
15
17
|
}
|
|
16
18
|
ai("MuiAvatar", ["root", "colorDefault", "circular", "rounded", "square", "img", "fallback"]);
|
|
17
|
-
const
|
|
19
|
+
const ki = (t) => {
|
|
18
20
|
const {
|
|
19
21
|
classes: e,
|
|
20
22
|
variant: r,
|
|
21
23
|
colorDefault: n
|
|
22
24
|
} = t;
|
|
23
|
-
return
|
|
25
|
+
return fi({
|
|
24
26
|
root: ["root", r, n && "colorDefault"],
|
|
25
27
|
img: ["img"],
|
|
26
28
|
fallback: ["fallback"]
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
+
}, Si, e);
|
|
30
|
+
}, xi = $t("div", {
|
|
29
31
|
name: "MuiAvatar",
|
|
30
32
|
slot: "Root",
|
|
31
33
|
overridesResolver: (t, e) => {
|
|
@@ -34,7 +36,7 @@ const Oi = (t) => {
|
|
|
34
36
|
} = t;
|
|
35
37
|
return [e.root, e[r.variant], r.colorDefault && e.colorDefault];
|
|
36
38
|
}
|
|
37
|
-
})(
|
|
39
|
+
})(ui(({
|
|
38
40
|
theme: t
|
|
39
41
|
}) => ({
|
|
40
42
|
position: "relative",
|
|
@@ -80,7 +82,7 @@ const Oi = (t) => {
|
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
}]
|
|
83
|
-
}))),
|
|
85
|
+
}))), Li = $t("img", {
|
|
84
86
|
name: "MuiAvatar",
|
|
85
87
|
slot: "Img",
|
|
86
88
|
overridesResolver: (t, e) => e.img
|
|
@@ -94,7 +96,7 @@ const Oi = (t) => {
|
|
|
94
96
|
color: "transparent",
|
|
95
97
|
// Hide the image broken icon, only works on Chrome.
|
|
96
98
|
textIndent: 1e4
|
|
97
|
-
}),
|
|
99
|
+
}), Ai = $t(Oi, {
|
|
98
100
|
name: "MuiAvatar",
|
|
99
101
|
slot: "Fallback",
|
|
100
102
|
overridesResolver: (t, e) => e.fallback
|
|
@@ -102,7 +104,7 @@ const Oi = (t) => {
|
|
|
102
104
|
width: "75%",
|
|
103
105
|
height: "75%"
|
|
104
106
|
});
|
|
105
|
-
function
|
|
107
|
+
function Fi({
|
|
106
108
|
crossOrigin: t,
|
|
107
109
|
referrerPolicy: e,
|
|
108
110
|
src: r,
|
|
@@ -125,7 +127,7 @@ function Li({
|
|
|
125
127
|
}, [t, e, r, n]), i;
|
|
126
128
|
}
|
|
127
129
|
const gn = /* @__PURE__ */ mt.forwardRef(function(e, r) {
|
|
128
|
-
const n =
|
|
130
|
+
const n = li({
|
|
129
131
|
props: e,
|
|
130
132
|
name: "MuiAvatar"
|
|
131
133
|
}), {
|
|
@@ -138,25 +140,25 @@ const gn = /* @__PURE__ */ mt.forwardRef(function(e, r) {
|
|
|
138
140
|
imgProps: f,
|
|
139
141
|
sizes: d,
|
|
140
142
|
src: g,
|
|
141
|
-
srcSet:
|
|
143
|
+
srcSet: w,
|
|
142
144
|
variant: F = "circular",
|
|
143
145
|
...k
|
|
144
146
|
} = n;
|
|
145
|
-
let
|
|
147
|
+
let P = null;
|
|
146
148
|
const O = {
|
|
147
149
|
...n,
|
|
148
150
|
component: a,
|
|
149
151
|
variant: F
|
|
150
|
-
},
|
|
152
|
+
}, D = Fi({
|
|
151
153
|
...f,
|
|
152
154
|
...typeof c.img == "function" ? c.img(O) : c.img,
|
|
153
155
|
src: g,
|
|
154
|
-
srcSet:
|
|
155
|
-
}),
|
|
156
|
-
O.colorDefault = !
|
|
157
|
-
const
|
|
158
|
-
className:
|
|
159
|
-
elementType:
|
|
156
|
+
srcSet: w
|
|
157
|
+
}), N = g || w, E = N && D !== "error";
|
|
158
|
+
O.colorDefault = !E, delete O.ownerState;
|
|
159
|
+
const v = ki(O), [ee, pe] = di("img", {
|
|
160
|
+
className: v.img,
|
|
161
|
+
elementType: Li,
|
|
160
162
|
externalForwardedProps: {
|
|
161
163
|
slots: l,
|
|
162
164
|
slotProps: {
|
|
@@ -169,23 +171,23 @@ const gn = /* @__PURE__ */ mt.forwardRef(function(e, r) {
|
|
|
169
171
|
additionalProps: {
|
|
170
172
|
alt: i,
|
|
171
173
|
src: g,
|
|
172
|
-
srcSet:
|
|
174
|
+
srcSet: w,
|
|
173
175
|
sizes: d
|
|
174
176
|
},
|
|
175
177
|
ownerState: O
|
|
176
178
|
});
|
|
177
|
-
return
|
|
179
|
+
return E ? P = /* @__PURE__ */ _(ee, {
|
|
178
180
|
...pe
|
|
179
|
-
}) : s || s === 0 ?
|
|
181
|
+
}) : s || s === 0 ? P = s : N && i ? P = i[0] : P = /* @__PURE__ */ _(Ai, {
|
|
180
182
|
ownerState: O,
|
|
181
|
-
className:
|
|
182
|
-
}), /* @__PURE__ */ _(
|
|
183
|
+
className: v.fallback
|
|
184
|
+
}), /* @__PURE__ */ _(xi, {
|
|
183
185
|
as: a,
|
|
184
|
-
className:
|
|
186
|
+
className: ci(v.root, o),
|
|
185
187
|
ref: r,
|
|
186
188
|
...k,
|
|
187
189
|
ownerState: O,
|
|
188
|
-
children:
|
|
190
|
+
children: P
|
|
189
191
|
});
|
|
190
192
|
});
|
|
191
193
|
process.env.NODE_ENV !== "production" && (gn.propTypes = {
|
|
@@ -259,10 +261,10 @@ process.env.NODE_ENV !== "production" && (gn.propTypes = {
|
|
|
259
261
|
*/
|
|
260
262
|
variant: p.oneOfType([p.oneOf(["circular", "rounded", "square"]), p.string])
|
|
261
263
|
});
|
|
262
|
-
const
|
|
264
|
+
const Di = mn(/* @__PURE__ */ _("path", {
|
|
263
265
|
d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
264
266
|
}), "Check");
|
|
265
|
-
class
|
|
267
|
+
class C {
|
|
266
268
|
constructor(e, r, n, i, s) {
|
|
267
269
|
this.kind = e, this.input = r, this.begin = n, this.end = i, this.file = s;
|
|
268
270
|
}
|
|
@@ -284,30 +286,30 @@ class ce {
|
|
|
284
286
|
liquidMethodMissing(e) {
|
|
285
287
|
}
|
|
286
288
|
}
|
|
287
|
-
const
|
|
288
|
-
function
|
|
289
|
+
const _i = Object.prototype.toString, rr = String.prototype.toLowerCase, It = Object.hasOwnProperty;
|
|
290
|
+
function j(t) {
|
|
289
291
|
return typeof t == "string";
|
|
290
292
|
}
|
|
291
293
|
function x(t) {
|
|
292
294
|
return typeof t == "function";
|
|
293
295
|
}
|
|
294
|
-
function
|
|
296
|
+
function Ri(t) {
|
|
295
297
|
return t && x(t.then);
|
|
296
298
|
}
|
|
297
299
|
function Ye(t) {
|
|
298
300
|
return t && x(t.next) && x(t.throw) && x(t.return);
|
|
299
301
|
}
|
|
300
|
-
function
|
|
302
|
+
function Pi(t) {
|
|
301
303
|
return t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
302
304
|
}
|
|
303
305
|
function h(t) {
|
|
304
|
-
return t = m(t),
|
|
306
|
+
return t = m(t), j(t) ? t : z(t) ? "" : A(t) ? t.map((e) => h(e)).join("") : String(t);
|
|
305
307
|
}
|
|
306
308
|
function jt(t) {
|
|
307
|
-
return t = m(t), A(t) ? t :
|
|
309
|
+
return t = m(t), A(t) ? t : j(t) && t.length > 0 ? [t] : Ni(t) ? Array.from(t) : nt(t) ? Object.keys(t).map((e) => [e, t[e]]) : [];
|
|
308
310
|
}
|
|
309
311
|
function L(t) {
|
|
310
|
-
return t = m(t),
|
|
312
|
+
return t = m(t), z(t) ? [] : A(t) ? t : [t];
|
|
311
313
|
}
|
|
312
314
|
function m(t) {
|
|
313
315
|
return t instanceof ce && x(t.valueOf) ? t.valueOf() : t;
|
|
@@ -315,22 +317,22 @@ function m(t) {
|
|
|
315
317
|
function nr(t) {
|
|
316
318
|
return t = Number(t), isNaN(t) ? 0 : t;
|
|
317
319
|
}
|
|
318
|
-
function
|
|
320
|
+
function zt(t) {
|
|
319
321
|
return typeof t == "number";
|
|
320
322
|
}
|
|
321
323
|
function yn(t) {
|
|
322
324
|
return t && x(t.toLiquid) ? yn(t.toLiquid()) : t;
|
|
323
325
|
}
|
|
324
|
-
function
|
|
326
|
+
function z(t) {
|
|
325
327
|
return t == null;
|
|
326
328
|
}
|
|
327
|
-
function
|
|
329
|
+
function Ei(t) {
|
|
328
330
|
return t === void 0;
|
|
329
331
|
}
|
|
330
332
|
function A(t) {
|
|
331
|
-
return
|
|
333
|
+
return _i.call(t) === "[object Array]";
|
|
332
334
|
}
|
|
333
|
-
function
|
|
335
|
+
function Ni(t) {
|
|
334
336
|
return nt(t) && Symbol.iterator in t;
|
|
335
337
|
}
|
|
336
338
|
function ir(t, e) {
|
|
@@ -356,7 +358,7 @@ function vn(t, e, r = 1) {
|
|
|
356
358
|
function _e(t, e, r = " ") {
|
|
357
359
|
return bn(t, e, r, (n, i) => i + n);
|
|
358
360
|
}
|
|
359
|
-
function
|
|
361
|
+
function $i(t, e, r = " ") {
|
|
360
362
|
return bn(t, e, r, (n, i) => n + i);
|
|
361
363
|
}
|
|
362
364
|
function bn(t, e, r, n) {
|
|
@@ -369,21 +371,21 @@ function bn(t, e, r, n) {
|
|
|
369
371
|
function Tn(t) {
|
|
370
372
|
return t;
|
|
371
373
|
}
|
|
372
|
-
function
|
|
374
|
+
function Ii(t) {
|
|
373
375
|
return [...t].some((r) => r >= "a" && r <= "z") ? t.toUpperCase() : t.toLowerCase();
|
|
374
376
|
}
|
|
375
|
-
function
|
|
377
|
+
function ji(t, e) {
|
|
376
378
|
return t.length > e ? t.slice(0, e - 3) + "..." : t;
|
|
377
379
|
}
|
|
378
380
|
function sr(t, e) {
|
|
379
381
|
return t == null && e == null ? 0 : t == null ? 1 : e == null || (t = rr.call(t), e = rr.call(e), t < e) ? -1 : t > e ? 1 : 0;
|
|
380
382
|
}
|
|
381
|
-
function
|
|
383
|
+
function I(t) {
|
|
382
384
|
return function(...e) {
|
|
383
385
|
return t.call(this, ...e.map(m));
|
|
384
386
|
};
|
|
385
387
|
}
|
|
386
|
-
function
|
|
388
|
+
function Mt(t) {
|
|
387
389
|
return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
388
390
|
}
|
|
389
391
|
const or = "__liquidClass__";
|
|
@@ -392,7 +394,7 @@ class fe extends Error {
|
|
|
392
394
|
super(typeof e == "string" ? e : e.message), this.context = "", typeof e != "string" && Object.defineProperty(this, "originalError", { value: e, enumerable: !1 }), Object.defineProperty(this, "token", { value: r, enumerable: !1 }), Object.defineProperty(this, or, { value: "LiquidError", enumerable: !1 });
|
|
393
395
|
}
|
|
394
396
|
update() {
|
|
395
|
-
Object.defineProperty(this, "context", { value:
|
|
397
|
+
Object.defineProperty(this, "context", { value: Bi(this.token), enumerable: !1 }), this.message = Hi(this.message, this.token), this.stack = this.message + `
|
|
396
398
|
` + this.context + `
|
|
397
399
|
` + this.stack, this.originalError && (this.stack += `
|
|
398
400
|
From ` + this.originalError.stack);
|
|
@@ -401,17 +403,17 @@ From ` + this.originalError.stack);
|
|
|
401
403
|
return (e == null ? void 0 : e[or]) === "LiquidError";
|
|
402
404
|
}
|
|
403
405
|
}
|
|
404
|
-
class
|
|
406
|
+
class zi extends fe {
|
|
405
407
|
constructor(e, r) {
|
|
406
408
|
super(e, r), this.name = "TokenizationError", super.update();
|
|
407
409
|
}
|
|
408
410
|
}
|
|
409
|
-
class
|
|
411
|
+
class Mi extends fe {
|
|
410
412
|
constructor(e, r) {
|
|
411
413
|
super(e, r), this.name = "ParseError", this.message = e.message, super.update();
|
|
412
414
|
}
|
|
413
415
|
}
|
|
414
|
-
class
|
|
416
|
+
class Ci extends fe {
|
|
415
417
|
constructor(e, r) {
|
|
416
418
|
super(e, r.token), this.name = "RenderError", this.message = e.message, super.update();
|
|
417
419
|
}
|
|
@@ -429,22 +431,22 @@ class On extends fe {
|
|
|
429
431
|
return e.name === "LiquidErrors";
|
|
430
432
|
}
|
|
431
433
|
}
|
|
432
|
-
class
|
|
434
|
+
class qi extends fe {
|
|
433
435
|
constructor(e, r) {
|
|
434
436
|
super(e, r), this.name = "UndefinedVariableError", this.message = e.message, super.update();
|
|
435
437
|
}
|
|
436
438
|
}
|
|
437
|
-
class
|
|
439
|
+
class Ui extends Error {
|
|
438
440
|
constructor(e) {
|
|
439
441
|
super(`undefined variable: ${e}`), this.name = "InternalUndefinedVariableError", this.variableName = e;
|
|
440
442
|
}
|
|
441
443
|
}
|
|
442
|
-
class
|
|
444
|
+
class Vi extends Error {
|
|
443
445
|
constructor(e) {
|
|
444
446
|
super(e), this.name = "AssertionError", this.message = e + "";
|
|
445
447
|
}
|
|
446
448
|
}
|
|
447
|
-
function
|
|
449
|
+
function Bi(t) {
|
|
448
450
|
const [e, r] = t.getPosition(), n = t.input.split(`
|
|
449
451
|
`), i = Math.max(e - 2, 1), s = Math.min(e + 3, n.length);
|
|
450
452
|
return vn(i, s + 1).map((a) => {
|
|
@@ -456,30 +458,30 @@ function Ui(t) {
|
|
|
456
458
|
}).join(`
|
|
457
459
|
`);
|
|
458
460
|
}
|
|
459
|
-
function
|
|
461
|
+
function Hi(t, e) {
|
|
460
462
|
e.file && (t += `, file:${e.file}`);
|
|
461
463
|
const [r, n] = e.getPosition();
|
|
462
464
|
return t += `, line:${r}, col:${n}`, t;
|
|
463
465
|
}
|
|
464
|
-
const
|
|
466
|
+
const y = [0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 4, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 2, 8, 0, 0, 0, 0, 8, 0, 0, 0, 64, 0, 65, 0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 0, 2, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], Wi = 1, ve = 4, ar = 8, Sn = 16, Yi = 32, Ji = 64, Qi = 128;
|
|
465
467
|
function Be(t) {
|
|
466
468
|
const e = t.charCodeAt(0);
|
|
467
|
-
return e >= 128 ? !
|
|
469
|
+
return e >= 128 ? !y[e] : !!(y[e] & Wi);
|
|
468
470
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
+
y[160] = y[5760] = y[6158] = y[8192] = y[8193] = y[8194] = y[8195] = y[8196] = y[8197] = y[8198] = y[8199] = y[8200] = y[8201] = y[8202] = y[8232] = y[8233] = y[8239] = y[8287] = y[12288] = ve;
|
|
472
|
+
y[8220] = y[8221] = Qi;
|
|
471
473
|
function R(t, e) {
|
|
472
474
|
if (!t) {
|
|
473
475
|
const r = typeof e == "function" ? e() : e || `expect ${t} to be true`;
|
|
474
|
-
throw new
|
|
476
|
+
throw new Vi(r);
|
|
475
477
|
}
|
|
476
478
|
}
|
|
477
479
|
function Je(t, e = `unexpected ${JSON.stringify(t)}`) {
|
|
478
480
|
R(!t, e);
|
|
479
481
|
}
|
|
480
|
-
class
|
|
482
|
+
class Zi extends ce {
|
|
481
483
|
equals(e) {
|
|
482
|
-
return
|
|
484
|
+
return z(m(e));
|
|
483
485
|
}
|
|
484
486
|
gt() {
|
|
485
487
|
return !1;
|
|
@@ -499,7 +501,7 @@ class Ji extends ce {
|
|
|
499
501
|
}
|
|
500
502
|
class be extends ce {
|
|
501
503
|
equals(e) {
|
|
502
|
-
return e instanceof be ? !1 : (e = m(e),
|
|
504
|
+
return e instanceof be ? !1 : (e = m(e), j(e) || A(e) ? e.length === 0 : nt(e) ? Object.keys(e).length === 0 : !1);
|
|
503
505
|
}
|
|
504
506
|
gt() {
|
|
505
507
|
return !1;
|
|
@@ -522,7 +524,7 @@ class be extends ce {
|
|
|
522
524
|
}
|
|
523
525
|
class Ct extends be {
|
|
524
526
|
equals(e) {
|
|
525
|
-
return e === !1 ||
|
|
527
|
+
return e === !1 || z(m(e)) ? !0 : j(e) ? /^\s*$/.test(e) : super.equals(e);
|
|
526
528
|
}
|
|
527
529
|
static is(e) {
|
|
528
530
|
return e instanceof Ct;
|
|
@@ -572,7 +574,7 @@ class ur extends ce {
|
|
|
572
574
|
function V(t) {
|
|
573
575
|
return t && x(t.equals) && x(t.gt) && x(t.geq) && x(t.lt) && x(t.leq);
|
|
574
576
|
}
|
|
575
|
-
const lr = new
|
|
577
|
+
const lr = new Zi(), kn = {
|
|
576
578
|
true: !0,
|
|
577
579
|
false: !1,
|
|
578
580
|
nil: lr,
|
|
@@ -601,7 +603,7 @@ var Qe = function() {
|
|
|
601
603
|
return e;
|
|
602
604
|
}, Qe.apply(this, arguments);
|
|
603
605
|
};
|
|
604
|
-
function
|
|
606
|
+
function q(t, e, r, n) {
|
|
605
607
|
function i(s) {
|
|
606
608
|
return s instanceof r ? s : new r(function(o) {
|
|
607
609
|
o(s);
|
|
@@ -629,7 +631,7 @@ function C(t, e, r, n) {
|
|
|
629
631
|
});
|
|
630
632
|
}
|
|
631
633
|
function Z(t) {
|
|
632
|
-
return
|
|
634
|
+
return q(this, void 0, void 0, function* () {
|
|
633
635
|
if (!Ye(t))
|
|
634
636
|
return t;
|
|
635
637
|
let e, r = !1, n = "next";
|
|
@@ -637,7 +639,7 @@ function Z(t) {
|
|
|
637
639
|
const i = t[n](e);
|
|
638
640
|
r = i.done, e = i.value, n = "next";
|
|
639
641
|
try {
|
|
640
|
-
Ye(e) && (e = Z(e)),
|
|
642
|
+
Ye(e) && (e = Z(e)), Ri(e) && (e = yield e);
|
|
641
643
|
} catch (s) {
|
|
642
644
|
n = "throw", e = s;
|
|
643
645
|
}
|
|
@@ -660,25 +662,25 @@ function G(t) {
|
|
|
660
662
|
} while (!r);
|
|
661
663
|
return e;
|
|
662
664
|
}
|
|
663
|
-
const
|
|
664
|
-
function
|
|
665
|
-
return [31,
|
|
665
|
+
const Gi = /%([-_0^#:]+)?(\d+)?([EO])?(.)/;
|
|
666
|
+
function Xi(t) {
|
|
667
|
+
return [31, Ki(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
666
668
|
}
|
|
667
669
|
function xn(t) {
|
|
668
670
|
let e = 0;
|
|
669
671
|
for (let r = 0; r < t.getMonth(); ++r)
|
|
670
|
-
e +=
|
|
672
|
+
e += Xi(t)[r];
|
|
671
673
|
return e + t.getDate();
|
|
672
674
|
}
|
|
673
675
|
function fr(t, e) {
|
|
674
676
|
const r = xn(t) + (e - t.getDay()), i = 7 - new Date(t.getFullYear(), 0, 1).getDay() + e;
|
|
675
677
|
return String(Math.floor((r - i) / 7) + 1);
|
|
676
678
|
}
|
|
677
|
-
function
|
|
679
|
+
function Ki(t) {
|
|
678
680
|
const e = t.getFullYear();
|
|
679
681
|
return !!((e & 3) === 0 && (e % 100 || e % 400 === 0 && e));
|
|
680
682
|
}
|
|
681
|
-
function
|
|
683
|
+
function es(t) {
|
|
682
684
|
const e = t.getDate();
|
|
683
685
|
if ([11, 12, 13].includes(e))
|
|
684
686
|
return "th";
|
|
@@ -693,10 +695,10 @@ function Xi(t) {
|
|
|
693
695
|
return "th";
|
|
694
696
|
}
|
|
695
697
|
}
|
|
696
|
-
function
|
|
698
|
+
function ts(t) {
|
|
697
699
|
return parseInt(t.getFullYear().toString().substring(0, 2), 10);
|
|
698
700
|
}
|
|
699
|
-
const
|
|
701
|
+
const rs = {
|
|
700
702
|
d: 2,
|
|
701
703
|
e: 2,
|
|
702
704
|
H: 2,
|
|
@@ -710,7 +712,7 @@ const es = {
|
|
|
710
712
|
S: 2,
|
|
711
713
|
U: 2,
|
|
712
714
|
W: 2
|
|
713
|
-
},
|
|
715
|
+
}, ns = new Set("aAbBceklpP");
|
|
714
716
|
function hr(t, e) {
|
|
715
717
|
const r = Math.abs(t.getTimezoneOffset()), n = Math.floor(r / 60), i = r % 60;
|
|
716
718
|
return (t.getTimezoneOffset() > 0 ? "-" : "+") + _e(n, 2, "0") + (e.flags[":"] ? ":" : "") + _e(i, 2, "0");
|
|
@@ -721,7 +723,7 @@ const gt = {
|
|
|
721
723
|
b: (t) => t.getShortMonthName(),
|
|
722
724
|
B: (t) => t.getLongMonthName(),
|
|
723
725
|
c: (t) => t.toLocaleString(),
|
|
724
|
-
C: (t) =>
|
|
726
|
+
C: (t) => ts(t),
|
|
725
727
|
d: (t) => t.getDate(),
|
|
726
728
|
e: (t) => t.getDate(),
|
|
727
729
|
H: (t) => t.getHours(),
|
|
@@ -734,11 +736,11 @@ const gt = {
|
|
|
734
736
|
M: (t) => t.getMinutes(),
|
|
735
737
|
N: (t, e) => {
|
|
736
738
|
const r = Number(e.width) || 9, n = String(t.getMilliseconds()).slice(0, r);
|
|
737
|
-
return
|
|
739
|
+
return $i(n, r, "0");
|
|
738
740
|
},
|
|
739
741
|
p: (t) => t.getHours() < 12 ? "AM" : "PM",
|
|
740
742
|
P: (t) => t.getHours() < 12 ? "am" : "pm",
|
|
741
|
-
q: (t) =>
|
|
743
|
+
q: (t) => es(t),
|
|
742
744
|
s: (t) => Math.round(t.getTime() / 1e3),
|
|
743
745
|
S: (t) => t.getSeconds(),
|
|
744
746
|
u: (t) => t.getDay() || 7,
|
|
@@ -759,24 +761,24 @@ const gt = {
|
|
|
759
761
|
gt.h = gt.b;
|
|
760
762
|
function He(t, e) {
|
|
761
763
|
let r = "", n = e, i;
|
|
762
|
-
for (; i =
|
|
763
|
-
r += n.slice(0, i.index), n = n.slice(i.index + i[0].length), r +=
|
|
764
|
+
for (; i = Gi.exec(n); )
|
|
765
|
+
r += n.slice(0, i.index), n = n.slice(i.index + i[0].length), r += is(t, i);
|
|
764
766
|
return r + n;
|
|
765
767
|
}
|
|
766
|
-
function
|
|
768
|
+
function is(t, e) {
|
|
767
769
|
const [r, n = "", i, s, o] = e, a = gt[o];
|
|
768
770
|
if (!a)
|
|
769
771
|
return r;
|
|
770
772
|
const l = {};
|
|
771
773
|
for (const g of n)
|
|
772
774
|
l[g] = !0;
|
|
773
|
-
let c = String(a(t, { flags: l, width: i, modifier: s })), f =
|
|
774
|
-
return l["^"] ? c = c.toUpperCase() : l["#"] && (c =
|
|
775
|
+
let c = String(a(t, { flags: l, width: i, modifier: s })), f = ns.has(o) ? " " : "0", d = i || rs[o] || 0;
|
|
776
|
+
return l["^"] ? c = c.toUpperCase() : l["#"] && (c = Ii(c)), l._ ? f = " " : l[0] && (f = "0"), l["-"] && (d = 0), _e(c, d, f);
|
|
775
777
|
}
|
|
776
778
|
function Ln() {
|
|
777
779
|
return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
|
|
778
780
|
}
|
|
779
|
-
const
|
|
781
|
+
const ss = 6e4, os = /([zZ]|([+-])(\d{2}):(\d{2}))$/, An = [
|
|
780
782
|
"January",
|
|
781
783
|
"February",
|
|
782
784
|
"March",
|
|
@@ -789,7 +791,7 @@ const ns = 6e4, is = /([zZ]|([+-])(\d{2}):(\d{2}))$/, An = [
|
|
|
789
791
|
"October",
|
|
790
792
|
"November",
|
|
791
793
|
"December"
|
|
792
|
-
],
|
|
794
|
+
], as = An.map((t) => t.slice(0, 3)), Fn = [
|
|
793
795
|
"Sunday",
|
|
794
796
|
"Monday",
|
|
795
797
|
"Tuesday",
|
|
@@ -797,11 +799,11 @@ const ns = 6e4, is = /([zZ]|([+-])(\d{2}):(\d{2}))$/, An = [
|
|
|
797
799
|
"Thursday",
|
|
798
800
|
"Friday",
|
|
799
801
|
"Saturday"
|
|
800
|
-
],
|
|
801
|
-
class
|
|
802
|
+
], us = Fn.map((t) => t.slice(0, 3));
|
|
803
|
+
class U {
|
|
802
804
|
constructor(e, r, n) {
|
|
803
|
-
this.locale = r, this.DateTimeFormat = Ln(), this.date = new Date(e), this.timezoneFixed = n !== void 0, n === void 0 && (n = this.date.getTimezoneOffset()), this.timezoneOffset =
|
|
804
|
-
const i = (this.date.getTimezoneOffset() - this.timezoneOffset) *
|
|
805
|
+
this.locale = r, this.DateTimeFormat = Ln(), this.date = new Date(e), this.timezoneFixed = n !== void 0, n === void 0 && (n = this.date.getTimezoneOffset()), this.timezoneOffset = j(n) ? U.getTimezoneOffset(n, this.date) : n, this.timezoneName = j(n) ? n : "";
|
|
806
|
+
const i = (this.date.getTimezoneOffset() - this.timezoneOffset) * ss, s = this.date.getTime() + i;
|
|
805
807
|
this.displayDate = new Date(s);
|
|
806
808
|
}
|
|
807
809
|
getTime() {
|
|
@@ -855,7 +857,7 @@ class q {
|
|
|
855
857
|
}
|
|
856
858
|
getShortMonthName() {
|
|
857
859
|
var e;
|
|
858
|
-
return (e = this.format({ month: "short" })) !== null && e !== void 0 ? e :
|
|
860
|
+
return (e = this.format({ month: "short" })) !== null && e !== void 0 ? e : as[this.getMonth()];
|
|
859
861
|
}
|
|
860
862
|
getLongWeekdayName() {
|
|
861
863
|
var e;
|
|
@@ -863,7 +865,7 @@ class q {
|
|
|
863
865
|
}
|
|
864
866
|
getShortWeekdayName() {
|
|
865
867
|
var e;
|
|
866
|
-
return (e = this.format({ weekday: "short" })) !== null && e !== void 0 ? e :
|
|
868
|
+
return (e = this.format({ weekday: "short" })) !== null && e !== void 0 ? e : us[this.displayDate.getDay()];
|
|
867
869
|
}
|
|
868
870
|
valid() {
|
|
869
871
|
return !isNaN(this.getTime());
|
|
@@ -885,14 +887,14 @@ class q {
|
|
|
885
887
|
* Given that a template is expected to be parsed fewer times than rendered.
|
|
886
888
|
*/
|
|
887
889
|
static createDateFixedToTimezone(e, r) {
|
|
888
|
-
const n = e.match(
|
|
890
|
+
const n = e.match(os);
|
|
889
891
|
if (n && n[1] === "Z")
|
|
890
|
-
return new
|
|
892
|
+
return new U(+new Date(e), r, 0);
|
|
891
893
|
if (n && n[2] && n[3] && n[4]) {
|
|
892
894
|
const [, , i, s, o] = n, a = (i === "+" ? -1 : 1) * (parseInt(s, 10) * 60 + parseInt(o, 10));
|
|
893
|
-
return new
|
|
895
|
+
return new U(+new Date(e), r, a);
|
|
894
896
|
}
|
|
895
|
-
return new
|
|
897
|
+
return new U(e, r);
|
|
896
898
|
}
|
|
897
899
|
static getTimezoneOffset(e, r) {
|
|
898
900
|
const n = r.toLocaleString("en-US", { timeZone: e }), i = r.toLocaleString("en-US", { timeZone: "UTC" }), s = new Date(n);
|
|
@@ -910,16 +912,16 @@ class yt {
|
|
|
910
912
|
e = nr(e), R(e <= this.limit, this.message);
|
|
911
913
|
}
|
|
912
914
|
}
|
|
913
|
-
class Ut extends
|
|
915
|
+
class Ut extends C {
|
|
914
916
|
constructor(e, [r, n], i, s, o, a, l, c) {
|
|
915
917
|
super(e, i, s, o, c), this.trimLeft = !1, this.trimRight = !1;
|
|
916
918
|
const f = i[r] === "-", d = i[n - 1] === "-";
|
|
917
|
-
let g = f ? r + 1 : r,
|
|
918
|
-
for (; g <
|
|
919
|
+
let g = f ? r + 1 : r, w = d ? n - 1 : n;
|
|
920
|
+
for (; g < w && y[i.charCodeAt(g)] & ve; )
|
|
919
921
|
g++;
|
|
920
|
-
for (;
|
|
921
|
-
|
|
922
|
-
this.contentRange = [g,
|
|
922
|
+
for (; w > g && y[i.charCodeAt(w - 1)] & ve; )
|
|
923
|
+
w--;
|
|
924
|
+
this.contentRange = [g, w], this.trimLeft = f || a, this.trimRight = d || l;
|
|
923
925
|
}
|
|
924
926
|
get content() {
|
|
925
927
|
return this.input.slice(this.contentRange[0], this.contentRange[1]);
|
|
@@ -934,13 +936,13 @@ class pr extends Ut {
|
|
|
934
936
|
return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
|
|
935
937
|
}
|
|
936
938
|
}
|
|
937
|
-
class
|
|
939
|
+
class ls extends Ut {
|
|
938
940
|
constructor(e, r, n, i, s) {
|
|
939
941
|
const { trimOutputLeft: o, trimOutputRight: a, outputDelimiterLeft: l, outputDelimiterRight: c } = i, f = [r + l.length, n - c.length];
|
|
940
942
|
super(b.Output, f, e, r, n, o, a, s);
|
|
941
943
|
}
|
|
942
944
|
}
|
|
943
|
-
class dr extends
|
|
945
|
+
class dr extends C {
|
|
944
946
|
constructor(e, r, n, i) {
|
|
945
947
|
super(b.HTML, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.trimLeft = 0, this.trimRight = 0;
|
|
946
948
|
}
|
|
@@ -948,17 +950,17 @@ class dr extends j {
|
|
|
948
950
|
return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
|
|
949
951
|
}
|
|
950
952
|
}
|
|
951
|
-
class
|
|
953
|
+
class cs extends C {
|
|
952
954
|
constructor(e, r, n, i) {
|
|
953
955
|
super(b.Number, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.content = Number(this.getText());
|
|
954
956
|
}
|
|
955
957
|
}
|
|
956
|
-
class lt extends
|
|
958
|
+
class lt extends C {
|
|
957
959
|
constructor(e, r, n, i) {
|
|
958
960
|
super(b.Word, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.content = this.getText();
|
|
959
961
|
}
|
|
960
962
|
}
|
|
961
|
-
class
|
|
963
|
+
class fs extends C {
|
|
962
964
|
constructor(e, r, n, i) {
|
|
963
965
|
super(b.Literal, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.literal = this.getText(), this.content = kn[this.literal];
|
|
964
966
|
}
|
|
@@ -974,7 +976,7 @@ const mr = {
|
|
|
974
976
|
not: 1,
|
|
975
977
|
and: 0,
|
|
976
978
|
or: 0
|
|
977
|
-
},
|
|
979
|
+
}, hs = {
|
|
978
980
|
"==": 0,
|
|
979
981
|
"!=": 0,
|
|
980
982
|
">": 0,
|
|
@@ -987,7 +989,7 @@ const mr = {
|
|
|
987
989
|
or: 0
|
|
988
990
|
/* OperatorType.Binary */
|
|
989
991
|
};
|
|
990
|
-
class
|
|
992
|
+
class ps extends C {
|
|
991
993
|
constructor(e, r, n, i) {
|
|
992
994
|
super(b.Operator, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.operator = this.getText();
|
|
993
995
|
}
|
|
@@ -996,22 +998,22 @@ class fs extends j {
|
|
|
996
998
|
return e in mr ? mr[e] : 1;
|
|
997
999
|
}
|
|
998
1000
|
}
|
|
999
|
-
class gr extends
|
|
1001
|
+
class gr extends C {
|
|
1000
1002
|
constructor(e, r, n, i, s, o) {
|
|
1001
1003
|
super(b.PropertyAccess, n, i, s, o), this.variable = e, this.props = r;
|
|
1002
1004
|
}
|
|
1003
1005
|
}
|
|
1004
|
-
class Dn extends
|
|
1006
|
+
class Dn extends C {
|
|
1005
1007
|
constructor(e, r, n, i, s, o) {
|
|
1006
1008
|
super(b.Filter, n, i, s, o), this.name = e, this.args = r;
|
|
1007
1009
|
}
|
|
1008
1010
|
}
|
|
1009
|
-
class
|
|
1011
|
+
class ds extends C {
|
|
1010
1012
|
constructor(e, r, n, i, s, o) {
|
|
1011
1013
|
super(b.Hash, e, r, n, o), this.input = e, this.begin = r, this.end = n, this.name = i, this.value = s, this.file = o;
|
|
1012
1014
|
}
|
|
1013
1015
|
}
|
|
1014
|
-
const
|
|
1016
|
+
const ms = /[\da-fA-F]/, yr = /[0-7]/, wr = {
|
|
1015
1017
|
b: "\b",
|
|
1016
1018
|
f: "\f",
|
|
1017
1019
|
n: `
|
|
@@ -1024,7 +1026,7 @@ function vr(t) {
|
|
|
1024
1026
|
const e = t.charCodeAt(0);
|
|
1025
1027
|
return e >= 97 ? e - 87 : e >= 65 ? e - 55 : e - 48;
|
|
1026
1028
|
}
|
|
1027
|
-
function
|
|
1029
|
+
function gs(t) {
|
|
1028
1030
|
let e = "";
|
|
1029
1031
|
for (let r = 1; r < t.length - 1; r++) {
|
|
1030
1032
|
if (t[r] !== "\\") {
|
|
@@ -1035,7 +1037,7 @@ function ds(t) {
|
|
|
1035
1037
|
e += wr[t[++r]];
|
|
1036
1038
|
else if (t[r + 1] === "u") {
|
|
1037
1039
|
let n = 0, i = r + 2;
|
|
1038
|
-
for (; i <= r + 5 &&
|
|
1040
|
+
for (; i <= r + 5 && ms.test(t[i]); )
|
|
1039
1041
|
n = n * 16 + vr(t[i++]);
|
|
1040
1042
|
r = i - 1, e += String.fromCharCode(n);
|
|
1041
1043
|
} else if (!yr.test(t[r + 1]))
|
|
@@ -1049,33 +1051,33 @@ function ds(t) {
|
|
|
1049
1051
|
}
|
|
1050
1052
|
return e;
|
|
1051
1053
|
}
|
|
1052
|
-
class
|
|
1054
|
+
class ys extends C {
|
|
1053
1055
|
constructor(e, r, n, i) {
|
|
1054
|
-
super(b.Quoted, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.content =
|
|
1056
|
+
super(b.Quoted, e, r, n, i), this.input = e, this.begin = r, this.end = n, this.file = i, this.content = gs(this.getText());
|
|
1055
1057
|
}
|
|
1056
1058
|
}
|
|
1057
|
-
class
|
|
1059
|
+
class ws extends C {
|
|
1058
1060
|
constructor(e, r, n, i, s, o) {
|
|
1059
1061
|
super(b.Range, e, r, n, o), this.input = e, this.begin = r, this.end = n, this.lhs = i, this.rhs = s, this.file = o;
|
|
1060
1062
|
}
|
|
1061
1063
|
}
|
|
1062
|
-
class
|
|
1064
|
+
class vs extends Ut {
|
|
1063
1065
|
constructor(e, r, n, i, s) {
|
|
1064
1066
|
super(b.Tag, [r, n], e, r, n, !1, !1, s), this.tokenizer = new Q(e, i.operators, s, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank(), this.args = this.tokenizer.remaining();
|
|
1065
1067
|
}
|
|
1066
1068
|
}
|
|
1067
|
-
class
|
|
1069
|
+
class bs extends C {
|
|
1068
1070
|
constructor(e, r, n, i, s, o) {
|
|
1069
1071
|
super(b.FilteredValue, n, i, s, o), this.initial = e, this.filters = r, this.input = n, this.begin = i, this.end = s, this.file = o;
|
|
1070
1072
|
}
|
|
1071
1073
|
}
|
|
1072
|
-
const
|
|
1074
|
+
const Ts = {
|
|
1073
1075
|
now: () => Date.now()
|
|
1074
1076
|
};
|
|
1075
1077
|
function _n() {
|
|
1076
|
-
return typeof global == "object" && global.performance || typeof window == "object" && window.performance ||
|
|
1078
|
+
return typeof global == "object" && global.performance || typeof window == "object" && window.performance || Ts;
|
|
1077
1079
|
}
|
|
1078
|
-
class
|
|
1080
|
+
class Os {
|
|
1079
1081
|
constructor() {
|
|
1080
1082
|
this.buffer = "";
|
|
1081
1083
|
}
|
|
@@ -1083,12 +1085,12 @@ class bs {
|
|
|
1083
1085
|
this.buffer += h(e);
|
|
1084
1086
|
}
|
|
1085
1087
|
}
|
|
1086
|
-
class
|
|
1088
|
+
class Ss {
|
|
1087
1089
|
constructor() {
|
|
1088
1090
|
throw this.buffer = "", this.stream = null, new Error("streaming not supported in browser");
|
|
1089
1091
|
}
|
|
1090
1092
|
}
|
|
1091
|
-
class
|
|
1093
|
+
class ks {
|
|
1092
1094
|
constructor() {
|
|
1093
1095
|
this.buffer = "";
|
|
1094
1096
|
}
|
|
@@ -1096,13 +1098,13 @@ class Os {
|
|
|
1096
1098
|
e = m(e), typeof e != "string" && this.buffer === "" ? this.buffer = e : this.buffer = h(this.buffer) + h(e);
|
|
1097
1099
|
}
|
|
1098
1100
|
}
|
|
1099
|
-
class
|
|
1101
|
+
class xs {
|
|
1100
1102
|
renderTemplatesToNodeStream(e, r) {
|
|
1101
|
-
const n = new
|
|
1103
|
+
const n = new Ss();
|
|
1102
1104
|
return Promise.resolve().then(() => Z(this.renderTemplates(e, r, n))).then(() => n.end(), (i) => n.error(i)), n.stream;
|
|
1103
1105
|
}
|
|
1104
1106
|
*renderTemplates(e, r, n) {
|
|
1105
|
-
n || (n = r.opts.keepOutputType ? new
|
|
1107
|
+
n || (n = r.opts.keepOutputType ? new ks() : new Os());
|
|
1106
1108
|
const i = [];
|
|
1107
1109
|
for (const s of e) {
|
|
1108
1110
|
r.renderLimit.check(_n().now());
|
|
@@ -1111,7 +1113,7 @@ class Ss {
|
|
|
1111
1113
|
if (o && n.write(o), n.break || n.continue)
|
|
1112
1114
|
break;
|
|
1113
1115
|
} catch (o) {
|
|
1114
|
-
const a = fe.is(o) ? o : new
|
|
1116
|
+
const a = fe.is(o) ? o : new Ci(o, s);
|
|
1115
1117
|
if (r.opts.catchAllErrors)
|
|
1116
1118
|
i.push(a);
|
|
1117
1119
|
else
|
|
@@ -1123,9 +1125,9 @@ class Ss {
|
|
|
1123
1125
|
return n.buffer;
|
|
1124
1126
|
}
|
|
1125
1127
|
}
|
|
1126
|
-
class
|
|
1128
|
+
class Ls {
|
|
1127
1129
|
constructor(e) {
|
|
1128
|
-
this.postfix = [...
|
|
1130
|
+
this.postfix = [...Ds(e)];
|
|
1129
1131
|
}
|
|
1130
1132
|
*evaluate(e, r) {
|
|
1131
1133
|
R(e, "unable to evaluate: context not defined");
|
|
@@ -1134,7 +1136,7 @@ class ks {
|
|
|
1134
1136
|
if ($n(i)) {
|
|
1135
1137
|
const s = n.pop();
|
|
1136
1138
|
let o;
|
|
1137
|
-
if (
|
|
1139
|
+
if (hs[i.operator] === 1)
|
|
1138
1140
|
o = yield e.opts.operators[i.operator](s, e);
|
|
1139
1141
|
else {
|
|
1140
1142
|
const a = n.pop();
|
|
@@ -1153,13 +1155,13 @@ function* S(t, e, r = !1) {
|
|
|
1153
1155
|
if (t) {
|
|
1154
1156
|
if ("content" in t)
|
|
1155
1157
|
return t.content;
|
|
1156
|
-
if (
|
|
1157
|
-
return yield
|
|
1158
|
-
if (
|
|
1159
|
-
return yield
|
|
1158
|
+
if (mo(t))
|
|
1159
|
+
return yield As(t, e, r);
|
|
1160
|
+
if (go(t))
|
|
1161
|
+
return yield Fs(t, e);
|
|
1160
1162
|
}
|
|
1161
1163
|
}
|
|
1162
|
-
function*
|
|
1164
|
+
function* As(t, e, r) {
|
|
1163
1165
|
const n = [];
|
|
1164
1166
|
for (const i of t.props)
|
|
1165
1167
|
n.push(yield S(i, e, !1));
|
|
@@ -1172,17 +1174,17 @@ function* xs(t, e, r) {
|
|
|
1172
1174
|
} catch (i) {
|
|
1173
1175
|
if (r && i.name === "InternalUndefinedVariableError")
|
|
1174
1176
|
return null;
|
|
1175
|
-
throw new
|
|
1177
|
+
throw new qi(i, t);
|
|
1176
1178
|
}
|
|
1177
1179
|
}
|
|
1178
1180
|
function Rn(t) {
|
|
1179
1181
|
return t.content;
|
|
1180
1182
|
}
|
|
1181
|
-
function*
|
|
1183
|
+
function* Fs(t, e) {
|
|
1182
1184
|
const r = yield S(t.lhs, e), n = yield S(t.rhs, e);
|
|
1183
1185
|
return vn(+r, +n + 1);
|
|
1184
1186
|
}
|
|
1185
|
-
function*
|
|
1187
|
+
function* Ds(t) {
|
|
1186
1188
|
const e = [];
|
|
1187
1189
|
for (const r of t)
|
|
1188
1190
|
if ($n(r)) {
|
|
@@ -1200,7 +1202,7 @@ function se(t, e) {
|
|
|
1200
1202
|
function it(t, e) {
|
|
1201
1203
|
return t = m(t), e.opts.jsTruthy ? !t : t === !1 || t === void 0 || t === null;
|
|
1202
1204
|
}
|
|
1203
|
-
const
|
|
1205
|
+
const _s = {
|
|
1204
1206
|
"==": H,
|
|
1205
1207
|
"!=": (t, e) => !H(t, e),
|
|
1206
1208
|
">": (t, e) => V(t) ? t.gt(e) : V(e) ? e.lt(t) : m(t) > m(e),
|
|
@@ -1213,12 +1215,12 @@ const Fs = {
|
|
|
1213
1215
|
or: (t, e, r) => se(m(t), r) || se(m(e), r)
|
|
1214
1216
|
};
|
|
1215
1217
|
function H(t, e) {
|
|
1216
|
-
return V(t) ? t.equals(e) : V(e) ? e.equals(t) : (t = m(t), e = m(e), A(t) ? A(e) &&
|
|
1218
|
+
return V(t) ? t.equals(e) : V(e) ? e.equals(t) : (t = m(t), e = m(e), A(t) ? A(e) && Rs(t, e) : t === e);
|
|
1217
1219
|
}
|
|
1218
|
-
function
|
|
1220
|
+
function Rs(t, e) {
|
|
1219
1221
|
return t.length !== e.length ? !1 : !t.some((r, n) => !H(r, e[n]));
|
|
1220
1222
|
}
|
|
1221
|
-
function
|
|
1223
|
+
function Ps(t, e) {
|
|
1222
1224
|
return t.some((r) => H(r, e));
|
|
1223
1225
|
}
|
|
1224
1226
|
class ct {
|
|
@@ -1265,14 +1267,14 @@ function Pn(t, e) {
|
|
|
1265
1267
|
const s = i.href;
|
|
1266
1268
|
return n.removeChild(r), s;
|
|
1267
1269
|
}
|
|
1268
|
-
function
|
|
1270
|
+
function Es(t, e, r) {
|
|
1269
1271
|
return t.length && wn(t) !== "/" && (t += "/"), Pn(t, e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (i, s, o) => {
|
|
1270
1272
|
const a = o.split("/").pop();
|
|
1271
1273
|
return /\.\w+$/.test(a) ? i : s + o + r;
|
|
1272
1274
|
});
|
|
1273
1275
|
}
|
|
1274
|
-
function
|
|
1275
|
-
return
|
|
1276
|
+
function Ns(t) {
|
|
1277
|
+
return q(this, void 0, void 0, function* () {
|
|
1276
1278
|
return new Promise((e, r) => {
|
|
1277
1279
|
const n = new XMLHttpRequest();
|
|
1278
1280
|
n.onload = () => {
|
|
@@ -1283,41 +1285,41 @@ function Ps(t) {
|
|
|
1283
1285
|
});
|
|
1284
1286
|
});
|
|
1285
1287
|
}
|
|
1286
|
-
function
|
|
1288
|
+
function $s(t) {
|
|
1287
1289
|
const e = new XMLHttpRequest();
|
|
1288
1290
|
if (e.open("GET", t, !1), e.send(), e.status < 200 || e.status >= 300)
|
|
1289
1291
|
throw new Error(e.statusText);
|
|
1290
1292
|
return e.responseText;
|
|
1291
1293
|
}
|
|
1292
|
-
function
|
|
1293
|
-
return
|
|
1294
|
+
function Is(t) {
|
|
1295
|
+
return q(this, void 0, void 0, function* () {
|
|
1294
1296
|
return !0;
|
|
1295
1297
|
});
|
|
1296
1298
|
}
|
|
1297
|
-
function
|
|
1299
|
+
function js(t) {
|
|
1298
1300
|
return !0;
|
|
1299
1301
|
}
|
|
1300
|
-
function
|
|
1302
|
+
function zs(t) {
|
|
1301
1303
|
return Pn(t, ".");
|
|
1302
1304
|
}
|
|
1303
|
-
const
|
|
1304
|
-
var
|
|
1305
|
+
const Ms = "/";
|
|
1306
|
+
var Cs = /* @__PURE__ */ Object.freeze({
|
|
1305
1307
|
__proto__: null,
|
|
1306
|
-
resolve:
|
|
1307
|
-
readFile:
|
|
1308
|
-
readFileSync:
|
|
1309
|
-
exists:
|
|
1310
|
-
existsSync:
|
|
1311
|
-
dirname:
|
|
1312
|
-
sep:
|
|
1308
|
+
resolve: Es,
|
|
1309
|
+
readFile: Ns,
|
|
1310
|
+
readFileSync: $s,
|
|
1311
|
+
exists: Is,
|
|
1312
|
+
existsSync: js,
|
|
1313
|
+
dirname: zs,
|
|
1314
|
+
sep: Ms
|
|
1313
1315
|
});
|
|
1314
|
-
function
|
|
1315
|
-
return t = m(t), A(t) ||
|
|
1316
|
+
function qs(t, e, ...r) {
|
|
1317
|
+
return t = m(t), A(t) || j(t) ? t.length ? t : e : t === !1 && new Map(r).get("allow_false") ? !1 : it(t, this.context) ? e : t;
|
|
1316
1318
|
}
|
|
1317
1319
|
function Tr(t, e = 0) {
|
|
1318
1320
|
return JSON.stringify(t, null, e);
|
|
1319
1321
|
}
|
|
1320
|
-
function
|
|
1322
|
+
function Us(t, e = 0) {
|
|
1321
1323
|
const r = [];
|
|
1322
1324
|
return JSON.stringify(t, function(n, i) {
|
|
1323
1325
|
if (typeof i != "object" || i === null)
|
|
@@ -1327,28 +1329,28 @@ function Cs(t, e = 0) {
|
|
|
1327
1329
|
return r.includes(i) ? "[Circular]" : (r.push(i), i);
|
|
1328
1330
|
}, e);
|
|
1329
1331
|
}
|
|
1330
|
-
function
|
|
1332
|
+
function Vs(t) {
|
|
1331
1333
|
return Number(t);
|
|
1332
1334
|
}
|
|
1333
|
-
const
|
|
1335
|
+
const Bs = {
|
|
1334
1336
|
raw: !0,
|
|
1335
1337
|
handler: Tn
|
|
1336
1338
|
};
|
|
1337
1339
|
var En = {
|
|
1338
|
-
default:
|
|
1339
|
-
raw:
|
|
1340
|
+
default: qs,
|
|
1341
|
+
raw: Bs,
|
|
1340
1342
|
jsonify: Tr,
|
|
1341
|
-
to_integer:
|
|
1343
|
+
to_integer: Vs,
|
|
1342
1344
|
json: Tr,
|
|
1343
|
-
inspect:
|
|
1345
|
+
inspect: Us
|
|
1344
1346
|
};
|
|
1345
|
-
const
|
|
1347
|
+
const Hs = {
|
|
1346
1348
|
"&": "&",
|
|
1347
1349
|
"<": "<",
|
|
1348
1350
|
">": ">",
|
|
1349
1351
|
'"': """,
|
|
1350
1352
|
"'": "'"
|
|
1351
|
-
},
|
|
1353
|
+
}, Ws = {
|
|
1352
1354
|
"&": "&",
|
|
1353
1355
|
"<": "<",
|
|
1354
1356
|
">": ">",
|
|
@@ -1356,54 +1358,54 @@ const Vs = {
|
|
|
1356
1358
|
"'": "'"
|
|
1357
1359
|
};
|
|
1358
1360
|
function st(t) {
|
|
1359
|
-
return t = h(t), this.context.memoryLimit.use(t.length), t.replace(/&|<|>|"|'/g, (e) =>
|
|
1361
|
+
return t = h(t), this.context.memoryLimit.use(t.length), t.replace(/&|<|>|"|'/g, (e) => Hs[e]);
|
|
1360
1362
|
}
|
|
1361
|
-
function
|
|
1363
|
+
function Ys(t) {
|
|
1362
1364
|
return st.call(this, t);
|
|
1363
1365
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return t = h(t), this.context.memoryLimit.use(t.length), t.replace(/&(amp|lt|gt|#34|#39);/g, (e) =>
|
|
1366
|
+
function Js(t) {
|
|
1367
|
+
return t = h(t), this.context.memoryLimit.use(t.length), t.replace(/&(amp|lt|gt|#34|#39);/g, (e) => Ws[e]);
|
|
1366
1368
|
}
|
|
1367
|
-
function
|
|
1368
|
-
return st.call(this,
|
|
1369
|
+
function Qs(t) {
|
|
1370
|
+
return st.call(this, Js.call(this, t));
|
|
1369
1371
|
}
|
|
1370
|
-
function
|
|
1372
|
+
function Zs(t) {
|
|
1371
1373
|
const e = h(t);
|
|
1372
1374
|
return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, `<br />
|
|
1373
1375
|
`);
|
|
1374
1376
|
}
|
|
1375
|
-
function
|
|
1377
|
+
function Gs(t) {
|
|
1376
1378
|
const e = h(t);
|
|
1377
1379
|
return this.context.memoryLimit.use(e.length), e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g, "");
|
|
1378
1380
|
}
|
|
1379
|
-
var
|
|
1381
|
+
var Xs = /* @__PURE__ */ Object.freeze({
|
|
1380
1382
|
__proto__: null,
|
|
1381
1383
|
escape: st,
|
|
1382
|
-
xml_escape:
|
|
1383
|
-
escape_once:
|
|
1384
|
-
newline_to_br:
|
|
1385
|
-
strip_html:
|
|
1384
|
+
xml_escape: Ys,
|
|
1385
|
+
escape_once: Qs,
|
|
1386
|
+
newline_to_br: Zs,
|
|
1387
|
+
strip_html: Gs
|
|
1386
1388
|
});
|
|
1387
|
-
class
|
|
1389
|
+
class Ks {
|
|
1388
1390
|
constructor(e) {
|
|
1389
1391
|
this.mapping = e, this.sep = "/";
|
|
1390
1392
|
}
|
|
1391
1393
|
exists(e) {
|
|
1392
|
-
return
|
|
1394
|
+
return q(this, void 0, void 0, function* () {
|
|
1393
1395
|
return this.existsSync(e);
|
|
1394
1396
|
});
|
|
1395
1397
|
}
|
|
1396
1398
|
existsSync(e) {
|
|
1397
|
-
return
|
|
1399
|
+
return !z(this.mapping[e]);
|
|
1398
1400
|
}
|
|
1399
1401
|
readFile(e) {
|
|
1400
|
-
return
|
|
1402
|
+
return q(this, void 0, void 0, function* () {
|
|
1401
1403
|
return this.readFileSync(e);
|
|
1402
1404
|
});
|
|
1403
1405
|
}
|
|
1404
1406
|
readFileSync(e) {
|
|
1405
1407
|
const r = this.mapping[e];
|
|
1406
|
-
if (
|
|
1408
|
+
if (z(r))
|
|
1407
1409
|
throw new Error(`ENOENT: ${e}`);
|
|
1408
1410
|
return r;
|
|
1409
1411
|
}
|
|
@@ -1429,7 +1431,7 @@ const de = {
|
|
|
1429
1431
|
keyValueSeparator: ":",
|
|
1430
1432
|
cache: void 0,
|
|
1431
1433
|
extname: "",
|
|
1432
|
-
fs:
|
|
1434
|
+
fs: Cs,
|
|
1433
1435
|
dynamicPartials: !0,
|
|
1434
1436
|
jsTruthy: !1,
|
|
1435
1437
|
dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
|
|
@@ -1450,45 +1452,45 @@ const de = {
|
|
|
1450
1452
|
lenientIf: !1,
|
|
1451
1453
|
globals: {},
|
|
1452
1454
|
keepOutputType: !1,
|
|
1453
|
-
operators:
|
|
1455
|
+
operators: _s,
|
|
1454
1456
|
memoryLimit: 1 / 0,
|
|
1455
1457
|
parseLimit: 1 / 0,
|
|
1456
1458
|
renderLimit: 1 / 0
|
|
1457
1459
|
};
|
|
1458
|
-
function
|
|
1460
|
+
function eo(t) {
|
|
1459
1461
|
var e, r;
|
|
1460
1462
|
if (t.hasOwnProperty("root") && (t.hasOwnProperty("partials") || (t.partials = t.root), t.hasOwnProperty("layouts") || (t.layouts = t.root)), t.hasOwnProperty("cache")) {
|
|
1461
1463
|
let n;
|
|
1462
1464
|
typeof t.cache == "number" ? n = t.cache > 0 ? new br(t.cache) : void 0 : typeof t.cache == "object" ? n = t.cache : n = t.cache ? new br(1024) : void 0, t.cache = n;
|
|
1463
1465
|
}
|
|
1464
|
-
return t = Object.assign(Object.assign(Object.assign({}, de), t.jekyllInclude ? { dynamicPartials: !1 } : {}), t), (!t.fs.dirname || !t.fs.sep) && t.relativeReference && (console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"), t.relativeReference = !1), t.root = We(t.root), t.partials = We(t.partials), t.layouts = We(t.layouts), t.outputEscape = t.outputEscape &&
|
|
1466
|
+
return t = Object.assign(Object.assign(Object.assign({}, de), t.jekyllInclude ? { dynamicPartials: !1 } : {}), t), (!t.fs.dirname || !t.fs.sep) && t.relativeReference && (console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"), t.relativeReference = !1), t.root = We(t.root), t.partials = We(t.partials), t.layouts = We(t.layouts), t.outputEscape = t.outputEscape && to(t.outputEscape), t.locale || (t.locale = (r = (e = Ln()) === null || e === void 0 ? void 0 : e().resolvedOptions().locale) !== null && r !== void 0 ? r : "en-US"), t.templates && (t.fs = new Ks(t.templates), t.relativeReference = !0, t.root = t.partials = t.layouts = "."), t;
|
|
1465
1467
|
}
|
|
1466
|
-
function
|
|
1468
|
+
function to(t) {
|
|
1467
1469
|
return t === "escape" ? st : t === "json" ? En.json : (R(x(t), "`outputEscape` need to be of type string or function"), t);
|
|
1468
1470
|
}
|
|
1469
1471
|
function We(t) {
|
|
1470
1472
|
let e = [];
|
|
1471
|
-
return A(t) && (e = t),
|
|
1473
|
+
return A(t) && (e = t), j(t) && (e = [t]), e;
|
|
1472
1474
|
}
|
|
1473
|
-
function
|
|
1475
|
+
function ro(t, e) {
|
|
1474
1476
|
let r = !1;
|
|
1475
1477
|
for (let n = 0; n < t.length; n++) {
|
|
1476
1478
|
const i = t[n];
|
|
1477
|
-
|
|
1479
|
+
fo(i) && (!r && i.trimLeft && no(t[n - 1], e.greedy), he(i) && (i.name === "raw" ? r = !0 : i.name === "endraw" && (r = !1)), !r && i.trimRight && io(t[n + 1], e.greedy));
|
|
1478
1480
|
}
|
|
1479
1481
|
}
|
|
1480
|
-
function
|
|
1482
|
+
function no(t, e) {
|
|
1481
1483
|
if (!t || !Bt(t))
|
|
1482
1484
|
return;
|
|
1483
1485
|
const r = e ? ve : Sn;
|
|
1484
|
-
for (;
|
|
1486
|
+
for (; y[t.input.charCodeAt(t.end - 1 - t.trimRight)] & r; )
|
|
1485
1487
|
t.trimRight++;
|
|
1486
1488
|
}
|
|
1487
|
-
function
|
|
1489
|
+
function io(t, e) {
|
|
1488
1490
|
if (!t || !Bt(t))
|
|
1489
1491
|
return;
|
|
1490
1492
|
const r = e ? ve : Sn;
|
|
1491
|
-
for (;
|
|
1493
|
+
for (; y[t.input.charCodeAt(t.begin + t.trimLeft)] & r; )
|
|
1492
1494
|
t.trimLeft++;
|
|
1493
1495
|
t.input.charAt(t.begin + t.trimLeft) === `
|
|
1494
1496
|
` && t.trimLeft++;
|
|
@@ -1498,7 +1500,7 @@ class Q {
|
|
|
1498
1500
|
this.input = e, this.file = n, this.rawBeginAt = -1, this.p = i ? i[0] : 0, this.N = i ? i[1] : e.length, this.opTrie = cr(r), this.literalTrie = cr(kn);
|
|
1499
1501
|
}
|
|
1500
1502
|
readExpression() {
|
|
1501
|
-
return new
|
|
1503
|
+
return new Ls(this.readExpressionTokens());
|
|
1502
1504
|
}
|
|
1503
1505
|
*readExpressionTokens() {
|
|
1504
1506
|
for (; this.p < this.N; ) {
|
|
@@ -1519,7 +1521,7 @@ class Q {
|
|
|
1519
1521
|
this.skipBlank();
|
|
1520
1522
|
const e = this.matchTrie(this.opTrie);
|
|
1521
1523
|
if (e !== -1)
|
|
1522
|
-
return new
|
|
1524
|
+
return new ps(this.input, this.p, this.p = e, this.file);
|
|
1523
1525
|
}
|
|
1524
1526
|
matchTrie(e) {
|
|
1525
1527
|
let r = e, n = this.p, i;
|
|
@@ -1531,7 +1533,7 @@ class Q {
|
|
|
1531
1533
|
const e = this.p, r = this.readExpression();
|
|
1532
1534
|
this.assert(r.valid(), `invalid value expression: ${this.snapshot()}`);
|
|
1533
1535
|
const n = this.readFilters();
|
|
1534
|
-
return new
|
|
1536
|
+
return new bs(r, n, this.input, e, this.p, this.file);
|
|
1535
1537
|
}
|
|
1536
1538
|
readFilters() {
|
|
1537
1539
|
const e = [];
|
|
@@ -1575,7 +1577,7 @@ class Q {
|
|
|
1575
1577
|
const n = this.readTopLevelToken(e);
|
|
1576
1578
|
r.push(n);
|
|
1577
1579
|
}
|
|
1578
|
-
return
|
|
1580
|
+
return ro(r, e), r;
|
|
1579
1581
|
}
|
|
1580
1582
|
readTopLevelToken(e) {
|
|
1581
1583
|
const { tagDelimiterLeft: r, outputDelimiterLeft: n } = e;
|
|
@@ -1609,7 +1611,7 @@ class Q {
|
|
|
1609
1611
|
const { file: r, input: n } = this, { outputDelimiterRight: i } = e, s = this.p;
|
|
1610
1612
|
if (this.readToDelimiter(i, !0) === -1)
|
|
1611
1613
|
throw this.error(`output ${this.snapshot(s)} not closed`, s);
|
|
1612
|
-
return new
|
|
1614
|
+
return new ls(n, s, this.p, e, r);
|
|
1613
1615
|
}
|
|
1614
1616
|
readEndrawOrRawContent(e) {
|
|
1615
1617
|
const { tagDelimiterLeft: r, tagDelimiterRight: n } = e, i = this.p;
|
|
@@ -1646,17 +1648,17 @@ class Q {
|
|
|
1646
1648
|
this.readToDelimiter(`
|
|
1647
1649
|
`);
|
|
1648
1650
|
const n = this.p;
|
|
1649
|
-
return new
|
|
1651
|
+
return new vs(this.input, r, n, e, this.file);
|
|
1650
1652
|
}
|
|
1651
1653
|
error(e, r = this.p) {
|
|
1652
|
-
return new
|
|
1654
|
+
return new zi(e, new lt(this.input, r, this.N, this.file));
|
|
1653
1655
|
}
|
|
1654
1656
|
assert(e, r, n) {
|
|
1655
1657
|
if (!e)
|
|
1656
1658
|
throw this.error(typeof r == "function" ? r() : r, n);
|
|
1657
1659
|
}
|
|
1658
1660
|
snapshot(e = this.p) {
|
|
1659
|
-
return JSON.stringify(
|
|
1661
|
+
return JSON.stringify(ji(this.input.slice(e, this.N), 32));
|
|
1660
1662
|
}
|
|
1661
1663
|
/**
|
|
1662
1664
|
* @deprecated use #readIdentifier instead
|
|
@@ -1694,8 +1696,8 @@ class Q {
|
|
|
1694
1696
|
return;
|
|
1695
1697
|
let i;
|
|
1696
1698
|
this.skipBlank();
|
|
1697
|
-
const s =
|
|
1698
|
-
return this.peek() === s && (++this.p, i = this.readValue()), new
|
|
1699
|
+
const s = j(e) ? e : e ? "=" : ":";
|
|
1700
|
+
return this.peek() === s && (++this.p, i = this.readValue()), new ds(this.input, r, this.p, n, i, this.file);
|
|
1699
1701
|
}
|
|
1700
1702
|
remaining() {
|
|
1701
1703
|
return this.input.slice(this.p, this.N);
|
|
@@ -1757,8 +1759,8 @@ class Q {
|
|
|
1757
1759
|
readNumber() {
|
|
1758
1760
|
this.skipBlank();
|
|
1759
1761
|
let e = !1, r = !1, n = 0;
|
|
1760
|
-
for (this.peekType() &
|
|
1761
|
-
if (this.peekType(n) &
|
|
1762
|
+
for (this.peekType() & Ji && n++; this.p + n <= this.N; )
|
|
1763
|
+
if (this.peekType(n) & Yi)
|
|
1762
1764
|
r = !0, n++;
|
|
1763
1765
|
else if (this.peek(n) === "." && this.peek(n + 1) !== ".") {
|
|
1764
1766
|
if (e || !r)
|
|
@@ -1767,7 +1769,7 @@ class Q {
|
|
|
1767
1769
|
} else
|
|
1768
1770
|
break;
|
|
1769
1771
|
if (r && !Be(this.peek(n))) {
|
|
1770
|
-
const i = new
|
|
1772
|
+
const i = new cs(this.input, this.p, this.p + n, this.file);
|
|
1771
1773
|
return this.advance(n), i;
|
|
1772
1774
|
}
|
|
1773
1775
|
}
|
|
@@ -1776,7 +1778,7 @@ class Q {
|
|
|
1776
1778
|
const e = this.matchTrie(this.literalTrie);
|
|
1777
1779
|
if (e === -1)
|
|
1778
1780
|
return;
|
|
1779
|
-
const r = new
|
|
1781
|
+
const r = new fs(this.input, this.p, e, this.file);
|
|
1780
1782
|
return this.p = e, r;
|
|
1781
1783
|
}
|
|
1782
1784
|
readRange() {
|
|
@@ -1788,7 +1790,7 @@ class Q {
|
|
|
1788
1790
|
const r = this.readValueOrThrow();
|
|
1789
1791
|
this.p += 2;
|
|
1790
1792
|
const n = this.readValueOrThrow();
|
|
1791
|
-
return ++this.p, new
|
|
1793
|
+
return ++this.p, new ws(this.input, e, this.p, r, n, this.file);
|
|
1792
1794
|
}
|
|
1793
1795
|
readValueOrThrow() {
|
|
1794
1796
|
const e = this.readValue();
|
|
@@ -1803,7 +1805,7 @@ class Q {
|
|
|
1803
1805
|
let r = !1;
|
|
1804
1806
|
for (; this.p < this.N && (++this.p, !(this.input[this.p - 1] === this.input[e] && !r)); )
|
|
1805
1807
|
r ? r = !1 : this.input[this.p - 1] === "\\" && (r = !0);
|
|
1806
|
-
return new
|
|
1808
|
+
return new ys(this.input, e, this.p, this.file);
|
|
1807
1809
|
}
|
|
1808
1810
|
*readFileNameTemplate(e) {
|
|
1809
1811
|
const { outputDelimiterLeft: r } = e, n = [",", " ", r], i = new Set(n);
|
|
@@ -1823,7 +1825,7 @@ class Q {
|
|
|
1823
1825
|
return !0;
|
|
1824
1826
|
}
|
|
1825
1827
|
peekType(e = 0) {
|
|
1826
|
-
return this.p + e >= this.N ? 0 :
|
|
1828
|
+
return this.p + e >= this.N ? 0 : y[this.input.charCodeAt(this.p + e)];
|
|
1827
1829
|
}
|
|
1828
1830
|
peek(e = 0) {
|
|
1829
1831
|
return this.p + e >= this.N ? "" : this.input[this.p + e];
|
|
@@ -1833,7 +1835,7 @@ class Q {
|
|
|
1833
1835
|
++this.p;
|
|
1834
1836
|
}
|
|
1835
1837
|
}
|
|
1836
|
-
class
|
|
1838
|
+
class so {
|
|
1837
1839
|
constructor(e, r) {
|
|
1838
1840
|
this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = r;
|
|
1839
1841
|
}
|
|
@@ -1883,7 +1885,7 @@ class Oe {
|
|
|
1883
1885
|
return r;
|
|
1884
1886
|
}
|
|
1885
1887
|
}
|
|
1886
|
-
function
|
|
1888
|
+
function oo(t) {
|
|
1887
1889
|
return class extends T {
|
|
1888
1890
|
constructor(e, r, n) {
|
|
1889
1891
|
super(e, r, n), x(t.parse) && t.parse.call(this, e, r);
|
|
@@ -1894,7 +1896,7 @@ function io(t) {
|
|
|
1894
1896
|
}
|
|
1895
1897
|
};
|
|
1896
1898
|
}
|
|
1897
|
-
function
|
|
1899
|
+
function ao(t) {
|
|
1898
1900
|
return A(t);
|
|
1899
1901
|
}
|
|
1900
1902
|
class Nn {
|
|
@@ -1904,11 +1906,11 @@ class Nn {
|
|
|
1904
1906
|
*render(e, r) {
|
|
1905
1907
|
const n = [];
|
|
1906
1908
|
for (const i of this.args)
|
|
1907
|
-
|
|
1909
|
+
ao(i) ? n.push([i[0], yield S(i[1], r)]) : n.push(yield S(i, r));
|
|
1908
1910
|
return yield this.handler.apply({ context: r, token: this.token, liquid: this.liquid }, [e, ...n]);
|
|
1909
1911
|
}
|
|
1910
1912
|
}
|
|
1911
|
-
class
|
|
1913
|
+
class M {
|
|
1912
1914
|
/**
|
|
1913
1915
|
* @param str the value to be valuated, eg.: "foobar" | truncate: 3
|
|
1914
1916
|
*/
|
|
@@ -1929,12 +1931,12 @@ class I {
|
|
|
1929
1931
|
return R(n || !e.options.strictFilters, () => `undefined filter: ${r}`), n;
|
|
1930
1932
|
}
|
|
1931
1933
|
}
|
|
1932
|
-
class
|
|
1934
|
+
class uo extends Vt {
|
|
1933
1935
|
constructor(e, r) {
|
|
1934
1936
|
var n;
|
|
1935
1937
|
super(e);
|
|
1936
1938
|
const i = new Q(e.input, r.options.operators, e.file, e.contentRange);
|
|
1937
|
-
this.value = new
|
|
1939
|
+
this.value = new M(i.readFilteredValue(), r);
|
|
1938
1940
|
const s = this.value.filters, o = r.options.outputEscape;
|
|
1939
1941
|
if (!(!((n = s[s.length - 1]) === null || n === void 0) && n.raw) && o) {
|
|
1940
1942
|
const a = new Dn(toString.call(o), [], "", 0, 0);
|
|
@@ -1946,7 +1948,7 @@ class oo extends Vt {
|
|
|
1946
1948
|
r.write(n);
|
|
1947
1949
|
}
|
|
1948
1950
|
}
|
|
1949
|
-
class
|
|
1951
|
+
class lo extends Vt {
|
|
1950
1952
|
constructor(e) {
|
|
1951
1953
|
super(e), this.str = e.getContent();
|
|
1952
1954
|
}
|
|
@@ -1958,12 +1960,12 @@ var ue;
|
|
|
1958
1960
|
(function(t) {
|
|
1959
1961
|
t.Partials = "partials", t.Layouts = "layouts", t.Root = "root";
|
|
1960
1962
|
})(ue || (ue = {}));
|
|
1961
|
-
class
|
|
1963
|
+
class co {
|
|
1962
1964
|
constructor(e) {
|
|
1963
1965
|
if (this.options = e, e.relativeReference) {
|
|
1964
1966
|
const r = e.fs.sep;
|
|
1965
1967
|
R(r, "`fs.sep` is required for relative reference");
|
|
1966
|
-
const n = new RegExp(["." + r, ".." + r, "./", "../"].map((i) =>
|
|
1968
|
+
const n = new RegExp(["." + r, ".." + r, "./", "../"].map((i) => Pi(i)).join("|"));
|
|
1967
1969
|
this.shouldLoadRelative = (i) => n.test(i);
|
|
1968
1970
|
} else
|
|
1969
1971
|
this.shouldLoadRelative = (r) => !1;
|
|
@@ -2006,7 +2008,7 @@ class uo {
|
|
|
2006
2008
|
}
|
|
2007
2009
|
class te {
|
|
2008
2010
|
constructor(e) {
|
|
2009
|
-
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
|
|
2011
|
+
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 co(this.liquid.options), this.parseLimit = new yt("parse length", e.options.parseLimit);
|
|
2010
2012
|
}
|
|
2011
2013
|
parse(e, r) {
|
|
2012
2014
|
e = String(e), this.parseLimit.use(e.length);
|
|
@@ -2035,13 +2037,13 @@ class te {
|
|
|
2035
2037
|
const n = this.liquid.tags[e.name];
|
|
2036
2038
|
return R(n, `tag "${e.name}" not found`), new n(e, r, this.liquid, this);
|
|
2037
2039
|
}
|
|
2038
|
-
return
|
|
2040
|
+
return ho(e) ? new uo(e, this.liquid) : new lo(e);
|
|
2039
2041
|
} catch (n) {
|
|
2040
|
-
throw fe.is(n) ? n : new
|
|
2042
|
+
throw fe.is(n) ? n : new Mi(n, e);
|
|
2041
2043
|
}
|
|
2042
2044
|
}
|
|
2043
2045
|
parseStream(e) {
|
|
2044
|
-
return new
|
|
2046
|
+
return new so(e, (r, n) => this.parseToken(r, n));
|
|
2045
2047
|
}
|
|
2046
2048
|
*_parseFileCached(e, r, n = ue.Root, i) {
|
|
2047
2049
|
const s = this.cache, o = this.loader.shouldLoadRelative(e) ? i + "," + e : n + ":" + e, a = yield s.read(o);
|
|
@@ -2064,7 +2066,7 @@ var b;
|
|
|
2064
2066
|
(function(t) {
|
|
2065
2067
|
t[t.Number = 1] = "Number", t[t.Literal = 2] = "Literal", t[t.Tag = 4] = "Tag", t[t.Output = 8] = "Output", t[t.HTML = 16] = "HTML", t[t.Filter = 32] = "Filter", t[t.Hash = 64] = "Hash", t[t.PropertyAccess = 128] = "PropertyAccess", t[t.Word = 256] = "Word", t[t.Range = 512] = "Range", t[t.Quoted = 1024] = "Quoted", t[t.Operator = 2048] = "Operator", t[t.FilteredValue = 4096] = "FilteredValue", t[t.Delimited = 12] = "Delimited";
|
|
2066
2068
|
})(b || (b = {}));
|
|
2067
|
-
function
|
|
2069
|
+
function fo(t) {
|
|
2068
2070
|
return !!(K(t) & b.Delimited);
|
|
2069
2071
|
}
|
|
2070
2072
|
function $n(t) {
|
|
@@ -2073,19 +2075,19 @@ function $n(t) {
|
|
|
2073
2075
|
function Bt(t) {
|
|
2074
2076
|
return K(t) === b.HTML;
|
|
2075
2077
|
}
|
|
2076
|
-
function
|
|
2078
|
+
function ho(t) {
|
|
2077
2079
|
return K(t) === b.Output;
|
|
2078
2080
|
}
|
|
2079
2081
|
function he(t) {
|
|
2080
2082
|
return K(t) === b.Tag;
|
|
2081
2083
|
}
|
|
2082
|
-
function
|
|
2084
|
+
function po(t) {
|
|
2083
2085
|
return K(t) === b.Quoted;
|
|
2084
2086
|
}
|
|
2085
|
-
function
|
|
2087
|
+
function mo(t) {
|
|
2086
2088
|
return K(t) === b.PropertyAccess;
|
|
2087
2089
|
}
|
|
2088
|
-
function
|
|
2090
|
+
function go(t) {
|
|
2089
2091
|
return K(t) === b.Range;
|
|
2090
2092
|
}
|
|
2091
2093
|
function K(t) {
|
|
@@ -2131,10 +2133,10 @@ class ie {
|
|
|
2131
2133
|
return G(this._getFromScope(e, r));
|
|
2132
2134
|
}
|
|
2133
2135
|
*_getFromScope(e, r, n = this.strictVariables) {
|
|
2134
|
-
|
|
2136
|
+
j(r) && (r = r.split("."));
|
|
2135
2137
|
for (let i = 0; i < r.length; i++)
|
|
2136
|
-
if (e = yield
|
|
2137
|
-
throw new
|
|
2138
|
+
if (e = yield yo(e, r[i], this.ownPropertyOnly), n && Ei(e))
|
|
2139
|
+
throw new Ui(r.slice(0, i + 1).join("."));
|
|
2138
2140
|
return e;
|
|
2139
2141
|
}
|
|
2140
2142
|
push(e) {
|
|
@@ -2165,28 +2167,28 @@ class ie {
|
|
|
2165
2167
|
return e in this.environments ? this.environments : this.globals;
|
|
2166
2168
|
}
|
|
2167
2169
|
}
|
|
2168
|
-
function
|
|
2169
|
-
if (t = yn(t), e = m(e),
|
|
2170
|
+
function yo(t, e, r) {
|
|
2171
|
+
if (t = yn(t), e = m(e), z(t))
|
|
2170
2172
|
return t;
|
|
2171
2173
|
if (A(t) && e < 0)
|
|
2172
2174
|
return t[t.length + +e];
|
|
2173
|
-
const n =
|
|
2174
|
-
return n === void 0 && t instanceof ce ? t.liquidMethodMissing(e) : x(n) ? n.call(t) : e === "size" ?
|
|
2175
|
+
const n = wo(t, e, r);
|
|
2176
|
+
return n === void 0 && t instanceof ce ? t.liquidMethodMissing(e) : x(n) ? n.call(t) : e === "size" ? To(t) : e === "first" ? vo(t) : e === "last" ? bo(t) : n;
|
|
2175
2177
|
}
|
|
2176
|
-
function
|
|
2178
|
+
function wo(t, e, r) {
|
|
2177
2179
|
if (!(r && !It.call(t, e) && !(t instanceof ce)))
|
|
2178
2180
|
return t[e];
|
|
2179
2181
|
}
|
|
2180
|
-
function
|
|
2182
|
+
function vo(t) {
|
|
2181
2183
|
return A(t) ? t[0] : t.first;
|
|
2182
2184
|
}
|
|
2183
|
-
function
|
|
2185
|
+
function bo(t) {
|
|
2184
2186
|
return A(t) ? t[t.length - 1] : t.last;
|
|
2185
2187
|
}
|
|
2186
|
-
function
|
|
2188
|
+
function To(t) {
|
|
2187
2189
|
if (It.call(t, "size") || t.size !== void 0)
|
|
2188
2190
|
return t.size;
|
|
2189
|
-
if (A(t) ||
|
|
2191
|
+
if (A(t) || j(t))
|
|
2190
2192
|
return t.length;
|
|
2191
2193
|
if (typeof t == "object")
|
|
2192
2194
|
return Object.keys(t).length;
|
|
@@ -2195,30 +2197,30 @@ var oe;
|
|
|
2195
2197
|
(function(t) {
|
|
2196
2198
|
t[t.OUTPUT = 0] = "OUTPUT", t[t.STORE = 1] = "STORE";
|
|
2197
2199
|
})(oe || (oe = {}));
|
|
2198
|
-
const
|
|
2199
|
-
function
|
|
2200
|
+
const Oo = I(Math.abs), So = I(Math.max), ko = I(Math.min), xo = I(Math.ceil), Lo = I((t, e, r = !1) => r ? Math.floor(t / e) : t / e), Ao = I(Math.floor), Fo = I((t, e) => t - e), Do = I((t, e) => t % e), _o = I((t, e) => t * e);
|
|
2201
|
+
function Ro(t, e = 0) {
|
|
2200
2202
|
t = m(t), e = m(e);
|
|
2201
2203
|
const r = Math.pow(10, e);
|
|
2202
2204
|
return Math.round(t * r) / r;
|
|
2203
2205
|
}
|
|
2204
|
-
function
|
|
2206
|
+
function Po(t, e) {
|
|
2205
2207
|
return t = m(t), e = m(e), Number(t) + Number(e);
|
|
2206
2208
|
}
|
|
2207
|
-
var
|
|
2209
|
+
var Eo = /* @__PURE__ */ Object.freeze({
|
|
2208
2210
|
__proto__: null,
|
|
2209
|
-
abs:
|
|
2210
|
-
at_least:
|
|
2211
|
-
at_most:
|
|
2212
|
-
ceil:
|
|
2213
|
-
divided_by:
|
|
2214
|
-
floor:
|
|
2215
|
-
minus:
|
|
2216
|
-
modulo:
|
|
2217
|
-
times:
|
|
2218
|
-
round:
|
|
2219
|
-
plus:
|
|
2211
|
+
abs: Oo,
|
|
2212
|
+
at_least: So,
|
|
2213
|
+
at_most: ko,
|
|
2214
|
+
ceil: xo,
|
|
2215
|
+
divided_by: Lo,
|
|
2216
|
+
floor: Ao,
|
|
2217
|
+
minus: Fo,
|
|
2218
|
+
modulo: Do,
|
|
2219
|
+
times: _o,
|
|
2220
|
+
round: Ro,
|
|
2221
|
+
plus: Po
|
|
2220
2222
|
});
|
|
2221
|
-
const
|
|
2223
|
+
const No = (t) => decodeURIComponent(h(t)).replace(/\+/g, " "), $o = (t) => encodeURIComponent(h(t)).replace(/%20/g, "+"), Io = (t) => encodeURIComponent(h(t)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), jo = (t) => encodeURI(h(t)).replace(/%5B/g, "[").replace(/%5D/g, "]"), Or = /[^\p{M}\p{L}\p{Nd}]+/ug, zo = {
|
|
2222
2224
|
raw: /\s+/g,
|
|
2223
2225
|
default: Or,
|
|
2224
2226
|
pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,
|
|
@@ -2226,30 +2228,30 @@ const Po = (t) => decodeURIComponent(h(t)).replace(/\+/g, " "), Eo = (t) => enco
|
|
|
2226
2228
|
latin: Or,
|
|
2227
2229
|
none: null
|
|
2228
2230
|
};
|
|
2229
|
-
function
|
|
2231
|
+
function Mo(t, e = "default", r = !1) {
|
|
2230
2232
|
t = h(t);
|
|
2231
|
-
const n =
|
|
2232
|
-
return n && (e === "latin" && (t =
|
|
2233
|
+
const n = zo[e];
|
|
2234
|
+
return n && (e === "latin" && (t = Co(t)), t = t.replace(n, "-").replace(/^-|-$/g, "")), r ? t : t.toLowerCase();
|
|
2233
2235
|
}
|
|
2234
|
-
function
|
|
2236
|
+
function Co(t) {
|
|
2235
2237
|
return t.replace(/[àáâãäå]/g, "a").replace(/[æ]/g, "ae").replace(/[ç]/g, "c").replace(/[èéêë]/g, "e").replace(/[ìíîï]/g, "i").replace(/[ð]/g, "d").replace(/[ñ]/g, "n").replace(/[òóôõöø]/g, "o").replace(/[ùúûü]/g, "u").replace(/[ýÿ]/g, "y").replace(/[ß]/g, "ss").replace(/[œ]/g, "oe").replace(/[þ]/g, "th").replace(/[ẞ]/g, "SS").replace(/[Œ]/g, "OE").replace(/[Þ]/g, "TH");
|
|
2236
2238
|
}
|
|
2237
|
-
var
|
|
2239
|
+
var qo = /* @__PURE__ */ Object.freeze({
|
|
2238
2240
|
__proto__: null,
|
|
2239
|
-
url_decode:
|
|
2240
|
-
url_encode:
|
|
2241
|
-
cgi_escape:
|
|
2242
|
-
uri_escape:
|
|
2243
|
-
slugify:
|
|
2241
|
+
url_decode: No,
|
|
2242
|
+
url_encode: $o,
|
|
2243
|
+
cgi_escape: Io,
|
|
2244
|
+
uri_escape: jo,
|
|
2245
|
+
slugify: Mo
|
|
2244
2246
|
});
|
|
2245
|
-
const
|
|
2246
|
-
const r = L(t), n =
|
|
2247
|
+
const Uo = I(function(t, e) {
|
|
2248
|
+
const r = L(t), n = z(e) ? " " : h(e), i = r.length * (1 + n.length);
|
|
2247
2249
|
return this.context.memoryLimit.use(i), r.join(n);
|
|
2248
|
-
}),
|
|
2250
|
+
}), Vo = I((t) => A(t) ? wn(t) : ""), Bo = I((t) => A(t) ? t[0] : ""), Ho = I(function(t) {
|
|
2249
2251
|
const e = L(t);
|
|
2250
2252
|
return this.context.memoryLimit.use(e.length), [...e].reverse();
|
|
2251
2253
|
});
|
|
2252
|
-
function*
|
|
2254
|
+
function* Wo(t, e) {
|
|
2253
2255
|
const r = [], n = L(t);
|
|
2254
2256
|
this.context.memoryLimit.use(n.length);
|
|
2255
2257
|
for (const i of n)
|
|
@@ -2262,19 +2264,19 @@ function* Bo(t, e) {
|
|
|
2262
2264
|
return o < a ? -1 : o > a ? 1 : 0;
|
|
2263
2265
|
}).map((i) => i[0]);
|
|
2264
2266
|
}
|
|
2265
|
-
function
|
|
2267
|
+
function Yo(t, e) {
|
|
2266
2268
|
const r = h(e), n = e === void 0 ? sr : (s, o) => sr(s[r], o[r]), i = L(t);
|
|
2267
2269
|
return this.context.memoryLimit.use(i.length), [...i].sort(n);
|
|
2268
2270
|
}
|
|
2269
|
-
const
|
|
2270
|
-
function*
|
|
2271
|
+
const Jo = (t) => t && t.length || 0;
|
|
2272
|
+
function* Qo(t, e) {
|
|
2271
2273
|
const r = [], n = L(t);
|
|
2272
2274
|
this.context.memoryLimit.use(n.length);
|
|
2273
2275
|
for (const i of n)
|
|
2274
2276
|
r.push(yield this.context._getFromScope(i, h(e), !1));
|
|
2275
2277
|
return r;
|
|
2276
2278
|
}
|
|
2277
|
-
function*
|
|
2279
|
+
function* Zo(t, e) {
|
|
2278
2280
|
let r = 0;
|
|
2279
2281
|
const n = L(t);
|
|
2280
2282
|
for (const i of n) {
|
|
@@ -2283,53 +2285,53 @@ function* Jo(t, e) {
|
|
|
2283
2285
|
}
|
|
2284
2286
|
return r;
|
|
2285
2287
|
}
|
|
2286
|
-
function
|
|
2288
|
+
function Go(t) {
|
|
2287
2289
|
const e = L(t);
|
|
2288
|
-
return this.context.memoryLimit.use(e.length), e.filter((r) =>
|
|
2290
|
+
return this.context.memoryLimit.use(e.length), e.filter((r) => !z(m(r)));
|
|
2289
2291
|
}
|
|
2290
2292
|
function In(t, e = []) {
|
|
2291
2293
|
const r = L(t), n = L(e);
|
|
2292
2294
|
return this.context.memoryLimit.use(r.length + n.length), r.concat(n);
|
|
2293
2295
|
}
|
|
2294
|
-
function
|
|
2296
|
+
function Xo(t, e) {
|
|
2295
2297
|
return In.call(this, t, [e]);
|
|
2296
2298
|
}
|
|
2297
|
-
function
|
|
2299
|
+
function Ko(t, e) {
|
|
2298
2300
|
const r = L(t);
|
|
2299
2301
|
this.context.memoryLimit.use(r.length);
|
|
2300
2302
|
const n = [...r];
|
|
2301
2303
|
return n.unshift(e), n;
|
|
2302
2304
|
}
|
|
2303
|
-
function
|
|
2305
|
+
function ea(t) {
|
|
2304
2306
|
const e = [...L(t)];
|
|
2305
2307
|
return e.pop(), e;
|
|
2306
2308
|
}
|
|
2307
|
-
function
|
|
2309
|
+
function ta(t) {
|
|
2308
2310
|
const e = L(t);
|
|
2309
2311
|
this.context.memoryLimit.use(e.length);
|
|
2310
2312
|
const r = [...e];
|
|
2311
2313
|
return r.shift(), r;
|
|
2312
2314
|
}
|
|
2313
|
-
function
|
|
2314
|
-
return t = m(t),
|
|
2315
|
+
function ra(t, e, r = 1) {
|
|
2316
|
+
return t = m(t), z(t) ? [] : (A(t) || (t = h(t)), e = e < 0 ? t.length + e : e, this.context.memoryLimit.use(r), t.slice(e, e + r));
|
|
2315
2317
|
}
|
|
2316
|
-
function*
|
|
2318
|
+
function* na(t, e, r) {
|
|
2317
2319
|
const n = [];
|
|
2318
2320
|
t = L(t), this.context.memoryLimit.use(t.length);
|
|
2319
2321
|
const i = new Q(h(e)).readScopeValue();
|
|
2320
2322
|
for (const o of t)
|
|
2321
2323
|
n.push(yield S(i, this.context.spawn(o)));
|
|
2322
|
-
const s = this.context.opts.jekyllWhere ? (o) => be.is(r) ? H(o, r) : A(o) ?
|
|
2324
|
+
const s = this.context.opts.jekyllWhere ? (o) => be.is(r) ? H(o, r) : A(o) ? Ps(o, r) : H(o, r) : (o) => H(o, r);
|
|
2323
2325
|
return t.filter((o, a) => r === void 0 ? se(n[a], this.context) : s(n[a]));
|
|
2324
2326
|
}
|
|
2325
|
-
function*
|
|
2326
|
-
const n = [], i = new
|
|
2327
|
+
function* ia(t, e, r) {
|
|
2328
|
+
const n = [], i = new M(h(r), this.liquid), s = L(t);
|
|
2327
2329
|
this.context.memoryLimit.use(s.length);
|
|
2328
2330
|
for (const o of s)
|
|
2329
2331
|
(yield i.value(this.context.spawn({ [e]: o }))) && n.push(o);
|
|
2330
2332
|
return n;
|
|
2331
2333
|
}
|
|
2332
|
-
function*
|
|
2334
|
+
function* sa(t, e) {
|
|
2333
2335
|
const r = /* @__PURE__ */ new Map();
|
|
2334
2336
|
t = L(t);
|
|
2335
2337
|
const n = new Q(h(e)).readScopeValue();
|
|
@@ -2340,8 +2342,8 @@ function* na(t, e) {
|
|
|
2340
2342
|
}
|
|
2341
2343
|
return [...r.entries()].map(([i, s]) => ({ name: i, items: s }));
|
|
2342
2344
|
}
|
|
2343
|
-
function*
|
|
2344
|
-
const n = /* @__PURE__ */ new Map(), i = new
|
|
2345
|
+
function* oa(t, e, r) {
|
|
2346
|
+
const n = /* @__PURE__ */ new Map(), i = new M(h(r), this.liquid);
|
|
2345
2347
|
t = L(t), this.context.memoryLimit.use(t.length);
|
|
2346
2348
|
for (const s of t) {
|
|
2347
2349
|
const o = yield i.value(this.context.spawn({ [e]: s }));
|
|
@@ -2349,7 +2351,7 @@ function* ia(t, e, r) {
|
|
|
2349
2351
|
}
|
|
2350
2352
|
return [...n.entries()].map(([s, o]) => ({ name: s, items: o }));
|
|
2351
2353
|
}
|
|
2352
|
-
function*
|
|
2354
|
+
function* aa(t, e, r) {
|
|
2353
2355
|
const n = new Q(h(e)).readScopeValue(), i = L(t);
|
|
2354
2356
|
for (const s of i) {
|
|
2355
2357
|
const o = yield S(n, this.context.spawn(s));
|
|
@@ -2357,70 +2359,70 @@ function* sa(t, e, r) {
|
|
|
2357
2359
|
return s;
|
|
2358
2360
|
}
|
|
2359
2361
|
}
|
|
2360
|
-
function*
|
|
2361
|
-
const n = new
|
|
2362
|
+
function* ua(t, e, r) {
|
|
2363
|
+
const n = new M(h(r), this.liquid), i = L(t);
|
|
2362
2364
|
for (const s of i)
|
|
2363
2365
|
if (yield n.value(this.context.spawn({ [e]: s })))
|
|
2364
2366
|
return s;
|
|
2365
2367
|
}
|
|
2366
|
-
function
|
|
2368
|
+
function la(t) {
|
|
2367
2369
|
return t = L(t), this.context.memoryLimit.use(t.length), [...new Set(t)];
|
|
2368
2370
|
}
|
|
2369
|
-
function
|
|
2370
|
-
if (t = m(t),
|
|
2371
|
+
function ca(t, e = 1) {
|
|
2372
|
+
if (t = m(t), z(t))
|
|
2371
2373
|
return [];
|
|
2372
2374
|
A(t) || (t = h(t)), this.context.memoryLimit.use(e);
|
|
2373
2375
|
const r = [...t].sort(() => Math.random() - 0.5);
|
|
2374
2376
|
return e === 1 ? r[0] : r.slice(0, e);
|
|
2375
2377
|
}
|
|
2376
|
-
var
|
|
2378
|
+
var fa = /* @__PURE__ */ Object.freeze({
|
|
2377
2379
|
__proto__: null,
|
|
2378
|
-
join:
|
|
2379
|
-
last:
|
|
2380
|
-
first:
|
|
2381
|
-
reverse:
|
|
2382
|
-
sort:
|
|
2383
|
-
sort_natural:
|
|
2384
|
-
size:
|
|
2385
|
-
map:
|
|
2386
|
-
sum:
|
|
2387
|
-
compact:
|
|
2380
|
+
join: Uo,
|
|
2381
|
+
last: Vo,
|
|
2382
|
+
first: Bo,
|
|
2383
|
+
reverse: Ho,
|
|
2384
|
+
sort: Wo,
|
|
2385
|
+
sort_natural: Yo,
|
|
2386
|
+
size: Jo,
|
|
2387
|
+
map: Qo,
|
|
2388
|
+
sum: Zo,
|
|
2389
|
+
compact: Go,
|
|
2388
2390
|
concat: In,
|
|
2389
|
-
push:
|
|
2390
|
-
unshift:
|
|
2391
|
-
pop:
|
|
2392
|
-
shift:
|
|
2393
|
-
slice:
|
|
2394
|
-
where:
|
|
2395
|
-
where_exp:
|
|
2396
|
-
group_by:
|
|
2397
|
-
group_by_exp:
|
|
2398
|
-
find:
|
|
2399
|
-
find_exp:
|
|
2400
|
-
uniq:
|
|
2401
|
-
sample:
|
|
2391
|
+
push: Xo,
|
|
2392
|
+
unshift: Ko,
|
|
2393
|
+
pop: ea,
|
|
2394
|
+
shift: ta,
|
|
2395
|
+
slice: ra,
|
|
2396
|
+
where: na,
|
|
2397
|
+
where_exp: ia,
|
|
2398
|
+
group_by: sa,
|
|
2399
|
+
group_by_exp: oa,
|
|
2400
|
+
find: aa,
|
|
2401
|
+
find_exp: ua,
|
|
2402
|
+
uniq: la,
|
|
2403
|
+
sample: ca
|
|
2402
2404
|
});
|
|
2403
2405
|
function Ht(t, e, r) {
|
|
2404
2406
|
var n, i, s;
|
|
2405
2407
|
const o = ((n = t == null ? void 0 : t.length) !== null && n !== void 0 ? n : 0) + ((i = e == null ? void 0 : e.length) !== null && i !== void 0 ? i : 0) + ((s = r == null ? void 0 : r.length) !== null && s !== void 0 ? s : 0);
|
|
2406
2408
|
this.context.memoryLimit.use(o);
|
|
2407
|
-
const a =
|
|
2408
|
-
return a ? (e = m(e), e =
|
|
2409
|
+
const a = zn(t, this.context.opts, r);
|
|
2410
|
+
return a ? (e = m(e), e = z(e) ? this.context.opts.dateFormat : h(e), He(a, e)) : t;
|
|
2409
2411
|
}
|
|
2410
|
-
function
|
|
2412
|
+
function ha(t) {
|
|
2411
2413
|
return Ht.call(this, t, "%Y-%m-%dT%H:%M:%S%:z");
|
|
2412
2414
|
}
|
|
2413
|
-
function
|
|
2415
|
+
function pa(t) {
|
|
2414
2416
|
return Ht.call(this, t, "%a, %d %b %Y %H:%M:%S %z");
|
|
2415
2417
|
}
|
|
2416
|
-
function
|
|
2418
|
+
function da(t, e, r) {
|
|
2417
2419
|
return jn.call(this, t, "%b", e, r);
|
|
2418
2420
|
}
|
|
2419
|
-
function
|
|
2421
|
+
function ma(t, e, r) {
|
|
2420
2422
|
return jn.call(this, t, "%B", e, r);
|
|
2421
2423
|
}
|
|
2422
2424
|
function jn(t, e, r, n) {
|
|
2423
|
-
const i =
|
|
2425
|
+
const i = zn(t, this.context.opts);
|
|
2424
2426
|
if (!i)
|
|
2425
2427
|
return t;
|
|
2426
2428
|
if (r === "ordinal") {
|
|
@@ -2429,60 +2431,60 @@ function jn(t, e, r, n) {
|
|
|
2429
2431
|
}
|
|
2430
2432
|
return He(i, `%d ${e} %Y`);
|
|
2431
2433
|
}
|
|
2432
|
-
function
|
|
2434
|
+
function zn(t, e, r) {
|
|
2433
2435
|
let n;
|
|
2434
2436
|
const i = r ?? e.timezoneOffset, s = e.locale;
|
|
2435
|
-
return t = m(t), t === "now" || t === "today" ? n = new
|
|
2437
|
+
return t = m(t), t === "now" || t === "today" ? n = new U(Date.now(), s, i) : zt(t) ? n = new U(t * 1e3, s, i) : j(t) ? /^\d+$/.test(t) ? n = new U(+t * 1e3, s, i) : e.preserveTimezones && r === void 0 ? n = U.createDateFixedToTimezone(t, s) : n = new U(t, s, i) : n = new U(t, s, i), n.valid() ? n : void 0;
|
|
2436
2438
|
}
|
|
2437
|
-
var
|
|
2439
|
+
var ga = /* @__PURE__ */ Object.freeze({
|
|
2438
2440
|
__proto__: null,
|
|
2439
2441
|
date: Ht,
|
|
2440
|
-
date_to_xmlschema:
|
|
2441
|
-
date_to_rfc822:
|
|
2442
|
-
date_to_string:
|
|
2443
|
-
date_to_long_string:
|
|
2442
|
+
date_to_xmlschema: ha,
|
|
2443
|
+
date_to_rfc822: pa,
|
|
2444
|
+
date_to_string: da,
|
|
2445
|
+
date_to_long_string: ma
|
|
2444
2446
|
});
|
|
2445
2447
|
const ft = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, Sr = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
|
|
2446
|
-
function
|
|
2448
|
+
function ya(t, e) {
|
|
2447
2449
|
R(arguments.length === 2, "append expect 2 arguments");
|
|
2448
2450
|
const r = h(t), n = h(e);
|
|
2449
2451
|
return this.context.memoryLimit.use(r.length + n.length), r + n;
|
|
2450
2452
|
}
|
|
2451
|
-
function
|
|
2453
|
+
function wa(t, e) {
|
|
2452
2454
|
R(arguments.length === 2, "prepend expect 2 arguments");
|
|
2453
2455
|
const r = h(t), n = h(e);
|
|
2454
2456
|
return this.context.memoryLimit.use(r.length + n.length), n + r;
|
|
2455
2457
|
}
|
|
2456
|
-
function
|
|
2458
|
+
function va(t, e) {
|
|
2457
2459
|
const r = h(t);
|
|
2458
|
-
return this.context.memoryLimit.use(r.length), e ? (e =
|
|
2460
|
+
return this.context.memoryLimit.use(r.length), e ? (e = Mt(h(e)), r.replace(new RegExp(`^[${e}]+`, "g"), "")) : r.replace(/^\s+/, "");
|
|
2459
2461
|
}
|
|
2460
|
-
function
|
|
2462
|
+
function ba(t) {
|
|
2461
2463
|
const e = h(t);
|
|
2462
2464
|
return this.context.memoryLimit.use(e.length), e.toLowerCase();
|
|
2463
2465
|
}
|
|
2464
|
-
function
|
|
2466
|
+
function Ta(t) {
|
|
2465
2467
|
const e = h(t);
|
|
2466
2468
|
return this.context.memoryLimit.use(e.length), h(e).toUpperCase();
|
|
2467
2469
|
}
|
|
2468
|
-
function
|
|
2470
|
+
function Oa(t, e) {
|
|
2469
2471
|
const r = h(t);
|
|
2470
2472
|
return this.context.memoryLimit.use(r.length), r.split(h(e)).join("");
|
|
2471
2473
|
}
|
|
2472
|
-
function
|
|
2474
|
+
function Sa(t, e) {
|
|
2473
2475
|
const r = h(t);
|
|
2474
2476
|
return this.context.memoryLimit.use(r.length), r.replace(h(e), "");
|
|
2475
2477
|
}
|
|
2476
|
-
function
|
|
2478
|
+
function ka(t, e) {
|
|
2477
2479
|
const r = h(t);
|
|
2478
2480
|
this.context.memoryLimit.use(r.length);
|
|
2479
2481
|
const n = h(e), i = r.lastIndexOf(n);
|
|
2480
2482
|
return i === -1 ? r : r.substring(0, i) + r.substring(i + n.length);
|
|
2481
2483
|
}
|
|
2482
|
-
function
|
|
2483
|
-
return t = h(t), this.context.memoryLimit.use(t.length), e ? (e =
|
|
2484
|
+
function xa(t, e) {
|
|
2485
|
+
return t = h(t), this.context.memoryLimit.use(t.length), e ? (e = Mt(h(e)), t.replace(new RegExp(`[${e}]+$`, "g"), "")) : t.replace(/\s+$/, "");
|
|
2484
2486
|
}
|
|
2485
|
-
function
|
|
2487
|
+
function La(t, e) {
|
|
2486
2488
|
const r = h(t);
|
|
2487
2489
|
this.context.memoryLimit.use(r.length);
|
|
2488
2490
|
const n = r.split(h(e));
|
|
@@ -2490,26 +2492,26 @@ function ka(t, e) {
|
|
|
2490
2492
|
n.pop();
|
|
2491
2493
|
return n;
|
|
2492
2494
|
}
|
|
2493
|
-
function
|
|
2495
|
+
function Aa(t, e) {
|
|
2494
2496
|
const r = h(t);
|
|
2495
|
-
return this.context.memoryLimit.use(r.length), e ? (e =
|
|
2497
|
+
return this.context.memoryLimit.use(r.length), e ? (e = Mt(h(e)), r.replace(new RegExp(`^[${e}]+`, "g"), "").replace(new RegExp(`[${e}]+$`, "g"), "")) : r.trim();
|
|
2496
2498
|
}
|
|
2497
|
-
function
|
|
2499
|
+
function Fa(t) {
|
|
2498
2500
|
const e = h(t);
|
|
2499
2501
|
return this.context.memoryLimit.use(e.length), e.replace(/\r?\n/gm, "");
|
|
2500
2502
|
}
|
|
2501
|
-
function
|
|
2503
|
+
function Da(t) {
|
|
2502
2504
|
return t = h(t), this.context.memoryLimit.use(t.length), t.charAt(0).toUpperCase() + t.slice(1).toLowerCase();
|
|
2503
2505
|
}
|
|
2504
|
-
function
|
|
2506
|
+
function _a(t, e, r) {
|
|
2505
2507
|
const n = h(t);
|
|
2506
2508
|
return this.context.memoryLimit.use(n.length), n.split(h(e)).join(r);
|
|
2507
2509
|
}
|
|
2508
|
-
function
|
|
2510
|
+
function Ra(t, e, r) {
|
|
2509
2511
|
const n = h(t);
|
|
2510
2512
|
return this.context.memoryLimit.use(n.length), n.replace(h(e), r);
|
|
2511
2513
|
}
|
|
2512
|
-
function
|
|
2514
|
+
function Pa(t, e, r) {
|
|
2513
2515
|
const n = h(t);
|
|
2514
2516
|
this.context.memoryLimit.use(n.length);
|
|
2515
2517
|
const i = h(e), s = n.lastIndexOf(i);
|
|
@@ -2518,11 +2520,11 @@ function _a(t, e, r) {
|
|
|
2518
2520
|
const o = h(r);
|
|
2519
2521
|
return n.substring(0, s) + o + n.substring(s + i.length);
|
|
2520
2522
|
}
|
|
2521
|
-
function
|
|
2523
|
+
function Ea(t, e = 50, r = "...") {
|
|
2522
2524
|
const n = h(t);
|
|
2523
2525
|
return this.context.memoryLimit.use(n.length), n.length <= e ? t : n.substring(0, e - r.length) + r;
|
|
2524
2526
|
}
|
|
2525
|
-
function
|
|
2527
|
+
function Na(t, e = 15, r = "...") {
|
|
2526
2528
|
const n = h(t);
|
|
2527
2529
|
this.context.memoryLimit.use(n.length);
|
|
2528
2530
|
const i = n.split(/\s+/);
|
|
@@ -2530,11 +2532,11 @@ function Pa(t, e = 15, r = "...") {
|
|
|
2530
2532
|
let s = i.slice(0, e).join(" ");
|
|
2531
2533
|
return i.length >= e && (s += r), s;
|
|
2532
2534
|
}
|
|
2533
|
-
function
|
|
2535
|
+
function $a(t) {
|
|
2534
2536
|
const e = h(t);
|
|
2535
2537
|
return this.context.memoryLimit.use(e.length), e.replace(/\s+/g, " ");
|
|
2536
2538
|
}
|
|
2537
|
-
function
|
|
2539
|
+
function Ia(t, e) {
|
|
2538
2540
|
const r = h(t);
|
|
2539
2541
|
if (this.context.memoryLimit.use(r.length), t = r.trim(), !t)
|
|
2540
2542
|
return 0;
|
|
@@ -2547,7 +2549,7 @@ function Na(t, e) {
|
|
|
2547
2549
|
return t.split(/\s+/).length;
|
|
2548
2550
|
}
|
|
2549
2551
|
}
|
|
2550
|
-
function
|
|
2552
|
+
function ja(t, e = "and") {
|
|
2551
2553
|
switch (this.context.memoryLimit.use(t.length), t.length) {
|
|
2552
2554
|
case 0:
|
|
2553
2555
|
return "";
|
|
@@ -2559,41 +2561,41 @@ function $a(t, e = "and") {
|
|
|
2559
2561
|
return `${t.slice(0, -1).join(", ")}, ${e} ${t[t.length - 1]}`;
|
|
2560
2562
|
}
|
|
2561
2563
|
}
|
|
2562
|
-
var
|
|
2564
|
+
var za = /* @__PURE__ */ Object.freeze({
|
|
2563
2565
|
__proto__: null,
|
|
2564
|
-
append:
|
|
2565
|
-
prepend:
|
|
2566
|
-
lstrip:
|
|
2567
|
-
downcase:
|
|
2568
|
-
upcase:
|
|
2569
|
-
remove:
|
|
2570
|
-
remove_first:
|
|
2571
|
-
remove_last:
|
|
2572
|
-
rstrip:
|
|
2573
|
-
split:
|
|
2574
|
-
strip:
|
|
2575
|
-
strip_newlines:
|
|
2576
|
-
capitalize:
|
|
2577
|
-
replace:
|
|
2578
|
-
replace_first:
|
|
2579
|
-
replace_last:
|
|
2580
|
-
truncate:
|
|
2581
|
-
truncatewords:
|
|
2582
|
-
normalize_whitespace:
|
|
2583
|
-
number_of_words:
|
|
2584
|
-
array_to_sentence_string:
|
|
2566
|
+
append: ya,
|
|
2567
|
+
prepend: wa,
|
|
2568
|
+
lstrip: va,
|
|
2569
|
+
downcase: ba,
|
|
2570
|
+
upcase: Ta,
|
|
2571
|
+
remove: Oa,
|
|
2572
|
+
remove_first: Sa,
|
|
2573
|
+
remove_last: ka,
|
|
2574
|
+
rstrip: xa,
|
|
2575
|
+
split: La,
|
|
2576
|
+
strip: Aa,
|
|
2577
|
+
strip_newlines: Fa,
|
|
2578
|
+
capitalize: Da,
|
|
2579
|
+
replace: _a,
|
|
2580
|
+
replace_first: Ra,
|
|
2581
|
+
replace_last: Pa,
|
|
2582
|
+
truncate: Ea,
|
|
2583
|
+
truncatewords: Na,
|
|
2584
|
+
normalize_whitespace: $a,
|
|
2585
|
+
number_of_words: Ia,
|
|
2586
|
+
array_to_sentence_string: ja
|
|
2585
2587
|
});
|
|
2586
|
-
const
|
|
2587
|
-
class
|
|
2588
|
+
const Ma = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Xs), Eo), qo), fa), ga), za), En);
|
|
2589
|
+
class Ca extends T {
|
|
2588
2590
|
constructor(e, r, n) {
|
|
2589
|
-
super(e, r, n), this.key = this.tokenizer.readIdentifier().content, this.tokenizer.assert(this.key, "expected variable name"), this.tokenizer.skipBlank(), this.tokenizer.assert(this.tokenizer.peek() === "=", 'expected "="'), this.tokenizer.advance(), this.value = new
|
|
2591
|
+
super(e, r, n), this.key = this.tokenizer.readIdentifier().content, this.tokenizer.assert(this.key, "expected variable name"), this.tokenizer.skipBlank(), this.tokenizer.assert(this.tokenizer.peek() === "=", 'expected "="'), this.tokenizer.advance(), this.value = new M(this.tokenizer.readFilteredValue(), this.liquid);
|
|
2590
2592
|
}
|
|
2591
2593
|
*render(e) {
|
|
2592
2594
|
e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
|
|
2593
2595
|
}
|
|
2594
2596
|
}
|
|
2595
2597
|
const kr = ["offset", "limit", "reversed"];
|
|
2596
|
-
class
|
|
2598
|
+
class qa extends T {
|
|
2597
2599
|
constructor(e, r, n, i) {
|
|
2598
2600
|
super(e, r, n);
|
|
2599
2601
|
const s = this.tokenizer.readIdentifier(), o = this.tokenizer.readIdentifier(), a = this.tokenizer.readValue();
|
|
@@ -2620,7 +2622,7 @@ class za extends T {
|
|
|
2620
2622
|
const s = "continue-" + this.variable + "-" + this.collection.getText();
|
|
2621
2623
|
e.push({ continue: e.getRegister(s) });
|
|
2622
2624
|
const o = yield this.hash.render(e);
|
|
2623
|
-
e.pop(), i = (this.liquid.options.orderedFilterParameters ? Object.keys(o).filter((c) => kr.includes(c)) : kr.filter((c) => o[c] !== void 0)).reduce((c, f) => f === "offset" ?
|
|
2625
|
+
e.pop(), i = (this.liquid.options.orderedFilterParameters ? Object.keys(o).filter((c) => kr.includes(c)) : kr.filter((c) => o[c] !== void 0)).reduce((c, f) => f === "offset" ? Va(c, o.offset) : f === "limit" ? Ba(c, o.limit) : Ua(c), i), e.setRegister(s, (o.offset || 0) + i.length);
|
|
2624
2626
|
const l = { forloop: new qt(i.length, this.collection.getText(), this.variable) };
|
|
2625
2627
|
e.push(l);
|
|
2626
2628
|
for (const c of i) {
|
|
@@ -2633,16 +2635,16 @@ class za extends T {
|
|
|
2633
2635
|
e.pop();
|
|
2634
2636
|
}
|
|
2635
2637
|
}
|
|
2636
|
-
function
|
|
2638
|
+
function Ua(t) {
|
|
2637
2639
|
return [...t].reverse();
|
|
2638
2640
|
}
|
|
2639
|
-
function
|
|
2641
|
+
function Va(t, e) {
|
|
2640
2642
|
return t.slice(e);
|
|
2641
2643
|
}
|
|
2642
|
-
function
|
|
2644
|
+
function Ba(t, e) {
|
|
2643
2645
|
return t.slice(0, e);
|
|
2644
2646
|
}
|
|
2645
|
-
class
|
|
2647
|
+
class Ha extends T {
|
|
2646
2648
|
constructor(e, r, n, i) {
|
|
2647
2649
|
for (super(e, r, n), this.templates = [], this.variable = this.readVariableName(); r.length; ) {
|
|
2648
2650
|
const s = r.shift();
|
|
@@ -2666,9 +2668,9 @@ class Va extends T {
|
|
|
2666
2668
|
throw this.tokenizer.error("invalid capture name");
|
|
2667
2669
|
}
|
|
2668
2670
|
}
|
|
2669
|
-
class
|
|
2671
|
+
class Wa extends T {
|
|
2670
2672
|
constructor(e, r, n, i) {
|
|
2671
|
-
super(e, r, n), this.branches = [], this.elseTemplates = [], this.value = new
|
|
2673
|
+
super(e, r, n), this.branches = [], this.elseTemplates = [], this.value = new M(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
|
|
2672
2674
|
let s = [], o = 0;
|
|
2673
2675
|
const a = i.parseStream(r).on("tag:when", (l) => {
|
|
2674
2676
|
if (o > 0)
|
|
@@ -2704,7 +2706,7 @@ class Ba extends T {
|
|
|
2704
2706
|
s || (yield n.renderTemplates(this.elseTemplates, e, r));
|
|
2705
2707
|
}
|
|
2706
2708
|
}
|
|
2707
|
-
class
|
|
2709
|
+
class Ya extends T {
|
|
2708
2710
|
constructor(e, r, n) {
|
|
2709
2711
|
for (super(e, r, n); r.length; ) {
|
|
2710
2712
|
const i = r.shift();
|
|
@@ -2716,7 +2718,7 @@ class Ha extends T {
|
|
|
2716
2718
|
render() {
|
|
2717
2719
|
}
|
|
2718
2720
|
}
|
|
2719
|
-
class
|
|
2721
|
+
class Ja extends T {
|
|
2720
2722
|
constructor(e, r, n, i) {
|
|
2721
2723
|
super(e, r, n);
|
|
2722
2724
|
const s = this.tokenizer;
|
|
@@ -2764,7 +2766,7 @@ function Wt(t, e, r) {
|
|
|
2764
2766
|
const s = t.readValue();
|
|
2765
2767
|
if (t.assert(s, "illegal file path"), s.getText() === "none")
|
|
2766
2768
|
return;
|
|
2767
|
-
if (
|
|
2769
|
+
if (po(s)) {
|
|
2768
2770
|
const o = r.parse(Rn(s));
|
|
2769
2771
|
return xr(o);
|
|
2770
2772
|
}
|
|
@@ -2779,7 +2781,7 @@ function xr(t) {
|
|
|
2779
2781
|
function* Yt(t, e, r) {
|
|
2780
2782
|
return typeof t == "string" ? t : Array.isArray(t) ? r.renderer.renderTemplates(t, e) : yield S(t, e);
|
|
2781
2783
|
}
|
|
2782
|
-
class
|
|
2784
|
+
class Qa extends T {
|
|
2783
2785
|
constructor(e, r, n, i) {
|
|
2784
2786
|
super(e, r, n);
|
|
2785
2787
|
const { tokenizer: s } = e;
|
|
@@ -2798,16 +2800,16 @@ class Ya extends T {
|
|
|
2798
2800
|
e.push(e.opts.jekyllInclude ? { include: c } : c), yield o.renderTemplates(f, e, r), e.pop(), e.restoreRegister(l);
|
|
2799
2801
|
}
|
|
2800
2802
|
}
|
|
2801
|
-
class
|
|
2803
|
+
class Za extends T {
|
|
2802
2804
|
constructor(e, r, n) {
|
|
2803
2805
|
super(e, r, n), this.variable = this.tokenizer.readIdentifier().content;
|
|
2804
2806
|
}
|
|
2805
2807
|
render(e, r) {
|
|
2806
2808
|
const n = e.environments;
|
|
2807
|
-
|
|
2809
|
+
zt(n[this.variable]) || (n[this.variable] = 0), r.write(h(--n[this.variable]));
|
|
2808
2810
|
}
|
|
2809
2811
|
}
|
|
2810
|
-
class
|
|
2812
|
+
class Ga extends T {
|
|
2811
2813
|
constructor(e, r, n) {
|
|
2812
2814
|
super(e, r, n), this.candidates = [];
|
|
2813
2815
|
const i = this.tokenizer.readValue();
|
|
@@ -2825,16 +2827,16 @@ class Qa extends T {
|
|
|
2825
2827
|
return o = (o + 1) % this.candidates.length, s[i] = o, yield S(a, e);
|
|
2826
2828
|
}
|
|
2827
2829
|
}
|
|
2828
|
-
class
|
|
2830
|
+
class Xa extends T {
|
|
2829
2831
|
constructor(e, r, n, i) {
|
|
2830
2832
|
super(e, r, n), this.branches = [];
|
|
2831
2833
|
let s = [];
|
|
2832
2834
|
i.parseStream(r).on("start", () => this.branches.push({
|
|
2833
|
-
value: new
|
|
2835
|
+
value: new M(e.args, this.liquid),
|
|
2834
2836
|
templates: s = []
|
|
2835
2837
|
})).on("tag:elsif", (o) => {
|
|
2836
2838
|
R(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
|
|
2837
|
-
value: new
|
|
2839
|
+
value: new M(o.args, this.liquid),
|
|
2838
2840
|
templates: s = []
|
|
2839
2841
|
});
|
|
2840
2842
|
}).on("tag:else", (o) => {
|
|
@@ -2857,18 +2859,18 @@ class Za extends T {
|
|
|
2857
2859
|
yield n.renderTemplates(this.elseTemplates || [], e, r);
|
|
2858
2860
|
}
|
|
2859
2861
|
}
|
|
2860
|
-
class
|
|
2862
|
+
class Ka extends T {
|
|
2861
2863
|
constructor(e, r, n) {
|
|
2862
2864
|
super(e, r, n), this.variable = this.tokenizer.readIdentifier().content;
|
|
2863
2865
|
}
|
|
2864
2866
|
render(e, r) {
|
|
2865
2867
|
const n = e.environments;
|
|
2866
|
-
|
|
2868
|
+
zt(n[this.variable]) || (n[this.variable] = 0);
|
|
2867
2869
|
const i = n[this.variable];
|
|
2868
2870
|
n[this.variable]++, r.write(h(i));
|
|
2869
2871
|
}
|
|
2870
2872
|
}
|
|
2871
|
-
class
|
|
2873
|
+
class eu extends T {
|
|
2872
2874
|
constructor(e, r, n, i) {
|
|
2873
2875
|
super(e, r, n), this.file = Wt(this.tokenizer, this.liquid, i), this.currentFile = e.file, this.args = new Oe(this.tokenizer.remaining(), n.options.keyValueSeparator), this.templates = i.parseTokens(r);
|
|
2874
2876
|
}
|
|
@@ -2886,7 +2888,7 @@ class Xa extends T {
|
|
|
2886
2888
|
f[""] === void 0 && (f[""] = (d, g) => g.write(c)), e.setRegister("blockMode", oe.OUTPUT), e.push(yield i.render(e)), yield o.renderTemplates(l, e, r), e.pop();
|
|
2887
2889
|
}
|
|
2888
2890
|
}
|
|
2889
|
-
class
|
|
2891
|
+
class tu extends T {
|
|
2890
2892
|
constructor(e, r, n, i) {
|
|
2891
2893
|
super(e, r, n), this.templates = [];
|
|
2892
2894
|
const s = /\w+/.exec(e.args);
|
|
@@ -2910,7 +2912,7 @@ class Ka extends T {
|
|
|
2910
2912
|
return i ? (o, a) => i(new ur(() => s(o, a)), a) : s;
|
|
2911
2913
|
}
|
|
2912
2914
|
}
|
|
2913
|
-
class
|
|
2915
|
+
class ru extends T {
|
|
2914
2916
|
constructor(e, r, n) {
|
|
2915
2917
|
for (super(e, r, n), this.tokens = []; r.length; ) {
|
|
2916
2918
|
const i = r.shift();
|
|
@@ -2924,7 +2926,7 @@ class eu extends T {
|
|
|
2924
2926
|
return this.tokens.map((e) => e.getText()).join("");
|
|
2925
2927
|
}
|
|
2926
2928
|
}
|
|
2927
|
-
class
|
|
2929
|
+
class nu extends qt {
|
|
2928
2930
|
constructor(e, r, n, i) {
|
|
2929
2931
|
super(e, n, i), this.length = e, this.cols = r;
|
|
2930
2932
|
}
|
|
@@ -2944,7 +2946,7 @@ class tu extends qt {
|
|
|
2944
2946
|
return this.col() === this.cols;
|
|
2945
2947
|
}
|
|
2946
2948
|
}
|
|
2947
|
-
class
|
|
2949
|
+
class iu extends T {
|
|
2948
2950
|
constructor(e, r, n, i) {
|
|
2949
2951
|
super(e, r, n);
|
|
2950
2952
|
const s = this.tokenizer.readIdentifier();
|
|
@@ -2963,19 +2965,19 @@ class ru extends T {
|
|
|
2963
2965
|
let n = jt(yield S(this.collection, e));
|
|
2964
2966
|
const i = yield this.args.render(e), s = i.offset || 0, o = i.limit === void 0 ? n.length : i.limit;
|
|
2965
2967
|
n = n.slice(s, s + o);
|
|
2966
|
-
const a = i.cols || n.length, l = this.liquid.renderer, c = new
|
|
2968
|
+
const a = i.cols || n.length, l = this.liquid.renderer, c = new nu(n.length, a, this.collection.getText(), this.variable), f = { tablerowloop: c };
|
|
2967
2969
|
e.push(f);
|
|
2968
2970
|
for (let d = 0; d < n.length; d++, c.next())
|
|
2969
2971
|
f[this.variable] = n[d], c.col0() === 0 && (c.row() !== 1 && r.write("</tr>"), r.write(`<tr class="row${c.row()}">`)), r.write(`<td class="col${c.col()}">`), yield l.renderTemplates(this.templates, e, r), r.write("</td>");
|
|
2970
2972
|
n.length && r.write("</tr>"), e.pop();
|
|
2971
2973
|
}
|
|
2972
2974
|
}
|
|
2973
|
-
class
|
|
2975
|
+
class su extends T {
|
|
2974
2976
|
constructor(e, r, n, i) {
|
|
2975
2977
|
super(e, r, n), this.branches = [], this.elseTemplates = [];
|
|
2976
2978
|
let s = [], o = 0;
|
|
2977
2979
|
i.parseStream(r).on("start", () => this.branches.push({
|
|
2978
|
-
value: new
|
|
2980
|
+
value: new M(e.args, this.liquid),
|
|
2979
2981
|
test: it,
|
|
2980
2982
|
templates: s = []
|
|
2981
2983
|
})).on("tag:elsif", (a) => {
|
|
@@ -2984,7 +2986,7 @@ class nu extends T {
|
|
|
2984
2986
|
return;
|
|
2985
2987
|
}
|
|
2986
2988
|
this.branches.push({
|
|
2987
|
-
value: new
|
|
2989
|
+
value: new M(a.args, this.liquid),
|
|
2988
2990
|
test: se,
|
|
2989
2991
|
templates: s = []
|
|
2990
2992
|
});
|
|
@@ -3010,19 +3012,19 @@ class nu extends T {
|
|
|
3010
3012
|
yield n.renderTemplates(this.elseTemplates, e, r);
|
|
3011
3013
|
}
|
|
3012
3014
|
}
|
|
3013
|
-
class
|
|
3015
|
+
class ou extends T {
|
|
3014
3016
|
render(e, r) {
|
|
3015
3017
|
r.break = !0;
|
|
3016
3018
|
}
|
|
3017
3019
|
}
|
|
3018
|
-
class
|
|
3020
|
+
class au extends T {
|
|
3019
3021
|
render(e, r) {
|
|
3020
3022
|
r.continue = !0;
|
|
3021
3023
|
}
|
|
3022
3024
|
}
|
|
3023
|
-
class
|
|
3025
|
+
class uu extends T {
|
|
3024
3026
|
constructor(e, r, n) {
|
|
3025
|
-
super(e, r, n), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new
|
|
3027
|
+
super(e, r, n), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new M(this.tokenizer.readFilteredValue(), this.liquid));
|
|
3026
3028
|
}
|
|
3027
3029
|
*render(e, r) {
|
|
3028
3030
|
if (!this.value)
|
|
@@ -3031,7 +3033,7 @@ class ou extends T {
|
|
|
3031
3033
|
r.write(n);
|
|
3032
3034
|
}
|
|
3033
3035
|
}
|
|
3034
|
-
class
|
|
3036
|
+
class lu extends T {
|
|
3035
3037
|
constructor(e, r, n, i) {
|
|
3036
3038
|
super(e, r, n);
|
|
3037
3039
|
const s = this.tokenizer.readLiquidTagTokens(this.liquid.options);
|
|
@@ -3041,7 +3043,7 @@ class au extends T {
|
|
|
3041
3043
|
yield this.liquid.renderer.renderTemplates(this.templates, e, r);
|
|
3042
3044
|
}
|
|
3043
3045
|
}
|
|
3044
|
-
class
|
|
3046
|
+
class cu extends T {
|
|
3045
3047
|
constructor(e, r, n) {
|
|
3046
3048
|
if (super(e, r, n), e.args.search(/\n\s*[^#\s]/g) !== -1)
|
|
3047
3049
|
throw new Error("every line of an inline comment must start with a '#' character");
|
|
@@ -3049,32 +3051,32 @@ class uu extends T {
|
|
|
3049
3051
|
render() {
|
|
3050
3052
|
}
|
|
3051
3053
|
}
|
|
3052
|
-
const
|
|
3053
|
-
assign:
|
|
3054
|
-
for:
|
|
3055
|
-
capture:
|
|
3056
|
-
case:
|
|
3057
|
-
comment:
|
|
3058
|
-
include:
|
|
3059
|
-
render:
|
|
3060
|
-
decrement:
|
|
3061
|
-
increment:
|
|
3062
|
-
cycle:
|
|
3063
|
-
if:
|
|
3064
|
-
layout:
|
|
3065
|
-
block:
|
|
3066
|
-
raw:
|
|
3067
|
-
tablerow:
|
|
3068
|
-
unless:
|
|
3069
|
-
break:
|
|
3070
|
-
continue:
|
|
3071
|
-
echo:
|
|
3072
|
-
liquid:
|
|
3073
|
-
"#":
|
|
3054
|
+
const fu = {
|
|
3055
|
+
assign: Ca,
|
|
3056
|
+
for: qa,
|
|
3057
|
+
capture: Ha,
|
|
3058
|
+
case: Wa,
|
|
3059
|
+
comment: Ya,
|
|
3060
|
+
include: Qa,
|
|
3061
|
+
render: Ja,
|
|
3062
|
+
decrement: Za,
|
|
3063
|
+
increment: Ka,
|
|
3064
|
+
cycle: Ga,
|
|
3065
|
+
if: Xa,
|
|
3066
|
+
layout: eu,
|
|
3067
|
+
block: tu,
|
|
3068
|
+
raw: ru,
|
|
3069
|
+
tablerow: iu,
|
|
3070
|
+
unless: su,
|
|
3071
|
+
break: ou,
|
|
3072
|
+
continue: au,
|
|
3073
|
+
echo: uu,
|
|
3074
|
+
liquid: lu,
|
|
3075
|
+
"#": cu
|
|
3074
3076
|
};
|
|
3075
3077
|
class Jt {
|
|
3076
3078
|
constructor(e = {}) {
|
|
3077
|
-
this.renderer = new
|
|
3079
|
+
this.renderer = new xs(), this.filters = {}, this.tags = {}, this.options = eo(e), this.parser = new te(this), ir(fu, (r, n) => this.registerTag(n, r)), ir(Ma, (r, n) => this.registerFilter(n, r));
|
|
3078
3080
|
}
|
|
3079
3081
|
parse(e, r) {
|
|
3080
3082
|
return new te(this).parse(e, r);
|
|
@@ -3084,7 +3086,7 @@ class Jt {
|
|
|
3084
3086
|
return this.renderer.renderTemplates(e, i);
|
|
3085
3087
|
}
|
|
3086
3088
|
render(e, r, n) {
|
|
3087
|
-
return
|
|
3089
|
+
return q(this, void 0, void 0, function* () {
|
|
3088
3090
|
return Z(this._render(e, r, Object.assign(Object.assign({}, n), { sync: !1 })));
|
|
3089
3091
|
});
|
|
3090
3092
|
}
|
|
@@ -3100,7 +3102,7 @@ class Jt {
|
|
|
3100
3102
|
return this._render(i, r, n);
|
|
3101
3103
|
}
|
|
3102
3104
|
parseAndRender(e, r, n) {
|
|
3103
|
-
return
|
|
3105
|
+
return q(this, void 0, void 0, function* () {
|
|
3104
3106
|
return Z(this._parseAndRender(e, r, Object.assign(Object.assign({}, n), { sync: !1 })));
|
|
3105
3107
|
});
|
|
3106
3108
|
}
|
|
@@ -3117,7 +3119,7 @@ class Jt {
|
|
|
3117
3119
|
return new te(this).parseFile(e, r, n, i);
|
|
3118
3120
|
}
|
|
3119
3121
|
parseFile(e, r) {
|
|
3120
|
-
return
|
|
3122
|
+
return q(this, void 0, void 0, function* () {
|
|
3121
3123
|
return Z(new te(this).parseFile(e, !1, r));
|
|
3122
3124
|
});
|
|
3123
3125
|
}
|
|
@@ -3129,7 +3131,7 @@ class Jt {
|
|
|
3129
3131
|
return yield this._render(i, r, n);
|
|
3130
3132
|
}
|
|
3131
3133
|
renderFile(e, r, n) {
|
|
3132
|
-
return
|
|
3134
|
+
return q(this, void 0, void 0, function* () {
|
|
3133
3135
|
return Z(this._renderFile(e, r, Object.assign(Object.assign({}, n), { sync: !1 })));
|
|
3134
3136
|
});
|
|
3135
3137
|
}
|
|
@@ -3137,17 +3139,17 @@ class Jt {
|
|
|
3137
3139
|
return G(this._renderFile(e, r, Object.assign(Object.assign({}, n), { sync: !0 })));
|
|
3138
3140
|
}
|
|
3139
3141
|
renderFileToNodeStream(e, r, n) {
|
|
3140
|
-
return
|
|
3142
|
+
return q(this, void 0, void 0, function* () {
|
|
3141
3143
|
const i = yield this.parseFile(e);
|
|
3142
3144
|
return this.renderToNodeStream(i, r, n);
|
|
3143
3145
|
});
|
|
3144
3146
|
}
|
|
3145
3147
|
_evalValue(e, r) {
|
|
3146
|
-
const n = new
|
|
3148
|
+
const n = new M(e, this), i = r instanceof ie ? r : new ie(r, this.options);
|
|
3147
3149
|
return n.value(i);
|
|
3148
3150
|
}
|
|
3149
3151
|
evalValue(e, r) {
|
|
3150
|
-
return
|
|
3152
|
+
return q(this, void 0, void 0, function* () {
|
|
3151
3153
|
return Z(this._evalValue(e, r));
|
|
3152
3154
|
});
|
|
3153
3155
|
}
|
|
@@ -3158,7 +3160,7 @@ class Jt {
|
|
|
3158
3160
|
this.filters[e] = r;
|
|
3159
3161
|
}
|
|
3160
3162
|
registerTag(e, r) {
|
|
3161
|
-
this.tags[e] = x(r) ? r :
|
|
3163
|
+
this.tags[e] = x(r) ? r : oo(r);
|
|
3162
3164
|
}
|
|
3163
3165
|
plugin(e) {
|
|
3164
3166
|
return e.call(this, Jt);
|
|
@@ -3176,17 +3178,17 @@ class Jt {
|
|
|
3176
3178
|
};
|
|
3177
3179
|
}
|
|
3178
3180
|
}
|
|
3179
|
-
var
|
|
3181
|
+
var Mn = "en", Qt = {}, wt = {};
|
|
3180
3182
|
function Cn() {
|
|
3181
|
-
return
|
|
3183
|
+
return Mn;
|
|
3182
3184
|
}
|
|
3183
|
-
function
|
|
3184
|
-
|
|
3185
|
+
function hu(t) {
|
|
3186
|
+
Mn = t;
|
|
3185
3187
|
}
|
|
3186
|
-
function
|
|
3188
|
+
function pu(t) {
|
|
3187
3189
|
return Qt[t];
|
|
3188
3190
|
}
|
|
3189
|
-
function
|
|
3191
|
+
function du(t) {
|
|
3190
3192
|
if (!t)
|
|
3191
3193
|
throw new Error("No locale data passed");
|
|
3192
3194
|
Qt[t.locale] = t, wt[t.locale.toLowerCase()] = t.locale;
|
|
@@ -3443,16 +3445,16 @@ u.yue = u.dz;
|
|
|
3443
3445
|
u.zh = u.dz;
|
|
3444
3446
|
u.zu = u.am;
|
|
3445
3447
|
function Fr(t) {
|
|
3446
|
-
return t === "pt-PT" ? t :
|
|
3448
|
+
return t === "pt-PT" ? t : gu(t);
|
|
3447
3449
|
}
|
|
3448
|
-
var
|
|
3449
|
-
function
|
|
3450
|
-
var e = t.match(
|
|
3450
|
+
var mu = /^([a-z0-9]+)/i;
|
|
3451
|
+
function gu(t) {
|
|
3452
|
+
var e = t.match(mu);
|
|
3451
3453
|
if (!e)
|
|
3452
3454
|
throw new TypeError("Invalid locale: ".concat(t));
|
|
3453
3455
|
return e[1];
|
|
3454
3456
|
}
|
|
3455
|
-
function
|
|
3457
|
+
function yu(t, e) {
|
|
3456
3458
|
if (!(t instanceof e))
|
|
3457
3459
|
throw new TypeError("Cannot call a class as a function");
|
|
3458
3460
|
}
|
|
@@ -3462,12 +3464,12 @@ function Dr(t, e) {
|
|
|
3462
3464
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
3463
3465
|
}
|
|
3464
3466
|
}
|
|
3465
|
-
function
|
|
3467
|
+
function wu(t, e, r) {
|
|
3466
3468
|
return e && Dr(t.prototype, e), r && Dr(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
3467
3469
|
}
|
|
3468
3470
|
var vt = /* @__PURE__ */ function() {
|
|
3469
3471
|
function t(e, r) {
|
|
3470
|
-
|
|
3472
|
+
yu(this, t);
|
|
3471
3473
|
var n = t.supportedLocalesOf(e);
|
|
3472
3474
|
if (n.length === 0)
|
|
3473
3475
|
throw new RangeError("Unsupported locale: " + e);
|
|
@@ -3475,7 +3477,7 @@ var vt = /* @__PURE__ */ function() {
|
|
|
3475
3477
|
throw new RangeError('Only "cardinal" "type" is supported');
|
|
3476
3478
|
this.$ = u[Fr(n[0])];
|
|
3477
3479
|
}
|
|
3478
|
-
return
|
|
3480
|
+
return wu(t, [{
|
|
3479
3481
|
key: "select",
|
|
3480
3482
|
value: function(r) {
|
|
3481
3483
|
return this.$(r);
|
|
@@ -3511,24 +3513,24 @@ function Rr(t) {
|
|
|
3511
3513
|
for (var e = 1; e < arguments.length; e++) {
|
|
3512
3514
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
3513
3515
|
e % 2 ? _r(Object(r), !0).forEach(function(n) {
|
|
3514
|
-
|
|
3516
|
+
vu(t, n, r[n]);
|
|
3515
3517
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : _r(Object(r)).forEach(function(n) {
|
|
3516
3518
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
3517
3519
|
});
|
|
3518
3520
|
}
|
|
3519
3521
|
return t;
|
|
3520
3522
|
}
|
|
3521
|
-
function
|
|
3523
|
+
function vu(t, e, r) {
|
|
3522
3524
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
3523
3525
|
}
|
|
3524
3526
|
function Pr(t, e) {
|
|
3525
|
-
return
|
|
3527
|
+
return Su(t) || Ou(t, e) || Tu(t, e) || bu();
|
|
3526
3528
|
}
|
|
3527
|
-
function
|
|
3529
|
+
function bu() {
|
|
3528
3530
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3529
3531
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3530
3532
|
}
|
|
3531
|
-
function
|
|
3533
|
+
function Tu(t, e) {
|
|
3532
3534
|
if (t) {
|
|
3533
3535
|
if (typeof t == "string") return Er(t, e);
|
|
3534
3536
|
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
@@ -3542,7 +3544,7 @@ function Er(t, e) {
|
|
|
3542
3544
|
n[r] = t[r];
|
|
3543
3545
|
return n;
|
|
3544
3546
|
}
|
|
3545
|
-
function
|
|
3547
|
+
function Ou(t, e) {
|
|
3546
3548
|
var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
3547
3549
|
if (r != null) {
|
|
3548
3550
|
var n = [], i = !0, s = !1, o, a;
|
|
@@ -3561,39 +3563,39 @@ function bu(t, e) {
|
|
|
3561
3563
|
return n;
|
|
3562
3564
|
}
|
|
3563
3565
|
}
|
|
3564
|
-
function
|
|
3566
|
+
function Su(t) {
|
|
3565
3567
|
if (Array.isArray(t)) return t;
|
|
3566
3568
|
}
|
|
3567
|
-
function
|
|
3569
|
+
function ku(t, e) {
|
|
3568
3570
|
if (!(t instanceof e))
|
|
3569
3571
|
throw new TypeError("Cannot call a class as a function");
|
|
3570
3572
|
}
|
|
3571
|
-
function
|
|
3573
|
+
function xu(t, e) {
|
|
3572
3574
|
for (var r = 0; r < e.length; r++) {
|
|
3573
3575
|
var n = e[r];
|
|
3574
3576
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
3575
3577
|
}
|
|
3576
3578
|
}
|
|
3577
|
-
function
|
|
3578
|
-
return e &&
|
|
3579
|
+
function Lu(t, e, r) {
|
|
3580
|
+
return e && xu(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
3579
3581
|
}
|
|
3580
|
-
var
|
|
3582
|
+
var Au = ["second", "minute", "hour", "day", "week", "month", "quarter", "year"], Fu = ["auto", "always"], Du = ["long", "short", "narrow"], _u = ["lookup", "best fit"], X = /* @__PURE__ */ function() {
|
|
3581
3583
|
function t() {
|
|
3582
3584
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3583
|
-
|
|
3585
|
+
ku(this, t);
|
|
3584
3586
|
var n = r.numeric, i = r.style, s = r.localeMatcher;
|
|
3585
3587
|
if (this.numeric = "always", this.style = "long", this.localeMatcher = "lookup", n !== void 0) {
|
|
3586
|
-
if (
|
|
3588
|
+
if (Fu.indexOf(n) < 0)
|
|
3587
3589
|
throw new RangeError('Invalid "numeric" option: '.concat(n));
|
|
3588
3590
|
this.numeric = n;
|
|
3589
3591
|
}
|
|
3590
3592
|
if (i !== void 0) {
|
|
3591
|
-
if (
|
|
3593
|
+
if (Du.indexOf(i) < 0)
|
|
3592
3594
|
throw new RangeError('Invalid "style" option: '.concat(i));
|
|
3593
3595
|
this.style = i;
|
|
3594
3596
|
}
|
|
3595
3597
|
if (s !== void 0) {
|
|
3596
|
-
if (
|
|
3598
|
+
if (_u.indexOf(s) < 0)
|
|
3597
3599
|
throw new RangeError('Invalid "localeMatcher" option: '.concat(s));
|
|
3598
3600
|
this.localeMatcher = s;
|
|
3599
3601
|
}
|
|
@@ -3605,7 +3607,7 @@ var xu = ["second", "minute", "hour", "day", "week", "month", "quarter", "year"]
|
|
|
3605
3607
|
localeMatcher: this.localeMatcher
|
|
3606
3608
|
});
|
|
3607
3609
|
}
|
|
3608
|
-
return
|
|
3610
|
+
return Lu(t, [{
|
|
3609
3611
|
key: "format",
|
|
3610
3612
|
value: function() {
|
|
3611
3613
|
var r = Nr(arguments), n = Pr(r, 2), i = n[0], s = n[1];
|
|
@@ -3669,7 +3671,7 @@ var xu = ["second", "minute", "hour", "day", "week", "month", "quarter", "year"]
|
|
|
3669
3671
|
}, {
|
|
3670
3672
|
key: "getRule",
|
|
3671
3673
|
value: function(r, n) {
|
|
3672
|
-
var i =
|
|
3674
|
+
var i = pu(this.locale)[this.style][n];
|
|
3673
3675
|
if (typeof i == "string")
|
|
3674
3676
|
return i;
|
|
3675
3677
|
if (this.numeric === "auto") {
|
|
@@ -3684,7 +3686,7 @@ var xu = ["second", "minute", "hour", "day", "week", "month", "quarter", "year"]
|
|
|
3684
3686
|
} else if (r === 0 && i.current)
|
|
3685
3687
|
return i.current;
|
|
3686
3688
|
}
|
|
3687
|
-
var a = i[
|
|
3689
|
+
var a = i[$u(r) ? "past" : "future"];
|
|
3688
3690
|
if (typeof a == "string")
|
|
3689
3691
|
return a;
|
|
3690
3692
|
var l = this.pluralRules && this.pluralRules.select(Math.abs(r)) || "other";
|
|
@@ -3742,36 +3744,36 @@ X.supportedLocalesOf = function(t) {
|
|
|
3742
3744
|
return qn(r, e);
|
|
3743
3745
|
});
|
|
3744
3746
|
};
|
|
3745
|
-
X.addLocale =
|
|
3746
|
-
X.setDefaultLocale =
|
|
3747
|
+
X.addLocale = du;
|
|
3748
|
+
X.setDefaultLocale = hu;
|
|
3747
3749
|
X.getDefaultLocale = Cn;
|
|
3748
3750
|
X.PluralRules = vt;
|
|
3749
3751
|
var ht = 'Invalid "unit" argument';
|
|
3750
|
-
function
|
|
3752
|
+
function Ru(t) {
|
|
3751
3753
|
if (bt(t) === "symbol")
|
|
3752
3754
|
throw new TypeError(ht);
|
|
3753
3755
|
if (typeof t != "string")
|
|
3754
3756
|
throw new RangeError("".concat(ht, ": ").concat(t));
|
|
3755
|
-
if (t[t.length - 1] === "s" && (t = t.slice(0, t.length - 1)),
|
|
3757
|
+
if (t[t.length - 1] === "s" && (t = t.slice(0, t.length - 1)), Au.indexOf(t) < 0)
|
|
3756
3758
|
throw new RangeError("".concat(ht, ": ").concat(t));
|
|
3757
3759
|
return t;
|
|
3758
3760
|
}
|
|
3759
|
-
var
|
|
3760
|
-
function
|
|
3761
|
+
var Pu = 'Invalid "number" argument';
|
|
3762
|
+
function Eu(t) {
|
|
3761
3763
|
if (t = Number(t), Number.isFinite && !Number.isFinite(t))
|
|
3762
|
-
throw new RangeError("".concat(
|
|
3764
|
+
throw new RangeError("".concat(Pu, ": ").concat(t));
|
|
3763
3765
|
return t;
|
|
3764
3766
|
}
|
|
3765
|
-
function
|
|
3767
|
+
function Nu(t) {
|
|
3766
3768
|
return 1 / t === -1 / 0;
|
|
3767
3769
|
}
|
|
3768
|
-
function
|
|
3769
|
-
return t < 0 || t === 0 &&
|
|
3770
|
+
function $u(t) {
|
|
3771
|
+
return t < 0 || t === 0 && Nu(t);
|
|
3770
3772
|
}
|
|
3771
3773
|
function Nr(t) {
|
|
3772
3774
|
if (t.length < 2)
|
|
3773
3775
|
throw new TypeError('"unit" argument is required');
|
|
3774
|
-
return [
|
|
3776
|
+
return [Eu(t[0]), Ru(t[1])];
|
|
3775
3777
|
}
|
|
3776
3778
|
function Ze(t) {
|
|
3777
3779
|
"@babel/helpers - typeof";
|
|
@@ -3781,24 +3783,24 @@ function Ze(t) {
|
|
|
3781
3783
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3782
3784
|
}, Ze(t);
|
|
3783
3785
|
}
|
|
3784
|
-
function
|
|
3786
|
+
function Iu(t, e) {
|
|
3785
3787
|
if (!(t instanceof e))
|
|
3786
3788
|
throw new TypeError("Cannot call a class as a function");
|
|
3787
3789
|
}
|
|
3788
|
-
function
|
|
3790
|
+
function ju(t, e) {
|
|
3789
3791
|
for (var r = 0; r < e.length; r++) {
|
|
3790
3792
|
var n = e[r];
|
|
3791
3793
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
3792
3794
|
}
|
|
3793
3795
|
}
|
|
3794
|
-
function
|
|
3795
|
-
return e &&
|
|
3796
|
+
function zu(t, e, r) {
|
|
3797
|
+
return e && ju(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
3796
3798
|
}
|
|
3797
3799
|
var $r = /* @__PURE__ */ function() {
|
|
3798
3800
|
function t() {
|
|
3799
|
-
|
|
3801
|
+
Iu(this, t), this.cache = {};
|
|
3800
3802
|
}
|
|
3801
|
-
return
|
|
3803
|
+
return zu(t, [{
|
|
3802
3804
|
key: "get",
|
|
3803
3805
|
value: function() {
|
|
3804
3806
|
for (var r = this.cache, n = arguments.length, i = new Array(n), s = 0; s < n; s++)
|
|
@@ -3832,10 +3834,10 @@ function Tt(t) {
|
|
|
3832
3834
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3833
3835
|
}, Tt(t);
|
|
3834
3836
|
}
|
|
3835
|
-
function
|
|
3837
|
+
function Mu(t, e) {
|
|
3836
3838
|
var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
3837
3839
|
if (r) return (r = r.call(t)).next.bind(r);
|
|
3838
|
-
if (Array.isArray(t) || (r =
|
|
3840
|
+
if (Array.isArray(t) || (r = Cu(t)) || e) {
|
|
3839
3841
|
r && (t = r);
|
|
3840
3842
|
var n = 0;
|
|
3841
3843
|
return function() {
|
|
@@ -3845,7 +3847,7 @@ function ju(t, e) {
|
|
|
3845
3847
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3846
3848
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3847
3849
|
}
|
|
3848
|
-
function
|
|
3850
|
+
function Cu(t, e) {
|
|
3849
3851
|
if (t) {
|
|
3850
3852
|
if (typeof t == "string") return Ir(t, e);
|
|
3851
3853
|
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
@@ -3859,8 +3861,8 @@ function Ir(t, e) {
|
|
|
3859
3861
|
n[r] = t[r];
|
|
3860
3862
|
return n;
|
|
3861
3863
|
}
|
|
3862
|
-
function
|
|
3863
|
-
for (var r =
|
|
3864
|
+
function qu(t, e) {
|
|
3865
|
+
for (var r = Mu(t), n; !(n = r()).done; ) {
|
|
3864
3866
|
var i = n.value;
|
|
3865
3867
|
if (e(i))
|
|
3866
3868
|
return i;
|
|
@@ -3870,7 +3872,7 @@ function zu(t, e) {
|
|
|
3870
3872
|
}
|
|
3871
3873
|
throw new Error("No locale data has been registered for any of the locales: ".concat(t.join(", ")));
|
|
3872
3874
|
}
|
|
3873
|
-
function
|
|
3875
|
+
function Uu() {
|
|
3874
3876
|
var t = (typeof Intl > "u" ? "undefined" : Tt(Intl)) === "object";
|
|
3875
3877
|
return t && typeof Intl.DateTimeFormat == "function";
|
|
3876
3878
|
}
|
|
@@ -3882,16 +3884,16 @@ function Ot(t) {
|
|
|
3882
3884
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3883
3885
|
}, Ot(t);
|
|
3884
3886
|
}
|
|
3885
|
-
function
|
|
3886
|
-
return
|
|
3887
|
+
function Vu(t) {
|
|
3888
|
+
return Hu(t) && (Array.isArray(t.steps) || // `gradation` property is deprecated: it has been renamed to `steps`.
|
|
3887
3889
|
Array.isArray(t.gradation) || // `flavour` property is deprecated: it has been renamed to `labels`.
|
|
3888
3890
|
Array.isArray(t.flavour) || typeof t.flavour == "string" || Array.isArray(t.labels) || typeof t.labels == "string" || // `units` property is deprecated.
|
|
3889
3891
|
Array.isArray(t.units) || // `custom` property is deprecated.
|
|
3890
3892
|
typeof t.custom == "function");
|
|
3891
3893
|
}
|
|
3892
|
-
var
|
|
3893
|
-
function
|
|
3894
|
-
return Ot(t) !== void 0 && t !== null && t.constructor ===
|
|
3894
|
+
var Bu = {}.constructor;
|
|
3895
|
+
function Hu(t) {
|
|
3896
|
+
return Ot(t) !== void 0 && t !== null && t.constructor === Bu;
|
|
3895
3897
|
}
|
|
3896
3898
|
var Y = 60, Ge = 60 * Y, ae = 24 * Ge, St = 7 * ae, kt = 30.44 * ae, Un = 146097 / 400 * ae;
|
|
3897
3899
|
function ye(t) {
|
|
@@ -3960,7 +3962,7 @@ function jr(t, e, r) {
|
|
|
3960
3962
|
if (e === "now" ? s = ye(t) : s = ye(e), i !== void 0 && s !== void 0)
|
|
3961
3963
|
return i - s * (1 - Zt(n));
|
|
3962
3964
|
}
|
|
3963
|
-
function
|
|
3965
|
+
function zr(t, e) {
|
|
3964
3966
|
var r = Object.keys(t);
|
|
3965
3967
|
if (Object.getOwnPropertySymbols) {
|
|
3966
3968
|
var n = Object.getOwnPropertySymbols(t);
|
|
@@ -3970,24 +3972,24 @@ function Mr(t, e) {
|
|
|
3970
3972
|
}
|
|
3971
3973
|
return r;
|
|
3972
3974
|
}
|
|
3973
|
-
function
|
|
3975
|
+
function Wu(t) {
|
|
3974
3976
|
for (var e = 1; e < arguments.length; e++) {
|
|
3975
3977
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
3976
|
-
e % 2 ?
|
|
3977
|
-
|
|
3978
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
3978
|
+
e % 2 ? zr(Object(r), !0).forEach(function(n) {
|
|
3979
|
+
Yu(t, n, r[n]);
|
|
3980
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : zr(Object(r)).forEach(function(n) {
|
|
3979
3981
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
3980
3982
|
});
|
|
3981
3983
|
}
|
|
3982
3984
|
return t;
|
|
3983
3985
|
}
|
|
3984
|
-
function
|
|
3986
|
+
function Yu(t, e, r) {
|
|
3985
3987
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
3986
3988
|
}
|
|
3987
|
-
function
|
|
3989
|
+
function Ju(t, e, r) {
|
|
3988
3990
|
var n = r.now, i = r.future, s = r.round, o = r.units;
|
|
3989
|
-
t =
|
|
3990
|
-
var a =
|
|
3991
|
+
t = Zu(t, o);
|
|
3992
|
+
var a = Qu(t, e, {
|
|
3991
3993
|
now: n,
|
|
3992
3994
|
future: i,
|
|
3993
3995
|
round: s
|
|
@@ -4000,7 +4002,7 @@ function Wu(t, e, r) {
|
|
|
4000
4002
|
return [void 0, void 0, t[0]];
|
|
4001
4003
|
}
|
|
4002
4004
|
}
|
|
4003
|
-
function
|
|
4005
|
+
function Qu(t, e, r) {
|
|
4004
4006
|
var n = r.now, i = r.future, s = r.round;
|
|
4005
4007
|
if (t.length !== 0) {
|
|
4006
4008
|
var o = Hn(t, e, {
|
|
@@ -4020,39 +4022,39 @@ function Yu(t, e, r) {
|
|
|
4020
4022
|
}
|
|
4021
4023
|
}
|
|
4022
4024
|
function Hn(t, e, r) {
|
|
4023
|
-
var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i = Bn(t[n],
|
|
4025
|
+
var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, i = Bn(t[n], Wu({
|
|
4024
4026
|
prevStep: t[n - 1],
|
|
4025
4027
|
timestamp: r.now - e * 1e3
|
|
4026
4028
|
}, r));
|
|
4027
4029
|
return i === void 0 || Math.abs(e) < i ? n - 1 : n === t.length - 1 ? n : Hn(t, e, r, n + 1);
|
|
4028
4030
|
}
|
|
4029
|
-
function
|
|
4031
|
+
function Zu(t, e) {
|
|
4030
4032
|
return t.filter(function(r) {
|
|
4031
4033
|
var n = r.unit, i = r.formatAs;
|
|
4032
4034
|
return n = n || i, n ? e.indexOf(n) >= 0 : !0;
|
|
4033
4035
|
});
|
|
4034
4036
|
}
|
|
4035
|
-
function
|
|
4037
|
+
function Gu(t, e, r) {
|
|
4036
4038
|
var n = r.now, i = r.round;
|
|
4037
4039
|
if (ye(t)) {
|
|
4038
4040
|
var s = ye(t) * 1e3, o = e > n, a = Math.abs(e - n), l = Re(i)(a / s) * s;
|
|
4039
|
-
return o ? l > 0 ? a - l +
|
|
4041
|
+
return o ? l > 0 ? a - l + Ku(i, s) : a - l + 1 : -(a - l) + Xu(i, s);
|
|
4040
4042
|
}
|
|
4041
4043
|
}
|
|
4042
|
-
function
|
|
4044
|
+
function Xu(t, e) {
|
|
4043
4045
|
return Zt(t) * e;
|
|
4044
4046
|
}
|
|
4045
|
-
function
|
|
4047
|
+
function Ku(t, e) {
|
|
4046
4048
|
return (1 - Zt(t)) * e + 1;
|
|
4047
4049
|
}
|
|
4048
|
-
var
|
|
4049
|
-
function
|
|
4050
|
+
var el = 365 * 24 * 60 * 60 * 1e3, Wn = 1e3 * el;
|
|
4051
|
+
function tl(t, e, r) {
|
|
4050
4052
|
var n = r.prevStep, i = r.nextStep, s = r.now, o = r.future, a = r.round, l = t.getTime ? t.getTime() : t, c = function(F) {
|
|
4051
|
-
return
|
|
4053
|
+
return Gu(F, l, {
|
|
4052
4054
|
now: s,
|
|
4053
4055
|
round: a
|
|
4054
4056
|
});
|
|
4055
|
-
}, f =
|
|
4057
|
+
}, f = nl(o ? e : i, l, {
|
|
4056
4058
|
future: o,
|
|
4057
4059
|
now: s,
|
|
4058
4060
|
round: a,
|
|
@@ -4074,7 +4076,7 @@ function Ku(t, e, r) {
|
|
|
4074
4076
|
return d === void 0 ? f : Math.min(d, f);
|
|
4075
4077
|
}
|
|
4076
4078
|
}
|
|
4077
|
-
function
|
|
4079
|
+
function rl(t, e, r) {
|
|
4078
4080
|
var n = r.now, i = r.future, s = r.round, o = r.prevStep, a = Bn(t, {
|
|
4079
4081
|
timestamp: e,
|
|
4080
4082
|
now: n,
|
|
@@ -4085,10 +4087,10 @@ function el(t, e, r) {
|
|
|
4085
4087
|
if (a !== void 0)
|
|
4086
4088
|
return i ? e - a * 1e3 + 1 : a === 0 && e === n ? Wn : e + a * 1e3;
|
|
4087
4089
|
}
|
|
4088
|
-
function
|
|
4090
|
+
function nl(t, e, r) {
|
|
4089
4091
|
var n = r.now, i = r.future, s = r.round, o = r.prevStep;
|
|
4090
4092
|
if (t) {
|
|
4091
|
-
var a =
|
|
4093
|
+
var a = rl(t, e, {
|
|
4092
4094
|
now: n,
|
|
4093
4095
|
future: i,
|
|
4094
4096
|
round: s,
|
|
@@ -4107,7 +4109,7 @@ function Jn(t) {
|
|
|
4107
4109
|
throw new Error("[javascript-time-ago] No locale data passed.");
|
|
4108
4110
|
Yn[t.locale] = t;
|
|
4109
4111
|
}
|
|
4110
|
-
const
|
|
4112
|
+
const il = [{
|
|
4111
4113
|
formatAs: "now"
|
|
4112
4114
|
}, {
|
|
4113
4115
|
formatAs: "second"
|
|
@@ -4124,10 +4126,10 @@ const rl = [{
|
|
|
4124
4126
|
}, {
|
|
4125
4127
|
formatAs: "year"
|
|
4126
4128
|
}], Lt = {
|
|
4127
|
-
steps:
|
|
4129
|
+
steps: il,
|
|
4128
4130
|
labels: "long"
|
|
4129
4131
|
};
|
|
4130
|
-
function
|
|
4132
|
+
function Mr(t, e) {
|
|
4131
4133
|
var r = Object.keys(t);
|
|
4132
4134
|
if (Object.getOwnPropertySymbols) {
|
|
4133
4135
|
var n = Object.getOwnPropertySymbols(t);
|
|
@@ -4140,15 +4142,15 @@ function zr(t, e) {
|
|
|
4140
4142
|
function Cr(t) {
|
|
4141
4143
|
for (var e = 1; e < arguments.length; e++) {
|
|
4142
4144
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4143
|
-
e % 2 ?
|
|
4144
|
-
|
|
4145
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
4145
|
+
e % 2 ? Mr(Object(r), !0).forEach(function(n) {
|
|
4146
|
+
sl(t, n, r[n]);
|
|
4147
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Mr(Object(r)).forEach(function(n) {
|
|
4146
4148
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4147
4149
|
});
|
|
4148
4150
|
}
|
|
4149
4151
|
return t;
|
|
4150
4152
|
}
|
|
4151
|
-
function
|
|
4153
|
+
function sl(t, e, r) {
|
|
4152
4154
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4153
4155
|
}
|
|
4154
4156
|
const At = Cr(Cr({}, Lt), {}, {
|
|
@@ -4250,7 +4252,7 @@ const At = Cr(Cr({}, Lt), {}, {
|
|
|
4250
4252
|
gradation: Qn,
|
|
4251
4253
|
flavour: "long",
|
|
4252
4254
|
units: ["now", "minute", "hour", "day", "week", "month", "year"]
|
|
4253
|
-
},
|
|
4255
|
+
}, ol = {
|
|
4254
4256
|
gradation: Qn,
|
|
4255
4257
|
flavour: "long-time",
|
|
4256
4258
|
units: ["now", "minute", "hour", "day", "week", "month", "year"]
|
|
@@ -4264,7 +4266,7 @@ var Ft = [{
|
|
|
4264
4266
|
formatAs: "minute"
|
|
4265
4267
|
}, {
|
|
4266
4268
|
formatAs: "hour"
|
|
4267
|
-
}], B = {},
|
|
4269
|
+
}], B = {}, al = {
|
|
4268
4270
|
minTime: function(e, r) {
|
|
4269
4271
|
r.future;
|
|
4270
4272
|
var n = r.getMinTimeForUnit;
|
|
@@ -4276,7 +4278,7 @@ var Ft = [{
|
|
|
4276
4278
|
day: "numeric"
|
|
4277
4279
|
})), B[r].dayMonth.format(Zn(e));
|
|
4278
4280
|
}
|
|
4279
|
-
},
|
|
4281
|
+
}, ul = {
|
|
4280
4282
|
minTime: function(e, r) {
|
|
4281
4283
|
var n = r.future;
|
|
4282
4284
|
if (n) {
|
|
@@ -4295,7 +4297,7 @@ var Ft = [{
|
|
|
4295
4297
|
})), B[r].dayMonthYear.format(Zn(e));
|
|
4296
4298
|
}
|
|
4297
4299
|
};
|
|
4298
|
-
|
|
4300
|
+
Uu() ? Ft.push(al, ul) : Ft.push({
|
|
4299
4301
|
formatAs: "day"
|
|
4300
4302
|
}, {
|
|
4301
4303
|
formatAs: "week"
|
|
@@ -4337,17 +4339,17 @@ function Vr(t) {
|
|
|
4337
4339
|
for (var e = 1; e < arguments.length; e++) {
|
|
4338
4340
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4339
4341
|
e % 2 ? Ur(Object(r), !0).forEach(function(n) {
|
|
4340
|
-
|
|
4342
|
+
ll(t, n, r[n]);
|
|
4341
4343
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Ur(Object(r)).forEach(function(n) {
|
|
4342
4344
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4343
4345
|
});
|
|
4344
4346
|
}
|
|
4345
4347
|
return t;
|
|
4346
4348
|
}
|
|
4347
|
-
function
|
|
4349
|
+
function ll(t, e, r) {
|
|
4348
4350
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4349
4351
|
}
|
|
4350
|
-
const
|
|
4352
|
+
const cl = Vr(Vr({}, le), {}, {
|
|
4351
4353
|
// Add "now".
|
|
4352
4354
|
steps: [{
|
|
4353
4355
|
formatAs: "now"
|
|
@@ -4367,14 +4369,14 @@ function Hr(t) {
|
|
|
4367
4369
|
for (var e = 1; e < arguments.length; e++) {
|
|
4368
4370
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4369
4371
|
e % 2 ? Br(Object(r), !0).forEach(function(n) {
|
|
4370
|
-
|
|
4372
|
+
fl(t, n, r[n]);
|
|
4371
4373
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Br(Object(r)).forEach(function(n) {
|
|
4372
4374
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4373
4375
|
});
|
|
4374
4376
|
}
|
|
4375
4377
|
return t;
|
|
4376
4378
|
}
|
|
4377
|
-
function
|
|
4379
|
+
function fl(t, e, r) {
|
|
4378
4380
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4379
4381
|
}
|
|
4380
4382
|
const Dt = Hr(Hr({}, le), {}, {
|
|
@@ -4397,17 +4399,17 @@ function Yr(t) {
|
|
|
4397
4399
|
for (var e = 1; e < arguments.length; e++) {
|
|
4398
4400
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4399
4401
|
e % 2 ? Wr(Object(r), !0).forEach(function(n) {
|
|
4400
|
-
|
|
4402
|
+
hl(t, n, r[n]);
|
|
4401
4403
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Wr(Object(r)).forEach(function(n) {
|
|
4402
4404
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4403
4405
|
});
|
|
4404
4406
|
}
|
|
4405
4407
|
return t;
|
|
4406
4408
|
}
|
|
4407
|
-
function
|
|
4409
|
+
function hl(t, e, r) {
|
|
4408
4410
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4409
4411
|
}
|
|
4410
|
-
const
|
|
4412
|
+
const pl = Yr(Yr({}, Dt), {}, {
|
|
4411
4413
|
// Add "now".
|
|
4412
4414
|
steps: [{
|
|
4413
4415
|
formatAs: "now"
|
|
@@ -4427,17 +4429,17 @@ function Ce(t) {
|
|
|
4427
4429
|
for (var e = 1; e < arguments.length; e++) {
|
|
4428
4430
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4429
4431
|
e % 2 ? Jr(Object(r), !0).forEach(function(n) {
|
|
4430
|
-
|
|
4432
|
+
dl(t, n, r[n]);
|
|
4431
4433
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Jr(Object(r)).forEach(function(n) {
|
|
4432
4434
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4433
4435
|
});
|
|
4434
4436
|
}
|
|
4435
4437
|
return t;
|
|
4436
4438
|
}
|
|
4437
|
-
function
|
|
4439
|
+
function dl(t, e, r) {
|
|
4438
4440
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4439
4441
|
}
|
|
4440
|
-
const
|
|
4442
|
+
const ml = Ce(Ce({}, le), {}, {
|
|
4441
4443
|
// Skip "seconds".
|
|
4442
4444
|
steps: le.steps.filter(function(t) {
|
|
4443
4445
|
return t.formatAs !== "second";
|
|
@@ -4491,17 +4493,17 @@ function Zr(t) {
|
|
|
4491
4493
|
for (var e = 1; e < arguments.length; e++) {
|
|
4492
4494
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4493
4495
|
e % 2 ? Qr(Object(r), !0).forEach(function(n) {
|
|
4494
|
-
|
|
4496
|
+
gl(t, n, r[n]);
|
|
4495
4497
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Qr(Object(r)).forEach(function(n) {
|
|
4496
4498
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4497
4499
|
});
|
|
4498
4500
|
}
|
|
4499
4501
|
return t;
|
|
4500
4502
|
}
|
|
4501
|
-
function
|
|
4503
|
+
function gl(t, e, r) {
|
|
4502
4504
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4503
4505
|
}
|
|
4504
|
-
const
|
|
4506
|
+
const yl = Zr(Zr({}, Pe), {}, {
|
|
4505
4507
|
// Add "now".
|
|
4506
4508
|
steps: [{
|
|
4507
4509
|
formatAs: "now"
|
|
@@ -4521,14 +4523,14 @@ function Xr(t) {
|
|
|
4521
4523
|
for (var e = 1; e < arguments.length; e++) {
|
|
4522
4524
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4523
4525
|
e % 2 ? Gr(Object(r), !0).forEach(function(n) {
|
|
4524
|
-
|
|
4526
|
+
wl(t, n, r[n]);
|
|
4525
4527
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Gr(Object(r)).forEach(function(n) {
|
|
4526
4528
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4527
4529
|
});
|
|
4528
4530
|
}
|
|
4529
4531
|
return t;
|
|
4530
4532
|
}
|
|
4531
|
-
function
|
|
4533
|
+
function wl(t, e, r) {
|
|
4532
4534
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4533
4535
|
}
|
|
4534
4536
|
const _t = Xr(Xr({}, Pe), {}, {
|
|
@@ -4551,23 +4553,23 @@ function en(t) {
|
|
|
4551
4553
|
for (var e = 1; e < arguments.length; e++) {
|
|
4552
4554
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
4553
4555
|
e % 2 ? Kr(Object(r), !0).forEach(function(n) {
|
|
4554
|
-
|
|
4556
|
+
vl(t, n, r[n]);
|
|
4555
4557
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Kr(Object(r)).forEach(function(n) {
|
|
4556
4558
|
Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
|
|
4557
4559
|
});
|
|
4558
4560
|
}
|
|
4559
4561
|
return t;
|
|
4560
4562
|
}
|
|
4561
|
-
function
|
|
4563
|
+
function vl(t, e, r) {
|
|
4562
4564
|
return e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
|
|
4563
4565
|
}
|
|
4564
|
-
const
|
|
4566
|
+
const bl = en(en({}, _t), {}, {
|
|
4565
4567
|
// Add "now".
|
|
4566
4568
|
steps: [{
|
|
4567
4569
|
formatAs: "now"
|
|
4568
4570
|
}].concat(_t.steps)
|
|
4569
4571
|
});
|
|
4570
|
-
function
|
|
4572
|
+
function Tl(t) {
|
|
4571
4573
|
switch (t) {
|
|
4572
4574
|
// "default" style name is deprecated.
|
|
4573
4575
|
case "default":
|
|
@@ -4580,25 +4582,25 @@ function vl(t) {
|
|
|
4580
4582
|
// "time" style name is deprecated.
|
|
4581
4583
|
case "time":
|
|
4582
4584
|
case "approximate-time":
|
|
4583
|
-
return
|
|
4585
|
+
return ol;
|
|
4584
4586
|
case "mini":
|
|
4585
4587
|
return Pe;
|
|
4586
4588
|
case "mini-now":
|
|
4587
|
-
return
|
|
4589
|
+
return yl;
|
|
4588
4590
|
case "mini-minute":
|
|
4589
4591
|
return _t;
|
|
4590
4592
|
case "mini-minute-now":
|
|
4591
|
-
return
|
|
4593
|
+
return bl;
|
|
4592
4594
|
case "twitter":
|
|
4593
4595
|
return le;
|
|
4594
4596
|
case "twitter-now":
|
|
4595
|
-
return
|
|
4597
|
+
return cl;
|
|
4596
4598
|
case "twitter-minute":
|
|
4597
4599
|
return Dt;
|
|
4598
4600
|
case "twitter-minute-now":
|
|
4599
|
-
return fl;
|
|
4600
|
-
case "twitter-first-minute":
|
|
4601
4601
|
return pl;
|
|
4602
|
+
case "twitter-first-minute":
|
|
4603
|
+
return ml;
|
|
4602
4604
|
default:
|
|
4603
4605
|
return qr;
|
|
4604
4606
|
}
|
|
@@ -4611,7 +4613,7 @@ function Xe(t) {
|
|
|
4611
4613
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
4612
4614
|
}, Xe(t);
|
|
4613
4615
|
}
|
|
4614
|
-
function
|
|
4616
|
+
function Ol(t, e) {
|
|
4615
4617
|
var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
4616
4618
|
if (r) return (r = r.call(t)).next.bind(r);
|
|
4617
4619
|
if (Array.isArray(t) || (r = Gn(t)) || e) {
|
|
@@ -4624,10 +4626,10 @@ function bl(t, e) {
|
|
|
4624
4626
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
4625
4627
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
4626
4628
|
}
|
|
4627
|
-
function
|
|
4628
|
-
return
|
|
4629
|
+
function Sl(t, e) {
|
|
4630
|
+
return Ll(t) || xl(t, e) || Gn(t, e) || kl();
|
|
4629
4631
|
}
|
|
4630
|
-
function
|
|
4632
|
+
function kl() {
|
|
4631
4633
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4632
4634
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
4633
4635
|
}
|
|
@@ -4645,7 +4647,7 @@ function tn(t, e) {
|
|
|
4645
4647
|
n[r] = t[r];
|
|
4646
4648
|
return n;
|
|
4647
4649
|
}
|
|
4648
|
-
function
|
|
4650
|
+
function xl(t, e) {
|
|
4649
4651
|
var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
4650
4652
|
if (r != null) {
|
|
4651
4653
|
var n = [], i = !0, s = !1, o, a;
|
|
@@ -4664,52 +4666,52 @@ function Sl(t, e) {
|
|
|
4664
4666
|
return n;
|
|
4665
4667
|
}
|
|
4666
4668
|
}
|
|
4667
|
-
function
|
|
4669
|
+
function Ll(t) {
|
|
4668
4670
|
if (Array.isArray(t)) return t;
|
|
4669
4671
|
}
|
|
4670
|
-
function
|
|
4672
|
+
function Al(t, e) {
|
|
4671
4673
|
if (!(t instanceof e))
|
|
4672
4674
|
throw new TypeError("Cannot call a class as a function");
|
|
4673
4675
|
}
|
|
4674
|
-
function
|
|
4676
|
+
function Fl(t, e) {
|
|
4675
4677
|
for (var r = 0; r < e.length; r++) {
|
|
4676
4678
|
var n = e[r];
|
|
4677
4679
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
4678
4680
|
}
|
|
4679
4681
|
}
|
|
4680
|
-
function
|
|
4681
|
-
return e &&
|
|
4682
|
+
function Dl(t, e, r) {
|
|
4683
|
+
return e && Fl(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
4682
4684
|
}
|
|
4683
|
-
var
|
|
4685
|
+
var $ = /* @__PURE__ */ function() {
|
|
4684
4686
|
function t() {
|
|
4685
4687
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = r.polyfill;
|
|
4686
|
-
|
|
4688
|
+
Al(this, t), typeof e == "string" && (e = [e]), this.locale = qu(e.concat(t.getDefaultLocale()), me), typeof Intl < "u" && Intl.NumberFormat && (this.numberFormat = new Intl.NumberFormat(this.locale)), n === !1 ? (this.IntlRelativeTimeFormat = Intl.RelativeTimeFormat, this.IntlPluralRules = Intl.PluralRules) : (this.IntlRelativeTimeFormat = X, this.IntlPluralRules = X.PluralRules), this.relativeTimeFormatCache = new $r(), this.pluralRulesCache = new $r();
|
|
4687
4689
|
}
|
|
4688
|
-
return
|
|
4690
|
+
return Dl(t, [{
|
|
4689
4691
|
key: "format",
|
|
4690
4692
|
value: function(r, n, i) {
|
|
4691
|
-
i || (n && !
|
|
4692
|
-
var s =
|
|
4693
|
+
i || (n && !Nl(n) ? (i = n, n = void 0) : i = {}), n || (n = At), typeof n == "string" && (n = Tl(n));
|
|
4694
|
+
var s = _l(r), o = this.getLabels(n.flavour || n.labels), a = o.labels, l = o.labelsType, c;
|
|
4693
4695
|
n.now !== void 0 && (c = n.now), c === void 0 && i.now !== void 0 && (c = i.now), c === void 0 && (c = Date.now());
|
|
4694
|
-
var f = (c - s) / 1e3, d = i.future || f < 0, g =
|
|
4696
|
+
var f = (c - s) / 1e3, d = i.future || f < 0, g = El(a, me(this.locale).now, me(this.locale).long, d);
|
|
4695
4697
|
if (n.custom) {
|
|
4696
|
-
var
|
|
4698
|
+
var w = n.custom({
|
|
4697
4699
|
now: c,
|
|
4698
4700
|
date: new Date(s),
|
|
4699
4701
|
time: s,
|
|
4700
4702
|
elapsed: f,
|
|
4701
4703
|
locale: this.locale
|
|
4702
4704
|
});
|
|
4703
|
-
if (
|
|
4704
|
-
return
|
|
4705
|
+
if (w !== void 0)
|
|
4706
|
+
return w;
|
|
4705
4707
|
}
|
|
4706
|
-
var F =
|
|
4708
|
+
var F = Pl(
|
|
4707
4709
|
// Controlling `style.steps` through `style.units` seems to be deprecated:
|
|
4708
4710
|
// create a new custom `style` instead.
|
|
4709
4711
|
n.units,
|
|
4710
4712
|
a,
|
|
4711
4713
|
g
|
|
4712
|
-
), k = i.round || n.round,
|
|
4714
|
+
), k = i.round || n.round, P = Ju(
|
|
4713
4715
|
// "gradation" is a legacy name for "steps".
|
|
4714
4716
|
// For historical reasons, "approximate" steps are used by default.
|
|
4715
4717
|
// In the next major version, there'll be no default for `steps`.
|
|
@@ -4722,7 +4724,7 @@ var P = /* @__PURE__ */ function() {
|
|
|
4722
4724
|
future: d,
|
|
4723
4725
|
getNextStep: !0
|
|
4724
4726
|
}
|
|
4725
|
-
), O =
|
|
4727
|
+
), O = Sl(P, 3), D = O[0], N = O[1], E = O[2], v = this.formatDateForStep(s, N, f, {
|
|
4726
4728
|
labels: a,
|
|
4727
4729
|
labelsType: l,
|
|
4728
4730
|
nowLabel: g,
|
|
@@ -4731,16 +4733,16 @@ var P = /* @__PURE__ */ function() {
|
|
|
4731
4733
|
round: k
|
|
4732
4734
|
}) || "";
|
|
4733
4735
|
if (i.getTimeToNextUpdate) {
|
|
4734
|
-
var ee =
|
|
4735
|
-
nextStep:
|
|
4736
|
-
prevStep:
|
|
4736
|
+
var ee = tl(s, N, {
|
|
4737
|
+
nextStep: E,
|
|
4738
|
+
prevStep: D,
|
|
4737
4739
|
now: c,
|
|
4738
4740
|
future: d,
|
|
4739
4741
|
round: k
|
|
4740
4742
|
});
|
|
4741
|
-
return [
|
|
4743
|
+
return [v, ee];
|
|
4742
4744
|
}
|
|
4743
|
-
return
|
|
4745
|
+
return v;
|
|
4744
4746
|
}
|
|
4745
4747
|
}, {
|
|
4746
4748
|
key: "formatDateForStep",
|
|
@@ -4749,8 +4751,8 @@ var P = /* @__PURE__ */ function() {
|
|
|
4749
4751
|
if (n) {
|
|
4750
4752
|
if (n.format)
|
|
4751
4753
|
return n.format(r, this.locale, {
|
|
4752
|
-
formatAs: function(O,
|
|
4753
|
-
return o.formatValue(
|
|
4754
|
+
formatAs: function(O, D) {
|
|
4755
|
+
return o.formatValue(D, O, {
|
|
4754
4756
|
labels: a,
|
|
4755
4757
|
future: d
|
|
4756
4758
|
});
|
|
@@ -4758,10 +4760,10 @@ var P = /* @__PURE__ */ function() {
|
|
|
4758
4760
|
now: f,
|
|
4759
4761
|
future: d
|
|
4760
4762
|
});
|
|
4761
|
-
var
|
|
4762
|
-
if (!
|
|
4763
|
+
var w = n.unit || n.formatAs;
|
|
4764
|
+
if (!w)
|
|
4763
4765
|
throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(n)));
|
|
4764
|
-
if (
|
|
4766
|
+
if (w === "now")
|
|
4765
4767
|
return c;
|
|
4766
4768
|
var F = Math.abs(i) / Vn(n);
|
|
4767
4769
|
n.granularity && (F = Re(g)(F / n.granularity) * n.granularity);
|
|
@@ -4770,9 +4772,9 @@ var P = /* @__PURE__ */ function() {
|
|
|
4770
4772
|
case "long":
|
|
4771
4773
|
case "short":
|
|
4772
4774
|
case "narrow":
|
|
4773
|
-
return this.getFormatter(l).format(k,
|
|
4775
|
+
return this.getFormatter(l).format(k, w);
|
|
4774
4776
|
default:
|
|
4775
|
-
return this.formatValue(k,
|
|
4777
|
+
return this.formatValue(k, w, {
|
|
4776
4778
|
labels: a,
|
|
4777
4779
|
future: d
|
|
4778
4780
|
});
|
|
@@ -4872,7 +4874,7 @@ var P = /* @__PURE__ */ function() {
|
|
|
4872
4874
|
return a;
|
|
4873
4875
|
}
|
|
4874
4876
|
}), r = r.concat("long");
|
|
4875
|
-
for (var n = me(this.locale), i =
|
|
4877
|
+
for (var n = me(this.locale), i = Ol(r), s; !(s = i()).done; ) {
|
|
4876
4878
|
var o = s.value;
|
|
4877
4879
|
if (n[o])
|
|
4878
4880
|
return {
|
|
@@ -4883,53 +4885,53 @@ var P = /* @__PURE__ */ function() {
|
|
|
4883
4885
|
}
|
|
4884
4886
|
}]), t;
|
|
4885
4887
|
}(), Xn = "en";
|
|
4886
|
-
|
|
4888
|
+
$.getDefaultLocale = function() {
|
|
4887
4889
|
return Xn;
|
|
4888
4890
|
};
|
|
4889
|
-
|
|
4891
|
+
$.setDefaultLocale = function(t) {
|
|
4890
4892
|
return Xn = t;
|
|
4891
4893
|
};
|
|
4892
|
-
|
|
4894
|
+
$.addDefaultLocale = function(t) {
|
|
4893
4895
|
if (rn)
|
|
4894
4896
|
return console.error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");
|
|
4895
|
-
rn = !0,
|
|
4897
|
+
rn = !0, $.setDefaultLocale(t.locale), $.addLocale(t);
|
|
4896
4898
|
};
|
|
4897
4899
|
var rn;
|
|
4898
|
-
|
|
4900
|
+
$.addLocale = function(t) {
|
|
4899
4901
|
Jn(t), X.addLocale(t);
|
|
4900
4902
|
};
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
+
$.locale = $.addLocale;
|
|
4904
|
+
$.addLabels = function(t, e, r) {
|
|
4903
4905
|
var n = me(t);
|
|
4904
4906
|
n || (Jn({
|
|
4905
4907
|
locale: t
|
|
4906
4908
|
}), n = me(t)), n[e] = r;
|
|
4907
4909
|
};
|
|
4908
|
-
function
|
|
4909
|
-
if (t.constructor === Date ||
|
|
4910
|
+
function _l(t) {
|
|
4911
|
+
if (t.constructor === Date || Rl(t))
|
|
4910
4912
|
return t.getTime();
|
|
4911
4913
|
if (typeof t == "number")
|
|
4912
4914
|
return t;
|
|
4913
4915
|
throw new Error("Unsupported relative time formatter input: ".concat(Xe(t), ", ").concat(t));
|
|
4914
4916
|
}
|
|
4915
|
-
function
|
|
4917
|
+
function Rl(t) {
|
|
4916
4918
|
return Xe(t) === "object" && typeof t.getTime == "function";
|
|
4917
4919
|
}
|
|
4918
|
-
function
|
|
4920
|
+
function Pl(t, e, r) {
|
|
4919
4921
|
var n = Object.keys(e);
|
|
4920
4922
|
return r && n.push("now"), t && (n = t.filter(function(i) {
|
|
4921
4923
|
return i === "now" || n.indexOf(i) >= 0;
|
|
4922
4924
|
})), n;
|
|
4923
4925
|
}
|
|
4924
|
-
function
|
|
4926
|
+
function El(t, e, r, n) {
|
|
4925
4927
|
var i = t.now || e && e.now;
|
|
4926
4928
|
if (i)
|
|
4927
4929
|
return typeof i == "string" ? i : n ? i.future : i.past;
|
|
4928
4930
|
if (r && r.second && r.second.current)
|
|
4929
4931
|
return r.second.current;
|
|
4930
4932
|
}
|
|
4931
|
-
function
|
|
4932
|
-
return typeof t == "string" ||
|
|
4933
|
+
function Nl(t) {
|
|
4934
|
+
return typeof t == "string" || Vu(t);
|
|
4933
4935
|
}
|
|
4934
4936
|
const Kn = {
|
|
4935
4937
|
locale: "en",
|
|
@@ -5209,7 +5211,7 @@ const Kn = {
|
|
|
5209
5211
|
}
|
|
5210
5212
|
}
|
|
5211
5213
|
};
|
|
5212
|
-
var
|
|
5214
|
+
var $l = ["date", "verboseDate", "tooltip", "children"];
|
|
5213
5215
|
function Rt() {
|
|
5214
5216
|
return Rt = Object.assign || function(t) {
|
|
5215
5217
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -5220,9 +5222,9 @@ function Rt() {
|
|
|
5220
5222
|
return t;
|
|
5221
5223
|
}, Rt.apply(this, arguments);
|
|
5222
5224
|
}
|
|
5223
|
-
function
|
|
5225
|
+
function Il(t, e) {
|
|
5224
5226
|
if (t == null) return {};
|
|
5225
|
-
var r =
|
|
5227
|
+
var r = jl(t, e), n, i;
|
|
5226
5228
|
if (Object.getOwnPropertySymbols) {
|
|
5227
5229
|
var s = Object.getOwnPropertySymbols(t);
|
|
5228
5230
|
for (i = 0; i < s.length; i++)
|
|
@@ -5230,7 +5232,7 @@ function Nl(t, e) {
|
|
|
5230
5232
|
}
|
|
5231
5233
|
return r;
|
|
5232
5234
|
}
|
|
5233
|
-
function
|
|
5235
|
+
function jl(t, e) {
|
|
5234
5236
|
if (t == null) return {};
|
|
5235
5237
|
var r = {}, n = Object.keys(t), i, s;
|
|
5236
5238
|
for (s = 0; s < n.length; s++)
|
|
@@ -5238,7 +5240,7 @@ function $l(t, e) {
|
|
|
5238
5240
|
return r;
|
|
5239
5241
|
}
|
|
5240
5242
|
function Ke(t, e) {
|
|
5241
|
-
var r = t.date, n = t.verboseDate, i = t.tooltip, s = t.children, o =
|
|
5243
|
+
var r = t.date, n = t.verboseDate, i = t.tooltip, s = t.children, o = Il(t, $l), a = ne(function() {
|
|
5242
5244
|
return r.toISOString();
|
|
5243
5245
|
}, [r]);
|
|
5244
5246
|
return /* @__PURE__ */ De.createElement("time", Rt({
|
|
@@ -5258,19 +5260,19 @@ Ke.propTypes = {
|
|
|
5258
5260
|
var nn = Number.isNaN || function(e) {
|
|
5259
5261
|
return typeof e == "number" && e !== e;
|
|
5260
5262
|
};
|
|
5261
|
-
function
|
|
5263
|
+
function zl(t, e) {
|
|
5262
5264
|
return !!(t === e || nn(t) && nn(e));
|
|
5263
5265
|
}
|
|
5264
|
-
function
|
|
5266
|
+
function Ml(t, e) {
|
|
5265
5267
|
if (t.length !== e.length)
|
|
5266
5268
|
return !1;
|
|
5267
5269
|
for (var r = 0; r < t.length; r++)
|
|
5268
|
-
if (!
|
|
5270
|
+
if (!zl(t[r], e[r]))
|
|
5269
5271
|
return !1;
|
|
5270
5272
|
return !0;
|
|
5271
5273
|
}
|
|
5272
|
-
function
|
|
5273
|
-
e === void 0 && (e =
|
|
5274
|
+
function Cl(t, e) {
|
|
5275
|
+
e === void 0 && (e = Ml);
|
|
5274
5276
|
var r = null;
|
|
5275
5277
|
function n() {
|
|
5276
5278
|
for (var i = [], s = 0; s < arguments.length; s++)
|
|
@@ -5296,7 +5298,7 @@ function Pt(t) {
|
|
|
5296
5298
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
5297
5299
|
}, Pt(t);
|
|
5298
5300
|
}
|
|
5299
|
-
function
|
|
5301
|
+
function ql(t) {
|
|
5300
5302
|
if (ei())
|
|
5301
5303
|
return Intl.DateTimeFormat.supportedLocalesOf(t)[0];
|
|
5302
5304
|
}
|
|
@@ -5312,24 +5314,24 @@ function et(t) {
|
|
|
5312
5314
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
5313
5315
|
}, et(t);
|
|
5314
5316
|
}
|
|
5315
|
-
function
|
|
5317
|
+
function Ul(t, e) {
|
|
5316
5318
|
if (!(t instanceof e))
|
|
5317
5319
|
throw new TypeError("Cannot call a class as a function");
|
|
5318
5320
|
}
|
|
5319
|
-
function
|
|
5321
|
+
function Vl(t, e) {
|
|
5320
5322
|
for (var r = 0; r < e.length; r++) {
|
|
5321
5323
|
var n = e[r];
|
|
5322
5324
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
5323
5325
|
}
|
|
5324
5326
|
}
|
|
5325
|
-
function
|
|
5326
|
-
return e &&
|
|
5327
|
+
function Bl(t, e, r) {
|
|
5328
|
+
return e && Vl(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
|
|
5327
5329
|
}
|
|
5328
5330
|
var ti = /* @__PURE__ */ function() {
|
|
5329
5331
|
function t() {
|
|
5330
|
-
|
|
5332
|
+
Ul(this, t), this.cache = {};
|
|
5331
5333
|
}
|
|
5332
|
-
return
|
|
5334
|
+
return Bl(t, [{
|
|
5333
5335
|
key: "get",
|
|
5334
5336
|
value: function() {
|
|
5335
5337
|
for (var r = this.cache, n = arguments.length, i = new Array(n), s = 0; s < n; s++)
|
|
@@ -5354,22 +5356,22 @@ var ti = /* @__PURE__ */ function() {
|
|
|
5354
5356
|
return a[o] = s;
|
|
5355
5357
|
}
|
|
5356
5358
|
}]), t;
|
|
5357
|
-
}(), sn = new ti(),
|
|
5359
|
+
}(), sn = new ti(), Hl = ei(), Wl = function(e) {
|
|
5358
5360
|
return e.toString();
|
|
5359
5361
|
};
|
|
5360
|
-
function
|
|
5361
|
-
if (!
|
|
5362
|
-
return
|
|
5363
|
-
var r =
|
|
5362
|
+
function Yl(t, e) {
|
|
5363
|
+
if (!Hl)
|
|
5364
|
+
return Wl;
|
|
5365
|
+
var r = Ql(t), n = JSON.stringify(e), i = sn.get(String(r), n) || sn.put(String(r), n, new Intl.DateTimeFormat(r, e));
|
|
5364
5366
|
return function(s) {
|
|
5365
5367
|
return i.format(s);
|
|
5366
5368
|
};
|
|
5367
5369
|
}
|
|
5368
|
-
const
|
|
5370
|
+
const Jl = Cl(Yl);
|
|
5369
5371
|
var pt = {};
|
|
5370
|
-
function
|
|
5372
|
+
function Ql(t) {
|
|
5371
5373
|
var e = t.toString();
|
|
5372
|
-
return pt[e] ? pt[e] : pt[e] =
|
|
5374
|
+
return pt[e] ? pt[e] : pt[e] = ql(t);
|
|
5373
5375
|
}
|
|
5374
5376
|
function Et(t) {
|
|
5375
5377
|
"@babel/helpers - typeof";
|
|
@@ -5379,19 +5381,19 @@ function Et(t) {
|
|
|
5379
5381
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
5380
5382
|
}, Et(t);
|
|
5381
5383
|
}
|
|
5382
|
-
function
|
|
5383
|
-
return
|
|
5384
|
+
function Zl(t) {
|
|
5385
|
+
return Gl(t) ? t : new Date(t);
|
|
5384
5386
|
}
|
|
5385
|
-
function
|
|
5386
|
-
return t instanceof Date ||
|
|
5387
|
+
function Gl(t) {
|
|
5388
|
+
return t instanceof Date || Xl(t);
|
|
5387
5389
|
}
|
|
5388
|
-
function
|
|
5390
|
+
function Xl(t) {
|
|
5389
5391
|
return Et(t) === "object" && typeof t.getTime == "function";
|
|
5390
5392
|
}
|
|
5391
5393
|
var on = new ti();
|
|
5392
|
-
function
|
|
5394
|
+
function Kl(t, e) {
|
|
5393
5395
|
var r = e.polyfill, n = String(t) + ":" + String(r);
|
|
5394
|
-
return on.get(n) || on.put(n, new
|
|
5396
|
+
return on.get(n) || on.put(n, new $(t, {
|
|
5395
5397
|
polyfill: r
|
|
5396
5398
|
}));
|
|
5397
5399
|
}
|
|
@@ -5411,14 +5413,14 @@ var ot = { exports: {} }, Ae = { exports: {} };
|
|
|
5411
5413
|
return (/* @__PURE__ */ new Date()).getTime() - r;
|
|
5412
5414
|
}, r = (/* @__PURE__ */ new Date()).getTime());
|
|
5413
5415
|
}).call(dn);
|
|
5414
|
-
var
|
|
5416
|
+
var ec = Ae.exports, tc = ec, J = typeof window > "u" ? dn : window, qe = ["moz", "webkit"], we = "AnimationFrame", Te = J["request" + we], Ee = J["cancel" + we] || J["cancelRequest" + we];
|
|
5415
5417
|
for (var Le = 0; !Te && Le < qe.length; Le++)
|
|
5416
5418
|
Te = J[qe[Le] + "Request" + we], Ee = J[qe[Le] + "Cancel" + we] || J[qe[Le] + "CancelRequest" + we];
|
|
5417
5419
|
if (!Te || !Ee) {
|
|
5418
|
-
var dt = 0, an = 0, re = [],
|
|
5420
|
+
var dt = 0, an = 0, re = [], rc = 1e3 / 60;
|
|
5419
5421
|
Te = function(t) {
|
|
5420
5422
|
if (re.length === 0) {
|
|
5421
|
-
var e =
|
|
5423
|
+
var e = tc(), r = Math.max(0, rc - (e - dt));
|
|
5422
5424
|
dt = r + e, setTimeout(function() {
|
|
5423
5425
|
var n = re.slice(0);
|
|
5424
5426
|
re.length = 0;
|
|
@@ -5452,9 +5454,9 @@ ot.exports.cancel = function() {
|
|
|
5452
5454
|
ot.exports.polyfill = function(t) {
|
|
5453
5455
|
t || (t = J), t.requestAnimationFrame = Te, t.cancelAnimationFrame = Ee;
|
|
5454
5456
|
};
|
|
5455
|
-
var
|
|
5456
|
-
const un = /* @__PURE__ */
|
|
5457
|
-
function
|
|
5457
|
+
var nc = ot.exports;
|
|
5458
|
+
const un = /* @__PURE__ */ vi(nc);
|
|
5459
|
+
function ic(t, e) {
|
|
5458
5460
|
if (t.length === 0)
|
|
5459
5461
|
return 0;
|
|
5460
5462
|
for (var r = 0, n = t.length - 1, i; r <= n; ) {
|
|
@@ -5469,14 +5471,14 @@ function rc(t, e) {
|
|
|
5469
5471
|
return r;
|
|
5470
5472
|
}
|
|
5471
5473
|
}
|
|
5472
|
-
function
|
|
5473
|
-
return
|
|
5474
|
+
function sc(t, e) {
|
|
5475
|
+
return lc(t) || uc(t, e) || ac(t, e) || oc();
|
|
5474
5476
|
}
|
|
5475
|
-
function
|
|
5477
|
+
function oc() {
|
|
5476
5478
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5477
5479
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
5478
5480
|
}
|
|
5479
|
-
function
|
|
5481
|
+
function ac(t, e) {
|
|
5480
5482
|
if (t) {
|
|
5481
5483
|
if (typeof t == "string") return ln(t, e);
|
|
5482
5484
|
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
@@ -5490,7 +5492,7 @@ function ln(t, e) {
|
|
|
5490
5492
|
n[r] = t[r];
|
|
5491
5493
|
return n;
|
|
5492
5494
|
}
|
|
5493
|
-
function
|
|
5495
|
+
function uc(t, e) {
|
|
5494
5496
|
var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
5495
5497
|
if (r != null) {
|
|
5496
5498
|
var n = [], i = !0, s = !1, o, a;
|
|
@@ -5509,10 +5511,10 @@ function oc(t, e) {
|
|
|
5509
5511
|
return n;
|
|
5510
5512
|
}
|
|
5511
5513
|
}
|
|
5512
|
-
function
|
|
5514
|
+
function lc(t) {
|
|
5513
5515
|
if (Array.isArray(t)) return t;
|
|
5514
5516
|
}
|
|
5515
|
-
const
|
|
5517
|
+
const cc = {
|
|
5516
5518
|
instances: [],
|
|
5517
5519
|
add: function(e) {
|
|
5518
5520
|
var r = this, n = this.instances.length === 0;
|
|
@@ -5547,35 +5549,35 @@ const uc = {
|
|
|
5547
5549
|
un.cancel(this.scheduledTick);
|
|
5548
5550
|
}
|
|
5549
5551
|
};
|
|
5550
|
-
function
|
|
5551
|
-
var e = t.getNextValue(), r =
|
|
5552
|
+
function fc(t) {
|
|
5553
|
+
var e = t.getNextValue(), r = sc(e, 2), n = r[0], i = r[1];
|
|
5552
5554
|
t.setValue(n), t.nextUpdateTime = i;
|
|
5553
5555
|
}
|
|
5554
5556
|
function cn(t, e) {
|
|
5555
|
-
|
|
5557
|
+
fc(t), ni(e, t), ri(e, t);
|
|
5556
5558
|
}
|
|
5557
5559
|
function ri(t, e) {
|
|
5558
|
-
var r =
|
|
5560
|
+
var r = hc(t, e);
|
|
5559
5561
|
t.splice(r, 0, e);
|
|
5560
5562
|
}
|
|
5561
5563
|
function ni(t, e) {
|
|
5562
5564
|
var r = t.indexOf(e);
|
|
5563
5565
|
t.splice(r, 1);
|
|
5564
5566
|
}
|
|
5565
|
-
function
|
|
5567
|
+
function hc(t, e) {
|
|
5566
5568
|
var r = e.nextUpdateTime;
|
|
5567
|
-
return
|
|
5569
|
+
return ic(t, function(n) {
|
|
5568
5570
|
return n.nextUpdateTime === r ? 0 : n.nextUpdateTime > r ? 1 : -1;
|
|
5569
5571
|
});
|
|
5570
5572
|
}
|
|
5571
5573
|
function Ue(t, e) {
|
|
5572
|
-
return
|
|
5574
|
+
return gc(t) || mc(t, e) || dc(t, e) || pc();
|
|
5573
5575
|
}
|
|
5574
|
-
function
|
|
5576
|
+
function pc() {
|
|
5575
5577
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5576
5578
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
5577
5579
|
}
|
|
5578
|
-
function
|
|
5580
|
+
function dc(t, e) {
|
|
5579
5581
|
if (t) {
|
|
5580
5582
|
if (typeof t == "string") return fn(t, e);
|
|
5581
5583
|
var r = Object.prototype.toString.call(t).slice(8, -1);
|
|
@@ -5589,7 +5591,7 @@ function fn(t, e) {
|
|
|
5589
5591
|
n[r] = t[r];
|
|
5590
5592
|
return n;
|
|
5591
5593
|
}
|
|
5592
|
-
function
|
|
5594
|
+
function mc(t, e) {
|
|
5593
5595
|
var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
5594
5596
|
if (r != null) {
|
|
5595
5597
|
var n = [], i = !0, s = !1, o, a;
|
|
@@ -5608,58 +5610,58 @@ function pc(t, e) {
|
|
|
5608
5610
|
return n;
|
|
5609
5611
|
}
|
|
5610
5612
|
}
|
|
5611
|
-
function
|
|
5613
|
+
function gc(t) {
|
|
5612
5614
|
if (Array.isArray(t)) return t;
|
|
5613
5615
|
}
|
|
5614
|
-
function
|
|
5615
|
-
var e = t.date, r = t.future, n = t.locale, i = t.locales, s = t.timeStyle, o = t.round, a = t.minTimeLeft, l = t.formatVerboseDate, c = t.verboseDateFormat, f = c === void 0 ?
|
|
5616
|
-
return n && (i = [n]), i.concat(
|
|
5617
|
-
}, [n, i]),
|
|
5618
|
-
return
|
|
5616
|
+
function yc(t) {
|
|
5617
|
+
var e = t.date, r = t.future, n = t.locale, i = t.locales, s = t.timeStyle, o = t.round, a = t.minTimeLeft, l = t.formatVerboseDate, c = t.verboseDateFormat, f = c === void 0 ? bc : c, d = t.updateInterval, g = t.tick, w = g === void 0 ? !0 : g, F = t.now, k = t.timeOffset, P = k === void 0 ? 0 : k, O = t.polyfill, D = ne(function() {
|
|
5618
|
+
return n && (i = [n]), i.concat($.getDefaultLocale());
|
|
5619
|
+
}, [n, i]), N = ne(function() {
|
|
5620
|
+
return Kl(D, {
|
|
5619
5621
|
polyfill: O
|
|
5620
5622
|
});
|
|
5621
|
-
}, [
|
|
5623
|
+
}, [D, O]);
|
|
5622
5624
|
e = ne(function() {
|
|
5623
|
-
return
|
|
5625
|
+
return Zl(e);
|
|
5624
5626
|
}, [e]);
|
|
5625
|
-
var
|
|
5626
|
-
var W = (F || Date.now()) -
|
|
5627
|
+
var E = gi(function() {
|
|
5628
|
+
var W = (F || Date.now()) - P, xe;
|
|
5627
5629
|
if (r && W >= e.getTime() && (W = e.getTime(), xe = !0), a !== void 0) {
|
|
5628
|
-
var
|
|
5629
|
-
W >
|
|
5630
|
+
var ze = e.getTime() - a * 1e3;
|
|
5631
|
+
W > ze && (W = ze, xe = !0);
|
|
5630
5632
|
}
|
|
5631
|
-
var si =
|
|
5633
|
+
var si = N.format(e, s, {
|
|
5632
5634
|
getTimeToNextUpdate: !0,
|
|
5633
5635
|
now: W,
|
|
5634
5636
|
future: r,
|
|
5635
5637
|
round: o
|
|
5636
|
-
}), Xt = Ue(si, 2), oi = Xt[0],
|
|
5637
|
-
return xe ?
|
|
5638
|
-
}, [e, r, s, d, o, a,
|
|
5639
|
-
|
|
5640
|
-
var ee = ne(
|
|
5638
|
+
}), Xt = Ue(si, 2), oi = Xt[0], Me = Xt[1];
|
|
5639
|
+
return xe ? Me = vc : Me = d || Me || 60 * 1e3, [oi, W + Me];
|
|
5640
|
+
}, [e, r, s, d, o, a, N, F]), v = Kt();
|
|
5641
|
+
v.current = E;
|
|
5642
|
+
var ee = ne(E, []), pe = Ue(ee, 2), Se = pe[0], at = pe[1], Ne = yi(Se), $e = Ue(Ne, 2), Ie = $e[0], ke = $e[1], je = Kt();
|
|
5641
5643
|
er(function() {
|
|
5642
|
-
if (
|
|
5643
|
-
return je.current =
|
|
5644
|
+
if (w)
|
|
5645
|
+
return je.current = cc.add({
|
|
5644
5646
|
getNextValue: function() {
|
|
5645
|
-
return
|
|
5647
|
+
return v.current();
|
|
5646
5648
|
},
|
|
5647
5649
|
setValue: ke,
|
|
5648
5650
|
nextUpdateTime: at
|
|
5649
5651
|
}), function() {
|
|
5650
5652
|
return je.current.stop();
|
|
5651
5653
|
};
|
|
5652
|
-
}, [
|
|
5654
|
+
}, [w]), er(function() {
|
|
5653
5655
|
if (je.current)
|
|
5654
5656
|
je.current.forceUpdate();
|
|
5655
5657
|
else {
|
|
5656
|
-
var W =
|
|
5657
|
-
ke(
|
|
5658
|
+
var W = E(), xe = Ue(W, 1), ze = xe[0];
|
|
5659
|
+
ke(ze);
|
|
5658
5660
|
}
|
|
5659
|
-
}, [
|
|
5661
|
+
}, [E]);
|
|
5660
5662
|
var Gt = ne(function() {
|
|
5661
|
-
return
|
|
5662
|
-
}, [
|
|
5663
|
+
return Jl(D, f);
|
|
5664
|
+
}, [D, f]), ii = ne(function() {
|
|
5663
5665
|
return l ? l(e) : Gt(e);
|
|
5664
5666
|
}, [e, l, Gt]);
|
|
5665
5667
|
return {
|
|
@@ -5668,7 +5670,7 @@ function mc(t) {
|
|
|
5668
5670
|
verboseDate: ii
|
|
5669
5671
|
};
|
|
5670
5672
|
}
|
|
5671
|
-
var
|
|
5673
|
+
var wc = 365 * 24 * 60 * 60 * 1e3, vc = 1e3 * wc, bc = {
|
|
5672
5674
|
weekday: "long",
|
|
5673
5675
|
day: "numeric",
|
|
5674
5676
|
month: "long",
|
|
@@ -5677,7 +5679,7 @@ var gc = 365 * 24 * 60 * 60 * 1e3, yc = 1e3 * gc, wc = {
|
|
|
5677
5679
|
minute: "2-digit",
|
|
5678
5680
|
second: "2-digit"
|
|
5679
5681
|
// timeZoneName: 'short'
|
|
5680
|
-
}, Nt = p.oneOfType, hn = p.arrayOf, ge = p.string, pn = p.number, Fe = p.shape, Ve = p.func,
|
|
5682
|
+
}, Nt = p.oneOfType, hn = p.arrayOf, ge = p.string, pn = p.number, Fe = p.shape, Ve = p.func, Tc = Nt([Fe({
|
|
5681
5683
|
minTime: pn,
|
|
5682
5684
|
formatAs: ge.isRequired
|
|
5683
5685
|
}), Fe({
|
|
@@ -5689,17 +5691,17 @@ var gc = 365 * 24 * 60 * 60 * 1e3, yc = 1e3 * gc, wc = {
|
|
|
5689
5691
|
}), Fe({
|
|
5690
5692
|
test: Ve,
|
|
5691
5693
|
format: Ve.isRequired
|
|
5692
|
-
})]),
|
|
5694
|
+
})]), Oc = Nt([
|
|
5693
5695
|
// Not using `oneOf()` here, because that way
|
|
5694
5696
|
// this package wouldn't support some hypothetical
|
|
5695
5697
|
// new styles added to `javascript-time-ago` in some future.
|
|
5696
5698
|
ge,
|
|
5697
5699
|
Fe({
|
|
5698
|
-
steps: hn(
|
|
5700
|
+
steps: hn(Tc).isRequired,
|
|
5699
5701
|
labels: Nt([ge, hn(ge)]).isRequired,
|
|
5700
5702
|
round: ge
|
|
5701
5703
|
})
|
|
5702
|
-
]),
|
|
5704
|
+
]), Sc = ["date", "future", "timeStyle", "round", "minTimeLeft", "locale", "locales", "formatVerboseDate", "verboseDateFormat", "updateInterval", "tick", "now", "timeOffset", "polyfill", "tooltip", "component", "container", "wrapperComponent", "wrapperProps"];
|
|
5703
5705
|
function tt() {
|
|
5704
5706
|
return tt = Object.assign || function(t) {
|
|
5705
5707
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -5710,9 +5712,9 @@ function tt() {
|
|
|
5710
5712
|
return t;
|
|
5711
5713
|
}, tt.apply(this, arguments);
|
|
5712
5714
|
}
|
|
5713
|
-
function
|
|
5715
|
+
function kc(t, e) {
|
|
5714
5716
|
if (t == null) return {};
|
|
5715
|
-
var r =
|
|
5717
|
+
var r = xc(t, e), n, i;
|
|
5716
5718
|
if (Object.getOwnPropertySymbols) {
|
|
5717
5719
|
var s = Object.getOwnPropertySymbols(t);
|
|
5718
5720
|
for (i = 0; i < s.length; i++)
|
|
@@ -5720,7 +5722,7 @@ function Oc(t, e) {
|
|
|
5720
5722
|
}
|
|
5721
5723
|
return r;
|
|
5722
5724
|
}
|
|
5723
|
-
function
|
|
5725
|
+
function xc(t, e) {
|
|
5724
5726
|
if (t == null) return {};
|
|
5725
5727
|
var r = {}, n = Object.keys(t), i, s;
|
|
5726
5728
|
for (s = 0; s < n.length; s++)
|
|
@@ -5728,7 +5730,7 @@ function Sc(t, e) {
|
|
|
5728
5730
|
return r;
|
|
5729
5731
|
}
|
|
5730
5732
|
function rt(t) {
|
|
5731
|
-
var e = t.date, r = t.future, n = t.timeStyle, i = t.round, s = t.minTimeLeft, o = t.locale, a = t.locales, l = a === void 0 ? [] : a, c = t.formatVerboseDate, f = t.verboseDateFormat, d = t.updateInterval, g = t.tick,
|
|
5733
|
+
var e = t.date, r = t.future, n = t.timeStyle, i = t.round, s = t.minTimeLeft, o = t.locale, a = t.locales, l = a === void 0 ? [] : a, c = t.formatVerboseDate, f = t.verboseDateFormat, d = t.updateInterval, g = t.tick, w = t.now, F = t.timeOffset, k = t.polyfill, P = t.tooltip, O = P === void 0 ? !0 : P, D = t.component, N = D === void 0 ? Ke : D, E = t.container, v = t.wrapperComponent, ee = t.wrapperProps, pe = kc(t, Sc), Se = yc({
|
|
5732
5734
|
date: e,
|
|
5733
5735
|
future: r,
|
|
5734
5736
|
timeStyle: n,
|
|
@@ -5740,14 +5742,14 @@ function rt(t) {
|
|
|
5740
5742
|
verboseDateFormat: f,
|
|
5741
5743
|
updateInterval: d,
|
|
5742
5744
|
tick: g,
|
|
5743
|
-
now:
|
|
5745
|
+
now: w,
|
|
5744
5746
|
timeOffset: F,
|
|
5745
5747
|
polyfill: k
|
|
5746
|
-
}), at = Se.date, Ne = Se.verboseDate, $e = Se.formattedDate, Ie = /* @__PURE__ */ De.createElement(
|
|
5748
|
+
}), at = Se.date, Ne = Se.verboseDate, $e = Se.formattedDate, Ie = /* @__PURE__ */ De.createElement(N, tt({
|
|
5747
5749
|
date: at,
|
|
5748
5750
|
verboseDate: Ne,
|
|
5749
5751
|
tooltip: O
|
|
5750
|
-
}, pe), $e), ke =
|
|
5752
|
+
}, pe), $e), ke = v || E;
|
|
5751
5753
|
return ke ? /* @__PURE__ */ De.createElement(ke, tt({}, ee, {
|
|
5752
5754
|
verboseDate: Ne
|
|
5753
5755
|
}), Ie) : Ie;
|
|
@@ -5773,7 +5775,7 @@ rt.propTypes = {
|
|
|
5773
5775
|
// Date/time formatting style.
|
|
5774
5776
|
// See `javascript-time-ago` docs on "Styles" for more info.
|
|
5775
5777
|
// E.g. 'round', 'round-minute', 'twitter', 'twitter-first-minute'.
|
|
5776
|
-
timeStyle:
|
|
5778
|
+
timeStyle: Oc,
|
|
5777
5779
|
// `round` parameter of `javascript-time-ago`.
|
|
5778
5780
|
// See `javascript-time-ago` docs on "Rounding" for more info.
|
|
5779
5781
|
// Examples: "round", "floor".
|
|
@@ -5836,13 +5838,13 @@ rt.propTypes = {
|
|
|
5836
5838
|
wrapperProps: p.object
|
|
5837
5839
|
};
|
|
5838
5840
|
rt = /* @__PURE__ */ De.memo(rt);
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
const
|
|
5841
|
+
$.addDefaultLocale(Kn);
|
|
5842
|
+
$.addLocale(Kn);
|
|
5843
|
+
const Lc = hi.div`
|
|
5842
5844
|
cursor: ${(t) => t.$redirect ? "pointer" : "default"};
|
|
5843
5845
|
|
|
5844
5846
|
&:hover {
|
|
5845
|
-
background:
|
|
5847
|
+
background: ${(t) => t.$hoverBackground} !important;
|
|
5846
5848
|
border-radius: 8px !important;
|
|
5847
5849
|
}
|
|
5848
5850
|
|
|
@@ -5854,41 +5856,44 @@ const kc = di.div`
|
|
|
5854
5856
|
&:hover .notification-archive-button {
|
|
5855
5857
|
visibility: ${(t) => t.$archived ? "hidden" : "visible"};
|
|
5856
5858
|
}
|
|
5857
|
-
`,
|
|
5858
|
-
var
|
|
5859
|
+
`, jc = (t) => {
|
|
5860
|
+
var O, D, N, E;
|
|
5861
|
+
const e = mi(), r = pi(e);
|
|
5859
5862
|
if (t.renderer)
|
|
5860
5863
|
return t.renderer(t.notifications);
|
|
5861
|
-
const
|
|
5862
|
-
title:
|
|
5863
|
-
redirectURL:
|
|
5864
|
-
imageURL:
|
|
5864
|
+
const n = new Jt(), i = t.notifications.length, s = t.notifications[i - 1], o = (D = (O = s.deliveryOptions) == null ? void 0 : O.instant) != null && D.batching ? (N = s.template) == null ? void 0 : N.batch : ((E = s.template) == null ? void 0 : E.instant) ?? {
|
|
5865
|
+
title: s.title,
|
|
5866
|
+
redirectURL: s.redirectURL,
|
|
5867
|
+
imageURL: s.imageURL
|
|
5865
5868
|
};
|
|
5866
|
-
let
|
|
5867
|
-
t.notifications.forEach((
|
|
5868
|
-
|
|
5869
|
-
...
|
|
5870
|
-
...
|
|
5869
|
+
let a = { _items: [] };
|
|
5870
|
+
t.notifications.forEach((v) => {
|
|
5871
|
+
a = {
|
|
5872
|
+
...a,
|
|
5873
|
+
...v.parameters
|
|
5871
5874
|
};
|
|
5872
|
-
}),
|
|
5873
|
-
const
|
|
5874
|
-
(
|
|
5875
|
-
|
|
5876
|
-
),
|
|
5877
|
-
(
|
|
5878
|
-
|
|
5879
|
-
),
|
|
5875
|
+
}), a._items = t.notifications.map((v) => ({ ...v.parameters, _items: void 0 }));
|
|
5876
|
+
const l = n.parseAndRenderSync((o == null ? void 0 : o.title) ?? "", a), c = n.parseAndRenderSync(
|
|
5877
|
+
(o == null ? void 0 : o.redirectURL) ?? "",
|
|
5878
|
+
a
|
|
5879
|
+
), f = n.parseAndRenderSync(
|
|
5880
|
+
(o == null ? void 0 : o.imageURL) ?? "",
|
|
5881
|
+
a
|
|
5882
|
+
), d = t.notifications.every((v) => v.seen), g = t.notifications.every((v) => v.opened), w = t.notifications.every((v) => v.archived), F = t.notifications[i - 1].date, k = t.notifications.map((v) => v.id), P = e.palette.mode === "dark" ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.04)";
|
|
5880
5883
|
return /* @__PURE__ */ ut(
|
|
5881
|
-
|
|
5884
|
+
Lc,
|
|
5882
5885
|
{
|
|
5883
|
-
$redirect: !!
|
|
5884
|
-
$seen:
|
|
5885
|
-
$archived: !!
|
|
5886
|
+
$redirect: !!c,
|
|
5887
|
+
$seen: d || !!g,
|
|
5888
|
+
$archived: !!w,
|
|
5889
|
+
$hoverBackground: P,
|
|
5886
5890
|
onClick: () => {
|
|
5887
|
-
t.markAsClicked(
|
|
5891
|
+
t.markAsClicked(k), c && (t.newTab ? window.open(c, "_blank") : window.location.href = c);
|
|
5888
5892
|
},
|
|
5889
5893
|
style: {
|
|
5890
5894
|
padding: "16px 6px 16px 0",
|
|
5891
|
-
background:
|
|
5895
|
+
background: r.paper,
|
|
5896
|
+
color: r.text,
|
|
5892
5897
|
position: "relative",
|
|
5893
5898
|
display: "flex",
|
|
5894
5899
|
alignItems: "center",
|
|
@@ -5898,7 +5903,7 @@ const kc = di.div`
|
|
|
5898
5903
|
/* @__PURE__ */ _("div", { children: /* @__PURE__ */ _(
|
|
5899
5904
|
gn,
|
|
5900
5905
|
{
|
|
5901
|
-
src:
|
|
5906
|
+
src: f,
|
|
5902
5907
|
sizes: "32",
|
|
5903
5908
|
style: {
|
|
5904
5909
|
marginRight: 8,
|
|
@@ -5918,14 +5923,26 @@ const kc = di.div`
|
|
|
5918
5923
|
tr,
|
|
5919
5924
|
{
|
|
5920
5925
|
variant: "body2",
|
|
5921
|
-
fontWeight:
|
|
5926
|
+
fontWeight: w ? 300 : 400,
|
|
5922
5927
|
style: {
|
|
5923
|
-
whiteSpace: "pre-line"
|
|
5928
|
+
whiteSpace: "pre-line",
|
|
5929
|
+
color: r.text
|
|
5924
5930
|
},
|
|
5925
|
-
children: /* @__PURE__ */ _("span", { dangerouslySetInnerHTML: { __html:
|
|
5931
|
+
children: /* @__PURE__ */ _("span", { dangerouslySetInnerHTML: { __html: l } })
|
|
5926
5932
|
}
|
|
5927
5933
|
) }),
|
|
5928
|
-
/* @__PURE__ */ _("div", { children: /* @__PURE__ */ _(
|
|
5934
|
+
/* @__PURE__ */ _("div", { children: /* @__PURE__ */ _(
|
|
5935
|
+
tr,
|
|
5936
|
+
{
|
|
5937
|
+
variant: "body2",
|
|
5938
|
+
fontWeight: 300,
|
|
5939
|
+
style: {
|
|
5940
|
+
fontSize: 12,
|
|
5941
|
+
color: r.textSecondary
|
|
5942
|
+
},
|
|
5943
|
+
children: /* @__PURE__ */ _(rt, { date: new Date(F).getTime(), locale: "en-US" })
|
|
5944
|
+
}
|
|
5945
|
+
) })
|
|
5929
5946
|
]
|
|
5930
5947
|
}
|
|
5931
5948
|
),
|
|
@@ -5943,26 +5960,26 @@ const kc = di.div`
|
|
|
5943
5960
|
},
|
|
5944
5961
|
children: [
|
|
5945
5962
|
/* @__PURE__ */ _(
|
|
5946
|
-
|
|
5963
|
+
bi,
|
|
5947
5964
|
{
|
|
5948
5965
|
className: "notification-archive-button",
|
|
5949
5966
|
size: "small",
|
|
5950
|
-
onClick: (
|
|
5967
|
+
onClick: (v) => (t.markAsArchived(k), v.preventDefault(), v.stopPropagation(), !1),
|
|
5951
5968
|
style: {
|
|
5952
5969
|
position: "absolute",
|
|
5953
5970
|
left: 0
|
|
5954
5971
|
},
|
|
5955
|
-
children: /* @__PURE__ */ _(
|
|
5972
|
+
children: /* @__PURE__ */ _(Di, { fontSize: "small" })
|
|
5956
5973
|
}
|
|
5957
5974
|
),
|
|
5958
5975
|
/* @__PURE__ */ _(
|
|
5959
|
-
|
|
5976
|
+
Ti,
|
|
5960
5977
|
{
|
|
5961
5978
|
variant: "dot",
|
|
5962
5979
|
color: "error",
|
|
5963
5980
|
className: "notification-highlight",
|
|
5964
5981
|
style: {
|
|
5965
|
-
visibility:
|
|
5982
|
+
visibility: w ? "hidden" : "visible"
|
|
5966
5983
|
}
|
|
5967
5984
|
}
|
|
5968
5985
|
)
|
|
@@ -5975,5 +5992,5 @@ const kc = di.div`
|
|
|
5975
5992
|
};
|
|
5976
5993
|
export {
|
|
5977
5994
|
Jt as L,
|
|
5978
|
-
|
|
5995
|
+
jc as N
|
|
5979
5996
|
};
|