@ukpc-lib/react 0.16.3-dev.0 → 0.16.3-dev.12
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/components/FavoriteMenu/components/MenuItem.d.ts +3 -1
- package/dist/components/GlobalMenu/components/MenuItem.d.ts +1 -0
- package/dist/components/GlobalMenu/helpers/index.d.ts +3 -1
- package/dist/components/index.cjs +2 -2
- package/dist/components/index.js +460 -459
- package/dist/{index.esm2017-DfjqFO64.js → index.esm2017-Bf0A72bA.js} +11088 -10989
- package/dist/{index.esm2017-BOJSSD0C.cjs → index.esm2017-xVJCd_op.cjs} +124 -124
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +2 -2
- package/package.json +1 -1
- package/web-components-bundle/SaasThemeProvider-DUpoV8xb.js +242 -0
- package/web-components-bundle/access-denied/index.js +8 -2
- package/web-components-bundle/base-breadcrumbs/index.js +3 -2
- package/web-components-bundle/favorite-menu/index.js +4 -4
- package/web-components-bundle/global-menu/index.js +4 -4
- package/web-components-bundle/global-topbar/index.js +4 -4
- package/web-components-bundle/has-permission/index.js +1 -1
- package/web-components-bundle/index-Cy3NprRd.js +44425 -0
- package/web-components-bundle/{index-BU5SX9Tl.js → index-Dkof1OzO.js} +1530 -1756
- package/web-components-bundle/{index-DqxmsDJs.js → index-N6zjI_u_.js} +10 -8
- package/web-components-bundle/page-not-found/index.js +4 -3
- package/web-components-bundle/index-BQA1Vdho.js +0 -40804
- package/web-components-bundle/index-Ch-015PG.js +0 -3528
- package/web-components-bundle/setPrototypeOf-CP0c5ut2.js +0 -14
|
@@ -1,3528 +0,0 @@
|
|
|
1
|
-
import { r as M, c as ce, g as Jt, s as Xt, j as E } from "./react-to-web-component-w5r1Fs9q.js";
|
|
2
|
-
import { a as Wt, _ as Z } from "./setPrototypeOf-CP0c5ut2.js";
|
|
3
|
-
function Gt(i, e) {
|
|
4
|
-
for (var t = 0; t < e.length; t++) {
|
|
5
|
-
const n = e[t];
|
|
6
|
-
if (typeof n != "string" && !Array.isArray(n)) {
|
|
7
|
-
for (const r in n)
|
|
8
|
-
if (r !== "default" && !(r in i)) {
|
|
9
|
-
const a = Object.getOwnPropertyDescriptor(n, r);
|
|
10
|
-
a && Object.defineProperty(i, r, a.get ? a : {
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
get: () => n[r]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return Object.freeze(Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }));
|
|
18
|
-
}
|
|
19
|
-
function U(i) {
|
|
20
|
-
"@babel/helpers - typeof";
|
|
21
|
-
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
22
|
-
return typeof e;
|
|
23
|
-
} : function(e) {
|
|
24
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
25
|
-
}, U(i);
|
|
26
|
-
}
|
|
27
|
-
function B(i, e) {
|
|
28
|
-
if (!(i instanceof e))
|
|
29
|
-
throw new TypeError("Cannot call a class as a function");
|
|
30
|
-
}
|
|
31
|
-
function Qt(i, e) {
|
|
32
|
-
if (U(i) != "object" || !i)
|
|
33
|
-
return i;
|
|
34
|
-
var t = i[Symbol.toPrimitive];
|
|
35
|
-
if (t !== void 0) {
|
|
36
|
-
var n = t.call(i, e);
|
|
37
|
-
if (U(n) != "object")
|
|
38
|
-
return n;
|
|
39
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
40
|
-
}
|
|
41
|
-
return (e === "string" ? String : Number)(i);
|
|
42
|
-
}
|
|
43
|
-
function kt(i) {
|
|
44
|
-
var e = Qt(i, "string");
|
|
45
|
-
return U(e) == "symbol" ? e : e + "";
|
|
46
|
-
}
|
|
47
|
-
function Me(i, e) {
|
|
48
|
-
for (var t = 0; t < e.length; t++) {
|
|
49
|
-
var n = e[t];
|
|
50
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(i, kt(n.key), n);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function H(i, e, t) {
|
|
54
|
-
return e && Me(i.prototype, e), t && Me(i, t), Object.defineProperty(i, "prototype", {
|
|
55
|
-
writable: !1
|
|
56
|
-
}), i;
|
|
57
|
-
}
|
|
58
|
-
function Se(i, e) {
|
|
59
|
-
if (typeof e != "function" && e !== null)
|
|
60
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
61
|
-
i.prototype = Object.create(e && e.prototype, {
|
|
62
|
-
constructor: {
|
|
63
|
-
value: i,
|
|
64
|
-
writable: !0,
|
|
65
|
-
configurable: !0
|
|
66
|
-
}
|
|
67
|
-
}), Object.defineProperty(i, "prototype", {
|
|
68
|
-
writable: !1
|
|
69
|
-
}), e && Wt(i, e);
|
|
70
|
-
}
|
|
71
|
-
function de(i, e) {
|
|
72
|
-
if (e && (U(e) == "object" || typeof e == "function"))
|
|
73
|
-
return e;
|
|
74
|
-
if (e !== void 0)
|
|
75
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
76
|
-
return Z(i);
|
|
77
|
-
}
|
|
78
|
-
function X(i) {
|
|
79
|
-
return X = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
80
|
-
return e.__proto__ || Object.getPrototypeOf(e);
|
|
81
|
-
}, X(i);
|
|
82
|
-
}
|
|
83
|
-
function W(i, e, t) {
|
|
84
|
-
return (e = kt(e)) in i ? Object.defineProperty(i, e, {
|
|
85
|
-
value: t,
|
|
86
|
-
enumerable: !0,
|
|
87
|
-
configurable: !0,
|
|
88
|
-
writable: !0
|
|
89
|
-
}) : i[e] = t, i;
|
|
90
|
-
}
|
|
91
|
-
function Lt(i) {
|
|
92
|
-
if (Array.isArray(i))
|
|
93
|
-
return i;
|
|
94
|
-
}
|
|
95
|
-
function Yt(i) {
|
|
96
|
-
if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null)
|
|
97
|
-
return Array.from(i);
|
|
98
|
-
}
|
|
99
|
-
function qe(i, e) {
|
|
100
|
-
(e == null || e > i.length) && (e = i.length);
|
|
101
|
-
for (var t = 0, n = Array(e); t < e; t++)
|
|
102
|
-
n[t] = i[t];
|
|
103
|
-
return n;
|
|
104
|
-
}
|
|
105
|
-
function Rt(i, e) {
|
|
106
|
-
if (i) {
|
|
107
|
-
if (typeof i == "string")
|
|
108
|
-
return qe(i, e);
|
|
109
|
-
var t = {}.toString.call(i).slice(8, -1);
|
|
110
|
-
return t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set" ? Array.from(i) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? qe(i, e) : void 0;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function Et() {
|
|
114
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
115
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
116
|
-
}
|
|
117
|
-
function Zt(i) {
|
|
118
|
-
return Lt(i) || Yt(i) || Rt(i) || Et();
|
|
119
|
-
}
|
|
120
|
-
function Ke(i, e) {
|
|
121
|
-
var t = Object.keys(i);
|
|
122
|
-
if (Object.getOwnPropertySymbols) {
|
|
123
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
124
|
-
e && (n = n.filter(function(r) {
|
|
125
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
126
|
-
})), t.push.apply(t, n);
|
|
127
|
-
}
|
|
128
|
-
return t;
|
|
129
|
-
}
|
|
130
|
-
function Ve(i) {
|
|
131
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
132
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
133
|
-
e % 2 ? Ke(Object(t), !0).forEach(function(n) {
|
|
134
|
-
W(i, n, t[n]);
|
|
135
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : Ke(Object(t)).forEach(function(n) {
|
|
136
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
return i;
|
|
140
|
-
}
|
|
141
|
-
var en = {
|
|
142
|
-
type: "logger",
|
|
143
|
-
log: function(e) {
|
|
144
|
-
this.output("log", e);
|
|
145
|
-
},
|
|
146
|
-
warn: function(e) {
|
|
147
|
-
this.output("warn", e);
|
|
148
|
-
},
|
|
149
|
-
error: function(e) {
|
|
150
|
-
this.output("error", e);
|
|
151
|
-
},
|
|
152
|
-
output: function(e, t) {
|
|
153
|
-
console && console[e] && console[e].apply(console, t);
|
|
154
|
-
}
|
|
155
|
-
}, tn = function() {
|
|
156
|
-
function i(e) {
|
|
157
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
158
|
-
B(this, i), this.init(e, t);
|
|
159
|
-
}
|
|
160
|
-
return H(i, [{
|
|
161
|
-
key: "init",
|
|
162
|
-
value: function(t) {
|
|
163
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
164
|
-
this.prefix = n.prefix || "i18next:", this.logger = t || en, this.options = n, this.debug = n.debug;
|
|
165
|
-
}
|
|
166
|
-
}, {
|
|
167
|
-
key: "setDebug",
|
|
168
|
-
value: function(t) {
|
|
169
|
-
this.debug = t;
|
|
170
|
-
}
|
|
171
|
-
}, {
|
|
172
|
-
key: "log",
|
|
173
|
-
value: function() {
|
|
174
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
175
|
-
n[r] = arguments[r];
|
|
176
|
-
return this.forward(n, "log", "", !0);
|
|
177
|
-
}
|
|
178
|
-
}, {
|
|
179
|
-
key: "warn",
|
|
180
|
-
value: function() {
|
|
181
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
182
|
-
n[r] = arguments[r];
|
|
183
|
-
return this.forward(n, "warn", "", !0);
|
|
184
|
-
}
|
|
185
|
-
}, {
|
|
186
|
-
key: "error",
|
|
187
|
-
value: function() {
|
|
188
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
189
|
-
n[r] = arguments[r];
|
|
190
|
-
return this.forward(n, "error", "");
|
|
191
|
-
}
|
|
192
|
-
}, {
|
|
193
|
-
key: "deprecate",
|
|
194
|
-
value: function() {
|
|
195
|
-
for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
|
|
196
|
-
n[r] = arguments[r];
|
|
197
|
-
return this.forward(n, "warn", "WARNING DEPRECATED: ", !0);
|
|
198
|
-
}
|
|
199
|
-
}, {
|
|
200
|
-
key: "forward",
|
|
201
|
-
value: function(t, n, r, a) {
|
|
202
|
-
return a && !this.debug ? null : (typeof t[0] == "string" && (t[0] = "".concat(r).concat(this.prefix, " ").concat(t[0])), this.logger[n](t));
|
|
203
|
-
}
|
|
204
|
-
}, {
|
|
205
|
-
key: "create",
|
|
206
|
-
value: function(t) {
|
|
207
|
-
return new i(this.logger, Ve(Ve({}, {
|
|
208
|
-
prefix: "".concat(this.prefix, ":").concat(t, ":")
|
|
209
|
-
}), this.options));
|
|
210
|
-
}
|
|
211
|
-
}, {
|
|
212
|
-
key: "clone",
|
|
213
|
-
value: function(t) {
|
|
214
|
-
return t = t || this.options, t.prefix = t.prefix || this.prefix, new i(this.logger, t);
|
|
215
|
-
}
|
|
216
|
-
}]), i;
|
|
217
|
-
}(), J = new tn(), ee = function() {
|
|
218
|
-
function i() {
|
|
219
|
-
B(this, i), this.observers = {};
|
|
220
|
-
}
|
|
221
|
-
return H(i, [{
|
|
222
|
-
key: "on",
|
|
223
|
-
value: function(t, n) {
|
|
224
|
-
var r = this;
|
|
225
|
-
return t.split(" ").forEach(function(a) {
|
|
226
|
-
r.observers[a] = r.observers[a] || [], r.observers[a].push(n);
|
|
227
|
-
}), this;
|
|
228
|
-
}
|
|
229
|
-
}, {
|
|
230
|
-
key: "off",
|
|
231
|
-
value: function(t, n) {
|
|
232
|
-
if (this.observers[t]) {
|
|
233
|
-
if (!n) {
|
|
234
|
-
delete this.observers[t];
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
this.observers[t] = this.observers[t].filter(function(r) {
|
|
238
|
-
return r !== n;
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}, {
|
|
243
|
-
key: "emit",
|
|
244
|
-
value: function(t) {
|
|
245
|
-
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
246
|
-
r[a - 1] = arguments[a];
|
|
247
|
-
if (this.observers[t]) {
|
|
248
|
-
var o = [].concat(this.observers[t]);
|
|
249
|
-
o.forEach(function(u) {
|
|
250
|
-
u.apply(void 0, r);
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
if (this.observers["*"]) {
|
|
254
|
-
var s = [].concat(this.observers["*"]);
|
|
255
|
-
s.forEach(function(u) {
|
|
256
|
-
u.apply(u, [t].concat(r));
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}]), i;
|
|
261
|
-
}();
|
|
262
|
-
function se() {
|
|
263
|
-
var i, e, t = new Promise(function(n, r) {
|
|
264
|
-
i = n, e = r;
|
|
265
|
-
});
|
|
266
|
-
return t.resolve = i, t.reject = e, t;
|
|
267
|
-
}
|
|
268
|
-
function ze(i) {
|
|
269
|
-
return i == null ? "" : "" + i;
|
|
270
|
-
}
|
|
271
|
-
function nn(i, e, t) {
|
|
272
|
-
i.forEach(function(n) {
|
|
273
|
-
e[n] && (t[n] = e[n]);
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
function Fe(i, e, t) {
|
|
277
|
-
function n(s) {
|
|
278
|
-
return s && s.indexOf("###") > -1 ? s.replace(/###/g, ".") : s;
|
|
279
|
-
}
|
|
280
|
-
function r() {
|
|
281
|
-
return !i || typeof i == "string";
|
|
282
|
-
}
|
|
283
|
-
for (var a = typeof e != "string" ? [].concat(e) : e.split("."); a.length > 1; ) {
|
|
284
|
-
if (r())
|
|
285
|
-
return {};
|
|
286
|
-
var o = n(a.shift());
|
|
287
|
-
!i[o] && t && (i[o] = new t()), Object.prototype.hasOwnProperty.call(i, o) ? i = i[o] : i = {};
|
|
288
|
-
}
|
|
289
|
-
return r() ? {} : {
|
|
290
|
-
obj: i,
|
|
291
|
-
k: n(a.shift())
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
function Je(i, e, t) {
|
|
295
|
-
var n = Fe(i, e, Object), r = n.obj, a = n.k;
|
|
296
|
-
r[a] = t;
|
|
297
|
-
}
|
|
298
|
-
function rn(i, e, t, n) {
|
|
299
|
-
var r = Fe(i, e, Object), a = r.obj, o = r.k;
|
|
300
|
-
a[o] = a[o] || [], a[o].push(t);
|
|
301
|
-
}
|
|
302
|
-
function ye(i, e) {
|
|
303
|
-
var t = Fe(i, e), n = t.obj, r = t.k;
|
|
304
|
-
if (n)
|
|
305
|
-
return n[r];
|
|
306
|
-
}
|
|
307
|
-
function an(i, e, t) {
|
|
308
|
-
var n = ye(i, t);
|
|
309
|
-
return n !== void 0 ? n : ye(e, t);
|
|
310
|
-
}
|
|
311
|
-
function Ct(i, e, t) {
|
|
312
|
-
for (var n in e)
|
|
313
|
-
n !== "__proto__" && n !== "constructor" && (n in i ? typeof i[n] == "string" || i[n] instanceof String || typeof e[n] == "string" || e[n] instanceof String ? t && (i[n] = e[n]) : Ct(i[n], e[n], t) : i[n] = e[n]);
|
|
314
|
-
return i;
|
|
315
|
-
}
|
|
316
|
-
function re(i) {
|
|
317
|
-
return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
318
|
-
}
|
|
319
|
-
var on = {
|
|
320
|
-
"&": "&",
|
|
321
|
-
"<": "<",
|
|
322
|
-
">": ">",
|
|
323
|
-
'"': """,
|
|
324
|
-
"'": "'",
|
|
325
|
-
"/": "/"
|
|
326
|
-
};
|
|
327
|
-
function sn(i) {
|
|
328
|
-
return typeof i == "string" ? i.replace(/[&<>"'\/]/g, function(e) {
|
|
329
|
-
return on[e];
|
|
330
|
-
}) : i;
|
|
331
|
-
}
|
|
332
|
-
var xe = typeof window < "u" && window.navigator && typeof window.navigator.userAgentData > "u" && window.navigator.userAgent && window.navigator.userAgent.indexOf("MSIE") > -1, un = [" ", ",", "?", "!", ";"];
|
|
333
|
-
function fn(i, e, t) {
|
|
334
|
-
e = e || "", t = t || "";
|
|
335
|
-
var n = un.filter(function(s) {
|
|
336
|
-
return e.indexOf(s) < 0 && t.indexOf(s) < 0;
|
|
337
|
-
});
|
|
338
|
-
if (n.length === 0)
|
|
339
|
-
return !0;
|
|
340
|
-
var r = new RegExp("(".concat(n.map(function(s) {
|
|
341
|
-
return s === "?" ? "\\?" : s;
|
|
342
|
-
}).join("|"), ")")), a = !r.test(i);
|
|
343
|
-
if (!a) {
|
|
344
|
-
var o = i.indexOf(t);
|
|
345
|
-
o > 0 && !r.test(i.substring(0, o)) && (a = !0);
|
|
346
|
-
}
|
|
347
|
-
return a;
|
|
348
|
-
}
|
|
349
|
-
function be(i, e) {
|
|
350
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
|
|
351
|
-
if (i) {
|
|
352
|
-
if (i[e])
|
|
353
|
-
return i[e];
|
|
354
|
-
for (var n = e.split(t), r = i, a = 0; a < n.length; ++a) {
|
|
355
|
-
if (!r || typeof r[n[a]] == "string" && a + 1 < n.length)
|
|
356
|
-
return;
|
|
357
|
-
if (r[n[a]] === void 0) {
|
|
358
|
-
for (var o = 2, s = n.slice(a, a + o).join(t), u = r[s]; u === void 0 && n.length > a + o; )
|
|
359
|
-
o++, s = n.slice(a, a + o).join(t), u = r[s];
|
|
360
|
-
if (u === void 0)
|
|
361
|
-
return;
|
|
362
|
-
if (u === null)
|
|
363
|
-
return null;
|
|
364
|
-
if (e.endsWith(s)) {
|
|
365
|
-
if (typeof u == "string")
|
|
366
|
-
return u;
|
|
367
|
-
if (s && typeof u[s] == "string")
|
|
368
|
-
return u[s];
|
|
369
|
-
}
|
|
370
|
-
var d = n.slice(a + o).join(t);
|
|
371
|
-
return d ? be(u, d, t) : void 0;
|
|
372
|
-
}
|
|
373
|
-
r = r[n[a]];
|
|
374
|
-
}
|
|
375
|
-
return r;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
function Xe(i, e) {
|
|
379
|
-
var t = Object.keys(i);
|
|
380
|
-
if (Object.getOwnPropertySymbols) {
|
|
381
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
382
|
-
e && (n = n.filter(function(r) {
|
|
383
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
384
|
-
})), t.push.apply(t, n);
|
|
385
|
-
}
|
|
386
|
-
return t;
|
|
387
|
-
}
|
|
388
|
-
function ge(i) {
|
|
389
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
390
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
391
|
-
e % 2 ? Xe(Object(t), !0).forEach(function(n) {
|
|
392
|
-
W(i, n, t[n]);
|
|
393
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : Xe(Object(t)).forEach(function(n) {
|
|
394
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
return i;
|
|
398
|
-
}
|
|
399
|
-
function cn(i) {
|
|
400
|
-
var e = ln();
|
|
401
|
-
return function() {
|
|
402
|
-
var n = X(i), r;
|
|
403
|
-
if (e) {
|
|
404
|
-
var a = X(this).constructor;
|
|
405
|
-
r = Reflect.construct(n, arguments, a);
|
|
406
|
-
} else
|
|
407
|
-
r = n.apply(this, arguments);
|
|
408
|
-
return de(this, r);
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
function ln() {
|
|
412
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
413
|
-
return !1;
|
|
414
|
-
if (typeof Proxy == "function")
|
|
415
|
-
return !0;
|
|
416
|
-
try {
|
|
417
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
418
|
-
})), !0;
|
|
419
|
-
} catch {
|
|
420
|
-
return !1;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
var dn = function(i) {
|
|
424
|
-
Se(t, i);
|
|
425
|
-
var e = cn(t);
|
|
426
|
-
function t(n) {
|
|
427
|
-
var r, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
428
|
-
ns: ["translation"],
|
|
429
|
-
defaultNS: "translation"
|
|
430
|
-
};
|
|
431
|
-
return B(this, t), r = e.call(this), xe && ee.call(Z(r)), r.data = n || {}, r.options = a, r.options.keySeparator === void 0 && (r.options.keySeparator = "."), r.options.ignoreJSONStructure === void 0 && (r.options.ignoreJSONStructure = !0), r;
|
|
432
|
-
}
|
|
433
|
-
return H(t, [{
|
|
434
|
-
key: "addNamespaces",
|
|
435
|
-
value: function(r) {
|
|
436
|
-
this.options.ns.indexOf(r) < 0 && this.options.ns.push(r);
|
|
437
|
-
}
|
|
438
|
-
}, {
|
|
439
|
-
key: "removeNamespaces",
|
|
440
|
-
value: function(r) {
|
|
441
|
-
var a = this.options.ns.indexOf(r);
|
|
442
|
-
a > -1 && this.options.ns.splice(a, 1);
|
|
443
|
-
}
|
|
444
|
-
}, {
|
|
445
|
-
key: "getResource",
|
|
446
|
-
value: function(r, a, o) {
|
|
447
|
-
var s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, u = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, d = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure, c = [r, a];
|
|
448
|
-
o && typeof o != "string" && (c = c.concat(o)), o && typeof o == "string" && (c = c.concat(u ? o.split(u) : o)), r.indexOf(".") > -1 && (c = r.split("."));
|
|
449
|
-
var f = ye(this.data, c);
|
|
450
|
-
return f || !d || typeof o != "string" ? f : be(this.data && this.data[r] && this.data[r][a], o, u);
|
|
451
|
-
}
|
|
452
|
-
}, {
|
|
453
|
-
key: "addResource",
|
|
454
|
-
value: function(r, a, o, s) {
|
|
455
|
-
var u = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
456
|
-
silent: !1
|
|
457
|
-
}, d = u.keySeparator !== void 0 ? u.keySeparator : this.options.keySeparator, c = [r, a];
|
|
458
|
-
o && (c = c.concat(d ? o.split(d) : o)), r.indexOf(".") > -1 && (c = r.split("."), s = a, a = c[1]), this.addNamespaces(a), Je(this.data, c, s), u.silent || this.emit("added", r, a, o, s);
|
|
459
|
-
}
|
|
460
|
-
}, {
|
|
461
|
-
key: "addResources",
|
|
462
|
-
value: function(r, a, o) {
|
|
463
|
-
var s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
|
|
464
|
-
silent: !1
|
|
465
|
-
};
|
|
466
|
-
for (var u in o)
|
|
467
|
-
(typeof o[u] == "string" || Object.prototype.toString.apply(o[u]) === "[object Array]") && this.addResource(r, a, u, o[u], {
|
|
468
|
-
silent: !0
|
|
469
|
-
});
|
|
470
|
-
s.silent || this.emit("added", r, a, o);
|
|
471
|
-
}
|
|
472
|
-
}, {
|
|
473
|
-
key: "addResourceBundle",
|
|
474
|
-
value: function(r, a, o, s, u) {
|
|
475
|
-
var d = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
|
|
476
|
-
silent: !1
|
|
477
|
-
}, c = [r, a];
|
|
478
|
-
r.indexOf(".") > -1 && (c = r.split("."), s = o, o = a, a = c[1]), this.addNamespaces(a);
|
|
479
|
-
var f = ye(this.data, c) || {};
|
|
480
|
-
s ? Ct(f, o, u) : f = ge(ge({}, f), o), Je(this.data, c, f), d.silent || this.emit("added", r, a, o);
|
|
481
|
-
}
|
|
482
|
-
}, {
|
|
483
|
-
key: "removeResourceBundle",
|
|
484
|
-
value: function(r, a) {
|
|
485
|
-
this.hasResourceBundle(r, a) && delete this.data[r][a], this.removeNamespaces(a), this.emit("removed", r, a);
|
|
486
|
-
}
|
|
487
|
-
}, {
|
|
488
|
-
key: "hasResourceBundle",
|
|
489
|
-
value: function(r, a) {
|
|
490
|
-
return this.getResource(r, a) !== void 0;
|
|
491
|
-
}
|
|
492
|
-
}, {
|
|
493
|
-
key: "getResourceBundle",
|
|
494
|
-
value: function(r, a) {
|
|
495
|
-
return a || (a = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? ge(ge({}, {}), this.getResource(r, a)) : this.getResource(r, a);
|
|
496
|
-
}
|
|
497
|
-
}, {
|
|
498
|
-
key: "getDataByLanguage",
|
|
499
|
-
value: function(r) {
|
|
500
|
-
return this.data[r];
|
|
501
|
-
}
|
|
502
|
-
}, {
|
|
503
|
-
key: "hasLanguageSomeTranslations",
|
|
504
|
-
value: function(r) {
|
|
505
|
-
var a = this.getDataByLanguage(r), o = a && Object.keys(a) || [];
|
|
506
|
-
return !!o.find(function(s) {
|
|
507
|
-
return a[s] && Object.keys(a[s]).length > 0;
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
}, {
|
|
511
|
-
key: "toJSON",
|
|
512
|
-
value: function() {
|
|
513
|
-
return this.data;
|
|
514
|
-
}
|
|
515
|
-
}]), t;
|
|
516
|
-
}(ee), _t = {
|
|
517
|
-
processors: {},
|
|
518
|
-
addPostProcessor: function(e) {
|
|
519
|
-
this.processors[e.name] = e;
|
|
520
|
-
},
|
|
521
|
-
handle: function(e, t, n, r, a) {
|
|
522
|
-
var o = this;
|
|
523
|
-
return e.forEach(function(s) {
|
|
524
|
-
o.processors[s] && (t = o.processors[s].process(t, n, r, a));
|
|
525
|
-
}), t;
|
|
526
|
-
}
|
|
527
|
-
};
|
|
528
|
-
function We(i, e) {
|
|
529
|
-
var t = Object.keys(i);
|
|
530
|
-
if (Object.getOwnPropertySymbols) {
|
|
531
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
532
|
-
e && (n = n.filter(function(r) {
|
|
533
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
534
|
-
})), t.push.apply(t, n);
|
|
535
|
-
}
|
|
536
|
-
return t;
|
|
537
|
-
}
|
|
538
|
-
function T(i) {
|
|
539
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
540
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
541
|
-
e % 2 ? We(Object(t), !0).forEach(function(n) {
|
|
542
|
-
W(i, n, t[n]);
|
|
543
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : We(Object(t)).forEach(function(n) {
|
|
544
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
return i;
|
|
548
|
-
}
|
|
549
|
-
function pn(i) {
|
|
550
|
-
var e = gn();
|
|
551
|
-
return function() {
|
|
552
|
-
var n = X(i), r;
|
|
553
|
-
if (e) {
|
|
554
|
-
var a = X(this).constructor;
|
|
555
|
-
r = Reflect.construct(n, arguments, a);
|
|
556
|
-
} else
|
|
557
|
-
r = n.apply(this, arguments);
|
|
558
|
-
return de(this, r);
|
|
559
|
-
};
|
|
560
|
-
}
|
|
561
|
-
function gn() {
|
|
562
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
563
|
-
return !1;
|
|
564
|
-
if (typeof Proxy == "function")
|
|
565
|
-
return !0;
|
|
566
|
-
try {
|
|
567
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
568
|
-
})), !0;
|
|
569
|
-
} catch {
|
|
570
|
-
return !1;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
var Ge = {}, Qe = function(i) {
|
|
574
|
-
Se(t, i);
|
|
575
|
-
var e = pn(t);
|
|
576
|
-
function t(n) {
|
|
577
|
-
var r, a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
578
|
-
return B(this, t), r = e.call(this), xe && ee.call(Z(r)), nn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], n, Z(r)), r.options = a, r.options.keySeparator === void 0 && (r.options.keySeparator = "."), r.logger = J.create("translator"), r;
|
|
579
|
-
}
|
|
580
|
-
return H(t, [{
|
|
581
|
-
key: "changeLanguage",
|
|
582
|
-
value: function(r) {
|
|
583
|
-
r && (this.language = r);
|
|
584
|
-
}
|
|
585
|
-
}, {
|
|
586
|
-
key: "exists",
|
|
587
|
-
value: function(r) {
|
|
588
|
-
var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
589
|
-
interpolation: {}
|
|
590
|
-
};
|
|
591
|
-
if (r == null)
|
|
592
|
-
return !1;
|
|
593
|
-
var o = this.resolve(r, a);
|
|
594
|
-
return o && o.res !== void 0;
|
|
595
|
-
}
|
|
596
|
-
}, {
|
|
597
|
-
key: "extractFromKey",
|
|
598
|
-
value: function(r, a) {
|
|
599
|
-
var o = a.nsSeparator !== void 0 ? a.nsSeparator : this.options.nsSeparator;
|
|
600
|
-
o === void 0 && (o = ":");
|
|
601
|
-
var s = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, u = a.ns || this.options.defaultNS || [], d = o && r.indexOf(o) > -1, c = !this.options.userDefinedKeySeparator && !a.keySeparator && !this.options.userDefinedNsSeparator && !a.nsSeparator && !fn(r, o, s);
|
|
602
|
-
if (d && !c) {
|
|
603
|
-
var f = r.match(this.interpolator.nestingRegexp);
|
|
604
|
-
if (f && f.length > 0)
|
|
605
|
-
return {
|
|
606
|
-
key: r,
|
|
607
|
-
namespaces: u
|
|
608
|
-
};
|
|
609
|
-
var p = r.split(o);
|
|
610
|
-
(o !== s || o === s && this.options.ns.indexOf(p[0]) > -1) && (u = p.shift()), r = p.join(s);
|
|
611
|
-
}
|
|
612
|
-
return typeof u == "string" && (u = [u]), {
|
|
613
|
-
key: r,
|
|
614
|
-
namespaces: u
|
|
615
|
-
};
|
|
616
|
-
}
|
|
617
|
-
}, {
|
|
618
|
-
key: "translate",
|
|
619
|
-
value: function(r, a, o) {
|
|
620
|
-
var s = this;
|
|
621
|
-
if (U(a) !== "object" && this.options.overloadTranslationOptionHandler && (a = this.options.overloadTranslationOptionHandler(arguments)), U(a) === "object" && (a = T({}, a)), a || (a = {}), r == null)
|
|
622
|
-
return "";
|
|
623
|
-
Array.isArray(r) || (r = [String(r)]);
|
|
624
|
-
var u = a.returnDetails !== void 0 ? a.returnDetails : this.options.returnDetails, d = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, c = this.extractFromKey(r[r.length - 1], a), f = c.key, p = c.namespaces, g = p[p.length - 1], b = a.lng || this.language, y = a.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
625
|
-
if (b && b.toLowerCase() === "cimode") {
|
|
626
|
-
if (y) {
|
|
627
|
-
var w = a.nsSeparator || this.options.nsSeparator;
|
|
628
|
-
return u ? {
|
|
629
|
-
res: "".concat(g).concat(w).concat(f),
|
|
630
|
-
usedKey: f,
|
|
631
|
-
exactUsedKey: f,
|
|
632
|
-
usedLng: b,
|
|
633
|
-
usedNS: g
|
|
634
|
-
} : "".concat(g).concat(w).concat(f);
|
|
635
|
-
}
|
|
636
|
-
return u ? {
|
|
637
|
-
res: f,
|
|
638
|
-
usedKey: f,
|
|
639
|
-
exactUsedKey: f,
|
|
640
|
-
usedLng: b,
|
|
641
|
-
usedNS: g
|
|
642
|
-
} : f;
|
|
643
|
-
}
|
|
644
|
-
var v = this.resolve(r, a), m = v && v.res, S = v && v.usedKey || f, x = v && v.exactUsedKey || f, k = Object.prototype.toString.apply(m), D = ["[object Number]", "[object Function]", "[object RegExp]"], I = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, _ = !this.i18nFormat || this.i18nFormat.handleAsObject, R = typeof m != "string" && typeof m != "boolean" && typeof m != "number";
|
|
645
|
-
if (_ && m && R && D.indexOf(k) < 0 && !(typeof I == "string" && k === "[object Array]")) {
|
|
646
|
-
if (!a.returnObjects && !this.options.returnObjects) {
|
|
647
|
-
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
648
|
-
var C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(S, m, T(T({}, a), {}, {
|
|
649
|
-
ns: p
|
|
650
|
-
})) : "key '".concat(f, " (").concat(this.language, ")' returned an object instead of string.");
|
|
651
|
-
return u ? (v.res = C, v) : C;
|
|
652
|
-
}
|
|
653
|
-
if (d) {
|
|
654
|
-
var Y = k === "[object Array]", A = Y ? [] : {}, Pe = Y ? x : S;
|
|
655
|
-
for (var q in m)
|
|
656
|
-
if (Object.prototype.hasOwnProperty.call(m, q)) {
|
|
657
|
-
var l = "".concat(Pe).concat(d).concat(q);
|
|
658
|
-
A[q] = this.translate(l, T(T({}, a), {
|
|
659
|
-
joinArrays: !1,
|
|
660
|
-
ns: p
|
|
661
|
-
})), A[q] === l && (A[q] = m[q]);
|
|
662
|
-
}
|
|
663
|
-
m = A;
|
|
664
|
-
}
|
|
665
|
-
} else if (_ && typeof I == "string" && k === "[object Array]")
|
|
666
|
-
m = m.join(I), m && (m = this.extendTranslation(m, r, a, o));
|
|
667
|
-
else {
|
|
668
|
-
var h = !1, O = !1, j = a.count !== void 0 && typeof a.count != "string", L = t.hasDefaultValue(a), P = j ? this.pluralResolver.getSuffix(b, a.count, a) : "", K = a["defaultValue".concat(P)] || a.defaultValue;
|
|
669
|
-
!this.isValidLookup(m) && L && (h = !0, m = K), this.isValidLookup(m) || (O = !0, m = f);
|
|
670
|
-
var je = a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey, F = je && O ? void 0 : m, V = L && K !== m && this.options.updateMissing;
|
|
671
|
-
if (O || h || V) {
|
|
672
|
-
if (this.logger.log(V ? "updateKey" : "missingKey", b, g, f, V ? K : m), d) {
|
|
673
|
-
var Ue = this.resolve(f, T(T({}, a), {}, {
|
|
674
|
-
keySeparator: !1
|
|
675
|
-
}));
|
|
676
|
-
Ue && Ue.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
677
|
-
}
|
|
678
|
-
var oe = [], pe = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
|
|
679
|
-
if (this.options.saveMissingTo === "fallback" && pe && pe[0])
|
|
680
|
-
for (var ke = 0; ke < pe.length; ke++)
|
|
681
|
-
oe.push(pe[ke]);
|
|
682
|
-
else
|
|
683
|
-
this.options.saveMissingTo === "all" ? oe = this.languageUtils.toResolveHierarchy(a.lng || this.language) : oe.push(a.lng || this.language);
|
|
684
|
-
var Be = function(ne, Re, He) {
|
|
685
|
-
var $e = L && He !== m ? He : F;
|
|
686
|
-
s.options.missingKeyHandler ? s.options.missingKeyHandler(ne, g, Re, $e, V, a) : s.backendConnector && s.backendConnector.saveMissing && s.backendConnector.saveMissing(ne, g, Re, $e, V, a), s.emit("missingKey", ne, g, Re, m);
|
|
687
|
-
};
|
|
688
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && j ? oe.forEach(function(Le) {
|
|
689
|
-
s.pluralResolver.getSuffixes(Le, a).forEach(function(ne) {
|
|
690
|
-
Be([Le], f + ne, a["defaultValue".concat(ne)] || K);
|
|
691
|
-
});
|
|
692
|
-
}) : Be(oe, f, K));
|
|
693
|
-
}
|
|
694
|
-
m = this.extendTranslation(m, r, a, v, o), O && m === f && this.options.appendNamespaceToMissingKey && (m = "".concat(g, ":").concat(f)), (O || h) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? "".concat(g, ":").concat(f) : f, h ? m : void 0) : m = this.options.parseMissingKeyHandler(m));
|
|
695
|
-
}
|
|
696
|
-
return u ? (v.res = m, v) : m;
|
|
697
|
-
}
|
|
698
|
-
}, {
|
|
699
|
-
key: "extendTranslation",
|
|
700
|
-
value: function(r, a, o, s, u) {
|
|
701
|
-
var d = this;
|
|
702
|
-
if (this.i18nFormat && this.i18nFormat.parse)
|
|
703
|
-
r = this.i18nFormat.parse(r, T(T({}, this.options.interpolation.defaultVariables), o), s.usedLng, s.usedNS, s.usedKey, {
|
|
704
|
-
resolved: s
|
|
705
|
-
});
|
|
706
|
-
else if (!o.skipInterpolation) {
|
|
707
|
-
o.interpolation && this.interpolator.init(T(T({}, o), {
|
|
708
|
-
interpolation: T(T({}, this.options.interpolation), o.interpolation)
|
|
709
|
-
}));
|
|
710
|
-
var c = typeof r == "string" && (o && o.interpolation && o.interpolation.skipOnVariables !== void 0 ? o.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables), f;
|
|
711
|
-
if (c) {
|
|
712
|
-
var p = r.match(this.interpolator.nestingRegexp);
|
|
713
|
-
f = p && p.length;
|
|
714
|
-
}
|
|
715
|
-
var g = o.replace && typeof o.replace != "string" ? o.replace : o;
|
|
716
|
-
if (this.options.interpolation.defaultVariables && (g = T(T({}, this.options.interpolation.defaultVariables), g)), r = this.interpolator.interpolate(r, g, o.lng || this.language, o), c) {
|
|
717
|
-
var b = r.match(this.interpolator.nestingRegexp), y = b && b.length;
|
|
718
|
-
f < y && (o.nest = !1);
|
|
719
|
-
}
|
|
720
|
-
!o.lng && this.options.compatibilityAPI !== "v1" && s && s.res && (o.lng = s.usedLng), o.nest !== !1 && (r = this.interpolator.nest(r, function() {
|
|
721
|
-
for (var m = arguments.length, S = new Array(m), x = 0; x < m; x++)
|
|
722
|
-
S[x] = arguments[x];
|
|
723
|
-
return u && u[0] === S[0] && !o.context ? (d.logger.warn("It seems you are nesting recursively key: ".concat(S[0], " in key: ").concat(a[0])), null) : d.translate.apply(d, S.concat([a]));
|
|
724
|
-
}, o)), o.interpolation && this.interpolator.reset();
|
|
725
|
-
}
|
|
726
|
-
var w = o.postProcess || this.options.postProcess, v = typeof w == "string" ? [w] : w;
|
|
727
|
-
return r != null && v && v.length && o.applyPostProcessor !== !1 && (r = _t.handle(v, r, a, this.options && this.options.postProcessPassResolved ? T({
|
|
728
|
-
i18nResolved: s
|
|
729
|
-
}, o) : o, this)), r;
|
|
730
|
-
}
|
|
731
|
-
}, {
|
|
732
|
-
key: "resolve",
|
|
733
|
-
value: function(r) {
|
|
734
|
-
var a = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, u, d, c, f;
|
|
735
|
-
return typeof r == "string" && (r = [r]), r.forEach(function(p) {
|
|
736
|
-
if (!a.isValidLookup(s)) {
|
|
737
|
-
var g = a.extractFromKey(p, o), b = g.key;
|
|
738
|
-
u = b;
|
|
739
|
-
var y = g.namespaces;
|
|
740
|
-
a.options.fallbackNS && (y = y.concat(a.options.fallbackNS));
|
|
741
|
-
var w = o.count !== void 0 && typeof o.count != "string", v = w && !o.ordinal && o.count === 0 && a.pluralResolver.shouldUseIntlApi(), m = o.context !== void 0 && (typeof o.context == "string" || typeof o.context == "number") && o.context !== "", S = o.lngs ? o.lngs : a.languageUtils.toResolveHierarchy(o.lng || a.language, o.fallbackLng);
|
|
742
|
-
y.forEach(function(x) {
|
|
743
|
-
a.isValidLookup(s) || (f = x, !Ge["".concat(S[0], "-").concat(x)] && a.utils && a.utils.hasLoadedNamespace && !a.utils.hasLoadedNamespace(f) && (Ge["".concat(S[0], "-").concat(x)] = !0, a.logger.warn('key "'.concat(u, '" for languages "').concat(S.join(", "), `" won't get resolved as namespace "`).concat(f, '" was not yet loaded'), "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), S.forEach(function(k) {
|
|
744
|
-
if (!a.isValidLookup(s)) {
|
|
745
|
-
c = k;
|
|
746
|
-
var D = [b];
|
|
747
|
-
if (a.i18nFormat && a.i18nFormat.addLookupKeys)
|
|
748
|
-
a.i18nFormat.addLookupKeys(D, b, k, x, o);
|
|
749
|
-
else {
|
|
750
|
-
var I;
|
|
751
|
-
w && (I = a.pluralResolver.getSuffix(k, o.count, o));
|
|
752
|
-
var _ = "".concat(a.options.pluralSeparator, "zero");
|
|
753
|
-
if (w && (D.push(b + I), v && D.push(b + _)), m) {
|
|
754
|
-
var R = "".concat(b).concat(a.options.contextSeparator).concat(o.context);
|
|
755
|
-
D.push(R), w && (D.push(R + I), v && D.push(R + _));
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
for (var C; C = D.pop(); )
|
|
759
|
-
a.isValidLookup(s) || (d = C, s = a.getResource(k, x, C, o));
|
|
760
|
-
}
|
|
761
|
-
}));
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
}), {
|
|
765
|
-
res: s,
|
|
766
|
-
usedKey: u,
|
|
767
|
-
exactUsedKey: d,
|
|
768
|
-
usedLng: c,
|
|
769
|
-
usedNS: f
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
}, {
|
|
773
|
-
key: "isValidLookup",
|
|
774
|
-
value: function(r) {
|
|
775
|
-
return r !== void 0 && !(!this.options.returnNull && r === null) && !(!this.options.returnEmptyString && r === "");
|
|
776
|
-
}
|
|
777
|
-
}, {
|
|
778
|
-
key: "getResource",
|
|
779
|
-
value: function(r, a, o) {
|
|
780
|
-
var s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
781
|
-
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(r, a, o, s) : this.resourceStore.getResource(r, a, o, s);
|
|
782
|
-
}
|
|
783
|
-
}], [{
|
|
784
|
-
key: "hasDefaultValue",
|
|
785
|
-
value: function(r) {
|
|
786
|
-
var a = "defaultValue";
|
|
787
|
-
for (var o in r)
|
|
788
|
-
if (Object.prototype.hasOwnProperty.call(r, o) && a === o.substring(0, a.length) && r[o] !== void 0)
|
|
789
|
-
return !0;
|
|
790
|
-
return !1;
|
|
791
|
-
}
|
|
792
|
-
}]), t;
|
|
793
|
-
}(ee);
|
|
794
|
-
function Ee(i) {
|
|
795
|
-
return i.charAt(0).toUpperCase() + i.slice(1);
|
|
796
|
-
}
|
|
797
|
-
var Ye = function() {
|
|
798
|
-
function i(e) {
|
|
799
|
-
B(this, i), this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = J.create("languageUtils");
|
|
800
|
-
}
|
|
801
|
-
return H(i, [{
|
|
802
|
-
key: "getScriptPartFromCode",
|
|
803
|
-
value: function(t) {
|
|
804
|
-
if (!t || t.indexOf("-") < 0)
|
|
805
|
-
return null;
|
|
806
|
-
var n = t.split("-");
|
|
807
|
-
return n.length === 2 || (n.pop(), n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-"));
|
|
808
|
-
}
|
|
809
|
-
}, {
|
|
810
|
-
key: "getLanguagePartFromCode",
|
|
811
|
-
value: function(t) {
|
|
812
|
-
if (!t || t.indexOf("-") < 0)
|
|
813
|
-
return t;
|
|
814
|
-
var n = t.split("-");
|
|
815
|
-
return this.formatLanguageCode(n[0]);
|
|
816
|
-
}
|
|
817
|
-
}, {
|
|
818
|
-
key: "formatLanguageCode",
|
|
819
|
-
value: function(t) {
|
|
820
|
-
if (typeof t == "string" && t.indexOf("-") > -1) {
|
|
821
|
-
var n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"], r = t.split("-");
|
|
822
|
-
return this.options.lowerCaseLng ? r = r.map(function(a) {
|
|
823
|
-
return a.toLowerCase();
|
|
824
|
-
}) : r.length === 2 ? (r[0] = r[0].toLowerCase(), r[1] = r[1].toUpperCase(), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = Ee(r[1].toLowerCase()))) : r.length === 3 && (r[0] = r[0].toLowerCase(), r[1].length === 2 && (r[1] = r[1].toUpperCase()), r[0] !== "sgn" && r[2].length === 2 && (r[2] = r[2].toUpperCase()), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = Ee(r[1].toLowerCase())), n.indexOf(r[2].toLowerCase()) > -1 && (r[2] = Ee(r[2].toLowerCase()))), r.join("-");
|
|
825
|
-
}
|
|
826
|
-
return this.options.cleanCode || this.options.lowerCaseLng ? t.toLowerCase() : t;
|
|
827
|
-
}
|
|
828
|
-
}, {
|
|
829
|
-
key: "isSupportedCode",
|
|
830
|
-
value: function(t) {
|
|
831
|
-
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (t = this.getLanguagePartFromCode(t)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(t) > -1;
|
|
832
|
-
}
|
|
833
|
-
}, {
|
|
834
|
-
key: "getBestMatchFromCodes",
|
|
835
|
-
value: function(t) {
|
|
836
|
-
var n = this;
|
|
837
|
-
if (!t)
|
|
838
|
-
return null;
|
|
839
|
-
var r;
|
|
840
|
-
return t.forEach(function(a) {
|
|
841
|
-
if (!r) {
|
|
842
|
-
var o = n.formatLanguageCode(a);
|
|
843
|
-
(!n.options.supportedLngs || n.isSupportedCode(o)) && (r = o);
|
|
844
|
-
}
|
|
845
|
-
}), !r && this.options.supportedLngs && t.forEach(function(a) {
|
|
846
|
-
if (!r) {
|
|
847
|
-
var o = n.getLanguagePartFromCode(a);
|
|
848
|
-
if (n.isSupportedCode(o))
|
|
849
|
-
return r = o;
|
|
850
|
-
r = n.options.supportedLngs.find(function(s) {
|
|
851
|
-
if (s === o)
|
|
852
|
-
return s;
|
|
853
|
-
if (!(s.indexOf("-") < 0 && o.indexOf("-") < 0) && s.indexOf(o) === 0)
|
|
854
|
-
return s;
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
|
-
}), r || (r = this.getFallbackCodes(this.options.fallbackLng)[0]), r;
|
|
858
|
-
}
|
|
859
|
-
}, {
|
|
860
|
-
key: "getFallbackCodes",
|
|
861
|
-
value: function(t, n) {
|
|
862
|
-
if (!t)
|
|
863
|
-
return [];
|
|
864
|
-
if (typeof t == "function" && (t = t(n)), typeof t == "string" && (t = [t]), Object.prototype.toString.apply(t) === "[object Array]")
|
|
865
|
-
return t;
|
|
866
|
-
if (!n)
|
|
867
|
-
return t.default || [];
|
|
868
|
-
var r = t[n];
|
|
869
|
-
return r || (r = t[this.getScriptPartFromCode(n)]), r || (r = t[this.formatLanguageCode(n)]), r || (r = t[this.getLanguagePartFromCode(n)]), r || (r = t.default), r || [];
|
|
870
|
-
}
|
|
871
|
-
}, {
|
|
872
|
-
key: "toResolveHierarchy",
|
|
873
|
-
value: function(t, n) {
|
|
874
|
-
var r = this, a = this.getFallbackCodes(n || this.options.fallbackLng || [], t), o = [], s = function(d) {
|
|
875
|
-
d && (r.isSupportedCode(d) ? o.push(d) : r.logger.warn("rejecting language code not found in supportedLngs: ".concat(d)));
|
|
876
|
-
};
|
|
877
|
-
return typeof t == "string" && t.indexOf("-") > -1 ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(t))) : typeof t == "string" && s(this.formatLanguageCode(t)), a.forEach(function(u) {
|
|
878
|
-
o.indexOf(u) < 0 && s(r.formatLanguageCode(u));
|
|
879
|
-
}), o;
|
|
880
|
-
}
|
|
881
|
-
}]), i;
|
|
882
|
-
}(), hn = [{
|
|
883
|
-
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
|
|
884
|
-
nr: [1, 2],
|
|
885
|
-
fc: 1
|
|
886
|
-
}, {
|
|
887
|
-
lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"],
|
|
888
|
-
nr: [1, 2],
|
|
889
|
-
fc: 2
|
|
890
|
-
}, {
|
|
891
|
-
lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
|
|
892
|
-
nr: [1],
|
|
893
|
-
fc: 3
|
|
894
|
-
}, {
|
|
895
|
-
lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
|
|
896
|
-
nr: [1, 2, 5],
|
|
897
|
-
fc: 4
|
|
898
|
-
}, {
|
|
899
|
-
lngs: ["ar"],
|
|
900
|
-
nr: [0, 1, 2, 3, 11, 100],
|
|
901
|
-
fc: 5
|
|
902
|
-
}, {
|
|
903
|
-
lngs: ["cs", "sk"],
|
|
904
|
-
nr: [1, 2, 5],
|
|
905
|
-
fc: 6
|
|
906
|
-
}, {
|
|
907
|
-
lngs: ["csb", "pl"],
|
|
908
|
-
nr: [1, 2, 5],
|
|
909
|
-
fc: 7
|
|
910
|
-
}, {
|
|
911
|
-
lngs: ["cy"],
|
|
912
|
-
nr: [1, 2, 3, 8],
|
|
913
|
-
fc: 8
|
|
914
|
-
}, {
|
|
915
|
-
lngs: ["fr"],
|
|
916
|
-
nr: [1, 2],
|
|
917
|
-
fc: 9
|
|
918
|
-
}, {
|
|
919
|
-
lngs: ["ga"],
|
|
920
|
-
nr: [1, 2, 3, 7, 11],
|
|
921
|
-
fc: 10
|
|
922
|
-
}, {
|
|
923
|
-
lngs: ["gd"],
|
|
924
|
-
nr: [1, 2, 3, 20],
|
|
925
|
-
fc: 11
|
|
926
|
-
}, {
|
|
927
|
-
lngs: ["is"],
|
|
928
|
-
nr: [1, 2],
|
|
929
|
-
fc: 12
|
|
930
|
-
}, {
|
|
931
|
-
lngs: ["jv"],
|
|
932
|
-
nr: [0, 1],
|
|
933
|
-
fc: 13
|
|
934
|
-
}, {
|
|
935
|
-
lngs: ["kw"],
|
|
936
|
-
nr: [1, 2, 3, 4],
|
|
937
|
-
fc: 14
|
|
938
|
-
}, {
|
|
939
|
-
lngs: ["lt"],
|
|
940
|
-
nr: [1, 2, 10],
|
|
941
|
-
fc: 15
|
|
942
|
-
}, {
|
|
943
|
-
lngs: ["lv"],
|
|
944
|
-
nr: [1, 2, 0],
|
|
945
|
-
fc: 16
|
|
946
|
-
}, {
|
|
947
|
-
lngs: ["mk"],
|
|
948
|
-
nr: [1, 2],
|
|
949
|
-
fc: 17
|
|
950
|
-
}, {
|
|
951
|
-
lngs: ["mnk"],
|
|
952
|
-
nr: [0, 1, 2],
|
|
953
|
-
fc: 18
|
|
954
|
-
}, {
|
|
955
|
-
lngs: ["mt"],
|
|
956
|
-
nr: [1, 2, 11, 20],
|
|
957
|
-
fc: 19
|
|
958
|
-
}, {
|
|
959
|
-
lngs: ["or"],
|
|
960
|
-
nr: [2, 1],
|
|
961
|
-
fc: 2
|
|
962
|
-
}, {
|
|
963
|
-
lngs: ["ro"],
|
|
964
|
-
nr: [1, 2, 20],
|
|
965
|
-
fc: 20
|
|
966
|
-
}, {
|
|
967
|
-
lngs: ["sl"],
|
|
968
|
-
nr: [5, 1, 2, 3],
|
|
969
|
-
fc: 21
|
|
970
|
-
}, {
|
|
971
|
-
lngs: ["he", "iw"],
|
|
972
|
-
nr: [1, 2, 20, 21],
|
|
973
|
-
fc: 22
|
|
974
|
-
}], vn = {
|
|
975
|
-
1: function(e) {
|
|
976
|
-
return +(e > 1);
|
|
977
|
-
},
|
|
978
|
-
2: function(e) {
|
|
979
|
-
return +(e != 1);
|
|
980
|
-
},
|
|
981
|
-
3: function(e) {
|
|
982
|
-
return 0;
|
|
983
|
-
},
|
|
984
|
-
4: function(e) {
|
|
985
|
-
return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
|
|
986
|
-
},
|
|
987
|
-
5: function(e) {
|
|
988
|
-
return e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5;
|
|
989
|
-
},
|
|
990
|
-
6: function(e) {
|
|
991
|
-
return e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2;
|
|
992
|
-
},
|
|
993
|
-
7: function(e) {
|
|
994
|
-
return e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
|
|
995
|
-
},
|
|
996
|
-
8: function(e) {
|
|
997
|
-
return e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3;
|
|
998
|
-
},
|
|
999
|
-
9: function(e) {
|
|
1000
|
-
return +(e >= 2);
|
|
1001
|
-
},
|
|
1002
|
-
10: function(e) {
|
|
1003
|
-
return e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4;
|
|
1004
|
-
},
|
|
1005
|
-
11: function(e) {
|
|
1006
|
-
return e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3;
|
|
1007
|
-
},
|
|
1008
|
-
12: function(e) {
|
|
1009
|
-
return +(e % 10 != 1 || e % 100 == 11);
|
|
1010
|
-
},
|
|
1011
|
-
13: function(e) {
|
|
1012
|
-
return +(e !== 0);
|
|
1013
|
-
},
|
|
1014
|
-
14: function(e) {
|
|
1015
|
-
return e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3;
|
|
1016
|
-
},
|
|
1017
|
-
15: function(e) {
|
|
1018
|
-
return e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2;
|
|
1019
|
-
},
|
|
1020
|
-
16: function(e) {
|
|
1021
|
-
return e % 10 == 1 && e % 100 != 11 ? 0 : e !== 0 ? 1 : 2;
|
|
1022
|
-
},
|
|
1023
|
-
17: function(e) {
|
|
1024
|
-
return e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1;
|
|
1025
|
-
},
|
|
1026
|
-
18: function(e) {
|
|
1027
|
-
return e == 0 ? 0 : e == 1 ? 1 : 2;
|
|
1028
|
-
},
|
|
1029
|
-
19: function(e) {
|
|
1030
|
-
return e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3;
|
|
1031
|
-
},
|
|
1032
|
-
20: function(e) {
|
|
1033
|
-
return e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2;
|
|
1034
|
-
},
|
|
1035
|
-
21: function(e) {
|
|
1036
|
-
return e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0;
|
|
1037
|
-
},
|
|
1038
|
-
22: function(e) {
|
|
1039
|
-
return e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3;
|
|
1040
|
-
}
|
|
1041
|
-
}, mn = ["v1", "v2", "v3"], Ze = {
|
|
1042
|
-
zero: 0,
|
|
1043
|
-
one: 1,
|
|
1044
|
-
two: 2,
|
|
1045
|
-
few: 3,
|
|
1046
|
-
many: 4,
|
|
1047
|
-
other: 5
|
|
1048
|
-
};
|
|
1049
|
-
function yn() {
|
|
1050
|
-
var i = {};
|
|
1051
|
-
return hn.forEach(function(e) {
|
|
1052
|
-
e.lngs.forEach(function(t) {
|
|
1053
|
-
i[t] = {
|
|
1054
|
-
numbers: e.nr,
|
|
1055
|
-
plurals: vn[e.fc]
|
|
1056
|
-
};
|
|
1057
|
-
});
|
|
1058
|
-
}), i;
|
|
1059
|
-
}
|
|
1060
|
-
var bn = function() {
|
|
1061
|
-
function i(e) {
|
|
1062
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1063
|
-
B(this, i), this.languageUtils = e, this.options = t, this.logger = J.create("pluralResolver"), (!this.options.compatibilityJSON || this.options.compatibilityJSON === "v4") && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = yn();
|
|
1064
|
-
}
|
|
1065
|
-
return H(i, [{
|
|
1066
|
-
key: "addRule",
|
|
1067
|
-
value: function(t, n) {
|
|
1068
|
-
this.rules[t] = n;
|
|
1069
|
-
}
|
|
1070
|
-
}, {
|
|
1071
|
-
key: "getRule",
|
|
1072
|
-
value: function(t) {
|
|
1073
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1074
|
-
if (this.shouldUseIntlApi())
|
|
1075
|
-
try {
|
|
1076
|
-
return new Intl.PluralRules(t, {
|
|
1077
|
-
type: n.ordinal ? "ordinal" : "cardinal"
|
|
1078
|
-
});
|
|
1079
|
-
} catch {
|
|
1080
|
-
return;
|
|
1081
|
-
}
|
|
1082
|
-
return this.rules[t] || this.rules[this.languageUtils.getLanguagePartFromCode(t)];
|
|
1083
|
-
}
|
|
1084
|
-
}, {
|
|
1085
|
-
key: "needsPlural",
|
|
1086
|
-
value: function(t) {
|
|
1087
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = this.getRule(t, n);
|
|
1088
|
-
return this.shouldUseIntlApi() ? r && r.resolvedOptions().pluralCategories.length > 1 : r && r.numbers.length > 1;
|
|
1089
|
-
}
|
|
1090
|
-
}, {
|
|
1091
|
-
key: "getPluralFormsOfKey",
|
|
1092
|
-
value: function(t, n) {
|
|
1093
|
-
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1094
|
-
return this.getSuffixes(t, r).map(function(a) {
|
|
1095
|
-
return "".concat(n).concat(a);
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
}, {
|
|
1099
|
-
key: "getSuffixes",
|
|
1100
|
-
value: function(t) {
|
|
1101
|
-
var n = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = this.getRule(t, r);
|
|
1102
|
-
return a ? this.shouldUseIntlApi() ? a.resolvedOptions().pluralCategories.sort(function(o, s) {
|
|
1103
|
-
return Ze[o] - Ze[s];
|
|
1104
|
-
}).map(function(o) {
|
|
1105
|
-
return "".concat(n.options.prepend).concat(o);
|
|
1106
|
-
}) : a.numbers.map(function(o) {
|
|
1107
|
-
return n.getSuffix(t, o, r);
|
|
1108
|
-
}) : [];
|
|
1109
|
-
}
|
|
1110
|
-
}, {
|
|
1111
|
-
key: "getSuffix",
|
|
1112
|
-
value: function(t, n) {
|
|
1113
|
-
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a = this.getRule(t, r);
|
|
1114
|
-
return a ? this.shouldUseIntlApi() ? "".concat(this.options.prepend).concat(a.select(n)) : this.getSuffixRetroCompatible(a, n) : (this.logger.warn("no plural rule found for: ".concat(t)), "");
|
|
1115
|
-
}
|
|
1116
|
-
}, {
|
|
1117
|
-
key: "getSuffixRetroCompatible",
|
|
1118
|
-
value: function(t, n) {
|
|
1119
|
-
var r = this, a = t.noAbs ? t.plurals(n) : t.plurals(Math.abs(n)), o = t.numbers[a];
|
|
1120
|
-
this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (o === 2 ? o = "plural" : o === 1 && (o = ""));
|
|
1121
|
-
var s = function() {
|
|
1122
|
-
return r.options.prepend && o.toString() ? r.options.prepend + o.toString() : o.toString();
|
|
1123
|
-
};
|
|
1124
|
-
return this.options.compatibilityJSON === "v1" ? o === 1 ? "" : typeof o == "number" ? "_plural_".concat(o.toString()) : s() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 ? s() : this.options.prepend && a.toString() ? this.options.prepend + a.toString() : a.toString();
|
|
1125
|
-
}
|
|
1126
|
-
}, {
|
|
1127
|
-
key: "shouldUseIntlApi",
|
|
1128
|
-
value: function() {
|
|
1129
|
-
return !mn.includes(this.options.compatibilityJSON);
|
|
1130
|
-
}
|
|
1131
|
-
}]), i;
|
|
1132
|
-
}();
|
|
1133
|
-
function et(i, e) {
|
|
1134
|
-
var t = Object.keys(i);
|
|
1135
|
-
if (Object.getOwnPropertySymbols) {
|
|
1136
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
1137
|
-
e && (n = n.filter(function(r) {
|
|
1138
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
1139
|
-
})), t.push.apply(t, n);
|
|
1140
|
-
}
|
|
1141
|
-
return t;
|
|
1142
|
-
}
|
|
1143
|
-
function $(i) {
|
|
1144
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1145
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
1146
|
-
e % 2 ? et(Object(t), !0).forEach(function(n) {
|
|
1147
|
-
W(i, n, t[n]);
|
|
1148
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : et(Object(t)).forEach(function(n) {
|
|
1149
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1150
|
-
});
|
|
1151
|
-
}
|
|
1152
|
-
return i;
|
|
1153
|
-
}
|
|
1154
|
-
function tt(i, e, t) {
|
|
1155
|
-
var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = an(i, e, t);
|
|
1156
|
-
return !a && r && typeof t == "string" && (a = be(i, t, n), a === void 0 && (a = be(e, t, n))), a;
|
|
1157
|
-
}
|
|
1158
|
-
var wn = function() {
|
|
1159
|
-
function i() {
|
|
1160
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1161
|
-
B(this, i), this.logger = J.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || function(t) {
|
|
1162
|
-
return t;
|
|
1163
|
-
}, this.init(e);
|
|
1164
|
-
}
|
|
1165
|
-
return H(i, [{
|
|
1166
|
-
key: "init",
|
|
1167
|
-
value: function() {
|
|
1168
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1169
|
-
t.interpolation || (t.interpolation = {
|
|
1170
|
-
escapeValue: !0
|
|
1171
|
-
});
|
|
1172
|
-
var n = t.interpolation;
|
|
1173
|
-
this.escape = n.escape !== void 0 ? n.escape : sn, this.escapeValue = n.escapeValue !== void 0 ? n.escapeValue : !0, this.useRawValueToEscape = n.useRawValueToEscape !== void 0 ? n.useRawValueToEscape : !1, this.prefix = n.prefix ? re(n.prefix) : n.prefixEscaped || "{{", this.suffix = n.suffix ? re(n.suffix) : n.suffixEscaped || "}}", this.formatSeparator = n.formatSeparator ? n.formatSeparator : n.formatSeparator || ",", this.unescapePrefix = n.unescapeSuffix ? "" : n.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : n.unescapeSuffix || "", this.nestingPrefix = n.nestingPrefix ? re(n.nestingPrefix) : n.nestingPrefixEscaped || re("$t("), this.nestingSuffix = n.nestingSuffix ? re(n.nestingSuffix) : n.nestingSuffixEscaped || re(")"), this.nestingOptionsSeparator = n.nestingOptionsSeparator ? n.nestingOptionsSeparator : n.nestingOptionsSeparator || ",", this.maxReplaces = n.maxReplaces ? n.maxReplaces : 1e3, this.alwaysFormat = n.alwaysFormat !== void 0 ? n.alwaysFormat : !1, this.resetRegExp();
|
|
1174
|
-
}
|
|
1175
|
-
}, {
|
|
1176
|
-
key: "reset",
|
|
1177
|
-
value: function() {
|
|
1178
|
-
this.options && this.init(this.options);
|
|
1179
|
-
}
|
|
1180
|
-
}, {
|
|
1181
|
-
key: "resetRegExp",
|
|
1182
|
-
value: function() {
|
|
1183
|
-
var t = "".concat(this.prefix, "(.+?)").concat(this.suffix);
|
|
1184
|
-
this.regexp = new RegExp(t, "g");
|
|
1185
|
-
var n = "".concat(this.prefix).concat(this.unescapePrefix, "(.+?)").concat(this.unescapeSuffix).concat(this.suffix);
|
|
1186
|
-
this.regexpUnescape = new RegExp(n, "g");
|
|
1187
|
-
var r = "".concat(this.nestingPrefix, "(.+?)").concat(this.nestingSuffix);
|
|
1188
|
-
this.nestingRegexp = new RegExp(r, "g");
|
|
1189
|
-
}
|
|
1190
|
-
}, {
|
|
1191
|
-
key: "interpolate",
|
|
1192
|
-
value: function(t, n, r, a) {
|
|
1193
|
-
var o = this, s, u, d, c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
|
|
1194
|
-
function f(w) {
|
|
1195
|
-
return w.replace(/\$/g, "$$$$");
|
|
1196
|
-
}
|
|
1197
|
-
var p = function(v) {
|
|
1198
|
-
if (v.indexOf(o.formatSeparator) < 0) {
|
|
1199
|
-
var m = tt(n, c, v, o.options.keySeparator, o.options.ignoreJSONStructure);
|
|
1200
|
-
return o.alwaysFormat ? o.format(m, void 0, r, $($($({}, a), n), {}, {
|
|
1201
|
-
interpolationkey: v
|
|
1202
|
-
})) : m;
|
|
1203
|
-
}
|
|
1204
|
-
var S = v.split(o.formatSeparator), x = S.shift().trim(), k = S.join(o.formatSeparator).trim();
|
|
1205
|
-
return o.format(tt(n, c, x, o.options.keySeparator, o.options.ignoreJSONStructure), k, r, $($($({}, a), n), {}, {
|
|
1206
|
-
interpolationkey: x
|
|
1207
|
-
}));
|
|
1208
|
-
};
|
|
1209
|
-
this.resetRegExp();
|
|
1210
|
-
var g = a && a.missingInterpolationHandler || this.options.missingInterpolationHandler, b = a && a.interpolation && a.interpolation.skipOnVariables !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables, y = [{
|
|
1211
|
-
regex: this.regexpUnescape,
|
|
1212
|
-
safeValue: function(v) {
|
|
1213
|
-
return f(v);
|
|
1214
|
-
}
|
|
1215
|
-
}, {
|
|
1216
|
-
regex: this.regexp,
|
|
1217
|
-
safeValue: function(v) {
|
|
1218
|
-
return o.escapeValue ? f(o.escape(v)) : f(v);
|
|
1219
|
-
}
|
|
1220
|
-
}];
|
|
1221
|
-
return y.forEach(function(w) {
|
|
1222
|
-
for (d = 0; s = w.regex.exec(t); ) {
|
|
1223
|
-
var v = s[1].trim();
|
|
1224
|
-
if (u = p(v), u === void 0)
|
|
1225
|
-
if (typeof g == "function") {
|
|
1226
|
-
var m = g(t, s, a);
|
|
1227
|
-
u = typeof m == "string" ? m : "";
|
|
1228
|
-
} else if (a && Object.prototype.hasOwnProperty.call(a, v))
|
|
1229
|
-
u = "";
|
|
1230
|
-
else if (b) {
|
|
1231
|
-
u = s[0];
|
|
1232
|
-
continue;
|
|
1233
|
-
} else
|
|
1234
|
-
o.logger.warn("missed to pass in variable ".concat(v, " for interpolating ").concat(t)), u = "";
|
|
1235
|
-
else
|
|
1236
|
-
typeof u != "string" && !o.useRawValueToEscape && (u = ze(u));
|
|
1237
|
-
var S = w.safeValue(u);
|
|
1238
|
-
if (t = t.replace(s[0], S), b ? (w.regex.lastIndex += u.length, w.regex.lastIndex -= s[0].length) : w.regex.lastIndex = 0, d++, d >= o.maxReplaces)
|
|
1239
|
-
break;
|
|
1240
|
-
}
|
|
1241
|
-
}), t;
|
|
1242
|
-
}
|
|
1243
|
-
}, {
|
|
1244
|
-
key: "nest",
|
|
1245
|
-
value: function(t, n) {
|
|
1246
|
-
var r = this, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o, s, u;
|
|
1247
|
-
function d(g, b) {
|
|
1248
|
-
var y = this.nestingOptionsSeparator;
|
|
1249
|
-
if (g.indexOf(y) < 0)
|
|
1250
|
-
return g;
|
|
1251
|
-
var w = g.split(new RegExp("".concat(y, "[ ]*{"))), v = "{".concat(w[1]);
|
|
1252
|
-
g = w[0], v = this.interpolate(v, u);
|
|
1253
|
-
var m = v.match(/'/g), S = v.match(/"/g);
|
|
1254
|
-
(m && m.length % 2 === 0 && !S || S.length % 2 !== 0) && (v = v.replace(/'/g, '"'));
|
|
1255
|
-
try {
|
|
1256
|
-
u = JSON.parse(v), b && (u = $($({}, b), u));
|
|
1257
|
-
} catch (x) {
|
|
1258
|
-
return this.logger.warn("failed parsing options string in nesting for key ".concat(g), x), "".concat(g).concat(y).concat(v);
|
|
1259
|
-
}
|
|
1260
|
-
return delete u.defaultValue, g;
|
|
1261
|
-
}
|
|
1262
|
-
for (; o = this.nestingRegexp.exec(t); ) {
|
|
1263
|
-
var c = [];
|
|
1264
|
-
u = $({}, a), u = u.replace && typeof u.replace != "string" ? u.replace : u, u.applyPostProcessor = !1, delete u.defaultValue;
|
|
1265
|
-
var f = !1;
|
|
1266
|
-
if (o[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(o[1])) {
|
|
1267
|
-
var p = o[1].split(this.formatSeparator).map(function(g) {
|
|
1268
|
-
return g.trim();
|
|
1269
|
-
});
|
|
1270
|
-
o[1] = p.shift(), c = p, f = !0;
|
|
1271
|
-
}
|
|
1272
|
-
if (s = n(d.call(this, o[1].trim(), u), u), s && o[0] === t && typeof s != "string")
|
|
1273
|
-
return s;
|
|
1274
|
-
typeof s != "string" && (s = ze(s)), s || (this.logger.warn("missed to resolve ".concat(o[1], " for nesting ").concat(t)), s = ""), f && (s = c.reduce(function(g, b) {
|
|
1275
|
-
return r.format(g, b, a.lng, $($({}, a), {}, {
|
|
1276
|
-
interpolationkey: o[1].trim()
|
|
1277
|
-
}));
|
|
1278
|
-
}, s.trim())), t = t.replace(o[0], s), this.regexp.lastIndex = 0;
|
|
1279
|
-
}
|
|
1280
|
-
return t;
|
|
1281
|
-
}
|
|
1282
|
-
}]), i;
|
|
1283
|
-
}();
|
|
1284
|
-
function nt(i, e) {
|
|
1285
|
-
var t = Object.keys(i);
|
|
1286
|
-
if (Object.getOwnPropertySymbols) {
|
|
1287
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
1288
|
-
e && (n = n.filter(function(r) {
|
|
1289
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
1290
|
-
})), t.push.apply(t, n);
|
|
1291
|
-
}
|
|
1292
|
-
return t;
|
|
1293
|
-
}
|
|
1294
|
-
function G(i) {
|
|
1295
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1296
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
1297
|
-
e % 2 ? nt(Object(t), !0).forEach(function(n) {
|
|
1298
|
-
W(i, n, t[n]);
|
|
1299
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : nt(Object(t)).forEach(function(n) {
|
|
1300
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1301
|
-
});
|
|
1302
|
-
}
|
|
1303
|
-
return i;
|
|
1304
|
-
}
|
|
1305
|
-
function On(i) {
|
|
1306
|
-
var e = i.toLowerCase().trim(), t = {};
|
|
1307
|
-
if (i.indexOf("(") > -1) {
|
|
1308
|
-
var n = i.split("(");
|
|
1309
|
-
e = n[0].toLowerCase().trim();
|
|
1310
|
-
var r = n[1].substring(0, n[1].length - 1);
|
|
1311
|
-
if (e === "currency" && r.indexOf(":") < 0)
|
|
1312
|
-
t.currency || (t.currency = r.trim());
|
|
1313
|
-
else if (e === "relativetime" && r.indexOf(":") < 0)
|
|
1314
|
-
t.range || (t.range = r.trim());
|
|
1315
|
-
else {
|
|
1316
|
-
var a = r.split(";");
|
|
1317
|
-
a.forEach(function(o) {
|
|
1318
|
-
if (o) {
|
|
1319
|
-
var s = o.split(":"), u = Zt(s), d = u[0], c = u.slice(1), f = c.join(":").trim().replace(/^'+|'+$/g, "");
|
|
1320
|
-
t[d.trim()] || (t[d.trim()] = f), f === "false" && (t[d.trim()] = !1), f === "true" && (t[d.trim()] = !0), isNaN(f) || (t[d.trim()] = parseInt(f, 10));
|
|
1321
|
-
}
|
|
1322
|
-
});
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
return {
|
|
1326
|
-
formatName: e,
|
|
1327
|
-
formatOptions: t
|
|
1328
|
-
};
|
|
1329
|
-
}
|
|
1330
|
-
function ie(i) {
|
|
1331
|
-
var e = {};
|
|
1332
|
-
return function(n, r, a) {
|
|
1333
|
-
var o = r + JSON.stringify(a), s = e[o];
|
|
1334
|
-
return s || (s = i(r, a), e[o] = s), s(n);
|
|
1335
|
-
};
|
|
1336
|
-
}
|
|
1337
|
-
var Sn = function() {
|
|
1338
|
-
function i() {
|
|
1339
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1340
|
-
B(this, i), this.logger = J.create("formatter"), this.options = e, this.formats = {
|
|
1341
|
-
number: ie(function(t, n) {
|
|
1342
|
-
var r = new Intl.NumberFormat(t, G({}, n));
|
|
1343
|
-
return function(a) {
|
|
1344
|
-
return r.format(a);
|
|
1345
|
-
};
|
|
1346
|
-
}),
|
|
1347
|
-
currency: ie(function(t, n) {
|
|
1348
|
-
var r = new Intl.NumberFormat(t, G(G({}, n), {}, {
|
|
1349
|
-
style: "currency"
|
|
1350
|
-
}));
|
|
1351
|
-
return function(a) {
|
|
1352
|
-
return r.format(a);
|
|
1353
|
-
};
|
|
1354
|
-
}),
|
|
1355
|
-
datetime: ie(function(t, n) {
|
|
1356
|
-
var r = new Intl.DateTimeFormat(t, G({}, n));
|
|
1357
|
-
return function(a) {
|
|
1358
|
-
return r.format(a);
|
|
1359
|
-
};
|
|
1360
|
-
}),
|
|
1361
|
-
relativetime: ie(function(t, n) {
|
|
1362
|
-
var r = new Intl.RelativeTimeFormat(t, G({}, n));
|
|
1363
|
-
return function(a) {
|
|
1364
|
-
return r.format(a, n.range || "day");
|
|
1365
|
-
};
|
|
1366
|
-
}),
|
|
1367
|
-
list: ie(function(t, n) {
|
|
1368
|
-
var r = new Intl.ListFormat(t, G({}, n));
|
|
1369
|
-
return function(a) {
|
|
1370
|
-
return r.format(a);
|
|
1371
|
-
};
|
|
1372
|
-
})
|
|
1373
|
-
}, this.init(e);
|
|
1374
|
-
}
|
|
1375
|
-
return H(i, [{
|
|
1376
|
-
key: "init",
|
|
1377
|
-
value: function(t) {
|
|
1378
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
1379
|
-
interpolation: {}
|
|
1380
|
-
}, r = n.interpolation;
|
|
1381
|
-
this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ",";
|
|
1382
|
-
}
|
|
1383
|
-
}, {
|
|
1384
|
-
key: "add",
|
|
1385
|
-
value: function(t, n) {
|
|
1386
|
-
this.formats[t.toLowerCase().trim()] = n;
|
|
1387
|
-
}
|
|
1388
|
-
}, {
|
|
1389
|
-
key: "addCached",
|
|
1390
|
-
value: function(t, n) {
|
|
1391
|
-
this.formats[t.toLowerCase().trim()] = ie(n);
|
|
1392
|
-
}
|
|
1393
|
-
}, {
|
|
1394
|
-
key: "format",
|
|
1395
|
-
value: function(t, n, r) {
|
|
1396
|
-
var a = this, o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, s = n.split(this.formatSeparator), u = s.reduce(function(d, c) {
|
|
1397
|
-
var f = On(c), p = f.formatName, g = f.formatOptions;
|
|
1398
|
-
if (a.formats[p]) {
|
|
1399
|
-
var b = d;
|
|
1400
|
-
try {
|
|
1401
|
-
var y = o && o.formatParams && o.formatParams[o.interpolationkey] || {}, w = y.locale || y.lng || o.locale || o.lng || r;
|
|
1402
|
-
b = a.formats[p](d, w, G(G(G({}, g), o), y));
|
|
1403
|
-
} catch (v) {
|
|
1404
|
-
a.logger.warn(v);
|
|
1405
|
-
}
|
|
1406
|
-
return b;
|
|
1407
|
-
} else
|
|
1408
|
-
a.logger.warn("there was no format function for ".concat(p));
|
|
1409
|
-
return d;
|
|
1410
|
-
}, t);
|
|
1411
|
-
return u;
|
|
1412
|
-
}
|
|
1413
|
-
}]), i;
|
|
1414
|
-
}();
|
|
1415
|
-
function rt(i, e) {
|
|
1416
|
-
var t = Object.keys(i);
|
|
1417
|
-
if (Object.getOwnPropertySymbols) {
|
|
1418
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
1419
|
-
e && (n = n.filter(function(r) {
|
|
1420
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
1421
|
-
})), t.push.apply(t, n);
|
|
1422
|
-
}
|
|
1423
|
-
return t;
|
|
1424
|
-
}
|
|
1425
|
-
function it(i) {
|
|
1426
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1427
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
1428
|
-
e % 2 ? rt(Object(t), !0).forEach(function(n) {
|
|
1429
|
-
W(i, n, t[n]);
|
|
1430
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : rt(Object(t)).forEach(function(n) {
|
|
1431
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1432
|
-
});
|
|
1433
|
-
}
|
|
1434
|
-
return i;
|
|
1435
|
-
}
|
|
1436
|
-
function xn(i) {
|
|
1437
|
-
var e = Pn();
|
|
1438
|
-
return function() {
|
|
1439
|
-
var n = X(i), r;
|
|
1440
|
-
if (e) {
|
|
1441
|
-
var a = X(this).constructor;
|
|
1442
|
-
r = Reflect.construct(n, arguments, a);
|
|
1443
|
-
} else
|
|
1444
|
-
r = n.apply(this, arguments);
|
|
1445
|
-
return de(this, r);
|
|
1446
|
-
};
|
|
1447
|
-
}
|
|
1448
|
-
function Pn() {
|
|
1449
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
1450
|
-
return !1;
|
|
1451
|
-
if (typeof Proxy == "function")
|
|
1452
|
-
return !0;
|
|
1453
|
-
try {
|
|
1454
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1455
|
-
})), !0;
|
|
1456
|
-
} catch {
|
|
1457
|
-
return !1;
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
function jn(i, e) {
|
|
1461
|
-
i.pending[e] !== void 0 && (delete i.pending[e], i.pendingCount--);
|
|
1462
|
-
}
|
|
1463
|
-
var kn = function(i) {
|
|
1464
|
-
Se(t, i);
|
|
1465
|
-
var e = xn(t);
|
|
1466
|
-
function t(n, r, a) {
|
|
1467
|
-
var o, s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1468
|
-
return B(this, t), o = e.call(this), xe && ee.call(Z(o)), o.backend = n, o.store = r, o.services = a, o.languageUtils = a.languageUtils, o.options = s, o.logger = J.create("backendConnector"), o.waitingReads = [], o.maxParallelReads = s.maxParallelReads || 10, o.readingCalls = 0, o.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, o.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, o.state = {}, o.queue = [], o.backend && o.backend.init && o.backend.init(a, s.backend, s), o;
|
|
1469
|
-
}
|
|
1470
|
-
return H(t, [{
|
|
1471
|
-
key: "queueLoad",
|
|
1472
|
-
value: function(r, a, o, s) {
|
|
1473
|
-
var u = this, d = {}, c = {}, f = {}, p = {};
|
|
1474
|
-
return r.forEach(function(g) {
|
|
1475
|
-
var b = !0;
|
|
1476
|
-
a.forEach(function(y) {
|
|
1477
|
-
var w = "".concat(g, "|").concat(y);
|
|
1478
|
-
!o.reload && u.store.hasResourceBundle(g, y) ? u.state[w] = 2 : u.state[w] < 0 || (u.state[w] === 1 ? c[w] === void 0 && (c[w] = !0) : (u.state[w] = 1, b = !1, c[w] === void 0 && (c[w] = !0), d[w] === void 0 && (d[w] = !0), p[y] === void 0 && (p[y] = !0)));
|
|
1479
|
-
}), b || (f[g] = !0);
|
|
1480
|
-
}), (Object.keys(d).length || Object.keys(c).length) && this.queue.push({
|
|
1481
|
-
pending: c,
|
|
1482
|
-
pendingCount: Object.keys(c).length,
|
|
1483
|
-
loaded: {},
|
|
1484
|
-
errors: [],
|
|
1485
|
-
callback: s
|
|
1486
|
-
}), {
|
|
1487
|
-
toLoad: Object.keys(d),
|
|
1488
|
-
pending: Object.keys(c),
|
|
1489
|
-
toLoadLanguages: Object.keys(f),
|
|
1490
|
-
toLoadNamespaces: Object.keys(p)
|
|
1491
|
-
};
|
|
1492
|
-
}
|
|
1493
|
-
}, {
|
|
1494
|
-
key: "loaded",
|
|
1495
|
-
value: function(r, a, o) {
|
|
1496
|
-
var s = r.split("|"), u = s[0], d = s[1];
|
|
1497
|
-
a && this.emit("failedLoading", u, d, a), o && this.store.addResourceBundle(u, d, o), this.state[r] = a ? -1 : 2;
|
|
1498
|
-
var c = {};
|
|
1499
|
-
this.queue.forEach(function(f) {
|
|
1500
|
-
rn(f.loaded, [u], d), jn(f, r), a && f.errors.push(a), f.pendingCount === 0 && !f.done && (Object.keys(f.loaded).forEach(function(p) {
|
|
1501
|
-
c[p] || (c[p] = {});
|
|
1502
|
-
var g = f.loaded[p];
|
|
1503
|
-
g.length && g.forEach(function(b) {
|
|
1504
|
-
c[p][b] === void 0 && (c[p][b] = !0);
|
|
1505
|
-
});
|
|
1506
|
-
}), f.done = !0, f.errors.length ? f.callback(f.errors) : f.callback());
|
|
1507
|
-
}), this.emit("loaded", c), this.queue = this.queue.filter(function(f) {
|
|
1508
|
-
return !f.done;
|
|
1509
|
-
});
|
|
1510
|
-
}
|
|
1511
|
-
}, {
|
|
1512
|
-
key: "read",
|
|
1513
|
-
value: function(r, a, o) {
|
|
1514
|
-
var s = this, u = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, d = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, c = arguments.length > 5 ? arguments[5] : void 0;
|
|
1515
|
-
if (!r.length)
|
|
1516
|
-
return c(null, {});
|
|
1517
|
-
if (this.readingCalls >= this.maxParallelReads) {
|
|
1518
|
-
this.waitingReads.push({
|
|
1519
|
-
lng: r,
|
|
1520
|
-
ns: a,
|
|
1521
|
-
fcName: o,
|
|
1522
|
-
tried: u,
|
|
1523
|
-
wait: d,
|
|
1524
|
-
callback: c
|
|
1525
|
-
});
|
|
1526
|
-
return;
|
|
1527
|
-
}
|
|
1528
|
-
this.readingCalls++;
|
|
1529
|
-
var f = function(y, w) {
|
|
1530
|
-
if (s.readingCalls--, s.waitingReads.length > 0) {
|
|
1531
|
-
var v = s.waitingReads.shift();
|
|
1532
|
-
s.read(v.lng, v.ns, v.fcName, v.tried, v.wait, v.callback);
|
|
1533
|
-
}
|
|
1534
|
-
if (y && w && u < s.maxRetries) {
|
|
1535
|
-
setTimeout(function() {
|
|
1536
|
-
s.read.call(s, r, a, o, u + 1, d * 2, c);
|
|
1537
|
-
}, d);
|
|
1538
|
-
return;
|
|
1539
|
-
}
|
|
1540
|
-
c(y, w);
|
|
1541
|
-
}, p = this.backend[o].bind(this.backend);
|
|
1542
|
-
if (p.length === 2) {
|
|
1543
|
-
try {
|
|
1544
|
-
var g = p(r, a);
|
|
1545
|
-
g && typeof g.then == "function" ? g.then(function(b) {
|
|
1546
|
-
return f(null, b);
|
|
1547
|
-
}).catch(f) : f(null, g);
|
|
1548
|
-
} catch (b) {
|
|
1549
|
-
f(b);
|
|
1550
|
-
}
|
|
1551
|
-
return;
|
|
1552
|
-
}
|
|
1553
|
-
return p(r, a, f);
|
|
1554
|
-
}
|
|
1555
|
-
}, {
|
|
1556
|
-
key: "prepareLoading",
|
|
1557
|
-
value: function(r, a) {
|
|
1558
|
-
var o = this, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, u = arguments.length > 3 ? arguments[3] : void 0;
|
|
1559
|
-
if (!this.backend)
|
|
1560
|
-
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), u && u();
|
|
1561
|
-
typeof r == "string" && (r = this.languageUtils.toResolveHierarchy(r)), typeof a == "string" && (a = [a]);
|
|
1562
|
-
var d = this.queueLoad(r, a, s, u);
|
|
1563
|
-
if (!d.toLoad.length)
|
|
1564
|
-
return d.pending.length || u(), null;
|
|
1565
|
-
d.toLoad.forEach(function(c) {
|
|
1566
|
-
o.loadOne(c);
|
|
1567
|
-
});
|
|
1568
|
-
}
|
|
1569
|
-
}, {
|
|
1570
|
-
key: "load",
|
|
1571
|
-
value: function(r, a, o) {
|
|
1572
|
-
this.prepareLoading(r, a, {}, o);
|
|
1573
|
-
}
|
|
1574
|
-
}, {
|
|
1575
|
-
key: "reload",
|
|
1576
|
-
value: function(r, a, o) {
|
|
1577
|
-
this.prepareLoading(r, a, {
|
|
1578
|
-
reload: !0
|
|
1579
|
-
}, o);
|
|
1580
|
-
}
|
|
1581
|
-
}, {
|
|
1582
|
-
key: "loadOne",
|
|
1583
|
-
value: function(r) {
|
|
1584
|
-
var a = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", s = r.split("|"), u = s[0], d = s[1];
|
|
1585
|
-
this.read(u, d, "read", void 0, void 0, function(c, f) {
|
|
1586
|
-
c && a.logger.warn("".concat(o, "loading namespace ").concat(d, " for language ").concat(u, " failed"), c), !c && f && a.logger.log("".concat(o, "loaded namespace ").concat(d, " for language ").concat(u), f), a.loaded(r, c, f);
|
|
1587
|
-
});
|
|
1588
|
-
}
|
|
1589
|
-
}, {
|
|
1590
|
-
key: "saveMissing",
|
|
1591
|
-
value: function(r, a, o, s, u) {
|
|
1592
|
-
var d = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, c = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : function() {
|
|
1593
|
-
};
|
|
1594
|
-
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(a)) {
|
|
1595
|
-
this.logger.warn('did not save key "'.concat(o, '" as the namespace "').concat(a, '" was not yet loaded'), "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
|
|
1596
|
-
return;
|
|
1597
|
-
}
|
|
1598
|
-
if (!(o == null || o === "")) {
|
|
1599
|
-
if (this.backend && this.backend.create) {
|
|
1600
|
-
var f = it(it({}, d), {}, {
|
|
1601
|
-
isUpdate: u
|
|
1602
|
-
}), p = this.backend.create.bind(this.backend);
|
|
1603
|
-
if (p.length < 6)
|
|
1604
|
-
try {
|
|
1605
|
-
var g;
|
|
1606
|
-
p.length === 5 ? g = p(r, a, o, s, f) : g = p(r, a, o, s), g && typeof g.then == "function" ? g.then(function(b) {
|
|
1607
|
-
return c(null, b);
|
|
1608
|
-
}).catch(c) : c(null, g);
|
|
1609
|
-
} catch (b) {
|
|
1610
|
-
c(b);
|
|
1611
|
-
}
|
|
1612
|
-
else
|
|
1613
|
-
p(r, a, o, s, c, f);
|
|
1614
|
-
}
|
|
1615
|
-
!r || !r[0] || this.store.addResource(r[0], a, o, s);
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
}]), t;
|
|
1619
|
-
}(ee);
|
|
1620
|
-
function at() {
|
|
1621
|
-
return {
|
|
1622
|
-
debug: !1,
|
|
1623
|
-
initImmediate: !0,
|
|
1624
|
-
ns: ["translation"],
|
|
1625
|
-
defaultNS: ["translation"],
|
|
1626
|
-
fallbackLng: ["dev"],
|
|
1627
|
-
fallbackNS: !1,
|
|
1628
|
-
supportedLngs: !1,
|
|
1629
|
-
nonExplicitSupportedLngs: !1,
|
|
1630
|
-
load: "all",
|
|
1631
|
-
preload: !1,
|
|
1632
|
-
simplifyPluralSuffix: !0,
|
|
1633
|
-
keySeparator: ".",
|
|
1634
|
-
nsSeparator: ":",
|
|
1635
|
-
pluralSeparator: "_",
|
|
1636
|
-
contextSeparator: "_",
|
|
1637
|
-
partialBundledLanguages: !1,
|
|
1638
|
-
saveMissing: !1,
|
|
1639
|
-
updateMissing: !1,
|
|
1640
|
-
saveMissingTo: "fallback",
|
|
1641
|
-
saveMissingPlurals: !0,
|
|
1642
|
-
missingKeyHandler: !1,
|
|
1643
|
-
missingInterpolationHandler: !1,
|
|
1644
|
-
postProcess: !1,
|
|
1645
|
-
postProcessPassResolved: !1,
|
|
1646
|
-
returnNull: !0,
|
|
1647
|
-
returnEmptyString: !0,
|
|
1648
|
-
returnObjects: !1,
|
|
1649
|
-
joinArrays: !1,
|
|
1650
|
-
returnedObjectHandler: !1,
|
|
1651
|
-
parseMissingKeyHandler: !1,
|
|
1652
|
-
appendNamespaceToMissingKey: !1,
|
|
1653
|
-
appendNamespaceToCIMode: !1,
|
|
1654
|
-
overloadTranslationOptionHandler: function(e) {
|
|
1655
|
-
var t = {};
|
|
1656
|
-
if (U(e[1]) === "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), U(e[2]) === "object" || U(e[3]) === "object") {
|
|
1657
|
-
var n = e[3] || e[2];
|
|
1658
|
-
Object.keys(n).forEach(function(r) {
|
|
1659
|
-
t[r] = n[r];
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1662
|
-
return t;
|
|
1663
|
-
},
|
|
1664
|
-
interpolation: {
|
|
1665
|
-
escapeValue: !0,
|
|
1666
|
-
format: function(e, t, n, r) {
|
|
1667
|
-
return e;
|
|
1668
|
-
},
|
|
1669
|
-
prefix: "{{",
|
|
1670
|
-
suffix: "}}",
|
|
1671
|
-
formatSeparator: ",",
|
|
1672
|
-
unescapePrefix: "-",
|
|
1673
|
-
nestingPrefix: "$t(",
|
|
1674
|
-
nestingSuffix: ")",
|
|
1675
|
-
nestingOptionsSeparator: ",",
|
|
1676
|
-
maxReplaces: 1e3,
|
|
1677
|
-
skipOnVariables: !0
|
|
1678
|
-
}
|
|
1679
|
-
};
|
|
1680
|
-
}
|
|
1681
|
-
function ot(i) {
|
|
1682
|
-
return typeof i.ns == "string" && (i.ns = [i.ns]), typeof i.fallbackLng == "string" && (i.fallbackLng = [i.fallbackLng]), typeof i.fallbackNS == "string" && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i;
|
|
1683
|
-
}
|
|
1684
|
-
function st(i, e) {
|
|
1685
|
-
var t = Object.keys(i);
|
|
1686
|
-
if (Object.getOwnPropertySymbols) {
|
|
1687
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
1688
|
-
e && (n = n.filter(function(r) {
|
|
1689
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
1690
|
-
})), t.push.apply(t, n);
|
|
1691
|
-
}
|
|
1692
|
-
return t;
|
|
1693
|
-
}
|
|
1694
|
-
function z(i) {
|
|
1695
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
1696
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
1697
|
-
e % 2 ? st(Object(t), !0).forEach(function(n) {
|
|
1698
|
-
W(i, n, t[n]);
|
|
1699
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : st(Object(t)).forEach(function(n) {
|
|
1700
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1701
|
-
});
|
|
1702
|
-
}
|
|
1703
|
-
return i;
|
|
1704
|
-
}
|
|
1705
|
-
function Ln(i) {
|
|
1706
|
-
var e = Rn();
|
|
1707
|
-
return function() {
|
|
1708
|
-
var n = X(i), r;
|
|
1709
|
-
if (e) {
|
|
1710
|
-
var a = X(this).constructor;
|
|
1711
|
-
r = Reflect.construct(n, arguments, a);
|
|
1712
|
-
} else
|
|
1713
|
-
r = n.apply(this, arguments);
|
|
1714
|
-
return de(this, r);
|
|
1715
|
-
};
|
|
1716
|
-
}
|
|
1717
|
-
function Rn() {
|
|
1718
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
1719
|
-
return !1;
|
|
1720
|
-
if (typeof Proxy == "function")
|
|
1721
|
-
return !0;
|
|
1722
|
-
try {
|
|
1723
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
1724
|
-
})), !0;
|
|
1725
|
-
} catch {
|
|
1726
|
-
return !1;
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
function he() {
|
|
1730
|
-
}
|
|
1731
|
-
function En(i) {
|
|
1732
|
-
var e = Object.getOwnPropertyNames(Object.getPrototypeOf(i));
|
|
1733
|
-
e.forEach(function(t) {
|
|
1734
|
-
typeof i[t] == "function" && (i[t] = i[t].bind(i));
|
|
1735
|
-
});
|
|
1736
|
-
}
|
|
1737
|
-
var we = function(i) {
|
|
1738
|
-
Se(t, i);
|
|
1739
|
-
var e = Ln(t);
|
|
1740
|
-
function t() {
|
|
1741
|
-
var n, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = arguments.length > 1 ? arguments[1] : void 0;
|
|
1742
|
-
if (B(this, t), n = e.call(this), xe && ee.call(Z(n)), n.options = ot(r), n.services = {}, n.logger = J, n.modules = {
|
|
1743
|
-
external: []
|
|
1744
|
-
}, En(Z(n)), a && !n.isInitialized && !r.isClone) {
|
|
1745
|
-
if (!n.options.initImmediate)
|
|
1746
|
-
return n.init(r, a), de(n, Z(n));
|
|
1747
|
-
setTimeout(function() {
|
|
1748
|
-
n.init(r, a);
|
|
1749
|
-
}, 0);
|
|
1750
|
-
}
|
|
1751
|
-
return n;
|
|
1752
|
-
}
|
|
1753
|
-
return H(t, [{
|
|
1754
|
-
key: "init",
|
|
1755
|
-
value: function() {
|
|
1756
|
-
var r = this, a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, o = arguments.length > 1 ? arguments[1] : void 0;
|
|
1757
|
-
typeof a == "function" && (o = a, a = {}), !a.defaultNS && a.defaultNS !== !1 && a.ns && (typeof a.ns == "string" ? a.defaultNS = a.ns : a.ns.indexOf("translation") < 0 && (a.defaultNS = a.ns[0]));
|
|
1758
|
-
var s = at();
|
|
1759
|
-
this.options = z(z(z({}, s), this.options), ot(a)), this.options.compatibilityAPI !== "v1" && (this.options.interpolation = z(z({}, s.interpolation), this.options.interpolation)), a.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = a.keySeparator), a.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = a.nsSeparator);
|
|
1760
|
-
function u(v) {
|
|
1761
|
-
return v ? typeof v == "function" ? new v() : v : null;
|
|
1762
|
-
}
|
|
1763
|
-
if (!this.options.isClone) {
|
|
1764
|
-
this.modules.logger ? J.init(u(this.modules.logger), this.options) : J.init(null, this.options);
|
|
1765
|
-
var d;
|
|
1766
|
-
this.modules.formatter ? d = this.modules.formatter : typeof Intl < "u" && (d = Sn);
|
|
1767
|
-
var c = new Ye(this.options);
|
|
1768
|
-
this.store = new dn(this.options.resources, this.options);
|
|
1769
|
-
var f = this.services;
|
|
1770
|
-
f.logger = J, f.resourceStore = this.store, f.languageUtils = c, f.pluralResolver = new bn(c, {
|
|
1771
|
-
prepend: this.options.pluralSeparator,
|
|
1772
|
-
compatibilityJSON: this.options.compatibilityJSON,
|
|
1773
|
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1774
|
-
}), d && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (f.formatter = u(d), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new wn(this.options), f.utils = {
|
|
1775
|
-
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1776
|
-
}, f.backendConnector = new kn(u(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", function(v) {
|
|
1777
|
-
for (var m = arguments.length, S = new Array(m > 1 ? m - 1 : 0), x = 1; x < m; x++)
|
|
1778
|
-
S[x - 1] = arguments[x];
|
|
1779
|
-
r.emit.apply(r, [v].concat(S));
|
|
1780
|
-
}), this.modules.languageDetector && (f.languageDetector = u(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = u(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new Qe(this.services, this.options), this.translator.on("*", function(v) {
|
|
1781
|
-
for (var m = arguments.length, S = new Array(m > 1 ? m - 1 : 0), x = 1; x < m; x++)
|
|
1782
|
-
S[x - 1] = arguments[x];
|
|
1783
|
-
r.emit.apply(r, [v].concat(S));
|
|
1784
|
-
}), this.modules.external.forEach(function(v) {
|
|
1785
|
-
v.init && v.init(r);
|
|
1786
|
-
});
|
|
1787
|
-
}
|
|
1788
|
-
if (this.format = this.options.interpolation.format, o || (o = he), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1789
|
-
var p = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1790
|
-
p.length > 0 && p[0] !== "dev" && (this.options.lng = p[0]);
|
|
1791
|
-
}
|
|
1792
|
-
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined");
|
|
1793
|
-
var g = ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"];
|
|
1794
|
-
g.forEach(function(v) {
|
|
1795
|
-
r[v] = function() {
|
|
1796
|
-
var m;
|
|
1797
|
-
return (m = r.store)[v].apply(m, arguments);
|
|
1798
|
-
};
|
|
1799
|
-
});
|
|
1800
|
-
var b = ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"];
|
|
1801
|
-
b.forEach(function(v) {
|
|
1802
|
-
r[v] = function() {
|
|
1803
|
-
var m;
|
|
1804
|
-
return (m = r.store)[v].apply(m, arguments), r;
|
|
1805
|
-
};
|
|
1806
|
-
});
|
|
1807
|
-
var y = se(), w = function() {
|
|
1808
|
-
var m = function(x, k) {
|
|
1809
|
-
r.isInitialized && !r.initializedStoreOnce && r.logger.warn("init: i18next is already initialized. You should call init just once!"), r.isInitialized = !0, r.options.isClone || r.logger.log("initialized", r.options), r.emit("initialized", r.options), y.resolve(k), o(x, k);
|
|
1810
|
-
};
|
|
1811
|
-
if (r.languages && r.options.compatibilityAPI !== "v1" && !r.isInitialized)
|
|
1812
|
-
return m(null, r.t.bind(r));
|
|
1813
|
-
r.changeLanguage(r.options.lng, m);
|
|
1814
|
-
};
|
|
1815
|
-
return this.options.resources || !this.options.initImmediate ? w() : setTimeout(w, 0), y;
|
|
1816
|
-
}
|
|
1817
|
-
}, {
|
|
1818
|
-
key: "loadResources",
|
|
1819
|
-
value: function(r) {
|
|
1820
|
-
var a = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : he, s = o, u = typeof r == "string" ? r : this.language;
|
|
1821
|
-
if (typeof r == "function" && (s = r), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1822
|
-
if (u && u.toLowerCase() === "cimode")
|
|
1823
|
-
return s();
|
|
1824
|
-
var d = [], c = function(g) {
|
|
1825
|
-
if (g) {
|
|
1826
|
-
var b = a.services.languageUtils.toResolveHierarchy(g);
|
|
1827
|
-
b.forEach(function(y) {
|
|
1828
|
-
d.indexOf(y) < 0 && d.push(y);
|
|
1829
|
-
});
|
|
1830
|
-
}
|
|
1831
|
-
};
|
|
1832
|
-
if (u)
|
|
1833
|
-
c(u);
|
|
1834
|
-
else {
|
|
1835
|
-
var f = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1836
|
-
f.forEach(function(p) {
|
|
1837
|
-
return c(p);
|
|
1838
|
-
});
|
|
1839
|
-
}
|
|
1840
|
-
this.options.preload && this.options.preload.forEach(function(p) {
|
|
1841
|
-
return c(p);
|
|
1842
|
-
}), this.services.backendConnector.load(d, this.options.ns, function(p) {
|
|
1843
|
-
!p && !a.resolvedLanguage && a.language && a.setResolvedLanguage(a.language), s(p);
|
|
1844
|
-
});
|
|
1845
|
-
} else
|
|
1846
|
-
s(null);
|
|
1847
|
-
}
|
|
1848
|
-
}, {
|
|
1849
|
-
key: "reloadResources",
|
|
1850
|
-
value: function(r, a, o) {
|
|
1851
|
-
var s = se();
|
|
1852
|
-
return r || (r = this.languages), a || (a = this.options.ns), o || (o = he), this.services.backendConnector.reload(r, a, function(u) {
|
|
1853
|
-
s.resolve(), o(u);
|
|
1854
|
-
}), s;
|
|
1855
|
-
}
|
|
1856
|
-
}, {
|
|
1857
|
-
key: "use",
|
|
1858
|
-
value: function(r) {
|
|
1859
|
-
if (!r)
|
|
1860
|
-
throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1861
|
-
if (!r.type)
|
|
1862
|
-
throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1863
|
-
return r.type === "backend" && (this.modules.backend = r), (r.type === "logger" || r.log && r.warn && r.error) && (this.modules.logger = r), r.type === "languageDetector" && (this.modules.languageDetector = r), r.type === "i18nFormat" && (this.modules.i18nFormat = r), r.type === "postProcessor" && _t.addPostProcessor(r), r.type === "formatter" && (this.modules.formatter = r), r.type === "3rdParty" && this.modules.external.push(r), this;
|
|
1864
|
-
}
|
|
1865
|
-
}, {
|
|
1866
|
-
key: "setResolvedLanguage",
|
|
1867
|
-
value: function(r) {
|
|
1868
|
-
if (!(!r || !this.languages) && !(["cimode", "dev"].indexOf(r) > -1))
|
|
1869
|
-
for (var a = 0; a < this.languages.length; a++) {
|
|
1870
|
-
var o = this.languages[a];
|
|
1871
|
-
if (!(["cimode", "dev"].indexOf(o) > -1) && this.store.hasLanguageSomeTranslations(o)) {
|
|
1872
|
-
this.resolvedLanguage = o;
|
|
1873
|
-
break;
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
}
|
|
1877
|
-
}, {
|
|
1878
|
-
key: "changeLanguage",
|
|
1879
|
-
value: function(r, a) {
|
|
1880
|
-
var o = this;
|
|
1881
|
-
this.isLanguageChangingTo = r;
|
|
1882
|
-
var s = se();
|
|
1883
|
-
this.emit("languageChanging", r);
|
|
1884
|
-
var u = function(p) {
|
|
1885
|
-
o.language = p, o.languages = o.services.languageUtils.toResolveHierarchy(p), o.resolvedLanguage = void 0, o.setResolvedLanguage(p);
|
|
1886
|
-
}, d = function(p, g) {
|
|
1887
|
-
g ? (u(g), o.translator.changeLanguage(g), o.isLanguageChangingTo = void 0, o.emit("languageChanged", g), o.logger.log("languageChanged", g)) : o.isLanguageChangingTo = void 0, s.resolve(function() {
|
|
1888
|
-
return o.t.apply(o, arguments);
|
|
1889
|
-
}), a && a(p, function() {
|
|
1890
|
-
return o.t.apply(o, arguments);
|
|
1891
|
-
});
|
|
1892
|
-
}, c = function(p) {
|
|
1893
|
-
!r && !p && o.services.languageDetector && (p = []);
|
|
1894
|
-
var g = typeof p == "string" ? p : o.services.languageUtils.getBestMatchFromCodes(p);
|
|
1895
|
-
g && (o.language || u(g), o.translator.language || o.translator.changeLanguage(g), o.services.languageDetector && o.services.languageDetector.cacheUserLanguage && o.services.languageDetector.cacheUserLanguage(g)), o.loadResources(g, function(b) {
|
|
1896
|
-
d(b, g);
|
|
1897
|
-
});
|
|
1898
|
-
};
|
|
1899
|
-
return !r && this.services.languageDetector && !this.services.languageDetector.async ? c(this.services.languageDetector.detect()) : !r && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(c) : this.services.languageDetector.detect(c) : c(r), s;
|
|
1900
|
-
}
|
|
1901
|
-
}, {
|
|
1902
|
-
key: "getFixedT",
|
|
1903
|
-
value: function(r, a, o) {
|
|
1904
|
-
var s = this, u = function d(c, f) {
|
|
1905
|
-
var p;
|
|
1906
|
-
if (U(f) !== "object") {
|
|
1907
|
-
for (var g = arguments.length, b = new Array(g > 2 ? g - 2 : 0), y = 2; y < g; y++)
|
|
1908
|
-
b[y - 2] = arguments[y];
|
|
1909
|
-
p = s.options.overloadTranslationOptionHandler([c, f].concat(b));
|
|
1910
|
-
} else
|
|
1911
|
-
p = z({}, f);
|
|
1912
|
-
p.lng = p.lng || d.lng, p.lngs = p.lngs || d.lngs, p.ns = p.ns || d.ns, p.keyPrefix = p.keyPrefix || o || d.keyPrefix;
|
|
1913
|
-
var w = s.options.keySeparator || ".", v;
|
|
1914
|
-
return p.keyPrefix && Array.isArray(c) ? v = c.map(function(m) {
|
|
1915
|
-
return "".concat(p.keyPrefix).concat(w).concat(m);
|
|
1916
|
-
}) : v = p.keyPrefix ? "".concat(p.keyPrefix).concat(w).concat(c) : c, s.t(v, p);
|
|
1917
|
-
};
|
|
1918
|
-
return typeof r == "string" ? u.lng = r : u.lngs = r, u.ns = a, u.keyPrefix = o, u;
|
|
1919
|
-
}
|
|
1920
|
-
}, {
|
|
1921
|
-
key: "t",
|
|
1922
|
-
value: function() {
|
|
1923
|
-
var r;
|
|
1924
|
-
return this.translator && (r = this.translator).translate.apply(r, arguments);
|
|
1925
|
-
}
|
|
1926
|
-
}, {
|
|
1927
|
-
key: "exists",
|
|
1928
|
-
value: function() {
|
|
1929
|
-
var r;
|
|
1930
|
-
return this.translator && (r = this.translator).exists.apply(r, arguments);
|
|
1931
|
-
}
|
|
1932
|
-
}, {
|
|
1933
|
-
key: "setDefaultNamespace",
|
|
1934
|
-
value: function(r) {
|
|
1935
|
-
this.options.defaultNS = r;
|
|
1936
|
-
}
|
|
1937
|
-
}, {
|
|
1938
|
-
key: "hasLoadedNamespace",
|
|
1939
|
-
value: function(r) {
|
|
1940
|
-
var a = this, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1941
|
-
if (!this.isInitialized)
|
|
1942
|
-
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
1943
|
-
if (!this.languages || !this.languages.length)
|
|
1944
|
-
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
1945
|
-
var s = o.lng || this.resolvedLanguage || this.languages[0], u = this.options ? this.options.fallbackLng : !1, d = this.languages[this.languages.length - 1];
|
|
1946
|
-
if (s.toLowerCase() === "cimode")
|
|
1947
|
-
return !0;
|
|
1948
|
-
var c = function(g, b) {
|
|
1949
|
-
var y = a.services.backendConnector.state["".concat(g, "|").concat(b)];
|
|
1950
|
-
return y === -1 || y === 2;
|
|
1951
|
-
};
|
|
1952
|
-
if (o.precheck) {
|
|
1953
|
-
var f = o.precheck(this, c);
|
|
1954
|
-
if (f !== void 0)
|
|
1955
|
-
return f;
|
|
1956
|
-
}
|
|
1957
|
-
return !!(this.hasResourceBundle(s, r) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || c(s, r) && (!u || c(d, r)));
|
|
1958
|
-
}
|
|
1959
|
-
}, {
|
|
1960
|
-
key: "loadNamespaces",
|
|
1961
|
-
value: function(r, a) {
|
|
1962
|
-
var o = this, s = se();
|
|
1963
|
-
return this.options.ns ? (typeof r == "string" && (r = [r]), r.forEach(function(u) {
|
|
1964
|
-
o.options.ns.indexOf(u) < 0 && o.options.ns.push(u);
|
|
1965
|
-
}), this.loadResources(function(u) {
|
|
1966
|
-
s.resolve(), a && a(u);
|
|
1967
|
-
}), s) : (a && a(), Promise.resolve());
|
|
1968
|
-
}
|
|
1969
|
-
}, {
|
|
1970
|
-
key: "loadLanguages",
|
|
1971
|
-
value: function(r, a) {
|
|
1972
|
-
var o = se();
|
|
1973
|
-
typeof r == "string" && (r = [r]);
|
|
1974
|
-
var s = this.options.preload || [], u = r.filter(function(d) {
|
|
1975
|
-
return s.indexOf(d) < 0;
|
|
1976
|
-
});
|
|
1977
|
-
return u.length ? (this.options.preload = s.concat(u), this.loadResources(function(d) {
|
|
1978
|
-
o.resolve(), a && a(d);
|
|
1979
|
-
}), o) : (a && a(), Promise.resolve());
|
|
1980
|
-
}
|
|
1981
|
-
}, {
|
|
1982
|
-
key: "dir",
|
|
1983
|
-
value: function(r) {
|
|
1984
|
-
if (r || (r = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !r)
|
|
1985
|
-
return "rtl";
|
|
1986
|
-
var a = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], o = this.services && this.services.languageUtils || new Ye(at());
|
|
1987
|
-
return a.indexOf(o.getLanguagePartFromCode(r)) > -1 || r.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1988
|
-
}
|
|
1989
|
-
}, {
|
|
1990
|
-
key: "cloneInstance",
|
|
1991
|
-
value: function() {
|
|
1992
|
-
var r = this, a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : he, s = z(z(z({}, this.options), a), {
|
|
1993
|
-
isClone: !0
|
|
1994
|
-
}), u = new t(s);
|
|
1995
|
-
(a.debug !== void 0 || a.prefix !== void 0) && (u.logger = u.logger.clone(a));
|
|
1996
|
-
var d = ["store", "services", "language"];
|
|
1997
|
-
return d.forEach(function(c) {
|
|
1998
|
-
u[c] = r[c];
|
|
1999
|
-
}), u.services = z({}, this.services), u.services.utils = {
|
|
2000
|
-
hasLoadedNamespace: u.hasLoadedNamespace.bind(u)
|
|
2001
|
-
}, u.translator = new Qe(u.services, u.options), u.translator.on("*", function(c) {
|
|
2002
|
-
for (var f = arguments.length, p = new Array(f > 1 ? f - 1 : 0), g = 1; g < f; g++)
|
|
2003
|
-
p[g - 1] = arguments[g];
|
|
2004
|
-
u.emit.apply(u, [c].concat(p));
|
|
2005
|
-
}), u.init(s, o), u.translator.options = u.options, u.translator.backendConnector.services.utils = {
|
|
2006
|
-
hasLoadedNamespace: u.hasLoadedNamespace.bind(u)
|
|
2007
|
-
}, u;
|
|
2008
|
-
}
|
|
2009
|
-
}, {
|
|
2010
|
-
key: "toJSON",
|
|
2011
|
-
value: function() {
|
|
2012
|
-
return {
|
|
2013
|
-
options: this.options,
|
|
2014
|
-
store: this.store,
|
|
2015
|
-
language: this.language,
|
|
2016
|
-
languages: this.languages,
|
|
2017
|
-
resolvedLanguage: this.resolvedLanguage
|
|
2018
|
-
};
|
|
2019
|
-
}
|
|
2020
|
-
}]), t;
|
|
2021
|
-
}(ee);
|
|
2022
|
-
W(we, "createInstance", function() {
|
|
2023
|
-
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = arguments.length > 1 ? arguments[1] : void 0;
|
|
2024
|
-
return new we(i, e);
|
|
2025
|
-
});
|
|
2026
|
-
var N = we.createInstance();
|
|
2027
|
-
N.createInstance = we.createInstance;
|
|
2028
|
-
N.createInstance;
|
|
2029
|
-
N.dir;
|
|
2030
|
-
N.init;
|
|
2031
|
-
N.loadResources;
|
|
2032
|
-
N.reloadResources;
|
|
2033
|
-
N.use;
|
|
2034
|
-
N.changeLanguage;
|
|
2035
|
-
N.getFixedT;
|
|
2036
|
-
var Ar = N.t;
|
|
2037
|
-
N.exists;
|
|
2038
|
-
N.setDefaultNamespace;
|
|
2039
|
-
N.hasLoadedNamespace;
|
|
2040
|
-
N.loadNamespaces;
|
|
2041
|
-
N.loadLanguages;
|
|
2042
|
-
var Nt = [], Cn = Nt.forEach, _n = Nt.slice;
|
|
2043
|
-
function Nn(i) {
|
|
2044
|
-
return Cn.call(_n.call(arguments, 1), function(e) {
|
|
2045
|
-
if (e)
|
|
2046
|
-
for (var t in e)
|
|
2047
|
-
i[t] === void 0 && (i[t] = e[t]);
|
|
2048
|
-
}), i;
|
|
2049
|
-
}
|
|
2050
|
-
var ut = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, An = function(e, t, n) {
|
|
2051
|
-
var r = n || {};
|
|
2052
|
-
r.path = r.path || "/";
|
|
2053
|
-
var a = encodeURIComponent(t), o = "".concat(e, "=").concat(a);
|
|
2054
|
-
if (r.maxAge > 0) {
|
|
2055
|
-
var s = r.maxAge - 0;
|
|
2056
|
-
if (Number.isNaN(s))
|
|
2057
|
-
throw new Error("maxAge should be a Number");
|
|
2058
|
-
o += "; Max-Age=".concat(Math.floor(s));
|
|
2059
|
-
}
|
|
2060
|
-
if (r.domain) {
|
|
2061
|
-
if (!ut.test(r.domain))
|
|
2062
|
-
throw new TypeError("option domain is invalid");
|
|
2063
|
-
o += "; Domain=".concat(r.domain);
|
|
2064
|
-
}
|
|
2065
|
-
if (r.path) {
|
|
2066
|
-
if (!ut.test(r.path))
|
|
2067
|
-
throw new TypeError("option path is invalid");
|
|
2068
|
-
o += "; Path=".concat(r.path);
|
|
2069
|
-
}
|
|
2070
|
-
if (r.expires) {
|
|
2071
|
-
if (typeof r.expires.toUTCString != "function")
|
|
2072
|
-
throw new TypeError("option expires is invalid");
|
|
2073
|
-
o += "; Expires=".concat(r.expires.toUTCString());
|
|
2074
|
-
}
|
|
2075
|
-
if (r.httpOnly && (o += "; HttpOnly"), r.secure && (o += "; Secure"), r.sameSite) {
|
|
2076
|
-
var u = typeof r.sameSite == "string" ? r.sameSite.toLowerCase() : r.sameSite;
|
|
2077
|
-
switch (u) {
|
|
2078
|
-
case !0:
|
|
2079
|
-
o += "; SameSite=Strict";
|
|
2080
|
-
break;
|
|
2081
|
-
case "lax":
|
|
2082
|
-
o += "; SameSite=Lax";
|
|
2083
|
-
break;
|
|
2084
|
-
case "strict":
|
|
2085
|
-
o += "; SameSite=Strict";
|
|
2086
|
-
break;
|
|
2087
|
-
case "none":
|
|
2088
|
-
o += "; SameSite=None";
|
|
2089
|
-
break;
|
|
2090
|
-
default:
|
|
2091
|
-
throw new TypeError("option sameSite is invalid");
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
return o;
|
|
2095
|
-
}, ft = {
|
|
2096
|
-
create: function(e, t, n, r) {
|
|
2097
|
-
var a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
2098
|
-
path: "/",
|
|
2099
|
-
sameSite: "strict"
|
|
2100
|
-
};
|
|
2101
|
-
n && (a.expires = /* @__PURE__ */ new Date(), a.expires.setTime(a.expires.getTime() + n * 60 * 1e3)), r && (a.domain = r), document.cookie = An(e, encodeURIComponent(t), a);
|
|
2102
|
-
},
|
|
2103
|
-
read: function(e) {
|
|
2104
|
-
for (var t = "".concat(e, "="), n = document.cookie.split(";"), r = 0; r < n.length; r++) {
|
|
2105
|
-
for (var a = n[r]; a.charAt(0) === " "; )
|
|
2106
|
-
a = a.substring(1, a.length);
|
|
2107
|
-
if (a.indexOf(t) === 0)
|
|
2108
|
-
return a.substring(t.length, a.length);
|
|
2109
|
-
}
|
|
2110
|
-
return null;
|
|
2111
|
-
},
|
|
2112
|
-
remove: function(e) {
|
|
2113
|
-
this.create(e, "", -1);
|
|
2114
|
-
}
|
|
2115
|
-
}, Tn = {
|
|
2116
|
-
name: "cookie",
|
|
2117
|
-
lookup: function(e) {
|
|
2118
|
-
var t;
|
|
2119
|
-
if (e.lookupCookie && typeof document < "u") {
|
|
2120
|
-
var n = ft.read(e.lookupCookie);
|
|
2121
|
-
n && (t = n);
|
|
2122
|
-
}
|
|
2123
|
-
return t;
|
|
2124
|
-
},
|
|
2125
|
-
cacheUserLanguage: function(e, t) {
|
|
2126
|
-
t.lookupCookie && typeof document < "u" && ft.create(t.lookupCookie, e, t.cookieMinutes, t.cookieDomain, t.cookieOptions);
|
|
2127
|
-
}
|
|
2128
|
-
}, Dn = {
|
|
2129
|
-
name: "querystring",
|
|
2130
|
-
lookup: function(e) {
|
|
2131
|
-
var t;
|
|
2132
|
-
if (typeof window < "u") {
|
|
2133
|
-
var n = window.location.search;
|
|
2134
|
-
!window.location.search && window.location.hash && window.location.hash.indexOf("?") > -1 && (n = window.location.hash.substring(window.location.hash.indexOf("?")));
|
|
2135
|
-
for (var r = n.substring(1), a = r.split("&"), o = 0; o < a.length; o++) {
|
|
2136
|
-
var s = a[o].indexOf("=");
|
|
2137
|
-
if (s > 0) {
|
|
2138
|
-
var u = a[o].substring(0, s);
|
|
2139
|
-
u === e.lookupQuerystring && (t = a[o].substring(s + 1));
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
}
|
|
2143
|
-
return t;
|
|
2144
|
-
}
|
|
2145
|
-
}, ue = null, ct = function() {
|
|
2146
|
-
if (ue !== null)
|
|
2147
|
-
return ue;
|
|
2148
|
-
try {
|
|
2149
|
-
ue = window !== "undefined" && window.localStorage !== null;
|
|
2150
|
-
var e = "i18next.translate.boo";
|
|
2151
|
-
window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e);
|
|
2152
|
-
} catch {
|
|
2153
|
-
ue = !1;
|
|
2154
|
-
}
|
|
2155
|
-
return ue;
|
|
2156
|
-
}, In = {
|
|
2157
|
-
name: "localStorage",
|
|
2158
|
-
lookup: function(e) {
|
|
2159
|
-
var t;
|
|
2160
|
-
if (e.lookupLocalStorage && ct()) {
|
|
2161
|
-
var n = window.localStorage.getItem(e.lookupLocalStorage);
|
|
2162
|
-
n && (t = n);
|
|
2163
|
-
}
|
|
2164
|
-
return t;
|
|
2165
|
-
},
|
|
2166
|
-
cacheUserLanguage: function(e, t) {
|
|
2167
|
-
t.lookupLocalStorage && ct() && window.localStorage.setItem(t.lookupLocalStorage, e);
|
|
2168
|
-
}
|
|
2169
|
-
}, fe = null, lt = function() {
|
|
2170
|
-
if (fe !== null)
|
|
2171
|
-
return fe;
|
|
2172
|
-
try {
|
|
2173
|
-
fe = window !== "undefined" && window.sessionStorage !== null;
|
|
2174
|
-
var e = "i18next.translate.boo";
|
|
2175
|
-
window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e);
|
|
2176
|
-
} catch {
|
|
2177
|
-
fe = !1;
|
|
2178
|
-
}
|
|
2179
|
-
return fe;
|
|
2180
|
-
}, Fn = {
|
|
2181
|
-
name: "sessionStorage",
|
|
2182
|
-
lookup: function(e) {
|
|
2183
|
-
var t;
|
|
2184
|
-
if (e.lookupSessionStorage && lt()) {
|
|
2185
|
-
var n = window.sessionStorage.getItem(e.lookupSessionStorage);
|
|
2186
|
-
n && (t = n);
|
|
2187
|
-
}
|
|
2188
|
-
return t;
|
|
2189
|
-
},
|
|
2190
|
-
cacheUserLanguage: function(e, t) {
|
|
2191
|
-
t.lookupSessionStorage && lt() && window.sessionStorage.setItem(t.lookupSessionStorage, e);
|
|
2192
|
-
}
|
|
2193
|
-
}, Un = {
|
|
2194
|
-
name: "navigator",
|
|
2195
|
-
lookup: function(e) {
|
|
2196
|
-
var t = [];
|
|
2197
|
-
if (typeof navigator < "u") {
|
|
2198
|
-
if (navigator.languages)
|
|
2199
|
-
for (var n = 0; n < navigator.languages.length; n++)
|
|
2200
|
-
t.push(navigator.languages[n]);
|
|
2201
|
-
navigator.userLanguage && t.push(navigator.userLanguage), navigator.language && t.push(navigator.language);
|
|
2202
|
-
}
|
|
2203
|
-
return t.length > 0 ? t : void 0;
|
|
2204
|
-
}
|
|
2205
|
-
}, Bn = {
|
|
2206
|
-
name: "htmlTag",
|
|
2207
|
-
lookup: function(e) {
|
|
2208
|
-
var t, n = e.htmlTag || (typeof document < "u" ? document.documentElement : null);
|
|
2209
|
-
return n && typeof n.getAttribute == "function" && (t = n.getAttribute("lang")), t;
|
|
2210
|
-
}
|
|
2211
|
-
}, Hn = {
|
|
2212
|
-
name: "path",
|
|
2213
|
-
lookup: function(e) {
|
|
2214
|
-
var t;
|
|
2215
|
-
if (typeof window < "u") {
|
|
2216
|
-
var n = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
2217
|
-
if (n instanceof Array)
|
|
2218
|
-
if (typeof e.lookupFromPathIndex == "number") {
|
|
2219
|
-
if (typeof n[e.lookupFromPathIndex] != "string")
|
|
2220
|
-
return;
|
|
2221
|
-
t = n[e.lookupFromPathIndex].replace("/", "");
|
|
2222
|
-
} else
|
|
2223
|
-
t = n[0].replace("/", "");
|
|
2224
|
-
}
|
|
2225
|
-
return t;
|
|
2226
|
-
}
|
|
2227
|
-
}, $n = {
|
|
2228
|
-
name: "subdomain",
|
|
2229
|
-
lookup: function(e) {
|
|
2230
|
-
var t = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, n = typeof window < "u" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
|
|
2231
|
-
if (n)
|
|
2232
|
-
return n[t];
|
|
2233
|
-
}
|
|
2234
|
-
}, At = !1;
|
|
2235
|
-
try {
|
|
2236
|
-
document.cookie, At = !0;
|
|
2237
|
-
} catch {
|
|
2238
|
-
}
|
|
2239
|
-
var Tt = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
|
|
2240
|
-
At || Tt.splice(1, 1);
|
|
2241
|
-
function Mn() {
|
|
2242
|
-
return {
|
|
2243
|
-
order: Tt,
|
|
2244
|
-
lookupQuerystring: "lng",
|
|
2245
|
-
lookupCookie: "i18next",
|
|
2246
|
-
lookupLocalStorage: "i18nextLng",
|
|
2247
|
-
lookupSessionStorage: "i18nextLng",
|
|
2248
|
-
// cache user language
|
|
2249
|
-
caches: ["localStorage"],
|
|
2250
|
-
excludeCacheFor: ["cimode"],
|
|
2251
|
-
// cookieMinutes: 10,
|
|
2252
|
-
// cookieDomain: 'myDomain'
|
|
2253
|
-
convertDetectedLanguage: function(e) {
|
|
2254
|
-
return e;
|
|
2255
|
-
}
|
|
2256
|
-
};
|
|
2257
|
-
}
|
|
2258
|
-
var Dt = /* @__PURE__ */ function() {
|
|
2259
|
-
function i(e) {
|
|
2260
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2261
|
-
B(this, i), this.type = "languageDetector", this.detectors = {}, this.init(e, t);
|
|
2262
|
-
}
|
|
2263
|
-
return H(i, [{
|
|
2264
|
-
key: "init",
|
|
2265
|
-
value: function(t) {
|
|
2266
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2267
|
-
this.services = t || {
|
|
2268
|
-
languageUtils: {}
|
|
2269
|
-
}, this.options = Nn(n, this.options || {}, Mn()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(a) {
|
|
2270
|
-
return a.replace("-", "_");
|
|
2271
|
-
}), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(Tn), this.addDetector(Dn), this.addDetector(In), this.addDetector(Fn), this.addDetector(Un), this.addDetector(Bn), this.addDetector(Hn), this.addDetector($n);
|
|
2272
|
-
}
|
|
2273
|
-
}, {
|
|
2274
|
-
key: "addDetector",
|
|
2275
|
-
value: function(t) {
|
|
2276
|
-
return this.detectors[t.name] = t, this;
|
|
2277
|
-
}
|
|
2278
|
-
}, {
|
|
2279
|
-
key: "detect",
|
|
2280
|
-
value: function(t) {
|
|
2281
|
-
var n = this;
|
|
2282
|
-
t || (t = this.options.order);
|
|
2283
|
-
var r = [];
|
|
2284
|
-
return t.forEach(function(a) {
|
|
2285
|
-
if (n.detectors[a]) {
|
|
2286
|
-
var o = n.detectors[a].lookup(n.options);
|
|
2287
|
-
o && typeof o == "string" && (o = [o]), o && (r = r.concat(o));
|
|
2288
|
-
}
|
|
2289
|
-
}), r = r.map(function(a) {
|
|
2290
|
-
return n.options.convertDetectedLanguage(a);
|
|
2291
|
-
}), this.services.languageUtils.getBestMatchFromCodes ? r : r.length > 0 ? r[0] : null;
|
|
2292
|
-
}
|
|
2293
|
-
}, {
|
|
2294
|
-
key: "cacheUserLanguage",
|
|
2295
|
-
value: function(t, n) {
|
|
2296
|
-
var r = this;
|
|
2297
|
-
n || (n = this.options.caches), n && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(t) > -1 || n.forEach(function(a) {
|
|
2298
|
-
r.detectors[a] && r.detectors[a].cacheUserLanguage(t, r.options);
|
|
2299
|
-
}));
|
|
2300
|
-
}
|
|
2301
|
-
}]);
|
|
2302
|
-
}();
|
|
2303
|
-
Dt.type = "languageDetector";
|
|
2304
|
-
function qn() {
|
|
2305
|
-
if (console && console.warn) {
|
|
2306
|
-
for (var i, e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
2307
|
-
t[n] = arguments[n];
|
|
2308
|
-
typeof t[0] == "string" && (t[0] = "react-i18next:: ".concat(t[0])), (i = console).warn.apply(i, t);
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
var dt = {};
|
|
2312
|
-
function Ne() {
|
|
2313
|
-
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
2314
|
-
e[t] = arguments[t];
|
|
2315
|
-
typeof e[0] == "string" && dt[e[0]] || (typeof e[0] == "string" && (dt[e[0]] = /* @__PURE__ */ new Date()), qn.apply(void 0, e));
|
|
2316
|
-
}
|
|
2317
|
-
var It = function(e, t) {
|
|
2318
|
-
return function() {
|
|
2319
|
-
if (e.isInitialized)
|
|
2320
|
-
t();
|
|
2321
|
-
else {
|
|
2322
|
-
var n = function r() {
|
|
2323
|
-
setTimeout(function() {
|
|
2324
|
-
e.off("initialized", r);
|
|
2325
|
-
}, 0), t();
|
|
2326
|
-
};
|
|
2327
|
-
e.on("initialized", n);
|
|
2328
|
-
}
|
|
2329
|
-
};
|
|
2330
|
-
};
|
|
2331
|
-
function pt(i, e, t) {
|
|
2332
|
-
i.loadNamespaces(e, It(i, t));
|
|
2333
|
-
}
|
|
2334
|
-
function gt(i, e, t, n) {
|
|
2335
|
-
typeof t == "string" && (t = [t]), t.forEach(function(r) {
|
|
2336
|
-
i.options.ns.indexOf(r) < 0 && i.options.ns.push(r);
|
|
2337
|
-
}), i.loadLanguages(e, It(i, n));
|
|
2338
|
-
}
|
|
2339
|
-
function Kn(i, e) {
|
|
2340
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = e.languages[0], r = e.options ? e.options.fallbackLng : !1, a = e.languages[e.languages.length - 1];
|
|
2341
|
-
if (n.toLowerCase() === "cimode")
|
|
2342
|
-
return !0;
|
|
2343
|
-
var o = function(u, d) {
|
|
2344
|
-
var c = e.services.backendConnector.state["".concat(u, "|").concat(d)];
|
|
2345
|
-
return c === -1 || c === 2;
|
|
2346
|
-
};
|
|
2347
|
-
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !o(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(n, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || o(n, i) && (!r || o(a, i)));
|
|
2348
|
-
}
|
|
2349
|
-
function Vn(i, e) {
|
|
2350
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2351
|
-
if (!e.languages || !e.languages.length)
|
|
2352
|
-
return Ne("i18n.languages were undefined or empty", e.languages), !0;
|
|
2353
|
-
var n = e.options.ignoreJSONStructure !== void 0;
|
|
2354
|
-
return n ? e.hasLoadedNamespace(i, {
|
|
2355
|
-
lng: t.lng,
|
|
2356
|
-
precheck: function(a, o) {
|
|
2357
|
-
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !o(a.isLanguageChangingTo, i))
|
|
2358
|
-
return !1;
|
|
2359
|
-
}
|
|
2360
|
-
}) : Kn(i, e, t);
|
|
2361
|
-
}
|
|
2362
|
-
var zn = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Jn = {
|
|
2363
|
-
"&": "&",
|
|
2364
|
-
"&": "&",
|
|
2365
|
-
"<": "<",
|
|
2366
|
-
"<": "<",
|
|
2367
|
-
">": ">",
|
|
2368
|
-
">": ">",
|
|
2369
|
-
"'": "'",
|
|
2370
|
-
"'": "'",
|
|
2371
|
-
""": '"',
|
|
2372
|
-
""": '"',
|
|
2373
|
-
" ": " ",
|
|
2374
|
-
" ": " ",
|
|
2375
|
-
"©": "©",
|
|
2376
|
-
"©": "©",
|
|
2377
|
-
"®": "®",
|
|
2378
|
-
"®": "®",
|
|
2379
|
-
"…": "…",
|
|
2380
|
-
"…": "…",
|
|
2381
|
-
"/": "/",
|
|
2382
|
-
"/": "/"
|
|
2383
|
-
}, Xn = function(e) {
|
|
2384
|
-
return Jn[e];
|
|
2385
|
-
}, Wn = function(e) {
|
|
2386
|
-
return e.replace(zn, Xn);
|
|
2387
|
-
};
|
|
2388
|
-
function ht(i, e) {
|
|
2389
|
-
var t = Object.keys(i);
|
|
2390
|
-
if (Object.getOwnPropertySymbols) {
|
|
2391
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
2392
|
-
e && (n = n.filter(function(r) {
|
|
2393
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
2394
|
-
})), t.push.apply(t, n);
|
|
2395
|
-
}
|
|
2396
|
-
return t;
|
|
2397
|
-
}
|
|
2398
|
-
function vt(i) {
|
|
2399
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2400
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
2401
|
-
e % 2 ? ht(Object(t), !0).forEach(function(n) {
|
|
2402
|
-
W(i, n, t[n]);
|
|
2403
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : ht(Object(t)).forEach(function(n) {
|
|
2404
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2405
|
-
});
|
|
2406
|
-
}
|
|
2407
|
-
return i;
|
|
2408
|
-
}
|
|
2409
|
-
var Ae = {
|
|
2410
|
-
bindI18n: "languageChanged",
|
|
2411
|
-
bindI18nStore: "",
|
|
2412
|
-
transEmptyNodeValue: "",
|
|
2413
|
-
transSupportBasicHtmlNodes: !0,
|
|
2414
|
-
transWrapTextNodes: "",
|
|
2415
|
-
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
2416
|
-
useSuspense: !0,
|
|
2417
|
-
unescape: Wn
|
|
2418
|
-
};
|
|
2419
|
-
function Gn() {
|
|
2420
|
-
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2421
|
-
Ae = vt(vt({}, Ae), i);
|
|
2422
|
-
}
|
|
2423
|
-
function Qn() {
|
|
2424
|
-
return Ae;
|
|
2425
|
-
}
|
|
2426
|
-
var Ft;
|
|
2427
|
-
function Yn(i) {
|
|
2428
|
-
Ft = i;
|
|
2429
|
-
}
|
|
2430
|
-
function Zn() {
|
|
2431
|
-
return Ft;
|
|
2432
|
-
}
|
|
2433
|
-
var er = {
|
|
2434
|
-
type: "3rdParty",
|
|
2435
|
-
init: function(e) {
|
|
2436
|
-
Gn(e.options.react), Yn(e);
|
|
2437
|
-
}
|
|
2438
|
-
}, Ut = M.createContext(), tr = function() {
|
|
2439
|
-
function i() {
|
|
2440
|
-
B(this, i), this.usedNamespaces = {};
|
|
2441
|
-
}
|
|
2442
|
-
return H(i, [{
|
|
2443
|
-
key: "addUsedNamespaces",
|
|
2444
|
-
value: function(t) {
|
|
2445
|
-
var n = this;
|
|
2446
|
-
t.forEach(function(r) {
|
|
2447
|
-
n.usedNamespaces[r] || (n.usedNamespaces[r] = !0);
|
|
2448
|
-
});
|
|
2449
|
-
}
|
|
2450
|
-
}, {
|
|
2451
|
-
key: "getUsedNamespaces",
|
|
2452
|
-
value: function() {
|
|
2453
|
-
return Object.keys(this.usedNamespaces);
|
|
2454
|
-
}
|
|
2455
|
-
}]), i;
|
|
2456
|
-
}();
|
|
2457
|
-
function nr(i, e) {
|
|
2458
|
-
var t = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
|
|
2459
|
-
if (t != null) {
|
|
2460
|
-
var n, r, a, o, s = [], u = !0, d = !1;
|
|
2461
|
-
try {
|
|
2462
|
-
if (a = (t = t.call(i)).next, e !== 0)
|
|
2463
|
-
for (; !(u = (n = a.call(t)).done) && (s.push(n.value), s.length !== e); u = !0)
|
|
2464
|
-
;
|
|
2465
|
-
} catch (c) {
|
|
2466
|
-
d = !0, r = c;
|
|
2467
|
-
} finally {
|
|
2468
|
-
try {
|
|
2469
|
-
if (!u && t.return != null && (o = t.return(), Object(o) !== o))
|
|
2470
|
-
return;
|
|
2471
|
-
} finally {
|
|
2472
|
-
if (d)
|
|
2473
|
-
throw r;
|
|
2474
|
-
}
|
|
2475
|
-
}
|
|
2476
|
-
return s;
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
function rr(i, e) {
|
|
2480
|
-
return Lt(i) || nr(i, e) || Rt(i, e) || Et();
|
|
2481
|
-
}
|
|
2482
|
-
function mt(i, e) {
|
|
2483
|
-
var t = Object.keys(i);
|
|
2484
|
-
if (Object.getOwnPropertySymbols) {
|
|
2485
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
2486
|
-
e && (n = n.filter(function(r) {
|
|
2487
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
2488
|
-
})), t.push.apply(t, n);
|
|
2489
|
-
}
|
|
2490
|
-
return t;
|
|
2491
|
-
}
|
|
2492
|
-
function Ce(i) {
|
|
2493
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
2494
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
2495
|
-
e % 2 ? mt(Object(t), !0).forEach(function(n) {
|
|
2496
|
-
W(i, n, t[n]);
|
|
2497
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : mt(Object(t)).forEach(function(n) {
|
|
2498
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2499
|
-
});
|
|
2500
|
-
}
|
|
2501
|
-
return i;
|
|
2502
|
-
}
|
|
2503
|
-
var ir = function(e, t) {
|
|
2504
|
-
var n = M.useRef();
|
|
2505
|
-
return M.useEffect(function() {
|
|
2506
|
-
n.current = e;
|
|
2507
|
-
}, [e, t]), n.current;
|
|
2508
|
-
};
|
|
2509
|
-
function ar(i) {
|
|
2510
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = e.i18n, n = M.useContext(Ut) || {}, r = n.i18n, a = n.defaultNS, o = t || r || Zn();
|
|
2511
|
-
if (o && !o.reportNamespaces && (o.reportNamespaces = new tr()), !o) {
|
|
2512
|
-
Ne("You will need to pass in an i18next instance by using initReactI18next");
|
|
2513
|
-
var s = function(R, C) {
|
|
2514
|
-
return typeof C == "string" ? C : C && U(C) === "object" && typeof C.defaultValue == "string" ? C.defaultValue : Array.isArray(R) ? R[R.length - 1] : R;
|
|
2515
|
-
}, u = [s, {}, !1];
|
|
2516
|
-
return u.t = s, u.i18n = {}, u.ready = !1, u;
|
|
2517
|
-
}
|
|
2518
|
-
o.options.react && o.options.react.wait !== void 0 && Ne("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
2519
|
-
var d = Ce(Ce(Ce({}, Qn()), o.options.react), e), c = d.useSuspense, f = d.keyPrefix, p = a || o.options && o.options.defaultNS;
|
|
2520
|
-
p = typeof p == "string" ? [p] : p || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(p);
|
|
2521
|
-
var g = (o.isInitialized || o.initializedStoreOnce) && p.every(function(_) {
|
|
2522
|
-
return Vn(_, o, d);
|
|
2523
|
-
});
|
|
2524
|
-
function b() {
|
|
2525
|
-
return o.getFixedT(e.lng || null, d.nsMode === "fallback" ? p : p[0], f);
|
|
2526
|
-
}
|
|
2527
|
-
var y = M.useState(b), w = rr(y, 2), v = w[0], m = w[1], S = p.join();
|
|
2528
|
-
e.lng && (S = "".concat(e.lng).concat(S));
|
|
2529
|
-
var x = ir(S), k = M.useRef(!0);
|
|
2530
|
-
M.useEffect(function() {
|
|
2531
|
-
var _ = d.bindI18n, R = d.bindI18nStore;
|
|
2532
|
-
k.current = !0, !g && !c && (e.lng ? gt(o, e.lng, p, function() {
|
|
2533
|
-
k.current && m(b);
|
|
2534
|
-
}) : pt(o, p, function() {
|
|
2535
|
-
k.current && m(b);
|
|
2536
|
-
})), g && x && x !== S && k.current && m(b);
|
|
2537
|
-
function C() {
|
|
2538
|
-
k.current && m(b);
|
|
2539
|
-
}
|
|
2540
|
-
return _ && o && o.on(_, C), R && o && o.store.on(R, C), function() {
|
|
2541
|
-
k.current = !1, _ && o && _.split(" ").forEach(function(Y) {
|
|
2542
|
-
return o.off(Y, C);
|
|
2543
|
-
}), R && o && R.split(" ").forEach(function(Y) {
|
|
2544
|
-
return o.store.off(Y, C);
|
|
2545
|
-
});
|
|
2546
|
-
};
|
|
2547
|
-
}, [o, S]);
|
|
2548
|
-
var D = M.useRef(!0);
|
|
2549
|
-
M.useEffect(function() {
|
|
2550
|
-
k.current && !D.current && m(b), D.current = !1;
|
|
2551
|
-
}, [o, f]);
|
|
2552
|
-
var I = [v, o, g];
|
|
2553
|
-
if (I.t = v, I.i18n = o, I.ready = g, g || !g && !c)
|
|
2554
|
-
return I;
|
|
2555
|
-
throw new Promise(function(_) {
|
|
2556
|
-
e.lng ? gt(o, e.lng, p, function() {
|
|
2557
|
-
return _();
|
|
2558
|
-
}) : pt(o, p, function() {
|
|
2559
|
-
return _();
|
|
2560
|
-
});
|
|
2561
|
-
});
|
|
2562
|
-
}
|
|
2563
|
-
function or(i) {
|
|
2564
|
-
var e = i.i18n, t = i.defaultNS, n = i.children, r = M.useMemo(function() {
|
|
2565
|
-
return {
|
|
2566
|
-
i18n: e,
|
|
2567
|
-
defaultNS: t
|
|
2568
|
-
};
|
|
2569
|
-
}, [e, t]);
|
|
2570
|
-
return M.createElement(Ut.Provider, {
|
|
2571
|
-
value: r
|
|
2572
|
-
}, n);
|
|
2573
|
-
}
|
|
2574
|
-
var Bt = [], sr = Bt.forEach, ur = Bt.slice;
|
|
2575
|
-
function fr(i) {
|
|
2576
|
-
return sr.call(ur.call(arguments, 1), function(e) {
|
|
2577
|
-
if (e)
|
|
2578
|
-
for (var t in e)
|
|
2579
|
-
i[t] === void 0 && (i[t] = e[t]);
|
|
2580
|
-
}), i;
|
|
2581
|
-
}
|
|
2582
|
-
function cr(i) {
|
|
2583
|
-
return i ? typeof i == "function" ? new i() : i : null;
|
|
2584
|
-
}
|
|
2585
|
-
function lr() {
|
|
2586
|
-
return {
|
|
2587
|
-
handleEmptyResourcesAsFailed: !0,
|
|
2588
|
-
cacheHitMode: "none"
|
|
2589
|
-
// reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000
|
|
2590
|
-
// refreshExpirationTime: 60 * 60 * 1000
|
|
2591
|
-
};
|
|
2592
|
-
}
|
|
2593
|
-
function yt(i, e, t, n) {
|
|
2594
|
-
var r = i.read.bind(i);
|
|
2595
|
-
if (r.length === 2) {
|
|
2596
|
-
try {
|
|
2597
|
-
var a = r(e, t);
|
|
2598
|
-
a && typeof a.then == "function" ? a.then(function(o) {
|
|
2599
|
-
return n(null, o);
|
|
2600
|
-
}).catch(n) : n(null, a);
|
|
2601
|
-
} catch (o) {
|
|
2602
|
-
n(o);
|
|
2603
|
-
}
|
|
2604
|
-
return;
|
|
2605
|
-
}
|
|
2606
|
-
r(e, t, n);
|
|
2607
|
-
}
|
|
2608
|
-
var Ht = /* @__PURE__ */ function() {
|
|
2609
|
-
function i(e) {
|
|
2610
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2611
|
-
B(this, i), this.backends = [], this.type = "backend", this.allOptions = n, this.init(e, t);
|
|
2612
|
-
}
|
|
2613
|
-
return H(i, [{
|
|
2614
|
-
key: "init",
|
|
2615
|
-
value: function(t) {
|
|
2616
|
-
var n = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2617
|
-
this.services = t, this.options = fr(r, this.options || {}, lr()), this.allOptions = a, this.options.backends && this.options.backends.forEach(function(o, s) {
|
|
2618
|
-
n.backends[s] = n.backends[s] || cr(o), n.backends[s].init(t, n.options.backendOptions && n.options.backendOptions[s] || {}, a);
|
|
2619
|
-
}), this.services && this.options.reloadInterval && setInterval(function() {
|
|
2620
|
-
return n.reload();
|
|
2621
|
-
}, this.options.reloadInterval);
|
|
2622
|
-
}
|
|
2623
|
-
}, {
|
|
2624
|
-
key: "read",
|
|
2625
|
-
value: function(t, n, r) {
|
|
2626
|
-
var a = this, o = this.backends.length, s = function d(c) {
|
|
2627
|
-
if (c >= o)
|
|
2628
|
-
return r(new Error("non of the backend loaded data", !0));
|
|
2629
|
-
var f = c === o - 1, p = a.options.handleEmptyResourcesAsFailed && !f ? 0 : -1, g = a.backends[c];
|
|
2630
|
-
g.read ? yt(g, t, n, function(b, y, w) {
|
|
2631
|
-
if (!b && y && Object.keys(y).length > p) {
|
|
2632
|
-
if (r(null, y, c), u(c - 1, y), g.save && a.options.cacheHitMode && ["refresh", "refreshAndUpdateStore"].indexOf(a.options.cacheHitMode) > -1) {
|
|
2633
|
-
if (w && a.options.refreshExpirationTime && w + a.options.refreshExpirationTime > Date.now())
|
|
2634
|
-
return;
|
|
2635
|
-
var v = a.backends[c + 1];
|
|
2636
|
-
v && v.read && yt(v, t, n, function(m, S) {
|
|
2637
|
-
m || S && (Object.keys(S).length <= p || (u(c, S), a.options.cacheHitMode === "refreshAndUpdateStore" && a.services && a.services.resourceStore && a.services.resourceStore.addResourceBundle(t, n, S)));
|
|
2638
|
-
});
|
|
2639
|
-
}
|
|
2640
|
-
} else
|
|
2641
|
-
d(c + 1);
|
|
2642
|
-
}) : d(c + 1);
|
|
2643
|
-
}, u = function d(c, f) {
|
|
2644
|
-
if (!(c < 0)) {
|
|
2645
|
-
var p = a.backends[c];
|
|
2646
|
-
p.save && p.save(t, n, f), d(c - 1, f);
|
|
2647
|
-
}
|
|
2648
|
-
};
|
|
2649
|
-
s(0);
|
|
2650
|
-
}
|
|
2651
|
-
}, {
|
|
2652
|
-
key: "create",
|
|
2653
|
-
value: function(t, n, r, a) {
|
|
2654
|
-
var o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : function() {
|
|
2655
|
-
}, s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
|
|
2656
|
-
this.backends.forEach(function(u) {
|
|
2657
|
-
if (u.create) {
|
|
2658
|
-
var d = u.create.bind(u);
|
|
2659
|
-
if (d.length < 6) {
|
|
2660
|
-
try {
|
|
2661
|
-
var c;
|
|
2662
|
-
d.length === 5 ? c = d(t, n, r, a, s) : c = d(t, n, r, a), c && typeof c.then == "function" ? c.then(function(f) {
|
|
2663
|
-
return o(null, f);
|
|
2664
|
-
}).catch(o) : o(null, c);
|
|
2665
|
-
} catch (f) {
|
|
2666
|
-
o(f);
|
|
2667
|
-
}
|
|
2668
|
-
return;
|
|
2669
|
-
}
|
|
2670
|
-
d(t, n, r, a, o, s);
|
|
2671
|
-
}
|
|
2672
|
-
});
|
|
2673
|
-
}
|
|
2674
|
-
}, {
|
|
2675
|
-
key: "reload",
|
|
2676
|
-
value: function() {
|
|
2677
|
-
var t = this, n = this.services, r = n.backendConnector, a = n.languageUtils, o = n.logger, s = r.language;
|
|
2678
|
-
if (!(s && s.toLowerCase() === "cimode")) {
|
|
2679
|
-
var u = [], d = function(f) {
|
|
2680
|
-
var p = a.toResolveHierarchy(f);
|
|
2681
|
-
p.forEach(function(g) {
|
|
2682
|
-
u.indexOf(g) < 0 && u.push(g);
|
|
2683
|
-
});
|
|
2684
|
-
};
|
|
2685
|
-
d(s), this.allOptions.preload && this.allOptions.preload.forEach(function(c) {
|
|
2686
|
-
return d(c);
|
|
2687
|
-
}), u.forEach(function(c) {
|
|
2688
|
-
t.allOptions.ns.forEach(function(f) {
|
|
2689
|
-
r.read(c, f, "read", null, null, function(p, g) {
|
|
2690
|
-
p && o.warn("loading namespace ".concat(f, " for language ").concat(c, " failed"), p), !p && g && o.log("loaded namespace ".concat(f, " for language ").concat(c), g), r.loaded("".concat(c, "|").concat(f), p, g);
|
|
2691
|
-
});
|
|
2692
|
-
});
|
|
2693
|
-
});
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
}]), i;
|
|
2697
|
-
}();
|
|
2698
|
-
Ht.type = "backend";
|
|
2699
|
-
function Te(i) {
|
|
2700
|
-
"@babel/helpers - typeof";
|
|
2701
|
-
return Te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2702
|
-
return typeof e;
|
|
2703
|
-
} : function(e) {
|
|
2704
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2705
|
-
}, Te(i);
|
|
2706
|
-
}
|
|
2707
|
-
function $t() {
|
|
2708
|
-
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : Te(XMLHttpRequest)) === "object";
|
|
2709
|
-
}
|
|
2710
|
-
function dr(i) {
|
|
2711
|
-
return !!i && typeof i.then == "function";
|
|
2712
|
-
}
|
|
2713
|
-
function pr(i) {
|
|
2714
|
-
return dr(i) ? i : Promise.resolve(i);
|
|
2715
|
-
}
|
|
2716
|
-
function gr(i) {
|
|
2717
|
-
throw new Error('Could not dynamically require "' + i + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
2718
|
-
}
|
|
2719
|
-
var De = { exports: {} }, ve = { exports: {} }, bt;
|
|
2720
|
-
function hr() {
|
|
2721
|
-
return bt || (bt = 1, function(i, e) {
|
|
2722
|
-
var t = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof ce < "u" && ce, n = function() {
|
|
2723
|
-
function a() {
|
|
2724
|
-
this.fetch = !1, this.DOMException = t.DOMException;
|
|
2725
|
-
}
|
|
2726
|
-
return a.prototype = t, new a();
|
|
2727
|
-
}();
|
|
2728
|
-
(function(a) {
|
|
2729
|
-
(function(o) {
|
|
2730
|
-
var s = typeof a < "u" && a || typeof self < "u" && self || typeof s < "u" && s, u = {
|
|
2731
|
-
searchParams: "URLSearchParams" in s,
|
|
2732
|
-
iterable: "Symbol" in s && "iterator" in Symbol,
|
|
2733
|
-
blob: "FileReader" in s && "Blob" in s && function() {
|
|
2734
|
-
try {
|
|
2735
|
-
return new Blob(), !0;
|
|
2736
|
-
} catch {
|
|
2737
|
-
return !1;
|
|
2738
|
-
}
|
|
2739
|
-
}(),
|
|
2740
|
-
formData: "FormData" in s,
|
|
2741
|
-
arrayBuffer: "ArrayBuffer" in s
|
|
2742
|
-
};
|
|
2743
|
-
function d(l) {
|
|
2744
|
-
return l && DataView.prototype.isPrototypeOf(l);
|
|
2745
|
-
}
|
|
2746
|
-
if (u.arrayBuffer)
|
|
2747
|
-
var c = [
|
|
2748
|
-
"[object Int8Array]",
|
|
2749
|
-
"[object Uint8Array]",
|
|
2750
|
-
"[object Uint8ClampedArray]",
|
|
2751
|
-
"[object Int16Array]",
|
|
2752
|
-
"[object Uint16Array]",
|
|
2753
|
-
"[object Int32Array]",
|
|
2754
|
-
"[object Uint32Array]",
|
|
2755
|
-
"[object Float32Array]",
|
|
2756
|
-
"[object Float64Array]"
|
|
2757
|
-
], f = ArrayBuffer.isView || function(l) {
|
|
2758
|
-
return l && c.indexOf(Object.prototype.toString.call(l)) > -1;
|
|
2759
|
-
};
|
|
2760
|
-
function p(l) {
|
|
2761
|
-
if (typeof l != "string" && (l = String(l)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(l) || l === "")
|
|
2762
|
-
throw new TypeError('Invalid character in header field name: "' + l + '"');
|
|
2763
|
-
return l.toLowerCase();
|
|
2764
|
-
}
|
|
2765
|
-
function g(l) {
|
|
2766
|
-
return typeof l != "string" && (l = String(l)), l;
|
|
2767
|
-
}
|
|
2768
|
-
function b(l) {
|
|
2769
|
-
var h = {
|
|
2770
|
-
next: function() {
|
|
2771
|
-
var O = l.shift();
|
|
2772
|
-
return { done: O === void 0, value: O };
|
|
2773
|
-
}
|
|
2774
|
-
};
|
|
2775
|
-
return u.iterable && (h[Symbol.iterator] = function() {
|
|
2776
|
-
return h;
|
|
2777
|
-
}), h;
|
|
2778
|
-
}
|
|
2779
|
-
function y(l) {
|
|
2780
|
-
this.map = {}, l instanceof y ? l.forEach(function(h, O) {
|
|
2781
|
-
this.append(O, h);
|
|
2782
|
-
}, this) : Array.isArray(l) ? l.forEach(function(h) {
|
|
2783
|
-
this.append(h[0], h[1]);
|
|
2784
|
-
}, this) : l && Object.getOwnPropertyNames(l).forEach(function(h) {
|
|
2785
|
-
this.append(h, l[h]);
|
|
2786
|
-
}, this);
|
|
2787
|
-
}
|
|
2788
|
-
y.prototype.append = function(l, h) {
|
|
2789
|
-
l = p(l), h = g(h);
|
|
2790
|
-
var O = this.map[l];
|
|
2791
|
-
this.map[l] = O ? O + ", " + h : h;
|
|
2792
|
-
}, y.prototype.delete = function(l) {
|
|
2793
|
-
delete this.map[p(l)];
|
|
2794
|
-
}, y.prototype.get = function(l) {
|
|
2795
|
-
return l = p(l), this.has(l) ? this.map[l] : null;
|
|
2796
|
-
}, y.prototype.has = function(l) {
|
|
2797
|
-
return this.map.hasOwnProperty(p(l));
|
|
2798
|
-
}, y.prototype.set = function(l, h) {
|
|
2799
|
-
this.map[p(l)] = g(h);
|
|
2800
|
-
}, y.prototype.forEach = function(l, h) {
|
|
2801
|
-
for (var O in this.map)
|
|
2802
|
-
this.map.hasOwnProperty(O) && l.call(h, this.map[O], O, this);
|
|
2803
|
-
}, y.prototype.keys = function() {
|
|
2804
|
-
var l = [];
|
|
2805
|
-
return this.forEach(function(h, O) {
|
|
2806
|
-
l.push(O);
|
|
2807
|
-
}), b(l);
|
|
2808
|
-
}, y.prototype.values = function() {
|
|
2809
|
-
var l = [];
|
|
2810
|
-
return this.forEach(function(h) {
|
|
2811
|
-
l.push(h);
|
|
2812
|
-
}), b(l);
|
|
2813
|
-
}, y.prototype.entries = function() {
|
|
2814
|
-
var l = [];
|
|
2815
|
-
return this.forEach(function(h, O) {
|
|
2816
|
-
l.push([O, h]);
|
|
2817
|
-
}), b(l);
|
|
2818
|
-
}, u.iterable && (y.prototype[Symbol.iterator] = y.prototype.entries);
|
|
2819
|
-
function w(l) {
|
|
2820
|
-
if (l.bodyUsed)
|
|
2821
|
-
return Promise.reject(new TypeError("Already read"));
|
|
2822
|
-
l.bodyUsed = !0;
|
|
2823
|
-
}
|
|
2824
|
-
function v(l) {
|
|
2825
|
-
return new Promise(function(h, O) {
|
|
2826
|
-
l.onload = function() {
|
|
2827
|
-
h(l.result);
|
|
2828
|
-
}, l.onerror = function() {
|
|
2829
|
-
O(l.error);
|
|
2830
|
-
};
|
|
2831
|
-
});
|
|
2832
|
-
}
|
|
2833
|
-
function m(l) {
|
|
2834
|
-
var h = new FileReader(), O = v(h);
|
|
2835
|
-
return h.readAsArrayBuffer(l), O;
|
|
2836
|
-
}
|
|
2837
|
-
function S(l) {
|
|
2838
|
-
var h = new FileReader(), O = v(h);
|
|
2839
|
-
return h.readAsText(l), O;
|
|
2840
|
-
}
|
|
2841
|
-
function x(l) {
|
|
2842
|
-
for (var h = new Uint8Array(l), O = new Array(h.length), j = 0; j < h.length; j++)
|
|
2843
|
-
O[j] = String.fromCharCode(h[j]);
|
|
2844
|
-
return O.join("");
|
|
2845
|
-
}
|
|
2846
|
-
function k(l) {
|
|
2847
|
-
if (l.slice)
|
|
2848
|
-
return l.slice(0);
|
|
2849
|
-
var h = new Uint8Array(l.byteLength);
|
|
2850
|
-
return h.set(new Uint8Array(l)), h.buffer;
|
|
2851
|
-
}
|
|
2852
|
-
function D() {
|
|
2853
|
-
return this.bodyUsed = !1, this._initBody = function(l) {
|
|
2854
|
-
this.bodyUsed = this.bodyUsed, this._bodyInit = l, l ? typeof l == "string" ? this._bodyText = l : u.blob && Blob.prototype.isPrototypeOf(l) ? this._bodyBlob = l : u.formData && FormData.prototype.isPrototypeOf(l) ? this._bodyFormData = l : u.searchParams && URLSearchParams.prototype.isPrototypeOf(l) ? this._bodyText = l.toString() : u.arrayBuffer && u.blob && d(l) ? (this._bodyArrayBuffer = k(l.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(l) || f(l)) ? this._bodyArrayBuffer = k(l) : this._bodyText = l = Object.prototype.toString.call(l) : this._bodyText = "", this.headers.get("content-type") || (typeof l == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(l) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
2855
|
-
}, u.blob && (this.blob = function() {
|
|
2856
|
-
var l = w(this);
|
|
2857
|
-
if (l)
|
|
2858
|
-
return l;
|
|
2859
|
-
if (this._bodyBlob)
|
|
2860
|
-
return Promise.resolve(this._bodyBlob);
|
|
2861
|
-
if (this._bodyArrayBuffer)
|
|
2862
|
-
return Promise.resolve(new Blob([this._bodyArrayBuffer]));
|
|
2863
|
-
if (this._bodyFormData)
|
|
2864
|
-
throw new Error("could not read FormData body as blob");
|
|
2865
|
-
return Promise.resolve(new Blob([this._bodyText]));
|
|
2866
|
-
}, this.arrayBuffer = function() {
|
|
2867
|
-
if (this._bodyArrayBuffer) {
|
|
2868
|
-
var l = w(this);
|
|
2869
|
-
return l || (ArrayBuffer.isView(this._bodyArrayBuffer) ? Promise.resolve(
|
|
2870
|
-
this._bodyArrayBuffer.buffer.slice(
|
|
2871
|
-
this._bodyArrayBuffer.byteOffset,
|
|
2872
|
-
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
|
|
2873
|
-
)
|
|
2874
|
-
) : Promise.resolve(this._bodyArrayBuffer));
|
|
2875
|
-
} else
|
|
2876
|
-
return this.blob().then(m);
|
|
2877
|
-
}), this.text = function() {
|
|
2878
|
-
var l = w(this);
|
|
2879
|
-
if (l)
|
|
2880
|
-
return l;
|
|
2881
|
-
if (this._bodyBlob)
|
|
2882
|
-
return S(this._bodyBlob);
|
|
2883
|
-
if (this._bodyArrayBuffer)
|
|
2884
|
-
return Promise.resolve(x(this._bodyArrayBuffer));
|
|
2885
|
-
if (this._bodyFormData)
|
|
2886
|
-
throw new Error("could not read FormData body as text");
|
|
2887
|
-
return Promise.resolve(this._bodyText);
|
|
2888
|
-
}, u.formData && (this.formData = function() {
|
|
2889
|
-
return this.text().then(C);
|
|
2890
|
-
}), this.json = function() {
|
|
2891
|
-
return this.text().then(JSON.parse);
|
|
2892
|
-
}, this;
|
|
2893
|
-
}
|
|
2894
|
-
var I = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
2895
|
-
function _(l) {
|
|
2896
|
-
var h = l.toUpperCase();
|
|
2897
|
-
return I.indexOf(h) > -1 ? h : l;
|
|
2898
|
-
}
|
|
2899
|
-
function R(l, h) {
|
|
2900
|
-
if (!(this instanceof R))
|
|
2901
|
-
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
2902
|
-
h = h || {};
|
|
2903
|
-
var O = h.body;
|
|
2904
|
-
if (l instanceof R) {
|
|
2905
|
-
if (l.bodyUsed)
|
|
2906
|
-
throw new TypeError("Already read");
|
|
2907
|
-
this.url = l.url, this.credentials = l.credentials, h.headers || (this.headers = new y(l.headers)), this.method = l.method, this.mode = l.mode, this.signal = l.signal, !O && l._bodyInit != null && (O = l._bodyInit, l.bodyUsed = !0);
|
|
2908
|
-
} else
|
|
2909
|
-
this.url = String(l);
|
|
2910
|
-
if (this.credentials = h.credentials || this.credentials || "same-origin", (h.headers || !this.headers) && (this.headers = new y(h.headers)), this.method = _(h.method || this.method || "GET"), this.mode = h.mode || this.mode || null, this.signal = h.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && O)
|
|
2911
|
-
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
2912
|
-
if (this._initBody(O), (this.method === "GET" || this.method === "HEAD") && (h.cache === "no-store" || h.cache === "no-cache")) {
|
|
2913
|
-
var j = /([?&])_=[^&]*/;
|
|
2914
|
-
if (j.test(this.url))
|
|
2915
|
-
this.url = this.url.replace(j, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
|
|
2916
|
-
else {
|
|
2917
|
-
var L = /\?/;
|
|
2918
|
-
this.url += (L.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
|
|
2919
|
-
}
|
|
2920
|
-
}
|
|
2921
|
-
}
|
|
2922
|
-
R.prototype.clone = function() {
|
|
2923
|
-
return new R(this, { body: this._bodyInit });
|
|
2924
|
-
};
|
|
2925
|
-
function C(l) {
|
|
2926
|
-
var h = new FormData();
|
|
2927
|
-
return l.trim().split("&").forEach(function(O) {
|
|
2928
|
-
if (O) {
|
|
2929
|
-
var j = O.split("="), L = j.shift().replace(/\+/g, " "), P = j.join("=").replace(/\+/g, " ");
|
|
2930
|
-
h.append(decodeURIComponent(L), decodeURIComponent(P));
|
|
2931
|
-
}
|
|
2932
|
-
}), h;
|
|
2933
|
-
}
|
|
2934
|
-
function Y(l) {
|
|
2935
|
-
var h = new y(), O = l.replace(/\r?\n[\t ]+/g, " ");
|
|
2936
|
-
return O.split("\r").map(function(j) {
|
|
2937
|
-
return j.indexOf(`
|
|
2938
|
-
`) === 0 ? j.substr(1, j.length) : j;
|
|
2939
|
-
}).forEach(function(j) {
|
|
2940
|
-
var L = j.split(":"), P = L.shift().trim();
|
|
2941
|
-
if (P) {
|
|
2942
|
-
var K = L.join(":").trim();
|
|
2943
|
-
h.append(P, K);
|
|
2944
|
-
}
|
|
2945
|
-
}), h;
|
|
2946
|
-
}
|
|
2947
|
-
D.call(R.prototype);
|
|
2948
|
-
function A(l, h) {
|
|
2949
|
-
if (!(this instanceof A))
|
|
2950
|
-
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
2951
|
-
h || (h = {}), this.type = "default", this.status = h.status === void 0 ? 200 : h.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = h.statusText === void 0 ? "" : "" + h.statusText, this.headers = new y(h.headers), this.url = h.url || "", this._initBody(l);
|
|
2952
|
-
}
|
|
2953
|
-
D.call(A.prototype), A.prototype.clone = function() {
|
|
2954
|
-
return new A(this._bodyInit, {
|
|
2955
|
-
status: this.status,
|
|
2956
|
-
statusText: this.statusText,
|
|
2957
|
-
headers: new y(this.headers),
|
|
2958
|
-
url: this.url
|
|
2959
|
-
});
|
|
2960
|
-
}, A.error = function() {
|
|
2961
|
-
var l = new A(null, { status: 0, statusText: "" });
|
|
2962
|
-
return l.type = "error", l;
|
|
2963
|
-
};
|
|
2964
|
-
var Pe = [301, 302, 303, 307, 308];
|
|
2965
|
-
A.redirect = function(l, h) {
|
|
2966
|
-
if (Pe.indexOf(h) === -1)
|
|
2967
|
-
throw new RangeError("Invalid status code");
|
|
2968
|
-
return new A(null, { status: h, headers: { location: l } });
|
|
2969
|
-
}, o.DOMException = s.DOMException;
|
|
2970
|
-
try {
|
|
2971
|
-
new o.DOMException();
|
|
2972
|
-
} catch {
|
|
2973
|
-
o.DOMException = function(h, O) {
|
|
2974
|
-
this.message = h, this.name = O;
|
|
2975
|
-
var j = Error(h);
|
|
2976
|
-
this.stack = j.stack;
|
|
2977
|
-
}, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException;
|
|
2978
|
-
}
|
|
2979
|
-
function q(l, h) {
|
|
2980
|
-
return new Promise(function(O, j) {
|
|
2981
|
-
var L = new R(l, h);
|
|
2982
|
-
if (L.signal && L.signal.aborted)
|
|
2983
|
-
return j(new o.DOMException("Aborted", "AbortError"));
|
|
2984
|
-
var P = new XMLHttpRequest();
|
|
2985
|
-
function K() {
|
|
2986
|
-
P.abort();
|
|
2987
|
-
}
|
|
2988
|
-
P.onload = function() {
|
|
2989
|
-
var F = {
|
|
2990
|
-
status: P.status,
|
|
2991
|
-
statusText: P.statusText,
|
|
2992
|
-
headers: Y(P.getAllResponseHeaders() || "")
|
|
2993
|
-
};
|
|
2994
|
-
F.url = "responseURL" in P ? P.responseURL : F.headers.get("X-Request-URL");
|
|
2995
|
-
var V = "response" in P ? P.response : P.responseText;
|
|
2996
|
-
setTimeout(function() {
|
|
2997
|
-
O(new A(V, F));
|
|
2998
|
-
}, 0);
|
|
2999
|
-
}, P.onerror = function() {
|
|
3000
|
-
setTimeout(function() {
|
|
3001
|
-
j(new TypeError("Network request failed"));
|
|
3002
|
-
}, 0);
|
|
3003
|
-
}, P.ontimeout = function() {
|
|
3004
|
-
setTimeout(function() {
|
|
3005
|
-
j(new TypeError("Network request failed"));
|
|
3006
|
-
}, 0);
|
|
3007
|
-
}, P.onabort = function() {
|
|
3008
|
-
setTimeout(function() {
|
|
3009
|
-
j(new o.DOMException("Aborted", "AbortError"));
|
|
3010
|
-
}, 0);
|
|
3011
|
-
};
|
|
3012
|
-
function je(F) {
|
|
3013
|
-
try {
|
|
3014
|
-
return F === "" && s.location.href ? s.location.href : F;
|
|
3015
|
-
} catch {
|
|
3016
|
-
return F;
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
P.open(L.method, je(L.url), !0), L.credentials === "include" ? P.withCredentials = !0 : L.credentials === "omit" && (P.withCredentials = !1), "responseType" in P && (u.blob ? P.responseType = "blob" : u.arrayBuffer && L.headers.get("Content-Type") && L.headers.get("Content-Type").indexOf("application/octet-stream") !== -1 && (P.responseType = "arraybuffer")), h && typeof h.headers == "object" && !(h.headers instanceof y) ? Object.getOwnPropertyNames(h.headers).forEach(function(F) {
|
|
3020
|
-
P.setRequestHeader(F, g(h.headers[F]));
|
|
3021
|
-
}) : L.headers.forEach(function(F, V) {
|
|
3022
|
-
P.setRequestHeader(V, F);
|
|
3023
|
-
}), L.signal && (L.signal.addEventListener("abort", K), P.onreadystatechange = function() {
|
|
3024
|
-
P.readyState === 4 && L.signal.removeEventListener("abort", K);
|
|
3025
|
-
}), P.send(typeof L._bodyInit > "u" ? null : L._bodyInit);
|
|
3026
|
-
});
|
|
3027
|
-
}
|
|
3028
|
-
return q.polyfill = !0, s.fetch || (s.fetch = q, s.Headers = y, s.Request = R, s.Response = A), o.Headers = y, o.Request = R, o.Response = A, o.fetch = q, o;
|
|
3029
|
-
})({});
|
|
3030
|
-
})(n), n.fetch.ponyfill = !0, delete n.fetch.polyfill;
|
|
3031
|
-
var r = t.fetch ? t : n;
|
|
3032
|
-
e = r.fetch, e.default = r.fetch, e.fetch = r.fetch, e.Headers = r.Headers, e.Request = r.Request, e.Response = r.Response, i.exports = e;
|
|
3033
|
-
}(ve, ve.exports)), ve.exports;
|
|
3034
|
-
}
|
|
3035
|
-
(function(i, e) {
|
|
3036
|
-
var t;
|
|
3037
|
-
if (typeof fetch == "function" && (typeof ce < "u" && ce.fetch ? t = ce.fetch : typeof window < "u" && window.fetch ? t = window.fetch : t = fetch), typeof gr < "u" && typeof window > "u") {
|
|
3038
|
-
var n = t || hr();
|
|
3039
|
-
n.default && (n = n.default), e.default = n, i.exports = e.default;
|
|
3040
|
-
}
|
|
3041
|
-
})(De, De.exports);
|
|
3042
|
-
var Mt = De.exports;
|
|
3043
|
-
const qt = /* @__PURE__ */ Jt(Mt), wt = /* @__PURE__ */ Gt({
|
|
3044
|
-
__proto__: null,
|
|
3045
|
-
default: qt
|
|
3046
|
-
}, [Mt]);
|
|
3047
|
-
function Ot(i, e) {
|
|
3048
|
-
var t = Object.keys(i);
|
|
3049
|
-
if (Object.getOwnPropertySymbols) {
|
|
3050
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
3051
|
-
e && (n = n.filter(function(r) {
|
|
3052
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
3053
|
-
})), t.push.apply(t, n);
|
|
3054
|
-
}
|
|
3055
|
-
return t;
|
|
3056
|
-
}
|
|
3057
|
-
function St(i) {
|
|
3058
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
3059
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
3060
|
-
e % 2 ? Ot(Object(t), !0).forEach(function(n) {
|
|
3061
|
-
vr(i, n, t[n]);
|
|
3062
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : Ot(Object(t)).forEach(function(n) {
|
|
3063
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
3064
|
-
});
|
|
3065
|
-
}
|
|
3066
|
-
return i;
|
|
3067
|
-
}
|
|
3068
|
-
function vr(i, e, t) {
|
|
3069
|
-
return (e = mr(e)) in i ? Object.defineProperty(i, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : i[e] = t, i;
|
|
3070
|
-
}
|
|
3071
|
-
function mr(i) {
|
|
3072
|
-
var e = yr(i, "string");
|
|
3073
|
-
return te(e) == "symbol" ? e : e + "";
|
|
3074
|
-
}
|
|
3075
|
-
function yr(i, e) {
|
|
3076
|
-
if (te(i) != "object" || !i)
|
|
3077
|
-
return i;
|
|
3078
|
-
var t = i[Symbol.toPrimitive];
|
|
3079
|
-
if (t !== void 0) {
|
|
3080
|
-
var n = t.call(i, e);
|
|
3081
|
-
if (te(n) != "object")
|
|
3082
|
-
return n;
|
|
3083
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3084
|
-
}
|
|
3085
|
-
return (e === "string" ? String : Number)(i);
|
|
3086
|
-
}
|
|
3087
|
-
function te(i) {
|
|
3088
|
-
"@babel/helpers - typeof";
|
|
3089
|
-
return te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
3090
|
-
return typeof e;
|
|
3091
|
-
} : function(e) {
|
|
3092
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3093
|
-
}, te(i);
|
|
3094
|
-
}
|
|
3095
|
-
var Q;
|
|
3096
|
-
typeof fetch == "function" && (typeof global < "u" && global.fetch ? Q = global.fetch : typeof window < "u" && window.fetch ? Q = window.fetch : Q = fetch);
|
|
3097
|
-
var le;
|
|
3098
|
-
$t() && (typeof global < "u" && global.XMLHttpRequest ? le = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (le = window.XMLHttpRequest));
|
|
3099
|
-
var Oe;
|
|
3100
|
-
typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? Oe = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (Oe = window.ActiveXObject));
|
|
3101
|
-
!Q && wt && !le && !Oe && (Q = qt || wt);
|
|
3102
|
-
typeof Q != "function" && (Q = void 0);
|
|
3103
|
-
var Ie = function(e, t) {
|
|
3104
|
-
if (t && te(t) === "object") {
|
|
3105
|
-
var n = "";
|
|
3106
|
-
for (var r in t)
|
|
3107
|
-
n += "&" + encodeURIComponent(r) + "=" + encodeURIComponent(t[r]);
|
|
3108
|
-
if (!n)
|
|
3109
|
-
return e;
|
|
3110
|
-
e = e + (e.indexOf("?") !== -1 ? "&" : "?") + n.slice(1);
|
|
3111
|
-
}
|
|
3112
|
-
return e;
|
|
3113
|
-
}, xt = function(e, t, n, r) {
|
|
3114
|
-
var a = function(u) {
|
|
3115
|
-
if (!u.ok)
|
|
3116
|
-
return n(u.statusText || "Error", {
|
|
3117
|
-
status: u.status
|
|
3118
|
-
});
|
|
3119
|
-
u.text().then(function(d) {
|
|
3120
|
-
n(null, {
|
|
3121
|
-
status: u.status,
|
|
3122
|
-
data: d
|
|
3123
|
-
});
|
|
3124
|
-
}).catch(n);
|
|
3125
|
-
};
|
|
3126
|
-
if (r) {
|
|
3127
|
-
var o = r(e, t);
|
|
3128
|
-
if (o instanceof Promise) {
|
|
3129
|
-
o.then(a).catch(n);
|
|
3130
|
-
return;
|
|
3131
|
-
}
|
|
3132
|
-
}
|
|
3133
|
-
typeof fetch == "function" ? fetch(e, t).then(a).catch(n) : Q(e, t).then(a).catch(n);
|
|
3134
|
-
}, Pt = !1, br = function(e, t, n, r) {
|
|
3135
|
-
e.queryStringParams && (t = Ie(t, e.queryStringParams));
|
|
3136
|
-
var a = St({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
|
|
3137
|
-
typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (a["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), n && (a["Content-Type"] = "application/json");
|
|
3138
|
-
var o = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, s = St({
|
|
3139
|
-
method: n ? "POST" : "GET",
|
|
3140
|
-
body: n ? e.stringify(n) : void 0,
|
|
3141
|
-
headers: a
|
|
3142
|
-
}, Pt ? {} : o), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
|
|
3143
|
-
try {
|
|
3144
|
-
xt(t, s, r, u);
|
|
3145
|
-
} catch (d) {
|
|
3146
|
-
if (!o || Object.keys(o).length === 0 || !d.message || d.message.indexOf("not implemented") < 0)
|
|
3147
|
-
return r(d);
|
|
3148
|
-
try {
|
|
3149
|
-
Object.keys(o).forEach(function(c) {
|
|
3150
|
-
delete s[c];
|
|
3151
|
-
}), xt(t, s, r, u), Pt = !0;
|
|
3152
|
-
} catch (c) {
|
|
3153
|
-
r(c);
|
|
3154
|
-
}
|
|
3155
|
-
}
|
|
3156
|
-
}, wr = function(e, t, n, r) {
|
|
3157
|
-
n && te(n) === "object" && (n = Ie("", n).slice(1)), e.queryStringParams && (t = Ie(t, e.queryStringParams));
|
|
3158
|
-
try {
|
|
3159
|
-
var a;
|
|
3160
|
-
le ? a = new le() : a = new Oe("MSXML2.XMLHTTP.3.0"), a.open(n ? "POST" : "GET", t, 1), e.crossDomain || a.setRequestHeader("X-Requested-With", "XMLHttpRequest"), a.withCredentials = !!e.withCredentials, n && a.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), a.overrideMimeType && a.overrideMimeType("application/json");
|
|
3161
|
-
var o = e.customHeaders;
|
|
3162
|
-
if (o = typeof o == "function" ? o() : o, o)
|
|
3163
|
-
for (var s in o)
|
|
3164
|
-
a.setRequestHeader(s, o[s]);
|
|
3165
|
-
a.onreadystatechange = function() {
|
|
3166
|
-
a.readyState > 3 && r(a.status >= 400 ? a.statusText : null, {
|
|
3167
|
-
status: a.status,
|
|
3168
|
-
data: a.responseText
|
|
3169
|
-
});
|
|
3170
|
-
}, a.send(n);
|
|
3171
|
-
} catch (u) {
|
|
3172
|
-
console && console.log(u);
|
|
3173
|
-
}
|
|
3174
|
-
}, Or = function(e, t, n, r) {
|
|
3175
|
-
if (typeof n == "function" && (r = n, n = void 0), r = r || function() {
|
|
3176
|
-
}, Q && t.indexOf("file:") !== 0)
|
|
3177
|
-
return br(e, t, n, r);
|
|
3178
|
-
if ($t() || typeof ActiveXObject == "function")
|
|
3179
|
-
return wr(e, t, n, r);
|
|
3180
|
-
r(new Error("No fetch and no xhr implementation found!"));
|
|
3181
|
-
};
|
|
3182
|
-
function ae(i) {
|
|
3183
|
-
"@babel/helpers - typeof";
|
|
3184
|
-
return ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
3185
|
-
return typeof e;
|
|
3186
|
-
} : function(e) {
|
|
3187
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3188
|
-
}, ae(i);
|
|
3189
|
-
}
|
|
3190
|
-
function jt(i, e) {
|
|
3191
|
-
var t = Object.keys(i);
|
|
3192
|
-
if (Object.getOwnPropertySymbols) {
|
|
3193
|
-
var n = Object.getOwnPropertySymbols(i);
|
|
3194
|
-
e && (n = n.filter(function(r) {
|
|
3195
|
-
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
3196
|
-
})), t.push.apply(t, n);
|
|
3197
|
-
}
|
|
3198
|
-
return t;
|
|
3199
|
-
}
|
|
3200
|
-
function _e(i) {
|
|
3201
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
3202
|
-
var t = arguments[e] != null ? arguments[e] : {};
|
|
3203
|
-
e % 2 ? jt(Object(t), !0).forEach(function(n) {
|
|
3204
|
-
Kt(i, n, t[n]);
|
|
3205
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : jt(Object(t)).forEach(function(n) {
|
|
3206
|
-
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
|
|
3207
|
-
});
|
|
3208
|
-
}
|
|
3209
|
-
return i;
|
|
3210
|
-
}
|
|
3211
|
-
function Sr(i, e) {
|
|
3212
|
-
if (!(i instanceof e))
|
|
3213
|
-
throw new TypeError("Cannot call a class as a function");
|
|
3214
|
-
}
|
|
3215
|
-
function xr(i, e) {
|
|
3216
|
-
for (var t = 0; t < e.length; t++) {
|
|
3217
|
-
var n = e[t];
|
|
3218
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(i, Vt(n.key), n);
|
|
3219
|
-
}
|
|
3220
|
-
}
|
|
3221
|
-
function Pr(i, e, t) {
|
|
3222
|
-
return e && xr(i.prototype, e), Object.defineProperty(i, "prototype", { writable: !1 }), i;
|
|
3223
|
-
}
|
|
3224
|
-
function Kt(i, e, t) {
|
|
3225
|
-
return (e = Vt(e)) in i ? Object.defineProperty(i, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : i[e] = t, i;
|
|
3226
|
-
}
|
|
3227
|
-
function Vt(i) {
|
|
3228
|
-
var e = jr(i, "string");
|
|
3229
|
-
return ae(e) == "symbol" ? e : e + "";
|
|
3230
|
-
}
|
|
3231
|
-
function jr(i, e) {
|
|
3232
|
-
if (ae(i) != "object" || !i)
|
|
3233
|
-
return i;
|
|
3234
|
-
var t = i[Symbol.toPrimitive];
|
|
3235
|
-
if (t !== void 0) {
|
|
3236
|
-
var n = t.call(i, e);
|
|
3237
|
-
if (ae(n) != "object")
|
|
3238
|
-
return n;
|
|
3239
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3240
|
-
}
|
|
3241
|
-
return String(i);
|
|
3242
|
-
}
|
|
3243
|
-
var kr = function() {
|
|
3244
|
-
return {
|
|
3245
|
-
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
3246
|
-
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
3247
|
-
parse: function(t) {
|
|
3248
|
-
return JSON.parse(t);
|
|
3249
|
-
},
|
|
3250
|
-
stringify: JSON.stringify,
|
|
3251
|
-
parsePayload: function(t, n, r) {
|
|
3252
|
-
return Kt({}, n, r || "");
|
|
3253
|
-
},
|
|
3254
|
-
parseLoadPayload: function(t, n) {
|
|
3255
|
-
},
|
|
3256
|
-
request: Or,
|
|
3257
|
-
reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3,
|
|
3258
|
-
customHeaders: {},
|
|
3259
|
-
queryStringParams: {},
|
|
3260
|
-
crossDomain: !1,
|
|
3261
|
-
withCredentials: !1,
|
|
3262
|
-
overrideMimeType: !1,
|
|
3263
|
-
requestOptions: {
|
|
3264
|
-
mode: "cors",
|
|
3265
|
-
credentials: "same-origin",
|
|
3266
|
-
cache: "default"
|
|
3267
|
-
}
|
|
3268
|
-
};
|
|
3269
|
-
}, zt = function() {
|
|
3270
|
-
function i(e) {
|
|
3271
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3272
|
-
Sr(this, i), this.services = e, this.options = t, this.allOptions = n, this.type = "backend", this.init(e, t, n);
|
|
3273
|
-
}
|
|
3274
|
-
return Pr(i, [{
|
|
3275
|
-
key: "init",
|
|
3276
|
-
value: function(t) {
|
|
3277
|
-
var n = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3278
|
-
if (this.services = t, this.options = _e(_e(_e({}, kr()), this.options || {}), r), this.allOptions = a, this.services && this.options.reloadInterval) {
|
|
3279
|
-
var o = setInterval(function() {
|
|
3280
|
-
return n.reload();
|
|
3281
|
-
}, this.options.reloadInterval);
|
|
3282
|
-
ae(o) === "object" && typeof o.unref == "function" && o.unref();
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
}, {
|
|
3286
|
-
key: "readMulti",
|
|
3287
|
-
value: function(t, n, r) {
|
|
3288
|
-
this._readAny(t, t, n, n, r);
|
|
3289
|
-
}
|
|
3290
|
-
}, {
|
|
3291
|
-
key: "read",
|
|
3292
|
-
value: function(t, n, r) {
|
|
3293
|
-
this._readAny([t], t, [n], n, r);
|
|
3294
|
-
}
|
|
3295
|
-
}, {
|
|
3296
|
-
key: "_readAny",
|
|
3297
|
-
value: function(t, n, r, a, o) {
|
|
3298
|
-
var s = this, u = this.options.loadPath;
|
|
3299
|
-
typeof this.options.loadPath == "function" && (u = this.options.loadPath(t, r)), u = pr(u), u.then(function(d) {
|
|
3300
|
-
if (!d)
|
|
3301
|
-
return o(null, {});
|
|
3302
|
-
var c = s.services.interpolator.interpolate(d, {
|
|
3303
|
-
lng: t.join("+"),
|
|
3304
|
-
ns: r.join("+")
|
|
3305
|
-
});
|
|
3306
|
-
s.loadUrl(c, o, n, a);
|
|
3307
|
-
});
|
|
3308
|
-
}
|
|
3309
|
-
}, {
|
|
3310
|
-
key: "loadUrl",
|
|
3311
|
-
value: function(t, n, r, a) {
|
|
3312
|
-
var o = this, s = typeof r == "string" ? [r] : r, u = typeof a == "string" ? [a] : a, d = this.options.parseLoadPayload(s, u);
|
|
3313
|
-
this.options.request(this.options, t, d, function(c, f) {
|
|
3314
|
-
if (f && (f.status >= 500 && f.status < 600 || !f.status))
|
|
3315
|
-
return n("failed loading " + t + "; status code: " + f.status, !0);
|
|
3316
|
-
if (f && f.status >= 400 && f.status < 500)
|
|
3317
|
-
return n("failed loading " + t + "; status code: " + f.status, !1);
|
|
3318
|
-
if (!f && c && c.message) {
|
|
3319
|
-
var p = c.message.toLowerCase(), g = ["failed", "fetch", "network", "load"].find(function(w) {
|
|
3320
|
-
return p.indexOf(w) > -1;
|
|
3321
|
-
});
|
|
3322
|
-
if (g)
|
|
3323
|
-
return n("failed loading " + t + ": " + c.message, !0);
|
|
3324
|
-
}
|
|
3325
|
-
if (c)
|
|
3326
|
-
return n(c, !1);
|
|
3327
|
-
var b, y;
|
|
3328
|
-
try {
|
|
3329
|
-
typeof f.data == "string" ? b = o.options.parse(f.data, r, a) : b = f.data;
|
|
3330
|
-
} catch {
|
|
3331
|
-
y = "failed parsing " + t + " to json";
|
|
3332
|
-
}
|
|
3333
|
-
if (y)
|
|
3334
|
-
return n(y, !1);
|
|
3335
|
-
n(null, b);
|
|
3336
|
-
});
|
|
3337
|
-
}
|
|
3338
|
-
}, {
|
|
3339
|
-
key: "create",
|
|
3340
|
-
value: function(t, n, r, a, o) {
|
|
3341
|
-
var s = this;
|
|
3342
|
-
if (this.options.addPath) {
|
|
3343
|
-
typeof t == "string" && (t = [t]);
|
|
3344
|
-
var u = this.options.parsePayload(n, r, a), d = 0, c = [], f = [];
|
|
3345
|
-
t.forEach(function(p) {
|
|
3346
|
-
var g = s.options.addPath;
|
|
3347
|
-
typeof s.options.addPath == "function" && (g = s.options.addPath(p, n));
|
|
3348
|
-
var b = s.services.interpolator.interpolate(g, {
|
|
3349
|
-
lng: p,
|
|
3350
|
-
ns: n
|
|
3351
|
-
});
|
|
3352
|
-
s.options.request(s.options, b, u, function(y, w) {
|
|
3353
|
-
d += 1, c.push(y), f.push(w), d === t.length && typeof o == "function" && o(c, f);
|
|
3354
|
-
});
|
|
3355
|
-
});
|
|
3356
|
-
}
|
|
3357
|
-
}
|
|
3358
|
-
}, {
|
|
3359
|
-
key: "reload",
|
|
3360
|
-
value: function() {
|
|
3361
|
-
var t = this, n = this.services, r = n.backendConnector, a = n.languageUtils, o = n.logger, s = r.language;
|
|
3362
|
-
if (!(s && s.toLowerCase() === "cimode")) {
|
|
3363
|
-
var u = [], d = function(f) {
|
|
3364
|
-
var p = a.toResolveHierarchy(f);
|
|
3365
|
-
p.forEach(function(g) {
|
|
3366
|
-
u.indexOf(g) < 0 && u.push(g);
|
|
3367
|
-
});
|
|
3368
|
-
};
|
|
3369
|
-
d(s), this.allOptions.preload && this.allOptions.preload.forEach(function(c) {
|
|
3370
|
-
return d(c);
|
|
3371
|
-
}), u.forEach(function(c) {
|
|
3372
|
-
t.allOptions.ns.forEach(function(f) {
|
|
3373
|
-
r.read(c, f, "read", null, null, function(p, g) {
|
|
3374
|
-
p && o.warn("loading namespace ".concat(f, " for language ").concat(c, " failed"), p), !p && g && o.log("loaded namespace ".concat(f, " for language ").concat(c), g), r.loaded("".concat(c, "|").concat(f), p, g);
|
|
3375
|
-
});
|
|
3376
|
-
});
|
|
3377
|
-
});
|
|
3378
|
-
}
|
|
3379
|
-
}
|
|
3380
|
-
}]);
|
|
3381
|
-
}();
|
|
3382
|
-
zt.type = "backend";
|
|
3383
|
-
var Lr = /* @__PURE__ */ ((i) => (i.en = "en", i.de = "de", i))(Lr || {});
|
|
3384
|
-
N.use(Dt).use(Ht).use(er).init({
|
|
3385
|
-
initImmediate: !0,
|
|
3386
|
-
supportedLngs: [
|
|
3387
|
-
"en",
|
|
3388
|
-
"de"
|
|
3389
|
-
/* de */
|
|
3390
|
-
],
|
|
3391
|
-
fallbackLng: "en",
|
|
3392
|
-
nonExplicitSupportedLngs: !0,
|
|
3393
|
-
load: "languageOnly",
|
|
3394
|
-
ns: ["translation"],
|
|
3395
|
-
fallbackNS: "translation",
|
|
3396
|
-
partialBundledLanguages: !0,
|
|
3397
|
-
resources: {},
|
|
3398
|
-
interpolation: { escapeValue: !1 },
|
|
3399
|
-
detection: {
|
|
3400
|
-
order: ["querystring", "localStorage", "navigator"],
|
|
3401
|
-
caches: ["localStorage"],
|
|
3402
|
-
convertDetectedLanguage: (i) => i == null ? void 0 : i.split("-")[0]
|
|
3403
|
-
},
|
|
3404
|
-
backend: {
|
|
3405
|
-
backends: [zt],
|
|
3406
|
-
backendOptions: [
|
|
3407
|
-
{
|
|
3408
|
-
loadPath: (i) => {
|
|
3409
|
-
var r, a, o;
|
|
3410
|
-
const t = (Array.isArray(i) ? i[0] : i || "en").split("-")[0];
|
|
3411
|
-
return `${((r = window == null ? void 0 : window.env) == null ? void 0 : r.TRANSLATION_URL) ?? ((a = window == null ? void 0 : window.env) == null ? void 0 : a.VITE_BASE_URL) ?? ((o = window == null ? void 0 : window.env) == null ? void 0 : o.REACT_APP_BASE_URL) ?? `${location.protocol}//${location.host}`}/translations/${t}`;
|
|
3412
|
-
},
|
|
3413
|
-
crossDomain: !0,
|
|
3414
|
-
cacheHitMode: "refresh"
|
|
3415
|
-
}
|
|
3416
|
-
]
|
|
3417
|
-
}
|
|
3418
|
-
});
|
|
3419
|
-
const me = {
|
|
3420
|
-
"page-container": "_page-container_1pwo1_1",
|
|
3421
|
-
"page-main-content": "_page-main-content_1pwo1_8",
|
|
3422
|
-
"page-title": "_page-title_1pwo1_19",
|
|
3423
|
-
"text-base": "_text-base_1pwo1_26",
|
|
3424
|
-
"mt-4": "_mt-4_1pwo1_33"
|
|
3425
|
-
}, Rr = () => {
|
|
3426
|
-
const { t: i } = ar();
|
|
3427
|
-
return /* @__PURE__ */ E.jsx("div", { className: "unauth__container " + me["page-container"], children: /* @__PURE__ */ E.jsxs("div", { className: "unauth__main-content " + me["page-main-content"], children: [
|
|
3428
|
-
/* @__PURE__ */ E.jsx(Er, {}),
|
|
3429
|
-
/* @__PURE__ */ E.jsxs("div", { className: "unauth__main-text", children: [
|
|
3430
|
-
/* @__PURE__ */ E.jsx("h2", { className: "unauth__main-text__title " + me["page-title"], children: i("components.unauthorizedPage.title") }),
|
|
3431
|
-
/* @__PURE__ */ E.jsxs("p", { className: "unauth__main-text__desc " + me["text-base"], children: [
|
|
3432
|
-
i("components.unauthorizedPage.description1"),
|
|
3433
|
-
" ",
|
|
3434
|
-
/* @__PURE__ */ E.jsx("br", {}),
|
|
3435
|
-
" ",
|
|
3436
|
-
i("components.unauthorizedPage.description2")
|
|
3437
|
-
] })
|
|
3438
|
-
] })
|
|
3439
|
-
] }) });
|
|
3440
|
-
}, Er = () => /* @__PURE__ */ E.jsxs(
|
|
3441
|
-
"svg",
|
|
3442
|
-
{
|
|
3443
|
-
width: "61",
|
|
3444
|
-
height: "60",
|
|
3445
|
-
viewBox: "0 0 61 60",
|
|
3446
|
-
fill: "none",
|
|
3447
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3448
|
-
children: [
|
|
3449
|
-
/* @__PURE__ */ E.jsxs("g", { filter: "url(#filter0_d_10800_50471)", children: [
|
|
3450
|
-
/* @__PURE__ */ E.jsx("rect", { x: "2.5", y: "1", width: "56", height: "56", rx: "28", fill: "white" }),
|
|
3451
|
-
/* @__PURE__ */ E.jsx(
|
|
3452
|
-
"path",
|
|
3453
|
-
{
|
|
3454
|
-
d: "M24.6667 27.833V23.1663C24.6667 21.6192 25.2812 20.1355 26.3752 19.0416C27.4692 17.9476 28.9529 17.333 30.5 17.333C32.0471 17.333 33.5308 17.9476 34.6248 19.0416C35.7188 20.1355 36.3333 21.6192 36.3333 23.1663V27.833M22.3333 27.833H38.6667C39.9553 27.833 41 28.8777 41 30.1663V38.333C41 39.6217 39.9553 40.6663 38.6667 40.6663H22.3333C21.0447 40.6663 20 39.6217 20 38.333V30.1663C20 28.8777 21.0447 27.833 22.3333 27.833Z",
|
|
3455
|
-
stroke: "#292929",
|
|
3456
|
-
"stroke-width": "2.33333",
|
|
3457
|
-
"stroke-linecap": "round",
|
|
3458
|
-
"stroke-linejoin": "round"
|
|
3459
|
-
}
|
|
3460
|
-
)
|
|
3461
|
-
] }),
|
|
3462
|
-
/* @__PURE__ */ E.jsx("defs", { children: /* @__PURE__ */ E.jsxs(
|
|
3463
|
-
"filter",
|
|
3464
|
-
{
|
|
3465
|
-
id: "filter0_d_10800_50471",
|
|
3466
|
-
x: "0.5",
|
|
3467
|
-
y: "0",
|
|
3468
|
-
width: "60",
|
|
3469
|
-
height: "60",
|
|
3470
|
-
filterUnits: "userSpaceOnUse",
|
|
3471
|
-
"color-interpolation-filters": "sRGB",
|
|
3472
|
-
children: [
|
|
3473
|
-
/* @__PURE__ */ E.jsx("feFlood", { "flood-opacity": "0", result: "BackgroundImageFix" }),
|
|
3474
|
-
/* @__PURE__ */ E.jsx(
|
|
3475
|
-
"feColorMatrix",
|
|
3476
|
-
{
|
|
3477
|
-
in: "SourceAlpha",
|
|
3478
|
-
type: "matrix",
|
|
3479
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
3480
|
-
result: "hardAlpha"
|
|
3481
|
-
}
|
|
3482
|
-
),
|
|
3483
|
-
/* @__PURE__ */ E.jsx("feOffset", { dy: "1" }),
|
|
3484
|
-
/* @__PURE__ */ E.jsx("feGaussianBlur", { stdDeviation: "1" }),
|
|
3485
|
-
/* @__PURE__ */ E.jsx(
|
|
3486
|
-
"feColorMatrix",
|
|
3487
|
-
{
|
|
3488
|
-
type: "matrix",
|
|
3489
|
-
values: "0 0 0 0 0.0627451 0 0 0 0 0.0941176 0 0 0 0 0.156863 0 0 0 0.05 0"
|
|
3490
|
-
}
|
|
3491
|
-
),
|
|
3492
|
-
/* @__PURE__ */ E.jsx(
|
|
3493
|
-
"feBlend",
|
|
3494
|
-
{
|
|
3495
|
-
mode: "normal",
|
|
3496
|
-
in2: "BackgroundImageFix",
|
|
3497
|
-
result: "effect1_dropShadow_10800_50471"
|
|
3498
|
-
}
|
|
3499
|
-
),
|
|
3500
|
-
/* @__PURE__ */ E.jsx(
|
|
3501
|
-
"feBlend",
|
|
3502
|
-
{
|
|
3503
|
-
mode: "normal",
|
|
3504
|
-
in: "SourceGraphic",
|
|
3505
|
-
in2: "effect1_dropShadow_10800_50471",
|
|
3506
|
-
result: "shape"
|
|
3507
|
-
}
|
|
3508
|
-
)
|
|
3509
|
-
]
|
|
3510
|
-
}
|
|
3511
|
-
) })
|
|
3512
|
-
]
|
|
3513
|
-
}
|
|
3514
|
-
);
|
|
3515
|
-
function Cr() {
|
|
3516
|
-
return /* @__PURE__ */ E.jsx(or, { i18n: N, children: /* @__PURE__ */ E.jsx(Rr, {}) });
|
|
3517
|
-
}
|
|
3518
|
-
{
|
|
3519
|
-
const i = Xt(Cr);
|
|
3520
|
-
customElements.define("access-denied", i);
|
|
3521
|
-
}
|
|
3522
|
-
export {
|
|
3523
|
-
or as I,
|
|
3524
|
-
Lr as L,
|
|
3525
|
-
Rr as U,
|
|
3526
|
-
N as i,
|
|
3527
|
-
Ar as t
|
|
3528
|
-
};
|