@prosopo/procaptcha-bundle 0.3.5 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/{Captcha-Cx0ArXYl.js → Captcha-1upZQDQF.js} +11 -11
- package/dist/bundle/{ProcaptchaWidget-DDAodo6R.js → ProcaptchaWidget-wUItdOkp.js} +321 -322
- package/dist/bundle/{index-HgeMtpKw.js → index-D8kIYYhv.js} +129 -128
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/{utils-CfklpKIj.js → utils-D1z4XROV.js} +1368 -1367
- package/dist/cjs/account/dist/extension/ExtensionWeb2.cjs +1 -1
- package/package.json +8 -7
- package/stats.html +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { B as K, u as M,
|
|
1
|
+
import { A as p, P as I, j as n, C as W, W as _, a as C, c as k, e as P, f as R, g as O, i as G, L as H, k as U, m as L, n as j, l as F, d as B, r as b } from "./index-D8kIYYhv.js";
|
|
2
|
+
import { B as K, u as M, p as q, h as w, m as X, w as $, t as z, q as J, A as Q, W as V, K as Y, x as Z, C as ee, n as D, y as te, z as ne } from "./utils-D1z4XROV.js";
|
|
3
3
|
const oe = (a, e) => {
|
|
4
4
|
let o = 0;
|
|
5
5
|
const c = "0".repeat(e);
|
|
@@ -27,7 +27,7 @@ const oe = (a, e) => {
|
|
|
27
27
|
...a
|
|
28
28
|
};
|
|
29
29
|
return I.parse(t);
|
|
30
|
-
},
|
|
30
|
+
}, f = (t) => {
|
|
31
31
|
const s = t.networks[t.defaultNetwork];
|
|
32
32
|
if (!s)
|
|
33
33
|
throw new w("DEVELOPER.NETWORK_NOT_FOUND", {
|
|
@@ -35,7 +35,7 @@ const oe = (a, e) => {
|
|
|
35
35
|
});
|
|
36
36
|
return s;
|
|
37
37
|
}, A = async () => {
|
|
38
|
-
const t =
|
|
38
|
+
const t = f(i()), s = await Q.create({
|
|
39
39
|
provider: new V(t.endpoint),
|
|
40
40
|
initWasm: !1,
|
|
41
41
|
noInitWarn: !0
|
|
@@ -65,21 +65,21 @@ const oe = (a, e) => {
|
|
|
65
65
|
throw new w("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
66
66
|
context: { error: "Account address has not been set for web3 mode" }
|
|
67
67
|
});
|
|
68
|
-
const m = await A(), S = X(o, e, c), v = await $(m.query.getRandomActiveProvider, m.query)(h, l()), y = z(v.provider.url.toString()), E = new J(
|
|
69
|
-
(await E.submitPowCaptchaSolution(g, x().account.address, l(), v, T))[
|
|
68
|
+
const m = await A(), S = X(o, e, c), v = await $(m.query.getRandomActiveProvider, m.query)(h, l()), y = z(v.provider.url.toString()), E = new J(f(i()), y, l()), g = await E.getPowCaptchaChallenge(h, l()), T = oe(g.challenge, g.difficulty);
|
|
69
|
+
(await E.submitPowCaptchaSolution(g, x().account.address, l(), v, T))[p.verified] && (u({
|
|
70
70
|
isHuman: !0,
|
|
71
71
|
loading: !1
|
|
72
72
|
}), S.onHuman({
|
|
73
73
|
providerUrl: y,
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
74
|
+
[p.user]: x().account.address,
|
|
75
|
+
[p.dapp]: l(),
|
|
76
|
+
[p.challenge]: g.challenge,
|
|
77
|
+
[p.blockNumber]: v.blockNumber
|
|
78
78
|
}));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
}, le = (a) => {
|
|
82
|
-
const e = a.config, o = e.theme === "light" ? "light" : "dark", c = a.config.theme === "light" ? F : B, d = a.callbacks || {}, [r, i] = te(b.useState, b.useRef),
|
|
82
|
+
const e = a.config, o = e.theme === "light" ? "light" : "dark", c = a.config.theme === "light" ? F : B, d = a.callbacks || {}, [r, i] = te(b.useState, b.useRef), f = D(r, i), A = re(e, r, f, d);
|
|
83
83
|
return n("div", { children: n("div", { style: { maxWidth: "100%", maxHeight: "100%", overflowX: "auto" }, children: n(W, { children: n(_, { children: C("div", { style: k, "data-cy": "button-human", children: [" ", C("div", { style: {
|
|
84
84
|
padding: P,
|
|
85
85
|
border: R,
|