@invoice-sdk/widget 1.55.0 → 1.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-AegfD2ct.js → index-DTZLb8ps.js} +1019 -856
- package/dist/index.esm.js +3 -3
- package/dist/index.umd.js +34 -34
- package/dist/{widget-D-y7_RyC.js → widget-DyAsWpcA.js} +1280 -1280
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var dt = Object.defineProperty, ht = Object.defineProperties;
|
|
2
|
+
var ft = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var xe = Object.getOwnPropertySymbols;
|
|
4
|
+
var gt = Object.prototype.hasOwnProperty, pt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ke = (o, e, t) => e in o ? dt(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, p = (o, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
7
|
+
gt.call(e, t) && ke(o, t, e[t]);
|
|
8
|
+
if (xe)
|
|
9
|
+
for (var t of xe(e))
|
|
10
|
+
pt.call(e, t) && ke(o, t, e[t]);
|
|
11
11
|
return o;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, x = (o, e) => ht(o, ft(e));
|
|
13
|
+
var re = (o, e, t) => new Promise((n, i) => {
|
|
14
14
|
var s = (c) => {
|
|
15
15
|
try {
|
|
16
16
|
a(t.next(c));
|
|
@@ -32,57 +32,57 @@ const m = (o) => typeof o == "string", z = () => {
|
|
|
32
32
|
o = n, e = i;
|
|
33
33
|
});
|
|
34
34
|
return t.resolve = o, t.reject = e, t;
|
|
35
|
-
},
|
|
35
|
+
}, Pe = (o) => o == null ? "" : "" + o, mt = (o, e, t) => {
|
|
36
36
|
o.forEach((n) => {
|
|
37
37
|
e[n] && (t[n] = e[n]);
|
|
38
38
|
});
|
|
39
|
-
},
|
|
39
|
+
}, yt = /###/g, we = (o) => o && o.indexOf("###") > -1 ? o.replace(yt, ".") : o, Ce = (o) => !o || m(o), G = (o, e, t) => {
|
|
40
40
|
const n = m(e) ? e.split(".") : e;
|
|
41
41
|
let i = 0;
|
|
42
42
|
for (; i < n.length - 1; ) {
|
|
43
|
-
if (
|
|
43
|
+
if (Ce(o)) return {};
|
|
44
44
|
const s = we(n[i]);
|
|
45
45
|
!o[s] && t && (o[s] = new t()), Object.prototype.hasOwnProperty.call(o, s) ? o = o[s] : o = {}, ++i;
|
|
46
46
|
}
|
|
47
|
-
return
|
|
47
|
+
return Ce(o) ? {} : {
|
|
48
48
|
obj: o,
|
|
49
49
|
k: we(n[i])
|
|
50
50
|
};
|
|
51
|
-
},
|
|
51
|
+
}, Te = (o, e, t) => {
|
|
52
52
|
const {
|
|
53
53
|
obj: n,
|
|
54
54
|
k: i
|
|
55
|
-
} =
|
|
55
|
+
} = G(o, e, Object);
|
|
56
56
|
if (n !== void 0 || e.length === 1) {
|
|
57
57
|
n[i] = t;
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
|
-
let s = e[e.length - 1], r = e.slice(0, e.length - 1), a =
|
|
60
|
+
let s = e[e.length - 1], r = e.slice(0, e.length - 1), a = G(o, r, Object);
|
|
61
61
|
for (; a.obj === void 0 && r.length; )
|
|
62
|
-
s = `${r[r.length - 1]}.${s}`, r = r.slice(0, r.length - 1), a =
|
|
62
|
+
s = `${r[r.length - 1]}.${s}`, r = r.slice(0, r.length - 1), a = G(o, r, Object), a != null && a.obj && typeof a.obj[`${a.k}.${s}`] != "undefined" && (a.obj = void 0);
|
|
63
63
|
a.obj[`${a.k}.${s}`] = t;
|
|
64
|
-
},
|
|
64
|
+
}, vt = (o, e, t, n) => {
|
|
65
65
|
const {
|
|
66
66
|
obj: i,
|
|
67
67
|
k: s
|
|
68
|
-
} =
|
|
68
|
+
} = G(o, e, Object);
|
|
69
69
|
i[s] = i[s] || [], i[s].push(t);
|
|
70
|
-
},
|
|
70
|
+
}, te = (o, e) => {
|
|
71
71
|
const {
|
|
72
72
|
obj: t,
|
|
73
73
|
k: n
|
|
74
|
-
} =
|
|
74
|
+
} = G(o, e);
|
|
75
75
|
if (t && Object.prototype.hasOwnProperty.call(t, n))
|
|
76
76
|
return t[n];
|
|
77
|
-
},
|
|
78
|
-
const n =
|
|
79
|
-
return n !== void 0 ? n :
|
|
80
|
-
},
|
|
77
|
+
}, bt = (o, e, t) => {
|
|
78
|
+
const n = te(o, t);
|
|
79
|
+
return n !== void 0 ? n : te(e, t);
|
|
80
|
+
}, Xe = (o, e, t) => {
|
|
81
81
|
for (const n in e)
|
|
82
|
-
n !== "__proto__" && n !== "constructor" && (n in o ? m(o[n]) || o[n] instanceof String || m(e[n]) || e[n] instanceof String ? t && (o[n] = e[n]) :
|
|
82
|
+
n !== "__proto__" && n !== "constructor" && (n in o ? m(o[n]) || o[n] instanceof String || m(e[n]) || e[n] instanceof String ? t && (o[n] = e[n]) : Xe(o[n], e[n], t) : o[n] = e[n]);
|
|
83
83
|
return o;
|
|
84
84
|
}, j = (o) => o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
85
|
-
var
|
|
85
|
+
var St = {
|
|
86
86
|
"&": "&",
|
|
87
87
|
"<": "<",
|
|
88
88
|
">": ">",
|
|
@@ -90,8 +90,8 @@ var dt = {
|
|
|
90
90
|
"'": "'",
|
|
91
91
|
"/": "/"
|
|
92
92
|
};
|
|
93
|
-
const
|
|
94
|
-
class
|
|
93
|
+
const $t = (o) => m(o) ? o.replace(/[&<>"'\/]/g, (e) => St[e]) : o;
|
|
94
|
+
class xt {
|
|
95
95
|
constructor(e) {
|
|
96
96
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
97
97
|
}
|
|
@@ -103,18 +103,18 @@ class pt {
|
|
|
103
103
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
const
|
|
106
|
+
const kt = [" ", ",", "?", "!", ";"], Pt = new xt(20), wt = (o, e, t) => {
|
|
107
107
|
e = e || "", t = t || "";
|
|
108
|
-
const n =
|
|
108
|
+
const n = kt.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
|
|
109
109
|
if (n.length === 0) return !0;
|
|
110
|
-
const i =
|
|
110
|
+
const i = Pt.getRegExp(`(${n.map((r) => r === "?" ? "\\?" : r).join("|")})`);
|
|
111
111
|
let s = !i.test(o);
|
|
112
112
|
if (!s) {
|
|
113
113
|
const r = o.indexOf(t);
|
|
114
114
|
r > 0 && !i.test(o.substring(0, r)) && (s = !0);
|
|
115
115
|
}
|
|
116
116
|
return s;
|
|
117
|
-
},
|
|
117
|
+
}, fe = (o, e, t = ".") => {
|
|
118
118
|
if (!o) return;
|
|
119
119
|
if (o[e])
|
|
120
120
|
return Object.prototype.hasOwnProperty.call(o, e) ? o[e] : void 0;
|
|
@@ -134,7 +134,7 @@ const gt = [" ", ",", "?", "!", ";"], mt = new pt(20), vt = (o, e, t) => {
|
|
|
134
134
|
i = r;
|
|
135
135
|
}
|
|
136
136
|
return i;
|
|
137
|
-
},
|
|
137
|
+
}, W = (o) => o == null ? void 0 : o.replace("_", "-"), Ct = {
|
|
138
138
|
type: "logger",
|
|
139
139
|
log(o) {
|
|
140
140
|
this.output("log", o);
|
|
@@ -150,12 +150,12 @@ const gt = [" ", ",", "?", "!", ";"], mt = new pt(20), vt = (o, e, t) => {
|
|
|
150
150
|
(n = (t = console == null ? void 0 : console[o]) == null ? void 0 : t.apply) == null || n.call(t, console, e);
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
|
-
class
|
|
153
|
+
class ne {
|
|
154
154
|
constructor(e, t = {}) {
|
|
155
155
|
this.init(e, t);
|
|
156
156
|
}
|
|
157
157
|
init(e, t = {}) {
|
|
158
|
-
this.prefix = t.prefix || "i18next:", this.logger = e ||
|
|
158
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || Ct, this.options = t, this.debug = t.debug;
|
|
159
159
|
}
|
|
160
160
|
log(...e) {
|
|
161
161
|
return this.forward(e, "log", "", !0);
|
|
@@ -173,16 +173,16 @@ class te {
|
|
|
173
173
|
return i && !this.debug ? null : (m(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
174
174
|
}
|
|
175
175
|
create(e) {
|
|
176
|
-
return new
|
|
176
|
+
return new ne(this.logger, p({
|
|
177
177
|
prefix: `${this.prefix}:${e}:`
|
|
178
178
|
}, this.options));
|
|
179
179
|
}
|
|
180
180
|
clone(e) {
|
|
181
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
181
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new ne(this.logger, e);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
var I = new
|
|
185
|
-
class
|
|
184
|
+
var I = new ne();
|
|
185
|
+
class se {
|
|
186
186
|
constructor() {
|
|
187
187
|
this.observers = {};
|
|
188
188
|
}
|
|
@@ -212,7 +212,7 @@ class oe {
|
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
class
|
|
215
|
+
class Oe extends se {
|
|
216
216
|
constructor(e, t = {
|
|
217
217
|
ns: ["translation"],
|
|
218
218
|
defaultNS: "translation"
|
|
@@ -227,19 +227,19 @@ class Pe extends oe {
|
|
|
227
227
|
t > -1 && this.options.ns.splice(t, 1);
|
|
228
228
|
}
|
|
229
229
|
getResource(e, t, n, i = {}) {
|
|
230
|
-
var l,
|
|
230
|
+
var l, d;
|
|
231
231
|
const s = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, r = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
232
232
|
let a;
|
|
233
233
|
e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], n && (Array.isArray(n) ? a.push(...n) : m(n) && s ? a.push(...n.split(s)) : a.push(n)));
|
|
234
|
-
const c =
|
|
235
|
-
return !c && !t && !n && e.indexOf(".") > -1 && (e = a[0], t = a[1], n = a.slice(2).join(".")), c || !r || !m(n) ? c :
|
|
234
|
+
const c = te(this.data, a);
|
|
235
|
+
return !c && !t && !n && e.indexOf(".") > -1 && (e = a[0], t = a[1], n = a.slice(2).join(".")), c || !r || !m(n) ? c : fe((d = (l = this.data) == null ? void 0 : l[e]) == null ? void 0 : d[t], n, s);
|
|
236
236
|
}
|
|
237
237
|
addResource(e, t, n, i, s = {
|
|
238
238
|
silent: !1
|
|
239
239
|
}) {
|
|
240
240
|
const r = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
|
|
241
241
|
let a = [e, t];
|
|
242
|
-
n && (a = a.concat(r ? n.split(r) : n)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t),
|
|
242
|
+
n && (a = a.concat(r ? n.split(r) : n)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), Te(this.data, a, i), s.silent || this.emit("added", e, t, n, i);
|
|
243
243
|
}
|
|
244
244
|
addResources(e, t, n, i = {
|
|
245
245
|
silent: !1
|
|
@@ -256,8 +256,8 @@ class Pe extends oe {
|
|
|
256
256
|
}) {
|
|
257
257
|
let a = [e, t];
|
|
258
258
|
e.indexOf(".") > -1 && (a = e.split("."), i = n, n = t, t = a[1]), this.addNamespaces(t);
|
|
259
|
-
let c =
|
|
260
|
-
r.skipCopy || (n = JSON.parse(JSON.stringify(n))), i ?
|
|
259
|
+
let c = te(this.data, a) || {};
|
|
260
|
+
r.skipCopy || (n = JSON.parse(JSON.stringify(n))), i ? Xe(c, n, s) : c = p(p({}, c), n), Te(this.data, a, c), r.silent || this.emit("added", e, t, n);
|
|
261
261
|
}
|
|
262
262
|
removeResourceBundle(e, t) {
|
|
263
263
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -279,7 +279,7 @@ class Pe extends oe {
|
|
|
279
279
|
return this.data;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
var
|
|
282
|
+
var Je = {
|
|
283
283
|
processors: {},
|
|
284
284
|
addPostProcessor(o) {
|
|
285
285
|
this.processors[o.name] = o;
|
|
@@ -291,10 +291,10 @@ var ze = {
|
|
|
291
291
|
}), e;
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
const
|
|
295
|
-
class
|
|
294
|
+
const Le = {}, Ie = (o) => !m(o) && typeof o != "boolean" && typeof o != "number";
|
|
295
|
+
class ie extends se {
|
|
296
296
|
constructor(e, t = {}) {
|
|
297
|
-
super(),
|
|
297
|
+
super(), mt(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = I.create("translator");
|
|
298
298
|
}
|
|
299
299
|
changeLanguage(e) {
|
|
300
300
|
e && (this.language = e);
|
|
@@ -302,7 +302,7 @@ class ne extends oe {
|
|
|
302
302
|
exists(e, t = {
|
|
303
303
|
interpolation: {}
|
|
304
304
|
}) {
|
|
305
|
-
const n =
|
|
305
|
+
const n = p({}, t);
|
|
306
306
|
if (e == null) return !1;
|
|
307
307
|
const i = this.resolve(e, n);
|
|
308
308
|
return (i == null ? void 0 : i.res) !== void 0;
|
|
@@ -312,7 +312,7 @@ class ne extends oe {
|
|
|
312
312
|
n === void 0 && (n = ":");
|
|
313
313
|
const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
314
314
|
let s = t.ns || this.options.defaultNS || [];
|
|
315
|
-
const r = n && e.indexOf(n) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !
|
|
315
|
+
const r = n && e.indexOf(n) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !wt(e, n, i);
|
|
316
316
|
if (r && !a) {
|
|
317
317
|
const c = e.match(this.interpolator.nestingRegexp);
|
|
318
318
|
if (c && c.length > 0)
|
|
@@ -329,25 +329,25 @@ class ne extends oe {
|
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
331
|
translate(e, t, n) {
|
|
332
|
-
let i = typeof t == "object" ?
|
|
333
|
-
if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof options == "object" && (i =
|
|
332
|
+
let i = typeof t == "object" ? p({}, t) : t;
|
|
333
|
+
if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof options == "object" && (i = p({}, i)), i || (i = {}), e == null) return "";
|
|
334
334
|
Array.isArray(e) || (e = [String(e)]);
|
|
335
335
|
const s = i.returnDetails !== void 0 ? i.returnDetails : this.options.returnDetails, r = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, {
|
|
336
336
|
key: a,
|
|
337
337
|
namespaces: c
|
|
338
338
|
} = this.extractFromKey(e[e.length - 1], i), l = c[c.length - 1];
|
|
339
|
-
let
|
|
340
|
-
|
|
341
|
-
const u = i.lng || this.language,
|
|
339
|
+
let d = i.nsSeparator !== void 0 ? i.nsSeparator : this.options.nsSeparator;
|
|
340
|
+
d === void 0 && (d = ":");
|
|
341
|
+
const u = i.lng || this.language, g = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
342
342
|
if ((u == null ? void 0 : u.toLowerCase()) === "cimode")
|
|
343
|
-
return
|
|
344
|
-
res: `${l}${
|
|
343
|
+
return g ? s ? {
|
|
344
|
+
res: `${l}${d}${a}`,
|
|
345
345
|
usedKey: a,
|
|
346
346
|
exactUsedKey: a,
|
|
347
347
|
usedLng: u,
|
|
348
348
|
usedNS: l,
|
|
349
349
|
usedParams: this.getUsedParamsDetails(i)
|
|
350
|
-
} : `${l}${
|
|
350
|
+
} : `${l}${d}${a}` : s ? {
|
|
351
351
|
res: a,
|
|
352
352
|
usedKey: a,
|
|
353
353
|
exactUsedKey: a,
|
|
@@ -356,98 +356,98 @@ class ne extends oe {
|
|
|
356
356
|
usedParams: this.getUsedParamsDetails(i)
|
|
357
357
|
} : a;
|
|
358
358
|
const f = this.resolve(e, i);
|
|
359
|
-
let
|
|
360
|
-
const
|
|
359
|
+
let h = f == null ? void 0 : f.res;
|
|
360
|
+
const y = (f == null ? void 0 : f.usedKey) || a, v = (f == null ? void 0 : f.exactUsedKey) || a, C = ["[object Number]", "[object Function]", "[object RegExp]"], w = i.joinArrays !== void 0 ? i.joinArrays : this.options.joinArrays, F = !this.i18nFormat || this.i18nFormat.handleAsObject, $ = i.count !== void 0 && !m(i.count), N = ie.hasDefaultValue(i), J = $ ? this.pluralResolver.getSuffix(u, i.count, i) : "", R = i.ordinal && $ ? this.pluralResolver.getSuffix(u, i.count, {
|
|
361
361
|
ordinal: !1
|
|
362
|
-
}) : "", B =
|
|
363
|
-
let S =
|
|
364
|
-
F && !
|
|
365
|
-
const
|
|
366
|
-
if (F && S &&
|
|
362
|
+
}) : "", B = $ && !i.ordinal && i.count === 0, k = B && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${J}`] || i[`defaultValue${R}`] || i.defaultValue;
|
|
363
|
+
let S = h;
|
|
364
|
+
F && !h && N && (S = k);
|
|
365
|
+
const lt = Ie(S), ut = Object.prototype.toString.apply(S);
|
|
366
|
+
if (F && S && lt && C.indexOf(ut) < 0 && !(m(w) && Array.isArray(S))) {
|
|
367
367
|
if (!i.returnObjects && !this.options.returnObjects) {
|
|
368
368
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
369
|
-
const
|
|
369
|
+
const O = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(y, S, x(p({}, i), {
|
|
370
370
|
ns: c
|
|
371
371
|
})) : `key '${a} (${this.language})' returned an object instead of string.`;
|
|
372
|
-
return s ? (f.res =
|
|
372
|
+
return s ? (f.res = O, f.usedParams = this.getUsedParamsDetails(i), f) : O;
|
|
373
373
|
}
|
|
374
374
|
if (r) {
|
|
375
|
-
const
|
|
376
|
-
for (const
|
|
377
|
-
if (Object.prototype.hasOwnProperty.call(S,
|
|
378
|
-
const A = `${
|
|
379
|
-
N && !
|
|
380
|
-
defaultValue:
|
|
375
|
+
const O = Array.isArray(S), T = O ? [] : {}, ve = O ? v : y;
|
|
376
|
+
for (const L in S)
|
|
377
|
+
if (Object.prototype.hasOwnProperty.call(S, L)) {
|
|
378
|
+
const A = `${ve}${r}${L}`;
|
|
379
|
+
N && !h ? T[L] = this.translate(A, x(p({}, i), {
|
|
380
|
+
defaultValue: Ie(k) ? k[L] : void 0,
|
|
381
381
|
joinArrays: !1,
|
|
382
382
|
ns: c
|
|
383
|
-
})) : T[
|
|
383
|
+
})) : T[L] = this.translate(A, x(p({}, i), {
|
|
384
384
|
joinArrays: !1,
|
|
385
385
|
ns: c
|
|
386
|
-
})), T[
|
|
386
|
+
})), T[L] === A && (T[L] = S[L]);
|
|
387
387
|
}
|
|
388
|
-
|
|
388
|
+
h = T;
|
|
389
389
|
}
|
|
390
|
-
} else if (F && m(
|
|
391
|
-
|
|
390
|
+
} else if (F && m(w) && Array.isArray(h))
|
|
391
|
+
h = h.join(w), h && (h = this.extendTranslation(h, e, i, n));
|
|
392
392
|
else {
|
|
393
|
-
let
|
|
394
|
-
!this.isValidLookup(
|
|
395
|
-
const
|
|
396
|
-
if (T ||
|
|
397
|
-
if (this.logger.log(A ? "updateKey" : "missingKey", u, l, a, A ?
|
|
398
|
-
const
|
|
393
|
+
let O = !1, T = !1;
|
|
394
|
+
!this.isValidLookup(h) && N && (O = !0, h = k), this.isValidLookup(h) || (T = !0, h = a);
|
|
395
|
+
const L = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && T ? void 0 : h, A = N && k !== h && this.options.updateMissing;
|
|
396
|
+
if (T || O || A) {
|
|
397
|
+
if (this.logger.log(A ? "updateKey" : "missingKey", u, l, a, A ? k : h), r) {
|
|
398
|
+
const P = this.resolve(a, x(p({}, i), {
|
|
399
399
|
keySeparator: !1
|
|
400
400
|
}));
|
|
401
|
-
|
|
401
|
+
P && P.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.");
|
|
402
402
|
}
|
|
403
|
-
let
|
|
404
|
-
const
|
|
405
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
406
|
-
for (let
|
|
407
|
-
|
|
408
|
-
else this.options.saveMissingTo === "all" ?
|
|
409
|
-
const
|
|
410
|
-
var
|
|
411
|
-
const
|
|
412
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(
|
|
403
|
+
let V = [];
|
|
404
|
+
const Y = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
|
|
405
|
+
if (this.options.saveMissingTo === "fallback" && Y && Y[0])
|
|
406
|
+
for (let P = 0; P < Y.length; P++)
|
|
407
|
+
V.push(Y[P]);
|
|
408
|
+
else this.options.saveMissingTo === "all" ? V = this.languageUtils.toResolveHierarchy(i.lng || this.language) : V.push(i.lng || this.language);
|
|
409
|
+
const be = (P, D, q) => {
|
|
410
|
+
var $e;
|
|
411
|
+
const Se = N && q !== h ? q : L;
|
|
412
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(P, l, D, Se, A, i) : ($e = this.backendConnector) != null && $e.saveMissing && this.backendConnector.saveMissing(P, l, D, Se, A, i), this.emit("missingKey", P, l, D, h);
|
|
413
413
|
};
|
|
414
|
-
this.options.saveMissing && (this.options.saveMissingPlurals &&
|
|
415
|
-
const D = this.pluralResolver.getSuffixes(
|
|
416
|
-
B && i[`defaultValue${this.options.pluralSeparator}zero`] && D.indexOf(`${this.options.pluralSeparator}zero`) < 0 && D.push(`${this.options.pluralSeparator}zero`), D.forEach((
|
|
417
|
-
|
|
414
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && $ ? V.forEach((P) => {
|
|
415
|
+
const D = this.pluralResolver.getSuffixes(P, i);
|
|
416
|
+
B && i[`defaultValue${this.options.pluralSeparator}zero`] && D.indexOf(`${this.options.pluralSeparator}zero`) < 0 && D.push(`${this.options.pluralSeparator}zero`), D.forEach((q) => {
|
|
417
|
+
be([P], a + q, i[`defaultValue${q}`] || k);
|
|
418
418
|
});
|
|
419
|
-
}) :
|
|
419
|
+
}) : be(V, a, k));
|
|
420
420
|
}
|
|
421
|
-
|
|
421
|
+
h = this.extendTranslation(h, e, i, f, n), T && h === a && this.options.appendNamespaceToMissingKey && (h = `${l}${d}${a}`), (T || O) && this.options.parseMissingKeyHandler && (h = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${d}${a}` : a, O ? h : void 0, i));
|
|
422
422
|
}
|
|
423
|
-
return s ? (f.res =
|
|
423
|
+
return s ? (f.res = h, f.usedParams = this.getUsedParamsDetails(i), f) : h;
|
|
424
424
|
}
|
|
425
425
|
extendTranslation(e, t, n, i, s) {
|
|
426
426
|
var c, l;
|
|
427
427
|
if ((c = this.i18nFormat) != null && c.parse)
|
|
428
|
-
e = this.i18nFormat.parse(e,
|
|
428
|
+
e = this.i18nFormat.parse(e, p(p({}, this.options.interpolation.defaultVariables), n), n.lng || this.language || i.usedLng, i.usedNS, i.usedKey, {
|
|
429
429
|
resolved: i
|
|
430
430
|
});
|
|
431
431
|
else if (!n.skipInterpolation) {
|
|
432
|
-
n.interpolation && this.interpolator.init(
|
|
433
|
-
interpolation:
|
|
432
|
+
n.interpolation && this.interpolator.init(x(p({}, n), {
|
|
433
|
+
interpolation: p(p({}, this.options.interpolation), n.interpolation)
|
|
434
434
|
}));
|
|
435
|
-
const
|
|
435
|
+
const d = m(e) && (((l = n == null ? void 0 : n.interpolation) == null ? void 0 : l.skipOnVariables) !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
436
436
|
let u;
|
|
437
|
-
if (
|
|
437
|
+
if (d) {
|
|
438
438
|
const f = e.match(this.interpolator.nestingRegexp);
|
|
439
439
|
u = f && f.length;
|
|
440
440
|
}
|
|
441
|
-
let
|
|
442
|
-
if (this.options.interpolation.defaultVariables && (
|
|
443
|
-
const f = e.match(this.interpolator.nestingRegexp),
|
|
444
|
-
u <
|
|
441
|
+
let g = n.replace && !m(n.replace) ? n.replace : n;
|
|
442
|
+
if (this.options.interpolation.defaultVariables && (g = p(p({}, this.options.interpolation.defaultVariables), g)), e = this.interpolator.interpolate(e, g, n.lng || this.language || i.usedLng, n), d) {
|
|
443
|
+
const f = e.match(this.interpolator.nestingRegexp), h = f && f.length;
|
|
444
|
+
u < h && (n.nest = !1);
|
|
445
445
|
}
|
|
446
446
|
!n.lng && i && i.res && (n.lng = this.language || i.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...f) => (s == null ? void 0 : s[0]) === f[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`), null) : this.translate(...f, t), n)), n.interpolation && this.interpolator.reset();
|
|
447
447
|
}
|
|
448
448
|
const r = n.postProcess || this.options.postProcess, a = m(r) ? [r] : r;
|
|
449
|
-
return e != null && (a != null && a.length) && n.applyPostProcessor !== !1 && (e =
|
|
450
|
-
i18nResolved:
|
|
449
|
+
return e != null && (a != null && a.length) && n.applyPostProcessor !== !1 && (e = Je.handle(a, e, t, this.options && this.options.postProcessPassResolved ? p({
|
|
450
|
+
i18nResolved: x(p({}, i), {
|
|
451
451
|
usedParams: this.getUsedParamsDetails(n)
|
|
452
452
|
})
|
|
453
453
|
}, n) : n, this)), e;
|
|
@@ -456,32 +456,32 @@ class ne extends oe {
|
|
|
456
456
|
let n, i, s, r, a;
|
|
457
457
|
return m(e) && (e = [e]), e.forEach((c) => {
|
|
458
458
|
if (this.isValidLookup(n)) return;
|
|
459
|
-
const l = this.extractFromKey(c, t),
|
|
460
|
-
i =
|
|
459
|
+
const l = this.extractFromKey(c, t), d = l.key;
|
|
460
|
+
i = d;
|
|
461
461
|
let u = l.namespaces;
|
|
462
462
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
463
|
-
const
|
|
464
|
-
u.forEach((
|
|
465
|
-
var C,
|
|
466
|
-
this.isValidLookup(n) || (a =
|
|
467
|
-
var
|
|
463
|
+
const g = t.count !== void 0 && !m(t.count), f = g && !t.ordinal && t.count === 0, h = t.context !== void 0 && (m(t.context) || typeof t.context == "number") && t.context !== "", y = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
464
|
+
u.forEach((v) => {
|
|
465
|
+
var C, w;
|
|
466
|
+
this.isValidLookup(n) || (a = v, !Le[`${y[0]}-${v}`] && ((C = this.utils) != null && C.hasLoadedNamespace) && !((w = this.utils) != null && w.hasLoadedNamespace(a)) && (Le[`${y[0]}-${v}`] = !0, this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${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!!!")), y.forEach((F) => {
|
|
467
|
+
var J;
|
|
468
468
|
if (this.isValidLookup(n)) return;
|
|
469
469
|
r = F;
|
|
470
|
-
const
|
|
471
|
-
if ((
|
|
472
|
-
this.i18nFormat.addLookupKeys(
|
|
470
|
+
const $ = [d];
|
|
471
|
+
if ((J = this.i18nFormat) != null && J.addLookupKeys)
|
|
472
|
+
this.i18nFormat.addLookupKeys($, d, F, v, t);
|
|
473
473
|
else {
|
|
474
474
|
let R;
|
|
475
|
-
|
|
476
|
-
const B = `${this.options.pluralSeparator}zero`,
|
|
477
|
-
if (
|
|
478
|
-
const S = `${
|
|
479
|
-
|
|
475
|
+
g && (R = this.pluralResolver.getSuffix(F, t.count, t));
|
|
476
|
+
const B = `${this.options.pluralSeparator}zero`, k = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
477
|
+
if (g && ($.push(d + R), t.ordinal && R.indexOf(k) === 0 && $.push(d + R.replace(k, this.options.pluralSeparator)), f && $.push(d + B)), h) {
|
|
478
|
+
const S = `${d}${this.options.contextSeparator}${t.context}`;
|
|
479
|
+
$.push(S), g && ($.push(S + R), t.ordinal && R.indexOf(k) === 0 && $.push(S + R.replace(k, this.options.pluralSeparator)), f && $.push(S + B));
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
let N;
|
|
483
|
-
for (; N =
|
|
484
|
-
this.isValidLookup(n) || (s = N, n = this.getResource(F,
|
|
483
|
+
for (; N = $.pop(); )
|
|
484
|
+
this.isValidLookup(n) || (s = N, n = this.getResource(F, v, N, t));
|
|
485
485
|
}));
|
|
486
486
|
});
|
|
487
487
|
}), {
|
|
@@ -502,8 +502,8 @@ class ne extends oe {
|
|
|
502
502
|
getUsedParamsDetails(e = {}) {
|
|
503
503
|
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !m(e.replace);
|
|
504
504
|
let i = n ? e.replace : e;
|
|
505
|
-
if (n && typeof e.count != "undefined" && (i.count = e.count), this.options.interpolation.defaultVariables && (i =
|
|
506
|
-
i =
|
|
505
|
+
if (n && typeof e.count != "undefined" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = p(p({}, this.options.interpolation.defaultVariables), i)), !n) {
|
|
506
|
+
i = p({}, i);
|
|
507
507
|
for (const s of t)
|
|
508
508
|
delete i[s];
|
|
509
509
|
}
|
|
@@ -517,17 +517,17 @@ class ne extends oe {
|
|
|
517
517
|
return !1;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
class
|
|
520
|
+
class Ne {
|
|
521
521
|
constructor(e) {
|
|
522
522
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = I.create("languageUtils");
|
|
523
523
|
}
|
|
524
524
|
getScriptPartFromCode(e) {
|
|
525
|
-
if (e =
|
|
525
|
+
if (e = W(e), !e || e.indexOf("-") < 0) return null;
|
|
526
526
|
const t = e.split("-");
|
|
527
527
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
528
528
|
}
|
|
529
529
|
getLanguagePartFromCode(e) {
|
|
530
|
-
if (e =
|
|
530
|
+
if (e = W(e), !e || e.indexOf("-") < 0) return e;
|
|
531
531
|
const t = e.split("-");
|
|
532
532
|
return this.formatLanguageCode(t[0]);
|
|
533
533
|
}
|
|
@@ -581,20 +581,20 @@ class Le {
|
|
|
581
581
|
}), i;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
const
|
|
584
|
+
const Re = {
|
|
585
585
|
zero: 0,
|
|
586
586
|
one: 1,
|
|
587
587
|
two: 2,
|
|
588
588
|
few: 3,
|
|
589
589
|
many: 4,
|
|
590
590
|
other: 5
|
|
591
|
-
},
|
|
591
|
+
}, Ae = {
|
|
592
592
|
select: (o) => o === 1 ? "one" : "other",
|
|
593
593
|
resolvedOptions: () => ({
|
|
594
594
|
pluralCategories: ["one", "other"]
|
|
595
595
|
})
|
|
596
596
|
};
|
|
597
|
-
class
|
|
597
|
+
class Tt {
|
|
598
598
|
constructor(e, t = {}) {
|
|
599
599
|
this.languageUtils = e, this.options = t, this.logger = I.create("pluralResolver"), this.pluralRulesCache = {};
|
|
600
600
|
}
|
|
@@ -605,7 +605,7 @@ class bt {
|
|
|
605
605
|
this.pluralRulesCache = {};
|
|
606
606
|
}
|
|
607
607
|
getRule(e, t = {}) {
|
|
608
|
-
const n =
|
|
608
|
+
const n = W(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({
|
|
609
609
|
cleanedCode: n,
|
|
610
610
|
type: i
|
|
611
611
|
});
|
|
@@ -618,8 +618,8 @@ class bt {
|
|
|
618
618
|
});
|
|
619
619
|
} catch (a) {
|
|
620
620
|
if (!Intl)
|
|
621
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
622
|
-
if (!e.match(/-|_/)) return
|
|
621
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), Ae;
|
|
622
|
+
if (!e.match(/-|_/)) return Ae;
|
|
623
623
|
const c = this.languageUtils.getLanguagePartFromCode(e);
|
|
624
624
|
r = this.getRule(c, t);
|
|
625
625
|
}
|
|
@@ -634,18 +634,18 @@ class bt {
|
|
|
634
634
|
}
|
|
635
635
|
getSuffixes(e, t = {}) {
|
|
636
636
|
let n = this.getRule(e, t);
|
|
637
|
-
return n || (n = this.getRule("dev", t)), n ? n.resolvedOptions().pluralCategories.sort((i, s) =>
|
|
637
|
+
return n || (n = this.getRule("dev", t)), n ? n.resolvedOptions().pluralCategories.sort((i, s) => Re[i] - Re[s]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
|
|
638
638
|
}
|
|
639
639
|
getSuffix(e, t, n = {}) {
|
|
640
640
|
const i = this.getRule(e, n);
|
|
641
641
|
return i ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
const
|
|
645
|
-
let s =
|
|
646
|
-
return !s && i && m(t) && (s =
|
|
647
|
-
},
|
|
648
|
-
class
|
|
644
|
+
const Fe = (o, e, t, n = ".", i = !0) => {
|
|
645
|
+
let s = bt(o, e, t);
|
|
646
|
+
return !s && i && m(t) && (s = fe(o, t, n), s === void 0 && (s = fe(e, t, n))), s;
|
|
647
|
+
}, ae = (o) => o.replace(/\$/g, "$$$$");
|
|
648
|
+
class Ot {
|
|
649
649
|
constructor(e = {}) {
|
|
650
650
|
var t;
|
|
651
651
|
this.logger = I.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((n) => n), this.init(e);
|
|
@@ -663,17 +663,17 @@ class St {
|
|
|
663
663
|
suffix: a,
|
|
664
664
|
suffixEscaped: c,
|
|
665
665
|
formatSeparator: l,
|
|
666
|
-
unescapeSuffix:
|
|
666
|
+
unescapeSuffix: d,
|
|
667
667
|
unescapePrefix: u,
|
|
668
|
-
nestingPrefix:
|
|
668
|
+
nestingPrefix: g,
|
|
669
669
|
nestingPrefixEscaped: f,
|
|
670
|
-
nestingSuffix:
|
|
671
|
-
nestingSuffixEscaped:
|
|
672
|
-
nestingOptionsSeparator:
|
|
670
|
+
nestingSuffix: h,
|
|
671
|
+
nestingSuffixEscaped: y,
|
|
672
|
+
nestingOptionsSeparator: v,
|
|
673
673
|
maxReplaces: C,
|
|
674
|
-
alwaysFormat:
|
|
674
|
+
alwaysFormat: w
|
|
675
675
|
} = e.interpolation;
|
|
676
|
-
this.escape = t !== void 0 ? t :
|
|
676
|
+
this.escape = t !== void 0 ? t : $t, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = s ? j(s) : r || "{{", this.suffix = a ? j(a) : c || "}}", this.formatSeparator = l || ",", this.unescapePrefix = d ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = g ? j(g) : f || j("$t("), this.nestingSuffix = h ? j(h) : y || j(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = C || 1e3, this.alwaysFormat = w !== void 0 ? w : !1, this.resetRegExp();
|
|
677
677
|
}
|
|
678
678
|
reset() {
|
|
679
679
|
this.options && this.init(this.options);
|
|
@@ -685,43 +685,43 @@ class St {
|
|
|
685
685
|
interpolate(e, t, n, i) {
|
|
686
686
|
var f;
|
|
687
687
|
let s, r, a;
|
|
688
|
-
const c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (
|
|
689
|
-
if (
|
|
690
|
-
const
|
|
691
|
-
return this.alwaysFormat ? this.format(
|
|
692
|
-
interpolationkey:
|
|
693
|
-
})) :
|
|
688
|
+
const c = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (h) => {
|
|
689
|
+
if (h.indexOf(this.formatSeparator) < 0) {
|
|
690
|
+
const w = Fe(t, c, h, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
691
|
+
return this.alwaysFormat ? this.format(w, void 0, n, x(p(p({}, i), t), {
|
|
692
|
+
interpolationkey: h
|
|
693
|
+
})) : w;
|
|
694
694
|
}
|
|
695
|
-
const
|
|
696
|
-
return this.format(
|
|
697
|
-
interpolationkey:
|
|
695
|
+
const y = h.split(this.formatSeparator), v = y.shift().trim(), C = y.join(this.formatSeparator).trim();
|
|
696
|
+
return this.format(Fe(t, c, v, this.options.keySeparator, this.options.ignoreJSONStructure), C, n, x(p(p({}, i), t), {
|
|
697
|
+
interpolationkey: v
|
|
698
698
|
}));
|
|
699
699
|
};
|
|
700
700
|
this.resetRegExp();
|
|
701
|
-
const
|
|
701
|
+
const d = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, u = ((f = i == null ? void 0 : i.interpolation) == null ? void 0 : f.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
702
702
|
return [{
|
|
703
703
|
regex: this.regexpUnescape,
|
|
704
|
-
safeValue: (
|
|
704
|
+
safeValue: (h) => ae(h)
|
|
705
705
|
}, {
|
|
706
706
|
regex: this.regexp,
|
|
707
|
-
safeValue: (
|
|
708
|
-
}].forEach((
|
|
709
|
-
for (a = 0; s =
|
|
710
|
-
const
|
|
711
|
-
if (r = l(
|
|
712
|
-
if (typeof
|
|
713
|
-
const C =
|
|
707
|
+
safeValue: (h) => this.escapeValue ? ae(this.escape(h)) : ae(h)
|
|
708
|
+
}].forEach((h) => {
|
|
709
|
+
for (a = 0; s = h.regex.exec(e); ) {
|
|
710
|
+
const y = s[1].trim();
|
|
711
|
+
if (r = l(y), r === void 0)
|
|
712
|
+
if (typeof d == "function") {
|
|
713
|
+
const C = d(e, s, i);
|
|
714
714
|
r = m(C) ? C : "";
|
|
715
|
-
} else if (i && Object.prototype.hasOwnProperty.call(i,
|
|
715
|
+
} else if (i && Object.prototype.hasOwnProperty.call(i, y))
|
|
716
716
|
r = "";
|
|
717
717
|
else if (u) {
|
|
718
718
|
r = s[0];
|
|
719
719
|
continue;
|
|
720
720
|
} else
|
|
721
|
-
this.logger.warn(`missed to pass in variable ${
|
|
722
|
-
else !m(r) && !this.useRawValueToEscape && (r =
|
|
723
|
-
const
|
|
724
|
-
if (e = e.replace(s[0],
|
|
721
|
+
this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`), r = "";
|
|
722
|
+
else !m(r) && !this.useRawValueToEscape && (r = Pe(r));
|
|
723
|
+
const v = h.safeValue(r);
|
|
724
|
+
if (e = e.replace(s[0], v), u ? (h.regex.lastIndex += r.length, h.regex.lastIndex -= s[0].length) : h.regex.lastIndex = 0, a++, a >= this.maxReplaces)
|
|
725
725
|
break;
|
|
726
726
|
}
|
|
727
727
|
}), e;
|
|
@@ -729,34 +729,34 @@ class St {
|
|
|
729
729
|
nest(e, t, n = {}) {
|
|
730
730
|
let i, s, r;
|
|
731
731
|
const a = (c, l) => {
|
|
732
|
-
var
|
|
733
|
-
const
|
|
734
|
-
if (c.indexOf(
|
|
735
|
-
const u = c.split(new RegExp(`${
|
|
736
|
-
let
|
|
737
|
-
c = u[0],
|
|
738
|
-
const f =
|
|
739
|
-
(((
|
|
732
|
+
var y;
|
|
733
|
+
const d = this.nestingOptionsSeparator;
|
|
734
|
+
if (c.indexOf(d) < 0) return c;
|
|
735
|
+
const u = c.split(new RegExp(`${d}[ ]*{`));
|
|
736
|
+
let g = `{${u[1]}`;
|
|
737
|
+
c = u[0], g = this.interpolate(g, r);
|
|
738
|
+
const f = g.match(/'/g), h = g.match(/"/g);
|
|
739
|
+
(((y = f == null ? void 0 : f.length) != null ? y : 0) % 2 === 0 && !h || h.length % 2 !== 0) && (g = g.replace(/'/g, '"'));
|
|
740
740
|
try {
|
|
741
|
-
r = JSON.parse(
|
|
742
|
-
} catch (
|
|
743
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${c}`,
|
|
741
|
+
r = JSON.parse(g), l && (r = p(p({}, l), r));
|
|
742
|
+
} catch (v) {
|
|
743
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${c}`, v), `${c}${d}${g}`;
|
|
744
744
|
}
|
|
745
745
|
return r.defaultValue && r.defaultValue.indexOf(this.prefix) > -1 && delete r.defaultValue, c;
|
|
746
746
|
};
|
|
747
747
|
for (; i = this.nestingRegexp.exec(e); ) {
|
|
748
748
|
let c = [];
|
|
749
|
-
r =
|
|
749
|
+
r = p({}, n), r = r.replace && !m(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
|
|
750
750
|
const l = /{.*}/.test(i[1]) ? i[1].lastIndexOf("}") + 1 : i[1].indexOf(this.formatSeparator);
|
|
751
|
-
if (l !== -1 && (c = i[1].slice(l).split(this.formatSeparator).map((
|
|
752
|
-
m(s) || (s =
|
|
751
|
+
if (l !== -1 && (c = i[1].slice(l).split(this.formatSeparator).map((d) => d.trim()).filter(Boolean), i[1] = i[1].slice(0, l)), s = t(a.call(this, i[1].trim(), r), r), s && i[0] === e && !m(s)) return s;
|
|
752
|
+
m(s) || (s = Pe(s)), s || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), s = ""), c.length && (s = c.reduce((d, u) => this.format(d, u, n.lng, x(p({}, n), {
|
|
753
753
|
interpolationkey: i[1].trim()
|
|
754
754
|
})), s.trim())), e = e.replace(i[0], s), this.regexp.lastIndex = 0;
|
|
755
755
|
}
|
|
756
756
|
return e;
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
const
|
|
759
|
+
const Lt = (o) => {
|
|
760
760
|
let e = o.toLowerCase().trim();
|
|
761
761
|
const t = {};
|
|
762
762
|
if (o.indexOf("(") > -1) {
|
|
@@ -765,8 +765,8 @@ const kt = (o) => {
|
|
|
765
765
|
const i = n[1].substring(0, n[1].length - 1);
|
|
766
766
|
e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((r) => {
|
|
767
767
|
if (r) {
|
|
768
|
-
const [a, ...c] = r.split(":"), l = c.join(":").trim().replace(/^'+|'+$/g, ""),
|
|
769
|
-
t[
|
|
768
|
+
const [a, ...c] = r.split(":"), l = c.join(":").trim().replace(/^'+|'+$/g, ""), d = a.trim();
|
|
769
|
+
t[d] || (t[d] = l), l === "false" && (t[d] = !1), l === "true" && (t[d] = !0), isNaN(l) || (t[d] = parseInt(l, 10));
|
|
770
770
|
}
|
|
771
771
|
});
|
|
772
772
|
}
|
|
@@ -774,19 +774,19 @@ const kt = (o) => {
|
|
|
774
774
|
formatName: e,
|
|
775
775
|
formatOptions: t
|
|
776
776
|
};
|
|
777
|
-
},
|
|
777
|
+
}, Ee = (o) => {
|
|
778
778
|
const e = {};
|
|
779
779
|
return (t, n, i) => {
|
|
780
780
|
let s = i;
|
|
781
|
-
i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (s =
|
|
781
|
+
i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (s = x(p({}, s), {
|
|
782
782
|
[i.interpolationkey]: void 0
|
|
783
783
|
}));
|
|
784
784
|
const r = n + JSON.stringify(s);
|
|
785
785
|
let a = e[r];
|
|
786
|
-
return a || (a = o(
|
|
786
|
+
return a || (a = o(W(n), i), e[r] = a), a(t);
|
|
787
787
|
};
|
|
788
|
-
},
|
|
789
|
-
class
|
|
788
|
+
}, It = (o) => (e, t, n) => o(W(t), n)(e);
|
|
789
|
+
class Nt {
|
|
790
790
|
constructor(e = {}) {
|
|
791
791
|
this.logger = I.create("formatter"), this.options = e, this.init(e);
|
|
792
792
|
}
|
|
@@ -794,28 +794,28 @@ class xt {
|
|
|
794
794
|
interpolation: {}
|
|
795
795
|
}) {
|
|
796
796
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
797
|
-
const n = t.cacheInBuiltFormats ?
|
|
797
|
+
const n = t.cacheInBuiltFormats ? Ee : It;
|
|
798
798
|
this.formats = {
|
|
799
799
|
number: n((i, s) => {
|
|
800
|
-
const r = new Intl.NumberFormat(i,
|
|
800
|
+
const r = new Intl.NumberFormat(i, p({}, s));
|
|
801
801
|
return (a) => r.format(a);
|
|
802
802
|
}),
|
|
803
803
|
currency: n((i, s) => {
|
|
804
|
-
const r = new Intl.NumberFormat(i,
|
|
804
|
+
const r = new Intl.NumberFormat(i, x(p({}, s), {
|
|
805
805
|
style: "currency"
|
|
806
806
|
}));
|
|
807
807
|
return (a) => r.format(a);
|
|
808
808
|
}),
|
|
809
809
|
datetime: n((i, s) => {
|
|
810
|
-
const r = new Intl.DateTimeFormat(i,
|
|
810
|
+
const r = new Intl.DateTimeFormat(i, p({}, s));
|
|
811
811
|
return (a) => r.format(a);
|
|
812
812
|
}),
|
|
813
813
|
relativetime: n((i, s) => {
|
|
814
|
-
const r = new Intl.RelativeTimeFormat(i,
|
|
814
|
+
const r = new Intl.RelativeTimeFormat(i, p({}, s));
|
|
815
815
|
return (a) => r.format(a, s.range || "day");
|
|
816
816
|
}),
|
|
817
817
|
list: n((i, s) => {
|
|
818
|
-
const r = new Intl.ListFormat(i,
|
|
818
|
+
const r = new Intl.ListFormat(i, p({}, s));
|
|
819
819
|
return (a) => r.format(a);
|
|
820
820
|
})
|
|
821
821
|
};
|
|
@@ -824,7 +824,7 @@ class xt {
|
|
|
824
824
|
this.formats[e.toLowerCase().trim()] = t;
|
|
825
825
|
}
|
|
826
826
|
addCached(e, t) {
|
|
827
|
-
this.formats[e.toLowerCase().trim()] =
|
|
827
|
+
this.formats[e.toLowerCase().trim()] = Ee(t);
|
|
828
828
|
}
|
|
829
829
|
format(e, t, n, i = {}) {
|
|
830
830
|
const s = t.split(this.formatSeparator);
|
|
@@ -836,27 +836,27 @@ class xt {
|
|
|
836
836
|
var u;
|
|
837
837
|
const {
|
|
838
838
|
formatName: l,
|
|
839
|
-
formatOptions:
|
|
840
|
-
} =
|
|
839
|
+
formatOptions: d
|
|
840
|
+
} = Lt(c);
|
|
841
841
|
if (this.formats[l]) {
|
|
842
|
-
let
|
|
842
|
+
let g = a;
|
|
843
843
|
try {
|
|
844
|
-
const f = ((u = i == null ? void 0 : i.formatParams) == null ? void 0 : u[i.interpolationkey]) || {},
|
|
845
|
-
|
|
844
|
+
const f = ((u = i == null ? void 0 : i.formatParams) == null ? void 0 : u[i.interpolationkey]) || {}, h = f.locale || f.lng || i.locale || i.lng || n;
|
|
845
|
+
g = this.formats[l](a, h, p(p(p({}, d), i), f));
|
|
846
846
|
} catch (f) {
|
|
847
847
|
this.logger.warn(f);
|
|
848
848
|
}
|
|
849
|
-
return
|
|
849
|
+
return g;
|
|
850
850
|
} else
|
|
851
851
|
this.logger.warn(`there was no format function for ${l}`);
|
|
852
852
|
return a;
|
|
853
853
|
}, e);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
const
|
|
856
|
+
const Rt = (o, e) => {
|
|
857
857
|
o.pending[e] !== void 0 && (delete o.pending[e], o.pendingCount--);
|
|
858
858
|
};
|
|
859
|
-
class
|
|
859
|
+
class At extends se {
|
|
860
860
|
constructor(e, t, n, i = {}) {
|
|
861
861
|
var s, r;
|
|
862
862
|
super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = i, this.logger = I.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (r = (s = this.backend) == null ? void 0 : s.init) == null || r.call(s, n, i.backend, i);
|
|
@@ -864,11 +864,11 @@ class Pt extends oe {
|
|
|
864
864
|
queueLoad(e, t, n, i) {
|
|
865
865
|
const s = {}, r = {}, a = {}, c = {};
|
|
866
866
|
return e.forEach((l) => {
|
|
867
|
-
let
|
|
867
|
+
let d = !0;
|
|
868
868
|
t.forEach((u) => {
|
|
869
|
-
const
|
|
870
|
-
!n.reload && this.store.hasResourceBundle(l, u) ? this.state[
|
|
871
|
-
}),
|
|
869
|
+
const g = `${l}|${u}`;
|
|
870
|
+
!n.reload && this.store.hasResourceBundle(l, u) ? this.state[g] = 2 : this.state[g] < 0 || (this.state[g] === 1 ? r[g] === void 0 && (r[g] = !0) : (this.state[g] = 1, d = !1, r[g] === void 0 && (r[g] = !0), s[g] === void 0 && (s[g] = !0), c[u] === void 0 && (c[u] = !0)));
|
|
871
|
+
}), d || (a[l] = !0);
|
|
872
872
|
}), (Object.keys(s).length || Object.keys(r).length) && this.queue.push({
|
|
873
873
|
pending: r,
|
|
874
874
|
pendingCount: Object.keys(r).length,
|
|
@@ -889,10 +889,10 @@ class Pt extends oe {
|
|
|
889
889
|
}), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
|
|
890
890
|
const a = {};
|
|
891
891
|
this.queue.forEach((c) => {
|
|
892
|
-
|
|
892
|
+
vt(c.loaded, [s], r), Rt(c, e), t && c.errors.push(t), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((l) => {
|
|
893
893
|
a[l] || (a[l] = {});
|
|
894
|
-
const
|
|
895
|
-
|
|
894
|
+
const d = c.loaded[l];
|
|
895
|
+
d.length && d.forEach((u) => {
|
|
896
896
|
a[l][u] === void 0 && (a[l][u] = !0);
|
|
897
897
|
});
|
|
898
898
|
}), c.done = !0, c.errors.length ? c.callback(c.errors) : c.callback());
|
|
@@ -912,23 +912,23 @@ class Pt extends oe {
|
|
|
912
912
|
return;
|
|
913
913
|
}
|
|
914
914
|
this.readingCalls++;
|
|
915
|
-
const a = (l,
|
|
915
|
+
const a = (l, d) => {
|
|
916
916
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
917
917
|
const u = this.waitingReads.shift();
|
|
918
918
|
this.read(u.lng, u.ns, u.fcName, u.tried, u.wait, u.callback);
|
|
919
919
|
}
|
|
920
|
-
if (l &&
|
|
920
|
+
if (l && d && i < this.maxRetries) {
|
|
921
921
|
setTimeout(() => {
|
|
922
922
|
this.read.call(this, e, t, n, i + 1, s * 2, r);
|
|
923
923
|
}, s);
|
|
924
924
|
return;
|
|
925
925
|
}
|
|
926
|
-
r(l,
|
|
926
|
+
r(l, d);
|
|
927
927
|
}, c = this.backend[n].bind(this.backend);
|
|
928
928
|
if (c.length === 2) {
|
|
929
929
|
try {
|
|
930
930
|
const l = c(e, t);
|
|
931
|
-
l && typeof l.then == "function" ? l.then((
|
|
931
|
+
l && typeof l.then == "function" ? l.then((d) => a(null, d)).catch(a) : a(null, l);
|
|
932
932
|
} catch (l) {
|
|
933
933
|
a(l);
|
|
934
934
|
}
|
|
@@ -963,31 +963,31 @@ class Pt extends oe {
|
|
|
963
963
|
}
|
|
964
964
|
saveMissing(e, t, n, i, s, r = {}, a = () => {
|
|
965
965
|
}) {
|
|
966
|
-
var c, l,
|
|
967
|
-
if ((l = (c = this.services) == null ? void 0 : c.utils) != null && l.hasLoadedNamespace && !((u = (
|
|
966
|
+
var c, l, d, u, g;
|
|
967
|
+
if ((l = (c = this.services) == null ? void 0 : c.utils) != null && l.hasLoadedNamespace && !((u = (d = this.services) == null ? void 0 : d.utils) != null && u.hasLoadedNamespace(t))) {
|
|
968
968
|
this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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!!!");
|
|
969
969
|
return;
|
|
970
970
|
}
|
|
971
971
|
if (!(n == null || n === "")) {
|
|
972
|
-
if ((
|
|
973
|
-
const f =
|
|
972
|
+
if ((g = this.backend) != null && g.create) {
|
|
973
|
+
const f = x(p({}, r), {
|
|
974
974
|
isUpdate: s
|
|
975
|
-
}),
|
|
976
|
-
if (
|
|
975
|
+
}), h = this.backend.create.bind(this.backend);
|
|
976
|
+
if (h.length < 6)
|
|
977
977
|
try {
|
|
978
|
-
let
|
|
979
|
-
|
|
980
|
-
} catch (
|
|
981
|
-
a(
|
|
978
|
+
let y;
|
|
979
|
+
h.length === 5 ? y = h(e, t, n, i, f) : y = h(e, t, n, i), y && typeof y.then == "function" ? y.then((v) => a(null, v)).catch(a) : a(null, y);
|
|
980
|
+
} catch (y) {
|
|
981
|
+
a(y);
|
|
982
982
|
}
|
|
983
983
|
else
|
|
984
|
-
|
|
984
|
+
h(e, t, n, i, a, f);
|
|
985
985
|
}
|
|
986
986
|
!e || !e[0] || this.store.addResource(e[0], t, n, i);
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
const
|
|
990
|
+
const De = () => ({
|
|
991
991
|
debug: !1,
|
|
992
992
|
initAsync: !0,
|
|
993
993
|
ns: ["translation"],
|
|
@@ -1044,20 +1044,20 @@ const Ae = () => ({
|
|
|
1044
1044
|
skipOnVariables: !0
|
|
1045
1045
|
},
|
|
1046
1046
|
cacheInBuiltFormats: !0
|
|
1047
|
-
}),
|
|
1047
|
+
}), Ue = (o) => {
|
|
1048
1048
|
var e, t;
|
|
1049
1049
|
return m(o.ns) && (o.ns = [o.ns]), m(o.fallbackLng) && (o.fallbackLng = [o.fallbackLng]), m(o.fallbackNS) && (o.fallbackNS = [o.fallbackNS]), ((t = (e = o.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (o.supportedLngs = o.supportedLngs.concat(["cimode"])), typeof o.initImmediate == "boolean" && (o.initAsync = o.initImmediate), o;
|
|
1050
|
-
},
|
|
1051
|
-
},
|
|
1050
|
+
}, Z = () => {
|
|
1051
|
+
}, Ft = (o) => {
|
|
1052
1052
|
Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach((t) => {
|
|
1053
1053
|
typeof o[t] == "function" && (o[t] = o[t].bind(o));
|
|
1054
1054
|
});
|
|
1055
1055
|
};
|
|
1056
|
-
class
|
|
1056
|
+
class _ extends se {
|
|
1057
1057
|
constructor(e = {}, t) {
|
|
1058
|
-
if (super(), this.options =
|
|
1058
|
+
if (super(), this.options = Ue(e), this.services = {}, this.logger = I, this.modules = {
|
|
1059
1059
|
external: []
|
|
1060
|
-
},
|
|
1060
|
+
}, Ft(this), t && !this.isInitialized && !e.isClone) {
|
|
1061
1061
|
if (!this.options.initAsync)
|
|
1062
1062
|
return this.init(e, t), this;
|
|
1063
1063
|
setTimeout(() => {
|
|
@@ -1067,48 +1067,48 @@ class W extends oe {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
init(e = {}, t) {
|
|
1069
1069
|
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (m(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
|
|
1070
|
-
const n =
|
|
1071
|
-
this.options =
|
|
1070
|
+
const n = De();
|
|
1071
|
+
this.options = p(p(p({}, n), this.options), Ue(e)), this.options.interpolation = p(p({}, n.interpolation), this.options.interpolation), e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator);
|
|
1072
1072
|
const i = (l) => l ? typeof l == "function" ? new l() : l : null;
|
|
1073
1073
|
if (!this.options.isClone) {
|
|
1074
1074
|
this.modules.logger ? I.init(i(this.modules.logger), this.options) : I.init(null, this.options);
|
|
1075
1075
|
let l;
|
|
1076
|
-
this.modules.formatter ? l = this.modules.formatter : l =
|
|
1077
|
-
const
|
|
1078
|
-
this.store = new
|
|
1076
|
+
this.modules.formatter ? l = this.modules.formatter : l = Nt;
|
|
1077
|
+
const d = new Ne(this.options);
|
|
1078
|
+
this.store = new Oe(this.options.resources, this.options);
|
|
1079
1079
|
const u = this.services;
|
|
1080
|
-
u.logger = I, u.resourceStore = this.store, u.languageUtils =
|
|
1080
|
+
u.logger = I, u.resourceStore = this.store, u.languageUtils = d, u.pluralResolver = new Tt(d, {
|
|
1081
1081
|
prepend: this.options.pluralSeparator,
|
|
1082
1082
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1083
|
-
}), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = i(l), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new
|
|
1083
|
+
}), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = i(l), u.formatter.init && u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new Ot(this.options), u.utils = {
|
|
1084
1084
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1085
|
-
}, u.backendConnector = new
|
|
1086
|
-
this.emit(f, ...
|
|
1087
|
-
}), this.modules.languageDetector && (u.languageDetector = i(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = i(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new
|
|
1088
|
-
this.emit(f, ...
|
|
1085
|
+
}, u.backendConnector = new At(i(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", (f, ...h) => {
|
|
1086
|
+
this.emit(f, ...h);
|
|
1087
|
+
}), this.modules.languageDetector && (u.languageDetector = i(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = i(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new ie(this.services, this.options), this.translator.on("*", (f, ...h) => {
|
|
1088
|
+
this.emit(f, ...h);
|
|
1089
1089
|
}), this.modules.external.forEach((f) => {
|
|
1090
1090
|
f.init && f.init(this);
|
|
1091
1091
|
});
|
|
1092
1092
|
}
|
|
1093
|
-
if (this.format = this.options.interpolation.format, t || (t =
|
|
1093
|
+
if (this.format = this.options.interpolation.format, t || (t = Z), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1094
1094
|
const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1095
1095
|
l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
|
|
1096
1096
|
}
|
|
1097
1097
|
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((l) => {
|
|
1098
|
-
this[l] = (...
|
|
1098
|
+
this[l] = (...d) => this.store[l](...d);
|
|
1099
1099
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((l) => {
|
|
1100
|
-
this[l] = (...
|
|
1100
|
+
this[l] = (...d) => (this.store[l](...d), this);
|
|
1101
1101
|
});
|
|
1102
1102
|
const a = z(), c = () => {
|
|
1103
|
-
const l = (
|
|
1104
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), a.resolve(u), t(
|
|
1103
|
+
const l = (d, u) => {
|
|
1104
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), a.resolve(u), t(d, u);
|
|
1105
1105
|
};
|
|
1106
1106
|
if (this.languages && !this.isInitialized) return l(null, this.t.bind(this));
|
|
1107
1107
|
this.changeLanguage(this.options.lng, l);
|
|
1108
1108
|
};
|
|
1109
1109
|
return this.options.resources || !this.options.initAsync ? c() : setTimeout(c, 0), a;
|
|
1110
1110
|
}
|
|
1111
|
-
loadResources(e, t =
|
|
1111
|
+
loadResources(e, t = Z) {
|
|
1112
1112
|
var s, r;
|
|
1113
1113
|
let n = t;
|
|
1114
1114
|
const i = m(e) ? e : this.language;
|
|
@@ -1120,7 +1120,7 @@ class W extends oe {
|
|
|
1120
1120
|
u !== "cimode" && a.indexOf(u) < 0 && a.push(u);
|
|
1121
1121
|
});
|
|
1122
1122
|
};
|
|
1123
|
-
i ? c(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((
|
|
1123
|
+
i ? c(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((d) => c(d)), (r = (s = this.options.preload) == null ? void 0 : s.forEach) == null || r.call(s, (l) => c(l)), this.services.backendConnector.load(a, this.options.ns, (l) => {
|
|
1124
1124
|
!l && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(l);
|
|
1125
1125
|
});
|
|
1126
1126
|
} else
|
|
@@ -1128,14 +1128,14 @@ class W extends oe {
|
|
|
1128
1128
|
}
|
|
1129
1129
|
reloadResources(e, t, n) {
|
|
1130
1130
|
const i = z();
|
|
1131
|
-
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), n || (n =
|
|
1131
|
+
return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), n || (n = Z), this.services.backendConnector.reload(e, t, (s) => {
|
|
1132
1132
|
i.resolve(), n(s);
|
|
1133
1133
|
}), i;
|
|
1134
1134
|
}
|
|
1135
1135
|
use(e) {
|
|
1136
1136
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1137
1137
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1138
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
1138
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Je.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1139
1139
|
}
|
|
1140
1140
|
setResolvedLanguage(e) {
|
|
1141
1141
|
if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1)) {
|
|
@@ -1158,11 +1158,11 @@ class W extends oe {
|
|
|
1158
1158
|
}, s = (a, c) => {
|
|
1159
1159
|
c ? this.isLanguageChangingTo === e && (i(c), this.translator.changeLanguage(c), this.isLanguageChangingTo = void 0, this.emit("languageChanged", c), this.logger.log("languageChanged", c)) : this.isLanguageChangingTo = void 0, n.resolve((...l) => this.t(...l)), t && t(a, (...l) => this.t(...l));
|
|
1160
1160
|
}, r = (a) => {
|
|
1161
|
-
var
|
|
1161
|
+
var d, u;
|
|
1162
1162
|
!e && !a && this.services.languageDetector && (a = []);
|
|
1163
1163
|
const c = m(a) ? a : a && a[0], l = this.store.hasLanguageSomeTranslations(c) ? c : this.services.languageUtils.getBestMatchFromCodes(m(a) ? [a] : a);
|
|
1164
|
-
l && (this.language || i(l), this.translator.language || this.translator.changeLanguage(l), (u = (
|
|
1165
|
-
s(
|
|
1164
|
+
l && (this.language || i(l), this.translator.language || this.translator.changeLanguage(l), (u = (d = this.services.languageDetector) == null ? void 0 : d.cacheUserLanguage) == null || u.call(d, l)), this.loadResources(l, (g) => {
|
|
1165
|
+
s(g, l);
|
|
1166
1166
|
});
|
|
1167
1167
|
};
|
|
1168
1168
|
return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), n;
|
|
@@ -1170,10 +1170,10 @@ class W extends oe {
|
|
|
1170
1170
|
getFixedT(e, t, n) {
|
|
1171
1171
|
const i = (s, r, ...a) => {
|
|
1172
1172
|
let c;
|
|
1173
|
-
typeof r != "object" ? c = this.options.overloadTranslationOptionHandler([s, r].concat(a)) : c =
|
|
1173
|
+
typeof r != "object" ? c = this.options.overloadTranslationOptionHandler([s, r].concat(a)) : c = p({}, r), c.lng = c.lng || i.lng, c.lngs = c.lngs || i.lngs, c.ns = c.ns || i.ns, c.keyPrefix !== "" && (c.keyPrefix = c.keyPrefix || n || i.keyPrefix);
|
|
1174
1174
|
const l = this.options.keySeparator || ".";
|
|
1175
|
-
let
|
|
1176
|
-
return c.keyPrefix && Array.isArray(s) ?
|
|
1175
|
+
let d;
|
|
1176
|
+
return c.keyPrefix && Array.isArray(s) ? d = s.map((u) => `${c.keyPrefix}${l}${u}`) : d = c.keyPrefix ? `${c.keyPrefix}${l}${s}` : s, this.t(d, c);
|
|
1177
1177
|
};
|
|
1178
1178
|
return m(e) ? i.lng = e : i.lngs = e, i.ns = t, i.keyPrefix = n, i;
|
|
1179
1179
|
}
|
|
@@ -1231,27 +1231,27 @@ class W extends oe {
|
|
|
1231
1231
|
if (a && a.direction) return a.direction;
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
const t = ["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"], n = ((s = this.services) == null ? void 0 : s.languageUtils) || new
|
|
1234
|
+
const t = ["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"], n = ((s = this.services) == null ? void 0 : s.languageUtils) || new Ne(De());
|
|
1235
1235
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.indexOf(n.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1236
1236
|
}
|
|
1237
1237
|
static createInstance(e = {}, t) {
|
|
1238
|
-
return new
|
|
1238
|
+
return new _(e, t);
|
|
1239
1239
|
}
|
|
1240
|
-
cloneInstance(e = {}, t =
|
|
1240
|
+
cloneInstance(e = {}, t = Z) {
|
|
1241
1241
|
const n = e.forkResourceStore;
|
|
1242
1242
|
n && delete e.forkResourceStore;
|
|
1243
|
-
const i =
|
|
1243
|
+
const i = x(p(p({}, this.options), e), {
|
|
1244
1244
|
isClone: !0
|
|
1245
|
-
}), s = new
|
|
1245
|
+
}), s = new _(i);
|
|
1246
1246
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (s.logger = s.logger.clone(e)), ["store", "services", "language"].forEach((a) => {
|
|
1247
1247
|
s[a] = this[a];
|
|
1248
|
-
}), s.services =
|
|
1248
|
+
}), s.services = p({}, this.services), s.services.utils = {
|
|
1249
1249
|
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
|
|
1250
1250
|
}, n) {
|
|
1251
|
-
const a = Object.keys(this.store.data).reduce((c, l) => (c[l] =
|
|
1252
|
-
s.store = new
|
|
1251
|
+
const a = Object.keys(this.store.data).reduce((c, l) => (c[l] = p({}, this.store.data[l]), c[l] = Object.keys(c[l]).reduce((d, u) => (d[u] = p({}, c[l][u]), d), c[l]), c), {});
|
|
1252
|
+
s.store = new Oe(a, i), s.services.resourceStore = s.store;
|
|
1253
1253
|
}
|
|
1254
|
-
return s.translator = new
|
|
1254
|
+
return s.translator = new ie(s.services, i), s.translator.on("*", (a, ...c) => {
|
|
1255
1255
|
s.emit(a, ...c);
|
|
1256
1256
|
}), s.init(i, t), s.translator.options = i, s.translator.backendConnector.services.utils = {
|
|
1257
1257
|
hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
|
|
@@ -1267,8 +1267,8 @@ class W extends oe {
|
|
|
1267
1267
|
};
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
|
-
const b =
|
|
1271
|
-
b.createInstance =
|
|
1270
|
+
const b = _.createInstance();
|
|
1271
|
+
b.createInstance = _.createInstance;
|
|
1272
1272
|
b.createInstance;
|
|
1273
1273
|
b.dir;
|
|
1274
1274
|
b.init;
|
|
@@ -1283,401 +1283,401 @@ b.setDefaultNamespace;
|
|
|
1283
1283
|
b.hasLoadedNamespace;
|
|
1284
1284
|
b.loadNamespaces;
|
|
1285
1285
|
b.loadLanguages;
|
|
1286
|
-
const
|
|
1287
|
-
accountName:
|
|
1288
|
-
accountNumber:
|
|
1289
|
-
address:
|
|
1290
|
-
agreeWith:
|
|
1291
|
-
and:
|
|
1292
|
-
back:
|
|
1293
|
-
backIdCard:
|
|
1294
|
-
bankName:
|
|
1295
|
-
beneficiaryBank:
|
|
1296
|
-
businessLicense:
|
|
1297
|
-
cancel:
|
|
1298
|
-
cancelTransaction:
|
|
1299
|
-
close:
|
|
1300
|
-
codeTypeC:
|
|
1301
|
-
codeTypeK:
|
|
1302
|
-
codeTypeTooltip:
|
|
1303
|
-
comingSoon:
|
|
1304
|
-
companyName:
|
|
1305
|
-
completePaymentIn:
|
|
1306
|
-
completeRegistration:
|
|
1307
|
-
confirm:
|
|
1308
|
-
confirmationTitle:
|
|
1309
|
-
contactInfo:
|
|
1310
|
-
copy:
|
|
1311
|
-
country:
|
|
1312
|
-
customLettersTooltip:
|
|
1313
|
-
customUnits:
|
|
1314
|
-
dateOfBirth:
|
|
1315
|
-
decrease:
|
|
1286
|
+
const Et = "Account Name", Dt = "Account Number", Ut = "Unit Address", jt = "I agree with", Mt = "and", Ht = "Back", Kt = "Back ID Card", Bt = "Bank Name", Vt = "Beneficiary Bank", qt = "Business Registration License", zt = "Cancel", Qt = "Cancel Transaction", Gt = "Close", Wt = "C (With tax authority code)", _t = "K (Without code)", Xt = "C: With tax authority code, K: Without code", Jt = "Coming Soon", Yt = "Unit Name", Zt = "Complete your payment within", en = "Complete registration", tn = "Confirm", nn = "Important Notice:", on = "3. Contact Person Information:", sn = "Copy", rn = "Country", an = "2 custom characters (default: YY)", cn = "Custom quantity", ln = "Date of Birth", un = "Decrease", dn = "Digital Signature Package", hn = "District", fn = "Duration", gn = "E-Contract", pn = "Edit", mn = "e-invoices", yn = "Email", vn = "Enter ID Card Number", bn = "Enter Invoice Symbol", Sn = "Enter Passport Number", $n = "Enter Provider Name", xn = "Enter Tax Authority Code", kn = "Failed to check customer status", Pn = "Failed to create order", wn = "Error fetching tax information.", Cn = "File format not supported", Tn = "File size is too large", On = "Access denied", Ln = "Address cannot contain special characters", In = "Invalid ID card", Nn = "Invalid date of birth", Rn = "Invalid email address", An = "Invalid ID card number", Fn = "Only letters, numbers and underscores allowed", En = "Invalid phone number", Dn = "Invalid provider name", Un = "Invalid request", jn = "Invalid tax authority code", Mn = "Invalid tax code", Hn = "Failed to load data", Kn = "Failed to load registration packages", Bn = "Failed to load invoice packages", Vn = "Failed to load signature packages", qn = "Network connection error", zn = "Data not found", Qn = "Unable to check order payment status. Please try again.", Gn = "Unable to generate QR payment code. Please try again.", Wn = "This field is required", _n = "Failed to search packages", Xn = "Server error, please try again later", Jn = "Service temporarily unavailable", Yn = "Too many requests, please try again later", Zn = "Unauthorized access", ei = "An error occurred", ti = "Invalid data", ni = "Female", ii = "Format", oi = "Front ID Card", si = "Full Name", ri = "Gender", ai = "Have you used e-invoices?", ci = "Are you using another e-invoice provider other than M-invoice?", li = "(Free Consulting and Support Hotline)", ui = "Hotline:", di = "ID Card Number", hi = "Increase", fi = "Information sent to the provider", gi = "Invoice Package", pi = "Invoice Symbol", mi = "Invoice Template", yi = { 1: "1 (VAT Invoice)", 2: "2 (Sales Invoice)", 3: "3 (Public Asset Sales)", 4: "4 (National Reserve Sales)", 5: "5 (Stamps, Tickets, Other Cards)", 6: "6 (Internal Documents)", 7: "7 (Commercial Invoice)", 8: "8 (VAT with Integrated Tax)", 9: "9 (Sales with Integrated Tax)" }, vi = "B (Agent)", bi = "D (Asset)", Si = "G (VAT Stamp)", $i = "H (Sales Stamp)", xi = "L (Tax Authority)", ki = "M (Cash Register)", Pi = "N (Internal)", wi = "T (Registration)", Ci = "Invoice type", Ti = "X (Commercial)", Oi = "4. E-INVOICE USAGE INFORMATION:", Li = "invoices/month", Ii = "2. Legal Representative Information:", Ni = "Please check and enter the correct legal representative name according to the uploaded business license.", Ri = "Loading...", Ai = "Male", Fi = "Max 500KB", Ei = "Month", Di = "Most Suitable Package", Ui = "Continue", ji = "No data available", Mi = "No package found.", Hi = "Please check your email inbox regularly to receive account information notifications from the provider.", Ki = "If you have not received the email account information (username/password) within 2 hours, please contact the information below for the fastest support:", Bi = "of", Vi = "OK", qi = "Optional", zi = "or", Qi = "Order created successfully", Gi = "Order has expired", Wi = "Order Information", _i = "Order Summary", Xi = "Organization Registration Certificate", Ji = "Passport", Yi = "Payment Amount", Zi = "Payment Failed", eo = ["Open your banking app or digital wallet on your phone", "Select the QR Code scan feature in the app", "Scan the QR code on this page and make payment"], to = "QR Payment Instructions", no = "Payment Method:", io = "Payment Successful!", oo = "Payment timeout", so = "Payment timeout! Please try again.", ro = "Payment", ao = "Permanent address", co = "Phone Number", lo = "Product", uo = "Provider", ho = "Provider Name", fo = "Province/City", go = "QR Code Payment", po = "Scan QR Code to Pay", mo = "Quantity", yo = "Registration Fee", vo = "Required", bo = "Return Home", So = "Return to step 1", $o = "Invoice template number (1-9)", xo = "Save", ko = "Units per month", Po = "Select File", wo = "Select E-Invoice Package", Co = "Select Provider", To = "Select Digital Signature Package", Oo = "Select Subscription Package", Lo = "Selected Products", Io = "Settings", No = "Digital Signature Package", Ro = "E-invoice software license", Ao = "Information", Fo = "Confirmation & Payment", Eo = "Invoice Package", Do = "Subscription Package", Uo = "Tax Authority", jo = "5 characters issued by the Authority for cash register bills", Mo = "Unit Tax Code", Ho = "Terms and Usage Policy", Ko = "Time Left", Bo = "Total", Vo = "Total Amount", qo = "Total Price", zo = "Transaction has been canceled. Returning to registration page.", Qo = "Unit", Go = "1. Unit Information", Wo = "units/month", _o = "Unit Price", Xo = "units/ month", Jo = "Upload Back ID Card", Yo = "Upload File", Zo = "Upload Front ID Card", es = "Upload Logo", ts = "Usage Policy", ns = "Ward", is = "Website", os = "E-Invoice Registration", ss = "Release year (last 2 digits)", rs = {
|
|
1287
|
+
accountName: Et,
|
|
1288
|
+
accountNumber: Dt,
|
|
1289
|
+
address: Ut,
|
|
1290
|
+
agreeWith: jt,
|
|
1291
|
+
and: Mt,
|
|
1292
|
+
back: Ht,
|
|
1293
|
+
backIdCard: Kt,
|
|
1294
|
+
bankName: Bt,
|
|
1295
|
+
beneficiaryBank: Vt,
|
|
1296
|
+
businessLicense: qt,
|
|
1297
|
+
cancel: zt,
|
|
1298
|
+
cancelTransaction: Qt,
|
|
1299
|
+
close: Gt,
|
|
1300
|
+
codeTypeC: Wt,
|
|
1301
|
+
codeTypeK: _t,
|
|
1302
|
+
codeTypeTooltip: Xt,
|
|
1303
|
+
comingSoon: Jt,
|
|
1304
|
+
companyName: Yt,
|
|
1305
|
+
completePaymentIn: Zt,
|
|
1306
|
+
completeRegistration: en,
|
|
1307
|
+
confirm: tn,
|
|
1308
|
+
confirmationTitle: nn,
|
|
1309
|
+
contactInfo: on,
|
|
1310
|
+
copy: sn,
|
|
1311
|
+
country: rn,
|
|
1312
|
+
customLettersTooltip: an,
|
|
1313
|
+
customUnits: cn,
|
|
1314
|
+
dateOfBirth: ln,
|
|
1315
|
+
decrease: un,
|
|
1316
1316
|
delete: "Delete",
|
|
1317
|
-
digitalSignaturePackage:
|
|
1318
|
-
district:
|
|
1319
|
-
duration:
|
|
1320
|
-
eContractTitle:
|
|
1321
|
-
edit:
|
|
1322
|
-
electronicInvoices:
|
|
1323
|
-
email:
|
|
1324
|
-
enterIdCard:
|
|
1325
|
-
enterInvoiceSymbol:
|
|
1326
|
-
enterPassport:
|
|
1327
|
-
enterProviderName:
|
|
1328
|
-
enterTaxAuthorityCode:
|
|
1329
|
-
errorCheckingCustomer:
|
|
1330
|
-
errorCreatingOrder:
|
|
1331
|
-
errorFetchTaxInfo:
|
|
1332
|
-
errorFileFormat:
|
|
1333
|
-
errorFileSize:
|
|
1334
|
-
errorForbidden:
|
|
1335
|
-
errorInvalidAddress:
|
|
1336
|
-
errorInvalidCard:
|
|
1337
|
-
errorInvalidDate:
|
|
1338
|
-
errorInvalidEmail:
|
|
1339
|
-
errorInvalidIdCard:
|
|
1340
|
-
errorInvalidName:
|
|
1341
|
-
errorInvalidPhone:
|
|
1342
|
-
errorInvalidProviderName:
|
|
1343
|
-
errorInvalidRequest:
|
|
1344
|
-
errorInvalidTaxAuthorityCode:
|
|
1345
|
-
errorInvalidTaxCode:
|
|
1346
|
-
errorLoadingData:
|
|
1347
|
-
errorLoadingInitPackages:
|
|
1348
|
-
errorLoadingInvoicePackages:
|
|
1349
|
-
errorLoadingSignaturePackages:
|
|
1350
|
-
errorNetwork:
|
|
1351
|
-
errorNotFound:
|
|
1352
|
-
errorOrderStatus:
|
|
1353
|
-
errorQRGeneration:
|
|
1354
|
-
errorRequired:
|
|
1355
|
-
errorSearchingPackages:
|
|
1356
|
-
errorServer:
|
|
1357
|
-
errorServiceUnavailable:
|
|
1358
|
-
errorTooManyRequests:
|
|
1359
|
-
errorUnauthorized:
|
|
1360
|
-
errorUnknown:
|
|
1361
|
-
errorValidation:
|
|
1362
|
-
female:
|
|
1363
|
-
fileFormat:
|
|
1364
|
-
frontIdCard:
|
|
1365
|
-
fullName:
|
|
1366
|
-
gender:
|
|
1367
|
-
hasUsedEInvoice:
|
|
1368
|
-
hasUsedEInvoiceBefore:
|
|
1369
|
-
hotlineDesc:
|
|
1370
|
-
hotlineDomestic:
|
|
1371
|
-
idNumber:
|
|
1372
|
-
increase:
|
|
1373
|
-
informationSent:
|
|
1374
|
-
invoicePackage:
|
|
1375
|
-
invoiceSymbol:
|
|
1376
|
-
invoiceTemplate:
|
|
1377
|
-
invoiceTemplateTypes:
|
|
1378
|
-
invoiceTypeB:
|
|
1379
|
-
invoiceTypeD:
|
|
1380
|
-
invoiceTypeG:
|
|
1381
|
-
invoiceTypeH:
|
|
1382
|
-
invoiceTypeL:
|
|
1383
|
-
invoiceTypeM:
|
|
1384
|
-
invoiceTypeN:
|
|
1385
|
-
invoiceTypeT:
|
|
1386
|
-
invoiceTypeTooltip:
|
|
1387
|
-
invoiceTypeX:
|
|
1388
|
-
invoiceUsageInfo:
|
|
1389
|
-
invoicesPerMonth:
|
|
1390
|
-
legalRepInfo:
|
|
1391
|
-
legalRepNote:
|
|
1392
|
-
loading:
|
|
1393
|
-
male:
|
|
1394
|
-
maxFileSize:
|
|
1395
|
-
month:
|
|
1396
|
-
mostSuitablePackage:
|
|
1397
|
-
next:
|
|
1398
|
-
noDataAvailable:
|
|
1399
|
-
noPackageFound:
|
|
1400
|
-
notice1:
|
|
1401
|
-
notice2:
|
|
1317
|
+
digitalSignaturePackage: dn,
|
|
1318
|
+
district: hn,
|
|
1319
|
+
duration: fn,
|
|
1320
|
+
eContractTitle: gn,
|
|
1321
|
+
edit: pn,
|
|
1322
|
+
electronicInvoices: mn,
|
|
1323
|
+
email: yn,
|
|
1324
|
+
enterIdCard: vn,
|
|
1325
|
+
enterInvoiceSymbol: bn,
|
|
1326
|
+
enterPassport: Sn,
|
|
1327
|
+
enterProviderName: $n,
|
|
1328
|
+
enterTaxAuthorityCode: xn,
|
|
1329
|
+
errorCheckingCustomer: kn,
|
|
1330
|
+
errorCreatingOrder: Pn,
|
|
1331
|
+
errorFetchTaxInfo: wn,
|
|
1332
|
+
errorFileFormat: Cn,
|
|
1333
|
+
errorFileSize: Tn,
|
|
1334
|
+
errorForbidden: On,
|
|
1335
|
+
errorInvalidAddress: Ln,
|
|
1336
|
+
errorInvalidCard: In,
|
|
1337
|
+
errorInvalidDate: Nn,
|
|
1338
|
+
errorInvalidEmail: Rn,
|
|
1339
|
+
errorInvalidIdCard: An,
|
|
1340
|
+
errorInvalidName: Fn,
|
|
1341
|
+
errorInvalidPhone: En,
|
|
1342
|
+
errorInvalidProviderName: Dn,
|
|
1343
|
+
errorInvalidRequest: Un,
|
|
1344
|
+
errorInvalidTaxAuthorityCode: jn,
|
|
1345
|
+
errorInvalidTaxCode: Mn,
|
|
1346
|
+
errorLoadingData: Hn,
|
|
1347
|
+
errorLoadingInitPackages: Kn,
|
|
1348
|
+
errorLoadingInvoicePackages: Bn,
|
|
1349
|
+
errorLoadingSignaturePackages: Vn,
|
|
1350
|
+
errorNetwork: qn,
|
|
1351
|
+
errorNotFound: zn,
|
|
1352
|
+
errorOrderStatus: Qn,
|
|
1353
|
+
errorQRGeneration: Gn,
|
|
1354
|
+
errorRequired: Wn,
|
|
1355
|
+
errorSearchingPackages: _n,
|
|
1356
|
+
errorServer: Xn,
|
|
1357
|
+
errorServiceUnavailable: Jn,
|
|
1358
|
+
errorTooManyRequests: Yn,
|
|
1359
|
+
errorUnauthorized: Zn,
|
|
1360
|
+
errorUnknown: ei,
|
|
1361
|
+
errorValidation: ti,
|
|
1362
|
+
female: ni,
|
|
1363
|
+
fileFormat: ii,
|
|
1364
|
+
frontIdCard: oi,
|
|
1365
|
+
fullName: si,
|
|
1366
|
+
gender: ri,
|
|
1367
|
+
hasUsedEInvoice: ai,
|
|
1368
|
+
hasUsedEInvoiceBefore: ci,
|
|
1369
|
+
hotlineDesc: li,
|
|
1370
|
+
hotlineDomestic: ui,
|
|
1371
|
+
idNumber: di,
|
|
1372
|
+
increase: hi,
|
|
1373
|
+
informationSent: fi,
|
|
1374
|
+
invoicePackage: gi,
|
|
1375
|
+
invoiceSymbol: pi,
|
|
1376
|
+
invoiceTemplate: mi,
|
|
1377
|
+
invoiceTemplateTypes: yi,
|
|
1378
|
+
invoiceTypeB: vi,
|
|
1379
|
+
invoiceTypeD: bi,
|
|
1380
|
+
invoiceTypeG: Si,
|
|
1381
|
+
invoiceTypeH: $i,
|
|
1382
|
+
invoiceTypeL: xi,
|
|
1383
|
+
invoiceTypeM: ki,
|
|
1384
|
+
invoiceTypeN: Pi,
|
|
1385
|
+
invoiceTypeT: wi,
|
|
1386
|
+
invoiceTypeTooltip: Ci,
|
|
1387
|
+
invoiceTypeX: Ti,
|
|
1388
|
+
invoiceUsageInfo: Oi,
|
|
1389
|
+
invoicesPerMonth: Li,
|
|
1390
|
+
legalRepInfo: Ii,
|
|
1391
|
+
legalRepNote: Ni,
|
|
1392
|
+
loading: Ri,
|
|
1393
|
+
male: Ai,
|
|
1394
|
+
maxFileSize: Fi,
|
|
1395
|
+
month: Ei,
|
|
1396
|
+
mostSuitablePackage: Di,
|
|
1397
|
+
next: Ui,
|
|
1398
|
+
noDataAvailable: ji,
|
|
1399
|
+
noPackageFound: Mi,
|
|
1400
|
+
notice1: Hi,
|
|
1401
|
+
notice2: Ki,
|
|
1402
1402
|
"notice3.1": "After being granted an account, please go to the Link",
|
|
1403
1403
|
"notice3.2": "to connect and use the service HDDT",
|
|
1404
|
-
of:
|
|
1405
|
-
ok:
|
|
1406
|
-
optional:
|
|
1407
|
-
or:
|
|
1408
|
-
orderCreated:
|
|
1409
|
-
orderExpired:
|
|
1410
|
-
orderInfo:
|
|
1411
|
-
orderSummary:
|
|
1412
|
-
organizationCert:
|
|
1404
|
+
of: Bi,
|
|
1405
|
+
ok: Vi,
|
|
1406
|
+
optional: qi,
|
|
1407
|
+
or: zi,
|
|
1408
|
+
orderCreated: Qi,
|
|
1409
|
+
orderExpired: Gi,
|
|
1410
|
+
orderInfo: Wi,
|
|
1411
|
+
orderSummary: _i,
|
|
1412
|
+
organizationCert: Xi,
|
|
1413
1413
|
package: "Package",
|
|
1414
|
-
passport:
|
|
1415
|
-
paymentAmount:
|
|
1416
|
-
paymentFailed:
|
|
1417
|
-
paymentInstructions:
|
|
1418
|
-
paymentInstructionsTitle:
|
|
1419
|
-
paymentMethod:
|
|
1420
|
-
paymentSuccess:
|
|
1421
|
-
paymentTimeout:
|
|
1422
|
-
paymentTimeoutMessage:
|
|
1423
|
-
paymentTitle:
|
|
1424
|
-
permanentAddress:
|
|
1425
|
-
phone:
|
|
1426
|
-
product:
|
|
1427
|
-
provider:
|
|
1428
|
-
providerName:
|
|
1429
|
-
province:
|
|
1430
|
-
qrPayment:
|
|
1431
|
-
qrPaymentTitle:
|
|
1432
|
-
quantity:
|
|
1433
|
-
registrationFee:
|
|
1434
|
-
required:
|
|
1435
|
-
returnHome:
|
|
1436
|
-
returnToStep1:
|
|
1437
|
-
sampleNumberTooltip:
|
|
1438
|
-
save:
|
|
1439
|
-
searchUnits:
|
|
1440
|
-
selectFile:
|
|
1441
|
-
selectInvoicePackage:
|
|
1442
|
-
selectProvider:
|
|
1443
|
-
selectSignaturePackage:
|
|
1444
|
-
selectSubscriptionPackage:
|
|
1445
|
-
selectedProducts:
|
|
1446
|
-
settings:
|
|
1447
|
-
signaturePackage:
|
|
1448
|
-
softwareLicense:
|
|
1449
|
-
stepInfo:
|
|
1450
|
-
stepPayment:
|
|
1451
|
-
stepPlan:
|
|
1452
|
-
subscriptionPackage:
|
|
1453
|
-
taxAuthority:
|
|
1454
|
-
taxAuthorityCode:
|
|
1455
|
-
taxCode:
|
|
1456
|
-
termsAndUsagePolicy:
|
|
1457
|
-
timeLeft:
|
|
1458
|
-
total:
|
|
1459
|
-
totalAmount:
|
|
1460
|
-
totalPrice:
|
|
1461
|
-
transactionCanceled:
|
|
1462
|
-
unit:
|
|
1463
|
-
unitInfo:
|
|
1464
|
-
unitPerMonth:
|
|
1465
|
-
unitPrice:
|
|
1466
|
-
unitsPerMonth:
|
|
1467
|
-
uploadBackId:
|
|
1468
|
-
uploadFile:
|
|
1469
|
-
uploadFrontId:
|
|
1470
|
-
uploadLogo:
|
|
1471
|
-
usagePolicy:
|
|
1472
|
-
ward:
|
|
1473
|
-
website:
|
|
1474
|
-
widgetTitle:
|
|
1475
|
-
yearTooltip:
|
|
1476
|
-
},
|
|
1477
|
-
accountName:
|
|
1478
|
-
accountNumber:
|
|
1479
|
-
address:
|
|
1480
|
-
agreeWith:
|
|
1481
|
-
and:
|
|
1482
|
-
back:
|
|
1483
|
-
backIdCard:
|
|
1484
|
-
bankName:
|
|
1485
|
-
beneficiaryBank:
|
|
1486
|
-
businessLicense:
|
|
1487
|
-
cancel:
|
|
1488
|
-
cancelTransaction:
|
|
1489
|
-
close:
|
|
1490
|
-
codeTypeC:
|
|
1491
|
-
codeTypeK:
|
|
1492
|
-
codeTypeTooltip:
|
|
1493
|
-
comingSoon:
|
|
1494
|
-
companyName:
|
|
1495
|
-
completePaymentIn:
|
|
1496
|
-
completeRegistration:
|
|
1497
|
-
confirm:
|
|
1498
|
-
confirmationTitle:
|
|
1499
|
-
contactInfo:
|
|
1500
|
-
copy:
|
|
1501
|
-
country:
|
|
1502
|
-
customLettersTooltip:
|
|
1503
|
-
customUnits:
|
|
1504
|
-
dateOfBirth:
|
|
1505
|
-
decrease:
|
|
1414
|
+
passport: Ji,
|
|
1415
|
+
paymentAmount: Yi,
|
|
1416
|
+
paymentFailed: Zi,
|
|
1417
|
+
paymentInstructions: eo,
|
|
1418
|
+
paymentInstructionsTitle: to,
|
|
1419
|
+
paymentMethod: no,
|
|
1420
|
+
paymentSuccess: io,
|
|
1421
|
+
paymentTimeout: oo,
|
|
1422
|
+
paymentTimeoutMessage: so,
|
|
1423
|
+
paymentTitle: ro,
|
|
1424
|
+
permanentAddress: ao,
|
|
1425
|
+
phone: co,
|
|
1426
|
+
product: lo,
|
|
1427
|
+
provider: uo,
|
|
1428
|
+
providerName: ho,
|
|
1429
|
+
province: fo,
|
|
1430
|
+
qrPayment: go,
|
|
1431
|
+
qrPaymentTitle: po,
|
|
1432
|
+
quantity: mo,
|
|
1433
|
+
registrationFee: yo,
|
|
1434
|
+
required: vo,
|
|
1435
|
+
returnHome: bo,
|
|
1436
|
+
returnToStep1: So,
|
|
1437
|
+
sampleNumberTooltip: $o,
|
|
1438
|
+
save: xo,
|
|
1439
|
+
searchUnits: ko,
|
|
1440
|
+
selectFile: Po,
|
|
1441
|
+
selectInvoicePackage: wo,
|
|
1442
|
+
selectProvider: Co,
|
|
1443
|
+
selectSignaturePackage: To,
|
|
1444
|
+
selectSubscriptionPackage: Oo,
|
|
1445
|
+
selectedProducts: Lo,
|
|
1446
|
+
settings: Io,
|
|
1447
|
+
signaturePackage: No,
|
|
1448
|
+
softwareLicense: Ro,
|
|
1449
|
+
stepInfo: Ao,
|
|
1450
|
+
stepPayment: Fo,
|
|
1451
|
+
stepPlan: Eo,
|
|
1452
|
+
subscriptionPackage: Do,
|
|
1453
|
+
taxAuthority: Uo,
|
|
1454
|
+
taxAuthorityCode: jo,
|
|
1455
|
+
taxCode: Mo,
|
|
1456
|
+
termsAndUsagePolicy: Ho,
|
|
1457
|
+
timeLeft: Ko,
|
|
1458
|
+
total: Bo,
|
|
1459
|
+
totalAmount: Vo,
|
|
1460
|
+
totalPrice: qo,
|
|
1461
|
+
transactionCanceled: zo,
|
|
1462
|
+
unit: Qo,
|
|
1463
|
+
unitInfo: Go,
|
|
1464
|
+
unitPerMonth: Wo,
|
|
1465
|
+
unitPrice: _o,
|
|
1466
|
+
unitsPerMonth: Xo,
|
|
1467
|
+
uploadBackId: Jo,
|
|
1468
|
+
uploadFile: Yo,
|
|
1469
|
+
uploadFrontId: Zo,
|
|
1470
|
+
uploadLogo: es,
|
|
1471
|
+
usagePolicy: ts,
|
|
1472
|
+
ward: ns,
|
|
1473
|
+
website: is,
|
|
1474
|
+
widgetTitle: os,
|
|
1475
|
+
yearTooltip: ss
|
|
1476
|
+
}, as = "Tên tài khoản", cs = "Số tài khoản", ls = "Địa chỉ đơn vị", us = "Tôi đồng ý với", ds = "và", hs = "Quay lại", fs = "Mặt sau CCCD", gs = "Ngân hàng", ps = "Ngân hàng thụ hưởng", ms = "Giấy phép đăng ký kinh doanh", ys = "Hủy", vs = "Hủy giao dịch", bs = "Đóng", Ss = "C (Có mã CQT)", $s = "K (Không mã)", xs = "C: Có mã CQT, K: Không mã", ks = "Sắp ra mắt", Ps = "Tên đơn vị", ws = "Hoàn tất thanh toán của bạn trong", Cs = "Hoàn tất đăng ký", Ts = "Xác nhận", Os = "Thông tin lưu ý:", Ls = "3. Thông tin người liên hệ:", Is = "Bản", Ns = "Quốc gia", Rs = "2 ký tự tùy chọn (mặc định: YY)", As = "Số lượng tùy chỉnh", Fs = "Ngày sinh", Es = "Giảm", Ds = "Gói chữ ký số", Us = "Quận/Huyện", js = "Thời hạn", Ms = "E-Contract", Hs = "Chỉnh sửa", Ks = "hóa đơn điện tử", Bs = "Email", Vs = "Nhập số CMND/CCCD", qs = "Nhập ký hiệu hóa đơn", zs = "Nhập số hộ chiếu", Qs = "Nhập tên nhà cung cấp", Gs = "Nhập mã CQT cấp", Ws = "Không thể kiểm tra trạng thái khách hàng", _s = "Không thể tạo đơn hàng", Xs = "Lỗi khi lấy thông tin mã số thuế.", Js = "Định dạng tệp không được hỗ trợ", Ys = "Kích thước tệp quá lớn", Zs = "Truy cập bị từ chối", er = "Địa chỉ không được chứa ký tự đặc biệt", tr = "CCCD không hợp lệ", nr = "Ngày sinh không hợp lệ", ir = "Email không hợp lệ", or = "Số CCCD không hợp lệ", sr = "Chỉ được dùng chữ cái, số và dấu gạch dưới", rr = "Số điện thoại không hợp lệ", ar = "Tên nhà cung cấp không hợp lệ", cr = "Yêu cầu không hợp lệ", lr = "Mã CQT cấp không hợp lệ", ur = "Mã số thuế không hợp lệ", dr = "Không thể tải dữ liệu", hr = "Không thể tải gói đăng ký", fr = "Không thể tải gói hóa đơn", gr = "Không thể tải gói chữ ký số", pr = "Lỗi kết nối mạng", mr = "Không tìm thấy dữ liệu", yr = "Không thể kiểm tra trạng thái thanh toán đơn hàng. Vui lòng thử lại.", vr = "Không thể tạo mã QR thanh toán. Vui lòng thử lại.", br = "Trường này là bắt buộc", Sr = "Không thể tìm kiếm gói", $r = "Lỗi máy chủ, vui lòng thử lại sau", xr = "Dịch vụ tạm thời không khả dụng", kr = "Quá nhiều yêu cầu, vui lòng thử lại sau", Pr = "Không có quyền truy cập", wr = "Đã xảy ra lỗi", Cr = "Dữ liệu không hợp lệ", Tr = "Nữ", Or = "Định dạng", Lr = "Mặt trước CCCD", Ir = "Họ và tên", Nr = "Giới tính", Rr = "Bạn đã sử dụng hoá đơn điện tử?", Ar = "Bạn đang sử dụng nhà NCC hoá đơn điện tử khác M-invoice không?", Fr = "(Tổng đài Tư vấn, Hỗ trợ miễn phí)", Er = "Hotline:", Dr = "CCCD", Ur = "Tăng", jr = "Đã gửi thông tin sang nhà cung cấp", Mr = "Gói hóa đơn", Hr = "Ký hiệu hóa đơn", Kr = "Mẫu số", Br = { 1: "1 (Hóa đơn GTGT)", 2: "2 (Hóa đơn bán hàng)", 3: "3 (Bán tài sản công)", 4: "4 (Bán dự trữ quốc gia)", 5: "5 (Tem, vé, thẻ khác)", 6: "6 (Chứng từ nội bộ)", 7: "7 (Hóa đơn thương mại)", 8: "8 (GTGT tích hợp thuế)", 9: "9 (Bán hàng tích hợp thuế)" }, Vr = "B (Đại lý)", qr = "D (Tài sản)", zr = "G (Tem GTGT)", Qr = "H (Tem bán hàng)", Gr = "L (CQT)", Wr = "M (Máy tính tiền)", _r = "N (Nội bộ)", Xr = "T (Đăng ký)", Jr = "Loại hóa đơn", Yr = "X (Thương mại)", Zr = "4. THÔNG TIN SỬ DỤNG HDDT:", ea = "hóa đơn/tháng", ta = "2. Thông tin người đại diện pháp luật:", na = "Vui lòng kiểm tra và nhập đúng tên người đại diện theo Giấy phép kinh doanh đã tải lên.", ia = "Đang tải...", oa = "Nam", sa = "Tối đa 500Kb", ra = "Tháng", aa = "Gói phù hợp nhất", ca = "Tiếp tục", la = "Không có dữ liệu", ua = "Không tìm thấy gói nào.", da = "Vui lòng thường xuyên kiểm tra hộp thư Email nhận thông báo thông tin tài khoản từ nhà cung cấp", ha = "Trong vòng 2 giờ nếu chưa nhận được thông tin Email tài khoản (username/password). Bạn có thể liên hệ thông tin phía bên dưới để được hỗ trợ sớm nhất:", fa = "của", ga = "OK", pa = "Tùy chọn", ma = "hoặc", ya = "Đơn hàng đã được tạo thành công", va = "Đơn hàng đã hết hạn", ba = "Thông tin đơn hàng", Sa = "Tóm tắt đơn hàng", $a = "Giấy chứng nhận đăng ký doanh nghiệp", xa = "Hộ chiếu", ka = "Số tiền thanh toán", Pa = "Thanh toán thất bại", wa = ["Mở ứng dụng Ngân hàng hoặc Ví điện tử trên điện thoại", "Trên ứng dụng chọn tính năng Quét mã QR", "Quét mã QR ở trang này và thanh toán"], Ca = "Hướng dẫn thanh toán QR", Ta = "Hình thức thanh toán:", Oa = "Thanh toán thành công!", La = "Hết thời gian thanh toán", Ia = "Hết thời gian thanh toán! Vui lòng thử lại.", Na = "Thanh toán", Ra = "Địa chỉ thường trú", Aa = "Số điện thoại", Fa = "Sản phẩm", Ea = "Nhà cung cấp", Da = "Tên NCC", Ua = "Tỉnh/Thành phố", ja = "Thanh toán qua mã QR", Ma = "Quét mã QR để thanh toán", Ha = "Số lượng", Ka = "Phí đăng ký", Ba = "Bắt buộc", Va = "Trở về trang chủ", qa = "Quay lại bước 1", za = "Mẫu số hóa đơn (1-9)", Qa = "Lưu", Ga = "Số đơn/tháng", Wa = "Chọn tệp", _a = "Chọn gói hóa đơn điện tử", Xa = "Chọn nhà cung cấp", Ja = "Chọn gói chữ ký số", Ya = "Chọn gói đăng ký", Za = "Sản phẩm đã chọn", ec = "Thiết lập", tc = "Gói chữ ký số", nc = "Bản quyền phần mềm hóa đơn điện tử", ic = "Thông Tin", oc = "Xác Nhận Và Thanh Toán", sc = "Gói Hóa Đơn", rc = "Gói đăng ký", ac = "CQT quản lý", cc = "5 ký tự do CQT cấp cho loại hóa đơn máy tính tiền", lc = "Mã số thuế đơn vị", uc = "Điều khoản và Chính sách sử dụng", dc = "Thời gian còn lại", hc = "Tổng cộng", fc = "Tổng tiền", gc = "Thành tiền", pc = "Giao dịch đã được hủy. Quay về trang đăng ký.", mc = "Đơn vị tính", yc = "1. Thông tin đơn vị", vc = "đơn/tháng", bc = "Đơn giá", Sc = "đơn/ tháng", $c = "Tải lên mặt sau CCCD", xc = "Tải lên tệp", kc = "Tải lên mặt trước CCCD", Pc = "Tải logo lên", wc = "Chính sách sử dụng", Cc = "Phường/Xã", Tc = "Website", Oc = "Đăng ký hóa đơn điện tử", Lc = "Năm phát hành (2 chữ số cuối)", Ic = {
|
|
1477
|
+
accountName: as,
|
|
1478
|
+
accountNumber: cs,
|
|
1479
|
+
address: ls,
|
|
1480
|
+
agreeWith: us,
|
|
1481
|
+
and: ds,
|
|
1482
|
+
back: hs,
|
|
1483
|
+
backIdCard: fs,
|
|
1484
|
+
bankName: gs,
|
|
1485
|
+
beneficiaryBank: ps,
|
|
1486
|
+
businessLicense: ms,
|
|
1487
|
+
cancel: ys,
|
|
1488
|
+
cancelTransaction: vs,
|
|
1489
|
+
close: bs,
|
|
1490
|
+
codeTypeC: Ss,
|
|
1491
|
+
codeTypeK: $s,
|
|
1492
|
+
codeTypeTooltip: xs,
|
|
1493
|
+
comingSoon: ks,
|
|
1494
|
+
companyName: Ps,
|
|
1495
|
+
completePaymentIn: ws,
|
|
1496
|
+
completeRegistration: Cs,
|
|
1497
|
+
confirm: Ts,
|
|
1498
|
+
confirmationTitle: Os,
|
|
1499
|
+
contactInfo: Ls,
|
|
1500
|
+
copy: Is,
|
|
1501
|
+
country: Ns,
|
|
1502
|
+
customLettersTooltip: Rs,
|
|
1503
|
+
customUnits: As,
|
|
1504
|
+
dateOfBirth: Fs,
|
|
1505
|
+
decrease: Es,
|
|
1506
1506
|
delete: "Xóa",
|
|
1507
|
-
digitalSignaturePackage:
|
|
1508
|
-
district:
|
|
1509
|
-
duration:
|
|
1510
|
-
eContractTitle:
|
|
1511
|
-
edit:
|
|
1512
|
-
electronicInvoices:
|
|
1513
|
-
email:
|
|
1514
|
-
enterIdCard:
|
|
1515
|
-
enterInvoiceSymbol:
|
|
1516
|
-
enterPassport:
|
|
1517
|
-
enterProviderName:
|
|
1518
|
-
enterTaxAuthorityCode:
|
|
1519
|
-
errorCheckingCustomer:
|
|
1520
|
-
errorCreatingOrder:
|
|
1521
|
-
errorFetchTaxInfo:
|
|
1522
|
-
errorFileFormat:
|
|
1523
|
-
errorFileSize:
|
|
1524
|
-
errorForbidden:
|
|
1525
|
-
errorInvalidAddress:
|
|
1526
|
-
errorInvalidCard:
|
|
1527
|
-
errorInvalidDate:
|
|
1528
|
-
errorInvalidEmail:
|
|
1529
|
-
errorInvalidIdCard:
|
|
1530
|
-
errorInvalidName:
|
|
1531
|
-
errorInvalidPhone:
|
|
1532
|
-
errorInvalidProviderName:
|
|
1533
|
-
errorInvalidRequest:
|
|
1534
|
-
errorInvalidTaxAuthorityCode:
|
|
1535
|
-
errorInvalidTaxCode:
|
|
1536
|
-
errorLoadingData:
|
|
1537
|
-
errorLoadingInitPackages:
|
|
1538
|
-
errorLoadingInvoicePackages:
|
|
1539
|
-
errorLoadingSignaturePackages:
|
|
1540
|
-
errorNetwork:
|
|
1541
|
-
errorNotFound:
|
|
1542
|
-
errorOrderStatus:
|
|
1543
|
-
errorQRGeneration:
|
|
1544
|
-
errorRequired:
|
|
1545
|
-
errorSearchingPackages:
|
|
1546
|
-
errorServer:
|
|
1547
|
-
errorServiceUnavailable:
|
|
1548
|
-
errorTooManyRequests:
|
|
1549
|
-
errorUnauthorized:
|
|
1550
|
-
errorUnknown:
|
|
1551
|
-
errorValidation:
|
|
1552
|
-
female:
|
|
1553
|
-
fileFormat:
|
|
1554
|
-
frontIdCard:
|
|
1555
|
-
fullName:
|
|
1556
|
-
gender:
|
|
1557
|
-
hasUsedEInvoice:
|
|
1558
|
-
hasUsedEInvoiceBefore:
|
|
1559
|
-
hotlineDesc:
|
|
1560
|
-
hotlineDomestic:
|
|
1561
|
-
idNumber:
|
|
1562
|
-
increase:
|
|
1563
|
-
informationSent:
|
|
1564
|
-
invoicePackage:
|
|
1565
|
-
invoiceSymbol:
|
|
1566
|
-
invoiceTemplate:
|
|
1567
|
-
invoiceTemplateTypes:
|
|
1568
|
-
invoiceTypeB:
|
|
1569
|
-
invoiceTypeD:
|
|
1570
|
-
invoiceTypeG:
|
|
1571
|
-
invoiceTypeH:
|
|
1572
|
-
invoiceTypeL:
|
|
1573
|
-
invoiceTypeM:
|
|
1574
|
-
invoiceTypeN:
|
|
1575
|
-
invoiceTypeT:
|
|
1576
|
-
invoiceTypeTooltip:
|
|
1577
|
-
invoiceTypeX:
|
|
1578
|
-
invoiceUsageInfo:
|
|
1579
|
-
invoicesPerMonth:
|
|
1580
|
-
legalRepInfo:
|
|
1581
|
-
legalRepNote:
|
|
1582
|
-
loading:
|
|
1583
|
-
male:
|
|
1584
|
-
maxFileSize:
|
|
1585
|
-
month:
|
|
1586
|
-
mostSuitablePackage:
|
|
1587
|
-
next:
|
|
1588
|
-
noDataAvailable:
|
|
1589
|
-
noPackageFound:
|
|
1590
|
-
notice1:
|
|
1591
|
-
notice2:
|
|
1507
|
+
digitalSignaturePackage: Ds,
|
|
1508
|
+
district: Us,
|
|
1509
|
+
duration: js,
|
|
1510
|
+
eContractTitle: Ms,
|
|
1511
|
+
edit: Hs,
|
|
1512
|
+
electronicInvoices: Ks,
|
|
1513
|
+
email: Bs,
|
|
1514
|
+
enterIdCard: Vs,
|
|
1515
|
+
enterInvoiceSymbol: qs,
|
|
1516
|
+
enterPassport: zs,
|
|
1517
|
+
enterProviderName: Qs,
|
|
1518
|
+
enterTaxAuthorityCode: Gs,
|
|
1519
|
+
errorCheckingCustomer: Ws,
|
|
1520
|
+
errorCreatingOrder: _s,
|
|
1521
|
+
errorFetchTaxInfo: Xs,
|
|
1522
|
+
errorFileFormat: Js,
|
|
1523
|
+
errorFileSize: Ys,
|
|
1524
|
+
errorForbidden: Zs,
|
|
1525
|
+
errorInvalidAddress: er,
|
|
1526
|
+
errorInvalidCard: tr,
|
|
1527
|
+
errorInvalidDate: nr,
|
|
1528
|
+
errorInvalidEmail: ir,
|
|
1529
|
+
errorInvalidIdCard: or,
|
|
1530
|
+
errorInvalidName: sr,
|
|
1531
|
+
errorInvalidPhone: rr,
|
|
1532
|
+
errorInvalidProviderName: ar,
|
|
1533
|
+
errorInvalidRequest: cr,
|
|
1534
|
+
errorInvalidTaxAuthorityCode: lr,
|
|
1535
|
+
errorInvalidTaxCode: ur,
|
|
1536
|
+
errorLoadingData: dr,
|
|
1537
|
+
errorLoadingInitPackages: hr,
|
|
1538
|
+
errorLoadingInvoicePackages: fr,
|
|
1539
|
+
errorLoadingSignaturePackages: gr,
|
|
1540
|
+
errorNetwork: pr,
|
|
1541
|
+
errorNotFound: mr,
|
|
1542
|
+
errorOrderStatus: yr,
|
|
1543
|
+
errorQRGeneration: vr,
|
|
1544
|
+
errorRequired: br,
|
|
1545
|
+
errorSearchingPackages: Sr,
|
|
1546
|
+
errorServer: $r,
|
|
1547
|
+
errorServiceUnavailable: xr,
|
|
1548
|
+
errorTooManyRequests: kr,
|
|
1549
|
+
errorUnauthorized: Pr,
|
|
1550
|
+
errorUnknown: wr,
|
|
1551
|
+
errorValidation: Cr,
|
|
1552
|
+
female: Tr,
|
|
1553
|
+
fileFormat: Or,
|
|
1554
|
+
frontIdCard: Lr,
|
|
1555
|
+
fullName: Ir,
|
|
1556
|
+
gender: Nr,
|
|
1557
|
+
hasUsedEInvoice: Rr,
|
|
1558
|
+
hasUsedEInvoiceBefore: Ar,
|
|
1559
|
+
hotlineDesc: Fr,
|
|
1560
|
+
hotlineDomestic: Er,
|
|
1561
|
+
idNumber: Dr,
|
|
1562
|
+
increase: Ur,
|
|
1563
|
+
informationSent: jr,
|
|
1564
|
+
invoicePackage: Mr,
|
|
1565
|
+
invoiceSymbol: Hr,
|
|
1566
|
+
invoiceTemplate: Kr,
|
|
1567
|
+
invoiceTemplateTypes: Br,
|
|
1568
|
+
invoiceTypeB: Vr,
|
|
1569
|
+
invoiceTypeD: qr,
|
|
1570
|
+
invoiceTypeG: zr,
|
|
1571
|
+
invoiceTypeH: Qr,
|
|
1572
|
+
invoiceTypeL: Gr,
|
|
1573
|
+
invoiceTypeM: Wr,
|
|
1574
|
+
invoiceTypeN: _r,
|
|
1575
|
+
invoiceTypeT: Xr,
|
|
1576
|
+
invoiceTypeTooltip: Jr,
|
|
1577
|
+
invoiceTypeX: Yr,
|
|
1578
|
+
invoiceUsageInfo: Zr,
|
|
1579
|
+
invoicesPerMonth: ea,
|
|
1580
|
+
legalRepInfo: ta,
|
|
1581
|
+
legalRepNote: na,
|
|
1582
|
+
loading: ia,
|
|
1583
|
+
male: oa,
|
|
1584
|
+
maxFileSize: sa,
|
|
1585
|
+
month: ra,
|
|
1586
|
+
mostSuitablePackage: aa,
|
|
1587
|
+
next: ca,
|
|
1588
|
+
noDataAvailable: la,
|
|
1589
|
+
noPackageFound: ua,
|
|
1590
|
+
notice1: da,
|
|
1591
|
+
notice2: ha,
|
|
1592
1592
|
"notice3.1": "Sau khi được cấp tài khoản, vui lòng vào Link",
|
|
1593
1593
|
"notice3.2": "để kết nối và sử dụng dịch vụ HDDT",
|
|
1594
|
-
of:
|
|
1595
|
-
ok:
|
|
1596
|
-
optional:
|
|
1597
|
-
or:
|
|
1598
|
-
orderCreated:
|
|
1599
|
-
orderExpired:
|
|
1600
|
-
orderInfo:
|
|
1601
|
-
orderSummary:
|
|
1602
|
-
organizationCert:
|
|
1594
|
+
of: fa,
|
|
1595
|
+
ok: ga,
|
|
1596
|
+
optional: pa,
|
|
1597
|
+
or: ma,
|
|
1598
|
+
orderCreated: ya,
|
|
1599
|
+
orderExpired: va,
|
|
1600
|
+
orderInfo: ba,
|
|
1601
|
+
orderSummary: Sa,
|
|
1602
|
+
organizationCert: $a,
|
|
1603
1603
|
package: "Gói",
|
|
1604
|
-
passport:
|
|
1605
|
-
paymentAmount:
|
|
1606
|
-
paymentFailed:
|
|
1607
|
-
paymentInstructions:
|
|
1608
|
-
paymentInstructionsTitle:
|
|
1609
|
-
paymentMethod:
|
|
1610
|
-
paymentSuccess:
|
|
1611
|
-
paymentTimeout:
|
|
1612
|
-
paymentTimeoutMessage:
|
|
1613
|
-
paymentTitle:
|
|
1614
|
-
permanentAddress:
|
|
1615
|
-
phone:
|
|
1616
|
-
product:
|
|
1617
|
-
provider:
|
|
1618
|
-
providerName:
|
|
1619
|
-
province:
|
|
1620
|
-
qrPayment:
|
|
1621
|
-
qrPaymentTitle:
|
|
1622
|
-
quantity:
|
|
1623
|
-
registrationFee:
|
|
1624
|
-
required:
|
|
1625
|
-
returnHome:
|
|
1626
|
-
returnToStep1:
|
|
1627
|
-
sampleNumberTooltip:
|
|
1628
|
-
save:
|
|
1629
|
-
searchUnits:
|
|
1630
|
-
selectFile:
|
|
1631
|
-
selectInvoicePackage:
|
|
1632
|
-
selectProvider:
|
|
1633
|
-
selectSignaturePackage:
|
|
1634
|
-
selectSubscriptionPackage:
|
|
1635
|
-
selectedProducts:
|
|
1636
|
-
settings:
|
|
1637
|
-
signaturePackage:
|
|
1638
|
-
softwareLicense:
|
|
1639
|
-
stepInfo:
|
|
1640
|
-
stepPayment:
|
|
1641
|
-
stepPlan:
|
|
1642
|
-
subscriptionPackage:
|
|
1643
|
-
taxAuthority:
|
|
1644
|
-
taxAuthorityCode:
|
|
1645
|
-
taxCode:
|
|
1646
|
-
termsAndUsagePolicy:
|
|
1647
|
-
timeLeft:
|
|
1648
|
-
total:
|
|
1649
|
-
totalAmount:
|
|
1650
|
-
totalPrice:
|
|
1651
|
-
transactionCanceled:
|
|
1652
|
-
unit:
|
|
1653
|
-
unitInfo:
|
|
1654
|
-
unitPerMonth:
|
|
1655
|
-
unitPrice:
|
|
1656
|
-
unitsPerMonth:
|
|
1657
|
-
uploadBackId:
|
|
1658
|
-
uploadFile:
|
|
1659
|
-
uploadFrontId:
|
|
1660
|
-
uploadLogo:
|
|
1661
|
-
usagePolicy:
|
|
1662
|
-
ward:
|
|
1663
|
-
website:
|
|
1664
|
-
widgetTitle:
|
|
1665
|
-
yearTooltip:
|
|
1604
|
+
passport: xa,
|
|
1605
|
+
paymentAmount: ka,
|
|
1606
|
+
paymentFailed: Pa,
|
|
1607
|
+
paymentInstructions: wa,
|
|
1608
|
+
paymentInstructionsTitle: Ca,
|
|
1609
|
+
paymentMethod: Ta,
|
|
1610
|
+
paymentSuccess: Oa,
|
|
1611
|
+
paymentTimeout: La,
|
|
1612
|
+
paymentTimeoutMessage: Ia,
|
|
1613
|
+
paymentTitle: Na,
|
|
1614
|
+
permanentAddress: Ra,
|
|
1615
|
+
phone: Aa,
|
|
1616
|
+
product: Fa,
|
|
1617
|
+
provider: Ea,
|
|
1618
|
+
providerName: Da,
|
|
1619
|
+
province: Ua,
|
|
1620
|
+
qrPayment: ja,
|
|
1621
|
+
qrPaymentTitle: Ma,
|
|
1622
|
+
quantity: Ha,
|
|
1623
|
+
registrationFee: Ka,
|
|
1624
|
+
required: Ba,
|
|
1625
|
+
returnHome: Va,
|
|
1626
|
+
returnToStep1: qa,
|
|
1627
|
+
sampleNumberTooltip: za,
|
|
1628
|
+
save: Qa,
|
|
1629
|
+
searchUnits: Ga,
|
|
1630
|
+
selectFile: Wa,
|
|
1631
|
+
selectInvoicePackage: _a,
|
|
1632
|
+
selectProvider: Xa,
|
|
1633
|
+
selectSignaturePackage: Ja,
|
|
1634
|
+
selectSubscriptionPackage: Ya,
|
|
1635
|
+
selectedProducts: Za,
|
|
1636
|
+
settings: ec,
|
|
1637
|
+
signaturePackage: tc,
|
|
1638
|
+
softwareLicense: nc,
|
|
1639
|
+
stepInfo: ic,
|
|
1640
|
+
stepPayment: oc,
|
|
1641
|
+
stepPlan: sc,
|
|
1642
|
+
subscriptionPackage: rc,
|
|
1643
|
+
taxAuthority: ac,
|
|
1644
|
+
taxAuthorityCode: cc,
|
|
1645
|
+
taxCode: lc,
|
|
1646
|
+
termsAndUsagePolicy: uc,
|
|
1647
|
+
timeLeft: dc,
|
|
1648
|
+
total: hc,
|
|
1649
|
+
totalAmount: fc,
|
|
1650
|
+
totalPrice: gc,
|
|
1651
|
+
transactionCanceled: pc,
|
|
1652
|
+
unit: mc,
|
|
1653
|
+
unitInfo: yc,
|
|
1654
|
+
unitPerMonth: vc,
|
|
1655
|
+
unitPrice: bc,
|
|
1656
|
+
unitsPerMonth: Sc,
|
|
1657
|
+
uploadBackId: $c,
|
|
1658
|
+
uploadFile: xc,
|
|
1659
|
+
uploadFrontId: kc,
|
|
1660
|
+
uploadLogo: Pc,
|
|
1661
|
+
usagePolicy: wc,
|
|
1662
|
+
ward: Cc,
|
|
1663
|
+
website: Tc,
|
|
1664
|
+
widgetTitle: Oc,
|
|
1665
|
+
yearTooltip: Lc
|
|
1666
1666
|
}, {
|
|
1667
|
-
slice:
|
|
1668
|
-
forEach:
|
|
1667
|
+
slice: Nc,
|
|
1668
|
+
forEach: Rc
|
|
1669
1669
|
} = [];
|
|
1670
|
-
function
|
|
1671
|
-
return
|
|
1670
|
+
function Ac(o) {
|
|
1671
|
+
return Rc.call(Nc.call(arguments, 1), (e) => {
|
|
1672
1672
|
if (e)
|
|
1673
1673
|
for (const t in e)
|
|
1674
1674
|
o[t] === void 0 && (o[t] = e[t]);
|
|
1675
1675
|
}), o;
|
|
1676
1676
|
}
|
|
1677
|
-
function
|
|
1677
|
+
function Fc(o) {
|
|
1678
1678
|
return typeof o != "string" ? !1 : [/<\s*script.*?>/i, /<\s*\/\s*script\s*>/i, /<\s*img.*?on\w+\s*=/i, /<\s*\w+\s*on\w+\s*=.*?>/i, /javascript\s*:/i, /vbscript\s*:/i, /expression\s*\(/i, /eval\s*\(/i, /alert\s*\(/i, /document\.cookie/i, /document\.write\s*\(/i, /window\.location/i, /innerHTML/i].some((t) => t.test(o));
|
|
1679
1679
|
}
|
|
1680
|
-
const
|
|
1680
|
+
const je = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Ec = function(o, e) {
|
|
1681
1681
|
const n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
1682
1682
|
path: "/"
|
|
1683
1683
|
}, i = encodeURIComponent(e);
|
|
@@ -1688,12 +1688,12 @@ const Ue = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Tc = function(o, e) {
|
|
|
1688
1688
|
s += `; Max-Age=${Math.floor(r)}`;
|
|
1689
1689
|
}
|
|
1690
1690
|
if (n.domain) {
|
|
1691
|
-
if (!
|
|
1691
|
+
if (!je.test(n.domain))
|
|
1692
1692
|
throw new TypeError("option domain is invalid");
|
|
1693
1693
|
s += `; Domain=${n.domain}`;
|
|
1694
1694
|
}
|
|
1695
1695
|
if (n.path) {
|
|
1696
|
-
if (!
|
|
1696
|
+
if (!je.test(n.path))
|
|
1697
1697
|
throw new TypeError("option path is invalid");
|
|
1698
1698
|
s += `; Path=${n.path}`;
|
|
1699
1699
|
}
|
|
@@ -1720,13 +1720,13 @@ const Ue = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Tc = function(o, e) {
|
|
|
1720
1720
|
throw new TypeError("option sameSite is invalid");
|
|
1721
1721
|
}
|
|
1722
1722
|
return n.partitioned && (s += "; Partitioned"), s;
|
|
1723
|
-
},
|
|
1723
|
+
}, Me = {
|
|
1724
1724
|
create(o, e, t, n) {
|
|
1725
1725
|
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
1726
1726
|
path: "/",
|
|
1727
1727
|
sameSite: "strict"
|
|
1728
1728
|
};
|
|
1729
|
-
t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), n && (i.domain = n), document.cookie =
|
|
1729
|
+
t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), n && (i.domain = n), document.cookie = Ec(o, e, i);
|
|
1730
1730
|
},
|
|
1731
1731
|
read(o) {
|
|
1732
1732
|
const e = `${o}=`, t = document.cookie.split(";");
|
|
@@ -1741,7 +1741,7 @@ const Ue = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Tc = function(o, e) {
|
|
|
1741
1741
|
this.create(o, "", -1, e);
|
|
1742
1742
|
}
|
|
1743
1743
|
};
|
|
1744
|
-
var
|
|
1744
|
+
var Dc = {
|
|
1745
1745
|
name: "cookie",
|
|
1746
1746
|
// Deconstruct the options object and extract the lookupCookie property
|
|
1747
1747
|
lookup(o) {
|
|
@@ -1749,7 +1749,7 @@ var Lc = {
|
|
|
1749
1749
|
lookupCookie: e
|
|
1750
1750
|
} = o;
|
|
1751
1751
|
if (e && typeof document != "undefined")
|
|
1752
|
-
return
|
|
1752
|
+
return Me.read(e) || void 0;
|
|
1753
1753
|
},
|
|
1754
1754
|
// Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
|
|
1755
1755
|
cacheUserLanguage(o, e) {
|
|
@@ -1759,9 +1759,9 @@ var Lc = {
|
|
|
1759
1759
|
cookieDomain: i,
|
|
1760
1760
|
cookieOptions: s
|
|
1761
1761
|
} = e;
|
|
1762
|
-
t && typeof document != "undefined" &&
|
|
1762
|
+
t && typeof document != "undefined" && Me.create(t, o, n, i, s);
|
|
1763
1763
|
}
|
|
1764
|
-
},
|
|
1764
|
+
}, Uc = {
|
|
1765
1765
|
name: "querystring",
|
|
1766
1766
|
// Deconstruct the options object and extract the lookupQuerystring property
|
|
1767
1767
|
lookup(o) {
|
|
@@ -1782,7 +1782,7 @@ var Lc = {
|
|
|
1782
1782
|
}
|
|
1783
1783
|
return t;
|
|
1784
1784
|
}
|
|
1785
|
-
},
|
|
1785
|
+
}, jc = {
|
|
1786
1786
|
name: "hash",
|
|
1787
1787
|
// Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
|
|
1788
1788
|
lookup(o) {
|
|
@@ -1815,7 +1815,7 @@ var Lc = {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
};
|
|
1817
1817
|
let M = null;
|
|
1818
|
-
const
|
|
1818
|
+
const He = () => {
|
|
1819
1819
|
if (M !== null) return M;
|
|
1820
1820
|
try {
|
|
1821
1821
|
if (M = typeof window != "undefined" && window.localStorage !== null, !M)
|
|
@@ -1827,14 +1827,14 @@ const Ee = () => {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
return M;
|
|
1829
1829
|
};
|
|
1830
|
-
var
|
|
1830
|
+
var Mc = {
|
|
1831
1831
|
name: "localStorage",
|
|
1832
1832
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
1833
1833
|
lookup(o) {
|
|
1834
1834
|
let {
|
|
1835
1835
|
lookupLocalStorage: e
|
|
1836
1836
|
} = o;
|
|
1837
|
-
if (e &&
|
|
1837
|
+
if (e && He())
|
|
1838
1838
|
return window.localStorage.getItem(e) || void 0;
|
|
1839
1839
|
},
|
|
1840
1840
|
// Deconstruct the options object and extract the lookupLocalStorage property
|
|
@@ -1842,11 +1842,11 @@ var Nc = {
|
|
|
1842
1842
|
let {
|
|
1843
1843
|
lookupLocalStorage: t
|
|
1844
1844
|
} = e;
|
|
1845
|
-
t &&
|
|
1845
|
+
t && He() && window.localStorage.setItem(t, o);
|
|
1846
1846
|
}
|
|
1847
1847
|
};
|
|
1848
1848
|
let H = null;
|
|
1849
|
-
const
|
|
1849
|
+
const Ke = () => {
|
|
1850
1850
|
if (H !== null) return H;
|
|
1851
1851
|
try {
|
|
1852
1852
|
if (H = typeof window != "undefined" && window.sessionStorage !== null, !H)
|
|
@@ -1858,22 +1858,22 @@ const je = () => {
|
|
|
1858
1858
|
}
|
|
1859
1859
|
return H;
|
|
1860
1860
|
};
|
|
1861
|
-
var
|
|
1861
|
+
var Hc = {
|
|
1862
1862
|
name: "sessionStorage",
|
|
1863
1863
|
lookup(o) {
|
|
1864
1864
|
let {
|
|
1865
1865
|
lookupSessionStorage: e
|
|
1866
1866
|
} = o;
|
|
1867
|
-
if (e &&
|
|
1867
|
+
if (e && Ke())
|
|
1868
1868
|
return window.sessionStorage.getItem(e) || void 0;
|
|
1869
1869
|
},
|
|
1870
1870
|
cacheUserLanguage(o, e) {
|
|
1871
1871
|
let {
|
|
1872
1872
|
lookupSessionStorage: t
|
|
1873
1873
|
} = e;
|
|
1874
|
-
t &&
|
|
1874
|
+
t && Ke() && window.sessionStorage.setItem(t, o);
|
|
1875
1875
|
}
|
|
1876
|
-
},
|
|
1876
|
+
}, Kc = {
|
|
1877
1877
|
name: "navigator",
|
|
1878
1878
|
lookup(o) {
|
|
1879
1879
|
const e = [];
|
|
@@ -1890,7 +1890,7 @@ var Rc = {
|
|
|
1890
1890
|
}
|
|
1891
1891
|
return e.length > 0 ? e : void 0;
|
|
1892
1892
|
}
|
|
1893
|
-
},
|
|
1893
|
+
}, Bc = {
|
|
1894
1894
|
name: "htmlTag",
|
|
1895
1895
|
// Deconstruct the options object and extract the htmlTag property
|
|
1896
1896
|
lookup(o) {
|
|
@@ -1900,7 +1900,7 @@ var Rc = {
|
|
|
1900
1900
|
const n = e || (typeof document != "undefined" ? document.documentElement : null);
|
|
1901
1901
|
return n && typeof n.getAttribute == "function" && (t = n.getAttribute("lang")), t;
|
|
1902
1902
|
}
|
|
1903
|
-
},
|
|
1903
|
+
}, Vc = {
|
|
1904
1904
|
name: "path",
|
|
1905
1905
|
// Deconstruct the options object and extract the lookupFromPathIndex property
|
|
1906
1906
|
lookup(o) {
|
|
@@ -1912,7 +1912,7 @@ var Rc = {
|
|
|
1912
1912
|
const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
|
|
1913
1913
|
return Array.isArray(t) ? (i = t[typeof e == "number" ? e : 0]) == null ? void 0 : i.replace("/", "") : void 0;
|
|
1914
1914
|
}
|
|
1915
|
-
},
|
|
1915
|
+
}, qc = {
|
|
1916
1916
|
name: "subdomain",
|
|
1917
1917
|
lookup(o) {
|
|
1918
1918
|
var i, s;
|
|
@@ -1924,15 +1924,15 @@ var Rc = {
|
|
|
1924
1924
|
return n[t];
|
|
1925
1925
|
}
|
|
1926
1926
|
};
|
|
1927
|
-
let
|
|
1927
|
+
let Ye = !1;
|
|
1928
1928
|
try {
|
|
1929
|
-
document.cookie,
|
|
1929
|
+
document.cookie, Ye = !0;
|
|
1930
1930
|
} catch (o) {
|
|
1931
1931
|
}
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
const
|
|
1935
|
-
order:
|
|
1932
|
+
const Ze = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
|
|
1933
|
+
Ye || Ze.splice(1, 1);
|
|
1934
|
+
const zc = () => ({
|
|
1935
|
+
order: Ze,
|
|
1936
1936
|
lookupQuerystring: "lng",
|
|
1937
1937
|
lookupCookie: "i18next",
|
|
1938
1938
|
lookupLocalStorage: "i18nextLng",
|
|
@@ -1944,7 +1944,7 @@ const Ec = () => ({
|
|
|
1944
1944
|
// cookieDomain: 'myDomain'
|
|
1945
1945
|
convertDetectedLanguage: (o) => o
|
|
1946
1946
|
});
|
|
1947
|
-
class
|
|
1947
|
+
class et {
|
|
1948
1948
|
constructor(e) {
|
|
1949
1949
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1950
1950
|
this.type = "languageDetector", this.detectors = {}, this.init(e, t);
|
|
@@ -1953,7 +1953,7 @@ class We {
|
|
|
1953
1953
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
1954
1954
|
languageUtils: {}
|
|
1955
1955
|
}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1956
|
-
this.services = e, this.options =
|
|
1956
|
+
this.services = e, this.options = Ac(t, this.options || {}, zc()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (i) => i.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(Dc), this.addDetector(Uc), this.addDetector(Mc), this.addDetector(Hc), this.addDetector(Kc), this.addDetector(Bc), this.addDetector(Vc), this.addDetector(qc), this.addDetector(jc);
|
|
1957
1957
|
}
|
|
1958
1958
|
addDetector(e) {
|
|
1959
1959
|
return this.detectors[e.name] = e, this;
|
|
@@ -1965,7 +1965,7 @@ class We {
|
|
|
1965
1965
|
let i = this.detectors[n].lookup(this.options);
|
|
1966
1966
|
i && typeof i == "string" && (i = [i]), i && (t = t.concat(i));
|
|
1967
1967
|
}
|
|
1968
|
-
}), t = t.filter((n) => n != null && !
|
|
1968
|
+
}), t = t.filter((n) => n != null && !Fc(n)).map((n) => this.options.convertDetectedLanguage(n)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? t : t.length > 0 ? t[0] : null;
|
|
1969
1969
|
}
|
|
1970
1970
|
cacheUserLanguage(e) {
|
|
1971
1971
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
|
|
@@ -1974,25 +1974,25 @@ class We {
|
|
|
1974
1974
|
}));
|
|
1975
1975
|
}
|
|
1976
1976
|
}
|
|
1977
|
-
|
|
1978
|
-
function
|
|
1977
|
+
et.type = "languageDetector";
|
|
1978
|
+
function ge(o) {
|
|
1979
1979
|
"@babel/helpers - typeof";
|
|
1980
|
-
return
|
|
1980
|
+
return ge = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1981
1981
|
return typeof e;
|
|
1982
1982
|
} : function(e) {
|
|
1983
1983
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1984
|
-
},
|
|
1984
|
+
}, ge(o);
|
|
1985
1985
|
}
|
|
1986
|
-
function
|
|
1987
|
-
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest == "undefined" ? "undefined" :
|
|
1986
|
+
function tt() {
|
|
1987
|
+
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest == "undefined" ? "undefined" : ge(XMLHttpRequest)) === "object";
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1989
|
+
function Qc(o) {
|
|
1990
1990
|
return !!o && typeof o.then == "function";
|
|
1991
1991
|
}
|
|
1992
|
-
function
|
|
1993
|
-
return
|
|
1992
|
+
function Gc(o) {
|
|
1993
|
+
return Qc(o) ? o : Promise.resolve(o);
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1995
|
+
function Be(o, e) {
|
|
1996
1996
|
var t = Object.keys(o);
|
|
1997
1997
|
if (Object.getOwnPropertySymbols) {
|
|
1998
1998
|
var n = Object.getOwnPropertySymbols(o);
|
|
@@ -2002,59 +2002,59 @@ function Me(o, e) {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
return t;
|
|
2004
2004
|
}
|
|
2005
|
-
function
|
|
2005
|
+
function Ve(o) {
|
|
2006
2006
|
for (var e = 1; e < arguments.length; e++) {
|
|
2007
2007
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
2008
|
-
e % 2 ?
|
|
2009
|
-
|
|
2010
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) :
|
|
2008
|
+
e % 2 ? Be(Object(t), !0).forEach(function(n) {
|
|
2009
|
+
Wc(o, n, t[n]);
|
|
2010
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Be(Object(t)).forEach(function(n) {
|
|
2011
2011
|
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2012
2012
|
});
|
|
2013
2013
|
}
|
|
2014
2014
|
return o;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2017
|
-
return (e =
|
|
2016
|
+
function Wc(o, e, t) {
|
|
2017
|
+
return (e = _c(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
|
|
2018
2018
|
}
|
|
2019
|
-
function
|
|
2020
|
-
var e =
|
|
2021
|
-
return
|
|
2019
|
+
function _c(o) {
|
|
2020
|
+
var e = Xc(o, "string");
|
|
2021
|
+
return U(e) == "symbol" ? e : e + "";
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2024
|
-
if (
|
|
2023
|
+
function Xc(o, e) {
|
|
2024
|
+
if (U(o) != "object" || !o) return o;
|
|
2025
2025
|
var t = o[Symbol.toPrimitive];
|
|
2026
2026
|
if (t !== void 0) {
|
|
2027
2027
|
var n = t.call(o, e);
|
|
2028
|
-
if (
|
|
2028
|
+
if (U(n) != "object") return n;
|
|
2029
2029
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2030
2030
|
}
|
|
2031
2031
|
return (e === "string" ? String : Number)(o);
|
|
2032
2032
|
}
|
|
2033
|
-
function
|
|
2033
|
+
function U(o) {
|
|
2034
2034
|
"@babel/helpers - typeof";
|
|
2035
|
-
return
|
|
2035
|
+
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2036
2036
|
return typeof e;
|
|
2037
2037
|
} : function(e) {
|
|
2038
2038
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2039
|
-
},
|
|
2039
|
+
}, U(o);
|
|
2040
2040
|
}
|
|
2041
|
-
var
|
|
2042
|
-
typeof global != "undefined" && global.fetch ?
|
|
2041
|
+
var E = typeof fetch == "function" ? fetch : void 0;
|
|
2042
|
+
typeof global != "undefined" && global.fetch ? E = global.fetch : typeof window != "undefined" && window.fetch && (E = window.fetch);
|
|
2043
2043
|
var X;
|
|
2044
|
-
|
|
2045
|
-
var
|
|
2046
|
-
typeof ActiveXObject == "function" && (typeof global != "undefined" && global.ActiveXObject ?
|
|
2047
|
-
typeof
|
|
2048
|
-
if (!
|
|
2044
|
+
tt() && (typeof global != "undefined" && global.XMLHttpRequest ? X = global.XMLHttpRequest : typeof window != "undefined" && window.XMLHttpRequest && (X = window.XMLHttpRequest));
|
|
2045
|
+
var oe;
|
|
2046
|
+
typeof ActiveXObject == "function" && (typeof global != "undefined" && global.ActiveXObject ? oe = global.ActiveXObject : typeof window != "undefined" && window.ActiveXObject && (oe = window.ActiveXObject));
|
|
2047
|
+
typeof E != "function" && (E = void 0);
|
|
2048
|
+
if (!E && !X && !oe)
|
|
2049
2049
|
try {
|
|
2050
2050
|
import("./browser-ponyfill-BxQPfTD2.js").then((o) => o.b).then(function(o) {
|
|
2051
|
-
|
|
2051
|
+
E = o.default;
|
|
2052
2052
|
}).catch(function() {
|
|
2053
2053
|
});
|
|
2054
2054
|
} catch (o) {
|
|
2055
2055
|
}
|
|
2056
|
-
var
|
|
2057
|
-
if (t &&
|
|
2056
|
+
var pe = function(e, t) {
|
|
2057
|
+
if (t && U(t) === "object") {
|
|
2058
2058
|
var n = "";
|
|
2059
2059
|
for (var i in t)
|
|
2060
2060
|
n += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(t[i]);
|
|
@@ -2062,7 +2062,7 @@ var de = function(e, t) {
|
|
|
2062
2062
|
e = e + (e.indexOf("?") !== -1 ? "&" : "?") + n.slice(1);
|
|
2063
2063
|
}
|
|
2064
2064
|
return e;
|
|
2065
|
-
},
|
|
2065
|
+
}, qe = function(e, t, n, i) {
|
|
2066
2066
|
var s = function(c) {
|
|
2067
2067
|
if (!c.ok) return n(c.statusText || "Error", {
|
|
2068
2068
|
status: c.status
|
|
@@ -2081,33 +2081,33 @@ var de = function(e, t) {
|
|
|
2081
2081
|
return;
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
|
-
typeof fetch == "function" ? fetch(e, t).then(s).catch(n) :
|
|
2085
|
-
},
|
|
2086
|
-
e.queryStringParams && (t =
|
|
2087
|
-
var s =
|
|
2084
|
+
typeof fetch == "function" ? fetch(e, t).then(s).catch(n) : E(e, t).then(s).catch(n);
|
|
2085
|
+
}, ze = !1, Jc = function(e, t, n, i) {
|
|
2086
|
+
e.queryStringParams && (t = pe(t, e.queryStringParams));
|
|
2087
|
+
var s = Ve({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
|
|
2088
2088
|
typeof window == "undefined" && typeof global != "undefined" && typeof global.process != "undefined" && global.process.versions && global.process.versions.node && (s["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), n && (s["Content-Type"] = "application/json");
|
|
2089
|
-
var r = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, a =
|
|
2089
|
+
var r = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, a = Ve({
|
|
2090
2090
|
method: n ? "POST" : "GET",
|
|
2091
2091
|
body: n ? e.stringify(n) : void 0,
|
|
2092
2092
|
headers: s
|
|
2093
|
-
},
|
|
2093
|
+
}, ze ? {} : r), c = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
|
|
2094
2094
|
try {
|
|
2095
|
-
|
|
2095
|
+
qe(t, a, i, c);
|
|
2096
2096
|
} catch (l) {
|
|
2097
2097
|
if (!r || Object.keys(r).length === 0 || !l.message || l.message.indexOf("not implemented") < 0)
|
|
2098
2098
|
return i(l);
|
|
2099
2099
|
try {
|
|
2100
|
-
Object.keys(r).forEach(function(
|
|
2101
|
-
delete a[
|
|
2102
|
-
}),
|
|
2103
|
-
} catch (
|
|
2104
|
-
i(
|
|
2100
|
+
Object.keys(r).forEach(function(d) {
|
|
2101
|
+
delete a[d];
|
|
2102
|
+
}), qe(t, a, i, c), ze = !0;
|
|
2103
|
+
} catch (d) {
|
|
2104
|
+
i(d);
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
|
-
},
|
|
2108
|
-
n &&
|
|
2107
|
+
}, Yc = function(e, t, n, i) {
|
|
2108
|
+
n && U(n) === "object" && (n = pe("", n).slice(1)), e.queryStringParams && (t = pe(t, e.queryStringParams));
|
|
2109
2109
|
try {
|
|
2110
|
-
var s = X ? new X() : new
|
|
2110
|
+
var s = X ? new X() : new oe("MSXML2.XMLHTTP.3.0");
|
|
2111
2111
|
s.open(n ? "POST" : "GET", t, 1), e.crossDomain || s.setRequestHeader("X-Requested-With", "XMLHttpRequest"), s.withCredentials = !!e.withCredentials, n && s.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), s.overrideMimeType && s.overrideMimeType("application/json");
|
|
2112
2112
|
var r = e.customHeaders;
|
|
2113
2113
|
if (r = typeof r == "function" ? r() : r, r)
|
|
@@ -2122,12 +2122,12 @@ var de = function(e, t) {
|
|
|
2122
2122
|
} catch (c) {
|
|
2123
2123
|
console && console.log(c);
|
|
2124
2124
|
}
|
|
2125
|
-
},
|
|
2125
|
+
}, Zc = function(e, t, n, i) {
|
|
2126
2126
|
if (typeof n == "function" && (i = n, n = void 0), i = i || function() {
|
|
2127
|
-
},
|
|
2128
|
-
return
|
|
2129
|
-
if (
|
|
2130
|
-
return
|
|
2127
|
+
}, E && t.indexOf("file:") !== 0)
|
|
2128
|
+
return Jc(e, t, n, i);
|
|
2129
|
+
if (tt() || typeof ActiveXObject == "function")
|
|
2130
|
+
return Yc(e, t, n, i);
|
|
2131
2131
|
i(new Error("No fetch and no xhr implementation found!"));
|
|
2132
2132
|
};
|
|
2133
2133
|
function K(o) {
|
|
@@ -2138,7 +2138,7 @@ function K(o) {
|
|
|
2138
2138
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2139
2139
|
}, K(o);
|
|
2140
2140
|
}
|
|
2141
|
-
function
|
|
2141
|
+
function Qe(o, e) {
|
|
2142
2142
|
var t = Object.keys(o);
|
|
2143
2143
|
if (Object.getOwnPropertySymbols) {
|
|
2144
2144
|
var n = Object.getOwnPropertySymbols(o);
|
|
@@ -2148,37 +2148,37 @@ function qe(o, e) {
|
|
|
2148
2148
|
}
|
|
2149
2149
|
return t;
|
|
2150
2150
|
}
|
|
2151
|
-
function
|
|
2151
|
+
function ce(o) {
|
|
2152
2152
|
for (var e = 1; e < arguments.length; e++) {
|
|
2153
2153
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
2154
|
-
e % 2 ?
|
|
2155
|
-
|
|
2156
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) :
|
|
2154
|
+
e % 2 ? Qe(Object(t), !0).forEach(function(n) {
|
|
2155
|
+
nt(o, n, t[n]);
|
|
2156
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : Qe(Object(t)).forEach(function(n) {
|
|
2157
2157
|
Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2158
2158
|
});
|
|
2159
2159
|
}
|
|
2160
2160
|
return o;
|
|
2161
2161
|
}
|
|
2162
|
-
function
|
|
2162
|
+
function el(o, e) {
|
|
2163
2163
|
if (!(o instanceof e)) throw new TypeError("Cannot call a class as a function");
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2165
|
+
function tl(o, e) {
|
|
2166
2166
|
for (var t = 0; t < e.length; t++) {
|
|
2167
2167
|
var n = e[t];
|
|
2168
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o,
|
|
2168
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(o, it(n.key), n);
|
|
2169
2169
|
}
|
|
2170
2170
|
}
|
|
2171
|
-
function
|
|
2172
|
-
return e &&
|
|
2171
|
+
function nl(o, e, t) {
|
|
2172
|
+
return e && tl(o.prototype, e), Object.defineProperty(o, "prototype", { writable: !1 }), o;
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2175
|
-
return (e =
|
|
2174
|
+
function nt(o, e, t) {
|
|
2175
|
+
return (e = it(e)) in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2178
|
-
var e =
|
|
2177
|
+
function it(o) {
|
|
2178
|
+
var e = il(o, "string");
|
|
2179
2179
|
return K(e) == "symbol" ? e : e + "";
|
|
2180
2180
|
}
|
|
2181
|
-
function
|
|
2181
|
+
function il(o, e) {
|
|
2182
2182
|
if (K(o) != "object" || !o) return o;
|
|
2183
2183
|
var t = o[Symbol.toPrimitive];
|
|
2184
2184
|
if (t !== void 0) {
|
|
@@ -2188,7 +2188,7 @@ function Xc(o, e) {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
return String(o);
|
|
2190
2190
|
}
|
|
2191
|
-
var
|
|
2191
|
+
var ol = function() {
|
|
2192
2192
|
return {
|
|
2193
2193
|
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
2194
2194
|
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
@@ -2197,11 +2197,11 @@ var _c = function() {
|
|
|
2197
2197
|
},
|
|
2198
2198
|
stringify: JSON.stringify,
|
|
2199
2199
|
parsePayload: function(t, n, i) {
|
|
2200
|
-
return
|
|
2200
|
+
return nt({}, n, i || "");
|
|
2201
2201
|
},
|
|
2202
2202
|
parseLoadPayload: function(t, n) {
|
|
2203
2203
|
},
|
|
2204
|
-
request:
|
|
2204
|
+
request: Zc,
|
|
2205
2205
|
reloadInterval: typeof window != "undefined" ? !1 : 60 * 60 * 1e3,
|
|
2206
2206
|
customHeaders: {},
|
|
2207
2207
|
queryStringParams: {},
|
|
@@ -2214,16 +2214,16 @@ var _c = function() {
|
|
|
2214
2214
|
cache: "default"
|
|
2215
2215
|
}
|
|
2216
2216
|
};
|
|
2217
|
-
},
|
|
2217
|
+
}, ot = function() {
|
|
2218
2218
|
function o(e) {
|
|
2219
2219
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2220
|
-
|
|
2220
|
+
el(this, o), this.services = e, this.options = t, this.allOptions = n, this.type = "backend", this.init(e, t, n);
|
|
2221
2221
|
}
|
|
2222
|
-
return
|
|
2222
|
+
return nl(o, [{
|
|
2223
2223
|
key: "init",
|
|
2224
2224
|
value: function(t) {
|
|
2225
2225
|
var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
2226
|
-
if (this.services = t, this.options =
|
|
2226
|
+
if (this.services = t, this.options = ce(ce(ce({}, ol()), this.options || {}), i), this.allOptions = s, this.services && this.options.reloadInterval) {
|
|
2227
2227
|
var r = setInterval(function() {
|
|
2228
2228
|
return n.reload();
|
|
2229
2229
|
}, this.options.reloadInterval);
|
|
@@ -2244,38 +2244,38 @@ var _c = function() {
|
|
|
2244
2244
|
key: "_readAny",
|
|
2245
2245
|
value: function(t, n, i, s, r) {
|
|
2246
2246
|
var a = this, c = this.options.loadPath;
|
|
2247
|
-
typeof this.options.loadPath == "function" && (c = this.options.loadPath(t, i)), c =
|
|
2247
|
+
typeof this.options.loadPath == "function" && (c = this.options.loadPath(t, i)), c = Gc(c), c.then(function(l) {
|
|
2248
2248
|
if (!l) return r(null, {});
|
|
2249
|
-
var
|
|
2249
|
+
var d = a.services.interpolator.interpolate(l, {
|
|
2250
2250
|
lng: t.join("+"),
|
|
2251
2251
|
ns: i.join("+")
|
|
2252
2252
|
});
|
|
2253
|
-
a.loadUrl(
|
|
2253
|
+
a.loadUrl(d, r, n, s);
|
|
2254
2254
|
});
|
|
2255
2255
|
}
|
|
2256
2256
|
}, {
|
|
2257
2257
|
key: "loadUrl",
|
|
2258
2258
|
value: function(t, n, i, s) {
|
|
2259
2259
|
var r = this, a = typeof i == "string" ? [i] : i, c = typeof s == "string" ? [s] : s, l = this.options.parseLoadPayload(a, c);
|
|
2260
|
-
this.options.request(this.options, t, l, function(
|
|
2260
|
+
this.options.request(this.options, t, l, function(d, u) {
|
|
2261
2261
|
if (u && (u.status >= 500 && u.status < 600 || !u.status)) return n("failed loading " + t + "; status code: " + u.status, !0);
|
|
2262
2262
|
if (u && u.status >= 400 && u.status < 500) return n("failed loading " + t + "; status code: " + u.status, !1);
|
|
2263
|
-
if (!u &&
|
|
2264
|
-
var
|
|
2265
|
-
return
|
|
2263
|
+
if (!u && d && d.message) {
|
|
2264
|
+
var g = d.message.toLowerCase(), f = ["failed", "fetch", "network", "load"].find(function(v) {
|
|
2265
|
+
return g.indexOf(v) > -1;
|
|
2266
2266
|
});
|
|
2267
2267
|
if (f)
|
|
2268
|
-
return n("failed loading " + t + ": " +
|
|
2268
|
+
return n("failed loading " + t + ": " + d.message, !0);
|
|
2269
2269
|
}
|
|
2270
|
-
if (
|
|
2271
|
-
var
|
|
2270
|
+
if (d) return n(d, !1);
|
|
2271
|
+
var h, y;
|
|
2272
2272
|
try {
|
|
2273
|
-
typeof u.data == "string" ?
|
|
2274
|
-
} catch (
|
|
2275
|
-
|
|
2273
|
+
typeof u.data == "string" ? h = r.options.parse(u.data, i, s) : h = u.data;
|
|
2274
|
+
} catch (v) {
|
|
2275
|
+
y = "failed parsing " + t + " to json";
|
|
2276
2276
|
}
|
|
2277
|
-
if (
|
|
2278
|
-
n(null,
|
|
2277
|
+
if (y) return n(y, !1);
|
|
2278
|
+
n(null, h);
|
|
2279
2279
|
});
|
|
2280
2280
|
}
|
|
2281
2281
|
}, {
|
|
@@ -2284,16 +2284,16 @@ var _c = function() {
|
|
|
2284
2284
|
var a = this;
|
|
2285
2285
|
if (this.options.addPath) {
|
|
2286
2286
|
typeof t == "string" && (t = [t]);
|
|
2287
|
-
var c = this.options.parsePayload(n, i, s), l = 0,
|
|
2288
|
-
t.forEach(function(
|
|
2287
|
+
var c = this.options.parsePayload(n, i, s), l = 0, d = [], u = [];
|
|
2288
|
+
t.forEach(function(g) {
|
|
2289
2289
|
var f = a.options.addPath;
|
|
2290
|
-
typeof a.options.addPath == "function" && (f = a.options.addPath(
|
|
2291
|
-
var
|
|
2292
|
-
lng:
|
|
2290
|
+
typeof a.options.addPath == "function" && (f = a.options.addPath(g, n));
|
|
2291
|
+
var h = a.services.interpolator.interpolate(f, {
|
|
2292
|
+
lng: g,
|
|
2293
2293
|
ns: n
|
|
2294
2294
|
});
|
|
2295
|
-
a.options.request(a.options,
|
|
2296
|
-
l += 1,
|
|
2295
|
+
a.options.request(a.options, h, c, function(y, v) {
|
|
2296
|
+
l += 1, d.push(y), u.push(v), l === t.length && typeof r == "function" && r(d, u);
|
|
2297
2297
|
});
|
|
2298
2298
|
});
|
|
2299
2299
|
}
|
|
@@ -2304,17 +2304,17 @@ var _c = function() {
|
|
|
2304
2304
|
var t = this, n = this.services, i = n.backendConnector, s = n.languageUtils, r = n.logger, a = i.language;
|
|
2305
2305
|
if (!(a && a.toLowerCase() === "cimode")) {
|
|
2306
2306
|
var c = [], l = function(u) {
|
|
2307
|
-
var
|
|
2308
|
-
|
|
2307
|
+
var g = s.toResolveHierarchy(u);
|
|
2308
|
+
g.forEach(function(f) {
|
|
2309
2309
|
c.indexOf(f) < 0 && c.push(f);
|
|
2310
2310
|
});
|
|
2311
2311
|
};
|
|
2312
|
-
l(a), this.allOptions.preload && this.allOptions.preload.forEach(function(
|
|
2313
|
-
return l(
|
|
2314
|
-
}), c.forEach(function(
|
|
2312
|
+
l(a), this.allOptions.preload && this.allOptions.preload.forEach(function(d) {
|
|
2313
|
+
return l(d);
|
|
2314
|
+
}), c.forEach(function(d) {
|
|
2315
2315
|
t.allOptions.ns.forEach(function(u) {
|
|
2316
|
-
i.read(
|
|
2317
|
-
|
|
2316
|
+
i.read(d, u, "read", null, null, function(g, f) {
|
|
2317
|
+
g && r.warn("loading namespace ".concat(u, " for language ").concat(d, " failed"), g), !g && f && r.log("loaded namespace ".concat(u, " for language ").concat(d), f), i.loaded("".concat(d, "|").concat(u), g, f);
|
|
2318
2318
|
});
|
|
2319
2319
|
});
|
|
2320
2320
|
});
|
|
@@ -2322,14 +2322,14 @@ var _c = function() {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
}]);
|
|
2324
2324
|
}();
|
|
2325
|
-
|
|
2326
|
-
b.use(
|
|
2325
|
+
ot.type = "backend";
|
|
2326
|
+
b.use(ot).use(et).init({
|
|
2327
2327
|
lng: "vi",
|
|
2328
2328
|
fallbackLng: "vi",
|
|
2329
2329
|
debug: !1,
|
|
2330
2330
|
resources: {
|
|
2331
|
-
en: { translation:
|
|
2332
|
-
vi: { translation:
|
|
2331
|
+
en: { translation: rs },
|
|
2332
|
+
vi: { translation: Ic }
|
|
2333
2333
|
},
|
|
2334
2334
|
interpolation: {
|
|
2335
2335
|
escapeValue: !1
|
|
@@ -2337,13 +2337,13 @@ b.use(Ye).use(We).init({
|
|
|
2337
2337
|
// Allow returning objects/arrays from translations
|
|
2338
2338
|
returnObjects: !0
|
|
2339
2339
|
});
|
|
2340
|
-
function
|
|
2340
|
+
function sl(o) {
|
|
2341
2341
|
b.changeLanguage(o);
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2344
|
-
return b.t(o,
|
|
2343
|
+
function gl(o, e) {
|
|
2344
|
+
return b.t(o, p({ returnObjects: !0 }, e));
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2346
|
+
function rl(o = "dev") {
|
|
2347
2347
|
const e = {
|
|
2348
2348
|
dev: {
|
|
2349
2349
|
invoiceHubBaseUrl: "https://stag-invoice-hub.atomsolution.vn",
|
|
@@ -2373,48 +2373,211 @@ function Yc(o = "dev") {
|
|
|
2373
2373
|
};
|
|
2374
2374
|
return e[o] || e.dev;
|
|
2375
2375
|
}
|
|
2376
|
-
let
|
|
2377
|
-
function
|
|
2376
|
+
let ee = null, me = !1;
|
|
2377
|
+
function st(o) {
|
|
2378
2378
|
if (!["dev", "uat", "prod", "stag", "pilot"].includes(o))
|
|
2379
2379
|
throw new Error(
|
|
2380
2380
|
`Invalid mode: ${o}. Valid modes are 'dev', 'uat', 'prod', 'stag', 'pilot'.`
|
|
2381
2381
|
);
|
|
2382
|
-
|
|
2382
|
+
ee = o, me = !0;
|
|
2383
2383
|
try {
|
|
2384
2384
|
localStorage.setItem("currentMode", o);
|
|
2385
2385
|
} catch (e) {
|
|
2386
2386
|
console.warn("Could not save to localStorage:", e);
|
|
2387
2387
|
}
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
if (
|
|
2391
|
-
return
|
|
2389
|
+
function al() {
|
|
2390
|
+
if (me && ee)
|
|
2391
|
+
return ee;
|
|
2392
2392
|
try {
|
|
2393
2393
|
const o = localStorage.getItem("currentMode");
|
|
2394
2394
|
if (o)
|
|
2395
|
-
return
|
|
2395
|
+
return ee = o, me = !0, o;
|
|
2396
2396
|
} catch (o) {
|
|
2397
2397
|
console.warn("Could not read from localStorage:", o);
|
|
2398
2398
|
}
|
|
2399
2399
|
return "dev";
|
|
2400
2400
|
}
|
|
2401
|
-
function
|
|
2402
|
-
const o =
|
|
2403
|
-
return
|
|
2401
|
+
function pl() {
|
|
2402
|
+
const o = al();
|
|
2403
|
+
return rl(o);
|
|
2404
2404
|
}
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2405
|
+
const rt = {
|
|
2406
|
+
fpt: {
|
|
2407
|
+
email: "",
|
|
2408
|
+
hotline: "",
|
|
2409
|
+
invoiceLookupUrl: "",
|
|
2410
|
+
isActive: !1,
|
|
2411
|
+
link: "",
|
|
2412
|
+
name: "fpt",
|
|
2413
|
+
onboarding: !1,
|
|
2414
|
+
sso: !1
|
|
2415
|
+
},
|
|
2416
|
+
"m-invoice": {
|
|
2417
|
+
email: "info@minvoice.vn",
|
|
2418
|
+
hotline: "0901 80 16 18",
|
|
2419
|
+
invoiceLookupUrl: "https://tracuuhoadon.minvoice.com.vn/single/invoice",
|
|
2420
|
+
isActive: !0,
|
|
2421
|
+
link: "https://minvoice.vn",
|
|
2422
|
+
name: "m-invoice",
|
|
2423
|
+
onboarding: !0,
|
|
2424
|
+
sso: !1
|
|
2425
|
+
},
|
|
2426
|
+
misa: {
|
|
2427
|
+
email: "",
|
|
2428
|
+
hotline: "",
|
|
2429
|
+
invoiceLookupUrl: "https://www.meinvoice.vn/tra-cuu/",
|
|
2430
|
+
isActive: !1,
|
|
2431
|
+
link: "https://www.misa.vn",
|
|
2432
|
+
name: "misa",
|
|
2433
|
+
onboarding: !1,
|
|
2434
|
+
sso: !1
|
|
2435
|
+
}
|
|
2436
|
+
}, Ge = {
|
|
2437
|
+
dev: {
|
|
2438
|
+
"m-invoice": {
|
|
2439
|
+
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2440
|
+
},
|
|
2441
|
+
misa: {
|
|
2442
|
+
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2443
|
+
}
|
|
2444
|
+
},
|
|
2445
|
+
pilot: {
|
|
2446
|
+
"m-invoice": {
|
|
2447
|
+
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2448
|
+
},
|
|
2449
|
+
misa: {
|
|
2450
|
+
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2451
|
+
}
|
|
2452
|
+
},
|
|
2453
|
+
stag: {
|
|
2454
|
+
"m-invoice": {
|
|
2455
|
+
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2456
|
+
},
|
|
2457
|
+
misa: {
|
|
2458
|
+
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
uat: {
|
|
2462
|
+
"m-invoice": {
|
|
2463
|
+
invoiceLookupUrl: "https://test-tracuuhoadon.minvoice.com.vn/single/invoice"
|
|
2464
|
+
},
|
|
2465
|
+
misa: {
|
|
2466
|
+
invoiceLookupUrl: "https://test.meinvoice.vn/tra-cuu"
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
}, We = {
|
|
2470
|
+
bvb: {
|
|
2471
|
+
fpt: { isActive: !0 },
|
|
2472
|
+
misa: { isActive: !0 }
|
|
2473
|
+
},
|
|
2474
|
+
ocb: {
|
|
2475
|
+
fpt: { isActive: !0 },
|
|
2476
|
+
misa: { isActive: !0 }
|
|
2477
|
+
}
|
|
2478
|
+
}, _e = {
|
|
2479
|
+
pilot: {
|
|
2480
|
+
bvb: {
|
|
2481
|
+
fpt: { isActive: !1 },
|
|
2482
|
+
misa: { isActive: !1 }
|
|
2483
|
+
},
|
|
2484
|
+
ocb: {
|
|
2485
|
+
fpt: { isActive: !1 },
|
|
2486
|
+
misa: { isActive: !1 }
|
|
2487
|
+
}
|
|
2488
|
+
},
|
|
2489
|
+
stag: {
|
|
2490
|
+
bvb: {
|
|
2491
|
+
fpt: { isActive: !1 },
|
|
2492
|
+
misa: { isActive: !1 }
|
|
2493
|
+
},
|
|
2494
|
+
ocb: {
|
|
2495
|
+
fpt: { isActive: !1 },
|
|
2496
|
+
misa: { isActive: !1 }
|
|
2497
|
+
}
|
|
2498
|
+
},
|
|
2499
|
+
uat: {
|
|
2500
|
+
bvb: {
|
|
2501
|
+
fpt: { isActive: !1 },
|
|
2502
|
+
misa: { isActive: !1 }
|
|
2503
|
+
},
|
|
2504
|
+
ocb: {
|
|
2505
|
+
fpt: { isActive: !1 },
|
|
2506
|
+
misa: { isActive: !1 }
|
|
2507
|
+
}
|
|
2508
|
+
},
|
|
2509
|
+
prod: {
|
|
2510
|
+
bvb: {
|
|
2511
|
+
fpt: { isActive: !1 },
|
|
2512
|
+
misa: { isActive: !1 }
|
|
2513
|
+
},
|
|
2514
|
+
ocb: {
|
|
2515
|
+
fpt: { isActive: !1 },
|
|
2516
|
+
misa: { isActive: !1 }
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
}, le = /* @__PURE__ */ new Map();
|
|
2520
|
+
function Q(o, e) {
|
|
2521
|
+
const t = p({}, o);
|
|
2522
|
+
for (const n in e)
|
|
2523
|
+
e[n] && typeof e[n] == "object" && !Array.isArray(e[n]) ? t[n] = Q(t[n] || {}, e[n]) : t[n] = e[n];
|
|
2524
|
+
return t;
|
|
2525
|
+
}
|
|
2526
|
+
function cl(o, e) {
|
|
2527
|
+
const t = ["email", "hotline", "invoiceLookupUrl", "isActive", "link", "name", "onboarding", "sso"];
|
|
2528
|
+
for (const n of t)
|
|
2529
|
+
if (!(n in o))
|
|
2530
|
+
return console.warn(`[SettingsManager] Missing field '${n}' in provider '${e}'`), !1;
|
|
2531
|
+
return !0;
|
|
2532
|
+
}
|
|
2533
|
+
function at(o, e, t) {
|
|
2534
|
+
var i, s, r, a;
|
|
2535
|
+
const n = `${o}:${e}:${t}`;
|
|
2536
|
+
if (le.has(n))
|
|
2537
|
+
return le.get(n);
|
|
2538
|
+
try {
|
|
2539
|
+
let c = Q({}, rt[t]);
|
|
2540
|
+
return (i = Ge[o]) != null && i[t] && (c = Q(c, Ge[o][t])), (s = We[e]) != null && s[t] && (c = Q(c, We[e][t])), (a = (r = _e[o]) == null ? void 0 : r[e]) != null && a[t] && (c = Q(c, _e[o][e][t])), cl(c, t) ? (le.set(n, c), c) : (console.error(`[SettingsManager] Invalid configuration for ${o}:${e}:${t}`), null);
|
|
2541
|
+
} catch (c) {
|
|
2542
|
+
return console.error(`[SettingsManager] Error getting settings for ${o}:${e}:${t}:`, c), null;
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2545
|
+
function ll(o, e) {
|
|
2546
|
+
const t = {};
|
|
2547
|
+
for (const n of Object.keys(rt)) {
|
|
2548
|
+
const i = at(o, e, n);
|
|
2549
|
+
i && (t[n] = i);
|
|
2550
|
+
}
|
|
2551
|
+
return t;
|
|
2552
|
+
}
|
|
2553
|
+
function ul(o, e) {
|
|
2554
|
+
return {
|
|
2555
|
+
[o]: {
|
|
2556
|
+
[e]: ll(o, e)
|
|
2557
|
+
}
|
|
2558
|
+
}[o][e];
|
|
2559
|
+
}
|
|
2560
|
+
function dl(o, e) {
|
|
2561
|
+
const t = ["dev", "pilot", "stag", "uat", "prod"], n = ["bvb", "ocb"];
|
|
2562
|
+
return t.includes(o) ? n.includes(e) ? !0 : (console.error(`[SettingsManager] Invalid bank: ${e}`), !1) : (console.error(`[SettingsManager] Invalid environment: ${o}`), !1);
|
|
2563
|
+
}
|
|
2564
|
+
const ue = /* @__PURE__ */ new Map();
|
|
2565
|
+
function hl(o = "dev", e = "bvb") {
|
|
2566
|
+
const t = `${o}:${e}`;
|
|
2567
|
+
if (ue.has(t))
|
|
2568
|
+
return ue.get(t);
|
|
2569
|
+
const n = ul(o, e);
|
|
2570
|
+
return ue.set(t, n), n;
|
|
2571
|
+
}
|
|
2572
|
+
function ml(o, e, t) {
|
|
2573
|
+
return dl(o, e) ? at(o, e, t) : (console.error(`[SettingsAdapter] Invalid environment or bank: ${o}, ${e}`), null);
|
|
2574
|
+
}
|
|
2575
|
+
let de = null, he = null;
|
|
2576
|
+
function yl(o) {
|
|
2577
|
+
return re(this, null, function* () {
|
|
2578
|
+
if (o.mode && st(o.mode), o.language && ct(o.language), !he) {
|
|
2579
|
+
const { InvoiceRegisterWidget: n } = yield import("./widget-DyAsWpcA.js");
|
|
2580
|
+
he = n;
|
|
2418
2581
|
}
|
|
2419
2582
|
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
|
2420
2583
|
if (!e)
|
|
@@ -2422,7 +2585,7 @@ function ll(o) {
|
|
|
2422
2585
|
function t() {
|
|
2423
2586
|
e.innerHTML = "", o.onClose && o.onClose();
|
|
2424
2587
|
}
|
|
2425
|
-
return
|
|
2588
|
+
return he(
|
|
2426
2589
|
e,
|
|
2427
2590
|
t,
|
|
2428
2591
|
o.onShowPolicy || (() => {
|
|
@@ -2433,11 +2596,11 @@ function ll(o) {
|
|
|
2433
2596
|
), { destroy: t };
|
|
2434
2597
|
});
|
|
2435
2598
|
}
|
|
2436
|
-
function
|
|
2437
|
-
return
|
|
2438
|
-
if (o.mode &&
|
|
2439
|
-
const { EContractWidget: n } = yield import("./widget-
|
|
2440
|
-
|
|
2599
|
+
function vl(o) {
|
|
2600
|
+
return re(this, null, function* () {
|
|
2601
|
+
if (o.mode && st(o.mode), o.language && ct(o.language), !de) {
|
|
2602
|
+
const { EContractWidget: n } = yield import("./widget-DyAsWpcA.js");
|
|
2603
|
+
de = n;
|
|
2441
2604
|
}
|
|
2442
2605
|
const e = typeof o.selector == "string" ? document.querySelector(o.selector) : o.selector;
|
|
2443
2606
|
if (!e)
|
|
@@ -2445,34 +2608,34 @@ function ul(o) {
|
|
|
2445
2608
|
function t() {
|
|
2446
2609
|
e.innerHTML = "", o.onClose && o.onClose();
|
|
2447
2610
|
}
|
|
2448
|
-
return
|
|
2611
|
+
return de(e, t, o.data || {}, o.theme), { destroy: t };
|
|
2449
2612
|
});
|
|
2450
2613
|
}
|
|
2451
|
-
let
|
|
2452
|
-
function
|
|
2614
|
+
let ye = /* @__PURE__ */ new Set();
|
|
2615
|
+
function ct(o) {
|
|
2453
2616
|
if (o !== "vi" && o !== "en")
|
|
2454
2617
|
throw new Error(`[WidgetSDK] Unsupported language: ${o}`);
|
|
2455
|
-
|
|
2618
|
+
sl(o), ye.forEach((e) => {
|
|
2456
2619
|
e.rerender && e.rerender();
|
|
2457
2620
|
});
|
|
2458
2621
|
}
|
|
2459
|
-
function
|
|
2460
|
-
|
|
2622
|
+
function bl(o) {
|
|
2623
|
+
ye.add(o);
|
|
2461
2624
|
}
|
|
2462
|
-
function
|
|
2463
|
-
|
|
2625
|
+
function Sl(o) {
|
|
2626
|
+
ye.delete(o);
|
|
2464
2627
|
}
|
|
2465
|
-
function
|
|
2466
|
-
return
|
|
2628
|
+
function $l(o, e) {
|
|
2629
|
+
return hl(o, e);
|
|
2467
2630
|
}
|
|
2468
2631
|
export {
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2632
|
+
ml as a,
|
|
2633
|
+
vl as b,
|
|
2634
|
+
$l as c,
|
|
2635
|
+
pl as g,
|
|
2636
|
+
yl as i,
|
|
2637
|
+
bl as r,
|
|
2638
|
+
ct as s,
|
|
2639
|
+
gl as t,
|
|
2640
|
+
Sl as u
|
|
2478
2641
|
};
|