@prosopo/procaptcha-bundle 2.5.5 → 2.6.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/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +5 -0
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +1 -0
- package/CHANGELOG.md +40 -0
- package/dist/bundle/{ProcaptchaWidget-CCSN3Dxj.js → ProcaptchaWidget---OaFVSu.js} +7 -7
- package/dist/bundle/ProcaptchaWidget-DfzlzDL_.js +360 -0
- package/dist/bundle/{asU8a-CAsEnbuP.js → asU8a-OYI2Rcme.js} +1 -1
- package/dist/bundle/bip39-CaW9jcCq.js +365 -0
- package/dist/bundle/captchaComponentProvider-CJMWWGqv.js +1242 -0
- package/dist/bundle/{captchaRenderer-BBodRhQu.js → captchaRenderer-BmSy0ym0.js} +3 -3
- package/dist/bundle/{emotion-element-5486c51c.browser.esm-CQHFV-dS.js → emotion-element-5486c51c.browser.esm-F-LKH1Q7.js} +287 -285
- package/dist/bundle/{hash-D-64Vz5z.js → hash-COecnuJ8.js} +796 -483
- package/dist/bundle/{i18nFrontend-C_RgmvGh.js → i18nFrontend-CsPT71ro.js} +1 -1
- package/dist/bundle/index-BjRdPnnE.js +1198 -0
- package/dist/bundle/{index-9I1Aae33.js → index-C30GRfJ0.js} +1 -1
- package/dist/bundle/{index-DkQ4njKa.js → index-D-5CyFkP.js} +7 -7
- package/dist/bundle/{index-DxswvPTy.js → index-DXEN8xWW.js} +170 -180
- package/dist/bundle/index-DcOF3IPl.js +4386 -0
- package/dist/bundle/locales/ar/translation.json +56 -0
- package/dist/bundle/locales/az/translation.json +56 -0
- package/dist/bundle/locales/cs/translation.json +56 -0
- package/dist/bundle/locales/el/translation.json +56 -0
- package/dist/bundle/locales/fi/translation.json +56 -0
- package/dist/bundle/locales/fr/translation.json +1 -1
- package/dist/bundle/locales/hi/translation.json +56 -0
- package/dist/bundle/locales/hu/translation.json +56 -0
- package/dist/bundle/locales/id/translation.json +56 -0
- package/dist/bundle/locales/ja/translation.json +56 -0
- package/dist/bundle/locales/jv/translation.json +56 -0
- package/dist/bundle/locales/ko/translation.json +56 -0
- package/dist/bundle/locales/ml/translation.json +56 -0
- package/dist/bundle/locales/ms/translation.json +56 -0
- package/dist/bundle/locales/nl/translation.json +56 -0
- package/dist/bundle/locales/no/translation.json +56 -0
- package/dist/bundle/locales/pl/translation.json +56 -0
- package/dist/bundle/locales/{pt-BR → pt-br}/translation.json +17 -17
- package/dist/bundle/locales/ro/translation.json +56 -0
- package/dist/bundle/locales/ru/translation.json +56 -0
- package/dist/bundle/locales/sr/translation.json +56 -0
- package/dist/bundle/locales/sv/translation.json +56 -0
- package/dist/bundle/locales/th/translation.json +56 -0
- package/dist/bundle/locales/tr/translation.json +56 -0
- package/dist/bundle/locales/uk/translation.json +56 -0
- package/dist/bundle/locales/vi/translation.json +56 -0
- package/dist/bundle/locales/zh-cn/translation.json +56 -0
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/toU8a-C68WUzs_.js +24 -0
- package/dist/bundle/{translations-B0P9axY3.js → translations-DEL070wJ.js} +59 -26
- package/dist/bundle/{useTranslation-CEt2t9kE.js → useTranslation-DpuHI3Mv.js} +3 -3
- package/dist/bundle/util/configCreator.d.ts +2 -2
- package/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/dist/cjs/index.cjs +163 -0
- package/dist/cjs/util/captcha/captchaComponentProvider.cjs +19 -0
- package/dist/cjs/util/captcha/captchaComponentsList.cjs +12 -0
- package/dist/cjs/util/captcha/captchaRenderer.cjs +65 -0
- package/dist/cjs/util/captcha/captchaType.cjs +12 -0
- package/dist/cjs/util/captcha/components/frictionlessCaptcha.cjs +24 -0
- package/dist/cjs/util/captcha/components/imageCaptcha.cjs +17 -0
- package/dist/cjs/util/captcha/components/powCaptcha.cjs +17 -0
- package/dist/cjs/util/config.cjs +16 -0
- package/dist/cjs/util/configCreator.cjs +23 -0
- package/dist/cjs/util/language.cjs +18 -0
- package/dist/cjs/util/timeout.cjs +14 -0
- package/dist/cjs/util/widgetFactory.cjs +84 -0
- package/dist/cjs/util/widgetThemeResolver.cjs +16 -0
- package/dist/util/configCreator.d.ts +2 -2
- package/dist/util/configCreator.d.ts.map +1 -1
- package/dist/util/configCreator.js.map +1 -1
- package/dist/util/language.js.map +1 -1
- package/package.json +16 -13
- package/stats.html +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +0 -5
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +0 -1
- package/dist/bundle/ProcaptchaWidget-Dfex8hc8.js +0 -156
- package/dist/bundle/bip39-DCaMcFzo.js +0 -260
- package/dist/bundle/captchaComponentProvider-Dm44AMrY.js +0 -1018
- package/dist/bundle/index-DCHEbWAs.js +0 -1242
- package/dist/bundle/index-nNwZuute.js +0 -4373
- package/dist/bundle/sha256-Cxc9Hrlx.js +0 -171
- package/dist/bundle/toU8a-BWKf-2UU.js +0 -133
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +0 -0
- /package/.rollup.cache/home/runner/work/{captcha-private/captcha-private → captcha}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +0 -0
|
@@ -9,39 +9,39 @@ function k(e, t, o) {
|
|
|
9
9
|
throw new Error(`Index ${t} smaller than 0`);
|
|
10
10
|
return e[t];
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var p;
|
|
13
13
|
(function(e) {
|
|
14
14
|
e.datasetId = "datasetId", e.user = "user", e.dapp = "dapp", e.provider = "provider", e.blockNumber = "blockNumber", e.requestHash = "requestHash", e.captchas = "captchas", e.commitmentId = "commitmentId", e.proof = "proof", e.dappSignature = "dappSignature", e.dappUserSignature = "dappUserSignature", e.providerUrl = "providerUrl", e.procaptchaResponse = "procaptcha-response", e.verifiedTimeout = "verifiedTimeout", e.maxVerifiedTime = "maxVerifiedTime", e.verified = "verified", e.status = "status", e.challenge = "challenge", e.difficulty = "difficulty", e.nonce = "nonce", e.timeouts = "timeouts", e.token = "token", e.secret = "secret", e.timestamp = "timestamp", e.signature = "signature", e.error = "error", e.siteKey = "siteKey", e.captchaType = "captchaType", e.sessionId = "sessionId", e.settings = "settings", e.domains = "domains", e.frictionlessThreshold = "frictionlessThreshold", e.powDifficulty = "powDifficulty", e.score = "score", e.tier = "tier", e.detectorKey = "detectorKey";
|
|
15
|
-
})(
|
|
15
|
+
})(p || (p = {}));
|
|
16
16
|
var g;
|
|
17
17
|
(function(e) {
|
|
18
18
|
e.image = "image", e.pow = "pow", e.frictionless = "frictionless";
|
|
19
19
|
})(g || (g = {}));
|
|
20
|
-
let
|
|
21
|
-
async function
|
|
20
|
+
let C;
|
|
21
|
+
async function M(e) {
|
|
22
22
|
return new Promise((t, o) => {
|
|
23
23
|
try {
|
|
24
|
-
import("./i18nFrontend-
|
|
25
|
-
|
|
24
|
+
import("./i18nFrontend-CsPT71ro.js").then((n) => n.b).then(({ default: n }) => {
|
|
25
|
+
C || (C = n()), t(C);
|
|
26
26
|
});
|
|
27
|
-
} catch (
|
|
28
|
-
o(
|
|
27
|
+
} catch (n) {
|
|
28
|
+
o(n);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function H(e) {
|
|
33
33
|
const t = e.getRootNode();
|
|
34
34
|
return (t instanceof ShadowRoot ? t.host : e).closest("form");
|
|
35
35
|
}
|
|
36
36
|
const r = () => {
|
|
37
|
-
Array.from(document.getElementsByName(
|
|
37
|
+
Array.from(document.getElementsByName(p.procaptchaResponse)).map((t) => t.remove());
|
|
38
38
|
}, m = (e) => {
|
|
39
39
|
const t = window[e.replace("window.", "")];
|
|
40
40
|
if (typeof t != "function")
|
|
41
41
|
throw new Error(`Callback ${e} is not defined on the window object`);
|
|
42
42
|
return t;
|
|
43
|
-
},
|
|
44
|
-
onHuman: (t) =>
|
|
43
|
+
}, U = (e) => ({
|
|
44
|
+
onHuman: (t) => $(t, e),
|
|
45
45
|
onChallengeExpired: () => {
|
|
46
46
|
r();
|
|
47
47
|
},
|
|
@@ -67,72 +67,72 @@ const r = () => {
|
|
|
67
67
|
onReload: () => {
|
|
68
68
|
}
|
|
69
69
|
}), s = (e, t, o) => {
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
74
|
-
return
|
|
70
|
+
const n = t.getAttribute(`data-${e}`);
|
|
71
|
+
if (n) {
|
|
72
|
+
const a = m(n);
|
|
73
|
+
if (a)
|
|
74
|
+
return a;
|
|
75
75
|
}
|
|
76
76
|
if (typeof o == "function")
|
|
77
77
|
return o;
|
|
78
78
|
if (typeof o == "string")
|
|
79
79
|
return m(o);
|
|
80
80
|
};
|
|
81
|
-
function
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
function F(e, t, o) {
|
|
82
|
+
const n = s("callback", o, e == null ? void 0 : e.callback);
|
|
83
|
+
n && (t.onHuman = (u) => {
|
|
84
|
+
$(u, o), n(u);
|
|
85
85
|
});
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
r(),
|
|
86
|
+
const a = s("chalexpired-callback", o, e == null ? void 0 : e["chalexpired-callback"]);
|
|
87
|
+
a && (t.onChallengeExpired = () => {
|
|
88
|
+
r(), a();
|
|
89
89
|
});
|
|
90
90
|
const c = s("expired-callback", o, e == null ? void 0 : e["expired-callback"]);
|
|
91
91
|
c && (t.onExpired = () => {
|
|
92
92
|
r(), c();
|
|
93
93
|
});
|
|
94
94
|
const i = s("error-callback", o, e == null ? void 0 : e["error-callback"]);
|
|
95
|
-
i && (t.onError = (
|
|
96
|
-
r(), i(
|
|
95
|
+
i && (t.onError = (u) => {
|
|
96
|
+
r(), i(u);
|
|
97
97
|
});
|
|
98
98
|
const l = s("close-callback", o, e == null ? void 0 : e["close-callback"]);
|
|
99
99
|
l && (t.onClose = () => {
|
|
100
100
|
l();
|
|
101
101
|
});
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
v();
|
|
105
|
-
});
|
|
106
|
-
const x = s("failed-callback", o, e == null ? void 0 : e["failed-callback"]);
|
|
107
|
-
x && (t.onFailed = () => {
|
|
102
|
+
const x = s("open-callback", o, e == null ? void 0 : e["open-callback"]);
|
|
103
|
+
x && (t.onOpen = () => {
|
|
108
104
|
x();
|
|
109
105
|
});
|
|
106
|
+
const v = s("failed-callback", o, e == null ? void 0 : e["failed-callback"]);
|
|
107
|
+
v && (t.onFailed = () => {
|
|
108
|
+
v();
|
|
109
|
+
});
|
|
110
110
|
const h = s("reset-callback", o, e == null ? void 0 : e["reset-callback"]);
|
|
111
111
|
h && (t.onReset = () => {
|
|
112
112
|
r(), h();
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const $ = (e, t) => {
|
|
116
116
|
if (r(), t) {
|
|
117
|
-
const o =
|
|
117
|
+
const o = H(t);
|
|
118
118
|
if (!o) {
|
|
119
119
|
console.error("Parent form not found for the element:", t);
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const n = document.createElement("input");
|
|
123
|
+
n.type = "hidden", n.name = p.procaptchaResponse, n.value = e, o.appendChild(n);
|
|
124
124
|
}
|
|
125
|
-
},
|
|
125
|
+
}, G = "https://prosopo.io", I = "Visit prosopo.io to learn more about the service and its accessibility options.", j = 74, _ = 80, z = "80px", T = "302px", B = "8px", K = "2px", q = "1px solid", S = "checkbox__loading-spinner";
|
|
126
126
|
function A(e) {
|
|
127
127
|
const t = document.createElement("div");
|
|
128
|
-
return t.className = "checkbox", t.innerHTML = Y(e) +
|
|
128
|
+
return t.className = "checkbox", t.innerHTML = Y(e) + X, t;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
130
|
+
const V = (e) => (e.shadowRoot || e).querySelector(".checkbox__content"), X = `
|
|
131
131
|
<div class="checkbox__outer">
|
|
132
132
|
<div class="checkbox__wrapper">
|
|
133
133
|
<div class="checkbox__inner">
|
|
134
134
|
<div class="checkbox__content">
|
|
135
|
-
<div class="${
|
|
135
|
+
<div class="${S}" aria-label="Loading spinner"></div>
|
|
136
136
|
</div>
|
|
137
137
|
</div>
|
|
138
138
|
</div>
|
|
@@ -165,7 +165,7 @@ const X = (e) => (e.shadowRoot || e).querySelector(".checkbox__content"), V = `
|
|
|
165
165
|
display: inline-flex;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
.${
|
|
168
|
+
.${S} {
|
|
169
169
|
margin-top: 0;
|
|
170
170
|
margin-left: 15px;
|
|
171
171
|
margin-right: 15px;
|
|
@@ -180,7 +180,7 @@ const X = (e) => (e.shadowRoot || e).querySelector(".checkbox__content"), V = `
|
|
|
180
180
|
will-change: transform;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
@keyframes ${
|
|
183
|
+
@keyframes ${S}-rotation {
|
|
184
184
|
0% {
|
|
185
185
|
transform: rotate(0deg);
|
|
186
186
|
}
|
|
@@ -190,87 +190,75 @@ const X = (e) => (e.shadowRoot || e).querySelector(".checkbox__content"), V = `
|
|
|
190
190
|
}
|
|
191
191
|
</style>
|
|
192
192
|
`;
|
|
193
|
-
function
|
|
193
|
+
function Z(e) {
|
|
194
194
|
const t = document.createElement("div");
|
|
195
|
-
return t.className = "logo", t.innerHTML =
|
|
195
|
+
return t.className = "logo", t.innerHTML = J + Q(e), t;
|
|
196
196
|
}
|
|
197
|
-
const
|
|
197
|
+
const J = `
|
|
198
198
|
<style>
|
|
199
199
|
.logo {
|
|
200
200
|
display: inline-flex;
|
|
201
201
|
flex-direction: column;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
.
|
|
205
|
-
flex
|
|
204
|
+
.prosopo-logo {
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
flex-direction: column; /* ✅ Stack vertically */
|
|
207
|
+
align-items: center; /* ✅ Center horizontally */
|
|
208
|
+
justify-content: center; /* ✅ Optional: center vertically if needed */
|
|
209
|
+
padding: 8px;
|
|
210
|
+
height: auto;
|
|
211
|
+
min-width: max-content;
|
|
212
|
+
gap: 2px; /* ✅ Space between SVG and text */
|
|
206
213
|
}
|
|
207
214
|
|
|
208
|
-
.
|
|
209
|
-
|
|
210
|
-
|
|
215
|
+
.prosopo-logo-text {
|
|
216
|
+
all: unset;
|
|
217
|
+
font-size: 9px !important;
|
|
218
|
+
font-weight: bold !important;
|
|
219
|
+
font-family: Helvetica Neue, Helvetica, Arial, sans-serif !important;
|
|
220
|
+
line-height: 1 !important;
|
|
221
|
+
text-align: center;
|
|
211
222
|
}
|
|
212
223
|
|
|
213
|
-
|
|
214
|
-
|
|
224
|
+
#logo {
|
|
225
|
+
width: 28px;
|
|
226
|
+
height: 28px;
|
|
215
227
|
}
|
|
228
|
+
|
|
216
229
|
</style>
|
|
217
230
|
`;
|
|
218
|
-
function
|
|
231
|
+
function Q(e) {
|
|
219
232
|
return `
|
|
220
|
-
<a href="${
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
<g id="g1960" transform="translate(0,-35.903035)">
|
|
235
|
-
<g id="g943" transform="matrix(0.82220888,0,0,0.82220888,103.56268,35.903035)">
|
|
236
|
-
<path d="m 335.55,1825.19 a 147.75,147.75 0 0 1 147.75,147.75 h 50.5 c 0,-109.49 -88.76,-198.25 -198.25,-198.25 z"
|
|
237
|
-
transform="translate(-215.73,-1774.69)" id="path8"></path>
|
|
238
|
-
<path d="m 269.36,1891.39 a 147.74,147.74 0 0 1 147.74,147.74 h 50.5 c 0,-109.49 -88.75,-198.24 -198.24,-198.24 z"
|
|
239
|
-
transform="translate(-215.73,-1774.69)" id="path10"></path>
|
|
240
|
-
<path d="M 414,2157.17 A 147.75,147.75 0 0 1 266.26,2009.43 h -50.5 c 0,109.49 88.75,198.24 198.24,198.24 z"
|
|
241
|
-
transform="translate(-215.73,-1774.69)" id="path12"></path>
|
|
242
|
-
<path d="M 480.17,2091 A 147.74,147.74 0 0 1 332.43,1943.25 h -50.51 c 0,109.49 88.76,198.25 198.25,198.25 z"
|
|
243
|
-
transform="translate(-215.73,-1774.69)" id="path14"></path>
|
|
233
|
+
<a href="${G}?utm_campaign=widget" tabindex="0" target="_blank" role="button"
|
|
234
|
+
aria-label="${I}"
|
|
235
|
+
style="text-decoration: none;">
|
|
236
|
+
<div class="prosopo-logo">
|
|
237
|
+
<svg id="logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 49.010001 49.009997" style="fill: ${e.palette.logoFill};"
|
|
238
|
+
aria-label="Prosopo Logo With Text">
|
|
239
|
+
<title>${I}</title>
|
|
240
|
+
<g transform="matrix(0.11319331,0,0,0.11319331,6.504999,-2.2052113e-4)">
|
|
241
|
+
<g>
|
|
242
|
+
<path d="m 119.79,50.5 a 147.75,147.75 0 0 1 147.75,147.75 h 50.5 C 318.04,88.76 229.28,0 119.79,0 Z"></path>
|
|
243
|
+
<path d="m 53.6,116.7 a 147.74,147.74 0 0 1 147.74,147.74 h 50.5 C 251.84,154.95 163.09,66.2 53.6,66.2 Z"></path>
|
|
244
|
+
<path d="M 198.24,382.48 A 147.75,147.75 0 0 1 50.5,234.74 H 0 c 0,109.49 88.75,198.24 198.24,198.24 z"></path>
|
|
245
|
+
<path d="M 264.41,316.31 A 147.74,147.74 0 0 1 116.67,168.56 H 66.16 c 0,109.49 88.76,198.25 198.25,198.25 z"></path>
|
|
246
|
+
</g>
|
|
244
247
|
</g>
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<path d="m 210.56895,594.19621 q 0.55346,4.64097 2.38967,6.59249 3.25156,3.4764 12.0204,3.4764 5.14542,0 8.18367,-1.52489 3.03825,-1.52489 3.03537,-4.57755 a 4.9349939,4.9349939 0 0 0 -2.44444,-4.4536 q -2.44732,-1.52201 -18.1949,-5.24632 -11.33723,-2.80476 -15.97243,-7.0191 -4.63521,-4.14805 -4.63809,-11.95987 0,-9.22429 7.24683,-15.83407 7.24683,-6.60978 20.39432,-6.62995 12.47009,0 20.33091,4.97246 7.86082,4.97247 9.01962,17.17736 h -17.39066 q -0.36609,-3.35534 -1.89675,-5.30973 -2.88259,-3.53694 -9.8008,-3.53982 -5.69023,0 -8.10873,1.76991 -2.41849,1.76991 -2.41561,4.15093 c 0,1.99187 0.86478,3.43893 2.57127,4.32388 q 2.56263,1.40959 18.16032,4.82258 10.37732,2.43867 15.5804,7.38231 5.12236,5.00129 5.12524,12.50756 0,9.88728 -7.3679,16.1425 -7.3679,6.25522 -22.77246,6.25522 -15.71299,0 -23.20196,-6.62996 -7.48897,-6.62995 -7.49474,-16.8718 z"
|
|
253
|
-
id="path22" style="stroke-width: 0.288259px;"></path>
|
|
254
|
-
<path d="m 318.29999,607.2947 q -8.42293,10.39462 -25.56858,10.39462 -17.14564,0 -25.56569,-10.39462 -8.41716,-10.39462 -8.42004,-25.02664 0,-14.38413 8.42004,-24.93441 8.42005,-10.55028 25.56569,-10.54739 17.14853,0 25.56858,10.54739 8.42004,10.5474 8.42004,24.93441 0,14.63202 -8.42004,25.02664 z m -13.91427,-9.60479 q 4.0904,-5.42215 4.0904,-15.41609 0,-9.99394 -4.0904,-15.38438 -4.08751,-5.39044 -11.71484,-5.39332 -7.62733,-0.003 -11.74656,5.39332 -4.11633,5.39621 -4.11633,15.38438 0,9.98818 4.11633,15.41609 4.12211,5.42216 11.74656,5.42216 7.62445,0 11.71484,-5.42216 z"
|
|
255
|
-
id="path24" style="stroke-width: 0.288259px;"></path>
|
|
256
|
-
<path d="m 389.56049,556.06243 q 8.14043,8.60165 8.13755,25.26014 0,17.5838 -7.95018,26.78791 -7.95018,9.20411 -20.48369,9.22428 -7.98189,0 -13.25991,-3.96644 -2.88259,-2.19653 -5.64988,-6.408 v 34.66026 h -17.22059 v -92.69833 h 16.65849 v 9.82387 q 2.82206,-4.32388 6.01885,-6.83462 5.83148,-4.44784 13.87967,-4.4536 11.73502,0 19.86969,8.60453 z m -13.34639,12.50756 q -3.54559,-5.91507 -11.49577,-5.91796 -9.55579,0 -13.12731,8.96774 -1.85351,4.75916 -1.85063,12.08382 0,11.59089 6.22063,16.28951 3.69548,2.74711 8.75443,2.74711 7.33619,0 11.19309,-5.61528 3.85691,-5.61529 3.85114,-14.94911 0,-7.68787 -3.54558,-13.60006 z"
|
|
257
|
-
id="path26" style="stroke-width: 0.288259px;"></path>
|
|
258
|
-
<path d="m 463.46721,607.2947 q -8.41716,10.39462 -25.56569,10.39462 -17.14852,0 -25.56569,-10.39462 -8.42292,-10.39462 -8.42004,-25.02664 0,-14.38413 8.42004,-24.93441 8.42005,-10.55028 25.56569,-10.54739 17.14853,0 25.56569,10.54739 8.41716,10.5474 8.42293,24.93441 0,14.63202 -8.42293,25.02664 z m -13.91138,-9.60479 q 4.0904,-5.42215 4.08752,-15.41609 -0.003,-9.99394 -4.08752,-15.38438 -4.08751,-5.39044 -11.71484,-5.39332 -7.62733,-0.003 -11.74656,5.39332 -4.11633,5.39621 -4.11922,15.38438 -0.003,9.98818 4.11922,15.41609 4.12211,5.42216 11.74656,5.42216 7.62445,0 11.71484,-5.42216 z"
|
|
259
|
-
id="path28" style="stroke-width: 0.288259px;"></path>
|
|
260
|
-
</g>
|
|
261
|
-
</g>
|
|
262
|
-
</svg>
|
|
263
|
-
</div>
|
|
264
|
-
</div>
|
|
265
|
-
</a>
|
|
266
|
-
`;
|
|
248
|
+
</svg>
|
|
249
|
+
<span class="prosopo-logo-text" id="logo-text" style="color: ${e.palette.logoFill};">
|
|
250
|
+
Prosopo
|
|
251
|
+
</span>
|
|
252
|
+
</div>
|
|
253
|
+
</a>
|
|
254
|
+
`;
|
|
267
255
|
}
|
|
268
256
|
function P(e) {
|
|
269
|
-
var
|
|
257
|
+
var a, c;
|
|
270
258
|
const t = document.createElement("div");
|
|
271
259
|
t.className = "widget";
|
|
272
|
-
const o = A(e),
|
|
273
|
-
return t.innerHTML = ee(e) + O(oe()), (
|
|
260
|
+
const o = A(e), n = Z(e);
|
|
261
|
+
return t.innerHTML = ee(e) + O(oe()), (a = t.querySelector(".widget__checkbox")) == null || a.replaceWith(o), (c = t.querySelector(".widget__logo")) == null || c.replaceWith(n), t;
|
|
274
262
|
}
|
|
275
263
|
function O(e) {
|
|
276
264
|
return `
|
|
@@ -293,7 +281,7 @@ function ee(e) {
|
|
|
293
281
|
<style>
|
|
294
282
|
.widget {
|
|
295
283
|
width: 100%;
|
|
296
|
-
min-height: ${
|
|
284
|
+
min-height: ${z}
|
|
297
285
|
}
|
|
298
286
|
|
|
299
287
|
.widget__outer {
|
|
@@ -307,36 +295,38 @@ function ee(e) {
|
|
|
307
295
|
|
|
308
296
|
.widget__wrapper {
|
|
309
297
|
container-type: size;
|
|
298
|
+
container-name: widget;
|
|
310
299
|
display: flex;
|
|
311
300
|
flex-direction: column;
|
|
312
|
-
height: ${
|
|
301
|
+
height: ${_}px;
|
|
302
|
+
min-width: 220px;
|
|
313
303
|
}
|
|
314
304
|
|
|
315
305
|
.widget__inner {
|
|
316
306
|
max-height: 100%;
|
|
317
307
|
min-width: 100%;
|
|
318
308
|
overflow: hidden;
|
|
319
|
-
height: ${
|
|
309
|
+
height: ${_}px;
|
|
320
310
|
width: 100%;
|
|
321
311
|
display: grid;
|
|
322
312
|
}
|
|
323
313
|
|
|
324
314
|
.widget__dimensions {
|
|
325
315
|
max-width: ${T};
|
|
326
|
-
min-height: ${
|
|
316
|
+
min-height: ${_}px;
|
|
327
317
|
}
|
|
328
318
|
|
|
329
319
|
.widget__content {
|
|
330
|
-
padding: ${
|
|
331
|
-
border: ${
|
|
320
|
+
padding: ${K};
|
|
321
|
+
border: ${q};
|
|
332
322
|
background-color: ${e.palette.background.default};
|
|
333
323
|
border-color: ${e.palette.grey[300]};
|
|
334
|
-
border-radius: ${
|
|
324
|
+
border-radius: ${B};
|
|
335
325
|
display: flex;
|
|
336
326
|
align-items: center;
|
|
337
327
|
flex-wrap: wrap;
|
|
338
328
|
justify-content: space-between;
|
|
339
|
-
min-height: ${
|
|
329
|
+
min-height: ${j}px;
|
|
340
330
|
overflow: hidden;
|
|
341
331
|
}
|
|
342
332
|
</style>
|
|
@@ -346,16 +336,16 @@ function te() {
|
|
|
346
336
|
var t;
|
|
347
337
|
return typeof process < "u" ? "production" : (t = import.meta.env) == null ? void 0 : t.MODE;
|
|
348
338
|
}
|
|
349
|
-
const oe = () => te() !== "production",
|
|
350
|
-
function
|
|
339
|
+
const oe = () => te() !== "production", ne = 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
|
|
340
|
+
function ae(e, t = "") {
|
|
351
341
|
const o = document.createElement(e);
|
|
352
342
|
ie(o);
|
|
353
|
-
const
|
|
354
|
-
return
|
|
343
|
+
const n = o.attachShadow({ mode: "open" });
|
|
344
|
+
return n.innerHTML = ce(t), o;
|
|
355
345
|
}
|
|
356
346
|
const ce = (e) => `
|
|
357
347
|
<style>
|
|
358
|
-
*{font-family: ${
|
|
348
|
+
*{font-family: ${ne};}
|
|
359
349
|
</style>
|
|
360
350
|
|
|
361
351
|
<style>
|
|
@@ -365,14 +355,14 @@ const ce = (e) => `
|
|
|
365
355
|
e.style.display = "flex", e.style.flexDirection = "column", e.style.width = "100%", e.style.maxWidth = T;
|
|
366
356
|
};
|
|
367
357
|
function re(e, t, o) {
|
|
368
|
-
const
|
|
369
|
-
le(
|
|
370
|
-
const i =
|
|
358
|
+
const n = P(t), a = ae(o);
|
|
359
|
+
le(a).appendChild(n), e.innerHTML = "", e.appendChild(a);
|
|
360
|
+
const i = V(a);
|
|
371
361
|
if (!(i instanceof HTMLElement))
|
|
372
362
|
throw new Error("Fail to initialize widget: interactive area is not found");
|
|
373
363
|
return i;
|
|
374
364
|
}
|
|
375
|
-
const le = (e) => e.shadowRoot || e,
|
|
365
|
+
const le = (e) => e.shadowRoot || e, b = {
|
|
376
366
|
0: "#fff",
|
|
377
367
|
100: "#f5f5f5",
|
|
378
368
|
200: "#eeeeee",
|
|
@@ -383,7 +373,7 @@ const le = (e) => e.shadowRoot || e, y = {
|
|
|
383
373
|
700: "#616161",
|
|
384
374
|
800: "#424242",
|
|
385
375
|
900: "#212121"
|
|
386
|
-
},
|
|
376
|
+
}, y = 10, se = {
|
|
387
377
|
palette: {
|
|
388
378
|
mode: "light",
|
|
389
379
|
primary: {
|
|
@@ -394,16 +384,16 @@ const le = (e) => e.shadowRoot || e, y = {
|
|
|
394
384
|
default: "#fff",
|
|
395
385
|
contrastText: "#000"
|
|
396
386
|
},
|
|
397
|
-
border:
|
|
387
|
+
border: b[400],
|
|
398
388
|
error: {
|
|
399
389
|
main: "#f44336"
|
|
400
390
|
},
|
|
401
391
|
logoFill: "#1d1d1b",
|
|
402
|
-
grey:
|
|
392
|
+
grey: b
|
|
403
393
|
},
|
|
404
394
|
spacing: {
|
|
405
|
-
unit:
|
|
406
|
-
half: Math.floor(
|
|
395
|
+
unit: y,
|
|
396
|
+
half: Math.floor(y / 2)
|
|
407
397
|
},
|
|
408
398
|
font: {
|
|
409
399
|
fontFamily: 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
@@ -420,27 +410,27 @@ const le = (e) => e.shadowRoot || e, y = {
|
|
|
420
410
|
default: "#303030",
|
|
421
411
|
contrastText: "#fff"
|
|
422
412
|
},
|
|
423
|
-
border:
|
|
413
|
+
border: b[300],
|
|
424
414
|
error: {
|
|
425
415
|
main: "#f44336"
|
|
426
416
|
},
|
|
427
417
|
logoFill: "#fff",
|
|
428
|
-
grey:
|
|
418
|
+
grey: b
|
|
429
419
|
},
|
|
430
420
|
spacing: {
|
|
431
|
-
unit:
|
|
432
|
-
half: Math.floor(
|
|
421
|
+
unit: y,
|
|
422
|
+
half: Math.floor(y / 2)
|
|
433
423
|
},
|
|
434
424
|
font: {
|
|
435
425
|
fontFamily: 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
|
|
436
426
|
color: "#fff"
|
|
437
427
|
}
|
|
438
428
|
};
|
|
439
|
-
function
|
|
440
|
-
return Object.values(g).find((
|
|
429
|
+
function W(e) {
|
|
430
|
+
return Object.values(g).find((n) => n === k(e, 0).getAttribute("data-captcha-type")) || "frictionless";
|
|
441
431
|
}
|
|
442
|
-
const
|
|
443
|
-
const t =
|
|
432
|
+
const R = (e) => document.querySelector('script[src*="'.concat(e, '"]')), he = (e) => {
|
|
433
|
+
const t = R(e);
|
|
444
434
|
if (t && t.src.indexOf("".concat(e)) !== -1) {
|
|
445
435
|
const o = new URLSearchParams(t.src.split("?")[1]);
|
|
446
436
|
return {
|
|
@@ -450,7 +440,7 @@ const S = (e) => document.querySelector('script[src*="'.concat(e, '"]')), he = (
|
|
|
450
440
|
}
|
|
451
441
|
return { onloadUrlCallback: void 0, renderExplicit: void 0 };
|
|
452
442
|
};
|
|
453
|
-
class
|
|
443
|
+
class fe {
|
|
454
444
|
constructor(t) {
|
|
455
445
|
this.widgetThemeResolver = t, this.captchaRenderer = null, this._i18n = null;
|
|
456
446
|
}
|
|
@@ -459,13 +449,13 @@ class pe {
|
|
|
459
449
|
throw new Error("I18n is not initialized");
|
|
460
450
|
return this._i18n;
|
|
461
451
|
}
|
|
462
|
-
async createWidgets(t, o,
|
|
452
|
+
async createWidgets(t, o, n = !0, a = !1) {
|
|
463
453
|
return Promise.all(t.map((c) => {
|
|
464
|
-
const i =
|
|
465
|
-
return
|
|
454
|
+
const i = U(c);
|
|
455
|
+
return F(o, i, c), this.createWidget(c, o, i, n, a);
|
|
466
456
|
}));
|
|
467
457
|
}
|
|
468
|
-
async createWidget(t, o,
|
|
458
|
+
async createWidget(t, o, n, a = !0, c = !1) {
|
|
469
459
|
o.theme = this.widgetThemeResolver.resolveWidgetTheme(t, o);
|
|
470
460
|
const i = o.theme === "light" ? se : de;
|
|
471
461
|
let l;
|
|
@@ -479,23 +469,23 @@ class pe {
|
|
|
479
469
|
emotionCacheKey: "procaptcha",
|
|
480
470
|
webComponentTag: "prosopo-procaptcha",
|
|
481
471
|
defaultCaptchaType: g.frictionless
|
|
482
|
-
}, l, o,
|
|
472
|
+
}, l, o, n, a, this.i18n, c);
|
|
483
473
|
}
|
|
484
474
|
async getCaptchaRenderer() {
|
|
485
|
-
return this._i18n === null && (this._i18n = await
|
|
475
|
+
return this._i18n === null && (this._i18n = await M()), this.captchaRenderer === null && (this.captchaRenderer = await this.createCaptchaRenderer()), this.captchaRenderer;
|
|
486
476
|
}
|
|
487
477
|
async createCaptchaRenderer() {
|
|
488
|
-
const t = (await import("./captchaRenderer-
|
|
478
|
+
const t = (await import("./captchaRenderer-BmSy0ym0.js")).CaptchaRenderer, o = (await import("./captchaComponentProvider-CJMWWGqv.js").then((n) => n.h)).CaptchaComponentProvider;
|
|
489
479
|
return new t(new o());
|
|
490
480
|
}
|
|
491
481
|
}
|
|
492
|
-
class
|
|
482
|
+
class ue {
|
|
493
483
|
constructor() {
|
|
494
484
|
this.themesSet = /* @__PURE__ */ new Set(["light", "dark"]), this.defaultTheme = "light";
|
|
495
485
|
}
|
|
496
486
|
resolveWidgetTheme(t, o) {
|
|
497
|
-
const
|
|
498
|
-
return this.validateTheme(
|
|
487
|
+
const n = o.theme || t.getAttribute("data-theme") || this.defaultTheme;
|
|
488
|
+
return this.validateTheme(n);
|
|
499
489
|
}
|
|
500
490
|
validateTheme(t) {
|
|
501
491
|
return this.themesSet.has(t) ? t : this.defaultTheme;
|
|
@@ -503,27 +493,27 @@ class fe {
|
|
|
503
493
|
}
|
|
504
494
|
const E = "procaptcha.bundle.js";
|
|
505
495
|
let d = [];
|
|
506
|
-
const w = new
|
|
496
|
+
const w = new fe(new ue()), pe = "procaptcha:execute", D = async () => {
|
|
507
497
|
const e = Array.from(document.getElementsByClassName("procaptcha")).filter((o) => o.tagName.toLowerCase() !== "button");
|
|
508
498
|
if (e.length) {
|
|
509
|
-
const o = k(e, 0).getAttribute("data-sitekey"),
|
|
499
|
+
const o = k(e, 0).getAttribute("data-sitekey"), n = k(e, 0).getAttribute("data-web3");
|
|
510
500
|
if (!o) {
|
|
511
501
|
console.error("No siteKey found");
|
|
512
502
|
return;
|
|
513
503
|
}
|
|
514
|
-
const
|
|
515
|
-
captchaType:
|
|
504
|
+
const a = W(e), c = await w.createWidgets(e, {
|
|
505
|
+
captchaType: a,
|
|
516
506
|
siteKey: o
|
|
517
|
-
},
|
|
507
|
+
}, n !== "true");
|
|
518
508
|
d.push(...c);
|
|
519
509
|
}
|
|
520
510
|
const t = Array.from(document.getElementsByClassName("procaptcha")).filter((o) => o.tagName.toLowerCase() === "button");
|
|
521
511
|
if (t.length)
|
|
522
512
|
for (const o of t) {
|
|
523
|
-
const
|
|
513
|
+
const n = o.getAttribute("data-sitekey") || "", a = o.getAttribute("data-callback") || "", c = W([o]), i = await w.createWidgets([o], {
|
|
524
514
|
captchaType: c,
|
|
525
|
-
siteKey:
|
|
526
|
-
callback:
|
|
515
|
+
siteKey: n,
|
|
516
|
+
callback: a
|
|
527
517
|
}, !0, !0);
|
|
528
518
|
d.push(...i), o.addEventListener("click", async (l) => {
|
|
529
519
|
l.preventDefault(), L();
|
|
@@ -531,14 +521,14 @@ const w = new pe(new fe()), ue = "procaptcha:execute", W = async () => {
|
|
|
531
521
|
}
|
|
532
522
|
}, ge = async (e, t) => {
|
|
533
523
|
if (Object.prototype.hasOwnProperty.call(t, "size") && t.size === "invisible" || e.tagName.toLowerCase() === "button") {
|
|
534
|
-
const
|
|
535
|
-
d.push(...
|
|
524
|
+
const a = await w.createWidgets([e], t, !0, !0);
|
|
525
|
+
d.push(...a);
|
|
536
526
|
return;
|
|
537
527
|
}
|
|
538
|
-
const
|
|
539
|
-
d.push(...
|
|
528
|
+
const n = await w.createWidgets([e], t);
|
|
529
|
+
d.push(...n);
|
|
540
530
|
};
|
|
541
|
-
function
|
|
531
|
+
function f(e) {
|
|
542
532
|
document && document.readyState !== "loading" ? e() : document.addEventListener("DOMContentLoaded", () => {
|
|
543
533
|
e();
|
|
544
534
|
});
|
|
@@ -550,7 +540,7 @@ const L = () => {
|
|
|
550
540
|
console.error("No Procaptcha containers found for execution");
|
|
551
541
|
return;
|
|
552
542
|
}
|
|
553
|
-
const o = new CustomEvent(
|
|
543
|
+
const o = new CustomEvent(pe, {
|
|
554
544
|
detail: {
|
|
555
545
|
containerId: ((e = t[0]) == null ? void 0 : e.id) || "procaptcha-container",
|
|
556
546
|
containerCount: t.length,
|
|
@@ -564,43 +554,43 @@ const L = () => {
|
|
|
564
554
|
function me() {
|
|
565
555
|
const e = [], t = Array.from(document.querySelectorAll('[data-size="invisible"]'));
|
|
566
556
|
e.push(...t);
|
|
567
|
-
const o = Array.from(document.querySelectorAll('#procaptcha-container, [id$="-procaptcha-container"]')),
|
|
568
|
-
e.push(...
|
|
569
|
-
for (const
|
|
570
|
-
e.includes(
|
|
557
|
+
const o = Array.from(document.querySelectorAll('#procaptcha-container, [id$="-procaptcha-container"]')), n = Array.from(document.getElementsByClassName("p-procaptcha"));
|
|
558
|
+
e.push(...n);
|
|
559
|
+
for (const a of o)
|
|
560
|
+
e.includes(a) || e.push(a);
|
|
571
561
|
return e;
|
|
572
562
|
}
|
|
573
|
-
const
|
|
563
|
+
const N = () => {
|
|
574
564
|
var e, t;
|
|
575
|
-
const { onloadUrlCallback: o, renderExplicit:
|
|
576
|
-
let
|
|
577
|
-
if (
|
|
578
|
-
|
|
579
|
-
}), document.readyState === "complete" && !
|
|
565
|
+
const { onloadUrlCallback: o, renderExplicit: n } = he(E);
|
|
566
|
+
let a = !1;
|
|
567
|
+
if (n !== "explicit" && ((e = R(E)) == null || e.addEventListener("load", () => {
|
|
568
|
+
f(D), a = !0;
|
|
569
|
+
}), document.readyState === "complete" && !a && f(D)), o && ((t = R(E)) == null || t.addEventListener("load", () => {
|
|
580
570
|
const c = m(o);
|
|
581
|
-
|
|
582
|
-
}), document.readyState === "complete" && !
|
|
571
|
+
f(c);
|
|
572
|
+
}), document.readyState === "complete" && !a)) {
|
|
583
573
|
const c = m(o);
|
|
584
|
-
|
|
574
|
+
f(c);
|
|
585
575
|
}
|
|
586
|
-
},
|
|
576
|
+
}, be = () => {
|
|
587
577
|
for (const e of d)
|
|
588
578
|
e.unmount();
|
|
589
|
-
d = [],
|
|
579
|
+
d = [], N();
|
|
590
580
|
};
|
|
591
|
-
window.procaptcha = { ready:
|
|
592
|
-
|
|
581
|
+
window.procaptcha = { ready: f, render: ge, reset: be, execute: L };
|
|
582
|
+
N();
|
|
593
583
|
export {
|
|
594
|
-
|
|
584
|
+
p as A,
|
|
595
585
|
g as C,
|
|
596
|
-
|
|
586
|
+
S as W,
|
|
597
587
|
k as a,
|
|
598
588
|
se as b,
|
|
599
|
-
|
|
589
|
+
f as c,
|
|
600
590
|
de as d,
|
|
601
591
|
L as e,
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
592
|
+
be as f,
|
|
593
|
+
U as g,
|
|
594
|
+
M as l,
|
|
605
595
|
ge as r
|
|
606
596
|
};
|