@everymatrix/player-account-controller 1.76.10 → 1.76.11

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.
@@ -1,3555 +0,0 @@
1
- var de = (i, a, t) => new Promise((r, e) => {
2
- var o = (u) => {
3
- try {
4
- s(t.next(u));
5
- } catch (f) {
6
- e(f);
7
- }
8
- }, n = (u) => {
9
- try {
10
- s(t.throw(u));
11
- } catch (f) {
12
- e(f);
13
- }
14
- }, s = (u) => u.done ? r(u.value) : Promise.resolve(u.value).then(o, n);
15
- s((t = t.apply(i, a)).next());
16
- });
17
- import { r as Fe, g as Ye, h as l, H as ot, a as st, c as ut } from "./index-6e523641-CIqESSFm.js";
18
- const lt = {
19
- en: {
20
- deposit: "Deposit",
21
- withdrawals: "Withdrawals",
22
- show: "Show",
23
- from: "From",
24
- to: "To",
25
- filter: "Filter",
26
- transactionId: "Transaction ID",
27
- date: "Date",
28
- amount: "Amount",
29
- productType: "Product Type",
30
- status: "Status",
31
- noData: "There are no account activities",
32
- transactionTitle: "Transaction History"
33
- },
34
- hr: {
35
- deposit: "Uplate",
36
- withdrawals: "Isplate",
37
- show: "Prikaži",
38
- from: "Od",
39
- to: "Do",
40
- filter: "Filter",
41
- transactionId: "ID transakcije",
42
- date: "Datum",
43
- amount: "Iznos",
44
- productType: "Vrsta proizvoda",
45
- status: "Status",
46
- noData: "Nema aktivnosti na računu",
47
- transactionTitle: "Povijest transakcija"
48
- }
49
- };
50
- class g {
51
- constructor() {
52
- }
53
- static loadCustomTranslations(a) {
54
- return de(this, null, function* () {
55
- try {
56
- const t = yield fetch(a, {
57
- headers: {
58
- "Content-Type": "application/json"
59
- }
60
- });
61
- if (!t.ok) {
62
- const e = yield t.text();
63
- throw new Error(e);
64
- }
65
- const r = yield t.json();
66
- g.updateTranslations(r);
67
- } catch (t) {
68
- console.error(`Failed to load translations ${a}. ${t.message}`);
69
- }
70
- });
71
- }
72
- static translate(a, t) {
73
- var r, e;
74
- const o = g.getAvaliableLanguages(t);
75
- return ((e = (r = g.customTranslation) === null || r === void 0 ? void 0 : r[o.customLanguage]) === null || e === void 0 ? void 0 : e[a]) || g.defaultTranslation[o.predefinedLanguage][a];
76
- }
77
- static getAvaliableLanguages(a) {
78
- var t;
79
- const r = !((t = g.customLanguages) === null || t === void 0) && t.includes(a) ? a : g.defaultLanguage;
80
- return { predefinedLanguage: g.supportedLanguages.includes(a) ? a : g.defaultLanguage, customLanguage: r };
81
- }
82
- static updateTranslations(a) {
83
- g.customLanguages = Array.from(/* @__PURE__ */ new Set([...g.supportedLanguages, ...Object.keys(a).map((t) => t.toLowerCase())])), g.customTranslation = a;
84
- }
85
- }
86
- g.defaultLanguage = "en";
87
- g.supportedLanguages = ["en"];
88
- g.defaultTranslation = lt;
89
- const ct = () => l(
90
- "div",
91
- { class: "loader" },
92
- l("div", null),
93
- l("div", null),
94
- l("div", null),
95
- l("div", null),
96
- l("div", null),
97
- l("div", null),
98
- l("div", null),
99
- l("div", null),
100
- l("div", null),
101
- l("div", null),
102
- l("div", null),
103
- l("div", null)
104
- );
105
- function Q(i) {
106
- "@babel/helpers - typeof";
107
- return Q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
108
- return typeof a;
109
- } : function(a) {
110
- return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
111
- }, Q(i);
112
- }
113
- function M(i, a) {
114
- if (a.length < i)
115
- throw new TypeError(i + " argument" + (i > 1 ? "s" : "") + " required, but only " + a.length + " present");
116
- }
117
- function dt(i) {
118
- return M(1, arguments), i instanceof Date || Q(i) === "object" && Object.prototype.toString.call(i) === "[object Date]";
119
- }
120
- function W(i) {
121
- M(1, arguments);
122
- var a = Object.prototype.toString.call(i);
123
- return i instanceof Date || Q(i) === "object" && a === "[object Date]" ? new Date(i.getTime()) : typeof i == "number" || a === "[object Number]" ? new Date(i) : ((typeof i == "string" || a === "[object String]") && typeof console != "undefined" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
124
- }
125
- function ft(i) {
126
- if (M(1, arguments), !dt(i) && typeof i != "number")
127
- return !1;
128
- var a = W(i);
129
- return !isNaN(Number(a));
130
- }
131
- function S(i) {
132
- if (i === null || i === !0 || i === !1)
133
- return NaN;
134
- var a = Number(i);
135
- return isNaN(a) ? a : a < 0 ? Math.ceil(a) : Math.floor(a);
136
- }
137
- function ht(i, a) {
138
- M(2, arguments);
139
- var t = W(i).getTime(), r = S(a);
140
- return new Date(t + r);
141
- }
142
- function Ie(i, a) {
143
- M(2, arguments);
144
- var t = S(a);
145
- return ht(i, -t);
146
- }
147
- var vt = 864e5;
148
- function mt(i) {
149
- M(1, arguments);
150
- var a = W(i), t = a.getTime();
151
- a.setUTCMonth(0, 1), a.setUTCHours(0, 0, 0, 0);
152
- var r = a.getTime(), e = t - r;
153
- return Math.floor(e / vt) + 1;
154
- }
155
- function ee(i) {
156
- M(1, arguments);
157
- var a = 1, t = W(i), r = t.getUTCDay(), e = (r < a ? 7 : 0) + r - a;
158
- return t.setUTCDate(t.getUTCDate() - e), t.setUTCHours(0, 0, 0, 0), t;
159
- }
160
- function qe(i) {
161
- M(1, arguments);
162
- var a = W(i), t = a.getUTCFullYear(), r = /* @__PURE__ */ new Date(0);
163
- r.setUTCFullYear(t + 1, 0, 4), r.setUTCHours(0, 0, 0, 0);
164
- var e = ee(r), o = /* @__PURE__ */ new Date(0);
165
- o.setUTCFullYear(t, 0, 4), o.setUTCHours(0, 0, 0, 0);
166
- var n = ee(o);
167
- return a.getTime() >= e.getTime() ? t + 1 : a.getTime() >= n.getTime() ? t : t - 1;
168
- }
169
- function pt(i) {
170
- M(1, arguments);
171
- var a = qe(i), t = /* @__PURE__ */ new Date(0);
172
- t.setUTCFullYear(a, 0, 4), t.setUTCHours(0, 0, 0, 0);
173
- var r = ee(t);
174
- return r;
175
- }
176
- var gt = 6048e5;
177
- function Be(i) {
178
- M(1, arguments);
179
- var a = W(i), t = ee(a).getTime() - pt(a).getTime();
180
- return Math.round(t / gt) + 1;
181
- }
182
- var wt = {};
183
- function te() {
184
- return wt;
185
- }
186
- function Z(i, a) {
187
- var t, r, e, o, n, s, u, f;
188
- M(1, arguments);
189
- var w = te(), y = S((t = (r = (e = (o = a == null ? void 0 : a.weekStartsOn) !== null && o !== void 0 ? o : a == null || (n = a.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.weekStartsOn) !== null && e !== void 0 ? e : w.weekStartsOn) !== null && r !== void 0 ? r : (u = w.locale) === null || u === void 0 || (f = u.options) === null || f === void 0 ? void 0 : f.weekStartsOn) !== null && t !== void 0 ? t : 0);
190
- if (!(y >= 0 && y <= 6))
191
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
192
- var k = W(i), C = k.getUTCDay(), E = (C < y ? 7 : 0) + C - y;
193
- return k.setUTCDate(k.getUTCDate() - E), k.setUTCHours(0, 0, 0, 0), k;
194
- }
195
- function Te(i, a) {
196
- var t, r, e, o, n, s, u, f;
197
- M(1, arguments);
198
- var w = W(i), y = w.getUTCFullYear(), k = te(), C = S((t = (r = (e = (o = a == null ? void 0 : a.firstWeekContainsDate) !== null && o !== void 0 ? o : a == null || (n = a.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && e !== void 0 ? e : k.firstWeekContainsDate) !== null && r !== void 0 ? r : (u = k.locale) === null || u === void 0 || (f = u.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && t !== void 0 ? t : 1);
199
- if (!(C >= 1 && C <= 7))
200
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
201
- var E = /* @__PURE__ */ new Date(0);
202
- E.setUTCFullYear(y + 1, 0, C), E.setUTCHours(0, 0, 0, 0);
203
- var F = Z(E, a), H = /* @__PURE__ */ new Date(0);
204
- H.setUTCFullYear(y, 0, C), H.setUTCHours(0, 0, 0, 0);
205
- var $ = Z(H, a);
206
- return w.getTime() >= F.getTime() ? y + 1 : w.getTime() >= $.getTime() ? y : y - 1;
207
- }
208
- function yt(i, a) {
209
- var t, r, e, o, n, s, u, f;
210
- M(1, arguments);
211
- var w = te(), y = S((t = (r = (e = (o = a == null ? void 0 : a.firstWeekContainsDate) !== null && o !== void 0 ? o : a == null || (n = a.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && e !== void 0 ? e : w.firstWeekContainsDate) !== null && r !== void 0 ? r : (u = w.locale) === null || u === void 0 || (f = u.options) === null || f === void 0 ? void 0 : f.firstWeekContainsDate) !== null && t !== void 0 ? t : 1), k = Te(i, a), C = /* @__PURE__ */ new Date(0);
212
- C.setUTCFullYear(k, 0, y), C.setUTCHours(0, 0, 0, 0);
213
- var E = Z(C, a);
214
- return E;
215
- }
216
- var bt = 6048e5;
217
- function $e(i, a) {
218
- M(1, arguments);
219
- var t = W(i), r = Z(t, a).getTime() - yt(t, a).getTime();
220
- return Math.round(r / bt) + 1;
221
- }
222
- function T(i, a) {
223
- for (var t = i < 0 ? "-" : "", r = Math.abs(i).toString(); r.length < a; )
224
- r = "0" + r;
225
- return t + r;
226
- }
227
- var Tt = {
228
- // Year
229
- y: function(a, t) {
230
- var r = a.getUTCFullYear(), e = r > 0 ? r : 1 - r;
231
- return T(t === "yy" ? e % 100 : e, t.length);
232
- },
233
- // Month
234
- M: function(a, t) {
235
- var r = a.getUTCMonth();
236
- return t === "M" ? String(r + 1) : T(r + 1, 2);
237
- },
238
- // Day of the month
239
- d: function(a, t) {
240
- return T(a.getUTCDate(), t.length);
241
- },
242
- // AM or PM
243
- a: function(a, t) {
244
- var r = a.getUTCHours() / 12 >= 1 ? "pm" : "am";
245
- switch (t) {
246
- case "a":
247
- case "aa":
248
- return r.toUpperCase();
249
- case "aaa":
250
- return r;
251
- case "aaaaa":
252
- return r[0];
253
- case "aaaa":
254
- default:
255
- return r === "am" ? "a.m." : "p.m.";
256
- }
257
- },
258
- // Hour [1-12]
259
- h: function(a, t) {
260
- return T(a.getUTCHours() % 12 || 12, t.length);
261
- },
262
- // Hour [0-23]
263
- H: function(a, t) {
264
- return T(a.getUTCHours(), t.length);
265
- },
266
- // Minute
267
- m: function(a, t) {
268
- return T(a.getUTCMinutes(), t.length);
269
- },
270
- // Second
271
- s: function(a, t) {
272
- return T(a.getUTCSeconds(), t.length);
273
- },
274
- // Fraction of second
275
- S: function(a, t) {
276
- var r = t.length, e = a.getUTCMilliseconds(), o = Math.floor(e * Math.pow(10, r - 3));
277
- return T(o, t.length);
278
- }
279
- };
280
- const G = Tt;
281
- var J = {
282
- midnight: "midnight",
283
- noon: "noon",
284
- morning: "morning",
285
- afternoon: "afternoon",
286
- evening: "evening",
287
- night: "night"
288
- }, xt = {
289
- // Era
290
- G: function(a, t, r) {
291
- var e = a.getUTCFullYear() > 0 ? 1 : 0;
292
- switch (t) {
293
- case "G":
294
- case "GG":
295
- case "GGG":
296
- return r.era(e, {
297
- width: "abbreviated"
298
- });
299
- case "GGGGG":
300
- return r.era(e, {
301
- width: "narrow"
302
- });
303
- case "GGGG":
304
- default:
305
- return r.era(e, {
306
- width: "wide"
307
- });
308
- }
309
- },
310
- // Year
311
- y: function(a, t, r) {
312
- if (t === "yo") {
313
- var e = a.getUTCFullYear(), o = e > 0 ? e : 1 - e;
314
- return r.ordinalNumber(o, {
315
- unit: "year"
316
- });
317
- }
318
- return G.y(a, t);
319
- },
320
- // Local week-numbering year
321
- Y: function(a, t, r, e) {
322
- var o = Te(a, e), n = o > 0 ? o : 1 - o;
323
- if (t === "YY") {
324
- var s = n % 100;
325
- return T(s, 2);
326
- }
327
- return t === "Yo" ? r.ordinalNumber(n, {
328
- unit: "year"
329
- }) : T(n, t.length);
330
- },
331
- // ISO week-numbering year
332
- R: function(a, t) {
333
- var r = qe(a);
334
- return T(r, t.length);
335
- },
336
- // Extended year. This is a single number designating the year of this calendar system.
337
- // The main difference between `y` and `u` localizers are B.C. years:
338
- // | Year | `y` | `u` |
339
- // |------|-----|-----|
340
- // | AC 1 | 1 | 1 |
341
- // | BC 1 | 1 | 0 |
342
- // | BC 2 | 2 | -1 |
343
- // Also `yy` always returns the last two digits of a year,
344
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
345
- u: function(a, t) {
346
- var r = a.getUTCFullYear();
347
- return T(r, t.length);
348
- },
349
- // Quarter
350
- Q: function(a, t, r) {
351
- var e = Math.ceil((a.getUTCMonth() + 1) / 3);
352
- switch (t) {
353
- case "Q":
354
- return String(e);
355
- case "QQ":
356
- return T(e, 2);
357
- case "Qo":
358
- return r.ordinalNumber(e, {
359
- unit: "quarter"
360
- });
361
- case "QQQ":
362
- return r.quarter(e, {
363
- width: "abbreviated",
364
- context: "formatting"
365
- });
366
- case "QQQQQ":
367
- return r.quarter(e, {
368
- width: "narrow",
369
- context: "formatting"
370
- });
371
- case "QQQQ":
372
- default:
373
- return r.quarter(e, {
374
- width: "wide",
375
- context: "formatting"
376
- });
377
- }
378
- },
379
- // Stand-alone quarter
380
- q: function(a, t, r) {
381
- var e = Math.ceil((a.getUTCMonth() + 1) / 3);
382
- switch (t) {
383
- case "q":
384
- return String(e);
385
- case "qq":
386
- return T(e, 2);
387
- case "qo":
388
- return r.ordinalNumber(e, {
389
- unit: "quarter"
390
- });
391
- case "qqq":
392
- return r.quarter(e, {
393
- width: "abbreviated",
394
- context: "standalone"
395
- });
396
- case "qqqqq":
397
- return r.quarter(e, {
398
- width: "narrow",
399
- context: "standalone"
400
- });
401
- case "qqqq":
402
- default:
403
- return r.quarter(e, {
404
- width: "wide",
405
- context: "standalone"
406
- });
407
- }
408
- },
409
- // Month
410
- M: function(a, t, r) {
411
- var e = a.getUTCMonth();
412
- switch (t) {
413
- case "M":
414
- case "MM":
415
- return G.M(a, t);
416
- case "Mo":
417
- return r.ordinalNumber(e + 1, {
418
- unit: "month"
419
- });
420
- case "MMM":
421
- return r.month(e, {
422
- width: "abbreviated",
423
- context: "formatting"
424
- });
425
- case "MMMMM":
426
- return r.month(e, {
427
- width: "narrow",
428
- context: "formatting"
429
- });
430
- case "MMMM":
431
- default:
432
- return r.month(e, {
433
- width: "wide",
434
- context: "formatting"
435
- });
436
- }
437
- },
438
- // Stand-alone month
439
- L: function(a, t, r) {
440
- var e = a.getUTCMonth();
441
- switch (t) {
442
- case "L":
443
- return String(e + 1);
444
- case "LL":
445
- return T(e + 1, 2);
446
- case "Lo":
447
- return r.ordinalNumber(e + 1, {
448
- unit: "month"
449
- });
450
- case "LLL":
451
- return r.month(e, {
452
- width: "abbreviated",
453
- context: "standalone"
454
- });
455
- case "LLLLL":
456
- return r.month(e, {
457
- width: "narrow",
458
- context: "standalone"
459
- });
460
- case "LLLL":
461
- default:
462
- return r.month(e, {
463
- width: "wide",
464
- context: "standalone"
465
- });
466
- }
467
- },
468
- // Local week of year
469
- w: function(a, t, r, e) {
470
- var o = $e(a, e);
471
- return t === "wo" ? r.ordinalNumber(o, {
472
- unit: "week"
473
- }) : T(o, t.length);
474
- },
475
- // ISO week of year
476
- I: function(a, t, r) {
477
- var e = Be(a);
478
- return t === "Io" ? r.ordinalNumber(e, {
479
- unit: "week"
480
- }) : T(e, t.length);
481
- },
482
- // Day of the month
483
- d: function(a, t, r) {
484
- return t === "do" ? r.ordinalNumber(a.getUTCDate(), {
485
- unit: "date"
486
- }) : G.d(a, t);
487
- },
488
- // Day of year
489
- D: function(a, t, r) {
490
- var e = mt(a);
491
- return t === "Do" ? r.ordinalNumber(e, {
492
- unit: "dayOfYear"
493
- }) : T(e, t.length);
494
- },
495
- // Day of week
496
- E: function(a, t, r) {
497
- var e = a.getUTCDay();
498
- switch (t) {
499
- case "E":
500
- case "EE":
501
- case "EEE":
502
- return r.day(e, {
503
- width: "abbreviated",
504
- context: "formatting"
505
- });
506
- case "EEEEE":
507
- return r.day(e, {
508
- width: "narrow",
509
- context: "formatting"
510
- });
511
- case "EEEEEE":
512
- return r.day(e, {
513
- width: "short",
514
- context: "formatting"
515
- });
516
- case "EEEE":
517
- default:
518
- return r.day(e, {
519
- width: "wide",
520
- context: "formatting"
521
- });
522
- }
523
- },
524
- // Local day of week
525
- e: function(a, t, r, e) {
526
- var o = a.getUTCDay(), n = (o - e.weekStartsOn + 8) % 7 || 7;
527
- switch (t) {
528
- case "e":
529
- return String(n);
530
- case "ee":
531
- return T(n, 2);
532
- case "eo":
533
- return r.ordinalNumber(n, {
534
- unit: "day"
535
- });
536
- case "eee":
537
- return r.day(o, {
538
- width: "abbreviated",
539
- context: "formatting"
540
- });
541
- case "eeeee":
542
- return r.day(o, {
543
- width: "narrow",
544
- context: "formatting"
545
- });
546
- case "eeeeee":
547
- return r.day(o, {
548
- width: "short",
549
- context: "formatting"
550
- });
551
- case "eeee":
552
- default:
553
- return r.day(o, {
554
- width: "wide",
555
- context: "formatting"
556
- });
557
- }
558
- },
559
- // Stand-alone local day of week
560
- c: function(a, t, r, e) {
561
- var o = a.getUTCDay(), n = (o - e.weekStartsOn + 8) % 7 || 7;
562
- switch (t) {
563
- case "c":
564
- return String(n);
565
- case "cc":
566
- return T(n, t.length);
567
- case "co":
568
- return r.ordinalNumber(n, {
569
- unit: "day"
570
- });
571
- case "ccc":
572
- return r.day(o, {
573
- width: "abbreviated",
574
- context: "standalone"
575
- });
576
- case "ccccc":
577
- return r.day(o, {
578
- width: "narrow",
579
- context: "standalone"
580
- });
581
- case "cccccc":
582
- return r.day(o, {
583
- width: "short",
584
- context: "standalone"
585
- });
586
- case "cccc":
587
- default:
588
- return r.day(o, {
589
- width: "wide",
590
- context: "standalone"
591
- });
592
- }
593
- },
594
- // ISO day of week
595
- i: function(a, t, r) {
596
- var e = a.getUTCDay(), o = e === 0 ? 7 : e;
597
- switch (t) {
598
- case "i":
599
- return String(o);
600
- case "ii":
601
- return T(o, t.length);
602
- case "io":
603
- return r.ordinalNumber(o, {
604
- unit: "day"
605
- });
606
- case "iii":
607
- return r.day(e, {
608
- width: "abbreviated",
609
- context: "formatting"
610
- });
611
- case "iiiii":
612
- return r.day(e, {
613
- width: "narrow",
614
- context: "formatting"
615
- });
616
- case "iiiiii":
617
- return r.day(e, {
618
- width: "short",
619
- context: "formatting"
620
- });
621
- case "iiii":
622
- default:
623
- return r.day(e, {
624
- width: "wide",
625
- context: "formatting"
626
- });
627
- }
628
- },
629
- // AM or PM
630
- a: function(a, t, r) {
631
- var e = a.getUTCHours(), o = e / 12 >= 1 ? "pm" : "am";
632
- switch (t) {
633
- case "a":
634
- case "aa":
635
- return r.dayPeriod(o, {
636
- width: "abbreviated",
637
- context: "formatting"
638
- });
639
- case "aaa":
640
- return r.dayPeriod(o, {
641
- width: "abbreviated",
642
- context: "formatting"
643
- }).toLowerCase();
644
- case "aaaaa":
645
- return r.dayPeriod(o, {
646
- width: "narrow",
647
- context: "formatting"
648
- });
649
- case "aaaa":
650
- default:
651
- return r.dayPeriod(o, {
652
- width: "wide",
653
- context: "formatting"
654
- });
655
- }
656
- },
657
- // AM, PM, midnight, noon
658
- b: function(a, t, r) {
659
- var e = a.getUTCHours(), o;
660
- switch (e === 12 ? o = J.noon : e === 0 ? o = J.midnight : o = e / 12 >= 1 ? "pm" : "am", t) {
661
- case "b":
662
- case "bb":
663
- return r.dayPeriod(o, {
664
- width: "abbreviated",
665
- context: "formatting"
666
- });
667
- case "bbb":
668
- return r.dayPeriod(o, {
669
- width: "abbreviated",
670
- context: "formatting"
671
- }).toLowerCase();
672
- case "bbbbb":
673
- return r.dayPeriod(o, {
674
- width: "narrow",
675
- context: "formatting"
676
- });
677
- case "bbbb":
678
- default:
679
- return r.dayPeriod(o, {
680
- width: "wide",
681
- context: "formatting"
682
- });
683
- }
684
- },
685
- // in the morning, in the afternoon, in the evening, at night
686
- B: function(a, t, r) {
687
- var e = a.getUTCHours(), o;
688
- switch (e >= 17 ? o = J.evening : e >= 12 ? o = J.afternoon : e >= 4 ? o = J.morning : o = J.night, t) {
689
- case "B":
690
- case "BB":
691
- case "BBB":
692
- return r.dayPeriod(o, {
693
- width: "abbreviated",
694
- context: "formatting"
695
- });
696
- case "BBBBB":
697
- return r.dayPeriod(o, {
698
- width: "narrow",
699
- context: "formatting"
700
- });
701
- case "BBBB":
702
- default:
703
- return r.dayPeriod(o, {
704
- width: "wide",
705
- context: "formatting"
706
- });
707
- }
708
- },
709
- // Hour [1-12]
710
- h: function(a, t, r) {
711
- if (t === "ho") {
712
- var e = a.getUTCHours() % 12;
713
- return e === 0 && (e = 12), r.ordinalNumber(e, {
714
- unit: "hour"
715
- });
716
- }
717
- return G.h(a, t);
718
- },
719
- // Hour [0-23]
720
- H: function(a, t, r) {
721
- return t === "Ho" ? r.ordinalNumber(a.getUTCHours(), {
722
- unit: "hour"
723
- }) : G.H(a, t);
724
- },
725
- // Hour [0-11]
726
- K: function(a, t, r) {
727
- var e = a.getUTCHours() % 12;
728
- return t === "Ko" ? r.ordinalNumber(e, {
729
- unit: "hour"
730
- }) : T(e, t.length);
731
- },
732
- // Hour [1-24]
733
- k: function(a, t, r) {
734
- var e = a.getUTCHours();
735
- return e === 0 && (e = 24), t === "ko" ? r.ordinalNumber(e, {
736
- unit: "hour"
737
- }) : T(e, t.length);
738
- },
739
- // Minute
740
- m: function(a, t, r) {
741
- return t === "mo" ? r.ordinalNumber(a.getUTCMinutes(), {
742
- unit: "minute"
743
- }) : G.m(a, t);
744
- },
745
- // Second
746
- s: function(a, t, r) {
747
- return t === "so" ? r.ordinalNumber(a.getUTCSeconds(), {
748
- unit: "second"
749
- }) : G.s(a, t);
750
- },
751
- // Fraction of second
752
- S: function(a, t) {
753
- return G.S(a, t);
754
- },
755
- // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
756
- X: function(a, t, r, e) {
757
- var o = e._originalDate || a, n = o.getTimezoneOffset();
758
- if (n === 0)
759
- return "Z";
760
- switch (t) {
761
- case "X":
762
- return We(n);
763
- case "XXXX":
764
- case "XX":
765
- return V(n);
766
- case "XXXXX":
767
- case "XXX":
768
- default:
769
- return V(n, ":");
770
- }
771
- },
772
- // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
773
- x: function(a, t, r, e) {
774
- var o = e._originalDate || a, n = o.getTimezoneOffset();
775
- switch (t) {
776
- case "x":
777
- return We(n);
778
- case "xxxx":
779
- case "xx":
780
- return V(n);
781
- case "xxxxx":
782
- case "xxx":
783
- default:
784
- return V(n, ":");
785
- }
786
- },
787
- // Timezone (GMT)
788
- O: function(a, t, r, e) {
789
- var o = e._originalDate || a, n = o.getTimezoneOffset();
790
- switch (t) {
791
- case "O":
792
- case "OO":
793
- case "OOO":
794
- return "GMT" + _e(n, ":");
795
- case "OOOO":
796
- default:
797
- return "GMT" + V(n, ":");
798
- }
799
- },
800
- // Timezone (specific non-location)
801
- z: function(a, t, r, e) {
802
- var o = e._originalDate || a, n = o.getTimezoneOffset();
803
- switch (t) {
804
- case "z":
805
- case "zz":
806
- case "zzz":
807
- return "GMT" + _e(n, ":");
808
- case "zzzz":
809
- default:
810
- return "GMT" + V(n, ":");
811
- }
812
- },
813
- // Seconds timestamp
814
- t: function(a, t, r, e) {
815
- var o = e._originalDate || a, n = Math.floor(o.getTime() / 1e3);
816
- return T(n, t.length);
817
- },
818
- // Milliseconds timestamp
819
- T: function(a, t, r, e) {
820
- var o = e._originalDate || a, n = o.getTime();
821
- return T(n, t.length);
822
- }
823
- };
824
- function _e(i, a) {
825
- var t = i > 0 ? "-" : "+", r = Math.abs(i), e = Math.floor(r / 60), o = r % 60;
826
- if (o === 0)
827
- return t + String(e);
828
- var n = a;
829
- return t + String(e) + n + T(o, 2);
830
- }
831
- function We(i, a) {
832
- if (i % 60 === 0) {
833
- var t = i > 0 ? "-" : "+";
834
- return t + T(Math.abs(i) / 60, 2);
835
- }
836
- return V(i, a);
837
- }
838
- function V(i, a) {
839
- var t = a || "", r = i > 0 ? "-" : "+", e = Math.abs(i), o = T(Math.floor(e / 60), 2), n = T(e % 60, 2);
840
- return r + o + t + n;
841
- }
842
- const Ct = xt;
843
- var Le = function(a, t) {
844
- switch (a) {
845
- case "P":
846
- return t.date({
847
- width: "short"
848
- });
849
- case "PP":
850
- return t.date({
851
- width: "medium"
852
- });
853
- case "PPP":
854
- return t.date({
855
- width: "long"
856
- });
857
- case "PPPP":
858
- default:
859
- return t.date({
860
- width: "full"
861
- });
862
- }
863
- }, Re = function(a, t) {
864
- switch (a) {
865
- case "p":
866
- return t.time({
867
- width: "short"
868
- });
869
- case "pp":
870
- return t.time({
871
- width: "medium"
872
- });
873
- case "ppp":
874
- return t.time({
875
- width: "long"
876
- });
877
- case "pppp":
878
- default:
879
- return t.time({
880
- width: "full"
881
- });
882
- }
883
- }, Dt = function(a, t) {
884
- var r = a.match(/(P+)(p+)?/) || [], e = r[1], o = r[2];
885
- if (!o)
886
- return Le(a, t);
887
- var n;
888
- switch (e) {
889
- case "P":
890
- n = t.dateTime({
891
- width: "short"
892
- });
893
- break;
894
- case "PP":
895
- n = t.dateTime({
896
- width: "medium"
897
- });
898
- break;
899
- case "PPP":
900
- n = t.dateTime({
901
- width: "long"
902
- });
903
- break;
904
- case "PPPP":
905
- default:
906
- n = t.dateTime({
907
- width: "full"
908
- });
909
- break;
910
- }
911
- return n.replace("{{date}}", Le(e, t)).replace("{{time}}", Re(o, t));
912
- }, kt = {
913
- p: Re,
914
- P: Dt
915
- };
916
- const ye = kt;
917
- function Qe(i) {
918
- var a = new Date(Date.UTC(i.getFullYear(), i.getMonth(), i.getDate(), i.getHours(), i.getMinutes(), i.getSeconds(), i.getMilliseconds()));
919
- return a.setUTCFullYear(i.getFullYear()), i.getTime() - a.getTime();
920
- }
921
- var Pt = ["D", "DD"], Mt = ["YY", "YYYY"];
922
- function je(i) {
923
- return Pt.indexOf(i) !== -1;
924
- }
925
- function Xe(i) {
926
- return Mt.indexOf(i) !== -1;
927
- }
928
- function fe(i, a, t) {
929
- if (i === "YYYY")
930
- throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
931
- if (i === "YY")
932
- throw new RangeError("Use `yy` instead of `YY` (in `".concat(a, "`) for formatting years to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
933
- if (i === "D")
934
- throw new RangeError("Use `d` instead of `D` (in `".concat(a, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
935
- if (i === "DD")
936
- throw new RangeError("Use `dd` instead of `DD` (in `".concat(a, "`) for formatting days of the month to the input `").concat(t, "`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));
937
- }
938
- var Ot = {
939
- lessThanXSeconds: {
940
- one: "less than a second",
941
- other: "less than {{count}} seconds"
942
- },
943
- xSeconds: {
944
- one: "1 second",
945
- other: "{{count}} seconds"
946
- },
947
- halfAMinute: "half a minute",
948
- lessThanXMinutes: {
949
- one: "less than a minute",
950
- other: "less than {{count}} minutes"
951
- },
952
- xMinutes: {
953
- one: "1 minute",
954
- other: "{{count}} minutes"
955
- },
956
- aboutXHours: {
957
- one: "about 1 hour",
958
- other: "about {{count}} hours"
959
- },
960
- xHours: {
961
- one: "1 hour",
962
- other: "{{count}} hours"
963
- },
964
- xDays: {
965
- one: "1 day",
966
- other: "{{count}} days"
967
- },
968
- aboutXWeeks: {
969
- one: "about 1 week",
970
- other: "about {{count}} weeks"
971
- },
972
- xWeeks: {
973
- one: "1 week",
974
- other: "{{count}} weeks"
975
- },
976
- aboutXMonths: {
977
- one: "about 1 month",
978
- other: "about {{count}} months"
979
- },
980
- xMonths: {
981
- one: "1 month",
982
- other: "{{count}} months"
983
- },
984
- aboutXYears: {
985
- one: "about 1 year",
986
- other: "about {{count}} years"
987
- },
988
- xYears: {
989
- one: "1 year",
990
- other: "{{count}} years"
991
- },
992
- overXYears: {
993
- one: "over 1 year",
994
- other: "over {{count}} years"
995
- },
996
- almostXYears: {
997
- one: "almost 1 year",
998
- other: "almost {{count}} years"
999
- }
1000
- }, Ut = function(a, t, r) {
1001
- var e, o = Ot[a];
1002
- return typeof o == "string" ? e = o : t === 1 ? e = o.one : e = o.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + e : e + " ago" : e;
1003
- };
1004
- const Et = Ut;
1005
- function we(i) {
1006
- return function() {
1007
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = a.width ? String(a.width) : i.defaultWidth, r = i.formats[t] || i.formats[i.defaultWidth];
1008
- return r;
1009
- };
1010
- }
1011
- var Yt = {
1012
- full: "EEEE, MMMM do, y",
1013
- long: "MMMM do, y",
1014
- medium: "MMM d, y",
1015
- short: "MM/dd/yyyy"
1016
- }, _t = {
1017
- full: "h:mm:ss a zzzz",
1018
- long: "h:mm:ss a z",
1019
- medium: "h:mm:ss a",
1020
- short: "h:mm a"
1021
- }, Wt = {
1022
- full: "{{date}} 'at' {{time}}",
1023
- long: "{{date}} 'at' {{time}}",
1024
- medium: "{{date}}, {{time}}",
1025
- short: "{{date}}, {{time}}"
1026
- }, Lt = {
1027
- date: we({
1028
- formats: Yt,
1029
- defaultWidth: "full"
1030
- }),
1031
- time: we({
1032
- formats: _t,
1033
- defaultWidth: "full"
1034
- }),
1035
- dateTime: we({
1036
- formats: Wt,
1037
- defaultWidth: "full"
1038
- })
1039
- };
1040
- const St = Lt;
1041
- var Ht = {
1042
- lastWeek: "'last' eeee 'at' p",
1043
- yesterday: "'yesterday at' p",
1044
- today: "'today at' p",
1045
- tomorrow: "'tomorrow at' p",
1046
- nextWeek: "eeee 'at' p",
1047
- other: "P"
1048
- }, Nt = function(a, t, r, e) {
1049
- return Ht[a];
1050
- };
1051
- const At = Nt;
1052
- function oe(i) {
1053
- return function(a, t) {
1054
- var r = t != null && t.context ? String(t.context) : "standalone", e;
1055
- if (r === "formatting" && i.formattingValues) {
1056
- var o = i.defaultFormattingWidth || i.defaultWidth, n = t != null && t.width ? String(t.width) : o;
1057
- e = i.formattingValues[n] || i.formattingValues[o];
1058
- } else {
1059
- var s = i.defaultWidth, u = t != null && t.width ? String(t.width) : i.defaultWidth;
1060
- e = i.values[u] || i.values[s];
1061
- }
1062
- var f = i.argumentCallback ? i.argumentCallback(a) : a;
1063
- return e[f];
1064
- };
1065
- }
1066
- var Ft = {
1067
- narrow: ["B", "A"],
1068
- abbreviated: ["BC", "AD"],
1069
- wide: ["Before Christ", "Anno Domini"]
1070
- }, It = {
1071
- narrow: ["1", "2", "3", "4"],
1072
- abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1073
- wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
1074
- }, qt = {
1075
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1076
- abbreviated: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
1077
- wide: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
1078
- }, Bt = {
1079
- narrow: ["S", "M", "T", "W", "T", "F", "S"],
1080
- short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
1081
- abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
1082
- wide: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
1083
- }, $t = {
1084
- narrow: {
1085
- am: "a",
1086
- pm: "p",
1087
- midnight: "mi",
1088
- noon: "n",
1089
- morning: "morning",
1090
- afternoon: "afternoon",
1091
- evening: "evening",
1092
- night: "night"
1093
- },
1094
- abbreviated: {
1095
- am: "AM",
1096
- pm: "PM",
1097
- midnight: "midnight",
1098
- noon: "noon",
1099
- morning: "morning",
1100
- afternoon: "afternoon",
1101
- evening: "evening",
1102
- night: "night"
1103
- },
1104
- wide: {
1105
- am: "a.m.",
1106
- pm: "p.m.",
1107
- midnight: "midnight",
1108
- noon: "noon",
1109
- morning: "morning",
1110
- afternoon: "afternoon",
1111
- evening: "evening",
1112
- night: "night"
1113
- }
1114
- }, Rt = {
1115
- narrow: {
1116
- am: "a",
1117
- pm: "p",
1118
- midnight: "mi",
1119
- noon: "n",
1120
- morning: "in the morning",
1121
- afternoon: "in the afternoon",
1122
- evening: "in the evening",
1123
- night: "at night"
1124
- },
1125
- abbreviated: {
1126
- am: "AM",
1127
- pm: "PM",
1128
- midnight: "midnight",
1129
- noon: "noon",
1130
- morning: "in the morning",
1131
- afternoon: "in the afternoon",
1132
- evening: "in the evening",
1133
- night: "at night"
1134
- },
1135
- wide: {
1136
- am: "a.m.",
1137
- pm: "p.m.",
1138
- midnight: "midnight",
1139
- noon: "noon",
1140
- morning: "in the morning",
1141
- afternoon: "in the afternoon",
1142
- evening: "in the evening",
1143
- night: "at night"
1144
- }
1145
- }, Qt = function(a, t) {
1146
- var r = Number(a), e = r % 100;
1147
- if (e > 20 || e < 10)
1148
- switch (e % 10) {
1149
- case 1:
1150
- return r + "st";
1151
- case 2:
1152
- return r + "nd";
1153
- case 3:
1154
- return r + "rd";
1155
- }
1156
- return r + "th";
1157
- }, jt = {
1158
- ordinalNumber: Qt,
1159
- era: oe({
1160
- values: Ft,
1161
- defaultWidth: "wide"
1162
- }),
1163
- quarter: oe({
1164
- values: It,
1165
- defaultWidth: "wide",
1166
- argumentCallback: function(a) {
1167
- return a - 1;
1168
- }
1169
- }),
1170
- month: oe({
1171
- values: qt,
1172
- defaultWidth: "wide"
1173
- }),
1174
- day: oe({
1175
- values: Bt,
1176
- defaultWidth: "wide"
1177
- }),
1178
- dayPeriod: oe({
1179
- values: $t,
1180
- defaultWidth: "wide",
1181
- formattingValues: Rt,
1182
- defaultFormattingWidth: "wide"
1183
- })
1184
- };
1185
- const Xt = jt;
1186
- function se(i) {
1187
- return function(a) {
1188
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.width, e = r && i.matchPatterns[r] || i.matchPatterns[i.defaultMatchWidth], o = a.match(e);
1189
- if (!o)
1190
- return null;
1191
- var n = o[0], s = r && i.parsePatterns[r] || i.parsePatterns[i.defaultParseWidth], u = Array.isArray(s) ? zt(s, function(y) {
1192
- return y.test(n);
1193
- }) : Gt(s, function(y) {
1194
- return y.test(n);
1195
- }), f;
1196
- f = i.valueCallback ? i.valueCallback(u) : u, f = t.valueCallback ? t.valueCallback(f) : f;
1197
- var w = a.slice(n.length);
1198
- return {
1199
- value: f,
1200
- rest: w
1201
- };
1202
- };
1203
- }
1204
- function Gt(i, a) {
1205
- for (var t in i)
1206
- if (i.hasOwnProperty(t) && a(i[t]))
1207
- return t;
1208
- }
1209
- function zt(i, a) {
1210
- for (var t = 0; t < i.length; t++)
1211
- if (a(i[t]))
1212
- return t;
1213
- }
1214
- function Vt(i) {
1215
- return function(a) {
1216
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = a.match(i.matchPattern);
1217
- if (!r)
1218
- return null;
1219
- var e = r[0], o = a.match(i.parsePattern);
1220
- if (!o)
1221
- return null;
1222
- var n = i.valueCallback ? i.valueCallback(o[0]) : o[0];
1223
- n = t.valueCallback ? t.valueCallback(n) : n;
1224
- var s = a.slice(e.length);
1225
- return {
1226
- value: n,
1227
- rest: s
1228
- };
1229
- };
1230
- }
1231
- var Kt = /^(\d+)(th|st|nd|rd)?/i, Zt = /\d+/i, Jt = {
1232
- narrow: /^(b|a)/i,
1233
- abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
1234
- wide: /^(before christ|before common era|anno domini|common era)/i
1235
- }, er = {
1236
- any: [/^b/i, /^(a|c)/i]
1237
- }, tr = {
1238
- narrow: /^[1234]/i,
1239
- abbreviated: /^q[1234]/i,
1240
- wide: /^[1234](th|st|nd|rd)? quarter/i
1241
- }, rr = {
1242
- any: [/1/i, /2/i, /3/i, /4/i]
1243
- }, ar = {
1244
- narrow: /^[jfmasond]/i,
1245
- abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
1246
- wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
1247
- }, nr = {
1248
- narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
1249
- any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
1250
- }, ir = {
1251
- narrow: /^[smtwf]/i,
1252
- short: /^(su|mo|tu|we|th|fr|sa)/i,
1253
- abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
1254
- wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
1255
- }, or = {
1256
- narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
1257
- any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
1258
- }, sr = {
1259
- narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
1260
- any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
1261
- }, ur = {
1262
- any: {
1263
- am: /^a/i,
1264
- pm: /^p/i,
1265
- midnight: /^mi/i,
1266
- noon: /^no/i,
1267
- morning: /morning/i,
1268
- afternoon: /afternoon/i,
1269
- evening: /evening/i,
1270
- night: /night/i
1271
- }
1272
- }, lr = {
1273
- ordinalNumber: Vt({
1274
- matchPattern: Kt,
1275
- parsePattern: Zt,
1276
- valueCallback: function(a) {
1277
- return parseInt(a, 10);
1278
- }
1279
- }),
1280
- era: se({
1281
- matchPatterns: Jt,
1282
- defaultMatchWidth: "wide",
1283
- parsePatterns: er,
1284
- defaultParseWidth: "any"
1285
- }),
1286
- quarter: se({
1287
- matchPatterns: tr,
1288
- defaultMatchWidth: "wide",
1289
- parsePatterns: rr,
1290
- defaultParseWidth: "any",
1291
- valueCallback: function(a) {
1292
- return a + 1;
1293
- }
1294
- }),
1295
- month: se({
1296
- matchPatterns: ar,
1297
- defaultMatchWidth: "wide",
1298
- parsePatterns: nr,
1299
- defaultParseWidth: "any"
1300
- }),
1301
- day: se({
1302
- matchPatterns: ir,
1303
- defaultMatchWidth: "wide",
1304
- parsePatterns: or,
1305
- defaultParseWidth: "any"
1306
- }),
1307
- dayPeriod: se({
1308
- matchPatterns: sr,
1309
- defaultMatchWidth: "any",
1310
- parsePatterns: ur,
1311
- defaultParseWidth: "any"
1312
- })
1313
- };
1314
- const cr = lr;
1315
- var dr = {
1316
- code: "en-US",
1317
- formatDistance: Et,
1318
- formatLong: St,
1319
- formatRelative: At,
1320
- localize: Xt,
1321
- match: cr,
1322
- options: {
1323
- weekStartsOn: 0,
1324
- firstWeekContainsDate: 1
1325
- }
1326
- };
1327
- const Ge = dr;
1328
- var fr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, hr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, vr = /^'([^]*?)'?$/, mr = /''/g, pr = /[a-zA-Z]/;
1329
- function K(i, a, t) {
1330
- var r, e, o, n, s, u, f, w, y, k, C, E, F, H;
1331
- M(2, arguments);
1332
- var $ = String(a), L = te(), I = (r = (e = void 0) !== null && e !== void 0 ? e : L.locale) !== null && r !== void 0 ? r : Ge, R = S((o = (n = (s = (u = void 0) !== null && u !== void 0 ? u : void 0) !== null && s !== void 0 ? s : L.firstWeekContainsDate) !== null && n !== void 0 ? n : (f = L.locale) === null || f === void 0 || (w = f.options) === null || w === void 0 ? void 0 : w.firstWeekContainsDate) !== null && o !== void 0 ? o : 1);
1333
- if (!(R >= 1 && R <= 7))
1334
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
1335
- var j = S((y = (k = (C = (E = void 0) !== null && E !== void 0 ? E : void 0) !== null && C !== void 0 ? C : L.weekStartsOn) !== null && k !== void 0 ? k : (F = L.locale) === null || F === void 0 || (H = F.options) === null || H === void 0 ? void 0 : H.weekStartsOn) !== null && y !== void 0 ? y : 0);
1336
- if (!(j >= 0 && j <= 6))
1337
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
1338
- if (!I.localize)
1339
- throw new RangeError("locale must contain localize property");
1340
- if (!I.formatLong)
1341
- throw new RangeError("locale must contain formatLong property");
1342
- var X = W(i);
1343
- if (!ft(X))
1344
- throw new RangeError("Invalid time value");
1345
- var re = Qe(X), ae = Ie(X, re), ne = {
1346
- firstWeekContainsDate: R,
1347
- weekStartsOn: j,
1348
- locale: I,
1349
- _originalDate: X
1350
- }, me = $.match(hr).map(function(_) {
1351
- var N = _[0];
1352
- if (N === "p" || N === "P") {
1353
- var z = ye[N];
1354
- return z(_, I.formatLong);
1355
- }
1356
- return _;
1357
- }).join("").match(fr).map(function(_) {
1358
- if (_ === "''")
1359
- return "'";
1360
- var N = _[0];
1361
- if (N === "'")
1362
- return gr(_);
1363
- var z = Ct[N];
1364
- if (z)
1365
- return Xe(_) && fe(_, a, String(i)), je(_) && fe(_, a, String(i)), z(ae, _, I.localize, ne);
1366
- if (N.match(pr))
1367
- throw new RangeError("Format string contains an unescaped latin alphabet character `" + N + "`");
1368
- return _;
1369
- }).join("");
1370
- return me;
1371
- }
1372
- function gr(i) {
1373
- var a = i.match(vr);
1374
- return a ? a[1].replace(mr, "'") : i;
1375
- }
1376
- class ze {
1377
- constructor() {
1378
- }
1379
- static dateToFormatedString(a, t) {
1380
- const r = t ? K(a, t) : a.toLocaleDateString("en-gb"), e = a.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 });
1381
- return `${r}, ${e}`;
1382
- }
1383
- }
1384
- class Ve {
1385
- constructor() {
1386
- }
1387
- static format(a, t) {
1388
- let r = `${t} ${a}`;
1389
- try {
1390
- r = new Intl.NumberFormat("en-US", {
1391
- style: "currency",
1392
- currency: a
1393
- }).format(t);
1394
- } catch (e) {
1395
- }
1396
- return r;
1397
- }
1398
- }
1399
- const wr = (i) => l(
1400
- "div",
1401
- { class: "data-transaction" },
1402
- l("p", null, i.productType),
1403
- l(
1404
- "p",
1405
- { class: "text-style text-style-status" },
1406
- l("span", { class: i.status.toLowerCase() }, i.status)
1407
- ),
1408
- l(
1409
- "p",
1410
- { class: "date" },
1411
- i.transId,
1412
- " | ",
1413
- ze.dateToFormatedString(new Date(i.created), i.dateformat)
1414
- ),
1415
- l(
1416
- "p",
1417
- { class: "text-style" },
1418
- Ve.format(i.currency, i.realAmount),
1419
- " "
1420
- )
1421
- ), yr = (i) => l(
1422
- "div",
1423
- { class: "page-size" },
1424
- l("span", null, g.translate("show", i.language)),
1425
- i.pageSizes.map((a) => l("button", { class: i.currentPageSize === a ? "active" : "", onClick: () => i.changePageSize(a) }, a))
1426
- ), br = ({ source: i, language: a, dateformat: t }) => {
1427
- const r = [
1428
- { name: g.translate("transactionId", a) },
1429
- {
1430
- name: g.translate("date", a)
1431
- },
1432
- {
1433
- name: g.translate("amount", a)
1434
- },
1435
- { name: g.translate("productType", a) },
1436
- {
1437
- name: g.translate("status", a)
1438
- }
1439
- ];
1440
- return l(
1441
- "table",
1442
- null,
1443
- l(
1444
- "thead",
1445
- null,
1446
- l("tr", null, r.map((e) => l("th", null, e.name)))
1447
- ),
1448
- l("tbody", null, i.map((e) => l(
1449
- "tr",
1450
- null,
1451
- l("td", null, e.transId),
1452
- l("td", null, ze.dateToFormatedString(new Date(e.created), t)),
1453
- l(
1454
- "td",
1455
- null,
1456
- Ve.format(e.currency, e.realAmount),
1457
- " "
1458
- ),
1459
- l("td", null, e.productType),
1460
- l(
1461
- "td",
1462
- null,
1463
- l("span", { class: e.status.toLowerCase() }, e.status)
1464
- )
1465
- )))
1466
- );
1467
- };
1468
- function Se(i, a) {
1469
- if (i) {
1470
- const t = document.createElement("style");
1471
- t.innerHTML = a, i.appendChild(t);
1472
- }
1473
- }
1474
- function He(i, a) {
1475
- const t = new URL(a);
1476
- fetch(t.href).then((r) => r.text()).then((r) => {
1477
- const e = document.createElement("style");
1478
- e.innerHTML = r, i && i.appendChild(e);
1479
- }).catch((r) => {
1480
- console.error("There was an error while trying to load client styling from URL", r);
1481
- });
1482
- }
1483
- function Tr(i, a, t) {
1484
- if (window.emMessageBus) {
1485
- const r = document.createElement("style");
1486
- window.emMessageBus.subscribe(a, (e) => {
1487
- r.innerHTML = e, i && i.appendChild(r);
1488
- });
1489
- }
1490
- }
1491
- function Ne(i, a) {
1492
- (a == null || a > i.length) && (a = i.length);
1493
- for (var t = 0, r = Array(a); t < a; t++)
1494
- r[t] = i[t];
1495
- return r;
1496
- }
1497
- function xr(i, a) {
1498
- if (i) {
1499
- if (typeof i == "string")
1500
- return Ne(i, a);
1501
- var t = {}.toString.call(i).slice(8, -1);
1502
- return t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set" ? Array.from(i) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Ne(i, a) : void 0;
1503
- }
1504
- }
1505
- function Ae(i, a) {
1506
- var t = typeof Symbol != "undefined" && i[Symbol.iterator] || i["@@iterator"];
1507
- if (!t) {
1508
- if (Array.isArray(i) || (t = xr(i)) || a) {
1509
- t && (i = t);
1510
- var r = 0, e = function() {
1511
- };
1512
- return {
1513
- s: e,
1514
- n: function() {
1515
- return r >= i.length ? {
1516
- done: !0
1517
- } : {
1518
- done: !1,
1519
- value: i[r++]
1520
- };
1521
- },
1522
- e: function(f) {
1523
- throw f;
1524
- },
1525
- f: e
1526
- };
1527
- }
1528
- throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1529
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1530
- }
1531
- var o, n = !0, s = !1;
1532
- return {
1533
- s: function() {
1534
- t = t.call(i);
1535
- },
1536
- n: function() {
1537
- var f = t.next();
1538
- return n = f.done, f;
1539
- },
1540
- e: function(f) {
1541
- s = !0, o = f;
1542
- },
1543
- f: function() {
1544
- try {
1545
- n || t.return == null || t.return();
1546
- } finally {
1547
- if (s)
1548
- throw o;
1549
- }
1550
- }
1551
- };
1552
- }
1553
- function Cr(i, a) {
1554
- if (i == null)
1555
- throw new TypeError("assign requires that input parameter not be null or undefined");
1556
- for (var t in a)
1557
- Object.prototype.hasOwnProperty.call(a, t) && (i[t] = a[t]);
1558
- return i;
1559
- }
1560
- function d(i) {
1561
- if (i === void 0)
1562
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1563
- return i;
1564
- }
1565
- function be(i, a) {
1566
- return be = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
1567
- return t.__proto__ = r, t;
1568
- }, be(i, a);
1569
- }
1570
- function m(i, a) {
1571
- if (typeof a != "function" && a !== null)
1572
- throw new TypeError("Super expression must either be null or a function");
1573
- i.prototype = Object.create(a && a.prototype, {
1574
- constructor: {
1575
- value: i,
1576
- writable: !0,
1577
- configurable: !0
1578
- }
1579
- }), Object.defineProperty(i, "prototype", {
1580
- writable: !1
1581
- }), a && be(i, a);
1582
- }
1583
- function he(i) {
1584
- return he = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(a) {
1585
- return a.__proto__ || Object.getPrototypeOf(a);
1586
- }, he(i);
1587
- }
1588
- function Ke() {
1589
- try {
1590
- var i = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
1591
- }));
1592
- } catch (a) {
1593
- }
1594
- return (Ke = function() {
1595
- return !!i;
1596
- })();
1597
- }
1598
- function Dr(i, a) {
1599
- if (a && (Q(a) == "object" || typeof a == "function"))
1600
- return a;
1601
- if (a !== void 0)
1602
- throw new TypeError("Derived constructors may only return object or undefined");
1603
- return d(i);
1604
- }
1605
- function p(i) {
1606
- var a = Ke();
1607
- return function() {
1608
- var t, r = he(i);
1609
- if (a) {
1610
- var e = he(this).constructor;
1611
- t = Reflect.construct(r, arguments, e);
1612
- } else
1613
- t = r.apply(this, arguments);
1614
- return Dr(this, t);
1615
- };
1616
- }
1617
- function h(i, a) {
1618
- if (!(i instanceof a))
1619
- throw new TypeError("Cannot call a class as a function");
1620
- }
1621
- function kr(i, a) {
1622
- if (Q(i) != "object" || !i)
1623
- return i;
1624
- var t = i[Symbol.toPrimitive];
1625
- if (t !== void 0) {
1626
- var r = t.call(i, a);
1627
- if (Q(r) != "object")
1628
- return r;
1629
- throw new TypeError("@@toPrimitive must return a primitive value.");
1630
- }
1631
- return (a === "string" ? String : Number)(i);
1632
- }
1633
- function Ze(i) {
1634
- var a = kr(i, "string");
1635
- return Q(a) == "symbol" ? a : a + "";
1636
- }
1637
- function Pr(i, a) {
1638
- for (var t = 0; t < a.length; t++) {
1639
- var r = a[t];
1640
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(i, Ze(r.key), r);
1641
- }
1642
- }
1643
- function v(i, a, t) {
1644
- return a && Pr(i.prototype, a), Object.defineProperty(i, "prototype", {
1645
- writable: !1
1646
- }), i;
1647
- }
1648
- function c(i, a, t) {
1649
- return (a = Ze(a)) in i ? Object.defineProperty(i, a, {
1650
- value: t,
1651
- enumerable: !0,
1652
- configurable: !0,
1653
- writable: !0
1654
- }) : i[a] = t, i;
1655
- }
1656
- var Mr = 10, Je = /* @__PURE__ */ function() {
1657
- function i() {
1658
- h(this, i), c(this, "priority", void 0), c(this, "subPriority", 0);
1659
- }
1660
- return v(i, [{
1661
- key: "validate",
1662
- value: function(t, r) {
1663
- return !0;
1664
- }
1665
- }]), i;
1666
- }(), Or = /* @__PURE__ */ function(i) {
1667
- m(t, i);
1668
- var a = p(t);
1669
- function t(r, e, o, n, s) {
1670
- var u;
1671
- return h(this, t), u = a.call(this), u.value = r, u.validateValue = e, u.setValue = o, u.priority = n, s && (u.subPriority = s), u;
1672
- }
1673
- return v(t, [{
1674
- key: "validate",
1675
- value: function(e, o) {
1676
- return this.validateValue(e, this.value, o);
1677
- }
1678
- }, {
1679
- key: "set",
1680
- value: function(e, o, n) {
1681
- return this.setValue(e, o, this.value, n);
1682
- }
1683
- }]), t;
1684
- }(Je), Ur = /* @__PURE__ */ function(i) {
1685
- m(t, i);
1686
- var a = p(t);
1687
- function t() {
1688
- var r;
1689
- h(this, t);
1690
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1691
- o[n] = arguments[n];
1692
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", Mr), c(d(r), "subPriority", -1), r;
1693
- }
1694
- return v(t, [{
1695
- key: "set",
1696
- value: function(e, o) {
1697
- if (o.timestampIsSet)
1698
- return e;
1699
- var n = /* @__PURE__ */ new Date(0);
1700
- return n.setFullYear(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), n.setHours(e.getUTCHours(), e.getUTCMinutes(), e.getUTCSeconds(), e.getUTCMilliseconds()), n;
1701
- }
1702
- }]), t;
1703
- }(Je), b = /* @__PURE__ */ function() {
1704
- function i() {
1705
- h(this, i), c(this, "incompatibleTokens", void 0), c(this, "priority", void 0), c(this, "subPriority", void 0);
1706
- }
1707
- return v(i, [{
1708
- key: "run",
1709
- value: function(t, r, e, o) {
1710
- var n = this.parse(t, r, e, o);
1711
- return n ? {
1712
- setter: new Or(n.value, this.validate, this.set, this.priority, this.subPriority),
1713
- rest: n.rest
1714
- } : null;
1715
- }
1716
- }, {
1717
- key: "validate",
1718
- value: function(t, r, e) {
1719
- return !0;
1720
- }
1721
- }]), i;
1722
- }(), Er = /* @__PURE__ */ function(i) {
1723
- m(t, i);
1724
- var a = p(t);
1725
- function t() {
1726
- var r;
1727
- h(this, t);
1728
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1729
- o[n] = arguments[n];
1730
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 140), c(d(r), "incompatibleTokens", ["R", "u", "t", "T"]), r;
1731
- }
1732
- return v(t, [{
1733
- key: "parse",
1734
- value: function(e, o, n) {
1735
- switch (o) {
1736
- case "G":
1737
- case "GG":
1738
- case "GGG":
1739
- return n.era(e, {
1740
- width: "abbreviated"
1741
- }) || n.era(e, {
1742
- width: "narrow"
1743
- });
1744
- case "GGGGG":
1745
- return n.era(e, {
1746
- width: "narrow"
1747
- });
1748
- case "GGGG":
1749
- default:
1750
- return n.era(e, {
1751
- width: "wide"
1752
- }) || n.era(e, {
1753
- width: "abbreviated"
1754
- }) || n.era(e, {
1755
- width: "narrow"
1756
- });
1757
- }
1758
- }
1759
- }, {
1760
- key: "set",
1761
- value: function(e, o, n) {
1762
- return o.era = n, e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1763
- }
1764
- }]), t;
1765
- }(b), Yr = 6e4, _r = 36e5, Wr = 1e3, O = {
1766
- month: /^(1[0-2]|0?\d)/,
1767
- // 0 to 12
1768
- date: /^(3[0-1]|[0-2]?\d)/,
1769
- // 0 to 31
1770
- dayOfYear: /^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,
1771
- // 0 to 366
1772
- week: /^(5[0-3]|[0-4]?\d)/,
1773
- // 0 to 53
1774
- hour23h: /^(2[0-3]|[0-1]?\d)/,
1775
- // 0 to 23
1776
- hour24h: /^(2[0-4]|[0-1]?\d)/,
1777
- // 0 to 24
1778
- hour11h: /^(1[0-1]|0?\d)/,
1779
- // 0 to 11
1780
- hour12h: /^(1[0-2]|0?\d)/,
1781
- // 0 to 12
1782
- minute: /^[0-5]?\d/,
1783
- // 0 to 59
1784
- second: /^[0-5]?\d/,
1785
- // 0 to 59
1786
- singleDigit: /^\d/,
1787
- // 0 to 9
1788
- twoDigits: /^\d{1,2}/,
1789
- // 0 to 99
1790
- threeDigits: /^\d{1,3}/,
1791
- // 0 to 999
1792
- fourDigits: /^\d{1,4}/,
1793
- // 0 to 9999
1794
- anyDigitsSigned: /^-?\d+/,
1795
- singleDigitSigned: /^-?\d/,
1796
- // 0 to 9, -0 to -9
1797
- twoDigitsSigned: /^-?\d{1,2}/,
1798
- // 0 to 99, -0 to -99
1799
- threeDigitsSigned: /^-?\d{1,3}/,
1800
- // 0 to 999, -0 to -999
1801
- fourDigitsSigned: /^-?\d{1,4}/
1802
- // 0 to 9999, -0 to -9999
1803
- }, q = {
1804
- basicOptionalMinutes: /^([+-])(\d{2})(\d{2})?|Z/,
1805
- basic: /^([+-])(\d{2})(\d{2})|Z/,
1806
- basicOptionalSeconds: /^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,
1807
- extended: /^([+-])(\d{2}):(\d{2})|Z/,
1808
- extendedOptionalSeconds: /^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/
1809
- };
1810
- function U(i, a) {
1811
- return i && {
1812
- value: a(i.value),
1813
- rest: i.rest
1814
- };
1815
- }
1816
- function D(i, a) {
1817
- var t = a.match(i);
1818
- return t ? {
1819
- value: parseInt(t[0], 10),
1820
- rest: a.slice(t[0].length)
1821
- } : null;
1822
- }
1823
- function B(i, a) {
1824
- var t = a.match(i);
1825
- if (!t)
1826
- return null;
1827
- if (t[0] === "Z")
1828
- return {
1829
- value: 0,
1830
- rest: a.slice(1)
1831
- };
1832
- var r = t[1] === "+" ? 1 : -1, e = t[2] ? parseInt(t[2], 10) : 0, o = t[3] ? parseInt(t[3], 10) : 0, n = t[5] ? parseInt(t[5], 10) : 0;
1833
- return {
1834
- value: r * (e * _r + o * Yr + n * Wr),
1835
- rest: a.slice(t[0].length)
1836
- };
1837
- }
1838
- function et(i) {
1839
- return D(O.anyDigitsSigned, i);
1840
- }
1841
- function P(i, a) {
1842
- switch (i) {
1843
- case 1:
1844
- return D(O.singleDigit, a);
1845
- case 2:
1846
- return D(O.twoDigits, a);
1847
- case 3:
1848
- return D(O.threeDigits, a);
1849
- case 4:
1850
- return D(O.fourDigits, a);
1851
- default:
1852
- return D(new RegExp("^\\d{1," + i + "}"), a);
1853
- }
1854
- }
1855
- function ve(i, a) {
1856
- switch (i) {
1857
- case 1:
1858
- return D(O.singleDigitSigned, a);
1859
- case 2:
1860
- return D(O.twoDigitsSigned, a);
1861
- case 3:
1862
- return D(O.threeDigitsSigned, a);
1863
- case 4:
1864
- return D(O.fourDigitsSigned, a);
1865
- default:
1866
- return D(new RegExp("^-?\\d{1," + i + "}"), a);
1867
- }
1868
- }
1869
- function xe(i) {
1870
- switch (i) {
1871
- case "morning":
1872
- return 4;
1873
- case "evening":
1874
- return 17;
1875
- case "pm":
1876
- case "noon":
1877
- case "afternoon":
1878
- return 12;
1879
- case "am":
1880
- case "midnight":
1881
- case "night":
1882
- default:
1883
- return 0;
1884
- }
1885
- }
1886
- function tt(i, a) {
1887
- var t = a > 0, r = t ? a : 1 - a, e;
1888
- if (r <= 50)
1889
- e = i || 100;
1890
- else {
1891
- var o = r + 50, n = Math.floor(o / 100) * 100, s = i >= o % 100;
1892
- e = i + n - (s ? 100 : 0);
1893
- }
1894
- return t ? e : 1 - e;
1895
- }
1896
- function rt(i) {
1897
- return i % 400 === 0 || i % 4 === 0 && i % 100 !== 0;
1898
- }
1899
- var Lr = /* @__PURE__ */ function(i) {
1900
- m(t, i);
1901
- var a = p(t);
1902
- function t() {
1903
- var r;
1904
- h(this, t);
1905
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1906
- o[n] = arguments[n];
1907
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 130), c(d(r), "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]), r;
1908
- }
1909
- return v(t, [{
1910
- key: "parse",
1911
- value: function(e, o, n) {
1912
- var s = function(f) {
1913
- return {
1914
- year: f,
1915
- isTwoDigitYear: o === "yy"
1916
- };
1917
- };
1918
- switch (o) {
1919
- case "y":
1920
- return U(P(4, e), s);
1921
- case "yo":
1922
- return U(n.ordinalNumber(e, {
1923
- unit: "year"
1924
- }), s);
1925
- default:
1926
- return U(P(o.length, e), s);
1927
- }
1928
- }
1929
- }, {
1930
- key: "validate",
1931
- value: function(e, o) {
1932
- return o.isTwoDigitYear || o.year > 0;
1933
- }
1934
- }, {
1935
- key: "set",
1936
- value: function(e, o, n) {
1937
- var s = e.getUTCFullYear();
1938
- if (n.isTwoDigitYear) {
1939
- var u = tt(n.year, s);
1940
- return e.setUTCFullYear(u, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1941
- }
1942
- var f = !("era" in o) || o.era === 1 ? n.year : 1 - n.year;
1943
- return e.setUTCFullYear(f, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
1944
- }
1945
- }]), t;
1946
- }(b), Sr = /* @__PURE__ */ function(i) {
1947
- m(t, i);
1948
- var a = p(t);
1949
- function t() {
1950
- var r;
1951
- h(this, t);
1952
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
1953
- o[n] = arguments[n];
1954
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 130), c(d(r), "incompatibleTokens", ["y", "R", "u", "Q", "q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
1955
- }
1956
- return v(t, [{
1957
- key: "parse",
1958
- value: function(e, o, n) {
1959
- var s = function(f) {
1960
- return {
1961
- year: f,
1962
- isTwoDigitYear: o === "YY"
1963
- };
1964
- };
1965
- switch (o) {
1966
- case "Y":
1967
- return U(P(4, e), s);
1968
- case "Yo":
1969
- return U(n.ordinalNumber(e, {
1970
- unit: "year"
1971
- }), s);
1972
- default:
1973
- return U(P(o.length, e), s);
1974
- }
1975
- }
1976
- }, {
1977
- key: "validate",
1978
- value: function(e, o) {
1979
- return o.isTwoDigitYear || o.year > 0;
1980
- }
1981
- }, {
1982
- key: "set",
1983
- value: function(e, o, n, s) {
1984
- var u = Te(e, s);
1985
- if (n.isTwoDigitYear) {
1986
- var f = tt(n.year, u);
1987
- return e.setUTCFullYear(f, 0, s.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), Z(e, s);
1988
- }
1989
- var w = !("era" in o) || o.era === 1 ? n.year : 1 - n.year;
1990
- return e.setUTCFullYear(w, 0, s.firstWeekContainsDate), e.setUTCHours(0, 0, 0, 0), Z(e, s);
1991
- }
1992
- }]), t;
1993
- }(b), Hr = /* @__PURE__ */ function(i) {
1994
- m(t, i);
1995
- var a = p(t);
1996
- function t() {
1997
- var r;
1998
- h(this, t);
1999
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2000
- o[n] = arguments[n];
2001
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 130), c(d(r), "incompatibleTokens", ["G", "y", "Y", "u", "Q", "q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
2002
- }
2003
- return v(t, [{
2004
- key: "parse",
2005
- value: function(e, o) {
2006
- return ve(o === "R" ? 4 : o.length, e);
2007
- }
2008
- }, {
2009
- key: "set",
2010
- value: function(e, o, n) {
2011
- var s = /* @__PURE__ */ new Date(0);
2012
- return s.setUTCFullYear(n, 0, 4), s.setUTCHours(0, 0, 0, 0), ee(s);
2013
- }
2014
- }]), t;
2015
- }(b), Nr = /* @__PURE__ */ function(i) {
2016
- m(t, i);
2017
- var a = p(t);
2018
- function t() {
2019
- var r;
2020
- h(this, t);
2021
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2022
- o[n] = arguments[n];
2023
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 130), c(d(r), "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]), r;
2024
- }
2025
- return v(t, [{
2026
- key: "parse",
2027
- value: function(e, o) {
2028
- return ve(o === "u" ? 4 : o.length, e);
2029
- }
2030
- }, {
2031
- key: "set",
2032
- value: function(e, o, n) {
2033
- return e.setUTCFullYear(n, 0, 1), e.setUTCHours(0, 0, 0, 0), e;
2034
- }
2035
- }]), t;
2036
- }(b), Ar = /* @__PURE__ */ function(i) {
2037
- m(t, i);
2038
- var a = p(t);
2039
- function t() {
2040
- var r;
2041
- h(this, t);
2042
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2043
- o[n] = arguments[n];
2044
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 120), c(d(r), "incompatibleTokens", ["Y", "R", "q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
2045
- }
2046
- return v(t, [{
2047
- key: "parse",
2048
- value: function(e, o, n) {
2049
- switch (o) {
2050
- case "Q":
2051
- case "QQ":
2052
- return P(o.length, e);
2053
- case "Qo":
2054
- return n.ordinalNumber(e, {
2055
- unit: "quarter"
2056
- });
2057
- case "QQQ":
2058
- return n.quarter(e, {
2059
- width: "abbreviated",
2060
- context: "formatting"
2061
- }) || n.quarter(e, {
2062
- width: "narrow",
2063
- context: "formatting"
2064
- });
2065
- case "QQQQQ":
2066
- return n.quarter(e, {
2067
- width: "narrow",
2068
- context: "formatting"
2069
- });
2070
- case "QQQQ":
2071
- default:
2072
- return n.quarter(e, {
2073
- width: "wide",
2074
- context: "formatting"
2075
- }) || n.quarter(e, {
2076
- width: "abbreviated",
2077
- context: "formatting"
2078
- }) || n.quarter(e, {
2079
- width: "narrow",
2080
- context: "formatting"
2081
- });
2082
- }
2083
- }
2084
- }, {
2085
- key: "validate",
2086
- value: function(e, o) {
2087
- return o >= 1 && o <= 4;
2088
- }
2089
- }, {
2090
- key: "set",
2091
- value: function(e, o, n) {
2092
- return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
2093
- }
2094
- }]), t;
2095
- }(b), Fr = /* @__PURE__ */ function(i) {
2096
- m(t, i);
2097
- var a = p(t);
2098
- function t() {
2099
- var r;
2100
- h(this, t);
2101
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2102
- o[n] = arguments[n];
2103
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 120), c(d(r), "incompatibleTokens", ["Y", "R", "Q", "M", "L", "w", "I", "d", "D", "i", "e", "c", "t", "T"]), r;
2104
- }
2105
- return v(t, [{
2106
- key: "parse",
2107
- value: function(e, o, n) {
2108
- switch (o) {
2109
- case "q":
2110
- case "qq":
2111
- return P(o.length, e);
2112
- case "qo":
2113
- return n.ordinalNumber(e, {
2114
- unit: "quarter"
2115
- });
2116
- case "qqq":
2117
- return n.quarter(e, {
2118
- width: "abbreviated",
2119
- context: "standalone"
2120
- }) || n.quarter(e, {
2121
- width: "narrow",
2122
- context: "standalone"
2123
- });
2124
- case "qqqqq":
2125
- return n.quarter(e, {
2126
- width: "narrow",
2127
- context: "standalone"
2128
- });
2129
- case "qqqq":
2130
- default:
2131
- return n.quarter(e, {
2132
- width: "wide",
2133
- context: "standalone"
2134
- }) || n.quarter(e, {
2135
- width: "abbreviated",
2136
- context: "standalone"
2137
- }) || n.quarter(e, {
2138
- width: "narrow",
2139
- context: "standalone"
2140
- });
2141
- }
2142
- }
2143
- }, {
2144
- key: "validate",
2145
- value: function(e, o) {
2146
- return o >= 1 && o <= 4;
2147
- }
2148
- }, {
2149
- key: "set",
2150
- value: function(e, o, n) {
2151
- return e.setUTCMonth((n - 1) * 3, 1), e.setUTCHours(0, 0, 0, 0), e;
2152
- }
2153
- }]), t;
2154
- }(b), Ir = /* @__PURE__ */ function(i) {
2155
- m(t, i);
2156
- var a = p(t);
2157
- function t() {
2158
- var r;
2159
- h(this, t);
2160
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2161
- o[n] = arguments[n];
2162
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "L", "w", "I", "D", "i", "e", "c", "t", "T"]), c(d(r), "priority", 110), r;
2163
- }
2164
- return v(t, [{
2165
- key: "parse",
2166
- value: function(e, o, n) {
2167
- var s = function(f) {
2168
- return f - 1;
2169
- };
2170
- switch (o) {
2171
- case "M":
2172
- return U(D(O.month, e), s);
2173
- case "MM":
2174
- return U(P(2, e), s);
2175
- case "Mo":
2176
- return U(n.ordinalNumber(e, {
2177
- unit: "month"
2178
- }), s);
2179
- case "MMM":
2180
- return n.month(e, {
2181
- width: "abbreviated",
2182
- context: "formatting"
2183
- }) || n.month(e, {
2184
- width: "narrow",
2185
- context: "formatting"
2186
- });
2187
- case "MMMMM":
2188
- return n.month(e, {
2189
- width: "narrow",
2190
- context: "formatting"
2191
- });
2192
- case "MMMM":
2193
- default:
2194
- return n.month(e, {
2195
- width: "wide",
2196
- context: "formatting"
2197
- }) || n.month(e, {
2198
- width: "abbreviated",
2199
- context: "formatting"
2200
- }) || n.month(e, {
2201
- width: "narrow",
2202
- context: "formatting"
2203
- });
2204
- }
2205
- }
2206
- }, {
2207
- key: "validate",
2208
- value: function(e, o) {
2209
- return o >= 0 && o <= 11;
2210
- }
2211
- }, {
2212
- key: "set",
2213
- value: function(e, o, n) {
2214
- return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
2215
- }
2216
- }]), t;
2217
- }(b), qr = /* @__PURE__ */ function(i) {
2218
- m(t, i);
2219
- var a = p(t);
2220
- function t() {
2221
- var r;
2222
- h(this, t);
2223
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2224
- o[n] = arguments[n];
2225
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 110), c(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
2226
- }
2227
- return v(t, [{
2228
- key: "parse",
2229
- value: function(e, o, n) {
2230
- var s = function(f) {
2231
- return f - 1;
2232
- };
2233
- switch (o) {
2234
- case "L":
2235
- return U(D(O.month, e), s);
2236
- case "LL":
2237
- return U(P(2, e), s);
2238
- case "Lo":
2239
- return U(n.ordinalNumber(e, {
2240
- unit: "month"
2241
- }), s);
2242
- case "LLL":
2243
- return n.month(e, {
2244
- width: "abbreviated",
2245
- context: "standalone"
2246
- }) || n.month(e, {
2247
- width: "narrow",
2248
- context: "standalone"
2249
- });
2250
- case "LLLLL":
2251
- return n.month(e, {
2252
- width: "narrow",
2253
- context: "standalone"
2254
- });
2255
- case "LLLL":
2256
- default:
2257
- return n.month(e, {
2258
- width: "wide",
2259
- context: "standalone"
2260
- }) || n.month(e, {
2261
- width: "abbreviated",
2262
- context: "standalone"
2263
- }) || n.month(e, {
2264
- width: "narrow",
2265
- context: "standalone"
2266
- });
2267
- }
2268
- }
2269
- }, {
2270
- key: "validate",
2271
- value: function(e, o) {
2272
- return o >= 0 && o <= 11;
2273
- }
2274
- }, {
2275
- key: "set",
2276
- value: function(e, o, n) {
2277
- return e.setUTCMonth(n, 1), e.setUTCHours(0, 0, 0, 0), e;
2278
- }
2279
- }]), t;
2280
- }(b);
2281
- function Br(i, a, t) {
2282
- M(2, arguments);
2283
- var r = W(i), e = S(a), o = $e(r, t) - e;
2284
- return r.setUTCDate(r.getUTCDate() - o * 7), r;
2285
- }
2286
- var $r = /* @__PURE__ */ function(i) {
2287
- m(t, i);
2288
- var a = p(t);
2289
- function t() {
2290
- var r;
2291
- h(this, t);
2292
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2293
- o[n] = arguments[n];
2294
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 100), c(d(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "i", "t", "T"]), r;
2295
- }
2296
- return v(t, [{
2297
- key: "parse",
2298
- value: function(e, o, n) {
2299
- switch (o) {
2300
- case "w":
2301
- return D(O.week, e);
2302
- case "wo":
2303
- return n.ordinalNumber(e, {
2304
- unit: "week"
2305
- });
2306
- default:
2307
- return P(o.length, e);
2308
- }
2309
- }
2310
- }, {
2311
- key: "validate",
2312
- value: function(e, o) {
2313
- return o >= 1 && o <= 53;
2314
- }
2315
- }, {
2316
- key: "set",
2317
- value: function(e, o, n, s) {
2318
- return Z(Br(e, n, s), s);
2319
- }
2320
- }]), t;
2321
- }(b);
2322
- function Rr(i, a) {
2323
- M(2, arguments);
2324
- var t = W(i), r = S(a), e = Be(t) - r;
2325
- return t.setUTCDate(t.getUTCDate() - e * 7), t;
2326
- }
2327
- var Qr = /* @__PURE__ */ function(i) {
2328
- m(t, i);
2329
- var a = p(t);
2330
- function t() {
2331
- var r;
2332
- h(this, t);
2333
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2334
- o[n] = arguments[n];
2335
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 100), c(d(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "e", "c", "t", "T"]), r;
2336
- }
2337
- return v(t, [{
2338
- key: "parse",
2339
- value: function(e, o, n) {
2340
- switch (o) {
2341
- case "I":
2342
- return D(O.week, e);
2343
- case "Io":
2344
- return n.ordinalNumber(e, {
2345
- unit: "week"
2346
- });
2347
- default:
2348
- return P(o.length, e);
2349
- }
2350
- }
2351
- }, {
2352
- key: "validate",
2353
- value: function(e, o) {
2354
- return o >= 1 && o <= 53;
2355
- }
2356
- }, {
2357
- key: "set",
2358
- value: function(e, o, n) {
2359
- return ee(Rr(e, n));
2360
- }
2361
- }]), t;
2362
- }(b), jr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Xr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Gr = /* @__PURE__ */ function(i) {
2363
- m(t, i);
2364
- var a = p(t);
2365
- function t() {
2366
- var r;
2367
- h(this, t);
2368
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2369
- o[n] = arguments[n];
2370
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 90), c(d(r), "subPriority", 1), c(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "w", "I", "D", "i", "e", "c", "t", "T"]), r;
2371
- }
2372
- return v(t, [{
2373
- key: "parse",
2374
- value: function(e, o, n) {
2375
- switch (o) {
2376
- case "d":
2377
- return D(O.date, e);
2378
- case "do":
2379
- return n.ordinalNumber(e, {
2380
- unit: "date"
2381
- });
2382
- default:
2383
- return P(o.length, e);
2384
- }
2385
- }
2386
- }, {
2387
- key: "validate",
2388
- value: function(e, o) {
2389
- var n = e.getUTCFullYear(), s = rt(n), u = e.getUTCMonth();
2390
- return s ? o >= 1 && o <= Xr[u] : o >= 1 && o <= jr[u];
2391
- }
2392
- }, {
2393
- key: "set",
2394
- value: function(e, o, n) {
2395
- return e.setUTCDate(n), e.setUTCHours(0, 0, 0, 0), e;
2396
- }
2397
- }]), t;
2398
- }(b), zr = /* @__PURE__ */ function(i) {
2399
- m(t, i);
2400
- var a = p(t);
2401
- function t() {
2402
- var r;
2403
- h(this, t);
2404
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2405
- o[n] = arguments[n];
2406
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 90), c(d(r), "subpriority", 1), c(d(r), "incompatibleTokens", ["Y", "R", "q", "Q", "M", "L", "w", "I", "d", "E", "i", "e", "c", "t", "T"]), r;
2407
- }
2408
- return v(t, [{
2409
- key: "parse",
2410
- value: function(e, o, n) {
2411
- switch (o) {
2412
- case "D":
2413
- case "DD":
2414
- return D(O.dayOfYear, e);
2415
- case "Do":
2416
- return n.ordinalNumber(e, {
2417
- unit: "date"
2418
- });
2419
- default:
2420
- return P(o.length, e);
2421
- }
2422
- }
2423
- }, {
2424
- key: "validate",
2425
- value: function(e, o) {
2426
- var n = e.getUTCFullYear(), s = rt(n);
2427
- return s ? o >= 1 && o <= 366 : o >= 1 && o <= 365;
2428
- }
2429
- }, {
2430
- key: "set",
2431
- value: function(e, o, n) {
2432
- return e.setUTCMonth(0, n), e.setUTCHours(0, 0, 0, 0), e;
2433
- }
2434
- }]), t;
2435
- }(b);
2436
- function Ce(i, a, t) {
2437
- var r, e, o, n, s, u, f, w;
2438
- M(2, arguments);
2439
- var y = te(), k = S((r = (e = (o = (n = t == null ? void 0 : t.weekStartsOn) !== null && n !== void 0 ? n : t == null || (s = t.locale) === null || s === void 0 || (u = s.options) === null || u === void 0 ? void 0 : u.weekStartsOn) !== null && o !== void 0 ? o : y.weekStartsOn) !== null && e !== void 0 ? e : (f = y.locale) === null || f === void 0 || (w = f.options) === null || w === void 0 ? void 0 : w.weekStartsOn) !== null && r !== void 0 ? r : 0);
2440
- if (!(k >= 0 && k <= 6))
2441
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
2442
- var C = W(i), E = S(a), F = C.getUTCDay(), H = E % 7, $ = (H + 7) % 7, L = ($ < k ? 7 : 0) + E - F;
2443
- return C.setUTCDate(C.getUTCDate() + L), C;
2444
- }
2445
- var Vr = /* @__PURE__ */ function(i) {
2446
- m(t, i);
2447
- var a = p(t);
2448
- function t() {
2449
- var r;
2450
- h(this, t);
2451
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2452
- o[n] = arguments[n];
2453
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 90), c(d(r), "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]), r;
2454
- }
2455
- return v(t, [{
2456
- key: "parse",
2457
- value: function(e, o, n) {
2458
- switch (o) {
2459
- case "E":
2460
- case "EE":
2461
- case "EEE":
2462
- return n.day(e, {
2463
- width: "abbreviated",
2464
- context: "formatting"
2465
- }) || n.day(e, {
2466
- width: "short",
2467
- context: "formatting"
2468
- }) || n.day(e, {
2469
- width: "narrow",
2470
- context: "formatting"
2471
- });
2472
- case "EEEEE":
2473
- return n.day(e, {
2474
- width: "narrow",
2475
- context: "formatting"
2476
- });
2477
- case "EEEEEE":
2478
- return n.day(e, {
2479
- width: "short",
2480
- context: "formatting"
2481
- }) || n.day(e, {
2482
- width: "narrow",
2483
- context: "formatting"
2484
- });
2485
- case "EEEE":
2486
- default:
2487
- return n.day(e, {
2488
- width: "wide",
2489
- context: "formatting"
2490
- }) || n.day(e, {
2491
- width: "abbreviated",
2492
- context: "formatting"
2493
- }) || n.day(e, {
2494
- width: "short",
2495
- context: "formatting"
2496
- }) || n.day(e, {
2497
- width: "narrow",
2498
- context: "formatting"
2499
- });
2500
- }
2501
- }
2502
- }, {
2503
- key: "validate",
2504
- value: function(e, o) {
2505
- return o >= 0 && o <= 6;
2506
- }
2507
- }, {
2508
- key: "set",
2509
- value: function(e, o, n, s) {
2510
- return e = Ce(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2511
- }
2512
- }]), t;
2513
- }(b), Kr = /* @__PURE__ */ function(i) {
2514
- m(t, i);
2515
- var a = p(t);
2516
- function t() {
2517
- var r;
2518
- h(this, t);
2519
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2520
- o[n] = arguments[n];
2521
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 90), c(d(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "c", "t", "T"]), r;
2522
- }
2523
- return v(t, [{
2524
- key: "parse",
2525
- value: function(e, o, n, s) {
2526
- var u = function(w) {
2527
- var y = Math.floor((w - 1) / 7) * 7;
2528
- return (w + s.weekStartsOn + 6) % 7 + y;
2529
- };
2530
- switch (o) {
2531
- case "e":
2532
- case "ee":
2533
- return U(P(o.length, e), u);
2534
- case "eo":
2535
- return U(n.ordinalNumber(e, {
2536
- unit: "day"
2537
- }), u);
2538
- case "eee":
2539
- return n.day(e, {
2540
- width: "abbreviated",
2541
- context: "formatting"
2542
- }) || n.day(e, {
2543
- width: "short",
2544
- context: "formatting"
2545
- }) || n.day(e, {
2546
- width: "narrow",
2547
- context: "formatting"
2548
- });
2549
- case "eeeee":
2550
- return n.day(e, {
2551
- width: "narrow",
2552
- context: "formatting"
2553
- });
2554
- case "eeeeee":
2555
- return n.day(e, {
2556
- width: "short",
2557
- context: "formatting"
2558
- }) || n.day(e, {
2559
- width: "narrow",
2560
- context: "formatting"
2561
- });
2562
- case "eeee":
2563
- default:
2564
- return n.day(e, {
2565
- width: "wide",
2566
- context: "formatting"
2567
- }) || n.day(e, {
2568
- width: "abbreviated",
2569
- context: "formatting"
2570
- }) || n.day(e, {
2571
- width: "short",
2572
- context: "formatting"
2573
- }) || n.day(e, {
2574
- width: "narrow",
2575
- context: "formatting"
2576
- });
2577
- }
2578
- }
2579
- }, {
2580
- key: "validate",
2581
- value: function(e, o) {
2582
- return o >= 0 && o <= 6;
2583
- }
2584
- }, {
2585
- key: "set",
2586
- value: function(e, o, n, s) {
2587
- return e = Ce(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2588
- }
2589
- }]), t;
2590
- }(b), Zr = /* @__PURE__ */ function(i) {
2591
- m(t, i);
2592
- var a = p(t);
2593
- function t() {
2594
- var r;
2595
- h(this, t);
2596
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2597
- o[n] = arguments[n];
2598
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 90), c(d(r), "incompatibleTokens", ["y", "R", "u", "q", "Q", "M", "L", "I", "d", "D", "E", "i", "e", "t", "T"]), r;
2599
- }
2600
- return v(t, [{
2601
- key: "parse",
2602
- value: function(e, o, n, s) {
2603
- var u = function(w) {
2604
- var y = Math.floor((w - 1) / 7) * 7;
2605
- return (w + s.weekStartsOn + 6) % 7 + y;
2606
- };
2607
- switch (o) {
2608
- case "c":
2609
- case "cc":
2610
- return U(P(o.length, e), u);
2611
- case "co":
2612
- return U(n.ordinalNumber(e, {
2613
- unit: "day"
2614
- }), u);
2615
- case "ccc":
2616
- return n.day(e, {
2617
- width: "abbreviated",
2618
- context: "standalone"
2619
- }) || n.day(e, {
2620
- width: "short",
2621
- context: "standalone"
2622
- }) || n.day(e, {
2623
- width: "narrow",
2624
- context: "standalone"
2625
- });
2626
- case "ccccc":
2627
- return n.day(e, {
2628
- width: "narrow",
2629
- context: "standalone"
2630
- });
2631
- case "cccccc":
2632
- return n.day(e, {
2633
- width: "short",
2634
- context: "standalone"
2635
- }) || n.day(e, {
2636
- width: "narrow",
2637
- context: "standalone"
2638
- });
2639
- case "cccc":
2640
- default:
2641
- return n.day(e, {
2642
- width: "wide",
2643
- context: "standalone"
2644
- }) || n.day(e, {
2645
- width: "abbreviated",
2646
- context: "standalone"
2647
- }) || n.day(e, {
2648
- width: "short",
2649
- context: "standalone"
2650
- }) || n.day(e, {
2651
- width: "narrow",
2652
- context: "standalone"
2653
- });
2654
- }
2655
- }
2656
- }, {
2657
- key: "validate",
2658
- value: function(e, o) {
2659
- return o >= 0 && o <= 6;
2660
- }
2661
- }, {
2662
- key: "set",
2663
- value: function(e, o, n, s) {
2664
- return e = Ce(e, n, s), e.setUTCHours(0, 0, 0, 0), e;
2665
- }
2666
- }]), t;
2667
- }(b);
2668
- function Jr(i, a) {
2669
- M(2, arguments);
2670
- var t = S(a);
2671
- t % 7 === 0 && (t = t - 7);
2672
- var r = 1, e = W(i), o = e.getUTCDay(), n = t % 7, s = (n + 7) % 7, u = (s < r ? 7 : 0) + t - o;
2673
- return e.setUTCDate(e.getUTCDate() + u), e;
2674
- }
2675
- var ea = /* @__PURE__ */ function(i) {
2676
- m(t, i);
2677
- var a = p(t);
2678
- function t() {
2679
- var r;
2680
- h(this, t);
2681
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2682
- o[n] = arguments[n];
2683
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 90), c(d(r), "incompatibleTokens", ["y", "Y", "u", "q", "Q", "M", "L", "w", "d", "D", "E", "e", "c", "t", "T"]), r;
2684
- }
2685
- return v(t, [{
2686
- key: "parse",
2687
- value: function(e, o, n) {
2688
- var s = function(f) {
2689
- return f === 0 ? 7 : f;
2690
- };
2691
- switch (o) {
2692
- case "i":
2693
- case "ii":
2694
- return P(o.length, e);
2695
- case "io":
2696
- return n.ordinalNumber(e, {
2697
- unit: "day"
2698
- });
2699
- case "iii":
2700
- return U(n.day(e, {
2701
- width: "abbreviated",
2702
- context: "formatting"
2703
- }) || n.day(e, {
2704
- width: "short",
2705
- context: "formatting"
2706
- }) || n.day(e, {
2707
- width: "narrow",
2708
- context: "formatting"
2709
- }), s);
2710
- case "iiiii":
2711
- return U(n.day(e, {
2712
- width: "narrow",
2713
- context: "formatting"
2714
- }), s);
2715
- case "iiiiii":
2716
- return U(n.day(e, {
2717
- width: "short",
2718
- context: "formatting"
2719
- }) || n.day(e, {
2720
- width: "narrow",
2721
- context: "formatting"
2722
- }), s);
2723
- case "iiii":
2724
- default:
2725
- return U(n.day(e, {
2726
- width: "wide",
2727
- context: "formatting"
2728
- }) || n.day(e, {
2729
- width: "abbreviated",
2730
- context: "formatting"
2731
- }) || n.day(e, {
2732
- width: "short",
2733
- context: "formatting"
2734
- }) || n.day(e, {
2735
- width: "narrow",
2736
- context: "formatting"
2737
- }), s);
2738
- }
2739
- }
2740
- }, {
2741
- key: "validate",
2742
- value: function(e, o) {
2743
- return o >= 1 && o <= 7;
2744
- }
2745
- }, {
2746
- key: "set",
2747
- value: function(e, o, n) {
2748
- return e = Jr(e, n), e.setUTCHours(0, 0, 0, 0), e;
2749
- }
2750
- }]), t;
2751
- }(b), ta = /* @__PURE__ */ function(i) {
2752
- m(t, i);
2753
- var a = p(t);
2754
- function t() {
2755
- var r;
2756
- h(this, t);
2757
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2758
- o[n] = arguments[n];
2759
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 80), c(d(r), "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]), r;
2760
- }
2761
- return v(t, [{
2762
- key: "parse",
2763
- value: function(e, o, n) {
2764
- switch (o) {
2765
- case "a":
2766
- case "aa":
2767
- case "aaa":
2768
- return n.dayPeriod(e, {
2769
- width: "abbreviated",
2770
- context: "formatting"
2771
- }) || n.dayPeriod(e, {
2772
- width: "narrow",
2773
- context: "formatting"
2774
- });
2775
- case "aaaaa":
2776
- return n.dayPeriod(e, {
2777
- width: "narrow",
2778
- context: "formatting"
2779
- });
2780
- case "aaaa":
2781
- default:
2782
- return n.dayPeriod(e, {
2783
- width: "wide",
2784
- context: "formatting"
2785
- }) || n.dayPeriod(e, {
2786
- width: "abbreviated",
2787
- context: "formatting"
2788
- }) || n.dayPeriod(e, {
2789
- width: "narrow",
2790
- context: "formatting"
2791
- });
2792
- }
2793
- }
2794
- }, {
2795
- key: "set",
2796
- value: function(e, o, n) {
2797
- return e.setUTCHours(xe(n), 0, 0, 0), e;
2798
- }
2799
- }]), t;
2800
- }(b), ra = /* @__PURE__ */ function(i) {
2801
- m(t, i);
2802
- var a = p(t);
2803
- function t() {
2804
- var r;
2805
- h(this, t);
2806
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2807
- o[n] = arguments[n];
2808
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 80), c(d(r), "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]), r;
2809
- }
2810
- return v(t, [{
2811
- key: "parse",
2812
- value: function(e, o, n) {
2813
- switch (o) {
2814
- case "b":
2815
- case "bb":
2816
- case "bbb":
2817
- return n.dayPeriod(e, {
2818
- width: "abbreviated",
2819
- context: "formatting"
2820
- }) || n.dayPeriod(e, {
2821
- width: "narrow",
2822
- context: "formatting"
2823
- });
2824
- case "bbbbb":
2825
- return n.dayPeriod(e, {
2826
- width: "narrow",
2827
- context: "formatting"
2828
- });
2829
- case "bbbb":
2830
- default:
2831
- return n.dayPeriod(e, {
2832
- width: "wide",
2833
- context: "formatting"
2834
- }) || n.dayPeriod(e, {
2835
- width: "abbreviated",
2836
- context: "formatting"
2837
- }) || n.dayPeriod(e, {
2838
- width: "narrow",
2839
- context: "formatting"
2840
- });
2841
- }
2842
- }
2843
- }, {
2844
- key: "set",
2845
- value: function(e, o, n) {
2846
- return e.setUTCHours(xe(n), 0, 0, 0), e;
2847
- }
2848
- }]), t;
2849
- }(b), aa = /* @__PURE__ */ function(i) {
2850
- m(t, i);
2851
- var a = p(t);
2852
- function t() {
2853
- var r;
2854
- h(this, t);
2855
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2856
- o[n] = arguments[n];
2857
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 80), c(d(r), "incompatibleTokens", ["a", "b", "t", "T"]), r;
2858
- }
2859
- return v(t, [{
2860
- key: "parse",
2861
- value: function(e, o, n) {
2862
- switch (o) {
2863
- case "B":
2864
- case "BB":
2865
- case "BBB":
2866
- return n.dayPeriod(e, {
2867
- width: "abbreviated",
2868
- context: "formatting"
2869
- }) || n.dayPeriod(e, {
2870
- width: "narrow",
2871
- context: "formatting"
2872
- });
2873
- case "BBBBB":
2874
- return n.dayPeriod(e, {
2875
- width: "narrow",
2876
- context: "formatting"
2877
- });
2878
- case "BBBB":
2879
- default:
2880
- return n.dayPeriod(e, {
2881
- width: "wide",
2882
- context: "formatting"
2883
- }) || n.dayPeriod(e, {
2884
- width: "abbreviated",
2885
- context: "formatting"
2886
- }) || n.dayPeriod(e, {
2887
- width: "narrow",
2888
- context: "formatting"
2889
- });
2890
- }
2891
- }
2892
- }, {
2893
- key: "set",
2894
- value: function(e, o, n) {
2895
- return e.setUTCHours(xe(n), 0, 0, 0), e;
2896
- }
2897
- }]), t;
2898
- }(b), na = /* @__PURE__ */ function(i) {
2899
- m(t, i);
2900
- var a = p(t);
2901
- function t() {
2902
- var r;
2903
- h(this, t);
2904
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2905
- o[n] = arguments[n];
2906
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 70), c(d(r), "incompatibleTokens", ["H", "K", "k", "t", "T"]), r;
2907
- }
2908
- return v(t, [{
2909
- key: "parse",
2910
- value: function(e, o, n) {
2911
- switch (o) {
2912
- case "h":
2913
- return D(O.hour12h, e);
2914
- case "ho":
2915
- return n.ordinalNumber(e, {
2916
- unit: "hour"
2917
- });
2918
- default:
2919
- return P(o.length, e);
2920
- }
2921
- }
2922
- }, {
2923
- key: "validate",
2924
- value: function(e, o) {
2925
- return o >= 1 && o <= 12;
2926
- }
2927
- }, {
2928
- key: "set",
2929
- value: function(e, o, n) {
2930
- var s = e.getUTCHours() >= 12;
2931
- return s && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : !s && n === 12 ? e.setUTCHours(0, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
2932
- }
2933
- }]), t;
2934
- }(b), ia = /* @__PURE__ */ function(i) {
2935
- m(t, i);
2936
- var a = p(t);
2937
- function t() {
2938
- var r;
2939
- h(this, t);
2940
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2941
- o[n] = arguments[n];
2942
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 70), c(d(r), "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]), r;
2943
- }
2944
- return v(t, [{
2945
- key: "parse",
2946
- value: function(e, o, n) {
2947
- switch (o) {
2948
- case "H":
2949
- return D(O.hour23h, e);
2950
- case "Ho":
2951
- return n.ordinalNumber(e, {
2952
- unit: "hour"
2953
- });
2954
- default:
2955
- return P(o.length, e);
2956
- }
2957
- }
2958
- }, {
2959
- key: "validate",
2960
- value: function(e, o) {
2961
- return o >= 0 && o <= 23;
2962
- }
2963
- }, {
2964
- key: "set",
2965
- value: function(e, o, n) {
2966
- return e.setUTCHours(n, 0, 0, 0), e;
2967
- }
2968
- }]), t;
2969
- }(b), oa = /* @__PURE__ */ function(i) {
2970
- m(t, i);
2971
- var a = p(t);
2972
- function t() {
2973
- var r;
2974
- h(this, t);
2975
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
2976
- o[n] = arguments[n];
2977
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 70), c(d(r), "incompatibleTokens", ["h", "H", "k", "t", "T"]), r;
2978
- }
2979
- return v(t, [{
2980
- key: "parse",
2981
- value: function(e, o, n) {
2982
- switch (o) {
2983
- case "K":
2984
- return D(O.hour11h, e);
2985
- case "Ko":
2986
- return n.ordinalNumber(e, {
2987
- unit: "hour"
2988
- });
2989
- default:
2990
- return P(o.length, e);
2991
- }
2992
- }
2993
- }, {
2994
- key: "validate",
2995
- value: function(e, o) {
2996
- return o >= 0 && o <= 11;
2997
- }
2998
- }, {
2999
- key: "set",
3000
- value: function(e, o, n) {
3001
- var s = e.getUTCHours() >= 12;
3002
- return s && n < 12 ? e.setUTCHours(n + 12, 0, 0, 0) : e.setUTCHours(n, 0, 0, 0), e;
3003
- }
3004
- }]), t;
3005
- }(b), sa = /* @__PURE__ */ function(i) {
3006
- m(t, i);
3007
- var a = p(t);
3008
- function t() {
3009
- var r;
3010
- h(this, t);
3011
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3012
- o[n] = arguments[n];
3013
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 70), c(d(r), "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]), r;
3014
- }
3015
- return v(t, [{
3016
- key: "parse",
3017
- value: function(e, o, n) {
3018
- switch (o) {
3019
- case "k":
3020
- return D(O.hour24h, e);
3021
- case "ko":
3022
- return n.ordinalNumber(e, {
3023
- unit: "hour"
3024
- });
3025
- default:
3026
- return P(o.length, e);
3027
- }
3028
- }
3029
- }, {
3030
- key: "validate",
3031
- value: function(e, o) {
3032
- return o >= 1 && o <= 24;
3033
- }
3034
- }, {
3035
- key: "set",
3036
- value: function(e, o, n) {
3037
- var s = n <= 24 ? n % 24 : n;
3038
- return e.setUTCHours(s, 0, 0, 0), e;
3039
- }
3040
- }]), t;
3041
- }(b), ua = /* @__PURE__ */ function(i) {
3042
- m(t, i);
3043
- var a = p(t);
3044
- function t() {
3045
- var r;
3046
- h(this, t);
3047
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3048
- o[n] = arguments[n];
3049
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 60), c(d(r), "incompatibleTokens", ["t", "T"]), r;
3050
- }
3051
- return v(t, [{
3052
- key: "parse",
3053
- value: function(e, o, n) {
3054
- switch (o) {
3055
- case "m":
3056
- return D(O.minute, e);
3057
- case "mo":
3058
- return n.ordinalNumber(e, {
3059
- unit: "minute"
3060
- });
3061
- default:
3062
- return P(o.length, e);
3063
- }
3064
- }
3065
- }, {
3066
- key: "validate",
3067
- value: function(e, o) {
3068
- return o >= 0 && o <= 59;
3069
- }
3070
- }, {
3071
- key: "set",
3072
- value: function(e, o, n) {
3073
- return e.setUTCMinutes(n, 0, 0), e;
3074
- }
3075
- }]), t;
3076
- }(b), la = /* @__PURE__ */ function(i) {
3077
- m(t, i);
3078
- var a = p(t);
3079
- function t() {
3080
- var r;
3081
- h(this, t);
3082
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3083
- o[n] = arguments[n];
3084
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 50), c(d(r), "incompatibleTokens", ["t", "T"]), r;
3085
- }
3086
- return v(t, [{
3087
- key: "parse",
3088
- value: function(e, o, n) {
3089
- switch (o) {
3090
- case "s":
3091
- return D(O.second, e);
3092
- case "so":
3093
- return n.ordinalNumber(e, {
3094
- unit: "second"
3095
- });
3096
- default:
3097
- return P(o.length, e);
3098
- }
3099
- }
3100
- }, {
3101
- key: "validate",
3102
- value: function(e, o) {
3103
- return o >= 0 && o <= 59;
3104
- }
3105
- }, {
3106
- key: "set",
3107
- value: function(e, o, n) {
3108
- return e.setUTCSeconds(n, 0), e;
3109
- }
3110
- }]), t;
3111
- }(b), ca = /* @__PURE__ */ function(i) {
3112
- m(t, i);
3113
- var a = p(t);
3114
- function t() {
3115
- var r;
3116
- h(this, t);
3117
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3118
- o[n] = arguments[n];
3119
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 30), c(d(r), "incompatibleTokens", ["t", "T"]), r;
3120
- }
3121
- return v(t, [{
3122
- key: "parse",
3123
- value: function(e, o) {
3124
- var n = function(u) {
3125
- return Math.floor(u * Math.pow(10, -o.length + 3));
3126
- };
3127
- return U(P(o.length, e), n);
3128
- }
3129
- }, {
3130
- key: "set",
3131
- value: function(e, o, n) {
3132
- return e.setUTCMilliseconds(n), e;
3133
- }
3134
- }]), t;
3135
- }(b), da = /* @__PURE__ */ function(i) {
3136
- m(t, i);
3137
- var a = p(t);
3138
- function t() {
3139
- var r;
3140
- h(this, t);
3141
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3142
- o[n] = arguments[n];
3143
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 10), c(d(r), "incompatibleTokens", ["t", "T", "x"]), r;
3144
- }
3145
- return v(t, [{
3146
- key: "parse",
3147
- value: function(e, o) {
3148
- switch (o) {
3149
- case "X":
3150
- return B(q.basicOptionalMinutes, e);
3151
- case "XX":
3152
- return B(q.basic, e);
3153
- case "XXXX":
3154
- return B(q.basicOptionalSeconds, e);
3155
- case "XXXXX":
3156
- return B(q.extendedOptionalSeconds, e);
3157
- case "XXX":
3158
- default:
3159
- return B(q.extended, e);
3160
- }
3161
- }
3162
- }, {
3163
- key: "set",
3164
- value: function(e, o, n) {
3165
- return o.timestampIsSet ? e : new Date(e.getTime() - n);
3166
- }
3167
- }]), t;
3168
- }(b), fa = /* @__PURE__ */ function(i) {
3169
- m(t, i);
3170
- var a = p(t);
3171
- function t() {
3172
- var r;
3173
- h(this, t);
3174
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3175
- o[n] = arguments[n];
3176
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 10), c(d(r), "incompatibleTokens", ["t", "T", "X"]), r;
3177
- }
3178
- return v(t, [{
3179
- key: "parse",
3180
- value: function(e, o) {
3181
- switch (o) {
3182
- case "x":
3183
- return B(q.basicOptionalMinutes, e);
3184
- case "xx":
3185
- return B(q.basic, e);
3186
- case "xxxx":
3187
- return B(q.basicOptionalSeconds, e);
3188
- case "xxxxx":
3189
- return B(q.extendedOptionalSeconds, e);
3190
- case "xxx":
3191
- default:
3192
- return B(q.extended, e);
3193
- }
3194
- }
3195
- }, {
3196
- key: "set",
3197
- value: function(e, o, n) {
3198
- return o.timestampIsSet ? e : new Date(e.getTime() - n);
3199
- }
3200
- }]), t;
3201
- }(b), ha = /* @__PURE__ */ function(i) {
3202
- m(t, i);
3203
- var a = p(t);
3204
- function t() {
3205
- var r;
3206
- h(this, t);
3207
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3208
- o[n] = arguments[n];
3209
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 40), c(d(r), "incompatibleTokens", "*"), r;
3210
- }
3211
- return v(t, [{
3212
- key: "parse",
3213
- value: function(e) {
3214
- return et(e);
3215
- }
3216
- }, {
3217
- key: "set",
3218
- value: function(e, o, n) {
3219
- return [new Date(n * 1e3), {
3220
- timestampIsSet: !0
3221
- }];
3222
- }
3223
- }]), t;
3224
- }(b), va = /* @__PURE__ */ function(i) {
3225
- m(t, i);
3226
- var a = p(t);
3227
- function t() {
3228
- var r;
3229
- h(this, t);
3230
- for (var e = arguments.length, o = new Array(e), n = 0; n < e; n++)
3231
- o[n] = arguments[n];
3232
- return r = a.call.apply(a, [this].concat(o)), c(d(r), "priority", 20), c(d(r), "incompatibleTokens", "*"), r;
3233
- }
3234
- return v(t, [{
3235
- key: "parse",
3236
- value: function(e) {
3237
- return et(e);
3238
- }
3239
- }, {
3240
- key: "set",
3241
- value: function(e, o, n) {
3242
- return [new Date(n), {
3243
- timestampIsSet: !0
3244
- }];
3245
- }
3246
- }]), t;
3247
- }(b), ma = {
3248
- G: new Er(),
3249
- y: new Lr(),
3250
- Y: new Sr(),
3251
- R: new Hr(),
3252
- u: new Nr(),
3253
- Q: new Ar(),
3254
- q: new Fr(),
3255
- M: new Ir(),
3256
- L: new qr(),
3257
- w: new $r(),
3258
- I: new Qr(),
3259
- d: new Gr(),
3260
- D: new zr(),
3261
- E: new Vr(),
3262
- e: new Kr(),
3263
- c: new Zr(),
3264
- i: new ea(),
3265
- a: new ta(),
3266
- b: new ra(),
3267
- B: new aa(),
3268
- h: new na(),
3269
- H: new ia(),
3270
- K: new oa(),
3271
- k: new sa(),
3272
- m: new ua(),
3273
- s: new la(),
3274
- S: new ca(),
3275
- X: new da(),
3276
- x: new fa(),
3277
- t: new ha(),
3278
- T: new va()
3279
- }, pa = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ga = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, wa = /^'([^]*?)'?$/, ya = /''/g, ba = /\S/, Ta = /[a-zA-Z]/;
3280
- function at(i, a, t, r) {
3281
- var e, o, n, s, u, f, w, y, k, C, E, F, H, $;
3282
- M(3, arguments);
3283
- var L = String(i), I = String(a), R = te(), j = (e = (o = void 0) !== null && o !== void 0 ? o : R.locale) !== null && e !== void 0 ? e : Ge;
3284
- if (!j.match)
3285
- throw new RangeError("locale must contain match property");
3286
- var X = S((n = (s = (u = (f = void 0) !== null && f !== void 0 ? f : void 0) !== null && u !== void 0 ? u : R.firstWeekContainsDate) !== null && s !== void 0 ? s : (w = R.locale) === null || w === void 0 || (y = w.options) === null || y === void 0 ? void 0 : y.firstWeekContainsDate) !== null && n !== void 0 ? n : 1);
3287
- if (!(X >= 1 && X <= 7))
3288
- throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
3289
- var re = S((k = (C = (E = (F = void 0) !== null && F !== void 0 ? F : void 0) !== null && E !== void 0 ? E : R.weekStartsOn) !== null && C !== void 0 ? C : (H = R.locale) === null || H === void 0 || ($ = H.options) === null || $ === void 0 ? void 0 : $.weekStartsOn) !== null && k !== void 0 ? k : 0);
3290
- if (!(re >= 0 && re <= 6))
3291
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
3292
- if (I === "")
3293
- return L === "" ? W(t) : /* @__PURE__ */ new Date(NaN);
3294
- var ae = {
3295
- firstWeekContainsDate: X,
3296
- weekStartsOn: re,
3297
- locale: j
3298
- }, ne = [new Ur()], me = I.match(ga).map(function(Y) {
3299
- var x = Y[0];
3300
- if (x in ye) {
3301
- var A = ye[x];
3302
- return A(Y, j.formatLong);
3303
- }
3304
- return Y;
3305
- }).join("").match(pa), _ = [], N = Ae(me), z;
3306
- try {
3307
- var nt = function() {
3308
- var x = z.value;
3309
- !(r != null && r.useAdditionalWeekYearTokens) && Xe(x) && fe(x, I, i), !(r != null && r.useAdditionalDayOfYearTokens) && je(x) && fe(x, I, i);
3310
- var A = x[0], ce = ma[A];
3311
- if (ce) {
3312
- var Oe = ce.incompatibleTokens;
3313
- if (Array.isArray(Oe)) {
3314
- var Ue = _.find(function(Ee) {
3315
- return Oe.includes(Ee.token) || Ee.token === A;
3316
- });
3317
- if (Ue)
3318
- throw new RangeError("The format string mustn't contain `".concat(Ue.fullToken, "` and `").concat(x, "` at the same time"));
3319
- } else if (ce.incompatibleTokens === "*" && _.length > 0)
3320
- throw new RangeError("The format string mustn't contain `".concat(x, "` and any other token at the same time"));
3321
- _.push({
3322
- token: A,
3323
- fullToken: x
3324
- });
3325
- var ge = ce.run(L, x, j.match, ae);
3326
- if (!ge)
3327
- return {
3328
- v: /* @__PURE__ */ new Date(NaN)
3329
- };
3330
- ne.push(ge.setter), L = ge.rest;
3331
- } else {
3332
- if (A.match(Ta))
3333
- throw new RangeError("Format string contains an unescaped latin alphabet character `" + A + "`");
3334
- if (x === "''" ? x = "'" : A === "'" && (x = xa(x)), L.indexOf(x) === 0)
3335
- L = L.slice(x.length);
3336
- else
3337
- return {
3338
- v: /* @__PURE__ */ new Date(NaN)
3339
- };
3340
- }
3341
- };
3342
- for (N.s(); !(z = N.n()).done; ) {
3343
- var De = nt();
3344
- if (Q(De) === "object")
3345
- return De.v;
3346
- }
3347
- } catch (Y) {
3348
- N.e(Y);
3349
- } finally {
3350
- N.f();
3351
- }
3352
- if (L.length > 0 && ba.test(L))
3353
- return /* @__PURE__ */ new Date(NaN);
3354
- var it = ne.map(function(Y) {
3355
- return Y.priority;
3356
- }).sort(function(Y, x) {
3357
- return x - Y;
3358
- }).filter(function(Y, x, A) {
3359
- return A.indexOf(Y) === x;
3360
- }).map(function(Y) {
3361
- return ne.filter(function(x) {
3362
- return x.priority === Y;
3363
- }).sort(function(x, A) {
3364
- return A.subPriority - x.subPriority;
3365
- });
3366
- }).map(function(Y) {
3367
- return Y[0];
3368
- }), pe = W(t);
3369
- if (isNaN(pe.getTime()))
3370
- return /* @__PURE__ */ new Date(NaN);
3371
- var ie = Ie(pe, Qe(pe)), ke = {}, ue = Ae(it), Pe;
3372
- try {
3373
- for (ue.s(); !(Pe = ue.n()).done; ) {
3374
- var Me = Pe.value;
3375
- if (!Me.validate(ie, ae))
3376
- return /* @__PURE__ */ new Date(NaN);
3377
- var le = Me.set(ie, ke, ae);
3378
- Array.isArray(le) ? (ie = le[0], Cr(ke, le[1])) : ie = le;
3379
- }
3380
- } catch (Y) {
3381
- ue.e(Y);
3382
- } finally {
3383
- ue.f();
3384
- }
3385
- return ie;
3386
- }
3387
- function xa(i) {
3388
- return i.match(wa)[1].replace(ya, "'");
3389
- }
3390
- function Ca(i, a) {
3391
- M(2, arguments);
3392
- var t = W(i), r = S(a);
3393
- if (isNaN(r))
3394
- return /* @__PURE__ */ new Date(NaN);
3395
- if (!r)
3396
- return t;
3397
- var e = t.getDate(), o = new Date(t.getTime());
3398
- o.setMonth(t.getMonth() + r + 1, 0);
3399
- var n = o.getDate();
3400
- return e >= n ? o : (t.setFullYear(o.getFullYear(), o.getMonth(), e), t);
3401
- }
3402
- function Da(i, a) {
3403
- M(2, arguments);
3404
- var t = S(a);
3405
- return Ca(i, -t);
3406
- }
3407
- const ka = ':host{--activeButtonBackground:#7ec51e;--activeButtonFont:#002149;--hoverBackground:#ffffff;--background:#e4e6e8;--success:#7ac345;--heightScrollableContainer:400px;--borderColor:#d3d3d3;--borderColorButton:#c4c4c4;--textColor:#002554;--textColorHover:#7ac345;--errorColor:#c23b21;--loaderColor:#7ac345;--headerTableBackground:#cdcdcd;--borderTable:#dedede;--shadowBorderTable:#f1f1f1;--backgroundTable:#ffffff;font-family:Roboto, Arial, sans-serif;font-size:14px;color:var(--textColor);display:block;background-color:var(--background)}:host .wrapper{height:100%;padding:1rem}:host .types{display:flex;width:100%;gap:5px}:host .transaction-type{background:inherit;font-weight:600;padding:0.6rem 1.6rem;border:1px solid #6c757d;cursor:pointer}:host .transaction-type:hover{color:var(--activeButtonBackground);border-color:var(--activeButtonBackground);background:var(--hoverBackground)}:host .clicked{background-color:var(--activeButtonBackground);border-color:var(--activeButtonBackground)}:host .types-mobile{justify-content:center;margin-bottom:15px}:host .types-desktop{justify-content:flex-end;margin-bottom:3rem}:host .page-size{display:flex;width:100%;justify-content:flex-end;align-items:center}:host .page-size button{background:transparent;border:none;cursor:pointer;margin:0.4rem;width:2rem;height:2rem}:host .page-size button:hover{color:var(--textColorHover)}:host .page-size button.active{background:var(--activeButtonBackground);color:var(--textColor);font-weight:600;border-radius:0.4rem}:host .period{display:flex;width:100%;align-items:flex-end;justify-content:center;gap:10px;background:#f0f0f0;border-bottom:2px solid #e9e9e9;padding:1.6rem 0 0;margin-bottom:4rem}@media (max-width: 801px){:host .period{margin-bottom:0;flex-direction:column;align-items:stretch;width:auto;padding:1.4rem 2.8rem;box-shadow:0 4px 5px 0 rgba(90, 90, 90, 0.24)}}:host .period .range{color:var(--errorColor)}:host .period .filter-btn{height:40px;background:transparent;border:0.1rem solid var(--borderColorButton);min-width:12rem;max-width:17rem;cursor:pointer}@media (max-width: 801px){:host .period .filter-btn{max-width:none;min-width:none;margin-top:1rem}}:host .period .filter-btn:hover{border:none;background:var(--hoverBackground)}:host .period .duet-date__input{padding:7px 60px 7px 7px}:host .period+button{padding:9px 15px}:host .period-content{display:flex;flex-direction:row;width:100%;justify-content:center;align-items:flex-end;margin:0 auto 1.6rem}@media (max-width: 801px){:host .period-content{flex-direction:column;align-items:stretch}}:host .period-content span{height:40px;display:flex;align-items:center;justify-content:center}@media (max-width: 801px){:host .period-content span{display:none}}:host .period-content .filter-btn{margin-left:60px}@media (max-width: 801px){:host .period-content .filter-btn{margin-left:0}}:host .period-content .date-input{padding:0 4px}@media (max-width: 801px){:host .period-content .date-input{width:auto}:host .period-content .date-input:first-child{margin-bottom:0.5rem}}:host .period-content .date-input label{display:inline-block;margin-bottom:0.9rem}:host .period-content .date-input input{border:0.1rem solid var(--borderColor);box-sizing:border-box;border-radius:0.2rem}:host .pagination{display:flex;width:100%;justify-content:center;margin-top:1.5rem}:host .pagination button{cursor:pointer;border:none;background-color:var(--activeButtonBackground);color:#fff;opacity:0.5;padding:7px 12px}:host .pagination button:hover{opacity:1}:host .pagination button:focus{opacity:1}:host button.active{color:var(--activeButtonFont);background-color:var(--activeButtonBackground)}.mobile-filter-button{display:flex;justify-content:center;align-items:center;width:100%;height:2.8rem;background:inherit;border:1px solid var(--borderColorButton)}.mobile-filter-button img{height:50%;margin-right:0.5rem}.noData{display:flex;align-items:center;box-shadow:0 0.4rem 0.4rem rgba(0, 0, 0, 0.25);padding:1.1rem;border-radius:0.6rem}.noData span{margin-left:0.5rem}.table{height:var(--heightScrollableContainer);overflow-y:auto}.table .mobile-table{height:100%}.data-transaction{border-bottom:1px solid var(--borderColor);background-color:var(--hoverBackground);padding:0 20px;display:grid;grid-template-columns:repeat(2, 1fr)}.data-transaction .text-style-status{font-weight:600}.data-transaction .text-style-status .success{color:var(--success)}.data-transaction .text-style-status .error{color:var(--errorColor)}.data-transaction .text-style{text-align:end}.data-transaction .date{font-size:12px;display:flex;align-items:center}.loader{display:inline-block;position:absolute;width:80px;height:80px;top:calc(50% - 40px);left:calc(50% - 40px);z-index:100}.loader::before{content:"";position:fixed;top:0;bottom:0;left:0;right:0;background-color:rgba(255, 255, 255, 0.6)}.loader div{position:absolute;width:6px;height:6px;background:var(--loaderColor);border-radius:50%;animation:loader 1.2s linear infinite}.loader div:nth-child(1){animation-delay:0s;top:37px;left:66px}.loader div:nth-child(2){animation-delay:-0.1s;top:22px;left:62px}.loader div:nth-child(3){animation-delay:-0.2s;top:11px;left:52px}.loader div:nth-child(4){animation-delay:-0.3s;top:7px;left:37px}.loader div:nth-child(5){animation-delay:-0.4s;top:11px;left:22px}.loader div:nth-child(6){animation-delay:-0.5s;top:22px;left:11px}.loader div:nth-child(7){animation-delay:-0.6s;top:37px;left:7px}.loader div:nth-child(8){animation-delay:-0.7s;top:52px;left:11px}.loader div:nth-child(9){animation-delay:-0.8s;top:62px;left:22px}.loader div:nth-child(10){animation-delay:-0.9s;top:66px;left:37px}.loader div:nth-child(11){animation-delay:-1s;top:62px;left:52px}.loader div:nth-child(12){animation-delay:-1.1s;top:52px;left:62px}@keyframes loader{0%,20%,80%,100%{transform:scale(1)}50%{transform:scale(1.5)}}.table thead th{position:sticky;top:0}table{border-collapse:collapse;width:100%}table th{padding:14px 24px;text-align:left;font-weight:600;color:var(--textColor);background:var(--headerTableBackground)}table td{padding:1rem 1.7rem;box-shadow:0 -1px 0 0 var(--shadowBorderTable) inset;border-bottom:0.1rem solid var(--borderTable);text-align:left;color:var(--textColor)}table tbody{background:var(--backgroundTable)}table .success{color:var(--success)}table .error{color:var(--errorColor)}vaadin-date-picker{min-width:320px}@media (max-width: 1261px){vaadin-date-picker{width:auto;min-width:auto}}@media (max-width: 801px){vaadin-date-picker{width:100%}}.MenuReturnButton{font:inherit;color:var(--emw--color-gray-300, #58586B);display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.MenuReturnButton h2.TransactionTitleMobile{font-size:16px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}', Pa = ka, Ma = class {
3408
- constructor(i) {
3409
- Fe(this, i), this.pageSizes = [10, 25, 50], this.pagination = null, this.toggleScreen = () => {
3410
- window.postMessage({ type: "PlayerAccountMenuActive", isMobile: this.mobile }, window.location.href);
3411
- }, this.endpoint = void 0, this.session = void 0, this.language = g.defaultLanguage, this.userId = void 0, this.translationUrl = void 0, this.mobile = !1, this.clientStyling = null, this.clientStylingUrl = null, this.mbSource = void 0, this.dateFormat = "", this.page = 0, this.pageSize = this.pageSizes[0], this.showMobileFilter = !1, this.to = void 0, this.from = void 0, this.type = "0", this.transactions = void 0, this.showLoader = !0;
3412
- }
3413
- watchMultiple() {
3414
- this.loadTransactions();
3415
- }
3416
- handleClientStylingChange(i, a) {
3417
- i != a && Se(this.stylingContainer, this.clientStyling);
3418
- }
3419
- handleClientStylingUrlChange(i, a) {
3420
- i != a && this.clientStylingUrl && He(this.stylingContainer, this.clientStylingUrl);
3421
- }
3422
- componentWillLoad() {
3423
- return de(this, null, function* () {
3424
- this.translationUrl && (yield g.loadCustomTranslations(this.translationUrl)), this.to = K(/* @__PURE__ */ new Date(), `${this.dateFormat || "yyyy-MM-dd"}`), this.from = K(Da(/* @__PURE__ */ new Date(), 1), `${this.dateFormat || "yyyy-MM-dd"}`), this.loadTransactions();
3425
- });
3426
- }
3427
- componentDidLoad() {
3428
- this.stylingContainer && (window.emMessageBus != null ? Tr(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && Se(this.stylingContainer, this.clientStyling), this.clientStylingUrl && He(this.stylingContainer, this.clientStylingUrl)));
3429
- }
3430
- componentDidRender() {
3431
- this.getComponentHeight();
3432
- }
3433
- getComponentHeight() {
3434
- var i;
3435
- if (this.mobile) {
3436
- let a = this.el.getBoundingClientRect().height - ((i = this.el.shadowRoot.querySelector(".table")) === null || i === void 0 ? void 0 : i.getBoundingClientRect().y);
3437
- this.el.style.setProperty("--heightScrollableContainer", a + "px");
3438
- }
3439
- }
3440
- setHeightTableProperty() {
3441
- let i = this.getComponentHeight();
3442
- this.el.style.setProperty("--heightScrollableContainer", i + "px");
3443
- }
3444
- changeTransactionsType(i) {
3445
- this.type = i;
3446
- }
3447
- changePageSize(i) {
3448
- this.pageSize = i;
3449
- }
3450
- prev() {
3451
- var i;
3452
- !((i = this.pagination) === null || i === void 0) && i.previous && this.page--;
3453
- }
3454
- next() {
3455
- var i;
3456
- !((i = this.pagination) === null || i === void 0) && i.next && this.page++;
3457
- }
3458
- applyFilters(i, a) {
3459
- this.from = i, this.to = a, this.loadTransactions();
3460
- }
3461
- showFilter() {
3462
- this.showMobileFilter = !this.showMobileFilter;
3463
- }
3464
- disconnectedCallback() {
3465
- this.stylingSubscription && this.stylingSubscription.unsubscribe();
3466
- }
3467
- render() {
3468
- var i;
3469
- const a = Ye("../assets/filter.svg"), t = Ye("../assets/warning.svg");
3470
- return l(ot, { key: "395328866f9fbae0a79d1dcf9dc5e9fd6e321406" }, this.showLoader ? l(ct, null) : "", l("div", { key: "fcb0efc2b0c9f2daa3df8c6c1d541dabe76c8126", class: "wrapper", ref: (r) => this.stylingContainer = r }, this.mobile ? l("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, l("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, l("defs", null), l("g", { transform: "translate(-20 -158)" }, l("g", { transform: "translate(20 158)" }, l("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), l("h2", { class: "TransactionTitleMobile" }, g.translate("transactionTitle", this.language))) : l("h2", { class: "TransactionTitle" }, g.translate("transactionTitle", this.language)), l("div", { key: "3fcb0ac0f3bc81ce2c3e298e53649a7050a53cb2", class: { "types types-mobile": this.mobile, "types types-desktop": !this.mobile } }, l("button", { key: "1fcfd5dbf9857488bd0594f5b908e845a66f0d05", class: "transaction-type " + (this.type === "0" ? "clicked" : ""), onClick: () => this.changeTransactionsType("0") }, g.translate("deposit", this.language)), l("button", { key: "58c6707975e3854e8a4afcf270a11dacd3c15947", class: "transaction-type " + (this.type === "1" ? "clicked" : ""), onClick: () => this.changeTransactionsType("1") }, g.translate("withdrawals", this.language))), this.mobile ? "" : l(yr, { language: this.language, pageSizes: this.pageSizes, currentPageSize: this.pageSize, changePageSize: (r) => this.changePageSize(r) }), this.mobile ? l("button", { class: "mobile-filter-button", onClick: () => this.showFilter() }, l("img", { src: a, alt: "Filter" }), g.translate("filter", this.language)) : "", !this.mobile || this.showMobileFilter && this.mobile ? l("user-transaction-history-filter", { language: this.language, onApplyFilters: ({ detail: { from: r, to: e } }) => this.applyFilters(r, e), from: this.from, to: this.to, dateformat: this.dateFormat }) : "", ((i = this.transactions) === null || i === void 0 ? void 0 : i.length) > 0 ? l("div", { class: "table" }, this.mobile ? l("div", { class: "mobile-table" }, this.transactions.map((r) => l(wr, Object.assign({}, r, { dateformat: this.dateFormat })))) : l(br, { source: this.transactions, language: this.language, dateformat: this.dateFormat })) : l("div", { class: "noData" }, l("img", { src: t, alt: "Warning" }), l("span", null, g.translate("noData", this.language))), l("div", { key: "a58ec540ecc0d4162bb32eae5bd453e37cf7fed1", class: "pagination" }, l("button", { key: "f21b01b72d7a4470e1cbbefdec50169e6e5bc222", onClick: () => this.prev() }, "<"), l("button", { key: "d14d057b3620a30ae3c11a5f22640913c0a1d32e", onClick: () => this.next() }, ">"))));
3471
- }
3472
- loadTransactions() {
3473
- return de(this, null, function* () {
3474
- this.showLoader = !0;
3475
- try {
3476
- const i = `${this.endpoint}/v1/player/${this.userId}/transactions/banking?${this.getParams()}`, a = yield fetch(i, {
3477
- headers: {
3478
- "X-Sessionid": this.session,
3479
- "Content-Type": "application/json"
3480
- }
3481
- });
3482
- if (!a.ok) {
3483
- const r = yield a.text();
3484
- throw new Error(r);
3485
- }
3486
- const t = yield a.json();
3487
- this.pagination = t.pagination, this.transactions = t.transactions;
3488
- } catch (i) {
3489
- console.error(i);
3490
- } finally {
3491
- this.showLoader = !1;
3492
- }
3493
- });
3494
- }
3495
- formatDateForApi(i) {
3496
- const a = at(i, `${this.dateFormat || "yyyy-MM-dd"}`, /* @__PURE__ */ new Date());
3497
- return K(a, "yyyy-MM-dd");
3498
- }
3499
- getParams() {
3500
- const i = (this.page * this.pageSize).toString(), a = this.formatDateForApi(this.from), t = this.formatDateForApi(this.to);
3501
- return `offset=${i}&endDate=${t}&startDate=${a}&type=${this.type}&limit=${this.pageSize}`;
3502
- }
3503
- static get assetsDirs() {
3504
- return ["../assets"];
3505
- }
3506
- get el() {
3507
- return st(this);
3508
- }
3509
- static get watchers() {
3510
- return {
3511
- page: ["watchMultiple"],
3512
- type: ["watchMultiple"],
3513
- session: ["watchMultiple"],
3514
- userId: ["watchMultiple"],
3515
- pageSize: ["watchMultiple"],
3516
- clientStyling: ["handleClientStylingChange"],
3517
- clientStylingUrl: ["handleClientStylingUrlChange"],
3518
- showMobileFilter: ["getComponentHeight"]
3519
- };
3520
- }
3521
- };
3522
- Ma.style = Pa;
3523
- const Ea = class {
3524
- constructor(i) {
3525
- Fe(this, i), this.applyFilters = ut(this, "applyFilters"), this.startDateChange = () => {
3526
- this.startDate = K(new Date(this.startDatePicker.value), `${this.dateformat || "yyyy-MM-dd"}`);
3527
- }, this.endDateChange = () => {
3528
- this.endDate = K(new Date(this.endDatePicker.value), `${this.dateformat || "yyyy-MM-dd"}`);
3529
- }, this.from = void 0, this.to = void 0, this.language = void 0, this.dateformat = void 0, this.startDate = void 0, this.endDate = void 0;
3530
- }
3531
- componentWillLoad() {
3532
- this.startDate = this.from, this.endDate = this.to;
3533
- }
3534
- componentDidLoad() {
3535
- this.startDatePicker.i18n = Object.assign(Object.assign({}, this.startDatePicker.i18n), { formatDate: this.formatVaadinDate.bind(this), parseDate: this.parseDate.bind(this) }), this.endDatePicker.i18n = Object.assign(Object.assign({}, this.endDatePicker.i18n), { formatDate: this.formatVaadinDate.bind(this), parseDate: this.parseDate.bind(this) });
3536
- }
3537
- formatVaadinDate(i) {
3538
- const { year: a, month: t, day: r } = i, e = new Date(a, t, r);
3539
- return K(e, this.dateformat || "yyyy-MM-dd");
3540
- }
3541
- parseDate(i) {
3542
- const a = at(i, this.dateformat || "yyyy-MM-dd", /* @__PURE__ */ new Date());
3543
- return { year: a.getFullYear(), month: a.getMonth(), day: a.getDate() };
3544
- }
3545
- handleApplyFilters() {
3546
- this.applyFilters.emit({ from: this.startDate, to: this.endDate });
3547
- }
3548
- render() {
3549
- return l("div", { key: "e25ee310b522ecfcc8dda8b6294e30f5e66c4edd", class: "period" }, l("div", { key: "a6ec37aafe30774077bae55366d6357c1b0a8c60", class: "period-content" }, l("div", { key: "d9796d6972931e14190fcd8ab558162af64d8d62", class: "date-input" }, l("vaadin-date-picker", { key: "3df25b815c7b2a7f3bf72ece4c430f595446122e", value: this.startDate, placeholder: this.startDate, ref: (i) => this.startDatePicker = i, label: g.translate("from", this.language), onChange: this.startDateChange })), l("span", { key: "f251410540f18bb86946c2e08915edbf73765fbc" }, l("svg", { key: "7c5d28705c152fbc73c3709b5e3b6bee5b14c0c7", width: "24px", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, l("path", { key: "3ebc124be61de20e9f946ae5f9116a5f9bf043ff", d: "m21 11.75c0-.414-.336-.75-.75-.75h-16.5c-.414 0-.75.336-.75.75s.336.75.75.75h16.5c.414 0 .75-.336.75-.75z", "fill-rule": "nonzero", fill: "5d687b" }))), l("div", { key: "84aa35e5d8598c713904bfd4baf109a422b83e2c", class: "date-input" }, l("vaadin-date-picker", { key: "3ef7bd62bc9ed6034fb55fff38013425b627d1c9", value: this.endDate, placeholder: this.endDate, ref: (i) => this.endDatePicker = i, label: g.translate("to", this.language), onChange: this.endDateChange })), l("button", { key: "6f3be9bf3a0c2de87d7661691e3b72b16018e460", class: "filter-btn", onClick: this.handleApplyFilters.bind(this) }, g.translate("filter", this.language))));
3550
- }
3551
- };
3552
- export {
3553
- Ma as user_transaction_history,
3554
- Ea as user_transaction_history_filter
3555
- };