mainstack-payments 1.0.22 → 1.0.23

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.
@@ -776,7 +776,7 @@ function TS() {
776
776
  }
777
777
  }
778
778
  }
779
- var E = l, F = c, P = s, D = i, B = t, G = u, X = r, H = g, ne = p, ce = n, he = o, U = a, ge = d, He = !1;
779
+ var E = l, F = c, P = s, D = i, B = t, U = u, X = r, H = g, ne = p, ce = n, he = o, G = a, ge = d, He = !1;
780
780
  function ze(L) {
781
781
  return He || (He = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), M(L) || T(L) === l;
782
782
  }
@@ -816,7 +816,7 @@ function TS() {
816
816
  function we(L) {
817
817
  return T(L) === d;
818
818
  }
819
- Be.AsyncMode = E, Be.ConcurrentMode = F, Be.ContextConsumer = P, Be.ContextProvider = D, Be.Element = B, Be.ForwardRef = G, Be.Fragment = X, Be.Lazy = H, Be.Memo = ne, Be.Portal = ce, Be.Profiler = he, Be.StrictMode = U, Be.Suspense = ge, Be.isAsyncMode = ze, Be.isConcurrentMode = M, Be.isContextConsumer = O, Be.isContextProvider = q, Be.isElement = j, Be.isForwardRef = J, Be.isFragment = Q, Be.isLazy = V, Be.isMemo = ee, Be.isPortal = ie, Be.isProfiler = ue, Be.isStrictMode = Z, Be.isSuspense = we, Be.isValidElementType = b, Be.typeOf = T;
819
+ Be.AsyncMode = E, Be.ConcurrentMode = F, Be.ContextConsumer = P, Be.ContextProvider = D, Be.Element = B, Be.ForwardRef = U, Be.Fragment = X, Be.Lazy = H, Be.Memo = ne, Be.Portal = ce, Be.Profiler = he, Be.StrictMode = G, Be.Suspense = ge, Be.isAsyncMode = ze, Be.isConcurrentMode = M, Be.isContextConsumer = O, Be.isContextProvider = q, Be.isElement = j, Be.isForwardRef = J, Be.isFragment = Q, Be.isLazy = V, Be.isMemo = ee, Be.isPortal = ie, Be.isProfiler = ue, Be.isStrictMode = Z, Be.isSuspense = we, Be.isValidElementType = b, Be.typeOf = T;
820
820
  }()), Be;
821
821
  }
822
822
  process.env.NODE_ENV === "production" ? Au.exports = AS() : Au.exports = TS();
@@ -2010,8 +2010,8 @@ function Pr(...e) {
2010
2010
  var Js = { exports: {} };
2011
2011
  Js.exports;
2012
2012
  (function(e, t) {
2013
- var n = 200, r = "__lodash_hash_undefined__", a = 800, o = 16, i = 9007199254740991, s = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", u = "[object Boolean]", d = "[object Date]", f = "[object Error]", p = "[object Function]", g = "[object GeneratorFunction]", m = "[object Map]", v = "[object Number]", S = "[object Null]", x = "[object Object]", b = "[object Proxy]", T = "[object RegExp]", E = "[object Set]", F = "[object String]", P = "[object Undefined]", D = "[object WeakMap]", B = "[object ArrayBuffer]", G = "[object DataView]", X = "[object Float32Array]", H = "[object Float64Array]", ne = "[object Int8Array]", ce = "[object Int16Array]", he = "[object Int32Array]", U = "[object Uint8Array]", ge = "[object Uint8ClampedArray]", He = "[object Uint16Array]", ze = "[object Uint32Array]", M = /[\\^$.*+?()[\]{}|]/g, O = /^\[object .+?Constructor\]$/, q = /^(?:0|[1-9]\d*)$/, j = {};
2014
- j[X] = j[H] = j[ne] = j[ce] = j[he] = j[U] = j[ge] = j[He] = j[ze] = !0, j[s] = j[l] = j[B] = j[u] = j[G] = j[d] = j[f] = j[p] = j[m] = j[v] = j[x] = j[T] = j[E] = j[F] = j[D] = !1;
2013
+ var n = 200, r = "__lodash_hash_undefined__", a = 800, o = 16, i = 9007199254740991, s = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", u = "[object Boolean]", d = "[object Date]", f = "[object Error]", p = "[object Function]", g = "[object GeneratorFunction]", m = "[object Map]", v = "[object Number]", S = "[object Null]", x = "[object Object]", b = "[object Proxy]", T = "[object RegExp]", E = "[object Set]", F = "[object String]", P = "[object Undefined]", D = "[object WeakMap]", B = "[object ArrayBuffer]", U = "[object DataView]", X = "[object Float32Array]", H = "[object Float64Array]", ne = "[object Int8Array]", ce = "[object Int16Array]", he = "[object Int32Array]", G = "[object Uint8Array]", ge = "[object Uint8ClampedArray]", He = "[object Uint16Array]", ze = "[object Uint32Array]", M = /[\\^$.*+?()[\]{}|]/g, O = /^\[object .+?Constructor\]$/, q = /^(?:0|[1-9]\d*)$/, j = {};
2014
+ j[X] = j[H] = j[ne] = j[ce] = j[he] = j[G] = j[ge] = j[He] = j[ze] = !0, j[s] = j[l] = j[B] = j[u] = j[U] = j[d] = j[f] = j[p] = j[m] = j[v] = j[x] = j[T] = j[E] = j[F] = j[D] = !1;
2015
2015
  var J = typeof rs == "object" && rs && rs.Object === Object && rs, Q = typeof self == "object" && self && self.Object === Object && self, V = J || Q || Function("return this")(), ee = t && !t.nodeType && t, ie = ee && !0 && e && !e.nodeType && e, ue = ie && ie.exports === ee, Z = ue && J.process, we = function() {
2016
2016
  try {
2017
2017
  var y = ie && ie.require && ie.require("util").types;
@@ -7747,9 +7747,9 @@ You may have forgotten to import it.`);
7747
7747
  var P = Ka(d.concat(T), v.registered, E);
7748
7748
  b += v.key + "-" + P.name, i !== void 0 && (b += " " + i);
7749
7749
  var D = c && s === void 0 ? $h(x) : l, B = {};
7750
- for (var G in m)
7751
- c && G === "as" || // $FlowFixMe
7752
- D(G) && (B[G] = m[G]);
7750
+ for (var U in m)
7751
+ c && U === "as" || // $FlowFixMe
7752
+ D(U) && (B[U] = m[U]);
7753
7753
  return B.className = b, B.ref = S, /* @__PURE__ */ R.createElement(R.Fragment, null, /* @__PURE__ */ R.createElement(A5, {
7754
7754
  cache: v,
7755
7755
  serialized: P,
@@ -9533,8 +9533,8 @@ function Xh({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 3
9533
9533
  const v = d + m, S = i === void 0 ? v : i(v);
9534
9534
  S !== v && (m = S - d);
9535
9535
  const x = (D) => -m * Math.exp(-D / r), b = (D) => S + x(D), T = (D) => {
9536
- const B = x(D), G = b(D);
9537
- f.done = Math.abs(B) <= c, f.value = f.done ? S : G;
9536
+ const B = x(D), U = b(D);
9537
+ f.done = Math.abs(B) <= c, f.value = f.done ? S : U;
9538
9538
  };
9539
9539
  let E, F;
9540
9540
  const P = (D) => {
@@ -9603,7 +9603,7 @@ function yi({ autoplay: e = !0, delay: t = 0, driver: n = kP, keyframes: r, type
9603
9603
  keyframes: [...r].reverse(),
9604
9604
  velocity: -(f.velocity || 0)
9605
9605
  }));
9606
- let P = "idle", D = null, B = null, G = null;
9606
+ let P = "idle", D = null, B = null, U = null;
9607
9607
  E.calculatedDuration === null && o && (E.calculatedDuration = Qh(E));
9608
9608
  const { calculatedDuration: X } = E;
9609
9609
  let H = 1 / 0, ne = 1 / 0;
@@ -9627,18 +9627,18 @@ function yi({ autoplay: e = !0, delay: t = 0, driver: n = kP, keyframes: r, type
9627
9627
  !j && X !== null && (ee = p >= 0 ? ce >= ne : ce <= 0);
9628
9628
  const ie = D === null && (P === "finished" || P === "running" && ee);
9629
9629
  return d && d(V.value), ie && He(), V;
9630
- }, U = () => {
9630
+ }, G = () => {
9631
9631
  x && x.stop(), x = void 0;
9632
9632
  }, ge = () => {
9633
- P = "idle", U(), m(), S(), B = G = null;
9633
+ P = "idle", G(), m(), S(), B = U = null;
9634
9634
  }, He = () => {
9635
- P = "finished", u && u(), U(), m();
9635
+ P = "finished", u && u(), G(), m();
9636
9636
  }, ze = () => {
9637
9637
  if (g)
9638
9638
  return;
9639
9639
  x || (x = n(he));
9640
9640
  const O = x.now();
9641
- l && l(), D !== null ? B = O - D : (!B || P === "finished") && (B = O), P === "finished" && S(), G = B, D = null, P = "running", x.start();
9641
+ l && l(), D !== null ? B = O - D : (!B || P === "finished") && (B = O), P === "finished" && S(), U = B, D = null, P = "running", x.start();
9642
9642
  };
9643
9643
  e && ze();
9644
9644
  const M = {
@@ -9672,7 +9672,7 @@ function yi({ autoplay: e = !0, delay: t = 0, driver: n = kP, keyframes: r, type
9672
9672
  g = !0, P !== "idle" && (P = "idle", c && c(), ge());
9673
9673
  },
9674
9674
  cancel: () => {
9675
- G !== null && he(G), ge();
9675
+ U !== null && he(U), ge();
9676
9676
  },
9677
9677
  complete: () => {
9678
9678
  P = "finished";
@@ -10325,25 +10325,25 @@ function h6(e) {
10325
10325
  continue;
10326
10326
  let B = m6(b.prevProp, T) || // If we're making this variant active, we want to always make it active
10327
10327
  x === c && b.isActive && !P && E || // If we removed a higher-priority variant (i is in reverse order)
10328
- S > m && E, G = !1;
10328
+ S > m && E, U = !1;
10329
10329
  const X = Array.isArray(T) ? T : [T];
10330
10330
  let H = X.reduce(a, {});
10331
10331
  F === !1 && (H = {});
10332
10332
  const { prevResolvedValues: ne = {} } = b, ce = {
10333
10333
  ...ne,
10334
10334
  ...H
10335
- }, he = (U) => {
10336
- B = !0, p.has(U) && (G = !0, p.delete(U)), b.needsAnimating[U] = !0;
10335
+ }, he = (G) => {
10336
+ B = !0, p.has(G) && (U = !0, p.delete(G)), b.needsAnimating[G] = !0;
10337
10337
  };
10338
- for (const U in ce) {
10339
- const ge = H[U], He = ne[U];
10340
- if (g.hasOwnProperty(U))
10338
+ for (const G in ce) {
10339
+ const ge = H[G], He = ne[G];
10340
+ if (g.hasOwnProperty(G))
10341
10341
  continue;
10342
10342
  let ze = !1;
10343
- il(ge) && il(He) ? ze = !P0(ge, He) : ze = ge !== He, ze ? ge !== void 0 ? he(U) : p.add(U) : ge !== void 0 && p.has(U) ? he(U) : b.protectedKeys[U] = !0;
10343
+ il(ge) && il(He) ? ze = !P0(ge, He) : ze = ge !== He, ze ? ge !== void 0 ? he(G) : p.add(G) : ge !== void 0 && p.has(G) ? he(G) : b.protectedKeys[G] = !0;
10344
10344
  }
10345
- b.prevProp = T, b.prevResolvedValues = H, b.isActive && (g = { ...g, ...H }), r && e.blockInitialAnimation && (B = !1), B && (!P || G) && f.push(...X.map((U) => ({
10346
- animation: U,
10345
+ b.prevProp = T, b.prevResolvedValues = H, b.isActive && (g = { ...g, ...H }), r && e.blockInitialAnimation && (B = !1), B && (!P || U) && f.push(...X.map((G) => ({
10346
+ animation: G,
10347
10347
  options: { type: x, ...l }
10348
10348
  })));
10349
10349
  }
@@ -12475,11 +12475,11 @@ const qr = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, exitBe
12475
12475
  d.delete(b);
12476
12476
  const D = Array.from(p.keys()).filter((B) => !v.includes(B));
12477
12477
  if (D.forEach((B) => p.delete(B)), f.current = c.filter((B) => {
12478
- const G = Er(B);
12478
+ const U = Er(B);
12479
12479
  return (
12480
12480
  // filter out the node exiting
12481
- G === b || // filter out the leftover children
12482
- D.includes(G)
12481
+ U === b || // filter out the leftover children
12482
+ D.includes(U)
12483
12483
  );
12484
12484
  }), !d.size) {
12485
12485
  if (l.current === !1)
@@ -13973,7 +13973,7 @@ function q4() {
13973
13973
  element: T(),
13974
13974
  elementType: E(),
13975
13975
  instanceOf: F,
13976
- node: G(),
13976
+ node: U(),
13977
13977
  objectOf: D,
13978
13978
  oneOf: P,
13979
13979
  oneOfType: B,
@@ -14012,7 +14012,7 @@ function q4() {
14012
14012
  }
14013
14013
  function S(M) {
14014
14014
  function O(q, j, J, Q, V, ee) {
14015
- var ie = q[j], ue = U(ie);
14015
+ var ie = q[j], ue = G(ie);
14016
14016
  if (ue !== M) {
14017
14017
  var Z = ge(ie);
14018
14018
  return new m(
@@ -14033,7 +14033,7 @@ function q4() {
14033
14033
  return new m("Property `" + V + "` of component `" + J + "` has invalid PropType notation inside arrayOf.");
14034
14034
  var ee = q[j];
14035
14035
  if (!Array.isArray(ee)) {
14036
- var ie = U(ee);
14036
+ var ie = G(ee);
14037
14037
  return new m("Invalid " + Q + " `" + V + "` of type " + ("`" + ie + "` supplied to `" + J + "`, expected an array."));
14038
14038
  }
14039
14039
  for (var ue = 0; ue < ee.length; ue++) {
@@ -14049,7 +14049,7 @@ function q4() {
14049
14049
  function M(O, q, j, J, Q) {
14050
14050
  var V = O[q];
14051
14051
  if (!s(V)) {
14052
- var ee = U(V);
14052
+ var ee = G(V);
14053
14053
  return new m("Invalid " + J + " `" + Q + "` of type " + ("`" + ee + "` supplied to `" + j + "`, expected a single ReactElement."));
14054
14054
  }
14055
14055
  return null;
@@ -14060,7 +14060,7 @@ function q4() {
14060
14060
  function M(O, q, j, J, Q) {
14061
14061
  var V = O[q];
14062
14062
  if (!e.isValidElementType(V)) {
14063
- var ee = U(V);
14063
+ var ee = G(V);
14064
14064
  return new m("Invalid " + J + " `" + Q + "` of type " + ("`" + ee + "` supplied to `" + j + "`, expected a single ReactElement type."));
14065
14065
  }
14066
14066
  return null;
@@ -14098,7 +14098,7 @@ function q4() {
14098
14098
  function O(q, j, J, Q, V) {
14099
14099
  if (typeof M != "function")
14100
14100
  return new m("Property `" + V + "` of component `" + J + "` has invalid PropType notation inside objectOf.");
14101
- var ee = q[j], ie = U(ee);
14101
+ var ee = q[j], ie = G(ee);
14102
14102
  if (ie !== "object")
14103
14103
  return new m("Invalid " + Q + " `" + V + "` of type " + ("`" + ie + "` supplied to `" + J + "`, expected an object."));
14104
14104
  for (var ue in ee)
@@ -14133,7 +14133,7 @@ function q4() {
14133
14133
  }
14134
14134
  return v(j);
14135
14135
  }
14136
- function G() {
14136
+ function U() {
14137
14137
  function M(O, q, j, J, Q) {
14138
14138
  return ce(O[q]) ? null : new m("Invalid " + J + " `" + Q + "` supplied to " + ("`" + j + "`, expected a ReactNode."));
14139
14139
  }
@@ -14146,7 +14146,7 @@ function q4() {
14146
14146
  }
14147
14147
  function H(M) {
14148
14148
  function O(q, j, J, Q, V) {
14149
- var ee = q[j], ie = U(ee);
14149
+ var ee = q[j], ie = G(ee);
14150
14150
  if (ie !== "object")
14151
14151
  return new m("Invalid " + Q + " `" + V + "` of type `" + ie + "` " + ("supplied to `" + J + "`, expected `object`."));
14152
14152
  for (var ue in M) {
@@ -14163,7 +14163,7 @@ function q4() {
14163
14163
  }
14164
14164
  function ne(M) {
14165
14165
  function O(q, j, J, Q, V) {
14166
- var ee = q[j], ie = U(ee);
14166
+ var ee = q[j], ie = G(ee);
14167
14167
  if (ie !== "object")
14168
14168
  return new m("Invalid " + Q + " `" + V + "` of type `" + ie + "` " + ("supplied to `" + J + "`, expected `object`."));
14169
14169
  var ue = t({}, q[j], M);
@@ -14220,14 +14220,14 @@ Valid keys: ` + JSON.stringify(Object.keys(M), null, " ")
14220
14220
  function he(M, O) {
14221
14221
  return M === "symbol" ? !0 : O ? O["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && O instanceof Symbol : !1;
14222
14222
  }
14223
- function U(M) {
14223
+ function G(M) {
14224
14224
  var O = typeof M;
14225
14225
  return Array.isArray(M) ? "array" : M instanceof RegExp ? "object" : he(O, M) ? "symbol" : O;
14226
14226
  }
14227
14227
  function ge(M) {
14228
14228
  if (typeof M > "u" || M === null)
14229
14229
  return "" + M;
14230
- var O = U(M);
14230
+ var O = G(M);
14231
14231
  if (O === "object") {
14232
14232
  if (M instanceof Date)
14233
14233
  return "date";
@@ -14481,7 +14481,7 @@ var Ky = Tf({}, function(e) {
14481
14481
  async: !0,
14482
14482
  ssr: typeof document < "u"
14483
14483
  }), s3 = /* @__PURE__ */ tn(void 0), l3 = [], Zy = /* @__PURE__ */ R.forwardRef(function(t, n) {
14484
- var r, a = R.useState(), o = a[0], i = a[1], s = R.useRef(), l = R.useRef(!1), c = R.useRef(null), u = R.useState({}), d = u[1], f = t.children, p = t.disabled, g = p === void 0 ? !1 : p, m = t.noFocusGuards, v = m === void 0 ? !1 : m, S = t.persistentFocus, x = S === void 0 ? !1 : S, b = t.crossFrame, T = b === void 0 ? !0 : b, E = t.autoFocus, F = E === void 0 ? !0 : E, P = t.allowTextSelection, D = t.group, B = t.className, G = t.whiteList, X = t.hasPositiveIndices, H = t.shards, ne = H === void 0 ? l3 : H, ce = t.as, he = ce === void 0 ? "div" : ce, U = t.lockProps, ge = U === void 0 ? {} : U, He = t.sideCar, ze = t.returnFocus, M = ze === void 0 ? !1 : ze, O = t.focusOptions, q = t.onActivation, j = t.onDeactivation, J = R.useState({}), Q = J[0], V = R.useCallback(function(st) {
14484
+ var r, a = R.useState(), o = a[0], i = a[1], s = R.useRef(), l = R.useRef(!1), c = R.useRef(null), u = R.useState({}), d = u[1], f = t.children, p = t.disabled, g = p === void 0 ? !1 : p, m = t.noFocusGuards, v = m === void 0 ? !1 : m, S = t.persistentFocus, x = S === void 0 ? !1 : S, b = t.crossFrame, T = b === void 0 ? !0 : b, E = t.autoFocus, F = E === void 0 ? !0 : E, P = t.allowTextSelection, D = t.group, B = t.className, U = t.whiteList, X = t.hasPositiveIndices, H = t.shards, ne = H === void 0 ? l3 : H, ce = t.as, he = ce === void 0 ? "div" : ce, G = t.lockProps, ge = G === void 0 ? {} : G, He = t.sideCar, ze = t.returnFocus, M = ze === void 0 ? !1 : ze, O = t.focusOptions, q = t.onActivation, j = t.onDeactivation, J = R.useState({}), Q = J[0], V = R.useCallback(function(st) {
14485
14485
  var mt = st.captureFocusRestore;
14486
14486
  if (!c.current) {
14487
14487
  var ve, lt = (ve = document) == null ? void 0 : ve.activeElement;
@@ -14538,7 +14538,7 @@ var Ky = Tf({}, function(e) {
14538
14538
  persistentFocus: x,
14539
14539
  crossFrame: T,
14540
14540
  autoFocus: F,
14541
- whiteList: G,
14541
+ whiteList: U,
14542
14542
  shards: ne,
14543
14543
  onActivation: V,
14544
14544
  onDeactivation: ee,
@@ -15797,10 +15797,10 @@ function UF(e) {
15797
15797
  },
15798
15798
  [o, n, l]
15799
15799
  ), [x, b] = ae(!1), [T, E] = ae(!1), F = fe(
15800
- (B = {}, G = null) => ({
15800
+ (B = {}, U = null) => ({
15801
15801
  role: "dialog",
15802
15802
  ...B,
15803
- ref: bi(G, c),
15803
+ ref: bi(U, c),
15804
15804
  id: d,
15805
15805
  tabIndex: -1,
15806
15806
  "aria-modal": !0,
@@ -15818,9 +15818,9 @@ function UF(e) {
15818
15818
  },
15819
15819
  [n, a, s]
15820
15820
  ), D = fe(
15821
- (B = {}, G = null) => ({
15821
+ (B = {}, U = null) => ({
15822
15822
  ...B,
15823
- ref: bi(G, u),
15823
+ ref: bi(U, u),
15824
15824
  onClick: Pr(B.onClick, P),
15825
15825
  onKeyDown: Pr(B.onKeyDown, S),
15826
15826
  onMouseDown: Pr(B.onMouseDown, v)
@@ -16826,7 +16826,7 @@ var pd = function(t) {
16826
16826
  return t.charAt(0).toUpperCase() + t.slice(1);
16827
16827
  }, pt = function(t, n) {
16828
16828
  var r = "".concat(K9(t), "Element"), a = function(l) {
16829
- var c = l.id, u = l.className, d = l.options, f = d === void 0 ? {} : d, p = l.onBlur, g = l.onFocus, m = l.onReady, v = l.onChange, S = l.onEscape, x = l.onClick, b = l.onLoadError, T = l.onLoaderStart, E = l.onNetworksChange, F = l.onConfirm, P = l.onCancel, D = l.onShippingAddressChange, B = l.onShippingRateChange, G = pd("mounts <".concat(r, ">")), X = "elements" in G ? G.elements : null, H = "customCheckoutSdk" in G ? G.customCheckoutSdk : null, ne = ke.useState(null), ce = Bb(ne, 2), he = ce[0], U = ce[1], ge = ke.useRef(null), He = ke.useRef(null);
16829
+ var c = l.id, u = l.className, d = l.options, f = d === void 0 ? {} : d, p = l.onBlur, g = l.onFocus, m = l.onReady, v = l.onChange, S = l.onEscape, x = l.onClick, b = l.onLoadError, T = l.onLoaderStart, E = l.onNetworksChange, F = l.onConfirm, P = l.onCancel, D = l.onShippingAddressChange, B = l.onShippingRateChange, U = pd("mounts <".concat(r, ">")), X = "elements" in U ? U.elements : null, H = "customCheckoutSdk" in U ? U.customCheckoutSdk : null, ne = ke.useState(null), ce = Bb(ne, 2), he = ce[0], G = ce[1], ge = ke.useRef(null), He = ke.useRef(null);
16830
16830
  zt(he, "blur", p), zt(he, "focus", g), zt(he, "escape", S), zt(he, "click", x), zt(he, "loaderror", b), zt(he, "loaderstart", T), zt(he, "networkschange", E), zt(he, "confirm", F), zt(he, "cancel", P), zt(he, "shippingaddresschange", D), zt(he, "shippingratechange", B), zt(he, "change", v);
16831
16831
  var ze;
16832
16832
  m && (t === "expressCheckout" ? ze = m : ze = function() {
@@ -16834,7 +16834,7 @@ var pd = function(t) {
16834
16834
  }), zt(he, "ready", ze), ke.useLayoutEffect(function() {
16835
16835
  if (ge.current === null && He.current !== null && (X || H)) {
16836
16836
  var O = null;
16837
- H ? O = H.createElement(t, f) : X && (O = X.create(t, f)), ge.current = O, U(O), O && O.mount(He.current);
16837
+ H ? O = H.createElement(t, f) : X && (O = X.create(t, f)), ge.current = O, G(O), O && O.mount(He.current);
16838
16838
  }
16839
16839
  }, [X, H, f]);
16840
16840
  var M = fd(f);
@@ -18089,7 +18089,7 @@ function UR(e) {
18089
18089
  Tt.name === "ValidationError" ? ye(GR(Tt)) : (process.env.NODE_ENV !== "production" && console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />", Tt), Ye(Tt));
18090
18090
  });
18091
18091
  });
18092
- }, [f.validationSchema]), G = fe(function(_, I) {
18092
+ }, [f.validationSchema]), U = fe(function(_, I) {
18093
18093
  return new Promise(function(W) {
18094
18094
  return W(x.current[_].validate(I));
18095
18095
  });
@@ -18097,14 +18097,14 @@ function UR(e) {
18097
18097
  var I = Object.keys(x.current).filter(function(N) {
18098
18098
  return ln(x.current[N].validate);
18099
18099
  }), W = I.length > 0 ? I.map(function(N) {
18100
- return G(N, Vt(_, N));
18100
+ return U(N, Vt(_, N));
18101
18101
  }) : [Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];
18102
18102
  return Promise.all(W).then(function(N) {
18103
18103
  return N.reduce(function(pe, ye, Ye) {
18104
18104
  return ye === "DO_NOT_DELETE_YOU_WILL_BE_FIRED" || ye && (pe = Lr(pe, I[Ye], ye)), pe;
18105
18105
  }, {});
18106
18106
  });
18107
- }, [G]), H = fe(function(_) {
18107
+ }, [U]), H = fe(function(_) {
18108
18108
  return Promise.all([X(_), f.validationSchema ? B(_) : {}, f.validate ? D(_) : {}]).then(function(I) {
18109
18109
  var W = I[0], N = I[1], pe = I[2], ye = hd.all([W, N, pe], {
18110
18110
  arrayMerge: HR
@@ -18214,7 +18214,7 @@ function UR(e) {
18214
18214
  });
18215
18215
  });
18216
18216
  return Promise.resolve();
18217
- }), U = fe(function(_, I) {
18217
+ }), G = fe(function(_, I) {
18218
18218
  var W = I.validate;
18219
18219
  x.current[_] = {
18220
18220
  validate: W
@@ -18437,7 +18437,7 @@ function UR(e) {
18437
18437
  isValid: lt,
18438
18438
  dirty: ve,
18439
18439
  unregisterField: ge,
18440
- registerField: U,
18440
+ registerField: G,
18441
18441
  getFieldProps: mt,
18442
18442
  getFieldMeta: Ot,
18443
18443
  getFieldHelpers: st,
@@ -18997,8 +18997,8 @@ function Ca(e) {
18997
18997
  return F(!0);
18998
18998
  let B;
18999
18999
  try {
19000
- var G;
19001
- if (B = u.call(E, n, E), typeof ((G = B) == null ? void 0 : G.then) == "function") {
19000
+ var U;
19001
+ if (B = u.call(E, n, E), typeof ((U = B) == null ? void 0 : U.then) == "function") {
19002
19002
  if (a.sync)
19003
19003
  throw new Error(`Validation test of type: "${E.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);
19004
19004
  return Promise.resolve(B).then(F, P);
@@ -21907,14 +21907,14 @@ const iv = /* @__PURE__ */ new Map([
21907
21907
  var we, L, tt;
21908
21908
  const b = Vf(), T = zb(), { isOpen: E, onOpen: F, onClose: P } = ni();
21909
21909
  Gr("(max-width: 767px)"), Gr("(max-height: 600px)");
21910
- const D = Se(null), [B, G] = ae(0), [X, H] = ae(0);
21910
+ const D = Se(null), [B, U] = ae(0), [X, H] = ae(0);
21911
21911
  de(() => {
21912
21912
  const me = () => {
21913
21913
  if (D.current) {
21914
21914
  const ot = D.current.closest(".chakra-collapse");
21915
21915
  if (ot) {
21916
21916
  const Ot = ot.getBoundingClientRect();
21917
- G(Ot.width), H(Ot.left);
21917
+ U(Ot.width), H(Ot.left);
21918
21918
  }
21919
21919
  }
21920
21920
  };
@@ -21932,7 +21932,7 @@ const iv = /* @__PURE__ */ new Map([
21932
21932
  D.current && me.unobserve(D.current);
21933
21933
  };
21934
21934
  }, [F, P, i, o]);
21935
- const ne = typeof window < "u" ? JSON.parse(window.localStorage.getItem("userIp")) : "", { mutate: ce, data: he } = Hf(u), [U, ge] = ae(!1), [He, ze] = ae(""), [M, O] = ae("");
21935
+ const ne = typeof window < "u" ? JSON.parse(window.localStorage.getItem("userIp")) : "", { mutate: ce, data: he } = Hf(u), [G, ge] = ae(!1), [He, ze] = ae(""), [M, O] = ae("");
21936
21936
  ae(!1);
21937
21937
  const [q, j] = ae(0), J = Se(null), Q = (n == null ? void 0 : n.country) ?? (ne == null ? void 0 : ne.country_name), V = (we = Qt == null ? void 0 : Qt.find(
21938
21938
  (me) => me.name === Q
@@ -22292,8 +22292,8 @@ const iv = /* @__PURE__ */ new Map([
22292
22292
  onClick: (me) => {
22293
22293
  ie(me);
22294
22294
  },
22295
- isLoading: U,
22296
- disabled: U,
22295
+ isLoading: G,
22296
+ disabled: G,
22297
22297
  _hover: {
22298
22298
  opacity: 0.8,
22299
22299
  _after: {
@@ -26767,7 +26767,7 @@ const lv = "Payment Completed", nD = ({
26767
26767
  b.canMakePayment().then((T) => {
26768
26768
  T && (p(b), m(T), (T != null && T.applePay || T != null && T.googlePay) && c());
26769
26769
  }), b.on("paymentmethod", async (T) => {
26770
- var B, G;
26770
+ var B, U;
26771
26771
  S(!0);
26772
26772
  const E = ml();
26773
26773
  try {
@@ -26796,7 +26796,7 @@ const lv = "Payment Completed", nD = ({
26796
26796
  ...t,
26797
26797
  reference: E
26798
26798
  },
26799
- payment_method_id: (G = T == null ? void 0 : T.paymentMethod) == null ? void 0 : G.id
26799
+ payment_method_id: (U = T == null ? void 0 : T.paymentMethod) == null ? void 0 : U.id
26800
26800
  }
26801
26801
  ).then((X) => X.data), { paymentIntent: P, error: D } = await u.confirmCardPayment(
26802
26802
  F,
@@ -26970,16 +26970,16 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
26970
26970
  if (s)
26971
26971
  if (l !== "")
26972
26972
  try {
26973
- const U = await u();
26974
- U.isSuccess ? (i({
26975
- amount: (H = U == null ? void 0 : U.data) == null ? void 0 : H.discounted_amount,
26976
- type: (ne = U == null ? void 0 : U.data) == null ? void 0 : ne.discount_type,
26977
- value: (ce = U == null ? void 0 : U.data) == null ? void 0 : ce.discount_value,
26978
- isFullDiscount: ((he = U == null ? void 0 : U.data) == null ? void 0 : he.amount_to_pay) === 0
26979
- }), Pt("Discount has been applied", $t.success)) : Pt(`${U == null ? void 0 : U.error}`, $t.error);
26980
- } catch (U) {
26973
+ const G = await u();
26974
+ G.isSuccess ? (i({
26975
+ amount: (H = G == null ? void 0 : G.data) == null ? void 0 : H.discounted_amount,
26976
+ type: (ne = G == null ? void 0 : G.data) == null ? void 0 : ne.discount_type,
26977
+ value: (ce = G == null ? void 0 : G.data) == null ? void 0 : ce.discount_value,
26978
+ isFullDiscount: ((he = G == null ? void 0 : G.data) == null ? void 0 : he.amount_to_pay) === 0
26979
+ }), Pt("Discount has been applied", $t.success)) : Pt(`${G == null ? void 0 : G.error}`, $t.error);
26980
+ } catch (G) {
26981
26981
  Pt(
26982
- `${U ?? (U == null ? void 0 : U.message) ?? "An Error occured applying discount code"}`,
26982
+ `${G ?? (G == null ? void 0 : G.message) ?? "An Error occured applying discount code"}`,
26983
26983
  $t.error
26984
26984
  );
26985
26985
  }
@@ -26992,7 +26992,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
26992
26992
  value: 0,
26993
26993
  isFullDiscount: !1
26994
26994
  }));
26995
- }, B = (H) => H > 0 ? n === Ne.NGN ? `+ ${n} ${H}` : `+ ${H * 100} cents` : "", G = ({ children: H, ...ne }) => /* @__PURE__ */ h(
26995
+ }, B = (H) => H > 0 ? n === Ne.NGN ? `+ ${n} ${H}` : `+ ${H * 100} cents` : "", U = ({ children: H, ...ne }) => /* @__PURE__ */ h(
26996
26996
  _e,
26997
26997
  {
26998
26998
  color: "#111215",
@@ -27018,7 +27018,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27018
27018
  {
27019
27019
  textAlign: m ? "center" : { base: "center", lg: "left" },
27020
27020
  children: [
27021
- g.totalAmountPlusFees <= 0 ? /* @__PURE__ */ h(wt, {}) : typeof t == "string" ? /* @__PURE__ */ h(G, { color: "#7D879B", children: t }) : /* @__PURE__ */ h(wt, { children: t }),
27021
+ g.totalAmountPlusFees <= 0 ? /* @__PURE__ */ h(wt, {}) : typeof t == "string" ? /* @__PURE__ */ h(U, { color: "#7D879B", children: t }) : /* @__PURE__ */ h(wt, { children: t }),
27022
27022
  a ? /* @__PURE__ */ h(
27023
27023
  dd,
27024
27024
  {
@@ -27026,7 +27026,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27026
27026
  width: m ? "100%" : { base: "100%", lg: "100px" }
27027
27027
  }
27028
27028
  ) : /* @__PURE__ */ h(
27029
- G,
27029
+ U,
27030
27030
  {
27031
27031
  as: "h6",
27032
27032
  fontSize: "1.25rem",
@@ -27040,26 +27040,6 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27040
27040
  ]
27041
27041
  }
27042
27042
  ),
27043
- F && /* @__PURE__ */ h(
27044
- le,
27045
- {
27046
- py: "12px",
27047
- justifyContent: "center",
27048
- alignItems: "center",
27049
- cursor: "pointer",
27050
- onClick: E,
27051
- opacity: T ? 1 : 0.6,
27052
- transition: "opacity 0.2s",
27053
- children: /* @__PURE__ */ h(
27054
- Wa,
27055
- {
27056
- transform: T ? "rotate(180deg)" : "rotate(0deg)",
27057
- transition: "transform 0.2s",
27058
- boxSize: "24px"
27059
- }
27060
- )
27061
- }
27062
- ),
27063
27043
  /* @__PURE__ */ $(Si, { in: !F || T, children: [
27064
27044
  /* @__PURE__ */ $(Ee, { borderBottom: "1px solid #E8EBF2", py: "12px", children: [
27065
27045
  /* @__PURE__ */ $(le, { justifyContent: "space-between", alignItems: "center", children: [
@@ -27076,7 +27056,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27076
27056
  ),
27077
27057
  /* @__PURE__ */ $(Ee, { children: [
27078
27058
  /* @__PURE__ */ $(
27079
- G,
27059
+ U,
27080
27060
  {
27081
27061
  overflow: "hidden",
27082
27062
  color: "#7D879B",
@@ -27089,7 +27069,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27089
27069
  ]
27090
27070
  }
27091
27071
  ),
27092
- !v && /* @__PURE__ */ $(G, { textAlign: "right", fontWeight: 600, children: [
27072
+ !v && /* @__PURE__ */ $(U, { textAlign: "right", fontWeight: 600, children: [
27093
27073
  n,
27094
27074
  " ",
27095
27075
  On(r)
@@ -27102,12 +27082,12 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27102
27082
  justifyContent: "space-between",
27103
27083
  alignItems: "center",
27104
27084
  children: [
27105
- /* @__PURE__ */ $(G, { children: [
27085
+ /* @__PURE__ */ $(U, { children: [
27106
27086
  H.quantity ?? 1,
27107
27087
  " x ",
27108
27088
  H.name
27109
27089
  ] }),
27110
- /* @__PURE__ */ $(G, { textAlign: "right", fontWeight: 600, children: [
27090
+ /* @__PURE__ */ $(U, { textAlign: "right", fontWeight: 600, children: [
27111
27091
  H.currency,
27112
27092
  " ",
27113
27093
  On(H.price)
@@ -27119,8 +27099,8 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27119
27099
  ] }),
27120
27100
  /* @__PURE__ */ $(le, { flexDirection: "column", gap: "12px", mt: "16px", children: [
27121
27101
  /* @__PURE__ */ $(le, { width: "100%", justifyContent: "space-between", children: [
27122
- /* @__PURE__ */ h(G, { fontWeight: 400, children: "Subtotal" }),
27123
- /* @__PURE__ */ $(G, { fontWeight: 600, children: [
27102
+ /* @__PURE__ */ h(U, { fontWeight: 400, children: "Subtotal" }),
27103
+ /* @__PURE__ */ $(U, { fontWeight: 600, children: [
27124
27104
  n,
27125
27105
  " ",
27126
27106
  On(r)
@@ -27129,12 +27109,12 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27129
27109
  !(o != null && o.isFullDiscount) && /* @__PURE__ */ $(wt, { children: [
27130
27110
  " ",
27131
27111
  f.localTaxFees > 0 && f.shouldApplyTax && /* @__PURE__ */ $(le, { width: "100%", justifyContent: "space-between", children: [
27132
- /* @__PURE__ */ h(le, { alignItems: "center", children: /* @__PURE__ */ $(G, { fontWeight: 400, mr: "8px", children: [
27112
+ /* @__PURE__ */ h(le, { alignItems: "center", children: /* @__PURE__ */ $(U, { fontWeight: 400, mr: "8px", children: [
27133
27113
  "Sales Tax (",
27134
27114
  f.taxedPercent,
27135
27115
  "%)"
27136
27116
  ] }) }),
27137
- /* @__PURE__ */ $(G, { fontWeight: 600, children: [
27117
+ /* @__PURE__ */ $(U, { fontWeight: 600, children: [
27138
27118
  n,
27139
27119
  " ",
27140
27120
  On(f.localTaxFees)
@@ -27142,7 +27122,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27142
27122
  ] }),
27143
27123
  p.applySwitchingFee && p.localSwitchingFee > 0 && /* @__PURE__ */ $(le, { width: "100%", justifyContent: "space-between", children: [
27144
27124
  /* @__PURE__ */ $(le, { alignItems: "center", children: [
27145
- /* @__PURE__ */ h(G, { fontWeight: 400, mr: "8px", children: "Currency switching fee" }),
27125
+ /* @__PURE__ */ h(U, { fontWeight: 400, mr: "8px", children: "Currency switching fee" }),
27146
27126
  /* @__PURE__ */ h(
27147
27127
  xp,
27148
27128
  {
@@ -27153,7 +27133,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27153
27133
  }
27154
27134
  )
27155
27135
  ] }),
27156
- /* @__PURE__ */ $(G, { fontWeight: 600, children: [
27136
+ /* @__PURE__ */ $(U, { fontWeight: 600, children: [
27157
27137
  n,
27158
27138
  " ",
27159
27139
  On(p.localSwitchingFee)
@@ -27161,7 +27141,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27161
27141
  ] }),
27162
27142
  g.totalAmountPlusFees > 0 && /* @__PURE__ */ $(le, { width: "100%", justifyContent: "space-between", children: [
27163
27143
  /* @__PURE__ */ $(le, { alignItems: "center", children: [
27164
- /* @__PURE__ */ h(G, { fontWeight: 400, mr: "8px", children: "Fees" }),
27144
+ /* @__PURE__ */ h(U, { fontWeight: 400, mr: "8px", children: "Fees" }),
27165
27145
  /* @__PURE__ */ h(
27166
27146
  xp,
27167
27147
  {
@@ -27179,7 +27159,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27179
27159
  }
27180
27160
  )
27181
27161
  ] }),
27182
- /* @__PURE__ */ $(G, { fontWeight: 600, children: [
27162
+ /* @__PURE__ */ $(U, { fontWeight: 600, children: [
27183
27163
  n,
27184
27164
  " ",
27185
27165
  On(g.transactionFeeValue)
@@ -27225,7 +27205,7 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27225
27205
  ]
27226
27206
  }
27227
27207
  ),
27228
- /* @__PURE__ */ $(G, { fontWeight: 600, children: [
27208
+ /* @__PURE__ */ $(U, { fontWeight: 600, children: [
27229
27209
  "-",
27230
27210
  n,
27231
27211
  " ",
@@ -27321,7 +27301,30 @@ const Su = (e) => Math.round((e + Number.EPSILON) * 100) / 100, On = (e) => {
27321
27301
  )
27322
27302
  ] })
27323
27303
  ] })
27324
- ] })
27304
+ ] }),
27305
+ F && /* @__PURE__ */ $(
27306
+ le,
27307
+ {
27308
+ py: "12px",
27309
+ justifyContent: "center",
27310
+ alignItems: "center",
27311
+ cursor: "pointer",
27312
+ onClick: E,
27313
+ opacity: T ? 1 : 0.6,
27314
+ transition: "opacity 0.2s",
27315
+ children: [
27316
+ /* @__PURE__ */ h(U, { fontWeight: 500, children: T ? "Hide details" : "More details" }),
27317
+ /* @__PURE__ */ h(
27318
+ Wa,
27319
+ {
27320
+ transform: T ? "rotate(180deg)" : "rotate(0deg)",
27321
+ transition: "transform 0.2s",
27322
+ boxSize: "24px"
27323
+ }
27324
+ )
27325
+ ]
27326
+ }
27327
+ )
27325
27328
  ] })
27326
27329
  }
27327
27330
  );
@@ -28009,13 +28012,13 @@ const pD = (e) => /* @__PURE__ */ $(hn, { viewBox: "0 0 32 32", ...e, fill: "non
28009
28012
  paymentRedirectUrl: P,
28010
28013
  userAllowsWalletPayment: D,
28011
28014
  userAllowsCardPayment: B,
28012
- userAllowsCryptoPayment: G,
28015
+ userAllowsCryptoPayment: U,
28013
28016
  baseUrl: X,
28014
28017
  hasDiscountCode: H,
28015
28018
  mainstackProductId: ne,
28016
28019
  STRIPE_SECRET_KEY: ce,
28017
28020
  STRIPE_SECRET_KEY_GBP: he,
28018
- STRIPE_SECRET_KEY_CAD: U,
28021
+ STRIPE_SECRET_KEY_CAD: G,
28019
28022
  applyTrancheFee: ge,
28020
28023
  ip: He,
28021
28024
  shouldApplyTax: ze,
@@ -28261,7 +28264,7 @@ const pD = (e) => /* @__PURE__ */ $(hn, { viewBox: "0 0 32 32", ...e, fill: "non
28261
28264
  K = he, qn = "GB_ACCOUNT";
28262
28265
  break;
28263
28266
  case v === Ne.CAD:
28264
- K = U, qn = "CA_ACCOUNT";
28267
+ K = G, qn = "CA_ACCOUNT";
28265
28268
  break;
28266
28269
  default:
28267
28270
  K = ce, qn = "US_ACCOUNT";
@@ -28271,7 +28274,7 @@ const pD = (e) => /* @__PURE__ */ $(hn, { viewBox: "0 0 32 32", ...e, fill: "non
28271
28274
  v,
28272
28275
  ce,
28273
28276
  he,
28274
- U
28277
+ G
28275
28278
  ]);
28276
28279
  de(() => {
28277
28280
  // isFree
@@ -28419,7 +28422,7 @@ const pD = (e) => /* @__PURE__ */ $(hn, { viewBox: "0 0 32 32", ...e, fill: "non
28419
28422
  }
28420
28423
  ].find(
28421
28424
  (K) => K.currency === v
28422
- ), ga = !ao && jt("crypto") && G && mo || [Ne.NGN, Ne.GHS, Ne.KES].includes(
28425
+ ), ga = !ao && jt("crypto") && U && mo || [Ne.NGN, Ne.GHS, Ne.KES].includes(
28423
28426
  v
28424
28427
  ) && !ao && M !== "ips";
28425
28428
  return /* @__PURE__ */ h(wt, { children: /* @__PURE__ */ $(
@@ -28447,6 +28450,8 @@ const pD = (e) => /* @__PURE__ */ $(hn, { viewBox: "0 0 32 32", ...e, fill: "non
28447
28450
  height: "100%",
28448
28451
  bg: ct.gray25,
28449
28452
  borderRadius: V ? "16px" : { base: "16px", lg: "16px 0 0 16px" },
28453
+ display: "flex",
28454
+ justifyContent: "center",
28450
28455
  children: /* @__PURE__ */ h(
28451
28456
  uD,
28452
28457
  {
@@ -28867,7 +28872,7 @@ const pD = (e) => /* @__PURE__ */ $(hn, { viewBox: "0 0 32 32", ...e, fill: "non
28867
28872
  )
28868
28873
  }
28869
28874
  ),
28870
- jt("crypto") && G && mo && /* @__PURE__ */ h(
28875
+ jt("crypto") && U && mo && /* @__PURE__ */ h(
28871
28876
  Ws,
28872
28877
  {
28873
28878
  stripe: po,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mainstack-payments",
3
3
  "type": "module",
4
- "version": "1.0.22",
4
+ "version": "1.0.23",
5
5
  "main": "build/mainstack-payments.js",
6
6
  "types": "build/src/index.d.ts",
7
7
  "files": [