@everymatrix/tournament-card 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/index.js DELETED
@@ -1,3782 +0,0 @@
1
- import "svelte/internal/disclose-version";
2
- import * as o from "svelte/internal/client";
3
- import { writable as We, derived as he } from "svelte/store";
4
- import Gt from "@everymatrix/tournament-details";
5
- var ct = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
- function Ze(e) {
7
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
8
- }
9
- var Ft = function(t) {
10
- return jt(t) && !$t(t);
11
- };
12
- function jt(e) {
13
- return !!e && typeof e == "object";
14
- }
15
- function $t(e) {
16
- var t = Object.prototype.toString.call(e);
17
- return t === "[object RegExp]" || t === "[object Date]" || Xt(e);
18
- }
19
- var Vt = typeof Symbol == "function" && Symbol.for, kt = Vt ? Symbol.for("react.element") : 60103;
20
- function Xt(e) {
21
- return e.$$typeof === kt;
22
- }
23
- function Yt(e) {
24
- return Array.isArray(e) ? [] : {};
25
- }
26
- function me(e, t) {
27
- return t.clone !== !1 && t.isMergeableObject(e) ? ae(Yt(e), e, t) : e;
28
- }
29
- function Wt(e, t, r) {
30
- return e.concat(t).map(function(n) {
31
- return me(n, r);
32
- });
33
- }
34
- function Zt(e, t) {
35
- if (!t.customMerge)
36
- return ae;
37
- var r = t.customMerge(e);
38
- return typeof r == "function" ? r : ae;
39
- }
40
- function zt(e) {
41
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function(t) {
42
- return Object.propertyIsEnumerable.call(e, t);
43
- }) : [];
44
- }
45
- function qe(e) {
46
- return Object.keys(e).concat(zt(e));
47
- }
48
- function mt(e, t) {
49
- try {
50
- return t in e;
51
- } catch {
52
- return !1;
53
- }
54
- }
55
- function Jt(e, t) {
56
- return mt(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t));
57
- }
58
- function qt(e, t, r) {
59
- var n = {};
60
- return r.isMergeableObject(e) && qe(e).forEach(function(i) {
61
- n[i] = me(e[i], r);
62
- }), qe(t).forEach(function(i) {
63
- Jt(e, i) || (mt(e, i) && r.isMergeableObject(t[i]) ? n[i] = Zt(i, r)(e[i], t[i], r) : n[i] = me(t[i], r));
64
- }), n;
65
- }
66
- function ae(e, t, r) {
67
- r = r || {}, r.arrayMerge = r.arrayMerge || Wt, r.isMergeableObject = r.isMergeableObject || Ft, r.cloneUnlessOtherwiseSpecified = me;
68
- var n = Array.isArray(t), i = Array.isArray(e), a = n === i;
69
- return a ? n ? r.arrayMerge(e, t, r) : qt(e, t, r) : me(t, r);
70
- }
71
- ae.all = function(t, r) {
72
- if (!Array.isArray(t))
73
- throw new Error("first argument should be an array");
74
- return t.reduce(function(n, i) {
75
- return ae(n, i, r);
76
- }, {});
77
- };
78
- var Qt = ae, Kt = Qt;
79
- const er = /* @__PURE__ */ Ze(Kt);
80
- var Ue = function(e, t) {
81
- return Ue = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
82
- r.__proto__ = n;
83
- } || function(r, n) {
84
- for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
85
- }, Ue(e, t);
86
- };
87
- function Te(e, t) {
88
- if (typeof t != "function" && t !== null)
89
- throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
90
- Ue(e, t);
91
- function r() {
92
- this.constructor = e;
93
- }
94
- e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
95
- }
96
- var Q = function() {
97
- return Q = Object.assign || function(t) {
98
- for (var r, n = 1, i = arguments.length; n < i; n++) {
99
- r = arguments[n];
100
- for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
101
- }
102
- return t;
103
- }, Q.apply(this, arguments);
104
- };
105
- function tr(e, t) {
106
- var r = {};
107
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
108
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
109
- for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
110
- t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
111
- return r;
112
- }
113
- function Le(e, t, r) {
114
- if (r || arguments.length === 2) for (var n = 0, i = t.length, a; n < i; n++)
115
- (a || !(n in t)) && (a || (a = Array.prototype.slice.call(t, 0, n)), a[n] = t[n]);
116
- return e.concat(a || Array.prototype.slice.call(t));
117
- }
118
- function Ie(e, t) {
119
- var r = t && t.cache ? t.cache : ur, n = t && t.serializer ? t.serializer : sr, i = t && t.strategy ? t.strategy : ir;
120
- return i(e, {
121
- cache: r,
122
- serializer: n
123
- });
124
- }
125
- function rr(e) {
126
- return e == null || typeof e == "number" || typeof e == "boolean";
127
- }
128
- function nr(e, t, r, n) {
129
- var i = rr(n) ? n : r(n), a = t.get(i);
130
- return typeof a > "u" && (a = e.call(this, n), t.set(i, a)), a;
131
- }
132
- function dt(e, t, r) {
133
- var n = Array.prototype.slice.call(arguments, 3), i = r(n), a = t.get(i);
134
- return typeof a > "u" && (a = e.apply(this, n), t.set(i, a)), a;
135
- }
136
- function pt(e, t, r, n, i) {
137
- return r.bind(t, e, n, i);
138
- }
139
- function ir(e, t) {
140
- var r = e.length === 1 ? nr : dt;
141
- return pt(e, this, r, t.cache.create(), t.serializer);
142
- }
143
- function ar(e, t) {
144
- return pt(e, this, dt, t.cache.create(), t.serializer);
145
- }
146
- var sr = function() {
147
- return JSON.stringify(arguments);
148
- }, or = (
149
- /** @class */
150
- function() {
151
- function e() {
152
- this.cache = /* @__PURE__ */ Object.create(null);
153
- }
154
- return e.prototype.get = function(t) {
155
- return this.cache[t];
156
- }, e.prototype.set = function(t, r) {
157
- this.cache[t] = r;
158
- }, e;
159
- }()
160
- ), ur = {
161
- create: function() {
162
- return new or();
163
- }
164
- }, Ne = {
165
- variadic: ar
166
- }, Ee = function() {
167
- return Ee = Object.assign || function(t) {
168
- for (var r, n = 1, i = arguments.length; n < i; n++) {
169
- r = arguments[n];
170
- for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
171
- }
172
- return t;
173
- }, Ee.apply(this, arguments);
174
- };
175
- var O;
176
- (function(e) {
177
- e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
178
- })(O || (O = {}));
179
- var R;
180
- (function(e) {
181
- e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
182
- })(R || (R = {}));
183
- var se;
184
- (function(e) {
185
- e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
186
- })(se || (se = {}));
187
- function Qe(e) {
188
- return e.type === R.literal;
189
- }
190
- function hr(e) {
191
- return e.type === R.argument;
192
- }
193
- function gt(e) {
194
- return e.type === R.number;
195
- }
196
- function vt(e) {
197
- return e.type === R.date;
198
- }
199
- function bt(e) {
200
- return e.type === R.time;
201
- }
202
- function xt(e) {
203
- return e.type === R.select;
204
- }
205
- function yt(e) {
206
- return e.type === R.plural;
207
- }
208
- function lr(e) {
209
- return e.type === R.pound;
210
- }
211
- function Et(e) {
212
- return e.type === R.tag;
213
- }
214
- function _t(e) {
215
- return !!(e && typeof e == "object" && e.type === se.number);
216
- }
217
- function Ge(e) {
218
- return !!(e && typeof e == "object" && e.type === se.dateTime);
219
- }
220
- var Ht = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, fr = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
221
- function cr(e) {
222
- var t = {};
223
- return e.replace(fr, function(r) {
224
- var n = r.length;
225
- switch (r[0]) {
226
- case "G":
227
- t.era = n === 4 ? "long" : n === 5 ? "narrow" : "short";
228
- break;
229
- case "y":
230
- t.year = n === 2 ? "2-digit" : "numeric";
231
- break;
232
- case "Y":
233
- case "u":
234
- case "U":
235
- case "r":
236
- throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
237
- case "q":
238
- case "Q":
239
- throw new RangeError("`q/Q` (quarter) patterns are not supported");
240
- case "M":
241
- case "L":
242
- t.month = ["numeric", "2-digit", "short", "long", "narrow"][n - 1];
243
- break;
244
- case "w":
245
- case "W":
246
- throw new RangeError("`w/W` (week) patterns are not supported");
247
- case "d":
248
- t.day = ["numeric", "2-digit"][n - 1];
249
- break;
250
- case "D":
251
- case "F":
252
- case "g":
253
- throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
254
- case "E":
255
- t.weekday = n === 4 ? "long" : n === 5 ? "narrow" : "short";
256
- break;
257
- case "e":
258
- if (n < 4)
259
- throw new RangeError("`e..eee` (weekday) patterns are not supported");
260
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
261
- break;
262
- case "c":
263
- if (n < 4)
264
- throw new RangeError("`c..ccc` (weekday) patterns are not supported");
265
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
266
- break;
267
- case "a":
268
- t.hour12 = !0;
269
- break;
270
- case "b":
271
- case "B":
272
- throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
273
- case "h":
274
- t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][n - 1];
275
- break;
276
- case "H":
277
- t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][n - 1];
278
- break;
279
- case "K":
280
- t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][n - 1];
281
- break;
282
- case "k":
283
- t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][n - 1];
284
- break;
285
- case "j":
286
- case "J":
287
- case "C":
288
- throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
289
- case "m":
290
- t.minute = ["numeric", "2-digit"][n - 1];
291
- break;
292
- case "s":
293
- t.second = ["numeric", "2-digit"][n - 1];
294
- break;
295
- case "S":
296
- case "A":
297
- throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
298
- case "z":
299
- t.timeZoneName = n < 4 ? "short" : "long";
300
- break;
301
- case "Z":
302
- case "O":
303
- case "v":
304
- case "V":
305
- case "X":
306
- case "x":
307
- throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
308
- }
309
- return "";
310
- }), t;
311
- }
312
- var G = function() {
313
- return G = Object.assign || function(t) {
314
- for (var r, n = 1, i = arguments.length; n < i; n++) {
315
- r = arguments[n];
316
- for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
317
- }
318
- return t;
319
- }, G.apply(this, arguments);
320
- };
321
- var mr = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
322
- function dr(e) {
323
- if (e.length === 0)
324
- throw new Error("Number skeleton cannot be empty");
325
- for (var t = e.split(mr).filter(function(x) {
326
- return x.length > 0;
327
- }), r = [], n = 0, i = t; n < i.length; n++) {
328
- var a = i[n], h = a.split("/");
329
- if (h.length === 0)
330
- throw new Error("Invalid number skeleton");
331
- for (var c = h[0], g = h.slice(1), m = 0, s = g; m < s.length; m++) {
332
- var b = s[m];
333
- if (b.length === 0)
334
- throw new Error("Invalid number skeleton");
335
- }
336
- r.push({ stem: c, options: g });
337
- }
338
- return r;
339
- }
340
- function pr(e) {
341
- return e.replace(/^(.*?)-/, "");
342
- }
343
- var Ke = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Tt = /^(@+)?(\+|#+)?[rs]?$/g, gr = /(\*)(0+)|(#+)(0+)|(0+)/g, St = /^(0+)$/;
344
- function et(e) {
345
- var t = {};
346
- return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(Tt, function(r, n, i) {
347
- return typeof i != "string" ? (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length) : i === "+" ? t.minimumSignificantDigits = n.length : n[0] === "#" ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof i == "string" ? i.length : 0)), "";
348
- }), t;
349
- }
350
- function Bt(e) {
351
- switch (e) {
352
- case "sign-auto":
353
- return {
354
- signDisplay: "auto"
355
- };
356
- case "sign-accounting":
357
- case "()":
358
- return {
359
- currencySign: "accounting"
360
- };
361
- case "sign-always":
362
- case "+!":
363
- return {
364
- signDisplay: "always"
365
- };
366
- case "sign-accounting-always":
367
- case "()!":
368
- return {
369
- signDisplay: "always",
370
- currencySign: "accounting"
371
- };
372
- case "sign-except-zero":
373
- case "+?":
374
- return {
375
- signDisplay: "exceptZero"
376
- };
377
- case "sign-accounting-except-zero":
378
- case "()?":
379
- return {
380
- signDisplay: "exceptZero",
381
- currencySign: "accounting"
382
- };
383
- case "sign-never":
384
- case "+_":
385
- return {
386
- signDisplay: "never"
387
- };
388
- }
389
- }
390
- function vr(e) {
391
- var t;
392
- if (e[0] === "E" && e[1] === "E" ? (t = {
393
- notation: "engineering"
394
- }, e = e.slice(2)) : e[0] === "E" && (t = {
395
- notation: "scientific"
396
- }, e = e.slice(1)), t) {
397
- var r = e.slice(0, 2);
398
- if (r === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : r === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !St.test(e))
399
- throw new Error("Malformed concise eng/scientific notation");
400
- t.minimumIntegerDigits = e.length;
401
- }
402
- return t;
403
- }
404
- function tt(e) {
405
- var t = {}, r = Bt(e);
406
- return r || t;
407
- }
408
- function br(e) {
409
- for (var t = {}, r = 0, n = e; r < n.length; r++) {
410
- var i = n[r];
411
- switch (i.stem) {
412
- case "percent":
413
- case "%":
414
- t.style = "percent";
415
- continue;
416
- case "%x100":
417
- t.style = "percent", t.scale = 100;
418
- continue;
419
- case "currency":
420
- t.style = "currency", t.currency = i.options[0];
421
- continue;
422
- case "group-off":
423
- case ",_":
424
- t.useGrouping = !1;
425
- continue;
426
- case "precision-integer":
427
- case ".":
428
- t.maximumFractionDigits = 0;
429
- continue;
430
- case "measure-unit":
431
- case "unit":
432
- t.style = "unit", t.unit = pr(i.options[0]);
433
- continue;
434
- case "compact-short":
435
- case "K":
436
- t.notation = "compact", t.compactDisplay = "short";
437
- continue;
438
- case "compact-long":
439
- case "KK":
440
- t.notation = "compact", t.compactDisplay = "long";
441
- continue;
442
- case "scientific":
443
- t = G(G(G({}, t), { notation: "scientific" }), i.options.reduce(function(g, m) {
444
- return G(G({}, g), tt(m));
445
- }, {}));
446
- continue;
447
- case "engineering":
448
- t = G(G(G({}, t), { notation: "engineering" }), i.options.reduce(function(g, m) {
449
- return G(G({}, g), tt(m));
450
- }, {}));
451
- continue;
452
- case "notation-simple":
453
- t.notation = "standard";
454
- continue;
455
- case "unit-width-narrow":
456
- t.currencyDisplay = "narrowSymbol", t.unitDisplay = "narrow";
457
- continue;
458
- case "unit-width-short":
459
- t.currencyDisplay = "code", t.unitDisplay = "short";
460
- continue;
461
- case "unit-width-full-name":
462
- t.currencyDisplay = "name", t.unitDisplay = "long";
463
- continue;
464
- case "unit-width-iso-code":
465
- t.currencyDisplay = "symbol";
466
- continue;
467
- case "scale":
468
- t.scale = parseFloat(i.options[0]);
469
- continue;
470
- case "rounding-mode-floor":
471
- t.roundingMode = "floor";
472
- continue;
473
- case "rounding-mode-ceiling":
474
- t.roundingMode = "ceil";
475
- continue;
476
- case "rounding-mode-down":
477
- t.roundingMode = "trunc";
478
- continue;
479
- case "rounding-mode-up":
480
- t.roundingMode = "expand";
481
- continue;
482
- case "rounding-mode-half-even":
483
- t.roundingMode = "halfEven";
484
- continue;
485
- case "rounding-mode-half-down":
486
- t.roundingMode = "halfTrunc";
487
- continue;
488
- case "rounding-mode-half-up":
489
- t.roundingMode = "halfExpand";
490
- continue;
491
- case "integer-width":
492
- if (i.options.length > 1)
493
- throw new RangeError("integer-width stems only accept a single optional option");
494
- i.options[0].replace(gr, function(g, m, s, b, x, L) {
495
- if (m)
496
- t.minimumIntegerDigits = s.length;
497
- else {
498
- if (b && x)
499
- throw new Error("We currently do not support maximum integer digits");
500
- if (L)
501
- throw new Error("We currently do not support exact integer digits");
502
- }
503
- return "";
504
- });
505
- continue;
506
- }
507
- if (St.test(i.stem)) {
508
- t.minimumIntegerDigits = i.stem.length;
509
- continue;
510
- }
511
- if (Ke.test(i.stem)) {
512
- if (i.options.length > 1)
513
- throw new RangeError("Fraction-precision stems only accept a single optional option");
514
- i.stem.replace(Ke, function(g, m, s, b, x, L) {
515
- return s === "*" ? t.minimumFractionDigits = m.length : b && b[0] === "#" ? t.maximumFractionDigits = b.length : x && L ? (t.minimumFractionDigits = x.length, t.maximumFractionDigits = x.length + L.length) : (t.minimumFractionDigits = m.length, t.maximumFractionDigits = m.length), "";
516
- });
517
- var a = i.options[0];
518
- a === "w" ? t = G(G({}, t), { trailingZeroDisplay: "stripIfInteger" }) : a && (t = G(G({}, t), et(a)));
519
- continue;
520
- }
521
- if (Tt.test(i.stem)) {
522
- t = G(G({}, t), et(i.stem));
523
- continue;
524
- }
525
- var h = Bt(i.stem);
526
- h && (t = G(G({}, t), h));
527
- var c = vr(i.stem);
528
- c && (t = G(G({}, t), c));
529
- }
530
- return t;
531
- }
532
- var be = {
533
- "001": [
534
- "H",
535
- "h"
536
- ],
537
- 419: [
538
- "h",
539
- "H",
540
- "hB",
541
- "hb"
542
- ],
543
- AC: [
544
- "H",
545
- "h",
546
- "hb",
547
- "hB"
548
- ],
549
- AD: [
550
- "H",
551
- "hB"
552
- ],
553
- AE: [
554
- "h",
555
- "hB",
556
- "hb",
557
- "H"
558
- ],
559
- AF: [
560
- "H",
561
- "hb",
562
- "hB",
563
- "h"
564
- ],
565
- AG: [
566
- "h",
567
- "hb",
568
- "H",
569
- "hB"
570
- ],
571
- AI: [
572
- "H",
573
- "h",
574
- "hb",
575
- "hB"
576
- ],
577
- AL: [
578
- "h",
579
- "H",
580
- "hB"
581
- ],
582
- AM: [
583
- "H",
584
- "hB"
585
- ],
586
- AO: [
587
- "H",
588
- "hB"
589
- ],
590
- AR: [
591
- "h",
592
- "H",
593
- "hB",
594
- "hb"
595
- ],
596
- AS: [
597
- "h",
598
- "H"
599
- ],
600
- AT: [
601
- "H",
602
- "hB"
603
- ],
604
- AU: [
605
- "h",
606
- "hb",
607
- "H",
608
- "hB"
609
- ],
610
- AW: [
611
- "H",
612
- "hB"
613
- ],
614
- AX: [
615
- "H"
616
- ],
617
- AZ: [
618
- "H",
619
- "hB",
620
- "h"
621
- ],
622
- BA: [
623
- "H",
624
- "hB",
625
- "h"
626
- ],
627
- BB: [
628
- "h",
629
- "hb",
630
- "H",
631
- "hB"
632
- ],
633
- BD: [
634
- "h",
635
- "hB",
636
- "H"
637
- ],
638
- BE: [
639
- "H",
640
- "hB"
641
- ],
642
- BF: [
643
- "H",
644
- "hB"
645
- ],
646
- BG: [
647
- "H",
648
- "hB",
649
- "h"
650
- ],
651
- BH: [
652
- "h",
653
- "hB",
654
- "hb",
655
- "H"
656
- ],
657
- BI: [
658
- "H",
659
- "h"
660
- ],
661
- BJ: [
662
- "H",
663
- "hB"
664
- ],
665
- BL: [
666
- "H",
667
- "hB"
668
- ],
669
- BM: [
670
- "h",
671
- "hb",
672
- "H",
673
- "hB"
674
- ],
675
- BN: [
676
- "hb",
677
- "hB",
678
- "h",
679
- "H"
680
- ],
681
- BO: [
682
- "h",
683
- "H",
684
- "hB",
685
- "hb"
686
- ],
687
- BQ: [
688
- "H"
689
- ],
690
- BR: [
691
- "H",
692
- "hB"
693
- ],
694
- BS: [
695
- "h",
696
- "hb",
697
- "H",
698
- "hB"
699
- ],
700
- BT: [
701
- "h",
702
- "H"
703
- ],
704
- BW: [
705
- "H",
706
- "h",
707
- "hb",
708
- "hB"
709
- ],
710
- BY: [
711
- "H",
712
- "h"
713
- ],
714
- BZ: [
715
- "H",
716
- "h",
717
- "hb",
718
- "hB"
719
- ],
720
- CA: [
721
- "h",
722
- "hb",
723
- "H",
724
- "hB"
725
- ],
726
- CC: [
727
- "H",
728
- "h",
729
- "hb",
730
- "hB"
731
- ],
732
- CD: [
733
- "hB",
734
- "H"
735
- ],
736
- CF: [
737
- "H",
738
- "h",
739
- "hB"
740
- ],
741
- CG: [
742
- "H",
743
- "hB"
744
- ],
745
- CH: [
746
- "H",
747
- "hB",
748
- "h"
749
- ],
750
- CI: [
751
- "H",
752
- "hB"
753
- ],
754
- CK: [
755
- "H",
756
- "h",
757
- "hb",
758
- "hB"
759
- ],
760
- CL: [
761
- "h",
762
- "H",
763
- "hB",
764
- "hb"
765
- ],
766
- CM: [
767
- "H",
768
- "h",
769
- "hB"
770
- ],
771
- CN: [
772
- "H",
773
- "hB",
774
- "hb",
775
- "h"
776
- ],
777
- CO: [
778
- "h",
779
- "H",
780
- "hB",
781
- "hb"
782
- ],
783
- CP: [
784
- "H"
785
- ],
786
- CR: [
787
- "h",
788
- "H",
789
- "hB",
790
- "hb"
791
- ],
792
- CU: [
793
- "h",
794
- "H",
795
- "hB",
796
- "hb"
797
- ],
798
- CV: [
799
- "H",
800
- "hB"
801
- ],
802
- CW: [
803
- "H",
804
- "hB"
805
- ],
806
- CX: [
807
- "H",
808
- "h",
809
- "hb",
810
- "hB"
811
- ],
812
- CY: [
813
- "h",
814
- "H",
815
- "hb",
816
- "hB"
817
- ],
818
- CZ: [
819
- "H"
820
- ],
821
- DE: [
822
- "H",
823
- "hB"
824
- ],
825
- DG: [
826
- "H",
827
- "h",
828
- "hb",
829
- "hB"
830
- ],
831
- DJ: [
832
- "h",
833
- "H"
834
- ],
835
- DK: [
836
- "H"
837
- ],
838
- DM: [
839
- "h",
840
- "hb",
841
- "H",
842
- "hB"
843
- ],
844
- DO: [
845
- "h",
846
- "H",
847
- "hB",
848
- "hb"
849
- ],
850
- DZ: [
851
- "h",
852
- "hB",
853
- "hb",
854
- "H"
855
- ],
856
- EA: [
857
- "H",
858
- "h",
859
- "hB",
860
- "hb"
861
- ],
862
- EC: [
863
- "h",
864
- "H",
865
- "hB",
866
- "hb"
867
- ],
868
- EE: [
869
- "H",
870
- "hB"
871
- ],
872
- EG: [
873
- "h",
874
- "hB",
875
- "hb",
876
- "H"
877
- ],
878
- EH: [
879
- "h",
880
- "hB",
881
- "hb",
882
- "H"
883
- ],
884
- ER: [
885
- "h",
886
- "H"
887
- ],
888
- ES: [
889
- "H",
890
- "hB",
891
- "h",
892
- "hb"
893
- ],
894
- ET: [
895
- "hB",
896
- "hb",
897
- "h",
898
- "H"
899
- ],
900
- FI: [
901
- "H"
902
- ],
903
- FJ: [
904
- "h",
905
- "hb",
906
- "H",
907
- "hB"
908
- ],
909
- FK: [
910
- "H",
911
- "h",
912
- "hb",
913
- "hB"
914
- ],
915
- FM: [
916
- "h",
917
- "hb",
918
- "H",
919
- "hB"
920
- ],
921
- FO: [
922
- "H",
923
- "h"
924
- ],
925
- FR: [
926
- "H",
927
- "hB"
928
- ],
929
- GA: [
930
- "H",
931
- "hB"
932
- ],
933
- GB: [
934
- "H",
935
- "h",
936
- "hb",
937
- "hB"
938
- ],
939
- GD: [
940
- "h",
941
- "hb",
942
- "H",
943
- "hB"
944
- ],
945
- GE: [
946
- "H",
947
- "hB",
948
- "h"
949
- ],
950
- GF: [
951
- "H",
952
- "hB"
953
- ],
954
- GG: [
955
- "H",
956
- "h",
957
- "hb",
958
- "hB"
959
- ],
960
- GH: [
961
- "h",
962
- "H"
963
- ],
964
- GI: [
965
- "H",
966
- "h",
967
- "hb",
968
- "hB"
969
- ],
970
- GL: [
971
- "H",
972
- "h"
973
- ],
974
- GM: [
975
- "h",
976
- "hb",
977
- "H",
978
- "hB"
979
- ],
980
- GN: [
981
- "H",
982
- "hB"
983
- ],
984
- GP: [
985
- "H",
986
- "hB"
987
- ],
988
- GQ: [
989
- "H",
990
- "hB",
991
- "h",
992
- "hb"
993
- ],
994
- GR: [
995
- "h",
996
- "H",
997
- "hb",
998
- "hB"
999
- ],
1000
- GT: [
1001
- "h",
1002
- "H",
1003
- "hB",
1004
- "hb"
1005
- ],
1006
- GU: [
1007
- "h",
1008
- "hb",
1009
- "H",
1010
- "hB"
1011
- ],
1012
- GW: [
1013
- "H",
1014
- "hB"
1015
- ],
1016
- GY: [
1017
- "h",
1018
- "hb",
1019
- "H",
1020
- "hB"
1021
- ],
1022
- HK: [
1023
- "h",
1024
- "hB",
1025
- "hb",
1026
- "H"
1027
- ],
1028
- HN: [
1029
- "h",
1030
- "H",
1031
- "hB",
1032
- "hb"
1033
- ],
1034
- HR: [
1035
- "H",
1036
- "hB"
1037
- ],
1038
- HU: [
1039
- "H",
1040
- "h"
1041
- ],
1042
- IC: [
1043
- "H",
1044
- "h",
1045
- "hB",
1046
- "hb"
1047
- ],
1048
- ID: [
1049
- "H"
1050
- ],
1051
- IE: [
1052
- "H",
1053
- "h",
1054
- "hb",
1055
- "hB"
1056
- ],
1057
- IL: [
1058
- "H",
1059
- "hB"
1060
- ],
1061
- IM: [
1062
- "H",
1063
- "h",
1064
- "hb",
1065
- "hB"
1066
- ],
1067
- IN: [
1068
- "h",
1069
- "H"
1070
- ],
1071
- IO: [
1072
- "H",
1073
- "h",
1074
- "hb",
1075
- "hB"
1076
- ],
1077
- IQ: [
1078
- "h",
1079
- "hB",
1080
- "hb",
1081
- "H"
1082
- ],
1083
- IR: [
1084
- "hB",
1085
- "H"
1086
- ],
1087
- IS: [
1088
- "H"
1089
- ],
1090
- IT: [
1091
- "H",
1092
- "hB"
1093
- ],
1094
- JE: [
1095
- "H",
1096
- "h",
1097
- "hb",
1098
- "hB"
1099
- ],
1100
- JM: [
1101
- "h",
1102
- "hb",
1103
- "H",
1104
- "hB"
1105
- ],
1106
- JO: [
1107
- "h",
1108
- "hB",
1109
- "hb",
1110
- "H"
1111
- ],
1112
- JP: [
1113
- "H",
1114
- "K",
1115
- "h"
1116
- ],
1117
- KE: [
1118
- "hB",
1119
- "hb",
1120
- "H",
1121
- "h"
1122
- ],
1123
- KG: [
1124
- "H",
1125
- "h",
1126
- "hB",
1127
- "hb"
1128
- ],
1129
- KH: [
1130
- "hB",
1131
- "h",
1132
- "H",
1133
- "hb"
1134
- ],
1135
- KI: [
1136
- "h",
1137
- "hb",
1138
- "H",
1139
- "hB"
1140
- ],
1141
- KM: [
1142
- "H",
1143
- "h",
1144
- "hB",
1145
- "hb"
1146
- ],
1147
- KN: [
1148
- "h",
1149
- "hb",
1150
- "H",
1151
- "hB"
1152
- ],
1153
- KP: [
1154
- "h",
1155
- "H",
1156
- "hB",
1157
- "hb"
1158
- ],
1159
- KR: [
1160
- "h",
1161
- "H",
1162
- "hB",
1163
- "hb"
1164
- ],
1165
- KW: [
1166
- "h",
1167
- "hB",
1168
- "hb",
1169
- "H"
1170
- ],
1171
- KY: [
1172
- "h",
1173
- "hb",
1174
- "H",
1175
- "hB"
1176
- ],
1177
- KZ: [
1178
- "H",
1179
- "hB"
1180
- ],
1181
- LA: [
1182
- "H",
1183
- "hb",
1184
- "hB",
1185
- "h"
1186
- ],
1187
- LB: [
1188
- "h",
1189
- "hB",
1190
- "hb",
1191
- "H"
1192
- ],
1193
- LC: [
1194
- "h",
1195
- "hb",
1196
- "H",
1197
- "hB"
1198
- ],
1199
- LI: [
1200
- "H",
1201
- "hB",
1202
- "h"
1203
- ],
1204
- LK: [
1205
- "H",
1206
- "h",
1207
- "hB",
1208
- "hb"
1209
- ],
1210
- LR: [
1211
- "h",
1212
- "hb",
1213
- "H",
1214
- "hB"
1215
- ],
1216
- LS: [
1217
- "h",
1218
- "H"
1219
- ],
1220
- LT: [
1221
- "H",
1222
- "h",
1223
- "hb",
1224
- "hB"
1225
- ],
1226
- LU: [
1227
- "H",
1228
- "h",
1229
- "hB"
1230
- ],
1231
- LV: [
1232
- "H",
1233
- "hB",
1234
- "hb",
1235
- "h"
1236
- ],
1237
- LY: [
1238
- "h",
1239
- "hB",
1240
- "hb",
1241
- "H"
1242
- ],
1243
- MA: [
1244
- "H",
1245
- "h",
1246
- "hB",
1247
- "hb"
1248
- ],
1249
- MC: [
1250
- "H",
1251
- "hB"
1252
- ],
1253
- MD: [
1254
- "H",
1255
- "hB"
1256
- ],
1257
- ME: [
1258
- "H",
1259
- "hB",
1260
- "h"
1261
- ],
1262
- MF: [
1263
- "H",
1264
- "hB"
1265
- ],
1266
- MG: [
1267
- "H",
1268
- "h"
1269
- ],
1270
- MH: [
1271
- "h",
1272
- "hb",
1273
- "H",
1274
- "hB"
1275
- ],
1276
- MK: [
1277
- "H",
1278
- "h",
1279
- "hb",
1280
- "hB"
1281
- ],
1282
- ML: [
1283
- "H"
1284
- ],
1285
- MM: [
1286
- "hB",
1287
- "hb",
1288
- "H",
1289
- "h"
1290
- ],
1291
- MN: [
1292
- "H",
1293
- "h",
1294
- "hb",
1295
- "hB"
1296
- ],
1297
- MO: [
1298
- "h",
1299
- "hB",
1300
- "hb",
1301
- "H"
1302
- ],
1303
- MP: [
1304
- "h",
1305
- "hb",
1306
- "H",
1307
- "hB"
1308
- ],
1309
- MQ: [
1310
- "H",
1311
- "hB"
1312
- ],
1313
- MR: [
1314
- "h",
1315
- "hB",
1316
- "hb",
1317
- "H"
1318
- ],
1319
- MS: [
1320
- "H",
1321
- "h",
1322
- "hb",
1323
- "hB"
1324
- ],
1325
- MT: [
1326
- "H",
1327
- "h"
1328
- ],
1329
- MU: [
1330
- "H",
1331
- "h"
1332
- ],
1333
- MV: [
1334
- "H",
1335
- "h"
1336
- ],
1337
- MW: [
1338
- "h",
1339
- "hb",
1340
- "H",
1341
- "hB"
1342
- ],
1343
- MX: [
1344
- "h",
1345
- "H",
1346
- "hB",
1347
- "hb"
1348
- ],
1349
- MY: [
1350
- "hb",
1351
- "hB",
1352
- "h",
1353
- "H"
1354
- ],
1355
- MZ: [
1356
- "H",
1357
- "hB"
1358
- ],
1359
- NA: [
1360
- "h",
1361
- "H",
1362
- "hB",
1363
- "hb"
1364
- ],
1365
- NC: [
1366
- "H",
1367
- "hB"
1368
- ],
1369
- NE: [
1370
- "H"
1371
- ],
1372
- NF: [
1373
- "H",
1374
- "h",
1375
- "hb",
1376
- "hB"
1377
- ],
1378
- NG: [
1379
- "H",
1380
- "h",
1381
- "hb",
1382
- "hB"
1383
- ],
1384
- NI: [
1385
- "h",
1386
- "H",
1387
- "hB",
1388
- "hb"
1389
- ],
1390
- NL: [
1391
- "H",
1392
- "hB"
1393
- ],
1394
- NO: [
1395
- "H",
1396
- "h"
1397
- ],
1398
- NP: [
1399
- "H",
1400
- "h",
1401
- "hB"
1402
- ],
1403
- NR: [
1404
- "H",
1405
- "h",
1406
- "hb",
1407
- "hB"
1408
- ],
1409
- NU: [
1410
- "H",
1411
- "h",
1412
- "hb",
1413
- "hB"
1414
- ],
1415
- NZ: [
1416
- "h",
1417
- "hb",
1418
- "H",
1419
- "hB"
1420
- ],
1421
- OM: [
1422
- "h",
1423
- "hB",
1424
- "hb",
1425
- "H"
1426
- ],
1427
- PA: [
1428
- "h",
1429
- "H",
1430
- "hB",
1431
- "hb"
1432
- ],
1433
- PE: [
1434
- "h",
1435
- "H",
1436
- "hB",
1437
- "hb"
1438
- ],
1439
- PF: [
1440
- "H",
1441
- "h",
1442
- "hB"
1443
- ],
1444
- PG: [
1445
- "h",
1446
- "H"
1447
- ],
1448
- PH: [
1449
- "h",
1450
- "hB",
1451
- "hb",
1452
- "H"
1453
- ],
1454
- PK: [
1455
- "h",
1456
- "hB",
1457
- "H"
1458
- ],
1459
- PL: [
1460
- "H",
1461
- "h"
1462
- ],
1463
- PM: [
1464
- "H",
1465
- "hB"
1466
- ],
1467
- PN: [
1468
- "H",
1469
- "h",
1470
- "hb",
1471
- "hB"
1472
- ],
1473
- PR: [
1474
- "h",
1475
- "H",
1476
- "hB",
1477
- "hb"
1478
- ],
1479
- PS: [
1480
- "h",
1481
- "hB",
1482
- "hb",
1483
- "H"
1484
- ],
1485
- PT: [
1486
- "H",
1487
- "hB"
1488
- ],
1489
- PW: [
1490
- "h",
1491
- "H"
1492
- ],
1493
- PY: [
1494
- "h",
1495
- "H",
1496
- "hB",
1497
- "hb"
1498
- ],
1499
- QA: [
1500
- "h",
1501
- "hB",
1502
- "hb",
1503
- "H"
1504
- ],
1505
- RE: [
1506
- "H",
1507
- "hB"
1508
- ],
1509
- RO: [
1510
- "H",
1511
- "hB"
1512
- ],
1513
- RS: [
1514
- "H",
1515
- "hB",
1516
- "h"
1517
- ],
1518
- RU: [
1519
- "H"
1520
- ],
1521
- RW: [
1522
- "H",
1523
- "h"
1524
- ],
1525
- SA: [
1526
- "h",
1527
- "hB",
1528
- "hb",
1529
- "H"
1530
- ],
1531
- SB: [
1532
- "h",
1533
- "hb",
1534
- "H",
1535
- "hB"
1536
- ],
1537
- SC: [
1538
- "H",
1539
- "h",
1540
- "hB"
1541
- ],
1542
- SD: [
1543
- "h",
1544
- "hB",
1545
- "hb",
1546
- "H"
1547
- ],
1548
- SE: [
1549
- "H"
1550
- ],
1551
- SG: [
1552
- "h",
1553
- "hb",
1554
- "H",
1555
- "hB"
1556
- ],
1557
- SH: [
1558
- "H",
1559
- "h",
1560
- "hb",
1561
- "hB"
1562
- ],
1563
- SI: [
1564
- "H",
1565
- "hB"
1566
- ],
1567
- SJ: [
1568
- "H"
1569
- ],
1570
- SK: [
1571
- "H"
1572
- ],
1573
- SL: [
1574
- "h",
1575
- "hb",
1576
- "H",
1577
- "hB"
1578
- ],
1579
- SM: [
1580
- "H",
1581
- "h",
1582
- "hB"
1583
- ],
1584
- SN: [
1585
- "H",
1586
- "h",
1587
- "hB"
1588
- ],
1589
- SO: [
1590
- "h",
1591
- "H"
1592
- ],
1593
- SR: [
1594
- "H",
1595
- "hB"
1596
- ],
1597
- SS: [
1598
- "h",
1599
- "hb",
1600
- "H",
1601
- "hB"
1602
- ],
1603
- ST: [
1604
- "H",
1605
- "hB"
1606
- ],
1607
- SV: [
1608
- "h",
1609
- "H",
1610
- "hB",
1611
- "hb"
1612
- ],
1613
- SX: [
1614
- "H",
1615
- "h",
1616
- "hb",
1617
- "hB"
1618
- ],
1619
- SY: [
1620
- "h",
1621
- "hB",
1622
- "hb",
1623
- "H"
1624
- ],
1625
- SZ: [
1626
- "h",
1627
- "hb",
1628
- "H",
1629
- "hB"
1630
- ],
1631
- TA: [
1632
- "H",
1633
- "h",
1634
- "hb",
1635
- "hB"
1636
- ],
1637
- TC: [
1638
- "h",
1639
- "hb",
1640
- "H",
1641
- "hB"
1642
- ],
1643
- TD: [
1644
- "h",
1645
- "H",
1646
- "hB"
1647
- ],
1648
- TF: [
1649
- "H",
1650
- "h",
1651
- "hB"
1652
- ],
1653
- TG: [
1654
- "H",
1655
- "hB"
1656
- ],
1657
- TH: [
1658
- "H",
1659
- "h"
1660
- ],
1661
- TJ: [
1662
- "H",
1663
- "h"
1664
- ],
1665
- TL: [
1666
- "H",
1667
- "hB",
1668
- "hb",
1669
- "h"
1670
- ],
1671
- TM: [
1672
- "H",
1673
- "h"
1674
- ],
1675
- TN: [
1676
- "h",
1677
- "hB",
1678
- "hb",
1679
- "H"
1680
- ],
1681
- TO: [
1682
- "h",
1683
- "H"
1684
- ],
1685
- TR: [
1686
- "H",
1687
- "hB"
1688
- ],
1689
- TT: [
1690
- "h",
1691
- "hb",
1692
- "H",
1693
- "hB"
1694
- ],
1695
- TW: [
1696
- "hB",
1697
- "hb",
1698
- "h",
1699
- "H"
1700
- ],
1701
- TZ: [
1702
- "hB",
1703
- "hb",
1704
- "H",
1705
- "h"
1706
- ],
1707
- UA: [
1708
- "H",
1709
- "hB",
1710
- "h"
1711
- ],
1712
- UG: [
1713
- "hB",
1714
- "hb",
1715
- "H",
1716
- "h"
1717
- ],
1718
- UM: [
1719
- "h",
1720
- "hb",
1721
- "H",
1722
- "hB"
1723
- ],
1724
- US: [
1725
- "h",
1726
- "hb",
1727
- "H",
1728
- "hB"
1729
- ],
1730
- UY: [
1731
- "h",
1732
- "H",
1733
- "hB",
1734
- "hb"
1735
- ],
1736
- UZ: [
1737
- "H",
1738
- "hB",
1739
- "h"
1740
- ],
1741
- VA: [
1742
- "H",
1743
- "h",
1744
- "hB"
1745
- ],
1746
- VC: [
1747
- "h",
1748
- "hb",
1749
- "H",
1750
- "hB"
1751
- ],
1752
- VE: [
1753
- "h",
1754
- "H",
1755
- "hB",
1756
- "hb"
1757
- ],
1758
- VG: [
1759
- "h",
1760
- "hb",
1761
- "H",
1762
- "hB"
1763
- ],
1764
- VI: [
1765
- "h",
1766
- "hb",
1767
- "H",
1768
- "hB"
1769
- ],
1770
- VN: [
1771
- "H",
1772
- "h"
1773
- ],
1774
- VU: [
1775
- "h",
1776
- "H"
1777
- ],
1778
- WF: [
1779
- "H",
1780
- "hB"
1781
- ],
1782
- WS: [
1783
- "h",
1784
- "H"
1785
- ],
1786
- XK: [
1787
- "H",
1788
- "hB",
1789
- "h"
1790
- ],
1791
- YE: [
1792
- "h",
1793
- "hB",
1794
- "hb",
1795
- "H"
1796
- ],
1797
- YT: [
1798
- "H",
1799
- "hB"
1800
- ],
1801
- ZA: [
1802
- "H",
1803
- "h",
1804
- "hb",
1805
- "hB"
1806
- ],
1807
- ZM: [
1808
- "h",
1809
- "hb",
1810
- "H",
1811
- "hB"
1812
- ],
1813
- ZW: [
1814
- "H",
1815
- "h"
1816
- ],
1817
- "af-ZA": [
1818
- "H",
1819
- "h",
1820
- "hB",
1821
- "hb"
1822
- ],
1823
- "ar-001": [
1824
- "h",
1825
- "hB",
1826
- "hb",
1827
- "H"
1828
- ],
1829
- "ca-ES": [
1830
- "H",
1831
- "h",
1832
- "hB"
1833
- ],
1834
- "en-001": [
1835
- "h",
1836
- "hb",
1837
- "H",
1838
- "hB"
1839
- ],
1840
- "en-HK": [
1841
- "h",
1842
- "hb",
1843
- "H",
1844
- "hB"
1845
- ],
1846
- "en-IL": [
1847
- "H",
1848
- "h",
1849
- "hb",
1850
- "hB"
1851
- ],
1852
- "en-MY": [
1853
- "h",
1854
- "hb",
1855
- "H",
1856
- "hB"
1857
- ],
1858
- "es-BR": [
1859
- "H",
1860
- "h",
1861
- "hB",
1862
- "hb"
1863
- ],
1864
- "es-ES": [
1865
- "H",
1866
- "h",
1867
- "hB",
1868
- "hb"
1869
- ],
1870
- "es-GQ": [
1871
- "H",
1872
- "h",
1873
- "hB",
1874
- "hb"
1875
- ],
1876
- "fr-CA": [
1877
- "H",
1878
- "h",
1879
- "hB"
1880
- ],
1881
- "gl-ES": [
1882
- "H",
1883
- "h",
1884
- "hB"
1885
- ],
1886
- "gu-IN": [
1887
- "hB",
1888
- "hb",
1889
- "h",
1890
- "H"
1891
- ],
1892
- "hi-IN": [
1893
- "hB",
1894
- "h",
1895
- "H"
1896
- ],
1897
- "it-CH": [
1898
- "H",
1899
- "h",
1900
- "hB"
1901
- ],
1902
- "it-IT": [
1903
- "H",
1904
- "h",
1905
- "hB"
1906
- ],
1907
- "kn-IN": [
1908
- "hB",
1909
- "h",
1910
- "H"
1911
- ],
1912
- "ml-IN": [
1913
- "hB",
1914
- "h",
1915
- "H"
1916
- ],
1917
- "mr-IN": [
1918
- "hB",
1919
- "hb",
1920
- "h",
1921
- "H"
1922
- ],
1923
- "pa-IN": [
1924
- "hB",
1925
- "hb",
1926
- "h",
1927
- "H"
1928
- ],
1929
- "ta-IN": [
1930
- "hB",
1931
- "h",
1932
- "hb",
1933
- "H"
1934
- ],
1935
- "te-IN": [
1936
- "hB",
1937
- "h",
1938
- "H"
1939
- ],
1940
- "zu-ZA": [
1941
- "H",
1942
- "hB",
1943
- "hb",
1944
- "h"
1945
- ]
1946
- };
1947
- function xr(e, t) {
1948
- for (var r = "", n = 0; n < e.length; n++) {
1949
- var i = e.charAt(n);
1950
- if (i === "j") {
1951
- for (var a = 0; n + 1 < e.length && e.charAt(n + 1) === i; )
1952
- a++, n++;
1953
- var h = 1 + (a & 1), c = a < 2 ? 1 : 3 + (a >> 1), g = "a", m = yr(t);
1954
- for ((m == "H" || m == "k") && (c = 0); c-- > 0; )
1955
- r += g;
1956
- for (; h-- > 0; )
1957
- r = m + r;
1958
- } else i === "J" ? r += "H" : r += i;
1959
- }
1960
- return r;
1961
- }
1962
- function yr(e) {
1963
- var t = e.hourCycle;
1964
- if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
1965
- e.hourCycles && // @ts-ignore
1966
- e.hourCycles.length && (t = e.hourCycles[0]), t)
1967
- switch (t) {
1968
- case "h24":
1969
- return "k";
1970
- case "h23":
1971
- return "H";
1972
- case "h12":
1973
- return "h";
1974
- case "h11":
1975
- return "K";
1976
- default:
1977
- throw new Error("Invalid hourCycle");
1978
- }
1979
- var r = e.language, n;
1980
- r !== "root" && (n = e.maximize().region);
1981
- var i = be[n || ""] || be[r || ""] || be["".concat(r, "-001")] || be["001"];
1982
- return i[0];
1983
- }
1984
- var De, Er = new RegExp("^".concat(Ht.source, "*")), _r = new RegExp("".concat(Ht.source, "*$"));
1985
- function P(e, t) {
1986
- return { start: e, end: t };
1987
- }
1988
- var Hr = !!String.prototype.startsWith && "_a".startsWith("a", 1), Tr = !!String.fromCodePoint, Sr = !!Object.fromEntries, Br = !!String.prototype.codePointAt, Mr = !!String.prototype.trimStart, Ar = !!String.prototype.trimEnd, wr = !!Number.isSafeInteger, Or = wr ? Number.isSafeInteger : function(e) {
1989
- return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
1990
- }, Fe = !0;
1991
- try {
1992
- var Pr = At("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
1993
- Fe = ((De = Pr.exec("a")) === null || De === void 0 ? void 0 : De[0]) === "a";
1994
- } catch {
1995
- Fe = !1;
1996
- }
1997
- var rt = Hr ? (
1998
- // Native
1999
- function(t, r, n) {
2000
- return t.startsWith(r, n);
2001
- }
2002
- ) : (
2003
- // For IE11
2004
- function(t, r, n) {
2005
- return t.slice(n, n + r.length) === r;
2006
- }
2007
- ), je = Tr ? String.fromCodePoint : (
2008
- // IE11
2009
- function() {
2010
- for (var t = [], r = 0; r < arguments.length; r++)
2011
- t[r] = arguments[r];
2012
- for (var n = "", i = t.length, a = 0, h; i > a; ) {
2013
- if (h = t[a++], h > 1114111)
2014
- throw RangeError(h + " is not a valid code point");
2015
- n += h < 65536 ? String.fromCharCode(h) : String.fromCharCode(((h -= 65536) >> 10) + 55296, h % 1024 + 56320);
2016
- }
2017
- return n;
2018
- }
2019
- ), nt = (
2020
- // native
2021
- Sr ? Object.fromEntries : (
2022
- // Ponyfill
2023
- function(t) {
2024
- for (var r = {}, n = 0, i = t; n < i.length; n++) {
2025
- var a = i[n], h = a[0], c = a[1];
2026
- r[h] = c;
2027
- }
2028
- return r;
2029
- }
2030
- )
2031
- ), Mt = Br ? (
2032
- // Native
2033
- function(t, r) {
2034
- return t.codePointAt(r);
2035
- }
2036
- ) : (
2037
- // IE 11
2038
- function(t, r) {
2039
- var n = t.length;
2040
- if (!(r < 0 || r >= n)) {
2041
- var i = t.charCodeAt(r), a;
2042
- return i < 55296 || i > 56319 || r + 1 === n || (a = t.charCodeAt(r + 1)) < 56320 || a > 57343 ? i : (i - 55296 << 10) + (a - 56320) + 65536;
2043
- }
2044
- }
2045
- ), Lr = Mr ? (
2046
- // Native
2047
- function(t) {
2048
- return t.trimStart();
2049
- }
2050
- ) : (
2051
- // Ponyfill
2052
- function(t) {
2053
- return t.replace(Er, "");
2054
- }
2055
- ), Ir = Ar ? (
2056
- // Native
2057
- function(t) {
2058
- return t.trimEnd();
2059
- }
2060
- ) : (
2061
- // Ponyfill
2062
- function(t) {
2063
- return t.replace(_r, "");
2064
- }
2065
- );
2066
- function At(e, t) {
2067
- return new RegExp(e, t);
2068
- }
2069
- var $e;
2070
- if (Fe) {
2071
- var it = At("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2072
- $e = function(t, r) {
2073
- var n;
2074
- it.lastIndex = r;
2075
- var i = it.exec(t);
2076
- return (n = i[1]) !== null && n !== void 0 ? n : "";
2077
- };
2078
- } else
2079
- $e = function(t, r) {
2080
- for (var n = []; ; ) {
2081
- var i = Mt(t, r);
2082
- if (i === void 0 || wt(i) || Rr(i))
2083
- break;
2084
- n.push(i), r += i >= 65536 ? 2 : 1;
2085
- }
2086
- return je.apply(void 0, n);
2087
- };
2088
- var Nr = (
2089
- /** @class */
2090
- function() {
2091
- function e(t, r) {
2092
- r === void 0 && (r = {}), this.message = t, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!r.ignoreTag, this.locale = r.locale, this.requiresOtherClause = !!r.requiresOtherClause, this.shouldParseSkeletons = !!r.shouldParseSkeletons;
2093
- }
2094
- return e.prototype.parse = function() {
2095
- if (this.offset() !== 0)
2096
- throw Error("parser can only be used once");
2097
- return this.parseMessage(0, "", !1);
2098
- }, e.prototype.parseMessage = function(t, r, n) {
2099
- for (var i = []; !this.isEOF(); ) {
2100
- var a = this.char();
2101
- if (a === 123) {
2102
- var h = this.parseArgument(t, n);
2103
- if (h.err)
2104
- return h;
2105
- i.push(h.val);
2106
- } else {
2107
- if (a === 125 && t > 0)
2108
- break;
2109
- if (a === 35 && (r === "plural" || r === "selectordinal")) {
2110
- var c = this.clonePosition();
2111
- this.bump(), i.push({
2112
- type: R.pound,
2113
- location: P(c, this.clonePosition())
2114
- });
2115
- } else if (a === 60 && !this.ignoreTag && this.peek() === 47) {
2116
- if (n)
2117
- break;
2118
- return this.error(O.UNMATCHED_CLOSING_TAG, P(this.clonePosition(), this.clonePosition()));
2119
- } else if (a === 60 && !this.ignoreTag && Ve(this.peek() || 0)) {
2120
- var h = this.parseTag(t, r);
2121
- if (h.err)
2122
- return h;
2123
- i.push(h.val);
2124
- } else {
2125
- var h = this.parseLiteral(t, r);
2126
- if (h.err)
2127
- return h;
2128
- i.push(h.val);
2129
- }
2130
- }
2131
- }
2132
- return { val: i, err: null };
2133
- }, e.prototype.parseTag = function(t, r) {
2134
- var n = this.clonePosition();
2135
- this.bump();
2136
- var i = this.parseTagName();
2137
- if (this.bumpSpace(), this.bumpIf("/>"))
2138
- return {
2139
- val: {
2140
- type: R.literal,
2141
- value: "<".concat(i, "/>"),
2142
- location: P(n, this.clonePosition())
2143
- },
2144
- err: null
2145
- };
2146
- if (this.bumpIf(">")) {
2147
- var a = this.parseMessage(t + 1, r, !0);
2148
- if (a.err)
2149
- return a;
2150
- var h = a.val, c = this.clonePosition();
2151
- if (this.bumpIf("</")) {
2152
- if (this.isEOF() || !Ve(this.char()))
2153
- return this.error(O.INVALID_TAG, P(c, this.clonePosition()));
2154
- var g = this.clonePosition(), m = this.parseTagName();
2155
- return i !== m ? this.error(O.UNMATCHED_CLOSING_TAG, P(g, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
2156
- val: {
2157
- type: R.tag,
2158
- value: i,
2159
- children: h,
2160
- location: P(n, this.clonePosition())
2161
- },
2162
- err: null
2163
- } : this.error(O.INVALID_TAG, P(c, this.clonePosition())));
2164
- } else
2165
- return this.error(O.UNCLOSED_TAG, P(n, this.clonePosition()));
2166
- } else
2167
- return this.error(O.INVALID_TAG, P(n, this.clonePosition()));
2168
- }, e.prototype.parseTagName = function() {
2169
- var t = this.offset();
2170
- for (this.bump(); !this.isEOF() && Cr(this.char()); )
2171
- this.bump();
2172
- return this.message.slice(t, this.offset());
2173
- }, e.prototype.parseLiteral = function(t, r) {
2174
- for (var n = this.clonePosition(), i = ""; ; ) {
2175
- var a = this.tryParseQuote(r);
2176
- if (a) {
2177
- i += a;
2178
- continue;
2179
- }
2180
- var h = this.tryParseUnquoted(t, r);
2181
- if (h) {
2182
- i += h;
2183
- continue;
2184
- }
2185
- var c = this.tryParseLeftAngleBracket();
2186
- if (c) {
2187
- i += c;
2188
- continue;
2189
- }
2190
- break;
2191
- }
2192
- var g = P(n, this.clonePosition());
2193
- return {
2194
- val: { type: R.literal, value: i, location: g },
2195
- err: null
2196
- };
2197
- }, e.prototype.tryParseLeftAngleBracket = function() {
2198
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
2199
- !Dr(this.peek() || 0)) ? (this.bump(), "<") : null;
2200
- }, e.prototype.tryParseQuote = function(t) {
2201
- if (this.isEOF() || this.char() !== 39)
2202
- return null;
2203
- switch (this.peek()) {
2204
- case 39:
2205
- return this.bump(), this.bump(), "'";
2206
- case 123:
2207
- case 60:
2208
- case 62:
2209
- case 125:
2210
- break;
2211
- case 35:
2212
- if (t === "plural" || t === "selectordinal")
2213
- break;
2214
- return null;
2215
- default:
2216
- return null;
2217
- }
2218
- this.bump();
2219
- var r = [this.char()];
2220
- for (this.bump(); !this.isEOF(); ) {
2221
- var n = this.char();
2222
- if (n === 39)
2223
- if (this.peek() === 39)
2224
- r.push(39), this.bump();
2225
- else {
2226
- this.bump();
2227
- break;
2228
- }
2229
- else
2230
- r.push(n);
2231
- this.bump();
2232
- }
2233
- return je.apply(void 0, r);
2234
- }, e.prototype.tryParseUnquoted = function(t, r) {
2235
- if (this.isEOF())
2236
- return null;
2237
- var n = this.char();
2238
- return n === 60 || n === 123 || n === 35 && (r === "plural" || r === "selectordinal") || n === 125 && t > 0 ? null : (this.bump(), je(n));
2239
- }, e.prototype.parseArgument = function(t, r) {
2240
- var n = this.clonePosition();
2241
- if (this.bump(), this.bumpSpace(), this.isEOF())
2242
- return this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE, P(n, this.clonePosition()));
2243
- if (this.char() === 125)
2244
- return this.bump(), this.error(O.EMPTY_ARGUMENT, P(n, this.clonePosition()));
2245
- var i = this.parseIdentifierIfPossible().value;
2246
- if (!i)
2247
- return this.error(O.MALFORMED_ARGUMENT, P(n, this.clonePosition()));
2248
- if (this.bumpSpace(), this.isEOF())
2249
- return this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE, P(n, this.clonePosition()));
2250
- switch (this.char()) {
2251
- case 125:
2252
- return this.bump(), {
2253
- val: {
2254
- type: R.argument,
2255
- // value does not include the opening and closing braces.
2256
- value: i,
2257
- location: P(n, this.clonePosition())
2258
- },
2259
- err: null
2260
- };
2261
- case 44:
2262
- return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE, P(n, this.clonePosition())) : this.parseArgumentOptions(t, r, i, n);
2263
- default:
2264
- return this.error(O.MALFORMED_ARGUMENT, P(n, this.clonePosition()));
2265
- }
2266
- }, e.prototype.parseIdentifierIfPossible = function() {
2267
- var t = this.clonePosition(), r = this.offset(), n = $e(this.message, r), i = r + n.length;
2268
- this.bumpTo(i);
2269
- var a = this.clonePosition(), h = P(t, a);
2270
- return { value: n, location: h };
2271
- }, e.prototype.parseArgumentOptions = function(t, r, n, i) {
2272
- var a, h = this.clonePosition(), c = this.parseIdentifierIfPossible().value, g = this.clonePosition();
2273
- switch (c) {
2274
- case "":
2275
- return this.error(O.EXPECT_ARGUMENT_TYPE, P(h, g));
2276
- case "number":
2277
- case "date":
2278
- case "time": {
2279
- this.bumpSpace();
2280
- var m = null;
2281
- if (this.bumpIf(",")) {
2282
- this.bumpSpace();
2283
- var s = this.clonePosition(), b = this.parseSimpleArgStyleIfPossible();
2284
- if (b.err)
2285
- return b;
2286
- var x = Ir(b.val);
2287
- if (x.length === 0)
2288
- return this.error(O.EXPECT_ARGUMENT_STYLE, P(this.clonePosition(), this.clonePosition()));
2289
- var L = P(s, this.clonePosition());
2290
- m = { style: x, styleLocation: L };
2291
- }
2292
- var U = this.tryParseArgumentClose(i);
2293
- if (U.err)
2294
- return U;
2295
- var k = P(i, this.clonePosition());
2296
- if (m && rt(m == null ? void 0 : m.style, "::", 0)) {
2297
- var y = Lr(m.style.slice(2));
2298
- if (c === "number") {
2299
- var b = this.parseNumberSkeletonFromString(y, m.styleLocation);
2300
- return b.err ? b : {
2301
- val: { type: R.number, value: n, location: k, style: b.val },
2302
- err: null
2303
- };
2304
- } else {
2305
- if (y.length === 0)
2306
- return this.error(O.EXPECT_DATE_TIME_SKELETON, k);
2307
- var M = y;
2308
- this.locale && (M = xr(y, this.locale));
2309
- var x = {
2310
- type: se.dateTime,
2311
- pattern: M,
2312
- location: m.styleLocation,
2313
- parsedOptions: this.shouldParseSkeletons ? cr(M) : {}
2314
- }, w = c === "date" ? R.date : R.time;
2315
- return {
2316
- val: { type: w, value: n, location: k, style: x },
2317
- err: null
2318
- };
2319
- }
2320
- }
2321
- return {
2322
- val: {
2323
- type: c === "number" ? R.number : c === "date" ? R.date : R.time,
2324
- value: n,
2325
- location: k,
2326
- style: (a = m == null ? void 0 : m.style) !== null && a !== void 0 ? a : null
2327
- },
2328
- err: null
2329
- };
2330
- }
2331
- case "plural":
2332
- case "selectordinal":
2333
- case "select": {
2334
- var S = this.clonePosition();
2335
- if (this.bumpSpace(), !this.bumpIf(","))
2336
- return this.error(O.EXPECT_SELECT_ARGUMENT_OPTIONS, P(S, Ee({}, S)));
2337
- this.bumpSpace();
2338
- var j = this.parseIdentifierIfPossible(), C = 0;
2339
- if (c !== "select" && j.value === "offset") {
2340
- if (!this.bumpIf(":"))
2341
- return this.error(O.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, P(this.clonePosition(), this.clonePosition()));
2342
- this.bumpSpace();
2343
- var b = this.tryParseDecimalInteger(O.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, O.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2344
- if (b.err)
2345
- return b;
2346
- this.bumpSpace(), j = this.parseIdentifierIfPossible(), C = b.val;
2347
- }
2348
- var $ = this.tryParsePluralOrSelectOptions(t, c, r, j);
2349
- if ($.err)
2350
- return $;
2351
- var U = this.tryParseArgumentClose(i);
2352
- if (U.err)
2353
- return U;
2354
- var Y = P(i, this.clonePosition());
2355
- return c === "select" ? {
2356
- val: {
2357
- type: R.select,
2358
- value: n,
2359
- options: nt($.val),
2360
- location: Y
2361
- },
2362
- err: null
2363
- } : {
2364
- val: {
2365
- type: R.plural,
2366
- value: n,
2367
- options: nt($.val),
2368
- offset: C,
2369
- pluralType: c === "plural" ? "cardinal" : "ordinal",
2370
- location: Y
2371
- },
2372
- err: null
2373
- };
2374
- }
2375
- default:
2376
- return this.error(O.INVALID_ARGUMENT_TYPE, P(h, g));
2377
- }
2378
- }, e.prototype.tryParseArgumentClose = function(t) {
2379
- return this.isEOF() || this.char() !== 125 ? this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE, P(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
2380
- }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2381
- for (var t = 0, r = this.clonePosition(); !this.isEOF(); ) {
2382
- var n = this.char();
2383
- switch (n) {
2384
- case 39: {
2385
- this.bump();
2386
- var i = this.clonePosition();
2387
- if (!this.bumpUntil("'"))
2388
- return this.error(O.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, P(i, this.clonePosition()));
2389
- this.bump();
2390
- break;
2391
- }
2392
- case 123: {
2393
- t += 1, this.bump();
2394
- break;
2395
- }
2396
- case 125: {
2397
- if (t > 0)
2398
- t -= 1;
2399
- else
2400
- return {
2401
- val: this.message.slice(r.offset, this.offset()),
2402
- err: null
2403
- };
2404
- break;
2405
- }
2406
- default:
2407
- this.bump();
2408
- break;
2409
- }
2410
- }
2411
- return {
2412
- val: this.message.slice(r.offset, this.offset()),
2413
- err: null
2414
- };
2415
- }, e.prototype.parseNumberSkeletonFromString = function(t, r) {
2416
- var n = [];
2417
- try {
2418
- n = dr(t);
2419
- } catch {
2420
- return this.error(O.INVALID_NUMBER_SKELETON, r);
2421
- }
2422
- return {
2423
- val: {
2424
- type: se.number,
2425
- tokens: n,
2426
- location: r,
2427
- parsedOptions: this.shouldParseSkeletons ? br(n) : {}
2428
- },
2429
- err: null
2430
- };
2431
- }, e.prototype.tryParsePluralOrSelectOptions = function(t, r, n, i) {
2432
- for (var a, h = !1, c = [], g = /* @__PURE__ */ new Set(), m = i.value, s = i.location; ; ) {
2433
- if (m.length === 0) {
2434
- var b = this.clonePosition();
2435
- if (r !== "select" && this.bumpIf("=")) {
2436
- var x = this.tryParseDecimalInteger(O.EXPECT_PLURAL_ARGUMENT_SELECTOR, O.INVALID_PLURAL_ARGUMENT_SELECTOR);
2437
- if (x.err)
2438
- return x;
2439
- s = P(b, this.clonePosition()), m = this.message.slice(b.offset, this.offset());
2440
- } else
2441
- break;
2442
- }
2443
- if (g.has(m))
2444
- return this.error(r === "select" ? O.DUPLICATE_SELECT_ARGUMENT_SELECTOR : O.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, s);
2445
- m === "other" && (h = !0), this.bumpSpace();
2446
- var L = this.clonePosition();
2447
- if (!this.bumpIf("{"))
2448
- return this.error(r === "select" ? O.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : O.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, P(this.clonePosition(), this.clonePosition()));
2449
- var U = this.parseMessage(t + 1, r, n);
2450
- if (U.err)
2451
- return U;
2452
- var k = this.tryParseArgumentClose(L);
2453
- if (k.err)
2454
- return k;
2455
- c.push([
2456
- m,
2457
- {
2458
- value: U.val,
2459
- location: P(L, this.clonePosition())
2460
- }
2461
- ]), g.add(m), this.bumpSpace(), a = this.parseIdentifierIfPossible(), m = a.value, s = a.location;
2462
- }
2463
- return c.length === 0 ? this.error(r === "select" ? O.EXPECT_SELECT_ARGUMENT_SELECTOR : O.EXPECT_PLURAL_ARGUMENT_SELECTOR, P(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !h ? this.error(O.MISSING_OTHER_CLAUSE, P(this.clonePosition(), this.clonePosition())) : { val: c, err: null };
2464
- }, e.prototype.tryParseDecimalInteger = function(t, r) {
2465
- var n = 1, i = this.clonePosition();
2466
- this.bumpIf("+") || this.bumpIf("-") && (n = -1);
2467
- for (var a = !1, h = 0; !this.isEOF(); ) {
2468
- var c = this.char();
2469
- if (c >= 48 && c <= 57)
2470
- a = !0, h = h * 10 + (c - 48), this.bump();
2471
- else
2472
- break;
2473
- }
2474
- var g = P(i, this.clonePosition());
2475
- return a ? (h *= n, Or(h) ? { val: h, err: null } : this.error(r, g)) : this.error(t, g);
2476
- }, e.prototype.offset = function() {
2477
- return this.position.offset;
2478
- }, e.prototype.isEOF = function() {
2479
- return this.offset() === this.message.length;
2480
- }, e.prototype.clonePosition = function() {
2481
- return {
2482
- offset: this.position.offset,
2483
- line: this.position.line,
2484
- column: this.position.column
2485
- };
2486
- }, e.prototype.char = function() {
2487
- var t = this.position.offset;
2488
- if (t >= this.message.length)
2489
- throw Error("out of bound");
2490
- var r = Mt(this.message, t);
2491
- if (r === void 0)
2492
- throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
2493
- return r;
2494
- }, e.prototype.error = function(t, r) {
2495
- return {
2496
- val: null,
2497
- err: {
2498
- kind: t,
2499
- message: this.message,
2500
- location: r
2501
- }
2502
- };
2503
- }, e.prototype.bump = function() {
2504
- if (!this.isEOF()) {
2505
- var t = this.char();
2506
- t === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2);
2507
- }
2508
- }, e.prototype.bumpIf = function(t) {
2509
- if (rt(this.message, t, this.offset())) {
2510
- for (var r = 0; r < t.length; r++)
2511
- this.bump();
2512
- return !0;
2513
- }
2514
- return !1;
2515
- }, e.prototype.bumpUntil = function(t) {
2516
- var r = this.offset(), n = this.message.indexOf(t, r);
2517
- return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
2518
- }, e.prototype.bumpTo = function(t) {
2519
- if (this.offset() > t)
2520
- throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset()));
2521
- for (t = Math.min(t, this.message.length); ; ) {
2522
- var r = this.offset();
2523
- if (r === t)
2524
- break;
2525
- if (r > t)
2526
- throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary"));
2527
- if (this.bump(), this.isEOF())
2528
- break;
2529
- }
2530
- }, e.prototype.bumpSpace = function() {
2531
- for (; !this.isEOF() && wt(this.char()); )
2532
- this.bump();
2533
- }, e.prototype.peek = function() {
2534
- if (this.isEOF())
2535
- return null;
2536
- var t = this.char(), r = this.offset(), n = this.message.charCodeAt(r + (t >= 65536 ? 2 : 1));
2537
- return n ?? null;
2538
- }, e;
2539
- }()
2540
- );
2541
- function Ve(e) {
2542
- return e >= 97 && e <= 122 || e >= 65 && e <= 90;
2543
- }
2544
- function Dr(e) {
2545
- return Ve(e) || e === 47;
2546
- }
2547
- function Cr(e) {
2548
- return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
2549
- }
2550
- function wt(e) {
2551
- return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
2552
- }
2553
- function Rr(e) {
2554
- return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
2555
- }
2556
- function ke(e) {
2557
- e.forEach(function(t) {
2558
- if (delete t.location, xt(t) || yt(t))
2559
- for (var r in t.options)
2560
- delete t.options[r].location, ke(t.options[r].value);
2561
- else gt(t) && _t(t.style) || (vt(t) || bt(t)) && Ge(t.style) ? delete t.style.location : Et(t) && ke(t.children);
2562
- });
2563
- }
2564
- function Ur(e, t) {
2565
- t === void 0 && (t = {}), t = Ee({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
2566
- var r = new Nr(e, t).parse();
2567
- if (r.err) {
2568
- var n = SyntaxError(O[r.err.kind]);
2569
- throw n.location = r.err.location, n.originalMessage = r.err.message, n;
2570
- }
2571
- return t != null && t.captureLocation || ke(r.val), r.val;
2572
- }
2573
- var oe;
2574
- (function(e) {
2575
- e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
2576
- })(oe || (oe = {}));
2577
- var Se = (
2578
- /** @class */
2579
- function(e) {
2580
- Te(t, e);
2581
- function t(r, n, i) {
2582
- var a = e.call(this, r) || this;
2583
- return a.code = n, a.originalMessage = i, a;
2584
- }
2585
- return t.prototype.toString = function() {
2586
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
2587
- }, t;
2588
- }(Error)
2589
- ), at = (
2590
- /** @class */
2591
- function(e) {
2592
- Te(t, e);
2593
- function t(r, n, i, a) {
2594
- return e.call(this, 'Invalid values for "'.concat(r, '": "').concat(n, '". Options are "').concat(Object.keys(i).join('", "'), '"'), oe.INVALID_VALUE, a) || this;
2595
- }
2596
- return t;
2597
- }(Se)
2598
- ), Gr = (
2599
- /** @class */
2600
- function(e) {
2601
- Te(t, e);
2602
- function t(r, n, i) {
2603
- return e.call(this, 'Value for "'.concat(r, '" must be of type ').concat(n), oe.INVALID_VALUE, i) || this;
2604
- }
2605
- return t;
2606
- }(Se)
2607
- ), Fr = (
2608
- /** @class */
2609
- function(e) {
2610
- Te(t, e);
2611
- function t(r, n) {
2612
- return e.call(this, 'The intl string context variable "'.concat(r, '" was not provided to the string "').concat(n, '"'), oe.MISSING_VALUE, n) || this;
2613
- }
2614
- return t;
2615
- }(Se)
2616
- ), Z;
2617
- (function(e) {
2618
- e[e.literal = 0] = "literal", e[e.object = 1] = "object";
2619
- })(Z || (Z = {}));
2620
- function jr(e) {
2621
- return e.length < 2 ? e : e.reduce(function(t, r) {
2622
- var n = t[t.length - 1];
2623
- return !n || n.type !== Z.literal || r.type !== Z.literal ? t.push(r) : n.value += r.value, t;
2624
- }, []);
2625
- }
2626
- function $r(e) {
2627
- return typeof e == "function";
2628
- }
2629
- function xe(e, t, r, n, i, a, h) {
2630
- if (e.length === 1 && Qe(e[0]))
2631
- return [
2632
- {
2633
- type: Z.literal,
2634
- value: e[0].value
2635
- }
2636
- ];
2637
- for (var c = [], g = 0, m = e; g < m.length; g++) {
2638
- var s = m[g];
2639
- if (Qe(s)) {
2640
- c.push({
2641
- type: Z.literal,
2642
- value: s.value
2643
- });
2644
- continue;
2645
- }
2646
- if (lr(s)) {
2647
- typeof a == "number" && c.push({
2648
- type: Z.literal,
2649
- value: r.getNumberFormat(t).format(a)
2650
- });
2651
- continue;
2652
- }
2653
- var b = s.value;
2654
- if (!(i && b in i))
2655
- throw new Fr(b, h);
2656
- var x = i[b];
2657
- if (hr(s)) {
2658
- (!x || typeof x == "string" || typeof x == "number") && (x = typeof x == "string" || typeof x == "number" ? String(x) : ""), c.push({
2659
- type: typeof x == "string" ? Z.literal : Z.object,
2660
- value: x
2661
- });
2662
- continue;
2663
- }
2664
- if (vt(s)) {
2665
- var L = typeof s.style == "string" ? n.date[s.style] : Ge(s.style) ? s.style.parsedOptions : void 0;
2666
- c.push({
2667
- type: Z.literal,
2668
- value: r.getDateTimeFormat(t, L).format(x)
2669
- });
2670
- continue;
2671
- }
2672
- if (bt(s)) {
2673
- var L = typeof s.style == "string" ? n.time[s.style] : Ge(s.style) ? s.style.parsedOptions : n.time.medium;
2674
- c.push({
2675
- type: Z.literal,
2676
- value: r.getDateTimeFormat(t, L).format(x)
2677
- });
2678
- continue;
2679
- }
2680
- if (gt(s)) {
2681
- var L = typeof s.style == "string" ? n.number[s.style] : _t(s.style) ? s.style.parsedOptions : void 0;
2682
- L && L.scale && (x = x * (L.scale || 1)), c.push({
2683
- type: Z.literal,
2684
- value: r.getNumberFormat(t, L).format(x)
2685
- });
2686
- continue;
2687
- }
2688
- if (Et(s)) {
2689
- var U = s.children, k = s.value, y = i[k];
2690
- if (!$r(y))
2691
- throw new Gr(k, "function", h);
2692
- var M = xe(U, t, r, n, i, a), w = y(M.map(function(C) {
2693
- return C.value;
2694
- }));
2695
- Array.isArray(w) || (w = [w]), c.push.apply(c, w.map(function(C) {
2696
- return {
2697
- type: typeof C == "string" ? Z.literal : Z.object,
2698
- value: C
2699
- };
2700
- }));
2701
- }
2702
- if (xt(s)) {
2703
- var S = s.options[x] || s.options.other;
2704
- if (!S)
2705
- throw new at(s.value, x, Object.keys(s.options), h);
2706
- c.push.apply(c, xe(S.value, t, r, n, i));
2707
- continue;
2708
- }
2709
- if (yt(s)) {
2710
- var S = s.options["=".concat(x)];
2711
- if (!S) {
2712
- if (!Intl.PluralRules)
2713
- throw new Se(`Intl.PluralRules is not available in this environment.
2714
- Try polyfilling it using "@formatjs/intl-pluralrules"
2715
- `, oe.MISSING_INTL_API, h);
2716
- var j = r.getPluralRules(t, { type: s.pluralType }).select(x - (s.offset || 0));
2717
- S = s.options[j] || s.options.other;
2718
- }
2719
- if (!S)
2720
- throw new at(s.value, x, Object.keys(s.options), h);
2721
- c.push.apply(c, xe(S.value, t, r, n, i, x - (s.offset || 0)));
2722
- continue;
2723
- }
2724
- }
2725
- return jr(c);
2726
- }
2727
- function Vr(e, t) {
2728
- return t ? Q(Q(Q({}, e || {}), t || {}), Object.keys(e).reduce(function(r, n) {
2729
- return r[n] = Q(Q({}, e[n]), t[n] || {}), r;
2730
- }, {})) : e;
2731
- }
2732
- function kr(e, t) {
2733
- return t ? Object.keys(e).reduce(function(r, n) {
2734
- return r[n] = Vr(e[n], t[n]), r;
2735
- }, Q({}, e)) : e;
2736
- }
2737
- function Ce(e) {
2738
- return {
2739
- create: function() {
2740
- return {
2741
- get: function(t) {
2742
- return e[t];
2743
- },
2744
- set: function(t, r) {
2745
- e[t] = r;
2746
- }
2747
- };
2748
- }
2749
- };
2750
- }
2751
- function Xr(e) {
2752
- return e === void 0 && (e = {
2753
- number: {},
2754
- dateTime: {},
2755
- pluralRules: {}
2756
- }), {
2757
- getNumberFormat: Ie(function() {
2758
- for (var t, r = [], n = 0; n < arguments.length; n++)
2759
- r[n] = arguments[n];
2760
- return new ((t = Intl.NumberFormat).bind.apply(t, Le([void 0], r, !1)))();
2761
- }, {
2762
- cache: Ce(e.number),
2763
- strategy: Ne.variadic
2764
- }),
2765
- getDateTimeFormat: Ie(function() {
2766
- for (var t, r = [], n = 0; n < arguments.length; n++)
2767
- r[n] = arguments[n];
2768
- return new ((t = Intl.DateTimeFormat).bind.apply(t, Le([void 0], r, !1)))();
2769
- }, {
2770
- cache: Ce(e.dateTime),
2771
- strategy: Ne.variadic
2772
- }),
2773
- getPluralRules: Ie(function() {
2774
- for (var t, r = [], n = 0; n < arguments.length; n++)
2775
- r[n] = arguments[n];
2776
- return new ((t = Intl.PluralRules).bind.apply(t, Le([void 0], r, !1)))();
2777
- }, {
2778
- cache: Ce(e.pluralRules),
2779
- strategy: Ne.variadic
2780
- })
2781
- };
2782
- }
2783
- var Yr = (
2784
- /** @class */
2785
- function() {
2786
- function e(t, r, n, i) {
2787
- r === void 0 && (r = e.defaultLocale);
2788
- var a = this;
2789
- if (this.formatterCache = {
2790
- number: {},
2791
- dateTime: {},
2792
- pluralRules: {}
2793
- }, this.format = function(g) {
2794
- var m = a.formatToParts(g);
2795
- if (m.length === 1)
2796
- return m[0].value;
2797
- var s = m.reduce(function(b, x) {
2798
- return !b.length || x.type !== Z.literal || typeof b[b.length - 1] != "string" ? b.push(x.value) : b[b.length - 1] += x.value, b;
2799
- }, []);
2800
- return s.length <= 1 ? s[0] || "" : s;
2801
- }, this.formatToParts = function(g) {
2802
- return xe(a.ast, a.locales, a.formatters, a.formats, g, void 0, a.message);
2803
- }, this.resolvedOptions = function() {
2804
- var g;
2805
- return {
2806
- locale: ((g = a.resolvedLocale) === null || g === void 0 ? void 0 : g.toString()) || Intl.NumberFormat.supportedLocalesOf(a.locales)[0]
2807
- };
2808
- }, this.getAst = function() {
2809
- return a.ast;
2810
- }, this.locales = r, this.resolvedLocale = e.resolveLocale(r), typeof t == "string") {
2811
- if (this.message = t, !e.__parse)
2812
- throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
2813
- var h = i || {};
2814
- h.formatters;
2815
- var c = tr(h, ["formatters"]);
2816
- this.ast = e.__parse(t, Q(Q({}, c), { locale: this.resolvedLocale }));
2817
- } else
2818
- this.ast = t;
2819
- if (!Array.isArray(this.ast))
2820
- throw new TypeError("A message must be provided as a String or AST.");
2821
- this.formats = kr(e.formats, n), this.formatters = i && i.formatters || Xr(this.formatterCache);
2822
- }
2823
- return Object.defineProperty(e, "defaultLocale", {
2824
- get: function() {
2825
- return e.memoizedDefaultLocale || (e.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), e.memoizedDefaultLocale;
2826
- },
2827
- enumerable: !1,
2828
- configurable: !0
2829
- }), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
2830
- if (!(typeof Intl.Locale > "u")) {
2831
- var r = Intl.NumberFormat.supportedLocalesOf(t);
2832
- return r.length > 0 ? new Intl.Locale(r[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
2833
- }
2834
- }, e.__parse = Ur, e.formats = {
2835
- number: {
2836
- integer: {
2837
- maximumFractionDigits: 0
2838
- },
2839
- currency: {
2840
- style: "currency"
2841
- },
2842
- percent: {
2843
- style: "percent"
2844
- }
2845
- },
2846
- date: {
2847
- short: {
2848
- month: "numeric",
2849
- day: "numeric",
2850
- year: "2-digit"
2851
- },
2852
- medium: {
2853
- month: "short",
2854
- day: "numeric",
2855
- year: "numeric"
2856
- },
2857
- long: {
2858
- month: "long",
2859
- day: "numeric",
2860
- year: "numeric"
2861
- },
2862
- full: {
2863
- weekday: "long",
2864
- month: "long",
2865
- day: "numeric",
2866
- year: "numeric"
2867
- }
2868
- },
2869
- time: {
2870
- short: {
2871
- hour: "numeric",
2872
- minute: "numeric"
2873
- },
2874
- medium: {
2875
- hour: "numeric",
2876
- minute: "numeric",
2877
- second: "numeric"
2878
- },
2879
- long: {
2880
- hour: "numeric",
2881
- minute: "numeric",
2882
- second: "numeric",
2883
- timeZoneName: "short"
2884
- },
2885
- full: {
2886
- hour: "numeric",
2887
- minute: "numeric",
2888
- second: "numeric",
2889
- timeZoneName: "short"
2890
- }
2891
- }
2892
- }, e;
2893
- }()
2894
- );
2895
- function Wr(e, t) {
2896
- if (t == null)
2897
- return;
2898
- if (t in e)
2899
- return e[t];
2900
- const r = t.split(".");
2901
- let n = e;
2902
- for (let i = 0; i < r.length; i++)
2903
- if (typeof n == "object") {
2904
- if (i > 0) {
2905
- const a = r.slice(i, r.length).join(".");
2906
- if (a in n) {
2907
- n = n[a];
2908
- break;
2909
- }
2910
- }
2911
- n = n[r[i]];
2912
- } else
2913
- n = void 0;
2914
- return n;
2915
- }
2916
- const re = {}, Zr = (e, t, r) => r && (t in re || (re[t] = {}), e in re[t] || (re[t][e] = r), r), Ot = (e, t) => {
2917
- if (t == null)
2918
- return;
2919
- if (t in re && e in re[t])
2920
- return re[t][e];
2921
- const r = Be(t);
2922
- for (let n = 0; n < r.length; n++) {
2923
- const i = r[n], a = Jr(i, e);
2924
- if (a)
2925
- return Zr(e, t, a);
2926
- }
2927
- };
2928
- let ze;
2929
- const pe = We({});
2930
- function zr(e) {
2931
- return ze[e] || null;
2932
- }
2933
- function Pt(e) {
2934
- return e in ze;
2935
- }
2936
- function Jr(e, t) {
2937
- if (!Pt(e))
2938
- return null;
2939
- const r = zr(e);
2940
- return Wr(r, t);
2941
- }
2942
- function qr(e) {
2943
- if (e == null)
2944
- return;
2945
- const t = Be(e);
2946
- for (let r = 0; r < t.length; r++) {
2947
- const n = t[r];
2948
- if (Pt(n))
2949
- return n;
2950
- }
2951
- }
2952
- function Lt(e, ...t) {
2953
- delete re[e], pe.update((r) => (r[e] = er.all([r[e] || {}, ...t]), r));
2954
- }
2955
- he(
2956
- [pe],
2957
- ([e]) => Object.keys(e)
2958
- );
2959
- pe.subscribe((e) => ze = e);
2960
- const ye = {};
2961
- function Qr(e, t) {
2962
- ye[e].delete(t), ye[e].size === 0 && delete ye[e];
2963
- }
2964
- function It(e) {
2965
- return ye[e];
2966
- }
2967
- function Kr(e) {
2968
- return Be(e).map((t) => {
2969
- const r = It(t);
2970
- return [t, r ? [...r] : []];
2971
- }).filter(([, t]) => t.length > 0);
2972
- }
2973
- function Xe(e) {
2974
- return e == null ? !1 : Be(e).some(
2975
- (t) => {
2976
- var r;
2977
- return (r = It(t)) == null ? void 0 : r.size;
2978
- }
2979
- );
2980
- }
2981
- function en(e, t) {
2982
- return Promise.all(
2983
- t.map((n) => (Qr(e, n), n().then((i) => i.default || i)))
2984
- ).then((n) => Lt(e, ...n));
2985
- }
2986
- const ce = {};
2987
- function Nt(e) {
2988
- if (!Xe(e))
2989
- return e in ce ? ce[e] : Promise.resolve();
2990
- const t = Kr(e);
2991
- return ce[e] = Promise.all(
2992
- t.map(
2993
- ([r, n]) => en(r, n)
2994
- )
2995
- ).then(() => {
2996
- if (Xe(e))
2997
- return Nt(e);
2998
- delete ce[e];
2999
- }), ce[e];
3000
- }
3001
- const tn = {
3002
- number: {
3003
- scientific: { notation: "scientific" },
3004
- engineering: { notation: "engineering" },
3005
- compactLong: { notation: "compact", compactDisplay: "long" },
3006
- compactShort: { notation: "compact", compactDisplay: "short" }
3007
- },
3008
- date: {
3009
- short: { month: "numeric", day: "numeric", year: "2-digit" },
3010
- medium: { month: "short", day: "numeric", year: "numeric" },
3011
- long: { month: "long", day: "numeric", year: "numeric" },
3012
- full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
3013
- },
3014
- time: {
3015
- short: { hour: "numeric", minute: "numeric" },
3016
- medium: { hour: "numeric", minute: "numeric", second: "numeric" },
3017
- long: {
3018
- hour: "numeric",
3019
- minute: "numeric",
3020
- second: "numeric",
3021
- timeZoneName: "short"
3022
- },
3023
- full: {
3024
- hour: "numeric",
3025
- minute: "numeric",
3026
- second: "numeric",
3027
- timeZoneName: "short"
3028
- }
3029
- }
3030
- }, rn = {
3031
- fallbackLocale: null,
3032
- loadingDelay: 200,
3033
- formats: tn,
3034
- warnOnMissingMessages: !0,
3035
- handleMissingMessage: void 0,
3036
- ignoreTag: !0
3037
- }, nn = rn;
3038
- function ue() {
3039
- return nn;
3040
- }
3041
- const Re = We(!1);
3042
- var an = Object.defineProperty, sn = Object.defineProperties, on = Object.getOwnPropertyDescriptors, st = Object.getOwnPropertySymbols, un = Object.prototype.hasOwnProperty, hn = Object.prototype.propertyIsEnumerable, ot = (e, t, r) => t in e ? an(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ln = (e, t) => {
3043
- for (var r in t || (t = {}))
3044
- un.call(t, r) && ot(e, r, t[r]);
3045
- if (st)
3046
- for (var r of st(t))
3047
- hn.call(t, r) && ot(e, r, t[r]);
3048
- return e;
3049
- }, fn = (e, t) => sn(e, on(t));
3050
- let Ye;
3051
- const _e = We(null);
3052
- function ut(e) {
3053
- return e.split("-").map((t, r, n) => n.slice(0, r + 1).join("-")).reverse();
3054
- }
3055
- function Be(e, t = ue().fallbackLocale) {
3056
- const r = ut(e);
3057
- return t ? [.../* @__PURE__ */ new Set([...r, ...ut(t)])] : r;
3058
- }
3059
- function ie() {
3060
- return Ye ?? void 0;
3061
- }
3062
- _e.subscribe((e) => {
3063
- Ye = e ?? void 0, typeof window < "u" && e != null && document.documentElement.setAttribute("lang", e);
3064
- });
3065
- const cn = (e) => {
3066
- if (e && qr(e) && Xe(e)) {
3067
- const { loadingDelay: t } = ue();
3068
- let r;
3069
- return typeof window < "u" && ie() != null && t ? r = window.setTimeout(
3070
- () => Re.set(!0),
3071
- t
3072
- ) : Re.set(!0), Nt(e).then(() => {
3073
- _e.set(e);
3074
- }).finally(() => {
3075
- clearTimeout(r), Re.set(!1);
3076
- });
3077
- }
3078
- return _e.set(e);
3079
- }, le = fn(ln({}, _e), {
3080
- set: cn
3081
- }), Me = (e) => {
3082
- const t = /* @__PURE__ */ Object.create(null);
3083
- return (n) => {
3084
- const i = JSON.stringify(n);
3085
- return i in t ? t[i] : t[i] = e(n);
3086
- };
3087
- };
3088
- var mn = Object.defineProperty, He = Object.getOwnPropertySymbols, Dt = Object.prototype.hasOwnProperty, Ct = Object.prototype.propertyIsEnumerable, ht = (e, t, r) => t in e ? mn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Je = (e, t) => {
3089
- for (var r in t || (t = {}))
3090
- Dt.call(t, r) && ht(e, r, t[r]);
3091
- if (He)
3092
- for (var r of He(t))
3093
- Ct.call(t, r) && ht(e, r, t[r]);
3094
- return e;
3095
- }, fe = (e, t) => {
3096
- var r = {};
3097
- for (var n in e)
3098
- Dt.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
3099
- if (e != null && He)
3100
- for (var n of He(e))
3101
- t.indexOf(n) < 0 && Ct.call(e, n) && (r[n] = e[n]);
3102
- return r;
3103
- };
3104
- const de = (e, t) => {
3105
- const { formats: r } = ue();
3106
- if (e in r && t in r[e])
3107
- return r[e][t];
3108
- throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`);
3109
- }, dn = Me(
3110
- (e) => {
3111
- var t = e, { locale: r, format: n } = t, i = fe(t, ["locale", "format"]);
3112
- if (r == null)
3113
- throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
3114
- return n && (i = de("number", n)), new Intl.NumberFormat(r, i);
3115
- }
3116
- ), pn = Me(
3117
- (e) => {
3118
- var t = e, { locale: r, format: n } = t, i = fe(t, ["locale", "format"]);
3119
- if (r == null)
3120
- throw new Error('[svelte-i18n] A "locale" must be set to format dates');
3121
- return n ? i = de("date", n) : Object.keys(i).length === 0 && (i = de("date", "short")), new Intl.DateTimeFormat(r, i);
3122
- }
3123
- ), gn = Me(
3124
- (e) => {
3125
- var t = e, { locale: r, format: n } = t, i = fe(t, ["locale", "format"]);
3126
- if (r == null)
3127
- throw new Error(
3128
- '[svelte-i18n] A "locale" must be set to format time values'
3129
- );
3130
- return n ? i = de("time", n) : Object.keys(i).length === 0 && (i = de("time", "short")), new Intl.DateTimeFormat(r, i);
3131
- }
3132
- ), vn = (e = {}) => {
3133
- var t = e, {
3134
- locale: r = ie()
3135
- } = t, n = fe(t, [
3136
- "locale"
3137
- ]);
3138
- return dn(Je({ locale: r }, n));
3139
- }, bn = (e = {}) => {
3140
- var t = e, {
3141
- locale: r = ie()
3142
- } = t, n = fe(t, [
3143
- "locale"
3144
- ]);
3145
- return pn(Je({ locale: r }, n));
3146
- }, xn = (e = {}) => {
3147
- var t = e, {
3148
- locale: r = ie()
3149
- } = t, n = fe(t, [
3150
- "locale"
3151
- ]);
3152
- return gn(Je({ locale: r }, n));
3153
- }, yn = Me(
3154
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3155
- (e, t = ie()) => new Yr(e, t, ue().formats, {
3156
- ignoreTag: ue().ignoreTag
3157
- })
3158
- ), En = (e, t = {}) => {
3159
- var r, n, i, a;
3160
- let h = t;
3161
- typeof e == "object" && (h = e, e = h.id);
3162
- const {
3163
- values: c,
3164
- locale: g = ie(),
3165
- default: m
3166
- } = h;
3167
- if (g == null)
3168
- throw new Error(
3169
- "[svelte-i18n] Cannot format a message without first setting the initial locale."
3170
- );
3171
- let s = Ot(e, g);
3172
- if (!s)
3173
- s = (a = (i = (n = (r = ue()).handleMissingMessage) == null ? void 0 : n.call(r, { locale: g, id: e, defaultValue: m })) != null ? i : m) != null ? a : e;
3174
- else if (typeof s != "string")
3175
- return console.warn(
3176
- `[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof s}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
3177
- ), s;
3178
- if (!c)
3179
- return s;
3180
- let b = s;
3181
- try {
3182
- b = yn(s, g).format(c);
3183
- } catch (x) {
3184
- x instanceof Error && console.warn(
3185
- `[svelte-i18n] Message "${e}" has syntax error:`,
3186
- x.message
3187
- );
3188
- }
3189
- return b;
3190
- }, _n = (e, t) => xn(t).format(e), Hn = (e, t) => bn(t).format(e), Tn = (e, t) => vn(t).format(e), Sn = (e, t = ie()) => Ot(e, t), Bn = he([le, pe], () => En);
3191
- he([le], () => _n);
3192
- he([le], () => Hn);
3193
- he([le], () => Tn);
3194
- he([le, pe], () => Sn);
3195
- function Mn(e, t) {
3196
- Lt(e, t);
3197
- }
3198
- function lt(e) {
3199
- le.set(e);
3200
- }
3201
- const ft = {
3202
- en: {
3203
- Unstarted: "Coming soon",
3204
- Running: "Live",
3205
- Closed: "Ended",
3206
- Closing: "Ended",
3207
- startDateLabel: "Start Date:",
3208
- viewDetailsButton: "View Details",
3209
- detailsButton: "Details",
3210
- loginButton: "Login",
3211
- registerButton: "Register",
3212
- endsInLabel: "Ends in:",
3213
- joinButton: "Join",
3214
- daysLabel: "Days",
3215
- enrolledLabel: "Enrolled"
3216
- },
3217
- tr: {
3218
- Unstarted: "Yakında",
3219
- Running: "Canlı",
3220
- Closed: "Sona erdi",
3221
- Closing: "Sona erdi",
3222
- startDateLabel: "Başlangıç Tarihi:",
3223
- viewDetailsButton: "Detayları Gör",
3224
- detailsButton: "Detaylar",
3225
- loginButton: "Giriş Yap",
3226
- registerButton: "Kayıt Ol",
3227
- endsInLabel: "Bitiş:",
3228
- joinButton: "Join",
3229
- daysLabel: "Günler",
3230
- enrolledLabel: "Kayıtlı"
3231
- }
3232
- };
3233
- var Rt = { exports: {} };
3234
- (function(e, t) {
3235
- (function(r, n) {
3236
- e.exports = n();
3237
- })(ct, function() {
3238
- var r = 1e3, n = 6e4, i = 36e5, a = "millisecond", h = "second", c = "minute", g = "hour", m = "day", s = "week", b = "month", x = "quarter", L = "year", U = "date", k = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, M = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, w = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(d) {
3239
- var l = ["th", "st", "nd", "rd"], u = d % 100;
3240
- return "[" + d + (l[(u - 20) % 10] || l[u] || l[0]) + "]";
3241
- } }, S = function(d, l, u) {
3242
- var p = String(d);
3243
- return !p || p.length >= l ? d : "" + Array(l + 1 - p.length).join(u) + d;
3244
- }, j = { s: S, z: function(d) {
3245
- var l = -d.utcOffset(), u = Math.abs(l), p = Math.floor(u / 60), f = u % 60;
3246
- return (l <= 0 ? "+" : "-") + S(p, 2, "0") + ":" + S(f, 2, "0");
3247
- }, m: function d(l, u) {
3248
- if (l.date() < u.date()) return -d(u, l);
3249
- var p = 12 * (u.year() - l.year()) + (u.month() - l.month()), f = l.clone().add(p, b), v = u - f < 0, E = l.clone().add(p + (v ? -1 : 1), b);
3250
- return +(-(p + (u - f) / (v ? f - E : E - f)) || 0);
3251
- }, a: function(d) {
3252
- return d < 0 ? Math.ceil(d) || 0 : Math.floor(d);
3253
- }, p: function(d) {
3254
- return { M: b, y: L, w: s, d: m, D: U, h: g, m: c, s: h, ms: a, Q: x }[d] || String(d || "").toLowerCase().replace(/s$/, "");
3255
- }, u: function(d) {
3256
- return d === void 0;
3257
- } }, C = "en", $ = {};
3258
- $[C] = w;
3259
- var Y = "$isDayjsObject", W = function(d) {
3260
- return d instanceof F || !(!d || !d[Y]);
3261
- }, H = function d(l, u, p) {
3262
- var f;
3263
- if (!l) return C;
3264
- if (typeof l == "string") {
3265
- var v = l.toLowerCase();
3266
- $[v] && (f = v), u && ($[v] = u, f = v);
3267
- var E = l.split("-");
3268
- if (!f && E.length > 1) return d(E[0]);
3269
- } else {
3270
- var T = l.name;
3271
- $[T] = l, f = T;
3272
- }
3273
- return !p && f && (C = f), f || !p && C;
3274
- }, B = function(d, l) {
3275
- if (W(d)) return d.clone();
3276
- var u = typeof l == "object" ? l : {};
3277
- return u.date = d, u.args = arguments, new F(u);
3278
- }, _ = j;
3279
- _.l = H, _.i = W, _.w = function(d, l) {
3280
- return B(d, { locale: l.$L, utc: l.$u, x: l.$x, $offset: l.$offset });
3281
- };
3282
- var F = function() {
3283
- function d(u) {
3284
- this.$L = H(u.locale, null, !0), this.parse(u), this.$x = this.$x || u.x || {}, this[Y] = !0;
3285
- }
3286
- var l = d.prototype;
3287
- return l.parse = function(u) {
3288
- this.$d = function(p) {
3289
- var f = p.date, v = p.utc;
3290
- if (f === null) return /* @__PURE__ */ new Date(NaN);
3291
- if (_.u(f)) return /* @__PURE__ */ new Date();
3292
- if (f instanceof Date) return new Date(f);
3293
- if (typeof f == "string" && !/Z$/i.test(f)) {
3294
- var E = f.match(y);
3295
- if (E) {
3296
- var T = E[2] - 1 || 0, D = (E[7] || "0").substring(0, 3);
3297
- return v ? new Date(Date.UTC(E[1], T, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, D)) : new Date(E[1], T, E[3] || 1, E[4] || 0, E[5] || 0, E[6] || 0, D);
3298
- }
3299
- }
3300
- return new Date(f);
3301
- }(u), this.init();
3302
- }, l.init = function() {
3303
- var u = this.$d;
3304
- this.$y = u.getFullYear(), this.$M = u.getMonth(), this.$D = u.getDate(), this.$W = u.getDay(), this.$H = u.getHours(), this.$m = u.getMinutes(), this.$s = u.getSeconds(), this.$ms = u.getMilliseconds();
3305
- }, l.$utils = function() {
3306
- return _;
3307
- }, l.isValid = function() {
3308
- return this.$d.toString() !== k;
3309
- }, l.isSame = function(u, p) {
3310
- var f = B(u);
3311
- return this.startOf(p) <= f && f <= this.endOf(p);
3312
- }, l.isAfter = function(u, p) {
3313
- return B(u) < this.startOf(p);
3314
- }, l.isBefore = function(u, p) {
3315
- return this.endOf(p) < B(u);
3316
- }, l.$g = function(u, p, f) {
3317
- return _.u(u) ? this[p] : this.set(f, u);
3318
- }, l.unix = function() {
3319
- return Math.floor(this.valueOf() / 1e3);
3320
- }, l.valueOf = function() {
3321
- return this.$d.getTime();
3322
- }, l.startOf = function(u, p) {
3323
- var f = this, v = !!_.u(p) || p, E = _.p(u), T = function(q, X) {
3324
- var J = _.w(f.$u ? Date.UTC(f.$y, X, q) : new Date(f.$y, X, q), f);
3325
- return v ? J : J.endOf(m);
3326
- }, D = function(q, X) {
3327
- return _.w(f.toDate()[q].apply(f.toDate("s"), (v ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(X)), f);
3328
- }, A = this.$W, I = this.$M, V = this.$D, z = "set" + (this.$u ? "UTC" : "");
3329
- switch (E) {
3330
- case L:
3331
- return v ? T(1, 0) : T(31, 11);
3332
- case b:
3333
- return v ? T(1, I) : T(0, I + 1);
3334
- case s:
3335
- var K = this.$locale().weekStart || 0, ne = (A < K ? A + 7 : A) - K;
3336
- return T(v ? V - ne : V + (6 - ne), I);
3337
- case m:
3338
- case U:
3339
- return D(z + "Hours", 0);
3340
- case g:
3341
- return D(z + "Minutes", 1);
3342
- case c:
3343
- return D(z + "Seconds", 2);
3344
- case h:
3345
- return D(z + "Milliseconds", 3);
3346
- default:
3347
- return this.clone();
3348
- }
3349
- }, l.endOf = function(u) {
3350
- return this.startOf(u, !1);
3351
- }, l.$set = function(u, p) {
3352
- var f, v = _.p(u), E = "set" + (this.$u ? "UTC" : ""), T = (f = {}, f[m] = E + "Date", f[U] = E + "Date", f[b] = E + "Month", f[L] = E + "FullYear", f[g] = E + "Hours", f[c] = E + "Minutes", f[h] = E + "Seconds", f[a] = E + "Milliseconds", f)[v], D = v === m ? this.$D + (p - this.$W) : p;
3353
- if (v === b || v === L) {
3354
- var A = this.clone().set(U, 1);
3355
- A.$d[T](D), A.init(), this.$d = A.set(U, Math.min(this.$D, A.daysInMonth())).$d;
3356
- } else T && this.$d[T](D);
3357
- return this.init(), this;
3358
- }, l.set = function(u, p) {
3359
- return this.clone().$set(u, p);
3360
- }, l.get = function(u) {
3361
- return this[_.p(u)]();
3362
- }, l.add = function(u, p) {
3363
- var f, v = this;
3364
- u = Number(u);
3365
- var E = _.p(p), T = function(I) {
3366
- var V = B(v);
3367
- return _.w(V.date(V.date() + Math.round(I * u)), v);
3368
- };
3369
- if (E === b) return this.set(b, this.$M + u);
3370
- if (E === L) return this.set(L, this.$y + u);
3371
- if (E === m) return T(1);
3372
- if (E === s) return T(7);
3373
- var D = (f = {}, f[c] = n, f[g] = i, f[h] = r, f)[E] || 1, A = this.$d.getTime() + u * D;
3374
- return _.w(A, this);
3375
- }, l.subtract = function(u, p) {
3376
- return this.add(-1 * u, p);
3377
- }, l.format = function(u) {
3378
- var p = this, f = this.$locale();
3379
- if (!this.isValid()) return f.invalidDate || k;
3380
- var v = u || "YYYY-MM-DDTHH:mm:ssZ", E = _.z(this), T = this.$H, D = this.$m, A = this.$M, I = f.weekdays, V = f.months, z = f.meridiem, K = function(X, J, ee, te) {
3381
- return X && (X[J] || X(p, v)) || ee[J].slice(0, te);
3382
- }, ne = function(X) {
3383
- return _.s(T % 12 || 12, X, "0");
3384
- }, q = z || function(X, J, ee) {
3385
- var te = X < 12 ? "AM" : "PM";
3386
- return ee ? te.toLowerCase() : te;
3387
- };
3388
- return v.replace(M, function(X, J) {
3389
- return J || function(ee) {
3390
- switch (ee) {
3391
- case "YY":
3392
- return String(p.$y).slice(-2);
3393
- case "YYYY":
3394
- return _.s(p.$y, 4, "0");
3395
- case "M":
3396
- return A + 1;
3397
- case "MM":
3398
- return _.s(A + 1, 2, "0");
3399
- case "MMM":
3400
- return K(f.monthsShort, A, V, 3);
3401
- case "MMMM":
3402
- return K(V, A);
3403
- case "D":
3404
- return p.$D;
3405
- case "DD":
3406
- return _.s(p.$D, 2, "0");
3407
- case "d":
3408
- return String(p.$W);
3409
- case "dd":
3410
- return K(f.weekdaysMin, p.$W, I, 2);
3411
- case "ddd":
3412
- return K(f.weekdaysShort, p.$W, I, 3);
3413
- case "dddd":
3414
- return I[p.$W];
3415
- case "H":
3416
- return String(T);
3417
- case "HH":
3418
- return _.s(T, 2, "0");
3419
- case "h":
3420
- return ne(1);
3421
- case "hh":
3422
- return ne(2);
3423
- case "a":
3424
- return q(T, D, !0);
3425
- case "A":
3426
- return q(T, D, !1);
3427
- case "m":
3428
- return String(D);
3429
- case "mm":
3430
- return _.s(D, 2, "0");
3431
- case "s":
3432
- return String(p.$s);
3433
- case "ss":
3434
- return _.s(p.$s, 2, "0");
3435
- case "SSS":
3436
- return _.s(p.$ms, 3, "0");
3437
- case "Z":
3438
- return E;
3439
- }
3440
- return null;
3441
- }(X) || E.replace(":", "");
3442
- });
3443
- }, l.utcOffset = function() {
3444
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
3445
- }, l.diff = function(u, p, f) {
3446
- var v, E = this, T = _.p(p), D = B(u), A = (D.utcOffset() - this.utcOffset()) * n, I = this - D, V = function() {
3447
- return _.m(E, D);
3448
- };
3449
- switch (T) {
3450
- case L:
3451
- v = V() / 12;
3452
- break;
3453
- case b:
3454
- v = V();
3455
- break;
3456
- case x:
3457
- v = V() / 3;
3458
- break;
3459
- case s:
3460
- v = (I - A) / 6048e5;
3461
- break;
3462
- case m:
3463
- v = (I - A) / 864e5;
3464
- break;
3465
- case g:
3466
- v = I / i;
3467
- break;
3468
- case c:
3469
- v = I / n;
3470
- break;
3471
- case h:
3472
- v = I / r;
3473
- break;
3474
- default:
3475
- v = I;
3476
- }
3477
- return f ? v : _.a(v);
3478
- }, l.daysInMonth = function() {
3479
- return this.endOf(b).$D;
3480
- }, l.$locale = function() {
3481
- return $[this.$L];
3482
- }, l.locale = function(u, p) {
3483
- if (!u) return this.$L;
3484
- var f = this.clone(), v = H(u, p, !0);
3485
- return v && (f.$L = v), f;
3486
- }, l.clone = function() {
3487
- return _.w(this.$d, this);
3488
- }, l.toDate = function() {
3489
- return new Date(this.valueOf());
3490
- }, l.toJSON = function() {
3491
- return this.isValid() ? this.toISOString() : null;
3492
- }, l.toISOString = function() {
3493
- return this.$d.toISOString();
3494
- }, l.toString = function() {
3495
- return this.$d.toUTCString();
3496
- }, d;
3497
- }(), N = F.prototype;
3498
- return B.prototype = N, [["$ms", a], ["$s", h], ["$m", c], ["$H", g], ["$W", m], ["$M", b], ["$y", L], ["$D", U]].forEach(function(d) {
3499
- N[d[1]] = function(l) {
3500
- return this.$g(l, d[0], d[1]);
3501
- };
3502
- }), B.extend = function(d, l) {
3503
- return d.$i || (d(l, F, B), d.$i = !0), B;
3504
- }, B.locale = H, B.isDayjs = W, B.unix = function(d) {
3505
- return B(1e3 * d);
3506
- }, B.en = $[C], B.Ls = $, B.p = {}, B;
3507
- });
3508
- })(Rt);
3509
- var An = Rt.exports;
3510
- const wn = /* @__PURE__ */ Ze(An);
3511
- var Ut = { exports: {} };
3512
- (function(e, t) {
3513
- (function(r, n) {
3514
- e.exports = n();
3515
- })(ct, function() {
3516
- var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, n = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, i = /\d/, a = /\d\d/, h = /\d\d?/, c = /\d*[^-_:/,()\s\d]+/, g = {}, m = function(y) {
3517
- return (y = +y) + (y > 68 ? 1900 : 2e3);
3518
- }, s = function(y) {
3519
- return function(M) {
3520
- this[y] = +M;
3521
- };
3522
- }, b = [/[+-]\d\d:?(\d\d)?|Z/, function(y) {
3523
- (this.zone || (this.zone = {})).offset = function(M) {
3524
- if (!M || M === "Z") return 0;
3525
- var w = M.match(/([+-]|\d\d)/g), S = 60 * w[1] + (+w[2] || 0);
3526
- return S === 0 ? 0 : w[0] === "+" ? -S : S;
3527
- }(y);
3528
- }], x = function(y) {
3529
- var M = g[y];
3530
- return M && (M.indexOf ? M : M.s.concat(M.f));
3531
- }, L = function(y, M) {
3532
- var w, S = g.meridiem;
3533
- if (S) {
3534
- for (var j = 1; j <= 24; j += 1) if (y.indexOf(S(j, 0, M)) > -1) {
3535
- w = j > 12;
3536
- break;
3537
- }
3538
- } else w = y === (M ? "pm" : "PM");
3539
- return w;
3540
- }, U = { A: [c, function(y) {
3541
- this.afternoon = L(y, !1);
3542
- }], a: [c, function(y) {
3543
- this.afternoon = L(y, !0);
3544
- }], Q: [i, function(y) {
3545
- this.month = 3 * (y - 1) + 1;
3546
- }], S: [i, function(y) {
3547
- this.milliseconds = 100 * +y;
3548
- }], SS: [a, function(y) {
3549
- this.milliseconds = 10 * +y;
3550
- }], SSS: [/\d{3}/, function(y) {
3551
- this.milliseconds = +y;
3552
- }], s: [h, s("seconds")], ss: [h, s("seconds")], m: [h, s("minutes")], mm: [h, s("minutes")], H: [h, s("hours")], h: [h, s("hours")], HH: [h, s("hours")], hh: [h, s("hours")], D: [h, s("day")], DD: [a, s("day")], Do: [c, function(y) {
3553
- var M = g.ordinal, w = y.match(/\d+/);
3554
- if (this.day = w[0], M) for (var S = 1; S <= 31; S += 1) M(S).replace(/\[|\]/g, "") === y && (this.day = S);
3555
- }], w: [h, s("week")], ww: [a, s("week")], M: [h, s("month")], MM: [a, s("month")], MMM: [c, function(y) {
3556
- var M = x("months"), w = (x("monthsShort") || M.map(function(S) {
3557
- return S.slice(0, 3);
3558
- })).indexOf(y) + 1;
3559
- if (w < 1) throw new Error();
3560
- this.month = w % 12 || w;
3561
- }], MMMM: [c, function(y) {
3562
- var M = x("months").indexOf(y) + 1;
3563
- if (M < 1) throw new Error();
3564
- this.month = M % 12 || M;
3565
- }], Y: [/[+-]?\d+/, s("year")], YY: [a, function(y) {
3566
- this.year = m(y);
3567
- }], YYYY: [/\d{4}/, s("year")], Z: b, ZZ: b };
3568
- function k(y) {
3569
- var M, w;
3570
- M = y, w = g && g.formats;
3571
- for (var S = (y = M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(B, _, F) {
3572
- var N = F && F.toUpperCase();
3573
- return _ || w[F] || r[F] || w[N].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(d, l, u) {
3574
- return l || u.slice(1);
3575
- });
3576
- })).match(n), j = S.length, C = 0; C < j; C += 1) {
3577
- var $ = S[C], Y = U[$], W = Y && Y[0], H = Y && Y[1];
3578
- S[C] = H ? { regex: W, parser: H } : $.replace(/^\[|\]$/g, "");
3579
- }
3580
- return function(B) {
3581
- for (var _ = {}, F = 0, N = 0; F < j; F += 1) {
3582
- var d = S[F];
3583
- if (typeof d == "string") N += d.length;
3584
- else {
3585
- var l = d.regex, u = d.parser, p = B.slice(N), f = l.exec(p)[0];
3586
- u.call(_, f), B = B.replace(f, "");
3587
- }
3588
- }
3589
- return function(v) {
3590
- var E = v.afternoon;
3591
- if (E !== void 0) {
3592
- var T = v.hours;
3593
- E ? T < 12 && (v.hours += 12) : T === 12 && (v.hours = 0), delete v.afternoon;
3594
- }
3595
- }(_), _;
3596
- };
3597
- }
3598
- return function(y, M, w) {
3599
- w.p.customParseFormat = !0, y && y.parseTwoDigitYear && (m = y.parseTwoDigitYear);
3600
- var S = M.prototype, j = S.parse;
3601
- S.parse = function(C) {
3602
- var $ = C.date, Y = C.utc, W = C.args;
3603
- this.$u = Y;
3604
- var H = W[1];
3605
- if (typeof H == "string") {
3606
- var B = W[2] === !0, _ = W[3] === !0, F = B || _, N = W[2];
3607
- _ && (N = W[2]), g = this.$locale(), !B && N && (g = w.Ls[N]), this.$d = function(p, f, v, E) {
3608
- try {
3609
- if (["x", "X"].indexOf(f) > -1) return new Date((f === "X" ? 1e3 : 1) * p);
3610
- var T = k(f)(p), D = T.year, A = T.month, I = T.day, V = T.hours, z = T.minutes, K = T.seconds, ne = T.milliseconds, q = T.zone, X = T.week, J = /* @__PURE__ */ new Date(), ee = I || (D || A ? 1 : J.getDate()), te = D || J.getFullYear(), ge = 0;
3611
- D && !A || (ge = A > 0 ? A - 1 : J.getMonth());
3612
- var ve, Ae = V || 0, we = z || 0, Oe = K || 0, Pe = ne || 0;
3613
- return q ? new Date(Date.UTC(te, ge, ee, Ae, we, Oe, Pe + 60 * q.offset * 1e3)) : v ? new Date(Date.UTC(te, ge, ee, Ae, we, Oe, Pe)) : (ve = new Date(te, ge, ee, Ae, we, Oe, Pe), X && (ve = E(ve).week(X).toDate()), ve);
3614
- } catch {
3615
- return /* @__PURE__ */ new Date("");
3616
- }
3617
- }($, H, Y, w), this.init(), N && N !== !0 && (this.$L = this.locale(N).$L), F && $ != this.format(H) && (this.$d = /* @__PURE__ */ new Date("")), g = {};
3618
- } else if (H instanceof Array) for (var d = H.length, l = 1; l <= d; l += 1) {
3619
- W[1] = H[l - 1];
3620
- var u = w.apply(this, W);
3621
- if (u.isValid()) {
3622
- this.$d = u.$d, this.$L = u.$L, this.init();
3623
- break;
3624
- }
3625
- l === d && (this.$d = /* @__PURE__ */ new Date(""));
3626
- }
3627
- else j.call(this, C);
3628
- };
3629
- };
3630
- });
3631
- })(Ut);
3632
- var On = Ut.exports;
3633
- const Pn = /* @__PURE__ */ Ze(On);
3634
- wn.extend(Pn);
3635
- const Ln = () => typeof window > "u";
3636
- var In = o.from_html('<button class="ButtonSecondary svelte-1q5hm0x"> </button> <button class="ButtonPrimary svelte-1q5hm0x"> </button>', 1), Nn = o.from_html('<button class="ViewDetailsButton svelte-1q5hm0x"> </button>'), Dn = o.from_html('<a class="ButtonSecondary svelte-1q5hm0x"> </a>'), Cn = o.from_html('<button class="ButtonSecondary svelte-1q5hm0x"> </button>'), Rn = o.from_html('<span class="Spinner svelte-1q5hm0x"></span>'), Un = o.from_html("<!> <button><!></button>", 1), Gn = o.from_html('<div class="CardContainer svelte-1q5hm0x"><!> <div class="TournamentButtonsWrapper svelte-1q5hm0x"><!></div></div>');
3637
- function kn(e, t) {
3638
- o.push(t, !0);
3639
- const r = () => o.store_get(Bn, "$_", n), [n, i] = o.setup_stores(), a = o.prop(t, "navigationHref", 3, null), h = o.prop(t, "hidden", 3, !1);
3640
- let c = o.state(!1), g = o.state(!1), m = o.state(""), s = o.state(!1);
3641
- o.user_effect(() => {
3642
- lt(t.language);
3643
- }), Object.keys(ft).forEach((H) => {
3644
- Mn(H, ft[H]);
3645
- });
3646
- const b = () => {
3647
- window.postMessage({ type: "Tournaments:goToLogin" }, window.location.href);
3648
- }, x = () => {
3649
- window.postMessage({ type: "Tournaments:goToRegister" }, window.location.href);
3650
- }, L = (H) => {
3651
- window.postMessage({ type: "Tournaments:viewTournamentDetails", tournamentId: H }, window.location.href);
3652
- }, U = () => {
3653
- fetch(`${t.endpoint}/tournaments/${t.tournament.is}`, { headers: { "X-SessionID": t.session } }).then((H) => H.json()).then((H) => {
3654
- var B;
3655
- (B = H == null ? void 0 : H.item) != null && B.playerEnrolled ? o.set(s, !0) : (o.set(g, !0), o.set(m, H.errorMessage, !0));
3656
- }).catch((H) => console.log(H));
3657
- }, k = () => {
3658
- o.set(c, !0);
3659
- const H = new URL(`${t.endpoint}/v1/bonus/claim`);
3660
- H.searchParams.append("language", t.language), H.searchParams.append("platform", t.platform);
3661
- const B = new Headers();
3662
- B.append("Content-Type", "application/json"), B.append("X-SessionID", t.session);
3663
- let _ = {};
3664
- t.tournament.wallets && t.tournament.wallets.length > 0 && (_ = {
3665
- language: t.language,
3666
- bonusCode: t.tournament.wallets[0].code,
3667
- currency: t.tournament.baseCurrency,
3668
- type: "tournament"
3669
- });
3670
- const F = {
3671
- method: "PUT",
3672
- headers: B,
3673
- body: JSON.stringify(_)
3674
- };
3675
- fetch(H, F).then((N) => N.json()).then((N) => {
3676
- N && (N.success == !0 ? o.set(s, !0) : N.errorMessage.match("VersionMismatchException") && U());
3677
- }).catch((N) => {
3678
- console.log(N), o.set(g, !0), o.set(m, N.errorMessage, !0);
3679
- }).finally(() => o.set(c, !1));
3680
- }, y = () => {
3681
- lt(t.language);
3682
- }, M = () => new Date(t.tournament.endTime) < /* @__PURE__ */ new Date();
3683
- o.user_effect(() => {
3684
- y();
3685
- });
3686
- var w = Gn();
3687
- let S;
3688
- var j = o.child(w);
3689
- {
3690
- let H = o.derived(() => t.tournament.playerEnrolled || o.get(s));
3691
- Gt(j, {
3692
- get tournament() {
3693
- return t.tournament;
3694
- },
3695
- get language() {
3696
- return t.language;
3697
- },
3698
- get enrolled() {
3699
- return o.get(H);
3700
- }
3701
- });
3702
- }
3703
- var C = o.sibling(j, 2), $ = o.child(C);
3704
- {
3705
- var Y = (H) => {
3706
- var B = In(), _ = o.first_child(B);
3707
- _.__click = x;
3708
- var F = o.child(_, !0);
3709
- o.reset(_);
3710
- var N = o.sibling(_, 2);
3711
- N.__click = b;
3712
- var d = o.child(N, !0);
3713
- o.reset(N), o.template_effect(
3714
- (l, u) => {
3715
- o.set_text(F, l), o.set_text(d, u);
3716
- },
3717
- [() => r()("registerButton"), () => r()("loginButton")]
3718
- ), o.append(H, B);
3719
- }, W = (H) => {
3720
- var B = o.comment(), _ = o.first_child(B);
3721
- {
3722
- var F = (d) => {
3723
- var l = Nn();
3724
- l.__click = () => L(t.tournament.id);
3725
- var u = o.child(l, !0);
3726
- o.reset(l), o.template_effect((p) => o.set_text(u, p), [() => r()("viewDetailsButton")]), o.append(d, l);
3727
- }, N = (d) => {
3728
- var l = Un(), u = o.first_child(l);
3729
- {
3730
- var p = (A) => {
3731
- var I = Dn(), V = o.child(I, !0);
3732
- o.reset(I), o.template_effect(
3733
- (z) => {
3734
- o.set_attribute(I, "href", `${a()}/${t.tournament.id}`), o.set_text(V, z);
3735
- },
3736
- [() => r()("detailsButton")]
3737
- ), o.append(A, I);
3738
- }, f = (A) => {
3739
- var I = Cn();
3740
- I.__click = () => L(t.tournament.id);
3741
- var V = o.child(I, !0);
3742
- o.reset(I), o.template_effect((z) => o.set_text(V, z), [() => r()("detailsButton")]), o.append(A, I);
3743
- };
3744
- o.if(u, (A) => {
3745
- Ln() ? A(p) : A(f, !1);
3746
- });
3747
- }
3748
- var v = o.sibling(u, 2);
3749
- v.__click = k;
3750
- var E = o.child(v);
3751
- {
3752
- var T = (A) => {
3753
- var I = Rn();
3754
- o.append(A, I);
3755
- }, D = (A) => {
3756
- var I = o.text();
3757
- o.template_effect((V) => o.set_text(I, V), [() => r()("joinButton")]), o.append(A, I);
3758
- };
3759
- o.if(E, (A) => {
3760
- o.get(c) ? A(T) : A(D, !1);
3761
- });
3762
- }
3763
- o.reset(v), o.template_effect(() => {
3764
- o.set_class(v, 1, `ButtonPrimary ${t.tournament.playerEnrolled || o.get(s) ? "Enrolled" : ""}`, "svelte-1q5hm0x"), v.disabled = t.tournament.playerEnrolled || o.get(s);
3765
- }), o.append(d, l);
3766
- };
3767
- o.if(_, (d) => {
3768
- M() ? d(F) : d(N, !1);
3769
- });
3770
- }
3771
- o.append(H, B);
3772
- };
3773
- o.if($, (H) => {
3774
- t.isLoggedIn ? H(W, !1) : H(Y);
3775
- });
3776
- }
3777
- o.reset(C), o.reset(w), o.template_effect(() => S = o.set_style(w, "", S, { display: h() ? "none" : "flex" })), o.append(e, w), o.pop(), i();
3778
- }
3779
- o.delegate(["click"]);
3780
- export {
3781
- kn as default
3782
- };