UNPKG

@mochabug/adapt-web

Version:

Browser client library for Adapt automation platform

447 lines (445 loc) 714 kB
var __MbAdapt_prev = typeof MbAdapt !== 'undefined' ? MbAdapt : undefined; "use strict"; var MbAdapt = (() => { var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __typeError = (msg) => { throw TypeError(msg); }; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __commonJS = (cb, mod) => function __require() { try { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; } catch (e) { throw mod = 0, e; } }; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method); // ../node_modules/@cap.js/widget/cap.min.js var require_cap_min = __commonJS({ "../node_modules/@cap.js/widget/cap.min.js"(exports, module) { (() => { var _e, _t, _i, _s, _r, _n, _a, _o, _l, _c, _h, _d, _u, _p, _g, _v, _b, _w_instances, m_get, f_fn, w_fn, k_fn, y_fn, __fn, E_fn, x_fn, C_fn, A_fn, S_fn, T_get, L_fn, I_fn, P_fn, M_fn, _H, N_fn, $_fn; const e = "vibrate" in navigator && !window.matchMedia("(prefers-reduced-motion: reduce)").matches; if ("undefined" == typeof window) return; const t = ["#f5c2e7", "#cba6f7", "#f38ba8", "#fab387", "#f9e2af", "#a6e3a1", "#94e2d5", "#89dceb", "#b4befe"], i = (e2, i2, s2) => { const r2 = 0 === i2 ? "9999px" : "0", n2 = i2 === s2 - 1 ? "9999px" : "0"; return `color:#1e1e2e;background:${((e3) => { if ("cap" === e3) return "#89b4fa"; let i3 = 0; for (let t2 = 0; t2 < e3.length; t2++) i3 = e3.charCodeAt(t2) + ((i3 << 5) - i3); return t[Math.abs(i3) % t.length]; })(e2)};margin-left:${i2 ? "-6px" : 0};padding:0 6px;border-radius:${r2} ${n2} ${n2} ${r2};font-weight:600`; }, s = {}; for (const e2 of ["debug", "info", "warn", "error"]) s[e2] = (t2, ...s2) => { if (window.CAP_SILENT || "debug" === e2 && !window.CAP_DEBUG) return; const r2 = t2.map((e3) => `%c${e3}`).join(" "), n2 = t2.map((e3, s3) => i(e3, s3, t2.length)); console["debug" === e2 ? "log" : e2](r2, ...n2, ...s2); }; const r = (e2) => e2 ? ["cap", e2] : ["cap"], n = (e2) => `${Math.round(performance.now() - e2)}ms`, a = (e2, t2) => Object.assign(new Error(t2), { code: e2 }), o = (e2, t2 = {}) => window?.CAP_CUSTOM_FETCH ? window.CAP_CUSTOM_FETCH(e2, t2) : fetch(e2, t2), l = (e2, t2) => t2 ? t2.aborted ? Promise.reject(a("aborted", "aborted")) : Promise.race([e2, new Promise((e3, i2) => t2.addEventListener("abort", () => i2(a("aborted", "aborted")), { once: true }))]) : e2, c = "initial-state,verifying-label,solved-label,error-label,required-label,troubleshooting-label,group-aria-label,verify-aria-label,verifying-aria-label,verified-aria-label,error-aria-label".split(","), h = { "zh-cn": "\u786E\u8BA4\u4F60\u662F\u771F\u4EBA/\u6B63\u5728\u9A8C\u8BC1.../\u4F60\u662F\u771F\u4EBA/\u51FA\u9519\u4E86\u3002\u8BF7\u91CD\u8BD5\u3002/\u8BF7\u786E\u8BA4\u4F60\u662F\u771F\u4EBA/\u6545\u969C\u6392\u9664/Cap \u9A8C\u8BC1/\u70B9\u51FB\u4EE5\u786E\u8BA4\u4F60\u662F\u771F\u4EBA/\u6B63\u5728\u9A8C\u8BC1\u4F60\u662F\u771F\u4EBA\uFF0C\u8BF7\u7A0D\u5019/\u6211\u4EEC\u5DF2\u786E\u8BA4\u4F60\u662F\u771F\u4EBA\uFF0C\u4F60\u53EF\u4EE5\u7EE7\u7EED\u4E86/\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5", es: "Verifica que eres humano/Verificando.../Eres humano/Error. Int\xE9ntalo de nuevo./Verifica que eres humano/Solucionar problemas/Verificaci\xF3n de Cap/Haz clic para verificar que eres humano/Verificando que eres humano, espera/Hemos verificado que eres humano, ya puedes continuar/Se produjo un error, int\xE9ntalo de nuevo", hi: "\u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930\u0947\u0902 \u0915\u093F \u0906\u092A \u092E\u093E\u0928\u0935 \u0939\u0948\u0902/\u0938\u0924\u094D\u092F\u093E\u092A\u093F\u0924 \u0939\u094B \u0930\u0939\u093E \u0939\u0948.../\u0906\u092A \u092E\u093E\u0928\u0935 \u0939\u0948\u0902/\u0924\u094D\u0930\u0941\u091F\u093F\u0964 \u092A\u0941\u0928\u0903 \u092A\u094D\u0930\u092F\u093E\u0938 \u0915\u0930\u0947\u0902\u0964/\u0915\u0943\u092A\u092F\u093E \u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930\u0947\u0902 \u0915\u093F \u0906\u092A \u092E\u093E\u0928\u0935 \u0939\u0948\u0902/\u0938\u092E\u0938\u094D\u092F\u093E \u0928\u093F\u0935\u093E\u0930\u0923/Cap \u0938\u0924\u094D\u092F\u093E\u092A\u0928/\u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u0915\u094D\u0932\u093F\u0915 \u0915\u0930\u0947\u0902 \u0915\u093F \u0906\u092A \u092E\u093E\u0928\u0935 \u0939\u0948\u0902/\u0938\u0924\u094D\u092F\u093E\u092A\u093F\u0924 \u0915\u093F\u092F\u093E \u091C\u093E \u0930\u0939\u093E \u0939\u0948 \u0915\u093F \u0906\u092A \u092E\u093E\u0928\u0935 \u0939\u0948\u0902, \u092A\u094D\u0930\u0924\u0940\u0915\u094D\u0937\u093E \u0915\u0930\u0947\u0902/\u0939\u092E\u0928\u0947 \u092A\u0941\u0937\u094D\u091F\u093F \u0915\u0930 \u0926\u0940 \u0939\u0948 \u0915\u093F \u0906\u092A \u092E\u093E\u0928\u0935 \u0939\u0948\u0902, \u0905\u092C \u0906\u092A \u091C\u093E\u0930\u0940 \u0930\u0916 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902/\u090F\u0915 \u0924\u094D\u0930\u0941\u091F\u093F \u0939\u0941\u0908, \u092A\u0941\u0928\u0903 \u092A\u094D\u0930\u092F\u093E\u0938 \u0915\u0930\u0947\u0902", ar: "\u062A\u062D\u0642\u0642 \u0645\u0646 \u0623\u0646\u0643 \u0625\u0646\u0633\u0627\u0646/\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0642\u0642.../\u0623\u0646\u062A \u0625\u0646\u0633\u0627\u0646/\u062E\u0637\u0623. \u062D\u0627\u0648\u0644 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649./\u064A\u0631\u062C\u0649 \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0623\u0646\u0643 \u0625\u0646\u0633\u0627\u0646/\u0627\u0633\u062A\u0643\u0634\u0627\u0641 \u0627\u0644\u0623\u062E\u0637\u0627\u0621 \u0648\u0625\u0635\u0644\u0627\u062D\u0647\u0627/\u062A\u062D\u0642\u0642 Cap/\u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0623\u0646\u0643 \u0625\u0646\u0633\u0627\u0646/\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0623\u0646\u0643 \u0625\u0646\u0633\u0627\u0646\u060C \u064A\u0631\u062C\u0649 \u0627\u0644\u0627\u0646\u062A\u0638\u0627\u0631/\u0644\u0642\u062F \u062A\u062D\u0642\u0642\u0646\u0627 \u0645\u0646 \u0623\u0646\u0643 \u0625\u0646\u0633\u0627\u0646\u060C \u064A\u0645\u0643\u0646\u0643 \u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u0622\u0646/\u062D\u062F\u062B \u062E\u0637\u0623\u060C \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649", pt: "Sou humano/Verificando.../Voc\xEA \xE9 humano/Erro. Tente novamente./Verifique que voc\xEA \xE9 humano/Solu\xE7\xE3o de problemas/Verifica\xE7\xE3o Cap/Clique para verificar que voc\xEA \xE9 humano/Verificando que voc\xEA \xE9 humano, aguarde/Verificamos que voc\xEA \xE9 humano, voc\xEA pode continuar/Ocorreu um erro, tente novamente", ru: "\u042F \u0447\u0435\u043B\u043E\u0432\u0435\u043A/\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430.../\u0412\u044B \u0447\u0435\u043B\u043E\u0432\u0435\u043A/\u041E\u0448\u0438\u0431\u043A\u0430. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435./\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043E \u0432\u044B \u0447\u0435\u043B\u043E\u0432\u0435\u043A/\u0423\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u0438\u0435 \u043D\u0435\u043F\u043E\u043B\u0430\u0434\u043E\u043A/\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 Cap/\u041D\u0430\u0436\u043C\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C, \u0447\u0442\u043E \u0432\u044B \u0447\u0435\u043B\u043E\u0432\u0435\u043A/\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u043C, \u0447\u0442\u043E \u0432\u044B \u0447\u0435\u043B\u043E\u0432\u0435\u043A, \u043F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435/\u041C\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043B\u0438, \u0447\u0442\u043E \u0432\u044B \u0447\u0435\u043B\u043E\u0432\u0435\u043A, \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C/\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430, \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443", ja: "\u79C1\u306F\u4EBA\u9593\u3067\u3059/\u78BA\u8A8D\u4E2D.../\u3042\u306A\u305F\u306F\u4EBA\u9593\u3067\u3059/\u30A8\u30E9\u30FC\u3002\u518D\u8A66\u884C\u3092\u3002/\u3042\u306A\u305F\u304C\u4EBA\u9593\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044/\u30C8\u30E9\u30D6\u30EB\u30B7\u30E5\u30FC\u30C6\u30A3\u30F3\u30B0/Cap \u8A8D\u8A3C/\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u4EBA\u9593\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D/\u3042\u306A\u305F\u304C\u4EBA\u9593\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u3059\u3002\u304A\u5F85\u3061\u304F\u3060\u3055\u3044/\u3042\u306A\u305F\u304C\u4EBA\u9593\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u307E\u3057\u305F\u3002\u7D9A\u884C\u3067\u304D\u307E\u3059/\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044", de: "Ich bin ein Mensch/Wird \xFCberpr\xFCft.../Sie sind ein Mensch/Fehler. Erneut versuchen./Bitte best\xE4tigen Sie, dass Sie ein Mensch sind/Fehlerbehebung/Cap-Verifizierung/Klicken, um zu best\xE4tigen, dass Sie ein Mensch sind/\xDCberpr\xFCfung, ob Sie ein Mensch sind, bitte warten/Wir haben best\xE4tigt, dass Sie ein Mensch sind, Sie k\xF6nnen fortfahren/Ein Fehler ist aufgetreten, bitte erneut versuchen", fr: "Je suis humain/V\xE9rification.../Vous \xEAtes humain/Erreur. R\xE9essayez./Veuillez v\xE9rifier que vous \xEAtes humain/D\xE9pannage/V\xE9rification Cap/Cliquez pour v\xE9rifier que vous \xEAtes humain/V\xE9rification que vous \xEAtes humain, veuillez patienter/Nous avons v\xE9rifi\xE9 que vous \xEAtes humain, vous pouvez continuer/Une erreur s'est produite, veuillez r\xE9essayer" }; function d(e2, t2) { let i2 = (function(e3) { let t3 = 2166136261; for (let i3 = 0; i3 < e3.length; i3++) t3 ^= e3.charCodeAt(i3), t3 += (t3 << 1) + (t3 << 4) + (t3 << 7) + (t3 << 8) + (t3 << 24); return t3 >>> 0; })(e2), s2 = ""; function r2() { return i2 ^= i2 << 13, i2 ^= i2 >>> 17, i2 ^= i2 << 5, i2 >>> 0; } for (; s2.length < t2; ) { s2 += r2().toString(16).padStart(8, "0"); } return s2.substring(0, t2); } let u = null; async function p(e2) { const t2 = ((e3) => { const t3 = atob(e3), i3 = new Uint8Array(t3.length); for (let e4 = 0; e4 < t3.length; e4++) i3[e4] = t3.charCodeAt(e4); return i3; })(e2), i2 = new TextDecoder().decode(await (async function(e3) { if ("undefined" != typeof DecompressionStream) try { const t3 = new DecompressionStream("deflate-raw"), i3 = t3.writable.getWriter(), s2 = t3.readable.getReader(); i3.write(e3).then(() => i3.close()).catch(() => { }); const r2 = []; for (; ; ) { const { done: e4, value: t4 } = await s2.read(); if (e4) break; r2.push(t4); } let n2 = 0; for (const e4 of r2) n2 += e4.length; const a2 = new Uint8Array(n2); let o2 = 0; for (const e4 of r2) a2.set(e4, o2), o2 += e4.length; return a2; } catch { } return u || (u = new Promise((e4, t3) => { const i3 = window.CAP_PAKO_URL || "https://cdn.jsdelivr.net/npm/pako@2.1.0/dist/pako_inflate.min.js"; s.debug(r("instr"), "DecompressionStream unavailable, loading pako from", i3); const n2 = document.createElement("script"); n2.src = i3; const a2 = window.CAP_SCRIPT_NONCE || window.CAP_CSS_NONCE; a2 && n2.setAttribute("nonce", a2), n2.onload = () => { window.pako?.inflateRaw ? e4(window.pako) : t3(new Error("pako loaded but inflateRaw is missing")); }, n2.onerror = () => { u = null, t3(new Error(`failed to load pako fallback from ${i3}`)); }, document.head.appendChild(n2); })), (await u).inflateRaw(e3); })(t2)); return new Promise((e3) => { var t3 = setTimeout(() => { n2(), e3({ __timeout: true }); }, 2e4), s2 = document.createElement("iframe"); s2.setAttribute("sandbox", "allow-scripts"), s2.setAttribute("aria-hidden", "true"), s2.style.cssText = "position:absolute;width:1px;height:1px;top:-9999px;left:-9999px;border:none;opacity:0;pointer-events:none;"; var r2 = false; function n2() { r2 || (r2 = true, clearTimeout(t3), window.removeEventListener("message", a2), s2.parentNode && s2.parentNode.removeChild(s2)); } function a2(t4) { if (s2.contentWindow && t4.source === s2.contentWindow) { var i3 = t4.data; i3 && "object" == typeof i3 && ("cap:instr" === i3.type ? (n2(), i3.blocked ? e3({ __blocked: true, blockReason: i3.blockReason || "automated_browser" }) : i3.result ? e3(i3.result) : e3({ __timeout: true })) : "cap:error" === i3.type && (n2(), e3({ __timeout: true }))); } } window.addEventListener("message", a2); const o2 = window.CAP_SCRIPT_NONCE || window.CAP_CSS_NONCE, l2 = o2 ? ` nonce="${String(o2).replace(/"/g, "&quot;")}"` : ""; s2.srcdoc = '<!DOCTYPE html><html><head><meta charset="UTF-8"></head><body><script' + l2 + ">" + i2 + "\n<\/script></body></html>", document.body.appendChild(s2); }); } let g = null; const v = () => { if (g) return g; const e2 = window.CAP_CUSTOM_WASM_URL || "https://cdn.jsdelivr.net/npm/@cap.js/wasm@0.0.7/browser/cap_wasm_bg.wasm", t2 = performance.now(); return s.debug(r("wasm"), "fetching", e2), g = fetch(e2).then((e3) => { if (!e3.ok) throw new Error(`Failed to fetch wasm: ${e3.status}`); return e3.arrayBuffer(); }).then((e3) => WebAssembly.compile(e3)).then((e3) => (s.debug(r("wasm"), `ready in ${n(t2)}`), e3)).catch((e3) => { throw g = null, s.warn(r("wasm"), `load failed (${n(t2)}):`, e3.message || e3), e3; }), g; }; "object" == typeof WebAssembly && "function" == typeof WebAssembly.compile && v().catch(() => { }); let b = null; function m() { return b || (b = URL.createObjectURL(new Blob(['(()=>{const e=(e,...t)=>{self.CAP_SILENT||console[e]("[cap worker]",...t)},t=async({salt:t,target:n})=>{let s=0;const r=new TextEncoder,o=4*n.length,a=Math.floor(o/8),l=o%8,i=n.length%2==0?n:`${n}0`,c=i.length/2,f=new Uint8Array(c);for(let e=0;e<c;e++)f[e]=parseInt(i.substring(2*e,2*e+2),16);const g=l>0?255<<8-l&255:0;for(;;)try{for(let e=0;e<5e4;e++){const e=t+s,n=r.encode(e),o=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(o);let c=!0;for(let e=0;e<a;e++)if(i[e]!==f[e]){c=!1;break}if(c&&l>0&&(i[a]&g)!==(f[a]&g)&&(c=!1),c)return void self.postMessage({nonce:s,found:!0});s++}}catch(t){return e("error","fallback solver crashed:",t.message||t),void self.postMessage({found:!1,error:t.message})}},n=e=>{const t=BigInt("0x"+e.N);let n=BigInt("0x"+e.x);const s=0|e.t,r=Math.max(64,Math.floor(s/50)),o=performance.now();for(let e=0;e<s;e+=r){const o=Math.min(s,e+r);for(let s=e;s<o;s++)n=n*n%t;o<s&&self.postMessage({progress:o/s})}self.postMessage({found:!0,y:n.toString(16),durationMs:(performance.now()-o).toFixed(2)})};if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly?.instantiate)return e("warn","WebAssembly unavailable, using JS fallback solver (significantly slower)"),void(self.onmessage=async({data:e})=>"rsw"===e?.kind?n(e):t({salt:e.salt,target:e.target}));let s=null;self.onmessage=async({data:r})=>{if("rsw"===r?.kind)return n(r);const{salt:o,target:a,wasmModule:l}=r;if(l instanceof WebAssembly.Module&&null===s){const n=(t=>{try{let e,n=0,r=null;const o=()=>(null!==r&&0!==r.byteLength||(r=new Uint8Array(e.memory.buffer)),r),a=new TextEncoder,l=(e,t,s)=>{if(void 0===s){const s=a.encode(e),r=t(s.length,1)>>>0;return o().subarray(r,r+s.length).set(s),n=s.length,r}let r=e.length,l=t(r,1)>>>0;const i=o();let c=0;for(;c<r;c++){const t=e.charCodeAt(c);if(t>127)break;i[l+c]=t}if(c!==r){0!==c&&(e=e.slice(c));const t=c+3*e.length;l=s(l,r,t,1)>>>0,r=t;const n=o().subarray(l+c,l+r),{written:i}=a.encodeInto(e,n);c+=i,l=s(l,r,c,1)>>>0}return n=c,l},i={wbg:{}};i.wbg.__wbindgen_init_externref_table=()=>{const t=e.__wbindgen_export_0,n=t.grow(4);t.set(0,void 0),t.set(n+0,void 0),t.set(n+1,null),t.set(n+2,!0),t.set(n+3,!1)};const c=new WebAssembly.Instance(t,i);return e=c.exports,e.__wbindgen_start&&e.__wbindgen_start(),s=(t,s)=>{const r=l(t,e.__wbindgen_malloc,e.__wbindgen_realloc),o=n,a=l(s,e.__wbindgen_malloc,e.__wbindgen_realloc),i=n;return BigInt.asUintN(64,e.solve_pow(r,o,a,i))},!0}catch(t){return e("error","wasm init failed:",t.message||t),!1}})(l);if(!n)return e("warn","wasm init failed, falling back to JS solver"),t({salt:o,target:a})}if(null===s)return e("warn","no wasm module provided, falling back to JS solver"),t({salt:o,target:a});try{const e=performance.now(),t=s(o,a),n=performance.now();self.postMessage({nonce:Number(t),found:!0,durationMs:(n-e).toFixed(2)})}catch(t){e("error","solve_pow threw:",t.message||t),self.postMessage({found:!1,error:t.message||String(t)})}},self.onerror=e=>{self.postMessage({found:!1,error:e})}})();'], { type: "application/javascript" })), b); } class f { constructor(e2) { this._size = e2, this._workers = [], this._idle = [], this._queue = [], this._wasmModule = null, this._spawnFailures = 0; } setWasm(e2) { this._wasmModule = e2; } _spawn() { const e2 = m(), t2 = new Worker(e2); return t2._busy = false, this._workers.push(t2), this._idle.push(t2), t2; } _replaceWorker(e2) { const t2 = this._workers.indexOf(e2); -1 !== t2 && this._workers.splice(t2, 1); const i2 = this._idle.indexOf(e2); -1 !== i2 && this._idle.splice(i2, 1); try { e2.terminate(); } catch { } return this._spawnFailures++, s.warn(r("pool"), `worker died, replacing (attempt ${this._spawnFailures}/3)`), this._spawnFailures > 3 ? (s.error(r("pool"), "worker spawn failed repeatedly, giving up"), null) : this._spawn(); } _ensureSize(e2) { for (; this._workers.length < e2; ) this._spawn(); } run(e2, t2) { return new Promise((i2, s2) => { this._queue.push({ salt: e2, target: t2, resolve: i2, reject: s2 }), this._dispatch(); }); } runMsg(e2, t2) { return new Promise((i2, s2) => { this._queue.push({ msg: e2, onProgress: t2, resolve: i2, reject: s2 }), this._dispatch(); }); } _dispatch() { for (; this._idle.length > 0 && this._queue.length > 0; ) { const e2 = this._idle.shift(), t2 = this._queue.shift(), { resolve: i2, reject: s2 } = t2, r2 = void 0 !== t2.msg; let n2 = false; const a2 = ({ data: l2 }) => { if (!n2) { if (!l2 || "number" != typeof l2.progress || l2.found) n2 = true, e2.removeEventListener("message", a2), e2.removeEventListener("error", o2), this._spawnFailures = 0, this._idle.push(e2), l2.found ? i2(r2 ? l2 : l2.nonce) : s2(new Error(l2.error || "worker failed")), this._dispatch(); else if (t2.onProgress) try { t2.onProgress(l2.progress); } catch { } } }, o2 = (t3) => { if (n2) return; n2 = true, e2.removeEventListener("message", a2), e2.removeEventListener("error", o2); const i3 = this._replaceWorker(e2); s2(t3), i3 && this._dispatch(); }; e2.addEventListener("message", a2), e2.addEventListener("error", o2), r2 ? e2.postMessage(t2.msg) : this._wasmModule ? e2.postMessage({ salt: t2.salt, target: t2.target, wasmModule: this._wasmModule }, []) : e2.postMessage({ salt: t2.salt, target: t2.target }); } } terminate() { for (const e2 of this._workers) try { e2.terminate(); } catch { } this._workers = [], this._idle = [], this._queue = []; } } class w extends HTMLElement { constructor() { super(); __privateAdd(this, _w_instances); __privateAdd(this, _e, null); __privateAdd(this, _t, navigator.hardwareConcurrency || 8); __publicField(this, "token", null); __privateAdd(this, _i); __privateAdd(this, _s); __privateAdd(this, _r); __privateAdd(this, _n); __privateAdd(this, _a); __privateAdd(this, _o); __privateAdd(this, _l, false); __privateAdd(this, _c); __privateAdd(this, _h); __privateAdd(this, _d, null); __privateAdd(this, _u, null); __privateAdd(this, _p, null); __privateAdd(this, _g, null); __privateAdd(this, _v, null); __privateAdd(this, _b, null); __privateAdd(this, _H, () => { if (__privateGet(this, _s)) { try { this.scrollIntoView({ behavior: "smooth", block: "center" }); } catch { this.scrollIntoView(); } __privateGet(this, _s).classList.remove("invalid"), __privateGet(this, _s).offsetWidth, __privateGet(this, _s).classList.add("invalid"), setTimeout(() => __privateGet(this, _s)?.classList.remove("invalid"), 1500); } }); __privateGet(this, _c) && __privateGet(this, _c).forEach((e2, t2) => { this.removeEventListener(t2.slice(2), e2); }), __privateSet(this, _c, /* @__PURE__ */ new Map()), this.boundHandleProgress = this.handleProgress.bind(this), this.boundHandleSolve = this.handleSolve.bind(this), this.boundHandleError = this.handleError.bind(this), this.boundHandleReset = this.handleReset.bind(this); try { __privateSet(this, _h, this.attachInternals()); } catch { } } getI18nText(e2, t2) { return this.getAttribute(`data-cap-i18n-${e2}`) || __privateGet(this, _v)?.[e2] || t2; } static get observedAttributes() { return ["onsolve", "onprogress", "onreset", "onerror", "data-cap-worker-count", "data-cap-i18n-initial-state", "required"]; } initialize() { m(), __privateSet(this, _b, new AbortController()), __privateGet(this, _d) || __privateSet(this, _d, __privateMethod(this, _w_instances, f_fn).call(this)), __privateGet(this, _p) || (__privateSet(this, _p, new f(1)), __privateGet(this, _p)._spawn()); } attributeChangedCallback(e2, t2, i2) { if (e2.startsWith("on")) { const t3 = e2.slice(2), s2 = __privateGet(this, _c).get(e2); if (s2 && this.removeEventListener(t3, s2), i2) { const i3 = (t4) => { const i4 = this.getAttribute(e2); "function" == typeof window[i4] && window[i4].call(this, t4); }; __privateGet(this, _c).set(e2, i3), this.addEventListener(t3, i3); } } "data-cap-worker-count" === e2 && this.setWorkersCount(parseInt(i2, 10)), "data-cap-i18n-initial-state" === e2 && __privateGet(this, _s) && __privateGet(this, _s)?.querySelector(".label.active") && this.animateLabel(this.getI18nText("initial-state", "Verify you're human")), "required" === e2 && __privateMethod(this, _w_instances, M_fn).call(this); } async connectedCallback() { __privateSet(this, _o, this), this.shadowRoot ? __privateSet(this, _i, this.shadowRoot) : __privateSet(this, _i, this.attachShadow({ mode: "open" })), __privateGet(this, _s) || __privateSet(this, _s, document.createElement("div")), __privateMethod(this, _w_instances, P_fn).call(this), this.createUI(), this.addEventListeners(), this.initialize(), __privateGet(this, _r).removeAttribute("disabled"); const e2 = this.getAttribute("data-cap-worker-count"), t2 = e2 ? parseInt(e2, 10) : null; this.setWorkersCount(t2 || navigator.hardwareConcurrency || 8), __privateGet(this, _o).innerHTML = `<input type="hidden" name="${__privateGet(this, _w_instances, T_get)}">`, s.debug(r(), `widget ready (workers=${__privateGet(this, _t)}, haptics=${__privateGet(this, _w_instances, m_get)})`), __privateMethod(this, _w_instances, y_fn).call(this), __privateMethod(this, _w_instances, M_fn).call(this), this.addEventListener("invalid", __privateGet(this, _H)); } async solve() { if (__privateGet(this, _l)) return; __privateMethod(this, _w_instances, $_fn).call(this); const e2 = performance.now(), t2 = __privateGet(this, _b)?.signal; s.debug(r("solve"), "starting"); try { __privateSet(this, _l, true), this.updateUI("verifying", this.getI18nText("verifying-label", "Verifying..."), true), __privateGet(this, _r).setAttribute("aria-label", this.getI18nText("verifying-aria-label", "Verifying you're a human, please wait")), this.dispatchEvent("progress", { progress: 0 }); try { let i2, l2, c2 = this.getAttribute("data-cap-api-endpoint"); if (!c2 && window?.CAP_CUSTOM_FETCH) c2 = "/"; else if (!c2) throw a("missing_endpoint", "Missing API endpoint. Either custom fetch or an API endpoint must be provided."); if (c2.endsWith("/") || (c2 += "/"), "done" === __privateGet(this, _d).state && __privateGet(this, _d).token && __privateGet(this, _d).tokenExpires && Date.now() < __privateGet(this, _d).tokenExpires) return __privateMethod(this, _w_instances, I_fn).call(this); if ("done" === __privateGet(this, _d).state) i2 = __privateGet(this, _d).results, l2 = __privateGet(this, _d).challengeResp, this.dispatchEvent("progress", { progress: 100 }); else if ("solving" === __privateGet(this, _d).state || "redeeming" === __privateGet(this, _d).state || "fetching" === __privateGet(this, _d).state || "waiting" === __privateGet(this, _d).state) { "waiting" === __privateGet(this, _d).state && (__privateGet(this, _u) && (clearTimeout(__privateGet(this, _u)), __privateSet(this, _u, null)), __privateGet(this, _d).state = "waiting", __privateMethod(this, _w_instances, C_fn).call(this)), __privateGet(this, _d).pendingPromotion = __privateGet(this, _t), __privateGet(this, _d).promoteFn && __privateGet(this, _d).promoteFn(__privateGet(this, _t)); const e3 = setInterval(() => { if (t2?.aborted || !__privateGet(this, _d)) return void clearInterval(e3); const i3 = __privateGet(this, _d).state; if ("done" === i3 || "error" === i3) return void clearInterval(e3); const s2 = __privateGet(this, _d).challenges ? __privateGet(this, _d).challenges.length : 1, r2 = __privateGet(this, _d).completedCount, n2 = "redeeming" === i3 ? 99 : "fetching" === i3 || "waiting" === i3 ? 0 : Math.min(98, Math.round(r2 / s2 * 100)); this.dispatchEvent("progress", { progress: n2 }); }, 150); if (await new Promise((e4) => __privateGet(this, _d).onSettled(e4)), clearInterval(e3), t2?.aborted || !__privateGet(this, _d)) return; if ("idle" === __privateGet(this, _d).state && 2 === __privateGet(this, _d).challengeResp?.format && Array.isArray(__privateGet(this, _d).challengeResp.challenges)) l2 = __privateGet(this, _d).challengeResp, __privateGet(this, _d).challengeResp = null, i2 = await this.solveChallengesV2(l2.challenges, t2); else { if ("done" !== __privateGet(this, _d).state) throw a("solve_failed", "Unable to solve challenge, self-hosted instance likely down. This is not an issue with Cap."); if (__privateGet(this, _d).token && __privateGet(this, _d).tokenExpires && Date.now() < __privateGet(this, _d).tokenExpires) return __privateMethod(this, _w_instances, I_fn).call(this); i2 = __privateGet(this, _d).results, l2 = __privateGet(this, _d).challengeResp, this.dispatchEvent("progress", { progress: 100 }); } } else { const e3 = __privateGet(this, _d).challengeResp; if (2 === e3?.format && Array.isArray(e3.challenges)) l2 = e3, __privateGet(this, _d).challengeResp = null; else { const e4 = await o(`${c2}challenge`, { method: "POST", signal: t2 }); try { l2 = await e4.json(); } catch { throw a("challenge_parse_error", "Failed to parse challenge response from server"); } if (l2.error) throw a("network_error", l2.error); } if (2 === l2.format && Array.isArray(l2.challenges)) i2 = await this.solveChallengesV2(l2.challenges, t2); else { const { challenge: e4, token: s2 } = l2; let r2 = e4; if (!Array.isArray(r2)) { let t3 = 0; r2 = Array.from({ length: e4.c }, () => (t3++, [d(`${s2}${t3}`, e4.s), d(`${s2}${t3}d`, e4.d)])); } i2 = await this.solveChallenges(r2, t2); } } const h2 = l2.instrumentation ? p(l2.instrumentation) : Promise.resolve(null), u2 = await h2; if (t2?.aborted || !__privateGet(this, _d)) return; if (u2?.__timeout || u2?.__blocked) { o(`${c2}redeem`, { method: "POST", body: JSON.stringify({ token: l2.token, solutions: i2, ...u2.__blocked && { instr_blocked: true }, ...u2.__timeout && { instr_timeout: true } }), headers: { "Content-Type": "application/json" }, signal: t2 }).catch(() => { }), this.updateUIBlocked(this.getI18nText("error-label", "Error"), u2?.__blocked), __privateGet(this, _r).setAttribute("aria-label", this.getI18nText("error-aria-label", "An error occurred, please try again")); const e3 = u2?.__blocked ? "instr_blocked" : "instr_timeout", n2 = u2?.__blocked ? `Instrumentation blocked (${u2.blockReason || "automated_browser"})` : "Instrumentation timed out"; this.removeEventListener("error", this.boundHandleError); const a2 = new CustomEvent("error", { bubbles: true, composed: true, detail: { isCap: true, code: e3, message: n2 } }); return super.dispatchEvent(a2), this.addEventListener("error", this.boundHandleError), this.executeAttributeCode("onerror", a2), s.error(r("instr"), `[${e3}] ${n2}`), void __privateSet(this, _l, false); } const { token: g2 } = l2, v2 = await o(`${c2}redeem`, { method: "POST", body: JSON.stringify({ token: g2, solutions: i2, ...u2 && { instr: u2 } }), headers: { "Content-Type": "application/json" }, signal: t2 }); let b2; try { b2 = await v2.json(); } catch { throw a("redeem_failed", "Failed to parse server response"); } if (t2?.aborted || !__privateGet(this, _d)) return; if (this.dispatchEvent("progress", { progress: 100 }), !b2.success) throw a("invalid_solution", b2.error || "Invalid solution"); __privateMethod(this, _w_instances, L_fn).call(this, b2.token), this.dispatchEvent("solve", { token: b2.token }), this.token = b2.token, __privateMethod(this, _w_instances, w_fn).call(this), __privateGet(this, _e) && clearTimeout(__privateGet(this, _e)); const m2 = new Date(b2.expires).getTime() - Date.now(); return m2 > 0 && m2 < 864e5 ? __privateSet(this, _e, setTimeout(() => this.reset(), m2)) : this.error("Invalid expiration time", "invalid_expires"), __privateGet(this, _r).setAttribute("aria-label", this.getI18nText("verified-aria-label", "We have verified you're a human, you may now continue")), __privateGet(this, _w_instances, m_get) && navigator.vibrate([10, 50, 20, 30, 40]), s.debug(r("solve"), `verified in ${n(e2)}`), __privateMethod(this, _w_instances, E_fn).call(this), { success: true, token: this.token }; } catch (e3) { if (t2?.aborted || !__privateGet(this, _d)) return; throw __privateGet(this, _r).setAttribute("aria-label", this.getI18nText("error-aria-label", "An error occurred, please try again")), this.error(e3.message, e3.code || "solve_failed"), e3; } } finally { __privateSet(this, _l, false); } } async solveChallengesV2(e2, t2) { const i2 = e2.length; let n2 = 0; const o2 = new Array(e2.length); for (let t3 = 0; t3 < e2.length; t3++) { const i3 = e2[t3]; if (!i3 || "object" != typeof i3 || "sha256-pow" !== i3.protocol && "rsw" !== i3.protocol && "instrumentation" !== i3.protocol) throw a("challenge_unsupported", `unsupported format-2 protocol '${i3?.protocol}'`); } let c2 = null; if ("object" == typeof WebAssembly && "function" == typeof WebAssembly.instantiate) try { c2 = await v(); } catch (e3) { s.warn(r("wasm"), "unavailable, falling back to JS solver:", e3.message || e3); } const h2 = Math.max(1, Math.min(__privateGet(this, _t), e2.length)), d2 = new f(h2); d2.setWasm(c2), d2._ensureSize(h2); const u2 = (e3, t3) => Promise.race([e3, new Promise((e4, i3) => setTimeout(() => i3(new Error(`[cap] ${t3} timed out after 60000ms`)), 6e4))]), g2 = new Array(e2.length).fill(0), b2 = () => { const e3 = g2.reduce((e4, t4) => e4 + t4, 0) + n2, t3 = Math.min(99, Math.round(e3 / i2 * 100)); this.dispatchEvent("progress", { progress: t3 }); }; try { await l(Promise.all(e2.map((e3, t3) => "sha256-pow" === e3.protocol ? u2(d2.run(e3.payload.salt, e3.payload.target), `sha256-pow worker #${t3}`).then((e4) => { o2[t3] = { nonce: Number(e4) }, g2[t3] = 0, n2++, b2(); }) : "rsw" === e3.protocol ? u2(d2.runMsg({ kind: "rsw", N: e3.payload.N, x: e3.payload.x, t: 0 | e3.payload.t }, (e4) => { g2[t3] = e4, b2(); }), `rsw worker #${t3}`).then((e4) => { o2[t3] = { y: e4.y }, g2[t3] = 0, n2++, b2(); }) : p(e3.payload.blob).then((e4) => { o2[t3] = e4?.__timeout ? { timeout: true } : e4?.__blocked ? { blocked: true } : { instr: e4 }, g2[t3] = 0, n2++, b2(); }))), t2); } finally { d2.terminate(); } return o2; } async solveChallenges(e2, t2) { const i2 = e2.length; let n2 = 0; let a2 = null; const o2 = "object" == typeof WebAssembly && "function" == typeof WebAssembly.instantiate; if (o2) try { a2 = await v(); } catch (e3) { s.warn(r("wasm"), "unavailable, falling back to JS solver:", e3.message || e3); } if (!o2 && (s.warn(r("wasm"), "WebAssembly disabled in this browser, solver will be ~10x slower"), !__privateGet(this, _i).querySelector(".warning"))) { const e3 = document.createElement("div"); e3.className = "warning", e3.style.cssText = "width:var(--cap-widget-width,230px);background:rgb(237,56,46);color:white;padding:4px 6px;padding-bottom:calc(var(--cap-border-radius,14px) + 5px);font-size:10px;box-sizing:border-box;font-family:system-ui;border-top-left-radius:8px;border-top-right-radius:8px;text-align:center;user-select:none;margin-bottom:-35.5px;opacity:0;transition:margin-bottom .3s,opacity .3s;", e3.innerText = this.getI18nText("wasm-disabled", "Enable WASM for significantly faster solving"), __privateGet(this, _i).insertBefore(e3, __privateGet(this, _i).firstChild), setTimeout(() => { e3.style.marginBottom = "calc(-1 * var(--cap-border-radius, 14px))", e3.style.opacity = 1; }, 10); } const c2 = new f(__privateGet(this, _t)); c2.setWasm(a2), c2._ensureSize(__privateGet(this, _t)); const h2 = []; try { for (let s2 = 0; s2 < e2.length; s2 += __privateGet(this, _t)) { const r2 = e2.slice(s2, Math.min(s2 + __privateGet(this, _t), e2.length)), a3 = await l(Promise.all(r2.map(([e3, t3]) => c2.run(e3, t3).then((e4) => { n2++; const t4 = Math.min(99, Math.round((0 + n2) / i2 * 100)); return this.dispatchEvent("progress", { progress: t4 }), e4; }))), t2); h2.push(...a3); } } finally { c2.terminate(); } return h2; } setWorkersCount(e2) { const t2 = parseInt(e2, 10), i2 = Math.min(navigator.hardwareConcurrency || 8, 16); __privateSet(this, _t, !Number.isNaN(t2) && t2 > 0 && t2 <= i2 ? t2 : navigator.hardwareConcurrency || 8); } createUI() { __privateGet(this, _s).classList.add("captcha"), __privateGet(this, _s).setAttribute("role", "group"), __privateGet(this, _s).setAttribute("aria-label", this.getI18nText("group-aria-label", "Cap verification")), __privateSet(this, _r, document.createElement("div")), __privateGet(this, _r).className = "captcha-trigger", __privateGet(this, _r).setAttribute("part", "trigger"), __privateGet(this, _r).setAttribute("role", "button"), __privateGet(this, _r).setAttribute("tabindex", "0"), __privateGet(this, _r).setAttribute("aria-label", this.getI18nText("verify-aria-label", "Click to verify you're a human")), __privateGet(this, _r).setAttribute("aria-live", "polite"), __privateGet(this, _r).setAttribute("disabled", "true"), __privateGet(this, _r).innerHTML = `<div class="checkbox" part="checkbox" aria-hidden="true"><svg class="progress-ring" viewBox="0 0 32 32" aria-hidden="true"><circle class="progress-ring-bg" cx="16" cy="16" r="14"></circle><circle class="progress-ring-circle" cx="16" cy="16" r="14"></circle></svg></div><p part="label" class="label-wrapper"><span class="label active">${this.getI18nText("initial-state", "Verify you're human")}</span></p>`, __privateGet(this, _s).appendChild(__privateGet(this, _r)), __privateSet(this, _a, document.createElement("a")), __privateGet(this, _a).className = "cap-troubleshoot-link", __privateGet(this, _a).setAttribute("part", "troubleshoot"), __privateGet(this, _a).setAttribute("target", "_blank"), __privateGet(this, _a).setAttribute("rel", "noopener"), __privateGet(this, _a).hidden = true, __privateGet(this, _s).appendChild(__privateGet(this, _a)), __privateSet(this, _n, document.createElement("a")), __privateGet(this, _n).className = "credits", __privateGet(this, _n).setAttribute("aria-label", "Secured by Cap"), __privateGet(this, _n).setAttribute("href", "https://trycap.dev"), __privateGet(this, _n).setAttribute("target", "_blank"), __privateGet(this, _n).setAttribute("title", "Secured by Cap: The self-hosted CAPTCHA for the modern web."), __privateGet(this, _n).textContent = "Cap", __privateGet(this, _s).appendChild(__privateGet(this, _n)), __privateGet(this, _i).innerHTML = `<style${window.CAP_CSS_NONCE ? ` nonce=${window.CAP_CSS_NONCE}` : ""}>:host{display:inline-block}@media (prefers-reduced-motion:reduce){.captcha,.captcha *{transition:none!important;animation:none!important}.label{filter:none!important;opacity:1!important;transition:none!important;transform:none!important}.label:not(.active),.label.exit{display:none!important}}.captcha,.captcha *{box-sizing:border-box}.captcha{width:var(--cap-widget-width,260px);height:var(--cap-widget-height,58px);background-color:var(--cap-background,#fdfdfd);border:1px solid var(--cap-border-color,#dddddd8f);border-radius:var(--cap-border-radius,14px);-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:#fff0;color:var(--cap-color,#212121);font-family:var(--cap-font,system, -apple-system, "BlinkMacSystemFont", ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", "Ubuntu", "arial", sans-serif);transition:filter .2s,transform .2s,height .2s;display:inline-block;position:relative;overflow:hidden}.captcha.has-troubleshoot{height:calc(var(--cap-widget-height,58px) + 26px)}.captcha.has-troubleshoot .captcha-trigger{inset-block-end:26px}.captcha:not([data-state]):active{transform:scale(.97)}.captcha:hover{filter:brightness(98%)}.captcha-trigger{padding:var(--cap-widget-padding,14px);align-items:center;gap:var(--cap-gap,15px);border-radius:inherit;transition:inset .2s;display:flex;position:absolute;inset:0}.captcha-trigger:focus-visible{outline:2px solid var(--cap-focus-ring,#06c);outline-offset:-3px}.checkbox{width:var(--cap-checkbox-size,25px);height:var(--cap-checkbox-size,25px);border:var(--cap-checkbox-border,1px solid #aaaaaad1);border-radius:var(--cap-checkbox-border-radius,6px);background-color:var(--cap-checkbox-background,#fafafa91);margin-top:var(--cap-checkbox-margin,2px);margin-bottom:var(--cap-checkbox-margin,2px);flex-shrink:0;transition:opacity .2s}.captcha p{-webkit-user-select:none;user-select:none;margin:0;font-size:15px;font-weight:500}.label-wrapper{flex:1;align-items:center;min-width:0;height:2em;display:flex;position:relative;overflow:hidden}.label-wrapper:before,.label-wrapper:after{content:"";pointer-events:none;z-index:1;width:100%;height:.6em;position:absolute;inset-inline-start:0}.label-wrapper:before{background:linear-gradient(to bottom, var(--cap-background,#fdfdfd), transparent);top:0}.label-wrapper:after{background:linear-gradient(to top, var(--cap-background,#fdfdfd), transparent);bottom:0}.label{white-space:nowrap;opacity:0;filter:blur(2px);transition:transform .5s cubic-bezier(.25,1,.5,1),opacity .5s,filter .5s;position:absolute;transform:translateY(100%)}.label.active{opacity:1;filter:none;transform:translateY(0)}.label.exit{opacity:0;filter:blur(2px);transform:translateY(-100%)}.checkbox .progress-ring{width:100%;height:100%;display:none;transform:rotate(-90deg)}.checkbox .progress-ring-bg{fill:none;stroke:var(--cap-spinner-background-color,#eee);stroke-width:var(--cap-spinner-thickness,3)}.checkbox .progress-ring-circle{fill:none;stroke:var(--cap-spinner-color,#000);stroke-width:var(--cap-spinner-thickness,3);stroke-linecap:round;stroke-dasharray:87.96;stroke-dashoffset:87.96px;transition:stroke-dashoffset .3s}.captcha[data-state=verifying] .checkbox{background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;display:flex;transform:scale(1.1)}.captcha[data-state=verifying] .checkbox .progress-ring{display:block}.captcha[data-state=done] .checkbox{background-image:var(--cap-checkmark,url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cstyle%3E%40keyframes%20anim%7B0%25%7Bstroke-dashoffset%3A23.21320343017578px%7Dto%7Bstroke-dashoffset%3A0%7D%7D%3C%2Fstyle%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%2300a67d%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22m5%2012%205%205L20%207%22%20style%3D%22stroke-dashoffset%3A0%3Bstroke-dasharray%3A23.21320343017578px%3Banimation%3Aanim%20.5s%20ease%22%2F%3E%3C%2Fsvg%3E));background-size:cover;border:1px solid #0000}.captcha[data-state=done] .checkbox .progress-ring{display:none}.captcha[data-state=error] .checkbox{background-image:var(--cap-error-cross,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 24 24'%3E%3Cpath fill='%23f55b50' d='M11 15h2v2h-2zm0-8h2v6h-2zm1-5C6.47 2 2 6.5 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18a8 8 0 0 1-8-8a8 8 0 0 1 8-8a8 8 0 0 1 8 8a8 8 0 0 1-8 8'/%3E%3C%2Fsvg%3E"));background-size:cover;border:1px solid #0000}.captcha[data-state=error] .checkbox .progress-ring{display:none}.captcha.invalid{border-color:var(--cap-invalid-border-color,#f55b50);box-shadow:0 0 0 3px var(--cap-invalid-ring-color,#f55b5033);animation:.5s cubic-bezier(.36,.07,.19,.97) cap-shake}@keyframes cap-shake{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-4px)}40%,60%{transform:translate(4px)}}@media (prefers-reduced-motion:reduce){.captcha.invalid{animation:none!important}}.captcha-trigger[disabled]{cursor:not-allowed}.captcha[data-state=verifying] .captcha-trigger{cursor:progress}.captcha[data-state=done] .captcha-trigger{cursor:default}.credits{color:var(--cap-color,#212121);text-underline-offset:.18em;z-index:2;border-radius:4px;justify-content:flex-end;align-items:center;min-width:24px;min-height:24px;padding:4px 6px;text-decoration:underline;text-decoration-thickness:.08em;position:absolute;inset-block-end:4px;inset-inline-end:4px;opacity:.8!important;font-size:12px!important;display:inline-flex!important}.captcha .credits{visibility:visible!important;pointer-events:all!important;display:inline-flex!important}.credits:focus-visible{outline:2px solid var(--cap-focus-ring,#06c);outline-offset:2px;opacity:1!important}.cap-troubleshoot-link{min-width:24px;min-height:24px;color:var(--cap-troubleshoot-color,#0050a0);text-underline-offset:.15em;cursor:pointer;z-index:2;border-radius:4px;align-items:center;padding:4px 6px;font-size:13px;font-weight:500;text-decoration:underline;text-decoration-thickness:.08em;display:inline-flex;position:absolute;inset-block-end:4px;inset-inline-start:14px}.cap-troubleshoot-link[hidden]{display:none}.cap-troubleshoot-link:hover{opacity:.85}.cap-troubleshoot-link:focus-visible{outline:2px solid var(--cap-focus-ring,#06c);outline-offset:2px}@media (forced-colors:active){.captcha,.checkbox{border-color:canvastext}:is(.captcha-trigger:focus-visible,.credits:focus-visible,.cap-troubleshoot-link:focus-visible){outline-color:highlight}.progress-ring-bg{stroke:graytext}.progress-ring-circle{stroke:canvastext}.captcha.invalid{box-shadow:none;border-color:mark}.credits{opacity:1!important}}</style>`, __privateGet(this, _i).appendChild(__privateGet(this, _s)), __privateMethod(this, _w_instances, $_fn).call(this), setTimeout(() => __privateMethod(this, _w_instances, $_fn).call(this), 100);