@prosopo/procaptcha-bundle 3.0.8 → 3.0.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @prosopo/procaptcha-bundle
2
2
 
3
+ ## 3.0.9
4
+ ### Patch Changes
5
+
6
+ - @prosopo/procaptcha-pow@2.7.14
7
+ - @prosopo/procaptcha-react@2.6.28
8
+ - @prosopo/procaptcha-frictionless@2.6.28
9
+
3
10
  ## 3.0.8
4
11
  ### Patch Changes
5
12
 
@@ -1,6 +1,6 @@
1
- import { j as l, a as H, g as ne, p as U, b as oe, P as ae, E as re, c as se, C as ie } from "./captchaComponentProvider-Dw6ydLe3.js";
1
+ import { j as l, a as H, g as ne, p as U, b as oe, P as ae, E as re, c as se, C as ie } from "./captchaComponentProvider-CZppE3Vb.js";
2
2
  import { r as m, u as V, a as b, A as w, f as ce, h as le, s as de, P as X, g as ue, l as he } from "./web2Chunk-7Vd8yt2r.js";
3
- import { l as M, d as D } from "./index-DqwVRCwA.js";
3
+ import { l as M, d as D } from "./index-BiwZ4wVT.js";
4
4
  import { b as _, c as W, P as v, a as N } from "./commonChunk-24zMb_mF.js";
5
5
  import { r as pe } from "./index-BzOMq-ud.js";
6
6
  import { v as ge } from "./utilCryptoChunk-CIPUtfoO.js";
@@ -1,9 +1,9 @@
1
- import { g as k, p as M, b as D, P as G, E as F, j as S, C as W } from "./captchaComponentProvider-Dw6ydLe3.js";
1
+ import { g as k, p as M, b as D, P as G, E as F, j as S, C as W } from "./captchaComponentProvider-CZppE3Vb.js";
2
2
  import { s as K, i as j, A as r, f as V, P as Y, u as X, r as l, l as q, M as H } from "./web2Chunk-7Vd8yt2r.js";
3
3
  import { b as L, u as z } from "./builder-CQlqPNRd.js";
4
4
  import { w as B } from "./utilChunk-sqstc6C5.js";
5
5
  import { a as w } from "./commonChunk-24zMb_mF.js";
6
- import { l as J, d as Q } from "./index-DqwVRCwA.js";
6
+ import { l as J, d as Q } from "./index-BiwZ4wVT.js";
7
7
  const Z = (d, o, E, t, e) => {
8
8
  const g = k(t), m = () => ({
9
9
  showModal: !1,
@@ -1,9 +1,9 @@
1
1
  import { h as ce, j as v, E as le, a as ue, s as de, w as Se, T as Pe, u as Pt, i as xe, r as we, b as Ce, g as Te, m as Ee } from "./emotion-element-5486c51c.browser.esm-PRDDgd_k.js";
2
- import { a as Ae, r as m, c as x, A as i, S as ke, d as Ie, e as B, U as te, l as Oe, P as Re, C as _ } from "./web2Chunk-7Vd8yt2r.js";
2
+ import { a as Ae, r as m, c as x, A as i, S as ke, d as Ie, e as B, U as te, l as Oe, P as Re, C as N } from "./web2Chunk-7Vd8yt2r.js";
3
3
  import { a as pe } from "./commonChunk-24zMb_mF.js";
4
4
  import { g as Tt } from "./bnChunk-DRlDxTFg.js";
5
- import { g as je, W as _e, l as Ne, d as Me } from "./index-DqwVRCwA.js";
6
- const re = (e) => Object.values(e), Fe = async (e) => {
5
+ import { g as je, W as _e, l as Ne, d as Me } from "./index-BiwZ4wVT.js";
6
+ const re = (e) => Object.values(e), Le = async (e) => {
7
7
  if (e === "production") {
8
8
  const t = await fetch("https://provider-list.prosopo.io/", {
9
9
  method: "GET",
@@ -27,11 +27,11 @@ const re = (e) => Object.values(e), Fe = async (e) => {
27
27
  context: { environment: e }
28
28
  });
29
29
  };
30
- let j = [];
31
- const $e = async (e) => {
30
+ let _ = [];
31
+ const Fe = async (e) => {
32
32
  const t = (o, a) => Math.floor(Math.random() * (a - o + 1) + o);
33
- j.length === 0 && (j = await Fe(e.defaultEnvironment));
34
- const r = Ae(j, t(0, j.length - 1));
33
+ _.length === 0 && (_ = await Le(e.defaultEnvironment));
34
+ const r = Ae(_, t(0, _.length - 1));
35
35
  return {
36
36
  providerAccount: r.address,
37
37
  provider: {
@@ -39,7 +39,7 @@ const $e = async (e) => {
39
39
  datasetId: r.datasetId
40
40
  }
41
41
  };
42
- }, Le = async (e, t, r, o, a) => {
42
+ }, $e = async (e, t, r, o, a) => {
43
43
  try {
44
44
  await e();
45
45
  } catch (n) {
@@ -61,7 +61,7 @@ function V() {
61
61
  }, V.apply(null, arguments);
62
62
  }
63
63
  var fe = { exports: {} }, c = {};
64
- var d = typeof Symbol == "function" && Symbol.for, X = d ? Symbol.for("react.element") : 60103, J = d ? Symbol.for("react.portal") : 60106, F = d ? Symbol.for("react.fragment") : 60107, $ = d ? Symbol.for("react.strict_mode") : 60108, L = d ? Symbol.for("react.profiler") : 60114, D = d ? Symbol.for("react.provider") : 60109, z = d ? Symbol.for("react.context") : 60110, Z = d ? Symbol.for("react.async_mode") : 60111, H = d ? Symbol.for("react.concurrent_mode") : 60111, U = d ? Symbol.for("react.forward_ref") : 60112, K = d ? Symbol.for("react.suspense") : 60113, ze = d ? Symbol.for("react.suspense_list") : 60120, W = d ? Symbol.for("react.memo") : 60115, q = d ? Symbol.for("react.lazy") : 60116, He = d ? Symbol.for("react.block") : 60121, Ue = d ? Symbol.for("react.fundamental") : 60117, Ke = d ? Symbol.for("react.responder") : 60118, We = d ? Symbol.for("react.scope") : 60119;
64
+ var d = typeof Symbol == "function" && Symbol.for, X = d ? Symbol.for("react.element") : 60103, J = d ? Symbol.for("react.portal") : 60106, L = d ? Symbol.for("react.fragment") : 60107, F = d ? Symbol.for("react.strict_mode") : 60108, $ = d ? Symbol.for("react.profiler") : 60114, D = d ? Symbol.for("react.provider") : 60109, z = d ? Symbol.for("react.context") : 60110, Z = d ? Symbol.for("react.async_mode") : 60111, U = d ? Symbol.for("react.concurrent_mode") : 60111, H = d ? Symbol.for("react.forward_ref") : 60112, K = d ? Symbol.for("react.suspense") : 60113, ze = d ? Symbol.for("react.suspense_list") : 60120, W = d ? Symbol.for("react.memo") : 60115, q = d ? Symbol.for("react.lazy") : 60116, Ue = d ? Symbol.for("react.block") : 60121, He = d ? Symbol.for("react.fundamental") : 60117, Ke = d ? Symbol.for("react.responder") : 60118, We = d ? Symbol.for("react.scope") : 60119;
65
65
  function y(e) {
66
66
  if (typeof e == "object" && e !== null) {
67
67
  var t = e.$$typeof;
@@ -69,16 +69,16 @@ function y(e) {
69
69
  case X:
70
70
  switch (e = e.type, e) {
71
71
  case Z:
72
- case H:
73
- case F:
72
+ case U:
74
73
  case L:
75
74
  case $:
75
+ case F:
76
76
  case K:
77
77
  return e;
78
78
  default:
79
79
  switch (e = e && e.$$typeof, e) {
80
80
  case z:
81
- case U:
81
+ case H:
82
82
  case q:
83
83
  case W:
84
84
  case D:
@@ -93,20 +93,20 @@ function y(e) {
93
93
  }
94
94
  }
95
95
  function he(e) {
96
- return y(e) === H;
96
+ return y(e) === U;
97
97
  }
98
98
  c.AsyncMode = Z;
99
- c.ConcurrentMode = H;
99
+ c.ConcurrentMode = U;
100
100
  c.ContextConsumer = z;
101
101
  c.ContextProvider = D;
102
102
  c.Element = X;
103
- c.ForwardRef = U;
104
- c.Fragment = F;
103
+ c.ForwardRef = H;
104
+ c.Fragment = L;
105
105
  c.Lazy = q;
106
106
  c.Memo = W;
107
107
  c.Portal = J;
108
- c.Profiler = L;
109
- c.StrictMode = $;
108
+ c.Profiler = $;
109
+ c.StrictMode = F;
110
110
  c.Suspense = K;
111
111
  c.isAsyncMode = function(e) {
112
112
  return he(e) || y(e) === Z;
@@ -122,10 +122,10 @@ c.isElement = function(e) {
122
122
  return typeof e == "object" && e !== null && e.$$typeof === X;
123
123
  };
124
124
  c.isForwardRef = function(e) {
125
- return y(e) === U;
125
+ return y(e) === H;
126
126
  };
127
127
  c.isFragment = function(e) {
128
- return y(e) === F;
128
+ return y(e) === L;
129
129
  };
130
130
  c.isLazy = function(e) {
131
131
  return y(e) === q;
@@ -137,16 +137,16 @@ c.isPortal = function(e) {
137
137
  return y(e) === J;
138
138
  };
139
139
  c.isProfiler = function(e) {
140
- return y(e) === L;
140
+ return y(e) === $;
141
141
  };
142
142
  c.isStrictMode = function(e) {
143
- return y(e) === $;
143
+ return y(e) === F;
144
144
  };
145
145
  c.isSuspense = function(e) {
146
146
  return y(e) === K;
147
147
  };
148
148
  c.isValidElementType = function(e) {
149
- return typeof e == "string" || typeof e == "function" || e === F || e === H || e === L || e === $ || e === K || e === ze || typeof e == "object" && e !== null && (e.$$typeof === q || e.$$typeof === W || e.$$typeof === D || e.$$typeof === z || e.$$typeof === U || e.$$typeof === Ue || e.$$typeof === Ke || e.$$typeof === We || e.$$typeof === He);
149
+ return typeof e == "string" || typeof e == "function" || e === L || e === U || e === $ || e === F || e === K || e === ze || typeof e == "object" && e !== null && (e.$$typeof === q || e.$$typeof === W || e.$$typeof === D || e.$$typeof === z || e.$$typeof === H || e.$$typeof === He || e.$$typeof === Ke || e.$$typeof === We || e.$$typeof === Ue);
150
150
  };
151
151
  c.typeOf = y;
152
152
  fe.exports = c;
@@ -219,24 +219,24 @@ var Xe = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|def
219
219
  f.push(g[h], g[0][h]);
220
220
  }
221
221
  var l = Se(function(p, S, A) {
222
- var E = P && p.as || a, C = "", k = [], I = p;
222
+ var E = P && p.as || a, C = "", k = [], O = p;
223
223
  if (p.theme == null) {
224
- I = {};
224
+ O = {};
225
225
  for (var Q in p)
226
- I[Q] = p[Q];
227
- I.theme = m.useContext(Pe);
226
+ O[Q] = p[Q];
227
+ O.theme = m.useContext(Pe);
228
228
  }
229
229
  typeof p.className == "string" ? C = Te(S.registered, k, p.className) : p.className != null && (C = p.className + " ");
230
- var ee = de(f.concat(k), S.registered, I);
230
+ var ee = de(f.concat(k), S.registered, O);
231
231
  C += S.key + "-" + ee.name, s !== void 0 && (C += " " + s);
232
- var be = P && u === void 0 ? oe(E) : b, O = {};
233
- for (var R in p)
234
- P && R === "as" || be(R) && (O[R] = p[R]);
235
- return O.className = C, A && (O.ref = A), /* @__PURE__ */ m.createElement(m.Fragment, null, /* @__PURE__ */ m.createElement(et, {
232
+ var be = P && u === void 0 ? oe(E) : b, R = {};
233
+ for (var j in p)
234
+ P && j === "as" || be(j) && (R[j] = p[j]);
235
+ return R.className = C, A && (R.ref = A), /* @__PURE__ */ m.createElement(m.Fragment, null, /* @__PURE__ */ m.createElement(et, {
236
236
  cache: S,
237
237
  serialized: ee,
238
238
  isStringTag: typeof E == "string"
239
- }), /* @__PURE__ */ m.createElement(E, O));
239
+ }), /* @__PURE__ */ m.createElement(E, R));
240
240
  });
241
241
  return l.displayName = n !== void 0 ? n : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", l.defaultProps = t.defaultProps, l.__emotion_real = l, l.__emotion_base = a, l.__emotion_styles = f, l.__emotion_forwardProp = u, Object.defineProperty(l, "toString", {
242
242
  value: function() {
@@ -502,10 +502,10 @@ class ct {
502
502
  return t instanceof G ? console.error("HTTP error:", t) : console.error("API request error:", t), Promise.reject(t);
503
503
  }
504
504
  }
505
- var N;
505
+ var I;
506
506
  (function(e) {
507
507
  e.INSERT_MANY = "/v1/prosopo/user-access-policy/rules/insert-many", e.DELETE_MANY = "/v1/prosopo/user-access-policy/rules/delete-many", e.DELETE_ALL = "/v1/prosopo/user-access-policy/rules/delete-all";
508
- })(N || (N = {}));
508
+ })(I || (I = {}));
509
509
  class lt extends ct {
510
510
  constructor(t, r) {
511
511
  const o = t.startsWith("http") ? t : `https://${t}`;
@@ -673,7 +673,7 @@ class lt extends ct {
673
673
  });
674
674
  }
675
675
  insertUserAccessPolicies(t, r, o) {
676
- return this.post(N.INSERT_MANY, t, {
676
+ return this.post(I.INSERT_MANY, t, {
677
677
  headers: {
678
678
  "Prosopo-Site-Key": this.account,
679
679
  timestamp: r,
@@ -682,7 +682,7 @@ class lt extends ct {
682
682
  });
683
683
  }
684
684
  deleteUserAccessPolicies(t, r, o) {
685
- return this.post(N.DELETE_MANY, t, {
685
+ return this.post(I.DELETE_MANY, t, {
686
686
  headers: {
687
687
  "Prosopo-Site-Key": this.account,
688
688
  timestamp: r,
@@ -690,12 +690,21 @@ class lt extends ct {
690
690
  }
691
691
  });
692
692
  }
693
+ deleteAllUserAccessPolicies(t, r) {
694
+ return this.post(I.DELETE_ALL, {}, {
695
+ headers: {
696
+ "Prosopo-Site-Key": this.account,
697
+ timestamp: t,
698
+ signature: r
699
+ }
700
+ });
701
+ }
693
702
  }
694
- const ut = m.lazy(async () => import("./ProcaptchaWidget-D961oZ27.js")), ge = (e) => w(m.Suspense, { children: w(ut, { config: e.config, callbacks: e.callbacks, frictionlessState: e.frictionlessState, i18n: e.i18n }) }), dt = m.lazy(async () => import("./ProcaptchaWidget-BpzncYOb.js")), ve = (e) => w(m.Suspense, { children: w(dt, { ...e }) }), pt = async () => (await import("./index-BRg_gWPo.js")).default, ft = async (e) => {
703
+ const ut = m.lazy(async () => import("./ProcaptchaWidget-DlrcrISF.js")), ge = (e) => w(m.Suspense, { children: w(ut, { config: e.config, callbacks: e.callbacks, frictionlessState: e.frictionlessState, i18n: e.i18n }) }), dt = m.lazy(async () => import("./ProcaptchaWidget-D_kzGjgO.js")), ve = (e) => w(m.Suspense, { children: w(dt, { ...e }) }), pt = async () => (await import("./index-BRg_gWPo.js")).default, ft = async (e) => {
695
704
  const r = await (await pt())(), a = await new (await De(e.web2))().getAccount(e);
696
705
  if (!e.account.address)
697
706
  throw new pe("GENERAL.SITE_KEY_MISSING");
698
- const n = await $e(e), u = await new lt(n.provider.url, e.account.address).getFrictionlessCaptcha(r.token, e.account.address, a.account.address);
707
+ const n = await Fe(e), u = await new lt(n.provider.url, e.account.address).getFrictionlessCaptcha(r.token, e.account.address, a.account.address);
699
708
  return {
700
709
  captchaType: u.captchaType,
701
710
  sessionId: u.sessionId,
@@ -729,7 +738,7 @@ const ut = m.lazy(async () => import("./ProcaptchaWidget-D961oZ27.js")), ge = (e
729
738
  P(0), s.onReset(), r();
730
739
  }, 1e4);
731
740
  }, T = async () => {
732
- await Le(async () => {
741
+ await $e(async () => {
733
742
  var S, A, E, C, k;
734
743
  n.current.attemptCount += 1;
735
744
  const h = Re.parse(e), l = await a(h);
@@ -772,13 +781,13 @@ const ut = m.lazy(async () => import("./ProcaptchaWidget-D961oZ27.js")), ge = (e
772
781
  const { config: t, callbacks: r, i18n: o } = e;
773
782
  return v.jsx(ge, { config: t, callbacks: M(r), i18n: o });
774
783
  }, vt = {
775
- [_.image]: yt,
776
- [_.pow]: gt,
777
- [_.frictionless]: mt
784
+ [N.image]: yt,
785
+ [N.pow]: gt,
786
+ [N.frictionless]: mt
778
787
  };
779
788
  class bt {
780
789
  getCaptchaComponent(t, r) {
781
- if (t === _.invisible)
790
+ if (t === N.invisible)
782
791
  throw new Error("Not Implemented");
783
792
  const o = vt[t];
784
793
  return "rendering ".concat(t), v.jsx(o, { config: r.config, callbacks: r.callbacks, i18n: r.i18n });
@@ -793,10 +802,10 @@ export {
793
802
  De as E,
794
803
  lt as P,
795
804
  Ve as a,
796
- $e as b,
805
+ Fe as b,
797
806
  Ye as c,
798
807
  kt as d,
799
808
  M as g,
800
809
  w as j,
801
- Le as p
810
+ $e as p
802
811
  };
@@ -445,7 +445,7 @@ class he {
445
445
  return this._i18n === null && (this._i18n = await $()), this.captchaRenderer === null && (this.captchaRenderer = await this.createCaptchaRenderer()), this.captchaRenderer;
446
446
  }
447
447
  async createCaptchaRenderer() {
448
- const t = (await import("./captchaRenderer-CY8KuZK-.js")).CaptchaRenderer, o = (await import("./captchaComponentProvider-Dw6ydLe3.js").then((a) => a.d)).CaptchaComponentProvider;
448
+ const t = (await import("./captchaRenderer-CY8KuZK-.js")).CaptchaRenderer, o = (await import("./captchaComponentProvider-CZppE3Vb.js").then((a) => a.d)).CaptchaComponentProvider;
449
449
  return new t(new o());
450
450
  }
451
451
  }
@@ -1,4 +1,4 @@
1
- import { a as s, e as t, r as o, b as d } from "./index-DqwVRCwA.js";
1
+ import { a as s, e as t, r as o, b as d } from "./index-BiwZ4wVT.js";
2
2
  import "./web2Chunk-7Vd8yt2r.js";
3
3
  export {
4
4
  s as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-bundle",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -37,9 +37,9 @@
37
37
  "@prosopo/common": "3.0.2",
38
38
  "@prosopo/dotenv": "3.0.4",
39
39
  "@prosopo/locale": "3.0.2",
40
- "@prosopo/procaptcha-frictionless": "2.6.27",
41
- "@prosopo/procaptcha-pow": "2.7.13",
42
- "@prosopo/procaptcha-react": "2.6.27",
40
+ "@prosopo/procaptcha-frictionless": "2.6.28",
41
+ "@prosopo/procaptcha-pow": "2.7.14",
42
+ "@prosopo/procaptcha-react": "2.6.28",
43
43
  "@prosopo/types": "3.0.3",
44
44
  "@prosopo/util": "3.0.2",
45
45
  "@prosopo/util-crypto": "13.5.1",