@prosopo/procaptcha-bundle 2.1.16 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.d.ts +4 -12
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/defaultCallbacks.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js +5 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +8 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts +8 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js +52 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts +2 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js +11 -57
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js.map +1 -1
- package/dist/bundle/{Checkbox-Dg1RwCua.js → Checkbox-DM6n1-r-.js} +67 -67
- package/dist/bundle/{ProcaptchaWidget-BlgHuBfn.js → ProcaptchaWidget-CrcxpJLK.js} +8 -8
- package/dist/bundle/ProcaptchaWidget-DZb9vegH.js +628 -0
- package/dist/bundle/{index-CgI2y2A6.js → index-B27PXNfK.js} +9260 -9186
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/util/defaultCallbacks.d.ts +4 -12
- package/dist/bundle/util/defaultCallbacks.d.ts.map +1 -1
- package/dist/bundle/util/renderLogic/captcha/captcha.d.ts +11 -0
- package/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +8 -0
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +6 -0
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/webComponent.d.ts +8 -0
- package/dist/bundle/util/renderLogic/webComponent.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts +24 -0
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +1 -0
- package/dist/bundle/util/renderLogic.d.ts +2 -3
- package/dist/bundle/util/renderLogic.d.ts.map +1 -1
- package/dist/util/defaultCallbacks.d.ts +4 -12
- package/dist/util/defaultCallbacks.d.ts.map +1 -1
- package/dist/util/defaultCallbacks.js.map +1 -1
- package/dist/util/renderLogic/captcha/captcha.d.ts +11 -0
- package/dist/util/renderLogic/captcha/captcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/captcha.js +5 -0
- package/dist/util/renderLogic/captcha/captcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts +8 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.js +11 -0
- package/dist/util/renderLogic/captcha/captchaRenderer.js.map +1 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts +6 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js +11 -0
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts +6 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.js +11 -0
- package/dist/util/renderLogic/captcha/components/imageCaptcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts +6 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.js +11 -0
- package/dist/util/renderLogic/captcha/components/powCaptcha.js.map +1 -0
- package/dist/util/renderLogic/captcha/componentsList.d.ts +6 -0
- package/dist/util/renderLogic/captcha/componentsList.d.ts.map +1 -0
- package/dist/util/renderLogic/captcha/componentsList.js +11 -0
- package/dist/util/renderLogic/captcha/componentsList.js.map +1 -0
- package/dist/util/renderLogic/webComponent.d.ts +8 -0
- package/dist/util/renderLogic/webComponent.d.ts.map +1 -0
- package/dist/util/renderLogic/webComponent.js +24 -0
- package/dist/util/renderLogic/webComponent.js.map +1 -0
- package/dist/util/renderLogic/widgetRenderer.d.ts +24 -0
- package/dist/util/renderLogic/widgetRenderer.d.ts.map +1 -0
- package/dist/util/renderLogic/widgetRenderer.js +52 -0
- package/dist/util/renderLogic/widgetRenderer.js.map +1 -0
- package/dist/util/renderLogic.d.ts +2 -3
- package/dist/util/renderLogic.d.ts.map +1 -1
- package/dist/util/renderLogic.js +11 -57
- package/dist/util/renderLogic.js.map +1 -1
- package/package.json +9 -9
- package/stats.html +1 -1
- package/dist/bundle/ProcaptchaWidget-DGAVVetC.js +0 -652
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { H as ue, I as ce, J as le, K as
|
|
1
|
+
import { H as ue, I as ce, J as le, K as fe, e as j, _ as Y, M as _, r as d, N as V, O as de, Q as ge, S as pe, q as X, T as he, U as me, V as ve, X as fn, Y as dn, Z as gn, $ as pn, a0 as hn, a1 as mn, a2 as vn, a3 as bn, l as be, d as we, a as ye, j as L } from "./index-B27PXNfK.js";
|
|
2
2
|
const wn = (t) => new Promise((e) => setTimeout(e, t));
|
|
3
3
|
function yn(t) {
|
|
4
4
|
return ue(ce(t));
|
|
5
5
|
}
|
|
6
|
-
function ke() {
|
|
7
|
-
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
8
|
-
e[n] = arguments[n];
|
|
9
|
-
return le(e);
|
|
10
|
-
}
|
|
11
|
-
function Se(t) {
|
|
6
|
+
function ke(t) {
|
|
12
7
|
return new Promise((e) => {
|
|
13
8
|
document.readyState === "complete" ? e(t()) : window.addEventListener("load", () => e(t()));
|
|
14
9
|
});
|
|
@@ -20,29 +15,29 @@ let M = null;
|
|
|
20
15
|
function Z() {
|
|
21
16
|
return Object.values(P.injectedWeb3).filter(({ connect: t, enable: e }) => !!(t || e)).length !== 0;
|
|
22
17
|
}
|
|
23
|
-
function
|
|
24
|
-
return Promise.all(Object.entries(P.injectedWeb3).map(([e, { connect: n, enable: r, version: a }]) => Promise.resolve().then(() => n ? n(t) : r ? r(t).then((o) =>
|
|
18
|
+
function Se(t) {
|
|
19
|
+
return Promise.all(Object.entries(P.injectedWeb3).map(([e, { connect: n, enable: r, version: a }]) => Promise.resolve().then(() => n ? n(t) : r ? r(t).then((o) => le({ name: e, version: a || "unknown" }, o)) : Promise.reject(new Error("No connect(..) or enable(...) hook found"))).catch(({ message: o }) => {
|
|
25
20
|
console.error(`Error initializing ${e}: ${o}`);
|
|
26
21
|
}))).then((e) => e.filter((n) => !!n));
|
|
27
22
|
}
|
|
28
|
-
function
|
|
23
|
+
function xe(t, e = []) {
|
|
29
24
|
if (!t)
|
|
30
25
|
throw new Error("You must pass a name for your app to the web3Enable function");
|
|
31
26
|
const n = e.length ? Promise.all(e.map((r) => r().catch(() => !1))) : Promise.resolve([!0]);
|
|
32
|
-
return M =
|
|
27
|
+
return M = ke(() => n.then(() => Se(t).then((r) => r.map((a) => (a.accounts.subscribe || (a.accounts.subscribe = (o) => (a.accounts.get().then(o).catch(console.error), () => {
|
|
33
28
|
})), a))).catch(() => []).then((r) => {
|
|
34
29
|
const a = r.map(({ name: o, version: i }) => `${o}/${i}`);
|
|
35
30
|
return Z(), `${r.length}`, r.length, `${a.join(", ")}`, r;
|
|
36
31
|
}))), M;
|
|
37
32
|
}
|
|
38
|
-
class kn extends
|
|
33
|
+
class kn extends fe {
|
|
39
34
|
async getAccount(e) {
|
|
40
35
|
const { dappName: n, userAccountAddress: r } = e;
|
|
41
36
|
if (!r)
|
|
42
37
|
throw new j("WIDGET.NO_ACCOUNTS_FOUND", {
|
|
43
38
|
context: { error: "No account address provided" }
|
|
44
39
|
});
|
|
45
|
-
const a = await
|
|
40
|
+
const a = await xe(n);
|
|
46
41
|
if (a.length === 0)
|
|
47
42
|
throw new j("WIDGET.NO_EXTENSION_FOUND");
|
|
48
43
|
for (const o of a) {
|
|
@@ -55,10 +50,10 @@ class kn extends de {
|
|
|
55
50
|
});
|
|
56
51
|
}
|
|
57
52
|
}
|
|
58
|
-
const
|
|
53
|
+
const Oe = (t) => {
|
|
59
54
|
alert(t.message);
|
|
60
55
|
}, Sn = (t, e, n) => Object.assign({
|
|
61
|
-
onError:
|
|
56
|
+
onError: Oe,
|
|
62
57
|
onHuman: (r) => {
|
|
63
58
|
t({ sendData: !e.sendData });
|
|
64
59
|
},
|
|
@@ -112,15 +107,15 @@ const Ee = (t) => {
|
|
|
112
107
|
}
|
|
113
108
|
];
|
|
114
109
|
};
|
|
115
|
-
var ee = [],
|
|
116
|
-
function
|
|
117
|
-
return
|
|
110
|
+
var ee = [], Ee = ee.forEach, Ce = ee.slice;
|
|
111
|
+
function Ie(t) {
|
|
112
|
+
return Ee.call(Ce.call(arguments, 1), function(e) {
|
|
118
113
|
if (e)
|
|
119
114
|
for (var n in e)
|
|
120
115
|
t[n] === void 0 && (t[n] = e[n]);
|
|
121
116
|
}), t;
|
|
122
117
|
}
|
|
123
|
-
var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,
|
|
118
|
+
var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
|
|
124
119
|
var a = r || {};
|
|
125
120
|
a.path = a.path || "/";
|
|
126
121
|
var o = encodeURIComponent(n), i = "".concat(e, "=").concat(o);
|
|
@@ -170,7 +165,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
170
165
|
path: "/",
|
|
171
166
|
sameSite: "strict"
|
|
172
167
|
};
|
|
173
|
-
r && (o.expires = /* @__PURE__ */ new Date(), o.expires.setTime(o.expires.getTime() + r * 60 * 1e3)), a && (o.domain = a), document.cookie =
|
|
168
|
+
r && (o.expires = /* @__PURE__ */ new Date(), o.expires.setTime(o.expires.getTime() + r * 60 * 1e3)), a && (o.domain = a), document.cookie = De(e, encodeURIComponent(n), o);
|
|
174
169
|
},
|
|
175
170
|
read: function(e) {
|
|
176
171
|
for (var n = "".concat(e, "="), r = document.cookie.split(";"), a = 0; a < r.length; a++) {
|
|
@@ -182,7 +177,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
182
177
|
remove: function(e) {
|
|
183
178
|
this.create(e, "", -1);
|
|
184
179
|
}
|
|
185
|
-
},
|
|
180
|
+
}, Te = {
|
|
186
181
|
name: "cookie",
|
|
187
182
|
lookup: function(e) {
|
|
188
183
|
var n;
|
|
@@ -195,7 +190,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
195
190
|
cacheUserLanguage: function(e, n) {
|
|
196
191
|
n.lookupCookie && typeof document < "u" && H.create(n.lookupCookie, e, n.cookieMinutes, n.cookieDomain, n.cookieOptions);
|
|
197
192
|
}
|
|
198
|
-
},
|
|
193
|
+
}, Le = {
|
|
199
194
|
name: "querystring",
|
|
200
195
|
lookup: function(e) {
|
|
201
196
|
var n;
|
|
@@ -222,7 +217,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
222
217
|
O = !1;
|
|
223
218
|
}
|
|
224
219
|
return O;
|
|
225
|
-
},
|
|
220
|
+
}, Ne = {
|
|
226
221
|
name: "localStorage",
|
|
227
222
|
lookup: function(e) {
|
|
228
223
|
var n;
|
|
@@ -245,7 +240,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
245
240
|
E = !1;
|
|
246
241
|
}
|
|
247
242
|
return E;
|
|
248
|
-
},
|
|
243
|
+
}, Pe = {
|
|
249
244
|
name: "sessionStorage",
|
|
250
245
|
lookup: function(e) {
|
|
251
246
|
var n;
|
|
@@ -258,7 +253,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
258
253
|
cacheUserLanguage: function(e, n) {
|
|
259
254
|
n.lookupSessionStorage && W() && window.sessionStorage.setItem(n.lookupSessionStorage, e);
|
|
260
255
|
}
|
|
261
|
-
},
|
|
256
|
+
}, Ae = {
|
|
262
257
|
name: "navigator",
|
|
263
258
|
lookup: function(e) {
|
|
264
259
|
var n = [];
|
|
@@ -270,13 +265,13 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
270
265
|
}
|
|
271
266
|
return n.length > 0 ? n : void 0;
|
|
272
267
|
}
|
|
273
|
-
},
|
|
268
|
+
}, je = {
|
|
274
269
|
name: "htmlTag",
|
|
275
270
|
lookup: function(e) {
|
|
276
271
|
var n, r = e.htmlTag || (typeof document < "u" ? document.documentElement : null);
|
|
277
272
|
return r && typeof r.getAttribute == "function" && (n = r.getAttribute("lang")), n;
|
|
278
273
|
}
|
|
279
|
-
},
|
|
274
|
+
}, Ue = {
|
|
280
275
|
name: "path",
|
|
281
276
|
lookup: function(e) {
|
|
282
277
|
var n;
|
|
@@ -292,7 +287,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
292
287
|
}
|
|
293
288
|
return n;
|
|
294
289
|
}
|
|
295
|
-
},
|
|
290
|
+
}, Fe = {
|
|
296
291
|
name: "subdomain",
|
|
297
292
|
lookup: function(e) {
|
|
298
293
|
var n = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, r = typeof window < "u" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
|
|
@@ -300,7 +295,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
|
|
|
300
295
|
return r[n];
|
|
301
296
|
}
|
|
302
297
|
};
|
|
303
|
-
function
|
|
298
|
+
function ze() {
|
|
304
299
|
return {
|
|
305
300
|
order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"],
|
|
306
301
|
lookupQuerystring: "lng",
|
|
@@ -328,9 +323,9 @@ var ne = /* @__PURE__ */ function() {
|
|
|
328
323
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
329
324
|
this.services = n || {
|
|
330
325
|
languageUtils: {}
|
|
331
|
-
}, this.options =
|
|
326
|
+
}, this.options = Ie(r, this.options || {}, ze()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(o) {
|
|
332
327
|
return o.replace("-", "_");
|
|
333
|
-
}), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(Le), this.addDetector(Ne), this.addDetector(Pe), this.addDetector(Ae), this.addDetector(je), this.addDetector(Ue), this.addDetector(Fe)
|
|
328
|
+
}), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(Te), this.addDetector(Le), this.addDetector(Ne), this.addDetector(Pe), this.addDetector(Ae), this.addDetector(je), this.addDetector(Ue), this.addDetector(Fe);
|
|
334
329
|
}
|
|
335
330
|
}, {
|
|
336
331
|
key: "addDetector",
|
|
@@ -363,7 +358,7 @@ var ne = /* @__PURE__ */ function() {
|
|
|
363
358
|
}]), t;
|
|
364
359
|
}();
|
|
365
360
|
ne.type = "languageDetector";
|
|
366
|
-
var
|
|
361
|
+
var Me = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Re = {
|
|
367
362
|
"&": "&",
|
|
368
363
|
"&": "&",
|
|
369
364
|
"<": "<",
|
|
@@ -384,10 +379,10 @@ var Re = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
|
|
|
384
379
|
"…": "…",
|
|
385
380
|
"/": "/",
|
|
386
381
|
"/": "/"
|
|
382
|
+
}, He = function(e) {
|
|
383
|
+
return Re[e];
|
|
387
384
|
}, $e = function(e) {
|
|
388
|
-
return He
|
|
389
|
-
}, We = function(e) {
|
|
390
|
-
return e.replace(Re, $e);
|
|
385
|
+
return e.replace(Me, He);
|
|
391
386
|
};
|
|
392
387
|
function B(t, e) {
|
|
393
388
|
var n = Object.keys(t);
|
|
@@ -418,16 +413,16 @@ var F = {
|
|
|
418
413
|
transWrapTextNodes: "",
|
|
419
414
|
transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
|
|
420
415
|
useSuspense: !0,
|
|
421
|
-
unescape:
|
|
422
|
-
}, te,
|
|
423
|
-
function
|
|
416
|
+
unescape: $e
|
|
417
|
+
}, te, We = d.createContext();
|
|
418
|
+
function Be() {
|
|
424
419
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
425
420
|
F = q(q({}, F), t);
|
|
426
421
|
}
|
|
427
|
-
function
|
|
422
|
+
function qe() {
|
|
428
423
|
return F;
|
|
429
424
|
}
|
|
430
|
-
var
|
|
425
|
+
var Qe = function() {
|
|
431
426
|
function t() {
|
|
432
427
|
_(this, t), this.usedNamespaces = {};
|
|
433
428
|
}
|
|
@@ -446,19 +441,19 @@ var Ge = function() {
|
|
|
446
441
|
}
|
|
447
442
|
}]), t;
|
|
448
443
|
}();
|
|
449
|
-
function
|
|
444
|
+
function Ge(t) {
|
|
450
445
|
te = t;
|
|
451
446
|
}
|
|
452
|
-
function
|
|
447
|
+
function Je() {
|
|
453
448
|
return te;
|
|
454
449
|
}
|
|
455
|
-
var
|
|
450
|
+
var Ke = {
|
|
456
451
|
type: "3rdParty",
|
|
457
452
|
init: function(e) {
|
|
458
|
-
|
|
453
|
+
Be(e.options.react), Ge(e);
|
|
459
454
|
}
|
|
460
455
|
};
|
|
461
|
-
function
|
|
456
|
+
function Ye() {
|
|
462
457
|
if (console && console.warn) {
|
|
463
458
|
for (var t, e = arguments.length, n = new Array(e), r = 0; r < e; r++)
|
|
464
459
|
n[r] = arguments[r];
|
|
@@ -469,7 +464,7 @@ var Q = {};
|
|
|
469
464
|
function z() {
|
|
470
465
|
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
471
466
|
e[n] = arguments[n];
|
|
472
|
-
typeof e[0] == "string" && Q[e[0]] || (typeof e[0] == "string" && (Q[e[0]] = /* @__PURE__ */ new Date()),
|
|
467
|
+
typeof e[0] == "string" && Q[e[0]] || (typeof e[0] == "string" && (Q[e[0]] = /* @__PURE__ */ new Date()), Ye.apply(void 0, e));
|
|
473
468
|
}
|
|
474
469
|
function G(t, e, n) {
|
|
475
470
|
t.loadNamespaces(e, function() {
|
|
@@ -485,7 +480,7 @@ function G(t, e, n) {
|
|
|
485
480
|
}
|
|
486
481
|
});
|
|
487
482
|
}
|
|
488
|
-
function
|
|
483
|
+
function _e(t, e) {
|
|
489
484
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = e.languages[0], a = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
|
|
490
485
|
if (r.toLowerCase() === "cimode") return !0;
|
|
491
486
|
var i = function(c, g) {
|
|
@@ -494,7 +489,7 @@ function Ve(t, e) {
|
|
|
494
489
|
};
|
|
495
490
|
return n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !i(e.isLanguageChangingTo, t) ? !1 : !!(e.hasResourceBundle(r, t) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || i(r, t) && (!a || i(o, t)));
|
|
496
491
|
}
|
|
497
|
-
function
|
|
492
|
+
function Ve(t, e) {
|
|
498
493
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
499
494
|
if (!e.languages || !e.languages.length)
|
|
500
495
|
return z("i18n.languages were undefined or empty", e.languages), !0;
|
|
@@ -503,9 +498,9 @@ function Xe(t, e) {
|
|
|
503
498
|
precheck: function(o, i) {
|
|
504
499
|
if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && o.services.backendConnector.backend && o.isLanguageChangingTo && !i(o.isLanguageChangingTo, t)) return !1;
|
|
505
500
|
}
|
|
506
|
-
}) :
|
|
501
|
+
}) : _e(t, e, n);
|
|
507
502
|
}
|
|
508
|
-
function
|
|
503
|
+
function Xe(t, e) {
|
|
509
504
|
var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
510
505
|
if (n != null) {
|
|
511
506
|
var r, a, o, i, u = [], c = !0, g = !1;
|
|
@@ -523,8 +518,8 @@ function Ze(t, e) {
|
|
|
523
518
|
return u;
|
|
524
519
|
}
|
|
525
520
|
}
|
|
526
|
-
function
|
|
527
|
-
return
|
|
521
|
+
function Ze(t, e) {
|
|
522
|
+
return de(t) || Xe(t, e) || ge(t, e) || pe();
|
|
528
523
|
}
|
|
529
524
|
function J(t, e) {
|
|
530
525
|
var n = Object.keys(t);
|
|
@@ -547,15 +542,15 @@ function U(t) {
|
|
|
547
542
|
}
|
|
548
543
|
return t;
|
|
549
544
|
}
|
|
550
|
-
var
|
|
545
|
+
var en = function(e, n) {
|
|
551
546
|
var r = d.useRef();
|
|
552
547
|
return d.useEffect(function() {
|
|
553
548
|
r.current = e;
|
|
554
549
|
}, [e, n]), r.current;
|
|
555
550
|
};
|
|
556
|
-
function
|
|
557
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.i18n, r = d.useContext(
|
|
558
|
-
if (o && !o.reportNamespaces && (o.reportNamespaces = new
|
|
551
|
+
function nn(t) {
|
|
552
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.i18n, r = d.useContext(We) || {}, a = r.i18n, o = n || a || Je();
|
|
553
|
+
if (o && !o.reportNamespaces && (o.reportNamespaces = new Qe()), !o) {
|
|
559
554
|
z("You will need to pass in an i18next instance by using initReactI18next");
|
|
560
555
|
var i = function(h) {
|
|
561
556
|
return Array.isArray(h) ? h[h.length - 1] : h;
|
|
@@ -563,15 +558,15 @@ function tn(t) {
|
|
|
563
558
|
return u.t = i, u.i18n = {}, u.ready = !1, u;
|
|
564
559
|
}
|
|
565
560
|
o.options.react && o.options.react.wait !== void 0 && z("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
566
|
-
var c = U(U(U({},
|
|
561
|
+
var c = U(U(U({}, qe()), o.options.react), e), g = c.useSuspense, l = c.keyPrefix, f = t;
|
|
567
562
|
f = typeof f == "string" ? [f] : f || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(f);
|
|
568
563
|
var m = (o.isInitialized || o.initializedStoreOnce) && f.every(function(p) {
|
|
569
|
-
return
|
|
564
|
+
return Ve(p, o, c);
|
|
570
565
|
});
|
|
571
566
|
function b() {
|
|
572
567
|
return o.getFixedT(null, c.nsMode === "fallback" ? f : f[0], l);
|
|
573
568
|
}
|
|
574
|
-
var A = d.useState(b), C =
|
|
569
|
+
var A = d.useState(b), C = Ze(A, 2), I = C[0], y = C[1], S = f.join(), D = en(S), v = d.useRef(!0);
|
|
575
570
|
d.useEffect(function() {
|
|
576
571
|
var p = c.bindI18n, h = c.bindI18nStore;
|
|
577
572
|
v.current = !0, !m && !g && G(o, f, function() {
|
|
@@ -600,11 +595,11 @@ function tn(t) {
|
|
|
600
595
|
});
|
|
601
596
|
});
|
|
602
597
|
}
|
|
603
|
-
const
|
|
598
|
+
const tn = {
|
|
604
599
|
debug: !1,
|
|
605
|
-
fallbackLng:
|
|
606
|
-
resources:
|
|
607
|
-
},
|
|
600
|
+
fallbackLng: he.enum.en,
|
|
601
|
+
resources: me
|
|
602
|
+
}, rn = {
|
|
608
603
|
react: {
|
|
609
604
|
useSuspense: !0
|
|
610
605
|
},
|
|
@@ -613,11 +608,16 @@ const rn = {
|
|
|
613
608
|
caches: ["localStorage", "cookie"]
|
|
614
609
|
}
|
|
615
610
|
};
|
|
616
|
-
X.use(ne).use(
|
|
611
|
+
X.use(ne).use(Ke).init({ ...tn, ...rn });
|
|
617
612
|
function En(t) {
|
|
618
|
-
return
|
|
613
|
+
return nn("translation", { i18n: X, ...t });
|
|
614
|
+
}
|
|
615
|
+
function on() {
|
|
616
|
+
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
617
|
+
e[n] = arguments[n];
|
|
618
|
+
return ve(e);
|
|
619
619
|
}
|
|
620
|
-
const an =
|
|
620
|
+
const an = on`{
|
|
621
621
|
&:before {
|
|
622
622
|
content: '""';
|
|
623
623
|
position: absolute;
|
|
@@ -647,7 +647,7 @@ const an = ke`{
|
|
|
647
647
|
flex: 1,
|
|
648
648
|
margin: "15px"
|
|
649
649
|
}), [u, o, n]), l = cn();
|
|
650
|
-
return ye("span", { style: { display: "inline-flex" }, children: [L("input", { name: l, id: l, onMouseEnter: () => c(!0), onMouseLeave: () => c(!1), css: an, type: "checkbox", "aria-live": "assertive", "aria-
|
|
650
|
+
return ye("span", { style: { display: "inline-flex" }, children: [L("input", { name: l, id: l, onMouseEnter: () => c(!0), onMouseLeave: () => c(!1), css: an, type: "checkbox", "aria-live": "assertive", "aria-label": r, onChange: e, checked: n, style: g }), a ? L("label", { css: {
|
|
651
651
|
color: o.palette.error.main,
|
|
652
652
|
position: "relative",
|
|
653
653
|
display: "flex",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as L, p as O, f as m, i as k, n as U, A as r, m as M, o as j, E as F, r as
|
|
2
|
-
import { g as H, b as P, a as oe, s as se, E as re, u as ce, c as ie, C as le } from "./Checkbox-
|
|
1
|
+
import { G as L, p as O, f as m, i as k, n as U, A as r, m as M, o as j, E as F, r as h, q as B, j as n, W as X, C as K, s as Y, a as G, t as q, v as V, w as $, x as z, y as J, L as Q, B as Z, D as ee, F as ne, l as te, d as ae } from "./index-B27PXNfK.js";
|
|
2
|
+
import { g as H, b as P, a as oe, s as se, E as re, u as ce, c as ie, C as le } from "./Checkbox-DM6n1-r-.js";
|
|
3
3
|
const ue = (c, e) => {
|
|
4
4
|
let t = 0;
|
|
5
5
|
const l = "0".repeat(e);
|
|
@@ -29,7 +29,7 @@ const ue = (c, e) => {
|
|
|
29
29
|
...c
|
|
30
30
|
};
|
|
31
31
|
return e.account && (o.userAccountAddress = e.account.account.address), j.parse(o);
|
|
32
|
-
},
|
|
32
|
+
}, f = () => {
|
|
33
33
|
if (!e.account)
|
|
34
34
|
throw new m("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
35
35
|
context: { error: "Account not loaded" }
|
|
@@ -84,12 +84,12 @@ const ue = (c, e) => {
|
|
|
84
84
|
data: se(i[r.timestamp].toString()),
|
|
85
85
|
type: "bytes"
|
|
86
86
|
});
|
|
87
|
-
(await _.submitPowCaptchaSolution(i,
|
|
87
|
+
(await _.submitPowCaptchaSolution(i, f().account.account.address, g(), E, W.signature.toString(), o.captchas.pow.verifiedTimeout))[r.verified] ? (s({
|
|
88
88
|
isHuman: !0,
|
|
89
89
|
loading: !1
|
|
90
90
|
}), I.onHuman(M({
|
|
91
91
|
[r.providerUrl]: R,
|
|
92
|
-
[r.user]:
|
|
92
|
+
[r.user]: f().account.account.address,
|
|
93
93
|
[r.dapp]: g(),
|
|
94
94
|
[r.challenge]: i.challenge,
|
|
95
95
|
[r.nonce]: E,
|
|
@@ -112,8 +112,8 @@ const ue = (c, e) => {
|
|
|
112
112
|
resetState: A
|
|
113
113
|
};
|
|
114
114
|
}, me = (c) => {
|
|
115
|
-
const { t: e } = ce(), t = c.config, l = t.theme === "light" ? "light" : "dark", a = c.frictionlessState, d = c.config.theme === "light" ? te : ae, w = c.callbacks || {}, [u, x] = ie(
|
|
116
|
-
return
|
|
115
|
+
const { t: e } = ce(), t = c.config, l = t.theme === "light" ? "light" : "dark", a = c.frictionlessState, d = c.config.theme === "light" ? te : ae, w = c.callbacks || {}, [u, x] = ie(h.useState, h.useRef), p = P(u, x), f = h.useRef(ge(t, u, p, w, a)), g = h.useRef(null);
|
|
116
|
+
return h.useEffect(() => {
|
|
117
117
|
t.language && B.changeLanguage(t.language);
|
|
118
118
|
}, [t.language]), n("div", { ref: g, children: n("div", { style: {
|
|
119
119
|
maxWidth: X,
|
|
@@ -144,7 +144,7 @@ const ue = (c, e) => {
|
|
|
144
144
|
verticalAlign: "middle"
|
|
145
145
|
}, children: n("div", { style: {
|
|
146
146
|
display: "flex"
|
|
147
|
-
}, children: n("div", { style: { flex: 1 }, children: u.loading ? n(Q, { themeColor: l, "aria-label": "Loading spinner" }) : n(le, { checked: u.isHuman, onChange:
|
|
147
|
+
}, children: n("div", { style: { flex: 1 }, children: u.loading ? n(Q, { themeColor: l, "aria-label": "Loading spinner" }) : n(le, { checked: u.isHuman, onChange: f.current.start, themeColor: l, labelText: e("WIDGET.I_AM_HUMAN"), error: u.error, "aria-label": "human checkbox" }) }) }) }) }) }), n("div", { style: { display: "inline-flex", flexDirection: "column" }, children: n("a", { href: Z, target: "_blank", "aria-label": ee, children: n("div", { style: { flex: 1 }, children: n(ne, { themeColor: l, "aria-label": "Prosopo logo" }) }) }) })] })] }) }) }) }) });
|
|
148
148
|
};
|
|
149
149
|
export {
|
|
150
150
|
me as default
|