@kong-ui-public/misc-widgets 0.4.5 → 0.4.6
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 +383 -382
- package/dist/misc-widgets.umd.js +11 -11
- package/package.json +2 -2
package/dist/misc-widgets.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { defineComponent as vt, h as Kt, computed as Zt, ref as Yt, onMounted as Wt, resolveComponent as zt, openBlock as qt, createElementBlock as Qt, createVNode as Jt, unref as K, withCtx as $t, createElementVNode as at, toDisplayString as tr, createCommentVNode as rr } from "vue";
|
|
2
2
|
var z = function(t, r) {
|
|
3
|
-
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
4
|
-
|
|
5
|
-
} || function(
|
|
6
|
-
for (var i in
|
|
7
|
-
Object.prototype.hasOwnProperty.call(
|
|
3
|
+
return z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
4
|
+
e.__proto__ = n;
|
|
5
|
+
} || function(e, n) {
|
|
6
|
+
for (var i in n)
|
|
7
|
+
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
8
8
|
}, z(t, r);
|
|
9
9
|
};
|
|
10
10
|
function B(t, r) {
|
|
11
11
|
if (typeof r != "function" && r !== null)
|
|
12
12
|
throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
|
|
13
13
|
z(t, r);
|
|
14
|
-
function
|
|
14
|
+
function e() {
|
|
15
15
|
this.constructor = t;
|
|
16
16
|
}
|
|
17
|
-
t.prototype = r === null ? Object.create(r) : (
|
|
17
|
+
t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
|
18
18
|
}
|
|
19
19
|
var m = function() {
|
|
20
20
|
return m = Object.assign || function(t) {
|
|
21
|
-
for (var r,
|
|
22
|
-
r = arguments[
|
|
21
|
+
for (var r, e = 1, n = arguments.length; e < n; e++) {
|
|
22
|
+
r = arguments[e];
|
|
23
23
|
for (var i in r)
|
|
24
24
|
Object.prototype.hasOwnProperty.call(r, i) && (t[i] = r[i]);
|
|
25
25
|
}
|
|
@@ -27,18 +27,18 @@ var m = function() {
|
|
|
27
27
|
}, m.apply(this, arguments);
|
|
28
28
|
};
|
|
29
29
|
function er(t, r) {
|
|
30
|
-
var
|
|
31
|
-
for (var
|
|
32
|
-
Object.prototype.hasOwnProperty.call(t,
|
|
30
|
+
var e = {};
|
|
31
|
+
for (var n in t)
|
|
32
|
+
Object.prototype.hasOwnProperty.call(t, n) && r.indexOf(n) < 0 && (e[n] = t[n]);
|
|
33
33
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
34
|
-
for (var i = 0,
|
|
35
|
-
r.indexOf(
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
function P(t, r,
|
|
39
|
-
if (
|
|
40
|
-
for (var
|
|
41
|
-
(o || !(
|
|
34
|
+
for (var i = 0, n = Object.getOwnPropertySymbols(t); i < n.length; i++)
|
|
35
|
+
r.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[i]) && (e[n[i]] = t[n[i]]);
|
|
36
|
+
return e;
|
|
37
|
+
}
|
|
38
|
+
function P(t, r, e) {
|
|
39
|
+
if (e || arguments.length === 2)
|
|
40
|
+
for (var n = 0, i = r.length, o; n < i; n++)
|
|
41
|
+
(o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
|
|
42
42
|
return t.concat(o || Array.prototype.slice.call(r));
|
|
43
43
|
}
|
|
44
44
|
var g;
|
|
@@ -89,14 +89,14 @@ function q(t) {
|
|
|
89
89
|
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;
|
|
90
90
|
function ar(t) {
|
|
91
91
|
var r = {};
|
|
92
|
-
return t.replace(or, function(
|
|
93
|
-
var
|
|
94
|
-
switch (
|
|
92
|
+
return t.replace(or, function(e) {
|
|
93
|
+
var n = e.length;
|
|
94
|
+
switch (e[0]) {
|
|
95
95
|
case "G":
|
|
96
|
-
r.era =
|
|
96
|
+
r.era = n === 4 ? "long" : n === 5 ? "narrow" : "short";
|
|
97
97
|
break;
|
|
98
98
|
case "y":
|
|
99
|
-
r.year =
|
|
99
|
+
r.year = n === 2 ? "2-digit" : "numeric";
|
|
100
100
|
break;
|
|
101
101
|
case "Y":
|
|
102
102
|
case "u":
|
|
@@ -108,30 +108,30 @@ function ar(t) {
|
|
|
108
108
|
throw new RangeError("`q/Q` (quarter) patterns are not supported");
|
|
109
109
|
case "M":
|
|
110
110
|
case "L":
|
|
111
|
-
r.month = ["numeric", "2-digit", "short", "long", "narrow"][
|
|
111
|
+
r.month = ["numeric", "2-digit", "short", "long", "narrow"][n - 1];
|
|
112
112
|
break;
|
|
113
113
|
case "w":
|
|
114
114
|
case "W":
|
|
115
115
|
throw new RangeError("`w/W` (week) patterns are not supported");
|
|
116
116
|
case "d":
|
|
117
|
-
r.day = ["numeric", "2-digit"][
|
|
117
|
+
r.day = ["numeric", "2-digit"][n - 1];
|
|
118
118
|
break;
|
|
119
119
|
case "D":
|
|
120
120
|
case "F":
|
|
121
121
|
case "g":
|
|
122
122
|
throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
|
|
123
123
|
case "E":
|
|
124
|
-
r.weekday =
|
|
124
|
+
r.weekday = n === 4 ? "short" : n === 5 ? "narrow" : "short";
|
|
125
125
|
break;
|
|
126
126
|
case "e":
|
|
127
|
-
if (
|
|
127
|
+
if (n < 4)
|
|
128
128
|
throw new RangeError("`e..eee` (weekday) patterns are not supported");
|
|
129
|
-
r.weekday = ["short", "long", "narrow", "short"][
|
|
129
|
+
r.weekday = ["short", "long", "narrow", "short"][n - 4];
|
|
130
130
|
break;
|
|
131
131
|
case "c":
|
|
132
|
-
if (
|
|
132
|
+
if (n < 4)
|
|
133
133
|
throw new RangeError("`c..ccc` (weekday) patterns are not supported");
|
|
134
|
-
r.weekday = ["short", "long", "narrow", "short"][
|
|
134
|
+
r.weekday = ["short", "long", "narrow", "short"][n - 4];
|
|
135
135
|
break;
|
|
136
136
|
case "a":
|
|
137
137
|
r.hour12 = !0;
|
|
@@ -140,32 +140,32 @@ function ar(t) {
|
|
|
140
140
|
case "B":
|
|
141
141
|
throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
|
|
142
142
|
case "h":
|
|
143
|
-
r.hourCycle = "h12", r.hour = ["numeric", "2-digit"][
|
|
143
|
+
r.hourCycle = "h12", r.hour = ["numeric", "2-digit"][n - 1];
|
|
144
144
|
break;
|
|
145
145
|
case "H":
|
|
146
|
-
r.hourCycle = "h23", r.hour = ["numeric", "2-digit"][
|
|
146
|
+
r.hourCycle = "h23", r.hour = ["numeric", "2-digit"][n - 1];
|
|
147
147
|
break;
|
|
148
148
|
case "K":
|
|
149
|
-
r.hourCycle = "h11", r.hour = ["numeric", "2-digit"][
|
|
149
|
+
r.hourCycle = "h11", r.hour = ["numeric", "2-digit"][n - 1];
|
|
150
150
|
break;
|
|
151
151
|
case "k":
|
|
152
|
-
r.hourCycle = "h24", r.hour = ["numeric", "2-digit"][
|
|
152
|
+
r.hourCycle = "h24", r.hour = ["numeric", "2-digit"][n - 1];
|
|
153
153
|
break;
|
|
154
154
|
case "j":
|
|
155
155
|
case "J":
|
|
156
156
|
case "C":
|
|
157
157
|
throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
|
|
158
158
|
case "m":
|
|
159
|
-
r.minute = ["numeric", "2-digit"][
|
|
159
|
+
r.minute = ["numeric", "2-digit"][n - 1];
|
|
160
160
|
break;
|
|
161
161
|
case "s":
|
|
162
|
-
r.second = ["numeric", "2-digit"][
|
|
162
|
+
r.second = ["numeric", "2-digit"][n - 1];
|
|
163
163
|
break;
|
|
164
164
|
case "S":
|
|
165
165
|
case "A":
|
|
166
166
|
throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
|
|
167
167
|
case "z":
|
|
168
|
-
r.timeZoneName =
|
|
168
|
+
r.timeZoneName = n < 4 ? "short" : "long";
|
|
169
169
|
break;
|
|
170
170
|
case "Z":
|
|
171
171
|
case "O":
|
|
@@ -184,8 +184,8 @@ function hr(t) {
|
|
|
184
184
|
throw new Error("Number skeleton cannot be empty");
|
|
185
185
|
for (var r = t.split(sr).filter(function(f) {
|
|
186
186
|
return f.length > 0;
|
|
187
|
-
}),
|
|
188
|
-
var o = i[
|
|
187
|
+
}), e = [], n = 0, i = r; n < i.length; n++) {
|
|
188
|
+
var o = i[n], a = o.split("/");
|
|
189
189
|
if (a.length === 0)
|
|
190
190
|
throw new Error("Invalid number skeleton");
|
|
191
191
|
for (var s = a[0], u = a.slice(1), c = 0, h = u; c < h.length; c++) {
|
|
@@ -193,9 +193,9 @@ function hr(t) {
|
|
|
193
193
|
if (l.length === 0)
|
|
194
194
|
throw new Error("Invalid number skeleton");
|
|
195
195
|
}
|
|
196
|
-
|
|
196
|
+
e.push({ stem: s, options: u });
|
|
197
197
|
}
|
|
198
|
-
return
|
|
198
|
+
return e;
|
|
199
199
|
}
|
|
200
200
|
function ur(t) {
|
|
201
201
|
return t.replace(/^(.*?)-/, "");
|
|
@@ -203,8 +203,8 @@ function ur(t) {
|
|
|
203
203
|
var ht = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Lt = /^(@+)?(\+|#+)?[rs]?$/g, cr = /(\*)(0+)|(#+)(0+)|(0+)/g, Pt = /^(0+)$/;
|
|
204
204
|
function ut(t) {
|
|
205
205
|
var r = {};
|
|
206
|
-
return t[t.length - 1] === "r" ? r.roundingPriority = "morePrecision" : t[t.length - 1] === "s" && (r.roundingPriority = "lessPrecision"), t.replace(Lt, function(
|
|
207
|
-
return typeof i != "string" ? (r.minimumSignificantDigits =
|
|
206
|
+
return t[t.length - 1] === "r" ? r.roundingPriority = "morePrecision" : t[t.length - 1] === "s" && (r.roundingPriority = "lessPrecision"), t.replace(Lt, function(e, n, i) {
|
|
207
|
+
return typeof i != "string" ? (r.minimumSignificantDigits = n.length, r.maximumSignificantDigits = n.length) : i === "+" ? r.minimumSignificantDigits = n.length : n[0] === "#" ? r.maximumSignificantDigits = n.length : (r.minimumSignificantDigits = n.length, r.maximumSignificantDigits = n.length + (typeof i == "string" ? i.length : 0)), "";
|
|
208
208
|
}), r;
|
|
209
209
|
}
|
|
210
210
|
function Rt(t) {
|
|
@@ -254,20 +254,20 @@ function lr(t) {
|
|
|
254
254
|
}, t = t.slice(2)) : t[0] === "E" && (r = {
|
|
255
255
|
notation: "scientific"
|
|
256
256
|
}, t = t.slice(1)), r) {
|
|
257
|
-
var
|
|
258
|
-
if (
|
|
257
|
+
var e = t.slice(0, 2);
|
|
258
|
+
if (e === "+!" ? (r.signDisplay = "always", t = t.slice(2)) : e === "+?" && (r.signDisplay = "exceptZero", t = t.slice(2)), !Pt.test(t))
|
|
259
259
|
throw new Error("Malformed concise eng/scientific notation");
|
|
260
260
|
r.minimumIntegerDigits = t.length;
|
|
261
261
|
}
|
|
262
262
|
return r;
|
|
263
263
|
}
|
|
264
264
|
function ct(t) {
|
|
265
|
-
var r = {},
|
|
266
|
-
return
|
|
265
|
+
var r = {}, e = Rt(t);
|
|
266
|
+
return e || r;
|
|
267
267
|
}
|
|
268
268
|
function fr(t) {
|
|
269
|
-
for (var r = {},
|
|
270
|
-
var i = e
|
|
269
|
+
for (var r = {}, e = 0, n = t; e < n.length; e++) {
|
|
270
|
+
var i = n[e];
|
|
271
271
|
switch (i.stem) {
|
|
272
272
|
case "percent":
|
|
273
273
|
case "%":
|
|
@@ -1706,20 +1706,20 @@ var j = {
|
|
|
1706
1706
|
]
|
|
1707
1707
|
};
|
|
1708
1708
|
function mr(t, r) {
|
|
1709
|
-
for (var
|
|
1710
|
-
var i = t.charAt(
|
|
1709
|
+
for (var e = "", n = 0; n < t.length; n++) {
|
|
1710
|
+
var i = t.charAt(n);
|
|
1711
1711
|
if (i === "j") {
|
|
1712
|
-
for (var o = 0;
|
|
1713
|
-
o++,
|
|
1712
|
+
for (var o = 0; n + 1 < t.length && t.charAt(n + 1) === i; )
|
|
1713
|
+
o++, n++;
|
|
1714
1714
|
var a = 1 + (o & 1), s = o < 2 ? 1 : 3 + (o >> 1), u = "a", c = pr(r);
|
|
1715
1715
|
for ((c == "H" || c == "k") && (s = 0); s-- > 0; )
|
|
1716
|
-
|
|
1716
|
+
e += u;
|
|
1717
1717
|
for (; a-- > 0; )
|
|
1718
|
-
|
|
1718
|
+
e = c + e;
|
|
1719
1719
|
} else
|
|
1720
|
-
i === "J" ?
|
|
1720
|
+
i === "J" ? e += "H" : e += i;
|
|
1721
1721
|
}
|
|
1722
|
-
return
|
|
1722
|
+
return e;
|
|
1723
1723
|
}
|
|
1724
1724
|
function pr(t) {
|
|
1725
1725
|
var r = t.hourCycle;
|
|
@@ -1738,9 +1738,9 @@ function pr(t) {
|
|
|
1738
1738
|
default:
|
|
1739
1739
|
throw new Error("Invalid hourCycle");
|
|
1740
1740
|
}
|
|
1741
|
-
var
|
|
1742
|
-
|
|
1743
|
-
var i = j[
|
|
1741
|
+
var e = t.language, n;
|
|
1742
|
+
e !== "root" && (n = t.maximize().region);
|
|
1743
|
+
var i = j[n || ""] || j[e || ""] || j["".concat(e, "-001")] || j["001"];
|
|
1744
1744
|
return i[0];
|
|
1745
1745
|
}
|
|
1746
1746
|
var Z, gr = new RegExp("^".concat(It.source, "*")), Er = new RegExp("".concat(It.source, "*$"));
|
|
@@ -1758,33 +1758,33 @@ try {
|
|
|
1758
1758
|
}
|
|
1759
1759
|
var lt = br ? (
|
|
1760
1760
|
// Native
|
|
1761
|
-
function(t, r,
|
|
1762
|
-
return t.startsWith(r,
|
|
1761
|
+
function(t, r, e) {
|
|
1762
|
+
return t.startsWith(r, e);
|
|
1763
1763
|
}
|
|
1764
1764
|
) : (
|
|
1765
1765
|
// For IE11
|
|
1766
|
-
function(t, r,
|
|
1767
|
-
return t.slice(
|
|
1766
|
+
function(t, r, e) {
|
|
1767
|
+
return t.slice(e, e + r.length) === r;
|
|
1768
1768
|
}
|
|
1769
1769
|
), J = yr ? String.fromCodePoint : (
|
|
1770
1770
|
// IE11
|
|
1771
1771
|
function() {
|
|
1772
1772
|
for (var t = [], r = 0; r < arguments.length; r++)
|
|
1773
1773
|
t[r] = arguments[r];
|
|
1774
|
-
for (var
|
|
1774
|
+
for (var e = "", n = t.length, i = 0, o; n > i; ) {
|
|
1775
1775
|
if (o = t[i++], o > 1114111)
|
|
1776
1776
|
throw RangeError(o + " is not a valid code point");
|
|
1777
|
-
|
|
1777
|
+
e += o < 65536 ? String.fromCharCode(o) : String.fromCharCode(((o -= 65536) >> 10) + 55296, o % 1024 + 56320);
|
|
1778
1778
|
}
|
|
1779
|
-
return
|
|
1779
|
+
return e;
|
|
1780
1780
|
}
|
|
1781
1781
|
), ft = (
|
|
1782
1782
|
// native
|
|
1783
1783
|
dr ? Object.fromEntries : (
|
|
1784
1784
|
// Ponyfill
|
|
1785
1785
|
function(t) {
|
|
1786
|
-
for (var r = {},
|
|
1787
|
-
var i = e
|
|
1786
|
+
for (var r = {}, e = 0, n = t; e < n.length; e++) {
|
|
1787
|
+
var i = n[e], o = i[0], a = i[1];
|
|
1788
1788
|
r[o] = a;
|
|
1789
1789
|
}
|
|
1790
1790
|
return r;
|
|
@@ -1798,10 +1798,10 @@ var lt = br ? (
|
|
|
1798
1798
|
) : (
|
|
1799
1799
|
// IE 11
|
|
1800
1800
|
function(t, r) {
|
|
1801
|
-
var
|
|
1802
|
-
if (!(r < 0 || r >=
|
|
1803
|
-
var
|
|
1804
|
-
return
|
|
1801
|
+
var e = t.length;
|
|
1802
|
+
if (!(r < 0 || r >= e)) {
|
|
1803
|
+
var n = t.charCodeAt(r), i;
|
|
1804
|
+
return n < 55296 || n > 56319 || r + 1 === e || (i = t.charCodeAt(r + 1)) < 56320 || i > 57343 ? n : (n - 55296 << 10) + (i - 56320) + 65536;
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
1807
|
), Br = Tr ? (
|
|
@@ -1832,59 +1832,59 @@ var $;
|
|
|
1832
1832
|
if (Q) {
|
|
1833
1833
|
var mt = Ct("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
|
|
1834
1834
|
$ = function(t, r) {
|
|
1835
|
-
var
|
|
1835
|
+
var e;
|
|
1836
1836
|
mt.lastIndex = r;
|
|
1837
|
-
var
|
|
1838
|
-
return (
|
|
1837
|
+
var n = mt.exec(t);
|
|
1838
|
+
return (e = n[1]) !== null && e !== void 0 ? e : "";
|
|
1839
1839
|
};
|
|
1840
1840
|
} else
|
|
1841
1841
|
$ = function(t, r) {
|
|
1842
|
-
for (var
|
|
1843
|
-
var
|
|
1844
|
-
if (
|
|
1842
|
+
for (var e = []; ; ) {
|
|
1843
|
+
var n = Ot(t, r);
|
|
1844
|
+
if (n === void 0 || Mt(n) || Rr(n))
|
|
1845
1845
|
break;
|
|
1846
|
-
|
|
1846
|
+
e.push(n), r += n >= 65536 ? 2 : 1;
|
|
1847
1847
|
}
|
|
1848
|
-
return J.apply(void 0,
|
|
1848
|
+
return J.apply(void 0, e);
|
|
1849
1849
|
};
|
|
1850
1850
|
var Ir = (
|
|
1851
1851
|
/** @class */
|
|
1852
1852
|
function() {
|
|
1853
|
-
function t(r,
|
|
1854
|
-
|
|
1853
|
+
function t(r, e) {
|
|
1854
|
+
e === void 0 && (e = {}), this.message = r, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!e.ignoreTag, this.locale = e.locale, this.requiresOtherClause = !!e.requiresOtherClause, this.shouldParseSkeletons = !!e.shouldParseSkeletons;
|
|
1855
1855
|
}
|
|
1856
1856
|
return t.prototype.parse = function() {
|
|
1857
1857
|
if (this.offset() !== 0)
|
|
1858
1858
|
throw Error("parser can only be used once");
|
|
1859
1859
|
return this.parseMessage(0, "", !1);
|
|
1860
|
-
}, t.prototype.parseMessage = function(r,
|
|
1860
|
+
}, t.prototype.parseMessage = function(r, e, n) {
|
|
1861
1861
|
for (var i = []; !this.isEOF(); ) {
|
|
1862
1862
|
var o = this.char();
|
|
1863
1863
|
if (o === 123) {
|
|
1864
|
-
var a = this.parseArgument(r,
|
|
1864
|
+
var a = this.parseArgument(r, n);
|
|
1865
1865
|
if (a.err)
|
|
1866
1866
|
return a;
|
|
1867
1867
|
i.push(a.val);
|
|
1868
1868
|
} else {
|
|
1869
1869
|
if (o === 125 && r > 0)
|
|
1870
1870
|
break;
|
|
1871
|
-
if (o === 35 && (
|
|
1871
|
+
if (o === 35 && (e === "plural" || e === "selectordinal")) {
|
|
1872
1872
|
var s = this.clonePosition();
|
|
1873
1873
|
this.bump(), i.push({
|
|
1874
1874
|
type: y.pound,
|
|
1875
1875
|
location: E(s, this.clonePosition())
|
|
1876
1876
|
});
|
|
1877
1877
|
} else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
1878
|
-
if (
|
|
1878
|
+
if (n)
|
|
1879
1879
|
break;
|
|
1880
1880
|
return this.error(g.UNMATCHED_CLOSING_TAG, E(this.clonePosition(), this.clonePosition()));
|
|
1881
1881
|
} else if (o === 60 && !this.ignoreTag && tt(this.peek() || 0)) {
|
|
1882
|
-
var a = this.parseTag(r,
|
|
1882
|
+
var a = this.parseTag(r, e);
|
|
1883
1883
|
if (a.err)
|
|
1884
1884
|
return a;
|
|
1885
1885
|
i.push(a.val);
|
|
1886
1886
|
} else {
|
|
1887
|
-
var a = this.parseLiteral(r,
|
|
1887
|
+
var a = this.parseLiteral(r, e);
|
|
1888
1888
|
if (a.err)
|
|
1889
1889
|
return a;
|
|
1890
1890
|
i.push(a.val);
|
|
@@ -1892,8 +1892,8 @@ var Ir = (
|
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
1894
|
return { val: i, err: null };
|
|
1895
|
-
}, t.prototype.parseTag = function(r,
|
|
1896
|
-
var
|
|
1895
|
+
}, t.prototype.parseTag = function(r, e) {
|
|
1896
|
+
var n = this.clonePosition();
|
|
1897
1897
|
this.bump();
|
|
1898
1898
|
var i = this.parseTagName();
|
|
1899
1899
|
if (this.bumpSpace(), this.bumpIf("/>"))
|
|
@@ -1901,12 +1901,12 @@ var Ir = (
|
|
|
1901
1901
|
val: {
|
|
1902
1902
|
type: y.literal,
|
|
1903
1903
|
value: "<".concat(i, "/>"),
|
|
1904
|
-
location: E(
|
|
1904
|
+
location: E(n, this.clonePosition())
|
|
1905
1905
|
},
|
|
1906
1906
|
err: null
|
|
1907
1907
|
};
|
|
1908
1908
|
if (this.bumpIf(">")) {
|
|
1909
|
-
var o = this.parseMessage(r + 1,
|
|
1909
|
+
var o = this.parseMessage(r + 1, e, !0);
|
|
1910
1910
|
if (o.err)
|
|
1911
1911
|
return o;
|
|
1912
1912
|
var a = o.val, s = this.clonePosition();
|
|
@@ -1919,27 +1919,27 @@ var Ir = (
|
|
|
1919
1919
|
type: y.tag,
|
|
1920
1920
|
value: i,
|
|
1921
1921
|
children: a,
|
|
1922
|
-
location: E(
|
|
1922
|
+
location: E(n, this.clonePosition())
|
|
1923
1923
|
},
|
|
1924
1924
|
err: null
|
|
1925
1925
|
} : this.error(g.INVALID_TAG, E(s, this.clonePosition())));
|
|
1926
1926
|
} else
|
|
1927
|
-
return this.error(g.UNCLOSED_TAG, E(
|
|
1927
|
+
return this.error(g.UNCLOSED_TAG, E(n, this.clonePosition()));
|
|
1928
1928
|
} else
|
|
1929
|
-
return this.error(g.INVALID_TAG, E(
|
|
1929
|
+
return this.error(g.INVALID_TAG, E(n, this.clonePosition()));
|
|
1930
1930
|
}, t.prototype.parseTagName = function() {
|
|
1931
1931
|
var r = this.offset();
|
|
1932
1932
|
for (this.bump(); !this.isEOF() && Pr(this.char()); )
|
|
1933
1933
|
this.bump();
|
|
1934
1934
|
return this.message.slice(r, this.offset());
|
|
1935
|
-
}, t.prototype.parseLiteral = function(r,
|
|
1936
|
-
for (var
|
|
1937
|
-
var o = this.tryParseQuote(
|
|
1935
|
+
}, t.prototype.parseLiteral = function(r, e) {
|
|
1936
|
+
for (var n = this.clonePosition(), i = ""; ; ) {
|
|
1937
|
+
var o = this.tryParseQuote(e);
|
|
1938
1938
|
if (o) {
|
|
1939
1939
|
i += o;
|
|
1940
1940
|
continue;
|
|
1941
1941
|
}
|
|
1942
|
-
var a = this.tryParseUnquoted(r,
|
|
1942
|
+
var a = this.tryParseUnquoted(r, e);
|
|
1943
1943
|
if (a) {
|
|
1944
1944
|
i += a;
|
|
1945
1945
|
continue;
|
|
@@ -1951,7 +1951,7 @@ var Ir = (
|
|
|
1951
1951
|
}
|
|
1952
1952
|
break;
|
|
1953
1953
|
}
|
|
1954
|
-
var u = E(
|
|
1954
|
+
var u = E(n, this.clonePosition());
|
|
1955
1955
|
return {
|
|
1956
1956
|
val: { type: y.literal, value: i, location: u },
|
|
1957
1957
|
err: null
|
|
@@ -1978,37 +1978,37 @@ var Ir = (
|
|
|
1978
1978
|
return null;
|
|
1979
1979
|
}
|
|
1980
1980
|
this.bump();
|
|
1981
|
-
var
|
|
1981
|
+
var e = [this.char()];
|
|
1982
1982
|
for (this.bump(); !this.isEOF(); ) {
|
|
1983
|
-
var
|
|
1984
|
-
if (
|
|
1983
|
+
var n = this.char();
|
|
1984
|
+
if (n === 39)
|
|
1985
1985
|
if (this.peek() === 39)
|
|
1986
|
-
|
|
1986
|
+
e.push(39), this.bump();
|
|
1987
1987
|
else {
|
|
1988
1988
|
this.bump();
|
|
1989
1989
|
break;
|
|
1990
1990
|
}
|
|
1991
1991
|
else
|
|
1992
|
-
|
|
1992
|
+
e.push(n);
|
|
1993
1993
|
this.bump();
|
|
1994
1994
|
}
|
|
1995
|
-
return J.apply(void 0,
|
|
1996
|
-
}, t.prototype.tryParseUnquoted = function(r,
|
|
1995
|
+
return J.apply(void 0, e);
|
|
1996
|
+
}, t.prototype.tryParseUnquoted = function(r, e) {
|
|
1997
1997
|
if (this.isEOF())
|
|
1998
1998
|
return null;
|
|
1999
|
-
var
|
|
2000
|
-
return
|
|
2001
|
-
}, t.prototype.parseArgument = function(r,
|
|
2002
|
-
var
|
|
1999
|
+
var n = this.char();
|
|
2000
|
+
return n === 60 || n === 123 || n === 35 && (e === "plural" || e === "selectordinal") || n === 125 && r > 0 ? null : (this.bump(), J(n));
|
|
2001
|
+
}, t.prototype.parseArgument = function(r, e) {
|
|
2002
|
+
var n = this.clonePosition();
|
|
2003
2003
|
if (this.bump(), this.bumpSpace(), this.isEOF())
|
|
2004
|
-
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, E(
|
|
2004
|
+
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition()));
|
|
2005
2005
|
if (this.char() === 125)
|
|
2006
|
-
return this.bump(), this.error(g.EMPTY_ARGUMENT, E(
|
|
2006
|
+
return this.bump(), this.error(g.EMPTY_ARGUMENT, E(n, this.clonePosition()));
|
|
2007
2007
|
var i = this.parseIdentifierIfPossible().value;
|
|
2008
2008
|
if (!i)
|
|
2009
|
-
return this.error(g.MALFORMED_ARGUMENT, E(
|
|
2009
|
+
return this.error(g.MALFORMED_ARGUMENT, E(n, this.clonePosition()));
|
|
2010
2010
|
if (this.bumpSpace(), this.isEOF())
|
|
2011
|
-
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, E(
|
|
2011
|
+
return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition()));
|
|
2012
2012
|
switch (this.char()) {
|
|
2013
2013
|
case 125:
|
|
2014
2014
|
return this.bump(), {
|
|
@@ -2016,21 +2016,21 @@ var Ir = (
|
|
|
2016
2016
|
type: y.argument,
|
|
2017
2017
|
// value does not include the opening and closing braces.
|
|
2018
2018
|
value: i,
|
|
2019
|
-
location: E(
|
|
2019
|
+
location: E(n, this.clonePosition())
|
|
2020
2020
|
},
|
|
2021
2021
|
err: null
|
|
2022
2022
|
};
|
|
2023
2023
|
case 44:
|
|
2024
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, E(
|
|
2024
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition())) : this.parseArgumentOptions(r, e, i, n);
|
|
2025
2025
|
default:
|
|
2026
|
-
return this.error(g.MALFORMED_ARGUMENT, E(
|
|
2026
|
+
return this.error(g.MALFORMED_ARGUMENT, E(n, this.clonePosition()));
|
|
2027
2027
|
}
|
|
2028
2028
|
}, t.prototype.parseIdentifierIfPossible = function() {
|
|
2029
|
-
var r = this.clonePosition(),
|
|
2029
|
+
var r = this.clonePosition(), e = this.offset(), n = $(this.message, e), i = e + n.length;
|
|
2030
2030
|
this.bumpTo(i);
|
|
2031
2031
|
var o = this.clonePosition(), a = E(r, o);
|
|
2032
|
-
return { value:
|
|
2033
|
-
}, t.prototype.parseArgumentOptions = function(r,
|
|
2032
|
+
return { value: n, location: a };
|
|
2033
|
+
}, t.prototype.parseArgumentOptions = function(r, e, n, i) {
|
|
2034
2034
|
var o, a = this.clonePosition(), s = this.parseIdentifierIfPossible().value, u = this.clonePosition();
|
|
2035
2035
|
switch (s) {
|
|
2036
2036
|
case "":
|
|
@@ -2060,7 +2060,7 @@ var Ir = (
|
|
|
2060
2060
|
if (s === "number") {
|
|
2061
2061
|
var l = this.parseNumberSkeletonFromString(v, c.styleLocation);
|
|
2062
2062
|
return l.err ? l : {
|
|
2063
|
-
val: { type: y.number, value:
|
|
2063
|
+
val: { type: y.number, value: n, location: b, style: l.val },
|
|
2064
2064
|
err: null
|
|
2065
2065
|
};
|
|
2066
2066
|
} else {
|
|
@@ -2075,7 +2075,7 @@ var Ir = (
|
|
|
2075
2075
|
parsedOptions: this.shouldParseSkeletons ? ar(T) : {}
|
|
2076
2076
|
}, S = s === "date" ? y.date : y.time;
|
|
2077
2077
|
return {
|
|
2078
|
-
val: { type: S, value:
|
|
2078
|
+
val: { type: S, value: n, location: b, style: f },
|
|
2079
2079
|
err: null
|
|
2080
2080
|
};
|
|
2081
2081
|
}
|
|
@@ -2083,7 +2083,7 @@ var Ir = (
|
|
|
2083
2083
|
return {
|
|
2084
2084
|
val: {
|
|
2085
2085
|
type: s === "number" ? y.number : s === "date" ? y.date : y.time,
|
|
2086
|
-
value:
|
|
2086
|
+
value: n,
|
|
2087
2087
|
location: b,
|
|
2088
2088
|
style: (o = c == null ? void 0 : c.style) !== null && o !== void 0 ? o : null
|
|
2089
2089
|
},
|
|
@@ -2107,7 +2107,7 @@ var Ir = (
|
|
|
2107
2107
|
return l;
|
|
2108
2108
|
this.bumpSpace(), G = this.parseIdentifierIfPossible(), O = l.val;
|
|
2109
2109
|
}
|
|
2110
|
-
var k = this.tryParsePluralOrSelectOptions(r, s,
|
|
2110
|
+
var k = this.tryParsePluralOrSelectOptions(r, s, e, G);
|
|
2111
2111
|
if (k.err)
|
|
2112
2112
|
return k;
|
|
2113
2113
|
var d = this.tryParseArgumentClose(i);
|
|
@@ -2117,7 +2117,7 @@ var Ir = (
|
|
|
2117
2117
|
return s === "select" ? {
|
|
2118
2118
|
val: {
|
|
2119
2119
|
type: y.select,
|
|
2120
|
-
value:
|
|
2120
|
+
value: n,
|
|
2121
2121
|
options: ft(k.val),
|
|
2122
2122
|
location: ot
|
|
2123
2123
|
},
|
|
@@ -2125,7 +2125,7 @@ var Ir = (
|
|
|
2125
2125
|
} : {
|
|
2126
2126
|
val: {
|
|
2127
2127
|
type: y.plural,
|
|
2128
|
-
value:
|
|
2128
|
+
value: n,
|
|
2129
2129
|
options: ft(k.val),
|
|
2130
2130
|
offset: O,
|
|
2131
2131
|
pluralType: s === "plural" ? "cardinal" : "ordinal",
|
|
@@ -2140,9 +2140,9 @@ var Ir = (
|
|
|
2140
2140
|
}, t.prototype.tryParseArgumentClose = function(r) {
|
|
2141
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
2142
|
}, t.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
2143
|
-
for (var r = 0,
|
|
2144
|
-
var
|
|
2145
|
-
switch (
|
|
2143
|
+
for (var r = 0, e = this.clonePosition(); !this.isEOF(); ) {
|
|
2144
|
+
var n = this.char();
|
|
2145
|
+
switch (n) {
|
|
2146
2146
|
case 39: {
|
|
2147
2147
|
this.bump();
|
|
2148
2148
|
var i = this.clonePosition();
|
|
@@ -2160,7 +2160,7 @@ var Ir = (
|
|
|
2160
2160
|
r -= 1;
|
|
2161
2161
|
else
|
|
2162
2162
|
return {
|
|
2163
|
-
val: this.message.slice(
|
|
2163
|
+
val: this.message.slice(e.offset, this.offset()),
|
|
2164
2164
|
err: null
|
|
2165
2165
|
};
|
|
2166
2166
|
break;
|
|
@@ -2171,30 +2171,30 @@ var Ir = (
|
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
2173
2173
|
return {
|
|
2174
|
-
val: this.message.slice(
|
|
2174
|
+
val: this.message.slice(e.offset, this.offset()),
|
|
2175
2175
|
err: null
|
|
2176
2176
|
};
|
|
2177
|
-
}, t.prototype.parseNumberSkeletonFromString = function(r,
|
|
2178
|
-
var
|
|
2177
|
+
}, t.prototype.parseNumberSkeletonFromString = function(r, e) {
|
|
2178
|
+
var n = [];
|
|
2179
2179
|
try {
|
|
2180
|
-
|
|
2180
|
+
n = hr(r);
|
|
2181
2181
|
} catch {
|
|
2182
|
-
return this.error(g.INVALID_NUMBER_SKELETON,
|
|
2182
|
+
return this.error(g.INVALID_NUMBER_SKELETON, e);
|
|
2183
2183
|
}
|
|
2184
2184
|
return {
|
|
2185
2185
|
val: {
|
|
2186
2186
|
type: D.number,
|
|
2187
|
-
tokens:
|
|
2188
|
-
location:
|
|
2189
|
-
parsedOptions: this.shouldParseSkeletons ? fr(
|
|
2187
|
+
tokens: n,
|
|
2188
|
+
location: e,
|
|
2189
|
+
parsedOptions: this.shouldParseSkeletons ? fr(n) : {}
|
|
2190
2190
|
},
|
|
2191
2191
|
err: null
|
|
2192
2192
|
};
|
|
2193
|
-
}, t.prototype.tryParsePluralOrSelectOptions = function(r,
|
|
2193
|
+
}, t.prototype.tryParsePluralOrSelectOptions = function(r, e, n, i) {
|
|
2194
2194
|
for (var o, a = !1, s = [], u = /* @__PURE__ */ new Set(), c = i.value, h = i.location; ; ) {
|
|
2195
2195
|
if (c.length === 0) {
|
|
2196
2196
|
var l = this.clonePosition();
|
|
2197
|
-
if (
|
|
2197
|
+
if (e !== "select" && this.bumpIf("=")) {
|
|
2198
2198
|
var f = this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR, g.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
2199
2199
|
if (f.err)
|
|
2200
2200
|
return f;
|
|
@@ -2203,12 +2203,12 @@ var Ir = (
|
|
|
2203
2203
|
break;
|
|
2204
2204
|
}
|
|
2205
2205
|
if (u.has(c))
|
|
2206
|
-
return this.error(
|
|
2206
|
+
return this.error(e === "select" ? g.DUPLICATE_SELECT_ARGUMENT_SELECTOR : g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, h);
|
|
2207
2207
|
c === "other" && (a = !0), this.bumpSpace();
|
|
2208
2208
|
var p = this.clonePosition();
|
|
2209
2209
|
if (!this.bumpIf("{"))
|
|
2210
|
-
return this.error(
|
|
2211
|
-
var d = this.parseMessage(r + 1,
|
|
2210
|
+
return this.error(e === "select" ? g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, E(this.clonePosition(), this.clonePosition()));
|
|
2211
|
+
var d = this.parseMessage(r + 1, e, n);
|
|
2212
2212
|
if (d.err)
|
|
2213
2213
|
return d;
|
|
2214
2214
|
var b = this.tryParseArgumentClose(p);
|
|
@@ -2222,10 +2222,10 @@ var Ir = (
|
|
|
2222
2222
|
}
|
|
2223
2223
|
]), u.add(c), this.bumpSpace(), o = this.parseIdentifierIfPossible(), c = o.value, h = o.location;
|
|
2224
2224
|
}
|
|
2225
|
-
return s.length === 0 ? this.error(
|
|
2226
|
-
}, t.prototype.tryParseDecimalInteger = function(r,
|
|
2227
|
-
var
|
|
2228
|
-
this.bumpIf("+") || this.bumpIf("-") && (
|
|
2225
|
+
return s.length === 0 ? this.error(e === "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, e) {
|
|
2227
|
+
var n = 1, i = this.clonePosition();
|
|
2228
|
+
this.bumpIf("+") || this.bumpIf("-") && (n = -1);
|
|
2229
2229
|
for (var o = !1, a = 0; !this.isEOF(); ) {
|
|
2230
2230
|
var s = this.char();
|
|
2231
2231
|
if (s >= 48 && s <= 57)
|
|
@@ -2234,7 +2234,7 @@ var Ir = (
|
|
|
2234
2234
|
break;
|
|
2235
2235
|
}
|
|
2236
2236
|
var u = E(i, this.clonePosition());
|
|
2237
|
-
return o ? (a *=
|
|
2237
|
+
return o ? (a *= n, Sr(a) ? { val: a, err: null } : this.error(e, u)) : this.error(r, u);
|
|
2238
2238
|
}, t.prototype.offset = function() {
|
|
2239
2239
|
return this.position.offset;
|
|
2240
2240
|
}, t.prototype.isEOF = function() {
|
|
@@ -2249,17 +2249,17 @@ var Ir = (
|
|
|
2249
2249
|
var r = this.position.offset;
|
|
2250
2250
|
if (r >= this.message.length)
|
|
2251
2251
|
throw Error("out of bound");
|
|
2252
|
-
var
|
|
2253
|
-
if (
|
|
2252
|
+
var e = Ot(this.message, r);
|
|
2253
|
+
if (e === void 0)
|
|
2254
2254
|
throw Error("Offset ".concat(r, " is at invalid UTF-16 code unit boundary"));
|
|
2255
|
-
return
|
|
2256
|
-
}, t.prototype.error = function(r,
|
|
2255
|
+
return e;
|
|
2256
|
+
}, t.prototype.error = function(r, e) {
|
|
2257
2257
|
return {
|
|
2258
2258
|
val: null,
|
|
2259
2259
|
err: {
|
|
2260
2260
|
kind: r,
|
|
2261
2261
|
message: this.message,
|
|
2262
|
-
location:
|
|
2262
|
+
location: e
|
|
2263
2263
|
}
|
|
2264
2264
|
};
|
|
2265
2265
|
}, t.prototype.bump = function() {
|
|
@@ -2269,22 +2269,22 @@ var Ir = (
|
|
|
2269
2269
|
}
|
|
2270
2270
|
}, t.prototype.bumpIf = function(r) {
|
|
2271
2271
|
if (lt(this.message, r, this.offset())) {
|
|
2272
|
-
for (var
|
|
2272
|
+
for (var e = 0; e < r.length; e++)
|
|
2273
2273
|
this.bump();
|
|
2274
2274
|
return !0;
|
|
2275
2275
|
}
|
|
2276
2276
|
return !1;
|
|
2277
2277
|
}, t.prototype.bumpUntil = function(r) {
|
|
2278
|
-
var
|
|
2279
|
-
return
|
|
2278
|
+
var e = this.offset(), n = this.message.indexOf(r, e);
|
|
2279
|
+
return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
|
|
2280
2280
|
}, t.prototype.bumpTo = function(r) {
|
|
2281
2281
|
if (this.offset() > r)
|
|
2282
2282
|
throw Error("targetOffset ".concat(r, " must be greater than or equal to the current offset ").concat(this.offset()));
|
|
2283
2283
|
for (r = Math.min(r, this.message.length); ; ) {
|
|
2284
|
-
var
|
|
2285
|
-
if (
|
|
2284
|
+
var e = this.offset();
|
|
2285
|
+
if (e === r)
|
|
2286
2286
|
break;
|
|
2287
|
-
if (
|
|
2287
|
+
if (e > r)
|
|
2288
2288
|
throw Error("targetOffset ".concat(r, " is at invalid UTF-16 code unit boundary"));
|
|
2289
2289
|
if (this.bump(), this.isEOF())
|
|
2290
2290
|
break;
|
|
@@ -2295,8 +2295,8 @@ var Ir = (
|
|
|
2295
2295
|
}, t.prototype.peek = function() {
|
|
2296
2296
|
if (this.isEOF())
|
|
2297
2297
|
return null;
|
|
2298
|
-
var r = this.char(),
|
|
2299
|
-
return
|
|
2298
|
+
var r = this.char(), e = this.offset(), n = this.message.charCodeAt(e + (r >= 65536 ? 2 : 1));
|
|
2299
|
+
return n ?? null;
|
|
2300
2300
|
}, t;
|
|
2301
2301
|
}()
|
|
2302
2302
|
);
|
|
@@ -2318,45 +2318,45 @@ function Rr(t) {
|
|
|
2318
2318
|
function rt(t) {
|
|
2319
2319
|
t.forEach(function(r) {
|
|
2320
2320
|
if (delete r.location, St(r) || At(r))
|
|
2321
|
-
for (var
|
|
2322
|
-
delete r.options[
|
|
2321
|
+
for (var e in r.options)
|
|
2322
|
+
delete r.options[e].location, rt(r.options[e].value);
|
|
2323
2323
|
else
|
|
2324
2324
|
Tt(r) && Nt(r.style) || (_t(r) || Ht(r)) && q(r.style) ? delete r.style.location : Bt(r) && rt(r.children);
|
|
2325
2325
|
});
|
|
2326
2326
|
}
|
|
2327
2327
|
function Or(t, r) {
|
|
2328
2328
|
r === void 0 && (r = {}), r = m({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, r);
|
|
2329
|
-
var
|
|
2330
|
-
if (
|
|
2331
|
-
var
|
|
2332
|
-
throw
|
|
2329
|
+
var e = new Ir(t, r).parse();
|
|
2330
|
+
if (e.err) {
|
|
2331
|
+
var n = SyntaxError(g[e.err.kind]);
|
|
2332
|
+
throw n.location = e.err.location, n.originalMessage = e.err.message, n;
|
|
2333
2333
|
}
|
|
2334
|
-
return r != null && r.captureLocation || rt(
|
|
2334
|
+
return r != null && r.captureLocation || rt(e.val), e.val;
|
|
2335
2335
|
}
|
|
2336
2336
|
function N(t, r) {
|
|
2337
|
-
var
|
|
2337
|
+
var e = r && r.cache ? r.cache : Ur, n = r && r.serializer ? r.serializer : Gr, i = r && r.strategy ? r.strategy : Mr;
|
|
2338
2338
|
return i(t, {
|
|
2339
|
-
cache:
|
|
2340
|
-
serializer:
|
|
2339
|
+
cache: e,
|
|
2340
|
+
serializer: n
|
|
2341
2341
|
});
|
|
2342
2342
|
}
|
|
2343
2343
|
function Cr(t) {
|
|
2344
2344
|
return t == null || typeof t == "number" || typeof t == "boolean";
|
|
2345
2345
|
}
|
|
2346
|
-
function wt(t, r,
|
|
2347
|
-
var i = Cr(
|
|
2348
|
-
return typeof o > "u" && (o = t.call(this,
|
|
2346
|
+
function wt(t, r, e, n) {
|
|
2347
|
+
var i = Cr(n) ? n : e(n), o = r.get(i);
|
|
2348
|
+
return typeof o > "u" && (o = t.call(this, n), r.set(i, o)), o;
|
|
2349
2349
|
}
|
|
2350
|
-
function Dt(t, r,
|
|
2351
|
-
var
|
|
2352
|
-
return typeof o > "u" && (o = t.apply(this,
|
|
2350
|
+
function Dt(t, r, e) {
|
|
2351
|
+
var n = Array.prototype.slice.call(arguments, 3), i = e(n), o = r.get(i);
|
|
2352
|
+
return typeof o > "u" && (o = t.apply(this, n), r.set(i, o)), o;
|
|
2353
2353
|
}
|
|
2354
|
-
function et(t, r,
|
|
2355
|
-
return
|
|
2354
|
+
function et(t, r, e, n, i) {
|
|
2355
|
+
return e.bind(r, t, n, i);
|
|
2356
2356
|
}
|
|
2357
2357
|
function Mr(t, r) {
|
|
2358
|
-
var
|
|
2359
|
-
return et(t, this,
|
|
2358
|
+
var e = t.length === 1 ? wt : Dt;
|
|
2359
|
+
return et(t, this, e, r.cache.create(), r.serializer);
|
|
2360
2360
|
}
|
|
2361
2361
|
function wr(t, r) {
|
|
2362
2362
|
return et(t, this, Dt, r.cache.create(), r.serializer);
|
|
@@ -2391,9 +2391,9 @@ var R = (
|
|
|
2391
2391
|
/** @class */
|
|
2392
2392
|
function(t) {
|
|
2393
2393
|
B(r, t);
|
|
2394
|
-
function r(
|
|
2395
|
-
var o = t.call(this,
|
|
2396
|
-
return o.code =
|
|
2394
|
+
function r(e, n, i) {
|
|
2395
|
+
var o = t.call(this, e) || this;
|
|
2396
|
+
return o.code = n, o.originalMessage = i, o;
|
|
2397
2397
|
}
|
|
2398
2398
|
return r.prototype.toString = function() {
|
|
2399
2399
|
return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
|
|
@@ -2403,8 +2403,8 @@ var R = (
|
|
|
2403
2403
|
/** @class */
|
|
2404
2404
|
function(t) {
|
|
2405
2405
|
B(r, t);
|
|
2406
|
-
function r(
|
|
2407
|
-
return t.call(this, 'Invalid values for "'.concat(
|
|
2406
|
+
function r(e, n, i, o) {
|
|
2407
|
+
return t.call(this, 'Invalid values for "'.concat(e, '": "').concat(n, '". Options are "').concat(Object.keys(i).join('", "'), '"'), L.INVALID_VALUE, o) || this;
|
|
2408
2408
|
}
|
|
2409
2409
|
return r;
|
|
2410
2410
|
}(R)
|
|
@@ -2412,8 +2412,8 @@ var R = (
|
|
|
2412
2412
|
/** @class */
|
|
2413
2413
|
function(t) {
|
|
2414
2414
|
B(r, t);
|
|
2415
|
-
function r(
|
|
2416
|
-
return t.call(this, 'Value for "'.concat(
|
|
2415
|
+
function r(e, n, i) {
|
|
2416
|
+
return t.call(this, 'Value for "'.concat(e, '" must be of type ').concat(n), L.INVALID_VALUE, i) || this;
|
|
2417
2417
|
}
|
|
2418
2418
|
return r;
|
|
2419
2419
|
}(R)
|
|
@@ -2421,8 +2421,8 @@ var R = (
|
|
|
2421
2421
|
/** @class */
|
|
2422
2422
|
function(t) {
|
|
2423
2423
|
B(r, t);
|
|
2424
|
-
function r(
|
|
2425
|
-
return t.call(this, 'The intl string context variable "'.concat(
|
|
2424
|
+
function r(e, n) {
|
|
2425
|
+
return t.call(this, 'The intl string context variable "'.concat(e, '" was not provided to the string "').concat(n, '"'), L.MISSING_VALUE, n) || this;
|
|
2426
2426
|
}
|
|
2427
2427
|
return r;
|
|
2428
2428
|
}(R)
|
|
@@ -2431,15 +2431,15 @@ var R = (
|
|
|
2431
2431
|
t[t.literal = 0] = "literal", t[t.object = 1] = "object";
|
|
2432
2432
|
})(H || (H = {}));
|
|
2433
2433
|
function jr(t) {
|
|
2434
|
-
return t.length < 2 ? t : t.reduce(function(r,
|
|
2435
|
-
var
|
|
2436
|
-
return !
|
|
2434
|
+
return t.length < 2 ? t : t.reduce(function(r, e) {
|
|
2435
|
+
var n = r[r.length - 1];
|
|
2436
|
+
return !n || n.type !== H.literal || e.type !== H.literal ? r.push(e) : n.value += e.value, r;
|
|
2437
2437
|
}, []);
|
|
2438
2438
|
}
|
|
2439
2439
|
function Vr(t) {
|
|
2440
2440
|
return typeof t == "function";
|
|
2441
2441
|
}
|
|
2442
|
-
function x(t, r,
|
|
2442
|
+
function x(t, r, e, n, i, o, a) {
|
|
2443
2443
|
if (t.length === 1 && st(t[0]))
|
|
2444
2444
|
return [
|
|
2445
2445
|
{
|
|
@@ -2459,7 +2459,7 @@ function x(t, r, n, e, i, o, a) {
|
|
|
2459
2459
|
if (ir(h)) {
|
|
2460
2460
|
typeof o == "number" && s.push({
|
|
2461
2461
|
type: H.literal,
|
|
2462
|
-
value:
|
|
2462
|
+
value: e.getNumberFormat(r).format(o)
|
|
2463
2463
|
});
|
|
2464
2464
|
continue;
|
|
2465
2465
|
}
|
|
@@ -2475,26 +2475,26 @@ function x(t, r, n, e, i, o, a) {
|
|
|
2475
2475
|
continue;
|
|
2476
2476
|
}
|
|
2477
2477
|
if (_t(h)) {
|
|
2478
|
-
var p = typeof h.style == "string" ?
|
|
2478
|
+
var p = typeof h.style == "string" ? n.date[h.style] : q(h.style) ? h.style.parsedOptions : void 0;
|
|
2479
2479
|
s.push({
|
|
2480
2480
|
type: H.literal,
|
|
2481
|
-
value:
|
|
2481
|
+
value: e.getDateTimeFormat(r, p).format(f)
|
|
2482
2482
|
});
|
|
2483
2483
|
continue;
|
|
2484
2484
|
}
|
|
2485
2485
|
if (Ht(h)) {
|
|
2486
|
-
var p = typeof h.style == "string" ?
|
|
2486
|
+
var p = typeof h.style == "string" ? n.time[h.style] : q(h.style) ? h.style.parsedOptions : n.time.medium;
|
|
2487
2487
|
s.push({
|
|
2488
2488
|
type: H.literal,
|
|
2489
|
-
value:
|
|
2489
|
+
value: e.getDateTimeFormat(r, p).format(f)
|
|
2490
2490
|
});
|
|
2491
2491
|
continue;
|
|
2492
2492
|
}
|
|
2493
2493
|
if (Tt(h)) {
|
|
2494
|
-
var p = typeof h.style == "string" ?
|
|
2494
|
+
var p = typeof h.style == "string" ? n.number[h.style] : Nt(h.style) ? h.style.parsedOptions : void 0;
|
|
2495
2495
|
p && p.scale && (f = f * (p.scale || 1)), s.push({
|
|
2496
2496
|
type: H.literal,
|
|
2497
|
-
value:
|
|
2497
|
+
value: e.getNumberFormat(r, p).format(f)
|
|
2498
2498
|
});
|
|
2499
2499
|
continue;
|
|
2500
2500
|
}
|
|
@@ -2502,7 +2502,7 @@ function x(t, r, n, e, i, o, a) {
|
|
|
2502
2502
|
var d = h.children, b = h.value, v = i[b];
|
|
2503
2503
|
if (!Vr(v))
|
|
2504
2504
|
throw new Fr(b, "function", a);
|
|
2505
|
-
var T = x(d, r,
|
|
2505
|
+
var T = x(d, r, e, n, i, o), S = v(T.map(function(O) {
|
|
2506
2506
|
return O.value;
|
|
2507
2507
|
}));
|
|
2508
2508
|
Array.isArray(S) || (S = [S]), s.push.apply(s, S.map(function(O) {
|
|
@@ -2516,7 +2516,7 @@ function x(t, r, n, e, i, o, a) {
|
|
|
2516
2516
|
var _ = h.options[f] || h.options.other;
|
|
2517
2517
|
if (!_)
|
|
2518
2518
|
throw new pt(h.value, f, Object.keys(h.options), a);
|
|
2519
|
-
s.push.apply(s, x(_.value, r,
|
|
2519
|
+
s.push.apply(s, x(_.value, r, e, n, i));
|
|
2520
2520
|
continue;
|
|
2521
2521
|
}
|
|
2522
2522
|
if (At(h)) {
|
|
@@ -2526,25 +2526,25 @@ function x(t, r, n, e, i, o, a) {
|
|
|
2526
2526
|
throw new R(`Intl.PluralRules is not available in this environment.
|
|
2527
2527
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
2528
2528
|
`, L.MISSING_INTL_API, a);
|
|
2529
|
-
var G =
|
|
2529
|
+
var G = e.getPluralRules(r, { type: h.pluralType }).select(f - (h.offset || 0));
|
|
2530
2530
|
_ = h.options[G] || h.options.other;
|
|
2531
2531
|
}
|
|
2532
2532
|
if (!_)
|
|
2533
2533
|
throw new pt(h.value, f, Object.keys(h.options), a);
|
|
2534
|
-
s.push.apply(s, x(_.value, r,
|
|
2534
|
+
s.push.apply(s, x(_.value, r, e, n, i, f - (h.offset || 0)));
|
|
2535
2535
|
continue;
|
|
2536
2536
|
}
|
|
2537
2537
|
}
|
|
2538
2538
|
return jr(s);
|
|
2539
2539
|
}
|
|
2540
2540
|
function xr(t, r) {
|
|
2541
|
-
return r ? m(m(m({}, t || {}), r || {}), Object.keys(t).reduce(function(
|
|
2542
|
-
return n
|
|
2541
|
+
return r ? m(m(m({}, t || {}), r || {}), Object.keys(t).reduce(function(e, n) {
|
|
2542
|
+
return e[n] = m(m({}, t[n]), r[n] || {}), e;
|
|
2543
2543
|
}, {})) : t;
|
|
2544
2544
|
}
|
|
2545
2545
|
function Xr(t, r) {
|
|
2546
|
-
return r ? Object.keys(t).reduce(function(
|
|
2547
|
-
return n
|
|
2546
|
+
return r ? Object.keys(t).reduce(function(e, n) {
|
|
2547
|
+
return e[n] = xr(t[n], r[n]), e;
|
|
2548
2548
|
}, m({}, t)) : t;
|
|
2549
2549
|
}
|
|
2550
2550
|
function Y(t) {
|
|
@@ -2554,8 +2554,8 @@ function Y(t) {
|
|
|
2554
2554
|
get: function(r) {
|
|
2555
2555
|
return t[r];
|
|
2556
2556
|
},
|
|
2557
|
-
set: function(r,
|
|
2558
|
-
t[r] =
|
|
2557
|
+
set: function(r, e) {
|
|
2558
|
+
t[r] = e;
|
|
2559
2559
|
}
|
|
2560
2560
|
};
|
|
2561
2561
|
}
|
|
@@ -2568,25 +2568,25 @@ function Kr(t) {
|
|
|
2568
2568
|
pluralRules: {}
|
|
2569
2569
|
}), {
|
|
2570
2570
|
getNumberFormat: N(function() {
|
|
2571
|
-
for (var r,
|
|
2572
|
-
n
|
|
2573
|
-
return new ((r = Intl.NumberFormat).bind.apply(r, P([void 0],
|
|
2571
|
+
for (var r, e = [], n = 0; n < arguments.length; n++)
|
|
2572
|
+
e[n] = arguments[n];
|
|
2573
|
+
return new ((r = Intl.NumberFormat).bind.apply(r, P([void 0], e, !1)))();
|
|
2574
2574
|
}, {
|
|
2575
2575
|
cache: Y(t.number),
|
|
2576
2576
|
strategy: I.variadic
|
|
2577
2577
|
}),
|
|
2578
2578
|
getDateTimeFormat: N(function() {
|
|
2579
|
-
for (var r,
|
|
2580
|
-
n
|
|
2581
|
-
return new ((r = Intl.DateTimeFormat).bind.apply(r, P([void 0],
|
|
2579
|
+
for (var r, e = [], n = 0; n < arguments.length; n++)
|
|
2580
|
+
e[n] = arguments[n];
|
|
2581
|
+
return new ((r = Intl.DateTimeFormat).bind.apply(r, P([void 0], e, !1)))();
|
|
2582
2582
|
}, {
|
|
2583
2583
|
cache: Y(t.dateTime),
|
|
2584
2584
|
strategy: I.variadic
|
|
2585
2585
|
}),
|
|
2586
2586
|
getPluralRules: N(function() {
|
|
2587
|
-
for (var r,
|
|
2588
|
-
n
|
|
2589
|
-
return new ((r = Intl.PluralRules).bind.apply(r, P([void 0],
|
|
2587
|
+
for (var r, e = [], n = 0; n < arguments.length; n++)
|
|
2588
|
+
e[n] = arguments[n];
|
|
2589
|
+
return new ((r = Intl.PluralRules).bind.apply(r, P([void 0], e, !1)))();
|
|
2590
2590
|
}, {
|
|
2591
2591
|
cache: Y(t.pluralRules),
|
|
2592
2592
|
strategy: I.variadic
|
|
@@ -2596,8 +2596,8 @@ function Kr(t) {
|
|
|
2596
2596
|
var Gt = (
|
|
2597
2597
|
/** @class */
|
|
2598
2598
|
function() {
|
|
2599
|
-
function t(r,
|
|
2600
|
-
|
|
2599
|
+
function t(r, e, n, i) {
|
|
2600
|
+
e === void 0 && (e = t.defaultLocale);
|
|
2601
2601
|
var o = this;
|
|
2602
2602
|
if (this.formatterCache = {
|
|
2603
2603
|
number: {},
|
|
@@ -2620,7 +2620,7 @@ var Gt = (
|
|
|
2620
2620
|
};
|
|
2621
2621
|
}, this.getAst = function() {
|
|
2622
2622
|
return o.ast;
|
|
2623
|
-
}, this.locales =
|
|
2623
|
+
}, this.locales = e, this.resolvedLocale = t.resolveLocale(e), typeof r == "string") {
|
|
2624
2624
|
if (this.message = r, !t.__parse)
|
|
2625
2625
|
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
2626
2626
|
var a = i || {};
|
|
@@ -2631,7 +2631,7 @@ var Gt = (
|
|
|
2631
2631
|
this.ast = r;
|
|
2632
2632
|
if (!Array.isArray(this.ast))
|
|
2633
2633
|
throw new TypeError("A message must be provided as a String or AST.");
|
|
2634
|
-
this.formats = Xr(t.formats,
|
|
2634
|
+
this.formats = Xr(t.formats, n), this.formatters = i && i.formatters || Kr(this.formatterCache);
|
|
2635
2635
|
}
|
|
2636
2636
|
return Object.defineProperty(t, "defaultLocale", {
|
|
2637
2637
|
get: function() {
|
|
@@ -2641,8 +2641,8 @@ var Gt = (
|
|
|
2641
2641
|
configurable: !0
|
|
2642
2642
|
}), t.memoizedDefaultLocale = null, t.resolveLocale = function(r) {
|
|
2643
2643
|
if (!(typeof Intl.Locale > "u")) {
|
|
2644
|
-
var
|
|
2645
|
-
return
|
|
2644
|
+
var e = Intl.NumberFormat.supportedLocalesOf(r);
|
|
2645
|
+
return e.length > 0 ? new Intl.Locale(e[0]) : new Intl.Locale(typeof r == "string" ? r : r[0]);
|
|
2646
2646
|
}
|
|
2647
2647
|
}, t.__parse = Or, t.formats = {
|
|
2648
2648
|
number: {
|
|
@@ -2712,12 +2712,12 @@ var F = (
|
|
|
2712
2712
|
/** @class */
|
|
2713
2713
|
function(t) {
|
|
2714
2714
|
B(r, t);
|
|
2715
|
-
function r(
|
|
2715
|
+
function r(e, n, i) {
|
|
2716
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(
|
|
2717
|
+
return o = t.call(this, "[@formatjs/intl Error ".concat(e, "] ").concat(n, `
|
|
2718
2718
|
`).concat(a ? `
|
|
2719
2719
|
`.concat(a.message, `
|
|
2720
|
-
`).concat(a.stack) : "")) || this, o.code =
|
|
2720
|
+
`).concat(a.stack) : "")) || this, o.code = e, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(o, r), o;
|
|
2721
2721
|
}
|
|
2722
2722
|
return r;
|
|
2723
2723
|
}(Error)
|
|
@@ -2725,8 +2725,8 @@ var F = (
|
|
|
2725
2725
|
/** @class */
|
|
2726
2726
|
function(t) {
|
|
2727
2727
|
B(r, t);
|
|
2728
|
-
function r(
|
|
2729
|
-
return t.call(this, M.UNSUPPORTED_FORMATTER,
|
|
2728
|
+
function r(e, n) {
|
|
2729
|
+
return t.call(this, M.UNSUPPORTED_FORMATTER, e, n) || this;
|
|
2730
2730
|
}
|
|
2731
2731
|
return r;
|
|
2732
2732
|
}(F)
|
|
@@ -2734,8 +2734,8 @@ var F = (
|
|
|
2734
2734
|
/** @class */
|
|
2735
2735
|
function(t) {
|
|
2736
2736
|
B(r, t);
|
|
2737
|
-
function r(
|
|
2738
|
-
return t.call(this, M.INVALID_CONFIG,
|
|
2737
|
+
function r(e, n) {
|
|
2738
|
+
return t.call(this, M.INVALID_CONFIG, e, n) || this;
|
|
2739
2739
|
}
|
|
2740
2740
|
return r;
|
|
2741
2741
|
}(F)
|
|
@@ -2743,8 +2743,8 @@ var F = (
|
|
|
2743
2743
|
/** @class */
|
|
2744
2744
|
function(t) {
|
|
2745
2745
|
B(r, t);
|
|
2746
|
-
function r(
|
|
2747
|
-
return t.call(this, M.MISSING_DATA,
|
|
2746
|
+
function r(e, n) {
|
|
2747
|
+
return t.call(this, M.MISSING_DATA, e, n) || this;
|
|
2748
2748
|
}
|
|
2749
2749
|
return r;
|
|
2750
2750
|
}(F)
|
|
@@ -2752,11 +2752,11 @@ var F = (
|
|
|
2752
2752
|
/** @class */
|
|
2753
2753
|
function(t) {
|
|
2754
2754
|
B(r, t);
|
|
2755
|
-
function r(
|
|
2756
|
-
var o = t.call(this, M.FORMAT_ERROR, "".concat(
|
|
2757
|
-
Locale: `).concat(
|
|
2755
|
+
function r(e, n, i) {
|
|
2756
|
+
var o = t.call(this, M.FORMAT_ERROR, "".concat(e, `
|
|
2757
|
+
Locale: `).concat(n, `
|
|
2758
2758
|
`), i) || this;
|
|
2759
|
-
return o.locale =
|
|
2759
|
+
return o.locale = n, o;
|
|
2760
2760
|
}
|
|
2761
2761
|
return r;
|
|
2762
2762
|
}(F)
|
|
@@ -2764,13 +2764,13 @@ Locale: `).concat(e, `
|
|
|
2764
2764
|
/** @class */
|
|
2765
2765
|
function(t) {
|
|
2766
2766
|
B(r, t);
|
|
2767
|
-
function r(
|
|
2768
|
-
var a = t.call(this, "".concat(
|
|
2767
|
+
function r(e, n, i, o) {
|
|
2768
|
+
var a = t.call(this, "".concat(e, `
|
|
2769
2769
|
MessageID: `).concat(i == null ? void 0 : i.id, `
|
|
2770
2770
|
Default Message: `).concat(i == null ? void 0 : i.defaultMessage, `
|
|
2771
2771
|
Description: `).concat(i == null ? void 0 : i.description, `
|
|
2772
|
-
`),
|
|
2773
|
-
return a.descriptor = i, a.locale =
|
|
2772
|
+
`), n, o) || this;
|
|
2773
|
+
return a.descriptor = i, a.locale = n, a;
|
|
2774
2774
|
}
|
|
2775
2775
|
return r;
|
|
2776
2776
|
}(A)
|
|
@@ -2778,19 +2778,19 @@ Description: `).concat(i == null ? void 0 : i.description, `
|
|
|
2778
2778
|
/** @class */
|
|
2779
2779
|
function(t) {
|
|
2780
2780
|
B(r, t);
|
|
2781
|
-
function r(
|
|
2782
|
-
var i = t.call(this, M.MISSING_TRANSLATION, 'Missing message: "'.concat(
|
|
2781
|
+
function r(e, n) {
|
|
2782
|
+
var i = t.call(this, M.MISSING_TRANSLATION, 'Missing message: "'.concat(e.id, '" for locale "').concat(n, '", using ').concat(e.defaultMessage ? "default message (".concat(typeof e.defaultMessage == "string" ? e.defaultMessage : e.defaultMessage.map(function(o) {
|
|
2783
2783
|
var a;
|
|
2784
2784
|
return (a = o.value) !== null && a !== void 0 ? a : JSON.stringify(o);
|
|
2785
2785
|
}).join(), ")") : "id", " as fallback.")) || this;
|
|
2786
|
-
return i.descriptor =
|
|
2786
|
+
return i.descriptor = e, i;
|
|
2787
2787
|
}
|
|
2788
2788
|
return r;
|
|
2789
2789
|
}(F)
|
|
2790
2790
|
);
|
|
2791
|
-
function w(t, r,
|
|
2792
|
-
return
|
|
2793
|
-
return i in t ?
|
|
2791
|
+
function w(t, r, e) {
|
|
2792
|
+
return e === void 0 && (e = {}), r.reduce(function(n, i) {
|
|
2793
|
+
return i in t ? n[i] = t[i] : i in e && (n[i] = e[i]), n;
|
|
2794
2794
|
}, {});
|
|
2795
2795
|
}
|
|
2796
2796
|
var zr = function(t) {
|
|
@@ -2825,8 +2825,8 @@ function C(t) {
|
|
|
2825
2825
|
get: function(r) {
|
|
2826
2826
|
return t[r];
|
|
2827
2827
|
},
|
|
2828
|
-
set: function(r,
|
|
2829
|
-
t[r] =
|
|
2828
|
+
set: function(r, e) {
|
|
2829
|
+
t[r] = e;
|
|
2830
2830
|
}
|
|
2831
2831
|
};
|
|
2832
2832
|
}
|
|
@@ -2834,7 +2834,7 @@ function C(t) {
|
|
|
2834
2834
|
}
|
|
2835
2835
|
function Jr(t) {
|
|
2836
2836
|
t === void 0 && (t = Ut());
|
|
2837
|
-
var r = Intl.RelativeTimeFormat,
|
|
2837
|
+
var r = Intl.RelativeTimeFormat, e = Intl.ListFormat, n = Intl.DisplayNames, i = N(function() {
|
|
2838
2838
|
for (var s, u = [], c = 0; c < arguments.length; c++)
|
|
2839
2839
|
u[c] = arguments[c];
|
|
2840
2840
|
return new ((s = Intl.DateTimeFormat).bind.apply(s, P([void 0], u, !1)))();
|
|
@@ -2881,7 +2881,7 @@ function Jr(t) {
|
|
|
2881
2881
|
getListFormat: N(function() {
|
|
2882
2882
|
for (var s = [], u = 0; u < arguments.length; u++)
|
|
2883
2883
|
s[u] = arguments[u];
|
|
2884
|
-
return new (
|
|
2884
|
+
return new (e.bind.apply(e, P([void 0], s, !1)))();
|
|
2885
2885
|
}, {
|
|
2886
2886
|
cache: C(t.list),
|
|
2887
2887
|
strategy: I.variadic
|
|
@@ -2889,44 +2889,44 @@ function Jr(t) {
|
|
|
2889
2889
|
getDisplayNames: N(function() {
|
|
2890
2890
|
for (var s = [], u = 0; u < arguments.length; u++)
|
|
2891
2891
|
s[u] = arguments[u];
|
|
2892
|
-
return new (
|
|
2892
|
+
return new (n.bind.apply(n, P([void 0], s, !1)))();
|
|
2893
2893
|
}, {
|
|
2894
2894
|
cache: C(t.displayNames),
|
|
2895
2895
|
strategy: I.variadic
|
|
2896
2896
|
})
|
|
2897
2897
|
};
|
|
2898
2898
|
}
|
|
2899
|
-
function it(t, r,
|
|
2899
|
+
function it(t, r, e, n) {
|
|
2900
2900
|
var i = t && t[r], o;
|
|
2901
|
-
if (i && (o = i[
|
|
2901
|
+
if (i && (o = i[e]), o)
|
|
2902
2902
|
return o;
|
|
2903
|
-
|
|
2903
|
+
n(new Zr("No ".concat(r, " format named: ").concat(e)));
|
|
2904
2904
|
}
|
|
2905
|
-
function $r(t, r,
|
|
2906
|
-
if (
|
|
2907
|
-
throw new
|
|
2905
|
+
function $r(t, r, e) {
|
|
2906
|
+
if (e === void 0 && (e = Error), !t)
|
|
2907
|
+
throw new e(r);
|
|
2908
2908
|
}
|
|
2909
2909
|
function V(t, r) {
|
|
2910
|
-
return Object.keys(t).reduce(function(
|
|
2911
|
-
return n
|
|
2910
|
+
return Object.keys(t).reduce(function(e, n) {
|
|
2911
|
+
return e[n] = m({ timeZone: r }, t[n]), e;
|
|
2912
2912
|
}, {});
|
|
2913
2913
|
}
|
|
2914
2914
|
function Et(t, r) {
|
|
2915
|
-
var
|
|
2916
|
-
return
|
|
2917
|
-
return
|
|
2915
|
+
var e = Object.keys(m(m({}, t), r));
|
|
2916
|
+
return e.reduce(function(n, i) {
|
|
2917
|
+
return n[i] = m(m({}, t[i] || {}), r[i] || {}), n;
|
|
2918
2918
|
}, {});
|
|
2919
2919
|
}
|
|
2920
2920
|
function bt(t, r) {
|
|
2921
2921
|
if (!r)
|
|
2922
2922
|
return t;
|
|
2923
|
-
var
|
|
2924
|
-
return m(m(m({},
|
|
2923
|
+
var e = Gt.formats;
|
|
2924
|
+
return m(m(m({}, e), t), { date: Et(V(e.date, r), V(t.date || {}, r)), time: Et(V(e.time, r), V(t.time || {}, r)) });
|
|
2925
2925
|
}
|
|
2926
|
-
var yt = function(t, r,
|
|
2926
|
+
var yt = function(t, r, e, n, i) {
|
|
2927
2927
|
var o = t.locale, a = t.formats, s = t.messages, u = t.defaultLocale, c = t.defaultFormats, h = t.fallbackOnEmptyString, l = t.onError, f = t.timeZone, p = t.defaultRichTextElements;
|
|
2928
|
-
|
|
2929
|
-
var d =
|
|
2928
|
+
e === void 0 && (e = { id: "" });
|
|
2929
|
+
var d = e.id, b = e.defaultMessage;
|
|
2930
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
2931
|
var v = String(d), T = (
|
|
2932
2932
|
// In case messages is Object.create(null)
|
|
@@ -2936,32 +2936,32 @@ var yt = function(t, r, n, e, i) {
|
|
|
2936
2936
|
);
|
|
2937
2937
|
if (Array.isArray(T) && T.length === 1 && T[0].type === y.literal)
|
|
2938
2938
|
return T[0].value;
|
|
2939
|
-
if (!
|
|
2939
|
+
if (!n && T && typeof T == "string" && !p)
|
|
2940
2940
|
return T.replace(/'\{(.*?)\}'/gi, "{$1}");
|
|
2941
|
-
if (
|
|
2941
|
+
if (n = m(m({}, p), n || {}), a = bt(a, f), c = bt(c, f), !T) {
|
|
2942
2942
|
if (h === !1 && T === "")
|
|
2943
2943
|
return T;
|
|
2944
|
-
if ((!b || o && o.toLowerCase() !== u.toLowerCase()) && l(new Wr(
|
|
2944
|
+
if ((!b || o && o.toLowerCase() !== u.toLowerCase()) && l(new Wr(e, o)), b)
|
|
2945
2945
|
try {
|
|
2946
2946
|
var S = r.getMessageFormat(b, u, c, i);
|
|
2947
|
-
return S.format(
|
|
2947
|
+
return S.format(n);
|
|
2948
2948
|
} catch (_) {
|
|
2949
|
-
return l(new W('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), o,
|
|
2949
|
+
return l(new W('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), o, e, _)), typeof b == "string" ? b : v;
|
|
2950
2950
|
}
|
|
2951
2951
|
return v;
|
|
2952
2952
|
}
|
|
2953
2953
|
try {
|
|
2954
2954
|
var S = r.getMessageFormat(T, o, a, m({ formatters: r }, i || {}));
|
|
2955
|
-
return S.format(
|
|
2955
|
+
return S.format(n);
|
|
2956
2956
|
} catch (_) {
|
|
2957
|
-
l(new W('Error formatting message: "'.concat(v, '", using ').concat(b ? "default message" : "id", " as fallback."), o,
|
|
2957
|
+
l(new W('Error formatting message: "'.concat(v, '", using ').concat(b ? "default message" : "id", " as fallback."), o, e, _));
|
|
2958
2958
|
}
|
|
2959
2959
|
if (b)
|
|
2960
2960
|
try {
|
|
2961
2961
|
var S = r.getMessageFormat(b, u, c, i);
|
|
2962
|
-
return S.format(
|
|
2962
|
+
return S.format(n);
|
|
2963
2963
|
} catch (_) {
|
|
2964
|
-
l(new W('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), o,
|
|
2964
|
+
l(new W('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), o, e, _));
|
|
2965
2965
|
}
|
|
2966
2966
|
return typeof T == "string" ? T : typeof b == "string" ? b : v;
|
|
2967
2967
|
}, Ft = [
|
|
@@ -2985,16 +2985,16 @@ var yt = function(t, r, n, e, i) {
|
|
|
2985
2985
|
"numberingSystem",
|
|
2986
2986
|
"fractionalSecondDigits"
|
|
2987
2987
|
];
|
|
2988
|
-
function X(t, r,
|
|
2988
|
+
function X(t, r, e, n) {
|
|
2989
2989
|
var i = t.locale, o = t.formats, a = t.onError, s = t.timeZone;
|
|
2990
|
-
|
|
2991
|
-
var u =
|
|
2992
|
-
return r === "time" && !h.hour && !h.minute && !h.second && !h.timeStyle && !h.dateStyle && (h = m(m({}, h), { hour: "numeric", minute: "numeric" })),
|
|
2990
|
+
n === void 0 && (n = {});
|
|
2991
|
+
var u = n.format, c = m(m({}, s && { timeZone: s }), u && it(o, r, u, a)), h = w(n, Ft, c);
|
|
2992
|
+
return r === "time" && !h.hour && !h.minute && !h.second && !h.timeStyle && !h.dateStyle && (h = m(m({}, h), { hour: "numeric", minute: "numeric" })), e(i, h);
|
|
2993
2993
|
}
|
|
2994
2994
|
function te(t, r) {
|
|
2995
|
-
for (var
|
|
2996
|
-
n
|
|
2997
|
-
var i =
|
|
2995
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
2996
|
+
e[n - 2] = arguments[n];
|
|
2997
|
+
var i = e[0], o = e[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
2998
2998
|
try {
|
|
2999
2999
|
return X(t, "date", r, a).format(s);
|
|
3000
3000
|
} catch (u) {
|
|
@@ -3003,9 +3003,9 @@ function te(t, r) {
|
|
|
3003
3003
|
return String(s);
|
|
3004
3004
|
}
|
|
3005
3005
|
function re(t, r) {
|
|
3006
|
-
for (var
|
|
3007
|
-
n
|
|
3008
|
-
var i =
|
|
3006
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
3007
|
+
e[n - 2] = arguments[n];
|
|
3008
|
+
var i = e[0], o = e[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3009
3009
|
try {
|
|
3010
3010
|
return X(t, "time", r, a).format(s);
|
|
3011
3011
|
} catch (u) {
|
|
@@ -3014,9 +3014,9 @@ function re(t, r) {
|
|
|
3014
3014
|
return String(s);
|
|
3015
3015
|
}
|
|
3016
3016
|
function ee(t, r) {
|
|
3017
|
-
for (var
|
|
3018
|
-
n
|
|
3019
|
-
var i =
|
|
3017
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
3018
|
+
e[n - 2] = arguments[n];
|
|
3019
|
+
var i = e[0], o = e[1], a = e[2], s = a === void 0 ? {} : a, u = t.timeZone, c = t.locale, h = t.onError, l = w(s, Ft, u ? { timeZone: u } : {});
|
|
3020
3020
|
try {
|
|
3021
3021
|
return r(c, l).formatRange(i, o);
|
|
3022
3022
|
} catch (f) {
|
|
@@ -3025,9 +3025,9 @@ function ee(t, r) {
|
|
|
3025
3025
|
return String(i);
|
|
3026
3026
|
}
|
|
3027
3027
|
function ne(t, r) {
|
|
3028
|
-
for (var
|
|
3029
|
-
n
|
|
3030
|
-
var i =
|
|
3028
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
3029
|
+
e[n - 2] = arguments[n];
|
|
3030
|
+
var i = e[0], o = e[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3031
3031
|
try {
|
|
3032
3032
|
return X(t, "date", r, a).formatToParts(s);
|
|
3033
3033
|
} catch (u) {
|
|
@@ -3036,9 +3036,9 @@ function ne(t, r) {
|
|
|
3036
3036
|
return [];
|
|
3037
3037
|
}
|
|
3038
3038
|
function ie(t, r) {
|
|
3039
|
-
for (var
|
|
3040
|
-
n
|
|
3041
|
-
var i =
|
|
3039
|
+
for (var e = [], n = 2; n < arguments.length; n++)
|
|
3040
|
+
e[n - 2] = arguments[n];
|
|
3041
|
+
var i = e[0], o = e[1], a = o === void 0 ? {} : o, s = typeof i == "string" ? new Date(i || 0) : i;
|
|
3042
3042
|
try {
|
|
3043
3043
|
return X(t, "time", r, a).formatToParts(s);
|
|
3044
3044
|
} catch (u) {
|
|
@@ -3052,14 +3052,14 @@ var oe = [
|
|
|
3052
3052
|
"fallback",
|
|
3053
3053
|
"languageDisplay"
|
|
3054
3054
|
];
|
|
3055
|
-
function ae(t, r,
|
|
3055
|
+
function ae(t, r, e, n) {
|
|
3056
3056
|
var i = t.locale, o = t.onError, a = Intl.DisplayNames;
|
|
3057
3057
|
a || o(new R(`Intl.DisplayNames is not available in this environment.
|
|
3058
3058
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
3059
3059
|
`, L.MISSING_INTL_API));
|
|
3060
|
-
var s = w(
|
|
3060
|
+
var s = w(n, oe);
|
|
3061
3061
|
try {
|
|
3062
|
-
return r(i, s).of(
|
|
3062
|
+
return r(i, s).of(e);
|
|
3063
3063
|
} catch (u) {
|
|
3064
3064
|
o(new A("Error formatting display name.", i, u));
|
|
3065
3065
|
}
|
|
@@ -3071,24 +3071,24 @@ var se = [
|
|
|
3071
3071
|
function he(t) {
|
|
3072
3072
|
return "".concat(dt, "_").concat(t, "_").concat(dt);
|
|
3073
3073
|
}
|
|
3074
|
-
function ue(t, r,
|
|
3075
|
-
|
|
3076
|
-
var i = kt(t, r,
|
|
3074
|
+
function ue(t, r, e, n) {
|
|
3075
|
+
n === void 0 && (n = {});
|
|
3076
|
+
var i = kt(t, r, e, n).reduce(function(o, a) {
|
|
3077
3077
|
var s = a.value;
|
|
3078
3078
|
return typeof s != "string" ? o.push(s) : typeof o[o.length - 1] == "string" ? o[o.length - 1] += s : o.push(s), o;
|
|
3079
3079
|
}, []);
|
|
3080
3080
|
return i.length === 1 ? i[0] : i.length === 0 ? "" : i;
|
|
3081
3081
|
}
|
|
3082
|
-
function kt(t, r,
|
|
3082
|
+
function kt(t, r, e, n) {
|
|
3083
3083
|
var i = t.locale, o = t.onError;
|
|
3084
|
-
|
|
3084
|
+
n === void 0 && (n = {});
|
|
3085
3085
|
var a = Intl.ListFormat;
|
|
3086
3086
|
a || o(new R(`Intl.ListFormat is not available in this environment.
|
|
3087
3087
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
3088
3088
|
`, L.MISSING_INTL_API));
|
|
3089
|
-
var s = w(
|
|
3089
|
+
var s = w(n, se);
|
|
3090
3090
|
try {
|
|
3091
|
-
var u = {}, c =
|
|
3091
|
+
var u = {}, c = e.map(function(h, l) {
|
|
3092
3092
|
if (typeof h == "object") {
|
|
3093
3093
|
var f = he(l);
|
|
3094
3094
|
return u[f] = h, f;
|
|
@@ -3101,41 +3101,41 @@ Try polyfilling it using "@formatjs/intl-listformat"
|
|
|
3101
3101
|
} catch (h) {
|
|
3102
3102
|
o(new A("Error formatting list.", i, h));
|
|
3103
3103
|
}
|
|
3104
|
-
return
|
|
3104
|
+
return e;
|
|
3105
3105
|
}
|
|
3106
3106
|
var ce = ["type"];
|
|
3107
|
-
function le(t, r,
|
|
3107
|
+
function le(t, r, e, n) {
|
|
3108
3108
|
var i = t.locale, o = t.onError;
|
|
3109
|
-
|
|
3109
|
+
n === void 0 && (n = {}), Intl.PluralRules || o(new R(`Intl.PluralRules is not available in this environment.
|
|
3110
3110
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3111
3111
|
`, L.MISSING_INTL_API));
|
|
3112
|
-
var a = w(
|
|
3112
|
+
var a = w(n, ce);
|
|
3113
3113
|
try {
|
|
3114
|
-
return r(i, a).select(
|
|
3114
|
+
return r(i, a).select(e);
|
|
3115
3115
|
} catch (s) {
|
|
3116
3116
|
o(new A("Error formatting plural.", i, s));
|
|
3117
3117
|
}
|
|
3118
3118
|
return "other";
|
|
3119
3119
|
}
|
|
3120
3120
|
var fe = ["numeric", "style"];
|
|
3121
|
-
function me(t, r,
|
|
3122
|
-
var
|
|
3123
|
-
|
|
3124
|
-
var a =
|
|
3125
|
-
return r(
|
|
3121
|
+
function me(t, r, e) {
|
|
3122
|
+
var n = t.locale, i = t.formats, o = t.onError;
|
|
3123
|
+
e === void 0 && (e = {});
|
|
3124
|
+
var a = e.format, s = !!a && it(i, "relative", a, o) || {}, u = w(e, fe, s);
|
|
3125
|
+
return r(n, u);
|
|
3126
3126
|
}
|
|
3127
|
-
function pe(t, r,
|
|
3128
|
-
i === void 0 && (i = {}),
|
|
3127
|
+
function pe(t, r, e, n, i) {
|
|
3128
|
+
i === void 0 && (i = {}), n || (n = "second");
|
|
3129
3129
|
var o = Intl.RelativeTimeFormat;
|
|
3130
3130
|
o || t.onError(new R(`Intl.RelativeTimeFormat is not available in this environment.
|
|
3131
3131
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
3132
3132
|
`, L.MISSING_INTL_API));
|
|
3133
3133
|
try {
|
|
3134
|
-
return me(t, r, i).format(
|
|
3134
|
+
return me(t, r, i).format(e, n);
|
|
3135
3135
|
} catch (a) {
|
|
3136
3136
|
t.onError(new A("Error formatting relative time.", t.locale, a));
|
|
3137
3137
|
}
|
|
3138
|
-
return String(
|
|
3138
|
+
return String(e);
|
|
3139
3139
|
}
|
|
3140
3140
|
var ge = [
|
|
3141
3141
|
"style",
|
|
@@ -3159,25 +3159,25 @@ var ge = [
|
|
|
3159
3159
|
"unitDisplay",
|
|
3160
3160
|
"numberingSystem"
|
|
3161
3161
|
];
|
|
3162
|
-
function jt(t, r,
|
|
3163
|
-
var
|
|
3164
|
-
n === void 0 && (n = {});
|
|
3165
|
-
var a = n.format, s = a && it(i, "number", a, o) || {}, u = w(n, ge, s);
|
|
3166
|
-
return r(e, u);
|
|
3167
|
-
}
|
|
3168
|
-
function Ee(t, r, n, e) {
|
|
3162
|
+
function jt(t, r, e) {
|
|
3163
|
+
var n = t.locale, i = t.formats, o = t.onError;
|
|
3169
3164
|
e === void 0 && (e = {});
|
|
3165
|
+
var a = e.format, s = a && it(i, "number", a, o) || {}, u = w(e, ge, s);
|
|
3166
|
+
return r(n, u);
|
|
3167
|
+
}
|
|
3168
|
+
function Ee(t, r, e, n) {
|
|
3169
|
+
n === void 0 && (n = {});
|
|
3170
3170
|
try {
|
|
3171
|
-
return jt(t, r,
|
|
3171
|
+
return jt(t, r, n).format(e);
|
|
3172
3172
|
} catch (i) {
|
|
3173
3173
|
t.onError(new A("Error formatting number.", t.locale, i));
|
|
3174
3174
|
}
|
|
3175
|
-
return String(
|
|
3175
|
+
return String(e);
|
|
3176
3176
|
}
|
|
3177
|
-
function be(t, r,
|
|
3178
|
-
|
|
3177
|
+
function be(t, r, e, n) {
|
|
3178
|
+
n === void 0 && (n = {});
|
|
3179
3179
|
try {
|
|
3180
|
-
return jt(t, r,
|
|
3180
|
+
return jt(t, r, n).formatToParts(e);
|
|
3181
3181
|
} catch (i) {
|
|
3182
3182
|
t.onError(new A("Error formatting number.", t.locale, i));
|
|
3183
3183
|
}
|
|
@@ -3193,25 +3193,25 @@ Please consider using "@formatjs/cli" to pre-compile your messages for performan
|
|
|
3193
3193
|
For more details see https://formatjs.io/docs/getting-started/message-distribution`);
|
|
3194
3194
|
}
|
|
3195
3195
|
function ve(t, r) {
|
|
3196
|
-
var
|
|
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'))),
|
|
3198
|
-
formatters:
|
|
3199
|
-
formatNumber: Ee.bind(null,
|
|
3200
|
-
formatNumberToParts: be.bind(null,
|
|
3201
|
-
formatRelativeTime: pe.bind(null,
|
|
3202
|
-
formatDate: te.bind(null,
|
|
3203
|
-
formatDateToParts: ne.bind(null,
|
|
3204
|
-
formatTime: re.bind(null,
|
|
3205
|
-
formatDateTimeRange: ee.bind(null,
|
|
3206
|
-
formatTimeToParts: ie.bind(null,
|
|
3207
|
-
formatPlural: le.bind(null,
|
|
3196
|
+
var e = Jr(r), n = m(m({}, Qr), t), i = n.locale, o = n.defaultLocale, a = n.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'))), n.locale = n.defaultLocale || "en"), de(n), m(m({}, n), {
|
|
3198
|
+
formatters: e,
|
|
3199
|
+
formatNumber: Ee.bind(null, n, e.getNumberFormat),
|
|
3200
|
+
formatNumberToParts: be.bind(null, n, e.getNumberFormat),
|
|
3201
|
+
formatRelativeTime: pe.bind(null, n, e.getRelativeTimeFormat),
|
|
3202
|
+
formatDate: te.bind(null, n, e.getDateTimeFormat),
|
|
3203
|
+
formatDateToParts: ne.bind(null, n, e.getDateTimeFormat),
|
|
3204
|
+
formatTime: re.bind(null, n, e.getDateTimeFormat),
|
|
3205
|
+
formatDateTimeRange: ee.bind(null, n, e.getDateTimeFormat),
|
|
3206
|
+
formatTimeToParts: ie.bind(null, n, e.getDateTimeFormat),
|
|
3207
|
+
formatPlural: le.bind(null, n, e.getPluralRules),
|
|
3208
3208
|
// @ts-expect-error TODO: will get to this later
|
|
3209
|
-
formatMessage: yt.bind(null,
|
|
3209
|
+
formatMessage: yt.bind(null, n, e),
|
|
3210
3210
|
// @ts-expect-error TODO: will get to this later
|
|
3211
|
-
$t: yt.bind(null,
|
|
3212
|
-
formatList: ue.bind(null,
|
|
3213
|
-
formatListToParts: kt.bind(null,
|
|
3214
|
-
formatDisplayName: ae.bind(null,
|
|
3211
|
+
$t: yt.bind(null, n, e),
|
|
3212
|
+
formatList: ue.bind(null, n, e.getListFormat),
|
|
3213
|
+
formatListToParts: kt.bind(null, n, e.getListFormat),
|
|
3214
|
+
formatDisplayName: ae.bind(null, n, e.getDisplayNames)
|
|
3215
3215
|
});
|
|
3216
3216
|
}
|
|
3217
3217
|
var Te = U;
|
|
@@ -3225,11 +3225,11 @@ function xt(t) {
|
|
|
3225
3225
|
}
|
|
3226
3226
|
function U(t, r) {
|
|
3227
3227
|
r = r || {};
|
|
3228
|
-
const
|
|
3228
|
+
const e = r.delimiter || ".", n = r.maxDepth, i = r.transformKey || xt, o = {};
|
|
3229
3229
|
function a(s, u, c) {
|
|
3230
3230
|
c = c || 1, Object.keys(s).forEach(function(h) {
|
|
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 = u ? u +
|
|
3232
|
-
if (!f && !d && b && Object.keys(l).length && (!r.maxDepth || c <
|
|
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 = u ? u + e + i(h) : i(h);
|
|
3232
|
+
if (!f && !d && b && Object.keys(l).length && (!r.maxDepth || c < n))
|
|
3233
3233
|
return a(l, v, c + 1);
|
|
3234
3234
|
o[v] = l;
|
|
3235
3235
|
});
|
|
@@ -3238,7 +3238,7 @@ function U(t, r) {
|
|
|
3238
3238
|
}
|
|
3239
3239
|
function Xt(t, r) {
|
|
3240
3240
|
r = r || {};
|
|
3241
|
-
const
|
|
3241
|
+
const e = r.delimiter || ".", n = r.overwrite || !1, i = r.transformKey || xt, o = {};
|
|
3242
3242
|
if (Vt(t) || Object.prototype.toString.call(t) !== "[object Object]")
|
|
3243
3243
|
return t;
|
|
3244
3244
|
function a(c) {
|
|
@@ -3247,7 +3247,7 @@ function Xt(t, r) {
|
|
|
3247
3247
|
}
|
|
3248
3248
|
function s(c, h, l) {
|
|
3249
3249
|
return Object.keys(l).reduce(function(f, p) {
|
|
3250
|
-
return f[c +
|
|
3250
|
+
return f[c + e + p] = l[p], f;
|
|
3251
3251
|
}, h);
|
|
3252
3252
|
}
|
|
3253
3253
|
function u(c) {
|
|
@@ -3268,22 +3268,23 @@ function Xt(t, r) {
|
|
|
3268
3268
|
U(t[h], r)
|
|
3269
3269
|
);
|
|
3270
3270
|
}, {}), Object.keys(t).forEach(function(c) {
|
|
3271
|
-
const h = c.split(
|
|
3271
|
+
const h = c.split(e).map(i);
|
|
3272
3272
|
let l = a(h.shift()), f = a(h[0]), p = o;
|
|
3273
3273
|
for (; f !== void 0; ) {
|
|
3274
3274
|
if (l === "__proto__")
|
|
3275
3275
|
return;
|
|
3276
3276
|
const d = Object.prototype.toString.call(p[l]), b = d === "[object Object]" || d === "[object Array]";
|
|
3277
|
-
if (!
|
|
3277
|
+
if (!n && !b && typeof p[l] < "u")
|
|
3278
3278
|
return;
|
|
3279
|
-
(
|
|
3279
|
+
(n && !b || !n && p[l] == null) && (p[l] = typeof f == "number" && !r.object ? [] : {}), p = p[l], h.length > 0 && (l = a(h.shift()), f = a(h[0]));
|
|
3280
3280
|
}
|
|
3281
3281
|
p[l] = Xt(t[c], r);
|
|
3282
3282
|
}), o;
|
|
3283
3283
|
}
|
|
3284
|
-
const _e = Ut(), He = (t, r,
|
|
3285
|
-
const
|
|
3284
|
+
const _e = Ut(), He = (t, r, e = !1) => {
|
|
3285
|
+
const n = ve(
|
|
3286
3286
|
{
|
|
3287
|
+
...typeof e == "boolean" ? null : e,
|
|
3287
3288
|
locale: t,
|
|
3288
3289
|
messages: Te.flatten(r, {
|
|
3289
3290
|
safe: !0
|
|
@@ -3291,14 +3292,14 @@ const _e = Ut(), He = (t, r, n = !1) => {
|
|
|
3291
3292
|
})
|
|
3292
3293
|
},
|
|
3293
3294
|
_e
|
|
3294
|
-
), { $t: i, ...o } =
|
|
3295
|
-
return {
|
|
3295
|
+
), { $t: i, ...o } = n, a = o, s = {
|
|
3296
3296
|
t: (u, c, h) => a.formatMessage({ id: u }, c, h),
|
|
3297
3297
|
te: (u) => !!a.messages[u],
|
|
3298
3298
|
tm: (u) => a.messages[u] || [],
|
|
3299
3299
|
...a,
|
|
3300
3300
|
source: r
|
|
3301
3301
|
};
|
|
3302
|
+
return typeof e == "boolean" && e === !0 || typeof e != "boolean" && e.isGlobal, s;
|
|
3302
3303
|
}, Se = (t = null) => vt({
|
|
3303
3304
|
name: "I18nT",
|
|
3304
3305
|
props: {
|
|
@@ -3316,28 +3317,28 @@ const _e = Ut(), He = (t, r, n = !1) => {
|
|
|
3316
3317
|
default: "span"
|
|
3317
3318
|
}
|
|
3318
3319
|
},
|
|
3319
|
-
setup(r, { slots:
|
|
3320
|
-
const
|
|
3320
|
+
setup(r, { slots: e }) {
|
|
3321
|
+
const n = (i) => {
|
|
3321
3322
|
if (!i)
|
|
3322
3323
|
return [];
|
|
3323
3324
|
const o = /(\{[^}]+\})/g;
|
|
3324
3325
|
return i.split(o).filter(Boolean);
|
|
3325
3326
|
};
|
|
3326
3327
|
return () => {
|
|
3327
|
-
const i = Object.keys(
|
|
3328
|
-
let a =
|
|
3328
|
+
const i = Object.keys(e).filter((s) => s !== "_"), o = (t || r.i18n).messages[r.keypath].toString();
|
|
3329
|
+
let a = n(o);
|
|
3329
3330
|
return a = a.filter((s) => s !== ""), a.forEach((s, u) => {
|
|
3330
3331
|
if (!s.startsWith("{") && !s.endsWith("}"))
|
|
3331
3332
|
return;
|
|
3332
3333
|
const c = s.replace(/[\{\}]/g, "");
|
|
3333
|
-
c === "0" &&
|
|
3334
|
+
c === "0" && e.default ? a[u] = e.default() : i.includes(c) && e[c] && (a[u] = e[c]());
|
|
3334
3335
|
}), Kt(r.tag, r, a);
|
|
3335
3336
|
};
|
|
3336
3337
|
}
|
|
3337
3338
|
}), Ae = {
|
|
3338
3339
|
install(t, r) {
|
|
3339
|
-
const { i18n:
|
|
3340
|
-
t.component("I18nT", Se(
|
|
3340
|
+
const { i18n: e } = r;
|
|
3341
|
+
t.component("I18nT", Se(e));
|
|
3341
3342
|
}
|
|
3342
3343
|
}, Be = {
|
|
3343
3344
|
title: "Star",
|
|
@@ -3374,7 +3375,7 @@ const Le = {
|
|
|
3374
3375
|
}
|
|
3375
3376
|
},
|
|
3376
3377
|
setup(t) {
|
|
3377
|
-
const r = t, { i18n:
|
|
3378
|
+
const r = t, { i18n: e } = Le.useI18n(), n = Zt(() => r.tooltipText || e.t("githubStar.tooltipLabel")), i = Yt(!1);
|
|
3378
3379
|
return Wt(async () => {
|
|
3379
3380
|
const o = document.createElement("script");
|
|
3380
3381
|
o.addEventListener("load", () => {
|
|
@@ -3383,17 +3384,17 @@ const Le = {
|
|
|
3383
3384
|
}), (o, a) => {
|
|
3384
3385
|
const s = zt("KTooltip");
|
|
3385
3386
|
return t.url && i.value ? (qt(), Qt("div", Pe, [
|
|
3386
|
-
Jt(s, { label: K(
|
|
3387
|
+
Jt(s, { label: K(n) }, {
|
|
3387
3388
|
default: $t(() => [
|
|
3388
3389
|
at("span", null, [
|
|
3389
3390
|
at("a", {
|
|
3390
|
-
"aria-label": K(
|
|
3391
|
+
"aria-label": K(e).t("githubStar.ariaLabel"),
|
|
3391
3392
|
class: "github-button",
|
|
3392
3393
|
"data-color-scheme": "no-preference: light; light: light; dark: light;",
|
|
3393
3394
|
"data-show-count": "true",
|
|
3394
3395
|
href: t.url,
|
|
3395
3396
|
target: "_blank"
|
|
3396
|
-
}, tr(K(
|
|
3397
|
+
}, tr(K(e).t("githubStar.title")), 9, Re)
|
|
3397
3398
|
])
|
|
3398
3399
|
]),
|
|
3399
3400
|
_: 1
|
|
@@ -3403,10 +3404,10 @@ const Le = {
|
|
|
3403
3404
|
}
|
|
3404
3405
|
});
|
|
3405
3406
|
const Ce = (t, r) => {
|
|
3406
|
-
const
|
|
3407
|
-
for (const [
|
|
3408
|
-
n
|
|
3409
|
-
return
|
|
3407
|
+
const e = t.__vccOpts || t;
|
|
3408
|
+
for (const [n, i] of r)
|
|
3409
|
+
e[n] = i;
|
|
3410
|
+
return e;
|
|
3410
3411
|
}, we = /* @__PURE__ */ Ce(Oe, [["__scopeId", "data-v-4d357ff1"]]);
|
|
3411
3412
|
export {
|
|
3412
3413
|
we as GithubStar
|