@kong-ui-public/misc-widgets 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/misc-widgets.es.js +382 -368
- package/dist/misc-widgets.es.js.map +1 -1
- package/dist/misc-widgets.umd.js +10 -10
- package/dist/misc-widgets.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/github-star/GithubStar.vue.d.ts +13 -1
- package/dist/types/components/github-star/GithubStar.vue.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/misc-widgets.es.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { defineComponent as vt, h as Kt, computed as Zt, ref as Yt, onMounted as Wt, openBlock as zt, createElementBlock as qt, createVNode as Qt, unref as k, withCtx as Jt, createElementVNode as at, toDisplayString as $t, createCommentVNode as tr } from "vue";
|
|
2
|
+
import { KTooltip as rr } from "@kong/kongponents";
|
|
3
|
+
var W = function(t, r) {
|
|
4
|
+
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, e) {
|
|
4
5
|
n.__proto__ = e;
|
|
5
6
|
} || function(n, e) {
|
|
6
7
|
for (var i in e)
|
|
7
8
|
Object.prototype.hasOwnProperty.call(e, i) && (n[i] = e[i]);
|
|
8
|
-
},
|
|
9
|
+
}, W(t, r);
|
|
9
10
|
};
|
|
10
|
-
function
|
|
11
|
+
function N(t, r) {
|
|
11
12
|
if (typeof r != "function" && r !== null)
|
|
12
13
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
13
|
-
|
|
14
|
+
W(t, r);
|
|
14
15
|
function n() {
|
|
15
16
|
this.constructor = t;
|
|
16
17
|
}
|
|
@@ -26,7 +27,7 @@ var m = function() {
|
|
|
26
27
|
return t;
|
|
27
28
|
}, m.apply(this, arguments);
|
|
28
29
|
};
|
|
29
|
-
function
|
|
30
|
+
function er(t, r) {
|
|
30
31
|
var n = {};
|
|
31
32
|
for (var e in t)
|
|
32
33
|
Object.prototype.hasOwnProperty.call(t, e) && r.indexOf(e) < 0 && (n[e] = t[e]);
|
|
@@ -53,43 +54,43 @@ var D;
|
|
|
53
54
|
(function(t) {
|
|
54
55
|
t[t.number = 0] = "number", t[t.dateTime = 1] = "dateTime";
|
|
55
56
|
})(D || (D = {}));
|
|
56
|
-
function
|
|
57
|
+
function st(t) {
|
|
57
58
|
return t.type === y.literal;
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
+
function nr(t) {
|
|
60
61
|
return t.type === y.argument;
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function Tt(t) {
|
|
63
64
|
return t.type === y.number;
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function _t(t) {
|
|
66
67
|
return t.type === y.date;
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function At(t) {
|
|
69
70
|
return t.type === y.time;
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
+
function Ht(t) {
|
|
72
73
|
return t.type === y.select;
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function St(t) {
|
|
75
76
|
return t.type === y.plural;
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
+
function ir(t) {
|
|
78
79
|
return t.type === y.pound;
|
|
79
80
|
}
|
|
80
|
-
function
|
|
81
|
+
function Bt(t) {
|
|
81
82
|
return t.type === y.tag;
|
|
82
83
|
}
|
|
83
|
-
function
|
|
84
|
+
function Nt(t) {
|
|
84
85
|
return !!(t && typeof t == "object" && t.type === D.number);
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
+
function z(t) {
|
|
87
88
|
return !!(t && typeof t == "object" && t.type === D.dateTime);
|
|
88
89
|
}
|
|
89
|
-
var
|
|
90
|
-
function
|
|
90
|
+
var It = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, or = /(?:[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;
|
|
91
|
+
function ar(t) {
|
|
91
92
|
var r = {};
|
|
92
|
-
return t.replace(
|
|
93
|
+
return t.replace(or, function(n) {
|
|
93
94
|
var e = n.length;
|
|
94
95
|
switch (n[0]) {
|
|
95
96
|
case "G":
|
|
@@ -178,11 +179,11 @@ function er(t) {
|
|
|
178
179
|
return "";
|
|
179
180
|
}), r;
|
|
180
181
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
182
|
+
var sr = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
183
|
+
function hr(t) {
|
|
183
184
|
if (t.length === 0)
|
|
184
185
|
throw new Error("Number skeleton cannot be empty");
|
|
185
|
-
for (var r = t.split(
|
|
186
|
+
for (var r = t.split(sr).filter(function(f) {
|
|
186
187
|
return f.length > 0;
|
|
187
188
|
}), n = [], e = 0, i = r; e < i.length; e++) {
|
|
188
189
|
var o = i[e], a = o.split("/");
|
|
@@ -197,17 +198,17 @@ function ir(t) {
|
|
|
197
198
|
}
|
|
198
199
|
return n;
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
+
function ur(t) {
|
|
201
202
|
return t.replace(/^(.*?)-/, "");
|
|
202
203
|
}
|
|
203
|
-
var
|
|
204
|
-
function
|
|
204
|
+
var ht = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Rt = /^(@+)?(\+|#+)?[rs]?$/g, cr = /(\*)(0+)|(#+)(0+)|(0+)/g, Lt = /^(0+)$/;
|
|
205
|
+
function ut(t) {
|
|
205
206
|
var r = {};
|
|
206
|
-
return t[t.length - 1] === "r" ? r.roundingPriority = "morePrecision" : t[t.length - 1] === "s" && (r.roundingPriority = "lessPrecision"), t.replace(
|
|
207
|
+
return t[t.length - 1] === "r" ? r.roundingPriority = "morePrecision" : t[t.length - 1] === "s" && (r.roundingPriority = "lessPrecision"), t.replace(Rt, function(n, e, i) {
|
|
207
208
|
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
209
|
}), r;
|
|
209
210
|
}
|
|
210
|
-
function
|
|
211
|
+
function Pt(t) {
|
|
211
212
|
switch (t) {
|
|
212
213
|
case "sign-auto":
|
|
213
214
|
return {
|
|
@@ -247,7 +248,7 @@ function Rt(t) {
|
|
|
247
248
|
};
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
+
function lr(t) {
|
|
251
252
|
var r;
|
|
252
253
|
if (t[0] === "E" && t[1] === "E" ? (r = {
|
|
253
254
|
notation: "engineering"
|
|
@@ -255,17 +256,17 @@ function sr(t) {
|
|
|
255
256
|
notation: "scientific"
|
|
256
257
|
}, t = t.slice(1)), r) {
|
|
257
258
|
var n = t.slice(0, 2);
|
|
258
|
-
if (n === "+!" ? (r.signDisplay = "always", t = t.slice(2)) : n === "+?" && (r.signDisplay = "exceptZero", t = t.slice(2)), !
|
|
259
|
+
if (n === "+!" ? (r.signDisplay = "always", t = t.slice(2)) : n === "+?" && (r.signDisplay = "exceptZero", t = t.slice(2)), !Lt.test(t))
|
|
259
260
|
throw new Error("Malformed concise eng/scientific notation");
|
|
260
261
|
r.minimumIntegerDigits = t.length;
|
|
261
262
|
}
|
|
262
263
|
return r;
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
-
var r = {}, n =
|
|
265
|
+
function ct(t) {
|
|
266
|
+
var r = {}, n = Pt(t);
|
|
266
267
|
return n || r;
|
|
267
268
|
}
|
|
268
|
-
function
|
|
269
|
+
function fr(t) {
|
|
269
270
|
for (var r = {}, n = 0, e = t; n < e.length; n++) {
|
|
270
271
|
var i = e[n];
|
|
271
272
|
switch (i.stem) {
|
|
@@ -289,7 +290,7 @@ function hr(t) {
|
|
|
289
290
|
continue;
|
|
290
291
|
case "measure-unit":
|
|
291
292
|
case "unit":
|
|
292
|
-
r.style = "unit", r.unit =
|
|
293
|
+
r.style = "unit", r.unit = ur(i.options[0]);
|
|
293
294
|
continue;
|
|
294
295
|
case "compact-short":
|
|
295
296
|
case "K":
|
|
@@ -301,12 +302,12 @@ function hr(t) {
|
|
|
301
302
|
continue;
|
|
302
303
|
case "scientific":
|
|
303
304
|
r = m(m(m({}, r), { notation: "scientific" }), i.options.reduce(function(c, u) {
|
|
304
|
-
return m(m({}, c),
|
|
305
|
+
return m(m({}, c), ct(u));
|
|
305
306
|
}, {}));
|
|
306
307
|
continue;
|
|
307
308
|
case "engineering":
|
|
308
309
|
r = m(m(m({}, r), { notation: "engineering" }), i.options.reduce(function(c, u) {
|
|
309
|
-
return m(m({}, c),
|
|
310
|
+
return m(m({}, c), ct(u));
|
|
310
311
|
}, {}));
|
|
311
312
|
continue;
|
|
312
313
|
case "notation-simple":
|
|
@@ -330,7 +331,7 @@ function hr(t) {
|
|
|
330
331
|
case "integer-width":
|
|
331
332
|
if (i.options.length > 1)
|
|
332
333
|
throw new RangeError("integer-width stems only accept a single optional option");
|
|
333
|
-
i.options[0].replace(
|
|
334
|
+
i.options[0].replace(cr, function(c, u, h, l, f, p) {
|
|
334
335
|
if (u)
|
|
335
336
|
r.minimumIntegerDigits = h.length;
|
|
336
337
|
else {
|
|
@@ -343,32 +344,32 @@ function hr(t) {
|
|
|
343
344
|
});
|
|
344
345
|
continue;
|
|
345
346
|
}
|
|
346
|
-
if (
|
|
347
|
+
if (Lt.test(i.stem)) {
|
|
347
348
|
r.minimumIntegerDigits = i.stem.length;
|
|
348
349
|
continue;
|
|
349
350
|
}
|
|
350
|
-
if (
|
|
351
|
+
if (ht.test(i.stem)) {
|
|
351
352
|
if (i.options.length > 1)
|
|
352
353
|
throw new RangeError("Fraction-precision stems only accept a single optional option");
|
|
353
|
-
i.stem.replace(
|
|
354
|
+
i.stem.replace(ht, function(c, u, h, l, f, p) {
|
|
354
355
|
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
|
});
|
|
356
357
|
var o = i.options[0];
|
|
357
|
-
o === "w" ? r = m(m({}, r), { trailingZeroDisplay: "stripIfInteger" }) : o && (r = m(m({}, r),
|
|
358
|
+
o === "w" ? r = m(m({}, r), { trailingZeroDisplay: "stripIfInteger" }) : o && (r = m(m({}, r), ut(o)));
|
|
358
359
|
continue;
|
|
359
360
|
}
|
|
360
|
-
if (
|
|
361
|
-
r = m(m({}, r),
|
|
361
|
+
if (Rt.test(i.stem)) {
|
|
362
|
+
r = m(m({}, r), ut(i.stem));
|
|
362
363
|
continue;
|
|
363
364
|
}
|
|
364
|
-
var a =
|
|
365
|
+
var a = Pt(i.stem);
|
|
365
366
|
a && (r = m(m({}, r), a));
|
|
366
|
-
var s =
|
|
367
|
+
var s = lr(i.stem);
|
|
367
368
|
s && (r = m(m({}, r), s));
|
|
368
369
|
}
|
|
369
370
|
return r;
|
|
370
371
|
}
|
|
371
|
-
var
|
|
372
|
+
var j = {
|
|
372
373
|
AX: [
|
|
373
374
|
"H"
|
|
374
375
|
],
|
|
@@ -1705,13 +1706,13 @@ var k = {
|
|
|
1705
1706
|
"h"
|
|
1706
1707
|
]
|
|
1707
1708
|
};
|
|
1708
|
-
function
|
|
1709
|
+
function mr(t, r) {
|
|
1709
1710
|
for (var n = "", e = 0; e < t.length; e++) {
|
|
1710
1711
|
var i = t.charAt(e);
|
|
1711
1712
|
if (i === "j") {
|
|
1712
1713
|
for (var o = 0; e + 1 < t.length && t.charAt(e + 1) === i; )
|
|
1713
1714
|
o++, e++;
|
|
1714
|
-
var a = 1 + (o & 1), s = o < 2 ? 1 : 3 + (o >> 1), c = "a", u =
|
|
1715
|
+
var a = 1 + (o & 1), s = o < 2 ? 1 : 3 + (o >> 1), c = "a", u = pr(r);
|
|
1715
1716
|
for ((u == "H" || u == "k") && (s = 0); s-- > 0; )
|
|
1716
1717
|
n += c;
|
|
1717
1718
|
for (; a-- > 0; )
|
|
@@ -1721,7 +1722,7 @@ function ur(t, r) {
|
|
|
1721
1722
|
}
|
|
1722
1723
|
return n;
|
|
1723
1724
|
}
|
|
1724
|
-
function
|
|
1725
|
+
function pr(t) {
|
|
1725
1726
|
var r = t.hourCycle;
|
|
1726
1727
|
if (r === void 0 && // @ts-ignore hourCycle(s) is not identified yet
|
|
1727
1728
|
t.hourCycles && // @ts-ignore
|
|
@@ -1740,23 +1741,23 @@ function cr(t) {
|
|
|
1740
1741
|
}
|
|
1741
1742
|
var n = t.language, e;
|
|
1742
1743
|
n !== "root" && (e = t.maximize().region);
|
|
1743
|
-
var i =
|
|
1744
|
+
var i = j[e || ""] || j[n || ""] || j["".concat(n, "-001")] || j["001"];
|
|
1744
1745
|
return i[0];
|
|
1745
1746
|
}
|
|
1746
|
-
var
|
|
1747
|
+
var K, gr = new RegExp("^".concat(It.source, "*")), Er = new RegExp("".concat(It.source, "*$"));
|
|
1747
1748
|
function E(t, r) {
|
|
1748
1749
|
return { start: t, end: r };
|
|
1749
1750
|
}
|
|
1750
|
-
var
|
|
1751
|
+
var br = !!String.prototype.startsWith, yr = !!String.fromCodePoint, dr = !!Object.fromEntries, vr = !!String.prototype.codePointAt, Tr = !!String.prototype.trimStart, _r = !!String.prototype.trimEnd, Ar = !!Number.isSafeInteger, Hr = Ar ? Number.isSafeInteger : function(t) {
|
|
1751
1752
|
return typeof t == "number" && isFinite(t) && Math.floor(t) === t && Math.abs(t) <= 9007199254740991;
|
|
1752
|
-
},
|
|
1753
|
+
}, q = !0;
|
|
1753
1754
|
try {
|
|
1754
|
-
var
|
|
1755
|
-
|
|
1755
|
+
var Sr = Mt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1756
|
+
q = ((K = Sr.exec("a")) === null || K === void 0 ? void 0 : K[0]) === "a";
|
|
1756
1757
|
} catch {
|
|
1757
|
-
|
|
1758
|
+
q = !1;
|
|
1758
1759
|
}
|
|
1759
|
-
var
|
|
1760
|
+
var lt = br ? (
|
|
1760
1761
|
// Native
|
|
1761
1762
|
function(t, r, n) {
|
|
1762
1763
|
return t.startsWith(r, n);
|
|
@@ -1766,7 +1767,7 @@ var ut = mr ? (
|
|
|
1766
1767
|
function(t, r, n) {
|
|
1767
1768
|
return t.slice(n, n + r.length) === r;
|
|
1768
1769
|
}
|
|
1769
|
-
),
|
|
1770
|
+
), Q = yr ? String.fromCodePoint : (
|
|
1770
1771
|
// IE11
|
|
1771
1772
|
function() {
|
|
1772
1773
|
for (var t = [], r = 0; r < arguments.length; r++)
|
|
@@ -1778,9 +1779,9 @@ var ut = mr ? (
|
|
|
1778
1779
|
}
|
|
1779
1780
|
return n;
|
|
1780
1781
|
}
|
|
1781
|
-
),
|
|
1782
|
+
), ft = (
|
|
1782
1783
|
// native
|
|
1783
|
-
|
|
1784
|
+
dr ? Object.fromEntries : (
|
|
1784
1785
|
// Ponyfill
|
|
1785
1786
|
function(t) {
|
|
1786
1787
|
for (var r = {}, n = 0, e = t; n < e.length; n++) {
|
|
@@ -1790,7 +1791,7 @@ var ut = mr ? (
|
|
|
1790
1791
|
return r;
|
|
1791
1792
|
}
|
|
1792
1793
|
)
|
|
1793
|
-
),
|
|
1794
|
+
), Ot = vr ? (
|
|
1794
1795
|
// Native
|
|
1795
1796
|
function(t, r) {
|
|
1796
1797
|
return t.codePointAt(r);
|
|
@@ -1804,7 +1805,7 @@ var ut = mr ? (
|
|
|
1804
1805
|
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
|
}
|
|
1806
1807
|
}
|
|
1807
|
-
),
|
|
1808
|
+
), Br = Tr ? (
|
|
1808
1809
|
// Native
|
|
1809
1810
|
function(t) {
|
|
1810
1811
|
return t.trimStart();
|
|
@@ -1812,9 +1813,9 @@ var ut = mr ? (
|
|
|
1812
1813
|
) : (
|
|
1813
1814
|
// Ponyfill
|
|
1814
1815
|
function(t) {
|
|
1815
|
-
return t.replace(
|
|
1816
|
+
return t.replace(gr, "");
|
|
1816
1817
|
}
|
|
1817
|
-
),
|
|
1818
|
+
), Nr = _r ? (
|
|
1818
1819
|
// Native
|
|
1819
1820
|
function(t) {
|
|
1820
1821
|
return t.trimEnd();
|
|
@@ -1822,32 +1823,32 @@ var ut = mr ? (
|
|
|
1822
1823
|
) : (
|
|
1823
1824
|
// Ponyfill
|
|
1824
1825
|
function(t) {
|
|
1825
|
-
return t.replace(
|
|
1826
|
+
return t.replace(Er, "");
|
|
1826
1827
|
}
|
|
1827
1828
|
);
|
|
1828
|
-
function
|
|
1829
|
+
function Mt(t, r) {
|
|
1829
1830
|
return new RegExp(t, r);
|
|
1830
1831
|
}
|
|
1831
|
-
var
|
|
1832
|
-
if (
|
|
1833
|
-
var
|
|
1834
|
-
|
|
1832
|
+
var J;
|
|
1833
|
+
if (q) {
|
|
1834
|
+
var mt = Mt("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1835
|
+
J = function(t, r) {
|
|
1835
1836
|
var n;
|
|
1836
|
-
|
|
1837
|
-
var e =
|
|
1837
|
+
mt.lastIndex = r;
|
|
1838
|
+
var e = mt.exec(t);
|
|
1838
1839
|
return (n = e[1]) !== null && n !== void 0 ? n : "";
|
|
1839
1840
|
};
|
|
1840
1841
|
} else
|
|
1841
|
-
|
|
1842
|
+
J = function(t, r) {
|
|
1842
1843
|
for (var n = []; ; ) {
|
|
1843
|
-
var e =
|
|
1844
|
-
if (e === void 0 ||
|
|
1844
|
+
var e = Ot(t, r);
|
|
1845
|
+
if (e === void 0 || Ct(e) || Pr(e))
|
|
1845
1846
|
break;
|
|
1846
1847
|
n.push(e), r += e >= 65536 ? 2 : 1;
|
|
1847
1848
|
}
|
|
1848
|
-
return
|
|
1849
|
+
return Q.apply(void 0, n);
|
|
1849
1850
|
};
|
|
1850
|
-
var
|
|
1851
|
+
var Ir = (
|
|
1851
1852
|
/** @class */
|
|
1852
1853
|
function() {
|
|
1853
1854
|
function t(r, n) {
|
|
@@ -1878,7 +1879,7 @@ var Hr = (
|
|
|
1878
1879
|
if (e)
|
|
1879
1880
|
break;
|
|
1880
1881
|
return this.error(g.UNMATCHED_CLOSING_TAG, E(this.clonePosition(), this.clonePosition()));
|
|
1881
|
-
} else if (o === 60 && !this.ignoreTag &&
|
|
1882
|
+
} else if (o === 60 && !this.ignoreTag && $(this.peek() || 0)) {
|
|
1882
1883
|
var a = this.parseTag(r, n);
|
|
1883
1884
|
if (a.err)
|
|
1884
1885
|
return a;
|
|
@@ -1911,7 +1912,7 @@ var Hr = (
|
|
|
1911
1912
|
return o;
|
|
1912
1913
|
var a = o.val, s = this.clonePosition();
|
|
1913
1914
|
if (this.bumpIf("</")) {
|
|
1914
|
-
if (this.isEOF() ||
|
|
1915
|
+
if (this.isEOF() || !$(this.char()))
|
|
1915
1916
|
return this.error(g.INVALID_TAG, E(s, this.clonePosition()));
|
|
1916
1917
|
var c = this.clonePosition(), u = this.parseTagName();
|
|
1917
1918
|
return i !== u ? this.error(g.UNMATCHED_CLOSING_TAG, E(c, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
|
|
@@ -1929,7 +1930,7 @@ var Hr = (
|
|
|
1929
1930
|
return this.error(g.INVALID_TAG, E(e, this.clonePosition()));
|
|
1930
1931
|
}, t.prototype.parseTagName = function() {
|
|
1931
1932
|
var r = this.offset();
|
|
1932
|
-
for (this.bump(); !this.isEOF() &&
|
|
1933
|
+
for (this.bump(); !this.isEOF() && Lr(this.char()); )
|
|
1933
1934
|
this.bump();
|
|
1934
1935
|
return this.message.slice(r, this.offset());
|
|
1935
1936
|
}, t.prototype.parseLiteral = function(r, n) {
|
|
@@ -1958,7 +1959,7 @@ var Hr = (
|
|
|
1958
1959
|
};
|
|
1959
1960
|
}, t.prototype.tryParseLeftAngleBracket = function() {
|
|
1960
1961
|
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
|
|
1961
|
-
!
|
|
1962
|
+
!Rr(this.peek() || 0)) ? (this.bump(), "<") : null;
|
|
1962
1963
|
}, t.prototype.tryParseQuote = function(r) {
|
|
1963
1964
|
if (this.isEOF() || this.char() !== 39)
|
|
1964
1965
|
return null;
|
|
@@ -1992,12 +1993,12 @@ var Hr = (
|
|
|
1992
1993
|
n.push(e);
|
|
1993
1994
|
this.bump();
|
|
1994
1995
|
}
|
|
1995
|
-
return
|
|
1996
|
+
return Q.apply(void 0, n);
|
|
1996
1997
|
}, t.prototype.tryParseUnquoted = function(r, n) {
|
|
1997
1998
|
if (this.isEOF())
|
|
1998
1999
|
return null;
|
|
1999
2000
|
var e = this.char();
|
|
2000
|
-
return e === 60 || e === 123 || e === 35 && (n === "plural" || n === "selectordinal") || e === 125 && r > 0 ? null : (this.bump(),
|
|
2001
|
+
return e === 60 || e === 123 || e === 35 && (n === "plural" || n === "selectordinal") || e === 125 && r > 0 ? null : (this.bump(), Q(e));
|
|
2001
2002
|
}, t.prototype.parseArgument = function(r, n) {
|
|
2002
2003
|
var e = this.clonePosition();
|
|
2003
2004
|
if (this.bump(), this.bumpSpace(), this.isEOF())
|
|
@@ -2026,7 +2027,7 @@ var Hr = (
|
|
|
2026
2027
|
return this.error(g.MALFORMED_ARGUMENT, E(e, this.clonePosition()));
|
|
2027
2028
|
}
|
|
2028
2029
|
}, t.prototype.parseIdentifierIfPossible = function() {
|
|
2029
|
-
var r = this.clonePosition(), n = this.offset(), e =
|
|
2030
|
+
var r = this.clonePosition(), n = this.offset(), e = J(this.message, n), i = n + e.length;
|
|
2030
2031
|
this.bumpTo(i);
|
|
2031
2032
|
var o = this.clonePosition(), a = E(r, o);
|
|
2032
2033
|
return { value: e, location: a };
|
|
@@ -2045,34 +2046,34 @@ var Hr = (
|
|
|
2045
2046
|
var h = this.clonePosition(), l = this.parseSimpleArgStyleIfPossible();
|
|
2046
2047
|
if (l.err)
|
|
2047
2048
|
return l;
|
|
2048
|
-
var f =
|
|
2049
|
+
var f = Nr(l.val);
|
|
2049
2050
|
if (f.length === 0)
|
|
2050
2051
|
return this.error(g.EXPECT_ARGUMENT_STYLE, E(this.clonePosition(), this.clonePosition()));
|
|
2051
2052
|
var p = E(h, this.clonePosition());
|
|
2052
2053
|
u = { style: f, styleLocation: p };
|
|
2053
2054
|
}
|
|
2054
|
-
var
|
|
2055
|
-
if (
|
|
2056
|
-
return
|
|
2055
|
+
var d = this.tryParseArgumentClose(i);
|
|
2056
|
+
if (d.err)
|
|
2057
|
+
return d;
|
|
2057
2058
|
var b = E(i, this.clonePosition());
|
|
2058
|
-
if (u &&
|
|
2059
|
-
var
|
|
2059
|
+
if (u && lt(u == null ? void 0 : u.style, "::", 0)) {
|
|
2060
|
+
var v = Br(u.style.slice(2));
|
|
2060
2061
|
if (s === "number") {
|
|
2061
|
-
var l = this.parseNumberSkeletonFromString(
|
|
2062
|
+
var l = this.parseNumberSkeletonFromString(v, u.styleLocation);
|
|
2062
2063
|
return l.err ? l : {
|
|
2063
2064
|
val: { type: y.number, value: e, location: b, style: l.val },
|
|
2064
2065
|
err: null
|
|
2065
2066
|
};
|
|
2066
2067
|
} else {
|
|
2067
|
-
if (
|
|
2068
|
+
if (v.length === 0)
|
|
2068
2069
|
return this.error(g.EXPECT_DATE_TIME_SKELETON, b);
|
|
2069
|
-
var T =
|
|
2070
|
-
this.locale && (T =
|
|
2070
|
+
var T = v;
|
|
2071
|
+
this.locale && (T = mr(v, this.locale));
|
|
2071
2072
|
var f = {
|
|
2072
2073
|
type: D.dateTime,
|
|
2073
2074
|
pattern: T,
|
|
2074
2075
|
location: u.styleLocation,
|
|
2075
|
-
parsedOptions: this.shouldParseSkeletons ?
|
|
2076
|
+
parsedOptions: this.shouldParseSkeletons ? ar(T) : {}
|
|
2076
2077
|
}, B = s === "date" ? y.date : y.time;
|
|
2077
2078
|
return {
|
|
2078
2079
|
val: { type: B, value: e, location: b, style: f },
|
|
@@ -2107,29 +2108,29 @@ var Hr = (
|
|
|
2107
2108
|
return l;
|
|
2108
2109
|
this.bumpSpace(), U = this.parseIdentifierIfPossible(), M = l.val;
|
|
2109
2110
|
}
|
|
2110
|
-
var
|
|
2111
|
-
if (
|
|
2112
|
-
return
|
|
2113
|
-
var
|
|
2114
|
-
if (
|
|
2115
|
-
return
|
|
2116
|
-
var
|
|
2111
|
+
var F = this.tryParsePluralOrSelectOptions(r, s, n, U);
|
|
2112
|
+
if (F.err)
|
|
2113
|
+
return F;
|
|
2114
|
+
var d = this.tryParseArgumentClose(i);
|
|
2115
|
+
if (d.err)
|
|
2116
|
+
return d;
|
|
2117
|
+
var ot = E(i, this.clonePosition());
|
|
2117
2118
|
return s === "select" ? {
|
|
2118
2119
|
val: {
|
|
2119
2120
|
type: y.select,
|
|
2120
2121
|
value: e,
|
|
2121
|
-
options:
|
|
2122
|
-
location:
|
|
2122
|
+
options: ft(F.val),
|
|
2123
|
+
location: ot
|
|
2123
2124
|
},
|
|
2124
2125
|
err: null
|
|
2125
2126
|
} : {
|
|
2126
2127
|
val: {
|
|
2127
2128
|
type: y.plural,
|
|
2128
2129
|
value: e,
|
|
2129
|
-
options:
|
|
2130
|
+
options: ft(F.val),
|
|
2130
2131
|
offset: M,
|
|
2131
2132
|
pluralType: s === "plural" ? "cardinal" : "ordinal",
|
|
2132
|
-
location:
|
|
2133
|
+
location: ot
|
|
2133
2134
|
},
|
|
2134
2135
|
err: null
|
|
2135
2136
|
};
|
|
@@ -2177,7 +2178,7 @@ var Hr = (
|
|
|
2177
2178
|
}, t.prototype.parseNumberSkeletonFromString = function(r, n) {
|
|
2178
2179
|
var e = [];
|
|
2179
2180
|
try {
|
|
2180
|
-
e =
|
|
2181
|
+
e = hr(r);
|
|
2181
2182
|
} catch {
|
|
2182
2183
|
return this.error(g.INVALID_NUMBER_SKELETON, n);
|
|
2183
2184
|
}
|
|
@@ -2186,7 +2187,7 @@ var Hr = (
|
|
|
2186
2187
|
type: D.number,
|
|
2187
2188
|
tokens: e,
|
|
2188
2189
|
location: n,
|
|
2189
|
-
parsedOptions: this.shouldParseSkeletons ?
|
|
2190
|
+
parsedOptions: this.shouldParseSkeletons ? fr(e) : {}
|
|
2190
2191
|
},
|
|
2191
2192
|
err: null
|
|
2192
2193
|
};
|
|
@@ -2208,16 +2209,16 @@ var Hr = (
|
|
|
2208
2209
|
var p = this.clonePosition();
|
|
2209
2210
|
if (!this.bumpIf("{"))
|
|
2210
2211
|
return this.error(n === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, E(this.clonePosition(), this.clonePosition()));
|
|
2211
|
-
var
|
|
2212
|
-
if (
|
|
2213
|
-
return
|
|
2212
|
+
var d = this.parseMessage(r + 1, n, e);
|
|
2213
|
+
if (d.err)
|
|
2214
|
+
return d;
|
|
2214
2215
|
var b = this.tryParseArgumentClose(p);
|
|
2215
2216
|
if (b.err)
|
|
2216
2217
|
return b;
|
|
2217
2218
|
s.push([
|
|
2218
2219
|
u,
|
|
2219
2220
|
{
|
|
2220
|
-
value:
|
|
2221
|
+
value: d.val,
|
|
2221
2222
|
location: E(p, this.clonePosition())
|
|
2222
2223
|
}
|
|
2223
2224
|
]), c.add(u), this.bumpSpace(), o = this.parseIdentifierIfPossible(), u = o.value, h = o.location;
|
|
@@ -2234,7 +2235,7 @@ var Hr = (
|
|
|
2234
2235
|
break;
|
|
2235
2236
|
}
|
|
2236
2237
|
var c = E(i, this.clonePosition());
|
|
2237
|
-
return o ? (a *= e,
|
|
2238
|
+
return o ? (a *= e, Hr(a) ? { val: a, err: null } : this.error(n, c)) : this.error(r, c);
|
|
2238
2239
|
}, t.prototype.offset = function() {
|
|
2239
2240
|
return this.position.offset;
|
|
2240
2241
|
}, t.prototype.isEOF = function() {
|
|
@@ -2249,7 +2250,7 @@ var Hr = (
|
|
|
2249
2250
|
var r = this.position.offset;
|
|
2250
2251
|
if (r >= this.message.length)
|
|
2251
2252
|
throw Error("out of bound");
|
|
2252
|
-
var n =
|
|
2253
|
+
var n = Ot(this.message, r);
|
|
2253
2254
|
if (n === void 0)
|
|
2254
2255
|
throw Error("Offset ".concat(r, " is at invalid UTF-16 code unit boundary"));
|
|
2255
2256
|
return n;
|
|
@@ -2268,7 +2269,7 @@ var Hr = (
|
|
|
2268
2269
|
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
|
}
|
|
2270
2271
|
}, t.prototype.bumpIf = function(r) {
|
|
2271
|
-
if (
|
|
2272
|
+
if (lt(this.message, r, this.offset())) {
|
|
2272
2273
|
for (var n = 0; n < r.length; n++)
|
|
2273
2274
|
this.bump();
|
|
2274
2275
|
return !0;
|
|
@@ -2290,7 +2291,7 @@ var Hr = (
|
|
|
2290
2291
|
break;
|
|
2291
2292
|
}
|
|
2292
2293
|
}, t.prototype.bumpSpace = function() {
|
|
2293
|
-
for (; !this.isEOF() &&
|
|
2294
|
+
for (; !this.isEOF() && Ct(this.char()); )
|
|
2294
2295
|
this.bump();
|
|
2295
2296
|
}, t.prototype.peek = function() {
|
|
2296
2297
|
if (this.isEOF())
|
|
@@ -2300,89 +2301,89 @@ var Hr = (
|
|
|
2300
2301
|
}, t;
|
|
2301
2302
|
}()
|
|
2302
2303
|
);
|
|
2303
|
-
function
|
|
2304
|
+
function $(t) {
|
|
2304
2305
|
return t >= 97 && t <= 122 || t >= 65 && t <= 90;
|
|
2305
2306
|
}
|
|
2306
|
-
function
|
|
2307
|
-
return
|
|
2307
|
+
function Rr(t) {
|
|
2308
|
+
return $(t) || t === 47;
|
|
2308
2309
|
}
|
|
2309
|
-
function
|
|
2310
|
+
function Lr(t) {
|
|
2310
2311
|
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
|
}
|
|
2312
|
-
function
|
|
2313
|
+
function Ct(t) {
|
|
2313
2314
|
return t >= 9 && t <= 13 || t === 32 || t === 133 || t >= 8206 && t <= 8207 || t === 8232 || t === 8233;
|
|
2314
2315
|
}
|
|
2315
|
-
function
|
|
2316
|
+
function Pr(t) {
|
|
2316
2317
|
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
|
}
|
|
2318
|
-
function
|
|
2319
|
+
function tt(t) {
|
|
2319
2320
|
t.forEach(function(r) {
|
|
2320
|
-
if (delete r.location,
|
|
2321
|
+
if (delete r.location, Ht(r) || St(r))
|
|
2321
2322
|
for (var n in r.options)
|
|
2322
|
-
delete r.options[n].location,
|
|
2323
|
+
delete r.options[n].location, tt(r.options[n].value);
|
|
2323
2324
|
else
|
|
2324
|
-
|
|
2325
|
+
Tt(r) && Nt(r.style) || (_t(r) || At(r)) && z(r.style) ? delete r.style.location : Bt(r) && tt(r.children);
|
|
2325
2326
|
});
|
|
2326
2327
|
}
|
|
2327
|
-
function
|
|
2328
|
+
function Or(t, r) {
|
|
2328
2329
|
r === void 0 && (r = {}), r = m({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, r);
|
|
2329
|
-
var n = new
|
|
2330
|
+
var n = new Ir(t, r).parse();
|
|
2330
2331
|
if (n.err) {
|
|
2331
2332
|
var e = SyntaxError(g[n.err.kind]);
|
|
2332
2333
|
throw e.location = n.err.location, e.originalMessage = n.err.message, e;
|
|
2333
2334
|
}
|
|
2334
|
-
return r != null && r.captureLocation ||
|
|
2335
|
+
return r != null && r.captureLocation || tt(n.val), n.val;
|
|
2335
2336
|
}
|
|
2336
|
-
function
|
|
2337
|
-
var n = r && r.cache ? r.cache :
|
|
2337
|
+
function I(t, r) {
|
|
2338
|
+
var n = r && r.cache ? r.cache : Gr, e = r && r.serializer ? r.serializer : Ur, i = r && r.strategy ? r.strategy : Cr;
|
|
2338
2339
|
return i(t, {
|
|
2339
2340
|
cache: n,
|
|
2340
2341
|
serializer: e
|
|
2341
2342
|
});
|
|
2342
2343
|
}
|
|
2343
|
-
function
|
|
2344
|
+
function Mr(t) {
|
|
2344
2345
|
return t == null || typeof t == "number" || typeof t == "boolean";
|
|
2345
2346
|
}
|
|
2346
|
-
function
|
|
2347
|
-
var i =
|
|
2347
|
+
function wt(t, r, n, e) {
|
|
2348
|
+
var i = Mr(e) ? e : n(e), o = r.get(i);
|
|
2348
2349
|
return typeof o > "u" && (o = t.call(this, e), r.set(i, o)), o;
|
|
2349
2350
|
}
|
|
2350
|
-
function
|
|
2351
|
+
function Dt(t, r, n) {
|
|
2351
2352
|
var e = Array.prototype.slice.call(arguments, 3), i = n(e), o = r.get(i);
|
|
2352
2353
|
return typeof o > "u" && (o = t.apply(this, e), r.set(i, o)), o;
|
|
2353
2354
|
}
|
|
2354
|
-
function
|
|
2355
|
+
function rt(t, r, n, e, i) {
|
|
2355
2356
|
return n.bind(r, t, e, i);
|
|
2356
2357
|
}
|
|
2357
|
-
function
|
|
2358
|
-
var n = t.length === 1 ?
|
|
2359
|
-
return
|
|
2358
|
+
function Cr(t, r) {
|
|
2359
|
+
var n = t.length === 1 ? wt : Dt;
|
|
2360
|
+
return rt(t, this, n, r.cache.create(), r.serializer);
|
|
2360
2361
|
}
|
|
2361
|
-
function
|
|
2362
|
-
return
|
|
2362
|
+
function wr(t, r) {
|
|
2363
|
+
return rt(t, this, Dt, r.cache.create(), r.serializer);
|
|
2363
2364
|
}
|
|
2364
|
-
function
|
|
2365
|
-
return
|
|
2365
|
+
function Dr(t, r) {
|
|
2366
|
+
return rt(t, this, wt, r.cache.create(), r.serializer);
|
|
2366
2367
|
}
|
|
2367
|
-
var
|
|
2368
|
+
var Ur = function() {
|
|
2368
2369
|
return JSON.stringify(arguments);
|
|
2369
2370
|
};
|
|
2370
|
-
function
|
|
2371
|
+
function et() {
|
|
2371
2372
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2372
2373
|
}
|
|
2373
|
-
|
|
2374
|
+
et.prototype.get = function(t) {
|
|
2374
2375
|
return this.cache[t];
|
|
2375
2376
|
};
|
|
2376
|
-
|
|
2377
|
+
et.prototype.set = function(t, r) {
|
|
2377
2378
|
this.cache[t] = r;
|
|
2378
2379
|
};
|
|
2379
|
-
var
|
|
2380
|
+
var Gr = {
|
|
2380
2381
|
create: function() {
|
|
2381
|
-
return new
|
|
2382
|
+
return new et();
|
|
2382
2383
|
}
|
|
2383
2384
|
}, R = {
|
|
2384
|
-
variadic:
|
|
2385
|
-
monadic:
|
|
2385
|
+
variadic: wr,
|
|
2386
|
+
monadic: Dr
|
|
2386
2387
|
}, L;
|
|
2387
2388
|
(function(t) {
|
|
2388
2389
|
t.MISSING_VALUE = "MISSING_VALUE", t.INVALID_VALUE = "INVALID_VALUE", t.MISSING_INTL_API = "MISSING_INTL_API";
|
|
@@ -2390,7 +2391,7 @@ var Cr = {
|
|
|
2390
2391
|
var O = (
|
|
2391
2392
|
/** @class */
|
|
2392
2393
|
function(t) {
|
|
2393
|
-
|
|
2394
|
+
N(r, t);
|
|
2394
2395
|
function r(n, e, i) {
|
|
2395
2396
|
var o = t.call(this, n) || this;
|
|
2396
2397
|
return o.code = e, o.originalMessage = i, o;
|
|
@@ -2399,28 +2400,28 @@ var O = (
|
|
|
2399
2400
|
return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
|
|
2400
2401
|
}, r;
|
|
2401
2402
|
}(Error)
|
|
2402
|
-
),
|
|
2403
|
+
), pt = (
|
|
2403
2404
|
/** @class */
|
|
2404
2405
|
function(t) {
|
|
2405
|
-
|
|
2406
|
+
N(r, t);
|
|
2406
2407
|
function r(n, e, i, o) {
|
|
2407
2408
|
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
|
}
|
|
2409
2410
|
return r;
|
|
2410
2411
|
}(O)
|
|
2411
|
-
),
|
|
2412
|
+
), Fr = (
|
|
2412
2413
|
/** @class */
|
|
2413
2414
|
function(t) {
|
|
2414
|
-
|
|
2415
|
+
N(r, t);
|
|
2415
2416
|
function r(n, e, i) {
|
|
2416
2417
|
return t.call(this, 'Value for "'.concat(n, '" must be of type ').concat(e), L.INVALID_VALUE, i) || this;
|
|
2417
2418
|
}
|
|
2418
2419
|
return r;
|
|
2419
2420
|
}(O)
|
|
2420
|
-
),
|
|
2421
|
+
), kr = (
|
|
2421
2422
|
/** @class */
|
|
2422
2423
|
function(t) {
|
|
2423
|
-
|
|
2424
|
+
N(r, t);
|
|
2424
2425
|
function r(n, e) {
|
|
2425
2426
|
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
|
}
|
|
@@ -2430,17 +2431,17 @@ var O = (
|
|
|
2430
2431
|
(function(t) {
|
|
2431
2432
|
t[t.literal = 0] = "literal", t[t.object = 1] = "object";
|
|
2432
2433
|
})(H || (H = {}));
|
|
2433
|
-
function
|
|
2434
|
+
function jr(t) {
|
|
2434
2435
|
return t.length < 2 ? t : t.reduce(function(r, n) {
|
|
2435
2436
|
var e = r[r.length - 1];
|
|
2436
2437
|
return !e || e.type !== H.literal || n.type !== H.literal ? r.push(n) : e.value += n.value, r;
|
|
2437
2438
|
}, []);
|
|
2438
2439
|
}
|
|
2439
|
-
function
|
|
2440
|
+
function Vr(t) {
|
|
2440
2441
|
return typeof t == "function";
|
|
2441
2442
|
}
|
|
2442
|
-
function
|
|
2443
|
-
if (t.length === 1 &&
|
|
2443
|
+
function x(t, r, n, e, i, o, a) {
|
|
2444
|
+
if (t.length === 1 && st(t[0]))
|
|
2444
2445
|
return [
|
|
2445
2446
|
{
|
|
2446
2447
|
type: H.literal,
|
|
@@ -2449,14 +2450,14 @@ function V(t, r, n, e, i, o, a) {
|
|
|
2449
2450
|
];
|
|
2450
2451
|
for (var s = [], c = 0, u = t; c < u.length; c++) {
|
|
2451
2452
|
var h = u[c];
|
|
2452
|
-
if (
|
|
2453
|
+
if (st(h)) {
|
|
2453
2454
|
s.push({
|
|
2454
2455
|
type: H.literal,
|
|
2455
2456
|
value: h.value
|
|
2456
2457
|
});
|
|
2457
2458
|
continue;
|
|
2458
2459
|
}
|
|
2459
|
-
if (
|
|
2460
|
+
if (ir(h)) {
|
|
2460
2461
|
typeof o == "number" && s.push({
|
|
2461
2462
|
type: H.literal,
|
|
2462
2463
|
value: n.getNumberFormat(r).format(o)
|
|
@@ -2465,44 +2466,44 @@ function V(t, r, n, e, i, o, a) {
|
|
|
2465
2466
|
}
|
|
2466
2467
|
var l = h.value;
|
|
2467
2468
|
if (!(i && l in i))
|
|
2468
|
-
throw new
|
|
2469
|
+
throw new kr(l, a);
|
|
2469
2470
|
var f = i[l];
|
|
2470
|
-
if (
|
|
2471
|
+
if (nr(h)) {
|
|
2471
2472
|
(!f || typeof f == "string" || typeof f == "number") && (f = typeof f == "string" || typeof f == "number" ? String(f) : ""), s.push({
|
|
2472
2473
|
type: typeof f == "string" ? H.literal : H.object,
|
|
2473
2474
|
value: f
|
|
2474
2475
|
});
|
|
2475
2476
|
continue;
|
|
2476
2477
|
}
|
|
2477
|
-
if (
|
|
2478
|
-
var p = typeof h.style == "string" ? e.date[h.style] :
|
|
2478
|
+
if (_t(h)) {
|
|
2479
|
+
var p = typeof h.style == "string" ? e.date[h.style] : z(h.style) ? h.style.parsedOptions : void 0;
|
|
2479
2480
|
s.push({
|
|
2480
2481
|
type: H.literal,
|
|
2481
2482
|
value: n.getDateTimeFormat(r, p).format(f)
|
|
2482
2483
|
});
|
|
2483
2484
|
continue;
|
|
2484
2485
|
}
|
|
2485
|
-
if (
|
|
2486
|
-
var p = typeof h.style == "string" ? e.time[h.style] :
|
|
2486
|
+
if (At(h)) {
|
|
2487
|
+
var p = typeof h.style == "string" ? e.time[h.style] : z(h.style) ? h.style.parsedOptions : e.time.medium;
|
|
2487
2488
|
s.push({
|
|
2488
2489
|
type: H.literal,
|
|
2489
2490
|
value: n.getDateTimeFormat(r, p).format(f)
|
|
2490
2491
|
});
|
|
2491
2492
|
continue;
|
|
2492
2493
|
}
|
|
2493
|
-
if (
|
|
2494
|
-
var p = typeof h.style == "string" ? e.number[h.style] :
|
|
2494
|
+
if (Tt(h)) {
|
|
2495
|
+
var p = typeof h.style == "string" ? e.number[h.style] : Nt(h.style) ? h.style.parsedOptions : void 0;
|
|
2495
2496
|
p && p.scale && (f = f * (p.scale || 1)), s.push({
|
|
2496
2497
|
type: H.literal,
|
|
2497
2498
|
value: n.getNumberFormat(r, p).format(f)
|
|
2498
2499
|
});
|
|
2499
2500
|
continue;
|
|
2500
2501
|
}
|
|
2501
|
-
if (
|
|
2502
|
-
var
|
|
2503
|
-
if (!
|
|
2504
|
-
throw new
|
|
2505
|
-
var T =
|
|
2502
|
+
if (Bt(h)) {
|
|
2503
|
+
var d = h.children, b = h.value, v = i[b];
|
|
2504
|
+
if (!Vr(v))
|
|
2505
|
+
throw new Fr(b, "function", a);
|
|
2506
|
+
var T = x(d, r, n, e, i, o), B = v(T.map(function(M) {
|
|
2506
2507
|
return M.value;
|
|
2507
2508
|
}));
|
|
2508
2509
|
Array.isArray(B) || (B = [B]), s.push.apply(s, B.map(function(M) {
|
|
@@ -2512,14 +2513,14 @@ function V(t, r, n, e, i, o, a) {
|
|
|
2512
2513
|
};
|
|
2513
2514
|
}));
|
|
2514
2515
|
}
|
|
2515
|
-
if (
|
|
2516
|
+
if (Ht(h)) {
|
|
2516
2517
|
var _ = h.options[f] || h.options.other;
|
|
2517
2518
|
if (!_)
|
|
2518
|
-
throw new
|
|
2519
|
-
s.push.apply(s,
|
|
2519
|
+
throw new pt(h.value, f, Object.keys(h.options), a);
|
|
2520
|
+
s.push.apply(s, x(_.value, r, n, e, i));
|
|
2520
2521
|
continue;
|
|
2521
2522
|
}
|
|
2522
|
-
if (
|
|
2523
|
+
if (St(h)) {
|
|
2523
2524
|
var _ = h.options["=".concat(f)];
|
|
2524
2525
|
if (!_) {
|
|
2525
2526
|
if (!Intl.PluralRules)
|
|
@@ -2530,24 +2531,24 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
2530
2531
|
_ = h.options[U] || h.options.other;
|
|
2531
2532
|
}
|
|
2532
2533
|
if (!_)
|
|
2533
|
-
throw new
|
|
2534
|
-
s.push.apply(s,
|
|
2534
|
+
throw new pt(h.value, f, Object.keys(h.options), a);
|
|
2535
|
+
s.push.apply(s, x(_.value, r, n, e, i, f - (h.offset || 0)));
|
|
2535
2536
|
continue;
|
|
2536
2537
|
}
|
|
2537
2538
|
}
|
|
2538
|
-
return
|
|
2539
|
+
return jr(s);
|
|
2539
2540
|
}
|
|
2540
|
-
function
|
|
2541
|
+
function xr(t, r) {
|
|
2541
2542
|
return r ? m(m(m({}, t || {}), r || {}), Object.keys(t).reduce(function(n, e) {
|
|
2542
2543
|
return n[e] = m(m({}, t[e]), r[e] || {}), n;
|
|
2543
2544
|
}, {})) : t;
|
|
2544
2545
|
}
|
|
2545
|
-
function
|
|
2546
|
+
function Xr(t, r) {
|
|
2546
2547
|
return r ? Object.keys(t).reduce(function(n, e) {
|
|
2547
|
-
return n[e] =
|
|
2548
|
+
return n[e] = xr(t[e], r[e]), n;
|
|
2548
2549
|
}, m({}, t)) : t;
|
|
2549
2550
|
}
|
|
2550
|
-
function
|
|
2551
|
+
function Z(t) {
|
|
2551
2552
|
return {
|
|
2552
2553
|
create: function() {
|
|
2553
2554
|
return {
|
|
@@ -2561,39 +2562,39 @@ function K(t) {
|
|
|
2561
2562
|
}
|
|
2562
2563
|
};
|
|
2563
2564
|
}
|
|
2564
|
-
function
|
|
2565
|
+
function Kr(t) {
|
|
2565
2566
|
return t === void 0 && (t = {
|
|
2566
2567
|
number: {},
|
|
2567
2568
|
dateTime: {},
|
|
2568
2569
|
pluralRules: {}
|
|
2569
2570
|
}), {
|
|
2570
|
-
getNumberFormat:
|
|
2571
|
+
getNumberFormat: I(function() {
|
|
2571
2572
|
for (var r, n = [], e = 0; e < arguments.length; e++)
|
|
2572
2573
|
n[e] = arguments[e];
|
|
2573
2574
|
return new ((r = Intl.NumberFormat).bind.apply(r, P([void 0], n, !1)))();
|
|
2574
2575
|
}, {
|
|
2575
|
-
cache:
|
|
2576
|
+
cache: Z(t.number),
|
|
2576
2577
|
strategy: R.variadic
|
|
2577
2578
|
}),
|
|
2578
|
-
getDateTimeFormat:
|
|
2579
|
+
getDateTimeFormat: I(function() {
|
|
2579
2580
|
for (var r, n = [], e = 0; e < arguments.length; e++)
|
|
2580
2581
|
n[e] = arguments[e];
|
|
2581
2582
|
return new ((r = Intl.DateTimeFormat).bind.apply(r, P([void 0], n, !1)))();
|
|
2582
2583
|
}, {
|
|
2583
|
-
cache:
|
|
2584
|
+
cache: Z(t.dateTime),
|
|
2584
2585
|
strategy: R.variadic
|
|
2585
2586
|
}),
|
|
2586
|
-
getPluralRules:
|
|
2587
|
+
getPluralRules: I(function() {
|
|
2587
2588
|
for (var r, n = [], e = 0; e < arguments.length; e++)
|
|
2588
2589
|
n[e] = arguments[e];
|
|
2589
2590
|
return new ((r = Intl.PluralRules).bind.apply(r, P([void 0], n, !1)))();
|
|
2590
2591
|
}, {
|
|
2591
|
-
cache:
|
|
2592
|
+
cache: Z(t.pluralRules),
|
|
2592
2593
|
strategy: R.variadic
|
|
2593
2594
|
})
|
|
2594
2595
|
};
|
|
2595
2596
|
}
|
|
2596
|
-
var
|
|
2597
|
+
var Ut = (
|
|
2597
2598
|
/** @class */
|
|
2598
2599
|
function() {
|
|
2599
2600
|
function t(r, n, e, i) {
|
|
@@ -2612,7 +2613,7 @@ var wt = (
|
|
|
2612
2613
|
}, []);
|
|
2613
2614
|
return h.length <= 1 ? h[0] || "" : h;
|
|
2614
2615
|
}, this.formatToParts = function(c) {
|
|
2615
|
-
return
|
|
2616
|
+
return x(o.ast, o.locales, o.formatters, o.formats, c, void 0, o.message);
|
|
2616
2617
|
}, this.resolvedOptions = function() {
|
|
2617
2618
|
var c;
|
|
2618
2619
|
return {
|
|
@@ -2625,13 +2626,13 @@ var wt = (
|
|
|
2625
2626
|
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
2626
2627
|
var a = i || {};
|
|
2627
2628
|
a.formatters;
|
|
2628
|
-
var s =
|
|
2629
|
+
var s = er(a, ["formatters"]);
|
|
2629
2630
|
this.ast = t.__parse(r, m(m({}, s), { locale: this.resolvedLocale }));
|
|
2630
2631
|
} else
|
|
2631
2632
|
this.ast = r;
|
|
2632
2633
|
if (!Array.isArray(this.ast))
|
|
2633
2634
|
throw new TypeError("A message must be provided as a String or AST.");
|
|
2634
|
-
this.formats =
|
|
2635
|
+
this.formats = Xr(t.formats, e), this.formatters = i && i.formatters || Kr(this.formatterCache);
|
|
2635
2636
|
}
|
|
2636
2637
|
return Object.defineProperty(t, "defaultLocale", {
|
|
2637
2638
|
get: function() {
|
|
@@ -2644,7 +2645,7 @@ var wt = (
|
|
|
2644
2645
|
var n = Intl.NumberFormat.supportedLocalesOf(r);
|
|
2645
2646
|
return n.length > 0 ? new Intl.Locale(n[0]) : new Intl.Locale(typeof r == "string" ? r : r[0]);
|
|
2646
2647
|
}
|
|
2647
|
-
}, t.__parse =
|
|
2648
|
+
}, t.__parse = Or, t.formats = {
|
|
2648
2649
|
number: {
|
|
2649
2650
|
integer: {
|
|
2650
2651
|
maximumFractionDigits: 0
|
|
@@ -2711,7 +2712,7 @@ var wt = (
|
|
|
2711
2712
|
var S = (
|
|
2712
2713
|
/** @class */
|
|
2713
2714
|
function(t) {
|
|
2714
|
-
|
|
2715
|
+
N(r, t);
|
|
2715
2716
|
function r(n, e, i) {
|
|
2716
2717
|
var o = this, a = i ? i instanceof Error ? i : new Error(String(i)) : void 0;
|
|
2717
2718
|
return o = t.call(this, "[@formatjs/intl Error ".concat(n, "] ").concat(e, `
|
|
@@ -2721,37 +2722,37 @@ var S = (
|
|
|
2721
2722
|
}
|
|
2722
2723
|
return r;
|
|
2723
2724
|
}(Error)
|
|
2724
|
-
),
|
|
2725
|
+
), Zr = (
|
|
2725
2726
|
/** @class */
|
|
2726
2727
|
function(t) {
|
|
2727
|
-
|
|
2728
|
+
N(r, t);
|
|
2728
2729
|
function r(n, e) {
|
|
2729
2730
|
return t.call(this, A.UNSUPPORTED_FORMATTER, n, e) || this;
|
|
2730
2731
|
}
|
|
2731
2732
|
return r;
|
|
2732
2733
|
}(S)
|
|
2733
|
-
),
|
|
2734
|
+
), Yr = (
|
|
2734
2735
|
/** @class */
|
|
2735
2736
|
function(t) {
|
|
2736
|
-
|
|
2737
|
+
N(r, t);
|
|
2737
2738
|
function r(n, e) {
|
|
2738
2739
|
return t.call(this, A.INVALID_CONFIG, n, e) || this;
|
|
2739
2740
|
}
|
|
2740
2741
|
return r;
|
|
2741
2742
|
}(S)
|
|
2742
|
-
),
|
|
2743
|
+
), gt = (
|
|
2743
2744
|
/** @class */
|
|
2744
2745
|
function(t) {
|
|
2745
|
-
|
|
2746
|
+
N(r, t);
|
|
2746
2747
|
function r(n, e) {
|
|
2747
2748
|
return t.call(this, A.MISSING_DATA, n, e) || this;
|
|
2748
2749
|
}
|
|
2749
2750
|
return r;
|
|
2750
2751
|
}(S)
|
|
2751
|
-
),
|
|
2752
|
+
), nt = (
|
|
2752
2753
|
/** @class */
|
|
2753
2754
|
function(t) {
|
|
2754
|
-
|
|
2755
|
+
N(r, t);
|
|
2755
2756
|
function r(n, e, i) {
|
|
2756
2757
|
return t.call(this, A.FORMAT_ERROR, "".concat(n, `
|
|
2757
2758
|
Locale: `).concat(e, `
|
|
@@ -2759,10 +2760,10 @@ Locale: `).concat(e, `
|
|
|
2759
2760
|
}
|
|
2760
2761
|
return r;
|
|
2761
2762
|
}(S)
|
|
2762
|
-
),
|
|
2763
|
+
), Y = (
|
|
2763
2764
|
/** @class */
|
|
2764
2765
|
function(t) {
|
|
2765
|
-
|
|
2766
|
+
N(r, t);
|
|
2766
2767
|
function r(n, e, i, o) {
|
|
2767
2768
|
var a = t.call(this, "".concat(n, `
|
|
2768
2769
|
MessageID: `).concat(i == null ? void 0 : i.id, `
|
|
@@ -2772,11 +2773,11 @@ Description: `).concat(i == null ? void 0 : i.description, `
|
|
|
2772
2773
|
return a.descriptor = i, a;
|
|
2773
2774
|
}
|
|
2774
2775
|
return r;
|
|
2775
|
-
}(
|
|
2776
|
-
),
|
|
2776
|
+
}(nt)
|
|
2777
|
+
), Wr = (
|
|
2777
2778
|
/** @class */
|
|
2778
2779
|
function(t) {
|
|
2779
|
-
|
|
2780
|
+
N(r, t);
|
|
2780
2781
|
function r(n, e) {
|
|
2781
2782
|
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
2783
|
var a;
|
|
@@ -2792,21 +2793,21 @@ function w(t, r, n) {
|
|
|
2792
2793
|
return i in t ? e[i] = t[i] : i in n && (e[i] = n[i]), e;
|
|
2793
2794
|
}, {});
|
|
2794
2795
|
}
|
|
2795
|
-
var
|
|
2796
|
+
var zr = function(t) {
|
|
2796
2797
|
process.env.NODE_ENV !== "production" && console.error(t);
|
|
2797
|
-
},
|
|
2798
|
+
}, qr = function(t) {
|
|
2798
2799
|
process.env.NODE_ENV !== "production" && console.warn(t);
|
|
2799
|
-
},
|
|
2800
|
+
}, Qr = {
|
|
2800
2801
|
formats: {},
|
|
2801
2802
|
messages: {},
|
|
2802
2803
|
timeZone: void 0,
|
|
2803
2804
|
defaultLocale: "en",
|
|
2804
2805
|
defaultFormats: {},
|
|
2805
2806
|
fallbackOnEmptyString: !0,
|
|
2806
|
-
onError:
|
|
2807
|
-
onWarn:
|
|
2807
|
+
onError: zr,
|
|
2808
|
+
onWarn: qr
|
|
2808
2809
|
};
|
|
2809
|
-
function
|
|
2810
|
+
function Gt() {
|
|
2810
2811
|
return {
|
|
2811
2812
|
dateTime: {},
|
|
2812
2813
|
number: {},
|
|
@@ -2831,23 +2832,23 @@ function C(t) {
|
|
|
2831
2832
|
}
|
|
2832
2833
|
};
|
|
2833
2834
|
}
|
|
2834
|
-
function
|
|
2835
|
-
t === void 0 && (t =
|
|
2836
|
-
var r = Intl.RelativeTimeFormat, n = Intl.ListFormat, e = Intl.DisplayNames, i =
|
|
2835
|
+
function Jr(t) {
|
|
2836
|
+
t === void 0 && (t = Gt());
|
|
2837
|
+
var r = Intl.RelativeTimeFormat, n = Intl.ListFormat, e = Intl.DisplayNames, i = I(function() {
|
|
2837
2838
|
for (var s, c = [], u = 0; u < arguments.length; u++)
|
|
2838
2839
|
c[u] = arguments[u];
|
|
2839
2840
|
return new ((s = Intl.DateTimeFormat).bind.apply(s, P([void 0], c, !1)))();
|
|
2840
2841
|
}, {
|
|
2841
2842
|
cache: C(t.dateTime),
|
|
2842
2843
|
strategy: R.variadic
|
|
2843
|
-
}), o =
|
|
2844
|
+
}), o = I(function() {
|
|
2844
2845
|
for (var s, c = [], u = 0; u < arguments.length; u++)
|
|
2845
2846
|
c[u] = arguments[u];
|
|
2846
2847
|
return new ((s = Intl.NumberFormat).bind.apply(s, P([void 0], c, !1)))();
|
|
2847
2848
|
}, {
|
|
2848
2849
|
cache: C(t.number),
|
|
2849
2850
|
strategy: R.variadic
|
|
2850
|
-
}), a =
|
|
2851
|
+
}), a = I(function() {
|
|
2851
2852
|
for (var s, c = [], u = 0; u < arguments.length; u++)
|
|
2852
2853
|
c[u] = arguments[u];
|
|
2853
2854
|
return new ((s = Intl.PluralRules).bind.apply(s, P([void 0], c, !1)))();
|
|
@@ -2858,8 +2859,8 @@ function Wr(t) {
|
|
|
2858
2859
|
return {
|
|
2859
2860
|
getDateTimeFormat: i,
|
|
2860
2861
|
getNumberFormat: o,
|
|
2861
|
-
getMessageFormat:
|
|
2862
|
-
return new
|
|
2862
|
+
getMessageFormat: I(function(s, c, u, h) {
|
|
2863
|
+
return new Ut(s, c, u, m({ formatters: {
|
|
2863
2864
|
getNumberFormat: o,
|
|
2864
2865
|
getDateTimeFormat: i,
|
|
2865
2866
|
getPluralRules: a
|
|
@@ -2868,7 +2869,7 @@ function Wr(t) {
|
|
|
2868
2869
|
cache: C(t.message),
|
|
2869
2870
|
strategy: R.variadic
|
|
2870
2871
|
}),
|
|
2871
|
-
getRelativeTimeFormat:
|
|
2872
|
+
getRelativeTimeFormat: I(function() {
|
|
2872
2873
|
for (var s = [], c = 0; c < arguments.length; c++)
|
|
2873
2874
|
s[c] = arguments[c];
|
|
2874
2875
|
return new (r.bind.apply(r, P([void 0], s, !1)))();
|
|
@@ -2877,7 +2878,7 @@ function Wr(t) {
|
|
|
2877
2878
|
strategy: R.variadic
|
|
2878
2879
|
}),
|
|
2879
2880
|
getPluralRules: a,
|
|
2880
|
-
getListFormat:
|
|
2881
|
+
getListFormat: I(function() {
|
|
2881
2882
|
for (var s = [], c = 0; c < arguments.length; c++)
|
|
2882
2883
|
s[c] = arguments[c];
|
|
2883
2884
|
return new (n.bind.apply(n, P([void 0], s, !1)))();
|
|
@@ -2885,7 +2886,7 @@ function Wr(t) {
|
|
|
2885
2886
|
cache: C(t.list),
|
|
2886
2887
|
strategy: R.variadic
|
|
2887
2888
|
}),
|
|
2888
|
-
getDisplayNames:
|
|
2889
|
+
getDisplayNames: I(function() {
|
|
2889
2890
|
for (var s = [], c = 0; c < arguments.length; c++)
|
|
2890
2891
|
s[c] = arguments[c];
|
|
2891
2892
|
return new (e.bind.apply(e, P([void 0], s, !1)))();
|
|
@@ -2895,75 +2896,75 @@ function Wr(t) {
|
|
|
2895
2896
|
})
|
|
2896
2897
|
};
|
|
2897
2898
|
}
|
|
2898
|
-
function
|
|
2899
|
+
function it(t, r, n, e) {
|
|
2899
2900
|
var i = t && t[r], o;
|
|
2900
2901
|
if (i && (o = i[n]), o)
|
|
2901
2902
|
return o;
|
|
2902
|
-
e(new
|
|
2903
|
+
e(new Zr("No ".concat(r, " format named: ").concat(n)));
|
|
2903
2904
|
}
|
|
2904
|
-
function
|
|
2905
|
+
function $r(t, r, n) {
|
|
2905
2906
|
if (n === void 0 && (n = Error), !t)
|
|
2906
2907
|
throw new n(r);
|
|
2907
2908
|
}
|
|
2908
|
-
function
|
|
2909
|
+
function V(t, r) {
|
|
2909
2910
|
return Object.keys(t).reduce(function(n, e) {
|
|
2910
2911
|
return n[e] = m({ timeZone: r }, t[e]), n;
|
|
2911
2912
|
}, {});
|
|
2912
2913
|
}
|
|
2913
|
-
function
|
|
2914
|
+
function Et(t, r) {
|
|
2914
2915
|
var n = Object.keys(m(m({}, t), r));
|
|
2915
2916
|
return n.reduce(function(e, i) {
|
|
2916
2917
|
return e[i] = m(m({}, t[i] || {}), r[i] || {}), e;
|
|
2917
2918
|
}, {});
|
|
2918
2919
|
}
|
|
2919
|
-
function
|
|
2920
|
+
function bt(t, r) {
|
|
2920
2921
|
if (!r)
|
|
2921
2922
|
return t;
|
|
2922
|
-
var n =
|
|
2923
|
-
return m(m(m({}, n), t), { date:
|
|
2923
|
+
var n = Ut.formats;
|
|
2924
|
+
return m(m(m({}, n), t), { date: Et(V(n.date, r), V(t.date || {}, r)), time: Et(V(n.time, r), V(t.time || {}, r)) });
|
|
2924
2925
|
}
|
|
2925
|
-
var
|
|
2926
|
+
var yt = function(t, r, n, e, i) {
|
|
2926
2927
|
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
2928
|
n === void 0 && (n = { id: "" });
|
|
2928
|
-
var
|
|
2929
|
-
|
|
2930
|
-
var
|
|
2929
|
+
var d = n.id, b = n.defaultMessage;
|
|
2930
|
+
$r(!!d, "[@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");
|
|
2931
|
+
var v = String(d), T = (
|
|
2931
2932
|
// In case messages is Object.create(null)
|
|
2932
2933
|
// e.g import('foo.json') from webpack)
|
|
2933
2934
|
// See https://github.com/formatjs/formatjs/issues/1914
|
|
2934
|
-
s && Object.prototype.hasOwnProperty.call(s,
|
|
2935
|
+
s && Object.prototype.hasOwnProperty.call(s, v) && s[v]
|
|
2935
2936
|
);
|
|
2936
2937
|
if (Array.isArray(T) && T.length === 1 && T[0].type === y.literal)
|
|
2937
2938
|
return T[0].value;
|
|
2938
2939
|
if (!e && T && typeof T == "string" && !p)
|
|
2939
2940
|
return T.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
2940
|
-
if (e = m(m({}, p), e || {}), a =
|
|
2941
|
+
if (e = m(m({}, p), e || {}), a = bt(a, f), u = bt(u, f), !T) {
|
|
2941
2942
|
if (h === !1 && T === "")
|
|
2942
2943
|
return T;
|
|
2943
|
-
if ((!b || o && o.toLowerCase() !== c.toLowerCase()) && l(new
|
|
2944
|
+
if ((!b || o && o.toLowerCase() !== c.toLowerCase()) && l(new Wr(n, o)), b)
|
|
2944
2945
|
try {
|
|
2945
2946
|
var B = r.getMessageFormat(b, c, u, i);
|
|
2946
2947
|
return B.format(e);
|
|
2947
2948
|
} catch (_) {
|
|
2948
|
-
return l(new
|
|
2949
|
+
return l(new Y('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), o, n, _)), typeof b == "string" ? b : v;
|
|
2949
2950
|
}
|
|
2950
|
-
return
|
|
2951
|
+
return v;
|
|
2951
2952
|
}
|
|
2952
2953
|
try {
|
|
2953
2954
|
var B = r.getMessageFormat(T, o, a, m({ formatters: r }, i || {}));
|
|
2954
2955
|
return B.format(e);
|
|
2955
2956
|
} catch (_) {
|
|
2956
|
-
l(new
|
|
2957
|
+
l(new Y('Error formatting message: "'.concat(v, '", using ').concat(b ? "default message" : "id", " as fallback."), o, n, _));
|
|
2957
2958
|
}
|
|
2958
2959
|
if (b)
|
|
2959
2960
|
try {
|
|
2960
2961
|
var B = r.getMessageFormat(b, c, u, i);
|
|
2961
2962
|
return B.format(e);
|
|
2962
2963
|
} catch (_) {
|
|
2963
|
-
l(new
|
|
2964
|
+
l(new Y('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), o, n, _));
|
|
2964
2965
|
}
|
|
2965
|
-
return typeof T == "string" ? T : typeof b == "string" ? b :
|
|
2966
|
-
},
|
|
2966
|
+
return typeof T == "string" ? T : typeof b == "string" ? b : v;
|
|
2967
|
+
}, Ft = [
|
|
2967
2968
|
"formatMatcher",
|
|
2968
2969
|
"timeZone",
|
|
2969
2970
|
"hour12",
|
|
@@ -2984,38 +2985,38 @@ var Et = function(t, r, n, e, i) {
|
|
|
2984
2985
|
"numberingSystem",
|
|
2985
2986
|
"fractionalSecondDigits"
|
|
2986
2987
|
];
|
|
2987
|
-
function
|
|
2988
|
+
function X(t, r, n, e) {
|
|
2988
2989
|
var i = t.locale, o = t.formats, a = t.onError, s = t.timeZone;
|
|
2989
2990
|
e === void 0 && (e = {});
|
|
2990
|
-
var c = e.format, u = m(m({}, s && { timeZone: s }), c &&
|
|
2991
|
+
var c = e.format, u = m(m({}, s && { timeZone: s }), c && it(o, r, c, a)), h = w(e, Ft, u);
|
|
2991
2992
|
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
|
}
|
|
2993
|
-
function
|
|
2994
|
+
function te(t, r) {
|
|
2994
2995
|
for (var n = [], e = 2; e < arguments.length; e++)
|
|
2995
2996
|
n[e - 2] = arguments[e];
|
|
2996
2997
|
var i = n[0], o = n[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
2997
2998
|
try {
|
|
2998
|
-
return
|
|
2999
|
+
return X(t, "date", r, a).format(s);
|
|
2999
3000
|
} catch (c) {
|
|
3000
3001
|
t.onError(new S(A.FORMAT_ERROR, "Error formatting date.", c));
|
|
3001
3002
|
}
|
|
3002
3003
|
return String(s);
|
|
3003
3004
|
}
|
|
3004
|
-
function
|
|
3005
|
+
function re(t, r) {
|
|
3005
3006
|
for (var n = [], e = 2; e < arguments.length; e++)
|
|
3006
3007
|
n[e - 2] = arguments[e];
|
|
3007
3008
|
var i = n[0], o = n[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3008
3009
|
try {
|
|
3009
|
-
return
|
|
3010
|
+
return X(t, "time", r, a).format(s);
|
|
3010
3011
|
} catch (c) {
|
|
3011
3012
|
t.onError(new S(A.FORMAT_ERROR, "Error formatting time.", c));
|
|
3012
3013
|
}
|
|
3013
3014
|
return String(s);
|
|
3014
3015
|
}
|
|
3015
|
-
function
|
|
3016
|
+
function ee(t, r) {
|
|
3016
3017
|
for (var n = [], e = 2; e < arguments.length; e++)
|
|
3017
3018
|
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,
|
|
3019
|
+
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, Ft, c ? { timeZone: c } : {});
|
|
3019
3020
|
try {
|
|
3020
3021
|
return r(u, l).formatRange(i, o);
|
|
3021
3022
|
} catch (f) {
|
|
@@ -3023,73 +3024,73 @@ function Jr(t, r) {
|
|
|
3023
3024
|
}
|
|
3024
3025
|
return String(i);
|
|
3025
3026
|
}
|
|
3026
|
-
function
|
|
3027
|
+
function ne(t, r) {
|
|
3027
3028
|
for (var n = [], e = 2; e < arguments.length; e++)
|
|
3028
3029
|
n[e - 2] = arguments[e];
|
|
3029
3030
|
var i = n[0], o = n[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3030
3031
|
try {
|
|
3031
|
-
return
|
|
3032
|
+
return X(t, "date", r, a).formatToParts(s);
|
|
3032
3033
|
} catch (c) {
|
|
3033
3034
|
t.onError(new S(A.FORMAT_ERROR, "Error formatting date.", c));
|
|
3034
3035
|
}
|
|
3035
3036
|
return [];
|
|
3036
3037
|
}
|
|
3037
|
-
function
|
|
3038
|
+
function ie(t, r) {
|
|
3038
3039
|
for (var n = [], e = 2; e < arguments.length; e++)
|
|
3039
3040
|
n[e - 2] = arguments[e];
|
|
3040
3041
|
var i = n[0], o = n[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3041
3042
|
try {
|
|
3042
|
-
return
|
|
3043
|
+
return X(t, "time", r, a).formatToParts(s);
|
|
3043
3044
|
} catch (c) {
|
|
3044
3045
|
t.onError(new S(A.FORMAT_ERROR, "Error formatting time.", c));
|
|
3045
3046
|
}
|
|
3046
3047
|
return [];
|
|
3047
3048
|
}
|
|
3048
|
-
var
|
|
3049
|
+
var oe = [
|
|
3049
3050
|
"style",
|
|
3050
3051
|
"type",
|
|
3051
3052
|
"fallback",
|
|
3052
3053
|
"languageDisplay"
|
|
3053
3054
|
];
|
|
3054
|
-
function
|
|
3055
|
+
function ae(t, r, n, e) {
|
|
3055
3056
|
var i = t.locale, o = t.onError, a = Intl.DisplayNames;
|
|
3056
3057
|
a || o(new O(`Intl.DisplayNames is not available in this environment.
|
|
3057
3058
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
3058
3059
|
`, L.MISSING_INTL_API));
|
|
3059
|
-
var s = w(e,
|
|
3060
|
+
var s = w(e, oe);
|
|
3060
3061
|
try {
|
|
3061
3062
|
return r(i, s).of(n);
|
|
3062
3063
|
} catch (c) {
|
|
3063
3064
|
o(new S(A.FORMAT_ERROR, "Error formatting display name.", c));
|
|
3064
3065
|
}
|
|
3065
3066
|
}
|
|
3066
|
-
var
|
|
3067
|
+
var se = [
|
|
3067
3068
|
"type",
|
|
3068
3069
|
"style"
|
|
3069
|
-
],
|
|
3070
|
-
function
|
|
3071
|
-
return "".concat(
|
|
3070
|
+
], dt = Date.now();
|
|
3071
|
+
function he(t) {
|
|
3072
|
+
return "".concat(dt, "_").concat(t, "_").concat(dt);
|
|
3072
3073
|
}
|
|
3073
|
-
function
|
|
3074
|
+
function ue(t, r, n, e) {
|
|
3074
3075
|
e === void 0 && (e = {});
|
|
3075
|
-
var i =
|
|
3076
|
+
var i = kt(t, r, n, e).reduce(function(o, a) {
|
|
3076
3077
|
var s = a.value;
|
|
3077
3078
|
return typeof s != "string" ? o.push(s) : typeof o[o.length - 1] == "string" ? o[o.length - 1] += s : o.push(s), o;
|
|
3078
3079
|
}, []);
|
|
3079
3080
|
return i.length === 1 ? i[0] : i.length === 0 ? "" : i;
|
|
3080
3081
|
}
|
|
3081
|
-
function
|
|
3082
|
+
function kt(t, r, n, e) {
|
|
3082
3083
|
var i = t.locale, o = t.onError;
|
|
3083
3084
|
e === void 0 && (e = {});
|
|
3084
3085
|
var a = Intl.ListFormat;
|
|
3085
3086
|
a || o(new O(`Intl.ListFormat is not available in this environment.
|
|
3086
3087
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
3087
3088
|
`, L.MISSING_INTL_API));
|
|
3088
|
-
var s = w(e,
|
|
3089
|
+
var s = w(e, se);
|
|
3089
3090
|
try {
|
|
3090
3091
|
var c = {}, u = n.map(function(h, l) {
|
|
3091
3092
|
if (typeof h == "object") {
|
|
3092
|
-
var f =
|
|
3093
|
+
var f = he(l);
|
|
3093
3094
|
return c[f] = h, f;
|
|
3094
3095
|
}
|
|
3095
3096
|
return String(h);
|
|
@@ -3102,41 +3103,41 @@ Try polyfilling it using "@formatjs/intl-listformat"
|
|
|
3102
3103
|
}
|
|
3103
3104
|
return n;
|
|
3104
3105
|
}
|
|
3105
|
-
var
|
|
3106
|
-
function
|
|
3106
|
+
var ce = ["type"];
|
|
3107
|
+
function le(t, r, n, e) {
|
|
3107
3108
|
var i = t.locale, o = t.onError;
|
|
3108
3109
|
e === void 0 && (e = {}), Intl.PluralRules || o(new O(`Intl.PluralRules is not available in this environment.
|
|
3109
3110
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3110
3111
|
`, L.MISSING_INTL_API));
|
|
3111
|
-
var a = w(e,
|
|
3112
|
+
var a = w(e, ce);
|
|
3112
3113
|
try {
|
|
3113
3114
|
return r(i, a).select(n);
|
|
3114
3115
|
} catch (s) {
|
|
3115
|
-
o(new
|
|
3116
|
+
o(new nt("Error formatting plural.", i, s));
|
|
3116
3117
|
}
|
|
3117
3118
|
return "other";
|
|
3118
3119
|
}
|
|
3119
|
-
var
|
|
3120
|
-
function
|
|
3120
|
+
var fe = ["numeric", "style"];
|
|
3121
|
+
function me(t, r, n) {
|
|
3121
3122
|
var e = t.locale, i = t.formats, o = t.onError;
|
|
3122
3123
|
n === void 0 && (n = {});
|
|
3123
|
-
var a = n.format, s = !!a &&
|
|
3124
|
+
var a = n.format, s = !!a && it(i, "relative", a, o) || {}, c = w(n, fe, s);
|
|
3124
3125
|
return r(e, c);
|
|
3125
3126
|
}
|
|
3126
|
-
function
|
|
3127
|
+
function pe(t, r, n, e, i) {
|
|
3127
3128
|
i === void 0 && (i = {}), e || (e = "second");
|
|
3128
3129
|
var o = Intl.RelativeTimeFormat;
|
|
3129
3130
|
o || t.onError(new O(`Intl.RelativeTimeFormat is not available in this environment.
|
|
3130
3131
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
3131
3132
|
`, L.MISSING_INTL_API));
|
|
3132
3133
|
try {
|
|
3133
|
-
return
|
|
3134
|
+
return me(t, r, i).format(n, e);
|
|
3134
3135
|
} catch (a) {
|
|
3135
|
-
t.onError(new
|
|
3136
|
+
t.onError(new nt("Error formatting relative time.", t.locale, a));
|
|
3136
3137
|
}
|
|
3137
3138
|
return String(n);
|
|
3138
3139
|
}
|
|
3139
|
-
var
|
|
3140
|
+
var ge = [
|
|
3140
3141
|
"style",
|
|
3141
3142
|
"currency",
|
|
3142
3143
|
"currencyDisplay",
|
|
@@ -3158,87 +3159,87 @@ var le = [
|
|
|
3158
3159
|
"unitDisplay",
|
|
3159
3160
|
"numberingSystem"
|
|
3160
3161
|
];
|
|
3161
|
-
function
|
|
3162
|
+
function jt(t, r, n) {
|
|
3162
3163
|
var e = t.locale, i = t.formats, o = t.onError;
|
|
3163
3164
|
n === void 0 && (n = {});
|
|
3164
|
-
var a = n.format, s = a &&
|
|
3165
|
+
var a = n.format, s = a && it(i, "number", a, o) || {}, c = w(n, ge, s);
|
|
3165
3166
|
return r(e, c);
|
|
3166
3167
|
}
|
|
3167
|
-
function
|
|
3168
|
+
function Ee(t, r, n, e) {
|
|
3168
3169
|
e === void 0 && (e = {});
|
|
3169
3170
|
try {
|
|
3170
|
-
return
|
|
3171
|
+
return jt(t, r, e).format(n);
|
|
3171
3172
|
} catch (i) {
|
|
3172
3173
|
t.onError(new S(A.FORMAT_ERROR, "Error formatting number.", i));
|
|
3173
3174
|
}
|
|
3174
3175
|
return String(n);
|
|
3175
3176
|
}
|
|
3176
|
-
function
|
|
3177
|
+
function be(t, r, n, e) {
|
|
3177
3178
|
e === void 0 && (e = {});
|
|
3178
3179
|
try {
|
|
3179
|
-
return
|
|
3180
|
+
return jt(t, r, e).formatToParts(n);
|
|
3180
3181
|
} catch (i) {
|
|
3181
3182
|
t.onError(new S(A.FORMAT_ERROR, "Error formatting number.", i));
|
|
3182
3183
|
}
|
|
3183
3184
|
return [];
|
|
3184
3185
|
}
|
|
3185
|
-
function
|
|
3186
|
+
function ye(t) {
|
|
3186
3187
|
var r = t ? t[Object.keys(t)[0]] : void 0;
|
|
3187
3188
|
return typeof r == "string";
|
|
3188
3189
|
}
|
|
3189
|
-
function
|
|
3190
|
-
t.onWarn && t.defaultRichTextElements &&
|
|
3190
|
+
function de(t) {
|
|
3191
|
+
t.onWarn && t.defaultRichTextElements && ye(t.messages || {}) && t.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
3191
3192
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
3192
3193
|
For more details see https://formatjs.io/docs/getting-started/message-distribution`);
|
|
3193
3194
|
}
|
|
3194
|
-
function
|
|
3195
|
-
var n =
|
|
3196
|
-
return i ? !Intl.NumberFormat.supportedLocalesOf(i).length && a ? a(new
|
|
3195
|
+
function ve(t, r) {
|
|
3196
|
+
var n = Jr(r), e = m(m({}, Qr), t), i = e.locale, o = e.defaultLocale, a = e.onError;
|
|
3197
|
+
return i ? !Intl.NumberFormat.supportedLocalesOf(i).length && a ? a(new gt('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 gt('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 Yr('"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"), de(e), m(m({}, e), {
|
|
3197
3198
|
formatters: n,
|
|
3198
|
-
formatNumber:
|
|
3199
|
-
formatNumberToParts:
|
|
3200
|
-
formatRelativeTime:
|
|
3201
|
-
formatDate:
|
|
3202
|
-
formatDateToParts:
|
|
3203
|
-
formatTime:
|
|
3204
|
-
formatDateTimeRange:
|
|
3205
|
-
formatTimeToParts:
|
|
3206
|
-
formatPlural:
|
|
3199
|
+
formatNumber: Ee.bind(null, e, n.getNumberFormat),
|
|
3200
|
+
formatNumberToParts: be.bind(null, e, n.getNumberFormat),
|
|
3201
|
+
formatRelativeTime: pe.bind(null, e, n.getRelativeTimeFormat),
|
|
3202
|
+
formatDate: te.bind(null, e, n.getDateTimeFormat),
|
|
3203
|
+
formatDateToParts: ne.bind(null, e, n.getDateTimeFormat),
|
|
3204
|
+
formatTime: re.bind(null, e, n.getDateTimeFormat),
|
|
3205
|
+
formatDateTimeRange: ee.bind(null, e, n.getDateTimeFormat),
|
|
3206
|
+
formatTimeToParts: ie.bind(null, e, n.getDateTimeFormat),
|
|
3207
|
+
formatPlural: le.bind(null, e, n.getPluralRules),
|
|
3207
3208
|
// @ts-expect-error TODO: will get to this later
|
|
3208
|
-
formatMessage:
|
|
3209
|
+
formatMessage: yt.bind(null, e, n),
|
|
3209
3210
|
// @ts-expect-error TODO: will get to this later
|
|
3210
|
-
$t:
|
|
3211
|
-
formatList:
|
|
3212
|
-
formatListToParts:
|
|
3213
|
-
formatDisplayName:
|
|
3211
|
+
$t: yt.bind(null, e, n),
|
|
3212
|
+
formatList: ue.bind(null, e, n.getListFormat),
|
|
3213
|
+
formatListToParts: kt.bind(null, e, n.getListFormat),
|
|
3214
|
+
formatDisplayName: ae.bind(null, e, n.getDisplayNames)
|
|
3214
3215
|
});
|
|
3215
3216
|
}
|
|
3216
|
-
var
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
function
|
|
3217
|
+
var Te = G;
|
|
3218
|
+
G.flatten = G;
|
|
3219
|
+
G.unflatten = Xt;
|
|
3220
|
+
function Vt(t) {
|
|
3220
3221
|
return t && t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
|
|
3221
3222
|
}
|
|
3222
|
-
function
|
|
3223
|
+
function xt(t) {
|
|
3223
3224
|
return t;
|
|
3224
3225
|
}
|
|
3225
|
-
function
|
|
3226
|
+
function G(t, r) {
|
|
3226
3227
|
r = r || {};
|
|
3227
|
-
const n = r.delimiter || ".", e = r.maxDepth, i = r.transformKey ||
|
|
3228
|
+
const n = r.delimiter || ".", e = r.maxDepth, i = r.transformKey || xt, o = {};
|
|
3228
3229
|
function a(s, c, u) {
|
|
3229
3230
|
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),
|
|
3231
|
-
if (!f && !
|
|
3232
|
-
return a(l,
|
|
3233
|
-
o[
|
|
3231
|
+
const l = s[h], f = r.safe && Array.isArray(l), p = Object.prototype.toString.call(l), d = Vt(l), b = p === "[object Object]" || p === "[object Array]", v = c ? c + n + i(h) : i(h);
|
|
3232
|
+
if (!f && !d && b && Object.keys(l).length && (!r.maxDepth || u < e))
|
|
3233
|
+
return a(l, v, u + 1);
|
|
3234
|
+
o[v] = l;
|
|
3234
3235
|
});
|
|
3235
3236
|
}
|
|
3236
3237
|
return a(t), o;
|
|
3237
3238
|
}
|
|
3238
|
-
function
|
|
3239
|
+
function Xt(t, r) {
|
|
3239
3240
|
r = r || {};
|
|
3240
|
-
const n = r.delimiter || ".", e = r.overwrite || !1, i = r.transformKey ||
|
|
3241
|
-
if (
|
|
3241
|
+
const n = r.delimiter || ".", e = r.overwrite || !1, i = r.transformKey || xt, o = {};
|
|
3242
|
+
if (Vt(t) || Object.prototype.toString.call(t) !== "[object Object]")
|
|
3242
3243
|
return t;
|
|
3243
3244
|
function a(u) {
|
|
3244
3245
|
const h = Number(u);
|
|
@@ -3264,7 +3265,7 @@ function Vt(t, r) {
|
|
|
3264
3265
|
return !(l === "[object Object]" || l === "[object Array]") || c(t[h]) ? (u[h] = t[h], u) : s(
|
|
3265
3266
|
h,
|
|
3266
3267
|
u,
|
|
3267
|
-
|
|
3268
|
+
G(t[h], r)
|
|
3268
3269
|
);
|
|
3269
3270
|
}, {}), Object.keys(t).forEach(function(u) {
|
|
3270
3271
|
const h = u.split(n).map(i);
|
|
@@ -3272,24 +3273,24 @@ function Vt(t, r) {
|
|
|
3272
3273
|
for (; f !== void 0; ) {
|
|
3273
3274
|
if (l === "__proto__")
|
|
3274
3275
|
return;
|
|
3275
|
-
const
|
|
3276
|
+
const d = Object.prototype.toString.call(p[l]), b = d === "[object Object]" || d === "[object Array]";
|
|
3276
3277
|
if (!e && !b && typeof p[l] < "u")
|
|
3277
3278
|
return;
|
|
3278
3279
|
(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
|
}
|
|
3280
|
-
p[l] =
|
|
3281
|
+
p[l] = Xt(t[u], r);
|
|
3281
3282
|
}), o;
|
|
3282
3283
|
}
|
|
3283
|
-
const
|
|
3284
|
-
const e =
|
|
3284
|
+
const _e = Gt(), Ae = (t, r, n = !1) => {
|
|
3285
|
+
const e = ve(
|
|
3285
3286
|
{
|
|
3286
3287
|
locale: t,
|
|
3287
|
-
messages:
|
|
3288
|
+
messages: Te.flatten(r, {
|
|
3288
3289
|
safe: !0
|
|
3289
3290
|
// Preserve arrays
|
|
3290
3291
|
})
|
|
3291
3292
|
},
|
|
3292
|
-
|
|
3293
|
+
_e
|
|
3293
3294
|
);
|
|
3294
3295
|
return {
|
|
3295
3296
|
t: (o, a, s) => e.formatMessage({ id: o }, a, s),
|
|
@@ -3298,7 +3299,7 @@ const ye = Dt(), ve = (t, r, n = !1) => {
|
|
|
3298
3299
|
...e,
|
|
3299
3300
|
source: r
|
|
3300
3301
|
};
|
|
3301
|
-
},
|
|
3302
|
+
}, He = (t = null) => vt({
|
|
3302
3303
|
name: "I18nT",
|
|
3303
3304
|
props: {
|
|
3304
3305
|
i18n: {
|
|
@@ -3329,67 +3330,80 @@ const ye = Dt(), ve = (t, r, n = !1) => {
|
|
|
3329
3330
|
return;
|
|
3330
3331
|
const u = s.replace(/[\{\}]/g, "");
|
|
3331
3332
|
u === "0" && n.default ? a[c] = n.default() : i.includes(u) && n[u] && (a[c] = n[u]());
|
|
3332
|
-
}),
|
|
3333
|
+
}), Kt(r.tag, r, a);
|
|
3333
3334
|
};
|
|
3334
3335
|
}
|
|
3335
|
-
}),
|
|
3336
|
+
}), Se = {
|
|
3336
3337
|
install(t, r) {
|
|
3337
3338
|
const { i18n: n } = r;
|
|
3338
|
-
t.component("I18nT",
|
|
3339
|
+
t.component("I18nT", He(n));
|
|
3339
3340
|
}
|
|
3340
|
-
},
|
|
3341
|
+
}, Be = {
|
|
3341
3342
|
title: "Star",
|
|
3342
|
-
ariaLabel: "Star buttons/github-buttons on GitHub"
|
|
3343
|
-
|
|
3344
|
-
|
|
3343
|
+
ariaLabel: "Star buttons/github-buttons on GitHub",
|
|
3344
|
+
tooltipLabel: "Star this repository on Github"
|
|
3345
|
+
}, Ne = {
|
|
3346
|
+
githubStar: Be
|
|
3345
3347
|
};
|
|
3346
|
-
function
|
|
3348
|
+
function Ie() {
|
|
3347
3349
|
return {
|
|
3348
|
-
i18n:
|
|
3349
|
-
i18nT:
|
|
3350
|
+
i18n: Ae("en-us", Ne),
|
|
3351
|
+
i18nT: Se
|
|
3350
3352
|
// Translation component <i18n-t>
|
|
3351
3353
|
};
|
|
3352
3354
|
}
|
|
3353
|
-
const
|
|
3354
|
-
useI18n:
|
|
3355
|
-
},
|
|
3355
|
+
const Re = {
|
|
3356
|
+
useI18n: Ie
|
|
3357
|
+
}, Le = {
|
|
3356
3358
|
key: 0,
|
|
3357
3359
|
class: "kong-ui-public-misc-widgets-github-star",
|
|
3358
3360
|
"data-testid": "github-star"
|
|
3359
|
-
},
|
|
3361
|
+
}, Pe = ["aria-label", "href"], Oe = /* @__PURE__ */ vt({
|
|
3360
3362
|
__name: "GithubStar",
|
|
3361
3363
|
props: {
|
|
3362
3364
|
url: {
|
|
3363
3365
|
type: String,
|
|
3364
3366
|
required: !0
|
|
3367
|
+
},
|
|
3368
|
+
tooltipText: {
|
|
3369
|
+
type: String,
|
|
3370
|
+
required: !1,
|
|
3371
|
+
default: ""
|
|
3365
3372
|
}
|
|
3366
3373
|
},
|
|
3367
3374
|
setup(t) {
|
|
3368
|
-
const { i18n:
|
|
3369
|
-
return
|
|
3370
|
-
const
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
}),
|
|
3374
|
-
}), (
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3375
|
+
const r = t, { i18n: n } = Re.useI18n(), e = Zt(() => r.tooltipText || n.t("githubStar.tooltipLabel")), i = Yt(!1);
|
|
3376
|
+
return Wt(async () => {
|
|
3377
|
+
const o = document.createElement("script");
|
|
3378
|
+
o.addEventListener("load", () => {
|
|
3379
|
+
i.value = !0;
|
|
3380
|
+
}), o.setAttribute("src", "https://buttons.github.io/buttons.js"), document.head.appendChild(o);
|
|
3381
|
+
}), (o, a) => t.url && i.value ? (zt(), qt("div", Le, [
|
|
3382
|
+
Qt(k(rr), { label: k(e) }, {
|
|
3383
|
+
default: Jt(() => [
|
|
3384
|
+
at("span", null, [
|
|
3385
|
+
at("a", {
|
|
3386
|
+
"aria-label": k(n).t("githubStar.ariaLabel"),
|
|
3387
|
+
class: "github-button",
|
|
3388
|
+
"data-color-scheme": "no-preference: light; light: light; dark: light;",
|
|
3389
|
+
"data-show-count": "true",
|
|
3390
|
+
href: t.url,
|
|
3391
|
+
target: "_blank"
|
|
3392
|
+
}, $t(k(n).t("githubStar.title")), 9, Pe)
|
|
3393
|
+
])
|
|
3394
|
+
]),
|
|
3395
|
+
_: 1
|
|
3396
|
+
}, 8, ["label"])
|
|
3397
|
+
])) : tr("", !0);
|
|
3384
3398
|
}
|
|
3385
3399
|
});
|
|
3386
|
-
const
|
|
3400
|
+
const Me = (t, r) => {
|
|
3387
3401
|
const n = t.__vccOpts || t;
|
|
3388
3402
|
for (const [e, i] of r)
|
|
3389
3403
|
n[e] = i;
|
|
3390
3404
|
return n;
|
|
3391
|
-
},
|
|
3405
|
+
}, De = /* @__PURE__ */ Me(Oe, [["__scopeId", "data-v-feefac5b"]]);
|
|
3392
3406
|
export {
|
|
3393
|
-
|
|
3407
|
+
De as GithubStar
|
|
3394
3408
|
};
|
|
3395
3409
|
//# sourceMappingURL=misc-widgets.es.js.map
|