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