@prosopo/client-bundle-example 2.7.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/assets/{ProcaptchaWidget-3gKvjeiH.js → ProcaptchaWidget-DrBDhP6X.js} +7 -7
  3. package/dist/assets/{ProcaptchaWidget-D6-M7iAv.js → ProcaptchaWidget-rAM-9Rap.js} +4 -4
  4. package/dist/assets/{asU8a-DCECA0Qe.js → asU8a-CJdNkNEq.js} +1 -1
  5. package/dist/assets/{bip39-BQoZog_M.js → bip39-Du2cANEV.js} +2 -2
  6. package/dist/assets/captcha-BhkVCEXM.css +1 -0
  7. package/dist/assets/{captchaComponentProvider-BW2eXmc3.js → captchaComponentProvider-DmV1WTrT.js} +4 -4
  8. package/dist/assets/{captchaRenderer-B_MgGzr9.js → captchaRenderer-RIsSZXCC.js} +2 -2
  9. package/dist/assets/{emotion-element-5486c51c.browser.esm-CCAJ8JId.js → emotion-element-5486c51c.browser.esm-C3u8NMUC.js} +127 -125
  10. package/dist/assets/frictionless-explicit-C_AXK63E.js +1 -0
  11. package/dist/assets/frictionless-implicit-Dq_sNGRK.js +1 -0
  12. package/dist/assets/{hash-BR0YLxPF.js → hash-_rWungeW.js} +1 -1
  13. package/dist/assets/image-explicit-DQvfVB7-.js +4 -0
  14. package/dist/assets/image-implicit-Bwa9QJO5.js +1 -0
  15. package/dist/assets/{index-WqEmiYQ_.js → index-BVr9fC_3.js} +4 -4
  16. package/dist/assets/{index-BYUYvvuq.js → index-Cu5oL_7b.js} +4 -4
  17. package/dist/assets/index-Dpt_5E72.js +1 -0
  18. package/dist/assets/{index-BCjHZ8o6.js → index-DxIFpl6U.js} +1 -1
  19. package/dist/assets/{index-2or4-1WF.js → index-Wgw2GQWq.js} +2 -2
  20. package/dist/assets/invisible-frictionless-explicit-DugBtRe4.js +4 -0
  21. package/dist/assets/invisible-frictionless-implicit-DYYos8W9.js +1 -0
  22. package/dist/assets/invisible-image-explicit-C5Z4gSb1.js +4 -0
  23. package/dist/assets/invisible-image-implicit-DfNFNlFj.js +1 -0
  24. package/dist/assets/invisible-pow-explicit-DjqGWFUb.js +4 -0
  25. package/dist/assets/invisible-pow-implicit-BRXL14FH.js +4 -0
  26. package/dist/assets/pow-explicit-BexxbnHM.js +4 -0
  27. package/dist/assets/pow-implicit-Dpt_5E72.js +1 -0
  28. package/dist/assets/procaptcha.bundle.js +1 -1
  29. package/dist/assets/{useTranslation-BPbGzrhj.js → useTranslation-CJplXtqb.js} +1 -1
  30. package/dist/frictionless-explicit.html +875 -0
  31. package/dist/frictionless-implicit.html +874 -0
  32. package/dist/image-explicit.html +877 -0
  33. package/dist/index.html +575 -74
  34. package/dist/invisible-frictionless-explicit.html +626 -283
  35. package/dist/invisible-frictionless-implicit.html +631 -173
  36. package/dist/invisible-image-explicit.html +627 -284
  37. package/dist/invisible-image-implicit.html +631 -173
  38. package/dist/invisible-pow-explicit.html +627 -284
  39. package/dist/invisible-pow-implicit.html +629 -177
  40. package/dist/plugins/explanation-injector.ts +250 -0
  41. package/dist/plugins/form-filler-injector.ts +233 -0
  42. package/dist/plugins/navigation-injector.ts +237 -89
  43. package/dist/plugins/status-log-injector.ts +199 -0
  44. package/dist/pow-explicit.html +877 -0
  45. package/dist/pow-implicit.html +881 -0
  46. package/package.json +1 -1
  47. package/vite.config.ts +32 -3
  48. package/dist/assets/frictionless-ZgzyuneX.js +0 -1
  49. package/dist/assets/index-BWsu-rGU.js +0 -1
  50. package/dist/assets/invisible-frictionless-explicit-DgCaJtPg.js +0 -1
  51. package/dist/assets/invisible-image-explicit-DgCaJtPg.js +0 -1
  52. package/dist/assets/invisible-pow-explicit-DgCaJtPg.js +0 -1
  53. package/dist/assets/pow-BW3QYcgP.js +0 -1
  54. package/dist/frictionless.html +0 -343
  55. package/dist/pow.html +0 -323
  56. /package/dist/assets/{modulepreload-polyfill-B5Qt9EMX.js → captcha-ByKnSsbG.js} +0 -0
@@ -0,0 +1 @@
1
+ import"./captcha-ByKnSsbG.js";import{render as d}from"http://localhost:9269/procaptcha.bundle.js";window.addEventListener("load",()=>{updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info"),window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(r=>n({status:o.status,ok:o.ok,json:r})))).then(async({status:o,json:n,ok:r})=>{console.log("status",o,"json",n.message,"ok",r),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})};const c=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),c.disconnect();break}}})});c.observe(document.body,{childList:!0,subtree:!0})});function l(c){console.log("Challenge passed"),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${c.substring(0,15)}...`,"success")}const p=document.getElementById("procaptcha-container");window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const u=d(p,{siteKey:"undefined",captchaType:"frictionless",callback:l,"failed-callback":function(){console.log("Challenge failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")}});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+u,"info");
@@ -1,7 +1,7 @@
1
1
  var gn = Object.defineProperty;
2
2
  var qn = (n, t, e) => t in n ? gn(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
3
  var h = (n, t, e) => qn(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { n as Bn } from "./emotion-element-5486c51c.browser.esm-CCAJ8JId.js";
4
+ import { n as Bn } from "./emotion-element-5486c51c.browser.esm-C3u8NMUC.js";
5
5
  import { e as xn, x as Q, s as hn } from "./toU8a-C68WUzs_.js";
6
6
  const kn = "";
7
7
  function Jn(n, t) {
@@ -0,0 +1,4 @@
1
+ import"./captcha-ByKnSsbG.js";import{render as o}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function d(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function s(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
+ - Name: ${a}<br>
3
+ - Email: ${e}<br>
4
+ - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function l(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"image",callback:s,"failed-callback":l});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),d()&&window.updateCaptchaStatus("Waiting for CAPTCHA verification","info")})});
@@ -0,0 +1 @@
1
+ import"./captcha-ByKnSsbG.js";import"./index-Dpt_5E72.js";
@@ -2,12 +2,12 @@ var Bo = Object.defineProperty;
2
2
  var Ao = (t, e, r) => e in t ? Bo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var jt = (t, e, r) => Ao(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import { x as mi, s as re } from "./toU8a-C68WUzs_.js";
5
- import { b as Pr, B as Q, c as ye, d as te, u as C, R as So, e as Io, f as se, g as oe, j as Jt, r as gi, k as ko, l as Ct, i as Vt, s as Uo, m as I0, n as No, o as Ro, p as Oo, q as To, t as Lo, v as qo, x as $o, y as Po, z as Zo, A as Do, C as Ho, D as Co, E as k0, H as Vo, F as Le, G as Pe, I as On, J as zo, K as Tn, L as Yo, M as Qr, N as Xo, O as Ko, P as Wo, Q as jo, S as Go, T as Jo, U as Qo, V as Fo, W as ts, X as es, Y as rs, Z as ns, _ as is, $ as os, a0 as ss, a1 as fs, a2 as as, a3 as cs, a4 as G, a5 as hs } from "./hash-BR0YLxPF.js";
5
+ import { b as Pr, B as Q, c as ye, d as te, u as C, R as So, e as Io, f as se, g as oe, j as Jt, r as gi, k as ko, l as Ct, i as Vt, s as Uo, m as I0, n as No, o as Ro, p as Oo, q as To, t as Lo, v as qo, x as $o, y as Po, z as Zo, A as Do, C as Ho, D as Co, E as k0, H as Vo, F as Le, G as Pe, I as On, J as zo, K as Tn, L as Yo, M as Qr, N as Xo, O as Ko, P as Wo, Q as jo, S as Go, T as Jo, U as Qo, V as Fo, W as ts, X as es, Y as rs, Z as ns, _ as is, $ as os, a0 as ss, a1 as fs, a2 as as, a3 as cs, a4 as G, a5 as hs } from "./hash-_rWungeW.js";
6
6
  import { g as ls } from "./_commonjsHelpers-DaMA6jEr.js";
7
- import { h as pi, s as Fr, a as us, b as ds, c as ws, m as ms, v as gs, d as Ln, p as ps, e as yi } from "./bip39-BQoZog_M.js";
8
- import { a as vi } from "./asU8a-DCECA0Qe.js";
7
+ import { h as pi, s as Fr, a as us, b as ds, c as ws, m as ms, v as gs, d as Ln, p as ps, e as yi } from "./bip39-Du2cANEV.js";
8
+ import { a as vi } from "./asU8a-CJdNkNEq.js";
9
9
  import { o as tn } from "./spread-DEmVz7RJ.js";
10
- import { n as xe } from "./emotion-element-5486c51c.browser.esm-CCAJ8JId.js";
10
+ import { n as xe } from "./emotion-element-5486c51c.browser.esm-C3u8NMUC.js";
11
11
  const ys = { name: "@polkadot/util", path: import.meta && import.meta.url ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf("/") + 1) : "auto", type: "esm", version: "12.6.2" }, vs = "POLKADOTJS_DISABLE_ESM_CJS_WARNING";
12
12
  function xs(t) {
13
13
  const e = mi;
@@ -1,7 +1,7 @@
1
- import { n as g } from "./emotion-element-5486c51c.browser.esm-CCAJ8JId.js";
2
- import { w as m, i as f, a as l } from "./hash-BR0YLxPF.js";
1
+ import { n as g } from "./emotion-element-5486c51c.browser.esm-C3u8NMUC.js";
2
+ import { w as m, i as f, a as l } from "./hash-_rWungeW.js";
3
3
  import { s as E } from "./toU8a-C68WUzs_.js";
4
- import { b as i } from "./captchaComponentProvider-BW2eXmc3.js";
4
+ import { b as i } from "./captchaComponentProvider-DmV1WTrT.js";
5
5
  const b = "dev";
6
6
  class y {
7
7
  }
@@ -12,7 +12,7 @@ function x() {
12
12
  return !0;
13
13
  }).catch(() => !1);
14
14
  }
15
- const h = async () => (await import("./fp.esm-DYWeNGcH.js")).default, N = async () => (await (await (await h()).load()).get()).visitorId, T = async () => (await import("./Signer-DP9drQ55.js")).default, O = async () => (await import("./index-WqEmiYQ_.js")).Keyring, A = async () => (await import("./bip39-BQoZog_M.js").then((r) => r.f)).entropyToMnemonic;
15
+ const h = async () => (await import("./fp.esm-DYWeNGcH.js")).default, N = async () => (await (await (await h()).load()).get()).visitorId, T = async () => (await import("./Signer-DP9drQ55.js")).default, O = async () => (await import("./index-BVr9fC_3.js")).Keyring, A = async () => (await import("./bip39-Du2cANEV.js").then((r) => r.f)).entropyToMnemonic;
16
16
  class W extends y {
17
17
  async getAccount(e) {
18
18
  const t = await this.createAccount(e), n = await this.createExtension(t);
@@ -0,0 +1 @@
1
+ import"./captcha-ByKnSsbG.js";window.addEventListener("load",()=>{window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=r=>{console.log("Challenge passed"),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")};document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
@@ -1,5 +1,5 @@
1
1
  import { g as Dc } from "./_commonjsHelpers-DaMA6jEr.js";
2
- import { r as _a } from "./emotion-element-5486c51c.browser.esm-CCAJ8JId.js";
2
+ import { r as _a } from "./emotion-element-5486c51c.browser.esm-C3u8NMUC.js";
3
3
  var Co = { exports: {} }, ve = {}, xo = { exports: {} }, _o = {};
4
4
  (function(e) {
5
5
  function t(C, z) {
@@ -11,7 +11,7 @@ function k(e, t, o) {
11
11
  }
12
12
  var p;
13
13
  (function(e) {
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";
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", e.ip = "ip";
15
15
  })(p || (p = {}));
16
16
  var g;
17
17
  (function(e) {
@@ -475,7 +475,7 @@ class fe {
475
475
  return this._i18n === null && (this._i18n = await M()), this.captchaRenderer === null && (this.captchaRenderer = await this.createCaptchaRenderer()), this.captchaRenderer;
476
476
  }
477
477
  async createCaptchaRenderer() {
478
- const t = (await import("./captchaRenderer-B_MgGzr9.js")).CaptchaRenderer, o = (await import("./captchaComponentProvider-BW2eXmc3.js").then((n) => n.h)).CaptchaComponentProvider;
478
+ const t = (await import("./captchaRenderer-RIsSZXCC.js")).CaptchaRenderer, o = (await import("./captchaComponentProvider-DmV1WTrT.js").then((n) => n.h)).CaptchaComponentProvider;
479
479
  return new t(new o());
480
480
  }
481
481
  }
@@ -0,0 +1,4 @@
1
+ import"./captcha-ByKnSsbG.js";import{render as i,execute as o}from"http://localhost:9269/procaptcha.bundle.js";function l(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function d(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
+ - Name: ${a}<br>
3
+ - Email: ${e}<br>
4
+ - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function s(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=i(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"frictionless",callback:d,"failed-callback":s,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),l()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),o())})});
@@ -0,0 +1 @@
1
+ import"./captcha-ByKnSsbG.js";window.onCaptchaFailed=function(){updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=function(s){updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${s.substring(0,15)}...`,"success")};window.onActionHandler=function(s){if(updateCaptchaStatus("CAPTCHA callback executed with token","success"),!s){updateCaptchaStatus("Error: No token received from CAPTCHA","error"),alert("Must complete captcha");return}updateCaptchaStatus("Form submission initiated with valid CAPTCHA token","info");const o={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":s},a=new URL("signup",void 0).href;console.log("Posting to",a,"with payload",o),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),contentType:"application/json"}).then(e=>new Promise(t=>e.json().then(n=>t({status:e.status,ok:e.ok,json:n})))).then(async({status:e,json:t,ok:n})=>{console.log("Response status:",e,"message:",t.message,"ok:",n),console.log("Full response:",t);try{e!==200?(window.setIsError(!0),window.setMessage(t.message),updateCaptchaStatus(`API Error: ${t.message}`,"error")):(window.setIsError(!1),window.setMessage(t.message),updateCaptchaStatus(`API Success: ${t.message}`,"success"))}catch(r){console.log("Error processing response:",r),updateCaptchaStatus(`Error processing response: ${r}`,"error")}}).catch(e=>{console.log("Fetch error:",e),window.setIsError(!0),window.setMessage("Error: "+e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})};window.addEventListener("load",()=>{window.setIsError=o=>{const a=document.getElementById("messageContainer");a.style.color=o?"red":"black",a.style.display="block"},window.setMessage=o=>{document.getElementById("message").innerText=o},window.onLoggedIn=o=>{const a=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",o,"at",a),fetch(a,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${o}`}}).then(async e=>{try{const t=await e.json();e.status===200&&setMessage(t.message)}catch(t){console.log(t)}}).catch(e=>{console.log(e)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const s=new MutationObserver(o=>{o.forEach(a=>{if(a.addedNodes.length)for(let e=0;e<a.addedNodes.length;e++){const t=a.addedNodes[e];if(t.classList&&(t.classList.contains("procaptcha")||t.querySelector&&t.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),s.disconnect();break}}})});s.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(s){updateCaptchaStatus("CAPTCHA execution started: type=frictionless, mode=invisible","info"),updateCaptchaStatus(`Container: ${s.detail.containerId}, timestamp: ${new Date(s.detail.timestamp).toLocaleTimeString()}`,"info")});document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
@@ -0,0 +1,4 @@
1
+ import"./captcha-ByKnSsbG.js";import{render as o,execute as d}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function s(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function l(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
+ - Name: ${a}<br>
3
+ - Email: ${e}<br>
4
+ - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function c(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"image",callback:l,"failed-callback":c,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),s()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),d())})});
@@ -0,0 +1 @@
1
+ import"./captcha-ByKnSsbG.js";window.onCaptchaFailed=function(){updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=function(s){updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${s.substring(0,15)}...`,"success")};window.onActionHandler=function(s){if(updateCaptchaStatus("CAPTCHA callback executed with token","success"),!s){updateCaptchaStatus("Error: No token received from CAPTCHA","error"),alert("Must complete captcha");return}updateCaptchaStatus("Form submission initiated with valid CAPTCHA token","info");const o={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":s},a=new URL("signup",void 0).href;console.log("Posting to",a,"with payload",o),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),contentType:"application/json"}).then(e=>new Promise(t=>e.json().then(n=>t({status:e.status,ok:e.ok,json:n})))).then(async({status:e,json:t,ok:n})=>{console.log("Response status:",e,"message:",t.message,"ok:",n),console.log("Full response:",t);try{e!==200?(window.setIsError(!0),window.setMessage(t.message),updateCaptchaStatus(`API Error: ${t.message}`,"error")):(window.setIsError(!1),window.setMessage(t.message),updateCaptchaStatus(`API Success: ${t.message}`,"success"))}catch(r){console.log("Error processing response:",r),updateCaptchaStatus(`Error processing response: ${r}`,"error")}}).catch(e=>{console.log("Fetch error:",e),window.setIsError(!0),window.setMessage("Error: "+e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})};window.addEventListener("load",()=>{window.setIsError=o=>{const a=document.getElementById("messageContainer");a.style.color=o?"red":"black",a.style.display="block"},window.setMessage=o=>{document.getElementById("message").innerText=o},window.onLoggedIn=o=>{const a=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",o,"at",a),fetch(a,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${o}`}}).then(async e=>{try{const t=await e.json();e.status===200&&setMessage(t.message)}catch(t){console.log(t)}}).catch(e=>{console.log(e)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const s=new MutationObserver(o=>{o.forEach(a=>{if(a.addedNodes.length)for(let e=0;e<a.addedNodes.length;e++){const t=a.addedNodes[e];if(t.classList&&(t.classList.contains("procaptcha")||t.querySelector&&t.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),s.disconnect();break}}})});s.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(s){updateCaptchaStatus("CAPTCHA execution started: type=image, mode=invisible","info"),updateCaptchaStatus(`Container: ${s.detail.containerId}, timestamp: ${new Date(s.detail.timestamp).toLocaleTimeString()}`,"info")});document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
@@ -0,0 +1,4 @@
1
+ import"./captcha-ByKnSsbG.js";import{render as o,execute as d}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function s(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function l(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
+ - Name: ${a}<br>
3
+ - Email: ${e}<br>
4
+ - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function c(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"pow",callback:l,"failed-callback":c,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),s()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),d())})});
@@ -0,0 +1,4 @@
1
+ import"./captcha-ByKnSsbG.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const e=new MutationObserver(n=>{n.forEach(a=>{if(a.addedNodes.length)for(let t=0;t<a.addedNodes.length;t++){const s=a.addedNodes[t];if(s.classList&&(s.classList.contains("procaptcha")||s.querySelector&&s.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),e.disconnect();break}}})});e.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(e){updateCaptchaStatus("CAPTCHA execution started: type=pow, mode=invisible","info"),updateCaptchaStatus(`Container: ${e.detail.containerId}, timestamp: ${new Date(e.detail.timestamp).toLocaleTimeString()}`,"info")});window.onSubmit=function(e){console.log("Procaptcha verified, token: "+e),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${e.substring(0,15)}...`,"success");const n=document.getElementById("name").value,a=document.getElementById("email").value,t=document.getElementById("result");return t&&(t.innerHTML=`<strong>Form submitted with:</strong><br>
2
+ - Name: ${n}<br>
3
+ - Email: ${a}<br>
4
+ - Procaptcha verified: Yes`,t.style.display="block"),updateCaptchaStatus("Form submission completed","success"),!1};
@@ -0,0 +1,4 @@
1
+ import"./captcha-ByKnSsbG.js";import{render as i}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.classList&&(o.classList.contains("procaptcha")||o.querySelector&&o.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function d(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function s(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
+ - Name: ${a}<br>
3
+ - Email: ${e}<br>
4
+ - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function l(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=i(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"pow",callback:s,"failed-callback":l});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),d()&&window.updateCaptchaStatus("Waiting for CAPTCHA verification","info")})});
@@ -0,0 +1 @@
1
+ import"./captcha-ByKnSsbG.js";window.addEventListener("load",()=>{window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=r=>{console.log("Challenge passed"),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")};document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
@@ -1,4 +1,4 @@
1
- import { c as a, e as s, r as t, f } from "./index-2or4-1WF.js";
1
+ import { c as a, e as s, r as t, f } from "./index-Wgw2GQWq.js";
2
2
  export {
3
3
  a as default,
4
4
  s as execute,
@@ -1,4 +1,4 @@
1
- import { n as X, r as p } from "./emotion-element-5486c51c.browser.esm-CCAJ8JId.js";
1
+ import { n as X, r as p } from "./emotion-element-5486c51c.browser.esm-C3u8NMUC.js";
2
2
  import { s as Y } from "./toU8a-C68WUzs_.js";
3
3
  import { g as q, a as B, i as K } from "./i18nFrontend-CsPT71ro.js";
4
4
  function re(e) {