@abaxx_tech/v-integration-react 1.1.2-dev.2 → 1.1.2-dev.3

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.
@@ -1,35 +1,35 @@
1
- import { jsx as P, jsxs as he, Fragment as Qe } from "react/jsx-runtime";
2
- import Bt, { createContext as Or, useState as ge, useContext as Ke, useRef as Lt, useEffect as Ge, useCallback as Ve } from "react";
3
- const Oe = Or({}), qr = ({
4
- clientId: G,
1
+ import { jsx as P, jsxs as he, Fragment as Ge } from "react/jsx-runtime";
2
+ import Bt, { createContext as Or, useState as ge, useContext as Ke, useRef as Lt, useCallback as Oe, useEffect as Ve } from "react";
3
+ const qe = Or({}), qr = ({
4
+ clientId: V,
5
5
  apiUrl: X,
6
6
  children: ie
7
7
  }) => {
8
- const [W, O] = ge(""), [Y, U] = ge(""), [M, x] = ge(!1), [d, A] = ge(""), [C, $] = ge(""), [D, H] = ge(/* @__PURE__ */ new Date()), [q, B] = ge(""), [Z, V] = ge(null), [z, E] = ge(null), o = Bt.useCallback(() => {
9
- O(""), U(""), x(!1), A(""), $(""), B(""), H(/* @__PURE__ */ new Date()), V(null), E(null);
8
+ const [W, O] = ge(""), [Z, U] = ge(""), [M, x] = ge(!1), [d, A] = ge(""), [C, j] = ge(""), [D, H] = ge(/* @__PURE__ */ new Date()), [q, B] = ge(""), [J, Q] = ge(null), [z, E] = ge(null), o = Bt.useCallback(() => {
9
+ O(""), U(""), x(!1), A(""), j(""), B(""), H(/* @__PURE__ */ new Date()), Q(null), E(null);
10
10
  }, []);
11
11
  return /* @__PURE__ */ P(
12
- Oe.Provider,
12
+ qe.Provider,
13
13
  {
14
14
  value: {
15
15
  apiUrl: X,
16
- clientId: G,
16
+ clientId: V,
17
17
  identity: W,
18
18
  setIdentity: O,
19
- authRequestId: Y,
19
+ authRequestId: Z,
20
20
  setAuthRequestId: U,
21
21
  isAuthenticating: M,
22
22
  setIsAuthenticating: x,
23
23
  codeVerifier: d,
24
24
  setCodeVerifier: A,
25
25
  codeChallenge: C,
26
- setCodeChallenge: $,
26
+ setCodeChallenge: j,
27
27
  authCode: q,
28
28
  setAuthCode: B,
29
29
  authRequestIdExpires: D,
30
30
  setAuthRequestIdExpires: H,
31
- token: Z,
32
- setToken: V,
31
+ token: J,
32
+ setToken: Q,
33
33
  authError: z,
34
34
  setAuthError: E,
35
35
  resetState: o
@@ -38,23 +38,23 @@ const Oe = Or({}), qr = ({
38
38
  }
39
39
  );
40
40
  };
41
- function jr(G) {
42
- const X = new Uint8Array(G);
41
+ function jr(V) {
42
+ const X = new Uint8Array(V);
43
43
  return window.crypto.getRandomValues(X), X;
44
44
  }
45
- function Pt(G) {
46
- const X = Array.from(G);
45
+ function Pt(V) {
46
+ const X = Array.from(V);
47
47
  return btoa(String.fromCharCode(...X)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
48
48
  }
49
49
  function Ur() {
50
50
  const {
51
- apiUrl: G,
51
+ apiUrl: V,
52
52
  clientId: X,
53
53
  authRequestId: ie,
54
54
  // results of the successful auth
55
55
  setIdentity: W,
56
56
  authCode: O,
57
- setAuthCode: Y,
57
+ setAuthCode: Z,
58
58
  // results of the successful begin auth
59
59
  setAuthRequestId: U,
60
60
  setAuthRequestIdExpires: M,
@@ -62,11 +62,11 @@ function Ur() {
62
62
  setCodeVerifier: d,
63
63
  codeChallenge: A,
64
64
  codeVerifier: C,
65
- setIsAuthenticating: $,
65
+ setIsAuthenticating: j,
66
66
  token: D,
67
67
  setToken: H,
68
68
  setAuthError: q
69
- } = Ke(Oe), B = Lt(null), Z = Lt(""), V = (E) => {
69
+ } = Ke(qe), B = Lt(null), J = Lt(""), Q = Oe((E) => {
70
70
  try {
71
71
  let o;
72
72
  try {
@@ -76,11 +76,11 @@ function Ur() {
76
76
  }
77
77
  switch (E.type) {
78
78
  case "start": {
79
- o.request_id && o.expires && (U(o.request_id), Z.current = o.request_id, M(new Date(o.expires)));
79
+ o.request_id && o.expires && (U(o.request_id), J.current = o.request_id, M(new Date(o.expires)));
80
80
  break;
81
81
  }
82
82
  case "approved": {
83
- o.code && o.identity && o.approved && o.request_id && o.request_id == Z.current && (B.current && (console.info("Closing SSE connection after approval"), B.current.close(), B.current = null), Y(o.code), W(o.identity), $(!0));
83
+ o.code && o.identity && o.approved && o.request_id && o.request_id == J.current && (B.current && (console.info("Closing SSE connection after approval"), B.current.close(), B.current = null), Z(o.code), W(o.identity), j(!0));
84
84
  break;
85
85
  }
86
86
  default:
@@ -89,8 +89,8 @@ function Ur() {
89
89
  } catch (o) {
90
90
  console.error("Error parsing SSE message:", o);
91
91
  }
92
- };
93
- Ge(() => {
92
+ }, [U, M, Z, W, j]);
93
+ Ve(() => {
94
94
  if (A)
95
95
  return;
96
96
  let E = !1;
@@ -103,15 +103,15 @@ function Ur() {
103
103
  })(), () => {
104
104
  E = !0;
105
105
  };
106
- }, [A]), Ge(() => {
106
+ }, [A, x, d]), Ve(() => {
107
107
  if (D) {
108
108
  B.current && (console.info("Closing existing SSE connection"), B.current.close(), B.current = null);
109
109
  return;
110
110
  }
111
111
  if (!(!A || B.current))
112
112
  try {
113
- const E = `${G}/v-plus/auth/start?cid=${X}`, o = new EventSource(E);
114
- return B.current = o, o.onmessage = V, o.addEventListener("start", V), o.addEventListener("approved", V), o.onerror = () => {
113
+ const E = `${V}/v-plus/auth/start?cid=${X}`, o = new EventSource(E);
114
+ return B.current = o, o.onmessage = Q, o.addEventListener("start", Q), o.addEventListener("approved", Q), o.onerror = () => {
115
115
  if (D || !B.current) {
116
116
  console.info("SSE connection closed"), B.current && (B.current.close(), B.current = null);
117
117
  return;
@@ -123,10 +123,10 @@ function Ur() {
123
123
  } catch (E) {
124
124
  console.error("SSE connection setup failed:", E), B.current = null;
125
125
  }
126
- }, [D, A, G, X]);
127
- const z = Ve(async (E, o, b) => {
126
+ }, [D, A, V, X, Q]);
127
+ const z = Oe(async (E, o, b) => {
128
128
  try {
129
- const y = await (await fetch(`${G}/v-plus/auth/token?cid=${X}`, {
129
+ const y = await (await fetch(`${V}/v-plus/auth/token?cid=${X}`, {
130
130
  method: "POST",
131
131
  headers: {
132
132
  "Content-Type": "application/json"
@@ -138,33 +138,33 @@ function Ur() {
138
138
  })
139
139
  })).json();
140
140
  if (y.token)
141
- H(y.token), $(!1);
141
+ H(y.token), j(!1);
142
142
  else
143
143
  throw new Error("No token received");
144
144
  } catch (c) {
145
- console.error("Error fetching token:", c), $(!1), q(`Failed to obtain auth token: ${c}`), Y("");
145
+ console.error("Error fetching token:", c), j(!1), q(`Failed to obtain auth token: ${c}`), Z("");
146
146
  }
147
- }, [G, X]);
148
- return Ge(() => {
147
+ }, [V, X, H, j, q, Z]);
148
+ return Ve(() => {
149
149
  O && z(O, ie, C);
150
- }, [O, C, ie]), null;
150
+ }, [O, C, ie, z]), null;
151
151
  }
152
152
  const Vr = ({
153
- clientId: G,
153
+ clientId: V,
154
154
  apiUrl: X,
155
155
  children: ie
156
- }) => /* @__PURE__ */ he(qr, { apiUrl: X, clientId: G, children: [
156
+ }) => /* @__PURE__ */ he(qr, { apiUrl: X, clientId: V, children: [
157
157
  /* @__PURE__ */ P(Ur, {}),
158
158
  ie
159
159
  ] });
160
- var nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, He = { exports: {} };
161
- He.exports;
160
+ var nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, Qe = { exports: {} };
161
+ Qe.exports;
162
162
  var Dt;
163
163
  function $r() {
164
- return Dt || (Dt = 1, function(G, X) {
165
- var ie = 200, W = "__lodash_hash_undefined__", O = 1, Y = 2, U = 9007199254740991, M = "[object Arguments]", x = "[object Array]", d = "[object AsyncFunction]", A = "[object Boolean]", C = "[object Date]", $ = "[object Error]", D = "[object Function]", H = "[object GeneratorFunction]", q = "[object Map]", B = "[object Number]", Z = "[object Null]", V = "[object Object]", z = "[object Promise]", E = "[object Proxy]", o = "[object RegExp]", b = "[object Set]", c = "[object String]", y = "[object Symbol]", f = "[object Undefined]", w = "[object WeakMap]", n = "[object ArrayBuffer]", t = "[object DataView]", g = "[object Float32Array]", i = "[object Float64Array]", p = "[object Int8Array]", L = "[object Int16Array]", T = "[object Int32Array]", K = "[object Uint8Array]", j = "[object Uint8ClampedArray]", re = "[object Uint16Array]", oe = "[object Uint32Array]", S = /[\\^$.*+?()[\]{}|]/g, k = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, Q = {};
166
- Q[g] = Q[i] = Q[p] = Q[L] = Q[T] = Q[K] = Q[j] = Q[re] = Q[oe] = !0, Q[M] = Q[x] = Q[n] = Q[A] = Q[t] = Q[C] = Q[$] = Q[D] = Q[q] = Q[B] = Q[V] = Q[o] = Q[b] = Q[c] = Q[w] = !1;
167
- var se = typeof nt == "object" && nt && nt.Object === Object && nt, _e = typeof self == "object" && self && self.Object === Object && self, s = se || _e || Function("return this")(), u = X && !X.nodeType && X, a = u && !0 && G && !G.nodeType && G, l = a && a.exports === u, h = l && se.process, _ = function() {
164
+ return Dt || (Dt = 1, function(V, X) {
165
+ var ie = 200, W = "__lodash_hash_undefined__", O = 1, Z = 2, U = 9007199254740991, M = "[object Arguments]", x = "[object Array]", d = "[object AsyncFunction]", A = "[object Boolean]", C = "[object Date]", j = "[object Error]", D = "[object Function]", H = "[object GeneratorFunction]", q = "[object Map]", B = "[object Number]", J = "[object Null]", Q = "[object Object]", z = "[object Promise]", E = "[object Proxy]", o = "[object RegExp]", b = "[object Set]", c = "[object String]", y = "[object Symbol]", f = "[object Undefined]", w = "[object WeakMap]", n = "[object ArrayBuffer]", t = "[object DataView]", g = "[object Float32Array]", i = "[object Float64Array]", p = "[object Int8Array]", L = "[object Int16Array]", T = "[object Int32Array]", K = "[object Uint8Array]", $ = "[object Uint8ClampedArray]", re = "[object Uint16Array]", oe = "[object Uint32Array]", S = /[\\^$.*+?()[\]{}|]/g, k = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, G = {};
166
+ G[g] = G[i] = G[p] = G[L] = G[T] = G[K] = G[$] = G[re] = G[oe] = !0, G[M] = G[x] = G[n] = G[A] = G[t] = G[C] = G[j] = G[D] = G[q] = G[B] = G[Q] = G[o] = G[b] = G[c] = G[w] = !1;
167
+ var se = typeof nt == "object" && nt && nt.Object === Object && nt, _e = typeof self == "object" && self && self.Object === Object && self, s = se || _e || Function("return this")(), u = X && !X.nodeType && X, a = u && !0 && V && !V.nodeType && V, l = a && a.exports === u, h = l && se.process, _ = function() {
168
168
  try {
169
169
  return h && h.binding && h.binding("util");
170
170
  } catch {
@@ -177,7 +177,7 @@ function $r() {
177
177
  }
178
178
  return F;
179
179
  }
180
- function J(e, r) {
180
+ function Y(e, r) {
181
181
  for (var v = -1, m = r.length, te = e.length; ++v < m; )
182
182
  e[te + v] = r[v];
183
183
  return e;
@@ -215,7 +215,7 @@ function $r() {
215
215
  return e(r(v));
216
216
  };
217
217
  }
218
- function qe(e) {
218
+ function je(e) {
219
219
  var r = -1, v = Array(e.size);
220
220
  return e.forEach(function(m) {
221
221
  v[++r] = m;
@@ -226,7 +226,7 @@ function $r() {
226
226
  return e ? "Symbol(src)_1." + e : "";
227
227
  }(), dt = Ze.toString, jt = RegExp(
228
228
  "^" + ct.call(be).replace(S, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
229
- ), gt = l ? s.Buffer : void 0, Je = s.Symbol, pt = s.Uint8Array, yt = Ze.propertyIsEnumerable, Ut = Be.splice, Ee = Je ? Je.toStringTag : void 0, wt = Object.getOwnPropertySymbols, $t = gt ? gt.isBuffer : void 0, Ft = We(Object.keys, Object), it = Ne(s, "DataView"), je = Ne(s, "Map"), ot = Ne(s, "Promise"), st = Ne(s, "Set"), ft = Ne(s, "WeakMap"), Ue = Ne(Object, "create"), Ht = Pe(it), Qt = Pe(je), Gt = Pe(ot), Vt = Pe(st), Kt = Pe(ft), xt = Je ? Je.prototype : void 0, ut = xt ? xt.valueOf : void 0;
229
+ ), gt = l ? s.Buffer : void 0, Je = s.Symbol, pt = s.Uint8Array, yt = Ze.propertyIsEnumerable, Ut = Be.splice, Ee = Je ? Je.toStringTag : void 0, wt = Object.getOwnPropertySymbols, $t = gt ? gt.isBuffer : void 0, Ft = We(Object.keys, Object), it = Ne(s, "DataView"), Ue = Ne(s, "Map"), ot = Ne(s, "Promise"), st = Ne(s, "Set"), ft = Ne(s, "WeakMap"), $e = Ne(Object, "create"), Ht = Pe(it), Qt = Pe(Ue), Gt = Pe(ot), Vt = Pe(st), Kt = Pe(ft), xt = Je ? Je.prototype : void 0, ut = xt ? xt.valueOf : void 0;
230
230
  function Re(e) {
231
231
  var r = -1, v = e == null ? 0 : e.length;
232
232
  for (this.clear(); ++r < v; ) {
@@ -235,7 +235,7 @@ function $r() {
235
235
  }
236
236
  }
237
237
  function Wt() {
238
- this.__data__ = Ue ? Ue(null) : {}, this.size = 0;
238
+ this.__data__ = $e ? $e(null) : {}, this.size = 0;
239
239
  }
240
240
  function Zt(e) {
241
241
  var r = this.has(e) && delete this.__data__[e];
@@ -243,7 +243,7 @@ function $r() {
243
243
  }
244
244
  function Jt(e) {
245
245
  var r = this.__data__;
246
- if (Ue) {
246
+ if ($e) {
247
247
  var v = r[e];
248
248
  return v === W ? void 0 : v;
249
249
  }
@@ -251,11 +251,11 @@ function $r() {
251
251
  }
252
252
  function Yt(e) {
253
253
  var r = this.__data__;
254
- return Ue ? r[e] !== void 0 : be.call(r, e);
254
+ return $e ? r[e] !== void 0 : be.call(r, e);
255
255
  }
256
256
  function Xt(e, r) {
257
257
  var v = this.__data__;
258
- return this.size += this.has(e) ? 0 : 1, v[e] = Ue && r === void 0 ? W : r, this;
258
+ return this.size += this.has(e) ? 0 : 1, v[e] = $e && r === void 0 ? W : r, this;
259
259
  }
260
260
  Re.prototype.clear = Wt, Re.prototype.delete = Zt, Re.prototype.get = Jt, Re.prototype.has = Yt, Re.prototype.set = Xt;
261
261
  function Ae(e) {
@@ -297,7 +297,7 @@ function $r() {
297
297
  function ar() {
298
298
  this.size = 0, this.__data__ = {
299
299
  hash: new Re(),
300
- map: new (je || Ae)(),
300
+ map: new (Ue || Ae)(),
301
301
  string: new Re()
302
302
  };
303
303
  }
@@ -349,7 +349,7 @@ function $r() {
349
349
  var v = this.__data__;
350
350
  if (v instanceof Ae) {
351
351
  var m = v.__data__;
352
- if (!je || m.length < ie - 1)
352
+ if (!Ue || m.length < ie - 1)
353
353
  return m.push([e, r]), this.size = ++v.size, this;
354
354
  v = this.__data__ = new Le(m);
355
355
  }
@@ -374,21 +374,21 @@ function $r() {
374
374
  }
375
375
  function yr(e, r, v) {
376
376
  var m = r(e);
377
- return et(e) ? m : J(m, v(e));
377
+ return et(e) ? m : Y(m, v(e));
378
378
  }
379
- function $e(e) {
380
- return e == null ? e === void 0 ? f : Z : Ee && Ee in Object(e) ? Tr(e) : Lr(e);
379
+ function Fe(e) {
380
+ return e == null ? e === void 0 ? f : J : Ee && Ee in Object(e) ? Tr(e) : Lr(e);
381
381
  }
382
382
  function bt(e) {
383
- return Fe(e) && $e(e) == M;
383
+ return He(e) && Fe(e) == M;
384
384
  }
385
385
  function _t(e, r, v, m, te) {
386
- return e === r ? !0 : e == null || r == null || !Fe(e) && !Fe(r) ? e !== e && r !== r : wr(e, r, v, m, _t, te);
386
+ return e === r ? !0 : e == null || r == null || !He(e) && !He(r) ? e !== e && r !== r : wr(e, r, v, m, _t, te);
387
387
  }
388
388
  function wr(e, r, v, m, te, F) {
389
389
  var ae = et(e), fe = et(r), ce = ae ? x : Me(e), ne = fe ? x : Me(r);
390
- ce = ce == M ? V : ce, ne = ne == M ? V : ne;
391
- var pe = ce == V, xe = ne == V, de = ce == ne;
390
+ ce = ce == M ? Q : ce, ne = ne == M ? Q : ne;
391
+ var pe = ce == Q, xe = ne == Q, de = ce == ne;
392
392
  if (de && lt(e)) {
393
393
  if (!lt(r))
394
394
  return !1;
@@ -412,7 +412,7 @@ function $r() {
412
412
  return r.test(Pe(e));
413
413
  }
414
414
  function br(e) {
415
- return Fe(e) && Mt(e.length) && !!Q[$e(e)];
415
+ return He(e) && Mt(e.length) && !!G[Fe(e)];
416
416
  }
417
417
  function _r(e) {
418
418
  if (!Rr(e))
@@ -429,7 +429,7 @@ function $r() {
429
429
  var ne = F.get(e);
430
430
  if (ne && F.get(r))
431
431
  return ne == r;
432
- var pe = -1, xe = !0, de = v & Y ? new Ye() : void 0;
432
+ var pe = -1, xe = !0, de = v & Z ? new Ye() : void 0;
433
433
  for (F.set(e, r), F.set(r, e); ++pe < fe; ) {
434
434
  var ye = e[pe], we = r[pe];
435
435
  if (m)
@@ -467,7 +467,7 @@ function $r() {
467
467
  case C:
468
468
  case B:
469
469
  return Tt(+e, +r);
470
- case $:
470
+ case j:
471
471
  return e.name == r.name && e.message == r.message;
472
472
  case o:
473
473
  case c:
@@ -476,12 +476,12 @@ function $r() {
476
476
  var fe = ke;
477
477
  case b:
478
478
  var ce = m & O;
479
- if (fe || (fe = qe), e.size != r.size && !ce)
479
+ if (fe || (fe = je), e.size != r.size && !ce)
480
480
  return !1;
481
481
  var ne = ae.get(e);
482
482
  if (ne)
483
483
  return ne == r;
484
- m |= Y, ae.set(e, r);
484
+ m |= Z, ae.set(e, r);
485
485
  var pe = At(fe(e), fe(r), m, te, F, ae);
486
486
  return ae.delete(e), pe;
487
487
  case y:
@@ -546,9 +546,9 @@ function $r() {
546
546
  return e == null ? [] : (e = Object(e), I(wt(e), function(r) {
547
547
  return yt.call(e, r);
548
548
  }));
549
- } : Br, Me = $e;
550
- (it && Me(new it(new ArrayBuffer(1))) != t || je && Me(new je()) != q || ot && Me(ot.resolve()) != z || st && Me(new st()) != b || ft && Me(new ft()) != w) && (Me = function(e) {
551
- var r = $e(e), v = r == V ? e.constructor : void 0, m = v ? Pe(v) : "";
549
+ } : Br, Me = Fe;
550
+ (it && Me(new it(new ArrayBuffer(1))) != t || Ue && Me(new Ue()) != q || ot && Me(ot.resolve()) != z || st && Me(new st()) != b || ft && Me(new ft()) != w) && (Me = function(e) {
551
+ var r = Fe(e), v = r == Q ? e.constructor : void 0, m = v ? Pe(v) : "";
552
552
  if (m)
553
553
  switch (m) {
554
554
  case Ht:
@@ -600,7 +600,7 @@ function $r() {
600
600
  var Pr = bt(/* @__PURE__ */ function() {
601
601
  return arguments;
602
602
  }()) ? bt : function(e) {
603
- return Fe(e) && be.call(e, "callee") && !yt.call(e, "callee");
603
+ return He(e) && be.call(e, "callee") && !yt.call(e, "callee");
604
604
  }, et = Array.isArray;
605
605
  function Dr(e) {
606
606
  return e != null && Mt(e.length) && !Ct(e);
@@ -612,7 +612,7 @@ function $r() {
612
612
  function Ct(e) {
613
613
  if (!It(e))
614
614
  return !1;
615
- var r = $e(e);
615
+ var r = Fe(e);
616
616
  return r == D || r == H || r == d || r == E;
617
617
  }
618
618
  function Mt(e) {
@@ -622,7 +622,7 @@ function $r() {
622
622
  var r = typeof e;
623
623
  return e != null && (r == "object" || r == "function");
624
624
  }
625
- function Fe(e) {
625
+ function He(e) {
626
626
  return e != null && typeof e == "object";
627
627
  }
628
628
  var Et = R ? le(R) : br;
@@ -635,15 +635,15 @@ function $r() {
635
635
  function Nr() {
636
636
  return !1;
637
637
  }
638
- G.exports = Sr;
639
- }(He, He.exports)), He.exports;
638
+ V.exports = Sr;
639
+ }(Qe, Qe.exports)), Qe.exports;
640
640
  }
641
641
  var vt = { exports: {} }, St;
642
642
  function Fr() {
643
- return St || (St = 1, function(G, X) {
643
+ return St || (St = 1, function(V, X) {
644
644
  var ie = function() {
645
645
  var W = function(o, b) {
646
- var c = 236, y = 17, f = o, w = Y[b], n = null, t = 0, g = null, i = [], p = {}, L = function(s, u) {
646
+ var c = 236, y = 17, f = o, w = Z[b], n = null, t = 0, g = null, i = [], p = {}, L = function(s, u) {
647
647
  t = f * 4 + 17, n = function(a) {
648
648
  for (var l = new Array(a), h = 0; h < a; h += 1) {
649
649
  l[h] = new Array(a);
@@ -651,7 +651,7 @@ function Fr() {
651
651
  l[h][_] = null;
652
652
  }
653
653
  return l;
654
- }(t), T(0, 0), T(t - 7, 0), T(0, t - 7), re(), j(), S(s, u), f >= 7 && oe(s), g == null && (g = Q(f, w, i)), k(g, u);
654
+ }(t), T(0, 0), T(t - 7, 0), T(0, t - 7), re(), $(), S(s, u), f >= 7 && oe(s), g == null && (g = G(f, w, i)), k(g, u);
655
655
  }, T = function(s, u) {
656
656
  for (var a = -1; a <= 7; a += 1)
657
657
  if (!(s + a <= -1 || t <= s + a))
@@ -664,7 +664,7 @@ function Fr() {
664
664
  (a == 0 || s > l) && (s = l, u = a);
665
665
  }
666
666
  return u;
667
- }, j = function() {
667
+ }, $ = function() {
668
668
  for (var s = 8; s < t - 8; s += 1)
669
669
  n[s][6] == null && (n[s][6] = s % 2 == 0);
670
670
  for (var u = 8; u < t - 8; u += 1)
@@ -700,12 +700,12 @@ function Fr() {
700
700
  }, k = function(s, u) {
701
701
  for (var a = -1, l = t - 1, h = 7, _ = 0, R = M.getMaskFunction(u), I = t - 1; I > 0; I -= 2)
702
702
  for (I == 6 && (I -= 1); ; ) {
703
- for (var J = 0; J < 2; J += 1)
704
- if (n[l][I - J] == null) {
703
+ for (var Y = 0; Y < 2; Y += 1)
704
+ if (n[l][I - Y] == null) {
705
705
  var ee = !1;
706
706
  _ < s.length && (ee = (s[_] >>> h & 1) == 1);
707
- var N = R(l, I - J);
708
- N && (ee = !ee), n[l][I - J] = ee, h -= 1, h == -1 && (_ += 1, h = 7);
707
+ var N = R(l, I - Y);
708
+ N && (ee = !ee), n[l][I - Y] = ee, h -= 1, h == -1 && (_ += 1, h = 7);
709
709
  }
710
710
  if (l += a, l < 0 || t <= l) {
711
711
  l -= a, a = -a;
@@ -714,11 +714,11 @@ function Fr() {
714
714
  }
715
715
  }, ue = function(s, u) {
716
716
  for (var a = 0, l = 0, h = 0, _ = new Array(u.length), R = new Array(u.length), I = 0; I < u.length; I += 1) {
717
- var J = u[I].dataCount, ee = u[I].totalCount - J;
718
- l = Math.max(l, J), h = Math.max(h, ee), _[I] = new Array(J);
717
+ var Y = u[I].dataCount, ee = u[I].totalCount - Y;
718
+ l = Math.max(l, Y), h = Math.max(h, ee), _[I] = new Array(Y);
719
719
  for (var N = 0; N < _[I].length; N += 1)
720
720
  _[I][N] = 255 & s.getBuffer()[N + a];
721
- a += J;
721
+ a += Y;
722
722
  var le = M.getErrorCorrectPolynomial(ee), ve = d(_[I], le.getLength() - 1), Se = ve.mod(le);
723
723
  R[I] = new Array(le.getLength() - 1);
724
724
  for (var N = 0; N < R[I].length; N += 1) {
@@ -728,14 +728,14 @@ function Fr() {
728
728
  }
729
729
  for (var We = 0, N = 0; N < u.length; N += 1)
730
730
  We += u[N].totalCount;
731
- for (var qe = new Array(We), Be = 0, N = 0; N < l; N += 1)
731
+ for (var je = new Array(We), Be = 0, N = 0; N < l; N += 1)
732
732
  for (var I = 0; I < u.length; I += 1)
733
- N < _[I].length && (qe[Be] = _[I][N], Be += 1);
733
+ N < _[I].length && (je[Be] = _[I][N], Be += 1);
734
734
  for (var N = 0; N < h; N += 1)
735
735
  for (var I = 0; I < u.length; I += 1)
736
- N < R[I].length && (qe[Be] = R[I][N], Be += 1);
737
- return qe;
738
- }, Q = function(s, u, a) {
736
+ N < R[I].length && (je[Be] = R[I][N], Be += 1);
737
+ return je;
738
+ }, G = function(s, u, a) {
739
739
  for (var l = A.getRSBlocks(s, u), h = C(), _ = 0; _ < a.length; _ += 1) {
740
740
  var R = a[_];
741
741
  h.put(R.getMode(), 4), h.put(R.getLength(), M.getLengthInBits(R.getMode(), s)), R.write(h);
@@ -755,7 +755,7 @@ function Fr() {
755
755
  var a = null;
756
756
  switch (u) {
757
757
  case "Numeric":
758
- a = $(s);
758
+ a = j(s);
759
759
  break;
760
760
  case "Alphanumeric":
761
761
  a = D(s);
@@ -805,18 +805,18 @@ function Fr() {
805
805
  }, p.createSvgTag = function(s, u, a, l) {
806
806
  var h = {};
807
807
  typeof arguments[0] == "object" && (h = arguments[0], s = h.cellSize, u = h.margin, a = h.alt, l = h.title), s = s || 2, u = typeof u > "u" ? s * 4 : u, a = typeof a == "string" ? { text: a } : a || {}, a.text = a.text || null, a.id = a.text ? a.id || "qrcode-description" : null, l = typeof l == "string" ? { text: l } : l || {}, l.text = l.text || null, l.id = l.text ? l.id || "qrcode-title" : null;
808
- var _ = p.getModuleCount() * s + u * 2, R, I, J, ee, N = "", le;
809
- for (le = "l" + s + ",0 0," + s + " -" + s + ",0 0,-" + s + "z ", N += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', N += h.scalable ? "" : ' width="' + _ + 'px" height="' + _ + 'px"', N += ' viewBox="0 0 ' + _ + " " + _ + '" ', N += ' preserveAspectRatio="xMinYMin meet"', N += l.text || a.text ? ' role="img" aria-labelledby="' + se([l.id, a.id].join(" ").trim()) + '"' : "", N += ">", N += l.text ? '<title id="' + se(l.id) + '">' + se(l.text) + "</title>" : "", N += a.text ? '<description id="' + se(a.id) + '">' + se(a.text) + "</description>" : "", N += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', N += '<path d="', J = 0; J < p.getModuleCount(); J += 1)
810
- for (ee = J * s + u, R = 0; R < p.getModuleCount(); R += 1)
811
- p.isDark(J, R) && (I = R * s + u, N += "M" + I + "," + ee + le);
808
+ var _ = p.getModuleCount() * s + u * 2, R, I, Y, ee, N = "", le;
809
+ for (le = "l" + s + ",0 0," + s + " -" + s + ",0 0,-" + s + "z ", N += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', N += h.scalable ? "" : ' width="' + _ + 'px" height="' + _ + 'px"', N += ' viewBox="0 0 ' + _ + " " + _ + '" ', N += ' preserveAspectRatio="xMinYMin meet"', N += l.text || a.text ? ' role="img" aria-labelledby="' + se([l.id, a.id].join(" ").trim()) + '"' : "", N += ">", N += l.text ? '<title id="' + se(l.id) + '">' + se(l.text) + "</title>" : "", N += a.text ? '<description id="' + se(a.id) + '">' + se(a.text) + "</description>" : "", N += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', N += '<path d="', Y = 0; Y < p.getModuleCount(); Y += 1)
810
+ for (ee = Y * s + u, R = 0; R < p.getModuleCount(); R += 1)
811
+ p.isDark(Y, R) && (I = R * s + u, N += "M" + I + "," + ee + le);
812
812
  return N += '" stroke="transparent" fill="black"/>', N += "</svg>", N;
813
813
  }, p.createDataURL = function(s, u) {
814
814
  s = s || 2, u = typeof u > "u" ? s * 4 : u;
815
815
  var a = p.getModuleCount() * s + u * 2, l = u, h = a - u;
816
816
  return E(a, a, function(_, R) {
817
817
  if (l <= _ && _ < h && l <= R && R < h) {
818
- var I = Math.floor((_ - l) / s), J = Math.floor((R - l) / s);
819
- return p.isDark(J, I) ? 0 : 1;
818
+ var I = Math.floor((_ - l) / s), Y = Math.floor((R - l) / s);
819
+ return p.isDark(Y, I) ? 0 : 1;
820
820
  } else
821
821
  return 1;
822
822
  });
@@ -850,7 +850,7 @@ function Fr() {
850
850
  }, _e = function(s) {
851
851
  var u = 1;
852
852
  s = typeof s > "u" ? u * 2 : s;
853
- var a = p.getModuleCount() * u + s * 2, l = s, h = a - s, _, R, I, J, ee, N = {
853
+ var a = p.getModuleCount() * u + s * 2, l = s, h = a - s, _, R, I, Y, ee, N = {
854
854
  "██": "█",
855
855
  "█ ": "▀",
856
856
  " █": "▄",
@@ -862,8 +862,8 @@ function Fr() {
862
862
  " ": " "
863
863
  }, ve = "";
864
864
  for (_ = 0; _ < a; _ += 2) {
865
- for (I = Math.floor((_ - l) / u), J = Math.floor((_ + 1 - l) / u), R = 0; R < a; R += 1)
866
- ee = "█", l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / u)) && (ee = " "), l <= R && R < h && l <= _ + 1 && _ + 1 < h && p.isDark(J, Math.floor((R - l) / u)) ? ee += " " : ee += "█", ve += s < 1 && _ + 1 >= h ? le[ee] : N[ee];
865
+ for (I = Math.floor((_ - l) / u), Y = Math.floor((_ + 1 - l) / u), R = 0; R < a; R += 1)
866
+ ee = "█", l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / u)) && (ee = " "), l <= R && R < h && l <= _ + 1 && _ + 1 < h && p.isDark(Y, Math.floor((R - l) / u)) ? ee += " " : ee += "█", ve += s < 1 && _ + 1 >= h ? le[ee] : N[ee];
867
867
  ve += `
868
868
  `;
869
869
  }
@@ -873,10 +873,10 @@ function Fr() {
873
873
  if (s = s || 1, s < 2)
874
874
  return _e(u);
875
875
  s -= 1, u = typeof u > "u" ? s * 2 : u;
876
- var a = p.getModuleCount() * s + u * 2, l = u, h = a - u, _, R, I, J, ee = Array(s + 1).join("██"), N = Array(s + 1).join(" "), le = "", ve = "";
876
+ var a = p.getModuleCount() * s + u * 2, l = u, h = a - u, _, R, I, Y, ee = Array(s + 1).join("██"), N = Array(s + 1).join(" "), le = "", ve = "";
877
877
  for (_ = 0; _ < a; _ += 1) {
878
878
  for (I = Math.floor((_ - l) / s), ve = "", R = 0; R < a; R += 1)
879
- J = 1, l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / s)) && (J = 0), ve += J ? ee : N;
879
+ Y = 1, l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / s)) && (Y = 0), ve += Y ? ee : N;
880
880
  for (I = 0; I < s; I += 1)
881
881
  le += ve + `
882
882
  `;
@@ -899,10 +899,10 @@ function Fr() {
899
899
  }
900
900
  }, W.stringToBytes = W.stringToBytesFuncs.default, W.createStringToBytes = function(o, b) {
901
901
  var c = function() {
902
- for (var f = V(o), w = function() {
903
- var j = f.read();
904
- if (j == -1) throw "eof";
905
- return j;
902
+ for (var f = Q(o), w = function() {
903
+ var $ = f.read();
904
+ if ($ == -1) throw "eof";
905
+ return $;
906
906
  }, n = 0, t = {}; ; ) {
907
907
  var g = f.read();
908
908
  if (g == -1) break;
@@ -931,7 +931,7 @@ function Fr() {
931
931
  MODE_ALPHA_NUM: 2,
932
932
  MODE_8BIT_BYTE: 4,
933
933
  MODE_KANJI: 8
934
- }, Y = {
934
+ }, Z = {
935
935
  L: 1,
936
936
  M: 0,
937
937
  Q: 3,
@@ -1090,8 +1090,8 @@ function Fr() {
1090
1090
  for (var p = 0; p < t; p += 1) {
1091
1091
  for (var L = 0, T = n.isDark(i, p), K = -1; K <= 1; K += 1)
1092
1092
  if (!(i + K < 0 || t <= i + K))
1093
- for (var j = -1; j <= 1; j += 1)
1094
- p + j < 0 || t <= p + j || K == 0 && j == 0 || T == n.isDark(i + K, p + j) && (L += 1);
1093
+ for (var $ = -1; $ <= 1; $ += 1)
1094
+ p + $ < 0 || t <= p + $ || K == 0 && $ == 0 || T == n.isDark(i + K, p + $) && (L += 1);
1095
1095
  L > 5 && (g += 3 + L - 5);
1096
1096
  }
1097
1097
  for (var i = 0; i < t - 1; i += 1)
@@ -1371,13 +1371,13 @@ function Fr() {
1371
1371
  return n.totalCount = f, n.dataCount = w, n;
1372
1372
  }, c = {}, y = function(f, w) {
1373
1373
  switch (w) {
1374
- case Y.L:
1374
+ case Z.L:
1375
1375
  return o[(f - 1) * 4 + 0];
1376
- case Y.M:
1376
+ case Z.M:
1377
1377
  return o[(f - 1) * 4 + 1];
1378
- case Y.Q:
1378
+ case Z.Q:
1379
1379
  return o[(f - 1) * 4 + 2];
1380
- case Y.H:
1380
+ case Z.H:
1381
1381
  return o[(f - 1) * 4 + 3];
1382
1382
  default:
1383
1383
  return;
@@ -1408,7 +1408,7 @@ function Fr() {
1408
1408
  var f = Math.floor(b / 8);
1409
1409
  o.length <= f && o.push(0), y && (o[f] |= 128 >>> b % 8), b += 1;
1410
1410
  }, c;
1411
- }, $ = function(o) {
1411
+ }, j = function(o) {
1412
1412
  var b = O.MODE_NUMBER, c = o, y = {};
1413
1413
  y.getMode = function() {
1414
1414
  return b;
@@ -1532,7 +1532,7 @@ function Fr() {
1532
1532
  y > 0 && (c += ","), c += o[y];
1533
1533
  return c += "]", c;
1534
1534
  }, b;
1535
- }, Z = function() {
1535
+ }, J = function() {
1536
1536
  var o = 0, b = 0, c = 0, y = "", f = {}, w = function(t) {
1537
1537
  y += String.fromCharCode(n(t & 63));
1538
1538
  }, n = function(t) {
@@ -1560,7 +1560,7 @@ function Fr() {
1560
1560
  }, f.toString = function() {
1561
1561
  return y;
1562
1562
  }, f;
1563
- }, V = function(o) {
1563
+ }, Q = function(o) {
1564
1564
  var b = o, c = 0, y = 0, f = 0, w = {};
1565
1565
  w.read = function() {
1566
1566
  for (; f < 8; ) {
@@ -1607,18 +1607,18 @@ function Fr() {
1607
1607
  };
1608
1608
  var n = function(i) {
1609
1609
  var p = i, L = 0, T = 0, K = {};
1610
- return K.write = function(j, re) {
1611
- if (j >>> re)
1610
+ return K.write = function($, re) {
1611
+ if ($ >>> re)
1612
1612
  throw "length over";
1613
1613
  for (; L + re >= 8; )
1614
- p.writeByte(255 & (j << L | T)), re -= 8 - L, j >>>= 8 - L, T = 0, L = 0;
1615
- T = j << L | T, L = L + re;
1614
+ p.writeByte(255 & ($ << L | T)), re -= 8 - L, $ >>>= 8 - L, T = 0, L = 0;
1615
+ T = $ << L | T, L = L + re;
1616
1616
  }, K.flush = function() {
1617
1617
  L > 0 && p.writeByte(T);
1618
1618
  }, K;
1619
1619
  }, t = function(i) {
1620
- for (var p = 1 << i, L = (1 << i) + 1, T = i + 1, K = g(), j = 0; j < p; j += 1)
1621
- K.add(String.fromCharCode(j));
1620
+ for (var p = 1 << i, L = (1 << i) + 1, T = i + 1, K = g(), $ = 0; $ < p; $ += 1)
1621
+ K.add(String.fromCharCode($));
1622
1622
  K.add(String.fromCharCode(p)), K.add(String.fromCharCode(L));
1623
1623
  var re = B(), oe = n(re);
1624
1624
  oe.write(p, T);
@@ -1649,7 +1649,7 @@ function Fr() {
1649
1649
  y.setPixel(w, f, c(w, f));
1650
1650
  var n = B();
1651
1651
  y.write(n);
1652
- for (var t = Z(), g = n.toByteArray(), i = 0; i < g.length; i += 1)
1652
+ for (var t = J(), g = n.toByteArray(), i = 0; i < g.length; i += 1)
1653
1653
  t.writeByte(g[i]);
1654
1654
  return t.flush(), "data:image/gif;base64," + t;
1655
1655
  };
@@ -1657,9 +1657,9 @@ function Fr() {
1657
1657
  }();
1658
1658
  (function() {
1659
1659
  ie.stringToBytesFuncs["UTF-8"] = function(W) {
1660
- function O(Y) {
1661
- for (var U = [], M = 0; M < Y.length; M++) {
1662
- var x = Y.charCodeAt(M);
1660
+ function O(Z) {
1661
+ for (var U = [], M = 0; M < Z.length; M++) {
1662
+ var x = Z.charCodeAt(M);
1663
1663
  x < 128 ? U.push(x) : x < 2048 ? U.push(
1664
1664
  192 | x >> 6,
1665
1665
  128 | x & 63
@@ -1667,7 +1667,7 @@ function Fr() {
1667
1667
  224 | x >> 12,
1668
1668
  128 | x >> 6 & 63,
1669
1669
  128 | x & 63
1670
- ) : (M++, x = 65536 + ((x & 1023) << 10 | Y.charCodeAt(M) & 1023), U.push(
1670
+ ) : (M++, x = 65536 + ((x & 1023) << 10 | Z.charCodeAt(M) & 1023), U.push(
1671
1671
  240 | x >> 18,
1672
1672
  128 | x >> 12 & 63,
1673
1673
  128 | x >> 6 & 63,
@@ -1679,7 +1679,7 @@ function Fr() {
1679
1679
  return O(W);
1680
1680
  };
1681
1681
  })(), function(W) {
1682
- G.exports = W();
1682
+ V.exports = W();
1683
1683
  }(function() {
1684
1684
  return ie;
1685
1685
  });
@@ -1689,7 +1689,7 @@ var kt;
1689
1689
  function Hr() {
1690
1690
  if (kt) return Te;
1691
1691
  kt = 1;
1692
- var G = Te && Te.__extends || /* @__PURE__ */ function() {
1692
+ var V = Te && Te.__extends || /* @__PURE__ */ function() {
1693
1693
  var U = function(M, x) {
1694
1694
  return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, A) {
1695
1695
  d.__proto__ = A;
@@ -1716,10 +1716,10 @@ function Hr() {
1716
1716
  }, X.apply(this, arguments);
1717
1717
  };
1718
1718
  Object.defineProperty(Te, "__esModule", { value: !0 }), Te.QRCode = void 0;
1719
- var ie = $r(), W = Fr(), O = Bt, Y = (
1719
+ var ie = $r(), W = Fr(), O = Bt, Z = (
1720
1720
  /** @class */
1721
1721
  function(U) {
1722
- G(M, U);
1722
+ V(M, U);
1723
1723
  function M(x) {
1724
1724
  var d = U.call(this, x) || this;
1725
1725
  return d.canvasRef = O.createRef(), d;
@@ -1739,38 +1739,38 @@ function Hr() {
1739
1739
  A = "image/png";
1740
1740
  break;
1741
1741
  }
1742
- var C = this.canvasRef.current.toDataURL(A, 1), $ = document.createElement("a");
1743
- $.download = d ?? "react-qrcode-logo", $.href = C, $.click();
1742
+ var C = this.canvasRef.current.toDataURL(A, 1), j = document.createElement("a");
1743
+ j.download = d ?? "react-qrcode-logo", j.href = C, j.click();
1744
1744
  }
1745
1745
  }, M.prototype.utf16to8 = function(x) {
1746
- var d = "", A, C, $ = x.length;
1747
- for (A = 0; A < $; A++)
1746
+ var d = "", A, C, j = x.length;
1747
+ for (A = 0; A < j; A++)
1748
1748
  C = x.charCodeAt(A), C >= 1 && C <= 127 ? d += x.charAt(A) : C > 2047 ? (d += String.fromCharCode(224 | C >> 12 & 15), d += String.fromCharCode(128 | C >> 6 & 63), d += String.fromCharCode(128 | C >> 0 & 63)) : (d += String.fromCharCode(192 | C >> 6 & 31), d += String.fromCharCode(128 | C >> 0 & 63));
1749
1749
  return d;
1750
- }, M.prototype.drawRoundedSquare = function(x, d, A, C, $, D, H, q) {
1751
- q.lineWidth = x, q.fillStyle = $, q.strokeStyle = $, A += x / 2, d += x / 2, C -= x, Array.isArray(D) || (D = [D, D, D, D]), D = D.map(function(E) {
1750
+ }, M.prototype.drawRoundedSquare = function(x, d, A, C, j, D, H, q) {
1751
+ q.lineWidth = x, q.fillStyle = j, q.strokeStyle = j, A += x / 2, d += x / 2, C -= x, Array.isArray(D) || (D = [D, D, D, D]), D = D.map(function(E) {
1752
1752
  return E = Math.min(E, C / 2), E < 0 ? 0 : E;
1753
1753
  });
1754
- var B = D[0] || 0, Z = D[1] || 0, V = D[2] || 0, z = D[3] || 0;
1755
- q.beginPath(), q.moveTo(d + B, A), q.lineTo(d + C - Z, A), Z && q.quadraticCurveTo(d + C, A, d + C, A + Z), q.lineTo(d + C, A + C - V), V && q.quadraticCurveTo(d + C, A + C, d + C - V, A + C), q.lineTo(d + z, A + C), z && q.quadraticCurveTo(d, A + C, d, A + C - z), q.lineTo(d, A + B), B && q.quadraticCurveTo(d, A, d + B, A), q.closePath(), q.stroke(), H && q.fill();
1756
- }, M.prototype.drawPositioningPattern = function(x, d, A, C, $, D, H) {
1754
+ var B = D[0] || 0, J = D[1] || 0, Q = D[2] || 0, z = D[3] || 0;
1755
+ q.beginPath(), q.moveTo(d + B, A), q.lineTo(d + C - J, A), J && q.quadraticCurveTo(d + C, A, d + C, A + J), q.lineTo(d + C, A + C - Q), Q && q.quadraticCurveTo(d + C, A + C, d + C - Q, A + C), q.lineTo(d + z, A + C), z && q.quadraticCurveTo(d, A + C, d, A + C - z), q.lineTo(d, A + B), B && q.quadraticCurveTo(d, A, d + B, A), q.closePath(), q.stroke(), H && q.fill();
1756
+ }, M.prototype.drawPositioningPattern = function(x, d, A, C, j, D, H) {
1757
1757
  H === void 0 && (H = [0, 0, 0, 0]);
1758
- var q = Math.ceil(d), B, Z;
1759
- typeof H != "number" && !Array.isArray(H) ? (B = H.outer || 0, Z = H.inner || 0) : (B = H, Z = B);
1760
- var V, z;
1761
- typeof D != "string" ? (V = D.outer, z = D.inner) : (V = D, z = D);
1762
- var E = C * d + A, o = $ * d + A, b = d * 7;
1763
- this.drawRoundedSquare(q, o, E, b, V, B, !1, x), b = d * 3, E += d * 2, o += d * 2, this.drawRoundedSquare(q, o, E, b, z, Z, !0, x);
1758
+ var q = Math.ceil(d), B, J;
1759
+ typeof H != "number" && !Array.isArray(H) ? (B = H.outer || 0, J = H.inner || 0) : (B = H, J = B);
1760
+ var Q, z;
1761
+ typeof D != "string" ? (Q = D.outer, z = D.inner) : (Q = D, z = D);
1762
+ var E = C * d + A, o = j * d + A, b = d * 7;
1763
+ this.drawRoundedSquare(q, o, E, b, Q, B, !1, x), b = d * 3, E += d * 2, o += d * 2, this.drawRoundedSquare(q, o, E, b, z, J, !0, x);
1764
1764
  }, M.prototype.isInPositioninZone = function(x, d, A) {
1765
1765
  return A.some(function(C) {
1766
1766
  return d >= C.row && d <= C.row + 7 && x >= C.col && x <= C.col + 7;
1767
1767
  });
1768
1768
  }, M.prototype.transformPixelLengthIntoNumberOfCells = function(x, d) {
1769
1769
  return x / d;
1770
- }, M.prototype.isCoordinateInImage = function(x, d, A, C, $, D, H, q) {
1770
+ }, M.prototype.isCoordinateInImage = function(x, d, A, C, j, D, H, q) {
1771
1771
  if (q) {
1772
- var B = 2, Z = this.transformPixelLengthIntoNumberOfCells($, H), V = this.transformPixelLengthIntoNumberOfCells(D, H), z = this.transformPixelLengthIntoNumberOfCells(A, H) - 1, E = this.transformPixelLengthIntoNumberOfCells(C, H) - 1;
1773
- return d >= Z - B && d <= Z + z + B && x >= V - B && x <= V + E + B;
1772
+ var B = 2, J = this.transformPixelLengthIntoNumberOfCells(j, H), Q = this.transformPixelLengthIntoNumberOfCells(D, H), z = this.transformPixelLengthIntoNumberOfCells(A, H) - 1, E = this.transformPixelLengthIntoNumberOfCells(C, H) - 1;
1773
+ return d >= J - B && d <= J + z + B && x >= Q - B && x <= Q + E + B;
1774
1774
  } else
1775
1775
  return !1;
1776
1776
  }, M.prototype.shouldComponentUpdate = function(x) {
@@ -1780,11 +1780,11 @@ function Hr() {
1780
1780
  }, M.prototype.componentDidUpdate = function() {
1781
1781
  this.update();
1782
1782
  }, M.prototype.update = function() {
1783
- var x, d = this.props, A = d.value, C = d.ecLevel, $ = d.enableCORS, D = d.bgColor, H = d.fgColor, q = d.logoImage, B = d.logoOpacity, Z = d.logoOnLoad, V = d.removeQrCodeBehindLogo, z = d.qrStyle, E = d.eyeRadius, o = d.eyeColor, b = d.logoPaddingStyle, c = +this.props.size, y = +this.props.quietZone, f = this.props.logoWidth ? +this.props.logoWidth : 0, w = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = W(0, C);
1783
+ var x, d = this.props, A = d.value, C = d.ecLevel, j = d.enableCORS, D = d.bgColor, H = d.fgColor, q = d.logoImage, B = d.logoOpacity, J = d.logoOnLoad, Q = d.removeQrCodeBehindLogo, z = d.qrStyle, E = d.eyeRadius, o = d.eyeColor, b = d.logoPaddingStyle, c = +this.props.size, y = +this.props.quietZone, f = this.props.logoWidth ? +this.props.logoWidth : 0, w = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = W(0, C);
1784
1784
  t.addData(this.utf16to8(A)), t.make();
1785
1785
  var g = (x = this.canvasRef) === null || x === void 0 ? void 0 : x.current, i = g.getContext("2d"), p = c + 2 * y, L = t.getModuleCount(), T = c / L, K = window.devicePixelRatio || 1;
1786
1786
  g.height = g.width = p * K, i.scale(K, K), i.fillStyle = D, i.fillRect(0, 0, p, p);
1787
- var j = y, re = [
1787
+ var $ = y, re = [
1788
1788
  { row: 0, col: 0 },
1789
1789
  { row: 0, col: L - 7 },
1790
1790
  { row: L - 7, col: 0 }
@@ -1793,43 +1793,43 @@ function Hr() {
1793
1793
  i.fillStyle = H;
1794
1794
  for (var oe = T / 2, S = 0; S < L; S++)
1795
1795
  for (var k = 0; k < L; k++)
1796
- t.isDark(S, k) && !this.isInPositioninZone(S, k, re) && (i.beginPath(), i.arc(Math.round(k * T) + oe + j, Math.round(S * T) + oe + j, oe / 100 * 75, 0, 2 * Math.PI, !1), i.closePath(), i.fill());
1796
+ t.isDark(S, k) && !this.isInPositioninZone(S, k, re) && (i.beginPath(), i.arc(Math.round(k * T) + oe + $, Math.round(S * T) + oe + $, oe / 100 * 75, 0, 2 * Math.PI, !1), i.closePath(), i.fill());
1797
1797
  } else if (z === "fluid") {
1798
1798
  for (var oe = Math.ceil(T / 2), S = 0; S < L; S++)
1799
1799
  for (var k = 0; k < L; k++)
1800
1800
  if (t.isDark(S, k) && !this.isInPositioninZone(S, k, re)) {
1801
1801
  var ue = [!1, !1, !1, !1];
1802
1802
  S > 0 && !t.isDark(S - 1, k) && k > 0 && !t.isDark(S, k - 1) && (ue[0] = !0), S > 0 && !t.isDark(S - 1, k) && k < L - 1 && !t.isDark(S, k + 1) && (ue[1] = !0), S < L - 1 && !t.isDark(S + 1, k) && k < L - 1 && !t.isDark(S, k + 1) && (ue[2] = !0), S < L - 1 && !t.isDark(S + 1, k) && k > 0 && !t.isDark(S, k - 1) && (ue[3] = !0);
1803
- var Q = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1804
- i.fillStyle = H, i.beginPath(), i.arc(Math.round(k * T) + oe + j, Math.round(S * T) + oe + j, oe, 0, 2 * Math.PI, !1), i.closePath(), i.fill(), ue[0] || i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j, Q / 2, se / 2), ue[1] || i.fillRect(Math.round(k * T) + j + Math.floor(Q / 2), Math.round(S * T) + j, Q / 2, se / 2), ue[2] || i.fillRect(Math.round(k * T) + j + Math.floor(Q / 2), Math.round(S * T) + j + Math.floor(se / 2), Q / 2, se / 2), ue[3] || i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j + Math.floor(se / 2), Q / 2, se / 2);
1803
+ var G = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1804
+ i.fillStyle = H, i.beginPath(), i.arc(Math.round(k * T) + oe + $, Math.round(S * T) + oe + $, oe, 0, 2 * Math.PI, !1), i.closePath(), i.fill(), ue[0] || i.fillRect(Math.round(k * T) + $, Math.round(S * T) + $, G / 2, se / 2), ue[1] || i.fillRect(Math.round(k * T) + $ + Math.floor(G / 2), Math.round(S * T) + $, G / 2, se / 2), ue[2] || i.fillRect(Math.round(k * T) + $ + Math.floor(G / 2), Math.round(S * T) + $ + Math.floor(se / 2), G / 2, se / 2), ue[3] || i.fillRect(Math.round(k * T) + $, Math.round(S * T) + $ + Math.floor(se / 2), G / 2, se / 2);
1805
1805
  }
1806
1806
  } else
1807
1807
  for (var S = 0; S < L; S++)
1808
1808
  for (var k = 0; k < L; k++)
1809
1809
  if (t.isDark(S, k) && !this.isInPositioninZone(S, k, re)) {
1810
1810
  i.fillStyle = H;
1811
- var Q = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1812
- i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j, Q, se);
1811
+ var G = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1812
+ i.fillRect(Math.round(k * T) + $, Math.round(S * T) + $, G, se);
1813
1813
  }
1814
1814
  for (var _e = 0; _e < 3; _e++) {
1815
1815
  var s = re[_e], S = s.row, k = s.col, u = E, a = void 0;
1816
- Array.isArray(u) && (u = u[_e]), typeof u == "number" && (u = [u, u, u, u]), o ? Array.isArray(o) ? a = o[_e] : a = o : a = H, this.drawPositioningPattern(i, T, j, S, k, a, u);
1816
+ Array.isArray(u) && (u = u[_e]), typeof u == "number" && (u = [u, u, u, u]), o ? Array.isArray(o) ? a = o[_e] : a = o : a = H, this.drawPositioningPattern(i, T, $, S, k, a, u);
1817
1817
  }
1818
1818
  if (q) {
1819
1819
  var l = new Image();
1820
- $ && (l.crossOrigin = "Anonymous"), l.onload = function(h) {
1820
+ j && (l.crossOrigin = "Anonymous"), l.onload = function(h) {
1821
1821
  i.save();
1822
- var _ = f || c * 0.2, R = w || _, I = (c - _) / 2, J = (c - R) / 2;
1823
- if (V || n) {
1822
+ var _ = f || c * 0.2, R = w || _, I = (c - _) / 2, Y = (c - R) / 2;
1823
+ if (Q || n) {
1824
1824
  i.beginPath(), i.strokeStyle = D, i.fillStyle = D;
1825
- var ee = _ + 2 * n, N = R + 2 * n, le = I + j - n, ve = J + j - n;
1825
+ var ee = _ + 2 * n, N = R + 2 * n, le = I + $ - n, ve = Y + $ - n;
1826
1826
  if (b === "circle") {
1827
1827
  var Se = le + ee / 2, ke = ve + N / 2;
1828
1828
  i.ellipse(Se, ke, ee / 2, N / 2, 0, 0, 2 * Math.PI), i.stroke(), i.fill();
1829
1829
  } else
1830
1830
  i.fillRect(le, ve, ee, N);
1831
1831
  }
1832
- i.globalAlpha = B, i.drawImage(l, I + j, J + j, _, R), i.restore(), Z && Z(h);
1832
+ i.globalAlpha = B, i.drawImage(l, I + $, Y + $, _, R), i.restore(), J && J(h);
1833
1833
  }, l.src = q;
1834
1834
  }
1835
1835
  }, M.prototype.render = function() {
@@ -1850,7 +1850,7 @@ function Hr() {
1850
1850
  }, M;
1851
1851
  }(O.Component)
1852
1852
  );
1853
- return Te.QRCode = Y, Te;
1853
+ return Te.QRCode = Z, Te;
1854
1854
  }
1855
1855
  var Nt = Hr();
1856
1856
  const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v-justify-center", children: [
@@ -1906,51 +1906,27 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1906
1906
  }
1907
1907
  ` })
1908
1908
  ] }), Kr = ({
1909
- title: G,
1909
+ title: V,
1910
1910
  containerClass: X
1911
1911
  }) => {
1912
- const ie = (/* @__PURE__ */ new Date()).getFullYear(), [W, O] = ge(""), [Y, U] = ge(""), [M, x] = ge(!1), {
1912
+ const ie = (/* @__PURE__ */ new Date()).getFullYear(), [W, O] = ge(""), [Z, U] = ge(""), [M, x] = ge(!1), {
1913
1913
  apiUrl: d,
1914
1914
  clientId: A,
1915
1915
  codeChallenge: C,
1916
- authRequestId: $,
1916
+ authRequestId: j,
1917
1917
  authRequestIdExpires: D,
1918
1918
  setIsAuthenticating: H,
1919
1919
  isAuthenticating: q,
1920
1920
  token: B,
1921
- setAuthError: Z
1922
- } = Ke(Oe);
1923
- Ge(() => {
1924
- if (C && $ && D) {
1925
- const E = D.getTime() / 1e3, o = `c=${C},r=${$},e=${E},a=${A}`;
1921
+ setAuthError: J
1922
+ } = Ke(qe);
1923
+ Ve(() => {
1924
+ if (C && j && D) {
1925
+ const E = D.getTime() / 1e3, o = `c=${C},r=${j},e=${E},a=${A}`;
1926
1926
  U(o);
1927
1927
  }
1928
- }, [A, $, D, C]);
1929
- const V = Ve(async () => {
1930
- x(!0);
1931
- try {
1932
- if (!W) {
1933
- const o = "Invalid login. Email or Abaxx ID is required.";
1934
- window.alert(o), console.error(o);
1935
- return;
1936
- }
1937
- const E = await z({
1938
- alias: W,
1939
- code_challenge: C,
1940
- request_id: $
1941
- });
1942
- if (E != null && E.ok)
1943
- H(!0);
1944
- else if (!(E != null && E.ok) && (E == null ? void 0 : E.message) === "Unable to request auth.") {
1945
- const o = "Invalid login. Please use your existing Email or Abaxx ID.";
1946
- window.alert(o), console.error(o);
1947
- }
1948
- } catch (E) {
1949
- const o = "Something went wrong. Please try again later.";
1950
- window.alert(o), console.error(o), console.log(E);
1951
- }
1952
- x(!1);
1953
- }, [C, $, W, x, H]), z = Ve(
1928
+ }, [A, j, D, C]);
1929
+ const Q = Oe(
1954
1930
  async (E) => {
1955
1931
  try {
1956
1932
  const o = await fetch(
@@ -1965,19 +1941,43 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1965
1941
  }
1966
1942
  ), b = await o.json();
1967
1943
  if (!o.ok || b.ok === !1) {
1968
- Z(
1944
+ J(
1969
1945
  `Auth request failed: ${b.message || o.status}`
1970
1946
  );
1971
1947
  return;
1972
1948
  }
1973
1949
  return b;
1974
1950
  } catch (o) {
1975
- Z(`Auth request failed: ${o}`);
1951
+ J(`Auth request failed: ${o}`);
1976
1952
  }
1977
1953
  },
1978
- [d, A, Z]
1979
- );
1980
- return /* @__PURE__ */ P(Qe, { children: /* @__PURE__ */ he(
1954
+ [d, A, J]
1955
+ ), z = Oe(async () => {
1956
+ x(!0);
1957
+ try {
1958
+ if (!W) {
1959
+ const o = "Invalid login. Email or Abaxx ID is required.";
1960
+ window.alert(o), console.error(o);
1961
+ return;
1962
+ }
1963
+ const E = await Q({
1964
+ alias: W,
1965
+ code_challenge: C,
1966
+ request_id: j
1967
+ });
1968
+ if (E != null && E.ok)
1969
+ H(!0);
1970
+ else if (!(E != null && E.ok) && (E == null ? void 0 : E.message) === "Unable to request auth.") {
1971
+ const o = "Invalid login. Please use your existing Email or Abaxx ID.";
1972
+ window.alert(o), console.error(o);
1973
+ }
1974
+ } catch (E) {
1975
+ const o = "Something went wrong. Please try again later.";
1976
+ window.alert(o), console.error(o), console.log(E);
1977
+ }
1978
+ x(!1);
1979
+ }, [C, j, W, x, H, Q]);
1980
+ return /* @__PURE__ */ P(Ge, { children: /* @__PURE__ */ he(
1981
1981
  "div",
1982
1982
  {
1983
1983
  className: `v-auth-container v-grid v-grid-responsive v-h-screen v-bg-white ${X}`,
@@ -2009,11 +2009,11 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2009
2009
  height: 56
2010
2010
  }
2011
2011
  ),
2012
- !B && !q ? /* @__PURE__ */ he(Qe, { children: [
2013
- /* @__PURE__ */ P("div", { className: "v-mb-8", children: $ && Y ? /* @__PURE__ */ P(
2012
+ !B && !q ? /* @__PURE__ */ he(Ge, { children: [
2013
+ /* @__PURE__ */ P("div", { className: "v-mb-8", children: j && Z ? /* @__PURE__ */ P(
2014
2014
  Nt.QRCode,
2015
2015
  {
2016
- value: Y,
2016
+ value: Z,
2017
2017
  size: 130,
2018
2018
  fgColor: "#e60100",
2019
2019
  qrStyle: "dots",
@@ -2023,7 +2023,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2023
2023
  quietZone: 0
2024
2024
  }
2025
2025
  ) : /* @__PURE__ */ P("div", { className: "v-w-130 v-h-130 v-flex v-items-center v-justify-center", children: /* @__PURE__ */ P(Ot, {}) }) }),
2026
- /* @__PURE__ */ P("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: G || "Verifier+ Login" }),
2026
+ /* @__PURE__ */ P("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: V || "Verifier+ Login" }),
2027
2027
  /* @__PURE__ */ P("p", { className: "v-text-gray-400 v-font-semibold v-mb-6 v-text-sm", children: "Sign in using the latest version of Verifier+ or enter Abaxx ID" }),
2028
2028
  /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2029
2029
  /* @__PURE__ */ P(
@@ -2041,8 +2041,8 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2041
2041
  "button",
2042
2042
  {
2043
2043
  className: "v-button v-h-10 v-w-full v-bg-red v-text-white v-text-base v-font-semibold v-flex v-items-center v-gap-2 v-justify-center",
2044
- disabled: M || !W || !$,
2045
- onClick: V,
2044
+ disabled: M || !W || !j,
2045
+ onClick: z,
2046
2046
  children: [
2047
2047
  M && /* @__PURE__ */ P(
2048
2048
  "svg",
@@ -2082,7 +2082,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2082
2082
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2083
2083
  }
2084
2084
  ),
2085
- B ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2085
+ B ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Ge, { children: [
2086
2086
  /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2087
2087
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2088
2088
  ] })
@@ -2100,46 +2100,46 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2100
2100
  }
2101
2101
  ) });
2102
2102
  }, Wr = ({
2103
- size: G = 130,
2103
+ size: V = 130,
2104
2104
  qrColor: X = "#e60100",
2105
2105
  logoImage: ie = "https://content.abaxx.com/assets/static/qr-logo.png",
2106
2106
  logoWidth: W = 40,
2107
2107
  logoHeight: O = 20,
2108
- quietZone: Y = 0,
2108
+ quietZone: Z = 0,
2109
2109
  containerClass: U = "",
2110
2110
  showStatus: M = !0,
2111
2111
  checkmarkColor: x = "#c40808"
2112
2112
  }) => {
2113
2113
  const [d, A] = ge(""), {
2114
2114
  clientId: C,
2115
- codeChallenge: $,
2115
+ codeChallenge: j,
2116
2116
  authRequestId: D,
2117
2117
  authRequestIdExpires: H,
2118
2118
  isAuthenticating: q,
2119
2119
  token: B
2120
- } = Ke(Oe);
2121
- return Ge(() => {
2122
- if ($ && D && H) {
2123
- const Z = H.getTime() / 1e3, V = `c=${$},r=${D},e=${Z},a=${C}`;
2124
- A(V);
2120
+ } = Ke(qe);
2121
+ return Ve(() => {
2122
+ if (j && D && H) {
2123
+ const J = H.getTime() / 1e3, Q = `c=${j},r=${D},e=${J},a=${C}`;
2124
+ A(Q);
2125
2125
  }
2126
- }, [C, D, H, $]), /* @__PURE__ */ P("div", { className: `v-auth-qr-container ${U}`, children: !B && !q ? /* @__PURE__ */ P("div", { className: "v-qr-wrapper", children: D && d ? /* @__PURE__ */ P(
2126
+ }, [C, D, H, j]), /* @__PURE__ */ P("div", { className: `v-auth-qr-container ${U}`, children: !B && !q ? /* @__PURE__ */ P("div", { className: "v-qr-wrapper", children: D && d ? /* @__PURE__ */ P(
2127
2127
  Nt.QRCode,
2128
2128
  {
2129
2129
  value: d,
2130
- size: G,
2130
+ size: V,
2131
2131
  fgColor: X,
2132
2132
  qrStyle: "dots",
2133
2133
  logoImage: ie,
2134
2134
  logoWidth: W,
2135
2135
  logoHeight: O,
2136
- quietZone: Y
2136
+ quietZone: Z
2137
2137
  }
2138
2138
  ) : /* @__PURE__ */ P(
2139
2139
  "div",
2140
2140
  {
2141
2141
  className: "v-flex v-items-center v-justify-center",
2142
- style: { width: G, height: G },
2142
+ style: { width: V, height: V },
2143
2143
  children: /* @__PURE__ */ P(Ot, {})
2144
2144
  }
2145
2145
  ) }) : M ? /* @__PURE__ */ he("div", { className: "v-fade-in v-flex v-items-center v-flex-col", children: [
@@ -2156,68 +2156,44 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2156
2156
  strokeLinecap: "round",
2157
2157
  strokeLinejoin: "round",
2158
2158
  className: "v-mb-5",
2159
- style: { width: G * 0.6, height: G * 0.6 },
2159
+ style: { width: V * 0.6, height: V * 0.6 },
2160
2160
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2161
2161
  }
2162
2162
  ),
2163
- B ? /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2163
+ B ? /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Ge, { children: [
2164
2164
  /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2165
2165
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2166
2166
  ] })
2167
2167
  ] }) : null });
2168
2168
  }, Zr = ({
2169
- inputPlaceholder: G = "Enter Email or Abaxx ID",
2169
+ inputPlaceholder: V = "Enter Email or Abaxx ID",
2170
2170
  buttonText: X = "Sign In",
2171
2171
  inputHeight: ie = "v-h-10",
2172
2172
  inputWidth: W = "v-w-full",
2173
2173
  inputTextColor: O = "v-text-gray-600",
2174
- inputBorderColor: Y = "v-border-gray-400",
2174
+ inputBorderColor: Z = "v-border-gray-400",
2175
2175
  inputBackgroundColor: U = "v-bg-transparent",
2176
2176
  buttonHeight: M = "v-h-10",
2177
2177
  buttonWidth: x = "v-w-full",
2178
2178
  buttonBackgroundColor: d = "v-bg-red",
2179
2179
  buttonTextColor: A = "v-text-white",
2180
2180
  containerClass: C = "",
2181
- checkmarkColor: $ = "#c40808"
2181
+ checkmarkColor: j = "#c40808"
2182
2182
  }) => {
2183
2183
  const [D, H] = ge(""), [q, B] = ge(!1), {
2184
- apiUrl: Z,
2185
- clientId: V,
2184
+ apiUrl: J,
2185
+ clientId: Q,
2186
2186
  codeChallenge: z,
2187
2187
  authRequestId: E,
2188
2188
  setIsAuthenticating: o,
2189
2189
  setAuthError: b,
2190
2190
  isAuthenticating: c,
2191
2191
  token: y
2192
- } = Ke(Oe), f = Ve(async () => {
2193
- B(!0);
2194
- try {
2195
- if (!D) {
2196
- const t = "Invalid login. Email or Abaxx ID is required.";
2197
- window.alert(t), console.error(t);
2198
- return;
2199
- }
2200
- const n = await w({
2201
- alias: D,
2202
- code_challenge: z,
2203
- request_id: E
2204
- });
2205
- if (n != null && n.ok)
2206
- o(!0);
2207
- else if (!(n != null && n.ok) && (n == null ? void 0 : n.message) === "Unable to request auth.") {
2208
- const t = "Invalid login. Please use your existing Email or Abaxx ID.";
2209
- window.alert(t), console.error(t);
2210
- }
2211
- } catch (n) {
2212
- const t = "Something went wrong. Please try again later.";
2213
- window.alert(t), console.error(t), console.log(n);
2214
- }
2215
- B(!1);
2216
- }, [z, E, D, B, o]), w = Ve(
2192
+ } = Ke(qe), f = Oe(
2217
2193
  async (n) => {
2218
2194
  try {
2219
2195
  const t = await fetch(
2220
- `${Z}/v-plus/auth/req?cid=${V}`,
2196
+ `${J}/v-plus/auth/req?cid=${Q}`,
2221
2197
  {
2222
2198
  method: "POST",
2223
2199
  headers: {
@@ -2238,8 +2214,32 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2238
2214
  b(`Auth request failed: ${t}`);
2239
2215
  }
2240
2216
  },
2241
- [Z, V, b]
2242
- );
2217
+ [J, Q, b]
2218
+ ), w = Oe(async () => {
2219
+ B(!0);
2220
+ try {
2221
+ if (!D) {
2222
+ const t = "Invalid login. Email or Abaxx ID is required.";
2223
+ window.alert(t), console.error(t);
2224
+ return;
2225
+ }
2226
+ const n = await f({
2227
+ alias: D,
2228
+ code_challenge: z,
2229
+ request_id: E
2230
+ });
2231
+ if (n != null && n.ok)
2232
+ o(!0);
2233
+ else if (!(n != null && n.ok) && (n == null ? void 0 : n.message) === "Unable to request auth.") {
2234
+ const t = "Invalid login. Please use your existing Email or Abaxx ID.";
2235
+ window.alert(t), console.error(t);
2236
+ }
2237
+ } catch (n) {
2238
+ const t = "Something went wrong. Please try again later.";
2239
+ window.alert(t), console.error(t), console.log(n);
2240
+ }
2241
+ B(!1);
2242
+ }, [z, E, D, B, o, f]);
2243
2243
  return /* @__PURE__ */ P("div", { className: `v-auth-email-container ${C}`, children: !y && !c ? /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2244
2244
  /* @__PURE__ */ P(
2245
2245
  "input",
@@ -2249,9 +2249,9 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2249
2249
  style: {
2250
2250
  backgroundColor: U.startsWith("#") ? U : U === "v-bg-transparent" ? "transparent" : U === "v-bg-white" ? "#ffffff" : "transparent",
2251
2251
  color: O.startsWith("#") ? O : O === "v-text-gray-600" ? "#6b7280" : O === "v-text-black" ? "#000000" : O === "v-text-white" ? "#ffffff" : "#6b7280",
2252
- borderColor: Y.startsWith("#") ? Y : Y === "v-border-gray-400" ? "#9ca3af" : Y === "v-border-blue-400" ? "#60a5fa" : "#9ca3af"
2252
+ borderColor: Z.startsWith("#") ? Z : Z === "v-border-gray-400" ? "#9ca3af" : Z === "v-border-blue-400" ? "#60a5fa" : "#9ca3af"
2253
2253
  },
2254
- placeholder: G,
2254
+ placeholder: V,
2255
2255
  value: D,
2256
2256
  onChange: (n) => H(n.target.value),
2257
2257
  disabled: q
@@ -2266,7 +2266,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2266
2266
  color: A.startsWith("#") ? A : A === "v-text-white" ? "#ffffff" : A === "v-text-black" ? "#000000" : A === "v-text-gray-600" ? "#6b7280" : "#ffffff"
2267
2267
  },
2268
2268
  disabled: q || !D || !E,
2269
- onClick: f,
2269
+ onClick: w,
2270
2270
  children: [
2271
2271
  q && /* @__PURE__ */ P(
2272
2272
  "svg",
@@ -2276,7 +2276,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2276
2276
  height: "24",
2277
2277
  viewBox: "0 0 24 24",
2278
2278
  fill: "none",
2279
- stroke: $,
2279
+ stroke: j,
2280
2280
  strokeWidth: "2",
2281
2281
  strokeLinecap: "round",
2282
2282
  strokeLinejoin: "round",
@@ -2297,7 +2297,7 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2297
2297
  height: "24",
2298
2298
  viewBox: "0 0 24 24",
2299
2299
  fill: "none",
2300
- stroke: $,
2300
+ stroke: j,
2301
2301
  strokeWidth: "2",
2302
2302
  strokeLinecap: "round",
2303
2303
  strokeLinejoin: "round",
@@ -2305,21 +2305,21 @@ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2305
2305
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2306
2306
  }
2307
2307
  ),
2308
- y ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2308
+ y ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Ge, { children: [
2309
2309
  /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2310
2310
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2311
2311
  ] })
2312
2312
  ] }) });
2313
2313
  };
2314
2314
  function Jr() {
2315
- const { resetState: G } = Ke(Oe);
2316
- return G;
2315
+ const { resetState: V } = Ke(qe);
2316
+ return V;
2317
2317
  }
2318
- function Yr(G) {
2319
- G.resetState();
2318
+ function Yr(V) {
2319
+ V.resetState();
2320
2320
  }
2321
2321
  export {
2322
- Oe as VContext,
2322
+ qe as VContext,
2323
2323
  qr as VContextProvider,
2324
2324
  Kr as VerifierAuth,
2325
2325
  Zr as VerifierAuthEmail,