@kong-ui-public/i18n 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3339 @@
1
+ import { defineComponent as ke, h as Xe } from "vue";
2
+ var z = function(e, t) {
3
+ return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
4
+ n.__proto__ = r;
5
+ } || function(n, r) {
6
+ for (var i in r)
7
+ Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
8
+ }, z(e, t);
9
+ };
10
+ function N(e, t) {
11
+ if (typeof t != "function" && t !== null)
12
+ throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
13
+ z(e, t);
14
+ function n() {
15
+ this.constructor = e;
16
+ }
17
+ e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
18
+ }
19
+ var m = function() {
20
+ return m = Object.assign || function(t) {
21
+ for (var n, r = 1, i = arguments.length; r < i; r++) {
22
+ n = arguments[r];
23
+ for (var a in n)
24
+ Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
25
+ }
26
+ return t;
27
+ }, m.apply(this, arguments);
28
+ };
29
+ function O(e, t, n) {
30
+ if (n || arguments.length === 2)
31
+ for (var r = 0, i = t.length, a; r < i; r++)
32
+ (a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
33
+ return e.concat(a || Array.prototype.slice.call(t));
34
+ }
35
+ var g;
36
+ (function(e) {
37
+ 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";
38
+ })(g || (g = {}));
39
+ var d;
40
+ (function(e) {
41
+ 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";
42
+ })(d || (d = {}));
43
+ var D;
44
+ (function(e) {
45
+ e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
46
+ })(D || (D = {}));
47
+ function ae(e) {
48
+ return e.type === d.literal;
49
+ }
50
+ function Ze(e) {
51
+ return e.type === d.argument;
52
+ }
53
+ function be(e) {
54
+ return e.type === d.number;
55
+ }
56
+ function de(e) {
57
+ return e.type === d.date;
58
+ }
59
+ function xe(e) {
60
+ return e.type === d.time;
61
+ }
62
+ function ye(e) {
63
+ return e.type === d.select;
64
+ }
65
+ function Te(e) {
66
+ return e.type === d.plural;
67
+ }
68
+ function We(e) {
69
+ return e.type === d.pound;
70
+ }
71
+ function Se(e) {
72
+ return e.type === d.tag;
73
+ }
74
+ function Ie(e) {
75
+ return !!(e && typeof e == "object" && e.type === D.number);
76
+ }
77
+ function q(e) {
78
+ return !!(e && typeof e == "object" && e.type === D.dateTime);
79
+ }
80
+ var Ae = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, ze = /(?:[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;
81
+ function qe(e) {
82
+ var t = {};
83
+ return e.replace(ze, function(n) {
84
+ var r = n.length;
85
+ switch (n[0]) {
86
+ case "G":
87
+ t.era = r === 4 ? "long" : r === 5 ? "narrow" : "short";
88
+ break;
89
+ case "y":
90
+ t.year = r === 2 ? "2-digit" : "numeric";
91
+ break;
92
+ case "Y":
93
+ case "u":
94
+ case "U":
95
+ case "r":
96
+ throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
97
+ case "q":
98
+ case "Q":
99
+ throw new RangeError("`q/Q` (quarter) patterns are not supported");
100
+ case "M":
101
+ case "L":
102
+ t.month = ["numeric", "2-digit", "short", "long", "narrow"][r - 1];
103
+ break;
104
+ case "w":
105
+ case "W":
106
+ throw new RangeError("`w/W` (week) patterns are not supported");
107
+ case "d":
108
+ t.day = ["numeric", "2-digit"][r - 1];
109
+ break;
110
+ case "D":
111
+ case "F":
112
+ case "g":
113
+ throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
114
+ case "E":
115
+ t.weekday = r === 4 ? "short" : r === 5 ? "narrow" : "short";
116
+ break;
117
+ case "e":
118
+ if (r < 4)
119
+ throw new RangeError("`e..eee` (weekday) patterns are not supported");
120
+ t.weekday = ["short", "long", "narrow", "short"][r - 4];
121
+ break;
122
+ case "c":
123
+ if (r < 4)
124
+ throw new RangeError("`c..ccc` (weekday) patterns are not supported");
125
+ t.weekday = ["short", "long", "narrow", "short"][r - 4];
126
+ break;
127
+ case "a":
128
+ t.hour12 = !0;
129
+ break;
130
+ case "b":
131
+ case "B":
132
+ throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
133
+ case "h":
134
+ t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][r - 1];
135
+ break;
136
+ case "H":
137
+ t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][r - 1];
138
+ break;
139
+ case "K":
140
+ t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][r - 1];
141
+ break;
142
+ case "k":
143
+ t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][r - 1];
144
+ break;
145
+ case "j":
146
+ case "J":
147
+ case "C":
148
+ throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
149
+ case "m":
150
+ t.minute = ["numeric", "2-digit"][r - 1];
151
+ break;
152
+ case "s":
153
+ t.second = ["numeric", "2-digit"][r - 1];
154
+ break;
155
+ case "S":
156
+ case "A":
157
+ throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
158
+ case "z":
159
+ t.timeZoneName = r < 4 ? "short" : "long";
160
+ break;
161
+ case "Z":
162
+ case "O":
163
+ case "v":
164
+ case "V":
165
+ case "X":
166
+ case "x":
167
+ throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
168
+ }
169
+ return "";
170
+ }), t;
171
+ }
172
+ var Je = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
173
+ function Qe(e) {
174
+ if (e.length === 0)
175
+ throw new Error("Number skeleton cannot be empty");
176
+ for (var t = e.split(Je).filter(function(c) {
177
+ return c.length > 0;
178
+ }), n = [], r = 0, i = t; r < i.length; r++) {
179
+ var a = i[r], o = a.split("/");
180
+ if (o.length === 0)
181
+ throw new Error("Invalid number skeleton");
182
+ for (var s = o[0], h = o.slice(1), l = 0, u = h; l < u.length; l++) {
183
+ var f = u[l];
184
+ if (f.length === 0)
185
+ throw new Error("Invalid number skeleton");
186
+ }
187
+ n.push({ stem: s, options: h });
188
+ }
189
+ return n;
190
+ }
191
+ function Ye(e) {
192
+ return e.replace(/^(.*?)-/, "");
193
+ }
194
+ var oe = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, He = /^(@+)?(\+|#+)?[rs]?$/g, $e = /(\*)(0+)|(#+)(0+)|(0+)/g, Ne = /^(0+)$/;
195
+ function se(e) {
196
+ var t = {};
197
+ return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(He, function(n, r, i) {
198
+ return typeof i != "string" ? (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length) : i === "+" ? t.minimumSignificantDigits = r.length : r[0] === "#" ? t.maximumSignificantDigits = r.length : (t.minimumSignificantDigits = r.length, t.maximumSignificantDigits = r.length + (typeof i == "string" ? i.length : 0)), "";
199
+ }), t;
200
+ }
201
+ function _e(e) {
202
+ switch (e) {
203
+ case "sign-auto":
204
+ return {
205
+ signDisplay: "auto"
206
+ };
207
+ case "sign-accounting":
208
+ case "()":
209
+ return {
210
+ currencySign: "accounting"
211
+ };
212
+ case "sign-always":
213
+ case "+!":
214
+ return {
215
+ signDisplay: "always"
216
+ };
217
+ case "sign-accounting-always":
218
+ case "()!":
219
+ return {
220
+ signDisplay: "always",
221
+ currencySign: "accounting"
222
+ };
223
+ case "sign-except-zero":
224
+ case "+?":
225
+ return {
226
+ signDisplay: "exceptZero"
227
+ };
228
+ case "sign-accounting-except-zero":
229
+ case "()?":
230
+ return {
231
+ signDisplay: "exceptZero",
232
+ currencySign: "accounting"
233
+ };
234
+ case "sign-never":
235
+ case "+_":
236
+ return {
237
+ signDisplay: "never"
238
+ };
239
+ }
240
+ }
241
+ function Ke(e) {
242
+ var t;
243
+ if (e[0] === "E" && e[1] === "E" ? (t = {
244
+ notation: "engineering"
245
+ }, e = e.slice(2)) : e[0] === "E" && (t = {
246
+ notation: "scientific"
247
+ }, e = e.slice(1)), t) {
248
+ var n = e.slice(0, 2);
249
+ if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !Ne.test(e))
250
+ throw new Error("Malformed concise eng/scientific notation");
251
+ t.minimumIntegerDigits = e.length;
252
+ }
253
+ return t;
254
+ }
255
+ function ue(e) {
256
+ var t = {}, n = _e(e);
257
+ return n || t;
258
+ }
259
+ function et(e) {
260
+ for (var t = {}, n = 0, r = e; n < r.length; n++) {
261
+ var i = r[n];
262
+ switch (i.stem) {
263
+ case "percent":
264
+ case "%":
265
+ t.style = "percent";
266
+ continue;
267
+ case "%x100":
268
+ t.style = "percent", t.scale = 100;
269
+ continue;
270
+ case "currency":
271
+ t.style = "currency", t.currency = i.options[0];
272
+ continue;
273
+ case "group-off":
274
+ case ",_":
275
+ t.useGrouping = !1;
276
+ continue;
277
+ case "precision-integer":
278
+ case ".":
279
+ t.maximumFractionDigits = 0;
280
+ continue;
281
+ case "measure-unit":
282
+ case "unit":
283
+ t.style = "unit", t.unit = Ye(i.options[0]);
284
+ continue;
285
+ case "compact-short":
286
+ case "K":
287
+ t.notation = "compact", t.compactDisplay = "short";
288
+ continue;
289
+ case "compact-long":
290
+ case "KK":
291
+ t.notation = "compact", t.compactDisplay = "long";
292
+ continue;
293
+ case "scientific":
294
+ t = m(m(m({}, t), { notation: "scientific" }), i.options.reduce(function(h, l) {
295
+ return m(m({}, h), ue(l));
296
+ }, {}));
297
+ continue;
298
+ case "engineering":
299
+ t = m(m(m({}, t), { notation: "engineering" }), i.options.reduce(function(h, l) {
300
+ return m(m({}, h), ue(l));
301
+ }, {}));
302
+ continue;
303
+ case "notation-simple":
304
+ t.notation = "standard";
305
+ continue;
306
+ case "unit-width-narrow":
307
+ t.currencyDisplay = "narrowSymbol", t.unitDisplay = "narrow";
308
+ continue;
309
+ case "unit-width-short":
310
+ t.currencyDisplay = "code", t.unitDisplay = "short";
311
+ continue;
312
+ case "unit-width-full-name":
313
+ t.currencyDisplay = "name", t.unitDisplay = "long";
314
+ continue;
315
+ case "unit-width-iso-code":
316
+ t.currencyDisplay = "symbol";
317
+ continue;
318
+ case "scale":
319
+ t.scale = parseFloat(i.options[0]);
320
+ continue;
321
+ case "integer-width":
322
+ if (i.options.length > 1)
323
+ throw new RangeError("integer-width stems only accept a single optional option");
324
+ i.options[0].replace($e, function(h, l, u, f, c, p) {
325
+ if (l)
326
+ t.minimumIntegerDigits = u.length;
327
+ else {
328
+ if (f && c)
329
+ throw new Error("We currently do not support maximum integer digits");
330
+ if (p)
331
+ throw new Error("We currently do not support exact integer digits");
332
+ }
333
+ return "";
334
+ });
335
+ continue;
336
+ }
337
+ if (Ne.test(i.stem)) {
338
+ t.minimumIntegerDigits = i.stem.length;
339
+ continue;
340
+ }
341
+ if (oe.test(i.stem)) {
342
+ if (i.options.length > 1)
343
+ throw new RangeError("Fraction-precision stems only accept a single optional option");
344
+ i.stem.replace(oe, function(h, l, u, f, c, p) {
345
+ return u === "*" ? t.minimumFractionDigits = l.length : f && f[0] === "#" ? t.maximumFractionDigits = f.length : c && p ? (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length + p.length) : (t.minimumFractionDigits = l.length, t.maximumFractionDigits = l.length), "";
346
+ });
347
+ var a = i.options[0];
348
+ a === "w" ? t = m(m({}, t), { trailingZeroDisplay: "stripIfInteger" }) : a && (t = m(m({}, t), se(a)));
349
+ continue;
350
+ }
351
+ if (He.test(i.stem)) {
352
+ t = m(m({}, t), se(i.stem));
353
+ continue;
354
+ }
355
+ var o = _e(i.stem);
356
+ o && (t = m(m({}, t), o));
357
+ var s = Ke(i.stem);
358
+ s && (t = m(m({}, t), s));
359
+ }
360
+ return t;
361
+ }
362
+ var U = {
363
+ AX: [
364
+ "H"
365
+ ],
366
+ BQ: [
367
+ "H"
368
+ ],
369
+ CP: [
370
+ "H"
371
+ ],
372
+ CZ: [
373
+ "H"
374
+ ],
375
+ DK: [
376
+ "H"
377
+ ],
378
+ FI: [
379
+ "H"
380
+ ],
381
+ ID: [
382
+ "H"
383
+ ],
384
+ IS: [
385
+ "H"
386
+ ],
387
+ ML: [
388
+ "H"
389
+ ],
390
+ NE: [
391
+ "H"
392
+ ],
393
+ RU: [
394
+ "H"
395
+ ],
396
+ SE: [
397
+ "H"
398
+ ],
399
+ SJ: [
400
+ "H"
401
+ ],
402
+ SK: [
403
+ "H"
404
+ ],
405
+ AS: [
406
+ "h",
407
+ "H"
408
+ ],
409
+ BT: [
410
+ "h",
411
+ "H"
412
+ ],
413
+ DJ: [
414
+ "h",
415
+ "H"
416
+ ],
417
+ ER: [
418
+ "h",
419
+ "H"
420
+ ],
421
+ GH: [
422
+ "h",
423
+ "H"
424
+ ],
425
+ IN: [
426
+ "h",
427
+ "H"
428
+ ],
429
+ LS: [
430
+ "h",
431
+ "H"
432
+ ],
433
+ PG: [
434
+ "h",
435
+ "H"
436
+ ],
437
+ PW: [
438
+ "h",
439
+ "H"
440
+ ],
441
+ SO: [
442
+ "h",
443
+ "H"
444
+ ],
445
+ TO: [
446
+ "h",
447
+ "H"
448
+ ],
449
+ VU: [
450
+ "h",
451
+ "H"
452
+ ],
453
+ WS: [
454
+ "h",
455
+ "H"
456
+ ],
457
+ "001": [
458
+ "H",
459
+ "h"
460
+ ],
461
+ AL: [
462
+ "h",
463
+ "H",
464
+ "hB"
465
+ ],
466
+ TD: [
467
+ "h",
468
+ "H",
469
+ "hB"
470
+ ],
471
+ "ca-ES": [
472
+ "H",
473
+ "h",
474
+ "hB"
475
+ ],
476
+ CF: [
477
+ "H",
478
+ "h",
479
+ "hB"
480
+ ],
481
+ CM: [
482
+ "H",
483
+ "h",
484
+ "hB"
485
+ ],
486
+ "fr-CA": [
487
+ "H",
488
+ "h",
489
+ "hB"
490
+ ],
491
+ "gl-ES": [
492
+ "H",
493
+ "h",
494
+ "hB"
495
+ ],
496
+ "it-CH": [
497
+ "H",
498
+ "h",
499
+ "hB"
500
+ ],
501
+ "it-IT": [
502
+ "H",
503
+ "h",
504
+ "hB"
505
+ ],
506
+ LU: [
507
+ "H",
508
+ "h",
509
+ "hB"
510
+ ],
511
+ NP: [
512
+ "H",
513
+ "h",
514
+ "hB"
515
+ ],
516
+ PF: [
517
+ "H",
518
+ "h",
519
+ "hB"
520
+ ],
521
+ SC: [
522
+ "H",
523
+ "h",
524
+ "hB"
525
+ ],
526
+ SM: [
527
+ "H",
528
+ "h",
529
+ "hB"
530
+ ],
531
+ SN: [
532
+ "H",
533
+ "h",
534
+ "hB"
535
+ ],
536
+ TF: [
537
+ "H",
538
+ "h",
539
+ "hB"
540
+ ],
541
+ VA: [
542
+ "H",
543
+ "h",
544
+ "hB"
545
+ ],
546
+ CY: [
547
+ "h",
548
+ "H",
549
+ "hb",
550
+ "hB"
551
+ ],
552
+ GR: [
553
+ "h",
554
+ "H",
555
+ "hb",
556
+ "hB"
557
+ ],
558
+ CO: [
559
+ "h",
560
+ "H",
561
+ "hB",
562
+ "hb"
563
+ ],
564
+ DO: [
565
+ "h",
566
+ "H",
567
+ "hB",
568
+ "hb"
569
+ ],
570
+ KP: [
571
+ "h",
572
+ "H",
573
+ "hB",
574
+ "hb"
575
+ ],
576
+ KR: [
577
+ "h",
578
+ "H",
579
+ "hB",
580
+ "hb"
581
+ ],
582
+ NA: [
583
+ "h",
584
+ "H",
585
+ "hB",
586
+ "hb"
587
+ ],
588
+ PA: [
589
+ "h",
590
+ "H",
591
+ "hB",
592
+ "hb"
593
+ ],
594
+ PR: [
595
+ "h",
596
+ "H",
597
+ "hB",
598
+ "hb"
599
+ ],
600
+ VE: [
601
+ "h",
602
+ "H",
603
+ "hB",
604
+ "hb"
605
+ ],
606
+ AC: [
607
+ "H",
608
+ "h",
609
+ "hb",
610
+ "hB"
611
+ ],
612
+ AI: [
613
+ "H",
614
+ "h",
615
+ "hb",
616
+ "hB"
617
+ ],
618
+ BW: [
619
+ "H",
620
+ "h",
621
+ "hb",
622
+ "hB"
623
+ ],
624
+ BZ: [
625
+ "H",
626
+ "h",
627
+ "hb",
628
+ "hB"
629
+ ],
630
+ CC: [
631
+ "H",
632
+ "h",
633
+ "hb",
634
+ "hB"
635
+ ],
636
+ CK: [
637
+ "H",
638
+ "h",
639
+ "hb",
640
+ "hB"
641
+ ],
642
+ CX: [
643
+ "H",
644
+ "h",
645
+ "hb",
646
+ "hB"
647
+ ],
648
+ DG: [
649
+ "H",
650
+ "h",
651
+ "hb",
652
+ "hB"
653
+ ],
654
+ FK: [
655
+ "H",
656
+ "h",
657
+ "hb",
658
+ "hB"
659
+ ],
660
+ GB: [
661
+ "H",
662
+ "h",
663
+ "hb",
664
+ "hB"
665
+ ],
666
+ GG: [
667
+ "H",
668
+ "h",
669
+ "hb",
670
+ "hB"
671
+ ],
672
+ GI: [
673
+ "H",
674
+ "h",
675
+ "hb",
676
+ "hB"
677
+ ],
678
+ IE: [
679
+ "H",
680
+ "h",
681
+ "hb",
682
+ "hB"
683
+ ],
684
+ IM: [
685
+ "H",
686
+ "h",
687
+ "hb",
688
+ "hB"
689
+ ],
690
+ IO: [
691
+ "H",
692
+ "h",
693
+ "hb",
694
+ "hB"
695
+ ],
696
+ JE: [
697
+ "H",
698
+ "h",
699
+ "hb",
700
+ "hB"
701
+ ],
702
+ LT: [
703
+ "H",
704
+ "h",
705
+ "hb",
706
+ "hB"
707
+ ],
708
+ MK: [
709
+ "H",
710
+ "h",
711
+ "hb",
712
+ "hB"
713
+ ],
714
+ MN: [
715
+ "H",
716
+ "h",
717
+ "hb",
718
+ "hB"
719
+ ],
720
+ MS: [
721
+ "H",
722
+ "h",
723
+ "hb",
724
+ "hB"
725
+ ],
726
+ NF: [
727
+ "H",
728
+ "h",
729
+ "hb",
730
+ "hB"
731
+ ],
732
+ NG: [
733
+ "H",
734
+ "h",
735
+ "hb",
736
+ "hB"
737
+ ],
738
+ NR: [
739
+ "H",
740
+ "h",
741
+ "hb",
742
+ "hB"
743
+ ],
744
+ NU: [
745
+ "H",
746
+ "h",
747
+ "hb",
748
+ "hB"
749
+ ],
750
+ PN: [
751
+ "H",
752
+ "h",
753
+ "hb",
754
+ "hB"
755
+ ],
756
+ SH: [
757
+ "H",
758
+ "h",
759
+ "hb",
760
+ "hB"
761
+ ],
762
+ SX: [
763
+ "H",
764
+ "h",
765
+ "hb",
766
+ "hB"
767
+ ],
768
+ TA: [
769
+ "H",
770
+ "h",
771
+ "hb",
772
+ "hB"
773
+ ],
774
+ ZA: [
775
+ "H",
776
+ "h",
777
+ "hb",
778
+ "hB"
779
+ ],
780
+ "af-ZA": [
781
+ "H",
782
+ "h",
783
+ "hB",
784
+ "hb"
785
+ ],
786
+ AR: [
787
+ "H",
788
+ "h",
789
+ "hB",
790
+ "hb"
791
+ ],
792
+ CL: [
793
+ "H",
794
+ "h",
795
+ "hB",
796
+ "hb"
797
+ ],
798
+ CR: [
799
+ "H",
800
+ "h",
801
+ "hB",
802
+ "hb"
803
+ ],
804
+ CU: [
805
+ "H",
806
+ "h",
807
+ "hB",
808
+ "hb"
809
+ ],
810
+ EA: [
811
+ "H",
812
+ "h",
813
+ "hB",
814
+ "hb"
815
+ ],
816
+ "es-BO": [
817
+ "H",
818
+ "h",
819
+ "hB",
820
+ "hb"
821
+ ],
822
+ "es-BR": [
823
+ "H",
824
+ "h",
825
+ "hB",
826
+ "hb"
827
+ ],
828
+ "es-EC": [
829
+ "H",
830
+ "h",
831
+ "hB",
832
+ "hb"
833
+ ],
834
+ "es-ES": [
835
+ "H",
836
+ "h",
837
+ "hB",
838
+ "hb"
839
+ ],
840
+ "es-GQ": [
841
+ "H",
842
+ "h",
843
+ "hB",
844
+ "hb"
845
+ ],
846
+ "es-PE": [
847
+ "H",
848
+ "h",
849
+ "hB",
850
+ "hb"
851
+ ],
852
+ GT: [
853
+ "H",
854
+ "h",
855
+ "hB",
856
+ "hb"
857
+ ],
858
+ HN: [
859
+ "H",
860
+ "h",
861
+ "hB",
862
+ "hb"
863
+ ],
864
+ IC: [
865
+ "H",
866
+ "h",
867
+ "hB",
868
+ "hb"
869
+ ],
870
+ KG: [
871
+ "H",
872
+ "h",
873
+ "hB",
874
+ "hb"
875
+ ],
876
+ KM: [
877
+ "H",
878
+ "h",
879
+ "hB",
880
+ "hb"
881
+ ],
882
+ LK: [
883
+ "H",
884
+ "h",
885
+ "hB",
886
+ "hb"
887
+ ],
888
+ MA: [
889
+ "H",
890
+ "h",
891
+ "hB",
892
+ "hb"
893
+ ],
894
+ MX: [
895
+ "H",
896
+ "h",
897
+ "hB",
898
+ "hb"
899
+ ],
900
+ NI: [
901
+ "H",
902
+ "h",
903
+ "hB",
904
+ "hb"
905
+ ],
906
+ PY: [
907
+ "H",
908
+ "h",
909
+ "hB",
910
+ "hb"
911
+ ],
912
+ SV: [
913
+ "H",
914
+ "h",
915
+ "hB",
916
+ "hb"
917
+ ],
918
+ UY: [
919
+ "H",
920
+ "h",
921
+ "hB",
922
+ "hb"
923
+ ],
924
+ JP: [
925
+ "H",
926
+ "h",
927
+ "K"
928
+ ],
929
+ AD: [
930
+ "H",
931
+ "hB"
932
+ ],
933
+ AM: [
934
+ "H",
935
+ "hB"
936
+ ],
937
+ AO: [
938
+ "H",
939
+ "hB"
940
+ ],
941
+ AT: [
942
+ "H",
943
+ "hB"
944
+ ],
945
+ AW: [
946
+ "H",
947
+ "hB"
948
+ ],
949
+ BE: [
950
+ "H",
951
+ "hB"
952
+ ],
953
+ BF: [
954
+ "H",
955
+ "hB"
956
+ ],
957
+ BJ: [
958
+ "H",
959
+ "hB"
960
+ ],
961
+ BL: [
962
+ "H",
963
+ "hB"
964
+ ],
965
+ BR: [
966
+ "H",
967
+ "hB"
968
+ ],
969
+ CG: [
970
+ "H",
971
+ "hB"
972
+ ],
973
+ CI: [
974
+ "H",
975
+ "hB"
976
+ ],
977
+ CV: [
978
+ "H",
979
+ "hB"
980
+ ],
981
+ DE: [
982
+ "H",
983
+ "hB"
984
+ ],
985
+ EE: [
986
+ "H",
987
+ "hB"
988
+ ],
989
+ FR: [
990
+ "H",
991
+ "hB"
992
+ ],
993
+ GA: [
994
+ "H",
995
+ "hB"
996
+ ],
997
+ GF: [
998
+ "H",
999
+ "hB"
1000
+ ],
1001
+ GN: [
1002
+ "H",
1003
+ "hB"
1004
+ ],
1005
+ GP: [
1006
+ "H",
1007
+ "hB"
1008
+ ],
1009
+ GW: [
1010
+ "H",
1011
+ "hB"
1012
+ ],
1013
+ HR: [
1014
+ "H",
1015
+ "hB"
1016
+ ],
1017
+ IL: [
1018
+ "H",
1019
+ "hB"
1020
+ ],
1021
+ IT: [
1022
+ "H",
1023
+ "hB"
1024
+ ],
1025
+ KZ: [
1026
+ "H",
1027
+ "hB"
1028
+ ],
1029
+ MC: [
1030
+ "H",
1031
+ "hB"
1032
+ ],
1033
+ MD: [
1034
+ "H",
1035
+ "hB"
1036
+ ],
1037
+ MF: [
1038
+ "H",
1039
+ "hB"
1040
+ ],
1041
+ MQ: [
1042
+ "H",
1043
+ "hB"
1044
+ ],
1045
+ MZ: [
1046
+ "H",
1047
+ "hB"
1048
+ ],
1049
+ NC: [
1050
+ "H",
1051
+ "hB"
1052
+ ],
1053
+ NL: [
1054
+ "H",
1055
+ "hB"
1056
+ ],
1057
+ PM: [
1058
+ "H",
1059
+ "hB"
1060
+ ],
1061
+ PT: [
1062
+ "H",
1063
+ "hB"
1064
+ ],
1065
+ RE: [
1066
+ "H",
1067
+ "hB"
1068
+ ],
1069
+ RO: [
1070
+ "H",
1071
+ "hB"
1072
+ ],
1073
+ SI: [
1074
+ "H",
1075
+ "hB"
1076
+ ],
1077
+ SR: [
1078
+ "H",
1079
+ "hB"
1080
+ ],
1081
+ ST: [
1082
+ "H",
1083
+ "hB"
1084
+ ],
1085
+ TG: [
1086
+ "H",
1087
+ "hB"
1088
+ ],
1089
+ TR: [
1090
+ "H",
1091
+ "hB"
1092
+ ],
1093
+ WF: [
1094
+ "H",
1095
+ "hB"
1096
+ ],
1097
+ YT: [
1098
+ "H",
1099
+ "hB"
1100
+ ],
1101
+ BD: [
1102
+ "h",
1103
+ "hB",
1104
+ "H"
1105
+ ],
1106
+ PK: [
1107
+ "h",
1108
+ "hB",
1109
+ "H"
1110
+ ],
1111
+ AZ: [
1112
+ "H",
1113
+ "hB",
1114
+ "h"
1115
+ ],
1116
+ BA: [
1117
+ "H",
1118
+ "hB",
1119
+ "h"
1120
+ ],
1121
+ BG: [
1122
+ "H",
1123
+ "hB",
1124
+ "h"
1125
+ ],
1126
+ CH: [
1127
+ "H",
1128
+ "hB",
1129
+ "h"
1130
+ ],
1131
+ GE: [
1132
+ "H",
1133
+ "hB",
1134
+ "h"
1135
+ ],
1136
+ LI: [
1137
+ "H",
1138
+ "hB",
1139
+ "h"
1140
+ ],
1141
+ ME: [
1142
+ "H",
1143
+ "hB",
1144
+ "h"
1145
+ ],
1146
+ RS: [
1147
+ "H",
1148
+ "hB",
1149
+ "h"
1150
+ ],
1151
+ UA: [
1152
+ "H",
1153
+ "hB",
1154
+ "h"
1155
+ ],
1156
+ UZ: [
1157
+ "H",
1158
+ "hB",
1159
+ "h"
1160
+ ],
1161
+ XK: [
1162
+ "H",
1163
+ "hB",
1164
+ "h"
1165
+ ],
1166
+ AG: [
1167
+ "h",
1168
+ "hb",
1169
+ "H",
1170
+ "hB"
1171
+ ],
1172
+ AU: [
1173
+ "h",
1174
+ "hb",
1175
+ "H",
1176
+ "hB"
1177
+ ],
1178
+ BB: [
1179
+ "h",
1180
+ "hb",
1181
+ "H",
1182
+ "hB"
1183
+ ],
1184
+ BM: [
1185
+ "h",
1186
+ "hb",
1187
+ "H",
1188
+ "hB"
1189
+ ],
1190
+ BS: [
1191
+ "h",
1192
+ "hb",
1193
+ "H",
1194
+ "hB"
1195
+ ],
1196
+ CA: [
1197
+ "h",
1198
+ "hb",
1199
+ "H",
1200
+ "hB"
1201
+ ],
1202
+ DM: [
1203
+ "h",
1204
+ "hb",
1205
+ "H",
1206
+ "hB"
1207
+ ],
1208
+ "en-001": [
1209
+ "h",
1210
+ "hb",
1211
+ "H",
1212
+ "hB"
1213
+ ],
1214
+ FJ: [
1215
+ "h",
1216
+ "hb",
1217
+ "H",
1218
+ "hB"
1219
+ ],
1220
+ FM: [
1221
+ "h",
1222
+ "hb",
1223
+ "H",
1224
+ "hB"
1225
+ ],
1226
+ GD: [
1227
+ "h",
1228
+ "hb",
1229
+ "H",
1230
+ "hB"
1231
+ ],
1232
+ GM: [
1233
+ "h",
1234
+ "hb",
1235
+ "H",
1236
+ "hB"
1237
+ ],
1238
+ GU: [
1239
+ "h",
1240
+ "hb",
1241
+ "H",
1242
+ "hB"
1243
+ ],
1244
+ GY: [
1245
+ "h",
1246
+ "hb",
1247
+ "H",
1248
+ "hB"
1249
+ ],
1250
+ JM: [
1251
+ "h",
1252
+ "hb",
1253
+ "H",
1254
+ "hB"
1255
+ ],
1256
+ KI: [
1257
+ "h",
1258
+ "hb",
1259
+ "H",
1260
+ "hB"
1261
+ ],
1262
+ KN: [
1263
+ "h",
1264
+ "hb",
1265
+ "H",
1266
+ "hB"
1267
+ ],
1268
+ KY: [
1269
+ "h",
1270
+ "hb",
1271
+ "H",
1272
+ "hB"
1273
+ ],
1274
+ LC: [
1275
+ "h",
1276
+ "hb",
1277
+ "H",
1278
+ "hB"
1279
+ ],
1280
+ LR: [
1281
+ "h",
1282
+ "hb",
1283
+ "H",
1284
+ "hB"
1285
+ ],
1286
+ MH: [
1287
+ "h",
1288
+ "hb",
1289
+ "H",
1290
+ "hB"
1291
+ ],
1292
+ MP: [
1293
+ "h",
1294
+ "hb",
1295
+ "H",
1296
+ "hB"
1297
+ ],
1298
+ MW: [
1299
+ "h",
1300
+ "hb",
1301
+ "H",
1302
+ "hB"
1303
+ ],
1304
+ NZ: [
1305
+ "h",
1306
+ "hb",
1307
+ "H",
1308
+ "hB"
1309
+ ],
1310
+ SB: [
1311
+ "h",
1312
+ "hb",
1313
+ "H",
1314
+ "hB"
1315
+ ],
1316
+ SG: [
1317
+ "h",
1318
+ "hb",
1319
+ "H",
1320
+ "hB"
1321
+ ],
1322
+ SL: [
1323
+ "h",
1324
+ "hb",
1325
+ "H",
1326
+ "hB"
1327
+ ],
1328
+ SS: [
1329
+ "h",
1330
+ "hb",
1331
+ "H",
1332
+ "hB"
1333
+ ],
1334
+ SZ: [
1335
+ "h",
1336
+ "hb",
1337
+ "H",
1338
+ "hB"
1339
+ ],
1340
+ TC: [
1341
+ "h",
1342
+ "hb",
1343
+ "H",
1344
+ "hB"
1345
+ ],
1346
+ TT: [
1347
+ "h",
1348
+ "hb",
1349
+ "H",
1350
+ "hB"
1351
+ ],
1352
+ UM: [
1353
+ "h",
1354
+ "hb",
1355
+ "H",
1356
+ "hB"
1357
+ ],
1358
+ US: [
1359
+ "h",
1360
+ "hb",
1361
+ "H",
1362
+ "hB"
1363
+ ],
1364
+ VC: [
1365
+ "h",
1366
+ "hb",
1367
+ "H",
1368
+ "hB"
1369
+ ],
1370
+ VG: [
1371
+ "h",
1372
+ "hb",
1373
+ "H",
1374
+ "hB"
1375
+ ],
1376
+ VI: [
1377
+ "h",
1378
+ "hb",
1379
+ "H",
1380
+ "hB"
1381
+ ],
1382
+ ZM: [
1383
+ "h",
1384
+ "hb",
1385
+ "H",
1386
+ "hB"
1387
+ ],
1388
+ BO: [
1389
+ "H",
1390
+ "hB",
1391
+ "h",
1392
+ "hb"
1393
+ ],
1394
+ EC: [
1395
+ "H",
1396
+ "hB",
1397
+ "h",
1398
+ "hb"
1399
+ ],
1400
+ ES: [
1401
+ "H",
1402
+ "hB",
1403
+ "h",
1404
+ "hb"
1405
+ ],
1406
+ GQ: [
1407
+ "H",
1408
+ "hB",
1409
+ "h",
1410
+ "hb"
1411
+ ],
1412
+ PE: [
1413
+ "H",
1414
+ "hB",
1415
+ "h",
1416
+ "hb"
1417
+ ],
1418
+ AE: [
1419
+ "h",
1420
+ "hB",
1421
+ "hb",
1422
+ "H"
1423
+ ],
1424
+ "ar-001": [
1425
+ "h",
1426
+ "hB",
1427
+ "hb",
1428
+ "H"
1429
+ ],
1430
+ BH: [
1431
+ "h",
1432
+ "hB",
1433
+ "hb",
1434
+ "H"
1435
+ ],
1436
+ DZ: [
1437
+ "h",
1438
+ "hB",
1439
+ "hb",
1440
+ "H"
1441
+ ],
1442
+ EG: [
1443
+ "h",
1444
+ "hB",
1445
+ "hb",
1446
+ "H"
1447
+ ],
1448
+ EH: [
1449
+ "h",
1450
+ "hB",
1451
+ "hb",
1452
+ "H"
1453
+ ],
1454
+ HK: [
1455
+ "h",
1456
+ "hB",
1457
+ "hb",
1458
+ "H"
1459
+ ],
1460
+ IQ: [
1461
+ "h",
1462
+ "hB",
1463
+ "hb",
1464
+ "H"
1465
+ ],
1466
+ JO: [
1467
+ "h",
1468
+ "hB",
1469
+ "hb",
1470
+ "H"
1471
+ ],
1472
+ KW: [
1473
+ "h",
1474
+ "hB",
1475
+ "hb",
1476
+ "H"
1477
+ ],
1478
+ LB: [
1479
+ "h",
1480
+ "hB",
1481
+ "hb",
1482
+ "H"
1483
+ ],
1484
+ LY: [
1485
+ "h",
1486
+ "hB",
1487
+ "hb",
1488
+ "H"
1489
+ ],
1490
+ MO: [
1491
+ "h",
1492
+ "hB",
1493
+ "hb",
1494
+ "H"
1495
+ ],
1496
+ MR: [
1497
+ "h",
1498
+ "hB",
1499
+ "hb",
1500
+ "H"
1501
+ ],
1502
+ OM: [
1503
+ "h",
1504
+ "hB",
1505
+ "hb",
1506
+ "H"
1507
+ ],
1508
+ PH: [
1509
+ "h",
1510
+ "hB",
1511
+ "hb",
1512
+ "H"
1513
+ ],
1514
+ PS: [
1515
+ "h",
1516
+ "hB",
1517
+ "hb",
1518
+ "H"
1519
+ ],
1520
+ QA: [
1521
+ "h",
1522
+ "hB",
1523
+ "hb",
1524
+ "H"
1525
+ ],
1526
+ SA: [
1527
+ "h",
1528
+ "hB",
1529
+ "hb",
1530
+ "H"
1531
+ ],
1532
+ SD: [
1533
+ "h",
1534
+ "hB",
1535
+ "hb",
1536
+ "H"
1537
+ ],
1538
+ SY: [
1539
+ "h",
1540
+ "hB",
1541
+ "hb",
1542
+ "H"
1543
+ ],
1544
+ TN: [
1545
+ "h",
1546
+ "hB",
1547
+ "hb",
1548
+ "H"
1549
+ ],
1550
+ YE: [
1551
+ "h",
1552
+ "hB",
1553
+ "hb",
1554
+ "H"
1555
+ ],
1556
+ AF: [
1557
+ "H",
1558
+ "hb",
1559
+ "hB",
1560
+ "h"
1561
+ ],
1562
+ LA: [
1563
+ "H",
1564
+ "hb",
1565
+ "hB",
1566
+ "h"
1567
+ ],
1568
+ CN: [
1569
+ "H",
1570
+ "hB",
1571
+ "hb",
1572
+ "h"
1573
+ ],
1574
+ LV: [
1575
+ "H",
1576
+ "hB",
1577
+ "hb",
1578
+ "h"
1579
+ ],
1580
+ TL: [
1581
+ "H",
1582
+ "hB",
1583
+ "hb",
1584
+ "h"
1585
+ ],
1586
+ "zu-ZA": [
1587
+ "H",
1588
+ "hB",
1589
+ "hb",
1590
+ "h"
1591
+ ],
1592
+ CD: [
1593
+ "hB",
1594
+ "H"
1595
+ ],
1596
+ IR: [
1597
+ "hB",
1598
+ "H"
1599
+ ],
1600
+ "hi-IN": [
1601
+ "hB",
1602
+ "h",
1603
+ "H"
1604
+ ],
1605
+ "kn-IN": [
1606
+ "hB",
1607
+ "h",
1608
+ "H"
1609
+ ],
1610
+ "ml-IN": [
1611
+ "hB",
1612
+ "h",
1613
+ "H"
1614
+ ],
1615
+ "te-IN": [
1616
+ "hB",
1617
+ "h",
1618
+ "H"
1619
+ ],
1620
+ KH: [
1621
+ "hB",
1622
+ "h",
1623
+ "H",
1624
+ "hb"
1625
+ ],
1626
+ "ta-IN": [
1627
+ "hB",
1628
+ "h",
1629
+ "hb",
1630
+ "H"
1631
+ ],
1632
+ BN: [
1633
+ "hb",
1634
+ "hB",
1635
+ "h",
1636
+ "H"
1637
+ ],
1638
+ MY: [
1639
+ "hb",
1640
+ "hB",
1641
+ "h",
1642
+ "H"
1643
+ ],
1644
+ ET: [
1645
+ "hB",
1646
+ "hb",
1647
+ "h",
1648
+ "H"
1649
+ ],
1650
+ "gu-IN": [
1651
+ "hB",
1652
+ "hb",
1653
+ "h",
1654
+ "H"
1655
+ ],
1656
+ "mr-IN": [
1657
+ "hB",
1658
+ "hb",
1659
+ "h",
1660
+ "H"
1661
+ ],
1662
+ "pa-IN": [
1663
+ "hB",
1664
+ "hb",
1665
+ "h",
1666
+ "H"
1667
+ ],
1668
+ TW: [
1669
+ "hB",
1670
+ "hb",
1671
+ "h",
1672
+ "H"
1673
+ ],
1674
+ KE: [
1675
+ "hB",
1676
+ "hb",
1677
+ "H",
1678
+ "h"
1679
+ ],
1680
+ MM: [
1681
+ "hB",
1682
+ "hb",
1683
+ "H",
1684
+ "h"
1685
+ ],
1686
+ TZ: [
1687
+ "hB",
1688
+ "hb",
1689
+ "H",
1690
+ "h"
1691
+ ],
1692
+ UG: [
1693
+ "hB",
1694
+ "hb",
1695
+ "H",
1696
+ "h"
1697
+ ]
1698
+ };
1699
+ function tt(e, t) {
1700
+ for (var n = "", r = 0; r < e.length; r++) {
1701
+ var i = e.charAt(r);
1702
+ if (i === "j") {
1703
+ for (var a = 0; r + 1 < e.length && e.charAt(r + 1) === i; )
1704
+ a++, r++;
1705
+ var o = 1 + (a & 1), s = a < 2 ? 1 : 3 + (a >> 1), h = "a", l = rt(t);
1706
+ for ((l == "H" || l == "k") && (s = 0); s-- > 0; )
1707
+ n += h;
1708
+ for (; o-- > 0; )
1709
+ n = l + n;
1710
+ } else
1711
+ i === "J" ? n += "H" : n += i;
1712
+ }
1713
+ return n;
1714
+ }
1715
+ function rt(e) {
1716
+ var t = e.hourCycle;
1717
+ if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
1718
+ e.hourCycles && // @ts-ignore
1719
+ e.hourCycles.length && (t = e.hourCycles[0]), t)
1720
+ switch (t) {
1721
+ case "h24":
1722
+ return "k";
1723
+ case "h23":
1724
+ return "H";
1725
+ case "h12":
1726
+ return "h";
1727
+ case "h11":
1728
+ return "K";
1729
+ default:
1730
+ throw new Error("Invalid hourCycle");
1731
+ }
1732
+ var n = e.language, r;
1733
+ n !== "root" && (r = e.maximize().region);
1734
+ var i = U[r || ""] || U[n || ""] || U["".concat(n, "-001")] || U["001"];
1735
+ return i[0];
1736
+ }
1737
+ var X, nt = new RegExp("^".concat(Ae.source, "*")), it = new RegExp("".concat(Ae.source, "*$"));
1738
+ function v(e, t) {
1739
+ return { start: e, end: t };
1740
+ }
1741
+ var at = !!String.prototype.startsWith, ot = !!String.fromCodePoint, st = !!Object.fromEntries, ut = !!String.prototype.codePointAt, ht = !!String.prototype.trimStart, lt = !!String.prototype.trimEnd, ft = !!Number.isSafeInteger, ct = ft ? Number.isSafeInteger : function(e) {
1742
+ return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
1743
+ }, J = !0;
1744
+ try {
1745
+ var mt = Re("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
1746
+ J = ((X = mt.exec("a")) === null || X === void 0 ? void 0 : X[0]) === "a";
1747
+ } catch {
1748
+ J = !1;
1749
+ }
1750
+ var he = at ? (
1751
+ // Native
1752
+ function(t, n, r) {
1753
+ return t.startsWith(n, r);
1754
+ }
1755
+ ) : (
1756
+ // For IE11
1757
+ function(t, n, r) {
1758
+ return t.slice(r, r + n.length) === n;
1759
+ }
1760
+ ), Q = ot ? String.fromCodePoint : (
1761
+ // IE11
1762
+ function() {
1763
+ for (var t = [], n = 0; n < arguments.length; n++)
1764
+ t[n] = arguments[n];
1765
+ for (var r = "", i = t.length, a = 0, o; i > a; ) {
1766
+ if (o = t[a++], o > 1114111)
1767
+ throw RangeError(o + " is not a valid code point");
1768
+ r += o < 65536 ? String.fromCharCode(o) : String.fromCharCode(((o -= 65536) >> 10) + 55296, o % 1024 + 56320);
1769
+ }
1770
+ return r;
1771
+ }
1772
+ ), le = (
1773
+ // native
1774
+ st ? Object.fromEntries : (
1775
+ // Ponyfill
1776
+ function(t) {
1777
+ for (var n = {}, r = 0, i = t; r < i.length; r++) {
1778
+ var a = i[r], o = a[0], s = a[1];
1779
+ n[o] = s;
1780
+ }
1781
+ return n;
1782
+ }
1783
+ )
1784
+ ), Be = ut ? (
1785
+ // Native
1786
+ function(t, n) {
1787
+ return t.codePointAt(n);
1788
+ }
1789
+ ) : (
1790
+ // IE 11
1791
+ function(t, n) {
1792
+ var r = t.length;
1793
+ if (!(n < 0 || n >= r)) {
1794
+ var i = t.charCodeAt(n), a;
1795
+ return i < 55296 || i > 56319 || n + 1 === r || (a = t.charCodeAt(n + 1)) < 56320 || a > 57343 ? i : (i - 55296 << 10) + (a - 56320) + 65536;
1796
+ }
1797
+ }
1798
+ ), gt = ht ? (
1799
+ // Native
1800
+ function(t) {
1801
+ return t.trimStart();
1802
+ }
1803
+ ) : (
1804
+ // Ponyfill
1805
+ function(t) {
1806
+ return t.replace(nt, "");
1807
+ }
1808
+ ), pt = lt ? (
1809
+ // Native
1810
+ function(t) {
1811
+ return t.trimEnd();
1812
+ }
1813
+ ) : (
1814
+ // Ponyfill
1815
+ function(t) {
1816
+ return t.replace(it, "");
1817
+ }
1818
+ );
1819
+ function Re(e, t) {
1820
+ return new RegExp(e, t);
1821
+ }
1822
+ var Y;
1823
+ if (J) {
1824
+ var fe = Re("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
1825
+ Y = function(t, n) {
1826
+ var r;
1827
+ fe.lastIndex = n;
1828
+ var i = fe.exec(t);
1829
+ return (r = i[1]) !== null && r !== void 0 ? r : "";
1830
+ };
1831
+ } else
1832
+ Y = function(t, n) {
1833
+ for (var r = []; ; ) {
1834
+ var i = Be(t, n);
1835
+ if (i === void 0 || Oe(i) || dt(i))
1836
+ break;
1837
+ r.push(i), n += i >= 65536 ? 2 : 1;
1838
+ }
1839
+ return Q.apply(void 0, r);
1840
+ };
1841
+ var vt = (
1842
+ /** @class */
1843
+ function() {
1844
+ function e(t, n) {
1845
+ n === void 0 && (n = {}), this.message = t, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!n.ignoreTag, this.locale = n.locale, this.requiresOtherClause = !!n.requiresOtherClause, this.shouldParseSkeletons = !!n.shouldParseSkeletons;
1846
+ }
1847
+ return e.prototype.parse = function() {
1848
+ if (this.offset() !== 0)
1849
+ throw Error("parser can only be used once");
1850
+ return this.parseMessage(0, "", !1);
1851
+ }, e.prototype.parseMessage = function(t, n, r) {
1852
+ for (var i = []; !this.isEOF(); ) {
1853
+ var a = this.char();
1854
+ if (a === 123) {
1855
+ var o = this.parseArgument(t, r);
1856
+ if (o.err)
1857
+ return o;
1858
+ i.push(o.val);
1859
+ } else {
1860
+ if (a === 125 && t > 0)
1861
+ break;
1862
+ if (a === 35 && (n === "plural" || n === "selectordinal")) {
1863
+ var s = this.clonePosition();
1864
+ this.bump(), i.push({
1865
+ type: d.pound,
1866
+ location: v(s, this.clonePosition())
1867
+ });
1868
+ } else if (a === 60 && !this.ignoreTag && this.peek() === 47) {
1869
+ if (r)
1870
+ break;
1871
+ return this.error(g.UNMATCHED_CLOSING_TAG, v(this.clonePosition(), this.clonePosition()));
1872
+ } else if (a === 60 && !this.ignoreTag && $(this.peek() || 0)) {
1873
+ var o = this.parseTag(t, n);
1874
+ if (o.err)
1875
+ return o;
1876
+ i.push(o.val);
1877
+ } else {
1878
+ var o = this.parseLiteral(t, n);
1879
+ if (o.err)
1880
+ return o;
1881
+ i.push(o.val);
1882
+ }
1883
+ }
1884
+ }
1885
+ return { val: i, err: null };
1886
+ }, e.prototype.parseTag = function(t, n) {
1887
+ var r = this.clonePosition();
1888
+ this.bump();
1889
+ var i = this.parseTagName();
1890
+ if (this.bumpSpace(), this.bumpIf("/>"))
1891
+ return {
1892
+ val: {
1893
+ type: d.literal,
1894
+ value: "<".concat(i, "/>"),
1895
+ location: v(r, this.clonePosition())
1896
+ },
1897
+ err: null
1898
+ };
1899
+ if (this.bumpIf(">")) {
1900
+ var a = this.parseMessage(t + 1, n, !0);
1901
+ if (a.err)
1902
+ return a;
1903
+ var o = a.val, s = this.clonePosition();
1904
+ if (this.bumpIf("</")) {
1905
+ if (this.isEOF() || !$(this.char()))
1906
+ return this.error(g.INVALID_TAG, v(s, this.clonePosition()));
1907
+ var h = this.clonePosition(), l = this.parseTagName();
1908
+ return i !== l ? this.error(g.UNMATCHED_CLOSING_TAG, v(h, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
1909
+ val: {
1910
+ type: d.tag,
1911
+ value: i,
1912
+ children: o,
1913
+ location: v(r, this.clonePosition())
1914
+ },
1915
+ err: null
1916
+ } : this.error(g.INVALID_TAG, v(s, this.clonePosition())));
1917
+ } else
1918
+ return this.error(g.UNCLOSED_TAG, v(r, this.clonePosition()));
1919
+ } else
1920
+ return this.error(g.INVALID_TAG, v(r, this.clonePosition()));
1921
+ }, e.prototype.parseTagName = function() {
1922
+ var t = this.offset();
1923
+ for (this.bump(); !this.isEOF() && bt(this.char()); )
1924
+ this.bump();
1925
+ return this.message.slice(t, this.offset());
1926
+ }, e.prototype.parseLiteral = function(t, n) {
1927
+ for (var r = this.clonePosition(), i = ""; ; ) {
1928
+ var a = this.tryParseQuote(n);
1929
+ if (a) {
1930
+ i += a;
1931
+ continue;
1932
+ }
1933
+ var o = this.tryParseUnquoted(t, n);
1934
+ if (o) {
1935
+ i += o;
1936
+ continue;
1937
+ }
1938
+ var s = this.tryParseLeftAngleBracket();
1939
+ if (s) {
1940
+ i += s;
1941
+ continue;
1942
+ }
1943
+ break;
1944
+ }
1945
+ var h = v(r, this.clonePosition());
1946
+ return {
1947
+ val: { type: d.literal, value: i, location: h },
1948
+ err: null
1949
+ };
1950
+ }, e.prototype.tryParseLeftAngleBracket = function() {
1951
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
1952
+ !Et(this.peek() || 0)) ? (this.bump(), "<") : null;
1953
+ }, e.prototype.tryParseQuote = function(t) {
1954
+ if (this.isEOF() || this.char() !== 39)
1955
+ return null;
1956
+ switch (this.peek()) {
1957
+ case 39:
1958
+ return this.bump(), this.bump(), "'";
1959
+ case 123:
1960
+ case 60:
1961
+ case 62:
1962
+ case 125:
1963
+ break;
1964
+ case 35:
1965
+ if (t === "plural" || t === "selectordinal")
1966
+ break;
1967
+ return null;
1968
+ default:
1969
+ return null;
1970
+ }
1971
+ this.bump();
1972
+ var n = [this.char()];
1973
+ for (this.bump(); !this.isEOF(); ) {
1974
+ var r = this.char();
1975
+ if (r === 39)
1976
+ if (this.peek() === 39)
1977
+ n.push(39), this.bump();
1978
+ else {
1979
+ this.bump();
1980
+ break;
1981
+ }
1982
+ else
1983
+ n.push(r);
1984
+ this.bump();
1985
+ }
1986
+ return Q.apply(void 0, n);
1987
+ }, e.prototype.tryParseUnquoted = function(t, n) {
1988
+ if (this.isEOF())
1989
+ return null;
1990
+ var r = this.char();
1991
+ return r === 60 || r === 123 || r === 35 && (n === "plural" || n === "selectordinal") || r === 125 && t > 0 ? null : (this.bump(), Q(r));
1992
+ }, e.prototype.parseArgument = function(t, n) {
1993
+ var r = this.clonePosition();
1994
+ if (this.bump(), this.bumpSpace(), this.isEOF())
1995
+ return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition()));
1996
+ if (this.char() === 125)
1997
+ return this.bump(), this.error(g.EMPTY_ARGUMENT, v(r, this.clonePosition()));
1998
+ var i = this.parseIdentifierIfPossible().value;
1999
+ if (!i)
2000
+ return this.error(g.MALFORMED_ARGUMENT, v(r, this.clonePosition()));
2001
+ if (this.bumpSpace(), this.isEOF())
2002
+ return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition()));
2003
+ switch (this.char()) {
2004
+ case 125:
2005
+ return this.bump(), {
2006
+ val: {
2007
+ type: d.argument,
2008
+ // value does not include the opening and closing braces.
2009
+ value: i,
2010
+ location: v(r, this.clonePosition())
2011
+ },
2012
+ err: null
2013
+ };
2014
+ case 44:
2015
+ return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(r, this.clonePosition())) : this.parseArgumentOptions(t, n, i, r);
2016
+ default:
2017
+ return this.error(g.MALFORMED_ARGUMENT, v(r, this.clonePosition()));
2018
+ }
2019
+ }, e.prototype.parseIdentifierIfPossible = function() {
2020
+ var t = this.clonePosition(), n = this.offset(), r = Y(this.message, n), i = n + r.length;
2021
+ this.bumpTo(i);
2022
+ var a = this.clonePosition(), o = v(t, a);
2023
+ return { value: r, location: o };
2024
+ }, e.prototype.parseArgumentOptions = function(t, n, r, i) {
2025
+ var a, o = this.clonePosition(), s = this.parseIdentifierIfPossible().value, h = this.clonePosition();
2026
+ switch (s) {
2027
+ case "":
2028
+ return this.error(g.EXPECT_ARGUMENT_TYPE, v(o, h));
2029
+ case "number":
2030
+ case "date":
2031
+ case "time": {
2032
+ this.bumpSpace();
2033
+ var l = null;
2034
+ if (this.bumpIf(",")) {
2035
+ this.bumpSpace();
2036
+ var u = this.clonePosition(), f = this.parseSimpleArgStyleIfPossible();
2037
+ if (f.err)
2038
+ return f;
2039
+ var c = pt(f.val);
2040
+ if (c.length === 0)
2041
+ return this.error(g.EXPECT_ARGUMENT_STYLE, v(this.clonePosition(), this.clonePosition()));
2042
+ var p = v(u, this.clonePosition());
2043
+ l = { style: c, styleLocation: p };
2044
+ }
2045
+ var E = this.tryParseArgumentClose(i);
2046
+ if (E.err)
2047
+ return E;
2048
+ var b = v(i, this.clonePosition());
2049
+ if (l && he(l == null ? void 0 : l.style, "::", 0)) {
2050
+ var x = gt(l.style.slice(2));
2051
+ if (s === "number") {
2052
+ var f = this.parseNumberSkeletonFromString(x, l.styleLocation);
2053
+ return f.err ? f : {
2054
+ val: { type: d.number, value: r, location: b, style: f.val },
2055
+ err: null
2056
+ };
2057
+ } else {
2058
+ if (x.length === 0)
2059
+ return this.error(g.EXPECT_DATE_TIME_SKELETON, b);
2060
+ var y = x;
2061
+ this.locale && (y = tt(x, this.locale));
2062
+ var c = {
2063
+ type: D.dateTime,
2064
+ pattern: y,
2065
+ location: l.styleLocation,
2066
+ parsedOptions: this.shouldParseSkeletons ? qe(y) : {}
2067
+ }, H = s === "date" ? d.date : d.time;
2068
+ return {
2069
+ val: { type: H, value: r, location: b, style: c },
2070
+ err: null
2071
+ };
2072
+ }
2073
+ }
2074
+ return {
2075
+ val: {
2076
+ type: s === "number" ? d.number : s === "date" ? d.date : d.time,
2077
+ value: r,
2078
+ location: b,
2079
+ style: (a = l == null ? void 0 : l.style) !== null && a !== void 0 ? a : null
2080
+ },
2081
+ err: null
2082
+ };
2083
+ }
2084
+ case "plural":
2085
+ case "selectordinal":
2086
+ case "select": {
2087
+ var T = this.clonePosition();
2088
+ if (this.bumpSpace(), !this.bumpIf(","))
2089
+ return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS, v(T, m({}, T)));
2090
+ this.bumpSpace();
2091
+ var F = this.parseIdentifierIfPossible(), L = 0;
2092
+ if (s !== "select" && F.value === "offset") {
2093
+ if (!this.bumpIf(":"))
2094
+ return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, v(this.clonePosition(), this.clonePosition()));
2095
+ this.bumpSpace();
2096
+ var f = this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2097
+ if (f.err)
2098
+ return f;
2099
+ this.bumpSpace(), F = this.parseIdentifierIfPossible(), L = f.val;
2100
+ }
2101
+ var G = this.tryParsePluralOrSelectOptions(t, s, n, F);
2102
+ if (G.err)
2103
+ return G;
2104
+ var E = this.tryParseArgumentClose(i);
2105
+ if (E.err)
2106
+ return E;
2107
+ var ie = v(i, this.clonePosition());
2108
+ return s === "select" ? {
2109
+ val: {
2110
+ type: d.select,
2111
+ value: r,
2112
+ options: le(G.val),
2113
+ location: ie
2114
+ },
2115
+ err: null
2116
+ } : {
2117
+ val: {
2118
+ type: d.plural,
2119
+ value: r,
2120
+ options: le(G.val),
2121
+ offset: L,
2122
+ pluralType: s === "plural" ? "cardinal" : "ordinal",
2123
+ location: ie
2124
+ },
2125
+ err: null
2126
+ };
2127
+ }
2128
+ default:
2129
+ return this.error(g.INVALID_ARGUMENT_TYPE, v(o, h));
2130
+ }
2131
+ }, e.prototype.tryParseArgumentClose = function(t) {
2132
+ return this.isEOF() || this.char() !== 125 ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, v(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
2133
+ }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2134
+ for (var t = 0, n = this.clonePosition(); !this.isEOF(); ) {
2135
+ var r = this.char();
2136
+ switch (r) {
2137
+ case 39: {
2138
+ this.bump();
2139
+ var i = this.clonePosition();
2140
+ if (!this.bumpUntil("'"))
2141
+ return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, v(i, this.clonePosition()));
2142
+ this.bump();
2143
+ break;
2144
+ }
2145
+ case 123: {
2146
+ t += 1, this.bump();
2147
+ break;
2148
+ }
2149
+ case 125: {
2150
+ if (t > 0)
2151
+ t -= 1;
2152
+ else
2153
+ return {
2154
+ val: this.message.slice(n.offset, this.offset()),
2155
+ err: null
2156
+ };
2157
+ break;
2158
+ }
2159
+ default:
2160
+ this.bump();
2161
+ break;
2162
+ }
2163
+ }
2164
+ return {
2165
+ val: this.message.slice(n.offset, this.offset()),
2166
+ err: null
2167
+ };
2168
+ }, e.prototype.parseNumberSkeletonFromString = function(t, n) {
2169
+ var r = [];
2170
+ try {
2171
+ r = Qe(t);
2172
+ } catch {
2173
+ return this.error(g.INVALID_NUMBER_SKELETON, n);
2174
+ }
2175
+ return {
2176
+ val: {
2177
+ type: D.number,
2178
+ tokens: r,
2179
+ location: n,
2180
+ parsedOptions: this.shouldParseSkeletons ? et(r) : {}
2181
+ },
2182
+ err: null
2183
+ };
2184
+ }, e.prototype.tryParsePluralOrSelectOptions = function(t, n, r, i) {
2185
+ for (var a, o = !1, s = [], h = /* @__PURE__ */ new Set(), l = i.value, u = i.location; ; ) {
2186
+ if (l.length === 0) {
2187
+ var f = this.clonePosition();
2188
+ if (n !== "select" && this.bumpIf("=")) {
2189
+ var c = this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR, g.INVALID_PLURAL_ARGUMENT_SELECTOR);
2190
+ if (c.err)
2191
+ return c;
2192
+ u = v(f, this.clonePosition()), l = this.message.slice(f.offset, this.offset());
2193
+ } else
2194
+ break;
2195
+ }
2196
+ if (h.has(l))
2197
+ return this.error(n === "select" ? g.DUPLICATE_SELECT_ARGUMENT_SELECTOR : g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, u);
2198
+ l === "other" && (o = !0), this.bumpSpace();
2199
+ var p = this.clonePosition();
2200
+ if (!this.bumpIf("{"))
2201
+ return this.error(n === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, v(this.clonePosition(), this.clonePosition()));
2202
+ var E = this.parseMessage(t + 1, n, r);
2203
+ if (E.err)
2204
+ return E;
2205
+ var b = this.tryParseArgumentClose(p);
2206
+ if (b.err)
2207
+ return b;
2208
+ s.push([
2209
+ l,
2210
+ {
2211
+ value: E.val,
2212
+ location: v(p, this.clonePosition())
2213
+ }
2214
+ ]), h.add(l), this.bumpSpace(), a = this.parseIdentifierIfPossible(), l = a.value, u = a.location;
2215
+ }
2216
+ return s.length === 0 ? this.error(n === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR : g.EXPECT_PLURAL_ARGUMENT_SELECTOR, v(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(g.MISSING_OTHER_CLAUSE, v(this.clonePosition(), this.clonePosition())) : { val: s, err: null };
2217
+ }, e.prototype.tryParseDecimalInteger = function(t, n) {
2218
+ var r = 1, i = this.clonePosition();
2219
+ this.bumpIf("+") || this.bumpIf("-") && (r = -1);
2220
+ for (var a = !1, o = 0; !this.isEOF(); ) {
2221
+ var s = this.char();
2222
+ if (s >= 48 && s <= 57)
2223
+ a = !0, o = o * 10 + (s - 48), this.bump();
2224
+ else
2225
+ break;
2226
+ }
2227
+ var h = v(i, this.clonePosition());
2228
+ return a ? (o *= r, ct(o) ? { val: o, err: null } : this.error(n, h)) : this.error(t, h);
2229
+ }, e.prototype.offset = function() {
2230
+ return this.position.offset;
2231
+ }, e.prototype.isEOF = function() {
2232
+ return this.offset() === this.message.length;
2233
+ }, e.prototype.clonePosition = function() {
2234
+ return {
2235
+ offset: this.position.offset,
2236
+ line: this.position.line,
2237
+ column: this.position.column
2238
+ };
2239
+ }, e.prototype.char = function() {
2240
+ var t = this.position.offset;
2241
+ if (t >= this.message.length)
2242
+ throw Error("out of bound");
2243
+ var n = Be(this.message, t);
2244
+ if (n === void 0)
2245
+ throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
2246
+ return n;
2247
+ }, e.prototype.error = function(t, n) {
2248
+ return {
2249
+ val: null,
2250
+ err: {
2251
+ kind: t,
2252
+ message: this.message,
2253
+ location: n
2254
+ }
2255
+ };
2256
+ }, e.prototype.bump = function() {
2257
+ if (!this.isEOF()) {
2258
+ var t = this.char();
2259
+ 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);
2260
+ }
2261
+ }, e.prototype.bumpIf = function(t) {
2262
+ if (he(this.message, t, this.offset())) {
2263
+ for (var n = 0; n < t.length; n++)
2264
+ this.bump();
2265
+ return !0;
2266
+ }
2267
+ return !1;
2268
+ }, e.prototype.bumpUntil = function(t) {
2269
+ var n = this.offset(), r = this.message.indexOf(t, n);
2270
+ return r >= 0 ? (this.bumpTo(r), !0) : (this.bumpTo(this.message.length), !1);
2271
+ }, e.prototype.bumpTo = function(t) {
2272
+ if (this.offset() > t)
2273
+ throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset()));
2274
+ for (t = Math.min(t, this.message.length); ; ) {
2275
+ var n = this.offset();
2276
+ if (n === t)
2277
+ break;
2278
+ if (n > t)
2279
+ throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary"));
2280
+ if (this.bump(), this.isEOF())
2281
+ break;
2282
+ }
2283
+ }, e.prototype.bumpSpace = function() {
2284
+ for (; !this.isEOF() && Oe(this.char()); )
2285
+ this.bump();
2286
+ }, e.prototype.peek = function() {
2287
+ if (this.isEOF())
2288
+ return null;
2289
+ var t = this.char(), n = this.offset(), r = this.message.charCodeAt(n + (t >= 65536 ? 2 : 1));
2290
+ return r ?? null;
2291
+ }, e;
2292
+ }()
2293
+ );
2294
+ function $(e) {
2295
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
2296
+ }
2297
+ function Et(e) {
2298
+ return $(e) || e === 47;
2299
+ }
2300
+ function bt(e) {
2301
+ 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;
2302
+ }
2303
+ function Oe(e) {
2304
+ return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
2305
+ }
2306
+ function dt(e) {
2307
+ 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;
2308
+ }
2309
+ function K(e) {
2310
+ e.forEach(function(t) {
2311
+ if (delete t.location, ye(t) || Te(t))
2312
+ for (var n in t.options)
2313
+ delete t.options[n].location, K(t.options[n].value);
2314
+ else
2315
+ be(t) && Ie(t.style) || (de(t) || xe(t)) && q(t.style) ? delete t.style.location : Se(t) && K(t.children);
2316
+ });
2317
+ }
2318
+ function xt(e, t) {
2319
+ t === void 0 && (t = {}), t = m({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
2320
+ var n = new vt(e, t).parse();
2321
+ if (n.err) {
2322
+ var r = SyntaxError(g[n.err.kind]);
2323
+ throw r.location = n.err.location, r.originalMessage = n.err.message, r;
2324
+ }
2325
+ return t != null && t.captureLocation || K(n.val), n.val;
2326
+ }
2327
+ function _(e, t) {
2328
+ var n = t && t.cache ? t.cache : Ht, r = t && t.serializer ? t.serializer : At, i = t && t.strategy ? t.strategy : Tt;
2329
+ return i(e, {
2330
+ cache: n,
2331
+ serializer: r
2332
+ });
2333
+ }
2334
+ function yt(e) {
2335
+ return e == null || typeof e == "number" || typeof e == "boolean";
2336
+ }
2337
+ function Pe(e, t, n, r) {
2338
+ var i = yt(r) ? r : n(r), a = t.get(i);
2339
+ return typeof a > "u" && (a = e.call(this, r), t.set(i, a)), a;
2340
+ }
2341
+ function Le(e, t, n) {
2342
+ var r = Array.prototype.slice.call(arguments, 3), i = n(r), a = t.get(i);
2343
+ return typeof a > "u" && (a = e.apply(this, r), t.set(i, a)), a;
2344
+ }
2345
+ function ee(e, t, n, r, i) {
2346
+ return n.bind(t, e, r, i);
2347
+ }
2348
+ function Tt(e, t) {
2349
+ var n = e.length === 1 ? Pe : Le;
2350
+ return ee(e, this, n, t.cache.create(), t.serializer);
2351
+ }
2352
+ function St(e, t) {
2353
+ return ee(e, this, Le, t.cache.create(), t.serializer);
2354
+ }
2355
+ function It(e, t) {
2356
+ return ee(e, this, Pe, t.cache.create(), t.serializer);
2357
+ }
2358
+ var At = function() {
2359
+ return JSON.stringify(arguments);
2360
+ };
2361
+ function te() {
2362
+ this.cache = /* @__PURE__ */ Object.create(null);
2363
+ }
2364
+ te.prototype.get = function(e) {
2365
+ return this.cache[e];
2366
+ };
2367
+ te.prototype.set = function(e, t) {
2368
+ this.cache[e] = t;
2369
+ };
2370
+ var Ht = {
2371
+ create: function() {
2372
+ return new te();
2373
+ }
2374
+ }, B = {
2375
+ variadic: St,
2376
+ monadic: It
2377
+ }, R;
2378
+ (function(e) {
2379
+ e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
2380
+ })(R || (R = {}));
2381
+ var P = (
2382
+ /** @class */
2383
+ function(e) {
2384
+ N(t, e);
2385
+ function t(n, r, i) {
2386
+ var a = e.call(this, n) || this;
2387
+ return a.code = r, a.originalMessage = i, a;
2388
+ }
2389
+ return t.prototype.toString = function() {
2390
+ return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
2391
+ }, t;
2392
+ }(Error)
2393
+ ), ce = (
2394
+ /** @class */
2395
+ function(e) {
2396
+ N(t, e);
2397
+ function t(n, r, i, a) {
2398
+ return e.call(this, 'Invalid values for "'.concat(n, '": "').concat(r, '". Options are "').concat(Object.keys(i).join('", "'), '"'), R.INVALID_VALUE, a) || this;
2399
+ }
2400
+ return t;
2401
+ }(P)
2402
+ ), Nt = (
2403
+ /** @class */
2404
+ function(e) {
2405
+ N(t, e);
2406
+ function t(n, r, i) {
2407
+ return e.call(this, 'Value for "'.concat(n, '" must be of type ').concat(r), R.INVALID_VALUE, i) || this;
2408
+ }
2409
+ return t;
2410
+ }(P)
2411
+ ), _t = (
2412
+ /** @class */
2413
+ function(e) {
2414
+ N(t, e);
2415
+ function t(n, r) {
2416
+ return e.call(this, 'The intl string context variable "'.concat(n, '" was not provided to the string "').concat(r, '"'), R.MISSING_VALUE, r) || this;
2417
+ }
2418
+ return t;
2419
+ }(P)
2420
+ ), I;
2421
+ (function(e) {
2422
+ e[e.literal = 0] = "literal", e[e.object = 1] = "object";
2423
+ })(I || (I = {}));
2424
+ function Bt(e) {
2425
+ return e.length < 2 ? e : e.reduce(function(t, n) {
2426
+ var r = t[t.length - 1];
2427
+ return !r || r.type !== I.literal || n.type !== I.literal ? t.push(n) : r.value += n.value, t;
2428
+ }, []);
2429
+ }
2430
+ function Rt(e) {
2431
+ return typeof e == "function";
2432
+ }
2433
+ function V(e, t, n, r, i, a, o) {
2434
+ if (e.length === 1 && ae(e[0]))
2435
+ return [
2436
+ {
2437
+ type: I.literal,
2438
+ value: e[0].value
2439
+ }
2440
+ ];
2441
+ for (var s = [], h = 0, l = e; h < l.length; h++) {
2442
+ var u = l[h];
2443
+ if (ae(u)) {
2444
+ s.push({
2445
+ type: I.literal,
2446
+ value: u.value
2447
+ });
2448
+ continue;
2449
+ }
2450
+ if (We(u)) {
2451
+ typeof a == "number" && s.push({
2452
+ type: I.literal,
2453
+ value: n.getNumberFormat(t).format(a)
2454
+ });
2455
+ continue;
2456
+ }
2457
+ var f = u.value;
2458
+ if (!(i && f in i))
2459
+ throw new _t(f, o);
2460
+ var c = i[f];
2461
+ if (Ze(u)) {
2462
+ (!c || typeof c == "string" || typeof c == "number") && (c = typeof c == "string" || typeof c == "number" ? String(c) : ""), s.push({
2463
+ type: typeof c == "string" ? I.literal : I.object,
2464
+ value: c
2465
+ });
2466
+ continue;
2467
+ }
2468
+ if (de(u)) {
2469
+ var p = typeof u.style == "string" ? r.date[u.style] : q(u.style) ? u.style.parsedOptions : void 0;
2470
+ s.push({
2471
+ type: I.literal,
2472
+ value: n.getDateTimeFormat(t, p).format(c)
2473
+ });
2474
+ continue;
2475
+ }
2476
+ if (xe(u)) {
2477
+ var p = typeof u.style == "string" ? r.time[u.style] : q(u.style) ? u.style.parsedOptions : r.time.medium;
2478
+ s.push({
2479
+ type: I.literal,
2480
+ value: n.getDateTimeFormat(t, p).format(c)
2481
+ });
2482
+ continue;
2483
+ }
2484
+ if (be(u)) {
2485
+ var p = typeof u.style == "string" ? r.number[u.style] : Ie(u.style) ? u.style.parsedOptions : void 0;
2486
+ p && p.scale && (c = c * (p.scale || 1)), s.push({
2487
+ type: I.literal,
2488
+ value: n.getNumberFormat(t, p).format(c)
2489
+ });
2490
+ continue;
2491
+ }
2492
+ if (Se(u)) {
2493
+ var E = u.children, b = u.value, x = i[b];
2494
+ if (!Rt(x))
2495
+ throw new Nt(b, "function", o);
2496
+ var y = V(E, t, n, r, i, a), H = x(y.map(function(L) {
2497
+ return L.value;
2498
+ }));
2499
+ Array.isArray(H) || (H = [H]), s.push.apply(s, H.map(function(L) {
2500
+ return {
2501
+ type: typeof L == "string" ? I.literal : I.object,
2502
+ value: L
2503
+ };
2504
+ }));
2505
+ }
2506
+ if (ye(u)) {
2507
+ var T = u.options[c] || u.options.other;
2508
+ if (!T)
2509
+ throw new ce(u.value, c, Object.keys(u.options), o);
2510
+ s.push.apply(s, V(T.value, t, n, r, i));
2511
+ continue;
2512
+ }
2513
+ if (Te(u)) {
2514
+ var T = u.options["=".concat(c)];
2515
+ if (!T) {
2516
+ if (!Intl.PluralRules)
2517
+ throw new P(`Intl.PluralRules is not available in this environment.
2518
+ Try polyfilling it using "@formatjs/intl-pluralrules"
2519
+ `, R.MISSING_INTL_API, o);
2520
+ var F = n.getPluralRules(t, { type: u.pluralType }).select(c - (u.offset || 0));
2521
+ T = u.options[F] || u.options.other;
2522
+ }
2523
+ if (!T)
2524
+ throw new ce(u.value, c, Object.keys(u.options), o);
2525
+ s.push.apply(s, V(T.value, t, n, r, i, c - (u.offset || 0)));
2526
+ continue;
2527
+ }
2528
+ }
2529
+ return Bt(s);
2530
+ }
2531
+ function Ot(e, t) {
2532
+ return t ? m(m(m({}, e || {}), t || {}), Object.keys(e).reduce(function(n, r) {
2533
+ return n[r] = m(m({}, e[r]), t[r] || {}), n;
2534
+ }, {})) : e;
2535
+ }
2536
+ function Pt(e, t) {
2537
+ return t ? Object.keys(e).reduce(function(n, r) {
2538
+ return n[r] = Ot(e[r], t[r]), n;
2539
+ }, m({}, e)) : e;
2540
+ }
2541
+ function Z(e) {
2542
+ return {
2543
+ create: function() {
2544
+ return {
2545
+ get: function(t) {
2546
+ return e[t];
2547
+ },
2548
+ set: function(t, n) {
2549
+ e[t] = n;
2550
+ }
2551
+ };
2552
+ }
2553
+ };
2554
+ }
2555
+ function Lt(e) {
2556
+ return e === void 0 && (e = {
2557
+ number: {},
2558
+ dateTime: {},
2559
+ pluralRules: {}
2560
+ }), {
2561
+ getNumberFormat: _(function() {
2562
+ for (var t, n = [], r = 0; r < arguments.length; r++)
2563
+ n[r] = arguments[r];
2564
+ return new ((t = Intl.NumberFormat).bind.apply(t, O([void 0], n, !1)))();
2565
+ }, {
2566
+ cache: Z(e.number),
2567
+ strategy: B.variadic
2568
+ }),
2569
+ getDateTimeFormat: _(function() {
2570
+ for (var t, n = [], r = 0; r < arguments.length; r++)
2571
+ n[r] = arguments[r];
2572
+ return new ((t = Intl.DateTimeFormat).bind.apply(t, O([void 0], n, !1)))();
2573
+ }, {
2574
+ cache: Z(e.dateTime),
2575
+ strategy: B.variadic
2576
+ }),
2577
+ getPluralRules: _(function() {
2578
+ for (var t, n = [], r = 0; r < arguments.length; r++)
2579
+ n[r] = arguments[r];
2580
+ return new ((t = Intl.PluralRules).bind.apply(t, O([void 0], n, !1)))();
2581
+ }, {
2582
+ cache: Z(e.pluralRules),
2583
+ strategy: B.variadic
2584
+ })
2585
+ };
2586
+ }
2587
+ var Me = (
2588
+ /** @class */
2589
+ function() {
2590
+ function e(t, n, r, i) {
2591
+ n === void 0 && (n = e.defaultLocale);
2592
+ var a = this;
2593
+ if (this.formatterCache = {
2594
+ number: {},
2595
+ dateTime: {},
2596
+ pluralRules: {}
2597
+ }, this.format = function(o) {
2598
+ var s = a.formatToParts(o);
2599
+ if (s.length === 1)
2600
+ return s[0].value;
2601
+ var h = s.reduce(function(l, u) {
2602
+ return !l.length || u.type !== I.literal || typeof l[l.length - 1] != "string" ? l.push(u.value) : l[l.length - 1] += u.value, l;
2603
+ }, []);
2604
+ return h.length <= 1 ? h[0] || "" : h;
2605
+ }, this.formatToParts = function(o) {
2606
+ return V(a.ast, a.locales, a.formatters, a.formats, o, void 0, a.message);
2607
+ }, this.resolvedOptions = function() {
2608
+ var o;
2609
+ return {
2610
+ locale: ((o = a.resolvedLocale) === null || o === void 0 ? void 0 : o.toString()) || Intl.NumberFormat.supportedLocalesOf(a.locales)[0]
2611
+ };
2612
+ }, this.getAst = function() {
2613
+ return a.ast;
2614
+ }, this.locales = n, this.resolvedLocale = e.resolveLocale(n), typeof t == "string") {
2615
+ if (this.message = t, !e.__parse)
2616
+ throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
2617
+ this.ast = e.__parse(t, {
2618
+ ignoreTag: i == null ? void 0 : i.ignoreTag,
2619
+ locale: this.resolvedLocale
2620
+ });
2621
+ } else
2622
+ this.ast = t;
2623
+ if (!Array.isArray(this.ast))
2624
+ throw new TypeError("A message must be provided as a String or AST.");
2625
+ this.formats = Pt(e.formats, r), this.formatters = i && i.formatters || Lt(this.formatterCache);
2626
+ }
2627
+ return Object.defineProperty(e, "defaultLocale", {
2628
+ get: function() {
2629
+ return e.memoizedDefaultLocale || (e.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), e.memoizedDefaultLocale;
2630
+ },
2631
+ enumerable: !1,
2632
+ configurable: !0
2633
+ }), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
2634
+ if (!(typeof Intl.Locale > "u")) {
2635
+ var n = Intl.NumberFormat.supportedLocalesOf(t);
2636
+ return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
2637
+ }
2638
+ }, e.__parse = xt, e.formats = {
2639
+ number: {
2640
+ integer: {
2641
+ maximumFractionDigits: 0
2642
+ },
2643
+ currency: {
2644
+ style: "currency"
2645
+ },
2646
+ percent: {
2647
+ style: "percent"
2648
+ }
2649
+ },
2650
+ date: {
2651
+ short: {
2652
+ month: "numeric",
2653
+ day: "numeric",
2654
+ year: "2-digit"
2655
+ },
2656
+ medium: {
2657
+ month: "short",
2658
+ day: "numeric",
2659
+ year: "numeric"
2660
+ },
2661
+ long: {
2662
+ month: "long",
2663
+ day: "numeric",
2664
+ year: "numeric"
2665
+ },
2666
+ full: {
2667
+ weekday: "long",
2668
+ month: "long",
2669
+ day: "numeric",
2670
+ year: "numeric"
2671
+ }
2672
+ },
2673
+ time: {
2674
+ short: {
2675
+ hour: "numeric",
2676
+ minute: "numeric"
2677
+ },
2678
+ medium: {
2679
+ hour: "numeric",
2680
+ minute: "numeric",
2681
+ second: "numeric"
2682
+ },
2683
+ long: {
2684
+ hour: "numeric",
2685
+ minute: "numeric",
2686
+ second: "numeric",
2687
+ timeZoneName: "short"
2688
+ },
2689
+ full: {
2690
+ hour: "numeric",
2691
+ minute: "numeric",
2692
+ second: "numeric",
2693
+ timeZoneName: "short"
2694
+ }
2695
+ }
2696
+ }, e;
2697
+ }()
2698
+ ), S;
2699
+ (function(e) {
2700
+ e.FORMAT_ERROR = "FORMAT_ERROR", e.UNSUPPORTED_FORMATTER = "UNSUPPORTED_FORMATTER", e.INVALID_CONFIG = "INVALID_CONFIG", e.MISSING_DATA = "MISSING_DATA", e.MISSING_TRANSLATION = "MISSING_TRANSLATION";
2701
+ })(S || (S = {}));
2702
+ var A = (
2703
+ /** @class */
2704
+ function(e) {
2705
+ N(t, e);
2706
+ function t(n, r, i) {
2707
+ var a = this, o = i ? i instanceof Error ? i : new Error(String(i)) : void 0;
2708
+ return a = e.call(this, "[@formatjs/intl Error ".concat(n, "] ").concat(r, `
2709
+ `).concat(o ? `
2710
+ `.concat(o.message, `
2711
+ `).concat(o.stack) : "")) || this, a.code = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(a, t), a;
2712
+ }
2713
+ return t;
2714
+ }(Error)
2715
+ ), Mt = (
2716
+ /** @class */
2717
+ function(e) {
2718
+ N(t, e);
2719
+ function t(n, r) {
2720
+ return e.call(this, S.UNSUPPORTED_FORMATTER, n, r) || this;
2721
+ }
2722
+ return t;
2723
+ }(A)
2724
+ ), Ct = (
2725
+ /** @class */
2726
+ function(e) {
2727
+ N(t, e);
2728
+ function t(n, r) {
2729
+ return e.call(this, S.INVALID_CONFIG, n, r) || this;
2730
+ }
2731
+ return t;
2732
+ }(A)
2733
+ ), me = (
2734
+ /** @class */
2735
+ function(e) {
2736
+ N(t, e);
2737
+ function t(n, r) {
2738
+ return e.call(this, S.MISSING_DATA, n, r) || this;
2739
+ }
2740
+ return t;
2741
+ }(A)
2742
+ ), re = (
2743
+ /** @class */
2744
+ function(e) {
2745
+ N(t, e);
2746
+ function t(n, r, i) {
2747
+ return e.call(this, S.FORMAT_ERROR, "".concat(n, `
2748
+ Locale: `).concat(r, `
2749
+ `), i) || this;
2750
+ }
2751
+ return t;
2752
+ }(A)
2753
+ ), W = (
2754
+ /** @class */
2755
+ function(e) {
2756
+ N(t, e);
2757
+ function t(n, r, i, a) {
2758
+ var o = e.call(this, "".concat(n, `
2759
+ MessageID: `).concat(i == null ? void 0 : i.id, `
2760
+ Default Message: `).concat(i == null ? void 0 : i.defaultMessage, `
2761
+ Description: `).concat(i == null ? void 0 : i.description, `
2762
+ `), r, a) || this;
2763
+ return o.descriptor = i, o;
2764
+ }
2765
+ return t;
2766
+ }(re)
2767
+ ), Dt = (
2768
+ /** @class */
2769
+ function(e) {
2770
+ N(t, e);
2771
+ function t(n, r) {
2772
+ var i = e.call(this, S.MISSING_TRANSLATION, 'Missing message: "'.concat(n.id, '" for locale "').concat(r, '", using ').concat(n.defaultMessage ? "default message (".concat(typeof n.defaultMessage == "string" ? n.defaultMessage : n.defaultMessage.map(function(a) {
2773
+ var o;
2774
+ return (o = a.value) !== null && o !== void 0 ? o : JSON.stringify(a);
2775
+ }).join(), ")") : "id", " as fallback.")) || this;
2776
+ return i.descriptor = n, i;
2777
+ }
2778
+ return t;
2779
+ }(A)
2780
+ );
2781
+ function C(e, t, n) {
2782
+ return n === void 0 && (n = {}), t.reduce(function(r, i) {
2783
+ return i in e ? r[i] = e[i] : i in n && (r[i] = n[i]), r;
2784
+ }, {});
2785
+ }
2786
+ var Ft = function(e) {
2787
+ process.env.NODE_ENV !== "production" && console.error(e);
2788
+ }, wt = function(e) {
2789
+ process.env.NODE_ENV !== "production" && console.warn(e);
2790
+ }, Gt = {
2791
+ formats: {},
2792
+ messages: {},
2793
+ timeZone: void 0,
2794
+ defaultLocale: "en",
2795
+ defaultFormats: {},
2796
+ fallbackOnEmptyString: !0,
2797
+ onError: Ft,
2798
+ onWarn: wt
2799
+ };
2800
+ function Ce() {
2801
+ return {
2802
+ dateTime: {},
2803
+ number: {},
2804
+ message: {},
2805
+ relativeTime: {},
2806
+ pluralRules: {},
2807
+ list: {},
2808
+ displayNames: {}
2809
+ };
2810
+ }
2811
+ function M(e) {
2812
+ return {
2813
+ create: function() {
2814
+ return {
2815
+ get: function(t) {
2816
+ return e[t];
2817
+ },
2818
+ set: function(t, n) {
2819
+ e[t] = n;
2820
+ }
2821
+ };
2822
+ }
2823
+ };
2824
+ }
2825
+ function Ut(e) {
2826
+ e === void 0 && (e = Ce());
2827
+ var t = Intl.RelativeTimeFormat, n = Intl.ListFormat, r = Intl.DisplayNames, i = _(function() {
2828
+ for (var s, h = [], l = 0; l < arguments.length; l++)
2829
+ h[l] = arguments[l];
2830
+ return new ((s = Intl.DateTimeFormat).bind.apply(s, O([void 0], h, !1)))();
2831
+ }, {
2832
+ cache: M(e.dateTime),
2833
+ strategy: B.variadic
2834
+ }), a = _(function() {
2835
+ for (var s, h = [], l = 0; l < arguments.length; l++)
2836
+ h[l] = arguments[l];
2837
+ return new ((s = Intl.NumberFormat).bind.apply(s, O([void 0], h, !1)))();
2838
+ }, {
2839
+ cache: M(e.number),
2840
+ strategy: B.variadic
2841
+ }), o = _(function() {
2842
+ for (var s, h = [], l = 0; l < arguments.length; l++)
2843
+ h[l] = arguments[l];
2844
+ return new ((s = Intl.PluralRules).bind.apply(s, O([void 0], h, !1)))();
2845
+ }, {
2846
+ cache: M(e.pluralRules),
2847
+ strategy: B.variadic
2848
+ });
2849
+ return {
2850
+ getDateTimeFormat: i,
2851
+ getNumberFormat: a,
2852
+ getMessageFormat: _(function(s, h, l, u) {
2853
+ return new Me(s, h, l, m({ formatters: {
2854
+ getNumberFormat: a,
2855
+ getDateTimeFormat: i,
2856
+ getPluralRules: o
2857
+ } }, u || {}));
2858
+ }, {
2859
+ cache: M(e.message),
2860
+ strategy: B.variadic
2861
+ }),
2862
+ getRelativeTimeFormat: _(function() {
2863
+ for (var s = [], h = 0; h < arguments.length; h++)
2864
+ s[h] = arguments[h];
2865
+ return new (t.bind.apply(t, O([void 0], s, !1)))();
2866
+ }, {
2867
+ cache: M(e.relativeTime),
2868
+ strategy: B.variadic
2869
+ }),
2870
+ getPluralRules: o,
2871
+ getListFormat: _(function() {
2872
+ for (var s = [], h = 0; h < arguments.length; h++)
2873
+ s[h] = arguments[h];
2874
+ return new (n.bind.apply(n, O([void 0], s, !1)))();
2875
+ }, {
2876
+ cache: M(e.list),
2877
+ strategy: B.variadic
2878
+ }),
2879
+ getDisplayNames: _(function() {
2880
+ for (var s = [], h = 0; h < arguments.length; h++)
2881
+ s[h] = arguments[h];
2882
+ return new (r.bind.apply(r, O([void 0], s, !1)))();
2883
+ }, {
2884
+ cache: M(e.displayNames),
2885
+ strategy: B.variadic
2886
+ })
2887
+ };
2888
+ }
2889
+ function ne(e, t, n, r) {
2890
+ var i = e && e[t], a;
2891
+ if (i && (a = i[n]), a)
2892
+ return a;
2893
+ r(new Mt("No ".concat(t, " format named: ").concat(n)));
2894
+ }
2895
+ function jt(e, t, n) {
2896
+ if (n === void 0 && (n = Error), !e)
2897
+ throw new n(t);
2898
+ }
2899
+ function j(e, t) {
2900
+ return Object.keys(e).reduce(function(n, r) {
2901
+ return n[r] = m({ timeZone: t }, e[r]), n;
2902
+ }, {});
2903
+ }
2904
+ function ge(e, t) {
2905
+ var n = Object.keys(m(m({}, e), t));
2906
+ return n.reduce(function(r, i) {
2907
+ return r[i] = m(m({}, e[i] || {}), t[i] || {}), r;
2908
+ }, {});
2909
+ }
2910
+ function pe(e, t) {
2911
+ if (!t)
2912
+ return e;
2913
+ var n = Me.formats;
2914
+ return m(m(m({}, n), e), { date: ge(j(n.date, t), j(e.date || {}, t)), time: ge(j(n.time, t), j(e.time || {}, t)) });
2915
+ }
2916
+ var ve = function(e, t, n, r, i) {
2917
+ var a = e.locale, o = e.formats, s = e.messages, h = e.defaultLocale, l = e.defaultFormats, u = e.fallbackOnEmptyString, f = e.onError, c = e.timeZone, p = e.defaultRichTextElements;
2918
+ n === void 0 && (n = { id: "" });
2919
+ var E = n.id, b = n.defaultMessage;
2920
+ jt(!!E, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
2921
+ var x = String(E), y = (
2922
+ // In case messages is Object.create(null)
2923
+ // e.g import('foo.json') from webpack)
2924
+ // See https://github.com/formatjs/formatjs/issues/1914
2925
+ s && Object.prototype.hasOwnProperty.call(s, x) && s[x]
2926
+ );
2927
+ if (Array.isArray(y) && y.length === 1 && y[0].type === d.literal)
2928
+ return y[0].value;
2929
+ if (!r && y && typeof y == "string" && !p)
2930
+ return y.replace(/'\{(.*?)\}'/gi, "{$1}");
2931
+ if (r = m(m({}, p), r || {}), o = pe(o, c), l = pe(l, c), !y) {
2932
+ if (u === !1 && y === "")
2933
+ return y;
2934
+ if ((!b || a && a.toLowerCase() !== h.toLowerCase()) && f(new Dt(n, a)), b)
2935
+ try {
2936
+ var H = t.getMessageFormat(b, h, l, i);
2937
+ return H.format(r);
2938
+ } catch (T) {
2939
+ return f(new W('Error formatting default message for: "'.concat(x, '", rendering default message verbatim'), a, n, T)), typeof b == "string" ? b : x;
2940
+ }
2941
+ return x;
2942
+ }
2943
+ try {
2944
+ var H = t.getMessageFormat(y, a, o, m({ formatters: t }, i || {}));
2945
+ return H.format(r);
2946
+ } catch (T) {
2947
+ f(new W('Error formatting message: "'.concat(x, '", using ').concat(b ? "default message" : "id", " as fallback."), a, n, T));
2948
+ }
2949
+ if (b)
2950
+ try {
2951
+ var H = t.getMessageFormat(b, h, l, i);
2952
+ return H.format(r);
2953
+ } catch (T) {
2954
+ f(new W('Error formatting the default message for: "'.concat(x, '", rendering message verbatim'), a, n, T));
2955
+ }
2956
+ return typeof y == "string" ? y : typeof b == "string" ? b : x;
2957
+ }, De = [
2958
+ "formatMatcher",
2959
+ "timeZone",
2960
+ "hour12",
2961
+ "weekday",
2962
+ "era",
2963
+ "year",
2964
+ "month",
2965
+ "day",
2966
+ "hour",
2967
+ "minute",
2968
+ "second",
2969
+ "timeZoneName",
2970
+ "hourCycle",
2971
+ "dateStyle",
2972
+ "timeStyle",
2973
+ "calendar",
2974
+ // 'dayPeriod',
2975
+ "numberingSystem",
2976
+ "fractionalSecondDigits"
2977
+ ];
2978
+ function k(e, t, n, r) {
2979
+ var i = e.locale, a = e.formats, o = e.onError, s = e.timeZone;
2980
+ r === void 0 && (r = {});
2981
+ var h = r.format, l = m(m({}, s && { timeZone: s }), h && ne(a, t, h, o)), u = C(r, De, l);
2982
+ return t === "time" && !u.hour && !u.minute && !u.second && !u.timeStyle && !u.dateStyle && (u = m(m({}, u), { hour: "numeric", minute: "numeric" })), n(i, u);
2983
+ }
2984
+ function Vt(e, t) {
2985
+ for (var n = [], r = 2; r < arguments.length; r++)
2986
+ n[r - 2] = arguments[r];
2987
+ var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
2988
+ try {
2989
+ return k(e, "date", t, o).format(s);
2990
+ } catch (h) {
2991
+ e.onError(new A(S.FORMAT_ERROR, "Error formatting date.", h));
2992
+ }
2993
+ return String(s);
2994
+ }
2995
+ function kt(e, t) {
2996
+ for (var n = [], r = 2; r < arguments.length; r++)
2997
+ n[r - 2] = arguments[r];
2998
+ var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
2999
+ try {
3000
+ return k(e, "time", t, o).format(s);
3001
+ } catch (h) {
3002
+ e.onError(new A(S.FORMAT_ERROR, "Error formatting time.", h));
3003
+ }
3004
+ return String(s);
3005
+ }
3006
+ function Xt(e, t) {
3007
+ for (var n = [], r = 2; r < arguments.length; r++)
3008
+ n[r - 2] = arguments[r];
3009
+ var i = n[0], a = n[1], o = n[2], s = o === void 0 ? {} : o, h = e.timeZone, l = e.locale, u = e.onError, f = C(s, De, h ? { timeZone: h } : {});
3010
+ try {
3011
+ return t(l, f).formatRange(i, a);
3012
+ } catch (c) {
3013
+ u(new A(S.FORMAT_ERROR, "Error formatting date time range.", c));
3014
+ }
3015
+ return String(i);
3016
+ }
3017
+ function Zt(e, t) {
3018
+ for (var n = [], r = 2; r < arguments.length; r++)
3019
+ n[r - 2] = arguments[r];
3020
+ var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
3021
+ try {
3022
+ return k(e, "date", t, o).formatToParts(s);
3023
+ } catch (h) {
3024
+ e.onError(new A(S.FORMAT_ERROR, "Error formatting date.", h));
3025
+ }
3026
+ return [];
3027
+ }
3028
+ function Wt(e, t) {
3029
+ for (var n = [], r = 2; r < arguments.length; r++)
3030
+ n[r - 2] = arguments[r];
3031
+ var i = n[0], a = n[1], o = a === void 0 ? {} : a, s = typeof i == "string" ? new Date(i || 0) : i;
3032
+ try {
3033
+ return k(e, "time", t, o).formatToParts(s);
3034
+ } catch (h) {
3035
+ e.onError(new A(S.FORMAT_ERROR, "Error formatting time.", h));
3036
+ }
3037
+ return [];
3038
+ }
3039
+ var zt = [
3040
+ "style",
3041
+ "type",
3042
+ "fallback",
3043
+ "languageDisplay"
3044
+ ];
3045
+ function qt(e, t, n, r) {
3046
+ var i = e.locale, a = e.onError, o = Intl.DisplayNames;
3047
+ o || a(new P(`Intl.DisplayNames is not available in this environment.
3048
+ Try polyfilling it using "@formatjs/intl-displaynames"
3049
+ `, R.MISSING_INTL_API));
3050
+ var s = C(r, zt);
3051
+ try {
3052
+ return t(i, s).of(n);
3053
+ } catch (h) {
3054
+ a(new A(S.FORMAT_ERROR, "Error formatting display name.", h));
3055
+ }
3056
+ }
3057
+ var Jt = [
3058
+ "type",
3059
+ "style"
3060
+ ], Ee = Date.now();
3061
+ function Qt(e) {
3062
+ return "".concat(Ee, "_").concat(e, "_").concat(Ee);
3063
+ }
3064
+ function Yt(e, t, n, r) {
3065
+ r === void 0 && (r = {});
3066
+ var i = Fe(e, t, n, r).reduce(function(a, o) {
3067
+ var s = o.value;
3068
+ return typeof s != "string" ? a.push(s) : typeof a[a.length - 1] == "string" ? a[a.length - 1] += s : a.push(s), a;
3069
+ }, []);
3070
+ return i.length === 1 ? i[0] : i.length === 0 ? "" : i;
3071
+ }
3072
+ function Fe(e, t, n, r) {
3073
+ var i = e.locale, a = e.onError;
3074
+ r === void 0 && (r = {});
3075
+ var o = Intl.ListFormat;
3076
+ o || a(new P(`Intl.ListFormat is not available in this environment.
3077
+ Try polyfilling it using "@formatjs/intl-listformat"
3078
+ `, R.MISSING_INTL_API));
3079
+ var s = C(r, Jt);
3080
+ try {
3081
+ var h = {}, l = n.map(function(u, f) {
3082
+ if (typeof u == "object") {
3083
+ var c = Qt(f);
3084
+ return h[c] = u, c;
3085
+ }
3086
+ return String(u);
3087
+ });
3088
+ return t(i, s).formatToParts(l).map(function(u) {
3089
+ return u.type === "literal" ? u : m(m({}, u), { value: h[u.value] || u.value });
3090
+ });
3091
+ } catch (u) {
3092
+ a(new A(S.FORMAT_ERROR, "Error formatting list.", u));
3093
+ }
3094
+ return n;
3095
+ }
3096
+ var $t = ["type"];
3097
+ function Kt(e, t, n, r) {
3098
+ var i = e.locale, a = e.onError;
3099
+ r === void 0 && (r = {}), Intl.PluralRules || a(new P(`Intl.PluralRules is not available in this environment.
3100
+ Try polyfilling it using "@formatjs/intl-pluralrules"
3101
+ `, R.MISSING_INTL_API));
3102
+ var o = C(r, $t);
3103
+ try {
3104
+ return t(i, o).select(n);
3105
+ } catch (s) {
3106
+ a(new re("Error formatting plural.", i, s));
3107
+ }
3108
+ return "other";
3109
+ }
3110
+ var er = ["numeric", "style"];
3111
+ function tr(e, t, n) {
3112
+ var r = e.locale, i = e.formats, a = e.onError;
3113
+ n === void 0 && (n = {});
3114
+ var o = n.format, s = !!o && ne(i, "relative", o, a) || {}, h = C(n, er, s);
3115
+ return t(r, h);
3116
+ }
3117
+ function rr(e, t, n, r, i) {
3118
+ i === void 0 && (i = {}), r || (r = "second");
3119
+ var a = Intl.RelativeTimeFormat;
3120
+ a || e.onError(new P(`Intl.RelativeTimeFormat is not available in this environment.
3121
+ Try polyfilling it using "@formatjs/intl-relativetimeformat"
3122
+ `, R.MISSING_INTL_API));
3123
+ try {
3124
+ return tr(e, t, i).format(n, r);
3125
+ } catch (o) {
3126
+ e.onError(new re("Error formatting relative time.", e.locale, o));
3127
+ }
3128
+ return String(n);
3129
+ }
3130
+ var nr = [
3131
+ "style",
3132
+ "currency",
3133
+ "currencyDisplay",
3134
+ "unit",
3135
+ "unitDisplay",
3136
+ "useGrouping",
3137
+ "minimumIntegerDigits",
3138
+ "minimumFractionDigits",
3139
+ "maximumFractionDigits",
3140
+ "minimumSignificantDigits",
3141
+ "maximumSignificantDigits",
3142
+ // ES2020 NumberFormat
3143
+ "compactDisplay",
3144
+ "currencyDisplay",
3145
+ "currencySign",
3146
+ "notation",
3147
+ "signDisplay",
3148
+ "unit",
3149
+ "unitDisplay",
3150
+ "numberingSystem"
3151
+ ];
3152
+ function we(e, t, n) {
3153
+ var r = e.locale, i = e.formats, a = e.onError;
3154
+ n === void 0 && (n = {});
3155
+ var o = n.format, s = o && ne(i, "number", o, a) || {}, h = C(n, nr, s);
3156
+ return t(r, h);
3157
+ }
3158
+ function ir(e, t, n, r) {
3159
+ r === void 0 && (r = {});
3160
+ try {
3161
+ return we(e, t, r).format(n);
3162
+ } catch (i) {
3163
+ e.onError(new A(S.FORMAT_ERROR, "Error formatting number.", i));
3164
+ }
3165
+ return String(n);
3166
+ }
3167
+ function ar(e, t, n, r) {
3168
+ r === void 0 && (r = {});
3169
+ try {
3170
+ return we(e, t, r).formatToParts(n);
3171
+ } catch (i) {
3172
+ e.onError(new A(S.FORMAT_ERROR, "Error formatting number.", i));
3173
+ }
3174
+ return [];
3175
+ }
3176
+ function or(e) {
3177
+ var t = e ? e[Object.keys(e)[0]] : void 0;
3178
+ return typeof t == "string";
3179
+ }
3180
+ function sr(e) {
3181
+ e.onWarn && e.defaultRichTextElements && or(e.messages || {}) && e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
3182
+ Please consider using "@formatjs/cli" to pre-compile your messages for performance.
3183
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`);
3184
+ }
3185
+ function ur(e, t) {
3186
+ var n = Ut(t), r = m(m({}, Gt), e), i = r.locale, a = r.defaultLocale, o = r.onError;
3187
+ return i ? !Intl.NumberFormat.supportedLocalesOf(i).length && o ? o(new me('Missing locale data for locale: "'.concat(i, '" in Intl.NumberFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(i).length && o && o(new me('Missing locale data for locale: "'.concat(i, '" in Intl.DateTimeFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (o && o(new Ct('"locale" was not configured, using "'.concat(a, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), r.locale = r.defaultLocale || "en"), sr(r), m(m({}, r), {
3188
+ formatters: n,
3189
+ formatNumber: ir.bind(null, r, n.getNumberFormat),
3190
+ formatNumberToParts: ar.bind(null, r, n.getNumberFormat),
3191
+ formatRelativeTime: rr.bind(null, r, n.getRelativeTimeFormat),
3192
+ formatDate: Vt.bind(null, r, n.getDateTimeFormat),
3193
+ formatDateToParts: Zt.bind(null, r, n.getDateTimeFormat),
3194
+ formatTime: kt.bind(null, r, n.getDateTimeFormat),
3195
+ formatDateTimeRange: Xt.bind(null, r, n.getDateTimeFormat),
3196
+ formatTimeToParts: Wt.bind(null, r, n.getDateTimeFormat),
3197
+ formatPlural: Kt.bind(null, r, n.getPluralRules),
3198
+ // @ts-expect-error TODO: will get to this later
3199
+ formatMessage: ve.bind(null, r, n),
3200
+ // @ts-expect-error TODO: will get to this later
3201
+ $t: ve.bind(null, r, n),
3202
+ formatList: Yt.bind(null, r, n.getListFormat),
3203
+ formatListToParts: Fe.bind(null, r, n.getListFormat),
3204
+ formatDisplayName: qt.bind(null, r, n.getDisplayNames)
3205
+ });
3206
+ }
3207
+ var hr = w;
3208
+ w.flatten = w;
3209
+ w.unflatten = je;
3210
+ function Ge(e) {
3211
+ return e && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e);
3212
+ }
3213
+ function Ue(e) {
3214
+ return e;
3215
+ }
3216
+ function w(e, t) {
3217
+ t = t || {};
3218
+ const n = t.delimiter || ".", r = t.maxDepth, i = t.transformKey || Ue, a = {};
3219
+ function o(s, h, l) {
3220
+ l = l || 1, Object.keys(s).forEach(function(u) {
3221
+ const f = s[u], c = t.safe && Array.isArray(f), p = Object.prototype.toString.call(f), E = Ge(f), b = p === "[object Object]" || p === "[object Array]", x = h ? h + n + i(u) : i(u);
3222
+ if (!c && !E && b && Object.keys(f).length && (!t.maxDepth || l < r))
3223
+ return o(f, x, l + 1);
3224
+ a[x] = f;
3225
+ });
3226
+ }
3227
+ return o(e), a;
3228
+ }
3229
+ function je(e, t) {
3230
+ t = t || {};
3231
+ const n = t.delimiter || ".", r = t.overwrite || !1, i = t.transformKey || Ue, a = {};
3232
+ if (Ge(e) || Object.prototype.toString.call(e) !== "[object Object]")
3233
+ return e;
3234
+ function s(u) {
3235
+ const f = Number(u);
3236
+ return isNaN(f) || u.indexOf(".") !== -1 || t.object ? u : f;
3237
+ }
3238
+ function h(u, f, c) {
3239
+ return Object.keys(c).reduce(function(p, E) {
3240
+ return p[u + n + E] = c[E], p;
3241
+ }, f);
3242
+ }
3243
+ function l(u) {
3244
+ const f = Object.prototype.toString.call(u), c = f === "[object Array]", p = f === "[object Object]";
3245
+ if (u) {
3246
+ if (c)
3247
+ return !u.length;
3248
+ if (p)
3249
+ return !Object.keys(u).length;
3250
+ } else
3251
+ return !0;
3252
+ }
3253
+ return e = Object.keys(e).reduce(function(u, f) {
3254
+ const c = Object.prototype.toString.call(e[f]);
3255
+ return !(c === "[object Object]" || c === "[object Array]") || l(e[f]) ? (u[f] = e[f], u) : h(
3256
+ f,
3257
+ u,
3258
+ w(e[f], t)
3259
+ );
3260
+ }, {}), Object.keys(e).forEach(function(u) {
3261
+ const f = u.split(n).map(i);
3262
+ let c = s(f.shift()), p = s(f[0]), E = a;
3263
+ for (; p !== void 0; ) {
3264
+ if (c === "__proto__")
3265
+ return;
3266
+ const b = Object.prototype.toString.call(E[c]), x = b === "[object Object]" || b === "[object Array]";
3267
+ if (!r && !x && typeof E[c] < "u")
3268
+ return;
3269
+ (r && !x || !r && E[c] == null) && (E[c] = typeof p == "number" && !t.object ? [] : {}), E = E[c], f.length > 0 && (c = s(f.shift()), p = s(f[0]));
3270
+ }
3271
+ E[c] = je(e[u], t);
3272
+ }), a;
3273
+ }
3274
+ const lr = Ce();
3275
+ let Ve;
3276
+ const mr = (e, t, n = !1) => {
3277
+ const r = ur(
3278
+ {
3279
+ locale: e,
3280
+ messages: hr.flatten(t, {
3281
+ safe: !0
3282
+ // Preserve arrays
3283
+ })
3284
+ },
3285
+ lr
3286
+ ), s = {
3287
+ t: (h, l, u) => r.formatMessage({ id: h }, l, u),
3288
+ te: (h) => !!r.messages[h],
3289
+ tm: (h) => r.messages[h] || [],
3290
+ ...r,
3291
+ source: t
3292
+ };
3293
+ return n && (Ve = s), s;
3294
+ };
3295
+ function gr() {
3296
+ return Ve;
3297
+ }
3298
+ const fr = (e) => ke({
3299
+ name: "I18nT",
3300
+ props: {
3301
+ keypath: {
3302
+ type: String,
3303
+ required: !0
3304
+ },
3305
+ tag: {
3306
+ type: String,
3307
+ default: "span"
3308
+ }
3309
+ },
3310
+ setup(t, { slots: n }) {
3311
+ const r = (i) => {
3312
+ if (!i)
3313
+ return [];
3314
+ const a = /(\{[^}]+\})/g;
3315
+ return i.split(a).filter(Boolean);
3316
+ };
3317
+ return () => {
3318
+ const i = Object.keys(n).filter((s) => s !== "_"), a = e.messages[t.keypath].toString();
3319
+ let o = r(a);
3320
+ return o = o.filter((s) => s !== ""), o.forEach((s, h) => {
3321
+ if (!s.startsWith("{") && !s.endsWith("}"))
3322
+ return;
3323
+ const l = s.replace(/[\{\}]/g, "");
3324
+ l === "0" && n.default ? o[h] = n.default() : i.includes(l) && n[l] && (o[h] = n[l]());
3325
+ }), Xe(t.tag, t, o);
3326
+ };
3327
+ }
3328
+ }), pr = {
3329
+ install(e, t) {
3330
+ const { i18n: n } = t;
3331
+ e.component("I18nT", fr(n));
3332
+ }
3333
+ };
3334
+ export {
3335
+ pr as Translation,
3336
+ mr as createI18n,
3337
+ gr as useI18n
3338
+ };
3339
+ //# sourceMappingURL=i18n.es.js.map