@prosopo/procaptcha-bundle 2.2.3 → 2.3.2
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/index.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js +2 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +2 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +1 -1
- package/dist/bundle/{Checkbox-DM6n1-r-.js → Checkbox-gp52EwUq.js} +140 -187
- package/dist/bundle/{ProcaptchaWidget-DZb9vegH.js → ProcaptchaWidget-BvScmKhX.js} +211 -208
- package/dist/bundle/{ProcaptchaWidget-CrcxpJLK.js → ProcaptchaWidget-D2i13eeY.js} +50 -47
- package/dist/bundle/Signer-DP9drQ55.js +23 -0
- package/dist/bundle/asU8a-BcA17eDA.js +9 -0
- package/dist/bundle/bip39-_F7Z5vIE.js +259 -0
- package/dist/bundle/fp.esm-C0kLYOiJ.js +1637 -0
- package/dist/bundle/hash-C7-gVTqE.js +1083 -0
- package/dist/bundle/index-BH5dKH-o.js +79 -0
- package/dist/bundle/index-BYd5PSRY.js +17233 -0
- package/dist/bundle/index-BdsUZjbH.js +6520 -0
- package/dist/bundle/index-DlBTo0Xd.js +1190 -0
- package/dist/bundle/index-QVME9Prx.js +32 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/procaptcha.bundle.js +2 -2
- package/dist/bundle/sha256-Bcj1GDss.js +171 -0
- package/dist/bundle/spread-DEmVz7RJ.js +15 -0
- package/dist/bundle/util/config.d.ts +1 -1
- package/dist/bundle/util/config.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/util/config.d.ts +1 -1
- package/dist/util/config.d.ts.map +1 -1
- package/dist/util/config.js +2 -1
- package/dist/util/config.js.map +1 -1
- package/package.json +9 -9
- package/stats.html +1 -1
- package/dist/bundle/index-B27PXNfK.js +0 -28199
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { o as u } from "./spread-DEmVz7RJ.js";
|
|
2
|
+
function b(t) {
|
|
3
|
+
return new Promise((e) => {
|
|
4
|
+
document.readyState === "complete" ? e(t()) : window.addEventListener("load", () => e(t()));
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
const c = window;
|
|
8
|
+
c.injectedWeb3 = c.injectedWeb3 || {};
|
|
9
|
+
a();
|
|
10
|
+
let s = null;
|
|
11
|
+
function a() {
|
|
12
|
+
return Object.values(c.injectedWeb3).filter(({ connect: t, enable: e }) => !!(t || e)).length !== 0;
|
|
13
|
+
}
|
|
14
|
+
function d(t) {
|
|
15
|
+
return Promise.all(Object.entries(c.injectedWeb3).map(([e, { connect: i, enable: n, version: o }]) => Promise.resolve().then(() => i ? i(t) : n ? n(t).then((r) => u({ name: e, version: o || "unknown" }, r)) : Promise.reject(new Error("No connect(..) or enable(...) hook found"))).catch(({ message: r }) => {
|
|
16
|
+
console.error(`Error initializing ${e}: ${r}`);
|
|
17
|
+
}))).then((e) => e.filter((i) => !!i));
|
|
18
|
+
}
|
|
19
|
+
function h(t, e = []) {
|
|
20
|
+
if (!t)
|
|
21
|
+
throw new Error("You must pass a name for your app to the web3Enable function");
|
|
22
|
+
const i = e.length ? Promise.all(e.map((n) => n().catch(() => !1))) : Promise.resolve([!0]);
|
|
23
|
+
return s = b(() => i.then(() => d(t).then((n) => n.map((o) => (o.accounts.subscribe || (o.accounts.subscribe = (r) => (o.accounts.get().then(r).catch(console.error), () => {
|
|
24
|
+
})), o))).catch(() => []).then((n) => {
|
|
25
|
+
const o = n.map(({ name: r, version: l }) => `${r}/${l}`);
|
|
26
|
+
return a(), `${n.length}`, n.length, `${o.join(", ")}`, n;
|
|
27
|
+
}))), s;
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
h as web3Enable,
|
|
31
|
+
s as web3EnablePromise
|
|
32
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AA0C9D,eAAO,MAAM,MAAM,YACT,OAAO,iBACD,uBAAuB,SAOtC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAQ3C;AAGD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,EAAE;YACX,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,KAAK,EAAE,OAAO,KAAK,CAAC;SACpB,CAAC;KACF;CACD;AA2BD,eAAO,MAAM,KAAK,YAOjB,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { H as B, a as w, e as H, t as y, o as U, w as C, r as a } from "./hash-C7-gVTqE.js";
|
|
2
|
+
function m(x, t, n, s) {
|
|
3
|
+
if (typeof x.setBigUint64 == "function")
|
|
4
|
+
return x.setBigUint64(t, n, s);
|
|
5
|
+
const i = BigInt(32), f = BigInt(4294967295), e = Number(n >> i & f), h = Number(n & f), o = s ? 4 : 0, r = s ? 0 : 4;
|
|
6
|
+
x.setUint32(t + o, e, s), x.setUint32(t + r, h, s);
|
|
7
|
+
}
|
|
8
|
+
const _ = (x, t, n) => x & t ^ ~x & n, L = (x, t, n) => x & t ^ x & n ^ t & n;
|
|
9
|
+
class D extends B {
|
|
10
|
+
constructor(t, n, s, i) {
|
|
11
|
+
super(), this.blockLen = t, this.outputLen = n, this.padOffset = s, this.isLE = i, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = w(this.buffer);
|
|
12
|
+
}
|
|
13
|
+
update(t) {
|
|
14
|
+
H(this);
|
|
15
|
+
const { view: n, buffer: s, blockLen: i } = this;
|
|
16
|
+
t = y(t);
|
|
17
|
+
const f = t.length;
|
|
18
|
+
for (let e = 0; e < f; ) {
|
|
19
|
+
const h = Math.min(i - this.pos, f - e);
|
|
20
|
+
if (h === i) {
|
|
21
|
+
const o = w(t);
|
|
22
|
+
for (; i <= f - e; e += i)
|
|
23
|
+
this.process(o, e);
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
s.set(t.subarray(e, e + h), this.pos), this.pos += h, e += h, this.pos === i && (this.process(n, 0), this.pos = 0);
|
|
27
|
+
}
|
|
28
|
+
return this.length += t.length, this.roundClean(), this;
|
|
29
|
+
}
|
|
30
|
+
digestInto(t) {
|
|
31
|
+
H(this), U(t, this), this.finished = !0;
|
|
32
|
+
const { buffer: n, view: s, blockLen: i, isLE: f } = this;
|
|
33
|
+
let { pos: e } = this;
|
|
34
|
+
n[e++] = 128, this.buffer.subarray(e).fill(0), this.padOffset > i - e && (this.process(s, 0), e = 0);
|
|
35
|
+
for (let c = e; c < i; c++)
|
|
36
|
+
n[c] = 0;
|
|
37
|
+
m(s, i - 8, BigInt(this.length * 8), f), this.process(s, 0);
|
|
38
|
+
const h = w(t), o = this.outputLen;
|
|
39
|
+
if (o % 4)
|
|
40
|
+
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
41
|
+
const r = o / 4, b = this.get();
|
|
42
|
+
if (r > b.length)
|
|
43
|
+
throw new Error("_sha2: outputLen bigger than state");
|
|
44
|
+
for (let c = 0; c < r; c++)
|
|
45
|
+
h.setUint32(4 * c, b[c], f);
|
|
46
|
+
}
|
|
47
|
+
digest() {
|
|
48
|
+
const { buffer: t, outputLen: n } = this;
|
|
49
|
+
this.digestInto(t);
|
|
50
|
+
const s = t.slice(0, n);
|
|
51
|
+
return this.destroy(), s;
|
|
52
|
+
}
|
|
53
|
+
_cloneInto(t) {
|
|
54
|
+
t || (t = new this.constructor()), t.set(...this.get());
|
|
55
|
+
const { blockLen: n, buffer: s, length: i, finished: f, destroyed: e, pos: h } = this;
|
|
56
|
+
return t.length = i, t.pos = h, t.finished = f, t.destroyed = e, i % n && t.buffer.set(s), t;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const I = /* @__PURE__ */ new Uint32Array([
|
|
60
|
+
1116352408,
|
|
61
|
+
1899447441,
|
|
62
|
+
3049323471,
|
|
63
|
+
3921009573,
|
|
64
|
+
961987163,
|
|
65
|
+
1508970993,
|
|
66
|
+
2453635748,
|
|
67
|
+
2870763221,
|
|
68
|
+
3624381080,
|
|
69
|
+
310598401,
|
|
70
|
+
607225278,
|
|
71
|
+
1426881987,
|
|
72
|
+
1925078388,
|
|
73
|
+
2162078206,
|
|
74
|
+
2614888103,
|
|
75
|
+
3248222580,
|
|
76
|
+
3835390401,
|
|
77
|
+
4022224774,
|
|
78
|
+
264347078,
|
|
79
|
+
604807628,
|
|
80
|
+
770255983,
|
|
81
|
+
1249150122,
|
|
82
|
+
1555081692,
|
|
83
|
+
1996064986,
|
|
84
|
+
2554220882,
|
|
85
|
+
2821834349,
|
|
86
|
+
2952996808,
|
|
87
|
+
3210313671,
|
|
88
|
+
3336571891,
|
|
89
|
+
3584528711,
|
|
90
|
+
113926993,
|
|
91
|
+
338241895,
|
|
92
|
+
666307205,
|
|
93
|
+
773529912,
|
|
94
|
+
1294757372,
|
|
95
|
+
1396182291,
|
|
96
|
+
1695183700,
|
|
97
|
+
1986661051,
|
|
98
|
+
2177026350,
|
|
99
|
+
2456956037,
|
|
100
|
+
2730485921,
|
|
101
|
+
2820302411,
|
|
102
|
+
3259730800,
|
|
103
|
+
3345764771,
|
|
104
|
+
3516065817,
|
|
105
|
+
3600352804,
|
|
106
|
+
4094571909,
|
|
107
|
+
275423344,
|
|
108
|
+
430227734,
|
|
109
|
+
506948616,
|
|
110
|
+
659060556,
|
|
111
|
+
883997877,
|
|
112
|
+
958139571,
|
|
113
|
+
1322822218,
|
|
114
|
+
1537002063,
|
|
115
|
+
1747873779,
|
|
116
|
+
1955562222,
|
|
117
|
+
2024104815,
|
|
118
|
+
2227730452,
|
|
119
|
+
2361852424,
|
|
120
|
+
2428436474,
|
|
121
|
+
2756734187,
|
|
122
|
+
3204031479,
|
|
123
|
+
3329325298
|
|
124
|
+
]), u = /* @__PURE__ */ new Uint32Array([
|
|
125
|
+
1779033703,
|
|
126
|
+
3144134277,
|
|
127
|
+
1013904242,
|
|
128
|
+
2773480762,
|
|
129
|
+
1359893119,
|
|
130
|
+
2600822924,
|
|
131
|
+
528734635,
|
|
132
|
+
1541459225
|
|
133
|
+
]), d = /* @__PURE__ */ new Uint32Array(64);
|
|
134
|
+
class E extends D {
|
|
135
|
+
constructor() {
|
|
136
|
+
super(64, 32, 8, !1), this.A = u[0] | 0, this.B = u[1] | 0, this.C = u[2] | 0, this.D = u[3] | 0, this.E = u[4] | 0, this.F = u[5] | 0, this.G = u[6] | 0, this.H = u[7] | 0;
|
|
137
|
+
}
|
|
138
|
+
get() {
|
|
139
|
+
const { A: t, B: n, C: s, D: i, E: f, F: e, G: h, H: o } = this;
|
|
140
|
+
return [t, n, s, i, f, e, h, o];
|
|
141
|
+
}
|
|
142
|
+
// prettier-ignore
|
|
143
|
+
set(t, n, s, i, f, e, h, o) {
|
|
144
|
+
this.A = t | 0, this.B = n | 0, this.C = s | 0, this.D = i | 0, this.E = f | 0, this.F = e | 0, this.G = h | 0, this.H = o | 0;
|
|
145
|
+
}
|
|
146
|
+
process(t, n) {
|
|
147
|
+
for (let c = 0; c < 16; c++, n += 4)
|
|
148
|
+
d[c] = t.getUint32(n, !1);
|
|
149
|
+
for (let c = 16; c < 64; c++) {
|
|
150
|
+
const p = d[c - 15], l = d[c - 2], A = a(p, 7) ^ a(p, 18) ^ p >>> 3, g = a(l, 17) ^ a(l, 19) ^ l >>> 10;
|
|
151
|
+
d[c] = g + d[c - 7] + A + d[c - 16] | 0;
|
|
152
|
+
}
|
|
153
|
+
let { A: s, B: i, C: f, D: e, E: h, F: o, G: r, H: b } = this;
|
|
154
|
+
for (let c = 0; c < 64; c++) {
|
|
155
|
+
const p = a(h, 6) ^ a(h, 11) ^ a(h, 25), l = b + p + _(h, o, r) + I[c] + d[c] | 0, g = (a(s, 2) ^ a(s, 13) ^ a(s, 22)) + L(s, i, f) | 0;
|
|
156
|
+
b = r, r = o, o = h, h = e + l | 0, e = f, f = i, i = s, s = l + g | 0;
|
|
157
|
+
}
|
|
158
|
+
s = s + this.A | 0, i = i + this.B | 0, f = f + this.C | 0, e = e + this.D | 0, h = h + this.E | 0, o = o + this.F | 0, r = r + this.G | 0, b = b + this.H | 0, this.set(s, i, f, e, h, o, r, b);
|
|
159
|
+
}
|
|
160
|
+
roundClean() {
|
|
161
|
+
d.fill(0);
|
|
162
|
+
}
|
|
163
|
+
destroy() {
|
|
164
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const G = /* @__PURE__ */ C(() => new E());
|
|
168
|
+
export {
|
|
169
|
+
D as H,
|
|
170
|
+
G as s
|
|
171
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function c(n, ...o) {
|
|
2
|
+
for (let t = 0, f = o.length; t < f; t++) {
|
|
3
|
+
const e = o[t];
|
|
4
|
+
if (e)
|
|
5
|
+
if (typeof e.entries == "function")
|
|
6
|
+
for (const [i, r] of e.entries())
|
|
7
|
+
n[i] = r;
|
|
8
|
+
else
|
|
9
|
+
Object.assign(n, e);
|
|
10
|
+
}
|
|
11
|
+
return n;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
c as o
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ProcaptchaClientConfigOutput } from "@prosopo/types";
|
|
2
|
-
export declare const getConfig: (siteKey?: string) => ProcaptchaClientConfigOutput;
|
|
2
|
+
export declare const getConfig: (siteKey?: string, web2?: boolean) => ProcaptchaClientConfigOutput;
|
|
3
3
|
export declare const getProcaptchaScript: (name: string) => HTMLScriptElement | null;
|
|
4
4
|
export declare const extractParams: (name: string) => {
|
|
5
5
|
onloadUrlCallback: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/util/config.ts"],"names":[],"mappings":"AAaA,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/util/config.ts"],"names":[],"mappings":"AAaA,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,SAAS,aACX,MAAM,qBAEd,4BAkBF,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,MAAM,6BACoB,CAAC;AAErE,eAAO,MAAM,aAAa,SAAU,MAAM;;;CAWzC,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AA0C9D,eAAO,MAAM,MAAM,YACT,OAAO,iBACD,uBAAuB,SAOtC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAQ3C;AAGD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,EAAE;YACX,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,KAAK,EAAE,OAAO,KAAK,CAAC;SACpB,CAAC;KACF;CACD;AA2BD,eAAO,MAAM,KAAK,YAOjB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,13 @@ const implicitRender = () => {
|
|
|
9
9
|
const elements = Array.from(document.getElementsByClassName("procaptcha"));
|
|
10
10
|
if (elements.length) {
|
|
11
11
|
const siteKey = at(elements, 0).getAttribute("data-sitekey");
|
|
12
|
+
const web3 = at(elements, 0).getAttribute("data-web3");
|
|
12
13
|
if (!siteKey) {
|
|
13
14
|
console.error("No siteKey found");
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
16
17
|
const captchaType = getCaptchaType(elements);
|
|
17
|
-
const root = renderLogic(elements, getConfig(siteKey), {
|
|
18
|
+
const root = renderLogic(elements, getConfig(siteKey, !(web3 === "true")), {
|
|
18
19
|
captchaType,
|
|
19
20
|
siteKey,
|
|
20
21
|
});
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACN,aAAa,EACb,S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opo/types";
|
|
2
|
-
export declare const getConfig: (siteKey?: string) => ProcaptchaClientConfigOutput;
|
|
2
|
+
export declare const getConfig: (siteKey?: string, web2?: boolean) => ProcaptchaClientConfigOutput;
|
|
3
3
|
export declare const getProcaptchaScript: (name: string) => HTMLScriptElement | null;
|
|
4
4
|
export declare const extractParams: (name: string) => {
|
|
5
5
|
onloadUrlCallback: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/util/config.ts"],"names":[],"mappings":"AAaA,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/util/config.ts"],"names":[],"mappings":"AAaA,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,SAAS,aACX,MAAM,qBAEd,4BAkBF,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,MAAM,6BACoB,CAAC;AAErE,eAAO,MAAM,aAAa,SAAU,MAAM;;;CAWzC,CAAC"}
|
package/dist/util/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnvironmentTypesSchema, ProcaptchaConfigSchema, } from "@prosopo/types";
|
|
2
|
-
export const getConfig = (siteKey) => {
|
|
2
|
+
export const getConfig = (siteKey, web2 = true) => {
|
|
3
3
|
if (!siteKey) {
|
|
4
4
|
siteKey = process.env.PROSOPO_SITE_KEY || "";
|
|
5
5
|
}
|
|
@@ -14,6 +14,7 @@ export const getConfig = (siteKey) => {
|
|
|
14
14
|
serverUrl: process.env.PROSOPO_SERVER_URL || "",
|
|
15
15
|
mongoAtlasUri: process.env.PROSOPO_MONGO_EVENTS_URI || "",
|
|
16
16
|
devOnlyWatchEvents: process.env._DEV_ONLY_WATCH_EVENTS === "true" || false,
|
|
17
|
+
web2,
|
|
17
18
|
});
|
|
18
19
|
};
|
|
19
20
|
export const getProcaptchaScript = (name) => document.querySelector(`script[src*="${name}"]`);
|
package/dist/util/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/util/config.ts"],"names":[],"mappings":"AAaA,OAAO,EACN,sBAAsB,EAEtB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/util/config.ts"],"names":[],"mappings":"AAaA,OAAO,EACN,sBAAsB,EAEtB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,SAAS,GAAG,CACxB,OAAgB,EAChB,IAAI,GAAG,IAAI,EACoB,EAAE;IACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO,sBAAsB,CAAC,KAAK,CAAC;QACnC,kBAAkB,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B;YAC1D,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;YACvE,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,WAAW;QAC1C,kBAAkB,EAAE,EAAE;QACtB,OAAO,EAAE;YACR,OAAO,EAAE,OAAO;SAChB;QACD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE;QAC/C,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,EAAE;QACzD,kBAAkB,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,MAAM,IAAI,KAAK;QAC1E,IAAI;KACJ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,EAAE,CACnD,QAAQ,CAAC,aAAa,CAAoB,gBAAgB,IAAI,IAAI,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAE;IAC7C,MAAM,MAAM,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACpD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7D,OAAO;YACN,iBAAiB,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,SAAS;YACpD,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,SAAS;SACjD,CAAC;IACH,CAAC;IAED,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,CAAC;AACpE,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-bundle",
|
|
3
|
-
"version": "2.2
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
},
|
|
30
30
|
"browserslist": ["> 0.5%, last 2 versions, not dead"],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@prosopo/dotenv": "2.2
|
|
33
|
-
"@prosopo/locale": "2.2
|
|
34
|
-
"@prosopo/procaptcha-frictionless": "2.2
|
|
35
|
-
"@prosopo/procaptcha-pow": "2.2
|
|
36
|
-
"@prosopo/procaptcha-react": "2.2
|
|
37
|
-
"@prosopo/types": "2.2
|
|
38
|
-
"@prosopo/util": "2.2
|
|
32
|
+
"@prosopo/dotenv": "2.3.2",
|
|
33
|
+
"@prosopo/locale": "2.3.2",
|
|
34
|
+
"@prosopo/procaptcha-frictionless": "2.3.2",
|
|
35
|
+
"@prosopo/procaptcha-pow": "2.3.2",
|
|
36
|
+
"@prosopo/procaptcha-react": "2.3.2",
|
|
37
|
+
"@prosopo/types": "2.3.2",
|
|
38
|
+
"@prosopo/util": "2.3.2",
|
|
39
39
|
"express": "4.21.1",
|
|
40
40
|
"react": "18.3.1",
|
|
41
41
|
"react-dom": "18.3.1"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"registry": "https://registry.npmjs.org"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@prosopo/config": "2.2
|
|
56
|
+
"@prosopo/config": "2.3.2",
|
|
57
57
|
"@types/jsdom": "21.1.7",
|
|
58
58
|
"@vitest/coverage-v8": "2.1.1",
|
|
59
59
|
"concurrently": "9.0.1",
|