@prosopo/procaptcha-bundle 3.0.13 → 3.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +19 -9
  2. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -1
  3. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  4. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +1 -1
  5. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +1 -1
  6. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts +1 -0
  7. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -1
  8. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -1
  9. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  10. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +2 -1
  11. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -1
  12. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
  13. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js +2 -2
  14. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +1 -1
  15. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -1
  16. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +6 -2
  17. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -1
  18. package/CHANGELOG.md +347 -0
  19. package/dist/bundle/{ProcaptchaWidget-BIt2pcrz.js → ProcaptchaWidget-CJ-4hVS1.js} +24 -24
  20. package/dist/bundle/{ProcaptchaWidget-CXxnCzl2.js → ProcaptchaWidget-Cw3s7cGX.js} +290 -268
  21. package/dist/bundle/{builder-DNHtDoNG.js → builder-ByZ5z580.js} +3 -1
  22. package/dist/bundle/captchaComponentProvider-Cn75EmSH.js +1002 -0
  23. package/dist/bundle/{captchaRenderer-CqnUYyKY.js → captchaRenderer-s4QuLEen.js} +23 -22
  24. package/dist/bundle/{commonChunk-BKceWhtS.js → commonChunk-BjvuHlB1.js} +62 -68
  25. package/dist/bundle/{emotion-element-5486c51c.browser.esm-CimrRZxS.js → emotion-element-c39617d8.browser.esm-BNNnmykm.js} +343 -345
  26. package/dist/bundle/index-BuQg3Zno.js +1884 -0
  27. package/dist/bundle/{index-KHTbPva_.js → index-DIdd2cUz.js} +1 -1
  28. package/dist/bundle/{index-hrOz2CPm.js → index-IgqrmVIs.js} +61 -59
  29. package/dist/bundle/nobleChunk-Bbltwf44.js +2728 -0
  30. package/dist/bundle/procaptcha.bundle.js +2 -2
  31. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  32. package/dist/bundle/util/captcha/captchaProps.d.ts +1 -0
  33. package/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -1
  34. package/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -1
  35. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  36. package/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
  37. package/dist/bundle/util/widgetFactory.d.ts.map +1 -1
  38. package/dist/bundle/{utilCryptoChunk-BKe3CKqn.js → utilCryptoChunk-D6ZLkbFV.js} +252 -243
  39. package/dist/bundle/{web2Chunk-Cqw91v-J.js → web2Chunk-CNoojUDK.js} +1067 -977
  40. package/dist/bundle/web3Chunk-BlYvY4Ea.js +525 -0
  41. package/dist/bundle/{zodChunk-wTu9ZHzV.js → zodChunk-aEfPZzrp.js} +3 -3
  42. package/dist/cjs/util/captcha/captchaComponentProvider.cjs +3 -2
  43. package/dist/cjs/util/captcha/captchaRenderer.cjs +4 -3
  44. package/dist/cjs/util/captcha/components/frictionlessCaptcha.cjs +4 -3
  45. package/dist/cjs/util/captcha/components/imageCaptcha.cjs +1 -1
  46. package/dist/cjs/util/captcha/components/powCaptcha.cjs +1 -1
  47. package/dist/cjs/util/widgetFactory.cjs +7 -2
  48. package/dist/util/captcha/captchaComponentProvider.js +3 -2
  49. package/dist/util/captcha/captchaRenderer.js +4 -3
  50. package/dist/util/captcha/components/frictionlessCaptcha.js +4 -3
  51. package/dist/util/captcha/components/imageCaptcha.js +1 -1
  52. package/dist/util/captcha/components/powCaptcha.js +1 -1
  53. package/dist/util/widgetFactory.js +7 -2
  54. package/package.json +19 -20
  55. package/stats.html +1 -1
  56. package/vite.test.config.ts +3 -2
  57. package/dist/bundle/captchaComponentProvider-BGEAkC9Y.js +0 -968
  58. package/dist/bundle/index-7Xh-Mf8v.js +0 -1318
  59. package/dist/bundle/nobleChunk-CQ4ENyKh.js +0 -3769
  60. package/dist/bundle/web3Chunk-BcwDKvjL.js +0 -517
@@ -1,15 +1,14 @@
1
- var Rt = (n) => {
1
+ var $t = (n) => {
2
2
  throw TypeError(n);
3
3
  };
4
- var $t = (n, e, t) => e.has(n) || Rt("Cannot " + t);
5
- var j = (n, e, t) => ($t(n, e, "read from private field"), t ? t.call(n) : e.get(n)), pe = (n, e, t) => e.has(n) ? Rt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), he = (n, e, t, r) => ($t(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t);
6
- import { j as Dr } from "./nobleChunk-CQ4ENyKh.js";
7
- import { g as Fr } from "./bnChunk-DRlDxTFg.js";
8
- import { z as R, n as Le, o as y, a as S, b as K, s as p, c as _r, u as Ue, d as At, e as De, f as Nt, g as ze, r as Sn, l as jt } from "./zodChunk-wTu9ZHzV.js";
9
- import { h as Mr } from "./commonChunk-BKceWhtS.js";
10
- import { j as Hr, s as Vr, n as Br, a as Kr, c as qr, d as zr, e as Wr, f as Jr, g as Xr, h as Gr, k as Yr, i as xn, l as On, m as $e, o as Qr, p as Zr, q as ei, r as ti } from "./utilCryptoChunk-BKe3CKqn.js";
11
- import { r as et, b as lt, o as En, u as ct, a as Ut, t as ni, i as ri, c as Ae, k as tt, s as Tn } from "./utilChunk-DPr6oTOj.js";
12
- function ii(n, e) {
4
+ var Nt = (n, e, t) => e.has(n) || $t("Cannot " + t);
5
+ var j = (n, e, t) => (Nt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), me = (n, e, t) => e.has(n) ? $t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), ye = (n, e, t, r) => (Nt(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t);
6
+ import { g as Hr } from "./bnChunk-DRlDxTFg.js";
7
+ import { j as Vr } from "./nobleChunk-Bbltwf44.js";
8
+ import { z as C, n as ke, o as y, a as w, b as q, s as p, c as ce, d as Br, u as _e, e as jt, f as Dt, g as Je, r as On, l as Ut } from "./zodChunk-aEfPZzrp.js";
9
+ import { j as Kr, s as qr, n as zr, a as Wr, b as Jr, c as Xr, d as Yr, e as Gr, f as Qr, g as Zr, k as ei, h as En, i as Tn, l as je, m as ti, o as ni, p as ri, q as ii, r as oi } from "./utilCryptoChunk-D6ZLkbFV.js";
10
+ import { r as nt, b as ft, o as Cn, u as dt, a as Ft, t as si, i as ai, c as De, k as rt, s as Ln } from "./utilChunk-DPr6oTOj.js";
11
+ function ui(n, e) {
13
12
  for (var t = 0; t < e.length; t++) {
14
13
  const r = e[t];
15
14
  if (typeof r != "string" && !Array.isArray(r)) {
@@ -25,77 +24,68 @@ function ii(n, e) {
25
24
  }
26
25
  return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
27
26
  }
28
- const ma = (n) => new Promise((e) => setTimeout(e, n)), ya = (n, e) => {
29
- let t = 0;
30
- const r = "0".repeat(e);
31
- for (; ; ) {
32
- const i = new TextEncoder().encode(t + n);
33
- if (oi(Dr(i)).startsWith(r))
34
- return t;
35
- t += 1;
36
- }
37
- }, oi = (n) => Array.from(n).map((e) => e.toString(16).padStart(2, "0")).join("");
38
- function va(n, e, t) {
39
- if (n.length === 0)
40
- throw new Error("Array is empty");
41
- if (!Number.isFinite(e))
42
- throw new Error(`Index ${e} is not a finite number`);
43
- if (e > 0 ? e = e % n.length : e = Math.ceil(Math.abs(e) / n.length) * n.length + e, e >= n.length)
44
- throw new Error(`Index ${e} larger than array length ${n.length}`);
45
- if (e < 0)
46
- throw new Error(`Index ${e} smaller than 0`);
47
- return n[e];
48
- }
49
- const si = (n) => Array.isArray(n) && n !== null, ai = "dev", Fe = new Array(256), Ln = new Array(256 * 256);
50
- for (let n = 0; n < 256; n++)
51
- Fe[n] = n.toString(16).padStart(2, "0");
52
- for (let n = 0; n < 256; n++) {
53
- const e = n << 8;
54
- for (let t = 0; t < 256; t++)
55
- Ln[e | t] = Fe[n] + Fe[t];
56
- }
57
- function nt(n, e) {
58
- const t = n.length % 2 | 0, r = n.length - t | 0;
59
- for (let i = 0; i < r; i += 2)
60
- e += Ln[n[i] << 8 | n[i + 1]];
61
- return t && (e += Fe[n[r] | 0]), e;
62
- }
63
- function We(n, e = -1, t = !0) {
64
- const r = t ? "0x" : "";
65
- if (!(n != null && n.length))
66
- return r;
67
- if (e > 0) {
68
- const i = Math.ceil(e / 8);
69
- if (n.length > i)
70
- return `${nt(n.subarray(0, i / 2), r)}…${nt(n.subarray(n.length - i / 2), "")}`;
71
- }
72
- return nt(n, r);
73
- }
74
- const wa = (n) => si(n) ? We(new Uint8Array(n)) : n.toString();
75
- var h = /* @__PURE__ */ ((n) => (n.datasetId = "datasetId", n.user = "user", n.dapp = "dapp", n.provider = "provider", n.blockNumber = "blockNumber", n.requestHash = "requestHash", n.captchas = "captchas", n.commitmentId = "commitmentId", n.proof = "proof", n.dappSignature = "dappSignature", n.dappUserSignature = "dappUserSignature", n.providerUrl = "providerUrl", n.procaptchaResponse = "procaptcha-response", n.verifiedTimeout = "verifiedTimeout", n.maxVerifiedTime = "maxVerifiedTime", n.verified = "verified", n.status = "status", n.challenge = "challenge", n.difficulty = "difficulty", n.nonce = "nonce", n.timeouts = "timeouts", n.token = "token", n.secret = "secret", n.timestamp = "timestamp", n.signature = "signature", n.error = "error", n.siteKey = "siteKey", n.captchaType = "captchaType", n.sessionId = "sessionId", n.settings = "settings", n.domains = "domains", n.frictionlessThreshold = "frictionlessThreshold", n.powDifficulty = "powDifficulty", n.score = "score", n.tier = "tier", n.detectorKey = "detectorKey", n.ip = "ip", n))(h || {}), wt = /* @__PURE__ */ ((n) => (n.Free = "free", n.Professional = "professional", n.Enterprise = "enterprise", n))(wt || {});
76
- R.nativeEnum(wt);
77
- var Je = /* @__PURE__ */ ((n) => (n.image = "image", n.pow = "pow", n.frictionless = "frictionless", n.invisible = "invisible", n))(Je || {});
78
- R.nativeEnum(Je);
79
- const ui = Le(Je), li = Je.frictionless, ci = [], fi = 0.5, di = 4, pi = 0.8, hi = y({
80
- captchaType: ui.optional().default(li),
81
- domains: K(p()).optional().default([...ci]),
82
- frictionlessThreshold: S().optional().default(fi),
83
- powDifficulty: S().optional().default(di),
84
- imageThreshold: S().optional().default(pi)
27
+ var h = /* @__PURE__ */ ((n) => (n.datasetId = "datasetId", n.user = "user", n.dapp = "dapp", n.provider = "provider", n.blockNumber = "blockNumber", n.requestHash = "requestHash", n.captchas = "captchas", n.commitmentId = "commitmentId", n.proof = "proof", n.dappSignature = "dappSignature", n.dappUserSignature = "dappUserSignature", n.providerUrl = "providerUrl", n.procaptchaResponse = "procaptcha-response", n.verifiedTimeout = "verifiedTimeout", n.maxVerifiedTime = "maxVerifiedTime", n.verified = "verified", n.status = "status", n.challenge = "challenge", n.difficulty = "difficulty", n.nonce = "nonce", n.timeouts = "timeouts", n.token = "token", n.secret = "secret", n.timestamp = "timestamp", n.signature = "signature", n.error = "error", n.siteKey = "siteKey", n.captchaType = "captchaType", n.sessionId = "sessionId", n.settings = "settings", n.domains = "domains", n.frictionlessThreshold = "frictionlessThreshold", n.powDifficulty = "powDifficulty", n.score = "score", n.tier = "tier", n.detectorKey = "detectorKey", n.ip = "ip", n.expirationInSeconds = "expirationInSeconds", n))(h || {}), St = /* @__PURE__ */ ((n) => (n.Free = "free", n.Professional = "professional", n.Enterprise = "enterprise", n))(St || {});
28
+ C.nativeEnum(St);
29
+ var Xe = /* @__PURE__ */ ((n) => (n.image = "image", n.pow = "pow", n.frictionless = "frictionless", n.invisible = "invisible", n))(Xe || {});
30
+ C.nativeEnum(Xe);
31
+ const li = ke(Xe), ci = Xe.frictionless, fi = [], di = 0.5, pi = 4, hi = 0.8;
32
+ var Pn = /* @__PURE__ */ ((n) => (n.Allow = "allow", n.Reject = "reject", n.Flag = "flag", n))(Pn || {});
33
+ const B = C.nativeEnum(Pn), gi = "allow", mi = "allow", yi = "allow", vi = 1e3, wi = 5e-3, bi = "reject", Si = "reject", xi = !1, Oi = y({
34
+ actions: y({
35
+ countryChangeAction: B.optional(),
36
+ cityChangeAction: B.optional(),
37
+ ispChangeAction: B.optional(),
38
+ distanceExceedAction: B.optional(),
39
+ abuseScoreExceedAction: B.optional()
40
+ }).partial(),
41
+ // all optional, so you can just override what you need
42
+ distanceThresholdKm: w().positive().optional(),
43
+ abuseScoreThreshold: w().positive().optional(),
44
+ requireAllConditions: ce().optional()
45
+ }), Ei = y({
46
+ actions: y({
47
+ countryChangeAction: B.optional().default(
48
+ gi
49
+ ),
50
+ cityChangeAction: B.optional().default(
51
+ mi
52
+ ),
53
+ ispChangeAction: B.optional().default(
54
+ yi
55
+ ),
56
+ distanceExceedAction: B.optional().default(
57
+ bi
58
+ ),
59
+ abuseScoreExceedAction: B.optional().default(
60
+ Si
61
+ )
62
+ }),
63
+ distanceThresholdKm: w().positive().optional().default(vi),
64
+ abuseScoreThreshold: w().positive().optional().default(wi),
65
+ requireAllConditions: C.boolean().optional().default(xi),
66
+ // overrides are now lightweight, not recursive
67
+ countryOverrides: C.record(p(), Oi).optional()
68
+ }), Ti = y({
69
+ captchaType: li.optional().default(ci),
70
+ domains: q(p()).optional().default([...fi]),
71
+ frictionlessThreshold: w().optional().default(di),
72
+ powDifficulty: w().optional().default(pi),
73
+ imageThreshold: w().optional().default(hi),
74
+ ipValidationRules: Ei.optional()
85
75
  });
86
- let rt;
87
- async function ba(n) {
76
+ let it;
77
+ async function Ia(n) {
88
78
  return new Promise((e, t) => {
89
79
  try {
90
- Promise.resolve().then(() => Qo).then(({ default: r }) => {
91
- rt ? e(rt) : rt = r(e);
80
+ Promise.resolve().then(() => ls).then(({ default: r }) => {
81
+ it ? e(it) : it = r(e);
92
82
  });
93
83
  } catch (r) {
94
84
  t(r);
95
85
  }
96
86
  });
97
87
  }
98
- const Cn = {
88
+ const kn = {
99
89
  arabic: "ar",
100
90
  azerbaijani: "az",
101
91
  czech: "cs",
@@ -128,45 +118,45 @@ const Cn = {
128
118
  ukrainian: "uk",
129
119
  vietnamese: "vi",
130
120
  chinese: "zh-CN"
131
- }, kn = R.enum(
132
- Object.values(Cn)
121
+ }, In = C.enum(
122
+ Object.values(kn)
133
123
  );
134
- var Pn = { exports: {} }, x = {};
135
- var Ce = Symbol.for("react.element"), gi = Symbol.for("react.portal"), mi = Symbol.for("react.fragment"), yi = Symbol.for("react.strict_mode"), vi = Symbol.for("react.profiler"), wi = Symbol.for("react.provider"), bi = Symbol.for("react.context"), Si = Symbol.for("react.forward_ref"), xi = Symbol.for("react.suspense"), Oi = Symbol.for("react.memo"), Ei = Symbol.for("react.lazy"), Dt = Symbol.iterator;
136
- function Ti(n) {
137
- return n === null || typeof n != "object" ? null : (n = Dt && n[Dt] || n["@@iterator"], typeof n == "function" ? n : null);
124
+ var Rn = { exports: {} }, x = {};
125
+ var Ie = Symbol.for("react.element"), Ci = Symbol.for("react.portal"), Li = Symbol.for("react.fragment"), Pi = Symbol.for("react.strict_mode"), ki = Symbol.for("react.profiler"), Ii = Symbol.for("react.provider"), Ri = Symbol.for("react.context"), Ai = Symbol.for("react.forward_ref"), $i = Symbol.for("react.suspense"), Ni = Symbol.for("react.memo"), ji = Symbol.for("react.lazy"), _t = Symbol.iterator;
126
+ function Di(n) {
127
+ return n === null || typeof n != "object" ? null : (n = _t && n[_t] || n["@@iterator"], typeof n == "function" ? n : null);
138
128
  }
139
- var In = { isMounted: function() {
129
+ var An = { isMounted: function() {
140
130
  return !1;
141
131
  }, enqueueForceUpdate: function() {
142
132
  }, enqueueReplaceState: function() {
143
133
  }, enqueueSetState: function() {
144
- } }, Rn = Object.assign, $n = {};
145
- function ce(n, e, t) {
146
- this.props = n, this.context = e, this.refs = $n, this.updater = t || In;
134
+ } }, $n = Object.assign, Nn = {};
135
+ function pe(n, e, t) {
136
+ this.props = n, this.context = e, this.refs = Nn, this.updater = t || An;
147
137
  }
148
- ce.prototype.isReactComponent = {};
149
- ce.prototype.setState = function(n, e) {
138
+ pe.prototype.isReactComponent = {};
139
+ pe.prototype.setState = function(n, e) {
150
140
  if (typeof n != "object" && typeof n != "function" && n != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
151
141
  this.updater.enqueueSetState(this, n, e, "setState");
152
142
  };
153
- ce.prototype.forceUpdate = function(n) {
143
+ pe.prototype.forceUpdate = function(n) {
154
144
  this.updater.enqueueForceUpdate(this, n, "forceUpdate");
155
145
  };
156
- function An() {
157
- }
158
- An.prototype = ce.prototype;
159
- function bt(n, e, t) {
160
- this.props = n, this.context = e, this.refs = $n, this.updater = t || In;
161
- }
162
- var St = bt.prototype = new An();
163
- St.constructor = bt;
164
- Rn(St, ce.prototype);
165
- St.isPureReactComponent = !0;
166
- var Ft = Array.isArray, Nn = Object.prototype.hasOwnProperty, xt = { current: null }, jn = { key: !0, ref: !0, __self: !0, __source: !0 };
167
- function Un(n, e, t) {
146
+ function jn() {
147
+ }
148
+ jn.prototype = pe.prototype;
149
+ function xt(n, e, t) {
150
+ this.props = n, this.context = e, this.refs = Nn, this.updater = t || An;
151
+ }
152
+ var Ot = xt.prototype = new jn();
153
+ Ot.constructor = xt;
154
+ $n(Ot, pe.prototype);
155
+ Ot.isPureReactComponent = !0;
156
+ var Mt = Array.isArray, Dn = Object.prototype.hasOwnProperty, Et = { current: null }, Un = { key: !0, ref: !0, __self: !0, __source: !0 };
157
+ function Fn(n, e, t) {
168
158
  var r, i = {}, o = null, s = null;
169
- if (e != null) for (r in e.ref !== void 0 && (s = e.ref), e.key !== void 0 && (o = "" + e.key), e) Nn.call(e, r) && !jn.hasOwnProperty(r) && (i[r] = e[r]);
159
+ if (e != null) for (r in e.ref !== void 0 && (s = e.ref), e.key !== void 0 && (o = "" + e.key), e) Dn.call(e, r) && !Un.hasOwnProperty(r) && (i[r] = e[r]);
170
160
  var a = arguments.length - 2;
171
161
  if (a === 1) i.children = t;
172
162
  else if (1 < a) {
@@ -174,25 +164,25 @@ function Un(n, e, t) {
174
164
  i.children = u;
175
165
  }
176
166
  if (n && n.defaultProps) for (r in a = n.defaultProps, a) i[r] === void 0 && (i[r] = a[r]);
177
- return { $$typeof: Ce, type: n, key: o, ref: s, props: i, _owner: xt.current };
167
+ return { $$typeof: Ie, type: n, key: o, ref: s, props: i, _owner: Et.current };
178
168
  }
179
- function Li(n, e) {
180
- return { $$typeof: Ce, type: n.type, key: e, ref: n.ref, props: n.props, _owner: n._owner };
169
+ function Ui(n, e) {
170
+ return { $$typeof: Ie, type: n.type, key: e, ref: n.ref, props: n.props, _owner: n._owner };
181
171
  }
182
- function Ot(n) {
183
- return typeof n == "object" && n !== null && n.$$typeof === Ce;
172
+ function Tt(n) {
173
+ return typeof n == "object" && n !== null && n.$$typeof === Ie;
184
174
  }
185
- function Ci(n) {
175
+ function Fi(n) {
186
176
  var e = { "=": "=0", ":": "=2" };
187
177
  return "$" + n.replace(/[=:]/g, function(t) {
188
178
  return e[t];
189
179
  });
190
180
  }
191
- var _t = /\/+/g;
192
- function it(n, e) {
193
- return typeof n == "object" && n !== null && n.key != null ? Ci("" + n.key) : e.toString(36);
181
+ var Ht = /\/+/g;
182
+ function ot(n, e) {
183
+ return typeof n == "object" && n !== null && n.key != null ? Fi("" + n.key) : e.toString(36);
194
184
  }
195
- function Ne(n, e, t, r, i) {
185
+ function Ue(n, e, t, r, i) {
196
186
  var o = typeof n;
197
187
  (o === "undefined" || o === "boolean") && (n = null);
198
188
  var s = !1;
@@ -204,31 +194,31 @@ function Ne(n, e, t, r, i) {
204
194
  break;
205
195
  case "object":
206
196
  switch (n.$$typeof) {
207
- case Ce:
208
- case gi:
197
+ case Ie:
198
+ case Ci:
209
199
  s = !0;
210
200
  }
211
201
  }
212
- if (s) return s = n, i = i(s), n = r === "" ? "." + it(s, 0) : r, Ft(i) ? (t = "", n != null && (t = n.replace(_t, "$&/") + "/"), Ne(i, e, t, "", function(c) {
202
+ if (s) return s = n, i = i(s), n = r === "" ? "." + ot(s, 0) : r, Mt(i) ? (t = "", n != null && (t = n.replace(Ht, "$&/") + "/"), Ue(i, e, t, "", function(c) {
213
203
  return c;
214
- })) : i != null && (Ot(i) && (i = Li(i, t + (!i.key || s && s.key === i.key ? "" : ("" + i.key).replace(_t, "$&/") + "/") + n)), e.push(i)), 1;
215
- if (s = 0, r = r === "" ? "." : r + ":", Ft(n)) for (var a = 0; a < n.length; a++) {
204
+ })) : i != null && (Tt(i) && (i = Ui(i, t + (!i.key || s && s.key === i.key ? "" : ("" + i.key).replace(Ht, "$&/") + "/") + n)), e.push(i)), 1;
205
+ if (s = 0, r = r === "" ? "." : r + ":", Mt(n)) for (var a = 0; a < n.length; a++) {
216
206
  o = n[a];
217
- var u = r + it(o, a);
218
- s += Ne(o, e, t, u, i);
207
+ var u = r + ot(o, a);
208
+ s += Ue(o, e, t, u, i);
219
209
  }
220
- else if (u = Ti(n), typeof u == "function") for (n = u.call(n), a = 0; !(o = n.next()).done; ) o = o.value, u = r + it(o, a++), s += Ne(o, e, t, u, i);
210
+ else if (u = Di(n), typeof u == "function") for (n = u.call(n), a = 0; !(o = n.next()).done; ) o = o.value, u = r + ot(o, a++), s += Ue(o, e, t, u, i);
221
211
  else if (o === "object") throw e = String(n), Error("Objects are not valid as a React child (found: " + (e === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : e) + "). If you meant to render a collection of children, use an array instead.");
222
212
  return s;
223
213
  }
224
- function Ie(n, e, t) {
214
+ function $e(n, e, t) {
225
215
  if (n == null) return n;
226
216
  var r = [], i = 0;
227
- return Ne(n, r, "", "", function(o) {
217
+ return Ue(n, r, "", "", function(o) {
228
218
  return e.call(t, o, i++);
229
219
  }), r;
230
220
  }
231
- function ki(n) {
221
+ function _i(n) {
232
222
  if (n._status === -1) {
233
223
  var e = n._result;
234
224
  e = e(), e.then(function(t) {
@@ -240,41 +230,41 @@ function ki(n) {
240
230
  if (n._status === 1) return n._result.default;
241
231
  throw n._result;
242
232
  }
243
- var $ = { current: null }, je = { transition: null }, Pi = { ReactCurrentDispatcher: $, ReactCurrentBatchConfig: je, ReactCurrentOwner: xt };
244
- function Dn() {
233
+ var A = { current: null }, Fe = { transition: null }, Mi = { ReactCurrentDispatcher: A, ReactCurrentBatchConfig: Fe, ReactCurrentOwner: Et };
234
+ function _n() {
245
235
  throw Error("act(...) is not supported in production builds of React.");
246
236
  }
247
- x.Children = { map: Ie, forEach: function(n, e, t) {
248
- Ie(n, function() {
237
+ x.Children = { map: $e, forEach: function(n, e, t) {
238
+ $e(n, function() {
249
239
  e.apply(this, arguments);
250
240
  }, t);
251
241
  }, count: function(n) {
252
242
  var e = 0;
253
- return Ie(n, function() {
243
+ return $e(n, function() {
254
244
  e++;
255
245
  }), e;
256
246
  }, toArray: function(n) {
257
- return Ie(n, function(e) {
247
+ return $e(n, function(e) {
258
248
  return e;
259
249
  }) || [];
260
250
  }, only: function(n) {
261
- if (!Ot(n)) throw Error("React.Children.only expected to receive a single React element child.");
251
+ if (!Tt(n)) throw Error("React.Children.only expected to receive a single React element child.");
262
252
  return n;
263
253
  } };
264
- x.Component = ce;
265
- x.Fragment = mi;
266
- x.Profiler = vi;
267
- x.PureComponent = bt;
268
- x.StrictMode = yi;
269
- x.Suspense = xi;
270
- x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Pi;
271
- x.act = Dn;
254
+ x.Component = pe;
255
+ x.Fragment = Li;
256
+ x.Profiler = ki;
257
+ x.PureComponent = xt;
258
+ x.StrictMode = Pi;
259
+ x.Suspense = $i;
260
+ x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Mi;
261
+ x.act = _n;
272
262
  x.cloneElement = function(n, e, t) {
273
263
  if (n == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + n + ".");
274
- var r = Rn({}, n.props), i = n.key, o = n.ref, s = n._owner;
264
+ var r = $n({}, n.props), i = n.key, o = n.ref, s = n._owner;
275
265
  if (e != null) {
276
- if (e.ref !== void 0 && (o = e.ref, s = xt.current), e.key !== void 0 && (i = "" + e.key), n.type && n.type.defaultProps) var a = n.type.defaultProps;
277
- for (u in e) Nn.call(e, u) && !jn.hasOwnProperty(u) && (r[u] = e[u] === void 0 && a !== void 0 ? a[u] : e[u]);
266
+ if (e.ref !== void 0 && (o = e.ref, s = Et.current), e.key !== void 0 && (i = "" + e.key), n.type && n.type.defaultProps) var a = n.type.defaultProps;
267
+ for (u in e) Dn.call(e, u) && !Un.hasOwnProperty(u) && (r[u] = e[u] === void 0 && a !== void 0 ? a[u] : e[u]);
278
268
  }
279
269
  var u = arguments.length - 2;
280
270
  if (u === 1) r.children = t;
@@ -283,90 +273,90 @@ x.cloneElement = function(n, e, t) {
283
273
  for (var c = 0; c < u; c++) a[c] = arguments[c + 2];
284
274
  r.children = a;
285
275
  }
286
- return { $$typeof: Ce, type: n.type, key: i, ref: o, props: r, _owner: s };
276
+ return { $$typeof: Ie, type: n.type, key: i, ref: o, props: r, _owner: s };
287
277
  };
288
278
  x.createContext = function(n) {
289
- return n = { $$typeof: bi, _currentValue: n, _currentValue2: n, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, n.Provider = { $$typeof: wi, _context: n }, n.Consumer = n;
279
+ return n = { $$typeof: Ri, _currentValue: n, _currentValue2: n, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, n.Provider = { $$typeof: Ii, _context: n }, n.Consumer = n;
290
280
  };
291
- x.createElement = Un;
281
+ x.createElement = Fn;
292
282
  x.createFactory = function(n) {
293
- var e = Un.bind(null, n);
283
+ var e = Fn.bind(null, n);
294
284
  return e.type = n, e;
295
285
  };
296
286
  x.createRef = function() {
297
287
  return { current: null };
298
288
  };
299
289
  x.forwardRef = function(n) {
300
- return { $$typeof: Si, render: n };
290
+ return { $$typeof: Ai, render: n };
301
291
  };
302
- x.isValidElement = Ot;
292
+ x.isValidElement = Tt;
303
293
  x.lazy = function(n) {
304
- return { $$typeof: Ei, _payload: { _status: -1, _result: n }, _init: ki };
294
+ return { $$typeof: ji, _payload: { _status: -1, _result: n }, _init: _i };
305
295
  };
306
296
  x.memo = function(n, e) {
307
- return { $$typeof: Oi, type: n, compare: e === void 0 ? null : e };
297
+ return { $$typeof: Ni, type: n, compare: e === void 0 ? null : e };
308
298
  };
309
299
  x.startTransition = function(n) {
310
- var e = je.transition;
311
- je.transition = {};
300
+ var e = Fe.transition;
301
+ Fe.transition = {};
312
302
  try {
313
303
  n();
314
304
  } finally {
315
- je.transition = e;
305
+ Fe.transition = e;
316
306
  }
317
307
  };
318
- x.unstable_act = Dn;
308
+ x.unstable_act = _n;
319
309
  x.useCallback = function(n, e) {
320
- return $.current.useCallback(n, e);
310
+ return A.current.useCallback(n, e);
321
311
  };
322
312
  x.useContext = function(n) {
323
- return $.current.useContext(n);
313
+ return A.current.useContext(n);
324
314
  };
325
315
  x.useDebugValue = function() {
326
316
  };
327
317
  x.useDeferredValue = function(n) {
328
- return $.current.useDeferredValue(n);
318
+ return A.current.useDeferredValue(n);
329
319
  };
330
320
  x.useEffect = function(n, e) {
331
- return $.current.useEffect(n, e);
321
+ return A.current.useEffect(n, e);
332
322
  };
333
323
  x.useId = function() {
334
- return $.current.useId();
324
+ return A.current.useId();
335
325
  };
336
326
  x.useImperativeHandle = function(n, e, t) {
337
- return $.current.useImperativeHandle(n, e, t);
327
+ return A.current.useImperativeHandle(n, e, t);
338
328
  };
339
329
  x.useInsertionEffect = function(n, e) {
340
- return $.current.useInsertionEffect(n, e);
330
+ return A.current.useInsertionEffect(n, e);
341
331
  };
342
332
  x.useLayoutEffect = function(n, e) {
343
- return $.current.useLayoutEffect(n, e);
333
+ return A.current.useLayoutEffect(n, e);
344
334
  };
345
335
  x.useMemo = function(n, e) {
346
- return $.current.useMemo(n, e);
336
+ return A.current.useMemo(n, e);
347
337
  };
348
338
  x.useReducer = function(n, e, t) {
349
- return $.current.useReducer(n, e, t);
339
+ return A.current.useReducer(n, e, t);
350
340
  };
351
341
  x.useRef = function(n) {
352
- return $.current.useRef(n);
342
+ return A.current.useRef(n);
353
343
  };
354
344
  x.useState = function(n) {
355
- return $.current.useState(n);
345
+ return A.current.useState(n);
356
346
  };
357
347
  x.useSyncExternalStore = function(n, e, t) {
358
- return $.current.useSyncExternalStore(n, e, t);
348
+ return A.current.useSyncExternalStore(n, e, t);
359
349
  };
360
350
  x.useTransition = function() {
361
- return $.current.useTransition();
351
+ return A.current.useTransition();
362
352
  };
363
353
  x.version = "18.3.1";
364
- Pn.exports = x;
365
- var F = Pn.exports;
366
- const Ii = /* @__PURE__ */ Fr(F), Sa = /* @__PURE__ */ ii({
354
+ Rn.exports = x;
355
+ var F = Rn.exports;
356
+ const Hi = /* @__PURE__ */ Hr(F), Ra = /* @__PURE__ */ ui({
367
357
  __proto__: null,
368
- default: Ii
369
- }, [F]), Ri = (n, e, t, r) => {
358
+ default: Hi
359
+ }, [F]), Vi = (n, e, t, r) => {
370
360
  var o, s, a, u;
371
361
  const i = [t, {
372
362
  code: e,
@@ -374,10 +364,10 @@ const Ii = /* @__PURE__ */ Fr(F), Sa = /* @__PURE__ */ ii({
374
364
  }];
375
365
  if ((s = (o = n == null ? void 0 : n.services) == null ? void 0 : o.logger) != null && s.forward)
376
366
  return n.services.logger.forward(i, "warn", "react-i18next::", !0);
377
- Q(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), (u = (a = n == null ? void 0 : n.services) == null ? void 0 : a.logger) != null && u.warn ? n.services.logger.warn(...i) : console != null && console.warn && [...i];
378
- }, Mt = {}, ft = (n, e, t, r) => {
379
- Q(t) && Mt[t] || (Q(t) && (Mt[t] = /* @__PURE__ */ new Date()), Ri(n, e, t, r));
380
- }, Fn = (n, e) => () => {
367
+ ee(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), (u = (a = n == null ? void 0 : n.services) == null ? void 0 : a.logger) != null && u.warn ? n.services.logger.warn(...i) : console != null && console.warn && [...i];
368
+ }, Vt = {}, pt = (n, e, t, r) => {
369
+ ee(t) && Vt[t] || (ee(t) && (Vt[t] = /* @__PURE__ */ new Date()), Vi(n, e, t, r));
370
+ }, Mn = (n, e) => () => {
381
371
  if (n.isInitialized)
382
372
  e();
383
373
  else {
@@ -388,14 +378,14 @@ const Ii = /* @__PURE__ */ Fr(F), Sa = /* @__PURE__ */ ii({
388
378
  };
389
379
  n.on("initialized", t);
390
380
  }
391
- }, dt = (n, e, t) => {
392
- n.loadNamespaces(e, Fn(n, t));
393
- }, Ht = (n, e, t, r) => {
394
- if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return dt(n, t, r);
381
+ }, ht = (n, e, t) => {
382
+ n.loadNamespaces(e, Mn(n, t));
383
+ }, Bt = (n, e, t, r) => {
384
+ if (ee(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return ht(n, t, r);
395
385
  t.forEach((i) => {
396
386
  n.options.ns.indexOf(i) < 0 && n.options.ns.push(i);
397
- }), n.loadLanguages(e, Fn(n, r));
398
- }, $i = (n, e, t = {}) => !e.languages || !e.languages.length ? (ft(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
387
+ }), n.loadLanguages(e, Mn(n, r));
388
+ }, Bi = (n, e, t = {}) => !e.languages || !e.languages.length ? (pt(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
399
389
  languages: e.languages
400
390
  }), !0) : e.hasLoadedNamespace(n, {
401
391
  lng: t.lng,
@@ -403,7 +393,7 @@ const Ii = /* @__PURE__ */ Fr(F), Sa = /* @__PURE__ */ ii({
403
393
  var o;
404
394
  if (((o = t.bindI18n) == null ? void 0 : o.indexOf("languageChanging")) > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !i(r.isLanguageChangingTo, n)) return !1;
405
395
  }
406
- }), Q = (n) => typeof n == "string", Ai = (n) => typeof n == "object" && n !== null, Ni = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, ji = {
396
+ }), ee = (n) => typeof n == "string", Ki = (n) => typeof n == "object" && n !== null, qi = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, zi = {
407
397
  "&amp;": "&",
408
398
  "&#38;": "&",
409
399
  "&lt;": "<",
@@ -424,8 +414,8 @@ const Ii = /* @__PURE__ */ Fr(F), Sa = /* @__PURE__ */ ii({
424
414
  "&#8230;": "…",
425
415
  "&#x2F;": "/",
426
416
  "&#47;": "/"
427
- }, Ui = (n) => ji[n], Di = (n) => n.replace(Ni, Ui);
428
- let pt = {
417
+ }, Wi = (n) => zi[n], Ji = (n) => n.replace(qi, Wi);
418
+ let gt = {
429
419
  bindI18n: "languageChanged",
430
420
  bindI18nStore: "",
431
421
  transEmptyNodeValue: "",
@@ -433,24 +423,24 @@ let pt = {
433
423
  transWrapTextNodes: "",
434
424
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
435
425
  useSuspense: !0,
436
- unescape: Di
426
+ unescape: Ji
437
427
  };
438
- const Fi = (n = {}) => {
439
- pt = {
440
- ...pt,
428
+ const Xi = (n = {}) => {
429
+ gt = {
430
+ ...gt,
441
431
  ...n
442
432
  };
443
- }, _i = () => pt;
444
- let _n;
445
- const Mi = (n) => {
446
- _n = n;
447
- }, Hi = () => _n, Vi = {
433
+ }, Yi = () => gt;
434
+ let Hn;
435
+ const Gi = (n) => {
436
+ Hn = n;
437
+ }, Qi = () => Hn, Zi = {
448
438
  type: "3rdParty",
449
439
  init(n) {
450
- Fi(n.options.react), Mi(n);
440
+ Xi(n.options.react), Gi(n);
451
441
  }
452
- }, Bi = F.createContext();
453
- class Ki {
442
+ }, eo = F.createContext();
443
+ class to {
454
444
  constructor() {
455
445
  this.usedNamespaces = {};
456
446
  }
@@ -463,120 +453,120 @@ class Ki {
463
453
  return Object.keys(this.usedNamespaces);
464
454
  }
465
455
  }
466
- const qi = (n, e) => {
456
+ const no = (n, e) => {
467
457
  const t = F.useRef();
468
458
  return F.useEffect(() => {
469
459
  t.current = n;
470
460
  }, [n, e]), t.current;
471
- }, Mn = (n, e, t, r) => n.getFixedT(e, t, r), zi = (n, e, t, r) => F.useCallback(Mn(n, e, t, r), [n, e, t, r]), Wi = (n, e = {}) => {
472
- var A, z, W, k;
461
+ }, Vn = (n, e, t, r) => n.getFixedT(e, t, r), ro = (n, e, t, r) => F.useCallback(Vn(n, e, t, r), [n, e, t, r]), io = (n, e = {}) => {
462
+ var $, J, X, k;
473
463
  const {
474
464
  i18n: t
475
465
  } = e, {
476
466
  i18n: r,
477
467
  defaultNS: i
478
- } = F.useContext(Bi) || {}, o = t || r || Hi();
479
- if (o && !o.reportNamespaces && (o.reportNamespaces = new Ki()), !o) {
480
- ft(o, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
481
- const O = (I, T) => Q(T) ? T : Ai(T) && Q(T.defaultValue) ? T.defaultValue : Array.isArray(I) ? I[I.length - 1] : I, P = [O, {}, !1];
482
- return P.t = O, P.i18n = {}, P.ready = !1, P;
468
+ } = F.useContext(eo) || {}, o = t || r || Qi();
469
+ if (o && !o.reportNamespaces && (o.reportNamespaces = new to()), !o) {
470
+ pt(o, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
471
+ const O = (R, T) => ee(T) ? T : Ki(T) && ee(T.defaultValue) ? T.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, I = [O, {}, !1];
472
+ return I.t = O, I.i18n = {}, I.ready = !1, I;
483
473
  }
484
- (A = o.options.react) != null && A.wait && ft(o, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
474
+ ($ = o.options.react) != null && $.wait && pt(o, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
485
475
  const s = {
486
- ..._i(),
476
+ ...Yi(),
487
477
  ...o.options.react,
488
478
  ...e
489
479
  }, {
490
480
  useSuspense: a,
491
481
  keyPrefix: u
492
482
  } = s;
493
- let c = n || i || ((z = o.options) == null ? void 0 : z.defaultNS);
494
- c = Q(c) ? [c] : c || ["translation"], (k = (W = o.reportNamespaces).addUsedNamespaces) == null || k.call(W, c);
495
- const l = (o.isInitialized || o.initializedStoreOnce) && c.every((O) => $i(O, o, s)), f = zi(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), d = () => f, g = () => Mn(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), [m, v] = F.useState(d);
496
- let w = c.join();
497
- e.lng && (w = `${e.lng}${w}`);
498
- const C = qi(w), E = F.useRef(!0);
483
+ let c = n || i || ((J = o.options) == null ? void 0 : J.defaultNS);
484
+ c = ee(c) ? [c] : c || ["translation"], (k = (X = o.reportNamespaces).addUsedNamespaces) == null || k.call(X, c);
485
+ const l = (o.isInitialized || o.initializedStoreOnce) && c.every((O) => Bi(O, o, s)), f = ro(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), d = () => f, g = () => Vn(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), [m, v] = F.useState(d);
486
+ let b = c.join();
487
+ e.lng && (b = `${e.lng}${b}`);
488
+ const P = no(b), E = F.useRef(!0);
499
489
  F.useEffect(() => {
500
490
  const {
501
491
  bindI18n: O,
502
- bindI18nStore: P
492
+ bindI18nStore: I
503
493
  } = s;
504
- E.current = !0, !l && !a && (e.lng ? Ht(o, e.lng, c, () => {
494
+ E.current = !0, !l && !a && (e.lng ? Bt(o, e.lng, c, () => {
505
495
  E.current && v(g);
506
- }) : dt(o, c, () => {
496
+ }) : ht(o, c, () => {
507
497
  E.current && v(g);
508
- })), l && C && C !== w && E.current && v(g);
509
- const I = () => {
498
+ })), l && P && P !== b && E.current && v(g);
499
+ const R = () => {
510
500
  E.current && v(g);
511
501
  };
512
- return O && (o == null || o.on(O, I)), P && (o == null || o.store.on(P, I)), () => {
513
- E.current = !1, o && (O == null || O.split(" ").forEach((T) => o.off(T, I))), P && o && P.split(" ").forEach((T) => o.store.off(T, I));
502
+ return O && (o == null || o.on(O, R)), I && (o == null || o.store.on(I, R)), () => {
503
+ E.current = !1, o && (O == null || O.split(" ").forEach((T) => o.off(T, R))), I && o && I.split(" ").forEach((T) => o.store.off(T, R));
514
504
  };
515
- }, [o, w]), F.useEffect(() => {
505
+ }, [o, b]), F.useEffect(() => {
516
506
  E.current && l && v(d);
517
507
  }, [o, u, l]);
518
508
  const L = [m, o, l];
519
509
  if (L.t = m, L.i18n = o, L.ready = l, l || !l && !a) return L;
520
510
  throw new Promise((O) => {
521
- e.lng ? Ht(o, e.lng, c, () => O()) : dt(o, c, () => O());
511
+ e.lng ? Bt(o, e.lng, c, () => O()) : ht(o, c, () => O());
522
512
  });
523
- }, b = (n) => typeof n == "string", ge = () => {
513
+ }, S = (n) => typeof n == "string", ve = () => {
524
514
  let n, e;
525
515
  const t = new Promise((r, i) => {
526
516
  n = r, e = i;
527
517
  });
528
518
  return t.resolve = n, t.reject = e, t;
529
- }, Vt = (n) => n == null ? "" : "" + n, Ji = (n, e, t) => {
519
+ }, Kt = (n) => n == null ? "" : "" + n, oo = (n, e, t) => {
530
520
  n.forEach((r) => {
531
521
  e[r] && (t[r] = e[r]);
532
522
  });
533
- }, Xi = /###/g, Bt = (n) => n && n.indexOf("###") > -1 ? n.replace(Xi, ".") : n, Kt = (n) => !n || b(n), be = (n, e, t) => {
534
- const r = b(e) ? e.split(".") : e;
523
+ }, so = /###/g, qt = (n) => n && n.indexOf("###") > -1 ? n.replace(so, ".") : n, zt = (n) => !n || S(n), Oe = (n, e, t) => {
524
+ const r = S(e) ? e.split(".") : e;
535
525
  let i = 0;
536
526
  for (; i < r.length - 1; ) {
537
- if (Kt(n)) return {};
538
- const o = Bt(r[i]);
527
+ if (zt(n)) return {};
528
+ const o = qt(r[i]);
539
529
  !n[o] && t && (n[o] = new t()), Object.prototype.hasOwnProperty.call(n, o) ? n = n[o] : n = {}, ++i;
540
530
  }
541
- return Kt(n) ? {} : {
531
+ return zt(n) ? {} : {
542
532
  obj: n,
543
- k: Bt(r[i])
533
+ k: qt(r[i])
544
534
  };
545
- }, qt = (n, e, t) => {
535
+ }, Wt = (n, e, t) => {
546
536
  const {
547
537
  obj: r,
548
538
  k: i
549
- } = be(n, e, Object);
539
+ } = Oe(n, e, Object);
550
540
  if (r !== void 0 || e.length === 1) {
551
541
  r[i] = t;
552
542
  return;
553
543
  }
554
- let o = e[e.length - 1], s = e.slice(0, e.length - 1), a = be(n, s, Object);
544
+ let o = e[e.length - 1], s = e.slice(0, e.length - 1), a = Oe(n, s, Object);
555
545
  for (; a.obj === void 0 && s.length; )
556
- o = `${s[s.length - 1]}.${o}`, s = s.slice(0, s.length - 1), a = be(n, s, Object), a != null && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
546
+ o = `${s[s.length - 1]}.${o}`, s = s.slice(0, s.length - 1), a = Oe(n, s, Object), a != null && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
557
547
  a.obj[`${a.k}.${o}`] = t;
558
- }, Gi = (n, e, t, r) => {
548
+ }, ao = (n, e, t, r) => {
559
549
  const {
560
550
  obj: i,
561
551
  k: o
562
- } = be(n, e, Object);
552
+ } = Oe(n, e, Object);
563
553
  i[o] = i[o] || [], i[o].push(t);
564
- }, _e = (n, e) => {
554
+ }, Me = (n, e) => {
565
555
  const {
566
556
  obj: t,
567
557
  k: r
568
- } = be(n, e);
558
+ } = Oe(n, e);
569
559
  if (t && Object.prototype.hasOwnProperty.call(t, r))
570
560
  return t[r];
571
- }, Yi = (n, e, t) => {
572
- const r = _e(n, t);
573
- return r !== void 0 ? r : _e(e, t);
574
- }, Hn = (n, e, t) => {
561
+ }, uo = (n, e, t) => {
562
+ const r = Me(n, t);
563
+ return r !== void 0 ? r : Me(e, t);
564
+ }, Bn = (n, e, t) => {
575
565
  for (const r in e)
576
- r !== "__proto__" && r !== "constructor" && (r in n ? b(n[r]) || n[r] instanceof String || b(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Hn(n[r], e[r], t) : n[r] = e[r]);
566
+ r !== "__proto__" && r !== "constructor" && (r in n ? S(n[r]) || n[r] instanceof String || S(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Bn(n[r], e[r], t) : n[r] = e[r]);
577
567
  return n;
578
- }, te = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
579
- var Qi = {
568
+ }, re = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
569
+ var lo = {
580
570
  "&": "&amp;",
581
571
  "<": "&lt;",
582
572
  ">": "&gt;",
@@ -584,8 +574,8 @@ var Qi = {
584
574
  "'": "&#39;",
585
575
  "/": "&#x2F;"
586
576
  };
587
- const Zi = (n) => b(n) ? n.replace(/[&<>"'\/]/g, (e) => Qi[e]) : n;
588
- class eo {
577
+ const co = (n) => S(n) ? n.replace(/[&<>"'\/]/g, (e) => lo[e]) : n;
578
+ class fo {
589
579
  constructor(e) {
590
580
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
591
581
  }
@@ -597,18 +587,18 @@ class eo {
597
587
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, r), this.regExpQueue.push(e), r;
598
588
  }
599
589
  }
600
- const to = [" ", ",", "?", "!", ";"], no = new eo(20), ro = (n, e, t) => {
590
+ const po = [" ", ",", "?", "!", ";"], ho = new fo(20), go = (n, e, t) => {
601
591
  e = e || "", t = t || "";
602
- const r = to.filter((s) => e.indexOf(s) < 0 && t.indexOf(s) < 0);
592
+ const r = po.filter((s) => e.indexOf(s) < 0 && t.indexOf(s) < 0);
603
593
  if (r.length === 0) return !0;
604
- const i = no.getRegExp(`(${r.map((s) => s === "?" ? "\\?" : s).join("|")})`);
594
+ const i = ho.getRegExp(`(${r.map((s) => s === "?" ? "\\?" : s).join("|")})`);
605
595
  let o = !i.test(n);
606
596
  if (!o) {
607
597
  const s = n.indexOf(t);
608
598
  s > 0 && !i.test(n.substring(0, s)) && (o = !0);
609
599
  }
610
600
  return o;
611
- }, ht = function(n, e) {
601
+ }, mt = function(n, e) {
612
602
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
613
603
  if (!n) return;
614
604
  if (n[e])
@@ -629,7 +619,7 @@ const to = [" ", ",", "?", "!", ";"], no = new eo(20), ro = (n, e, t) => {
629
619
  i = s;
630
620
  }
631
621
  return i;
632
- }, Me = (n) => n == null ? void 0 : n.replace("_", "-"), io = {
622
+ }, He = (n) => n == null ? void 0 : n.replace("_", "-"), mo = {
633
623
  type: "logger",
634
624
  log(n) {
635
625
  this.output("log", n);
@@ -645,14 +635,14 @@ const to = [" ", ",", "?", "!", ";"], no = new eo(20), ro = (n, e, t) => {
645
635
  (r = (t = console == null ? void 0 : console[n]) == null ? void 0 : t.apply) == null || r.call(t, console, e);
646
636
  }
647
637
  };
648
- class He {
638
+ class Ve {
649
639
  constructor(e) {
650
640
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
651
641
  this.init(e, t);
652
642
  }
653
643
  init(e) {
654
644
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
655
- this.prefix = t.prefix || "i18next:", this.logger = e || io, this.options = t, this.debug = t.debug;
645
+ this.prefix = t.prefix || "i18next:", this.logger = e || mo, this.options = t, this.debug = t.debug;
656
646
  }
657
647
  log() {
658
648
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
@@ -675,20 +665,20 @@ class He {
675
665
  return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
676
666
  }
677
667
  forward(e, t, r, i) {
678
- return i && !this.debug ? null : (b(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
668
+ return i && !this.debug ? null : (S(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
679
669
  }
680
670
  create(e) {
681
- return new He(this.logger, {
671
+ return new Ve(this.logger, {
682
672
  prefix: `${this.prefix}:${e}:`,
683
673
  ...this.options
684
674
  });
685
675
  }
686
676
  clone(e) {
687
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new He(this.logger, e);
677
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new Ve(this.logger, e);
688
678
  }
689
679
  }
690
- var B = new He();
691
- class Xe {
680
+ var K = new Ve();
681
+ class Ye {
692
682
  constructor() {
693
683
  this.observers = {};
694
684
  }
@@ -722,7 +712,7 @@ class Xe {
722
712
  });
723
713
  }
724
714
  }
725
- class zt extends Xe {
715
+ class Jt extends Ye {
726
716
  constructor(e) {
727
717
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
728
718
  ns: ["translation"],
@@ -742,9 +732,9 @@ class zt extends Xe {
742
732
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
743
733
  const o = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, s = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
744
734
  let a;
745
- e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], r && (Array.isArray(r) ? a.push(...r) : b(r) && o ? a.push(...r.split(o)) : a.push(r)));
746
- const u = _e(this.data, a);
747
- return !u && !t && !r && e.indexOf(".") > -1 && (e = a[0], t = a[1], r = a.slice(2).join(".")), u || !s || !b(r) ? u : ht((l = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : l[t], r, o);
735
+ e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], r && (Array.isArray(r) ? a.push(...r) : S(r) && o ? a.push(...r.split(o)) : a.push(r)));
736
+ const u = Me(this.data, a);
737
+ return !u && !t && !r && e.indexOf(".") > -1 && (e = a[0], t = a[1], r = a.slice(2).join(".")), u || !s || !S(r) ? u : mt((l = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : l[t], r, o);
748
738
  }
749
739
  addResource(e, t, r, i) {
750
740
  let o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -752,14 +742,14 @@ class zt extends Xe {
752
742
  };
753
743
  const s = o.keySeparator !== void 0 ? o.keySeparator : this.options.keySeparator;
754
744
  let a = [e, t];
755
- r && (a = a.concat(s ? r.split(s) : r)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), qt(this.data, a, i), o.silent || this.emit("added", e, t, r, i);
745
+ r && (a = a.concat(s ? r.split(s) : r)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), Wt(this.data, a, i), o.silent || this.emit("added", e, t, r, i);
756
746
  }
757
747
  addResources(e, t, r) {
758
748
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
759
749
  silent: !1
760
750
  };
761
751
  for (const o in r)
762
- (b(r[o]) || Array.isArray(r[o])) && this.addResource(e, t, o, r[o], {
752
+ (S(r[o]) || Array.isArray(r[o])) && this.addResource(e, t, o, r[o], {
763
753
  silent: !0
764
754
  });
765
755
  i.silent || this.emit("added", e, t, r);
@@ -770,11 +760,11 @@ class zt extends Xe {
770
760
  skipCopy: !1
771
761
  }, a = [e, t];
772
762
  e.indexOf(".") > -1 && (a = e.split("."), i = r, r = t, t = a[1]), this.addNamespaces(t);
773
- let u = _e(this.data, a) || {};
774
- s.skipCopy || (r = JSON.parse(JSON.stringify(r))), i ? Hn(u, r, o) : u = {
763
+ let u = Me(this.data, a) || {};
764
+ s.skipCopy || (r = JSON.parse(JSON.stringify(r))), i ? Bn(u, r, o) : u = {
775
765
  ...u,
776
766
  ...r
777
- }, qt(this.data, a, u), s.silent || this.emit("added", e, t, r);
767
+ }, Wt(this.data, a, u), s.silent || this.emit("added", e, t, r);
778
768
  }
779
769
  removeResourceBundle(e, t) {
780
770
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -796,7 +786,7 @@ class zt extends Xe {
796
786
  return this.data;
797
787
  }
798
788
  }
799
- var Vn = {
789
+ var Kn = {
800
790
  processors: {},
801
791
  addPostProcessor(n) {
802
792
  this.processors[n.name] = n;
@@ -808,11 +798,11 @@ var Vn = {
808
798
  }), e;
809
799
  }
810
800
  };
811
- const Wt = {}, Jt = (n) => !b(n) && typeof n != "boolean" && typeof n != "number";
812
- class Ve extends Xe {
801
+ const Xt = {}, Yt = (n) => !S(n) && typeof n != "boolean" && typeof n != "number";
802
+ class Be extends Ye {
813
803
  constructor(e) {
814
804
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
815
- super(), Ji(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = B.create("translator");
805
+ super(), oo(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = K.create("translator");
816
806
  }
817
807
  changeLanguage(e) {
818
808
  e && (this.language = e);
@@ -831,20 +821,20 @@ class Ve extends Xe {
831
821
  r === void 0 && (r = ":");
832
822
  const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
833
823
  let o = t.ns || this.options.defaultNS || [];
834
- const s = r && e.indexOf(r) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !ro(e, r, i);
824
+ const s = r && e.indexOf(r) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !go(e, r, i);
835
825
  if (s && !a) {
836
826
  const u = e.match(this.interpolator.nestingRegexp);
837
827
  if (u && u.length > 0)
838
828
  return {
839
829
  key: e,
840
- namespaces: b(o) ? [o] : o
830
+ namespaces: S(o) ? [o] : o
841
831
  };
842
832
  const c = e.split(r);
843
833
  (r !== i || r === i && this.options.ns.indexOf(c[0]) > -1) && (o = c.shift()), e = c.join(i);
844
834
  }
845
835
  return {
846
836
  key: e,
847
- namespaces: b(o) ? [o] : o
837
+ namespaces: S(o) ? [o] : o
848
838
  };
849
839
  }
850
840
  translate(e, t, r) {
@@ -879,13 +869,13 @@ class Ve extends Xe {
879
869
  }
880
870
  const f = this.resolve(e, t);
881
871
  let d = f == null ? void 0 : f.res;
882
- const g = (f == null ? void 0 : f.usedKey) || s, m = (f == null ? void 0 : f.exactUsedKey) || s, v = ["[object Number]", "[object Function]", "[object RegExp]"], w = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, C = !this.i18nFormat || this.i18nFormat.handleAsObject, E = t.count !== void 0 && !b(t.count), L = Ve.hasDefaultValue(t), A = E ? this.pluralResolver.getSuffix(c, t.count, t) : "", z = t.ordinal && E ? this.pluralResolver.getSuffix(c, t.count, {
872
+ const g = (f == null ? void 0 : f.usedKey) || s, m = (f == null ? void 0 : f.exactUsedKey) || s, v = ["[object Number]", "[object Function]", "[object RegExp]"], b = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, P = !this.i18nFormat || this.i18nFormat.handleAsObject, E = t.count !== void 0 && !S(t.count), L = Be.hasDefaultValue(t), $ = E ? this.pluralResolver.getSuffix(c, t.count, t) : "", J = t.ordinal && E ? this.pluralResolver.getSuffix(c, t.count, {
883
873
  ordinal: !1
884
- }) : "", W = E && !t.ordinal && t.count === 0, k = W && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${A}`] || t[`defaultValue${z}`] || t.defaultValue;
874
+ }) : "", X = E && !t.ordinal && t.count === 0, k = X && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${$}`] || t[`defaultValue${J}`] || t.defaultValue;
885
875
  let O = d;
886
- C && !d && L && (O = k);
887
- const P = Jt(O), I = Object.prototype.toString.apply(O);
888
- if (C && O && P && v.indexOf(I) < 0 && !(b(w) && Array.isArray(O))) {
876
+ P && !d && L && (O = k);
877
+ const I = Yt(O), R = Object.prototype.toString.apply(O);
878
+ if (P && O && I && v.indexOf(R) < 0 && !(S(b) && Array.isArray(O))) {
889
879
  if (!t.returnObjects && !this.options.returnObjects) {
890
880
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
891
881
  const T = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, O, {
@@ -895,56 +885,56 @@ class Ve extends Xe {
895
885
  return i ? (f.res = T, f.usedParams = this.getUsedParamsDetails(t), f) : T;
896
886
  }
897
887
  if (o) {
898
- const T = Array.isArray(O), D = T ? [] : {}, Ct = T ? m : g;
888
+ const T = Array.isArray(O), U = T ? [] : {}, kt = T ? m : g;
899
889
  for (const _ in O)
900
890
  if (Object.prototype.hasOwnProperty.call(O, _)) {
901
- const q = `${Ct}${o}${_}`;
902
- L && !d ? D[_] = this.translate(q, {
891
+ const z = `${kt}${o}${_}`;
892
+ L && !d ? U[_] = this.translate(z, {
903
893
  ...t,
904
- defaultValue: Jt(k) ? k[_] : void 0,
894
+ defaultValue: Yt(k) ? k[_] : void 0,
905
895
  joinArrays: !1,
906
896
  ns: a
907
- }) : D[_] = this.translate(q, {
897
+ }) : U[_] = this.translate(z, {
908
898
  ...t,
909
899
  joinArrays: !1,
910
900
  ns: a
911
- }), D[_] === q && (D[_] = O[_]);
901
+ }), U[_] === z && (U[_] = O[_]);
912
902
  }
913
- d = D;
903
+ d = U;
914
904
  }
915
- } else if (C && b(w) && Array.isArray(d))
916
- d = d.join(w), d && (d = this.extendTranslation(d, e, t, r));
905
+ } else if (P && S(b) && Array.isArray(d))
906
+ d = d.join(b), d && (d = this.extendTranslation(d, e, t, r));
917
907
  else {
918
- let T = !1, D = !1;
919
- !this.isValidLookup(d) && L && (T = !0, d = k), this.isValidLookup(d) || (D = !0, d = s);
920
- const _ = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && D ? void 0 : d, q = L && k !== d && this.options.updateMissing;
921
- if (D || T || q) {
922
- if (this.logger.log(q ? "updateKey" : "missingKey", c, u, s, q ? k : d), o) {
908
+ let T = !1, U = !1;
909
+ !this.isValidLookup(d) && L && (T = !0, d = k), this.isValidLookup(d) || (U = !0, d = s);
910
+ const _ = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && U ? void 0 : d, z = L && k !== d && this.options.updateMissing;
911
+ if (U || T || z) {
912
+ if (this.logger.log(z ? "updateKey" : "missingKey", c, u, s, z ? k : d), o) {
923
913
  const N = this.resolve(s, {
924
914
  ...t,
925
915
  keySeparator: !1
926
916
  });
927
917
  N && N.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.");
928
918
  }
929
- let fe = [];
930
- const Pe = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
931
- if (this.options.saveMissingTo === "fallback" && Pe && Pe[0])
932
- for (let N = 0; N < Pe.length; N++)
933
- fe.push(Pe[N]);
934
- else this.options.saveMissingTo === "all" ? fe = this.languageUtils.toResolveHierarchy(t.lng || this.language) : fe.push(t.lng || this.language);
935
- const kt = (N, G, de) => {
936
- var It;
937
- const Pt = L && de !== d ? de : _;
938
- this.options.missingKeyHandler ? this.options.missingKeyHandler(N, u, G, Pt, q, t) : (It = this.backendConnector) != null && It.saveMissing && this.backendConnector.saveMissing(N, u, G, Pt, q, t), this.emit("missingKey", N, u, G, d);
919
+ let he = [];
920
+ const Ae = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
921
+ if (this.options.saveMissingTo === "fallback" && Ae && Ae[0])
922
+ for (let N = 0; N < Ae.length; N++)
923
+ he.push(Ae[N]);
924
+ else this.options.saveMissingTo === "all" ? he = this.languageUtils.toResolveHierarchy(t.lng || this.language) : he.push(t.lng || this.language);
925
+ const It = (N, Q, ge) => {
926
+ var At;
927
+ const Rt = L && ge !== d ? ge : _;
928
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(N, u, Q, Rt, z, t) : (At = this.backendConnector) != null && At.saveMissing && this.backendConnector.saveMissing(N, u, Q, Rt, z, t), this.emit("missingKey", N, u, Q, d);
939
929
  };
940
- this.options.saveMissing && (this.options.saveMissingPlurals && E ? fe.forEach((N) => {
941
- const G = this.pluralResolver.getSuffixes(N, t);
942
- W && t[`defaultValue${this.options.pluralSeparator}zero`] && G.indexOf(`${this.options.pluralSeparator}zero`) < 0 && G.push(`${this.options.pluralSeparator}zero`), G.forEach((de) => {
943
- kt([N], s + de, t[`defaultValue${de}`] || k);
930
+ this.options.saveMissing && (this.options.saveMissingPlurals && E ? he.forEach((N) => {
931
+ const Q = this.pluralResolver.getSuffixes(N, t);
932
+ X && t[`defaultValue${this.options.pluralSeparator}zero`] && Q.indexOf(`${this.options.pluralSeparator}zero`) < 0 && Q.push(`${this.options.pluralSeparator}zero`), Q.forEach((ge) => {
933
+ It([N], s + ge, t[`defaultValue${ge}`] || k);
944
934
  });
945
- }) : kt(fe, s, k));
935
+ }) : It(he, s, k));
946
936
  }
947
- d = this.extendTranslation(d, e, t, f, r), D && d === s && this.options.appendNamespaceToMissingKey && (d = `${u}:${s}`), (D || T) && this.options.parseMissingKeyHandler && (d = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${s}` : s, T ? d : void 0));
937
+ d = this.extendTranslation(d, e, t, f, r), U && d === s && this.options.appendNamespaceToMissingKey && (d = `${u}:${s}`), (U || T) && this.options.parseMissingKeyHandler && (d = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${s}` : s, T ? d : void 0));
948
938
  }
949
939
  return i ? (f.res = d, f.usedParams = this.getUsedParamsDetails(t), f) : d;
950
940
  }
@@ -966,13 +956,13 @@ class Ve extends Xe {
966
956
  ...r.interpolation
967
957
  }
968
958
  });
969
- const f = b(e) && (((l = r == null ? void 0 : r.interpolation) == null ? void 0 : l.skipOnVariables) !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
959
+ const f = S(e) && (((l = r == null ? void 0 : r.interpolation) == null ? void 0 : l.skipOnVariables) !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
970
960
  let d;
971
961
  if (f) {
972
962
  const m = e.match(this.interpolator.nestingRegexp);
973
963
  d = m && m.length;
974
964
  }
975
- let g = r.replace && !b(r.replace) ? r.replace : r;
965
+ let g = r.replace && !S(r.replace) ? r.replace : r;
976
966
  if (this.options.interpolation.defaultVariables && (g = {
977
967
  ...this.options.interpolation.defaultVariables,
978
968
  ...g
@@ -981,13 +971,13 @@ class Ve extends Xe {
981
971
  d < v && (r.nest = !1);
982
972
  }
983
973
  !r.lng && i && i.res && (r.lng = this.language || i.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, function() {
984
- for (var m = arguments.length, v = new Array(m), w = 0; w < m; w++)
985
- v[w] = arguments[w];
974
+ for (var m = arguments.length, v = new Array(m), b = 0; b < m; b++)
975
+ v[b] = arguments[b];
986
976
  return (o == null ? void 0 : o[0]) === v[0] && !r.context ? (s.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${t[0]}`), null) : s.translate(...v, t);
987
977
  }, r)), r.interpolation && this.interpolator.reset();
988
978
  }
989
- const a = r.postProcess || this.options.postProcess, u = b(a) ? [a] : a;
990
- return e != null && (u != null && u.length) && r.applyPostProcessor !== !1 && (e = Vn.handle(u, e, t, this.options && this.options.postProcessPassResolved ? {
979
+ const a = r.postProcess || this.options.postProcess, u = S(a) ? [a] : a;
980
+ return e != null && (u != null && u.length) && r.applyPostProcessor !== !1 && (e = Kn.handle(u, e, t, this.options && this.options.postProcessPassResolved ? {
991
981
  i18nResolved: {
992
982
  ...i,
993
983
  usedParams: this.getUsedParamsDetails(r)
@@ -997,34 +987,34 @@ class Ve extends Xe {
997
987
  }
998
988
  resolve(e) {
999
989
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, i, o, s, a;
1000
- return b(e) && (e = [e]), e.forEach((u) => {
990
+ return S(e) && (e = [e]), e.forEach((u) => {
1001
991
  if (this.isValidLookup(r)) return;
1002
992
  const c = this.extractFromKey(u, t), l = c.key;
1003
993
  i = l;
1004
994
  let f = c.namespaces;
1005
995
  this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
1006
- const d = t.count !== void 0 && !b(t.count), g = d && !t.ordinal && t.count === 0, m = t.context !== void 0 && (b(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
1007
- f.forEach((w) => {
1008
- var C, E;
1009
- this.isValidLookup(r) || (a = w, !Wt[`${v[0]}-${w}`] && ((C = this.utils) != null && C.hasLoadedNamespace) && !((E = this.utils) != null && E.hasLoadedNamespace(a)) && (Wt[`${v[0]}-${w}`] = !0, this.logger.warn(`key "${i}" for languages "${v.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!!!")), v.forEach((L) => {
1010
- var W;
996
+ const d = t.count !== void 0 && !S(t.count), g = d && !t.ordinal && t.count === 0, m = t.context !== void 0 && (S(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
997
+ f.forEach((b) => {
998
+ var P, E;
999
+ this.isValidLookup(r) || (a = b, !Xt[`${v[0]}-${b}`] && ((P = this.utils) != null && P.hasLoadedNamespace) && !((E = this.utils) != null && E.hasLoadedNamespace(a)) && (Xt[`${v[0]}-${b}`] = !0, this.logger.warn(`key "${i}" for languages "${v.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!!!")), v.forEach((L) => {
1000
+ var X;
1011
1001
  if (this.isValidLookup(r)) return;
1012
1002
  s = L;
1013
- const A = [l];
1014
- if ((W = this.i18nFormat) != null && W.addLookupKeys)
1015
- this.i18nFormat.addLookupKeys(A, l, L, w, t);
1003
+ const $ = [l];
1004
+ if ((X = this.i18nFormat) != null && X.addLookupKeys)
1005
+ this.i18nFormat.addLookupKeys($, l, L, b, t);
1016
1006
  else {
1017
1007
  let k;
1018
1008
  d && (k = this.pluralResolver.getSuffix(L, t.count, t));
1019
- const O = `${this.options.pluralSeparator}zero`, P = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1020
- if (d && (A.push(l + k), t.ordinal && k.indexOf(P) === 0 && A.push(l + k.replace(P, this.options.pluralSeparator)), g && A.push(l + O)), m) {
1021
- const I = `${l}${this.options.contextSeparator}${t.context}`;
1022
- A.push(I), d && (A.push(I + k), t.ordinal && k.indexOf(P) === 0 && A.push(I + k.replace(P, this.options.pluralSeparator)), g && A.push(I + O));
1009
+ const O = `${this.options.pluralSeparator}zero`, I = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1010
+ if (d && ($.push(l + k), t.ordinal && k.indexOf(I) === 0 && $.push(l + k.replace(I, this.options.pluralSeparator)), g && $.push(l + O)), m) {
1011
+ const R = `${l}${this.options.contextSeparator}${t.context}`;
1012
+ $.push(R), d && ($.push(R + k), t.ordinal && k.indexOf(I) === 0 && $.push(R + k.replace(I, this.options.pluralSeparator)), g && $.push(R + O));
1023
1013
  }
1024
1014
  }
1025
- let z;
1026
- for (; z = A.pop(); )
1027
- this.isValidLookup(r) || (o = z, r = this.getResource(L, w, z, t));
1015
+ let J;
1016
+ for (; J = $.pop(); )
1017
+ this.isValidLookup(r) || (o = J, r = this.getResource(L, b, J, t));
1028
1018
  }));
1029
1019
  });
1030
1020
  }), {
@@ -1045,7 +1035,7 @@ class Ve extends Xe {
1045
1035
  }
1046
1036
  getUsedParamsDetails() {
1047
1037
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1048
- const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !b(e.replace);
1038
+ const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !S(e.replace);
1049
1039
  let i = r ? e.replace : e;
1050
1040
  if (r && typeof e.count < "u" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = {
1051
1041
  ...this.options.interpolation.defaultVariables,
@@ -1067,22 +1057,22 @@ class Ve extends Xe {
1067
1057
  return !1;
1068
1058
  }
1069
1059
  }
1070
- class Xt {
1060
+ class Gt {
1071
1061
  constructor(e) {
1072
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = B.create("languageUtils");
1062
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = K.create("languageUtils");
1073
1063
  }
1074
1064
  getScriptPartFromCode(e) {
1075
- if (e = Me(e), !e || e.indexOf("-") < 0) return null;
1065
+ if (e = He(e), !e || e.indexOf("-") < 0) return null;
1076
1066
  const t = e.split("-");
1077
1067
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
1078
1068
  }
1079
1069
  getLanguagePartFromCode(e) {
1080
- if (e = Me(e), !e || e.indexOf("-") < 0) return e;
1070
+ if (e = He(e), !e || e.indexOf("-") < 0) return e;
1081
1071
  const t = e.split("-");
1082
1072
  return this.formatLanguageCode(t[0]);
1083
1073
  }
1084
1074
  formatLanguageCode(e) {
1085
- if (b(e) && e.indexOf("-") > -1) {
1075
+ if (S(e) && e.indexOf("-") > -1) {
1086
1076
  let t;
1087
1077
  try {
1088
1078
  t = Intl.getCanonicalLocales(e)[0];
@@ -1115,7 +1105,7 @@ class Xt {
1115
1105
  }
1116
1106
  getFallbackCodes(e, t) {
1117
1107
  if (!e) return [];
1118
- if (typeof e == "function" && (e = e(t)), b(e) && (e = [e]), Array.isArray(e)) return e;
1108
+ if (typeof e == "function" && (e = e(t)), S(e) && (e = [e]), Array.isArray(e)) return e;
1119
1109
  if (!t) return e.default || [];
1120
1110
  let r = e[t];
1121
1111
  return r || (r = e[this.getScriptPartFromCode(t)]), r || (r = e[this.formatLanguageCode(t)]), r || (r = e[this.getLanguagePartFromCode(t)]), r || (r = e.default), r || [];
@@ -1124,28 +1114,28 @@ class Xt {
1124
1114
  const r = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], o = (s) => {
1125
1115
  s && (this.isSupportedCode(s) ? i.push(s) : this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`));
1126
1116
  };
1127
- return b(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && o(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && o(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && o(this.getLanguagePartFromCode(e))) : b(e) && o(this.formatLanguageCode(e)), r.forEach((s) => {
1117
+ return S(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && o(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && o(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && o(this.getLanguagePartFromCode(e))) : S(e) && o(this.formatLanguageCode(e)), r.forEach((s) => {
1128
1118
  i.indexOf(s) < 0 && o(this.formatLanguageCode(s));
1129
1119
  }), i;
1130
1120
  }
1131
1121
  }
1132
- const Gt = {
1122
+ const Qt = {
1133
1123
  zero: 0,
1134
1124
  one: 1,
1135
1125
  two: 2,
1136
1126
  few: 3,
1137
1127
  many: 4,
1138
1128
  other: 5
1139
- }, Yt = {
1129
+ }, Zt = {
1140
1130
  select: (n) => n === 1 ? "one" : "other",
1141
1131
  resolvedOptions: () => ({
1142
1132
  pluralCategories: ["one", "other"]
1143
1133
  })
1144
1134
  };
1145
- class oo {
1135
+ class yo {
1146
1136
  constructor(e) {
1147
1137
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1148
- this.languageUtils = e, this.options = t, this.logger = B.create("pluralResolver"), this.pluralRulesCache = {};
1138
+ this.languageUtils = e, this.options = t, this.logger = K.create("pluralResolver"), this.pluralRulesCache = {};
1149
1139
  }
1150
1140
  addRule(e, t) {
1151
1141
  this.rules[e] = t;
@@ -1155,7 +1145,7 @@ class oo {
1155
1145
  }
1156
1146
  getRule(e) {
1157
1147
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1158
- const r = Me(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", o = JSON.stringify({
1148
+ const r = He(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", o = JSON.stringify({
1159
1149
  cleanedCode: r,
1160
1150
  type: i
1161
1151
  });
@@ -1168,8 +1158,8 @@ class oo {
1168
1158
  });
1169
1159
  } catch {
1170
1160
  if (!Intl)
1171
- return this.logger.error("No Intl support, please use an Intl polyfill!"), Yt;
1172
- if (!e.match(/-|_/)) return Yt;
1161
+ return this.logger.error("No Intl support, please use an Intl polyfill!"), Zt;
1162
+ if (!e.match(/-|_/)) return Zt;
1173
1163
  const u = this.languageUtils.getLanguagePartFromCode(e);
1174
1164
  s = this.getRule(u, t);
1175
1165
  }
@@ -1185,7 +1175,7 @@ class oo {
1185
1175
  }
1186
1176
  getSuffixes(e) {
1187
1177
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = this.getRule(e, t);
1188
- return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((i, o) => Gt[i] - Gt[o]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
1178
+ return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((i, o) => Qt[i] - Qt[o]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
1189
1179
  }
1190
1180
  getSuffix(e, t) {
1191
1181
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
@@ -1193,15 +1183,15 @@ class oo {
1193
1183
  return i ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, r));
1194
1184
  }
1195
1185
  }
1196
- const Qt = function(n, e, t) {
1197
- let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = Yi(n, e, t);
1198
- return !o && i && b(t) && (o = ht(n, t, r), o === void 0 && (o = ht(e, t, r))), o;
1199
- }, ot = (n) => n.replace(/\$/g, "$$$$");
1200
- class so {
1186
+ const en = function(n, e, t) {
1187
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = uo(n, e, t);
1188
+ return !o && i && S(t) && (o = mt(n, t, r), o === void 0 && (o = mt(e, t, r))), o;
1189
+ }, st = (n) => n.replace(/\$/g, "$$$$");
1190
+ class vo {
1201
1191
  constructor() {
1202
1192
  var t;
1203
1193
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1204
- this.logger = B.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((r) => r), this.init(e);
1194
+ this.logger = K.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((r) => r), this.init(e);
1205
1195
  }
1206
1196
  init() {
1207
1197
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -1223,11 +1213,11 @@ class so {
1223
1213
  nestingPrefixEscaped: g,
1224
1214
  nestingSuffix: m,
1225
1215
  nestingSuffixEscaped: v,
1226
- nestingOptionsSeparator: w,
1227
- maxReplaces: C,
1216
+ nestingOptionsSeparator: b,
1217
+ maxReplaces: P,
1228
1218
  alwaysFormat: E
1229
1219
  } = e.interpolation;
1230
- this.escape = t !== void 0 ? t : Zi, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = o ? te(o) : s || "{{", this.suffix = a ? te(a) : u || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? te(d) : g || te("$t("), this.nestingSuffix = m ? te(m) : v || te(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = C || 1e3, this.alwaysFormat = E !== void 0 ? E : !1, this.resetRegExp();
1220
+ this.escape = t !== void 0 ? t : co, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = o ? re(o) : s || "{{", this.suffix = a ? re(a) : u || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? re(d) : g || re("$t("), this.nestingSuffix = m ? re(m) : v || re(")"), this.nestingOptionsSeparator = b || ",", this.maxReplaces = P || 1e3, this.alwaysFormat = E !== void 0 ? E : !1, this.resetRegExp();
1231
1221
  }
1232
1222
  reset() {
1233
1223
  this.options && this.init(this.options);
@@ -1241,35 +1231,35 @@ class so {
1241
1231
  let o, s, a;
1242
1232
  const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (m) => {
1243
1233
  if (m.indexOf(this.formatSeparator) < 0) {
1244
- const E = Qt(t, u, m, this.options.keySeparator, this.options.ignoreJSONStructure);
1234
+ const E = en(t, u, m, this.options.keySeparator, this.options.ignoreJSONStructure);
1245
1235
  return this.alwaysFormat ? this.format(E, void 0, r, {
1246
1236
  ...i,
1247
1237
  ...t,
1248
1238
  interpolationkey: m
1249
1239
  }) : E;
1250
1240
  }
1251
- const v = m.split(this.formatSeparator), w = v.shift().trim(), C = v.join(this.formatSeparator).trim();
1252
- return this.format(Qt(t, u, w, this.options.keySeparator, this.options.ignoreJSONStructure), C, r, {
1241
+ const v = m.split(this.formatSeparator), b = v.shift().trim(), P = v.join(this.formatSeparator).trim();
1242
+ return this.format(en(t, u, b, this.options.keySeparator, this.options.ignoreJSONStructure), P, r, {
1253
1243
  ...i,
1254
1244
  ...t,
1255
- interpolationkey: w
1245
+ interpolationkey: b
1256
1246
  });
1257
1247
  };
1258
1248
  this.resetRegExp();
1259
1249
  const l = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, f = ((g = i == null ? void 0 : i.interpolation) == null ? void 0 : g.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
1260
1250
  return [{
1261
1251
  regex: this.regexpUnescape,
1262
- safeValue: (m) => ot(m)
1252
+ safeValue: (m) => st(m)
1263
1253
  }, {
1264
1254
  regex: this.regexp,
1265
- safeValue: (m) => this.escapeValue ? ot(this.escape(m)) : ot(m)
1255
+ safeValue: (m) => this.escapeValue ? st(this.escape(m)) : st(m)
1266
1256
  }].forEach((m) => {
1267
1257
  for (a = 0; o = m.regex.exec(e); ) {
1268
1258
  const v = o[1].trim();
1269
1259
  if (s = c(v), s === void 0)
1270
1260
  if (typeof l == "function") {
1271
- const C = l(e, o, i);
1272
- s = b(C) ? C : "";
1261
+ const P = l(e, o, i);
1262
+ s = S(P) ? P : "";
1273
1263
  } else if (i && Object.prototype.hasOwnProperty.call(i, v))
1274
1264
  s = "";
1275
1265
  else if (f) {
@@ -1277,9 +1267,9 @@ class so {
1277
1267
  continue;
1278
1268
  } else
1279
1269
  this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), s = "";
1280
- else !b(s) && !this.useRawValueToEscape && (s = Vt(s));
1281
- const w = m.safeValue(s);
1282
- if (e = e.replace(o[0], w), f ? (m.regex.lastIndex += s.length, m.regex.lastIndex -= o[0].length) : m.regex.lastIndex = 0, a++, a >= this.maxReplaces)
1270
+ else !S(s) && !this.useRawValueToEscape && (s = Kt(s));
1271
+ const b = m.safeValue(s);
1272
+ if (e = e.replace(o[0], b), f ? (m.regex.lastIndex += s.length, m.regex.lastIndex -= o[0].length) : m.regex.lastIndex = 0, a++, a >= this.maxReplaces)
1283
1273
  break;
1284
1274
  }
1285
1275
  }), e;
@@ -1308,14 +1298,14 @@ class so {
1308
1298
  let u = [];
1309
1299
  s = {
1310
1300
  ...r
1311
- }, s = s.replace && !b(s.replace) ? s.replace : s, s.applyPostProcessor = !1, delete s.defaultValue;
1301
+ }, s = s.replace && !S(s.replace) ? s.replace : s, s.applyPostProcessor = !1, delete s.defaultValue;
1312
1302
  let c = !1;
1313
1303
  if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) {
1314
1304
  const l = i[1].split(this.formatSeparator).map((f) => f.trim());
1315
1305
  i[1] = l.shift(), u = l, c = !0;
1316
1306
  }
1317
- if (o = t(a.call(this, i[1].trim(), s), s), o && i[0] === e && !b(o)) return o;
1318
- b(o) || (o = Vt(o)), o || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), o = ""), c && (o = u.reduce((l, f) => this.format(l, f, r.lng, {
1307
+ if (o = t(a.call(this, i[1].trim(), s), s), o && i[0] === e && !S(o)) return o;
1308
+ S(o) || (o = Kt(o)), o || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), o = ""), c && (o = u.reduce((l, f) => this.format(l, f, r.lng, {
1319
1309
  ...r,
1320
1310
  interpolationkey: i[1].trim()
1321
1311
  }), o.trim())), e = e.replace(i[0], o), this.regexp.lastIndex = 0;
@@ -1323,7 +1313,7 @@ class so {
1323
1313
  return e;
1324
1314
  }
1325
1315
  }
1326
- const ao = (n) => {
1316
+ const wo = (n) => {
1327
1317
  let e = n.toLowerCase().trim();
1328
1318
  const t = {};
1329
1319
  if (n.indexOf("(") > -1) {
@@ -1341,7 +1331,7 @@ const ao = (n) => {
1341
1331
  formatName: e,
1342
1332
  formatOptions: t
1343
1333
  };
1344
- }, ne = (n) => {
1334
+ }, ie = (n) => {
1345
1335
  const e = {};
1346
1336
  return (t, r, i) => {
1347
1337
  let o = i;
@@ -1351,39 +1341,39 @@ const ao = (n) => {
1351
1341
  });
1352
1342
  const s = r + JSON.stringify(o);
1353
1343
  let a = e[s];
1354
- return a || (a = n(Me(r), i), e[s] = a), a(t);
1344
+ return a || (a = n(He(r), i), e[s] = a), a(t);
1355
1345
  };
1356
1346
  };
1357
- class uo {
1347
+ class bo {
1358
1348
  constructor() {
1359
1349
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1360
- this.logger = B.create("formatter"), this.options = e, this.formats = {
1361
- number: ne((t, r) => {
1350
+ this.logger = K.create("formatter"), this.options = e, this.formats = {
1351
+ number: ie((t, r) => {
1362
1352
  const i = new Intl.NumberFormat(t, {
1363
1353
  ...r
1364
1354
  });
1365
1355
  return (o) => i.format(o);
1366
1356
  }),
1367
- currency: ne((t, r) => {
1357
+ currency: ie((t, r) => {
1368
1358
  const i = new Intl.NumberFormat(t, {
1369
1359
  ...r,
1370
1360
  style: "currency"
1371
1361
  });
1372
1362
  return (o) => i.format(o);
1373
1363
  }),
1374
- datetime: ne((t, r) => {
1364
+ datetime: ie((t, r) => {
1375
1365
  const i = new Intl.DateTimeFormat(t, {
1376
1366
  ...r
1377
1367
  });
1378
1368
  return (o) => i.format(o);
1379
1369
  }),
1380
- relativetime: ne((t, r) => {
1370
+ relativetime: ie((t, r) => {
1381
1371
  const i = new Intl.RelativeTimeFormat(t, {
1382
1372
  ...r
1383
1373
  });
1384
1374
  return (o) => i.format(o, r.range || "day");
1385
1375
  }),
1386
- list: ne((t, r) => {
1376
+ list: ie((t, r) => {
1387
1377
  const i = new Intl.ListFormat(t, {
1388
1378
  ...r
1389
1379
  });
@@ -1401,7 +1391,7 @@ class uo {
1401
1391
  this.formats[e.toLowerCase().trim()] = t;
1402
1392
  }
1403
1393
  addCached(e, t) {
1404
- this.formats[e.toLowerCase().trim()] = ne(t);
1394
+ this.formats[e.toLowerCase().trim()] = ie(t);
1405
1395
  }
1406
1396
  format(e, t, r) {
1407
1397
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
@@ -1415,7 +1405,7 @@ class uo {
1415
1405
  const {
1416
1406
  formatName: c,
1417
1407
  formatOptions: l
1418
- } = ao(u);
1408
+ } = wo(u);
1419
1409
  if (this.formats[c]) {
1420
1410
  let d = a;
1421
1411
  try {
@@ -1435,14 +1425,14 @@ class uo {
1435
1425
  }, e);
1436
1426
  }
1437
1427
  }
1438
- const lo = (n, e) => {
1428
+ const So = (n, e) => {
1439
1429
  n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
1440
1430
  };
1441
- class co extends Xe {
1431
+ class xo extends Ye {
1442
1432
  constructor(e, t, r) {
1443
1433
  var o, s;
1444
1434
  let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1445
- super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = i, this.logger = B.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 = [], (s = (o = this.backend) == null ? void 0 : o.init) == null || s.call(o, r, i.backend, i);
1435
+ super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = i, this.logger = K.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 = [], (s = (o = this.backend) == null ? void 0 : o.init) == null || s.call(o, r, i.backend, i);
1446
1436
  }
1447
1437
  queueLoad(e, t, r, i) {
1448
1438
  const o = {}, s = {}, a = {}, u = {};
@@ -1472,7 +1462,7 @@ class co extends Xe {
1472
1462
  }), this.state[e] = t ? -1 : 2, t && r && (this.state[e] = 0);
1473
1463
  const a = {};
1474
1464
  this.queue.forEach((u) => {
1475
- Gi(u.loaded, [o], s), lo(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
1465
+ ao(u.loaded, [o], s), So(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
1476
1466
  a[c] || (a[c] = {});
1477
1467
  const l = u.loaded[c];
1478
1468
  l.length && l.forEach((f) => {
@@ -1524,7 +1514,7 @@ class co extends Xe {
1524
1514
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
1525
1515
  if (!this.backend)
1526
1516
  return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
1527
- b(e) && (e = this.languageUtils.toResolveHierarchy(e)), b(t) && (t = [t]);
1517
+ S(e) && (e = this.languageUtils.toResolveHierarchy(e)), S(t) && (t = [t]);
1528
1518
  const o = this.queueLoad(e, t, r, i);
1529
1519
  if (!o.toLoad.length)
1530
1520
  return o.pending.length || i(), null;
@@ -1564,7 +1554,7 @@ class co extends Xe {
1564
1554
  if (m.length < 6)
1565
1555
  try {
1566
1556
  let v;
1567
- m.length === 5 ? v = m(e, t, r, i, g) : v = m(e, t, r, i), v && typeof v.then == "function" ? v.then((w) => a(null, w)).catch(a) : a(null, v);
1557
+ m.length === 5 ? v = m(e, t, r, i, g) : v = m(e, t, r, i), v && typeof v.then == "function" ? v.then((b) => a(null, b)).catch(a) : a(null, v);
1568
1558
  } catch (v) {
1569
1559
  a(v);
1570
1560
  }
@@ -1575,7 +1565,7 @@ class co extends Xe {
1575
1565
  }
1576
1566
  }
1577
1567
  }
1578
- const Zt = () => ({
1568
+ const tn = () => ({
1579
1569
  debug: !1,
1580
1570
  initAsync: !0,
1581
1571
  ns: ["translation"],
@@ -1610,7 +1600,7 @@ const Zt = () => ({
1610
1600
  appendNamespaceToCIMode: !1,
1611
1601
  overloadTranslationOptionHandler: (n) => {
1612
1602
  let e = {};
1613
- if (typeof n[1] == "object" && (e = n[1]), b(n[1]) && (e.defaultValue = n[1]), b(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") {
1603
+ if (typeof n[1] == "object" && (e = n[1]), S(n[1]) && (e.defaultValue = n[1]), S(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") {
1614
1604
  const t = n[3] || n[2];
1615
1605
  Object.keys(t).forEach((r) => {
1616
1606
  e[r] = t[r];
@@ -1631,21 +1621,21 @@ const Zt = () => ({
1631
1621
  maxReplaces: 1e3,
1632
1622
  skipOnVariables: !0
1633
1623
  }
1634
- }), en = (n) => {
1624
+ }), nn = (n) => {
1635
1625
  var e, t;
1636
- return b(n.ns) && (n.ns = [n.ns]), b(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), b(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), ((t = (e = n.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n;
1637
- }, Re = () => {
1638
- }, fo = (n) => {
1626
+ return S(n.ns) && (n.ns = [n.ns]), S(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), S(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), ((t = (e = n.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n;
1627
+ }, Ne = () => {
1628
+ }, Oo = (n) => {
1639
1629
  Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
1640
1630
  typeof n[t] == "function" && (n[t] = n[t].bind(n));
1641
1631
  });
1642
1632
  };
1643
- class Se extends Xe {
1633
+ class Ee extends Ye {
1644
1634
  constructor() {
1645
1635
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1646
- if (super(), this.options = en(e), this.services = {}, this.logger = B, this.modules = {
1636
+ if (super(), this.options = nn(e), this.services = {}, this.logger = K, this.modules = {
1647
1637
  external: []
1648
- }, fo(this), t && !this.isInitialized && !e.isClone) {
1638
+ }, Oo(this), t && !this.isInitialized && !e.isClone) {
1649
1639
  if (!this.options.initAsync)
1650
1640
  return this.init(e, t), this;
1651
1641
  setTimeout(() => {
@@ -1656,42 +1646,42 @@ class Se extends Xe {
1656
1646
  init() {
1657
1647
  var e = this;
1658
1648
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
1659
- this.isInitializing = !0, typeof t == "function" && (r = t, t = {}), t.defaultNS == null && t.ns && (b(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
1660
- const i = Zt();
1649
+ this.isInitializing = !0, typeof t == "function" && (r = t, t = {}), t.defaultNS == null && t.ns && (S(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
1650
+ const i = tn();
1661
1651
  this.options = {
1662
1652
  ...i,
1663
1653
  ...this.options,
1664
- ...en(t)
1654
+ ...nn(t)
1665
1655
  }, this.options.interpolation = {
1666
1656
  ...i.interpolation,
1667
1657
  ...this.options.interpolation
1668
1658
  }, t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
1669
1659
  const o = (l) => l ? typeof l == "function" ? new l() : l : null;
1670
1660
  if (!this.options.isClone) {
1671
- this.modules.logger ? B.init(o(this.modules.logger), this.options) : B.init(null, this.options);
1661
+ this.modules.logger ? K.init(o(this.modules.logger), this.options) : K.init(null, this.options);
1672
1662
  let l;
1673
- this.modules.formatter ? l = this.modules.formatter : l = uo;
1674
- const f = new Xt(this.options);
1675
- this.store = new zt(this.options.resources, this.options);
1663
+ this.modules.formatter ? l = this.modules.formatter : l = bo;
1664
+ const f = new Gt(this.options);
1665
+ this.store = new Jt(this.options.resources, this.options);
1676
1666
  const d = this.services;
1677
- d.logger = B, d.resourceStore = this.store, d.languageUtils = f, d.pluralResolver = new oo(f, {
1667
+ d.logger = K, d.resourceStore = this.store, d.languageUtils = f, d.pluralResolver = new yo(f, {
1678
1668
  prepend: this.options.pluralSeparator,
1679
1669
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1680
- }), l && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (d.formatter = o(l), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new so(this.options), d.utils = {
1670
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (d.formatter = o(l), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new vo(this.options), d.utils = {
1681
1671
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1682
- }, d.backendConnector = new co(o(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(g) {
1683
- for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
1684
- v[w - 1] = arguments[w];
1672
+ }, d.backendConnector = new xo(o(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(g) {
1673
+ for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), b = 1; b < m; b++)
1674
+ v[b - 1] = arguments[b];
1685
1675
  e.emit(g, ...v);
1686
- }), this.modules.languageDetector && (d.languageDetector = o(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = o(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new Ve(this.services, this.options), this.translator.on("*", function(g) {
1687
- for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
1688
- v[w - 1] = arguments[w];
1676
+ }), this.modules.languageDetector && (d.languageDetector = o(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = o(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new Be(this.services, this.options), this.translator.on("*", function(g) {
1677
+ for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), b = 1; b < m; b++)
1678
+ v[b - 1] = arguments[b];
1689
1679
  e.emit(g, ...v);
1690
1680
  }), this.modules.external.forEach((g) => {
1691
1681
  g.init && g.init(this);
1692
1682
  });
1693
1683
  }
1694
- if (this.format = this.options.interpolation.format, r || (r = Re), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1684
+ if (this.format = this.options.interpolation.format, r || (r = Ne), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1695
1685
  const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1696
1686
  l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
1697
1687
  }
@@ -1704,7 +1694,7 @@ class Se extends Xe {
1704
1694
  return e.store[l](...arguments), e;
1705
1695
  };
1706
1696
  });
1707
- const u = ge(), c = () => {
1697
+ const u = ve(), c = () => {
1708
1698
  const l = (f, d) => {
1709
1699
  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), u.resolve(d), r(f, d);
1710
1700
  };
@@ -1715,8 +1705,8 @@ class Se extends Xe {
1715
1705
  }
1716
1706
  loadResources(e) {
1717
1707
  var o, s;
1718
- let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Re;
1719
- const i = b(e) ? e : this.language;
1708
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ne;
1709
+ const i = S(e) ? e : this.language;
1720
1710
  if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
1721
1711
  if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
1722
1712
  const a = [], u = (c) => {
@@ -1732,15 +1722,15 @@ class Se extends Xe {
1732
1722
  r(null);
1733
1723
  }
1734
1724
  reloadResources(e, t, r) {
1735
- const i = ge();
1736
- return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = Re), this.services.backendConnector.reload(e, t, (o) => {
1725
+ const i = ve();
1726
+ return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = Ne), this.services.backendConnector.reload(e, t, (o) => {
1737
1727
  i.resolve(), r(o);
1738
1728
  }), i;
1739
1729
  }
1740
1730
  use(e) {
1741
1731
  if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1742
1732
  if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1743
- 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" && Vn.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1733
+ 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" && Kn.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1744
1734
  }
1745
1735
  setResolvedLanguage(e) {
1746
1736
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
@@ -1755,7 +1745,7 @@ class Se extends Xe {
1755
1745
  changeLanguage(e, t) {
1756
1746
  var r = this;
1757
1747
  this.isLanguageChangingTo = e;
1758
- const i = ge();
1748
+ const i = ve();
1759
1749
  this.emit("languageChanging", e);
1760
1750
  const o = (u) => {
1761
1751
  this.language = u, this.languages = this.services.languageUtils.toResolveHierarchy(u), this.resolvedLanguage = void 0, this.setResolvedLanguage(u);
@@ -1768,7 +1758,7 @@ class Se extends Xe {
1768
1758
  }, a = (u) => {
1769
1759
  var l, f;
1770
1760
  !e && !u && this.services.languageDetector && (u = []);
1771
- const c = b(u) ? u : this.services.languageUtils.getBestMatchFromCodes(u);
1761
+ const c = S(u) ? u : this.services.languageUtils.getBestMatchFromCodes(u);
1772
1762
  c && (this.language || o(c), this.translator.language || this.translator.changeLanguage(c), (f = (l = this.services.languageDetector) == null ? void 0 : l.cacheUserLanguage) == null || f.call(l, c)), this.loadResources(c, (d) => {
1773
1763
  s(d, c);
1774
1764
  });
@@ -1792,7 +1782,7 @@ class Se extends Xe {
1792
1782
  let g;
1793
1783
  return u.keyPrefix && Array.isArray(s) ? g = s.map((m) => `${u.keyPrefix}${d}${m}`) : g = u.keyPrefix ? `${u.keyPrefix}${d}${s}` : s, i.t(g, u);
1794
1784
  };
1795
- return b(e) ? o.lng = e : o.lngs = e, o.ns = t, o.keyPrefix = r, o;
1785
+ return S(e) ? o.lng = e : o.lngs = e, o.ns = t, o.keyPrefix = r, o;
1796
1786
  }
1797
1787
  t() {
1798
1788
  var i;
@@ -1828,16 +1818,16 @@ class Se extends Xe {
1828
1818
  return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || s(r, e) && (!i || s(o, e)));
1829
1819
  }
1830
1820
  loadNamespaces(e, t) {
1831
- const r = ge();
1832
- return this.options.ns ? (b(e) && (e = [e]), e.forEach((i) => {
1821
+ const r = ve();
1822
+ return this.options.ns ? (S(e) && (e = [e]), e.forEach((i) => {
1833
1823
  this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
1834
1824
  }), this.loadResources((i) => {
1835
1825
  r.resolve(), t && t(i);
1836
1826
  }), r) : (t && t(), Promise.resolve());
1837
1827
  }
1838
1828
  loadLanguages(e, t) {
1839
- const r = ge();
1840
- b(e) && (e = [e]);
1829
+ const r = ve();
1830
+ S(e) && (e = [e]);
1841
1831
  const i = this.options.preload || [], o = e.filter((s) => i.indexOf(s) < 0 && this.services.languageUtils.isSupportedCode(s));
1842
1832
  return o.length ? (this.options.preload = i.concat(o), this.loadResources((s) => {
1843
1833
  r.resolve(), t && t(s);
@@ -1846,22 +1836,22 @@ class Se extends Xe {
1846
1836
  dir(e) {
1847
1837
  var i, o;
1848
1838
  if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
1849
- 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"], r = ((o = this.services) == null ? void 0 : o.languageUtils) || new Xt(Zt());
1839
+ 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"], r = ((o = this.services) == null ? void 0 : o.languageUtils) || new Gt(tn());
1850
1840
  return t.indexOf(r.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1851
1841
  }
1852
1842
  static createInstance() {
1853
1843
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1854
- return new Se(e, t);
1844
+ return new Ee(e, t);
1855
1845
  }
1856
1846
  cloneInstance() {
1857
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Re;
1847
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ne;
1858
1848
  const r = e.forkResourceStore;
1859
1849
  r && delete e.forkResourceStore;
1860
1850
  const i = {
1861
1851
  ...this.options,
1862
1852
  ...e,
1863
1853
  isClone: !0
1864
- }, o = new Se(i);
1854
+ }, o = new Ee(i);
1865
1855
  if ((e.debug !== void 0 || e.prefix !== void 0) && (o.logger = o.logger.clone(e)), ["store", "services", "language"].forEach((a) => {
1866
1856
  o[a] = this[a];
1867
1857
  }), o.services = {
@@ -1874,9 +1864,9 @@ class Se extends Xe {
1874
1864
  }, Object.keys(u[c]).reduce((l, f) => (l[f] = {
1875
1865
  ...u[c][f]
1876
1866
  }, l), {})), {});
1877
- o.store = new zt(a, i), o.services.resourceStore = o.store;
1867
+ o.store = new Jt(a, i), o.services.resourceStore = o.store;
1878
1868
  }
1879
- return o.translator = new Ve(o.services, i), o.translator.on("*", function(a) {
1869
+ return o.translator = new Be(o.services, i), o.translator.on("*", function(a) {
1880
1870
  for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), l = 1; l < u; l++)
1881
1871
  c[l - 1] = arguments[l];
1882
1872
  o.emit(a, ...c);
@@ -1894,20 +1884,20 @@ class Se extends Xe {
1894
1884
  };
1895
1885
  }
1896
1886
  }
1897
- const re = Se.createInstance();
1898
- re.createInstance = Se.createInstance;
1887
+ const oe = Ee.createInstance();
1888
+ oe.createInstance = Ee.createInstance;
1899
1889
  const {
1900
- slice: po,
1901
- forEach: ho
1890
+ slice: Eo,
1891
+ forEach: To
1902
1892
  } = [];
1903
- function go(n) {
1904
- return ho.call(po.call(arguments, 1), (e) => {
1893
+ function Co(n) {
1894
+ return To.call(Eo.call(arguments, 1), (e) => {
1905
1895
  if (e)
1906
1896
  for (const t in e)
1907
1897
  n[t] === void 0 && (n[t] = e[t]);
1908
1898
  }), n;
1909
1899
  }
1910
- const tn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, mo = function(n, e) {
1900
+ const rn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Lo = function(n, e) {
1911
1901
  const r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
1912
1902
  path: "/"
1913
1903
  }, i = encodeURIComponent(e);
@@ -1918,12 +1908,12 @@ const tn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, mo = function(n, e) {
1918
1908
  o += `; Max-Age=${Math.floor(s)}`;
1919
1909
  }
1920
1910
  if (r.domain) {
1921
- if (!tn.test(r.domain))
1911
+ if (!rn.test(r.domain))
1922
1912
  throw new TypeError("option domain is invalid");
1923
1913
  o += `; Domain=${r.domain}`;
1924
1914
  }
1925
1915
  if (r.path) {
1926
- if (!tn.test(r.path))
1916
+ if (!rn.test(r.path))
1927
1917
  throw new TypeError("option path is invalid");
1928
1918
  o += `; Path=${r.path}`;
1929
1919
  }
@@ -1950,13 +1940,13 @@ const tn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, mo = function(n, e) {
1950
1940
  throw new TypeError("option sameSite is invalid");
1951
1941
  }
1952
1942
  return o;
1953
- }, nn = {
1943
+ }, on = {
1954
1944
  create(n, e, t, r) {
1955
1945
  let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
1956
1946
  path: "/",
1957
1947
  sameSite: "strict"
1958
1948
  };
1959
- t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), r && (i.domain = r), document.cookie = mo(n, encodeURIComponent(e), i);
1949
+ t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), r && (i.domain = r), document.cookie = Lo(n, encodeURIComponent(e), i);
1960
1950
  },
1961
1951
  read(n) {
1962
1952
  const e = `${n}=`, t = document.cookie.split(";");
@@ -1971,7 +1961,7 @@ const tn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, mo = function(n, e) {
1971
1961
  this.create(n, "", -1);
1972
1962
  }
1973
1963
  };
1974
- var yo = {
1964
+ var Po = {
1975
1965
  name: "cookie",
1976
1966
  // Deconstruct the options object and extract the lookupCookie property
1977
1967
  lookup(n) {
@@ -1979,7 +1969,7 @@ var yo = {
1979
1969
  lookupCookie: e
1980
1970
  } = n;
1981
1971
  if (e && typeof document < "u")
1982
- return nn.read(e) || void 0;
1972
+ return on.read(e) || void 0;
1983
1973
  },
1984
1974
  // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
1985
1975
  cacheUserLanguage(n, e) {
@@ -1989,9 +1979,9 @@ var yo = {
1989
1979
  cookieDomain: i,
1990
1980
  cookieOptions: o
1991
1981
  } = e;
1992
- t && typeof document < "u" && nn.create(t, n, r, i, o);
1982
+ t && typeof document < "u" && on.create(t, n, r, i, o);
1993
1983
  }
1994
- }, vo = {
1984
+ }, ko = {
1995
1985
  name: "querystring",
1996
1986
  // Deconstruct the options object and extract the lookupQuerystring property
1997
1987
  lookup(n) {
@@ -2013,26 +2003,26 @@ var yo = {
2013
2003
  return t;
2014
2004
  }
2015
2005
  };
2016
- let me = null;
2017
- const rn = () => {
2018
- if (me !== null) return me;
2006
+ let we = null;
2007
+ const sn = () => {
2008
+ if (we !== null) return we;
2019
2009
  try {
2020
- me = window !== "undefined" && window.localStorage !== null;
2010
+ we = window !== "undefined" && window.localStorage !== null;
2021
2011
  const n = "i18next.translate.boo";
2022
2012
  window.localStorage.setItem(n, "foo"), window.localStorage.removeItem(n);
2023
2013
  } catch {
2024
- me = !1;
2014
+ we = !1;
2025
2015
  }
2026
- return me;
2016
+ return we;
2027
2017
  };
2028
- var wo = {
2018
+ var Io = {
2029
2019
  name: "localStorage",
2030
2020
  // Deconstruct the options object and extract the lookupLocalStorage property
2031
2021
  lookup(n) {
2032
2022
  let {
2033
2023
  lookupLocalStorage: e
2034
2024
  } = n;
2035
- if (e && rn())
2025
+ if (e && sn())
2036
2026
  return window.localStorage.getItem(e) || void 0;
2037
2027
  },
2038
2028
  // Deconstruct the options object and extract the lookupLocalStorage property
@@ -2040,37 +2030,37 @@ var wo = {
2040
2030
  let {
2041
2031
  lookupLocalStorage: t
2042
2032
  } = e;
2043
- t && rn() && window.localStorage.setItem(t, n);
2033
+ t && sn() && window.localStorage.setItem(t, n);
2044
2034
  }
2045
2035
  };
2046
- let ye = null;
2047
- const on = () => {
2048
- if (ye !== null) return ye;
2036
+ let be = null;
2037
+ const an = () => {
2038
+ if (be !== null) return be;
2049
2039
  try {
2050
- ye = window !== "undefined" && window.sessionStorage !== null;
2040
+ be = window !== "undefined" && window.sessionStorage !== null;
2051
2041
  const n = "i18next.translate.boo";
2052
2042
  window.sessionStorage.setItem(n, "foo"), window.sessionStorage.removeItem(n);
2053
2043
  } catch {
2054
- ye = !1;
2044
+ be = !1;
2055
2045
  }
2056
- return ye;
2046
+ return be;
2057
2047
  };
2058
- var bo = {
2048
+ var Ro = {
2059
2049
  name: "sessionStorage",
2060
2050
  lookup(n) {
2061
2051
  let {
2062
2052
  lookupSessionStorage: e
2063
2053
  } = n;
2064
- if (e && on())
2054
+ if (e && an())
2065
2055
  return window.sessionStorage.getItem(e) || void 0;
2066
2056
  },
2067
2057
  cacheUserLanguage(n, e) {
2068
2058
  let {
2069
2059
  lookupSessionStorage: t
2070
2060
  } = e;
2071
- t && on() && window.sessionStorage.setItem(t, n);
2061
+ t && an() && window.sessionStorage.setItem(t, n);
2072
2062
  }
2073
- }, So = {
2063
+ }, Ao = {
2074
2064
  name: "navigator",
2075
2065
  lookup(n) {
2076
2066
  const e = [];
@@ -2087,7 +2077,7 @@ var bo = {
2087
2077
  }
2088
2078
  return e.length > 0 ? e : void 0;
2089
2079
  }
2090
- }, xo = {
2080
+ }, $o = {
2091
2081
  name: "htmlTag",
2092
2082
  // Deconstruct the options object and extract the htmlTag property
2093
2083
  lookup(n) {
@@ -2097,7 +2087,7 @@ var bo = {
2097
2087
  const r = e || (typeof document < "u" ? document.documentElement : null);
2098
2088
  return r && typeof r.getAttribute == "function" && (t = r.getAttribute("lang")), t;
2099
2089
  }
2100
- }, Oo = {
2090
+ }, No = {
2101
2091
  name: "path",
2102
2092
  // Deconstruct the options object and extract the lookupFromPathIndex property
2103
2093
  lookup(n) {
@@ -2109,7 +2099,7 @@ var bo = {
2109
2099
  const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
2110
2100
  return Array.isArray(t) ? (i = t[typeof e == "number" ? e : 0]) == null ? void 0 : i.replace("/", "") : void 0;
2111
2101
  }
2112
- }, Eo = {
2102
+ }, jo = {
2113
2103
  name: "subdomain",
2114
2104
  lookup(n) {
2115
2105
  var i, o;
@@ -2121,15 +2111,15 @@ var bo = {
2121
2111
  return r[t];
2122
2112
  }
2123
2113
  };
2124
- let Bn = !1;
2114
+ let qn = !1;
2125
2115
  try {
2126
- Bn = !0;
2116
+ qn = !0;
2127
2117
  } catch {
2128
2118
  }
2129
- const Kn = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
2130
- Bn || Kn.splice(1, 1);
2131
- const To = () => ({
2132
- order: Kn,
2119
+ const zn = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
2120
+ qn || zn.splice(1, 1);
2121
+ const Do = () => ({
2122
+ order: zn,
2133
2123
  lookupQuerystring: "lng",
2134
2124
  lookupCookie: "i18next",
2135
2125
  lookupLocalStorage: "i18nextLng",
@@ -2141,7 +2131,7 @@ const To = () => ({
2141
2131
  // cookieDomain: 'myDomain'
2142
2132
  convertDetectedLanguage: (n) => n
2143
2133
  });
2144
- class qn {
2134
+ class Wn {
2145
2135
  constructor(e) {
2146
2136
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2147
2137
  this.type = "languageDetector", this.detectors = {}, this.init(e, t);
@@ -2150,7 +2140,7 @@ class qn {
2150
2140
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
2151
2141
  languageUtils: {}
2152
2142
  }, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2153
- this.services = e, this.options = go(t, this.options || {}, To()), 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 = r, this.addDetector(yo), this.addDetector(vo), this.addDetector(wo), this.addDetector(bo), this.addDetector(So), this.addDetector(xo), this.addDetector(Oo), this.addDetector(Eo);
2143
+ this.services = e, this.options = Co(t, this.options || {}, Do()), 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 = r, this.addDetector(Po), this.addDetector(ko), this.addDetector(Io), this.addDetector(Ro), this.addDetector(Ao), this.addDetector($o), this.addDetector(No), this.addDetector(jo);
2154
2144
  }
2155
2145
  addDetector(e) {
2156
2146
  return this.detectors[e.name] = e, this;
@@ -2171,55 +2161,55 @@ class qn {
2171
2161
  }));
2172
2162
  }
2173
2163
  }
2174
- qn.type = "languageDetector";
2175
- function Lo(n, e) {
2164
+ Wn.type = "languageDetector";
2165
+ function Uo(n, e) {
2176
2166
  if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
2177
2167
  }
2178
- function xe(n) {
2168
+ function Te(n) {
2179
2169
  "@babel/helpers - typeof";
2180
- return xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2170
+ return Te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2181
2171
  return typeof e;
2182
2172
  } : function(e) {
2183
2173
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2184
- }, xe(n);
2174
+ }, Te(n);
2185
2175
  }
2186
- function Co(n, e) {
2187
- if (xe(n) != "object" || !n) return n;
2176
+ function Fo(n, e) {
2177
+ if (Te(n) != "object" || !n) return n;
2188
2178
  var t = n[Symbol.toPrimitive];
2189
2179
  if (t !== void 0) {
2190
2180
  var r = t.call(n, e);
2191
- if (xe(r) != "object") return r;
2181
+ if (Te(r) != "object") return r;
2192
2182
  throw new TypeError("@@toPrimitive must return a primitive value.");
2193
2183
  }
2194
2184
  return String(n);
2195
2185
  }
2196
- function ko(n) {
2197
- var e = Co(n, "string");
2198
- return xe(e) == "symbol" ? e : e + "";
2186
+ function _o(n) {
2187
+ var e = Fo(n, "string");
2188
+ return Te(e) == "symbol" ? e : e + "";
2199
2189
  }
2200
- function Po(n, e) {
2190
+ function Mo(n, e) {
2201
2191
  for (var t = 0; t < e.length; t++) {
2202
2192
  var r = e[t];
2203
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, ko(r.key), r);
2193
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, _o(r.key), r);
2204
2194
  }
2205
2195
  }
2206
- function Io(n, e, t) {
2207
- return e && Po(n.prototype, e), Object.defineProperty(n, "prototype", {
2196
+ function Ho(n, e, t) {
2197
+ return e && Mo(n.prototype, e), Object.defineProperty(n, "prototype", {
2208
2198
  writable: !1
2209
2199
  }), n;
2210
2200
  }
2211
- var zn = [], Ro = zn.forEach, $o = zn.slice;
2212
- function Ao(n) {
2213
- return Ro.call($o.call(arguments, 1), function(e) {
2201
+ var Jn = [], Vo = Jn.forEach, Bo = Jn.slice;
2202
+ function Ko(n) {
2203
+ return Vo.call(Bo.call(arguments, 1), function(e) {
2214
2204
  if (e)
2215
2205
  for (var t in e)
2216
2206
  n[t] === void 0 && (n[t] = e[t]);
2217
2207
  }), n;
2218
2208
  }
2219
- function No(n) {
2209
+ function qo(n) {
2220
2210
  return n ? typeof n == "function" ? new n() : n : null;
2221
2211
  }
2222
- function jo() {
2212
+ function zo() {
2223
2213
  return {
2224
2214
  handleEmptyResourcesAsFailed: !0,
2225
2215
  cacheHitMode: "none"
@@ -2227,7 +2217,7 @@ function jo() {
2227
2217
  // refreshExpirationTime: 60 * 60 * 1000
2228
2218
  };
2229
2219
  }
2230
- function sn(n, e, t, r) {
2220
+ function un(n, e, t, r) {
2231
2221
  var i = n.read.bind(n);
2232
2222
  if (i.length === 2) {
2233
2223
  try {
@@ -2242,17 +2232,17 @@ function sn(n, e, t, r) {
2242
2232
  }
2243
2233
  i(e, t, r);
2244
2234
  }
2245
- var Wn = /* @__PURE__ */ function() {
2235
+ var Xn = /* @__PURE__ */ function() {
2246
2236
  function n(e) {
2247
2237
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2248
- Lo(this, n), this.backends = [], this.type = "backend", this.allOptions = r, this.init(e, t);
2238
+ Uo(this, n), this.backends = [], this.type = "backend", this.allOptions = r, this.init(e, t);
2249
2239
  }
2250
- return Io(n, [{
2240
+ return Ho(n, [{
2251
2241
  key: "init",
2252
2242
  value: function(t) {
2253
2243
  var r = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2254
- this.services = t, this.options = Ao(i, this.options || {}, jo()), this.allOptions = o, this.options.backends && this.options.backends.forEach(function(s, a) {
2255
- r.backends[a] = r.backends[a] || No(s), r.backends[a].init(t, r.options.backendOptions && r.options.backendOptions[a] || {}, o);
2244
+ this.services = t, this.options = Ko(i, this.options || {}, zo()), this.allOptions = o, this.options.backends && this.options.backends.forEach(function(s, a) {
2245
+ r.backends[a] = r.backends[a] || qo(s), r.backends[a].init(t, r.options.backendOptions && r.options.backendOptions[a] || {}, o);
2256
2246
  }), this.services && this.options.reloadInterval && setInterval(function() {
2257
2247
  return r.reload();
2258
2248
  }, this.options.reloadInterval);
@@ -2263,12 +2253,12 @@ var Wn = /* @__PURE__ */ function() {
2263
2253
  var o = this, s = this.backends.length, a = function c(l) {
2264
2254
  if (l >= s) return i(new Error("non of the backend loaded data", !0));
2265
2255
  var f = l === s - 1, d = o.options.handleEmptyResourcesAsFailed && !f ? 0 : -1, g = o.backends[l];
2266
- g.read ? sn(g, t, r, function(m, v, w) {
2256
+ g.read ? un(g, t, r, function(m, v, b) {
2267
2257
  if (!m && v && Object.keys(v).length > d) {
2268
2258
  if (i(null, v, l), u(l - 1, v), g.save && o.options.cacheHitMode && ["refresh", "refreshAndUpdateStore"].indexOf(o.options.cacheHitMode) > -1) {
2269
- if (w && o.options.refreshExpirationTime && w + o.options.refreshExpirationTime > Date.now()) return;
2270
- var C = o.backends[l + 1];
2271
- C && C.read && sn(C, t, r, function(E, L) {
2259
+ if (b && o.options.refreshExpirationTime && b + o.options.refreshExpirationTime > Date.now()) return;
2260
+ var P = o.backends[l + 1];
2261
+ P && P.read && un(P, t, r, function(E, L) {
2272
2262
  E || L && (Object.keys(L).length <= d || (u(l, L), o.options.cacheHitMode === "refreshAndUpdateStore" && o.services && o.services.resourceStore && o.services.resourceStore.addResourceBundle(t, r, L)));
2273
2263
  });
2274
2264
  }
@@ -2330,25 +2320,25 @@ var Wn = /* @__PURE__ */ function() {
2330
2320
  }
2331
2321
  }]), n;
2332
2322
  }();
2333
- Wn.type = "backend";
2334
- function gt(n) {
2323
+ Xn.type = "backend";
2324
+ function yt(n) {
2335
2325
  "@babel/helpers - typeof";
2336
- return gt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2326
+ return yt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2337
2327
  return typeof e;
2338
2328
  } : function(e) {
2339
2329
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2340
- }, gt(n);
2330
+ }, yt(n);
2341
2331
  }
2342
- function Jn() {
2343
- return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : gt(XMLHttpRequest)) === "object";
2332
+ function Yn() {
2333
+ return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : yt(XMLHttpRequest)) === "object";
2344
2334
  }
2345
- function Uo(n) {
2335
+ function Wo(n) {
2346
2336
  return !!n && typeof n.then == "function";
2347
2337
  }
2348
- function Do(n) {
2349
- return Uo(n) ? n : Promise.resolve(n);
2338
+ function Jo(n) {
2339
+ return Wo(n) ? n : Promise.resolve(n);
2350
2340
  }
2351
- function an(n, e) {
2341
+ function ln(n, e) {
2352
2342
  var t = Object.keys(n);
2353
2343
  if (Object.getOwnPropertySymbols) {
2354
2344
  var r = Object.getOwnPropertySymbols(n);
@@ -2358,59 +2348,59 @@ function an(n, e) {
2358
2348
  }
2359
2349
  return t;
2360
2350
  }
2361
- function un(n) {
2351
+ function cn(n) {
2362
2352
  for (var e = 1; e < arguments.length; e++) {
2363
2353
  var t = arguments[e] != null ? arguments[e] : {};
2364
- e % 2 ? an(Object(t), !0).forEach(function(r) {
2365
- Fo(n, r, t[r]);
2366
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : an(Object(t)).forEach(function(r) {
2354
+ e % 2 ? ln(Object(t), !0).forEach(function(r) {
2355
+ Xo(n, r, t[r]);
2356
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : ln(Object(t)).forEach(function(r) {
2367
2357
  Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
2368
2358
  });
2369
2359
  }
2370
2360
  return n;
2371
2361
  }
2372
- function Fo(n, e, t) {
2373
- return (e = _o(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2362
+ function Xo(n, e, t) {
2363
+ return (e = Yo(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2374
2364
  }
2375
- function _o(n) {
2376
- var e = Mo(n, "string");
2377
- return Z(e) == "symbol" ? e : e + "";
2365
+ function Yo(n) {
2366
+ var e = Go(n, "string");
2367
+ return te(e) == "symbol" ? e : e + "";
2378
2368
  }
2379
- function Mo(n, e) {
2380
- if (Z(n) != "object" || !n) return n;
2369
+ function Go(n, e) {
2370
+ if (te(n) != "object" || !n) return n;
2381
2371
  var t = n[Symbol.toPrimitive];
2382
2372
  if (t !== void 0) {
2383
2373
  var r = t.call(n, e);
2384
- if (Z(r) != "object") return r;
2374
+ if (te(r) != "object") return r;
2385
2375
  throw new TypeError("@@toPrimitive must return a primitive value.");
2386
2376
  }
2387
2377
  return (e === "string" ? String : Number)(n);
2388
2378
  }
2389
- function Z(n) {
2379
+ function te(n) {
2390
2380
  "@babel/helpers - typeof";
2391
- return Z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2381
+ return te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2392
2382
  return typeof e;
2393
2383
  } : function(e) {
2394
2384
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2395
- }, Z(n);
2396
- }
2397
- var J = typeof fetch == "function" ? fetch : void 0;
2398
- typeof global < "u" && global.fetch ? J = global.fetch : typeof window < "u" && window.fetch && (J = window.fetch);
2399
- var Oe;
2400
- Jn() && (typeof global < "u" && global.XMLHttpRequest ? Oe = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (Oe = window.XMLHttpRequest));
2401
- var Be;
2402
- typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? Be = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (Be = window.ActiveXObject));
2403
- typeof J != "function" && (J = void 0);
2404
- if (!J && !Oe && !Be)
2385
+ }, te(n);
2386
+ }
2387
+ var Y = typeof fetch == "function" ? fetch : void 0;
2388
+ typeof global < "u" && global.fetch ? Y = global.fetch : typeof window < "u" && window.fetch && (Y = window.fetch);
2389
+ var Ce;
2390
+ Yn() && (typeof global < "u" && global.XMLHttpRequest ? Ce = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (Ce = window.XMLHttpRequest));
2391
+ var Ke;
2392
+ typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? Ke = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (Ke = window.ActiveXObject));
2393
+ typeof Y != "function" && (Y = void 0);
2394
+ if (!Y && !Ce && !Ke)
2405
2395
  try {
2406
2396
  import("./browser-ponyfill-CvzSbL_o.js").then((n) => n.b).then(function(n) {
2407
- J = n.default;
2397
+ Y = n.default;
2408
2398
  }).catch(function() {
2409
2399
  });
2410
2400
  } catch {
2411
2401
  }
2412
- var mt = function(e, t) {
2413
- if (t && Z(t) === "object") {
2402
+ var vt = function(e, t) {
2403
+ if (t && te(t) === "object") {
2414
2404
  var r = "";
2415
2405
  for (var i in t)
2416
2406
  r += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(t[i]);
@@ -2418,7 +2408,7 @@ var mt = function(e, t) {
2418
2408
  e = e + (e.indexOf("?") !== -1 ? "&" : "?") + r.slice(1);
2419
2409
  }
2420
2410
  return e;
2421
- }, ln = function(e, t, r, i) {
2411
+ }, fn = function(e, t, r, i) {
2422
2412
  var o = function(u) {
2423
2413
  if (!u.ok) return r(u.statusText || "Error", {
2424
2414
  status: u.status
@@ -2437,33 +2427,33 @@ var mt = function(e, t) {
2437
2427
  return;
2438
2428
  }
2439
2429
  }
2440
- typeof fetch == "function" ? fetch(e, t).then(o).catch(r) : J(e, t).then(o).catch(r);
2441
- }, cn = !1, Ho = function(e, t, r, i) {
2442
- e.queryStringParams && (t = mt(t, e.queryStringParams));
2443
- var o = un({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
2430
+ typeof fetch == "function" ? fetch(e, t).then(o).catch(r) : Y(e, t).then(o).catch(r);
2431
+ }, dn = !1, Qo = function(e, t, r, i) {
2432
+ e.queryStringParams && (t = vt(t, e.queryStringParams));
2433
+ var o = cn({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
2444
2434
  typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (o["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), r && (o["Content-Type"] = "application/json");
2445
- var s = typeof e.requestOptions == "function" ? e.requestOptions(r) : e.requestOptions, a = un({
2435
+ var s = typeof e.requestOptions == "function" ? e.requestOptions(r) : e.requestOptions, a = cn({
2446
2436
  method: r ? "POST" : "GET",
2447
2437
  body: r ? e.stringify(r) : void 0,
2448
2438
  headers: o
2449
- }, cn ? {} : s), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
2439
+ }, dn ? {} : s), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
2450
2440
  try {
2451
- ln(t, a, i, u);
2441
+ fn(t, a, i, u);
2452
2442
  } catch (c) {
2453
2443
  if (!s || Object.keys(s).length === 0 || !c.message || c.message.indexOf("not implemented") < 0)
2454
2444
  return i(c);
2455
2445
  try {
2456
2446
  Object.keys(s).forEach(function(l) {
2457
2447
  delete a[l];
2458
- }), ln(t, a, i, u), cn = !0;
2448
+ }), fn(t, a, i, u), dn = !0;
2459
2449
  } catch (l) {
2460
2450
  i(l);
2461
2451
  }
2462
2452
  }
2463
- }, Vo = function(e, t, r, i) {
2464
- r && Z(r) === "object" && (r = mt("", r).slice(1)), e.queryStringParams && (t = mt(t, e.queryStringParams));
2453
+ }, Zo = function(e, t, r, i) {
2454
+ r && te(r) === "object" && (r = vt("", r).slice(1)), e.queryStringParams && (t = vt(t, e.queryStringParams));
2465
2455
  try {
2466
- var o = Oe ? new Oe() : new Be("MSXML2.XMLHTTP.3.0");
2456
+ var o = Ce ? new Ce() : new Ke("MSXML2.XMLHTTP.3.0");
2467
2457
  o.open(r ? "POST" : "GET", t, 1), e.crossDomain || o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.withCredentials = !!e.withCredentials, r && o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.overrideMimeType && o.overrideMimeType("application/json");
2468
2458
  var s = e.customHeaders;
2469
2459
  if (s = typeof s == "function" ? s() : s, s)
@@ -2477,23 +2467,23 @@ var mt = function(e, t) {
2477
2467
  }, o.send(r);
2478
2468
  } catch (u) {
2479
2469
  }
2480
- }, Bo = function(e, t, r, i) {
2470
+ }, es = function(e, t, r, i) {
2481
2471
  if (typeof r == "function" && (i = r, r = void 0), i = i || function() {
2482
- }, J && t.indexOf("file:") !== 0)
2483
- return Ho(e, t, r, i);
2484
- if (Jn() || typeof ActiveXObject == "function")
2485
- return Vo(e, t, r, i);
2472
+ }, Y && t.indexOf("file:") !== 0)
2473
+ return Qo(e, t, r, i);
2474
+ if (Yn() || typeof ActiveXObject == "function")
2475
+ return Zo(e, t, r, i);
2486
2476
  i(new Error("No fetch and no xhr implementation found!"));
2487
2477
  };
2488
- function ue(n) {
2478
+ function fe(n) {
2489
2479
  "@babel/helpers - typeof";
2490
- return ue = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2480
+ return fe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2491
2481
  return typeof e;
2492
2482
  } : function(e) {
2493
2483
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2494
- }, ue(n);
2484
+ }, fe(n);
2495
2485
  }
2496
- function fn(n, e) {
2486
+ function pn(n, e) {
2497
2487
  var t = Object.keys(n);
2498
2488
  if (Object.getOwnPropertySymbols) {
2499
2489
  var r = Object.getOwnPropertySymbols(n);
@@ -2503,47 +2493,47 @@ function fn(n, e) {
2503
2493
  }
2504
2494
  return t;
2505
2495
  }
2506
- function st(n) {
2496
+ function at(n) {
2507
2497
  for (var e = 1; e < arguments.length; e++) {
2508
2498
  var t = arguments[e] != null ? arguments[e] : {};
2509
- e % 2 ? fn(Object(t), !0).forEach(function(r) {
2510
- Xn(n, r, t[r]);
2511
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : fn(Object(t)).forEach(function(r) {
2499
+ e % 2 ? pn(Object(t), !0).forEach(function(r) {
2500
+ Gn(n, r, t[r]);
2501
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : pn(Object(t)).forEach(function(r) {
2512
2502
  Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
2513
2503
  });
2514
2504
  }
2515
2505
  return n;
2516
2506
  }
2517
- function Ko(n, e) {
2507
+ function ts(n, e) {
2518
2508
  if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
2519
2509
  }
2520
- function qo(n, e) {
2510
+ function ns(n, e) {
2521
2511
  for (var t = 0; t < e.length; t++) {
2522
2512
  var r = e[t];
2523
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, Gn(r.key), r);
2513
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, Qn(r.key), r);
2524
2514
  }
2525
2515
  }
2526
- function zo(n, e, t) {
2527
- return e && qo(n.prototype, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
2516
+ function rs(n, e, t) {
2517
+ return e && ns(n.prototype, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
2528
2518
  }
2529
- function Xn(n, e, t) {
2530
- return (e = Gn(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2519
+ function Gn(n, e, t) {
2520
+ return (e = Qn(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2531
2521
  }
2532
- function Gn(n) {
2533
- var e = Wo(n, "string");
2534
- return ue(e) == "symbol" ? e : e + "";
2522
+ function Qn(n) {
2523
+ var e = is(n, "string");
2524
+ return fe(e) == "symbol" ? e : e + "";
2535
2525
  }
2536
- function Wo(n, e) {
2537
- if (ue(n) != "object" || !n) return n;
2526
+ function is(n, e) {
2527
+ if (fe(n) != "object" || !n) return n;
2538
2528
  var t = n[Symbol.toPrimitive];
2539
2529
  if (t !== void 0) {
2540
2530
  var r = t.call(n, e);
2541
- if (ue(r) != "object") return r;
2531
+ if (fe(r) != "object") return r;
2542
2532
  throw new TypeError("@@toPrimitive must return a primitive value.");
2543
2533
  }
2544
2534
  return String(n);
2545
2535
  }
2546
- var Jo = function() {
2536
+ var os = function() {
2547
2537
  return {
2548
2538
  loadPath: "/locales/{{lng}}/{{ns}}.json",
2549
2539
  addPath: "/locales/add/{{lng}}/{{ns}}",
@@ -2552,12 +2542,12 @@ var Jo = function() {
2552
2542
  },
2553
2543
  stringify: JSON.stringify,
2554
2544
  parsePayload: function(t, r, i) {
2555
- return Xn({}, r, i || "");
2545
+ return Gn({}, r, i || "");
2556
2546
  },
2557
2547
  parseLoadPayload: function(t, r) {
2558
2548
  },
2559
- request: Bo,
2560
- reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3,
2549
+ request: es,
2550
+ reloadInterval: typeof window < "u" ? !1 : 3600 * 1e3,
2561
2551
  customHeaders: {},
2562
2552
  queryStringParams: {},
2563
2553
  crossDomain: !1,
@@ -2569,20 +2559,20 @@ var Jo = function() {
2569
2559
  cache: "default"
2570
2560
  }
2571
2561
  };
2572
- }, Yn = function() {
2562
+ }, Zn = function() {
2573
2563
  function n(e) {
2574
2564
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2575
- Ko(this, n), this.services = e, this.options = t, this.allOptions = r, this.type = "backend", this.init(e, t, r);
2565
+ ts(this, n), this.services = e, this.options = t, this.allOptions = r, this.type = "backend", this.init(e, t, r);
2576
2566
  }
2577
- return zo(n, [{
2567
+ return rs(n, [{
2578
2568
  key: "init",
2579
2569
  value: function(t) {
2580
2570
  var r = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2581
- if (this.services = t, this.options = st(st(st({}, Jo()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
2571
+ if (this.services = t, this.options = at(at(at({}, os()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
2582
2572
  var s = setInterval(function() {
2583
2573
  return r.reload();
2584
2574
  }, this.options.reloadInterval);
2585
- ue(s) === "object" && typeof s.unref == "function" && s.unref();
2575
+ fe(s) === "object" && typeof s.unref == "function" && s.unref();
2586
2576
  }
2587
2577
  }
2588
2578
  }, {
@@ -2599,7 +2589,7 @@ var Jo = function() {
2599
2589
  key: "_readAny",
2600
2590
  value: function(t, r, i, o, s) {
2601
2591
  var a = this, u = this.options.loadPath;
2602
- typeof this.options.loadPath == "function" && (u = this.options.loadPath(t, i)), u = Do(u), u.then(function(c) {
2592
+ typeof this.options.loadPath == "function" && (u = this.options.loadPath(t, i)), u = Jo(u), u.then(function(c) {
2603
2593
  if (!c) return s(null, {});
2604
2594
  var l = a.services.interpolator.interpolate(c, {
2605
2595
  lng: t.join("+"),
@@ -2616,8 +2606,8 @@ var Jo = function() {
2616
2606
  if (f && (f.status >= 500 && f.status < 600 || !f.status)) return r("failed loading " + t + "; status code: " + f.status, !0);
2617
2607
  if (f && f.status >= 400 && f.status < 500) return r("failed loading " + t + "; status code: " + f.status, !1);
2618
2608
  if (!f && l && l.message) {
2619
- var d = l.message.toLowerCase(), g = ["failed", "fetch", "network", "load"].find(function(w) {
2620
- return d.indexOf(w) > -1;
2609
+ var d = l.message.toLowerCase(), g = ["failed", "fetch", "network", "load"].find(function(b) {
2610
+ return d.indexOf(b) > -1;
2621
2611
  });
2622
2612
  if (g)
2623
2613
  return r("failed loading " + t + ": " + l.message, !0);
@@ -2647,8 +2637,8 @@ var Jo = function() {
2647
2637
  lng: d,
2648
2638
  ns: r
2649
2639
  });
2650
- a.options.request(a.options, m, u, function(v, w) {
2651
- c += 1, l.push(v), f.push(w), c === t.length && typeof s == "function" && s(l, f);
2640
+ a.options.request(a.options, m, u, function(v, b) {
2641
+ c += 1, l.push(v), f.push(b), c === t.length && typeof s == "function" && s(l, f);
2652
2642
  });
2653
2643
  });
2654
2644
  }
@@ -2677,8 +2667,8 @@ var Jo = function() {
2677
2667
  }
2678
2668
  }]);
2679
2669
  }();
2680
- Yn.type = "backend";
2681
- var Xo = function(e) {
2670
+ Zn.type = "backend";
2671
+ var ss = function(e) {
2682
2672
  return {
2683
2673
  type: "backend",
2684
2674
  init: function(r, i, o) {
@@ -2703,13 +2693,13 @@ var Xo = function(e) {
2703
2693
  }
2704
2694
  };
2705
2695
  };
2706
- const Go = {
2696
+ const as = {
2707
2697
  debug: !1,
2708
- fallbackLng: kn.enum.en,
2698
+ fallbackLng: In.enum.en,
2709
2699
  namespace: "translation",
2710
- supportedLngs: Object.values(Cn),
2700
+ supportedLngs: Object.values(kn),
2711
2701
  nonExplicitSupportedLngs: !1
2712
- }, Yo = {
2702
+ }, us = {
2713
2703
  react: {
2714
2704
  useSuspense: !0
2715
2705
  },
@@ -2717,111 +2707,189 @@ const Go = {
2717
2707
  order: ["navigator", "htmlTag", "path", "subdomain"],
2718
2708
  caches: ["localStorage", "cookie"]
2719
2709
  }
2720
- }, dn = (n, e) => {
2710
+ }, hn = (n, e) => {
2721
2711
  const t = import.meta.url.split("/").pop();
2722
2712
  return `${import.meta.url.replace(`/${t}`, "")}/locales/${n}/${e}.json`;
2723
2713
  };
2724
- function yt(n) {
2725
- return re.isInitialized || (re.use(Wn).use(
2726
- new qn(null, {
2714
+ function wt(n) {
2715
+ return oe.isInitialized || (oe.use(Xn).use(
2716
+ new Wn(null, {
2727
2717
  order: ["cookie", "localStorage", "navigator"],
2728
2718
  lookupQuerystring: "lng",
2729
2719
  lookupCookie: "i18next",
2730
2720
  lookupLocalStorage: "i18nextLng",
2731
2721
  caches: ["localStorage", "cookie"]
2732
2722
  })
2733
- ).use(Vi).init({
2734
- ...Go,
2723
+ ).use(Zi).init({
2724
+ ...as,
2735
2725
  backend: {
2736
2726
  backends: [
2737
- Yn,
2727
+ Zn,
2738
2728
  // if a namespace can't be loaded via normal http-backend loadPath, then the inMemoryLocalBackend will try to return the correct resources
2739
2729
  // with dynamic import, you have to use the "default" key of the module ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#importing_defaults )
2740
- Xo(
2741
- (e, t) => import(dn(e, t))
2730
+ ss(
2731
+ (e, t) => import(hn(e, t))
2742
2732
  )
2743
2733
  ],
2744
2734
  backendOptions: [
2745
2735
  {
2746
- loadPath: dn("{{lng}}", "{{ns}}")
2736
+ loadPath: hn("{{lng}}", "{{ns}}")
2747
2737
  }
2748
2738
  ]
2749
2739
  },
2750
- ...Yo
2751
- }), re.on("loaded", () => {
2752
- n == null || n(re);
2753
- })), re;
2740
+ ...us
2741
+ }), oe.on("loaded", () => {
2742
+ n == null || n(oe);
2743
+ })), oe;
2754
2744
  }
2755
- const Qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2745
+ const ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2756
2746
  __proto__: null,
2757
- default: yt,
2758
- initializeI18n: yt
2747
+ default: wt,
2748
+ initializeI18n: wt
2759
2749
  }, Symbol.toStringTag, { value: "Module" }));
2760
- function xa(n) {
2761
- const e = yt();
2762
- return Wi("translation", { i18n: e, ...n });
2763
- }
2764
- const Et = 60 * 1e3, ke = Et, Qn = ke * 2, Zn = ke * 3, Tt = ke * 15, Ge = Et, Ye = Ge * 2, er = Ge * 3, tr = Et * 15;
2765
- var nr = /* @__PURE__ */ ((n) => (n.SelectAll = "SelectAll", n))(nr || {}), rr = /* @__PURE__ */ ((n) => (n.Text = "text", n.Image = "image", n))(rr || {});
2766
- S();
2767
- const Zo = "___", es = _r((n) => {
2768
- const e = n.split(Zo);
2750
+ function Aa(n) {
2751
+ const e = wt();
2752
+ return io("translation", { i18n: e, ...n });
2753
+ }
2754
+ const Ct = 60 * 1e3, Re = Ct, er = Re * 2, tr = Re * 3, Lt = Re * 15, Ge = Ct, Qe = Ge * 2, nr = Ge * 3, rr = Ct * 15;
2755
+ var ir = /* @__PURE__ */ ((n) => (n.SelectAll = "SelectAll", n))(ir || {}), or = /* @__PURE__ */ ((n) => (n.Text = "text", n.Image = "image", n))(or || {});
2756
+ w();
2757
+ const cs = "___", fs = Br((n) => {
2758
+ const e = n.split(cs);
2769
2759
  try {
2770
2760
  return e.length === 4;
2771
2761
  } catch {
2772
2762
  return !1;
2773
2763
  }
2774
- }), ts = y({
2775
- captchaId: Ue([p(), At()]),
2776
- captchaContentId: Ue([p(), At()]),
2764
+ }), ds = y({
2765
+ captchaId: _e([p(), jt()]),
2766
+ captchaContentId: _e([p(), jt()]),
2777
2767
  salt: p().min(34),
2778
- solution: S().array().optional(),
2779
- unlabelled: S().array().optional(),
2780
- timeLimit: S().optional()
2781
- }), ir = y({
2768
+ solution: w().array().optional(),
2769
+ unlabelled: w().array().optional(),
2770
+ timeLimit: w().optional()
2771
+ }), sr = y({
2782
2772
  hash: p(),
2783
2773
  data: p(),
2784
- type: Le(rr)
2785
- }), or = ir.extend({
2774
+ type: ke(or)
2775
+ }), ar = sr.extend({
2786
2776
  hash: p()
2787
- }), ns = or.extend({
2777
+ }), ps = ar.extend({
2788
2778
  label: p()
2789
- }), rs = or.extend({
2779
+ }), hs = ar.extend({
2790
2780
  label: p().optional()
2791
- }), sr = ts.extend({
2792
- items: K(ir),
2781
+ }), ur = ds.extend({
2782
+ items: q(sr),
2793
2783
  target: p()
2794
- }), is = sr.extend({
2784
+ }), gs = ur.extend({
2795
2785
  solution: p().array().optional(),
2796
2786
  unlabelled: p().array().optional()
2797
- }), os = is.extend({
2798
- solution: S().array().optional(),
2799
- unlabelled: S().array().optional()
2800
- }), ss = K(sr);
2801
- K(
2802
- os
2787
+ }), ms = gs.extend({
2788
+ solution: w().array().optional(),
2789
+ unlabelled: w().array().optional()
2790
+ }), ys = q(ur);
2791
+ q(
2792
+ ms
2803
2793
  );
2804
- const ar = y({
2794
+ const lr = y({
2805
2795
  captchaId: p(),
2806
2796
  captchaContentId: p(),
2807
2797
  solution: p().array(),
2808
- salt: p().min(34)
2798
+ salt: p()
2809
2799
  });
2810
- K(ar);
2800
+ q(lr);
2811
2801
  y({
2812
- items: K(rs)
2802
+ items: q(hs)
2813
2803
  });
2814
2804
  y({
2815
- items: K(ns)
2805
+ items: q(ps)
2816
2806
  });
2817
2807
  y({
2818
- captchas: ss,
2819
- format: Le(nr)
2808
+ captchas: ys,
2809
+ format: ke(ir)
2820
2810
  });
2821
2811
  y({
2822
- labels: K(p())
2812
+ labels: q(p())
2823
2813
  });
2824
- var as = Object.defineProperty, us = (n, e, t) => e in n ? as(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, pn = (n, e, t) => (us(n, typeof e != "symbol" ? e + "" : e, t), t), at = {
2814
+ const $a = (n) => new Promise((e) => setTimeout(e, n)), Na = (n, e) => {
2815
+ let t = 0;
2816
+ const r = "0".repeat(e);
2817
+ for (; ; ) {
2818
+ const i = new TextEncoder().encode(t + n);
2819
+ if (vs(Vr(i)).startsWith(r))
2820
+ return t;
2821
+ t += 1;
2822
+ }
2823
+ }, vs = (n) => Array.from(n).map((e) => e.toString(16).padStart(2, "0")).join("");
2824
+ function W(n, e, t) {
2825
+ if (n.length === 0)
2826
+ throw new Error("Array is empty");
2827
+ if (!Number.isFinite(e))
2828
+ throw new Error(`Index ${e} is not a finite number`);
2829
+ if (e > 0 ? e = e % n.length : e = Math.ceil(Math.abs(e) / n.length) * n.length + e, e >= n.length)
2830
+ throw new Error(`Index ${e} larger than array length ${n.length}`);
2831
+ if (e < 0)
2832
+ throw new Error(`Index ${e} smaller than 0`);
2833
+ return n[e];
2834
+ }
2835
+ const ws = (n) => Array.isArray(n) && n !== null, bs = "dev", qe = new Array(256), cr = new Array(256 * 256);
2836
+ for (let n = 0; n < 256; n++)
2837
+ qe[n] = n.toString(16).padStart(2, "0");
2838
+ for (let n = 0; n < 256; n++) {
2839
+ const e = n << 8;
2840
+ for (let t = 0; t < 256; t++)
2841
+ cr[e | t] = qe[n] + qe[t];
2842
+ }
2843
+ function ut(n, e) {
2844
+ const t = n.length % 2 | 0, r = n.length - t | 0;
2845
+ for (let i = 0; i < r; i += 2)
2846
+ e += cr[n[i] << 8 | n[i + 1]];
2847
+ return t && (e += qe[n[r] | 0]), e;
2848
+ }
2849
+ function Ze(n, e = -1, t = !0) {
2850
+ const r = t ? "0x" : "";
2851
+ if (!(n != null && n.length))
2852
+ return r;
2853
+ if (e > 0) {
2854
+ const i = Math.ceil(e / 8);
2855
+ if (n.length > i)
2856
+ return `${ut(n.subarray(0, i / 2), r)}…${ut(n.subarray(n.length - i / 2), "")}`;
2857
+ }
2858
+ return ut(n, r);
2859
+ }
2860
+ const ja = (n) => ws(n) ? Ze(new Uint8Array(n)) : n.toString(), Da = (n, e) => {
2861
+ const t = n.replace(/^0x/, "").split("");
2862
+ let r = 0, i = t.length - 1;
2863
+ const o = e.length.toString(16).padStart(2, "0");
2864
+ t[r++] = W(o, 0), t[r++] = W(o, 1);
2865
+ const s = [], a = [];
2866
+ let u = 0;
2867
+ for (const c of e) {
2868
+ const l = c.toString(16), f = l.length;
2869
+ u += f;
2870
+ const d = i - f + 1;
2871
+ s.push(d), a.push(f);
2872
+ for (let g = 0; g < f; g++)
2873
+ t[d + g] = W(l, g);
2874
+ i -= f;
2875
+ }
2876
+ if (u > n.length)
2877
+ throw new Error(
2878
+ `Hex data length ${u} exceeds length of hex string ${t.length}`
2879
+ );
2880
+ for (let c = 0; c < e.length; c++) {
2881
+ const l = W(s, c).toString(16).padStart(2, "0");
2882
+ u += l.length;
2883
+ const f = W(a, c).toString(16).padStart(2, "0");
2884
+ if (u += f.length, u > n.length)
2885
+ throw new Error(
2886
+ `Hex data length ${u} exceeds length of hex string ${t.length}`
2887
+ );
2888
+ t[r++] = W(l, 0), t[r++] = W(l, 1), t[r++] = W(f, 0), t[r++] = W(f, 1);
2889
+ }
2890
+ return `0x${t.join("")}`;
2891
+ };
2892
+ var Ss = Object.defineProperty, xs = (n, e, t) => e in n ? Ss(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, gn = (n, e, t) => (xs(n, typeof e != "symbol" ? e + "" : e, t), t), lt = {
2825
2893
  0: 0,
2826
2894
  1: 1,
2827
2895
  2: 2,
@@ -2845,20 +2913,20 @@ var as = Object.defineProperty, us = (n, e, t) => e in n ? as(n, e, { enumerable
2845
2913
  E: 14,
2846
2914
  F: 15
2847
2915
  };
2848
- function ls(n) {
2916
+ function Os(n) {
2849
2917
  const e = n.length % 2, t = (n[1] === "x" ? 2 : 0) + e, r = (n.length - t) / 2 + e, i = new Uint8Array(r);
2850
- e && (i[0] = 0 | at[n[2]]);
2918
+ e && (i[0] = 0 | lt[n[2]]);
2851
2919
  for (let o = 0; o < r; ) {
2852
- const s = t + o * 2, a = at[n[s]], u = at[n[s + 1]];
2920
+ const s = t + o * 2, a = lt[n[s]], u = lt[n[s + 1]];
2853
2921
  i[e + o++] = a << 4 | u;
2854
2922
  }
2855
2923
  return i;
2856
2924
  }
2857
- var hn = class extends Uint8Array {
2925
+ var mn = class extends Uint8Array {
2858
2926
  constructor(n) {
2859
- super(n), pn(this, "i", 0), pn(this, "v"), this.v = new DataView(n);
2927
+ super(n), gn(this, "i", 0), gn(this, "v"), this.v = new DataView(n);
2860
2928
  }
2861
- }, ee = (n) => (e) => n(e instanceof hn ? e : new hn(e instanceof Uint8Array ? e.buffer : typeof e == "string" ? ls(e).buffer : e)), Qe = (n) => {
2929
+ }, ne = (n) => (e) => n(e instanceof mn ? e : new mn(e instanceof Uint8Array ? e.buffer : typeof e == "string" ? Os(e).buffer : e)), et = (n) => {
2862
2930
  const e = n.length;
2863
2931
  let t = 0;
2864
2932
  for (let i = 0; i < e; i++)
@@ -2870,7 +2938,7 @@ var hn = class extends Uint8Array {
2870
2938
  }
2871
2939
  return r;
2872
2940
  };
2873
- function gn(n, e) {
2941
+ function yn(n, e) {
2874
2942
  const t = Object.keys(n), r = t.length, i = {};
2875
2943
  for (let o = 0; o < r; o++) {
2876
2944
  const s = t[o];
@@ -2878,120 +2946,120 @@ function gn(n, e) {
2878
2946
  }
2879
2947
  return i;
2880
2948
  }
2881
- var U = (n, e) => {
2949
+ var D = (n, e) => {
2882
2950
  const t = [n, e];
2883
2951
  return t.enc = n, t.dec = e, t;
2884
- }, ur = (n, e) => (t) => n(e(t)), lr = (n, e) => (t) => e(n(t)), cs = ([n, e], t, r) => U(ur(n, t), lr(e, r));
2885
- function fs(n, e) {
2886
- return ee((t) => {
2952
+ }, fr = (n, e) => (t) => n(e(t)), dr = (n, e) => (t) => e(n(t)), Es = ([n, e], t, r) => D(fr(n, t), dr(e, r));
2953
+ function Ts(n, e) {
2954
+ return ne((t) => {
2887
2955
  const r = t.v[e](t.i, !0);
2888
2956
  return t.i += n, r;
2889
2957
  });
2890
2958
  }
2891
- function ds(n, e) {
2959
+ function Cs(n, e) {
2892
2960
  return (t) => {
2893
2961
  const r = new Uint8Array(n);
2894
2962
  return new DataView(r.buffer)[e](0, t, !0), r;
2895
2963
  };
2896
2964
  }
2897
- function X(n, e, t) {
2898
- return U(ds(n, t), fs(n, e));
2965
+ function G(n, e, t) {
2966
+ return D(Cs(n, t), Ts(n, e));
2899
2967
  }
2900
- var le = X(1, "getUint8", "setUint8"), Ke = X(2, "getUint16", "setUint16"), Ee = X(4, "getUint32", "setUint32"), cr = X(8, "getBigUint64", "setBigUint64");
2901
- X(1, "getInt8", "setInt8");
2902
- X(2, "getInt16", "setInt16");
2903
- X(4, "getInt32", "setInt32");
2904
- X(8, "getBigInt64", "setBigInt64");
2905
- var fr = (n) => {
2968
+ var de = G(1, "getUint8", "setUint8"), ze = G(2, "getUint16", "setUint16"), Le = G(4, "getUint32", "setUint32"), pr = G(8, "getBigUint64", "setBigUint64");
2969
+ G(1, "getInt8", "setInt8");
2970
+ G(2, "getInt16", "setInt16");
2971
+ G(4, "getInt32", "setInt32");
2972
+ G(8, "getBigInt64", "setBigInt64");
2973
+ var hr = (n) => {
2906
2974
  const e = new Uint8Array(16), t = new DataView(e.buffer);
2907
2975
  return t.setBigInt64(0, n, !0), t.setBigInt64(8, n >> 64n, !0), e;
2908
- }, dr = (n) => ee((e) => {
2976
+ }, gr = (n) => ne((e) => {
2909
2977
  const { v: t, i: r } = e, i = t.getBigUint64(r, !0), o = t[n](r + 8, !0);
2910
2978
  return e.i += 16, o << 64n | i;
2911
2979
  });
2912
- U(fr, dr("getBigUint64"));
2913
- U(fr, dr("getBigInt64"));
2914
- var pr = (n) => {
2980
+ D(hr, gr("getBigUint64"));
2981
+ D(hr, gr("getBigInt64"));
2982
+ var mr = (n) => {
2915
2983
  const e = new Uint8Array(32), t = new DataView(e.buffer);
2916
2984
  return t.setBigInt64(0, n, !0), t.setBigInt64(8, n >> 64n, !0), t.setBigInt64(16, n >> 128n, !0), t.setBigInt64(24, n >> 192n, !0), e;
2917
- }, hr = (n) => ee((e) => {
2985
+ }, yr = (n) => ne((e) => {
2918
2986
  let t = e.v.getBigUint64(e.i, !0);
2919
2987
  return e.i += 8, t |= e.v.getBigUint64(e.i, !0) << 64n, e.i += 8, t |= e.v.getBigUint64(e.i, !0) << 128n, e.i += 8, t |= e.v[n](e.i, !0) << 192n, e.i += 8, t;
2920
2988
  });
2921
- U(pr, hr("getBigUint64"));
2922
- U(pr, hr("getBigInt64"));
2923
- var gr = cs(le, (n) => n ? 1 : 0, Boolean), ps = [le[1], Ke[1], Ee[1]], hs = ee((n) => {
2989
+ D(mr, yr("getBigUint64"));
2990
+ D(mr, yr("getBigInt64"));
2991
+ var vr = Es(de, (n) => n ? 1 : 0, Boolean), Ls = [de[1], ze[1], Le[1]], Ps = ne((n) => {
2924
2992
  const e = n[n.i], t = e & 3;
2925
2993
  if (t < 3)
2926
- return ps[t](n) >>> 2;
2994
+ return Ls[t](n) >>> 2;
2927
2995
  const r = (e >>> 2) + 4;
2928
2996
  n.i++;
2929
2997
  let i = 0n;
2930
2998
  const o = r / 8 | 0;
2931
2999
  let s = 0n;
2932
3000
  for (let u = 0; u < o; u++)
2933
- i = cr[1](n) << s | i, s += 64n;
3001
+ i = pr[1](n) << s | i, s += 64n;
2934
3002
  let a = r % 8;
2935
- return a > 3 && (i = BigInt(Ee[1](n)) << s | i, s += 32n, a -= 4), a > 1 && (i = BigInt(Ke[1](n)) << s | i, s += 16n, a -= 2), a && (i = BigInt(le[1](n)) << s | i), i;
2936
- }), gs = 1n << 56n, ms = 1 << 24, ys = 256, vs = 4294967295n, ws = 64, bs = 16384, Ss = 1 << 30, xs = (n) => {
3003
+ return a > 3 && (i = BigInt(Le[1](n)) << s | i, s += 32n, a -= 4), a > 1 && (i = BigInt(ze[1](n)) << s | i, s += 16n, a -= 2), a && (i = BigInt(de[1](n)) << s | i), i;
3004
+ }), ks = 1n << 56n, Is = 1 << 24, Rs = 256, As = 4294967295n, $s = 64, Ns = 16384, js = 1 << 30, Ds = (n) => {
2937
3005
  if (n < 0)
2938
3006
  throw new Error(`Wrong compact input (${n})`);
2939
3007
  const e = Number(n) << 2;
2940
- if (n < ws)
2941
- return le[0](e);
2942
- if (n < bs)
2943
- return Ke[0](e | 1);
2944
- if (n < Ss)
2945
- return Ee[0](e | 2);
3008
+ if (n < $s)
3009
+ return de[0](e);
3010
+ if (n < Ns)
3011
+ return ze[0](e | 1);
3012
+ if (n < js)
3013
+ return Le[0](e | 2);
2946
3014
  let t = [new Uint8Array(1)], r = BigInt(n);
2947
- for (; r >= gs; )
2948
- t.push(cr[0](r)), r >>= 64n;
2949
- r >= ms && (t.push(Ee[0](Number(r & vs))), r >>= 32n);
3015
+ for (; r >= ks; )
3016
+ t.push(pr[0](r)), r >>= 64n;
3017
+ r >= Is && (t.push(Le[0](Number(r & As))), r >>= 32n);
2950
3018
  let i = Number(r);
2951
- i >= ys && (t.push(Ke[0](i)), i >>= 16), i && t.push(le[0](i));
2952
- const o = Qe(t);
3019
+ i >= Rs && (t.push(ze[0](i)), i >>= 16), i && t.push(de[0](i));
3020
+ const o = et(t);
2953
3021
  return o[0] = o.length - 5 << 2 | 3, o;
2954
- }, mr = U(xs, hs), Os = new TextEncoder(), Es = (n) => {
2955
- const e = Os.encode(n);
2956
- return Qe([mr.enc(e.length), e]);
2957
- }, Ts = new TextDecoder(), Ls = ee((n) => {
2958
- let e = mr.dec(n);
3022
+ }, wr = D(Ds, Ps), Us = new TextEncoder(), Fs = (n) => {
3023
+ const e = Us.encode(n);
3024
+ return et([wr.enc(e.length), e]);
3025
+ }, _s = new TextDecoder(), Ms = ne((n) => {
3026
+ let e = wr.dec(n);
2959
3027
  const t = new DataView(n.buffer, n.i, e);
2960
- return n.i += e, Ts.decode(t);
2961
- }), M = U(Es, Ls), Cs = () => {
2962
- }, ks = new Uint8Array(0);
2963
- U(() => ks, Cs);
2964
- var yr = (n) => ee((e) => {
2965
- const t = le.dec(e);
3028
+ return n.i += e, _s.decode(t);
3029
+ }), M = D(Fs, Ms), Hs = () => {
3030
+ }, Vs = new Uint8Array(0);
3031
+ D(() => Vs, Hs);
3032
+ var br = (n) => ne((e) => {
3033
+ const t = de.dec(e);
2966
3034
  if (t !== 0)
2967
- return n === gr[1] ? t === 1 : n(e);
2968
- }), vr = (n) => (e) => {
3035
+ return n === vr[1] ? t === 1 : n(e);
3036
+ }), Sr = (n) => (e) => {
2969
3037
  const t = new Uint8Array(1);
2970
- return e === void 0 ? (t[0] = 0, t) : (t[0] = 1, n === gr[0] ? (t[0] = e ? 1 : 2, t) : Qe([t, n(e)]));
2971
- }, H = (n) => U(vr(n[0]), yr(n[1]));
2972
- H.enc = vr;
2973
- H.dec = yr;
2974
- var wr = (...n) => ee((e) => n.map((t) => t(e))), br = (...n) => (e) => Qe(n.map((t, r) => t(e[r]))), Ze = (...n) => U(br(...n.map(([e]) => e)), wr(...n.map(([, e]) => e)));
2975
- Ze.enc = br;
2976
- Ze.dec = wr;
2977
- var Sr = (n) => {
3038
+ return e === void 0 ? (t[0] = 0, t) : (t[0] = 1, n === vr[0] ? (t[0] = e ? 1 : 2, t) : et([t, n(e)]));
3039
+ }, H = (n) => D(Sr(n[0]), br(n[1]));
3040
+ H.enc = Sr;
3041
+ H.dec = br;
3042
+ var xr = (...n) => ne((e) => n.map((t) => t(e))), Or = (...n) => (e) => et(n.map((t, r) => t(e[r]))), tt = (...n) => D(Or(...n.map(([e]) => e)), xr(...n.map(([, e]) => e)));
3043
+ tt.enc = Or;
3044
+ tt.dec = xr;
3045
+ var Er = (n) => {
2978
3046
  const e = Object.keys(n);
2979
- return ur(Ze.enc(...Object.values(n)), (t) => e.map((r) => t[r]));
2980
- }, xr = (n) => {
3047
+ return fr(tt.enc(...Object.values(n)), (t) => e.map((r) => t[r]));
3048
+ }, Tr = (n) => {
2981
3049
  const e = Object.keys(n);
2982
- return lr(Ze.dec(...Object.values(n)), (t) => Object.fromEntries(t.map((r, i) => [e[i], r])));
2983
- }, se = (n) => U(Sr(gn(n, (e) => e[0])), xr(gn(n, (e) => e[1])));
2984
- se.enc = Sr;
2985
- se.dec = xr;
2986
- const Ps = y({
3050
+ return dr(tt.dec(...Object.values(n)), (t) => Object.fromEntries(t.map((r, i) => [e[i], r])));
3051
+ }, ue = (n) => D(Er(yn(n, (e) => e[0])), Tr(yn(n, (e) => e[1])));
3052
+ ue.enc = Er;
3053
+ ue.dec = Tr;
3054
+ const Bs = y({
2987
3055
  [h.requestHash]: p()
2988
3056
  });
2989
3057
  y({
2990
3058
  [h.challenge]: p()
2991
3059
  });
2992
- const Is = y({
3060
+ const Ks = y({
2993
3061
  [h.timestamp]: p()
2994
- }), mn = y({
3062
+ }), vn = y({
2995
3063
  [h.challenge]: p().optional(),
2996
3064
  [h.requestHash]: p().optional(),
2997
3065
  [h.timestamp]: p().optional()
@@ -3002,35 +3070,35 @@ y({
3002
3070
  [h.dapp]: p(),
3003
3071
  [h.user]: p(),
3004
3072
  [h.challenge]: p().optional(),
3005
- [h.nonce]: S().optional(),
3073
+ [h.nonce]: w().optional(),
3006
3074
  [h.timestamp]: p(),
3007
3075
  [h.signature]: y({
3008
- [h.provider]: mn,
3009
- [h.user]: mn
3076
+ [h.provider]: vn,
3077
+ [h.user]: vn
3010
3078
  })
3011
3079
  });
3012
- const Rs = se({
3080
+ const qs = ue({
3013
3081
  [h.commitmentId]: H(M),
3014
3082
  [h.providerUrl]: H(M),
3015
3083
  [h.dapp]: M,
3016
3084
  [h.user]: M,
3017
3085
  [h.challenge]: H(M),
3018
- [h.nonce]: H(Ee),
3086
+ [h.nonce]: H(Le),
3019
3087
  [h.timestamp]: M,
3020
- [h.signature]: se({
3021
- [h.provider]: se({
3088
+ [h.signature]: ue({
3089
+ [h.provider]: ue({
3022
3090
  [h.challenge]: H(M),
3023
3091
  [h.requestHash]: H(M)
3024
3092
  }),
3025
- [h.user]: se({
3093
+ [h.user]: ue({
3026
3094
  [h.timestamp]: H(M),
3027
3095
  [h.requestHash]: H(M)
3028
3096
  })
3029
3097
  })
3030
- }), Or = p().startsWith("0x"), Oa = (n) => {
3098
+ }), Cr = p().startsWith("0x"), Ua = (n) => {
3031
3099
  var e, t, r, i;
3032
- return We(
3033
- Rs.enc({
3100
+ return Ze(
3101
+ qs.enc({
3034
3102
  [h.commitmentId]: void 0,
3035
3103
  [h.providerUrl]: void 0,
3036
3104
  [h.challenge]: void 0,
@@ -3049,9 +3117,19 @@ const Rs = se({
3049
3117
  }
3050
3118
  })
3051
3119
  );
3052
- }, Er = 2, Tr = 0;
3053
- var $s = /* @__PURE__ */ ((n) => (n.GetImageCaptchaChallenge = "/v1/prosopo/provider/client/captcha/image", n.GetPowCaptchaChallenge = "/v1/prosopo/provider/client/captcha/pow", n.GetFrictionlessCaptchaChallenge = "/v1/prosopo/provider/client/captcha/frictionless", n.SubmitImageCaptchaSolution = "/v1/prosopo/provider/client/solution", n.SubmitPowCaptchaSolution = "/v1/prosopo/provider/client/pow/solution", n.VerifyPowCaptchaSolution = "/v1/prosopo/provider/client/pow/verify", n.VerifyImageCaptchaSolutionDapp = "/v1/prosopo/provider/client/image/dapp/verify", n.GetProviderStatus = "/v1/prosopo/provider/client/status", n.SubmitUserEvents = "/v1/prosopo/provider/client/events", n))($s || {}), As = /* @__PURE__ */ ((n) => (n.Healthz = "/healthz", n.GetProviderDetails = "/v1/prosopo/provider/public/details", n))(As || {}), Ns = /* @__PURE__ */ ((n) => (n.SiteKeyRegister = "/v1/prosopo/provider/admin/sitekey/register", n.UpdateDetectorKey = "/v1/prosopo/provider/admin/detector/update", n.RemoveDetectorKey = "/v1/prosopo/provider/admin/detector/remove", n))(Ns || {});
3054
- const Lr = {
3120
+ }, Lr = 2, Pr = 0;
3121
+ var zs = /* @__PURE__ */ ((n) => (n.GetImageCaptchaChallenge = "/v1/prosopo/provider/client/captcha/image", n.GetPowCaptchaChallenge = "/v1/prosopo/provider/client/captcha/pow", n.GetFrictionlessCaptchaChallenge = "/v1/prosopo/provider/client/captcha/frictionless", n.SubmitImageCaptchaSolution = "/v1/prosopo/provider/client/solution", n.SubmitPowCaptchaSolution = "/v1/prosopo/provider/client/pow/solution", n.VerifyPowCaptchaSolution = "/v1/prosopo/provider/client/pow/verify", n.VerifyImageCaptchaSolutionDapp = "/v1/prosopo/provider/client/image/dapp/verify", n.GetProviderStatus = "/v1/prosopo/provider/client/status", n.SubmitUserEvents = "/v1/prosopo/provider/client/events", n))(zs || {}), Ws = /* @__PURE__ */ ((n) => (n.Healthz = "/healthz", n.GetProviderDetails = "/v1/prosopo/provider/public/details", n))(Ws || {});
3122
+ y({
3123
+ version: p(),
3124
+ message: p(),
3125
+ redis: y({
3126
+ actor: p(),
3127
+ isReady: ce(),
3128
+ awaitingTimeSeconds: w()
3129
+ }).array()
3130
+ });
3131
+ var Js = /* @__PURE__ */ ((n) => (n.SiteKeyRegister = "/v1/prosopo/provider/admin/sitekey/register", n.UpdateDetectorKey = "/v1/prosopo/provider/admin/detector/update", n.RemoveDetectorKey = "/v1/prosopo/provider/admin/detector/remove", n))(Js || {});
3132
+ const kr = {
3055
3133
  "/v1/prosopo/provider/client/captcha/image": { windowMs: 6e4, limit: 30 },
3056
3134
  "/v1/prosopo/provider/client/captcha/pow": { windowMs: 6e4, limit: 60 },
3057
3135
  "/v1/prosopo/provider/client/solution": { windowMs: 6e4, limit: 60 },
@@ -3071,47 +3149,47 @@ const Lr = {
3071
3149
  "/v1/prosopo/provider/admin/sitekey/register": { windowMs: 6e4, limit: 5 },
3072
3150
  "/v1/prosopo/provider/admin/detector/update": { windowMs: 6e4, limit: 5 },
3073
3151
  "/v1/prosopo/provider/admin/detector/remove": { windowMs: 6e4, limit: 5 }
3074
- }, js = (n) => y(
3152
+ }, Xs = (n) => y(
3075
3153
  Object.entries(n).reduce(
3076
3154
  (e, [t, r]) => {
3077
3155
  const i = t;
3078
3156
  return e[i] = y({
3079
- windowMs: Nt.number().optional().default(r.windowMs),
3080
- limit: Nt.number().optional().default(r.limit)
3157
+ windowMs: Dt.number().optional().default(r.windowMs),
3158
+ limit: Dt.number().optional().default(r.limit)
3081
3159
  }), e;
3082
3160
  },
3083
3161
  {}
3084
3162
  )
3085
- ), Us = js(
3086
- Lr
3163
+ ), Ys = Xs(
3164
+ kr
3087
3165
  );
3088
3166
  y({
3089
3167
  [h.user]: p(),
3090
3168
  [h.dapp]: p(),
3091
- [h.datasetId]: Ue([p(), K(S())]),
3169
+ [h.datasetId]: _e([p(), q(w())]),
3092
3170
  [h.sessionId]: p().optional()
3093
3171
  });
3094
3172
  y({
3095
3173
  [h.user]: p(),
3096
3174
  [h.dapp]: p(),
3097
- [h.captchas]: K(ar),
3175
+ [h.captchas]: q(lr),
3098
3176
  [h.requestHash]: p(),
3099
3177
  [h.timestamp]: p(),
3100
3178
  [h.signature]: y({
3101
- [h.user]: Is,
3102
- [h.provider]: Ps
3179
+ [h.user]: Ks,
3180
+ [h.provider]: Bs
3103
3181
  })
3104
3182
  });
3105
3183
  y({
3106
- [h.token]: Or,
3184
+ [h.token]: Cr,
3107
3185
  [h.dappSignature]: p(),
3108
- [h.maxVerifiedTime]: S().optional().default(Tt),
3186
+ [h.maxVerifiedTime]: w().optional().default(Lt),
3109
3187
  [h.ip]: p().optional()
3110
3188
  });
3111
3189
  y({
3112
- [h.token]: Or,
3190
+ [h.token]: Cr,
3113
3191
  [h.dappSignature]: p(),
3114
- [h.verifiedTimeout]: S().optional().default(Ye),
3192
+ [h.verifiedTimeout]: w().optional().default(Qe),
3115
3193
  [h.ip]: p().optional()
3116
3194
  });
3117
3195
  y({
@@ -3119,9 +3197,9 @@ y({
3119
3197
  [h.dapp]: p(),
3120
3198
  [h.sessionId]: p().optional()
3121
3199
  });
3122
- const Ea = y({
3123
- [h.challenge]: es,
3124
- [h.difficulty]: S(),
3200
+ const Fa = y({
3201
+ [h.challenge]: fs,
3202
+ [h.difficulty]: w(),
3125
3203
  [h.signature]: y({
3126
3204
  [h.user]: y({
3127
3205
  [h.timestamp]: p()
@@ -3132,8 +3210,8 @@ const Ea = y({
3132
3210
  }),
3133
3211
  [h.user]: p(),
3134
3212
  [h.dapp]: p(),
3135
- [h.nonce]: S(),
3136
- [h.verifiedTimeout]: S().optional().default(Ye)
3213
+ [h.nonce]: w(),
3214
+ [h.verifiedTimeout]: w().optional().default(Qe)
3137
3215
  });
3138
3216
  y({
3139
3217
  [h.dapp]: p(),
@@ -3145,35 +3223,39 @@ y({
3145
3223
  });
3146
3224
  y({
3147
3225
  [h.siteKey]: p(),
3148
- [h.tier]: Le(wt),
3149
- [h.settings]: hi.optional()
3226
+ [h.tier]: ke(St),
3227
+ [h.settings]: Ti.optional()
3150
3228
  });
3151
- const Ta = y({
3229
+ const _a = y({
3152
3230
  [h.detectorKey]: p()
3153
- }), Cr = y({
3231
+ }), Ma = y({
3232
+ [h.detectorKey]: p(),
3233
+ [h.expirationInSeconds]: w().positive().optional()
3234
+ }), Ir = y({
3154
3235
  solved: y({
3155
- count: S().positive()
3156
- }).optional().default({ count: Er }),
3236
+ count: w().positive()
3237
+ }).optional().default({ count: Lr }),
3157
3238
  unsolved: y({
3158
- count: S().nonnegative()
3159
- }).optional().default({ count: Tr })
3239
+ count: w().nonnegative()
3240
+ }).optional().default({ count: Pr })
3160
3241
  });
3161
- var kr = /* @__PURE__ */ ((n) => (n.ipAddress = "ipAddress", n.userAccount = "userAccount", n))(kr || {});
3162
- const Ds = Le(kr);
3242
+ var Rr = /* @__PURE__ */ ((n) => (n.ipAddress = "ipAddress", n.userAccount = "userAccount", n))(Rr || {});
3243
+ const Gs = ke(Rr);
3163
3244
  y({
3164
- global: De(),
3165
- hardBlock: De(),
3166
- type: Ds,
3245
+ global: ce(),
3246
+ hardBlock: ce(),
3247
+ type: Gs,
3167
3248
  dappAccount: p().optional(),
3168
- captchaConfig: Cr.optional()
3249
+ captchaConfig: Ir.optional()
3169
3250
  });
3170
3251
  y({
3171
3252
  [h.dapp]: p()
3172
3253
  });
3173
- const Pr = 0.2, Ir = 0.5, Fs = y({
3174
- PENALTY_OLD_TIMESTAMP: S().positive().optional().default(Pr),
3175
- PENALTY_ACCESS_RULE: S().positive().optional().default(Ir)
3176
- }), yn = ze([
3254
+ const Ar = 0.2, $r = 0.5, Nr = 0.2, Qs = y({
3255
+ PENALTY_OLD_TIMESTAMP: w().positive().optional().default(Ar),
3256
+ PENALTY_ACCESS_RULE: w().positive().optional().default($r),
3257
+ PENALTY_UNVERIFIED_HOST: w().positive().optional().default(Nr)
3258
+ }), wn = Je([
3177
3259
  "trace",
3178
3260
  "debug",
3179
3261
  "info",
@@ -3182,29 +3264,29 @@ const Pr = 0.2, Ir = 0.5, Fs = y({
3182
3264
  "fatal",
3183
3265
  "log"
3184
3266
  ]);
3185
- ze([
3267
+ Je([
3186
3268
  "mongo",
3187
3269
  "mongoMemory",
3188
3270
  "provider",
3189
3271
  "client",
3190
3272
  "captcha"
3191
3273
  ]);
3192
- const vt = ze([
3274
+ const bt = Je([
3193
3275
  "development",
3194
3276
  "staging",
3195
3277
  "production"
3196
- ]), _s = Sn(
3197
- vt,
3278
+ ]), Zs = On(
3279
+ bt,
3198
3280
  y({
3199
3281
  type: p(),
3200
3282
  endpoint: p(),
3201
3283
  dbname: p().default("prosopo"),
3202
3284
  authSource: p().default("admin")
3203
3285
  })
3204
- ), Ms = y({
3205
- logLevel: yn.optional().default(yn.enum.info),
3206
- defaultEnvironment: vt.default(
3207
- vt.Values.production
3286
+ ), ea = y({
3287
+ logLevel: wn.optional().default(wn.enum.info),
3288
+ defaultEnvironment: bt.default(
3289
+ bt.Values.production
3208
3290
  ),
3209
3291
  // The account with which to query the contract.merge sign transactions
3210
3292
  account: y({
@@ -3213,122 +3295,127 @@ const vt = ze([
3213
3295
  password: p().optional()
3214
3296
  })
3215
3297
  });
3216
- R.object({
3217
- encoded: R.string(),
3218
- encoding: R.object({
3219
- content: R.array(R.string()),
3220
- type: R.array(R.string()),
3221
- version: R.string()
3298
+ C.object({
3299
+ encoded: C.string(),
3300
+ encoding: C.object({
3301
+ content: C.array(C.string()),
3302
+ type: C.array(C.string()),
3303
+ version: C.string()
3222
3304
  }),
3223
- address: R.string(),
3224
- meta: R.object({
3225
- genesisHash: R.string(),
3226
- name: R.string(),
3227
- whenCreated: R.number()
3305
+ address: C.string(),
3306
+ meta: C.object({
3307
+ genesisHash: C.string(),
3308
+ name: C.string(),
3309
+ whenCreated: C.number()
3228
3310
  })
3229
3311
  });
3230
- const Rr = Ms.merge(
3312
+ const jr = ea.merge(
3231
3313
  y({
3232
- database: _s.optional(),
3233
- devOnlyWatchEvents: De().optional()
3314
+ database: Zs.optional(),
3315
+ devOnlyWatchEvents: ce().optional()
3234
3316
  })
3235
- ), Hs = y({
3317
+ ), ta = y({
3236
3318
  baseURL: p().url(),
3237
- port: S().optional().default(9229)
3319
+ port: w().optional().default(9229)
3238
3320
  }).default({
3239
3321
  baseURL: "http://localhost",
3240
3322
  port: 9229
3241
3323
  });
3242
3324
  y({
3243
- requiredNumberOfSolutions: S().positive().min(2),
3244
- solutionWinningPercentage: S().positive().max(100),
3245
- captchaBlockRecency: S().positive().min(2)
3325
+ requiredNumberOfSolutions: w().positive().min(2),
3326
+ solutionWinningPercentage: w().positive().max(100),
3327
+ captchaBlockRecency: w().positive().min(2)
3246
3328
  });
3247
- const $r = Rr.merge(
3329
+ const Dr = jr.merge(
3248
3330
  y({
3249
3331
  userAccountAddress: p().optional(),
3250
- web2: De().optional().default(!0),
3251
- solutionThreshold: S().positive().max(100).optional().default(80),
3332
+ web2: ce().optional().default(!0),
3333
+ solutionThreshold: w().positive().max(100).optional().default(80),
3252
3334
  dappName: p().optional().default("ProsopoClientDapp"),
3253
3335
  serverUrl: p().optional()
3254
3336
  })
3255
- ), Ar = {
3256
- challengeTimeout: ke,
3257
- solutionTimeout: Qn,
3258
- verifiedTimeout: Zn,
3259
- cachedTimeout: Tt
3260
- }, Nr = {
3261
- challengeTimeout: Ye,
3337
+ ), Ur = {
3338
+ challengeTimeout: Re,
3339
+ solutionTimeout: er,
3340
+ verifiedTimeout: tr,
3341
+ cachedTimeout: Lt
3342
+ }, Fr = {
3343
+ challengeTimeout: Qe,
3262
3344
  solutionTimeout: Ge,
3263
- cachedTimeout: er
3264
- }, jr = {
3265
- maxVerifiedTime: tr
3266
- }, Lt = {
3267
- image: Ar,
3268
- pow: Nr,
3269
- contract: jr
3270
- }, Ur = y({
3345
+ cachedTimeout: nr
3346
+ }, _r = {
3347
+ maxVerifiedTime: rr
3348
+ }, Pt = {
3349
+ image: Ur,
3350
+ pow: Fr,
3351
+ contract: _r
3352
+ }, Mr = y({
3271
3353
  image: y({
3272
3354
  // Set this to a default value for the frontend
3273
- challengeTimeout: S().positive().optional().default(ke),
3355
+ challengeTimeout: w().positive().optional().default(Re),
3274
3356
  // Set this to a default value for the frontend
3275
- solutionTimeout: S().positive().optional().default(Qn),
3276
- verifiedTimeout: S().positive().optional().default(Zn),
3277
- cachedTimeout: S().positive().optional().default(Tt)
3278
- }).default(Ar),
3357
+ solutionTimeout: w().positive().optional().default(er),
3358
+ verifiedTimeout: w().positive().optional().default(tr),
3359
+ cachedTimeout: w().positive().optional().default(Lt)
3360
+ }).default(Ur),
3279
3361
  pow: y({
3280
- verifiedTimeout: S().positive().optional().default(Ye),
3281
- solutionTimeout: S().positive().optional().default(Ge),
3282
- cachedTimeout: S().positive().optional().default(er)
3283
- }).default(Nr),
3362
+ verifiedTimeout: w().positive().optional().default(Qe),
3363
+ solutionTimeout: w().positive().optional().default(Ge),
3364
+ cachedTimeout: w().positive().optional().default(nr)
3365
+ }).default(Fr),
3284
3366
  contract: y({
3285
- maxVerifiedTime: S().positive().optional().default(tr)
3286
- }).default(jr)
3287
- }).default(Lt);
3288
- $r.merge(
3367
+ maxVerifiedTime: w().positive().optional().default(rr)
3368
+ }).default(_r)
3369
+ }).default(Pt);
3370
+ Dr.merge(
3289
3371
  y({
3290
3372
  serverUrl: p().url().optional(),
3291
- timeouts: Ur.optional().default(Lt)
3373
+ timeouts: Mr.optional().default(Pt)
3292
3374
  })
3293
3375
  );
3294
3376
  y({
3295
3377
  area: y({
3296
- width: S().positive(),
3297
- height: S().positive()
3378
+ width: w().positive(),
3379
+ height: w().positive()
3298
3380
  }),
3299
- offsetParameter: S().positive(),
3300
- multiplier: S().positive(),
3301
- fontSizeFactor: S().positive(),
3302
- maxShadowBlur: S().positive(),
3303
- numberOfRounds: S().positive(),
3304
- seed: S().positive()
3381
+ offsetParameter: w().positive(),
3382
+ multiplier: w().positive(),
3383
+ fontSizeFactor: w().positive(),
3384
+ maxShadowBlur: w().positive(),
3385
+ numberOfRounds: w().positive(),
3386
+ seed: w().positive()
3305
3387
  });
3306
- const Vs = Ue([jt("light"), jt("dark")]);
3307
- var Bs = /* @__PURE__ */ ((n) => (n.visible = "visible", n.invisible = "invisible", n))(Bs || {});
3308
- const Ks = ze([
3388
+ const na = _e([Ut("light"), Ut("dark")]);
3389
+ var ra = /* @__PURE__ */ ((n) => (n.visible = "visible", n.invisible = "invisible", n))(ra || {});
3390
+ const ia = Je([
3309
3391
  "visible",
3310
3392
  "invisible"
3311
3393
  /* invisible */
3312
- ]).optional(), La = $r.and(
3394
+ ]).optional(), Ha = Dr.and(
3313
3395
  y({
3314
- theme: Vs.optional().default("light"),
3315
- captchas: Ur.optional().default(Lt),
3316
- language: kn.optional(),
3317
- mode: Ks.optional().default(
3396
+ theme: na.optional().default("light"),
3397
+ captchas: Mr.optional().default(Pt),
3398
+ language: In.optional(),
3399
+ mode: ia.optional().default(
3318
3400
  "visible"
3319
3401
  /* visible */
3320
3402
  )
3321
3403
  })
3322
- );
3323
- Rr.merge(
3404
+ ), oa = C.object({
3405
+ apiKey: C.string(),
3406
+ baseUrl: C.string().url()
3407
+ });
3408
+ jr.merge(
3324
3409
  y({
3325
- captchas: Cr.optional().default({
3326
- solved: { count: Er },
3327
- unsolved: { count: Tr }
3410
+ host: p(),
3411
+ captchas: Ir.optional().default({
3412
+ solved: { count: Lr },
3413
+ unsolved: { count: Pr }
3328
3414
  }),
3329
- penalties: Fs.optional().default({
3330
- PENALTY_OLD_TIMESTAMP: Pr,
3331
- PENALTY_ACCESS_RULE: Ir
3415
+ penalties: Qs.optional().default({
3416
+ PENALTY_OLD_TIMESTAMP: Ar,
3417
+ PENALTY_ACCESS_RULE: $r,
3418
+ PENALTY_UNVERIFIED_HOST: Nr
3332
3419
  }),
3333
3420
  scheduledTasks: y({
3334
3421
  captchaScheduler: y({
@@ -3338,10 +3425,11 @@ Rr.merge(
3338
3425
  schedule: p().optional()
3339
3426
  }).optional()
3340
3427
  }).optional(),
3341
- server: Hs.optional(),
3428
+ server: ta.optional(),
3342
3429
  mongoEventsUri: p().optional(),
3343
3430
  mongoCaptchaUri: p().optional(),
3344
3431
  mongoClientUri: p().optional(),
3432
+ ipApi: oa,
3345
3433
  redisConnection: y({
3346
3434
  url: p(),
3347
3435
  password: p(),
@@ -3350,9 +3438,9 @@ Rr.merge(
3350
3438
  url: "redis://localhost:6379",
3351
3439
  password: "root"
3352
3440
  }),
3353
- rateLimits: Us.default(Lr),
3354
- proxyCount: S().optional().default(0),
3355
- lRules: Sn(p(), S()).optional(),
3441
+ rateLimits: Ys.default(kr),
3442
+ proxyCount: w().optional().default(0),
3443
+ lRules: On(p(), w()).optional(),
3356
3444
  authAccount: y({
3357
3445
  address: p().optional(),
3358
3446
  secret: p().optional(),
@@ -3360,7 +3448,7 @@ Rr.merge(
3360
3448
  })
3361
3449
  })
3362
3450
  );
3363
- const qs = async () => (await import("./fp.esm-DYWeNGcH.js")).default, zs = async () => (await (await (await qs()).load()).get()).visitorId, ie = new Uint8Array([161, 35, 3, 33, 0]), qe = new Uint8Array([
3451
+ const sa = async () => (await import("./fp.esm-DYWeNGcH.js")).default, aa = async () => (await (await (await sa()).load()).get()).visitorId, se = new Uint8Array([161, 35, 3, 33, 0]), We = new Uint8Array([
3364
3452
  48,
3365
3453
  83,
3366
3454
  2,
@@ -3377,40 +3465,40 @@ const qs = async () => (await import("./fp.esm-DYWeNGcH.js")).default, zs = asyn
3377
3465
  34,
3378
3466
  4,
3379
3467
  32
3380
- ]), Ws = 32, vn = 64, Js = 32, ve = qe.length;
3381
- function Xs(n, e, t) {
3382
- const r = Array.isArray(t) || t === void 0 ? t : [t], i = Hr(e, n, r), o = i.subarray(0, qe.length);
3383
- if (!et(o, qe))
3468
+ ]), ua = 32, bn = 64, la = 32, Se = We.length;
3469
+ function ca(n, e, t) {
3470
+ const r = Array.isArray(t) || t === void 0 ? t : [t], i = Kr(e, n, r), o = i.subarray(0, We.length);
3471
+ if (!nt(o, We))
3384
3472
  throw new Error("Invalid encoding header found in body");
3385
- let s = i.subarray(ve, ve + vn), a = ve + vn, u = i.subarray(a, a + ie.length);
3386
- if (!et(u, ie) && (a = ve + Js, s = i.subarray(ve, a), u = i.subarray(a, a + ie.length), !et(u, ie)))
3473
+ let s = i.subarray(Se, Se + bn), a = Se + bn, u = i.subarray(a, a + se.length);
3474
+ if (!nt(u, se) && (a = Se + la, s = i.subarray(Se, a), u = i.subarray(a, a + se.length), !nt(u, se)))
3387
3475
  throw new Error("Invalid encoding divider found in body");
3388
- const c = a + ie.length;
3476
+ const c = a + se.length;
3389
3477
  return {
3390
- publicKey: i.subarray(c, c + Ws),
3478
+ publicKey: i.subarray(c, c + ua),
3391
3479
  secretKey: s
3392
3480
  };
3393
3481
  }
3394
- function Gs({ publicKey: n, secretKey: e }, t) {
3482
+ function fa({ publicKey: n, secretKey: e }, t) {
3395
3483
  if (!e)
3396
3484
  throw new Error("Expected a valid secretKey to be passed to encode");
3397
- const r = lt(qe, e, ie, n);
3485
+ const r = ft(We, e, se, n);
3398
3486
  if (!t)
3399
3487
  return r;
3400
- const { params: i, password: o, salt: s } = Vr(t), { encrypted: a, nonce: u } = Br(r, o.subarray(0, 32));
3401
- return lt(Kr(s, i), u, a);
3488
+ const { params: i, password: o, salt: s } = qr(t), { encrypted: a, nonce: u } = zr(r, o.subarray(0, 32));
3489
+ return ft(Wr(s, i), u, a);
3402
3490
  }
3403
- function Ys(n, { address: e, meta: t }, r, i) {
3404
- return En(
3405
- qr(r, ["pkcs8", n], i),
3491
+ function da(n, { address: e, meta: t }, r, i) {
3492
+ return Cn(
3493
+ Jr(r, ["pkcs8", n], i),
3406
3494
  {
3407
3495
  address: e,
3408
3496
  meta: t
3409
3497
  }
3410
3498
  );
3411
3499
  }
3412
- const Qs = new Uint8Array([]), Zs = {
3413
- sr25519: On,
3500
+ const pa = new Uint8Array([]), ha = {
3501
+ sr25519: Tn,
3414
3502
  ed25519: () => {
3415
3503
  throw new Error("Not Implemented");
3416
3504
  },
@@ -3420,13 +3508,13 @@ const Qs = new Uint8Array([]), Zs = {
3420
3508
  ethereum: () => {
3421
3509
  throw new Error("Not Implemented");
3422
3510
  }
3423
- }, ea = {
3511
+ }, ga = {
3424
3512
  ecdsa: new Uint8Array([2]),
3425
3513
  ed25519: new Uint8Array([0]),
3426
3514
  ethereum: new Uint8Array([2]),
3427
3515
  sr25519: new Uint8Array([1])
3428
- }, ta = {
3429
- sr25519: Gr,
3516
+ }, ma = {
3517
+ sr25519: Zr,
3430
3518
  ed25519: () => {
3431
3519
  throw new Error("Not Implemented");
3432
3520
  },
@@ -3436,7 +3524,7 @@ const Qs = new Uint8Array([]), Zs = {
3436
3524
  ethereum: () => {
3437
3525
  throw new Error("Not Implemented");
3438
3526
  }
3439
- }, ut = {
3527
+ }, ct = {
3440
3528
  sr25519: (n) => n,
3441
3529
  ed25519: () => {
3442
3530
  throw new Error("Not Implemented");
@@ -3448,20 +3536,20 @@ const Qs = new Uint8Array([]), Zs = {
3448
3536
  throw new Error("Not Implemented");
3449
3537
  }
3450
3538
  };
3451
- function we(n) {
3452
- return !n || ni(n);
3539
+ function xe(n) {
3540
+ return !n || si(n);
3453
3541
  }
3454
- function oe({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o = null, s) {
3542
+ function ae({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o = null, s) {
3455
3543
  const a = (l, f) => {
3456
- const d = Xs(l, f || o, s);
3544
+ const d = ca(l, f || o, s);
3457
3545
  if (d.secretKey.length === 64)
3458
3546
  t = d.publicKey, r = d.secretKey;
3459
3547
  else {
3460
- const g = Zs[e](d.secretKey);
3548
+ const g = ha[e](d.secretKey);
3461
3549
  t = g.publicKey, r = g.secretKey;
3462
3550
  }
3463
- }, u = (l) => (we(r) && o && a(l, o), o = Gs({ publicKey: t, secretKey: r }, l), s = void 0, o), c = () => {
3464
- const l = ut[e](t);
3551
+ }, u = (l) => (xe(r) && o && a(l, o), o = fa({ publicKey: t, secretKey: r }, l), s = void 0, o), c = () => {
3552
+ const l = ct[e](t);
3465
3553
  return n(l);
3466
3554
  };
3467
3555
  return {
@@ -3469,10 +3557,10 @@ function oe({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o =
3469
3557
  return c();
3470
3558
  },
3471
3559
  get addressRaw() {
3472
- return ut[e](t);
3560
+ return ct[e](t);
3473
3561
  },
3474
3562
  get isLocked() {
3475
- return we(r);
3563
+ return xe(r);
3476
3564
  },
3477
3565
  get meta() {
3478
3566
  return i;
@@ -3486,29 +3574,29 @@ function oe({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o =
3486
3574
  // eslint-disable-next-line sort-keys
3487
3575
  decodePkcs8: a,
3488
3576
  derive: (l, f) => {
3489
- if (we(r))
3577
+ if (xe(r))
3490
3578
  throw new Error("Cannot derive on a locked keypair");
3491
- const { path: d } = Yr(l), g = xn({ publicKey: t, secretKey: r }, d, e);
3492
- return oe({ toSS58: n, type: e }, g, f, null);
3579
+ const { path: d } = ei(l), g = En({ publicKey: t, secretKey: r }, d, e);
3580
+ return ae({ toSS58: n, type: e }, g, f, null);
3493
3581
  },
3494
3582
  encodePkcs8: (l) => u(l),
3495
3583
  lock: () => {
3496
3584
  r = new Uint8Array([]);
3497
3585
  },
3498
3586
  setMeta: (l) => {
3499
- i = En({}, i, l);
3587
+ i = Cn({}, i, l);
3500
3588
  },
3501
3589
  sign: (l, f = {}) => {
3502
- if (we(r))
3590
+ if (xe(r))
3503
3591
  throw new Error("Cannot sign with a locked key pair");
3504
- return lt(
3505
- f.withType ? ea[e] : Qs,
3506
- ta[e](ct(l), { publicKey: t, secretKey: r })
3592
+ return ft(
3593
+ f.withType ? ga[e] : pa,
3594
+ ma[e](dt(l), { publicKey: t, secretKey: r })
3507
3595
  );
3508
3596
  },
3509
3597
  toJson: (l) => {
3510
- const f = ["ecdsa", "ethereum"].includes(e) ? t.length === 20 ? Ut(t) : Ut(Xr(t)) : c();
3511
- return Ys(
3598
+ const f = ["ecdsa", "ethereum"].includes(e) ? t.length === 20 ? Ft(t) : Ft(Qr(t)) : c();
3599
+ return da(
3512
3600
  e,
3513
3601
  { address: f, meta: i },
3514
3602
  u(l),
@@ -3518,45 +3606,45 @@ function oe({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o =
3518
3606
  unlock: (l) => {
3519
3607
  a(l);
3520
3608
  },
3521
- verify: (l, f, d) => Jr(
3609
+ verify: (l, f, d) => Gr(
3522
3610
  l,
3523
3611
  f,
3524
- ut[e](ct(d))
3612
+ ct[e](dt(d))
3525
3613
  ).isValid,
3526
3614
  vrfSign: (l, f, d) => {
3527
- if (we(r))
3615
+ if (xe(r))
3528
3616
  throw new Error("Cannot sign with a locked key pair");
3529
- return Wr(l, { secretKey: r }, f, d);
3617
+ return Yr(l, { secretKey: r }, f, d);
3530
3618
  },
3531
- vrfVerify: (l, f, d, g, m) => zr(l, f, t, g, m)
3619
+ vrfVerify: (l, f, d, g, m) => Xr(l, f, t, g, m)
3532
3620
  };
3533
3621
  }
3534
- var Y;
3535
- class na {
3622
+ var Z;
3623
+ class ya {
3536
3624
  constructor() {
3537
- pe(this, Y, {});
3625
+ me(this, Z, {});
3538
3626
  }
3539
3627
  add(e) {
3540
- return j(this, Y)[$e(e.address).toString()] = e, e;
3628
+ return j(this, Z)[je(e.address).toString()] = e, e;
3541
3629
  }
3542
3630
  all() {
3543
- return Object.values(j(this, Y));
3631
+ return Object.values(j(this, Z));
3544
3632
  }
3545
3633
  get(e) {
3546
- const t = j(this, Y)[$e(e).toString()];
3634
+ const t = j(this, Z)[je(e).toString()];
3547
3635
  if (!t)
3548
3636
  throw new Error(
3549
- `Unable to retrieve keypair '${ri(e) || Ae(e) ? We(ct(e)) : e}'`
3637
+ `Unable to retrieve keypair '${ai(e) || De(e) ? Ze(dt(e)) : e}'`
3550
3638
  );
3551
3639
  return t;
3552
3640
  }
3553
3641
  remove(e) {
3554
- delete j(this, Y)[$e(e).toString()];
3642
+ delete j(this, Z)[je(e).toString()];
3555
3643
  }
3556
3644
  }
3557
- Y = new WeakMap();
3558
- const ra = "bottom drive obey lake curtain smoke basket hold race lonely fit walk", wn = {
3559
- sr25519: (n) => On(n),
3645
+ Z = new WeakMap();
3646
+ const va = "bottom drive obey lake curtain smoke basket hold race lonely fit walk", Sn = {
3647
+ sr25519: (n) => Tn(n),
3560
3648
  ed25519: () => {
3561
3649
  throw new Error("Not Implemented");
3562
3650
  },
@@ -3567,20 +3655,20 @@ const ra = "bottom drive obey lake curtain smoke basket hold race lonely fit wal
3567
3655
  throw new Error("Not Implemented");
3568
3656
  }
3569
3657
  };
3570
- function ia({ publicKey: n }) {
3658
+ function wa({ publicKey: n }) {
3571
3659
  return n;
3572
3660
  }
3573
- var V, Te, ae;
3574
- class oa {
3661
+ var V, Pe, le;
3662
+ class ba {
3575
3663
  constructor(e = {}) {
3576
- pe(this, V);
3577
- pe(this, Te);
3578
- pe(this, ae);
3579
- if (this.decodeAddress = $e, this.encodeAddress = (t, r) => Qr(t, r ?? j(this, ae)), e.type = e.type || "sr25519", !["sr25519"].includes(e.type || "undefined"))
3664
+ me(this, V);
3665
+ me(this, Pe);
3666
+ me(this, le);
3667
+ if (this.decodeAddress = je, this.encodeAddress = (t, r) => ti(t, r ?? j(this, le)), e.type = e.type || "sr25519", !["sr25519"].includes(e.type || "undefined"))
3580
3668
  throw new Error(
3581
3669
  `Expected a keyring type of either 'sr25519', found '${e.type || "unknown"}`
3582
3670
  );
3583
- he(this, V, new na()), he(this, ae, e.ss58Format), he(this, Te, e.type);
3671
+ ye(this, V, new ya()), ye(this, le, e.ss58Format), ye(this, Pe, e.type);
3584
3672
  }
3585
3673
  /**
3586
3674
  * @description retrieve the pairs (alias for getPairs)
@@ -3598,7 +3686,7 @@ class oa {
3598
3686
  * @description Returns the type of the keyring, ed25519, sr25519 or ecdsa
3599
3687
  */
3600
3688
  get type() {
3601
- return j(this, Te);
3689
+ return j(this, Pe);
3602
3690
  }
3603
3691
  /**
3604
3692
  * @name addPair
@@ -3618,7 +3706,7 @@ class oa {
3618
3706
  addFromAddress(e, t = {}, r = null, i = this.type, o, s) {
3619
3707
  const a = this.decodeAddress(e, o);
3620
3708
  return this.addPair(
3621
- oe(
3709
+ ae(
3622
3710
  { toSS58: this.encodeAddress, type: i },
3623
3711
  { publicKey: a, secretKey: new Uint8Array() },
3624
3712
  t,
@@ -3664,9 +3752,9 @@ class oa {
3664
3752
  */
3665
3753
  addFromSeed(e, t = {}, r = this.type) {
3666
3754
  return this.addPair(
3667
- oe(
3755
+ ae(
3668
3756
  { toSS58: this.encodeAddress, type: r },
3669
- wn[r](e),
3757
+ Sn[r](e),
3670
3758
  t,
3671
3759
  null
3672
3760
  )
@@ -3700,8 +3788,8 @@ class oa {
3700
3788
  const c = Array.isArray(i) ? i : [i];
3701
3789
  if (!["sr25519"].includes(u))
3702
3790
  throw new Error(`Unknown crypto type ${u}`);
3703
- const l = Ae(e) ? tt(e) : this.decodeAddress(e, a), f = Ae(t) ? tt(t) : Zr(t);
3704
- return oe(
3791
+ const l = De(e) ? rt(e) : this.decodeAddress(e, a), f = De(t) ? rt(t) : ni(t);
3792
+ return ae(
3705
3793
  { toSS58: this.encodeAddress, type: u },
3706
3794
  { publicKey: l, secretKey: new Uint8Array() },
3707
3795
  s,
@@ -3714,7 +3802,7 @@ class oa {
3714
3802
  * @summary Creates a pair from an explicit publicKey/secreteKey combination
3715
3803
  */
3716
3804
  createFromPair(e, t = {}, r = this.type) {
3717
- return oe({ toSS58: this.encodeAddress, type: r }, e, t, null);
3805
+ return ae({ toSS58: this.encodeAddress, type: r }, e, t, null);
3718
3806
  }
3719
3807
  /**
3720
3808
  * @name createFromUri
@@ -3722,10 +3810,10 @@ class oa {
3722
3810
  * @description This creates a pair from the suri, but does not add it to the keyring
3723
3811
  */
3724
3812
  createFromUri(e, t = {}, r = this.type) {
3725
- const i = e.startsWith("//") ? `${ra}${e}` : e, { password: o, path: s, phrase: a } = ei(i);
3813
+ const i = e.startsWith("//") ? `${va}${e}` : e, { password: o, path: s, phrase: a } = ri(i);
3726
3814
  let u;
3727
- if (Ae(a, 256))
3728
- u = tt(a);
3815
+ if (De(a, 256))
3816
+ u = rt(a);
3729
3817
  else {
3730
3818
  const f = a.split(" ");
3731
3819
  if ([12, 15, 18, 21, 24].includes(f.length))
@@ -3733,17 +3821,17 @@ class oa {
3733
3821
  throw new Error(
3734
3822
  "Not implemented - Prosopo Keyring supports sr25519 only"
3735
3823
  );
3736
- })() : ti(a, o);
3824
+ })() : ii(a, o);
3737
3825
  else {
3738
3826
  if (a.length > 32)
3739
3827
  throw new Error(
3740
3828
  "specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes"
3741
3829
  );
3742
- u = Tn(a.padEnd(32));
3830
+ u = Ln(a.padEnd(32));
3743
3831
  }
3744
3832
  }
3745
- const l = xn(wn[r](u), s, r);
3746
- return oe(
3833
+ const l = En(Sn[r](u), s, r);
3834
+ return ae(
3747
3835
  { toSS58: this.encodeAddress, type: r },
3748
3836
  l,
3749
3837
  t,
@@ -3773,7 +3861,7 @@ class oa {
3773
3861
  * @description Returns an array list of all the public keys associated with each of the keyring pair values that are stored in the keyring pair dictionary.
3774
3862
  */
3775
3863
  getPublicKeys() {
3776
- return j(this, V).all().map(ia);
3864
+ return j(this, V).all().map(wa);
3777
3865
  }
3778
3866
  /**
3779
3867
  * @name removePair
@@ -3787,7 +3875,7 @@ class oa {
3787
3875
  * @description Sets the ss58 format for the keyring
3788
3876
  */
3789
3877
  setSS58Format(e) {
3790
- he(this, ae, e);
3878
+ ye(this, le, e);
3791
3879
  }
3792
3880
  /**
3793
3881
  * @name toJson
@@ -3801,11 +3889,11 @@ class oa {
3801
3889
  return j(this, V).get(e).toJson(t);
3802
3890
  }
3803
3891
  }
3804
- V = new WeakMap(), Te = new WeakMap(), ae = new WeakMap();
3805
- class sa {
3892
+ V = new WeakMap(), Pe = new WeakMap(), le = new WeakMap();
3893
+ class Sa {
3806
3894
  }
3807
- const aa = async () => (await import("./Signer-DP9drQ55.js")).default, ua = async () => (await import("./utilCryptoChunk-BKe3CKqn.js").then((n) => n.v)).entropyToMnemonic;
3808
- class bn extends sa {
3895
+ const xa = async () => (await import("./Signer-DP9drQ55.js")).default, Oa = async () => (await import("./utilCryptoChunk-D6ZLkbFV.js").then((n) => n.w)).entropyToMnemonic;
3896
+ class xn extends Sa {
3809
3897
  async getAccount(e) {
3810
3898
  const t = await this.createAccount(e), r = await this.createExtension(t);
3811
3899
  return {
@@ -3814,14 +3902,14 @@ class bn extends sa {
3814
3902
  };
3815
3903
  }
3816
3904
  async createExtension(e) {
3817
- const t = await aa(), r = new t(async () => {
3905
+ const t = await xa(), r = new t(async () => {
3818
3906
  });
3819
3907
  return r.signRaw = async (i) => {
3820
3908
  const o = e.keypair.sign(i.data);
3821
3909
  return {
3822
3910
  id: 1,
3823
3911
  // the id of the request to sign. This should be incremented each time and adjust the signature, but we're hacking around this. Hence the signature will always be the same given the same payload.
3824
- signature: We(o)
3912
+ signature: Ze(o)
3825
3913
  };
3826
3914
  }, {
3827
3915
  accounts: {
@@ -3830,12 +3918,12 @@ class bn extends sa {
3830
3918
  }
3831
3919
  },
3832
3920
  name: "procaptcha-web2",
3833
- version: ai,
3921
+ version: bs,
3834
3922
  signer: r
3835
3923
  };
3836
3924
  }
3837
3925
  async createAccount(e) {
3838
- const t = await zs(), r = Mr(t, 128).slice(2), i = Tn(r), s = (await ua())(i), a = "sr25519", c = new oa({
3926
+ const t = await aa(), r = oi(t, 128).slice(2), i = Ln(r), s = (await Oa())(i), a = "sr25519", c = new ba({
3839
3927
  type: a
3840
3928
  }).addFromMnemonic(s), l = c.address;
3841
3929
  return {
@@ -3845,33 +3933,35 @@ class bn extends sa {
3845
3933
  };
3846
3934
  }
3847
3935
  }
3848
- const Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3936
+ const Va = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3849
3937
  __proto__: null,
3850
- ExtensionWeb2: bn,
3851
- default: bn
3938
+ ExtensionWeb2: xn,
3939
+ default: xn
3852
3940
  }, Symbol.toStringTag, { value: "Module" }));
3853
3941
  export {
3854
3942
  h as A,
3855
- Je as C,
3856
- sa as E,
3857
- kn as L,
3858
- Bs as M,
3859
- La as P,
3860
- Sa as R,
3861
- Ea as S,
3862
- Ta as U,
3863
- va as a,
3864
- vt as b,
3865
- $s as c,
3866
- As as d,
3867
- Ns as e,
3868
- Oa as f,
3869
- Ii as g,
3870
- wa as h,
3871
- ya as i,
3872
- Ca as j,
3873
- ba as l,
3943
+ Xe as C,
3944
+ Sa as E,
3945
+ In as L,
3946
+ ra as M,
3947
+ Ha as P,
3948
+ Ma as R,
3949
+ Fa as S,
3950
+ _a as U,
3951
+ W as a,
3952
+ bt as b,
3953
+ zs as c,
3954
+ Ws as d,
3955
+ Js as e,
3956
+ Ra as f,
3957
+ Da as g,
3958
+ Ua as h,
3959
+ ja as i,
3960
+ Hi as j,
3961
+ Na as k,
3962
+ Ia as l,
3963
+ Va as m,
3874
3964
  F as r,
3875
- ma as s,
3876
- xa as u
3965
+ $a as s,
3966
+ Aa as u
3877
3967
  };