moyasar-payment-form 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/moyasar.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: moyasar-payment-form
3
- * version: v2.1.0
3
+ * version: v2.2.0
4
4
  * description: Moyasar payment form utilities
5
5
  * author: Jan Jagieła - Railwaymen Team
6
6
  * homepage: https://docs.moyasar.com
@@ -9,14 +9,14 @@ var Be = Object.defineProperty, Se = Object.defineProperties;
9
9
  var Pe = Object.getOwnPropertyDescriptors;
10
10
  var DA = Object.getOwnPropertySymbols;
11
11
  var ft = Object.prototype.hasOwnProperty, dt = Object.prototype.propertyIsEnumerable;
12
- var mt = Math.pow, pt = (A, t, e) => t in A ? Be(A, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[t] = e, k = (A, t) => {
12
+ var mt = Math.pow, pt = (A, t, e) => t in A ? Be(A, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[t] = e, S = (A, t) => {
13
13
  for (var e in t || (t = {}))
14
14
  ft.call(t, e) && pt(A, e, t[e]);
15
15
  if (DA)
16
16
  for (var e of DA(t))
17
17
  dt.call(t, e) && pt(A, e, t[e]);
18
18
  return A;
19
- }, X = (A, t) => Se(A, Pe(t));
19
+ }, P = (A, t) => Se(A, Pe(t));
20
20
  var MA = (A, t) => {
21
21
  var e = {};
22
22
  for (var n in A)
@@ -42,7 +42,7 @@ var K = (A, t, e) => new Promise((n, r) => {
42
42
  }, l = (i) => i.done ? n(i.value) : Promise.resolve(i.value).then(a, o);
43
43
  l((e = e.apply(A, t)).next());
44
44
  });
45
- var UA, M, Yt, rA, vt, Zt, Kt, Ht, nt, xA, VA, Rt, gA = {}, jt = [], Xe = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, yA = Array.isArray;
45
+ var UA, k, Yt, rA, vt, Zt, Kt, Ht, nt, xA, VA, Rt, gA = {}, jt = [], Xe = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, yA = Array.isArray;
46
46
  function tA(A, t) {
47
47
  for (var e in t) A[e] = t[e];
48
48
  return A;
@@ -58,7 +58,7 @@ function YA(A, t, e) {
58
58
  }
59
59
  function XA(A, t, e, n, r) {
60
60
  var a = { type: A, props: t, key: e, ref: n, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r == null ? ++Yt : r, __i: -1, __u: 0 };
61
- return r == null && M.vnode != null && M.vnode(a), a;
61
+ return r == null && k.vnode != null && k.vnode(a), a;
62
62
  }
63
63
  function $(A) {
64
64
  return A.children;
@@ -82,20 +82,20 @@ function Ft(A) {
82
82
  }
83
83
  }
84
84
  function ZA(A) {
85
- (!A.__d && (A.__d = !0) && rA.push(A) && !LA.__r++ || vt != M.debounceRendering) && ((vt = M.debounceRendering) || Zt)(LA);
85
+ (!A.__d && (A.__d = !0) && rA.push(A) && !LA.__r++ || vt != k.debounceRendering) && ((vt = k.debounceRendering) || Zt)(LA);
86
86
  }
87
87
  function LA() {
88
- for (var A, t, e, n, r, a, o, l = 1; rA.length; ) rA.length > l && rA.sort(Kt), A = rA.shift(), l = rA.length, A.__d && (e = void 0, r = (n = (t = A).__v).__e, a = [], o = [], t.__P && ((e = tA({}, n)).__v = n.__v + 1, M.vnode && M.vnode(e), at(t.__P, e, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [r] : null, a, r == null ? iA(n) : r, !!(32 & n.__u), o), e.__v = n.__v, e.__.__k[e.__i] = e, te(a, e, o), e.__e != r && Ft(e)));
88
+ for (var A, t, e, n, r, a, o, l = 1; rA.length; ) rA.length > l && rA.sort(Kt), A = rA.shift(), l = rA.length, A.__d && (e = void 0, r = (n = (t = A).__v).__e, a = [], o = [], t.__P && ((e = tA({}, n)).__v = n.__v + 1, k.vnode && k.vnode(e), at(t.__P, e, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [r] : null, a, r == null ? iA(n) : r, !!(32 & n.__u), o), e.__v = n.__v, e.__.__k[e.__i] = e, te(a, e, o), e.__e != r && Ft(e)));
89
89
  LA.__r = 0;
90
90
  }
91
91
  function $t(A, t, e, n, r, a, o, l, i, s, u) {
92
- var c, g, f, y, b, v, d = n && n.__k || jt, m = t.length;
93
- for (i = Qe(e, t, d, i, m), c = 0; c < m; c++) (f = e.__k[c]) != null && (g = f.__i == -1 ? gA : d[f.__i] || gA, f.__i = c, v = at(A, f, g, r, a, o, l, i, s, u), y = f.__e, f.ref && g.ref != f.ref && (g.ref && ot(g.ref, null, f), u.push(f.ref, f.__c || y, f)), b == null && y != null && (b = y), 4 & f.__u || g.__k === f.__k ? i = Ae(f, i, A) : typeof f.type == "function" && v !== void 0 ? i = v : y && (i = y.nextSibling), f.__u &= -7);
94
- return e.__e = b, i;
92
+ var c, v, f, w, h, g, d = n && n.__k || jt, m = t.length;
93
+ for (i = Qe(e, t, d, i, m), c = 0; c < m; c++) (f = e.__k[c]) != null && (v = f.__i == -1 ? gA : d[f.__i] || gA, f.__i = c, g = at(A, f, v, r, a, o, l, i, s, u), w = f.__e, f.ref && v.ref != f.ref && (v.ref && ot(v.ref, null, f), u.push(f.ref, f.__c || w, f)), h == null && w != null && (h = w), 4 & f.__u || v.__k === f.__k ? i = Ae(f, i, A) : typeof f.type == "function" && g !== void 0 ? i = g : w && (i = w.nextSibling), f.__u &= -7);
94
+ return e.__e = h, i;
95
95
  }
96
96
  function Qe(A, t, e, n, r) {
97
- var a, o, l, i, s, u = e.length, c = u, g = 0;
98
- for (A.__k = new Array(r), a = 0; a < r; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (i = a + g, (o = A.__k[a] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? XA(null, o, null, null, null) : yA(o) ? XA($, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? XA(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = A, o.__b = A.__b + 1, l = null, (s = o.__i = Te(o, e, i, c)) != -1 && (c--, (l = e[s]) && (l.__u |= 2)), l == null || l.__v == null ? (s == -1 && (r > u ? g-- : r < u && g++), typeof o.type != "function" && (o.__u |= 4)) : s != i && (s == i - 1 ? g-- : s == i + 1 ? g++ : (s > i ? g-- : g++, o.__u |= 4))) : A.__k[a] = null;
97
+ var a, o, l, i, s, u = e.length, c = u, v = 0;
98
+ for (A.__k = new Array(r), a = 0; a < r; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (i = a + v, (o = A.__k[a] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? XA(null, o, null, null, null) : yA(o) ? XA($, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? XA(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = A, o.__b = A.__b + 1, l = null, (s = o.__i = Te(o, e, i, c)) != -1 && (c--, (l = e[s]) && (l.__u |= 2)), l == null || l.__v == null ? (s == -1 && (r > u ? v-- : r < u && v++), typeof o.type != "function" && (o.__u |= 4)) : s != i && (s == i - 1 ? v-- : s == i + 1 ? v++ : (s > i ? v-- : v++, o.__u |= 4))) : A.__k[a] = null;
99
99
  if (c) for (a = 0; a < u; a++) (l = e[a]) != null && !(2 & l.__u) && (l.__e == n && (n = iA(l)), ne(l, l));
100
100
  return n;
101
101
  }
@@ -158,55 +158,55 @@ function ht(A) {
158
158
  var e = this.l[t.type + A];
159
159
  if (t.t == null) t.t = nt++;
160
160
  else if (t.t < e.u) return;
161
- return e(M.event ? M.event(t) : t);
161
+ return e(k.event ? k.event(t) : t);
162
162
  }
163
163
  };
164
164
  }
165
165
  function at(A, t, e, n, r, a, o, l, i, s) {
166
- var u, c, g, f, y, b, v, d, m, w, h, C, B, L, E, P, S, O = t.type;
166
+ var u, c, v, f, w, h, g, d, m, b, y, C, M, T, q, I, B, X = t.type;
167
167
  if (t.constructor != null) return null;
168
- 128 & e.__u && (i = !!(32 & e.__u), a = [l = t.__e = e.__e]), (u = M.__b) && u(t);
169
- A: if (typeof O == "function") try {
170
- if (d = t.props, m = "prototype" in O && O.prototype.render, w = (u = O.contextType) && n[u.__c], h = u ? w ? w.props.value : u.__ : n, e.__c ? v = (c = t.__c = e.__c).__ = c.__E : (m ? t.__c = c = new O(d, h) : (t.__c = c = new F(d, h), c.constructor = O, c.render = Ne), w && w.sub(c), c.props = d, c.state || (c.state = {}), c.context = h, c.__n = n, g = c.__d = !0, c.__h = [], c._sb = []), m && c.__s == null && (c.__s = c.state), m && O.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = tA({}, c.__s)), tA(c.__s, O.getDerivedStateFromProps(d, c.__s))), f = c.props, y = c.state, c.__v = t, g) m && O.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), m && c.componentDidMount != null && c.__h.push(c.componentDidMount);
168
+ 128 & e.__u && (i = !!(32 & e.__u), a = [l = t.__e = e.__e]), (u = k.__b) && u(t);
169
+ A: if (typeof X == "function") try {
170
+ if (d = t.props, m = "prototype" in X && X.prototype.render, b = (u = X.contextType) && n[u.__c], y = u ? b ? b.props.value : u.__ : n, e.__c ? g = (c = t.__c = e.__c).__ = c.__E : (m ? t.__c = c = new X(d, y) : (t.__c = c = new F(d, y), c.constructor = X, c.render = Ne), b && b.sub(c), c.props = d, c.state || (c.state = {}), c.context = y, c.__n = n, v = c.__d = !0, c.__h = [], c._sb = []), m && c.__s == null && (c.__s = c.state), m && X.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = tA({}, c.__s)), tA(c.__s, X.getDerivedStateFromProps(d, c.__s))), f = c.props, w = c.state, c.__v = t, v) m && X.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), m && c.componentDidMount != null && c.__h.push(c.componentDidMount);
171
171
  else {
172
- if (m && O.getDerivedStateFromProps == null && d !== f && c.componentWillReceiveProps != null && c.componentWillReceiveProps(d, h), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(d, c.__s, h) === !1 || t.__v == e.__v) {
173
- for (t.__v != e.__v && (c.props = d, c.state = c.__s, c.__d = !1), t.__e = e.__e, t.__k = e.__k, t.__k.some(function(J) {
174
- J && (J.__ = t);
172
+ if (m && X.getDerivedStateFromProps == null && d !== f && c.componentWillReceiveProps != null && c.componentWillReceiveProps(d, y), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(d, c.__s, y) === !1 || t.__v == e.__v) {
173
+ for (t.__v != e.__v && (c.props = d, c.state = c.__s, c.__d = !1), t.__e = e.__e, t.__k = e.__k, t.__k.some(function(E) {
174
+ E && (E.__ = t);
175
175
  }), C = 0; C < c._sb.length; C++) c.__h.push(c._sb[C]);
176
176
  c._sb = [], c.__h.length && o.push(c);
177
177
  break A;
178
178
  }
179
- c.componentWillUpdate != null && c.componentWillUpdate(d, c.__s, h), m && c.componentDidUpdate != null && c.__h.push(function() {
180
- c.componentDidUpdate(f, y, b);
179
+ c.componentWillUpdate != null && c.componentWillUpdate(d, c.__s, y), m && c.componentDidUpdate != null && c.__h.push(function() {
180
+ c.componentDidUpdate(f, w, h);
181
181
  });
182
182
  }
183
- if (c.context = h, c.props = d, c.__P = A, c.__e = !1, B = M.__r, L = 0, m) {
184
- for (c.state = c.__s, c.__d = !1, B && B(t), u = c.render(c.props, c.state, c.context), E = 0; E < c._sb.length; E++) c.__h.push(c._sb[E]);
183
+ if (c.context = y, c.props = d, c.__P = A, c.__e = !1, M = k.__r, T = 0, m) {
184
+ for (c.state = c.__s, c.__d = !1, M && M(t), u = c.render(c.props, c.state, c.context), q = 0; q < c._sb.length; q++) c.__h.push(c._sb[q]);
185
185
  c._sb = [];
186
186
  } else do
187
- c.__d = !1, B && B(t), u = c.render(c.props, c.state, c.context), c.state = c.__s;
188
- while (c.__d && ++L < 25);
189
- c.state = c.__s, c.getChildContext != null && (n = tA(tA({}, n), c.getChildContext())), m && !g && c.getSnapshotBeforeUpdate != null && (b = c.getSnapshotBeforeUpdate(f, y)), P = u, u != null && u.type === $ && u.key == null && (P = ee(u.props.children)), l = $t(A, yA(P) ? P : [P], t, e, n, r, a, o, l, i, s), c.base = t.__e, t.__u &= -161, c.__h.length && o.push(c), v && (c.__E = c.__ = null);
190
- } catch (J) {
191
- if (t.__v = null, i || a != null) if (J.then) {
187
+ c.__d = !1, M && M(t), u = c.render(c.props, c.state, c.context), c.state = c.__s;
188
+ while (c.__d && ++T < 25);
189
+ c.state = c.__s, c.getChildContext != null && (n = tA(tA({}, n), c.getChildContext())), m && !v && c.getSnapshotBeforeUpdate != null && (h = c.getSnapshotBeforeUpdate(f, w)), I = u, u != null && u.type === $ && u.key == null && (I = ee(u.props.children)), l = $t(A, yA(I) ? I : [I], t, e, n, r, a, o, l, i, s), c.base = t.__e, t.__u &= -161, c.__h.length && o.push(c), g && (c.__E = c.__ = null);
190
+ } catch (E) {
191
+ if (t.__v = null, i || a != null) if (E.then) {
192
192
  for (t.__u |= i ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
193
193
  a[a.indexOf(l)] = null, t.__e = l;
194
- } else for (S = a.length; S--; ) rt(a[S]);
194
+ } else for (B = a.length; B--; ) rt(a[B]);
195
195
  else t.__e = e.__e, t.__k = e.__k;
196
- M.__e(J, t, e);
196
+ k.__e(E, t, e);
197
197
  }
198
198
  else a == null && t.__v == e.__v ? (t.__k = e.__k, t.__e = e.__e) : l = t.__e = Le(e.__e, t, e, n, r, a, o, i, s);
199
- return (u = M.diffed) && u(t), 128 & t.__u ? void 0 : l;
199
+ return (u = k.diffed) && u(t), 128 & t.__u ? void 0 : l;
200
200
  }
201
201
  function te(A, t, e) {
202
202
  for (var n = 0; n < e.length; n++) ot(e[n], e[++n], e[++n]);
203
- M.__c && M.__c(t, A), A.some(function(r) {
203
+ k.__c && k.__c(t, A), A.some(function(r) {
204
204
  try {
205
205
  A = r.__h, r.__h = [], A.some(function(a) {
206
206
  a.call(r);
207
207
  });
208
208
  } catch (a) {
209
- M.__e(a, r.__v);
209
+ k.__e(a, r.__v);
210
210
  }
211
211
  });
212
212
  }
@@ -214,7 +214,7 @@ function ee(A) {
214
214
  return typeof A != "object" || A == null || A.__b && A.__b > 0 ? A : yA(A) ? A.map(ee) : tA({}, A);
215
215
  }
216
216
  function Le(A, t, e, n, r, a, o, l, i) {
217
- var s, u, c, g, f, y, b, v = e.props, d = t.props, m = t.type;
217
+ var s, u, c, v, f, w, h, g = e.props, d = t.props, m = t.type;
218
218
  if (m == "svg" ? r = "http://www.w3.org/2000/svg" : m == "math" ? r = "http://www.w3.org/1998/Math/MathML" : r || (r = "http://www.w3.org/1999/xhtml"), a != null) {
219
219
  for (s = 0; s < a.length; s++) if ((f = a[s]) && "setAttribute" in f == !!m && (m ? f.localName == m : f.nodeType == 3)) {
220
220
  A = f, a[s] = null;
@@ -223,22 +223,22 @@ function Le(A, t, e, n, r, a, o, l, i) {
223
223
  }
224
224
  if (A == null) {
225
225
  if (m == null) return document.createTextNode(d);
226
- A = document.createElementNS(r, m, d.is && d), l && (M.__m && M.__m(t, a), l = !1), a = null;
226
+ A = document.createElementNS(r, m, d.is && d), l && (k.__m && k.__m(t, a), l = !1), a = null;
227
227
  }
228
- if (m == null) v === d || l && A.data == d || (A.data = d);
228
+ if (m == null) g === d || l && A.data == d || (A.data = d);
229
229
  else {
230
- if (a = a && UA.call(A.childNodes), v = e.props || gA, !l && a != null) for (v = {}, s = 0; s < A.attributes.length; s++) v[(f = A.attributes[s]).name] = f.value;
231
- for (s in v) if (f = v[s], s != "children") {
230
+ if (a = a && UA.call(A.childNodes), g = e.props || gA, !l && a != null) for (g = {}, s = 0; s < A.attributes.length; s++) g[(f = A.attributes[s]).name] = f.value;
231
+ for (s in g) if (f = g[s], s != "children") {
232
232
  if (s == "dangerouslySetInnerHTML") c = f;
233
233
  else if (!(s in d)) {
234
234
  if (s == "value" && "defaultValue" in d || s == "checked" && "defaultChecked" in d) continue;
235
235
  kA(A, s, null, f, r);
236
236
  }
237
237
  }
238
- for (s in d) f = d[s], s == "children" ? g = f : s == "dangerouslySetInnerHTML" ? u = f : s == "value" ? y = f : s == "checked" ? b = f : l && typeof f != "function" || v[s] === f || kA(A, s, f, v[s], r);
238
+ for (s in d) f = d[s], s == "children" ? v = f : s == "dangerouslySetInnerHTML" ? u = f : s == "value" ? w = f : s == "checked" ? h = f : l && typeof f != "function" || g[s] === f || kA(A, s, f, g[s], r);
239
239
  if (u) l || c && (u.__html == c.__html || u.__html == A.innerHTML) || (A.innerHTML = u.__html), t.__k = [];
240
- else if (c && (A.innerHTML = ""), $t(t.type == "template" ? A.content : A, yA(g) ? g : [g], t, e, n, m == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, a, o, a ? a[0] : e.__k && iA(e, 0), l, i), a != null) for (s = a.length; s--; ) rt(a[s]);
241
- l || (s = "value", m == "progress" && y == null ? A.removeAttribute("value") : y != null && (y !== A[s] || m == "progress" && !y || m == "option" && y != v[s]) && kA(A, s, y, v[s], r), s = "checked", b != null && b != A[s] && kA(A, s, b, v[s], r));
240
+ else if (c && (A.innerHTML = ""), $t(t.type == "template" ? A.content : A, yA(v) ? v : [v], t, e, n, m == "foreignObject" ? "http://www.w3.org/1999/xhtml" : r, a, o, a ? a[0] : e.__k && iA(e, 0), l, i), a != null) for (s = a.length; s--; ) rt(a[s]);
241
+ l || (s = "value", m == "progress" && w == null ? A.removeAttribute("value") : w != null && (w !== A[s] || m == "progress" && !w || m == "option" && w != g[s]) && kA(A, s, w, g[s], r), s = "checked", h != null && h != A[s] && kA(A, s, h, g[s], r));
242
242
  }
243
243
  return A;
244
244
  }
@@ -249,16 +249,16 @@ function ot(A, t, e) {
249
249
  n && A.__u(), n && t == null || (A.__u = A(t));
250
250
  } else A.current = t;
251
251
  } catch (r) {
252
- M.__e(r, e);
252
+ k.__e(r, e);
253
253
  }
254
254
  }
255
255
  function ne(A, t, e) {
256
256
  var n, r;
257
- if (M.unmount && M.unmount(A), (n = A.ref) && (n.current && n.current != A.__e || ot(n, null, t)), (n = A.__c) != null) {
257
+ if (k.unmount && k.unmount(A), (n = A.ref) && (n.current && n.current != A.__e || ot(n, null, t)), (n = A.__c) != null) {
258
258
  if (n.componentWillUnmount) try {
259
259
  n.componentWillUnmount();
260
260
  } catch (a) {
261
- M.__e(a, t);
261
+ k.__e(a, t);
262
262
  }
263
263
  n.base = n.__P = null;
264
264
  }
@@ -270,7 +270,7 @@ function Ne(A, t, e) {
270
270
  }
271
271
  function yt(A, t, e) {
272
272
  var n, r, a, o;
273
- t == document && (t = document.documentElement), M.__ && M.__(A, t), r = (n = !1) ? null : t.__k, a = [], o = [], at(t, A = t.__k = YA($, null, [A]), r || gA, gA, t.namespaceURI, r ? null : t.firstChild ? UA.call(t.childNodes) : null, a, r ? r.__e : t.firstChild, n, o), te(a, A, o);
273
+ t == document && (t = document.documentElement), k.__ && k.__(A, t), r = (n = !1) ? null : t.__k, a = [], o = [], at(t, A = t.__k = YA($, null, [A]), r || gA, gA, t.namespaceURI, r ? null : t.firstChild ? UA.call(t.childNodes) : null, a, r ? r.__e : t.firstChild, n, o), te(a, A, o);
274
274
  }
275
275
  function lt(A) {
276
276
  function t(e) {
@@ -295,7 +295,7 @@ function lt(A) {
295
295
  return e.children(n);
296
296
  }).contextType = t, t;
297
297
  }
298
- UA = jt.slice, M = { __e: function(A, t, e, n) {
298
+ UA = jt.slice, k = { __e: function(A, t, e, n) {
299
299
  for (var r, a, o; t = t.__; ) if ((r = t.__c) && !r.__) try {
300
300
  if ((a = r.constructor) && a.getDerivedStateFromError != null && (r.setState(a.getDerivedStateFromError(A)), o = r.__d), r.componentDidCatch != null && (r.componentDidCatch(A, n || {}), o = r.__d), o) return r.__E = r;
301
301
  } catch (l) {
@@ -317,16 +317,16 @@ function p(A, t, e, n, r, a) {
317
317
  if ("ref" in i) for (l in i = {}, t) l == "ref" ? o = t[l] : i[l] = t[l];
318
318
  var s = { type: A, props: i, key: e, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Ie, __i: -1, __u: 0, __source: r, __self: a };
319
319
  if (typeof A == "function" && (o = A.defaultProps)) for (l in o) i[l] === void 0 && (i[l] = o[l]);
320
- return M.vnode && M.vnode(s), s;
320
+ return k.vnode && k.vnode(s), s;
321
321
  }
322
- const st = "2.1.0", W = lt({});
323
- var cA, N, WA, wt, hA = 0, re = [], z = M, bt = z.__b, Ct = z.__r, Dt = z.diffed, Mt = z.__c, kt = z.unmount, Bt = z.__;
322
+ const st = "2.2.0", W = lt({});
323
+ var cA, N, WA, wt, hA = 0, re = [], z = k, bt = z.__b, Ct = z.__r, Dt = z.diffed, Mt = z.__c, kt = z.unmount, Bt = z.__;
324
324
  function zA(A, t) {
325
325
  z.__h && z.__h(N, A, hA || t), hA = 0;
326
326
  var e = N.__H || (N.__H = { __: [], __h: [] });
327
327
  return A >= e.__.length && e.__.push({}), e.__[A];
328
328
  }
329
- function T(A) {
329
+ function L(A) {
330
330
  return hA = 1, Oe(le, A);
331
331
  }
332
332
  function Oe(A, t, e) {
@@ -337,17 +337,17 @@ function Oe(A, t, e) {
337
337
  }], n.__c = N, !N.__f)) {
338
338
  var r = function(l, i, s) {
339
339
  if (!n.__c.__H) return !0;
340
- var u = n.__c.__H.__.filter(function(g) {
341
- return !!g.__c;
340
+ var u = n.__c.__H.__.filter(function(v) {
341
+ return !!v.__c;
342
342
  });
343
- if (u.every(function(g) {
344
- return !g.__N;
343
+ if (u.every(function(v) {
344
+ return !v.__N;
345
345
  })) return !a || a.call(this, l, i, s);
346
346
  var c = n.__c.props !== l;
347
- return u.forEach(function(g) {
348
- if (g.__N) {
349
- var f = g.__[0];
350
- g.__ = g.__N, g.__N = void 0, f !== g.__[0] && (c = !0);
347
+ return u.forEach(function(v) {
348
+ if (v.__N) {
349
+ var f = v.__[0];
350
+ v.__ = v.__N, v.__N = void 0, f !== v.__[0] && (c = !0);
351
351
  }
352
352
  }), a && a.call(this, l, i, s) || c;
353
353
  };
@@ -381,7 +381,7 @@ function ae(A, t) {
381
381
  return A;
382
382
  }, t);
383
383
  }
384
- function I(A) {
384
+ function O(A) {
385
385
  var t = N.context[A.__c], e = zA(cA++, 9);
386
386
  return e.c = A, t ? (e.__ == null && (e.__ = !0, t.sub(N)), t.props.value) : A.__;
387
387
  }
@@ -455,7 +455,7 @@ function le(A, t) {
455
455
  return typeof t == "function" ? t(A) : t;
456
456
  }
457
457
  function Y() {
458
- const { language: A, translations: t } = I(W);
458
+ const { language: A, translations: t } = O(W);
459
459
  function e(n) {
460
460
  if (!t)
461
461
  return n;
@@ -558,7 +558,7 @@ function _e() {
558
558
  );
559
559
  }
560
560
  const Ge = () => {
561
- const { t: A } = Y(), { isTestMode: t, show_footer: e } = I(W);
561
+ const { t: A } = Y(), { isTestMode: t, show_footer: e } = O(W);
562
562
  return /* @__PURE__ */ p("div", { className: "mt-2 flex w-full flex-col items-center justify-center gap-5 text-xs", children: [
563
563
  /* @__PURE__ */ p("a", { href: `https://moyasar.com/?ref=payment-form-v${st}`, children: e && /* @__PURE__ */ p(_e, {}) }),
564
564
  t && /* @__PURE__ */ p("span", { class: "text-red-600", children: A("common.test_mode_disclaimer") })
@@ -738,24 +738,24 @@ const nA = (...A) => xe(A), HA = (A) => {
738
738
  "busy",
739
739
  "fail",
740
740
  "success"
741
- ]), { isProcessing: u } = I(W), c = {
741
+ ]), { isProcessing: u } = O(W), c = {
742
742
  primary: "bg-primary text-white",
743
743
  stc: "bg-stc text-white",
744
744
  error: "bg-error text-white pointer-events-none",
745
745
  success: "bg-success text-white"
746
746
  };
747
- function g() {
747
+ function v() {
748
748
  return l ? c.error : i ? c.success : c[n];
749
749
  }
750
750
  return /* @__PURE__ */ p(
751
751
  "button",
752
- X(k({}, s), {
752
+ P(S({}, s), {
753
753
  type: e,
754
754
  disabled: u || a,
755
755
  onClick: r,
756
756
  class: nA([
757
757
  "flex h-11 w-full cursor-pointer items-center justify-center gap-2 rounded-lg px-3 py-2 transition-colors disabled:cursor-default disabled:opacity-70",
758
- g(),
758
+ v(),
759
759
  A.class,
760
760
  u && !l && "pointer-events-none grayscale"
761
761
  ]),
@@ -854,10 +854,10 @@ const nA = (...A) => xe(A), HA = (A) => {
854
854
  /* @__PURE__ */ p(Ze, { currency: A }),
855
855
  /* @__PURE__ */ p("span", { children: t })
856
856
  ] }), pA = (A) => {
857
- const i = A, { name: t, placeholder: e, type: n = "text", onBlur: r, disabled: a } = i, o = MA(i, ["name", "placeholder", "type", "onBlur", "disabled"]), { isProcessing: l } = I(W);
857
+ const i = A, { name: t, placeholder: e, type: n = "text", onBlur: r, disabled: a } = i, o = MA(i, ["name", "placeholder", "type", "onBlur", "disabled"]), { isProcessing: l } = O(W);
858
858
  return /* @__PURE__ */ p(
859
859
  "input",
860
- X(k({}, o), {
860
+ P(S({}, o), {
861
861
  dir: "ltr",
862
862
  id: t,
863
863
  name: t,
@@ -892,18 +892,18 @@ function Xt(A, t) {
892
892
  (Xt.prototype = new F()).isPureReactComponent = !0, Xt.prototype.shouldComponentUpdate = function(A, t) {
893
893
  return Pt(this.props, A) || Pt(this.state, t);
894
894
  };
895
- var Qt = M.__b;
896
- M.__b = function(A) {
895
+ var Qt = k.__b;
896
+ k.__b = function(A) {
897
897
  A.type && A.type.__f && A.ref && (A.props.ref = A.ref, A.ref = null), Qt && Qt(A);
898
898
  };
899
- var He = M.__e;
900
- M.__e = function(A, t, e, n) {
899
+ var He = k.__e;
900
+ k.__e = function(A, t, e, n) {
901
901
  if (A.then) {
902
902
  for (var r, a = t; a = a.__; ) if ((r = a.__c) && r.__c) return t.__e == null && (t.__e = e.__e, t.__k = e.__k), r.__c(A, t);
903
903
  }
904
904
  He(A, t, e, n);
905
905
  };
906
- var Tt = M.unmount;
906
+ var Tt = k.unmount;
907
907
  function ce(A, t, e) {
908
908
  return A && (A.__c && A.__c.__H && (A.__c.__H.__.forEach(function(n) {
909
909
  typeof n.__c == "function" && n.__c();
@@ -926,7 +926,7 @@ function pe(A) {
926
926
  function BA() {
927
927
  this.i = null, this.l = null;
928
928
  }
929
- M.unmount = function(A) {
929
+ k.unmount = function(A) {
930
930
  var t = A.__c;
931
931
  t && t.__R && t.__R(), t && 32 & A.__u && (A.type = null), Tt && Tt(A);
932
932
  }, (qA.prototype = new F()).__c = function(A, t) {
@@ -997,7 +997,7 @@ F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
997
997
  Object.defineProperty(this, A, { configurable: !0, writable: !0, value: t });
998
998
  } });
999
999
  });
1000
- var Nt = M.event;
1000
+ var Nt = k.event;
1001
1001
  function en() {
1002
1002
  }
1003
1003
  function nn() {
@@ -1006,13 +1006,13 @@ function nn() {
1006
1006
  function rn() {
1007
1007
  return this.defaultPrevented;
1008
1008
  }
1009
- M.event = function(A) {
1009
+ k.event = function(A) {
1010
1010
  return Nt && (A = Nt(A)), A.persist = en, A.isPropagationStopped = nn, A.isDefaultPrevented = rn, A.nativeEvent = A;
1011
1011
  };
1012
1012
  var an = { enumerable: !1, configurable: !0, get: function() {
1013
1013
  return this.class;
1014
- } }, It = M.vnode;
1015
- M.vnode = function(A) {
1014
+ } }, It = k.vnode;
1015
+ k.vnode = function(A) {
1016
1016
  typeof A.type == "string" && function(t) {
1017
1017
  var e = t.props, n = t.type, r = {}, a = n.indexOf("-") === -1;
1018
1018
  for (var o in e) {
@@ -1029,66 +1029,66 @@ M.vnode = function(A) {
1029
1029
  })), e.class && !e.className ? (r.class = e.class, Object.defineProperty(r, "className", an)) : (e.className && !e.class || e.class && e.className) && (r.class = r.className = e.className), t.props = r;
1030
1030
  }(A), A.$$typeof = Re, It && It(A);
1031
1031
  };
1032
- var Ot = M.__r;
1033
- M.__r = function(A) {
1032
+ var Ot = k.__r;
1033
+ k.__r = function(A) {
1034
1034
  Ot && Ot(A), A.__c;
1035
1035
  };
1036
- var Ut = M.diffed;
1037
- M.diffed = function(A) {
1036
+ var Ut = k.diffed;
1037
+ k.diffed = function(A) {
1038
1038
  Ut && Ut(A);
1039
1039
  var t = A.props, e = A.__e;
1040
1040
  e != null && A.type === "textarea" && "value" in t && t.value !== e.value && (e.value = t.value == null ? "" : t.value);
1041
1041
  };
1042
1042
  function fA(A, t, e, n) {
1043
- var r = this, a = j(null), o = j(0), l = j(0), i = j(null), s = j([]), u = j(), c = j(), g = j(A), f = j(!0);
1044
- g.current = A;
1045
- var y = typeof window != "undefined", b = !t && t !== 0 && y;
1043
+ var r = this, a = j(null), o = j(0), l = j(0), i = j(null), s = j([]), u = j(), c = j(), v = j(A), f = j(!0);
1044
+ v.current = A;
1045
+ var w = typeof window != "undefined", h = !t && t !== 0 && w;
1046
1046
  if (typeof A != "function") throw new TypeError("Expected a function");
1047
1047
  t = +t || 0;
1048
- var v = !!(e = e || {}).leading, d = !("trailing" in e) || !!e.trailing, m = "maxWait" in e, w = "debounceOnServer" in e && !!e.debounceOnServer, h = m ? Math.max(+e.maxWait || 0, t) : null;
1048
+ var g = !!(e = e || {}).leading, d = !("trailing" in e) || !!e.trailing, m = "maxWait" in e, b = "debounceOnServer" in e && !!e.debounceOnServer, y = m ? Math.max(+e.maxWait || 0, t) : null;
1049
1049
  V(function() {
1050
1050
  return f.current = !0, function() {
1051
1051
  f.current = !1;
1052
1052
  };
1053
1053
  }, []);
1054
1054
  var C = oA(function() {
1055
- var B = function(U) {
1055
+ var M = function(U) {
1056
1056
  var _ = s.current, AA = u.current;
1057
- return s.current = u.current = null, o.current = U, l.current = l.current || U, c.current = g.current.apply(AA, _);
1058
- }, L = function(U, _) {
1059
- b && cancelAnimationFrame(i.current), i.current = b ? requestAnimationFrame(U) : setTimeout(U, _);
1060
- }, E = function(U) {
1057
+ return s.current = u.current = null, o.current = U, l.current = l.current || U, c.current = v.current.apply(AA, _);
1058
+ }, T = function(U, _) {
1059
+ h && cancelAnimationFrame(i.current), i.current = h ? requestAnimationFrame(U) : setTimeout(U, _);
1060
+ }, q = function(U) {
1061
1061
  if (!f.current) return !1;
1062
1062
  var _ = U - a.current;
1063
- return !a.current || _ >= t || _ < 0 || m && U - o.current >= h;
1064
- }, P = function(U) {
1065
- return i.current = null, d && s.current ? B(U) : (s.current = u.current = null, c.current);
1066
- }, S = function U() {
1063
+ return !a.current || _ >= t || _ < 0 || m && U - o.current >= y;
1064
+ }, I = function(U) {
1065
+ return i.current = null, d && s.current ? M(U) : (s.current = u.current = null, c.current);
1066
+ }, B = function U() {
1067
1067
  var _ = Date.now();
1068
- if (v && l.current === o.current && O(), E(_)) return P(_);
1068
+ if (g && l.current === o.current && X(), q(_)) return I(_);
1069
1069
  if (f.current) {
1070
- var AA = t - (_ - a.current), lA = m ? Math.min(AA, h - (_ - o.current)) : AA;
1071
- L(U, lA);
1070
+ var AA = t - (_ - a.current), lA = m ? Math.min(AA, y - (_ - o.current)) : AA;
1071
+ T(U, lA);
1072
1072
  }
1073
- }, O = function() {
1074
- }, J = function() {
1075
- if (y || w) {
1076
- var U = Date.now(), _ = E(U);
1073
+ }, X = function() {
1074
+ }, E = function() {
1075
+ if (w || b) {
1076
+ var U = Date.now(), _ = q(U);
1077
1077
  if (s.current = [].slice.call(arguments), u.current = r, a.current = U, _) {
1078
- if (!i.current && f.current) return o.current = a.current, L(S, t), v ? B(a.current) : c.current;
1079
- if (m) return L(S, t), B(a.current);
1078
+ if (!i.current && f.current) return o.current = a.current, T(B, t), g ? M(a.current) : c.current;
1079
+ if (m) return T(B, t), M(a.current);
1080
1080
  }
1081
- return i.current || L(S, t), c.current;
1081
+ return i.current || T(B, t), c.current;
1082
1082
  }
1083
1083
  };
1084
- return J.cancel = function() {
1085
- i.current && (b ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, s.current = a.current = u.current = i.current = null;
1086
- }, J.isPending = function() {
1084
+ return E.cancel = function() {
1085
+ i.current && (h ? cancelAnimationFrame(i.current) : clearTimeout(i.current)), o.current = 0, s.current = a.current = u.current = i.current = null;
1086
+ }, E.isPending = function() {
1087
1087
  return !!i.current;
1088
- }, J.flush = function() {
1089
- return i.current ? P(Date.now()) : c.current;
1090
- }, J;
1091
- }, [v, m, t, h, d, b, y, w, n]);
1088
+ }, E.flush = function() {
1089
+ return i.current ? I(Date.now()) : c.current;
1090
+ }, E;
1091
+ }, [g, m, t, y, d, h, w, b, n]);
1092
1092
  return C;
1093
1093
  }
1094
1094
  var on = Object.defineProperty, ln = (A, t, e) => t in A ? on(A, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : A[t] = e, vA = (A, t, e) => ln(A, typeof t != "symbol" ? t + "" : t, e);
@@ -1105,27 +1105,27 @@ const zt = {
1105
1105
  roundingMode: "trunc"
1106
1106
  });
1107
1107
  }, sn = (A, t = !0, e) => {
1108
- var v, d, m;
1108
+ var g, d, m;
1109
1109
  var n, r, a, o;
1110
- const l = ((n = e.number) == null ? void 0 : n.unsigned) !== !0 && A.startsWith("-") ? "-" : "", i = (v = (r = e.number) == null ? void 0 : r.fraction) != null ? v : 0;
1110
+ const l = ((n = e.number) == null ? void 0 : n.unsigned) !== !0 && A.startsWith("-") ? "-" : "", i = (g = (r = e.number) == null ? void 0 : r.fraction) != null ? g : 0;
1111
1111
  let s = Gt(0, i, e);
1112
- const u = s.formatToParts(1000.12), c = (d = (a = u.find((w) => w.type === "group")) == null ? void 0 : a.value) != null ? d : " ", g = (m = (o = u.find((w) => w.type === "decimal")) == null ? void 0 : o.value) != null ? m : ".", f = _t(A, c, g);
1112
+ const u = s.formatToParts(1000.12), c = (d = (a = u.find((b) => b.type === "group")) == null ? void 0 : a.value) != null ? d : " ", v = (m = (o = u.find((b) => b.type === "decimal")) == null ? void 0 : o.value) != null ? m : ".", f = _t(A, c, v);
1113
1113
  if (Number.isNaN(parseFloat(f))) return l;
1114
- const y = f.split(".");
1115
- if (y[1] != null && y[1].length >= 1) {
1116
- const w = y[1].length <= i ? y[1].length : i;
1117
- s = Gt(w, i, e);
1114
+ const w = f.split(".");
1115
+ if (w[1] != null && w[1].length >= 1) {
1116
+ const b = w[1].length <= i ? w[1].length : i;
1117
+ s = Gt(b, i, e);
1118
1118
  }
1119
- let b = s.format(parseFloat(f));
1120
- return t ? i > 0 && f.endsWith(".") && !f.slice(0, -1).includes(".") && (b += g) : b = _t(b, c, g), l + b;
1119
+ let h = s.format(parseFloat(f));
1120
+ return t ? i > 0 && f.endsWith(".") && !f.slice(0, -1).includes(".") && (h += v) : h = _t(h, c, v), l + h;
1121
1121
  };
1122
1122
  class cn {
1123
1123
  constructor(t = {}) {
1124
1124
  var n;
1125
1125
  vA(this, "opts", {}), vA(this, "memo", /* @__PURE__ */ new Map());
1126
- const e = k({}, t);
1126
+ const e = S({}, t);
1127
1127
  if (e.tokens != null) {
1128
- e.tokens = e.tokensReplace ? k({}, e.tokens) : k(k({}, zt), e.tokens);
1128
+ e.tokens = e.tokensReplace ? S({}, e.tokens) : S(S({}, zt), e.tokens);
1129
1129
  for (const r of Object.values(e.tokens))
1130
1130
  typeof r.pattern == "string" && (r.pattern = new RegExp(r.pattern));
1131
1131
  } else
@@ -1173,26 +1173,26 @@ class cn {
1173
1173
  if (e == null) return t;
1174
1174
  const r = `v=${t},mr=${e},m=${n ? 1 : 0}`;
1175
1175
  if (this.memo.has(r)) return this.memo.get(r);
1176
- const { mask: a, escaped: o } = this.escapeMask(e), l = [], i = this.opts.tokens != null ? this.opts.tokens : {}, s = this.isReversed() ? -1 : 1, u = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : a.length - 1, g = this.isReversed() ? () => v > -1 && d > -1 : () => v < a.length && d < t.length, f = (w) => !this.isReversed() && w <= c || this.isReversed() && w >= c;
1177
- let y, b = -1, v = this.isReversed() ? a.length - 1 : 0, d = this.isReversed() ? t.length - 1 : 0, m = !1;
1178
- for (; g(); ) {
1179
- const w = a.charAt(v), h = i[w], C = (h == null ? void 0 : h.transform) != null ? h.transform(t.charAt(d)) : t.charAt(d);
1180
- if (!o.includes(v) && h != null ? (C.match(h.pattern) != null ? (l[u](C), h.repeated ? (b === -1 ? b = v : v === c && v !== b && (v = b - s), c === b && (v -= s)) : h.multiple && (m = !0, v -= s), v += s) : h.multiple ? m && (v += s, d -= s, m = !1) : C === y ? y = void 0 : h.optional && (v += s, d -= s), d += s) : (n && !this.isEager() && l[u](w), C === w && !this.isEager() ? d += s : y = w, this.isEager() || (v += s)), this.isEager())
1181
- for (; f(v) && (i[a.charAt(v)] == null || o.includes(v)); ) {
1176
+ const { mask: a, escaped: o } = this.escapeMask(e), l = [], i = this.opts.tokens != null ? this.opts.tokens : {}, s = this.isReversed() ? -1 : 1, u = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : a.length - 1, v = this.isReversed() ? () => g > -1 && d > -1 : () => g < a.length && d < t.length, f = (b) => !this.isReversed() && b <= c || this.isReversed() && b >= c;
1177
+ let w, h = -1, g = this.isReversed() ? a.length - 1 : 0, d = this.isReversed() ? t.length - 1 : 0, m = !1;
1178
+ for (; v(); ) {
1179
+ const b = a.charAt(g), y = i[b], C = (y == null ? void 0 : y.transform) != null ? y.transform(t.charAt(d)) : t.charAt(d);
1180
+ if (!o.includes(g) && y != null ? (C.match(y.pattern) != null ? (l[u](C), y.repeated ? (h === -1 ? h = g : g === c && g !== h && (g = h - s), c === h && (g -= s)) : y.multiple && (m = !0, g -= s), g += s) : y.multiple ? m && (g += s, d -= s, m = !1) : C === w ? w = void 0 : y.optional && (g += s, d -= s), d += s) : (n && !this.isEager() && l[u](b), C === b && !this.isEager() ? d += s : w = b, this.isEager() || (g += s)), this.isEager())
1181
+ for (; f(g) && (i[a.charAt(g)] == null || o.includes(g)); ) {
1182
1182
  if (n) {
1183
- if (l[u](a.charAt(v)), t.charAt(d) === a.charAt(v)) {
1184
- v += s, d += s;
1183
+ if (l[u](a.charAt(g)), t.charAt(d) === a.charAt(g)) {
1184
+ g += s, d += s;
1185
1185
  continue;
1186
1186
  }
1187
- } else a.charAt(v) === t.charAt(d) && (d += s);
1188
- v += s;
1187
+ } else a.charAt(g) === t.charAt(d) && (d += s);
1188
+ g += s;
1189
1189
  }
1190
1190
  }
1191
1191
  return this.memo.set(r, l.join("")), this.memo.get(r);
1192
1192
  }
1193
1193
  }
1194
1194
  const fe = (A) => JSON.parse(A.replaceAll("'", '"')), un = (A, t = {}) => {
1195
- const e = k({}, t);
1195
+ const e = S({}, t);
1196
1196
  A.dataset.maska != null && A.dataset.maska !== "" && (e.mask = pn(A.dataset.maska)), A.dataset.maskaEager != null && (e.eager = SA(A.dataset.maskaEager)), A.dataset.maskaReversed != null && (e.reversed = SA(A.dataset.maskaReversed)), A.dataset.maskaTokensReplace != null && (e.tokensReplace = SA(A.dataset.maskaTokensReplace)), A.dataset.maskaTokens != null && (e.tokens = fn(A.dataset.maskaTokens));
1197
1197
  const n = {};
1198
1198
  return A.dataset.maskaNumberLocale != null && (n.locale = A.dataset.maskaNumberLocale), A.dataset.maskaNumberFraction != null && (n.fraction = parseInt(A.dataset.maskaNumberFraction)), A.dataset.maskaNumberUnsigned != null && (n.unsigned = SA(A.dataset.maskaNumberUnsigned)), (A.dataset.maskaNumber != null || Object.values(n).length > 0) && (e.number = n), e;
@@ -1222,7 +1222,7 @@ class _A {
1222
1222
  }), this.options = e, this.eventAbortController = new AbortController(), this.init(this.getInputs(t));
1223
1223
  }
1224
1224
  update(t = {}) {
1225
- this.options = k({}, t), this.init(Array.from(this.items.keys()));
1225
+ this.options = S({}, t), this.init(Array.from(this.items.keys()));
1226
1226
  }
1227
1227
  updateValue(t) {
1228
1228
  var e;
@@ -1253,10 +1253,10 @@ class _A {
1253
1253
  var r, a;
1254
1254
  const o = t.selectionStart, l = t.value;
1255
1255
  if (n(), o === null || o === l.length && !e) return;
1256
- const i = t.value, s = l.slice(0, o), u = i.slice(0, o), c = (r = this.processInput(t, s)) == null ? void 0 : r.unmasked, g = (a = this.processInput(t, u)) == null ? void 0 : a.unmasked;
1257
- if (c === void 0 || g === void 0) return;
1256
+ const i = t.value, s = l.slice(0, o), u = i.slice(0, o), c = (r = this.processInput(t, s)) == null ? void 0 : r.unmasked, v = (a = this.processInput(t, u)) == null ? void 0 : a.unmasked;
1257
+ if (c === void 0 || v === void 0) return;
1258
1258
  let f = o;
1259
- s !== u && (f += e ? i.length - l.length : c.length - g.length), t.setSelectionRange(f, f);
1259
+ s !== u && (f += e ? i.length - l.length : c.length - v.length), t.setSelectionRange(f, f);
1260
1260
  }
1261
1261
  setValue(t, e) {
1262
1262
  const n = this.processInput(t, e);
@@ -1276,7 +1276,7 @@ class _A {
1276
1276
  }
1277
1277
  }
1278
1278
  const dn = ({ showOtp: A, value: t, setValue: e }) => {
1279
- const { t: n } = Y(), { handleBlur: r, err: a } = I(it), o = "### ### ####", l = (s) => {
1279
+ const { t: n } = Y(), { handleBlur: r, err: a } = O(it), o = "### ### ####", l = (s) => {
1280
1280
  const u = s.target, { value: c } = u;
1281
1281
  e(c);
1282
1282
  }, i = fA(r, 1e3);
@@ -1307,7 +1307,7 @@ const dn = ({ showOtp: A, value: t, setValue: e }) => {
1307
1307
  }
1308
1308
  );
1309
1309
  }, mn = ({ showPhone: A, value: t, setValue: e }) => {
1310
- const { t: n } = Y(), { handleBlur: r, err: a } = I(it), o = (i) => {
1310
+ const { t: n } = Y(), { handleBlur: r, err: a } = O(it), o = (i) => {
1311
1311
  const s = i.target, { value: u } = s;
1312
1312
  e(u);
1313
1313
  }, l = fA(r, 1e3);
@@ -1343,7 +1343,7 @@ const dn = ({ showOtp: A, value: t, setValue: e }) => {
1343
1343
  const e = j(null), n = ae(() => {
1344
1344
  const l = A ? new Date(A).getTime() - (/* @__PURE__ */ new Date()).getTime() : 0;
1345
1345
  return l < 0 ? 0 : l;
1346
- }, [A]), [r, a] = T(n());
1346
+ }, [A]), [r, a] = L(n());
1347
1347
  V(() => (e.current = setInterval(() => {
1348
1348
  a(n());
1349
1349
  }, 500), () => {
@@ -1365,7 +1365,7 @@ function de(A) {
1365
1365
  return A.errors !== void 0;
1366
1366
  }
1367
1367
  const hn = () => {
1368
- const { t: A } = Y(), [t, e] = T(!1), {
1368
+ const { t: A } = Y(), [t, e] = L(!1), {
1369
1369
  given_id: n,
1370
1370
  amount: r,
1371
1371
  currency: a,
@@ -1375,81 +1375,82 @@ const hn = () => {
1375
1375
  invoice_id: s,
1376
1376
  version: u,
1377
1377
  base_url: c,
1378
- apply_coupon: g,
1379
- on_failure: f,
1380
- setFormSettings: y
1381
- } = I(W), b = (h) => {
1382
- y && (e(h), y((C) => X(k({}, C), {
1383
- isProcessing: h
1378
+ apply_coupon: v,
1379
+ splits: f,
1380
+ on_failure: w,
1381
+ setFormSettings: h
1382
+ } = O(W), g = (C) => {
1383
+ h && (e(C), h((M) => P(S({}, M), {
1384
+ isProcessing: C
1384
1385
  })));
1385
- }, v = {
1386
+ }, d = {
1386
1387
  amount: r,
1387
1388
  currency: a,
1388
1389
  description: o,
1389
1390
  publishable_api_key: l
1390
1391
  };
1391
- n && (v.given_id = n), i && Object.keys(i).length > 0 && (v.metadata = i), s && (v.invoice_id = s.toLowerCase()), g !== void 0 && (v.apply_coupon = g);
1392
- const d = (h) => K(void 0, null, function* () {
1393
- if (y && (y((C) => X(k({}, C), {
1394
- apiError: `${A("error." + h.type)}, ${h.message}`
1395
- })), f))
1392
+ n && (d.given_id = n), i && Object.keys(i).length > 0 && (d.metadata = i), s && (d.invoice_id = s.toLowerCase()), v !== void 0 && (d.apply_coupon = v), f && (d.splits = f);
1393
+ const m = (C) => K(void 0, null, function* () {
1394
+ if (h && (h((M) => P(S({}, M), {
1395
+ apiError: `${A("error." + C.type)}, ${C.message}`
1396
+ })), w))
1396
1397
  try {
1397
- yield f(h);
1398
- } catch (C) {
1399
- console.error("An error happened when firing failure callback"), console.error(C);
1398
+ yield w(C);
1399
+ } catch (M) {
1400
+ console.error("An error happened when firing failure callback"), console.error(M);
1400
1401
  }
1401
- }), m = () => {
1402
- y && y((h) => X(k({}, h), { apiError: "" }));
1402
+ }), b = () => {
1403
+ h && h((C) => P(S({}, C), { apiError: "" }));
1403
1404
  };
1404
1405
  return {
1405
1406
  processing: t,
1406
- postData: (L) => K(void 0, [L], function* ({
1407
- updatedPaymentConfig: h,
1408
- data: C,
1409
- path: B
1407
+ postData: (q) => K(void 0, [q], function* ({
1408
+ updatedPaymentConfig: C,
1409
+ data: M,
1410
+ path: T
1410
1411
  }) {
1411
- b(!0), m();
1412
- const E = B || `${c}/v1/payments`;
1412
+ g(!0), b();
1413
+ const I = T || `${c}/v1/payments`;
1413
1414
  try {
1414
- const P = yield fetch(E, {
1415
+ const B = yield fetch(I, {
1415
1416
  method: "POST",
1416
1417
  headers: {
1417
1418
  "Content-Type": "application/json",
1418
1419
  "X-Moyasar-Form-Version": u
1419
1420
  },
1420
- body: JSON.stringify(k(k(k({}, v), C), h))
1421
+ body: JSON.stringify(S(S(S({}, d), M), C))
1421
1422
  });
1422
- if (!P.ok) {
1423
- if (typeof P == "object") {
1424
- const S = yield P.json();
1425
- if (console.error("fetch error:", S), !de(S)) {
1426
- yield d({
1423
+ if (!B.ok) {
1424
+ if (typeof B == "object") {
1425
+ const X = yield B.json();
1426
+ if (console.error("fetch error:", X), !de(X)) {
1427
+ yield m({
1427
1428
  type: "api_error",
1428
- message: `Error code: ${P.status}`,
1429
+ message: `Error code: ${B.status}`,
1429
1430
  errors: null
1430
1431
  });
1431
1432
  return;
1432
1433
  }
1433
- return yield d(S), S;
1434
+ return yield m(X), X;
1434
1435
  }
1435
- return yield Promise.reject(P);
1436
+ return yield Promise.reject(B);
1436
1437
  }
1437
- return yield P.json();
1438
- } catch (P) {
1439
- if (f)
1438
+ return yield B.json();
1439
+ } catch (B) {
1440
+ if (w)
1440
1441
  try {
1441
- yield f(P);
1442
- } catch (S) {
1443
- console.error("An error happened when firing failure callback"), console.error(S);
1442
+ yield w(B);
1443
+ } catch (X) {
1444
+ console.error("An error happened when firing failure callback"), console.error(X);
1444
1445
  }
1445
- console.error(P);
1446
+ console.error(B);
1446
1447
  } finally {
1447
- b(!1);
1448
+ g(!1);
1448
1449
  }
1449
1450
  })
1450
1451
  };
1451
1452
  }, yn = () => {
1452
- const { apiError: A } = I(W), [t, e] = T(!1);
1453
+ const { apiError: A } = O(W), [t, e] = L(!1);
1453
1454
  return V(() => {
1454
1455
  e(!!A);
1455
1456
  }, [A]), V(() => {
@@ -1506,114 +1507,114 @@ const hn = () => {
1506
1507
  }), wA = ({
1507
1508
  defaultError: A
1508
1509
  }) => {
1509
- const { callback_url: t, on_initiating: e, on_redirect: n, on_completed: r, setFormSettings: a } = I(W), [o, l] = T(A), { processing: i, postData: s } = hn(), [u, c] = T(!1), [g, f] = T(!1), { fail: y } = yn();
1510
- function b(E, P) {
1511
- return K(this, arguments, function* ({ data: m, path: w, onSuccess: h, onFailed: C, initPayment: B }, L) {
1512
- const S = yield s({
1513
- updatedPaymentConfig: L,
1510
+ const { callback_url: t, on_initiating: e, on_redirect: n, on_completed: r, setFormSettings: a } = O(W), [o, l] = L(A), { processing: i, postData: s } = hn(), [u, c] = L(!1), [v, f] = L(!1), { fail: w } = yn();
1511
+ function h(q, I) {
1512
+ return K(this, arguments, function* ({ data: m, path: b, onSuccess: y, onFailed: C, initPayment: M }, T) {
1513
+ const B = yield s({
1514
+ updatedPaymentConfig: T,
1514
1515
  data: m,
1515
- path: w
1516
+ path: b
1516
1517
  });
1517
- if (de(S)) {
1518
+ if (de(B)) {
1518
1519
  c(!1);
1519
1520
  return;
1520
1521
  }
1521
- S && (r && B && (yield bn({
1522
- payment: S,
1522
+ B && (r && M && (yield bn({
1523
+ payment: B,
1523
1524
  on_completed: r
1524
- }).catch((O) => {
1525
- console.error(O);
1526
- })), h && S.status !== "failed" && h(S), ["paid", "authorized"].includes(S.status) && (f(!0), setTimeout(() => {
1527
- Et(t, S, n).catch(() => {
1525
+ }).catch((X) => {
1526
+ console.error(X);
1527
+ })), y && B.status !== "failed" && y(B), ["paid", "authorized"].includes(B.status) && (f(!0), setTimeout(() => {
1528
+ Et(t, B, n).catch(() => {
1528
1529
  });
1529
- }, 100)), S.status === "failed" && (C && C(S), setTimeout(() => {
1530
- Et(t, S, n).catch(() => {
1530
+ }, 100)), B.status === "failed" && (C && C(B), setTimeout(() => {
1531
+ Et(t, B, n).catch(() => {
1531
1532
  });
1532
1533
  }, 100))), c(!1);
1533
1534
  });
1534
1535
  }
1535
- function v(m) {
1536
+ function g(m) {
1536
1537
  return K(this, null, function* () {
1537
1538
  if (c(!0), m.initPayment) {
1538
- let w = m.data.source;
1539
+ let b = m.data.source;
1539
1540
  try {
1540
- (w == null ? void 0 : w.type) === "creditcard" && typeof w.number == "string" && (w = {
1541
+ (b == null ? void 0 : b.type) === "creditcard" && typeof b.number == "string" && (b = {
1541
1542
  type: "creditcard",
1542
- bin: w.number.substring(0, 8)
1543
+ bin: b.number.substring(0, 8)
1543
1544
  });
1544
- const h = yield wn({
1545
- source: w,
1545
+ const y = yield wn({
1546
+ source: b,
1546
1547
  on_initiating: e,
1547
1548
  setFormSettings: a
1548
1549
  });
1549
- if (typeof h == "boolean" && !h) {
1550
+ if (typeof y == "boolean" && !y) {
1550
1551
  c(!1);
1551
1552
  return;
1552
1553
  }
1553
- let C = h;
1554
- typeof C != "object" && (C = {}), yield b(m, C);
1555
- } catch (h) {
1556
- console.error(h), c(!1);
1554
+ let C = y;
1555
+ typeof C != "object" && (C = {}), yield h(m, C);
1556
+ } catch (y) {
1557
+ console.error(y), c(!1);
1557
1558
  }
1558
1559
  return;
1559
1560
  }
1560
- yield b(m, {});
1561
+ yield h(m, {});
1561
1562
  });
1562
1563
  }
1563
1564
  const d = oA(() => i || u, [i, u]);
1564
1565
  return {
1565
- makePayment: v,
1566
+ makePayment: g,
1566
1567
  busy: u,
1567
- fail: y,
1568
- success: g,
1568
+ fail: w,
1569
+ success: v,
1569
1570
  processing: i,
1570
1571
  loading: d,
1571
1572
  error: o,
1572
1573
  setError: l
1573
1574
  };
1574
1575
  }, me = ({ inForm: A = !1 }) => {
1575
- const { apiError: t, showForm: e } = I(W);
1576
+ const { apiError: t, showForm: e } = O(W);
1576
1577
  return e && !A ? null : /* @__PURE__ */ p("p", { class: "flex flex-col gap-2 rounded-md border border-error bg-red-100 px-4 py-2 text-xs font-medium text-error empty:hidden", children: t });
1577
1578
  }, Cn = () => {
1578
- const { t: A } = Y(), { formattedAmount: t, currency: e, isRtl: n, fixed_width: r, setFormSettings: a, showForm: o } = I(W), [l, i] = T(null), [s, u] = T(!1), c = {
1579
+ const { t: A } = Y(), { formattedAmount: t, currency: e, isRtl: n, fixed_width: r, setFormSettings: a, showForm: o } = O(W), [l, i] = L(null), [s, u] = L(!1), c = {
1579
1580
  phone: "",
1580
1581
  otp: ""
1581
1582
  }, {
1582
- makePayment: g,
1583
+ makePayment: v,
1583
1584
  busy: f,
1584
- fail: y,
1585
- success: b,
1586
- loading: v,
1585
+ fail: w,
1586
+ success: h,
1587
+ loading: g,
1587
1588
  error: d,
1588
1589
  setError: m
1589
- } = wA({ defaultError: c }), [w, h] = T(""), [C, B] = T(""), [L, E] = T(""), P = (G) => {
1590
+ } = wA({ defaultError: c }), [b, y] = L(""), [C, M] = L(""), [T, q] = L(""), I = (G) => {
1590
1591
  const Q = /^05[503649187][0-9]{7}$/.test(x(G));
1591
- return m((Z) => X(k({}, Z), {
1592
+ return m((Z) => P(S({}, Z), {
1592
1593
  phone: Q ? "" : "error.invalid_mobile"
1593
1594
  })), Q;
1594
- }, S = (G) => {
1595
+ }, B = (G) => {
1595
1596
  const Q = /^[0-9]{4,}$/.test(x(G));
1596
- return m((Z) => X(k({}, Z), {
1597
+ return m((Z) => P(S({}, Z), {
1597
1598
  otp: Q ? "" : "error.invalid_otp"
1598
1599
  })), Q;
1599
- }, O = (G) => {
1600
+ }, X = (G) => {
1600
1601
  const { value: Q, name: Z } = G.target, eA = Q.trim();
1601
1602
  if (u(!1), !eA) {
1602
1603
  u(!eA);
1603
1604
  return;
1604
1605
  }
1605
- Z === "mysr-stc-mobile" && P(eA), Z === "mysr-stc-otp" && S(eA);
1606
- }, J = () => {
1607
- if (!P(w)) return;
1606
+ Z === "mysr-stc-mobile" && I(eA), Z === "mysr-stc-otp" && B(eA);
1607
+ }, E = () => {
1608
+ if (!I(b)) return;
1608
1609
  function G(Q) {
1609
1610
  const { transaction_url: Z } = Q.source;
1610
- E(Z), i((/* @__PURE__ */ new Date()).getTime() + 5 * 60 * 1e3);
1611
+ q(Z), i((/* @__PURE__ */ new Date()).getTime() + 5 * 60 * 1e3);
1611
1612
  }
1612
- g({
1613
+ v({
1613
1614
  data: {
1614
1615
  source: {
1615
1616
  type: "stcpay",
1616
- mobile: x(w)
1617
+ mobile: x(b)
1617
1618
  }
1618
1619
  },
1619
1620
  onSuccess: G,
@@ -1622,36 +1623,36 @@ const hn = () => {
1622
1623
  console.error(Q);
1623
1624
  });
1624
1625
  }, U = () => {
1625
- if (!l || !S(C)) return;
1626
+ if (!l || !B(C)) return;
1626
1627
  function G(Q) {
1627
1628
  var Z;
1628
- Q.status === "failed" && ((Z = Q.source) == null ? void 0 : Z.message) === "Invalid OTP" && (m((eA) => X(k({}, eA), {
1629
+ Q.status === "failed" && ((Z = Q.source) == null ? void 0 : Z.message) === "Invalid OTP" && (m((eA) => P(S({}, eA), {
1629
1630
  otp: "error.invalid_otp"
1630
- })), B(""), i(null));
1631
+ })), M(""), i(null));
1631
1632
  }
1632
- g({
1633
+ v({
1633
1634
  data: {
1634
1635
  otp_value: x(C)
1635
1636
  },
1636
- path: L,
1637
+ path: T,
1637
1638
  onFailed: G
1638
1639
  }).catch((Q) => {
1639
1640
  console.error(Q);
1640
1641
  });
1641
1642
  }, _ = (G) => {
1642
1643
  if (G.preventDefault(), m(c), !l) {
1643
- J();
1644
+ E();
1644
1645
  return;
1645
1646
  }
1646
1647
  U();
1647
1648
  }, AA = (G) => {
1648
- G > 0 || (m((Q) => X(k({}, Q), {
1649
+ G > 0 || (m((Q) => P(S({}, Q), {
1649
1650
  otp: "error.otp_time_out"
1650
- })), B(""), i(null));
1651
- }, lA = oA(() => d.phone || l && d.otp && d.otp !== "error.otp_time_out" ? !0 : s || v, [d, s, v]), dA = (G) => a((Q) => X(k({}, Q), { showForm: G })), [sA, mA] = T(!1), CA = () => {
1651
+ })), M(""), i(null));
1652
+ }, lA = oA(() => d.phone || l && d.otp && d.otp !== "error.otp_time_out" ? !0 : s || g, [d, s, g]), dA = (G) => a((Q) => P(S({}, Q), { showForm: G })), [sA, mA] = L(!1), CA = () => {
1652
1653
  mA(!0);
1653
1654
  }, JA = () => {
1654
- sA && (h(""), B(""), m(c), dA(!1), mA(!1), u(!1));
1655
+ sA && (y(""), M(""), m(c), dA(!1), mA(!1), u(!1));
1655
1656
  };
1656
1657
  return /* @__PURE__ */ p(
1657
1658
  it.Provider,
@@ -1659,7 +1660,7 @@ const hn = () => {
1659
1660
  value: {
1660
1661
  err: d,
1661
1662
  setErr: m,
1662
- handleBlur: O
1663
+ handleBlur: X
1663
1664
  },
1664
1665
  children: /* @__PURE__ */ p($, { children: [
1665
1666
  /* @__PURE__ */ p(HA, { variant: "stc", onClick: () => dA(!0), children: /* @__PURE__ */ p(
@@ -1706,8 +1707,8 @@ const hn = () => {
1706
1707
  /* @__PURE__ */ p(
1707
1708
  dn,
1708
1709
  {
1709
- value: w,
1710
- setValue: h,
1710
+ value: b,
1711
+ setValue: y,
1711
1712
  showOtp: !l && typeof l != "number"
1712
1713
  }
1713
1714
  ),
@@ -1715,7 +1716,7 @@ const hn = () => {
1715
1716
  mn,
1716
1717
  {
1717
1718
  value: C,
1718
- setValue: B,
1719
+ setValue: M,
1719
1720
  showPhone: !l && typeof l != "number"
1720
1721
  }
1721
1722
  )
@@ -1723,8 +1724,8 @@ const hn = () => {
1723
1724
  /* @__PURE__ */ p(
1724
1725
  HA,
1725
1726
  {
1726
- success: b,
1727
- fail: y,
1727
+ success: h,
1728
+ fail: w,
1728
1729
  busy: f,
1729
1730
  variant: "stc",
1730
1731
  class: "flex gap-1",
@@ -1758,11 +1759,11 @@ const hn = () => {
1758
1759
  statement_descriptor: i,
1759
1760
  setFormSettings: s,
1760
1761
  on_failure: u
1761
- } = I(W), { makePayment: c } = wA({ defaultError: {} });
1762
- function g() {
1762
+ } = O(W), { makePayment: c } = wA({ defaultError: {} });
1763
+ function v() {
1763
1764
  if (!ApplePaySession)
1764
1765
  return;
1765
- const f = (n == null ? void 0 : n.label) || (r == null ? void 0 : r.label), b = {
1766
+ const f = (n == null ? void 0 : n.label) || (r == null ? void 0 : r.label), h = {
1766
1767
  countryCode: (n == null ? void 0 : n.country) || (r == null ? void 0 : r.country),
1767
1768
  currencyCode: a,
1768
1769
  supportedNetworks: o,
@@ -1771,34 +1772,34 @@ const hn = () => {
1771
1772
  label: f,
1772
1773
  amount: l
1773
1774
  }
1774
- }, v = new ApplePaySession(n.version, b);
1775
- v.onvalidatemerchant = (d) => {
1775
+ }, g = new ApplePaySession(n.version, h);
1776
+ g.onvalidatemerchant = (d) => {
1776
1777
  const m = {
1777
1778
  validation_url: d.validationURL,
1778
1779
  display_name: f,
1779
1780
  domain_name: window.location.hostname,
1780
1781
  publishable_api_key: e
1781
- }, w = n.validate_merchant_url || `${t}/v1/applepay/initiate`;
1782
- fetch(w, {
1782
+ }, b = n.validate_merchant_url || `${t}/v1/applepay/initiate`;
1783
+ fetch(b, {
1783
1784
  method: "POST",
1784
1785
  headers: {
1785
1786
  "Content-Type": "application/json"
1786
1787
  },
1787
1788
  body: JSON.stringify(m)
1788
- }).then((h) => h.ok ? h : Promise.reject(h)).then((h) => h.json()).then((h) => {
1789
- v.completeMerchantValidation(h);
1790
- }).catch((h) => {
1791
- if (console.error("Apple Pay error:", h), s((C) => X(k({}, C), {
1789
+ }).then((y) => y.ok ? y : Promise.reject(y)).then((y) => y.json()).then((y) => {
1790
+ g.completeMerchantValidation(y);
1791
+ }).catch((y) => {
1792
+ if (console.error("Apple Pay error:", y), s((C) => P(S({}, C), {
1792
1793
  apiError: A("error.applePay")
1793
1794
  })), u)
1794
1795
  try {
1795
- u(h);
1796
+ u(y);
1796
1797
  } catch (C) {
1797
1798
  console.error("An error happened when firing failure callback"), console.error(C);
1798
1799
  }
1799
- v.abort();
1800
+ g.abort();
1800
1801
  });
1801
- }, v.onpaymentauthorized = (d) => {
1802
+ }, g.onpaymentauthorized = (d) => {
1802
1803
  const m = {
1803
1804
  source: {
1804
1805
  type: "applepay",
@@ -1808,29 +1809,29 @@ const hn = () => {
1808
1809
  }
1809
1810
  };
1810
1811
  i && (m.source.statement_descriptor = i);
1811
- function w(C) {
1812
- v.completePayment({
1812
+ function b(C) {
1813
+ g.completePayment({
1813
1814
  status: ApplePaySession.STATUS_FAILURE
1814
1815
  });
1815
1816
  }
1816
- function h(C) {
1817
- v.completePayment({
1817
+ function y(C) {
1818
+ g.completePayment({
1818
1819
  status: ApplePaySession.STATUS_SUCCESS
1819
1820
  });
1820
1821
  }
1821
1822
  c({
1822
1823
  data: m,
1823
- onFailed: w,
1824
- onSuccess: h,
1824
+ onFailed: b,
1825
+ onSuccess: y,
1825
1826
  initPayment: !0
1826
1827
  }).catch((C) => {
1827
1828
  console.error(C);
1828
1829
  });
1829
- }, v.oncancel = () => {
1830
+ }, g.oncancel = () => {
1830
1831
  console.log("Apple Pay payment cancelled by user");
1831
- }, v.begin();
1832
+ }, g.begin();
1832
1833
  }
1833
- return /* @__PURE__ */ p("apple-pay-button", { buttonstyle: "black", type: "plain", onClick: g });
1834
+ return /* @__PURE__ */ p("apple-pay-button", { buttonstyle: "black", type: "plain", onClick: v });
1834
1835
  }, Mn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeEAAABLCAMAAABwZM8AAAADAFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/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BUb37R0JEjXAzX6YT5yDs3veKRwYmdq2f2ABTKZnh70cj5fmmGeSjTX3RueQhn9dH5wBWUT17jyGKLPAVWUihQCkoA4xc/2dpORbT/b9Pi8YCQpTtuITq/AbjTdqJ0A2gA425/rOXAG+2nc22Hd22694v9AJX1ZAX0mLyg6ckX/tm6b0fL7x68ZaLqxqt9lQLQ8xPTGhYsvP3mWZ/6GHAmDxfAXjKYDIXOIRTEDVvJwaEl/VCLKxNXsTI0vk0eO0elYPtce87Fl8+aM+vyi4fUmulbQu0jwJC6vFu8hWaI7AvAGfz6s/q+tco+WifD5hKZkLanPWo7uZ5bZNaUyQSQhow/7Uzvd//cXCNo6FfG8UoBGHf3hj1v5nLtR7Y1zaoLqRlQfMTsay9LrRRhwsGsUCwJqVViVO85pDOXlFai82v6VfSTFOhmCKmK01UJ0YWnlH1Zv+4/YuSQXnbpiZKPUKGW3gg9RDnjkEpppXiSv7fgGx7L+67vz/9CotKWr7y1xuZCsEFMMrzeSixvg0YVHxiUd3Mp3y8Y0NF+qP6PncqDxo+tn7WyuoQrEKzBKspWqqg0RLdf+bSlSnAlIqoz8mle1UhXICTG20D7q3VVP6sC4ZRKLKsu4QqEQN+j5qgUjK1uwxUIbe8G9mlzleBKhLBqcZ++XDXSFQiFSyiwl7VU/awKRHRNjkdLqku4AiEx6E0qhNqyjpHVbbgCodFoE8NPQKGKSoOA2kGncm+hnb5QZbgiUWNkZyOHVb2sKqr4QEIadOJl/R9/eIVAmWuIbgAAAABJRU5ErkJggg==", kn = () => {
1835
1836
  const {
1836
1837
  payment_button_type: A,
@@ -1839,13 +1840,13 @@ const hn = () => {
1839
1840
  supported_networks: n,
1840
1841
  currency: r,
1841
1842
  decimalAmount: a
1842
- } = I(W), [o, l] = T(!1), [i, s] = T(!1), { makePayment: u } = wA({ defaultError: {} }), { t: c } = Y(), g = j(null);
1843
+ } = O(W), [o, l] = L(!1), [i, s] = L(!1), { makePayment: u } = wA({ defaultError: {} }), { t: c } = Y(), v = j(null);
1843
1844
  V(() => {
1844
- let b = null;
1845
- return o || (b = setInterval(() => {
1845
+ let h = null;
1846
+ return o || (h = setInterval(() => {
1846
1847
  window.SamsungPay && l(!0);
1847
1848
  }, 100)), () => {
1848
- clearInterval(b);
1849
+ clearInterval(h);
1849
1850
  };
1850
1851
  }, [o]);
1851
1852
  const f = oA(() => {
@@ -1855,19 +1856,19 @@ const hn = () => {
1855
1856
  if (V(() => K(void 0, null, function* () {
1856
1857
  if (!f || !t)
1857
1858
  return;
1858
- const b = n == null ? void 0 : n.map((d) => d.toLowerCase()), v = {
1859
+ const h = n == null ? void 0 : n.map((d) => d.toLowerCase()), g = {
1859
1860
  version: t.version.toString(),
1860
1861
  serviceId: t.service_id,
1861
1862
  protocol: "PROTOCOL_3DS",
1862
- allowedBrands: b
1863
+ allowedBrands: h
1863
1864
  };
1864
- g.current = () => K(void 0, null, function* () {
1865
- const { order_number: d, id: m, country: w, label: h } = t, C = h || (e == null ? void 0 : e.label), B = w || (e == null ? void 0 : e.country), L = {
1865
+ v.current = () => K(void 0, null, function* () {
1866
+ const { order_number: d, id: m, country: b, label: y } = t, C = y || (e == null ? void 0 : e.label), M = b || (e == null ? void 0 : e.country), T = {
1866
1867
  orderNumber: d,
1867
1868
  merchant: {
1868
1869
  name: C,
1869
1870
  id: m,
1870
- countryCode: B,
1871
+ countryCode: M,
1871
1872
  url: window.location.hostname
1872
1873
  },
1873
1874
  amount: {
@@ -1875,46 +1876,46 @@ const hn = () => {
1875
1876
  currency: r,
1876
1877
  total: a
1877
1878
  }
1878
- }, E = () => {
1879
+ }, q = () => {
1879
1880
  f.notify({
1880
1881
  status: "CHARGED",
1881
1882
  provider: "Moyasar"
1882
1883
  });
1883
- }, P = (S) => {
1884
+ }, I = (B) => {
1884
1885
  f.notify({
1885
1886
  status: "REJECTED",
1886
1887
  provider: "Moyasar"
1887
1888
  });
1888
1889
  };
1889
1890
  try {
1890
- const S = yield f.loadPaymentSheet(
1891
- v,
1892
- L
1891
+ const B = yield f.loadPaymentSheet(
1892
+ g,
1893
+ T
1893
1894
  );
1894
1895
  yield u({
1895
1896
  initPayment: !0,
1896
1897
  data: {
1897
1898
  source: {
1898
1899
  type: "samsungpay",
1899
- token: S["3DS"].data
1900
+ token: B["3DS"].data
1900
1901
  }
1901
1902
  },
1902
- onFailed: P,
1903
- onSuccess: E
1903
+ onFailed: I,
1904
+ onSuccess: q
1904
1905
  });
1905
- } catch (S) {
1906
+ } catch (B) {
1906
1907
  try {
1907
1908
  f.notify({
1908
1909
  status: "ERRED",
1909
1910
  provider: "Moyasar"
1910
1911
  });
1911
- } catch (O) {
1912
+ } catch (X) {
1912
1913
  }
1913
- console.error("Samsung Pay error: ", S);
1914
+ console.error("Samsung Pay error: ", B);
1914
1915
  }
1915
1916
  });
1916
1917
  try {
1917
- (yield f.isReadyToPay(v)).result ? s(!0) : console.error("Cannot initialize Samsung Pay");
1918
+ (yield f.isReadyToPay(g)).result ? s(!0) : console.error("Cannot initialize Samsung Pay");
1918
1919
  } catch (d) {
1919
1920
  try {
1920
1921
  f.notify({
@@ -1927,14 +1928,14 @@ const hn = () => {
1927
1928
  }
1928
1929
  }), [f, t]), !o || !i)
1929
1930
  return null;
1930
- const y = A === "pay" ? "pay-with" : A;
1931
+ const w = A === "pay" ? "pay-with" : A;
1931
1932
  return /* @__PURE__ */ p(
1932
1933
  "button",
1933
1934
  {
1934
1935
  class: "flex h-11 w-full items-center justify-center gap-1 rounded-md bg-black text-white",
1935
- onClick: g.current,
1936
+ onClick: v.current,
1936
1937
  children: [
1937
- /* @__PURE__ */ p("span", { children: c(`button.${y}`) }),
1938
+ /* @__PURE__ */ p("span", { children: c(`button.${w}`) }),
1938
1939
  /* @__PURE__ */ p("img", { src: Mn, alt: "", class: "-mb-[3px] h-[22px]" }),
1939
1940
  /* @__PURE__ */ p("div", { class: "mb-0.5 h-[9px] w-[9px] rotate-45 rounded-sm border-r-[3px] border-t-[3px] border-white" })
1940
1941
  ]
@@ -1950,14 +1951,14 @@ const hn = () => {
1950
1951
  currency: a,
1951
1952
  decimalAmount: o,
1952
1953
  setFormSettings: l
1953
- } = I(W), [i, s] = T(!1), { makePayment: u } = wA({ defaultError: {} });
1954
+ } = O(W), [i, s] = L(!1), { makePayment: u } = wA({ defaultError: {} });
1954
1955
  V(() => {
1955
- let g = null;
1956
- return i || (g = setInterval(() => {
1957
- var f, y;
1958
- (y = (f = window.google) == null ? void 0 : f.payments) != null && y.api && s(!0);
1956
+ let v = null;
1957
+ return i || (v = setInterval(() => {
1958
+ var f, w;
1959
+ (w = (f = window.google) == null ? void 0 : f.payments) != null && w.api && s(!0);
1959
1960
  }, 100)), () => {
1960
- clearInterval(g);
1961
+ clearInterval(v);
1961
1962
  };
1962
1963
  }, [i]);
1963
1964
  const c = oA(() => {
@@ -1967,51 +1968,51 @@ const hn = () => {
1967
1968
  });
1968
1969
  }, [i]);
1969
1970
  return V(() => K(void 0, null, function* () {
1970
- const g = document.getElementById("googlePay-container");
1971
- if (!c || !e || (g == null ? void 0 : g.children.length) >= 1)
1971
+ const v = document.getElementById("googlePay-container");
1972
+ if (!c || !e || (v == null ? void 0 : v.children.length) >= 1)
1972
1973
  return;
1973
1974
  e.merchant_id;
1974
- const f = r == null ? void 0 : r.filter((B) => B !== "mada").map((B) => B.toUpperCase()), y = e.auth_methods, b = {
1975
+ const f = r == null ? void 0 : r.filter((M) => M !== "mada").map((M) => M.toUpperCase()), w = e.auth_methods, h = {
1975
1976
  apiVersion: 2,
1976
1977
  apiVersionMinor: 0
1977
- }, v = {
1978
+ }, g = {
1978
1979
  type: "CARD",
1979
1980
  parameters: {
1980
- allowedAuthMethods: y,
1981
+ allowedAuthMethods: w,
1981
1982
  allowedCardNetworks: f
1982
1983
  }
1983
- }, d = Object.assign({}, b);
1984
- d.allowedPaymentMethods = [v];
1984
+ }, d = Object.assign({}, h);
1985
+ d.allowedPaymentMethods = [g];
1985
1986
  const m = () => K(void 0, null, function* () {
1986
- const { country: B, label: L, merchant_id: E } = e, P = L || (n == null ? void 0 : n.label), S = B || (n == null ? void 0 : n.country), O = X(k({}, b), {
1987
+ const { country: M, label: T, merchant_id: q } = e, I = T || (n == null ? void 0 : n.label), B = M || (n == null ? void 0 : n.country), X = P(S({}, h), {
1987
1988
  allowedPaymentMethods: [C],
1988
1989
  merchantInfo: {
1989
- merchantId: E,
1990
- merchantName: P
1990
+ merchantId: q,
1991
+ merchantName: I
1991
1992
  },
1992
1993
  transactionInfo: {
1993
- countryCode: S,
1994
+ countryCode: B,
1994
1995
  currencyCode: a,
1995
1996
  totalPriceStatus: "FINAL",
1996
1997
  totalPrice: o
1997
1998
  }
1998
1999
  });
1999
2000
  try {
2000
- const J = yield c.loadPaymentData(O);
2001
+ const E = yield c.loadPaymentData(X);
2001
2002
  u({
2002
2003
  initPayment: !0,
2003
2004
  data: {
2004
2005
  source: {
2005
2006
  type: "googlepay",
2006
- token: J.paymentMethodData.tokenizationData.token
2007
+ token: E.paymentMethodData.tokenizationData.token
2007
2008
  }
2008
2009
  }
2009
2010
  });
2010
- } catch (J) {
2011
- console.error(J);
2011
+ } catch (E) {
2012
+ console.error(E);
2012
2013
  }
2013
- }), w = () => {
2014
- const B = c.createButton({
2014
+ }), b = () => {
2015
+ const M = c.createButton({
2015
2016
  onClick: m,
2016
2017
  buttonLocale: A,
2017
2018
  buttonColor: "black",
@@ -2019,24 +2020,24 @@ const hn = () => {
2019
2020
  buttonRadius: 6,
2020
2021
  buttonSizeMode: "fill"
2021
2022
  });
2022
- g.appendChild(B);
2023
- }, h = {
2023
+ v.appendChild(M);
2024
+ }, y = {
2024
2025
  type: "PAYMENT_GATEWAY",
2025
2026
  parameters: {
2026
2027
  gateway: "moyasar",
2027
2028
  gatewayMerchantId: e.gateway_merchant_id
2028
2029
  }
2029
- }, C = Object.assign({}, v, {
2030
- tokenizationSpecification: h
2030
+ }, C = Object.assign({}, g, {
2031
+ tokenizationSpecification: y
2031
2032
  });
2032
2033
  try {
2033
- (yield c.isReadyToPay(d)).result ? w() : l((L) => X(k({}, L), {
2034
+ (yield c.isReadyToPay(d)).result ? b() : l((T) => P(S({}, T), {
2034
2035
  apiError: "Cannot initialize Google Pay"
2035
2036
  }));
2036
- } catch (B) {
2037
- l((L) => X(k({}, L), {
2037
+ } catch (M) {
2038
+ l((T) => P(S({}, T), {
2038
2039
  apiError: "Cannot initialize Google Pay"
2039
- })), console.error("Google Pay Error: ", B);
2040
+ })), console.error("Google Pay Error: ", M);
2040
2041
  }
2041
2042
  }), [c, e]), i ? /* @__PURE__ */ p(
2042
2043
  "div",
@@ -2046,7 +2047,7 @@ const hn = () => {
2046
2047
  }
2047
2048
  ) : null;
2048
2049
  }, Sn = () => {
2049
- const { t: A } = Y(), { methods: t, apple_pay: e, samsung_pay: n, google_pay: r } = I(W), a = t.includes("stcpay"), o = t.includes("creditcard"), l = location.protocol === "https:" && t.includes("applepay") && typeof window.ApplePaySession != "undefined" && ApplePaySession.canMakePayments() && (e == null ? void 0 : e.version) && ApplePaySession.supportsVersion(e == null ? void 0 : e.version), i = !!(n != null && n.service_id), s = !!(r != null && r.merchant_id);
2050
+ const { t: A } = Y(), { methods: t, apple_pay: e, samsung_pay: n, google_pay: r } = O(W), a = t.includes("stcpay"), o = t.includes("creditcard"), l = location.protocol === "https:" && t.includes("applepay") && typeof window.ApplePaySession != "undefined" && ApplePaySession.canMakePayments() && (e == null ? void 0 : e.version) && ApplePaySession.supportsVersion(e == null ? void 0 : e.version), i = !!(n != null && n.service_id), s = !!(r != null && r.merchant_id);
2050
2051
  return !l && !a && !i && !s ? null : /* @__PURE__ */ p("div", { class: "flex w-full flex-col gap-4", role: "main", children: [
2051
2052
  a && /* @__PURE__ */ p(Cn, {}),
2052
2053
  l && /* @__PURE__ */ p(Dn, {}),
@@ -2275,24 +2276,24 @@ const hn = () => {
2275
2276
  isValid: !t && e && n
2276
2277
  };
2277
2278
  }, Tn = ({ value: A, setValue: t, err: e, setErr: n }) => {
2278
- const { t: r } = Y(), [a, o] = T(!1), l = (u) => {
2279
- const c = u.target.value.trim(), { isEmpty: g, isEnglishOnly: f, isValidFormat: y } = ve(c);
2280
- if (g) {
2279
+ const { t: r } = Y(), [a, o] = L(!1), l = (u) => {
2280
+ const c = u.target.value.trim(), { isEmpty: v, isEnglishOnly: f, isValidFormat: w } = ve(c);
2281
+ if (v) {
2281
2282
  o(!c);
2282
2283
  return;
2283
2284
  }
2284
2285
  if (!f) {
2285
- n((b) => X(k({}, b), { name: "validation.should_be_english_letters_only" }));
2286
+ n((h) => P(S({}, h), { name: "validation.should_be_english_letters_only" }));
2286
2287
  return;
2287
2288
  }
2288
- if (!y) {
2289
- n((b) => X(k({}, b), { name: "validation.first_and_last_name_required" }));
2289
+ if (!w) {
2290
+ n((h) => P(S({}, h), { name: "validation.first_and_last_name_required" }));
2290
2291
  return;
2291
2292
  }
2292
- o(!1), n((b) => X(k({}, b), { name: "" }));
2293
+ o(!1), n((h) => P(S({}, h), { name: "" }));
2293
2294
  }, i = (u) => {
2294
- const c = u.target, { value: g } = c;
2295
- t(g);
2295
+ const c = u.target, { value: v } = c;
2296
+ t(v);
2296
2297
  }, s = fA(l, 1e3);
2297
2298
  return /* @__PURE__ */ p("div", { class: "space-y-2", role: "complementary", "aria-label": r("form.name_on_card"), children: [
2298
2299
  /* @__PURE__ */ p("div", { class: "flex items-end justify-between text-xs font-medium", children: [
@@ -2324,7 +2325,7 @@ const hn = () => {
2324
2325
  msg: e ? "" : "error.invalid_csc"
2325
2326
  };
2326
2327
  }, GA = lt({}), Ln = ({ setValue: A }) => {
2327
- const { t } = Y(), { handleBlur: e, err: n } = I(GA), r = "** / **", a = (l) => {
2328
+ const { t } = Y(), { handleBlur: e, err: n } = O(GA), r = "** / **", a = (l) => {
2328
2329
  const i = l.target, { value: s } = i;
2329
2330
  A(s);
2330
2331
  }, o = fA(e, 1e3);
@@ -2350,7 +2351,7 @@ const hn = () => {
2350
2351
  }
2351
2352
  );
2352
2353
  }, Nn = ({ value: A, setValue: t }) => {
2353
- const { t: e } = Y(), { handleBlur: n, err: r, config: a } = I(GA), o = (i) => {
2354
+ const { t: e } = Y(), { handleBlur: n, err: r, config: a } = O(GA), o = (i) => {
2354
2355
  const s = i.target, { value: u } = s;
2355
2356
  t(u);
2356
2357
  }, l = fA(n, 1e3);
@@ -2379,7 +2380,7 @@ const hn = () => {
2379
2380
  return !0;
2380
2381
  return !1;
2381
2382
  }, ct = () => {
2382
- const { supported_networks: A } = I(W);
2383
+ const { supported_networks: A } = O(W);
2383
2384
  function t(e) {
2384
2385
  let n = "";
2385
2386
  return In(e) && (n = "visa"), On(e) && (n = "mastercard"), he(e) && (n = "amex"), ye(e) && (n = "mada"), n === "" || !A.includes(n) ? "" : n;
@@ -2388,7 +2389,7 @@ const hn = () => {
2388
2389
  getCardSchema: t
2389
2390
  };
2390
2391
  }, Un = ({ value: A, setValue: t }) => {
2391
- const { t: e } = Y(), { handleBlur: n, err: r, setType: a } = I(GA), { getCardSchema: o } = ct(), l = (s) => {
2392
+ const { t: e } = Y(), { handleBlur: n, err: r, setType: a } = O(GA), { getCardSchema: o } = ct(), l = (s) => {
2392
2393
  const u = s.target, { value: c } = u;
2393
2394
  t(c), a(o(c));
2394
2395
  }, i = fA(n, 1e3);
@@ -2415,7 +2416,7 @@ const hn = () => {
2415
2416
  }
2416
2417
  );
2417
2418
  }, zn = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cpath%20d='M95,6.894c0,-3.253%20-2.641,-5.894%20-5.894,-5.894l-82.212,0c-3.253,0%20-5.894,2.641%20-5.894,5.894l0,50.212c0,3.253%202.641,5.894%205.894,5.894l82.212,0c3.253,0%205.894,-2.641%205.894,-5.894l0,-50.212Z'%20style='fill:%23fff;stroke:%237e7e7e;stroke-width:0.5px;'/%3e%3cclipPath%20id='_clip1'%3e%3crect%20x='7.179'%20y='18.832'%20width='81.642'%20height='26.336'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cg%3e%3cpath%20d='M47.418,19.387l-5.431,25.384l-6.567,0l5.432,-25.384l6.566,0Zm27.627,16.39l3.457,-9.532l1.989,9.532l-5.446,0Zm7.326,8.994l6.074,0l-5.3,-25.384l-5.607,0c-1.259,0%20-2.323,0.733%20-2.795,1.863l-9.852,23.521l6.895,0l1.37,-3.79l8.424,-0l0.791,3.79Zm-17.137,-8.287c0.028,-6.701%20-9.267,-7.069%20-9.201,-10.062c0.019,-0.912%200.887,-1.879%202.784,-2.127c0.943,-0.123%203.534,-0.218%206.476,1.136l1.152,-5.383c-1.58,-0.574%20-3.614,-1.125%20-6.143,-1.125c-6.49,-0%20-11.059,3.451%20-11.097,8.391c-0.041,3.655%203.261,5.693%205.75,6.908c2.557,1.245%203.417,2.041%203.406,3.154c-0.017,1.704%20-2.041,2.455%20-3.929,2.485c-3.302,0.052%20-5.218,-0.892%20-6.745,-1.603l-1.19,5.562c1.534,0.705%204.365,1.317%207.303,1.348c6.898,0%2011.411,-3.408%2011.434,-8.684Zm-27.2,-17.097l-10.639,25.384l-6.942,0l-5.235,-20.258c-0.318,-1.248%20-0.595,-1.705%20-1.562,-2.23c-1.576,-0.857%20-4.183,-1.66%20-6.477,-2.158l0.157,-0.738l11.173,0c1.423,0%202.705,0.948%203.028,2.588l2.765,14.69l6.833,-17.278l6.899,0Z'%20style='fill:%230d357f;fill-rule:nonzero;'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e", _n = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cpath%20d='M95,7.094c0,-3.363%20-2.731,-6.094%20-6.094,-6.094l-81.812,0c-3.363,0%20-6.094,2.731%20-6.094,6.094l-0,49.812c-0,3.363%202.731,6.094%206.094,6.094l81.812,0c3.363,0%206.094,-2.731%206.094,-6.094l0,-49.812Z'%20style='fill:%23fff;stroke:%23b1b1b1;stroke-width:0.5px;'/%3e%3cpath%20d='M95,6.894c0,-3.253%20-2.641,-5.894%20-5.894,-5.894l-82.212,0c-3.253,0%20-5.894,2.641%20-5.894,5.894l0,50.212c0,3.253%202.641,5.894%205.894,5.894l82.212,0c3.253,0%205.894,-2.641%205.894,-5.894l0,-50.212Z'%20style='fill:%23fff;stroke:%237e7e7e;stroke-width:0.5px;'/%3e%3cg%20opacity='0'%3e%3crect%20x='14.04'%20y='9.539'%20width='67.919'%20height='44.921'%20style='fill:%23fff;'/%3e%3c/g%3e%3crect%20x='39.044'%20y='17.366'%20width='17.917'%20height='29.263'%20style='fill:%23ff5f00;'/%3e%3cpath%20d='M40.89,32c-0.005,-5.706%202.619,-11.106%207.107,-14.629c-3.278,-2.576%20-7.329,-3.978%20-11.498,-3.978c-10.209,0%20-18.61,8.401%20-18.61,18.61c0,10.208%208.401,18.609%2018.61,18.609c4.169,-0%208.22,-1.401%2011.498,-3.978c-4.489,-3.524%20-7.113,-8.927%20-7.107,-14.634Z'%20style='fill:%23eb001b;fill-rule:nonzero;'/%3e%3cpath%20d='M76.33,43.533l0,-0.6l0.259,0l-0,-0.124l-0.615,-0l-0,0.124l0.242,0l0,0.6l0.114,-0Zm1.194,-0l0,-0.724l-0.186,-0l-0.217,0.517l-0.217,-0.517l-0.186,-0l-0,0.724l0.134,-0l0,-0.548l0.202,0.47l0.139,0l0.202,-0.47l0,0.548l0.129,-0Z'%20style='fill:%23f79e1b;fill-rule:nonzero;'/%3e%3cpath%20d='M78.108,32c0,10.209%20-8.4,18.609%20-18.609,18.609c-4.171,-0%20-8.223,-1.402%20-11.502,-3.98c4.487,-3.526%207.111,-8.926%207.111,-14.632c-0,-5.705%20-2.624,-11.106%20-7.111,-14.631c3.279,-2.578%207.331,-3.98%2011.502,-3.98c10.209,-0%2018.609,8.4%2018.609,18.609l0,0.005Z'%20style='fill:%23f79e1b;fill-rule:nonzero;'/%3e%3c/svg%3e", Gn = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cpath%20d='M95,7.053c0,-3.341%20-2.712,-6.053%20-6.053,-6.053l-81.894,-0c-3.341,-0%20-6.053,2.712%20-6.053,6.053l0,49.894c0,3.341%202.712,6.053%206.053,6.053l81.894,0c3.341,0%206.053,-2.712%206.053,-6.053l0,-49.894Z'%20style='fill:%23006fcf;stroke:%237e7e7e;stroke-width:0.5px;'/%3e%3cg%3e%3cpath%20d='M54.459,9.71l-10.404,23.609l8.342,0l0,21.172l26.31,0l4.061,-4.51l4.063,4.534l7.933,0l0,-2.672l-6.538,0l-5.395,-5.867l-5.44,5.88l-22.088,0l0,-18.444l22.202,0l5.408,5.938l5.476,-5.963l6.352,-0l0,-2.626l-4.935,-0l-0,-12.769l-4.686,12.699l-4.45,0l-4.823,-12.608l0,12.647l-10.546,0l-1.49,-3.637l-8.559,0l-1.457,3.589l-5.544,0l8.116,-18.39l6.498,-0l8.058,18.438l-0,-18.443l7.875,-0l4.161,11.351l4.127,-11.364l7.714,0.003l0,-2.656l-9.767,-0l-2.048,5.839l-2.2,-5.8l-12.552,-0l-0.077,7.83l-3.474,-7.76l-10.223,-0.02Z'%20style='fill:%23fff;'/%3e%3cpath%20d='M59.526,16.941l-2.53,5.961l5.011,0l-2.481,-5.961Z'%20style='fill:%23fff;'/%3e%3cpath%20d='M60.312,37.605l10.641,-0l0,-4.147l8.738,9.184l-8.621,9.204l-0.101,0l0,-4.221l-10.669,-0l-0,-2.905l10.397,0l-0,-4.077l-10.397,0l0.012,-3.038Z'%20style='fill:%23fff;'/%3e%3cpath%20d='M94.723,47.865l0,3.969l-8.581,-9.23l8.59,-9.225l-0,3.95l-4.946,5.265l4.937,5.271Z'%20style='fill:%23fff;'/%3e%3c/g%3e%3c/svg%3e", En = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2064'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;'%3e%3cpath%20d='M95,6.894c0,-3.253%20-2.641,-5.894%20-5.894,-5.894l-82.212,0c-3.253,0%20-5.894,2.641%20-5.894,5.894l0,50.212c0,3.253%202.641,5.894%205.894,5.894l82.212,0c3.253,0%205.894,-2.641%205.894,-5.894l0,-50.212Z'%20style='fill:%23fff;stroke:%237e7e7e;stroke-width:0.5px;'/%3e%3cg%3e%3crect%20x='5.311'%20y='34.182'%20width='36.116'%20height='12.031'%20style='fill:%2384b740;'/%3e%3crect%20x='5.311'%20y='17.765'%20width='36.116'%20height='12.042'%20style='fill:%23259bd6;'/%3e%3cpath%20d='M77.542,43.769l-0.161,0.032c-0.557,0.107%20-0.761,0.15%20-1.168,0.15c-0.944,-0%20-2.059,-0.483%20-2.059,-2.756c-0,-1.169%200.193,-2.724%201.951,-2.724l0.011,0c0.3,0.022%200.644,0.054%201.287,0.247l0.139,0.043l0,5.008Zm0.29,-11.335l-0.29,0.054l0,4.203l-0.257,-0.075l-0.075,-0.021c-0.29,-0.086%20-0.954,-0.279%20-1.598,-0.279c-3.517,0%20-4.257,2.659%20-4.257,4.89c0,3.056%201.716,4.815%204.708,4.815c1.265,-0%202.198,-0.129%203.141,-0.44c0.869,-0.279%201.18,-0.676%201.18,-1.523l-0,-12.063c-0.836,0.15%20-1.705,0.3%20-2.552,0.439'%20style='fill:%2327292d;fill-rule:nonzero;'/%3e%3cpath%20d='M87.997,43.844l-0.15,0.043l-0.536,0.139c-0.504,0.129%20-0.954,0.204%20-1.297,0.204c-0.826,-0%20-1.319,-0.408%20-1.319,-1.105c-0,-0.45%200.203,-1.211%201.555,-1.211l1.747,-0l0,1.93Zm-1.233,-7.582c-1.083,0%20-2.198,0.193%20-3.581,0.622l-0.901,0.268l0.3,2.038l0.88,-0.29c0.922,-0.3%202.069,-0.493%202.927,-0.493c0.386,0%201.566,0%201.566,1.276l-0,0.558l-1.641,-0c-2.992,-0%20-4.375,0.954%20-4.375,3.002c-0,1.748%201.276,2.799%203.421,2.799c0.664,-0%201.587,-0.129%202.38,-0.322l0.043,-0.01l0.043,0.01l0.268,0.043c0.836,0.15%201.705,0.3%202.552,0.461l0,-6.691c0,-2.166%20-1.308,-3.271%20-3.882,-3.271'%20style='fill:%2327292d;fill-rule:nonzero;'/%3e%3cpath%20d='M67.162,43.844l-0.15,0.043l-0.536,0.139c-0.504,0.129%20-0.944,0.204%20-1.297,0.204c-0.826,-0%20-1.319,-0.408%20-1.319,-1.105c-0,-0.45%200.203,-1.211%201.544,-1.211l1.748,-0l0.01,1.93Zm-1.222,-7.582c-1.094,0%20-2.198,0.193%20-3.582,0.622l-0.9,0.268l0.3,2.038l0.879,-0.29c0.922,-0.3%202.07,-0.493%202.928,-0.493c0.386,0%201.565,0%201.565,1.276l0,0.558l-1.641,-0c-2.991,-0%20-4.385,0.954%20-4.385,3.002c-0,1.748%201.276,2.799%203.431,2.799c0.665,-0%201.587,-0.129%202.381,-0.322l0.043,-0.01l0.042,0.01l0.258,0.043c0.847,0.15%201.705,0.3%202.552,0.472l-0,-6.691c0.011,-2.188%20-1.298,-3.282%20-3.871,-3.282'%20style='fill:%2327292d;fill-rule:nonzero;'/%3e%3cpath%20d='M55.871,36.284c-1.362,-0%20-2.488,0.45%20-2.906,0.643l-0.107,0.054l-0.097,-0.075c-0.579,-0.418%20-1.426,-0.633%20-2.606,-0.633c-1.04,0%20-2.016,0.15%20-3.077,0.461c-0.912,0.279%20-1.266,0.719%20-1.266,1.544l0,7.646l2.853,0l-0,-7.067l0.139,-0.042c0.579,-0.193%200.922,-0.226%201.255,-0.226c0.826,0%201.244,0.44%201.244,1.298l-0,6.048l2.809,-0l0,-6.166c0,-0.365%20-0.075,-0.579%20-0.086,-0.622l-0.096,-0.182l0.193,-0.086c0.429,-0.193%200.901,-0.29%201.394,-0.29c0.568,0%201.244,0.226%201.244,1.298l-0,6.048l2.799,-0l-0,-6.327c-0,-2.241%20-1.201,-3.324%20-3.689,-3.324'%20style='fill:%2327292d;fill-rule:nonzero;'/%3e%3cpath%20d='M85.896,25.614c-0.419,0%20-1.116,-0.043%20-1.662,-0.15l-0.161,-0.032l-0,-4.128c-0,-0.344%20-0.065,-0.558%20-0.075,-0.59l-0.086,-0.172l0.182,-0.075c0.043,-0.021%200.086,-0.032%200.14,-0.053l0.032,-0.022c0.064,-0.021%200.128,-0.043%200.193,-0.064c0.032,-0.011%200.053,-0.022%200.075,-0.022c0.633,-0.171%201.212,-0.15%201.469,-0.171l0.011,-0c1.748,-0%201.951,1.555%201.951,2.723c-0.01,2.274%20-1.136,2.756%20-2.069,2.756m-0.011,-7.849l-0.075,-0c-1.641,-0%20-3.324,0.45%20-3.925,1.33c-0.321,0.429%20-0.504,0.965%20-0.514,1.597l-0,4.258c-0,0.364%20-0.076,0.504%20-0.086,0.536l-0.097,0.182l-5.179,-0l-0,-2.96l-0.011,0c-0.064,-3.12%20-1.909,-4.836%20-4.579,-4.836l-2.605,0c-0.108,0.762%20-0.193,1.298%20-0.301,2.059l2.595,0c1.362,0%202.081,1.158%202.081,2.938l-0,2.981l-0.183,-0.096c-0.032,-0.011%20-0.257,-0.086%20-0.611,-0.086l-4.482,-0c-0.086,0.568%20-0.193,1.308%20-0.311,2.048l13.779,0c0.472,-0.096%201.019,-0.182%201.491,-0.257c0.697,0.343%201.994,0.525%202.884,0.525c2.992,0%204.933,-2.005%204.933,-5.093c-0.011,-3.056%20-1.887,-5.062%20-4.804,-5.126'%20style='fill:%2327292d;fill-rule:nonzero;'/%3e%3cpath%20d='M57.78,28.971l4.074,-0c2.992,-0%204.386,-0.987%204.386,-3.421c0,-1.748%20-1.276,-3.142%20-3.421,-3.142l-2.755,0c-0.826,0%20-1.319,-0.472%20-1.319,-1.265c-0,-0.536%200.203,-1.201%201.554,-1.201l6.027,-0c0.129,-0.783%200.193,-1.276%200.311,-2.059l-6.262,-0c-2.917,-0%20-4.386,1.222%20-4.386,3.26c-0,2.016%201.276,3.067%203.42,3.067l2.756,-0c0.826,-0%201.319,0.654%201.319,1.34c0,0.45%20-0.203,1.383%20-1.544,1.383l-0.461,0l-8.825,-0.021l-1.609,-0c-1.361,-0%20-2.316,-0.772%20-2.316,-2.563l0,-1.233c0,-1.866%200.74,-3.024%202.316,-3.024l2.617,-0c0.118,-0.794%200.193,-1.298%200.3,-2.048l-3.571,-0c-2.67,-0%20-4.514,1.791%20-4.579,4.911l0,1.394c0.065,3.12%201.909,4.611%204.579,4.611l2.606,-0l4.783,0.011Z'%20style='fill:%2327292d;fill-rule:nonzero;'/%3e%3c/g%3e%3c/svg%3e", Jn = ({ type: A }) => {
2418
- const { supported_networks: t } = I(W), e = "h-4 sm:h-5 w-auto object-contain object-center";
2419
+ const { supported_networks: t } = O(W), e = "h-4 sm:h-5 w-auto object-contain object-center";
2419
2420
  return /* @__PURE__ */ p("div", { class: "absolute right-2 top-1/4 z-[2] flex -translate-y-1/2 items-center gap-1", children: [
2420
2421
  {
2421
2422
  alt: "AMEX",
@@ -2496,42 +2497,42 @@ const hn = () => {
2496
2497
  isValidCc: t
2497
2498
  };
2498
2499
  }, qn = ({ cc: A, setCc: t, cvc: e, setCvc: n, exp: r, setExp: a, err: o, setErr: l }) => {
2499
- const { t: i } = Y(), [s, u] = T(!1), [c, g] = T(""), { isValidCc: f } = Ce(), y = ae(() => we(c), [c]), b = (v) => {
2500
- const { value: d, name: m } = v.target, w = x(d.trim());
2501
- if (!w) {
2502
- u(!w);
2500
+ const { t: i } = Y(), [s, u] = L(!1), [c, v] = L(""), { isValidCc: f } = Ce(), w = ae(() => we(c), [c]), h = (g) => {
2501
+ const { value: d, name: m } = g.target, b = x(d.trim());
2502
+ if (!b) {
2503
+ u(!b);
2503
2504
  return;
2504
2505
  }
2505
2506
  if (m === "mysr-cc-csc") {
2506
- const { msg: h } = ge(w, c);
2507
- l((C) => X(k({}, C), {
2508
- csc: h
2507
+ const { msg: y } = ge(b, c);
2508
+ l((C) => P(S({}, C), {
2509
+ csc: y
2509
2510
  }));
2510
2511
  }
2511
2512
  if (m === "mysr-cc-exp") {
2512
- const { isValidExpFormat: h, isValidYear: C, inValidMonth: B } = be(w);
2513
- l((L) => X(k({}, L), {
2514
- exp_month: B ? "" : "error.invalid_month",
2513
+ const { isValidExpFormat: y, isValidYear: C, inValidMonth: M } = be(b);
2514
+ l((T) => P(S({}, T), {
2515
+ exp_month: M ? "" : "error.invalid_month",
2515
2516
  exp_year: C ? "" : "error.invalid_year",
2516
- exp: h ? "" : "error.invalid_date"
2517
+ exp: y ? "" : "error.invalid_date"
2517
2518
  }));
2518
2519
  }
2519
- m === "mysr-cc-number" && l((h) => X(k({}, h), {
2520
- cc: c === "" ? "error.unsupported_cc_type" : f(w) ? "" : "error.invalid_cc_number"
2520
+ m === "mysr-cc-number" && l((y) => P(S({}, y), {
2521
+ cc: c === "" ? "error.unsupported_cc_type" : f(b) ? "" : "error.invalid_cc_number"
2521
2522
  }));
2522
2523
  };
2523
2524
  return V(() => {
2524
- Object.values(o).filter((v) => v).length === 0 && u(!1);
2525
+ Object.values(o).filter((g) => g).length === 0 && u(!1);
2525
2526
  }, [o]), /* @__PURE__ */ p(
2526
2527
  GA.Provider,
2527
2528
  {
2528
2529
  value: {
2529
2530
  err: o,
2530
2531
  setErr: l,
2531
- handleBlur: b,
2532
+ handleBlur: h,
2532
2533
  type: c,
2533
- setType: g,
2534
- config: y()
2534
+ setType: v,
2535
+ config: w()
2535
2536
  },
2536
2537
  children: /* @__PURE__ */ p("div", { class: "space-y-2", role: "complementary", "aria-label": i("form.card_info"), children: [
2537
2538
  /* @__PURE__ */ p("div", { class: "flex items-end justify-between text-xs font-medium", children: [
@@ -2544,7 +2545,7 @@ const hn = () => {
2544
2545
  /* @__PURE__ */ p(Ln, { value: r, setValue: a }),
2545
2546
  /* @__PURE__ */ p(Nn, { value: e, setValue: n })
2546
2547
  ] }),
2547
- /* @__PURE__ */ p("p", { class: "flex flex-col gap-2 text-xs font-medium text-error", children: Object.entries(o).filter(([v]) => v !== "name").map(([v, d]) => /* @__PURE__ */ p("span", { class: "empty:hidden", children: i(d) }, v)) })
2548
+ /* @__PURE__ */ p("p", { class: "flex flex-col gap-2 text-xs font-medium text-error", children: Object.entries(o).filter(([g]) => g !== "name").map(([g, d]) => /* @__PURE__ */ p("span", { class: "empty:hidden", children: i(d) }, g)) })
2548
2549
  ] })
2549
2550
  }
2550
2551
  );
@@ -2557,7 +2558,7 @@ const hn = () => {
2557
2558
  callback_url: a,
2558
2559
  payment_button_type: o,
2559
2560
  currency: l
2560
- } = I(W), [i, s] = T(""), [u, c] = T(""), [g, f] = T(""), [y, b] = T(""), { getCardSchema: v } = ct(), { isValidCc: d } = Ce(), m = {
2561
+ } = O(W), [i, s] = L(""), [u, c] = L(""), [v, f] = L(""), [w, h] = L(""), { getCardSchema: g } = ct(), { isValidCc: d } = Ce(), m = {
2561
2562
  name: "",
2562
2563
  csc: "",
2563
2564
  cc: "",
@@ -2565,20 +2566,20 @@ const hn = () => {
2565
2566
  exp_month: "",
2566
2567
  exp_year: ""
2567
2568
  }, {
2568
- makePayment: w,
2569
- busy: h,
2569
+ makePayment: b,
2570
+ busy: y,
2570
2571
  fail: C,
2571
- success: B,
2572
- loading: L,
2573
- error: E,
2574
- setError: P
2572
+ success: M,
2573
+ loading: T,
2574
+ error: q,
2575
+ setError: I
2575
2576
  } = wA({ defaultError: m });
2576
- return /* @__PURE__ */ p("form", { class: "space-y-6", onSubmit: (J) => {
2577
- J.preventDefault();
2578
- const { isValid: U } = ve(i), _ = x(u), AA = x(y), lA = x(g), dA = v(_), sA = d(_, dA), { isValid: mA } = ge(lA, dA), { isValid: CA } = be(AA);
2577
+ return /* @__PURE__ */ p("form", { class: "space-y-6", onSubmit: (E) => {
2578
+ E.preventDefault();
2579
+ const { isValid: U } = ve(i), _ = x(u), AA = x(w), lA = x(v), dA = g(_), sA = d(_, dA), { isValid: mA } = ge(lA, dA), { isValid: CA } = be(AA);
2579
2580
  if (!U || !sA || !mA || !CA) {
2580
- const R = k({}, m);
2581
- U || (R.name = A("error.invalid_name")), sA || (R.cc = A("error.invalid_cc_number")), mA || (R.csc = A("error.invalid_csc")), CA || (R.exp = A("error.invalid_date")), P(R);
2581
+ const R = S({}, m);
2582
+ U || (R.name = A("error.invalid_name")), sA || (R.cc = A("error.invalid_cc_number")), mA || (R.csc = A("error.invalid_csc")), CA || (R.exp = A("error.invalid_date")), I(R);
2582
2583
  return;
2583
2584
  }
2584
2585
  const [JA, G] = AA.split("/"), Q = {
@@ -2597,7 +2598,7 @@ const hn = () => {
2597
2598
  function eA(R) {
2598
2599
  console.error(R);
2599
2600
  }
2600
- w({
2601
+ b({
2601
2602
  data: {
2602
2603
  callback_url: a,
2603
2604
  source: Q
@@ -2609,21 +2610,21 @@ const hn = () => {
2609
2610
  console.error(R);
2610
2611
  });
2611
2612
  }, children: [
2612
- /* @__PURE__ */ p(Tn, { value: i, setValue: s, err: E, setErr: P }),
2613
+ /* @__PURE__ */ p(Tn, { value: i, setValue: s, err: q, setErr: I }),
2613
2614
  /* @__PURE__ */ p(
2614
2615
  qn,
2615
2616
  {
2616
2617
  cc: u,
2617
2618
  setCc: c,
2618
- cvc: g,
2619
+ cvc: v,
2619
2620
  setCvc: f,
2620
- exp: y,
2621
- setExp: b,
2622
- err: E,
2623
- setErr: P
2621
+ exp: w,
2622
+ setExp: h,
2623
+ err: q,
2624
+ setErr: I
2624
2625
  }
2625
2626
  ),
2626
- /* @__PURE__ */ p(HA, { type: "submit", disabled: L, success: B, fail: C, busy: h, children: /* @__PURE__ */ p($, { children: [
2627
+ /* @__PURE__ */ p(HA, { type: "submit", disabled: T, success: M, fail: C, busy: y, children: /* @__PURE__ */ p($, { children: [
2627
2628
  (o !== "plain" || !e) && A(`button.${o}`),
2628
2629
  " ",
2629
2630
  /* @__PURE__ */ p("span", { class: "currency-amount", children: /* @__PURE__ */ p(ie, { currency: l, formattedAmount: t }) })
@@ -3049,9 +3050,9 @@ var Rn = function() {
3049
3050
  for (var i = De(e), s = i.next(); !s.done; s = i.next()) {
3050
3051
  var u = s.value, c = l.match(u);
3051
3052
  if (!(!c || c.length < 2)) {
3052
- var g = c.slice(1).join("");
3053
- if (g)
3054
- return n++, r.replace(l, g);
3053
+ var v = c.slice(1).join("");
3054
+ if (v)
3055
+ return n++, r.replace(l, v);
3055
3056
  }
3056
3057
  }
3057
3058
  } catch (f) {
@@ -3113,7 +3114,7 @@ var rr = function() {
3113
3114
  t === void 0 && (t = this._duration);
3114
3115
  var n = TA(), r = 1.3, a = function() {
3115
3116
  return EA(e, void 0, void 0, function() {
3116
- var o, l, i, s, u, c, g;
3117
+ var o, l, i, s, u, c, v;
3117
3118
  return bA(this, function(f) {
3118
3119
  switch (f.label) {
3119
3120
  case 0:
@@ -3137,7 +3138,7 @@ var rr = function() {
3137
3138
  return u = f.sent(), c = { error: u }, [3, 9];
3138
3139
  case 8:
3139
3140
  try {
3140
- l && !l.done && (g = o.return) && g.call(o);
3141
+ l && !l.done && (v = o.return) && v.call(o);
3141
3142
  } finally {
3142
3143
  if (c) throw c.error;
3143
3144
  }
@@ -3279,7 +3280,7 @@ function qt(A) {
3279
3280
  return new RegExp(A.source, A.flags.replace("g", ""));
3280
3281
  }
3281
3282
  const lr = new or({
3282
- key: void 0,
3283
+ key: "95fc54a8-f3ef-454c-b93d-e7e765de19f0",
3283
3284
  revision: st
3284
3285
  });
3285
3286
  var sr = /* @__PURE__ */ function() {
@@ -3346,7 +3347,7 @@ function xt(A, t) {
3346
3347
  return ["SAR", "AED"].includes(t) && (r = r.replace(t, "").trim()), r;
3347
3348
  }
3348
3349
  function pr({ config: A }) {
3349
- const { amount: t, currency: e, language: n, translations: r, publishable_api_key: a } = A, o = document.documentElement.dir === "rtl" || n === "ar", l = uA[e] || uA.default, i = et(t, e), s = xt(t, e), [u, c] = T(X(k({
3350
+ const { amount: t, currency: e, language: n, translations: r, publishable_api_key: a } = A, o = document.documentElement.dir === "rtl" || n === "ar", l = uA[e] || uA.default, i = et(t, e), s = xt(t, e), [u, c] = L(P(S({
3350
3351
  version: st
3351
3352
  }, A), {
3352
3353
  translations: We(r),
@@ -3358,20 +3359,20 @@ function pr({ config: A }) {
3358
3359
  isTestMode: (a == null ? void 0 : a.startsWith("pk_test")) || location.protocol === "http:"
3359
3360
  }));
3360
3361
  cr(c), V(() => {
3361
- c((y) => X(k({}, y), {
3362
+ c((w) => P(S({}, w), {
3362
3363
  amount: u.amount,
3363
3364
  formattedAmount: xt(u.amount, u.currency),
3364
3365
  decimalAmount: et(u.amount, u.currency).toFixed(l).toString()
3365
3366
  }));
3366
3367
  }, [u.amount]);
3367
- const [g, f] = T({
3368
+ const [v, f] = L({
3368
3369
  samsung: !A.samsung_pay,
3369
3370
  google: !A.google_pay,
3370
3371
  apple: !A.apple_pay
3371
3372
  });
3372
3373
  return V(() => {
3373
- var b, v;
3374
- const y = (d, m) => {
3374
+ var h, g;
3375
+ const w = (d, m) => {
3375
3376
  document.body.append(
3376
3377
  Object.assign(document.createElement("script"), {
3377
3378
  src: d,
@@ -3379,22 +3380,22 @@ function pr({ config: A }) {
3379
3380
  })
3380
3381
  );
3381
3382
  };
3382
- !window.SamsungPay && A.samsung_pay && y(
3383
+ !window.SamsungPay && A.samsung_pay && w(
3383
3384
  "https://img.mpay.samsung.com/gsmpi/sdk/samsungpay_web_sdk.js",
3384
- () => f((d) => X(k({}, d), { samsung: !0 }))
3385
- ), !((v = (b = window.google) == null ? void 0 : b.payments) != null && v.api) && A.google_pay && y(
3385
+ () => f((d) => P(S({}, d), { samsung: !0 }))
3386
+ ), !((g = (h = window.google) == null ? void 0 : h.payments) != null && g.api) && A.google_pay && w(
3386
3387
  "https://pay.google.com/gp/p/js/pay.js",
3387
- () => f((d) => X(k({}, d), { google: !0 }))
3388
- ), A.apple_pay && y(
3388
+ () => f((d) => P(S({}, d), { google: !0 }))
3389
+ ), A.apple_pay && w(
3389
3390
  "https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",
3390
- () => f((d) => X(k({}, d), { apple: !0 }))
3391
+ () => f((d) => P(S({}, d), { apple: !0 }))
3391
3392
  );
3392
3393
  }, []), /* @__PURE__ */ p(
3393
3394
  W.Provider,
3394
3395
  {
3395
- value: X(k({}, u), {
3396
+ value: P(S({}, u), {
3396
3397
  setFormSettings: c,
3397
- scriptsLoaded: g
3398
+ scriptsLoaded: v
3398
3399
  }),
3399
3400
  children: /* @__PURE__ */ p(
3400
3401
  ir,
@@ -3438,41 +3439,48 @@ const fr = (A) => {
3438
3439
  ), A.on_redirect && !t(A.on_redirect) && D(
3439
3440
  "On redirect must be a promise based callback, check documentation for implementation details"
3440
3441
  ), !0;
3441
- }, dr = (A) => {
3442
+ };
3443
+ function dr(A) {
3444
+ for (const t of A)
3445
+ Object.prototype.hasOwnProperty.call(t, "amount") || J("amount"), typeof t.amount != "number" && D("`amount` must be a number"), Number.isInteger(t.amount) || D(
3446
+ "amount must be in minor unit of selected currency, e.g. for $19.99 set amount to 1999."
3447
+ ), t.amount == 0 && D("amount must be non-zero value"), t.recipient_id || J("recipient_id"), typeof t.recipient_id != "string" && D("`recipient_id` must be a UUID string"), t.fee_source && typeof t.fee_source != "boolean" && D("`fee_source` must be a boolean"), t.refundable && typeof t.refundable != "boolean" && D("`refundable` must be a boolean"), t.reference && typeof t.reference != "string" && D("`reference` must be a string"), t.description && typeof t.description != "string" && D("`description` must be a string");
3448
+ }
3449
+ const mr = (A) => {
3442
3450
  var t, e;
3443
3451
  return A.payment_button_type && typeof A.payment_button_type != "string" && aA("Payment button type"), A.given_id && (/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(A.given_id) || D("`given_id` must be a valid UUID v4")), A.payment_button_type && !Xn.includes(A.payment_button_type) && D("Unsupported button type, check documentation for list of supported types"), A.language && typeof A.language != "string" && aA("Language"), A.translations && typeof A.translations != "object" && aA("Translations"), A.metadata && typeof A.metadata != "object" && D("Metadata must be and object"), A.metadata && Object.entries(A.metadata).length > 50 && D("Only 50 Key/Value pairs are allowed in metadata"), A.invoice_id && typeof A.invoice_id != "string" && D("Invoice ID must be a string"), A.invoice_id && (/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/.test(
3444
3452
  (t = A.invoice_id) != null ? t : ""
3445
3453
  ) || D("Invalid invoice ID format")), A.statement_descriptor && typeof A.statement_descriptor != "string" && D("Statement descriptor must be a string"), A.statement_descriptor && (/^[\w\s\d\-~]{1,64}$/.test((e = A.statement_descriptor) != null ? e : "") || D(
3446
3454
  'Invalid format for the statement descriptor [length between 1 and 64 characters, allowed alphanumeric characters, white-spaces, "/", "-" and "~" symbols] '
3447
- )), A.fixed_width && typeof A.fixed_width != "boolean" && D("Fixed width expects boolean value"), A.apply_coupon && typeof A.apply_coupon != "boolean" && D("apply_coupon should be a boolean"), !0;
3448
- }, Vt = (A, t) => A.every((e) => t.includes(e)), mr = (A) => {
3449
- var t, e, n, r, a, o, l, i, s, u, c, g, f, y, b, v;
3450
- if (A.methods && !Array.isArray(A.methods) && D("Methods must be an array"), A.methods.includes("creditcard") && ((t = A.credit_card) != null && t.manual && typeof A.credit_card.manual != "boolean" && D("Credit Card manual option must be a boolean"), (e = A.credit_card) != null && e.save_card && typeof A.credit_card.save_card != "boolean" && D("Credit Card save card option must be a boolean")), A.methods.includes("applepay") && (A.apple_pay || q("Apple Pay configuration"), A.apple_pay)) {
3451
- const d = A.apple_pay.country || ((n = A.payment_options) == null ? void 0 : n.country), m = A.apple_pay.label || ((r = A.payment_options) == null ? void 0 : r.label), w = /^[\x20-\x7E]+$/;
3452
- d || q("Apple Pay country or Payment Options country"), (d == null ? void 0 : d.trim().length) !== 2 && D("Country must be two-letter ISO 3166 country code"), m || q("Apple Pay label or Payment Options label"), (m == null ? void 0 : m.trim().length) === 0 && D("Apple Pay label or Payment Options label can't be empty"), typeof m == "string" && !w.test(m) && D("Apple Pay label or Payment Options label should be English characters only"), (a = A.apple_pay) != null && a.manual && typeof ((o = A.apple_pay) == null ? void 0 : o.manual) != "boolean" && D("Apple Pay manual option must be a boolean"), (l = A.apple_pay) != null && l.save_card && typeof ((i = A.apple_pay) == null ? void 0 : i.save_card) != "boolean" && D("Apple Pay save card option must be a boolean"), A.apple_pay.validate_merchant_url && !ke(A.apple_pay.validate_merchant_url) && aA("Apple Pay Validate Merchant URL"), (s = A.apple_pay) != null && s.merchant_capabilities && (Vt(A.apple_pay.merchant_capabilities, jA) || D(`Apple Pay merchant capabilities supports only ${jA.join(", ")}`)), (u = A.apple_pay) != null && u.supported_countries && !Array.isArray(A.apple_pay.supported_countries) && D("Apple Pay Supported Countries must be an array of country codes");
3455
+ )), A.fixed_width && typeof A.fixed_width != "boolean" && D("Fixed width expects boolean value"), A.apply_coupon && typeof A.apply_coupon != "boolean" && D("apply_coupon should be a boolean"), A.splits && !Array.isArray(A.splits) && D("splits must be an array"), A.splits && A.splits.length == 0 && D("splits must be an array that contains split details"), A.splits && A.splits.length > 0 && dr(A.splits), !0;
3456
+ }, Vt = (A, t) => A.every((e) => t.includes(e)), vr = (A) => {
3457
+ var t, e, n, r, a, o, l, i, s, u, c, v, f, w, h, g;
3458
+ if (A.methods && !Array.isArray(A.methods) && D("Methods must be an array"), A.methods.includes("creditcard") && ((t = A.credit_card) != null && t.manual && typeof A.credit_card.manual != "boolean" && D("Credit Card manual option must be a boolean"), (e = A.credit_card) != null && e.save_card && typeof A.credit_card.save_card != "boolean" && D("Credit Card save card option must be a boolean")), A.methods.includes("applepay") && (A.apple_pay || J("Apple Pay configuration"), A.apple_pay)) {
3459
+ const d = A.apple_pay.country || ((n = A.payment_options) == null ? void 0 : n.country), m = A.apple_pay.label || ((r = A.payment_options) == null ? void 0 : r.label), b = /^[\x20-\x7E]+$/;
3460
+ d || J("Apple Pay country or Payment Options country"), (d == null ? void 0 : d.trim().length) !== 2 && D("Country must be two-letter ISO 3166 country code"), m || J("Apple Pay label or Payment Options label"), (m == null ? void 0 : m.trim().length) === 0 && D("Apple Pay label or Payment Options label can't be empty"), typeof m == "string" && !b.test(m) && D("Apple Pay label or Payment Options label should be English characters only"), (a = A.apple_pay) != null && a.manual && typeof ((o = A.apple_pay) == null ? void 0 : o.manual) != "boolean" && D("Apple Pay manual option must be a boolean"), (l = A.apple_pay) != null && l.save_card && typeof ((i = A.apple_pay) == null ? void 0 : i.save_card) != "boolean" && D("Apple Pay save card option must be a boolean"), A.apple_pay.validate_merchant_url && !ke(A.apple_pay.validate_merchant_url) && aA("Apple Pay Validate Merchant URL"), (s = A.apple_pay) != null && s.merchant_capabilities && (Vt(A.apple_pay.merchant_capabilities, jA) || D(`Apple Pay merchant capabilities supports only ${jA.join(", ")}`)), (u = A.apple_pay) != null && u.supported_countries && !Array.isArray(A.apple_pay.supported_countries) && D("Apple Pay Supported Countries must be an array of country codes");
3453
3461
  }
3454
3462
  if (A.samsung_pay) {
3455
- const d = A.samsung_pay.country || ((c = A.payment_options) == null ? void 0 : c.country), m = A.samsung_pay.label || ((g = A.payment_options) == null ? void 0 : g.label), w = A.samsung_pay.order_number, h = A.publishable_api_key.startsWith("pk_test") || location.protocol === "http:";
3456
- !window.SamsungPay && h && console.warn(
3463
+ const d = A.samsung_pay.country || ((c = A.payment_options) == null ? void 0 : c.country), m = A.samsung_pay.label || ((v = A.payment_options) == null ? void 0 : v.label), b = A.samsung_pay.order_number, y = A.publishable_api_key.startsWith("pk_test") || location.protocol === "http:";
3464
+ !window.SamsungPay && y && console.warn(
3457
3465
  "To speed up loading of Samsung Pay button you can include the Samsung Pay Web SDK JavaScript file in your website front-end directly. If there will be no Samsung Pay available on form initialization it will be loaded automatically"
3458
- ), A.samsung_pay.service_id || q("Samsung Pay service_id"), A.samsung_pay.service_id.trim().length === 0 && D("Samsung Pay service_id can't be empty"), w || q("Samsung Pay order_number or Payment Options order_number"), (w == null ? void 0 : w.trim().length) === 0 && D("Order number can't be empty"), d || q("Samsung Pay country or Payment Options country"), (d == null ? void 0 : d.trim().length) !== 2 && D("Country must be two-letter ISO 3166 country code"), m || q("Samsung Pay label or Payment Options label"), (m == null ? void 0 : m.trim().length) === 0 && D("Samsung Pay label or Payment Options label can't be empty");
3466
+ ), A.samsung_pay.service_id || J("Samsung Pay service_id"), A.samsung_pay.service_id.trim().length === 0 && D("Samsung Pay service_id can't be empty"), b || J("Samsung Pay order_number or Payment Options order_number"), (b == null ? void 0 : b.trim().length) === 0 && D("Order number can't be empty"), d || J("Samsung Pay country or Payment Options country"), (d == null ? void 0 : d.trim().length) !== 2 && D("Country must be two-letter ISO 3166 country code"), m || J("Samsung Pay label or Payment Options label"), (m == null ? void 0 : m.trim().length) === 0 && D("Samsung Pay label or Payment Options label can't be empty");
3459
3467
  }
3460
3468
  if (A.google_pay) {
3461
- const d = A.google_pay.country || ((f = A.payment_options) == null ? void 0 : f.country), m = A.google_pay.label || ((y = A.payment_options) == null ? void 0 : y.label), w = A.publishable_api_key.startsWith("pk_test") || location.protocol === "http:", h = A.google_pay.environment;
3462
- !((v = (b = window.google) == null ? void 0 : b.payments) != null && v.api) && w && console.warn(
3469
+ const d = A.google_pay.country || ((f = A.payment_options) == null ? void 0 : f.country), m = A.google_pay.label || ((w = A.payment_options) == null ? void 0 : w.label), b = A.publishable_api_key.startsWith("pk_test") || location.protocol === "http:", y = A.google_pay.environment;
3470
+ !((g = (h = window.google) == null ? void 0 : h.payments) != null && g.api) && b && console.warn(
3463
3471
  "To speed up loading of Google Pay button you can include the Google Pay Web SDK JavaScript file in your website front-end directly. If there will be no Google Pay available on form initialization it will be loaded automatically"
3464
- ), A.google_pay.merchant_id || q("Google Pay service_id"), A.google_pay.merchant_id.trim().length === 0 && D("Google Pay service_id can't be empty"), d || q("Google Pay country or Payment Options country"), (d == null ? void 0 : d.trim().length) !== 2 && D("Country must be two-letter ISO 3166 country code"), m || q("Google Pay label or Payment Options label"), (m == null ? void 0 : m.trim().length) === 0 && D("Google Pay label or Payment Options label can't be empty"), h && !["PRODUCTION", "TEST"].includes(h) && D("Google Pay environment can be set to `TEST` or `PRODUCTION`");
3472
+ ), A.google_pay.merchant_id || J("Google Pay service_id"), A.google_pay.merchant_id.trim().length === 0 && D("Google Pay service_id can't be empty"), d || J("Google Pay country or Payment Options country"), (d == null ? void 0 : d.trim().length) !== 2 && D("Country must be two-letter ISO 3166 country code"), m || J("Google Pay label or Payment Options label"), (m == null ? void 0 : m.trim().length) === 0 && D("Google Pay label or Payment Options label can't be empty"), y && !["PRODUCTION", "TEST"].includes(y) && D("Google Pay environment can be set to `TEST` or `PRODUCTION`");
3465
3473
  const { auth_methods: C } = A.google_pay;
3466
- C && !Array.isArray(C) && D("Google Pay auth_methods must be an array"), C && !C.every((B) => B === "PAN_ONLY" || B === "CRYPTOGRAM_3DS") && D("Google Pay auth_methods must contain 'CRYPTOGRAM_3DS' and/or 'PAN_ONLY'");
3474
+ C && !Array.isArray(C) && D("Google Pay auth_methods must be an array"), C && !C.every((M) => M === "PAN_ONLY" || M === "CRYPTOGRAM_3DS") && D("Google Pay auth_methods must contain 'CRYPTOGRAM_3DS' and/or 'PAN_ONLY'");
3467
3475
  }
3468
3476
  return A.supported_networks && (Vt(A.supported_networks, RA) || D(`Moyasar form supports only ${RA.join(", ")} networks`)), !0;
3469
- }, vr = (A) => (A.element || q("element"), typeof A.element != "string" && !(A.element instanceof Element) && aA("Element"), typeof A.element == "string" && !document.querySelector(A.element) && D(`Selector ${A.element} does't exist id DOM`), A.publishable_api_key.trim() || q("publishable_api_key"), A.publishable_api_key && (/^pk_(test|live)_/.test(A.publishable_api_key) || aA("Publishable API Key"), location.protocol.toLowerCase() === "http:" && A.publishable_api_key.startsWith("pk_live") && D(
3477
+ }, gr = (A) => (A.element || J("element"), typeof A.element != "string" && !(A.element instanceof Element) && aA("Element"), typeof A.element == "string" && !document.querySelector(A.element) && D(`Selector ${A.element} does't exist id DOM`), A.publishable_api_key.trim() || J("publishable_api_key"), A.publishable_api_key && (/^pk_(test|live)_/.test(A.publishable_api_key) || aA("Publishable API Key"), location.protocol.toLowerCase() === "http:" && A.publishable_api_key.startsWith("pk_live") && D(
3470
3478
  "Production key (pk_live) require secure connection, for development use key starting with pk_test"
3471
- )), A.amount || q("amount"), A.amount && ((typeof A.amount != "number" || A.amount < 100) && D("Amount must be a non-negative integer. Minimal supported value is 100."), Number.isInteger(A.amount) || D(
3479
+ )), A.amount || J("amount"), A.amount && ((typeof A.amount != "number" || A.amount < 100) && D("Amount must be a non-negative integer. Minimal supported value is 100."), Number.isInteger(A.amount) || D(
3472
3480
  "Amount must be in minor unit of selected currency, e.g. for $19.99 set amount to 1999."
3473
- )), A.currency || q("currency"), A.currency && A.currency.trim().length !== 3 && D("Currency must be in ISO 3166-1 alpha-3 country code format"), A.description || q("description"), A.description && A.description.trim().length === 0 && D("Description can't be empty"), A.callback_url || q("callback_url"), ke(A.callback_url) || aA("Callback URL"), !0), D = (A) => {
3481
+ )), A.currency || J("currency"), A.currency && A.currency.trim().length !== 3 && D("Currency must be in ISO 3166-1 alpha-3 country code format"), A.description || J("description"), A.description && A.description.trim().length === 0 && D("Description can't be empty"), A.callback_url || J("callback_url"), ke(A.callback_url) || aA("Callback URL"), !0), D = (A) => {
3474
3482
  throw window.silentError && console.error(A), new Error(A);
3475
- }, q = (A) => D(`Missing entry: ${A} is required`), aA = (A) => D(`${A} is invalid`), ke = (A) => typeof A == "string" && /^https?:\/\/.+/.test(A), gr = (A, t = !1) => (t && (window.silentError = t), vr(A), mr(A), dr(A), fr(A), !0), hr = (A) => {
3483
+ }, J = (A) => D(`Missing entry: ${A} is required`), aA = (A) => D(`${A} is invalid`), ke = (A) => typeof A == "string" && /^https?:\/\/.+/.test(A), hr = (A, t = !1) => (t && (window.silentError = t), gr(A), vr(A), mr(A), fr(A), !0), yr = (A) => {
3476
3484
  const t = A.publishable_api_key.startsWith("pk_test") || location.protocol === "http:", e = A.element;
3477
3485
  let n;
3478
3486
  if (typeof e == "string" && (n = document.querySelector(e)), e instanceof Element && (n = e), !n) {
@@ -3482,7 +3490,7 @@ const fr = (A) => {
3482
3490
  return;
3483
3491
  }
3484
3492
  try {
3485
- gr(A, t);
3493
+ hr(A, t);
3486
3494
  } catch (r) {
3487
3495
  console.error(r), yt(/* @__PURE__ */ p(() => /* @__PURE__ */ p("div", { class: "mx-auto w-fit rounded-lg border-red-800 bg-red-500/20 p-4 font-mono text-sm leading-6", children: [
3488
3496
  /* @__PURE__ */ p("h2", { class: "mb-4 text-center text-xl font-medium", children: "Form configuration issue!" }),
@@ -3492,28 +3500,28 @@ const fr = (A) => {
3492
3500
  return;
3493
3501
  }
3494
3502
  n.setAttribute("lang", A.language), yt(/* @__PURE__ */ p(pr, { config: A }), n);
3495
- }, yr = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3496
- let wr = (A = 21) => {
3503
+ }, wr = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3504
+ let br = (A = 21) => {
3497
3505
  let t = "", e = crypto.getRandomValues(new Uint8Array(A |= 0));
3498
3506
  for (; A--; )
3499
- t += yr[e[A] & 63];
3507
+ t += wr[e[A] & 63];
3500
3508
  return t;
3501
3509
  };
3502
- const br = (A) => {
3503
- const t = k({}, A);
3510
+ const Cr = (A) => {
3511
+ const t = S({}, A);
3504
3512
  return "show_footer" in A || (t.show_footer = !0), A.base_url || (t.base_url = "https://api.moyasar.com"), A.payment_button_type || (t.payment_button_type = "pay"), A.language || (t.language = document.documentElement.lang || "en"), A.methods || (t.methods = Pn), A.supported_networks || (t.supported_networks = RA.filter((e) => e !== "amex")), !A.fixed_width && A.fixed_width !== !1 && (t.fixed_width = !0), A.apple_pay && (A.apple_pay.version || (t.apple_pay.version = 6), A.apple_pay.merchant_capabilities || (t.apple_pay.merchant_capabilities = jA.filter(
3505
3513
  (e) => e !== "supportsEMV"
3506
- )), A.apple_pay.supported_countries || (t.apple_pay.supported_countries = ["SA"])), A.samsung_pay && (A.samsung_pay.version || (t.samsung_pay.version = 2), A.samsung_pay.environment || (t.samsung_pay.environment = "PRODUCTION")), A.google_pay && (A.google_pay.environment || (t.google_pay.environment = "PRODUCTION"), A.google_pay.auth_methods || (t.google_pay.auth_methods = ["PAN_ONLY", "CRYPTOGRAM_3DS"]), A.google_pay.gateway_merchant_id || (t.google_pay.gateway_merchant_id = wr(36))), t;
3514
+ )), A.apple_pay.supported_countries || (t.apple_pay.supported_countries = ["SA"])), A.samsung_pay && (A.samsung_pay.version || (t.samsung_pay.version = 2), A.samsung_pay.environment || (t.samsung_pay.environment = "PRODUCTION")), A.google_pay && (A.google_pay.environment || (t.google_pay.environment = "PRODUCTION"), A.google_pay.auth_methods || (t.google_pay.auth_methods = ["PAN_ONLY", "CRYPTOGRAM_3DS"]), A.google_pay.gateway_merchant_id || (t.google_pay.gateway_merchant_id = br(36))), t;
3507
3515
  };
3508
- class Dr {
3516
+ class Mr {
3509
3517
  static init(t) {
3510
- const e = br(t);
3511
- hr(e);
3518
+ const e = Cr(t);
3519
+ yr(e);
3512
3520
  }
3513
3521
  static setAmount(t) {
3514
- tt ? tt((e) => X(k({}, e), { amount: t })) : console.warn("Form not yet initialized.");
3522
+ tt ? tt((e) => P(S({}, e), { amount: t })) : console.warn("Form not yet initialized.");
3515
3523
  }
3516
3524
  }
3517
3525
  export {
3518
- Dr as default
3526
+ Mr as default
3519
3527
  };