@notificationapi/react 0.0.5 → 0.0.7

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.
@@ -0,0 +1,3971 @@
1
+ import { jsxs as nt, jsx as Y } from "react/jsx-runtime";
2
+ import * as T from "react";
3
+ import B, { useRef as lt, createElement as qn, useContext as Bn, useMemo as ce, useCallback as Vn, useState as Gn, useEffect as Ut } from "react";
4
+ import { N as Wn, O as y, Q as re, R as E, W as O, S as Hn, U as ot, V as De, X as ne, Y as Yn, Z as Vr, $ as Kn, a0 as Xn, a1 as Gr, a2 as se, a3 as Jn, a4 as Zn, a5 as he, a6 as qt, a7 as Bt, h as Qn, a8 as eo, g as to, m as ro, r as no, u as oo, o as ao, a as Wr, c as pt, b as io, a9 as so, aa as uo, ab as Hr, ac as Yr } from "./colors.js";
5
+ import { j as co, p as Kr, D as fo, x as lo, T as Vt, R as po } from "./index3.js";
6
+ import { P as mo } from "./index.js";
7
+ import { B as ho } from "./button.js";
8
+ import { B as yo } from "./index2.js";
9
+ function Xr(e, t, r) {
10
+ switch (Wn(e, t)) {
11
+ case 5103:
12
+ return O + "print-" + e + e;
13
+ case 5737:
14
+ case 4201:
15
+ case 3177:
16
+ case 3433:
17
+ case 1641:
18
+ case 4457:
19
+ case 2921:
20
+ case 5572:
21
+ case 6356:
22
+ case 5844:
23
+ case 3191:
24
+ case 6645:
25
+ case 3005:
26
+ case 6391:
27
+ case 5879:
28
+ case 5623:
29
+ case 6135:
30
+ case 4599:
31
+ case 4855:
32
+ case 4215:
33
+ case 6389:
34
+ case 5109:
35
+ case 5365:
36
+ case 5621:
37
+ case 3829:
38
+ return O + e + e;
39
+ case 4789:
40
+ return De + e + e;
41
+ case 5349:
42
+ case 4246:
43
+ case 4810:
44
+ case 6968:
45
+ case 2756:
46
+ return O + e + De + e + E + e + e;
47
+ case 5936:
48
+ switch (re(e, t + 11)) {
49
+ case 114:
50
+ return O + e + E + y(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
51
+ case 108:
52
+ return O + e + E + y(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
53
+ case 45:
54
+ return O + e + E + y(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
55
+ }
56
+ case 6828:
57
+ case 4268:
58
+ case 2903:
59
+ return O + e + E + e + e;
60
+ case 6165:
61
+ return O + e + E + "flex-" + e + e;
62
+ case 5187:
63
+ return O + e + y(e, /(\w+).+(:[^]+)/, O + "box-$1$2" + E + "flex-$1$2") + e;
64
+ case 5443:
65
+ return O + e + E + "flex-item-" + y(e, /flex-|-self/g, "") + (ne(e, /flex-|baseline/) ? "" : E + "grid-row-" + y(e, /flex-|-self/g, "")) + e;
66
+ case 4675:
67
+ return O + e + E + "flex-line-pack" + y(e, /align-content|flex-|-self/g, "") + e;
68
+ case 5548:
69
+ return O + e + E + y(e, "shrink", "negative") + e;
70
+ case 5292:
71
+ return O + e + E + y(e, "basis", "preferred-size") + e;
72
+ case 6060:
73
+ return O + "box-" + y(e, "-grow", "") + O + e + E + y(e, "grow", "positive") + e;
74
+ case 4554:
75
+ return O + y(e, /([^-])(transform)/g, "$1" + O + "$2") + e;
76
+ case 6187:
77
+ return y(y(y(e, /(zoom-|grab)/, O + "$1"), /(image-set)/, O + "$1"), e, "") + e;
78
+ case 5495:
79
+ case 3959:
80
+ return y(e, /(image-set\([^]*)/, O + "$1$`$1");
81
+ case 4968:
82
+ return y(y(e, /(.+:)(flex-)?(.*)/, O + "box-pack:$3" + E + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + O + e + e;
83
+ case 4200:
84
+ if (!ne(e, /flex-|baseline/))
85
+ return E + "grid-column-align" + Yn(e, t) + e;
86
+ break;
87
+ case 2592:
88
+ case 3360:
89
+ return E + y(e, "template-", "") + e;
90
+ case 4384:
91
+ case 3616:
92
+ return r && r.some(function(n, o) {
93
+ return t = o, ne(n.props, /grid-\w+-end/);
94
+ }) ? ~ot(e + (r = r[t].value), "span", 0) ? e : E + y(e, "-start", "") + e + E + "grid-row-span:" + (~ot(r, "span", 0) ? ne(r, /\d+/) : +ne(r, /\d+/) - +ne(e, /\d+/)) + ";" : E + y(e, "-start", "") + e;
95
+ case 4896:
96
+ case 4128:
97
+ return r && r.some(function(n) {
98
+ return ne(n.props, /grid-\w+-start/);
99
+ }) ? e : E + y(y(e, "-end", "-span"), "span ", "") + e;
100
+ case 4095:
101
+ case 3583:
102
+ case 4068:
103
+ case 2532:
104
+ return y(e, /(.+)-inline(.+)/, O + "$1$2") + e;
105
+ case 8116:
106
+ case 7059:
107
+ case 5753:
108
+ case 5535:
109
+ case 5445:
110
+ case 5701:
111
+ case 4933:
112
+ case 4677:
113
+ case 5533:
114
+ case 5789:
115
+ case 5021:
116
+ case 4765:
117
+ if (Hn(e) - 1 - t > 6)
118
+ switch (re(e, t + 1)) {
119
+ case 109:
120
+ if (re(e, t + 4) !== 45)
121
+ break;
122
+ case 102:
123
+ return y(e, /(.+:)(.+)-([^]+)/, "$1" + O + "$2-$3$1" + De + (re(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
124
+ case 115:
125
+ return ~ot(e, "stretch", 0) ? Xr(y(e, "stretch", "fill-available"), t, r) + e : e;
126
+ }
127
+ break;
128
+ case 5152:
129
+ case 5920:
130
+ return y(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, o, a, s, i, c, f) {
131
+ return E + o + ":" + a + f + (s ? E + o + "-span:" + (i ? c : +c - +a) + f : "") + e;
132
+ });
133
+ case 4949:
134
+ if (re(e, t + 6) === 121)
135
+ return y(e, ":", ":" + O) + e;
136
+ break;
137
+ case 6444:
138
+ switch (re(e, re(e, 14) === 45 ? 18 : 11)) {
139
+ case 120:
140
+ return y(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + O + (re(e, 14) === 45 ? "inline-" : "") + "box$3$1" + O + "$2$3$1" + E + "$2box$3") + e;
141
+ case 100:
142
+ return y(e, ":", ":" + E) + e;
143
+ }
144
+ break;
145
+ case 5719:
146
+ case 2647:
147
+ case 2135:
148
+ case 3927:
149
+ case 2391:
150
+ return y(e, "scroll-", "scroll-snap-") + e;
151
+ }
152
+ return e;
153
+ }
154
+ function go(e) {
155
+ var t = Zn(e);
156
+ return function(r, n, o, a) {
157
+ for (var s = "", i = 0; i < t; i++)
158
+ s += e[i](r, n, o, a) || "";
159
+ return s;
160
+ };
161
+ }
162
+ function vo(e) {
163
+ return function(t) {
164
+ t.root || (t = t.return) && e(t);
165
+ };
166
+ }
167
+ function bo(e, t, r, n) {
168
+ if (e.length > -1 && !e.return)
169
+ switch (e.type) {
170
+ case Jn:
171
+ e.return = Xr(e.value, e.length, r);
172
+ return;
173
+ case Xn:
174
+ return Gr([se(e, { value: y(e.value, "@", "@" + O) })], n);
175
+ case Vr:
176
+ if (e.length)
177
+ return Kn(r = e.props, function(o) {
178
+ switch (ne(o, n = /(::plac\w+|:read-\w+)/)) {
179
+ case ":read-only":
180
+ case ":read-write":
181
+ he(se(e, { props: [y(o, /:(read-\w+)/, ":" + De + "$1")] })), he(se(e, { props: [o] })), qt(e, { props: Bt(r, n) });
182
+ break;
183
+ case "::placeholder":
184
+ he(se(e, { props: [y(o, /:(plac\w+)/, ":" + O + "input-$1")] })), he(se(e, { props: [y(o, /:(plac\w+)/, ":" + De + "$1")] })), he(se(e, { props: [y(o, /:(plac\w+)/, E + "input-$1")] })), he(se(e, { props: [o] })), qt(e, { props: Bt(r, n) });
185
+ break;
186
+ }
187
+ return "";
188
+ });
189
+ }
190
+ }
191
+ const Jr = ["xxl", "xl", "lg", "md", "sm", "xs"], wo = (e) => ({
192
+ xs: `(max-width: ${e.screenXSMax}px)`,
193
+ sm: `(min-width: ${e.screenSM}px)`,
194
+ md: `(min-width: ${e.screenMD}px)`,
195
+ lg: `(min-width: ${e.screenLG}px)`,
196
+ xl: `(min-width: ${e.screenXL}px)`,
197
+ xxl: `(min-width: ${e.screenXXL}px)`
198
+ }), So = (e) => {
199
+ const t = e, r = [].concat(Jr).reverse();
200
+ return r.forEach((n, o) => {
201
+ const a = n.toUpperCase(), s = `screen${a}Min`, i = `screen${a}`;
202
+ if (!(t[s] <= t[i]))
203
+ throw new Error(`${s}<=${i} fails : !(${t[s]}<=${t[i]})`);
204
+ if (o < r.length - 1) {
205
+ const c = `screen${a}Max`;
206
+ if (!(t[i] <= t[c]))
207
+ throw new Error(`${i}<=${c} fails : !(${t[i]}<=${t[c]})`);
208
+ const l = `screen${r[o + 1].toUpperCase()}Min`;
209
+ if (!(t[c] <= t[l]))
210
+ throw new Error(`${c}<=${l} fails : !(${t[c]}<=${t[l]})`);
211
+ }
212
+ }), e;
213
+ };
214
+ function Oo() {
215
+ const [, e] = Qn(), t = wo(So(e));
216
+ return B.useMemo(() => {
217
+ const r = /* @__PURE__ */ new Map();
218
+ let n = -1, o = {};
219
+ return {
220
+ matchHandlers: {},
221
+ dispatch(a) {
222
+ return o = a, r.forEach((s) => s(o)), r.size >= 1;
223
+ },
224
+ subscribe(a) {
225
+ return r.size || this.register(), n += 1, r.set(n, a), a(o), n;
226
+ },
227
+ unsubscribe(a) {
228
+ r.delete(a), r.size || this.unregister();
229
+ },
230
+ unregister() {
231
+ Object.keys(t).forEach((a) => {
232
+ const s = t[a], i = this.matchHandlers[s];
233
+ i == null || i.mql.removeListener(i == null ? void 0 : i.listener);
234
+ }), r.clear();
235
+ },
236
+ register() {
237
+ Object.keys(t).forEach((a) => {
238
+ const s = t[a], i = (f) => {
239
+ let {
240
+ matches: l
241
+ } = f;
242
+ this.dispatch(Object.assign(Object.assign({}, o), {
243
+ [a]: l
244
+ }));
245
+ }, c = window.matchMedia(s);
246
+ c.addListener(i), this.matchHandlers[s] = {
247
+ mql: c,
248
+ listener: i
249
+ }, i(c);
250
+ });
251
+ },
252
+ responsiveMap: t
253
+ };
254
+ }, [e]);
255
+ }
256
+ function To() {
257
+ const [, e] = T.useReducer((t) => t + 1, 0);
258
+ return e;
259
+ }
260
+ function xo() {
261
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
262
+ const t = lt({}), r = To(), n = Oo();
263
+ return eo(() => {
264
+ const o = n.subscribe((a) => {
265
+ t.current = a, e && r();
266
+ });
267
+ return () => n.unsubscribe(o);
268
+ }, []), t.current;
269
+ }
270
+ const mt = /* @__PURE__ */ T.createContext({}), Ao = (e) => {
271
+ const {
272
+ antCls: t,
273
+ componentCls: r,
274
+ iconCls: n,
275
+ avatarBg: o,
276
+ avatarColor: a,
277
+ containerSize: s,
278
+ containerSizeLG: i,
279
+ containerSizeSM: c,
280
+ textFontSize: f,
281
+ textFontSizeLG: l,
282
+ textFontSizeSM: d,
283
+ borderRadius: p,
284
+ borderRadiusLG: m,
285
+ borderRadiusSM: h,
286
+ lineWidth: b,
287
+ lineType: C
288
+ } = e, w = (P, v, S) => ({
289
+ width: P,
290
+ height: P,
291
+ borderRadius: "50%",
292
+ [`&${r}-square`]: {
293
+ borderRadius: S
294
+ },
295
+ [`&${r}-icon`]: {
296
+ fontSize: v,
297
+ [`> ${n}`]: {
298
+ margin: 0
299
+ }
300
+ }
301
+ });
302
+ return {
303
+ [r]: Object.assign(Object.assign(Object.assign(Object.assign({}, no(e)), {
304
+ position: "relative",
305
+ display: "inline-flex",
306
+ justifyContent: "center",
307
+ alignItems: "center",
308
+ overflow: "hidden",
309
+ color: a,
310
+ whiteSpace: "nowrap",
311
+ textAlign: "center",
312
+ verticalAlign: "middle",
313
+ background: o,
314
+ border: `${oo(b)} ${C} transparent`,
315
+ "&-image": {
316
+ background: "transparent"
317
+ },
318
+ [`${t}-image-img`]: {
319
+ display: "block"
320
+ }
321
+ }), w(s, f, p)), {
322
+ "&-lg": Object.assign({}, w(i, l, m)),
323
+ "&-sm": Object.assign({}, w(c, d, h)),
324
+ "> img": {
325
+ display: "block",
326
+ width: "100%",
327
+ height: "100%",
328
+ objectFit: "cover"
329
+ }
330
+ })
331
+ };
332
+ }, Po = (e) => {
333
+ const {
334
+ componentCls: t,
335
+ groupBorderColor: r,
336
+ groupOverlapping: n,
337
+ groupSpace: o
338
+ } = e;
339
+ return {
340
+ [`${t}-group`]: {
341
+ display: "inline-flex",
342
+ [`${t}`]: {
343
+ borderColor: r
344
+ },
345
+ "> *:not(:first-child)": {
346
+ marginInlineStart: n
347
+ }
348
+ },
349
+ [`${t}-group-popover`]: {
350
+ [`${t} + ${t}`]: {
351
+ marginInlineStart: o
352
+ }
353
+ }
354
+ };
355
+ }, $o = (e) => {
356
+ const {
357
+ controlHeight: t,
358
+ controlHeightLG: r,
359
+ controlHeightSM: n,
360
+ fontSize: o,
361
+ fontSizeLG: a,
362
+ fontSizeXL: s,
363
+ fontSizeHeading3: i,
364
+ marginXS: c,
365
+ marginXXS: f,
366
+ colorBorderBg: l
367
+ } = e;
368
+ return {
369
+ containerSize: t,
370
+ containerSizeLG: r,
371
+ containerSizeSM: n,
372
+ textFontSize: Math.round((a + s) / 2),
373
+ textFontSizeLG: i,
374
+ textFontSizeSM: o,
375
+ groupSpace: f,
376
+ groupOverlapping: -c,
377
+ groupBorderColor: l
378
+ };
379
+ }, Zr = to("Avatar", (e) => {
380
+ const {
381
+ colorTextLightSolid: t,
382
+ colorTextPlaceholder: r
383
+ } = e, n = ro(e, {
384
+ avatarBg: r,
385
+ avatarColor: t
386
+ });
387
+ return [Ao(n), Po(n)];
388
+ }, $o);
389
+ var Eo = function(e, t) {
390
+ var r = {};
391
+ for (var n in e)
392
+ Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
393
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
394
+ for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
395
+ t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
396
+ return r;
397
+ };
398
+ const Ro = (e, t) => {
399
+ const [r, n] = T.useState(1), [o, a] = T.useState(!1), [s, i] = T.useState(!0), c = T.useRef(null), f = T.useRef(null), l = ao(t, c), {
400
+ getPrefixCls: d,
401
+ avatar: p
402
+ } = T.useContext(Wr), m = T.useContext(mt), h = () => {
403
+ if (!f.current || !c.current)
404
+ return;
405
+ const D = f.current.offsetWidth, $ = c.current.offsetWidth;
406
+ if (D !== 0 && $ !== 0) {
407
+ const {
408
+ gap: _ = 4
409
+ } = e;
410
+ _ * 2 < $ && n($ - _ * 2 < D ? ($ - _ * 2) / D : 1);
411
+ }
412
+ };
413
+ T.useEffect(() => {
414
+ a(!0);
415
+ }, []), T.useEffect(() => {
416
+ i(!0), n(1);
417
+ }, [e.src]), T.useEffect(h, [e.gap]);
418
+ const b = () => {
419
+ const {
420
+ onError: D
421
+ } = e;
422
+ (D == null ? void 0 : D()) !== !1 && i(!1);
423
+ }, {
424
+ prefixCls: C,
425
+ shape: w,
426
+ size: P,
427
+ src: v,
428
+ srcSet: S,
429
+ icon: x,
430
+ className: A,
431
+ rootClassName: I,
432
+ alt: N,
433
+ draggable: V,
434
+ children: G,
435
+ crossOrigin: Z
436
+ } = e, z = Eo(e, ["prefixCls", "shape", "size", "src", "srcSet", "icon", "className", "rootClassName", "alt", "draggable", "children", "crossOrigin"]), j = co((D) => {
437
+ var $, _;
438
+ return (_ = ($ = P ?? (m == null ? void 0 : m.size)) !== null && $ !== void 0 ? $ : D) !== null && _ !== void 0 ? _ : "default";
439
+ }), Q = Object.keys(typeof j == "object" ? j || {} : {}).some((D) => ["xs", "sm", "md", "lg", "xl", "xxl"].includes(D)), ae = xo(Q), Ae = T.useMemo(() => {
440
+ if (typeof j != "object")
441
+ return {};
442
+ const D = Jr.find((_) => ae[_]), $ = j[D];
443
+ return $ ? {
444
+ width: $,
445
+ height: $,
446
+ fontSize: $ && (x || G) ? $ / 2 : 18
447
+ } : {};
448
+ }, [ae, j]), R = d("avatar", C), U = Kr(R), [k, ee, W] = Zr(R, U), M = pt({
449
+ [`${R}-lg`]: j === "large",
450
+ [`${R}-sm`]: j === "small"
451
+ }), H = /* @__PURE__ */ T.isValidElement(v), Pe = w || (m == null ? void 0 : m.shape) || "circle", de = pt(R, M, p == null ? void 0 : p.className, `${R}-${Pe}`, {
452
+ [`${R}-image`]: H || v && s,
453
+ [`${R}-icon`]: !!x
454
+ }, W, U, A, I, ee), ie = typeof j == "number" ? {
455
+ width: j,
456
+ height: j,
457
+ fontSize: x ? j / 2 : 18
458
+ } : {};
459
+ let q;
460
+ if (typeof v == "string" && s)
461
+ q = /* @__PURE__ */ T.createElement("img", {
462
+ src: v,
463
+ draggable: V,
464
+ srcSet: S,
465
+ onError: b,
466
+ alt: N,
467
+ crossOrigin: Z
468
+ });
469
+ else if (H)
470
+ q = v;
471
+ else if (x)
472
+ q = x;
473
+ else if (o || r !== 1) {
474
+ const D = `scale(${r})`, $ = {
475
+ msTransform: D,
476
+ WebkitTransform: D,
477
+ transform: D
478
+ };
479
+ q = /* @__PURE__ */ T.createElement(fo, {
480
+ onResize: h
481
+ }, /* @__PURE__ */ T.createElement("span", {
482
+ className: `${R}-string`,
483
+ ref: f,
484
+ style: Object.assign({}, $)
485
+ }, G));
486
+ } else
487
+ q = /* @__PURE__ */ T.createElement("span", {
488
+ className: `${R}-string`,
489
+ style: {
490
+ opacity: 0
491
+ },
492
+ ref: f
493
+ }, G);
494
+ return delete z.onError, delete z.gap, k(/* @__PURE__ */ T.createElement("span", Object.assign({}, z, {
495
+ style: Object.assign(Object.assign(Object.assign(Object.assign({}, ie), Ae), p == null ? void 0 : p.style), z.style),
496
+ className: de,
497
+ ref: l
498
+ }), q));
499
+ }, Qr = /* @__PURE__ */ T.forwardRef(Ro), Gt = (e) => {
500
+ const {
501
+ size: t,
502
+ shape: r
503
+ } = T.useContext(mt), n = T.useMemo(() => ({
504
+ size: e.size || t,
505
+ shape: e.shape || r
506
+ }), [e.size, e.shape, t, r]);
507
+ return /* @__PURE__ */ T.createElement(mt.Provider, {
508
+ value: n
509
+ }, e.children);
510
+ }, Do = (e) => {
511
+ const {
512
+ getPrefixCls: t,
513
+ direction: r
514
+ } = T.useContext(Wr), {
515
+ prefixCls: n,
516
+ className: o,
517
+ rootClassName: a,
518
+ style: s,
519
+ maxCount: i,
520
+ maxStyle: c,
521
+ size: f,
522
+ shape: l,
523
+ maxPopoverPlacement: d = "top",
524
+ maxPopoverTrigger: p = "hover",
525
+ children: m
526
+ } = e, h = t("avatar", n), b = `${h}-group`, C = Kr(h), [w, P, v] = Zr(h, C), S = pt(b, {
527
+ [`${b}-rtl`]: r === "rtl"
528
+ }, v, C, o, a, P), x = lo(m).map((I, N) => io(I, {
529
+ key: `avatar-key-${N}`
530
+ })), A = x.length;
531
+ if (i && i < A) {
532
+ const I = x.slice(0, i), N = x.slice(i, A);
533
+ return I.push(/* @__PURE__ */ T.createElement(mo, {
534
+ key: "avatar-popover-key",
535
+ content: N,
536
+ trigger: p,
537
+ placement: d,
538
+ overlayClassName: `${b}-popover`,
539
+ destroyTooltipOnHide: !0
540
+ }, /* @__PURE__ */ T.createElement(Qr, {
541
+ style: c
542
+ }, `+${A - i}`))), w(/* @__PURE__ */ T.createElement(Gt, {
543
+ shape: l,
544
+ size: f
545
+ }, /* @__PURE__ */ T.createElement("div", {
546
+ className: S,
547
+ style: s
548
+ }, I)));
549
+ }
550
+ return w(/* @__PURE__ */ T.createElement(Gt, {
551
+ shape: l,
552
+ size: f
553
+ }, /* @__PURE__ */ T.createElement("div", {
554
+ className: S,
555
+ style: s
556
+ }, x)));
557
+ }, en = Qr;
558
+ en.Group = Do;
559
+ var F = function() {
560
+ return F = Object.assign || function(t) {
561
+ for (var r, n = 1, o = arguments.length; n < o; n++) {
562
+ r = arguments[n];
563
+ for (var a in r)
564
+ Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
565
+ }
566
+ return t;
567
+ }, F.apply(this, arguments);
568
+ };
569
+ function Ge(e, t, r) {
570
+ if (r || arguments.length === 2)
571
+ for (var n = 0, o = t.length, a; n < o; n++)
572
+ (a || !(n in t)) && (a || (a = Array.prototype.slice.call(t, 0, n)), a[n] = t[n]);
573
+ return e.concat(a || Array.prototype.slice.call(t));
574
+ }
575
+ var Co = {
576
+ animationIterationCount: 1,
577
+ aspectRatio: 1,
578
+ borderImageOutset: 1,
579
+ borderImageSlice: 1,
580
+ borderImageWidth: 1,
581
+ boxFlex: 1,
582
+ boxFlexGroup: 1,
583
+ boxOrdinalGroup: 1,
584
+ columnCount: 1,
585
+ columns: 1,
586
+ flex: 1,
587
+ flexGrow: 1,
588
+ flexPositive: 1,
589
+ flexShrink: 1,
590
+ flexNegative: 1,
591
+ flexOrder: 1,
592
+ gridRow: 1,
593
+ gridRowEnd: 1,
594
+ gridRowSpan: 1,
595
+ gridRowStart: 1,
596
+ gridColumn: 1,
597
+ gridColumnEnd: 1,
598
+ gridColumnSpan: 1,
599
+ gridColumnStart: 1,
600
+ msGridRow: 1,
601
+ msGridRowSpan: 1,
602
+ msGridColumn: 1,
603
+ msGridColumnSpan: 1,
604
+ fontWeight: 1,
605
+ lineHeight: 1,
606
+ opacity: 1,
607
+ order: 1,
608
+ orphans: 1,
609
+ tabSize: 1,
610
+ widows: 1,
611
+ zIndex: 1,
612
+ zoom: 1,
613
+ WebkitLineClamp: 1,
614
+ // SVG-related properties
615
+ fillOpacity: 1,
616
+ floodOpacity: 1,
617
+ stopOpacity: 1,
618
+ strokeDasharray: 1,
619
+ strokeDashoffset: 1,
620
+ strokeMiterlimit: 1,
621
+ strokeOpacity: 1,
622
+ strokeWidth: 1
623
+ }, Se = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", tn = "active", rn = "data-styled-version", et = "6.1.11", kt = `/*!sc*/
624
+ `, Ft = typeof window < "u" && "HTMLElement" in window, Io = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" && process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY), tt = Object.freeze([]), Oe = Object.freeze({});
625
+ function jo(e, t, r) {
626
+ return r === void 0 && (r = Oe), e.theme !== r.theme && e.theme || t || r.theme;
627
+ }
628
+ var nn = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), No = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, ko = /(^-|-$)/g;
629
+ function Wt(e) {
630
+ return e.replace(No, "-").replace(ko, "");
631
+ }
632
+ var Fo = /(a)(d)/gi, _e = 52, Ht = function(e) {
633
+ return String.fromCharCode(e + (e > 25 ? 39 : 97));
634
+ };
635
+ function dt(e) {
636
+ var t, r = "";
637
+ for (t = Math.abs(e); t > _e; t = t / _e | 0)
638
+ r = Ht(t % _e) + r;
639
+ return (Ht(t % _e) + r).replace(Fo, "$1-$2");
640
+ }
641
+ var at, on = 5381, ye = function(e, t) {
642
+ for (var r = t.length; r; )
643
+ e = 33 * e ^ t.charCodeAt(--r);
644
+ return e;
645
+ }, an = function(e) {
646
+ return ye(on, e);
647
+ };
648
+ function _o(e) {
649
+ return dt(an(e) >>> 0);
650
+ }
651
+ function Lo(e) {
652
+ return e.displayName || e.name || "Component";
653
+ }
654
+ function it(e) {
655
+ return typeof e == "string" && !0;
656
+ }
657
+ var sn = typeof Symbol == "function" && Symbol.for, un = sn ? Symbol.for("react.memo") : 60115, Mo = sn ? Symbol.for("react.forward_ref") : 60112, zo = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Uo = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, cn = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, qo = ((at = {})[Mo] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, at[un] = cn, at);
658
+ function Yt(e) {
659
+ return ("type" in (t = e) && t.type.$$typeof) === un ? cn : "$$typeof" in e ? qo[e.$$typeof] : zo;
660
+ var t;
661
+ }
662
+ var Bo = Object.defineProperty, Vo = Object.getOwnPropertyNames, Kt = Object.getOwnPropertySymbols, Go = Object.getOwnPropertyDescriptor, Wo = Object.getPrototypeOf, Xt = Object.prototype;
663
+ function fn(e, t, r) {
664
+ if (typeof t != "string") {
665
+ if (Xt) {
666
+ var n = Wo(t);
667
+ n && n !== Xt && fn(e, n, r);
668
+ }
669
+ var o = Vo(t);
670
+ Kt && (o = o.concat(Kt(t)));
671
+ for (var a = Yt(e), s = Yt(t), i = 0; i < o.length; ++i) {
672
+ var c = o[i];
673
+ if (!(c in Uo || r && r[c] || s && c in s || a && c in a)) {
674
+ var f = Go(t, c);
675
+ try {
676
+ Bo(e, c, f);
677
+ } catch {
678
+ }
679
+ }
680
+ }
681
+ }
682
+ return e;
683
+ }
684
+ function Te(e) {
685
+ return typeof e == "function";
686
+ }
687
+ function _t(e) {
688
+ return typeof e == "object" && "styledComponentId" in e;
689
+ }
690
+ function fe(e, t) {
691
+ return e && t ? "".concat(e, " ").concat(t) : e || t || "";
692
+ }
693
+ function Jt(e, t) {
694
+ if (e.length === 0)
695
+ return "";
696
+ for (var r = e[0], n = 1; n < e.length; n++)
697
+ r += e[n];
698
+ return r;
699
+ }
700
+ function Ce(e) {
701
+ return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
702
+ }
703
+ function ht(e, t, r) {
704
+ if (r === void 0 && (r = !1), !r && !Ce(e) && !Array.isArray(e))
705
+ return t;
706
+ if (Array.isArray(t))
707
+ for (var n = 0; n < t.length; n++)
708
+ e[n] = ht(e[n], t[n]);
709
+ else if (Ce(t))
710
+ for (var n in t)
711
+ e[n] = ht(e[n], t[n]);
712
+ return e;
713
+ }
714
+ function Lt(e, t) {
715
+ Object.defineProperty(e, "toString", { value: t });
716
+ }
717
+ function ke(e) {
718
+ for (var t = [], r = 1; r < arguments.length; r++)
719
+ t[r - 1] = arguments[r];
720
+ return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : ""));
721
+ }
722
+ var Ho = function() {
723
+ function e(t) {
724
+ this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
725
+ }
726
+ return e.prototype.indexOfGroup = function(t) {
727
+ for (var r = 0, n = 0; n < t; n++)
728
+ r += this.groupSizes[n];
729
+ return r;
730
+ }, e.prototype.insertRules = function(t, r) {
731
+ if (t >= this.groupSizes.length) {
732
+ for (var n = this.groupSizes, o = n.length, a = o; t >= a; )
733
+ if ((a <<= 1) < 0)
734
+ throw ke(16, "".concat(t));
735
+ this.groupSizes = new Uint32Array(a), this.groupSizes.set(n), this.length = a;
736
+ for (var s = o; s < a; s++)
737
+ this.groupSizes[s] = 0;
738
+ }
739
+ for (var i = this.indexOfGroup(t + 1), c = (s = 0, r.length); s < c; s++)
740
+ this.tag.insertRule(i, r[s]) && (this.groupSizes[t]++, i++);
741
+ }, e.prototype.clearGroup = function(t) {
742
+ if (t < this.length) {
743
+ var r = this.groupSizes[t], n = this.indexOfGroup(t), o = n + r;
744
+ this.groupSizes[t] = 0;
745
+ for (var a = n; a < o; a++)
746
+ this.tag.deleteRule(n);
747
+ }
748
+ }, e.prototype.getGroup = function(t) {
749
+ var r = "";
750
+ if (t >= this.length || this.groupSizes[t] === 0)
751
+ return r;
752
+ for (var n = this.groupSizes[t], o = this.indexOfGroup(t), a = o + n, s = o; s < a; s++)
753
+ r += "".concat(this.tag.getRule(s)).concat(kt);
754
+ return r;
755
+ }, e;
756
+ }(), Be = /* @__PURE__ */ new Map(), We = /* @__PURE__ */ new Map(), Ve = 1, Le = function(e) {
757
+ if (Be.has(e))
758
+ return Be.get(e);
759
+ for (; We.has(Ve); )
760
+ Ve++;
761
+ var t = Ve++;
762
+ return Be.set(e, t), We.set(t, e), t;
763
+ }, Yo = function(e, t) {
764
+ Ve = t + 1, Be.set(e, t), We.set(t, e);
765
+ }, Ko = "style[".concat(Se, "][").concat(rn, '="').concat(et, '"]'), Xo = new RegExp("^".concat(Se, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), Jo = function(e, t, r) {
766
+ for (var n, o = r.split(","), a = 0, s = o.length; a < s; a++)
767
+ (n = o[a]) && e.registerName(t, n);
768
+ }, Zo = function(e, t) {
769
+ for (var r, n = ((r = t.textContent) !== null && r !== void 0 ? r : "").split(kt), o = [], a = 0, s = n.length; a < s; a++) {
770
+ var i = n[a].trim();
771
+ if (i) {
772
+ var c = i.match(Xo);
773
+ if (c) {
774
+ var f = 0 | parseInt(c[1], 10), l = c[2];
775
+ f !== 0 && (Yo(l, f), Jo(e, l, c[3]), e.getTag().insertRules(f, o)), o.length = 0;
776
+ } else
777
+ o.push(i);
778
+ }
779
+ }
780
+ };
781
+ function Qo() {
782
+ return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
783
+ }
784
+ var ln = function(e) {
785
+ var t = document.head, r = e || t, n = document.createElement("style"), o = function(i) {
786
+ var c = Array.from(i.querySelectorAll("style[".concat(Se, "]")));
787
+ return c[c.length - 1];
788
+ }(r), a = o !== void 0 ? o.nextSibling : null;
789
+ n.setAttribute(Se, tn), n.setAttribute(rn, et);
790
+ var s = Qo();
791
+ return s && n.setAttribute("nonce", s), r.insertBefore(n, a), n;
792
+ }, ea = function() {
793
+ function e(t) {
794
+ this.element = ln(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) {
795
+ if (r.sheet)
796
+ return r.sheet;
797
+ for (var n = document.styleSheets, o = 0, a = n.length; o < a; o++) {
798
+ var s = n[o];
799
+ if (s.ownerNode === r)
800
+ return s;
801
+ }
802
+ throw ke(17);
803
+ }(this.element), this.length = 0;
804
+ }
805
+ return e.prototype.insertRule = function(t, r) {
806
+ try {
807
+ return this.sheet.insertRule(r, t), this.length++, !0;
808
+ } catch {
809
+ return !1;
810
+ }
811
+ }, e.prototype.deleteRule = function(t) {
812
+ this.sheet.deleteRule(t), this.length--;
813
+ }, e.prototype.getRule = function(t) {
814
+ var r = this.sheet.cssRules[t];
815
+ return r && r.cssText ? r.cssText : "";
816
+ }, e;
817
+ }(), ta = function() {
818
+ function e(t) {
819
+ this.element = ln(t), this.nodes = this.element.childNodes, this.length = 0;
820
+ }
821
+ return e.prototype.insertRule = function(t, r) {
822
+ if (t <= this.length && t >= 0) {
823
+ var n = document.createTextNode(r);
824
+ return this.element.insertBefore(n, this.nodes[t] || null), this.length++, !0;
825
+ }
826
+ return !1;
827
+ }, e.prototype.deleteRule = function(t) {
828
+ this.element.removeChild(this.nodes[t]), this.length--;
829
+ }, e.prototype.getRule = function(t) {
830
+ return t < this.length ? this.nodes[t].textContent : "";
831
+ }, e;
832
+ }(), ra = function() {
833
+ function e(t) {
834
+ this.rules = [], this.length = 0;
835
+ }
836
+ return e.prototype.insertRule = function(t, r) {
837
+ return t <= this.length && (this.rules.splice(t, 0, r), this.length++, !0);
838
+ }, e.prototype.deleteRule = function(t) {
839
+ this.rules.splice(t, 1), this.length--;
840
+ }, e.prototype.getRule = function(t) {
841
+ return t < this.length ? this.rules[t] : "";
842
+ }, e;
843
+ }(), Zt = Ft, na = { isServer: !Ft, useCSSOMInjection: !Io }, pn = function() {
844
+ function e(t, r, n) {
845
+ t === void 0 && (t = Oe), r === void 0 && (r = {});
846
+ var o = this;
847
+ this.options = F(F({}, na), t), this.gs = r, this.names = new Map(n), this.server = !!t.isServer, !this.server && Ft && Zt && (Zt = !1, function(a) {
848
+ for (var s = document.querySelectorAll(Ko), i = 0, c = s.length; i < c; i++) {
849
+ var f = s[i];
850
+ f && f.getAttribute(Se) !== tn && (Zo(a, f), f.parentNode && f.parentNode.removeChild(f));
851
+ }
852
+ }(this)), Lt(this, function() {
853
+ return function(a) {
854
+ for (var s = a.getTag(), i = s.length, c = "", f = function(d) {
855
+ var p = function(w) {
856
+ return We.get(w);
857
+ }(d);
858
+ if (p === void 0)
859
+ return "continue";
860
+ var m = a.names.get(p), h = s.getGroup(d);
861
+ if (m === void 0 || h.length === 0)
862
+ return "continue";
863
+ var b = "".concat(Se, ".g").concat(d, '[id="').concat(p, '"]'), C = "";
864
+ m !== void 0 && m.forEach(function(w) {
865
+ w.length > 0 && (C += "".concat(w, ","));
866
+ }), c += "".concat(h).concat(b, '{content:"').concat(C, '"}').concat(kt);
867
+ }, l = 0; l < i; l++)
868
+ f(l);
869
+ return c;
870
+ }(o);
871
+ });
872
+ }
873
+ return e.registerId = function(t) {
874
+ return Le(t);
875
+ }, e.prototype.reconstructWithOptions = function(t, r) {
876
+ return r === void 0 && (r = !0), new e(F(F({}, this.options), t), this.gs, r && this.names || void 0);
877
+ }, e.prototype.allocateGSInstance = function(t) {
878
+ return this.gs[t] = (this.gs[t] || 0) + 1;
879
+ }, e.prototype.getTag = function() {
880
+ return this.tag || (this.tag = (t = function(r) {
881
+ var n = r.useCSSOMInjection, o = r.target;
882
+ return r.isServer ? new ra(o) : n ? new ea(o) : new ta(o);
883
+ }(this.options), new Ho(t)));
884
+ var t;
885
+ }, e.prototype.hasNameForId = function(t, r) {
886
+ return this.names.has(t) && this.names.get(t).has(r);
887
+ }, e.prototype.registerName = function(t, r) {
888
+ if (Le(t), this.names.has(t))
889
+ this.names.get(t).add(r);
890
+ else {
891
+ var n = /* @__PURE__ */ new Set();
892
+ n.add(r), this.names.set(t, n);
893
+ }
894
+ }, e.prototype.insertRules = function(t, r, n) {
895
+ this.registerName(t, r), this.getTag().insertRules(Le(t), n);
896
+ }, e.prototype.clearNames = function(t) {
897
+ this.names.has(t) && this.names.get(t).clear();
898
+ }, e.prototype.clearRules = function(t) {
899
+ this.getTag().clearGroup(Le(t)), this.clearNames(t);
900
+ }, e.prototype.clearTag = function() {
901
+ this.tag = void 0;
902
+ }, e;
903
+ }(), oa = /&/g, aa = /^\s*\/\/.*$/gm;
904
+ function mn(e, t) {
905
+ return e.map(function(r) {
906
+ return r.type === "rule" && (r.value = "".concat(t, " ").concat(r.value), r.value = r.value.replaceAll(",", ",".concat(t, " ")), r.props = r.props.map(function(n) {
907
+ return "".concat(t, " ").concat(n);
908
+ })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = mn(r.children, t)), r;
909
+ });
910
+ }
911
+ function ia(e) {
912
+ var t, r, n, o = Oe, a = o.options, s = a === void 0 ? Oe : a, i = o.plugins, c = i === void 0 ? tt : i, f = function(p, m, h) {
913
+ return h.startsWith(r) && h.endsWith(r) && h.replaceAll(r, "").length > 0 ? ".".concat(t) : p;
914
+ }, l = c.slice();
915
+ l.push(function(p) {
916
+ p.type === Vr && p.value.includes("&") && (p.props[0] = p.props[0].replace(oa, r).replace(n, f));
917
+ }), s.prefix && l.push(bo), l.push(so);
918
+ var d = function(p, m, h, b) {
919
+ m === void 0 && (m = ""), h === void 0 && (h = ""), b === void 0 && (b = "&"), t = b, r = m, n = new RegExp("\\".concat(r, "\\b"), "g");
920
+ var C = p.replace(aa, ""), w = uo(h || m ? "".concat(h, " ").concat(m, " { ").concat(C, " }") : C);
921
+ s.namespace && (w = mn(w, s.namespace));
922
+ var P = [];
923
+ return Gr(w, go(l.concat(vo(function(v) {
924
+ return P.push(v);
925
+ })))), P;
926
+ };
927
+ return d.hash = c.length ? c.reduce(function(p, m) {
928
+ return m.name || ke(15), ye(p, m.name);
929
+ }, on).toString() : "", d;
930
+ }
931
+ var sa = new pn(), yt = ia(), dn = B.createContext({ shouldForwardProp: void 0, styleSheet: sa, stylis: yt });
932
+ dn.Consumer;
933
+ B.createContext(void 0);
934
+ function Qt() {
935
+ return Bn(dn);
936
+ }
937
+ var ua = function() {
938
+ function e(t, r) {
939
+ var n = this;
940
+ this.inject = function(o, a) {
941
+ a === void 0 && (a = yt);
942
+ var s = n.name + a.hash;
943
+ o.hasNameForId(n.id, s) || o.insertRules(n.id, s, a(n.rules, s, "@keyframes"));
944
+ }, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = r, Lt(this, function() {
945
+ throw ke(12, String(n.name));
946
+ });
947
+ }
948
+ return e.prototype.getName = function(t) {
949
+ return t === void 0 && (t = yt), this.name + t.hash;
950
+ }, e;
951
+ }(), ca = function(e) {
952
+ return e >= "A" && e <= "Z";
953
+ };
954
+ function er(e) {
955
+ for (var t = "", r = 0; r < e.length; r++) {
956
+ var n = e[r];
957
+ if (r === 1 && n === "-" && e[0] === "-")
958
+ return e;
959
+ ca(n) ? t += "-" + n.toLowerCase() : t += n;
960
+ }
961
+ return t.startsWith("ms-") ? "-" + t : t;
962
+ }
963
+ var hn = function(e) {
964
+ return e == null || e === !1 || e === "";
965
+ }, yn = function(e) {
966
+ var t, r, n = [];
967
+ for (var o in e) {
968
+ var a = e[o];
969
+ e.hasOwnProperty(o) && !hn(a) && (Array.isArray(a) && a.isCss || Te(a) ? n.push("".concat(er(o), ":"), a, ";") : Ce(a) ? n.push.apply(n, Ge(Ge(["".concat(o, " {")], yn(a), !1), ["}"], !1)) : n.push("".concat(er(o), ": ").concat((t = o, (r = a) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || t in Co || t.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";")));
970
+ }
971
+ return n;
972
+ };
973
+ function le(e, t, r, n) {
974
+ if (hn(e))
975
+ return [];
976
+ if (_t(e))
977
+ return [".".concat(e.styledComponentId)];
978
+ if (Te(e)) {
979
+ if (!Te(a = e) || a.prototype && a.prototype.isReactComponent || !t)
980
+ return [e];
981
+ var o = e(t);
982
+ return le(o, t, r, n);
983
+ }
984
+ var a;
985
+ return e instanceof ua ? r ? (e.inject(r, n), [e.getName(n)]) : [e] : Ce(e) ? yn(e) : Array.isArray(e) ? Array.prototype.concat.apply(tt, e.map(function(s) {
986
+ return le(s, t, r, n);
987
+ })) : [e.toString()];
988
+ }
989
+ function fa(e) {
990
+ for (var t = 0; t < e.length; t += 1) {
991
+ var r = e[t];
992
+ if (Te(r) && !_t(r))
993
+ return !1;
994
+ }
995
+ return !0;
996
+ }
997
+ var la = an(et), pa = function() {
998
+ function e(t, r, n) {
999
+ this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && fa(t), this.componentId = r, this.baseHash = ye(la, r), this.baseStyle = n, pn.registerId(r);
1000
+ }
1001
+ return e.prototype.generateAndInjectStyles = function(t, r, n) {
1002
+ var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, r, n) : "";
1003
+ if (this.isStatic && !n.hash)
1004
+ if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId))
1005
+ o = fe(o, this.staticRulesId);
1006
+ else {
1007
+ var a = Jt(le(this.rules, t, r, n)), s = dt(ye(this.baseHash, a) >>> 0);
1008
+ if (!r.hasNameForId(this.componentId, s)) {
1009
+ var i = n(a, ".".concat(s), void 0, this.componentId);
1010
+ r.insertRules(this.componentId, s, i);
1011
+ }
1012
+ o = fe(o, s), this.staticRulesId = s;
1013
+ }
1014
+ else {
1015
+ for (var c = ye(this.baseHash, n.hash), f = "", l = 0; l < this.rules.length; l++) {
1016
+ var d = this.rules[l];
1017
+ if (typeof d == "string")
1018
+ f += d;
1019
+ else if (d) {
1020
+ var p = Jt(le(d, t, r, n));
1021
+ c = ye(c, p + l), f += p;
1022
+ }
1023
+ }
1024
+ if (f) {
1025
+ var m = dt(c >>> 0);
1026
+ r.hasNameForId(this.componentId, m) || r.insertRules(this.componentId, m, n(f, ".".concat(m), void 0, this.componentId)), o = fe(o, m);
1027
+ }
1028
+ }
1029
+ return o;
1030
+ }, e;
1031
+ }(), gn = B.createContext(void 0);
1032
+ gn.Consumer;
1033
+ var st = {};
1034
+ function ma(e, t, r) {
1035
+ var n = _t(e), o = e, a = !it(e), s = t.attrs, i = s === void 0 ? tt : s, c = t.componentId, f = c === void 0 ? function(S, x) {
1036
+ var A = typeof S != "string" ? "sc" : Wt(S);
1037
+ st[A] = (st[A] || 0) + 1;
1038
+ var I = "".concat(A, "-").concat(_o(et + A + st[A]));
1039
+ return x ? "".concat(x, "-").concat(I) : I;
1040
+ }(t.displayName, t.parentComponentId) : c, l = t.displayName, d = l === void 0 ? function(S) {
1041
+ return it(S) ? "styled.".concat(S) : "Styled(".concat(Lo(S), ")");
1042
+ }(e) : l, p = t.displayName && t.componentId ? "".concat(Wt(t.displayName), "-").concat(t.componentId) : t.componentId || f, m = n && o.attrs ? o.attrs.concat(i).filter(Boolean) : i, h = t.shouldForwardProp;
1043
+ if (n && o.shouldForwardProp) {
1044
+ var b = o.shouldForwardProp;
1045
+ if (t.shouldForwardProp) {
1046
+ var C = t.shouldForwardProp;
1047
+ h = function(S, x) {
1048
+ return b(S, x) && C(S, x);
1049
+ };
1050
+ } else
1051
+ h = b;
1052
+ }
1053
+ var w = new pa(r, p, n ? o.componentStyle : void 0);
1054
+ function P(S, x) {
1055
+ return function(A, I, N) {
1056
+ var V = A.attrs, G = A.componentStyle, Z = A.defaultProps, z = A.foldedComponentIds, j = A.styledComponentId, Q = A.target, ae = B.useContext(gn), Ae = Qt(), R = A.shouldForwardProp || Ae.shouldForwardProp, U = jo(I, ae, Z) || Oe, k = function(de, ie, q) {
1057
+ for (var D, $ = F(F({}, ie), { className: void 0, theme: q }), _ = 0; _ < de.length; _ += 1) {
1058
+ var Fe = Te(D = de[_]) ? D($) : D;
1059
+ for (var te in Fe)
1060
+ $[te] = te === "className" ? fe($[te], Fe[te]) : te === "style" ? F(F({}, $[te]), Fe[te]) : Fe[te];
1061
+ }
1062
+ return ie.className && ($.className = fe($.className, ie.className)), $;
1063
+ }(V, I, U), ee = k.as || Q, W = {};
1064
+ for (var M in k)
1065
+ k[M] === void 0 || M[0] === "$" || M === "as" || M === "theme" && k.theme === U || (M === "forwardedAs" ? W.as = k.forwardedAs : R && !R(M, ee) || (W[M] = k[M]));
1066
+ var H = function(de, ie) {
1067
+ var q = Qt(), D = de.generateAndInjectStyles(ie, q.styleSheet, q.stylis);
1068
+ return D;
1069
+ }(G, k), Pe = fe(z, j);
1070
+ return H && (Pe += " " + H), k.className && (Pe += " " + k.className), W[it(ee) && !nn.has(ee) ? "class" : "className"] = Pe, W.ref = N, qn(ee, W);
1071
+ }(v, S, x);
1072
+ }
1073
+ P.displayName = d;
1074
+ var v = B.forwardRef(P);
1075
+ return v.attrs = m, v.componentStyle = w, v.displayName = d, v.shouldForwardProp = h, v.foldedComponentIds = n ? fe(o.foldedComponentIds, o.styledComponentId) : "", v.styledComponentId = p, v.target = n ? o.target : e, Object.defineProperty(v, "defaultProps", { get: function() {
1076
+ return this._foldedDefaultProps;
1077
+ }, set: function(S) {
1078
+ this._foldedDefaultProps = n ? function(x) {
1079
+ for (var A = [], I = 1; I < arguments.length; I++)
1080
+ A[I - 1] = arguments[I];
1081
+ for (var N = 0, V = A; N < V.length; N++)
1082
+ ht(x, V[N], !0);
1083
+ return x;
1084
+ }({}, o.defaultProps, S) : S;
1085
+ } }), Lt(v, function() {
1086
+ return ".".concat(v.styledComponentId);
1087
+ }), a && fn(v, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), v;
1088
+ }
1089
+ function tr(e, t) {
1090
+ for (var r = [e[0]], n = 0, o = t.length; n < o; n += 1)
1091
+ r.push(t[n], e[n + 1]);
1092
+ return r;
1093
+ }
1094
+ var rr = function(e) {
1095
+ return Object.assign(e, { isCss: !0 });
1096
+ };
1097
+ function da(e) {
1098
+ for (var t = [], r = 1; r < arguments.length; r++)
1099
+ t[r - 1] = arguments[r];
1100
+ if (Te(e) || Ce(e))
1101
+ return rr(le(tr(tt, Ge([e], t, !0))));
1102
+ var n = e;
1103
+ return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? le(n) : rr(le(tr(n, t)));
1104
+ }
1105
+ function gt(e, t, r) {
1106
+ if (r === void 0 && (r = Oe), !t)
1107
+ throw ke(1, t);
1108
+ var n = function(o) {
1109
+ for (var a = [], s = 1; s < arguments.length; s++)
1110
+ a[s - 1] = arguments[s];
1111
+ return e(t, r, da.apply(void 0, Ge([o], a, !1)));
1112
+ };
1113
+ return n.attrs = function(o) {
1114
+ return gt(e, t, F(F({}, r), { attrs: Array.prototype.concat(r.attrs, o).filter(Boolean) }));
1115
+ }, n.withConfig = function(o) {
1116
+ return gt(e, t, F(F({}, r), o));
1117
+ }, n;
1118
+ }
1119
+ var vn = function(e) {
1120
+ return gt(ma, e);
1121
+ }, bn = vn;
1122
+ nn.forEach(function(e) {
1123
+ bn[e] = vn(e);
1124
+ });
1125
+ var wn = "en", Mt = {}, vt = {};
1126
+ function Sn() {
1127
+ return wn;
1128
+ }
1129
+ function ha(e) {
1130
+ wn = e;
1131
+ }
1132
+ function ya(e) {
1133
+ return Mt[e];
1134
+ }
1135
+ function ga(e) {
1136
+ if (!e)
1137
+ throw new Error("No locale data passed");
1138
+ Mt[e.locale] = e, vt[e.locale.toLowerCase()] = e.locale;
1139
+ }
1140
+ function nr(e) {
1141
+ if (Mt[e])
1142
+ return e;
1143
+ if (vt[e.toLowerCase()])
1144
+ return vt[e.toLowerCase()];
1145
+ }
1146
+ function On(e) {
1147
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.localeMatcher || "lookup";
1148
+ switch (r) {
1149
+ case "lookup":
1150
+ return or(e);
1151
+ case "best fit":
1152
+ return or(e);
1153
+ default:
1154
+ throw new RangeError('Invalid "localeMatcher" option: '.concat(r));
1155
+ }
1156
+ }
1157
+ function or(e) {
1158
+ var t = nr(e);
1159
+ if (t)
1160
+ return t;
1161
+ for (var r = e.split("-"); e.length > 1; ) {
1162
+ r.pop(), e = r.join("-");
1163
+ var n = nr(e);
1164
+ if (n)
1165
+ return n;
1166
+ }
1167
+ }
1168
+ var u = {
1169
+ af: function(t) {
1170
+ return t == 1 ? "one" : "other";
1171
+ },
1172
+ am: function(t) {
1173
+ return t >= 0 && t <= 1 ? "one" : "other";
1174
+ },
1175
+ ar: function(t) {
1176
+ var r = String(t).split("."), n = Number(r[0]) == t, o = n && r[0].slice(-2);
1177
+ return t == 0 ? "zero" : t == 1 ? "one" : t == 2 ? "two" : o >= 3 && o <= 10 ? "few" : o >= 11 && o <= 99 ? "many" : "other";
1178
+ },
1179
+ ast: function(t) {
1180
+ var r = String(t).split("."), n = !r[1];
1181
+ return t == 1 && n ? "one" : "other";
1182
+ },
1183
+ be: function(t) {
1184
+ var r = String(t).split("."), n = Number(r[0]) == t, o = n && r[0].slice(-1), a = n && r[0].slice(-2);
1185
+ return o == 1 && a != 11 ? "one" : o >= 2 && o <= 4 && (a < 12 || a > 14) ? "few" : n && o == 0 || o >= 5 && o <= 9 || a >= 11 && a <= 14 ? "many" : "other";
1186
+ },
1187
+ br: function(t) {
1188
+ var r = String(t).split("."), n = Number(r[0]) == t, o = n && r[0].slice(-1), a = n && r[0].slice(-2), s = n && r[0].slice(-6);
1189
+ return o == 1 && a != 11 && a != 71 && a != 91 ? "one" : o == 2 && a != 12 && a != 72 && a != 92 ? "two" : (o == 3 || o == 4 || o == 9) && (a < 10 || a > 19) && (a < 70 || a > 79) && (a < 90 || a > 99) ? "few" : t != 0 && n && s == 0 ? "many" : "other";
1190
+ },
1191
+ bs: function(t) {
1192
+ var r = String(t).split("."), n = r[0], o = r[1] || "", a = !r[1], s = n.slice(-1), i = n.slice(-2), c = o.slice(-1), f = o.slice(-2);
1193
+ return a && s == 1 && i != 11 || c == 1 && f != 11 ? "one" : a && s >= 2 && s <= 4 && (i < 12 || i > 14) || c >= 2 && c <= 4 && (f < 12 || f > 14) ? "few" : "other";
1194
+ },
1195
+ ca: function(t) {
1196
+ var r = String(t).split("."), n = r[0], o = !r[1], a = n.slice(-6);
1197
+ return t == 1 && o ? "one" : n != 0 && a == 0 && o ? "many" : "other";
1198
+ },
1199
+ ceb: function(t) {
1200
+ var r = String(t).split("."), n = r[0], o = r[1] || "", a = !r[1], s = n.slice(-1), i = o.slice(-1);
1201
+ return a && (n == 1 || n == 2 || n == 3) || a && s != 4 && s != 6 && s != 9 || !a && i != 4 && i != 6 && i != 9 ? "one" : "other";
1202
+ },
1203
+ cs: function(t) {
1204
+ var r = String(t).split("."), n = r[0], o = !r[1];
1205
+ return t == 1 && o ? "one" : n >= 2 && n <= 4 && o ? "few" : o ? "other" : "many";
1206
+ },
1207
+ cy: function(t) {
1208
+ return t == 0 ? "zero" : t == 1 ? "one" : t == 2 ? "two" : t == 3 ? "few" : t == 6 ? "many" : "other";
1209
+ },
1210
+ da: function(t) {
1211
+ var r = String(t).split("."), n = r[0], o = Number(r[0]) == t;
1212
+ return t == 1 || !o && (n == 0 || n == 1) ? "one" : "other";
1213
+ },
1214
+ dsb: function(t) {
1215
+ var r = String(t).split("."), n = r[0], o = r[1] || "", a = !r[1], s = n.slice(-2), i = o.slice(-2);
1216
+ return a && s == 1 || i == 1 ? "one" : a && s == 2 || i == 2 ? "two" : a && (s == 3 || s == 4) || i == 3 || i == 4 ? "few" : "other";
1217
+ },
1218
+ dz: function(t) {
1219
+ return "other";
1220
+ },
1221
+ es: function(t) {
1222
+ var r = String(t).split("."), n = r[0], o = !r[1], a = n.slice(-6);
1223
+ return t == 1 ? "one" : n != 0 && a == 0 && o ? "many" : "other";
1224
+ },
1225
+ ff: function(t) {
1226
+ return t >= 0 && t < 2 ? "one" : "other";
1227
+ },
1228
+ fr: function(t) {
1229
+ var r = String(t).split("."), n = r[0], o = !r[1], a = n.slice(-6);
1230
+ return t >= 0 && t < 2 ? "one" : n != 0 && a == 0 && o ? "many" : "other";
1231
+ },
1232
+ ga: function(t) {
1233
+ var r = String(t).split("."), n = Number(r[0]) == t;
1234
+ return t == 1 ? "one" : t == 2 ? "two" : n && t >= 3 && t <= 6 ? "few" : n && t >= 7 && t <= 10 ? "many" : "other";
1235
+ },
1236
+ gd: function(t) {
1237
+ var r = String(t).split("."), n = Number(r[0]) == t;
1238
+ return t == 1 || t == 11 ? "one" : t == 2 || t == 12 ? "two" : n && t >= 3 && t <= 10 || n && t >= 13 && t <= 19 ? "few" : "other";
1239
+ },
1240
+ he: function(t) {
1241
+ var r = String(t).split("."), n = r[0], o = !r[1];
1242
+ return n == 1 && o || n == 0 && !o ? "one" : n == 2 && o ? "two" : "other";
1243
+ },
1244
+ is: function(t) {
1245
+ var r = String(t).split("."), n = r[0], o = (r[1] || "").replace(/0+$/, ""), a = Number(r[0]) == t, s = n.slice(-1), i = n.slice(-2);
1246
+ return a && s == 1 && i != 11 || o % 10 == 1 && o % 100 != 11 ? "one" : "other";
1247
+ },
1248
+ ksh: function(t) {
1249
+ return t == 0 ? "zero" : t == 1 ? "one" : "other";
1250
+ },
1251
+ lt: function(t) {
1252
+ var r = String(t).split("."), n = r[1] || "", o = Number(r[0]) == t, a = o && r[0].slice(-1), s = o && r[0].slice(-2);
1253
+ return a == 1 && (s < 11 || s > 19) ? "one" : a >= 2 && a <= 9 && (s < 11 || s > 19) ? "few" : n != 0 ? "many" : "other";
1254
+ },
1255
+ lv: function(t) {
1256
+ var r = String(t).split("."), n = r[1] || "", o = n.length, a = Number(r[0]) == t, s = a && r[0].slice(-1), i = a && r[0].slice(-2), c = n.slice(-2), f = n.slice(-1);
1257
+ return a && s == 0 || i >= 11 && i <= 19 || o == 2 && c >= 11 && c <= 19 ? "zero" : s == 1 && i != 11 || o == 2 && f == 1 && c != 11 || o != 2 && f == 1 ? "one" : "other";
1258
+ },
1259
+ mk: function(t) {
1260
+ var r = String(t).split("."), n = r[0], o = r[1] || "", a = !r[1], s = n.slice(-1), i = n.slice(-2), c = o.slice(-1), f = o.slice(-2);
1261
+ return a && s == 1 && i != 11 || c == 1 && f != 11 ? "one" : "other";
1262
+ },
1263
+ mt: function(t) {
1264
+ var r = String(t).split("."), n = Number(r[0]) == t, o = n && r[0].slice(-2);
1265
+ return t == 1 ? "one" : t == 2 ? "two" : t == 0 || o >= 3 && o <= 10 ? "few" : o >= 11 && o <= 19 ? "many" : "other";
1266
+ },
1267
+ pa: function(t) {
1268
+ return t == 0 || t == 1 ? "one" : "other";
1269
+ },
1270
+ pl: function(t) {
1271
+ var r = String(t).split("."), n = r[0], o = !r[1], a = n.slice(-1), s = n.slice(-2);
1272
+ return t == 1 && o ? "one" : o && a >= 2 && a <= 4 && (s < 12 || s > 14) ? "few" : o && n != 1 && (a == 0 || a == 1) || o && a >= 5 && a <= 9 || o && s >= 12 && s <= 14 ? "many" : "other";
1273
+ },
1274
+ pt: function(t) {
1275
+ var r = String(t).split("."), n = r[0], o = !r[1], a = n.slice(-6);
1276
+ return n == 0 || n == 1 ? "one" : n != 0 && a == 0 && o ? "many" : "other";
1277
+ },
1278
+ ro: function(t) {
1279
+ var r = String(t).split("."), n = !r[1], o = Number(r[0]) == t, a = o && r[0].slice(-2);
1280
+ return t == 1 && n ? "one" : !n || t == 0 || t != 1 && a >= 1 && a <= 19 ? "few" : "other";
1281
+ },
1282
+ ru: function(t) {
1283
+ var r = String(t).split("."), n = r[0], o = !r[1], a = n.slice(-1), s = n.slice(-2);
1284
+ return o && a == 1 && s != 11 ? "one" : o && a >= 2 && a <= 4 && (s < 12 || s > 14) ? "few" : o && a == 0 || o && a >= 5 && a <= 9 || o && s >= 11 && s <= 14 ? "many" : "other";
1285
+ },
1286
+ se: function(t) {
1287
+ return t == 1 ? "one" : t == 2 ? "two" : "other";
1288
+ },
1289
+ si: function(t) {
1290
+ var r = String(t).split("."), n = r[0], o = r[1] || "";
1291
+ return t == 0 || t == 1 || n == 0 && o == 1 ? "one" : "other";
1292
+ },
1293
+ sl: function(t) {
1294
+ var r = String(t).split("."), n = r[0], o = !r[1], a = n.slice(-2);
1295
+ return o && a == 1 ? "one" : o && a == 2 ? "two" : o && (a == 3 || a == 4) || !o ? "few" : "other";
1296
+ }
1297
+ };
1298
+ u.as = u.am;
1299
+ u.az = u.af;
1300
+ u.bg = u.af;
1301
+ u.bn = u.am;
1302
+ u.brx = u.af;
1303
+ u.ce = u.af;
1304
+ u.chr = u.af;
1305
+ u.de = u.ast;
1306
+ u.ee = u.af;
1307
+ u.el = u.af;
1308
+ u.en = u.ast;
1309
+ u.et = u.ast;
1310
+ u.eu = u.af;
1311
+ u.fa = u.am;
1312
+ u.fi = u.ast;
1313
+ u.fil = u.ceb;
1314
+ u.fo = u.af;
1315
+ u.fur = u.af;
1316
+ u.fy = u.ast;
1317
+ u.gl = u.ast;
1318
+ u.gu = u.am;
1319
+ u.ha = u.af;
1320
+ u.hi = u.am;
1321
+ u.hr = u.bs;
1322
+ u.hsb = u.dsb;
1323
+ u.hu = u.af;
1324
+ u.hy = u.ff;
1325
+ u.ia = u.ast;
1326
+ u.id = u.dz;
1327
+ u.ig = u.dz;
1328
+ u.it = u.ca;
1329
+ u.ja = u.dz;
1330
+ u.jgo = u.af;
1331
+ u.jv = u.dz;
1332
+ u.ka = u.af;
1333
+ u.kea = u.dz;
1334
+ u.kk = u.af;
1335
+ u.kl = u.af;
1336
+ u.km = u.dz;
1337
+ u.kn = u.am;
1338
+ u.ko = u.dz;
1339
+ u.ks = u.af;
1340
+ u.ku = u.af;
1341
+ u.ky = u.af;
1342
+ u.lb = u.af;
1343
+ u.lkt = u.dz;
1344
+ u.lo = u.dz;
1345
+ u.ml = u.af;
1346
+ u.mn = u.af;
1347
+ u.mr = u.af;
1348
+ u.ms = u.dz;
1349
+ u.my = u.dz;
1350
+ u.nb = u.af;
1351
+ u.ne = u.af;
1352
+ u.nl = u.ast;
1353
+ u.nn = u.af;
1354
+ u.no = u.af;
1355
+ u.or = u.af;
1356
+ u.pcm = u.am;
1357
+ u.ps = u.af;
1358
+ u.rm = u.af;
1359
+ u.sah = u.dz;
1360
+ u.sc = u.ast;
1361
+ u.sd = u.af;
1362
+ u.sk = u.cs;
1363
+ u.so = u.af;
1364
+ u.sq = u.af;
1365
+ u.sr = u.bs;
1366
+ u.su = u.dz;
1367
+ u.sv = u.ast;
1368
+ u.sw = u.ast;
1369
+ u.ta = u.af;
1370
+ u.te = u.af;
1371
+ u.th = u.dz;
1372
+ u.ti = u.pa;
1373
+ u.tk = u.af;
1374
+ u.to = u.dz;
1375
+ u.tr = u.af;
1376
+ u.ug = u.af;
1377
+ u.uk = u.ru;
1378
+ u.ur = u.ast;
1379
+ u.uz = u.af;
1380
+ u.vi = u.dz;
1381
+ u.wae = u.af;
1382
+ u.wo = u.dz;
1383
+ u.xh = u.af;
1384
+ u.yi = u.ast;
1385
+ u.yo = u.dz;
1386
+ u.yue = u.dz;
1387
+ u.zh = u.dz;
1388
+ u.zu = u.am;
1389
+ function ar(e) {
1390
+ return e === "pt-PT" ? e : ba(e);
1391
+ }
1392
+ var va = /^([a-z0-9]+)/i;
1393
+ function ba(e) {
1394
+ var t = e.match(va);
1395
+ if (!t)
1396
+ throw new TypeError("Invalid locale: ".concat(e));
1397
+ return t[1];
1398
+ }
1399
+ function wa(e, t) {
1400
+ if (!(e instanceof t))
1401
+ throw new TypeError("Cannot call a class as a function");
1402
+ }
1403
+ function ir(e, t) {
1404
+ for (var r = 0; r < t.length; r++) {
1405
+ var n = t[r];
1406
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1407
+ }
1408
+ }
1409
+ function Sa(e, t, r) {
1410
+ return t && ir(e.prototype, t), r && ir(e, r), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1411
+ }
1412
+ var bt = /* @__PURE__ */ function() {
1413
+ function e(t, r) {
1414
+ wa(this, e);
1415
+ var n = e.supportedLocalesOf(t);
1416
+ if (n.length === 0)
1417
+ throw new RangeError("Unsupported locale: " + t);
1418
+ if (r && r.type !== "cardinal")
1419
+ throw new RangeError('Only "cardinal" "type" is supported');
1420
+ this.$ = u[ar(n[0])];
1421
+ }
1422
+ return Sa(e, [{
1423
+ key: "select",
1424
+ value: function(r) {
1425
+ return this.$(r);
1426
+ }
1427
+ }], [{
1428
+ key: "supportedLocalesOf",
1429
+ value: function(r) {
1430
+ return typeof r == "string" && (r = [r]), r.filter(function(n) {
1431
+ return u[ar(n)];
1432
+ });
1433
+ }
1434
+ }]), e;
1435
+ }();
1436
+ function wt(e) {
1437
+ "@babel/helpers - typeof";
1438
+ return wt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1439
+ return typeof t;
1440
+ } : function(t) {
1441
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1442
+ }, wt(e);
1443
+ }
1444
+ function sr(e, t) {
1445
+ var r = Object.keys(e);
1446
+ if (Object.getOwnPropertySymbols) {
1447
+ var n = Object.getOwnPropertySymbols(e);
1448
+ t && (n = n.filter(function(o) {
1449
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
1450
+ })), r.push.apply(r, n);
1451
+ }
1452
+ return r;
1453
+ }
1454
+ function ur(e) {
1455
+ for (var t = 1; t < arguments.length; t++) {
1456
+ var r = arguments[t] != null ? arguments[t] : {};
1457
+ t % 2 ? sr(Object(r), !0).forEach(function(n) {
1458
+ Oa(e, n, r[n]);
1459
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : sr(Object(r)).forEach(function(n) {
1460
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
1461
+ });
1462
+ }
1463
+ return e;
1464
+ }
1465
+ function Oa(e, t, r) {
1466
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
1467
+ }
1468
+ function cr(e, t) {
1469
+ return Pa(e) || Aa(e, t) || xa(e, t) || Ta();
1470
+ }
1471
+ function Ta() {
1472
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1473
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1474
+ }
1475
+ function xa(e, t) {
1476
+ if (e) {
1477
+ if (typeof e == "string")
1478
+ return fr(e, t);
1479
+ var r = Object.prototype.toString.call(e).slice(8, -1);
1480
+ if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
1481
+ return Array.from(e);
1482
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
1483
+ return fr(e, t);
1484
+ }
1485
+ }
1486
+ function fr(e, t) {
1487
+ (t == null || t > e.length) && (t = e.length);
1488
+ for (var r = 0, n = new Array(t); r < t; r++)
1489
+ n[r] = e[r];
1490
+ return n;
1491
+ }
1492
+ function Aa(e, t) {
1493
+ var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1494
+ if (r != null) {
1495
+ var n = [], o = !0, a = !1, s, i;
1496
+ try {
1497
+ for (r = r.call(e); !(o = (s = r.next()).done) && (n.push(s.value), !(t && n.length === t)); o = !0)
1498
+ ;
1499
+ } catch (c) {
1500
+ a = !0, i = c;
1501
+ } finally {
1502
+ try {
1503
+ !o && r.return != null && r.return();
1504
+ } finally {
1505
+ if (a)
1506
+ throw i;
1507
+ }
1508
+ }
1509
+ return n;
1510
+ }
1511
+ }
1512
+ function Pa(e) {
1513
+ if (Array.isArray(e))
1514
+ return e;
1515
+ }
1516
+ function $a(e, t) {
1517
+ if (!(e instanceof t))
1518
+ throw new TypeError("Cannot call a class as a function");
1519
+ }
1520
+ function Ea(e, t) {
1521
+ for (var r = 0; r < t.length; r++) {
1522
+ var n = t[r];
1523
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1524
+ }
1525
+ }
1526
+ function Ra(e, t, r) {
1527
+ return t && Ea(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1528
+ }
1529
+ var Da = ["second", "minute", "hour", "day", "week", "month", "quarter", "year"], Ca = ["auto", "always"], Ia = ["long", "short", "narrow"], ja = ["lookup", "best fit"], oe = /* @__PURE__ */ function() {
1530
+ function e() {
1531
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1532
+ $a(this, e);
1533
+ var n = r.numeric, o = r.style, a = r.localeMatcher;
1534
+ if (this.numeric = "always", this.style = "long", this.localeMatcher = "lookup", n !== void 0) {
1535
+ if (Ca.indexOf(n) < 0)
1536
+ throw new RangeError('Invalid "numeric" option: '.concat(n));
1537
+ this.numeric = n;
1538
+ }
1539
+ if (o !== void 0) {
1540
+ if (Ia.indexOf(o) < 0)
1541
+ throw new RangeError('Invalid "style" option: '.concat(o));
1542
+ this.style = o;
1543
+ }
1544
+ if (a !== void 0) {
1545
+ if (ja.indexOf(a) < 0)
1546
+ throw new RangeError('Invalid "localeMatcher" option: '.concat(a));
1547
+ this.localeMatcher = a;
1548
+ }
1549
+ if (typeof t == "string" && (t = [t]), t.push(Sn()), this.locale = e.supportedLocalesOf(t, {
1550
+ localeMatcher: this.localeMatcher
1551
+ })[0], !this.locale)
1552
+ throw new Error("No supported locale was found");
1553
+ bt.supportedLocalesOf(this.locale).length > 0 ? this.pluralRules = new bt(this.locale) : console.warn('"'.concat(this.locale, '" locale is not supported')), typeof Intl < "u" && Intl.NumberFormat ? (this.numberFormat = new Intl.NumberFormat(this.locale), this.numberingSystem = this.numberFormat.resolvedOptions().numberingSystem) : this.numberingSystem = "latn", this.locale = On(this.locale, {
1554
+ localeMatcher: this.localeMatcher
1555
+ });
1556
+ }
1557
+ return Ra(e, [{
1558
+ key: "format",
1559
+ value: function() {
1560
+ var r = lr(arguments), n = cr(r, 2), o = n[0], a = n[1];
1561
+ return this.getRule(o, a).replace("{0}", this.formatNumber(Math.abs(o)));
1562
+ }
1563
+ /**
1564
+ * Formats time `number` in `units` (either in past or in future).
1565
+ * @param {number} number - Time interval value.
1566
+ * @param {string} unit - Time interval measurement unit.
1567
+ * @return {Object[]} The parts (`{ type, value, unit? }`).
1568
+ * @throws {RangeError} If unit is not one of "second", "minute", "hour", "day", "week", "month", "quarter".
1569
+ * @example
1570
+ * // Version 1 (deprecated).
1571
+ * // Returns [
1572
+ * // { type: "literal", value: "in " },
1573
+ * // { type: "day", value: "100" },
1574
+ * // { type: "literal", value: " days" }
1575
+ * // ]
1576
+ * rtf.formatToParts(100, "day")
1577
+ * //
1578
+ * // Version 2.
1579
+ * // Returns [
1580
+ * // { type: "literal", value: "in " },
1581
+ * // { type: "integer", value: "100", unit: "day" },
1582
+ * // { type: "literal", value: " days" }
1583
+ * // ]
1584
+ * rtf.formatToParts(100, "day")
1585
+ */
1586
+ }, {
1587
+ key: "formatToParts",
1588
+ value: function() {
1589
+ var r = lr(arguments), n = cr(r, 2), o = n[0], a = n[1], s = this.getRule(o, a), i = s.indexOf("{0}");
1590
+ if (i < 0)
1591
+ return [{
1592
+ type: "literal",
1593
+ value: s
1594
+ }];
1595
+ var c = [];
1596
+ return i > 0 && c.push({
1597
+ type: "literal",
1598
+ value: s.slice(0, i)
1599
+ }), c = c.concat(this.formatNumberToParts(Math.abs(o)).map(function(f) {
1600
+ return ur(ur({}, f), {}, {
1601
+ unit: a
1602
+ });
1603
+ })), i + 3 < s.length - 1 && c.push({
1604
+ type: "literal",
1605
+ value: s.slice(i + 3)
1606
+ }), c;
1607
+ }
1608
+ /**
1609
+ * Returns formatting rule for `value` in `units` (either in past or in future).
1610
+ * @param {number} value - Time interval value.
1611
+ * @param {string} unit - Time interval measurement unit.
1612
+ * @return {string}
1613
+ * @throws {RangeError} If unit is not one of "second", "minute", "hour", "day", "week", "month", "quarter".
1614
+ * @example
1615
+ * // Returns "{0} days ago"
1616
+ * getRule(-2, "day")
1617
+ */
1618
+ }, {
1619
+ key: "getRule",
1620
+ value: function(r, n) {
1621
+ var o = ya(this.locale)[this.style][n];
1622
+ if (typeof o == "string")
1623
+ return o;
1624
+ if (this.numeric === "auto") {
1625
+ if (r === -2 || r === -1) {
1626
+ var a = o["previous".concat(r === -1 ? "" : "-" + Math.abs(r))];
1627
+ if (a)
1628
+ return a;
1629
+ } else if (r === 1 || r === 2) {
1630
+ var s = o["next".concat(r === 1 ? "" : "-" + Math.abs(r))];
1631
+ if (s)
1632
+ return s;
1633
+ } else if (r === 0 && o.current)
1634
+ return o.current;
1635
+ }
1636
+ var i = o[La(r) ? "past" : "future"];
1637
+ if (typeof i == "string")
1638
+ return i;
1639
+ var c = this.pluralRules && this.pluralRules.select(Math.abs(r)) || "other";
1640
+ return i[c] || i.other;
1641
+ }
1642
+ /**
1643
+ * Formats a number into a string.
1644
+ * Uses `Intl.NumberFormat` when available.
1645
+ * @param {number} number
1646
+ * @return {string}
1647
+ */
1648
+ }, {
1649
+ key: "formatNumber",
1650
+ value: function(r) {
1651
+ return this.numberFormat ? this.numberFormat.format(r) : String(r);
1652
+ }
1653
+ /**
1654
+ * Formats a number into a list of parts.
1655
+ * Uses `Intl.NumberFormat` when available.
1656
+ * @param {number} number
1657
+ * @return {object[]}
1658
+ */
1659
+ }, {
1660
+ key: "formatNumberToParts",
1661
+ value: function(r) {
1662
+ return this.numberFormat && this.numberFormat.formatToParts ? this.numberFormat.formatToParts(r) : [{
1663
+ type: "integer",
1664
+ value: this.formatNumber(r)
1665
+ }];
1666
+ }
1667
+ /**
1668
+ * Returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of this DateTimeFormat object.
1669
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions
1670
+ * @return {Object}
1671
+ */
1672
+ }, {
1673
+ key: "resolvedOptions",
1674
+ value: function() {
1675
+ return {
1676
+ locale: this.locale,
1677
+ style: this.style,
1678
+ numeric: this.numeric,
1679
+ numberingSystem: this.numberingSystem
1680
+ };
1681
+ }
1682
+ }]), e;
1683
+ }();
1684
+ oe.supportedLocalesOf = function(e) {
1685
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1686
+ if (typeof e == "string")
1687
+ e = [e];
1688
+ else if (!Array.isArray(e))
1689
+ throw new TypeError('Invalid "locales" argument');
1690
+ return e.filter(function(r) {
1691
+ return On(r, t);
1692
+ });
1693
+ };
1694
+ oe.addLocale = ga;
1695
+ oe.setDefaultLocale = ha;
1696
+ oe.getDefaultLocale = Sn;
1697
+ oe.PluralRules = bt;
1698
+ var ut = 'Invalid "unit" argument';
1699
+ function Na(e) {
1700
+ if (wt(e) === "symbol")
1701
+ throw new TypeError(ut);
1702
+ if (typeof e != "string")
1703
+ throw new RangeError("".concat(ut, ": ").concat(e));
1704
+ if (e[e.length - 1] === "s" && (e = e.slice(0, e.length - 1)), Da.indexOf(e) < 0)
1705
+ throw new RangeError("".concat(ut, ": ").concat(e));
1706
+ return e;
1707
+ }
1708
+ var ka = 'Invalid "number" argument';
1709
+ function Fa(e) {
1710
+ if (e = Number(e), Number.isFinite && !Number.isFinite(e))
1711
+ throw new RangeError("".concat(ka, ": ").concat(e));
1712
+ return e;
1713
+ }
1714
+ function _a(e) {
1715
+ return 1 / e === -1 / 0;
1716
+ }
1717
+ function La(e) {
1718
+ return e < 0 || e === 0 && _a(e);
1719
+ }
1720
+ function lr(e) {
1721
+ if (e.length < 2)
1722
+ throw new TypeError('"unit" argument is required');
1723
+ return [Fa(e[0]), Na(e[1])];
1724
+ }
1725
+ function He(e) {
1726
+ "@babel/helpers - typeof";
1727
+ return He = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1728
+ return typeof t;
1729
+ } : function(t) {
1730
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1731
+ }, He(e);
1732
+ }
1733
+ function Ma(e, t) {
1734
+ if (!(e instanceof t))
1735
+ throw new TypeError("Cannot call a class as a function");
1736
+ }
1737
+ function za(e, t) {
1738
+ for (var r = 0; r < t.length; r++) {
1739
+ var n = t[r];
1740
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
1741
+ }
1742
+ }
1743
+ function Ua(e, t, r) {
1744
+ return t && za(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
1745
+ }
1746
+ var pr = /* @__PURE__ */ function() {
1747
+ function e() {
1748
+ Ma(this, e), this.cache = {};
1749
+ }
1750
+ return Ua(e, [{
1751
+ key: "get",
1752
+ value: function() {
1753
+ for (var r = this.cache, n = arguments.length, o = new Array(n), a = 0; a < n; a++)
1754
+ o[a] = arguments[a];
1755
+ for (var s = 0, i = o; s < i.length; s++) {
1756
+ var c = i[s];
1757
+ if (He(r) !== "object")
1758
+ return;
1759
+ r = r[c];
1760
+ }
1761
+ return r;
1762
+ }
1763
+ }, {
1764
+ key: "put",
1765
+ value: function() {
1766
+ for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++)
1767
+ n[o] = arguments[o];
1768
+ for (var a = n.pop(), s = n.pop(), i = this.cache, c = 0, f = n; c < f.length; c++) {
1769
+ var l = f[c];
1770
+ He(i[l]) !== "object" && (i[l] = {}), i = i[l];
1771
+ }
1772
+ return i[s] = a;
1773
+ }
1774
+ }]), e;
1775
+ }();
1776
+ function St(e) {
1777
+ "@babel/helpers - typeof";
1778
+ return St = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1779
+ return typeof t;
1780
+ } : function(t) {
1781
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1782
+ }, St(e);
1783
+ }
1784
+ function qa(e, t) {
1785
+ var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1786
+ if (r)
1787
+ return (r = r.call(e)).next.bind(r);
1788
+ if (Array.isArray(e) || (r = Ba(e)) || t) {
1789
+ r && (e = r);
1790
+ var n = 0;
1791
+ return function() {
1792
+ return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
1793
+ };
1794
+ }
1795
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1796
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1797
+ }
1798
+ function Ba(e, t) {
1799
+ if (e) {
1800
+ if (typeof e == "string")
1801
+ return mr(e, t);
1802
+ var r = Object.prototype.toString.call(e).slice(8, -1);
1803
+ if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
1804
+ return Array.from(e);
1805
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
1806
+ return mr(e, t);
1807
+ }
1808
+ }
1809
+ function mr(e, t) {
1810
+ (t == null || t > e.length) && (t = e.length);
1811
+ for (var r = 0, n = new Array(t); r < t; r++)
1812
+ n[r] = e[r];
1813
+ return n;
1814
+ }
1815
+ function Va(e, t) {
1816
+ for (var r = qa(e), n; !(n = r()).done; ) {
1817
+ var o = n.value;
1818
+ if (t(o))
1819
+ return o;
1820
+ for (var a = o.split("-"); a.length > 1; )
1821
+ if (a.pop(), o = a.join("-"), t(o))
1822
+ return o;
1823
+ }
1824
+ throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")));
1825
+ }
1826
+ function Ga() {
1827
+ var e = (typeof Intl > "u" ? "undefined" : St(Intl)) === "object";
1828
+ return e && typeof Intl.DateTimeFormat == "function";
1829
+ }
1830
+ function Ot(e) {
1831
+ "@babel/helpers - typeof";
1832
+ return Ot = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1833
+ return typeof t;
1834
+ } : function(t) {
1835
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1836
+ }, Ot(e);
1837
+ }
1838
+ function Wa(e) {
1839
+ return Ya(e) && (Array.isArray(e.steps) || // `gradation` property is deprecated: it has been renamed to `steps`.
1840
+ Array.isArray(e.gradation) || // `flavour` property is deprecated: it has been renamed to `labels`.
1841
+ Array.isArray(e.flavour) || typeof e.flavour == "string" || Array.isArray(e.labels) || typeof e.labels == "string" || // `units` property is deprecated.
1842
+ Array.isArray(e.units) || // `custom` property is deprecated.
1843
+ typeof e.custom == "function");
1844
+ }
1845
+ var Ha = {}.constructor;
1846
+ function Ya(e) {
1847
+ return Ot(e) !== void 0 && e !== null && e.constructor === Ha;
1848
+ }
1849
+ var X = 60, Ye = 60 * X, pe = 24 * Ye, Tt = 7 * pe, xt = 30.44 * pe, Tn = 146097 / 400 * pe;
1850
+ function be(e) {
1851
+ switch (e) {
1852
+ case "second":
1853
+ return 1;
1854
+ case "minute":
1855
+ return X;
1856
+ case "hour":
1857
+ return Ye;
1858
+ case "day":
1859
+ return pe;
1860
+ case "week":
1861
+ return Tt;
1862
+ case "month":
1863
+ return xt;
1864
+ case "year":
1865
+ return Tn;
1866
+ }
1867
+ }
1868
+ function xn(e) {
1869
+ return e.factor !== void 0 ? e.factor : be(e.unit || e.formatAs) || 1;
1870
+ }
1871
+ function Ie(e) {
1872
+ switch (e) {
1873
+ case "floor":
1874
+ return Math.floor;
1875
+ default:
1876
+ return Math.round;
1877
+ }
1878
+ }
1879
+ function zt(e) {
1880
+ switch (e) {
1881
+ case "floor":
1882
+ return 1;
1883
+ default:
1884
+ return 0.5;
1885
+ }
1886
+ }
1887
+ function At(e) {
1888
+ "@babel/helpers - typeof";
1889
+ return At = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1890
+ return typeof t;
1891
+ } : function(t) {
1892
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1893
+ }, At(e);
1894
+ }
1895
+ function An(e, t) {
1896
+ var r = t.prevStep, n = t.timestamp, o = t.now, a = t.future, s = t.round, i;
1897
+ return r && (r.id || r.unit) && (i = e["threshold_for_".concat(r.id || r.unit)]), i === void 0 && e.threshold !== void 0 && (i = e.threshold, typeof i == "function" && (i = i(o, a))), i === void 0 && (i = e.minTime), At(i) === "object" && (r && r.id && i[r.id] !== void 0 ? i = i[r.id] : i = i.default), typeof i == "function" && (i = i(n, {
1898
+ future: a,
1899
+ getMinTimeForUnit: function(f, l) {
1900
+ return dr(f, l || r && r.formatAs, {
1901
+ round: s
1902
+ });
1903
+ }
1904
+ })), i === void 0 && e.test && (e.test(n, {
1905
+ now: o,
1906
+ future: a
1907
+ }) ? i = 0 : i = 9007199254740991), i === void 0 && (r ? e.formatAs && r.formatAs && (i = dr(e.formatAs, r.formatAs, {
1908
+ round: s
1909
+ })) : i = 0), i === void 0 && console.warn("[javascript-time-ago] A step should specify `minTime`:\n" + JSON.stringify(e, null, 2)), i;
1910
+ }
1911
+ function dr(e, t, r) {
1912
+ var n = r.round, o = be(e), a;
1913
+ if (t === "now" ? a = be(e) : a = be(t), o !== void 0 && a !== void 0)
1914
+ return o - a * (1 - zt(n));
1915
+ }
1916
+ function hr(e, t) {
1917
+ var r = Object.keys(e);
1918
+ if (Object.getOwnPropertySymbols) {
1919
+ var n = Object.getOwnPropertySymbols(e);
1920
+ t && (n = n.filter(function(o) {
1921
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
1922
+ })), r.push.apply(r, n);
1923
+ }
1924
+ return r;
1925
+ }
1926
+ function Ka(e) {
1927
+ for (var t = 1; t < arguments.length; t++) {
1928
+ var r = arguments[t] != null ? arguments[t] : {};
1929
+ t % 2 ? hr(Object(r), !0).forEach(function(n) {
1930
+ Xa(e, n, r[n]);
1931
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : hr(Object(r)).forEach(function(n) {
1932
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
1933
+ });
1934
+ }
1935
+ return e;
1936
+ }
1937
+ function Xa(e, t, r) {
1938
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
1939
+ }
1940
+ function Ja(e, t, r) {
1941
+ var n = r.now, o = r.future, a = r.round, s = r.units;
1942
+ e = Qa(e, s);
1943
+ var i = Za(e, t, {
1944
+ now: n,
1945
+ future: o,
1946
+ round: a
1947
+ });
1948
+ {
1949
+ if (i) {
1950
+ var c = e[e.indexOf(i) - 1], f = e[e.indexOf(i) + 1];
1951
+ return [c, i, f];
1952
+ }
1953
+ return [void 0, void 0, e[0]];
1954
+ }
1955
+ }
1956
+ function Za(e, t, r) {
1957
+ var n = r.now, o = r.future, a = r.round;
1958
+ if (e.length !== 0) {
1959
+ var s = Pn(e, t, {
1960
+ now: n,
1961
+ future: o || t < 0,
1962
+ round: a
1963
+ });
1964
+ if (s !== -1) {
1965
+ var i = e[s];
1966
+ if (i.granularity) {
1967
+ var c = Ie(a)(Math.abs(t) / xn(i) / i.granularity) * i.granularity;
1968
+ if (c === 0 && s > 0)
1969
+ return e[s - 1];
1970
+ }
1971
+ return i;
1972
+ }
1973
+ }
1974
+ }
1975
+ function Pn(e, t, r) {
1976
+ var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, o = An(e[n], Ka({
1977
+ prevStep: e[n - 1],
1978
+ timestamp: r.now - t * 1e3
1979
+ }, r));
1980
+ return o === void 0 || Math.abs(t) < o ? n - 1 : n === e.length - 1 ? n : Pn(e, t, r, n + 1);
1981
+ }
1982
+ function Qa(e, t) {
1983
+ return e.filter(function(r) {
1984
+ var n = r.unit, o = r.formatAs;
1985
+ return n = n || o, n ? t.indexOf(n) >= 0 : !0;
1986
+ });
1987
+ }
1988
+ function ei(e, t, r) {
1989
+ var n = r.now, o = r.round;
1990
+ if (be(e)) {
1991
+ var a = be(e) * 1e3, s = t > n, i = Math.abs(t - n), c = Ie(o)(i / a) * a;
1992
+ return s ? c > 0 ? i - c + ri(o, a) : i - c + 1 : -(i - c) + ti(o, a);
1993
+ }
1994
+ }
1995
+ function ti(e, t) {
1996
+ return zt(e) * t;
1997
+ }
1998
+ function ri(e, t) {
1999
+ return (1 - zt(e)) * t + 1;
2000
+ }
2001
+ var ni = 365 * 24 * 60 * 60 * 1e3, $n = 1e3 * ni;
2002
+ function oi(e, t, r) {
2003
+ var n = r.prevStep, o = r.nextStep, a = r.now, s = r.future, i = r.round, c = e.getTime ? e.getTime() : e, f = function(h) {
2004
+ return ei(h, c, {
2005
+ now: a,
2006
+ round: i
2007
+ });
2008
+ }, l = ii(s ? t : o, c, {
2009
+ future: s,
2010
+ now: a,
2011
+ round: i,
2012
+ prevStep: s ? n : t
2013
+ // isFirstStep: future && isFirstStep
2014
+ });
2015
+ if (l !== void 0) {
2016
+ var d;
2017
+ if (t && (t.getTimeToNextUpdate && (d = t.getTimeToNextUpdate(c, {
2018
+ getTimeToNextUpdateForUnit: f,
2019
+ getRoundFunction: Ie,
2020
+ now: a,
2021
+ future: s,
2022
+ round: i
2023
+ })), d === void 0)) {
2024
+ var p = t.unit || t.formatAs;
2025
+ p && (d = f(p));
2026
+ }
2027
+ return d === void 0 ? l : Math.min(d, l);
2028
+ }
2029
+ }
2030
+ function ai(e, t, r) {
2031
+ var n = r.now, o = r.future, a = r.round, s = r.prevStep, i = An(e, {
2032
+ timestamp: t,
2033
+ now: n,
2034
+ future: o,
2035
+ round: a,
2036
+ prevStep: s
2037
+ });
2038
+ if (i !== void 0)
2039
+ return o ? t - i * 1e3 + 1 : i === 0 && t === n ? $n : t + i * 1e3;
2040
+ }
2041
+ function ii(e, t, r) {
2042
+ var n = r.now, o = r.future, a = r.round, s = r.prevStep;
2043
+ if (e) {
2044
+ var i = ai(e, t, {
2045
+ now: n,
2046
+ future: o,
2047
+ round: a,
2048
+ prevStep: s
2049
+ });
2050
+ return i === void 0 ? void 0 : i - n;
2051
+ } else
2052
+ return o ? t - n + 1 : $n;
2053
+ }
2054
+ var En = {};
2055
+ function ge(e) {
2056
+ return En[e];
2057
+ }
2058
+ function Rn(e) {
2059
+ if (!e)
2060
+ throw new Error("[javascript-time-ago] No locale data passed.");
2061
+ En[e.locale] = e;
2062
+ }
2063
+ const si = [{
2064
+ formatAs: "now"
2065
+ }, {
2066
+ formatAs: "second"
2067
+ }, {
2068
+ formatAs: "minute"
2069
+ }, {
2070
+ formatAs: "hour"
2071
+ }, {
2072
+ formatAs: "day"
2073
+ }, {
2074
+ formatAs: "week"
2075
+ }, {
2076
+ formatAs: "month"
2077
+ }, {
2078
+ formatAs: "year"
2079
+ }], Pt = {
2080
+ steps: si,
2081
+ labels: "long"
2082
+ };
2083
+ function yr(e, t) {
2084
+ var r = Object.keys(e);
2085
+ if (Object.getOwnPropertySymbols) {
2086
+ var n = Object.getOwnPropertySymbols(e);
2087
+ t && (n = n.filter(function(o) {
2088
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2089
+ })), r.push.apply(r, n);
2090
+ }
2091
+ return r;
2092
+ }
2093
+ function gr(e) {
2094
+ for (var t = 1; t < arguments.length; t++) {
2095
+ var r = arguments[t] != null ? arguments[t] : {};
2096
+ t % 2 ? yr(Object(r), !0).forEach(function(n) {
2097
+ ui(e, n, r[n]);
2098
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : yr(Object(r)).forEach(function(n) {
2099
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2100
+ });
2101
+ }
2102
+ return e;
2103
+ }
2104
+ function ui(e, t, r) {
2105
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2106
+ }
2107
+ const $t = gr(gr({}, Pt), {}, {
2108
+ // Skip "seconds".
2109
+ steps: Pt.steps.filter(function(e) {
2110
+ return e.formatAs !== "second";
2111
+ })
2112
+ }), Dn = [{
2113
+ // This step returns the amount of seconds
2114
+ // by dividing the amount of seconds by `1`.
2115
+ factor: 1,
2116
+ // "now" labels are used for formatting the output.
2117
+ unit: "now"
2118
+ }, {
2119
+ // When the language doesn't support `now` unit,
2120
+ // the first step is ignored, and it uses this `second` unit.
2121
+ threshold: 1,
2122
+ // `threshold_for_now` should be the same as `threshold` on minutes.
2123
+ threshold_for_now: 45.5,
2124
+ // This step returns the amount of seconds
2125
+ // by dividing the amount of seconds by `1`.
2126
+ factor: 1,
2127
+ // "second" labels are used for formatting the output.
2128
+ unit: "second"
2129
+ }, {
2130
+ // `threshold` should be the same as `threshold_for_now` on seconds.
2131
+ threshold: 45.5,
2132
+ // Return the amount of minutes by dividing the amount
2133
+ // of seconds by the amount of seconds in a minute.
2134
+ factor: X,
2135
+ // "minute" labels are used for formatting the output.
2136
+ unit: "minute"
2137
+ }, {
2138
+ // This step is effective starting from 2.5 minutes.
2139
+ threshold: 2.5 * X,
2140
+ // Allow only 5-minute increments of minutes starting from 2.5 minutes.
2141
+ // `granularity` — (advanced) Time interval value "granularity".
2142
+ // For example, it could be set to `5` for minutes to allow only 5-minute increments
2143
+ // when formatting time intervals: `0 minutes`, `5 minutes`, `10 minutes`, etc.
2144
+ // Perhaps this feature will be removed because there seem to be no use cases
2145
+ // of it in the real world.
2146
+ granularity: 5,
2147
+ // Return the amount of minutes by dividing the amount
2148
+ // of seconds by the amount of seconds in a minute.
2149
+ factor: X,
2150
+ // "minute" labels are used for formatting the output.
2151
+ unit: "minute"
2152
+ }, {
2153
+ // This step is effective starting from 22.5 minutes.
2154
+ threshold: 22.5 * X,
2155
+ // Return the amount of minutes by dividing the amount
2156
+ // of seconds by the amount of seconds in half-an-hour.
2157
+ factor: 0.5 * Ye,
2158
+ // "half-hour" labels are used for formatting the output.
2159
+ // (if available, which is no longer the case)
2160
+ unit: "half-hour"
2161
+ }, {
2162
+ // This step is effective starting from 42.5 minutes.
2163
+ threshold: 42.5 * X,
2164
+ threshold_for_minute: 52.5 * X,
2165
+ // Return the amount of minutes by dividing the amount
2166
+ // of seconds by the amount of seconds in an hour.
2167
+ factor: Ye,
2168
+ // "hour" labels are used for formatting the output.
2169
+ unit: "hour"
2170
+ }, {
2171
+ // This step is effective starting from 20.5 hours.
2172
+ threshold: 20.5 / 24 * pe,
2173
+ // Return the amount of minutes by dividing the amount
2174
+ // of seconds by the amount of seconds in a day.
2175
+ factor: pe,
2176
+ // "day" labels are used for formatting the output.
2177
+ unit: "day"
2178
+ }, {
2179
+ // This step is effective starting from 5.5 days.
2180
+ threshold: 5.5 * pe,
2181
+ // Return the amount of minutes by dividing the amount
2182
+ // of seconds by the amount of seconds in a week.
2183
+ factor: Tt,
2184
+ // "week" labels are used for formatting the output.
2185
+ unit: "week"
2186
+ }, {
2187
+ // This step is effective starting from 3.5 weeks.
2188
+ threshold: 3.5 * Tt,
2189
+ // Return the amount of minutes by dividing the amount
2190
+ // of seconds by the amount of seconds in a month.
2191
+ factor: xt,
2192
+ // "month" labels are used for formatting the output.
2193
+ unit: "month"
2194
+ }, {
2195
+ // This step is effective starting from 10.5 months.
2196
+ threshold: 10.5 * xt,
2197
+ // Return the amount of minutes by dividing the amount
2198
+ // of seconds by the amount of seconds in a year.
2199
+ factor: Tn,
2200
+ // "year" labels are used for formatting the output.
2201
+ unit: "year"
2202
+ }], vr = {
2203
+ gradation: Dn,
2204
+ flavour: "long",
2205
+ units: ["now", "minute", "hour", "day", "week", "month", "year"]
2206
+ }, ci = {
2207
+ gradation: Dn,
2208
+ flavour: "long-time",
2209
+ units: ["now", "minute", "hour", "day", "week", "month", "year"]
2210
+ };
2211
+ function Cn(e) {
2212
+ return e instanceof Date ? e : new Date(e);
2213
+ }
2214
+ var Et = [{
2215
+ formatAs: "second"
2216
+ }, {
2217
+ formatAs: "minute"
2218
+ }, {
2219
+ formatAs: "hour"
2220
+ }], K = {}, fi = {
2221
+ minTime: function(t, r) {
2222
+ r.future;
2223
+ var n = r.getMinTimeForUnit;
2224
+ return n("day");
2225
+ },
2226
+ format: function(t, r) {
2227
+ return K[r] || (K[r] = {}), K[r].dayMonth || (K[r].dayMonth = new Intl.DateTimeFormat(r, {
2228
+ month: "short",
2229
+ day: "numeric"
2230
+ })), K[r].dayMonth.format(Cn(t));
2231
+ }
2232
+ }, li = {
2233
+ minTime: function(t, r) {
2234
+ var n = r.future;
2235
+ if (n) {
2236
+ var o = new Date(new Date(t).getFullYear(), 0).getTime() - 1;
2237
+ return (t - o) / 1e3;
2238
+ } else {
2239
+ var a = new Date(new Date(t).getFullYear() + 1, 0).getTime();
2240
+ return (a - t) / 1e3;
2241
+ }
2242
+ },
2243
+ format: function(t, r) {
2244
+ return K[r] || (K[r] = {}), K[r].dayMonthYear || (K[r].dayMonthYear = new Intl.DateTimeFormat(r, {
2245
+ year: "numeric",
2246
+ month: "short",
2247
+ day: "numeric"
2248
+ })), K[r].dayMonthYear.format(Cn(t));
2249
+ }
2250
+ };
2251
+ Ga() ? Et.push(fi, li) : Et.push({
2252
+ formatAs: "day"
2253
+ }, {
2254
+ formatAs: "week"
2255
+ }, {
2256
+ formatAs: "month"
2257
+ }, {
2258
+ formatAs: "year"
2259
+ });
2260
+ const me = {
2261
+ steps: Et,
2262
+ labels: [
2263
+ // "mini" labels are only defined for a few languages.
2264
+ "mini",
2265
+ // "short-time" labels are only defined for a few languages.
2266
+ "short-time",
2267
+ // "narrow" and "short" labels are defined for all languages.
2268
+ // "narrow" labels can sometimes be weird (like "+5d."),
2269
+ // but "short" labels have the " ago" part, so "narrow" seem
2270
+ // more appropriate.
2271
+ // "short" labels would have been more appropriate if they
2272
+ // didn't have the " ago" part, hence the "short-time" above.
2273
+ "narrow",
2274
+ // Since "narrow" labels are always present, "short" element
2275
+ // of this array can be removed.
2276
+ "short"
2277
+ ]
2278
+ };
2279
+ function br(e, t) {
2280
+ var r = Object.keys(e);
2281
+ if (Object.getOwnPropertySymbols) {
2282
+ var n = Object.getOwnPropertySymbols(e);
2283
+ t && (n = n.filter(function(o) {
2284
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2285
+ })), r.push.apply(r, n);
2286
+ }
2287
+ return r;
2288
+ }
2289
+ function wr(e) {
2290
+ for (var t = 1; t < arguments.length; t++) {
2291
+ var r = arguments[t] != null ? arguments[t] : {};
2292
+ t % 2 ? br(Object(r), !0).forEach(function(n) {
2293
+ pi(e, n, r[n]);
2294
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : br(Object(r)).forEach(function(n) {
2295
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2296
+ });
2297
+ }
2298
+ return e;
2299
+ }
2300
+ function pi(e, t, r) {
2301
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2302
+ }
2303
+ const mi = wr(wr({}, me), {}, {
2304
+ // Add "now".
2305
+ steps: [{
2306
+ formatAs: "now"
2307
+ }].concat(me.steps)
2308
+ });
2309
+ function Sr(e, t) {
2310
+ var r = Object.keys(e);
2311
+ if (Object.getOwnPropertySymbols) {
2312
+ var n = Object.getOwnPropertySymbols(e);
2313
+ t && (n = n.filter(function(o) {
2314
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2315
+ })), r.push.apply(r, n);
2316
+ }
2317
+ return r;
2318
+ }
2319
+ function Or(e) {
2320
+ for (var t = 1; t < arguments.length; t++) {
2321
+ var r = arguments[t] != null ? arguments[t] : {};
2322
+ t % 2 ? Sr(Object(r), !0).forEach(function(n) {
2323
+ di(e, n, r[n]);
2324
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Sr(Object(r)).forEach(function(n) {
2325
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2326
+ });
2327
+ }
2328
+ return e;
2329
+ }
2330
+ function di(e, t, r) {
2331
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2332
+ }
2333
+ const Rt = Or(Or({}, me), {}, {
2334
+ // Skip "seconds".
2335
+ steps: me.steps.filter(function(e) {
2336
+ return e.formatAs !== "second";
2337
+ })
2338
+ });
2339
+ function Tr(e, t) {
2340
+ var r = Object.keys(e);
2341
+ if (Object.getOwnPropertySymbols) {
2342
+ var n = Object.getOwnPropertySymbols(e);
2343
+ t && (n = n.filter(function(o) {
2344
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2345
+ })), r.push.apply(r, n);
2346
+ }
2347
+ return r;
2348
+ }
2349
+ function xr(e) {
2350
+ for (var t = 1; t < arguments.length; t++) {
2351
+ var r = arguments[t] != null ? arguments[t] : {};
2352
+ t % 2 ? Tr(Object(r), !0).forEach(function(n) {
2353
+ hi(e, n, r[n]);
2354
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Tr(Object(r)).forEach(function(n) {
2355
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2356
+ });
2357
+ }
2358
+ return e;
2359
+ }
2360
+ function hi(e, t, r) {
2361
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2362
+ }
2363
+ const yi = xr(xr({}, Rt), {}, {
2364
+ // Add "now".
2365
+ steps: [{
2366
+ formatAs: "now"
2367
+ }].concat(Rt.steps)
2368
+ });
2369
+ function Ar(e, t) {
2370
+ var r = Object.keys(e);
2371
+ if (Object.getOwnPropertySymbols) {
2372
+ var n = Object.getOwnPropertySymbols(e);
2373
+ t && (n = n.filter(function(o) {
2374
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2375
+ })), r.push.apply(r, n);
2376
+ }
2377
+ return r;
2378
+ }
2379
+ function Me(e) {
2380
+ for (var t = 1; t < arguments.length; t++) {
2381
+ var r = arguments[t] != null ? arguments[t] : {};
2382
+ t % 2 ? Ar(Object(r), !0).forEach(function(n) {
2383
+ gi(e, n, r[n]);
2384
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ar(Object(r)).forEach(function(n) {
2385
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2386
+ });
2387
+ }
2388
+ return e;
2389
+ }
2390
+ function gi(e, t, r) {
2391
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2392
+ }
2393
+ const vi = Me(Me({}, me), {}, {
2394
+ // Skip "seconds".
2395
+ steps: me.steps.filter(function(e) {
2396
+ return e.formatAs !== "second";
2397
+ }).map(function(e) {
2398
+ return e.formatAs === "minute" ? Me(Me({}, e), {}, {
2399
+ minTime: X
2400
+ }) : e;
2401
+ })
2402
+ }), je = {
2403
+ steps: [{
2404
+ formatAs: "second"
2405
+ }, {
2406
+ formatAs: "minute"
2407
+ }, {
2408
+ formatAs: "hour"
2409
+ }, {
2410
+ formatAs: "day"
2411
+ }, {
2412
+ formatAs: "month"
2413
+ }, {
2414
+ formatAs: "year"
2415
+ }],
2416
+ labels: [
2417
+ // "mini" labels are only defined for a few languages.
2418
+ "mini",
2419
+ // "short-time" labels are only defined for a few languages.
2420
+ "short-time",
2421
+ // "narrow" and "short" labels are defined for all languages.
2422
+ // "narrow" labels can sometimes be weird (like "+5d."),
2423
+ // but "short" labels have the " ago" part, so "narrow" seem
2424
+ // more appropriate.
2425
+ // "short" labels would have been more appropriate if they
2426
+ // didn't have the " ago" part, hence the "short-time" above.
2427
+ "narrow",
2428
+ // Since "narrow" labels are always present, "short" element
2429
+ // of this array can be removed.
2430
+ "short"
2431
+ ]
2432
+ };
2433
+ function Pr(e, t) {
2434
+ var r = Object.keys(e);
2435
+ if (Object.getOwnPropertySymbols) {
2436
+ var n = Object.getOwnPropertySymbols(e);
2437
+ t && (n = n.filter(function(o) {
2438
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2439
+ })), r.push.apply(r, n);
2440
+ }
2441
+ return r;
2442
+ }
2443
+ function $r(e) {
2444
+ for (var t = 1; t < arguments.length; t++) {
2445
+ var r = arguments[t] != null ? arguments[t] : {};
2446
+ t % 2 ? Pr(Object(r), !0).forEach(function(n) {
2447
+ bi(e, n, r[n]);
2448
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Pr(Object(r)).forEach(function(n) {
2449
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2450
+ });
2451
+ }
2452
+ return e;
2453
+ }
2454
+ function bi(e, t, r) {
2455
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2456
+ }
2457
+ const wi = $r($r({}, je), {}, {
2458
+ // Add "now".
2459
+ steps: [{
2460
+ formatAs: "now"
2461
+ }].concat(je.steps)
2462
+ });
2463
+ function Er(e, t) {
2464
+ var r = Object.keys(e);
2465
+ if (Object.getOwnPropertySymbols) {
2466
+ var n = Object.getOwnPropertySymbols(e);
2467
+ t && (n = n.filter(function(o) {
2468
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2469
+ })), r.push.apply(r, n);
2470
+ }
2471
+ return r;
2472
+ }
2473
+ function Rr(e) {
2474
+ for (var t = 1; t < arguments.length; t++) {
2475
+ var r = arguments[t] != null ? arguments[t] : {};
2476
+ t % 2 ? Er(Object(r), !0).forEach(function(n) {
2477
+ Si(e, n, r[n]);
2478
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Er(Object(r)).forEach(function(n) {
2479
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2480
+ });
2481
+ }
2482
+ return e;
2483
+ }
2484
+ function Si(e, t, r) {
2485
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2486
+ }
2487
+ const Dt = Rr(Rr({}, je), {}, {
2488
+ // Skip "seconds".
2489
+ steps: je.steps.filter(function(e) {
2490
+ return e.formatAs !== "second";
2491
+ })
2492
+ });
2493
+ function Dr(e, t) {
2494
+ var r = Object.keys(e);
2495
+ if (Object.getOwnPropertySymbols) {
2496
+ var n = Object.getOwnPropertySymbols(e);
2497
+ t && (n = n.filter(function(o) {
2498
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
2499
+ })), r.push.apply(r, n);
2500
+ }
2501
+ return r;
2502
+ }
2503
+ function Cr(e) {
2504
+ for (var t = 1; t < arguments.length; t++) {
2505
+ var r = arguments[t] != null ? arguments[t] : {};
2506
+ t % 2 ? Dr(Object(r), !0).forEach(function(n) {
2507
+ Oi(e, n, r[n]);
2508
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Dr(Object(r)).forEach(function(n) {
2509
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
2510
+ });
2511
+ }
2512
+ return e;
2513
+ }
2514
+ function Oi(e, t, r) {
2515
+ return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
2516
+ }
2517
+ const Ti = Cr(Cr({}, Dt), {}, {
2518
+ // Add "now".
2519
+ steps: [{
2520
+ formatAs: "now"
2521
+ }].concat(Dt.steps)
2522
+ });
2523
+ function xi(e) {
2524
+ switch (e) {
2525
+ case "default":
2526
+ case "round":
2527
+ return Pt;
2528
+ case "round-minute":
2529
+ return $t;
2530
+ case "approximate":
2531
+ return vr;
2532
+ case "time":
2533
+ case "approximate-time":
2534
+ return ci;
2535
+ case "mini":
2536
+ return je;
2537
+ case "mini-now":
2538
+ return wi;
2539
+ case "mini-minute":
2540
+ return Dt;
2541
+ case "mini-minute-now":
2542
+ return Ti;
2543
+ case "twitter":
2544
+ return me;
2545
+ case "twitter-now":
2546
+ return mi;
2547
+ case "twitter-minute":
2548
+ return Rt;
2549
+ case "twitter-minute-now":
2550
+ return yi;
2551
+ case "twitter-first-minute":
2552
+ return vi;
2553
+ default:
2554
+ return vr;
2555
+ }
2556
+ }
2557
+ function Ke(e) {
2558
+ "@babel/helpers - typeof";
2559
+ return Ke = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
2560
+ return typeof t;
2561
+ } : function(t) {
2562
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2563
+ }, Ke(e);
2564
+ }
2565
+ function Ai(e, t) {
2566
+ var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2567
+ if (r)
2568
+ return (r = r.call(e)).next.bind(r);
2569
+ if (Array.isArray(e) || (r = In(e)) || t) {
2570
+ r && (e = r);
2571
+ var n = 0;
2572
+ return function() {
2573
+ return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
2574
+ };
2575
+ }
2576
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2577
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2578
+ }
2579
+ function Pi(e, t) {
2580
+ return Ri(e) || Ei(e, t) || In(e, t) || $i();
2581
+ }
2582
+ function $i() {
2583
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2584
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
2585
+ }
2586
+ function In(e, t) {
2587
+ if (e) {
2588
+ if (typeof e == "string")
2589
+ return Ir(e, t);
2590
+ var r = Object.prototype.toString.call(e).slice(8, -1);
2591
+ if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
2592
+ return Array.from(e);
2593
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
2594
+ return Ir(e, t);
2595
+ }
2596
+ }
2597
+ function Ir(e, t) {
2598
+ (t == null || t > e.length) && (t = e.length);
2599
+ for (var r = 0, n = new Array(t); r < t; r++)
2600
+ n[r] = e[r];
2601
+ return n;
2602
+ }
2603
+ function Ei(e, t) {
2604
+ var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2605
+ if (r != null) {
2606
+ var n = [], o = !0, a = !1, s, i;
2607
+ try {
2608
+ for (r = r.call(e); !(o = (s = r.next()).done) && (n.push(s.value), !(t && n.length === t)); o = !0)
2609
+ ;
2610
+ } catch (c) {
2611
+ a = !0, i = c;
2612
+ } finally {
2613
+ try {
2614
+ !o && r.return != null && r.return();
2615
+ } finally {
2616
+ if (a)
2617
+ throw i;
2618
+ }
2619
+ }
2620
+ return n;
2621
+ }
2622
+ }
2623
+ function Ri(e) {
2624
+ if (Array.isArray(e))
2625
+ return e;
2626
+ }
2627
+ function Di(e, t) {
2628
+ if (!(e instanceof t))
2629
+ throw new TypeError("Cannot call a class as a function");
2630
+ }
2631
+ function Ci(e, t) {
2632
+ for (var r = 0; r < t.length; r++) {
2633
+ var n = t[r];
2634
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
2635
+ }
2636
+ }
2637
+ function Ii(e, t, r) {
2638
+ return t && Ci(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
2639
+ }
2640
+ var L = /* @__PURE__ */ function() {
2641
+ function e() {
2642
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = r.polyfill;
2643
+ Di(this, e), typeof t == "string" && (t = [t]), this.locale = Va(t.concat(e.getDefaultLocale()), ge), typeof Intl < "u" && Intl.NumberFormat && (this.numberFormat = new Intl.NumberFormat(this.locale)), n === !1 ? (this.IntlRelativeTimeFormat = Intl.RelativeTimeFormat, this.IntlPluralRules = Intl.PluralRules) : (this.IntlRelativeTimeFormat = oe, this.IntlPluralRules = oe.PluralRules), this.relativeTimeFormatCache = new pr(), this.pluralRulesCache = new pr();
2644
+ }
2645
+ return Ii(e, [{
2646
+ key: "format",
2647
+ value: function(r, n, o) {
2648
+ o || (n && !_i(n) ? (o = n, n = void 0) : o = {}), n || (n = $t), typeof n == "string" && (n = xi(n));
2649
+ var a = ji(r), s = this.getLabels(n.flavour || n.labels), i = s.labels, c = s.labelsType, f;
2650
+ n.now !== void 0 && (f = n.now), f === void 0 && o.now !== void 0 && (f = o.now), f === void 0 && (f = Date.now());
2651
+ var l = (f - a) / 1e3, d = o.future || l < 0, p = Fi(i, ge(this.locale).now, ge(this.locale).long, d);
2652
+ if (n.custom) {
2653
+ var m = n.custom({
2654
+ now: f,
2655
+ date: new Date(a),
2656
+ time: a,
2657
+ elapsed: l,
2658
+ locale: this.locale
2659
+ });
2660
+ if (m !== void 0)
2661
+ return m;
2662
+ }
2663
+ var h = ki(
2664
+ // Controlling `style.steps` through `style.units` seems to be deprecated:
2665
+ // create a new custom `style` instead.
2666
+ n.units,
2667
+ i,
2668
+ p
2669
+ ), b = o.round || n.round, C = Ja(
2670
+ // "gradation" is a legacy name for "steps".
2671
+ // For historical reasons, "approximate" steps are used by default.
2672
+ // In the next major version, there'll be no default for `steps`.
2673
+ n.gradation || n.steps || $t.steps,
2674
+ l,
2675
+ {
2676
+ now: f,
2677
+ units: h,
2678
+ round: b,
2679
+ future: d,
2680
+ getNextStep: !0
2681
+ }
2682
+ ), w = Pi(C, 3), P = w[0], v = w[1], S = w[2], x = this.formatDateForStep(a, v, l, {
2683
+ labels: i,
2684
+ labelsType: c,
2685
+ nowLabel: p,
2686
+ now: f,
2687
+ future: d,
2688
+ round: b
2689
+ }) || "";
2690
+ if (o.getTimeToNextUpdate) {
2691
+ var A = oi(a, v, {
2692
+ nextStep: S,
2693
+ prevStep: P,
2694
+ now: f,
2695
+ future: d,
2696
+ round: b
2697
+ });
2698
+ return [x, A];
2699
+ }
2700
+ return x;
2701
+ }
2702
+ }, {
2703
+ key: "formatDateForStep",
2704
+ value: function(r, n, o, a) {
2705
+ var s = this, i = a.labels, c = a.labelsType, f = a.nowLabel, l = a.now, d = a.future, p = a.round;
2706
+ if (n) {
2707
+ if (n.format)
2708
+ return n.format(r, this.locale, {
2709
+ formatAs: function(w, P) {
2710
+ return s.formatValue(P, w, {
2711
+ labels: i,
2712
+ future: d
2713
+ });
2714
+ },
2715
+ now: l,
2716
+ future: d
2717
+ });
2718
+ var m = n.unit || n.formatAs;
2719
+ if (!m)
2720
+ throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(n)));
2721
+ if (m === "now")
2722
+ return f;
2723
+ var h = Math.abs(o) / xn(n);
2724
+ n.granularity && (h = Ie(p)(h / n.granularity) * n.granularity);
2725
+ var b = -1 * Math.sign(o) * Ie(p)(h);
2726
+ switch (b === 0 && (d ? b = 0 : b = -0), c) {
2727
+ case "long":
2728
+ case "short":
2729
+ case "narrow":
2730
+ return this.getFormatter(c).format(b, m);
2731
+ default:
2732
+ return this.formatValue(b, m, {
2733
+ labels: i,
2734
+ future: d
2735
+ });
2736
+ }
2737
+ }
2738
+ }
2739
+ /**
2740
+ * Mimicks what `Intl.RelativeTimeFormat` does for additional locale styles.
2741
+ * @param {number} value
2742
+ * @param {string} unit
2743
+ * @param {object} options.labels — Relative time labels.
2744
+ * @param {boolean} [options.future] — Tells how to format value `0`: as "future" (`true`) or "past" (`false`). Is `false` by default, but should have been `true` actually.
2745
+ * @return {string}
2746
+ */
2747
+ }, {
2748
+ key: "formatValue",
2749
+ value: function(r, n, o) {
2750
+ var a = o.labels, s = o.future;
2751
+ return this.getFormattingRule(a, n, r, {
2752
+ future: s
2753
+ }).replace("{0}", this.formatNumber(Math.abs(r)));
2754
+ }
2755
+ /**
2756
+ * Returns formatting rule for `value` in `units` (either in past or in future).
2757
+ * @param {object} formattingRules — Relative time labels for different units.
2758
+ * @param {string} unit - Time interval measurement unit.
2759
+ * @param {number} value - Time interval value.
2760
+ * @param {boolean} [options.future] — Tells how to format value `0`: as "future" (`true`) or "past" (`false`). Is `false` by default.
2761
+ * @return {string}
2762
+ * @example
2763
+ * // Returns "{0} days ago"
2764
+ * getFormattingRule(en.long, "day", -2, 'en')
2765
+ */
2766
+ }, {
2767
+ key: "getFormattingRule",
2768
+ value: function(r, n, o, a) {
2769
+ var s = a.future;
2770
+ if (this.locale, r = r[n], typeof r == "string")
2771
+ return r;
2772
+ var i = o === 0 ? s ? "future" : "past" : o < 0 ? "past" : "future", c = r[i] || r;
2773
+ if (typeof c == "string")
2774
+ return c;
2775
+ var f = this.getPluralRules().select(Math.abs(o));
2776
+ return c[f] || c.other;
2777
+ }
2778
+ /**
2779
+ * Formats a number into a string.
2780
+ * Uses `Intl.NumberFormat` when available.
2781
+ * @param {number} number
2782
+ * @return {string}
2783
+ */
2784
+ }, {
2785
+ key: "formatNumber",
2786
+ value: function(r) {
2787
+ return this.numberFormat ? this.numberFormat.format(r) : String(r);
2788
+ }
2789
+ /**
2790
+ * Returns an `Intl.RelativeTimeFormat` for a given `labelsType`.
2791
+ * @param {string} labelsType
2792
+ * @return {object} `Intl.RelativeTimeFormat` instance
2793
+ */
2794
+ }, {
2795
+ key: "getFormatter",
2796
+ value: function(r) {
2797
+ return this.relativeTimeFormatCache.get(this.locale, r) || this.relativeTimeFormatCache.put(this.locale, r, new this.IntlRelativeTimeFormat(this.locale, {
2798
+ style: r
2799
+ }));
2800
+ }
2801
+ /**
2802
+ * Returns an `Intl.PluralRules` instance.
2803
+ * @return {object} `Intl.PluralRules` instance
2804
+ */
2805
+ }, {
2806
+ key: "getPluralRules",
2807
+ value: function() {
2808
+ return this.pluralRulesCache.get(this.locale) || this.pluralRulesCache.put(this.locale, new this.IntlPluralRules(this.locale));
2809
+ }
2810
+ /**
2811
+ * Gets localized labels for this type of labels.
2812
+ *
2813
+ * @param {(string|string[])} labelsType - Relative date/time labels type.
2814
+ * If it's an array then all label types are tried
2815
+ * until a suitable one is found.
2816
+ *
2817
+ * @returns {Object} Returns an object of shape { labelsType, labels }
2818
+ */
2819
+ }, {
2820
+ key: "getLabels",
2821
+ value: function() {
2822
+ var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
2823
+ typeof r == "string" && (r = [r]), r = r.map(function(i) {
2824
+ switch (i) {
2825
+ case "tiny":
2826
+ case "mini-time":
2827
+ return "mini";
2828
+ default:
2829
+ return i;
2830
+ }
2831
+ }), r = r.concat("long");
2832
+ for (var n = ge(this.locale), o = Ai(r), a; !(a = o()).done; ) {
2833
+ var s = a.value;
2834
+ if (n[s])
2835
+ return {
2836
+ labelsType: s,
2837
+ labels: n[s]
2838
+ };
2839
+ }
2840
+ }
2841
+ }]), e;
2842
+ }(), jn = "en";
2843
+ L.getDefaultLocale = function() {
2844
+ return jn;
2845
+ };
2846
+ L.setDefaultLocale = function(e) {
2847
+ return jn = e;
2848
+ };
2849
+ L.addDefaultLocale = function(e) {
2850
+ if (jr)
2851
+ return console.error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");
2852
+ jr = !0, L.setDefaultLocale(e.locale), L.addLocale(e);
2853
+ };
2854
+ var jr;
2855
+ L.addLocale = function(e) {
2856
+ Rn(e), oe.addLocale(e);
2857
+ };
2858
+ L.locale = L.addLocale;
2859
+ L.addLabels = function(e, t, r) {
2860
+ var n = ge(e);
2861
+ n || (Rn({
2862
+ locale: e
2863
+ }), n = ge(e)), n[t] = r;
2864
+ };
2865
+ function ji(e) {
2866
+ if (e.constructor === Date || Ni(e))
2867
+ return e.getTime();
2868
+ if (typeof e == "number")
2869
+ return e;
2870
+ throw new Error("Unsupported relative time formatter input: ".concat(Ke(e), ", ").concat(e));
2871
+ }
2872
+ function Ni(e) {
2873
+ return Ke(e) === "object" && typeof e.getTime == "function";
2874
+ }
2875
+ function ki(e, t, r) {
2876
+ var n = Object.keys(t);
2877
+ return r && n.push("now"), e && (n = e.filter(function(o) {
2878
+ return o === "now" || n.indexOf(o) >= 0;
2879
+ })), n;
2880
+ }
2881
+ function Fi(e, t, r, n) {
2882
+ var o = e.now || t && t.now;
2883
+ if (o)
2884
+ return typeof o == "string" ? o : n ? o.future : o.past;
2885
+ if (r && r.second && r.second.current)
2886
+ return r.second.current;
2887
+ }
2888
+ function _i(e) {
2889
+ return typeof e == "string" || Wa(e);
2890
+ }
2891
+ const Nn = {
2892
+ locale: "en",
2893
+ long: {
2894
+ year: {
2895
+ previous: "last year",
2896
+ current: "this year",
2897
+ next: "next year",
2898
+ past: {
2899
+ one: "{0} year ago",
2900
+ other: "{0} years ago"
2901
+ },
2902
+ future: {
2903
+ one: "in {0} year",
2904
+ other: "in {0} years"
2905
+ }
2906
+ },
2907
+ quarter: {
2908
+ previous: "last quarter",
2909
+ current: "this quarter",
2910
+ next: "next quarter",
2911
+ past: {
2912
+ one: "{0} quarter ago",
2913
+ other: "{0} quarters ago"
2914
+ },
2915
+ future: {
2916
+ one: "in {0} quarter",
2917
+ other: "in {0} quarters"
2918
+ }
2919
+ },
2920
+ month: {
2921
+ previous: "last month",
2922
+ current: "this month",
2923
+ next: "next month",
2924
+ past: {
2925
+ one: "{0} month ago",
2926
+ other: "{0} months ago"
2927
+ },
2928
+ future: {
2929
+ one: "in {0} month",
2930
+ other: "in {0} months"
2931
+ }
2932
+ },
2933
+ week: {
2934
+ previous: "last week",
2935
+ current: "this week",
2936
+ next: "next week",
2937
+ past: {
2938
+ one: "{0} week ago",
2939
+ other: "{0} weeks ago"
2940
+ },
2941
+ future: {
2942
+ one: "in {0} week",
2943
+ other: "in {0} weeks"
2944
+ }
2945
+ },
2946
+ day: {
2947
+ previous: "yesterday",
2948
+ current: "today",
2949
+ next: "tomorrow",
2950
+ past: {
2951
+ one: "{0} day ago",
2952
+ other: "{0} days ago"
2953
+ },
2954
+ future: {
2955
+ one: "in {0} day",
2956
+ other: "in {0} days"
2957
+ }
2958
+ },
2959
+ hour: {
2960
+ current: "this hour",
2961
+ past: {
2962
+ one: "{0} hour ago",
2963
+ other: "{0} hours ago"
2964
+ },
2965
+ future: {
2966
+ one: "in {0} hour",
2967
+ other: "in {0} hours"
2968
+ }
2969
+ },
2970
+ minute: {
2971
+ current: "this minute",
2972
+ past: {
2973
+ one: "{0} minute ago",
2974
+ other: "{0} minutes ago"
2975
+ },
2976
+ future: {
2977
+ one: "in {0} minute",
2978
+ other: "in {0} minutes"
2979
+ }
2980
+ },
2981
+ second: {
2982
+ current: "now",
2983
+ past: {
2984
+ one: "{0} second ago",
2985
+ other: "{0} seconds ago"
2986
+ },
2987
+ future: {
2988
+ one: "in {0} second",
2989
+ other: "in {0} seconds"
2990
+ }
2991
+ }
2992
+ },
2993
+ short: {
2994
+ year: {
2995
+ previous: "last yr.",
2996
+ current: "this yr.",
2997
+ next: "next yr.",
2998
+ past: "{0} yr. ago",
2999
+ future: "in {0} yr."
3000
+ },
3001
+ quarter: {
3002
+ previous: "last qtr.",
3003
+ current: "this qtr.",
3004
+ next: "next qtr.",
3005
+ past: {
3006
+ one: "{0} qtr. ago",
3007
+ other: "{0} qtrs. ago"
3008
+ },
3009
+ future: {
3010
+ one: "in {0} qtr.",
3011
+ other: "in {0} qtrs."
3012
+ }
3013
+ },
3014
+ month: {
3015
+ previous: "last mo.",
3016
+ current: "this mo.",
3017
+ next: "next mo.",
3018
+ past: "{0} mo. ago",
3019
+ future: "in {0} mo."
3020
+ },
3021
+ week: {
3022
+ previous: "last wk.",
3023
+ current: "this wk.",
3024
+ next: "next wk.",
3025
+ past: "{0} wk. ago",
3026
+ future: "in {0} wk."
3027
+ },
3028
+ day: {
3029
+ previous: "yesterday",
3030
+ current: "today",
3031
+ next: "tomorrow",
3032
+ past: {
3033
+ one: "{0} day ago",
3034
+ other: "{0} days ago"
3035
+ },
3036
+ future: {
3037
+ one: "in {0} day",
3038
+ other: "in {0} days"
3039
+ }
3040
+ },
3041
+ hour: {
3042
+ current: "this hour",
3043
+ past: "{0} hr. ago",
3044
+ future: "in {0} hr."
3045
+ },
3046
+ minute: {
3047
+ current: "this minute",
3048
+ past: "{0} min. ago",
3049
+ future: "in {0} min."
3050
+ },
3051
+ second: {
3052
+ current: "now",
3053
+ past: "{0} sec. ago",
3054
+ future: "in {0} sec."
3055
+ }
3056
+ },
3057
+ narrow: {
3058
+ year: {
3059
+ previous: "last yr.",
3060
+ current: "this yr.",
3061
+ next: "next yr.",
3062
+ past: "{0}y ago",
3063
+ future: "in {0}y"
3064
+ },
3065
+ quarter: {
3066
+ previous: "last qtr.",
3067
+ current: "this qtr.",
3068
+ next: "next qtr.",
3069
+ past: "{0}q ago",
3070
+ future: "in {0}q"
3071
+ },
3072
+ month: {
3073
+ previous: "last mo.",
3074
+ current: "this mo.",
3075
+ next: "next mo.",
3076
+ past: "{0}mo ago",
3077
+ future: "in {0}mo"
3078
+ },
3079
+ week: {
3080
+ previous: "last wk.",
3081
+ current: "this wk.",
3082
+ next: "next wk.",
3083
+ past: "{0}w ago",
3084
+ future: "in {0}w"
3085
+ },
3086
+ day: {
3087
+ previous: "yesterday",
3088
+ current: "today",
3089
+ next: "tomorrow",
3090
+ past: "{0}d ago",
3091
+ future: "in {0}d"
3092
+ },
3093
+ hour: {
3094
+ current: "this hour",
3095
+ past: "{0}h ago",
3096
+ future: "in {0}h"
3097
+ },
3098
+ minute: {
3099
+ current: "this minute",
3100
+ past: "{0}m ago",
3101
+ future: "in {0}m"
3102
+ },
3103
+ second: {
3104
+ current: "now",
3105
+ past: "{0}s ago",
3106
+ future: "in {0}s"
3107
+ }
3108
+ },
3109
+ now: {
3110
+ now: {
3111
+ current: "now",
3112
+ future: "in a moment",
3113
+ past: "just now"
3114
+ }
3115
+ },
3116
+ mini: {
3117
+ year: "{0}yr",
3118
+ month: "{0}mo",
3119
+ week: "{0}wk",
3120
+ day: "{0}d",
3121
+ hour: "{0}h",
3122
+ minute: "{0}m",
3123
+ second: "{0}s",
3124
+ now: "now"
3125
+ },
3126
+ "short-time": {
3127
+ year: "{0} yr.",
3128
+ month: "{0} mo.",
3129
+ week: "{0} wk.",
3130
+ day: {
3131
+ one: "{0} day",
3132
+ other: "{0} days"
3133
+ },
3134
+ hour: "{0} hr.",
3135
+ minute: "{0} min.",
3136
+ second: "{0} sec."
3137
+ },
3138
+ "long-time": {
3139
+ year: {
3140
+ one: "{0} year",
3141
+ other: "{0} years"
3142
+ },
3143
+ month: {
3144
+ one: "{0} month",
3145
+ other: "{0} months"
3146
+ },
3147
+ week: {
3148
+ one: "{0} week",
3149
+ other: "{0} weeks"
3150
+ },
3151
+ day: {
3152
+ one: "{0} day",
3153
+ other: "{0} days"
3154
+ },
3155
+ hour: {
3156
+ one: "{0} hour",
3157
+ other: "{0} hours"
3158
+ },
3159
+ minute: {
3160
+ one: "{0} minute",
3161
+ other: "{0} minutes"
3162
+ },
3163
+ second: {
3164
+ one: "{0} second",
3165
+ other: "{0} seconds"
3166
+ }
3167
+ }
3168
+ };
3169
+ var kn = { exports: {} }, Li = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED", Mi = Li, zi = Mi;
3170
+ function Fn() {
3171
+ }
3172
+ function _n() {
3173
+ }
3174
+ _n.resetWarningCache = Fn;
3175
+ var Ui = function() {
3176
+ function e(n, o, a, s, i, c) {
3177
+ if (c !== zi) {
3178
+ var f = new Error(
3179
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
3180
+ );
3181
+ throw f.name = "Invariant Violation", f;
3182
+ }
3183
+ }
3184
+ e.isRequired = e;
3185
+ function t() {
3186
+ return e;
3187
+ }
3188
+ var r = {
3189
+ array: e,
3190
+ bigint: e,
3191
+ bool: e,
3192
+ func: e,
3193
+ number: e,
3194
+ object: e,
3195
+ string: e,
3196
+ symbol: e,
3197
+ any: e,
3198
+ arrayOf: t,
3199
+ element: e,
3200
+ elementType: e,
3201
+ instanceOf: t,
3202
+ node: e,
3203
+ objectOf: t,
3204
+ oneOf: t,
3205
+ oneOfType: t,
3206
+ shape: t,
3207
+ exact: t,
3208
+ checkPropTypes: _n,
3209
+ resetWarningCache: Fn
3210
+ };
3211
+ return r.PropTypes = r, r;
3212
+ };
3213
+ kn.exports = Ui();
3214
+ var qi = kn.exports;
3215
+ const g = /* @__PURE__ */ Hr(qi);
3216
+ var Bi = ["date", "verboseDate", "tooltip", "children"];
3217
+ function Ct() {
3218
+ return Ct = Object.assign || function(e) {
3219
+ for (var t = 1; t < arguments.length; t++) {
3220
+ var r = arguments[t];
3221
+ for (var n in r)
3222
+ Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
3223
+ }
3224
+ return e;
3225
+ }, Ct.apply(this, arguments);
3226
+ }
3227
+ function Vi(e, t) {
3228
+ if (e == null)
3229
+ return {};
3230
+ var r = Gi(e, t), n, o;
3231
+ if (Object.getOwnPropertySymbols) {
3232
+ var a = Object.getOwnPropertySymbols(e);
3233
+ for (o = 0; o < a.length; o++)
3234
+ n = a[o], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
3235
+ }
3236
+ return r;
3237
+ }
3238
+ function Gi(e, t) {
3239
+ if (e == null)
3240
+ return {};
3241
+ var r = {}, n = Object.keys(e), o, a;
3242
+ for (a = 0; a < n.length; a++)
3243
+ o = n[a], !(t.indexOf(o) >= 0) && (r[o] = e[o]);
3244
+ return r;
3245
+ }
3246
+ function Xe(e, t) {
3247
+ var r = e.date, n = e.verboseDate, o = e.tooltip, a = e.children, s = Vi(e, Bi), i = ce(function() {
3248
+ return r.toISOString();
3249
+ }, [r]);
3250
+ return /* @__PURE__ */ B.createElement("time", Ct({
3251
+ ref: t
3252
+ }, s, {
3253
+ dateTime: i,
3254
+ title: o ? n : void 0
3255
+ }), a);
3256
+ }
3257
+ Xe = /* @__PURE__ */ B.forwardRef(Xe);
3258
+ Xe.propTypes = {
3259
+ date: g.instanceOf(Date).isRequired,
3260
+ verboseDate: g.string,
3261
+ tooltip: g.bool.isRequired,
3262
+ children: g.string.isRequired
3263
+ };
3264
+ var Nr = Number.isNaN || function(t) {
3265
+ return typeof t == "number" && t !== t;
3266
+ };
3267
+ function Wi(e, t) {
3268
+ return !!(e === t || Nr(e) && Nr(t));
3269
+ }
3270
+ function Hi(e, t) {
3271
+ if (e.length !== t.length)
3272
+ return !1;
3273
+ for (var r = 0; r < e.length; r++)
3274
+ if (!Wi(e[r], t[r]))
3275
+ return !1;
3276
+ return !0;
3277
+ }
3278
+ function Yi(e, t) {
3279
+ t === void 0 && (t = Hi);
3280
+ var r = null;
3281
+ function n() {
3282
+ for (var o = [], a = 0; a < arguments.length; a++)
3283
+ o[a] = arguments[a];
3284
+ if (r && r.lastThis === this && t(o, r.lastArgs))
3285
+ return r.lastResult;
3286
+ var s = e.apply(this, o);
3287
+ return r = {
3288
+ lastResult: s,
3289
+ lastArgs: o,
3290
+ lastThis: this
3291
+ }, s;
3292
+ }
3293
+ return n.clear = function() {
3294
+ r = null;
3295
+ }, n;
3296
+ }
3297
+ function It(e) {
3298
+ "@babel/helpers - typeof";
3299
+ return It = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
3300
+ return typeof t;
3301
+ } : function(t) {
3302
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
3303
+ }, It(e);
3304
+ }
3305
+ function Ki(e) {
3306
+ if (Ln())
3307
+ return Intl.DateTimeFormat.supportedLocalesOf(e)[0];
3308
+ }
3309
+ function Ln() {
3310
+ var e = (typeof Intl > "u" ? "undefined" : It(Intl)) === "object";
3311
+ return e && typeof Intl.DateTimeFormat == "function";
3312
+ }
3313
+ function Je(e) {
3314
+ "@babel/helpers - typeof";
3315
+ return Je = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
3316
+ return typeof t;
3317
+ } : function(t) {
3318
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
3319
+ }, Je(e);
3320
+ }
3321
+ function Xi(e, t) {
3322
+ if (!(e instanceof t))
3323
+ throw new TypeError("Cannot call a class as a function");
3324
+ }
3325
+ function Ji(e, t) {
3326
+ for (var r = 0; r < t.length; r++) {
3327
+ var n = t[r];
3328
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
3329
+ }
3330
+ }
3331
+ function Zi(e, t, r) {
3332
+ return t && Ji(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
3333
+ }
3334
+ var Mn = /* @__PURE__ */ function() {
3335
+ function e() {
3336
+ Xi(this, e), this.cache = {};
3337
+ }
3338
+ return Zi(e, [{
3339
+ key: "get",
3340
+ value: function() {
3341
+ for (var r = this.cache, n = arguments.length, o = new Array(n), a = 0; a < n; a++)
3342
+ o[a] = arguments[a];
3343
+ for (var s = 0, i = o; s < i.length; s++) {
3344
+ var c = i[s];
3345
+ if (Je(r) !== "object")
3346
+ return;
3347
+ r = r[c];
3348
+ }
3349
+ return r;
3350
+ }
3351
+ }, {
3352
+ key: "put",
3353
+ value: function() {
3354
+ for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++)
3355
+ n[o] = arguments[o];
3356
+ for (var a = n.pop(), s = n.pop(), i = this.cache, c = 0, f = n; c < f.length; c++) {
3357
+ var l = f[c];
3358
+ Je(i[l]) !== "object" && (i[l] = {}), i = i[l];
3359
+ }
3360
+ return i[s] = a;
3361
+ }
3362
+ }]), e;
3363
+ }(), kr = new Mn(), Qi = Ln(), es = function(t) {
3364
+ return t.toString();
3365
+ };
3366
+ function ts(e, t) {
3367
+ if (!Qi)
3368
+ return es;
3369
+ var r = ns(e), n = JSON.stringify(t), o = kr.get(String(r), n) || kr.put(String(r), n, new Intl.DateTimeFormat(r, t));
3370
+ return function(a) {
3371
+ return o.format(a);
3372
+ };
3373
+ }
3374
+ const rs = Yi(ts);
3375
+ var ct = {};
3376
+ function ns(e) {
3377
+ var t = e.toString();
3378
+ return ct[t] ? ct[t] : ct[t] = Ki(e);
3379
+ }
3380
+ function jt(e) {
3381
+ "@babel/helpers - typeof";
3382
+ return jt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
3383
+ return typeof t;
3384
+ } : function(t) {
3385
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
3386
+ }, jt(e);
3387
+ }
3388
+ function os(e) {
3389
+ return as(e) ? e : new Date(e);
3390
+ }
3391
+ function as(e) {
3392
+ return e instanceof Date || is(e);
3393
+ }
3394
+ function is(e) {
3395
+ return jt(e) === "object" && typeof e.getTime == "function";
3396
+ }
3397
+ var Fr = new Mn();
3398
+ function ss(e, t) {
3399
+ var r = t.polyfill, n = String(e) + ":" + String(r);
3400
+ return Fr.get(n) || Fr.put(n, new L(e, {
3401
+ polyfill: r
3402
+ }));
3403
+ }
3404
+ var rt = { exports: {} }, Ee = { exports: {} };
3405
+ (function() {
3406
+ var e, t, r, n, o, a;
3407
+ typeof performance < "u" && performance !== null && performance.now ? Ee.exports = function() {
3408
+ return performance.now();
3409
+ } : typeof process < "u" && process !== null && process.hrtime ? (Ee.exports = function() {
3410
+ return (e() - o) / 1e6;
3411
+ }, t = process.hrtime, e = function() {
3412
+ var s;
3413
+ return s = t(), s[0] * 1e9 + s[1];
3414
+ }, n = e(), a = process.uptime() * 1e9, o = n - a) : Date.now ? (Ee.exports = function() {
3415
+ return Date.now() - r;
3416
+ }, r = Date.now()) : (Ee.exports = function() {
3417
+ return (/* @__PURE__ */ new Date()).getTime() - r;
3418
+ }, r = (/* @__PURE__ */ new Date()).getTime());
3419
+ }).call(Yr);
3420
+ var us = Ee.exports, cs = us, J = typeof window > "u" ? Yr : window, ze = ["moz", "webkit"], we = "AnimationFrame", xe = J["request" + we], Ne = J["cancel" + we] || J["cancelRequest" + we];
3421
+ for (var $e = 0; !xe && $e < ze.length; $e++)
3422
+ xe = J[ze[$e] + "Request" + we], Ne = J[ze[$e] + "Cancel" + we] || J[ze[$e] + "CancelRequest" + we];
3423
+ if (!xe || !Ne) {
3424
+ var ft = 0, _r = 0, ue = [], fs = 1e3 / 60;
3425
+ xe = function(e) {
3426
+ if (ue.length === 0) {
3427
+ var t = cs(), r = Math.max(0, fs - (t - ft));
3428
+ ft = r + t, setTimeout(function() {
3429
+ var n = ue.slice(0);
3430
+ ue.length = 0;
3431
+ for (var o = 0; o < n.length; o++)
3432
+ if (!n[o].cancelled)
3433
+ try {
3434
+ n[o].callback(ft);
3435
+ } catch (a) {
3436
+ setTimeout(function() {
3437
+ throw a;
3438
+ }, 0);
3439
+ }
3440
+ }, Math.round(r));
3441
+ }
3442
+ return ue.push({
3443
+ handle: ++_r,
3444
+ callback: e,
3445
+ cancelled: !1
3446
+ }), _r;
3447
+ }, Ne = function(e) {
3448
+ for (var t = 0; t < ue.length; t++)
3449
+ ue[t].handle === e && (ue[t].cancelled = !0);
3450
+ };
3451
+ }
3452
+ rt.exports = function(e) {
3453
+ return xe.call(J, e);
3454
+ };
3455
+ rt.exports.cancel = function() {
3456
+ Ne.apply(J, arguments);
3457
+ };
3458
+ rt.exports.polyfill = function(e) {
3459
+ e || (e = J), e.requestAnimationFrame = xe, e.cancelAnimationFrame = Ne;
3460
+ };
3461
+ var ls = rt.exports;
3462
+ const Lr = /* @__PURE__ */ Hr(ls);
3463
+ function ps(e, t) {
3464
+ if (e.length === 0)
3465
+ return 0;
3466
+ for (var r = 0, n = e.length - 1, o; r <= n; ) {
3467
+ o = Math.floor((n + r) / 2);
3468
+ var a = t(e[o]);
3469
+ if (a === 0)
3470
+ return o;
3471
+ if (a < 0) {
3472
+ if (r = o + 1, r > n)
3473
+ return r;
3474
+ } else if (n = o - 1, n < r)
3475
+ return r;
3476
+ }
3477
+ }
3478
+ function ms(e, t) {
3479
+ return gs(e) || ys(e, t) || hs(e, t) || ds();
3480
+ }
3481
+ function ds() {
3482
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3483
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3484
+ }
3485
+ function hs(e, t) {
3486
+ if (e) {
3487
+ if (typeof e == "string")
3488
+ return Mr(e, t);
3489
+ var r = Object.prototype.toString.call(e).slice(8, -1);
3490
+ if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
3491
+ return Array.from(e);
3492
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
3493
+ return Mr(e, t);
3494
+ }
3495
+ }
3496
+ function Mr(e, t) {
3497
+ (t == null || t > e.length) && (t = e.length);
3498
+ for (var r = 0, n = new Array(t); r < t; r++)
3499
+ n[r] = e[r];
3500
+ return n;
3501
+ }
3502
+ function ys(e, t) {
3503
+ var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
3504
+ if (r != null) {
3505
+ var n = [], o = !0, a = !1, s, i;
3506
+ try {
3507
+ for (r = r.call(e); !(o = (s = r.next()).done) && (n.push(s.value), !(t && n.length === t)); o = !0)
3508
+ ;
3509
+ } catch (c) {
3510
+ a = !0, i = c;
3511
+ } finally {
3512
+ try {
3513
+ !o && r.return != null && r.return();
3514
+ } finally {
3515
+ if (a)
3516
+ throw i;
3517
+ }
3518
+ }
3519
+ return n;
3520
+ }
3521
+ }
3522
+ function gs(e) {
3523
+ if (Array.isArray(e))
3524
+ return e;
3525
+ }
3526
+ const vs = {
3527
+ instances: [],
3528
+ add: function(t) {
3529
+ var r = this, n = this.instances.length === 0;
3530
+ return zn(this.instances, t), n && this.start(), {
3531
+ stop: function() {
3532
+ Un(r.instances, t), r.instances.length === 0 && r.stop();
3533
+ },
3534
+ forceUpdate: function() {
3535
+ zr(t, r.instances);
3536
+ }
3537
+ };
3538
+ },
3539
+ tick: function() {
3540
+ for (var t = Date.now(); ; ) {
3541
+ var r = this.instances[0];
3542
+ if (t >= r.nextUpdateTime)
3543
+ zr(r, this.instances);
3544
+ else
3545
+ break;
3546
+ }
3547
+ },
3548
+ scheduleNextTick: function() {
3549
+ var t = this;
3550
+ this.scheduledTick = Lr(function() {
3551
+ t.tick(), t.scheduleNextTick();
3552
+ });
3553
+ },
3554
+ start: function() {
3555
+ this.scheduleNextTick();
3556
+ },
3557
+ stop: function() {
3558
+ Lr.cancel(this.scheduledTick);
3559
+ }
3560
+ };
3561
+ function bs(e) {
3562
+ var t = e.getNextValue(), r = ms(t, 2), n = r[0], o = r[1];
3563
+ e.setValue(n), e.nextUpdateTime = o;
3564
+ }
3565
+ function zr(e, t) {
3566
+ bs(e), Un(t, e), zn(t, e);
3567
+ }
3568
+ function zn(e, t) {
3569
+ var r = ws(e, t);
3570
+ e.splice(r, 0, t);
3571
+ }
3572
+ function Un(e, t) {
3573
+ var r = e.indexOf(t);
3574
+ e.splice(r, 1);
3575
+ }
3576
+ function ws(e, t) {
3577
+ var r = t.nextUpdateTime;
3578
+ return ps(e, function(n) {
3579
+ return n.nextUpdateTime === r ? 0 : n.nextUpdateTime > r ? 1 : -1;
3580
+ });
3581
+ }
3582
+ function Ue(e, t) {
3583
+ return xs(e) || Ts(e, t) || Os(e, t) || Ss();
3584
+ }
3585
+ function Ss() {
3586
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3587
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3588
+ }
3589
+ function Os(e, t) {
3590
+ if (e) {
3591
+ if (typeof e == "string")
3592
+ return Ur(e, t);
3593
+ var r = Object.prototype.toString.call(e).slice(8, -1);
3594
+ if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set")
3595
+ return Array.from(e);
3596
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))
3597
+ return Ur(e, t);
3598
+ }
3599
+ }
3600
+ function Ur(e, t) {
3601
+ (t == null || t > e.length) && (t = e.length);
3602
+ for (var r = 0, n = new Array(t); r < t; r++)
3603
+ n[r] = e[r];
3604
+ return n;
3605
+ }
3606
+ function Ts(e, t) {
3607
+ var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
3608
+ if (r != null) {
3609
+ var n = [], o = !0, a = !1, s, i;
3610
+ try {
3611
+ for (r = r.call(e); !(o = (s = r.next()).done) && (n.push(s.value), !(t && n.length === t)); o = !0)
3612
+ ;
3613
+ } catch (c) {
3614
+ a = !0, i = c;
3615
+ } finally {
3616
+ try {
3617
+ !o && r.return != null && r.return();
3618
+ } finally {
3619
+ if (a)
3620
+ throw i;
3621
+ }
3622
+ }
3623
+ return n;
3624
+ }
3625
+ }
3626
+ function xs(e) {
3627
+ if (Array.isArray(e))
3628
+ return e;
3629
+ }
3630
+ function As(e) {
3631
+ var t = e.date, r = e.future, n = e.locale, o = e.locales, a = e.timeStyle, s = e.round, i = e.minTimeLeft, c = e.formatVerboseDate, f = e.verboseDateFormat, l = f === void 0 ? Es : f, d = e.updateInterval, p = e.tick, m = p === void 0 ? !0 : p, h = e.now, b = e.timeOffset, C = b === void 0 ? 0 : b, w = e.polyfill, P = ce(function() {
3632
+ return n && (o = [n]), o.concat(L.getDefaultLocale());
3633
+ }, [n, o]), v = ce(function() {
3634
+ return ss(P, {
3635
+ polyfill: w
3636
+ });
3637
+ }, [P, w]);
3638
+ t = ce(function() {
3639
+ return os(t);
3640
+ }, [t]);
3641
+ var S = Vn(function() {
3642
+ var R = (h || Date.now()) - C, U;
3643
+ if (r && R >= t.getTime() && (R = t.getTime(), U = !0), i !== void 0) {
3644
+ var k = t.getTime() - i * 1e3;
3645
+ R > k && (R = k, U = !0);
3646
+ }
3647
+ var ee = v.format(t, a, {
3648
+ getTimeToNextUpdate: !0,
3649
+ now: R,
3650
+ future: r,
3651
+ round: s
3652
+ }), W = Ue(ee, 2), M = W[0], H = W[1];
3653
+ return U ? H = $s : H = d || H || 60 * 1e3, [M, R + H];
3654
+ }, [t, r, a, d, s, i, v, h]), x = lt();
3655
+ x.current = S;
3656
+ var A = ce(S, []), I = Ue(A, 2), N = I[0], V = I[1], G = Gn(N), Z = Ue(G, 2), z = Z[0], j = Z[1], Q = lt();
3657
+ Ut(function() {
3658
+ if (m)
3659
+ return Q.current = vs.add({
3660
+ getNextValue: function() {
3661
+ return x.current();
3662
+ },
3663
+ setValue: j,
3664
+ nextUpdateTime: V
3665
+ }), function() {
3666
+ return Q.current.stop();
3667
+ };
3668
+ }, [m]), Ut(function() {
3669
+ if (Q.current)
3670
+ Q.current.forceUpdate();
3671
+ else {
3672
+ var R = S(), U = Ue(R, 1), k = U[0];
3673
+ j(k);
3674
+ }
3675
+ }, [S]);
3676
+ var ae = ce(function() {
3677
+ return rs(P, l);
3678
+ }, [P, l]), Ae = ce(function() {
3679
+ return c ? c(t) : ae(t);
3680
+ }, [t, c, ae]);
3681
+ return {
3682
+ date: t,
3683
+ formattedDate: z,
3684
+ verboseDate: Ae
3685
+ };
3686
+ }
3687
+ var Ps = 365 * 24 * 60 * 60 * 1e3, $s = 1e3 * Ps, Es = {
3688
+ weekday: "long",
3689
+ day: "numeric",
3690
+ month: "long",
3691
+ year: "numeric",
3692
+ hour: "numeric",
3693
+ minute: "2-digit",
3694
+ second: "2-digit"
3695
+ // timeZoneName: 'short'
3696
+ }, Nt = g.oneOfType, qr = g.arrayOf, ve = g.string, Br = g.number, Re = g.shape, qe = g.func, Rs = Nt([Re({
3697
+ minTime: Br,
3698
+ formatAs: ve.isRequired
3699
+ }), Re({
3700
+ test: qe,
3701
+ formatAs: ve.isRequired
3702
+ }), Re({
3703
+ minTime: Br,
3704
+ format: qe.isRequired
3705
+ }), Re({
3706
+ test: qe,
3707
+ format: qe.isRequired
3708
+ })]), Ds = Nt([
3709
+ // Not using `oneOf()` here, because that way
3710
+ // this package wouldn't support some hypothetical
3711
+ // new styles added to `javascript-time-ago` in some future.
3712
+ ve,
3713
+ Re({
3714
+ steps: qr(Rs).isRequired,
3715
+ labels: Nt([ve, qr(ve)]).isRequired,
3716
+ round: ve
3717
+ })
3718
+ ]), Cs = ["date", "future", "timeStyle", "round", "minTimeLeft", "locale", "locales", "formatVerboseDate", "verboseDateFormat", "updateInterval", "tick", "now", "timeOffset", "polyfill", "tooltip", "component", "container", "wrapperComponent", "wrapperProps"];
3719
+ function Ze() {
3720
+ return Ze = Object.assign || function(e) {
3721
+ for (var t = 1; t < arguments.length; t++) {
3722
+ var r = arguments[t];
3723
+ for (var n in r)
3724
+ Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
3725
+ }
3726
+ return e;
3727
+ }, Ze.apply(this, arguments);
3728
+ }
3729
+ function Is(e, t) {
3730
+ if (e == null)
3731
+ return {};
3732
+ var r = js(e, t), n, o;
3733
+ if (Object.getOwnPropertySymbols) {
3734
+ var a = Object.getOwnPropertySymbols(e);
3735
+ for (o = 0; o < a.length; o++)
3736
+ n = a[o], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
3737
+ }
3738
+ return r;
3739
+ }
3740
+ function js(e, t) {
3741
+ if (e == null)
3742
+ return {};
3743
+ var r = {}, n = Object.keys(e), o, a;
3744
+ for (a = 0; a < n.length; a++)
3745
+ o = n[a], !(t.indexOf(o) >= 0) && (r[o] = e[o]);
3746
+ return r;
3747
+ }
3748
+ function Qe(e) {
3749
+ var t = e.date, r = e.future, n = e.timeStyle, o = e.round, a = e.minTimeLeft, s = e.locale, i = e.locales, c = i === void 0 ? [] : i, f = e.formatVerboseDate, l = e.verboseDateFormat, d = e.updateInterval, p = e.tick, m = e.now, h = e.timeOffset, b = e.polyfill, C = e.tooltip, w = C === void 0 ? !0 : C, P = e.component, v = P === void 0 ? Xe : P, S = e.container, x = e.wrapperComponent, A = e.wrapperProps, I = Is(e, Cs), N = As({
3750
+ date: t,
3751
+ future: r,
3752
+ timeStyle: n,
3753
+ round: o,
3754
+ minTimeLeft: a,
3755
+ locale: s,
3756
+ locales: c,
3757
+ formatVerboseDate: f,
3758
+ verboseDateFormat: l,
3759
+ updateInterval: d,
3760
+ tick: p,
3761
+ now: m,
3762
+ timeOffset: h,
3763
+ polyfill: b
3764
+ }), V = N.date, G = N.verboseDate, Z = N.formattedDate, z = /* @__PURE__ */ B.createElement(v, Ze({
3765
+ date: V,
3766
+ verboseDate: G,
3767
+ tooltip: w
3768
+ }, I), Z), j = x || S;
3769
+ return j ? /* @__PURE__ */ B.createElement(j, Ze({}, A, {
3770
+ verboseDate: G
3771
+ }), z) : z;
3772
+ }
3773
+ Qe.propTypes = {
3774
+ // `date: Date` or `timestamp: number`.
3775
+ // E.g. `new Date()` or `1355972400000`.
3776
+ date: g.oneOfType([g.instanceOf(Date), g.number]).isRequired,
3777
+ // Preferred locale.
3778
+ // Is 'en' by default.
3779
+ // E.g. 'ru-RU'.
3780
+ locale: g.string,
3781
+ // Alternatively to `locale`, one could pass `locales`:
3782
+ // A list of preferred locales (ordered).
3783
+ // Will choose the first supported locale from the list.
3784
+ // E.g. `['ru-RU', 'en-GB']`.
3785
+ locales: g.arrayOf(g.string),
3786
+ // If set to `true`, then will stop at "zero point"
3787
+ // when going from future dates to past dates.
3788
+ // In other words, even if the `date` has passed,
3789
+ // it will still render as if `date` is `now`.
3790
+ future: g.bool,
3791
+ // Date/time formatting style.
3792
+ // See `javascript-time-ago` docs on "Styles" for more info.
3793
+ // E.g. 'round', 'round-minute', 'twitter', 'twitter-first-minute'.
3794
+ timeStyle: Ds,
3795
+ // `round` parameter of `javascript-time-ago`.
3796
+ // See `javascript-time-ago` docs on "Rounding" for more info.
3797
+ // Examples: "round", "floor".
3798
+ round: g.string,
3799
+ // If specified, the time won't "tick" past this threshold (in seconds).
3800
+ // For example, if `minTimeLeft` is `60 * 60`
3801
+ // then the time won't "tick" past "in 1 hour".
3802
+ minTimeLeft: g.number,
3803
+ // A React component to render the relative time label.
3804
+ // Receives properties:
3805
+ // * date: Date — The date.
3806
+ // * verboseDate: string — Formatted verbose date.
3807
+ // * tooltip: boolean — The `tooltip` property of `<ReactTimeAgo/>` component.
3808
+ // * children: string — The relative time label.
3809
+ // * All "unknown" properties that have been passed to `<ReactTimeAgo/>` are passed through to this component.
3810
+ component: g.elementType,
3811
+ // Whether to use HTML `tooltip` attribute to show a verbose date tooltip.
3812
+ // Is `true` by default.
3813
+ // Can be set to `false` to disable the native HTML `tooltip`.
3814
+ tooltip: g.bool,
3815
+ // Verbose date formatter.
3816
+ // By default it's `(date) => new Intl.DateTimeFormat(locale, {…}).format(date)`.
3817
+ formatVerboseDate: g.func,
3818
+ // `Intl.DateTimeFormat` format for formatting verbose date.
3819
+ // See `Intl.DateTimeFormat` docs for more info.
3820
+ verboseDateFormat: g.object,
3821
+ // (deprecated)
3822
+ // How often the component refreshes itself.
3823
+ // When not provided, will use `getNextTimeToUpdate()` feature
3824
+ // of `javascript-time-ago` styles to determine the update interval.
3825
+ updateInterval: g.oneOfType([g.number, g.arrayOf(g.shape({
3826
+ threshold: g.number,
3827
+ interval: g.number.isRequired
3828
+ }))]),
3829
+ // (deprecated).
3830
+ // Set to `false` to disable automatic refresh of the component.
3831
+ // Is `true` by default.
3832
+ // I guess no one actually turns auto-update off, so this parameter is deprecated.
3833
+ tick: g.bool,
3834
+ // Allows setting a custom baseline for relative time measurement.
3835
+ // https://gitlab.com/catamphetamine/react-time-ago/-/issues/4
3836
+ now: g.number,
3837
+ // Allows offsetting the `date` by an arbitrary amount of milliseconds.
3838
+ // https://gitlab.com/catamphetamine/react-time-ago/-/issues/4
3839
+ timeOffset: g.number,
3840
+ // Pass `false` to use native `Intl.RelativeTimeFormat` / `Intl.PluralRules`
3841
+ // instead of the polyfilled ones in `javascript-time-ago`.
3842
+ polyfill: g.bool,
3843
+ // (advanced)
3844
+ // A React Component to wrap the resulting `<time/>` React Element.
3845
+ // Receives `verboseDate` and `children` properties.
3846
+ // Also receives `wrapperProps`, if they're passed.
3847
+ // `verboseDate` can be used for displaying verbose date label
3848
+ // in an "on mouse over" (or "on touch") tooltip.
3849
+ // See the "Tooltip" readme section for more info.
3850
+ // Another example could be having `wrapperComponent`
3851
+ // being rerendered every time the component refreshes itself.
3852
+ wrapperComponent: g.elementType,
3853
+ // Custom `props` passed to `wrapperComponent`.
3854
+ wrapperProps: g.object
3855
+ };
3856
+ Qe = /* @__PURE__ */ B.memo(Qe);
3857
+ L.addDefaultLocale(Nn);
3858
+ L.addLocale(Nn);
3859
+ var Ns = /* @__PURE__ */ ((e) => (e.square = "square", e.circle = "circle", e))(Ns || {});
3860
+ const ks = bn.div`
3861
+ cursor: ${(e) => e.$redirect ? "pointer" : "default"};
3862
+
3863
+ &:hover {
3864
+ background: #eee !important;
3865
+ }
3866
+
3867
+ & .notification-archive-button {
3868
+ visibility: hidden;
3869
+ transition: visibility 0s;
3870
+ }
3871
+
3872
+ &:hover .notification-archive-button {
3873
+ visibility: ${(e) => e.$archived ? "hidden" : "visible"};
3874
+ }
3875
+ `, Bs = (e) => /* @__PURE__ */ nt(
3876
+ ks,
3877
+ {
3878
+ $redirect: !!e.notification.redirectURL,
3879
+ $seen: e.notification.seen || e.notification.opened,
3880
+ $archived: e.notification.archived,
3881
+ onClick: () => {
3882
+ e.markAsClicked(e.notification.id), e.notification.redirectURL && (window.location.href = e.notification.redirectURL);
3883
+ },
3884
+ style: {
3885
+ padding: "16px 6px 16px 0",
3886
+ background: "#fff",
3887
+ position: "relative",
3888
+ display: "flex",
3889
+ alignItems: "center",
3890
+ width: "100%"
3891
+ },
3892
+ children: [
3893
+ /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(
3894
+ en,
3895
+ {
3896
+ src: e.notification.imageURL,
3897
+ size: "large",
3898
+ style: {
3899
+ marginRight: 8,
3900
+ marginLeft: 12
3901
+ },
3902
+ shape: e.imageShape
3903
+ }
3904
+ ) }),
3905
+ /* @__PURE__ */ nt(
3906
+ "div",
3907
+ {
3908
+ style: {
3909
+ flexGrow: 1
3910
+ },
3911
+ children: [
3912
+ /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(Vt.Text, { children: e.notification.title }) }),
3913
+ /* @__PURE__ */ Y("div", { children: /* @__PURE__ */ Y(Vt.Text, { type: "secondary", style: { fontSize: 12 }, children: /* @__PURE__ */ Y(
3914
+ Qe,
3915
+ {
3916
+ date: new Date(e.notification.date).getTime(),
3917
+ locale: "en-US"
3918
+ }
3919
+ ) }) })
3920
+ ]
3921
+ }
3922
+ ),
3923
+ /* @__PURE__ */ nt(
3924
+ "div",
3925
+ {
3926
+ style: {
3927
+ position: "relative",
3928
+ width: 48,
3929
+ height: 32,
3930
+ display: "flex",
3931
+ alignItems: "center"
3932
+ },
3933
+ children: [
3934
+ /* @__PURE__ */ Y(
3935
+ ho,
3936
+ {
3937
+ className: "notification-archive-button",
3938
+ icon: /* @__PURE__ */ Y(po, {}),
3939
+ size: "small",
3940
+ type: "text",
3941
+ shape: "circle",
3942
+ onClick: (t) => (e.markAsArchived([e.notification.id]), t.preventDefault(), t.stopPropagation(), !1)
3943
+ }
3944
+ ),
3945
+ /* @__PURE__ */ Y(
3946
+ yo,
3947
+ {
3948
+ dot: !0,
3949
+ className: "notification-highlight",
3950
+ style: {
3951
+ visibility: e.notification.archived ? "hidden" : "visible",
3952
+ marginRight: 10,
3953
+ marginLeft: 8,
3954
+ marginTop: 6,
3955
+ right: 0
3956
+ }
3957
+ }
3958
+ )
3959
+ ]
3960
+ }
3961
+ )
3962
+ ]
3963
+ }
3964
+ );
3965
+ export {
3966
+ Ns as I,
3967
+ Bs as N,
3968
+ xo as a,
3969
+ Jr as r,
3970
+ Oo as u
3971
+ };