@paynext/sdk 0.0.110 → 0.0.112

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/index.es.js CHANGED
@@ -20,18 +20,18 @@ var se = (n, e) => {
20
20
  return t;
21
21
  };
22
22
  var c = (n, e, t) => xt(n, typeof e != "symbol" ? e + "" : e, t);
23
- var k = (n, e, t) => new Promise((i, r) => {
23
+ var E = (n, e, t) => new Promise((i, r) => {
24
24
  var s = (l) => {
25
25
  try {
26
26
  o(t.next(l));
27
- } catch (d) {
28
- r(d);
27
+ } catch (u) {
28
+ r(u);
29
29
  }
30
30
  }, a = (l) => {
31
31
  try {
32
32
  o(t.throw(l));
33
- } catch (d) {
34
- r(d);
33
+ } catch (u) {
34
+ r(u);
35
35
  }
36
36
  }, o = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(s, a);
37
37
  o((t = t.apply(n, e)).next());
@@ -44,7 +44,7 @@ class nu {
44
44
  typeof window != "undefined" && (this.parent = e);
45
45
  }
46
46
  mount(e) {
47
- return k(this, null, function* () {
47
+ return E(this, null, function* () {
48
48
  if (!this.parent)
49
49
  return;
50
50
  if (!this.core) {
@@ -62,7 +62,7 @@ class nu {
62
62
  });
63
63
  }
64
64
  unmount() {
65
- return k(this, null, function* () {
65
+ return E(this, null, function* () {
66
66
  !this.parent || !this.core || (this.parent.innerHTML = "", this.core.clearState());
67
67
  });
68
68
  }
@@ -151,19 +151,19 @@ const Xt = (n = "sandbox") => ({
151
151
  payment_method_nonce: e.nonce
152
152
  };
153
153
  }, kn = (n) => {
154
- var i, r, s, a, o, l, d, u, h, m, p, g, b, y;
154
+ var i, r, s, a, o, l, u, d, h, m, p, g, b, y;
155
155
  const { applePay: e, googlePay: t } = n;
156
156
  if (!(!e && !t))
157
157
  return {
158
158
  city: ((i = e == null ? void 0 : e.billingContact) == null ? void 0 : i.locality) || ((r = t == null ? void 0 : t.billingAddress) == null ? void 0 : r.locality) || void 0,
159
159
  country: ((s = e == null ? void 0 : e.billingContact) == null ? void 0 : s.countryCode) || ((a = t == null ? void 0 : t.billingAddress) == null ? void 0 : a.countryCode) || void 0,
160
- line1: ((l = (o = e == null ? void 0 : e.billingContact) == null ? void 0 : o.addressLines) == null ? void 0 : l.at(0)) || ((d = t == null ? void 0 : t.billingAddress) == null ? void 0 : d.address1) || void 0,
161
- line2: ((h = (u = e == null ? void 0 : e.billingContact) == null ? void 0 : u.addressLines) == null ? void 0 : h.at(1)) || ((m = t == null ? void 0 : t.billingAddress) == null ? void 0 : m.address2) || void 0,
160
+ line1: ((l = (o = e == null ? void 0 : e.billingContact) == null ? void 0 : o.addressLines) == null ? void 0 : l.at(0)) || ((u = t == null ? void 0 : t.billingAddress) == null ? void 0 : u.address1) || void 0,
161
+ line2: ((h = (d = e == null ? void 0 : e.billingContact) == null ? void 0 : d.addressLines) == null ? void 0 : h.at(1)) || ((m = t == null ? void 0 : t.billingAddress) == null ? void 0 : m.address2) || void 0,
162
162
  postal_code: ((p = e == null ? void 0 : e.billingContact) == null ? void 0 : p.postalCode) || ((g = t == null ? void 0 : t.billingAddress) == null ? void 0 : g.postalCode) || void 0,
163
163
  state: ((b = e == null ? void 0 : e.billingContact) == null ? void 0 : b.administrativeArea) || ((y = t == null ? void 0 : t.billingAddress) == null ? void 0 : y.administrativeArea) || void 0
164
164
  };
165
165
  }, En = (n) => {
166
- var r, s, a, o, l, d, u, h, m, p, g, b, y, E, V, _, M, T, D;
166
+ var r, s, a, o, l, u, d, h, m, p, g, b, y, k, V, _, M, T, D;
167
167
  const { card: e, googlePay: t, applePay: i } = n;
168
168
  if (!(!e && !(t != null && t.card) && !(i != null && i.card)))
169
169
  return {
@@ -171,13 +171,13 @@ const Xt = (n = "sandbox") => ({
171
171
  bin_data: {
172
172
  brand: (e == null ? void 0 : e.cardBrand) || ((r = t == null ? void 0 : t.card) == null ? void 0 : r.brand) || ((s = i == null ? void 0 : i.card) == null ? void 0 : s.brand),
173
173
  country: (e == null ? void 0 : e.country) || ((a = t == null ? void 0 : t.card) == null ? void 0 : a.country) || ((o = i == null ? void 0 : i.card) == null ? void 0 : o.country),
174
- currency_code: (e == null ? void 0 : e.currency) || ((l = t == null ? void 0 : t.card) == null ? void 0 : l.currency) || ((d = i == null ? void 0 : i.card) == null ? void 0 : d.currency),
175
- funding: (e == null ? void 0 : e.funding) || ((u = t == null ? void 0 : t.card) == null ? void 0 : u.funding) || ((h = i == null ? void 0 : i.card) == null ? void 0 : h.funding),
174
+ currency_code: (e == null ? void 0 : e.currency) || ((l = t == null ? void 0 : t.card) == null ? void 0 : l.currency) || ((u = i == null ? void 0 : i.card) == null ? void 0 : u.currency),
175
+ funding: (e == null ? void 0 : e.funding) || ((d = t == null ? void 0 : t.card) == null ? void 0 : d.funding) || ((h = i == null ? void 0 : i.card) == null ? void 0 : h.funding),
176
176
  issuer: (e == null ? void 0 : e.issuer) || ((m = t == null ? void 0 : t.card) == null ? void 0 : m.issuer) || ((p = i == null ? void 0 : i.card) == null ? void 0 : p.issuer),
177
177
  type: (e == null ? void 0 : e.type) || ((g = t == null ? void 0 : t.card) == null ? void 0 : g.segment) || ((b = i == null ? void 0 : i.card) == null ? void 0 : b.segment)
178
178
  },
179
179
  cvc: e == null ? void 0 : e.cvc,
180
- exp_month: e != null && e.expMonth || (y = t == null ? void 0 : t.card) != null && y.expiry.month ? Number((e == null ? void 0 : e.expMonth) || ((E = t == null ? void 0 : t.card) == null ? void 0 : E.expiry.month)) : void 0,
180
+ exp_month: e != null && e.expMonth || (y = t == null ? void 0 : t.card) != null && y.expiry.month ? Number((e == null ? void 0 : e.expMonth) || ((k = t == null ? void 0 : t.card) == null ? void 0 : k.expiry.month)) : void 0,
181
181
  exp_year: e != null && e.expYear || (V = t == null ? void 0 : t.card) != null && V.expiry.year ? Number((e == null ? void 0 : e.expYear) || ((_ = t == null ? void 0 : t.card) == null ? void 0 : _.expiry.year)) : void 0,
182
182
  last4: (e == null ? void 0 : e.lastFourDigits) || ((M = t == null ? void 0 : t.card) == null ? void 0 : M.lastFour) || ((T = i == null ? void 0 : i.card) == null ? void 0 : T.lastFour),
183
183
  number: (e == null ? void 0 : e.number) || ((D = t == null ? void 0 : t.card) == null ? void 0 : D.number)
@@ -224,7 +224,7 @@ const Xt = (n = "sandbox") => ({
224
224
  default:
225
225
  throw new Error(`Unsupported payment method: ${e}`);
226
226
  }
227
- }, Pr = (n, e, t) => k(void 0, null, function* () {
227
+ }, Pr = (n, e, t) => E(void 0, null, function* () {
228
228
  const i = `${Xt(e)}/payments/create`, r = new Headers();
229
229
  r.append("Content-Type", "application/json"), r.append("X-API-Version", t);
230
230
  const s = Mr(n);
@@ -233,14 +233,14 @@ const Xt = (n = "sandbox") => ({
233
233
  headers: r,
234
234
  body: JSON.stringify(s)
235
235
  })).json();
236
- }), Dr = (n, e, t) => k(void 0, null, function* () {
236
+ }), Dr = (n, e, t) => E(void 0, null, function* () {
237
237
  const i = `${Xt(e)}/payments/create/billing/agreement`, r = new Headers();
238
238
  return r.append("Content-Type", "application/json"), r.append("X-API-Version", t), (yield (yield fetch(i, {
239
239
  method: "POST",
240
240
  headers: r,
241
241
  body: JSON.stringify({ client_session: n })
242
242
  })).json()).paypal_agreement_token_response.token_id || "";
243
- }), Rr = (n, e, t) => k(void 0, null, function* () {
243
+ }), Rr = (n, e, t) => E(void 0, null, function* () {
244
244
  const i = `${Xt(e)}/payments/config?client_session_id=${n}`, r = new Headers();
245
245
  r.append("X-API-Version", t);
246
246
  const a = yield (yield fetch(i, { headers: r })).json();
@@ -253,48 +253,50 @@ let Or = class {
253
253
  c(this, "onReady");
254
254
  this.ev = e;
255
255
  }
256
- init(u, h) {
257
- return k(this, arguments, function* ({
256
+ init(u, d) {
257
+ return E(this, arguments, function* ({
258
258
  transaction: e,
259
259
  locale: t,
260
- supportedCardTypes: i,
261
- onReady: r,
262
- onError: s,
263
- onSuccess: a,
264
- onCancel: o,
265
- onPaymentAttempt: l
266
- }, d) {
267
- const m = this.ev.transactions.create(e);
268
- this.apple = this.ev.ui.applePay(m, I(v({
260
+ // supportedCardTypes,
261
+ onReady: i,
262
+ onError: r,
263
+ onSuccess: s,
264
+ onCancel: a,
265
+ onPaymentAttempt: o
266
+ }, l) {
267
+ const h = this.ev.transactions.create(e);
268
+ this.apple = this.ev.ui.applePay(h, I(v({
269
269
  locale: t,
270
270
  borderRadius: 12,
271
271
  size: {
272
272
  width: "100%",
273
273
  height: "40px"
274
274
  }
275
- }, d == null ? void 0 : d.styles), {
276
- allowedCardNetworks: i,
275
+ }, l == null ? void 0 : l.styles), {
276
+ // ToDo: Temporary we have only Visa and Master card
277
+ // allowedCardNetworks: supportedCardTypes
278
+ allowedCardNetworks: ["masterCard"],
277
279
  requestBillingAddress: !0,
278
280
  requestPayerDetails: ["name", "email", "phone"],
279
- process: (y, E) => k(this, [y, E], function* (g, { fail: b }) {
280
- l == null || l({
281
+ process: (b, y) => E(this, [b, y], function* (p, { fail: g }) {
282
+ o == null || o({
281
283
  paymentMethod: x.GOOGLE_PAY
282
284
  });
283
285
  try {
284
- a == null || a(g);
285
- } catch (V) {
286
- console.error(V), b({
286
+ s == null || s(p);
287
+ } catch (k) {
288
+ console.error(k), g({
287
289
  message: "Cannot pay with payment credentials"
288
290
  });
289
291
  }
290
292
  })
291
293
  }));
292
- const p = yield this.apple.availability();
293
- this.isAvailable = p === "available", this.isAvailable || s == null || s("Apple Pay is not supported on this device"), s && this.apple.on("error", s), o && this.apple.on("cancel", o), this.onReady = r;
294
+ const m = yield this.apple.availability();
295
+ this.isAvailable = m === "available", this.isAvailable || r == null || r("Apple Pay is not supported on this device"), r && this.apple.on("error", r), a && this.apple.on("cancel", a), this.onReady = i;
294
296
  });
295
297
  }
296
298
  render(e) {
297
- return k(this, null, function* () {
299
+ return E(this, null, function* () {
298
300
  var t;
299
301
  !this.apple || !this.isAvailable || (e.innerHTML = "", yield this.apple.mount(e), (t = this.onReady) == null || t.call(this));
300
302
  });
@@ -304,8 +306,8 @@ let Or = class {
304
306
  c(this, "google", null);
305
307
  this.ev = e;
306
308
  }
307
- init(d, u) {
308
- return k(this, arguments, function* ({ transaction: e, locale: t, onReady: i, onError: r, onSuccess: s, onCancel: a, onPaymentAttempt: o }, l) {
309
+ init(u, d) {
310
+ return E(this, arguments, function* ({ transaction: e, locale: t, onReady: i, onError: r, onSuccess: s, onCancel: a, onPaymentAttempt: o }, l) {
309
311
  const h = this.ev.transactions.create(e);
310
312
  this.google = this.ev.ui.googlePay(h, I(v({
311
313
  locale: t,
@@ -318,7 +320,8 @@ let Or = class {
318
320
  phoneNumber: !0
319
321
  }
320
322
  }, l == null ? void 0 : l.styles), {
321
- process: (g, b) => k(this, [g, b], function* (m, { fail: p }) {
323
+ allowedCardNetworks: ["MASTERCARD"],
324
+ process: (g, b) => E(this, [g, b], function* (m, { fail: p }) {
322
325
  o == null || o({
323
326
  paymentMethod: x.GOOGLE_PAY
324
327
  });
@@ -334,7 +337,7 @@ let Or = class {
334
337
  });
335
338
  }
336
339
  render(e) {
337
- return k(this, null, function* () {
340
+ return E(this, null, function* () {
338
341
  this.google && (e.innerHTML = "", this.google.mount(e));
339
342
  });
340
343
  }
@@ -363,12 +366,12 @@ class Sr {
363
366
  this.ev = e;
364
367
  }
365
368
  init(s) {
366
- return k(this, arguments, function* ({ threeDsId: e, onReady: t, onSuccess: i, onError: r }) {
369
+ return E(this, arguments, function* ({ threeDsId: e, onReady: t, onSuccess: i, onError: r }) {
367
370
  this.threeDs = this.ev.ui.threeDSecure(e), this.threeDs.on("ready", () => t == null ? void 0 : t()), this.threeDs.on("success", () => i == null ? void 0 : i()), this.threeDs.on("failure", () => r == null ? void 0 : r()), this.threeDs.on("error", () => r == null ? void 0 : r());
368
371
  });
369
372
  }
370
373
  render(e) {
371
- return k(this, null, function* () {
374
+ return E(this, null, function* () {
372
375
  this.threeDs && this.threeDs.mount(e);
373
376
  });
374
377
  }
@@ -391,7 +394,7 @@ class Fr {
391
394
  }
392
395
  // init ev
393
396
  initEv(e) {
394
- return k(this, null, function* () {
397
+ return E(this, null, function* () {
395
398
  if (!this.isShouldLoad(e)) return;
396
399
  if (typeof window == "undefined")
397
400
  throw new Error("Evervault can only be initialized in browser environment");
@@ -402,21 +405,21 @@ class Fr {
402
405
  }
403
406
  // init three ds
404
407
  initThreeDs(e) {
405
- return k(this, null, function* () {
408
+ return E(this, null, function* () {
406
409
  if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
407
410
  this.threeDs = new Sr(this.ev), yield this.threeDs.init(e), yield this.threeDs.render();
408
411
  });
409
412
  }
410
413
  // init apple
411
414
  initApple(e, t) {
412
- return k(this, null, function* () {
415
+ return E(this, null, function* () {
413
416
  if (!this.apple) throw new Error("Evervault should be init before using Apple Pay");
414
417
  yield this.apple.init(e, t);
415
418
  });
416
419
  }
417
420
  // init google
418
421
  initGoogle(e, t) {
419
- return k(this, null, function* () {
422
+ return E(this, null, function* () {
420
423
  if (!this.google) throw new Error("Evervault should be init before using Google Pay");
421
424
  yield this.google.init(e, t);
422
425
  });
@@ -432,14 +435,14 @@ class Fr {
432
435
  }
433
436
  // render apple
434
437
  renderApple(e) {
435
- return k(this, null, function* () {
438
+ return E(this, null, function* () {
436
439
  var t;
437
440
  return (t = this.apple) == null ? void 0 : t.render(e);
438
441
  });
439
442
  }
440
443
  // render google
441
444
  renderGoogle(e) {
442
- return k(this, null, function* () {
445
+ return E(this, null, function* () {
443
446
  var t;
444
447
  return (t = this.google) == null ? void 0 : t.render(e);
445
448
  });
@@ -559,7 +562,7 @@ process.env.NODE_ENV !== "production" && (it = (n, e) => {
559
562
  const Yr = "easeInOut", Ur = 20;
560
563
  function Wr(n, s = {}, i, r) {
561
564
  var a = s, { defaultTransition: e = {} } = a, t = se(a, ["defaultTransition"]);
562
- const o = e.duration || 0.3, l = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), u = {}, h = /* @__PURE__ */ new Map();
565
+ const o = e.duration || 0.3, l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = {}, h = /* @__PURE__ */ new Map();
563
566
  let m = 0, p = 0, g = 0;
564
567
  for (let b = 0; b < n.length; b++) {
565
568
  const y = n[b];
@@ -570,7 +573,7 @@ function Wr(n, s = {}, i, r) {
570
573
  h.set(y.name, wn(p, y.at, m, h));
571
574
  continue;
572
575
  }
573
- let [E, V, _ = {}] = y;
576
+ let [k, V, _ = {}] = y;
574
577
  _.at !== void 0 && (p = wn(p, _.at, m, h));
575
578
  let M = 0;
576
579
  const T = (D, C, w, R = 0, O = 0) => {
@@ -607,23 +610,23 @@ function Wr(n, s = {}, i, r) {
607
610
  const Ae = ie + f;
608
611
  qr(w, K, ne, te, ie, Ae), M = Math.max(P + f, M), g = Math.max(Ae, g);
609
612
  };
610
- if (J(E)) {
611
- const D = Tn(E, d);
613
+ if (J(k)) {
614
+ const D = Tn(k, u);
612
615
  T(V, _, An("default", D));
613
616
  } else {
614
- const D = hi(E, V, i, u), C = D.length;
617
+ const D = hi(k, V, i, d), C = D.length;
615
618
  for (let w = 0; w < C; w++) {
616
619
  V = V, _ = _;
617
- const R = D[w], O = Tn(R, d);
620
+ const R = D[w], O = Tn(R, u);
618
621
  for (const K in V)
619
622
  T(V[K], Jr(_, K), An(K, O), w, C);
620
623
  }
621
624
  }
622
625
  m = p, p += M;
623
626
  }
624
- return d.forEach((b, y) => {
625
- for (const E in b) {
626
- const V = b[E];
627
+ return u.forEach((b, y) => {
628
+ for (const k in b) {
629
+ const V = b[k];
627
630
  V.sort(Gr);
628
631
  const _ = [], M = [], T = [];
629
632
  for (let C = 0; C < V.length; C++) {
@@ -635,7 +638,7 @@ function Wr(n, s = {}, i, r) {
635
638
  transition: {}
636
639
  });
637
640
  const D = l.get(y);
638
- D.keyframes[E] = _, D.transition[E] = v(I(v({}, e), {
641
+ D.keyframes[k] = _, D.transition[k] = v(I(v({}, e), {
639
642
  duration: g,
640
643
  ease: T,
641
644
  times: M
@@ -703,35 +706,35 @@ function ns(n, e) {
703
706
  timestamp: 0,
704
707
  isProcessing: !1
705
708
  };
706
- function l(u) {
707
- a.has(u) && (d.schedule(u), n()), u(o);
709
+ function l(d) {
710
+ a.has(d) && (u.schedule(d), n()), d(o);
708
711
  }
709
- const d = {
712
+ const u = {
710
713
  /**
711
714
  * Schedule a process to run on the next frame.
712
715
  */
713
- schedule: (u, h = !1, m = !1) => {
716
+ schedule: (d, h = !1, m = !1) => {
714
717
  const g = m && r ? t : i;
715
- return h && a.add(u), g.has(u) || g.add(u), u;
718
+ return h && a.add(d), g.has(d) || g.add(d), d;
716
719
  },
717
720
  /**
718
721
  * Cancel the provided callback from running on the next frame.
719
722
  */
720
- cancel: (u) => {
721
- i.delete(u), a.delete(u);
723
+ cancel: (d) => {
724
+ i.delete(d), a.delete(d);
722
725
  },
723
726
  /**
724
727
  * Execute all schedule callbacks.
725
728
  */
726
- process: (u) => {
727
- if (o = u, r) {
729
+ process: (d) => {
730
+ if (o = d, r) {
728
731
  s = !0;
729
732
  return;
730
733
  }
731
- r = !0, [t, i] = [i, t], t.forEach(l), t.clear(), r = !1, s && (s = !1, d.process(u));
734
+ r = !0, [t, i] = [i, t], t.forEach(l), t.clear(), r = !1, s && (s = !1, u.process(d));
732
735
  }
733
736
  };
734
- return d;
737
+ return u;
735
738
  }
736
739
  const de = {}, is = 40;
737
740
  function rs(n, e) {
@@ -740,9 +743,9 @@ function rs(n, e) {
740
743
  delta: 0,
741
744
  timestamp: 0,
742
745
  isProcessing: !1
743
- }, s = () => t = !0, a = lt.reduce((_, M) => (_[M] = ns(s), _), {}), { setup: o, read: l, resolveKeyframes: d, preUpdate: u, update: h, preRender: m, render: p, postRender: g } = a, b = () => {
746
+ }, s = () => t = !0, a = lt.reduce((_, M) => (_[M] = ns(s), _), {}), { setup: o, read: l, resolveKeyframes: u, preUpdate: d, update: h, preRender: m, render: p, postRender: g } = a, b = () => {
744
747
  const _ = de.useManualTiming ? r.timestamp : performance.now();
745
- t = !1, de.useManualTiming || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(_ - r.timestamp, is), 1)), r.timestamp = _, r.isProcessing = !0, o.process(r), l.process(r), d.process(r), u.process(r), h.process(r), m.process(r), p.process(r), g.process(r), r.isProcessing = !1, t && e && (i = !1, n(b));
748
+ t = !1, de.useManualTiming || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(_ - r.timestamp, is), 1)), r.timestamp = _, r.isProcessing = !0, o.process(r), l.process(r), u.process(r), d.process(r), h.process(r), m.process(r), p.process(r), g.process(r), r.isProcessing = !1, t && e && (i = !1, n(b));
746
749
  }, y = () => {
747
750
  t = !0, i = !0, r.isProcessing || n(b);
748
751
  };
@@ -1075,8 +1078,8 @@ const Re = [
1075
1078
  duration: 0.3
1076
1079
  }, Es = (n, { keyframes: e }) => e.length > 2 ? Cs : Oe.has(n) ? n.startsWith("scale") ? ys(e[1]) : vs : ks;
1077
1080
  function xs(h) {
1078
- var m = h, { when: n, delay: e, delayChildren: t, staggerChildren: i, staggerDirection: r, repeat: s, repeatType: a, repeatDelay: o, from: l, elapsed: d } = m, u = se(m, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
1079
- return !!Object.keys(u).length;
1081
+ var m = h, { when: n, delay: e, delayChildren: t, staggerChildren: i, staggerDirection: r, repeat: s, repeatType: a, repeatDelay: o, from: l, elapsed: u } = m, d = se(m, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
1082
+ return !!Object.keys(d).length;
1080
1083
  }
1081
1084
  function xi(n, e) {
1082
1085
  var t, i;
@@ -1320,18 +1323,18 @@ function Zs({ duration: n = B.duration, bounce: e = B.bounce, velocity: t = B.ve
1320
1323
  let r, s;
1321
1324
  it(n <= /* @__PURE__ */ ae(B.maxDuration), "Spring duration must be 10 seconds or less");
1322
1325
  let a = 1 - e;
1323
- a = xe(B.minDamping, B.maxDamping, a), n = xe(B.minDuration, B.maxDuration, /* @__PURE__ */ le(n)), a < 1 ? (r = (d) => {
1324
- const u = d * a, h = u * n, m = u - t, p = St(d, a), g = Math.exp(-h);
1326
+ a = xe(B.minDamping, B.maxDamping, a), n = xe(B.minDuration, B.maxDuration, /* @__PURE__ */ le(n)), a < 1 ? (r = (u) => {
1327
+ const d = u * a, h = d * n, m = d - t, p = St(u, a), g = Math.exp(-h);
1325
1328
  return _t - m / p * g;
1326
- }, s = (d) => {
1327
- const h = d * a * n, m = h * t + t, p = Math.pow(a, 2) * Math.pow(d, 2) * n, g = Math.exp(-h), b = St(Math.pow(d, 2), a);
1328
- return (-r(d) + _t > 0 ? -1 : 1) * ((m - p) * g) / b;
1329
- }) : (r = (d) => {
1330
- const u = Math.exp(-d * n), h = (d - t) * n + 1;
1331
- return -_t + u * h;
1332
- }, s = (d) => {
1333
- const u = Math.exp(-d * n), h = (t - d) * (n * n);
1334
- return u * h;
1329
+ }, s = (u) => {
1330
+ const h = u * a * n, m = h * t + t, p = Math.pow(a, 2) * Math.pow(u, 2) * n, g = Math.exp(-h), b = St(Math.pow(u, 2), a);
1331
+ return (-r(u) + _t > 0 ? -1 : 1) * ((m - p) * g) / b;
1332
+ }) : (r = (u) => {
1333
+ const d = Math.exp(-u * n), h = (u - t) * n + 1;
1334
+ return -_t + d * h;
1335
+ }, s = (u) => {
1336
+ const d = Math.exp(-u * n), h = (t - u) * (n * n);
1337
+ return d * h;
1335
1338
  });
1336
1339
  const o = 5 / n, l = Xs(r, s, o);
1337
1340
  if (n = /* @__PURE__ */ ae(n), isNaN(l))
@@ -1341,10 +1344,10 @@ function Zs({ duration: n = B.duration, bounce: e = B.bounce, velocity: t = B.ve
1341
1344
  duration: n
1342
1345
  };
1343
1346
  {
1344
- const d = Math.pow(l, 2) * i;
1347
+ const u = Math.pow(l, 2) * i;
1345
1348
  return {
1346
- stiffness: d,
1347
- damping: a * 2 * Math.sqrt(i * d),
1349
+ stiffness: u,
1350
+ damping: a * 2 * Math.sqrt(i * u),
1348
1351
  duration: n
1349
1352
  };
1350
1353
  }
@@ -1394,24 +1397,24 @@ function tt(n = B.visualDuration, e = B.bounce) {
1394
1397
  bounce: e
1395
1398
  } : n;
1396
1399
  let { restSpeed: i, restDelta: r } = t;
1397
- const s = t.keyframes[0], a = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: s }, { stiffness: l, damping: d, mass: u, duration: h, velocity: m, isResolvedFromDuration: p } = ta(I(v({}, t), {
1400
+ const s = t.keyframes[0], a = t.keyframes[t.keyframes.length - 1], o = { done: !1, value: s }, { stiffness: l, damping: u, mass: d, duration: h, velocity: m, isResolvedFromDuration: p } = ta(I(v({}, t), {
1398
1401
  velocity: -/* @__PURE__ */ le(t.velocity || 0)
1399
- })), g = m || 0, b = d / (2 * Math.sqrt(l * u)), y = a - s, E = /* @__PURE__ */ le(Math.sqrt(l / u)), V = Math.abs(y) < 5;
1402
+ })), g = m || 0, b = u / (2 * Math.sqrt(l * d)), y = a - s, k = /* @__PURE__ */ le(Math.sqrt(l / d)), V = Math.abs(y) < 5;
1400
1403
  i || (i = V ? B.restSpeed.granular : B.restSpeed.default), r || (r = V ? B.restDelta.granular : B.restDelta.default);
1401
1404
  let _;
1402
1405
  if (b < 1) {
1403
- const T = St(E, b);
1406
+ const T = St(k, b);
1404
1407
  _ = (D) => {
1405
- const C = Math.exp(-b * E * D);
1406
- return a - C * ((g + b * E * y) / T * Math.sin(T * D) + y * Math.cos(T * D));
1408
+ const C = Math.exp(-b * k * D);
1409
+ return a - C * ((g + b * k * y) / T * Math.sin(T * D) + y * Math.cos(T * D));
1407
1410
  };
1408
1411
  } else if (b === 1)
1409
- _ = (T) => a - Math.exp(-E * T) * (y + (g + E * y) * T);
1412
+ _ = (T) => a - Math.exp(-k * T) * (y + (g + k * y) * T);
1410
1413
  else {
1411
- const T = E * Math.sqrt(b * b - 1);
1414
+ const T = k * Math.sqrt(b * b - 1);
1412
1415
  _ = (D) => {
1413
- const C = Math.exp(-b * E * D), w = Math.min(T * D, 300);
1414
- return a - C * ((g + b * E * y) * Math.sinh(w) + T * y * Math.cosh(w)) / T;
1416
+ const C = Math.exp(-b * k * D), w = Math.min(T * D, 300);
1417
+ return a - C * ((g + b * k * y) * Math.sinh(w) + T * y * Math.cosh(w)) / T;
1415
1418
  };
1416
1419
  }
1417
1420
  const M = {
@@ -1441,17 +1444,17 @@ tt.applyToOptions = (n) => {
1441
1444
  const e = vi(n, 100, tt);
1442
1445
  return n.ease = e.ease, n.duration = /* @__PURE__ */ ae(e.duration), n.type = "keyframes", n;
1443
1446
  };
1444
- function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 325, bounceDamping: r = 10, bounceStiffness: s = 500, modifyTarget: a, min: o, max: l, restDelta: d = 0.5, restSpeed: u }) {
1447
+ function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 325, bounceDamping: r = 10, bounceStiffness: s = 500, modifyTarget: a, min: o, max: l, restDelta: u = 0.5, restSpeed: d }) {
1445
1448
  const h = n[0], m = {
1446
1449
  done: !1,
1447
1450
  value: h
1448
1451
  }, p = (w) => o !== void 0 && w < o || l !== void 0 && w > l, g = (w) => o === void 0 ? l : l === void 0 || Math.abs(o - w) < Math.abs(l - w) ? o : l;
1449
1452
  let b = t * e;
1450
- const y = h + b, E = a === void 0 ? y : a(y);
1451
- E !== y && (b = E - h);
1452
- const V = (w) => -b * Math.exp(-w / i), _ = (w) => E + V(w), M = (w) => {
1453
+ const y = h + b, k = a === void 0 ? y : a(y);
1454
+ k !== y && (b = k - h);
1455
+ const V = (w) => -b * Math.exp(-w / i), _ = (w) => k + V(w), M = (w) => {
1453
1456
  const R = V(w), O = _(w);
1454
- m.done = Math.abs(R) <= d, m.value = m.done ? E : O;
1457
+ m.done = Math.abs(R) <= u, m.value = m.done ? k : O;
1455
1458
  };
1456
1459
  let T, D;
1457
1460
  const C = (w) => {
@@ -1461,8 +1464,8 @@ function Ft({ keyframes: n, velocity: e = 0, power: t = 0.8, timeConstant: i = 3
1461
1464
  // TODO: This should be passing * 1000
1462
1465
  damping: r,
1463
1466
  stiffness: s,
1464
- restDelta: d,
1465
- restSpeed: u
1467
+ restDelta: u,
1468
+ restSpeed: d
1466
1469
  }));
1467
1470
  };
1468
1471
  return C(0), {
@@ -1493,17 +1496,17 @@ function ia(n, e, { clamp: t = !0, ease: i, mixer: r } = {}) {
1493
1496
  return () => e[1];
1494
1497
  const a = n[0] === n[1];
1495
1498
  n[0] > n[s - 1] && (n = [...n].reverse(), e = [...e].reverse());
1496
- const o = na(e, i, r), l = o.length, d = (u) => {
1497
- if (a && u < n[0])
1499
+ const o = na(e, i, r), l = o.length, u = (d) => {
1500
+ if (a && d < n[0])
1498
1501
  return e[0];
1499
1502
  let h = 0;
1500
1503
  if (l > 1)
1501
- for (; h < n.length - 2 && !(u < n[h + 1]); h++)
1504
+ for (; h < n.length - 2 && !(d < n[h + 1]); h++)
1502
1505
  ;
1503
- const m = /* @__PURE__ */ en(n[h], n[h + 1], u);
1506
+ const m = /* @__PURE__ */ en(n[h], n[h + 1], d);
1504
1507
  return o[h](m);
1505
1508
  };
1506
- return t ? (u) => d(xe(n[0], n[s - 1], u)) : d;
1509
+ return t ? (d) => u(xe(n[0], n[s - 1], d)) : u;
1507
1510
  }
1508
1511
  function ra(n, e) {
1509
1512
  return n.map((t) => t * e);
@@ -1618,13 +1621,13 @@ class mn extends pn {
1618
1621
  let { keyframes: o } = e;
1619
1622
  const l = t || Ie;
1620
1623
  process.env.NODE_ENV !== "production" && l !== Ie && ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Ie && typeof o[0] != "number" && (this.mixKeyframes = ln(fa, Pi(o[0], o[1])), o = [0, 100]);
1621
- const d = l(I(v({}, e), { keyframes: o }));
1624
+ const u = l(I(v({}, e), { keyframes: o }));
1622
1625
  s === "mirror" && (this.mirroredGenerator = l(I(v({}, e), {
1623
1626
  keyframes: [...o].reverse(),
1624
1627
  velocity: -a
1625
- }))), d.calculatedDuration === null && (d.calculatedDuration = nn(d));
1626
- const { calculatedDuration: u } = d;
1627
- this.calculatedDuration = u, this.resolvedDuration = u + r, this.totalDuration = this.resolvedDuration * (i + 1) - r, this.generator = d;
1628
+ }))), u.calculatedDuration === null && (u.calculatedDuration = nn(u));
1629
+ const { calculatedDuration: d } = u;
1630
+ this.calculatedDuration = d, this.resolvedDuration = d + r, this.totalDuration = this.resolvedDuration * (i + 1) - r, this.generator = u;
1628
1631
  }
1629
1632
  updateTime(e) {
1630
1633
  const t = Math.round(e - this.startTime) * this.playbackSpeed;
@@ -1634,22 +1637,22 @@ class mn extends pn {
1634
1637
  const { generator: i, totalDuration: r, mixKeyframes: s, mirroredGenerator: a, resolvedDuration: o, calculatedDuration: l } = this;
1635
1638
  if (this.startTime === null)
1636
1639
  return i.next(0);
1637
- const { delay: d = 0, keyframes: u, repeat: h, repeatType: m, repeatDelay: p, type: g, onUpdate: b, finalKeyframe: y } = this.options;
1640
+ const { delay: u = 0, keyframes: d, repeat: h, repeatType: m, repeatDelay: p, type: g, onUpdate: b, finalKeyframe: y } = this.options;
1638
1641
  this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - r / this.speed, this.startTime)), t ? this.currentTime = e : this.updateTime(e);
1639
- const E = this.currentTime - d * (this.playbackSpeed >= 0 ? 1 : -1), V = this.playbackSpeed >= 0 ? E < 0 : E > r;
1640
- this.currentTime = Math.max(E, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
1642
+ const k = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), V = this.playbackSpeed >= 0 ? k < 0 : k > r;
1643
+ this.currentTime = Math.max(k, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
1641
1644
  let _ = this.currentTime, M = i;
1642
1645
  if (h) {
1643
1646
  const w = Math.min(this.currentTime, r) / o;
1644
1647
  let R = Math.floor(w), O = w % 1;
1645
1648
  !O && w >= 1 && (O = 1), O === 1 && R--, R = Math.min(R, h + 1), !!(R % 2) && (m === "reverse" ? (O = 1 - O, p && (O -= p / o)) : m === "mirror" && (M = a)), _ = xe(0, 1, O) * o;
1646
1649
  }
1647
- const T = V ? { done: !1, value: u[0] } : M.next(_);
1650
+ const T = V ? { done: !1, value: d[0] } : M.next(_);
1648
1651
  s && (T.value = s(T.value));
1649
1652
  let { done: D } = T;
1650
1653
  !V && l !== null && (D = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
1651
1654
  const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && D);
1652
- return C && g !== Ft && (T.value = hn(u, this.options, y, this.speed)), b && b(T.value), C && this.finish(), T;
1655
+ return C && g !== Ft && (T.value = hn(d, this.options, y, this.speed)), b && b(T.value), C && this.finish(), T;
1653
1656
  }
1654
1657
  /**
1655
1658
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -1908,13 +1911,13 @@ function Ui(n, e) {
1908
1911
  if (n)
1909
1912
  return typeof n == "function" ? Yi() ? Di(n, e) : "ease-out" : Ki(n) ? Ue(n) : Array.isArray(n) ? n.map((t) => Ui(t, e) || zn.easeOut) : zn[n];
1910
1913
  }
1911
- function Ia(n, e, t, { delay: i = 0, duration: r = 300, repeat: s = 0, repeatType: a = "loop", ease: o = "easeOut", times: l } = {}, d = void 0) {
1912
- const u = {
1914
+ function Ia(n, e, t, { delay: i = 0, duration: r = 300, repeat: s = 0, repeatType: a = "loop", ease: o = "easeOut", times: l } = {}, u = void 0) {
1915
+ const d = {
1913
1916
  [e]: t
1914
1917
  };
1915
- l && (u.offset = l);
1918
+ l && (d.offset = l);
1916
1919
  const h = Ui(o, r);
1917
- Array.isArray(h) && (u.easing = h);
1920
+ Array.isArray(h) && (d.easing = h);
1918
1921
  const m = {
1919
1922
  delay: i,
1920
1923
  duration: r,
@@ -1923,7 +1926,7 @@ function Ia(n, e, t, { delay: i = 0, duration: r = 300, repeat: s = 0, repeatTyp
1923
1926
  iterations: s + 1,
1924
1927
  direction: a === "reverse" ? "alternate" : "normal"
1925
1928
  };
1926
- return d && (m.pseudoElement = d), n.animate(u, m);
1929
+ return u && (m.pseudoElement = u), n.animate(d, m);
1927
1930
  }
1928
1931
  function Ma(t) {
1929
1932
  var i = t, { type: n } = i, e = se(i, ["type"]);
@@ -1936,11 +1939,11 @@ class Pa extends pn {
1936
1939
  return;
1937
1940
  const { element: t, name: i, keyframes: r, pseudoElement: s, allowFlatten: a = !1, finalKeyframe: o, onComplete: l } = e;
1938
1941
  this.isPseudoElement = !!s, this.allowFlatten = a, this.options = e, ce(typeof e.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1939
- const d = Ma(e);
1940
- this.animation = Ia(t, i, r, d, s), d.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1942
+ const u = Ma(e);
1943
+ this.animation = Ia(t, i, r, u, s), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1941
1944
  if (this.finishedTime = this.time, !s) {
1942
- const u = hn(r, this.options, o, this.speed);
1943
- this.updateMotionValue ? this.updateMotionValue(u) : Aa(t, i, u), this.animation.cancel();
1945
+ const d = hn(r, this.options, o, this.speed);
1946
+ this.updateMotionValue ? this.updateMotionValue(d) : Aa(t, i, d), this.animation.cancel();
1944
1947
  }
1945
1948
  l == null || l(), this.notifyFinished();
1946
1949
  };
@@ -2047,8 +2050,8 @@ class Oa extends Pa {
2047
2050
  * Motion to calculate velocity for any subsequent animation.
2048
2051
  */
2049
2052
  updateMotionValue(e) {
2050
- var u;
2051
- const d = this.options, { motionValue: t, onUpdate: i, onComplete: r, element: s } = d, a = se(d, ["motionValue", "onUpdate", "onComplete", "element"]);
2053
+ var d;
2054
+ const u = this.options, { motionValue: t, onUpdate: i, onComplete: r, element: s } = u, a = se(u, ["motionValue", "onUpdate", "onComplete", "element"]);
2052
2055
  if (!t)
2053
2056
  return;
2054
2057
  if (e !== void 0) {
@@ -2057,7 +2060,7 @@ class Oa extends Pa {
2057
2060
  }
2058
2061
  const o = new mn(I(v({}, a), {
2059
2062
  autoplay: !1
2060
- })), l = /* @__PURE__ */ ae((u = this.finishedTime) != null ? u : this.time);
2063
+ })), l = /* @__PURE__ */ ae((d = this.finishedTime) != null ? d : this.time);
2061
2064
  t.setWithVelocity(o.sample(l - $n).value, o.sample(l).value, $n), o.stop();
2062
2065
  }
2063
2066
  }
@@ -2096,9 +2099,9 @@ const ja = /* @__PURE__ */ new Set([
2096
2099
  // "background-color"
2097
2100
  ]), Ba = /* @__PURE__ */ gn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
2098
2101
  function za(n) {
2099
- var d;
2102
+ var u;
2100
2103
  const { motionValue: e, name: t, repeatDelay: i, repeatType: r, damping: s, type: a } = n;
2101
- if (!Fa((d = e == null ? void 0 : e.owner) == null ? void 0 : d.current))
2104
+ if (!Fa((u = e == null ? void 0 : e.owner) == null ? void 0 : u.current))
2102
2105
  return !1;
2103
2106
  const { onUpdate: o, transformTemplate: l } = e.owner.getProps();
2104
2107
  return Ba() && t && ja.has(t) && (t !== "transform" || !l) && /**
@@ -2110,11 +2113,11 @@ function za(n) {
2110
2113
  const $a = 40;
2111
2114
  class Ka extends pn {
2112
2115
  constructor(m) {
2113
- var p = m, { autoplay: e = !0, delay: t = 0, type: i = "keyframes", repeat: r = 0, repeatDelay: s = 0, repeatType: a = "loop", keyframes: o, name: l, motionValue: d, element: u } = p, h = se(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
2116
+ var p = m, { autoplay: e = !0, delay: t = 0, type: i = "keyframes", repeat: r = 0, repeatDelay: s = 0, repeatType: a = "loop", keyframes: o, name: l, motionValue: u, element: d } = p, h = se(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
2114
2117
  var y;
2115
2118
  super(), this.stop = () => {
2116
- var E, V;
2117
- this._animation && (this._animation.stop(), (E = this.stopTimeline) == null || E.call(this)), (V = this.keyframeResolver) == null || V.cancel();
2119
+ var k, V;
2120
+ this._animation && (this._animation.stop(), (k = this.stopTimeline) == null || k.call(this)), (V = this.keyframeResolver) == null || V.cancel();
2118
2121
  }, this.createdAt = ee.now();
2119
2122
  const g = v({
2120
2123
  autoplay: e,
@@ -2124,21 +2127,21 @@ class Ka extends pn {
2124
2127
  repeatDelay: s,
2125
2128
  repeatType: a,
2126
2129
  name: l,
2127
- motionValue: d,
2128
- element: u
2129
- }, h), b = (u == null ? void 0 : u.KeyframeResolver) || fn;
2130
- this.keyframeResolver = new b(o, (E, V, _) => this.onKeyframesResolved(E, V, g, !_), l, d, u), (y = this.keyframeResolver) == null || y.scheduleResolve();
2130
+ motionValue: u,
2131
+ element: d
2132
+ }, h), b = (d == null ? void 0 : d.KeyframeResolver) || fn;
2133
+ this.keyframeResolver = new b(o, (k, V, _) => this.onKeyframesResolved(k, V, g, !_), l, u, d), (y = this.keyframeResolver) == null || y.scheduleResolve();
2131
2134
  }
2132
2135
  onKeyframesResolved(e, t, i, r) {
2133
2136
  this.keyframeResolver = void 0;
2134
- const { name: s, type: a, velocity: o, delay: l, isHandoff: d, onUpdate: u } = i;
2135
- this.resolvedAt = ee.now(), Sa(e, s, a, o) || ((de.instantAnimations || !l) && (u == null || u(hn(e, i, t))), e[0] = e[e.length - 1], i.duration = 0, i.repeat = 0);
2137
+ const { name: s, type: a, velocity: o, delay: l, isHandoff: u, onUpdate: d } = i;
2138
+ this.resolvedAt = ee.now(), Sa(e, s, a, o) || ((de.instantAnimations || !l) && (d == null || d(hn(e, i, t))), e[0] = e[e.length - 1], i.duration = 0, i.repeat = 0);
2136
2139
  const h = r ? this.resolvedAt ? this.resolvedAt - this.createdAt > $a ? this.resolvedAt : this.createdAt : this.createdAt : void 0, m = I(v({
2137
2140
  startTime: h,
2138
2141
  finalKeyframe: t
2139
2142
  }, i), {
2140
2143
  keyframes: e
2141
- }), p = !d && za(m) ? new Oa(I(v({}, m), {
2144
+ }), p = !u && za(m) ? new Oa(I(v({}, m), {
2142
2145
  element: m.motionValue.owner.current
2143
2146
  })) : new mn(m);
2144
2147
  p.finished.then(() => this.notifyFinished()).catch(De), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
@@ -2194,14 +2197,14 @@ class Ka extends pn {
2194
2197
  }
2195
2198
  const Ji = (n, e, t, i = {}, r, s) => (a) => {
2196
2199
  const o = xi(i, n) || {}, l = o.delay || i.delay || 0;
2197
- let { elapsed: d = 0 } = i;
2198
- d = d - /* @__PURE__ */ ae(l);
2199
- const u = I(v({
2200
+ let { elapsed: u = 0 } = i;
2201
+ u = u - /* @__PURE__ */ ae(l);
2202
+ const d = I(v({
2200
2203
  keyframes: Array.isArray(t) ? t : [null, t],
2201
2204
  ease: "easeOut",
2202
2205
  velocity: e.getVelocity()
2203
2206
  }, o), {
2204
- delay: -d,
2207
+ delay: -u,
2205
2208
  onUpdate: (m) => {
2206
2209
  e.set(m), o.onUpdate && o.onUpdate(m);
2207
2210
  },
@@ -2212,18 +2215,18 @@ const Ji = (n, e, t, i = {}, r, s) => (a) => {
2212
2215
  motionValue: e,
2213
2216
  element: s ? void 0 : r
2214
2217
  });
2215
- xs(o) || Object.assign(u, Es(n, u)), u.duration && (u.duration = /* @__PURE__ */ ae(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ ae(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
2218
+ xs(o) || Object.assign(d, Es(n, d)), d.duration && (d.duration = /* @__PURE__ */ ae(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ae(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2216
2219
  let h = !1;
2217
- if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (h = !0)), (de.instantAnimations || de.skipAnimations) && (h = !0, u.duration = 0, u.delay = 0), u.allowFlatten = !o.type && !o.ease, h && !s && e.get() !== void 0) {
2218
- const m = bs(u.keyframes, o);
2220
+ if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (h = !0)), (de.instantAnimations || de.skipAnimations) && (h = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !o.type && !o.ease, h && !s && e.get() !== void 0) {
2221
+ const m = bs(d.keyframes, o);
2219
2222
  if (m !== void 0) {
2220
2223
  ue.update(() => {
2221
- u.onUpdate(m), u.onComplete();
2224
+ d.onUpdate(m), d.onComplete();
2222
2225
  });
2223
2226
  return;
2224
2227
  }
2225
2228
  }
2226
- return o.isSync ? new mn(u) : new Ka(u);
2229
+ return o.isSync ? new mn(d) : new Ka(d);
2227
2230
  }, Xi = /* @__PURE__ */ new Set([
2228
2231
  "width",
2229
2232
  "height",
@@ -2239,27 +2242,27 @@ function qa({ protectedKeys: n, needsAnimating: e }, t) {
2239
2242
  }
2240
2243
  function Ha(n, e, { delay: t = 0, transitionOverride: i, type: r } = {}) {
2241
2244
  var h;
2242
- let u = e, { transition: s = n.getDefaultTransition(), transitionEnd: a } = u, o = se(u, ["transition", "transitionEnd"]);
2245
+ let d = e, { transition: s = n.getDefaultTransition(), transitionEnd: a } = d, o = se(d, ["transition", "transitionEnd"]);
2243
2246
  i && (s = i);
2244
- const l = [], d = r && n.animationState && n.animationState.getState()[r];
2247
+ const l = [], u = r && n.animationState && n.animationState.getState()[r];
2245
2248
  for (const m in o) {
2246
2249
  const p = n.getValue(m, (h = n.latestValues[m]) != null ? h : null), g = o[m];
2247
- if (g === void 0 || d && qa(d, m))
2250
+ if (g === void 0 || u && qa(u, m))
2248
2251
  continue;
2249
2252
  const b = v({
2250
2253
  delay: t
2251
2254
  }, xi(s || {}, m)), y = p.get();
2252
2255
  if (y !== void 0 && !p.isAnimating && !Array.isArray(g) && g === y && !b.velocity)
2253
2256
  continue;
2254
- let E = !1;
2257
+ let k = !1;
2255
2258
  if (window.MotionHandoffAnimation) {
2256
2259
  const _ = fs(n);
2257
2260
  if (_) {
2258
2261
  const M = window.MotionHandoffAnimation(_, m, ue);
2259
- M !== null && (b.startTime = M, E = !0);
2262
+ M !== null && (b.startTime = M, k = !0);
2260
2263
  }
2261
2264
  }
2262
- hs(n, m), p.start(Ji(m, p, g, n.shouldReduceMotion && Xi.has(m) ? { type: !1 } : b, n, E));
2265
+ hs(n, m), p.start(Ji(m, p, g, n.shouldReduceMotion && Xi.has(m) ? { type: !1 } : b, n, k));
2263
2266
  const V = p.animation;
2264
2267
  V && l.push(V);
2265
2268
  }
@@ -2502,9 +2505,9 @@ class or {
2502
2505
  const p = ee.now();
2503
2506
  this.renderScheduledAt < p && (this.renderScheduledAt = p, ue.render(this.render, !1, !0));
2504
2507
  };
2505
- const { latestValues: l, renderState: d } = a;
2506
- this.latestValues = l, this.baseTarget = v({}, l), this.initialValues = t.initial ? v({}, l) : {}, this.renderState = d, this.parent = e, this.props = t, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.options = o, this.blockInitialAnimation = !!s, this.isControllingVariants = er(t), this.isVariantNode = to(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2507
- const m = this.scrapeMotionValuesFromProps(t, {}, this), { willChange: u } = m, h = se(m, ["willChange"]);
2508
+ const { latestValues: l, renderState: u } = a;
2509
+ this.latestValues = l, this.baseTarget = v({}, l), this.initialValues = t.initial ? v({}, l) : {}, this.renderState = u, this.parent = e, this.props = t, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.options = o, this.blockInitialAnimation = !!s, this.isControllingVariants = er(t), this.isVariantNode = to(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
2510
+ const m = this.scrapeMotionValuesFromProps(t, {}, this), { willChange: d } = m, h = se(m, ["willChange"]);
2508
2511
  for (const p in h) {
2509
2512
  const g = h[p];
2510
2513
  l[p] !== void 0 && J(g) && g.set(l[p], !1);
@@ -2727,10 +2730,10 @@ class vo extends fn {
2727
2730
  return;
2728
2731
  super.readKeyframes();
2729
2732
  for (let l = 0; l < e.length; l++) {
2730
- let d = e[l];
2731
- if (typeof d == "string" && (d = d.trim(), sn(d))) {
2732
- const u = lr(d, t.current);
2733
- u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = d);
2733
+ let u = e[l];
2734
+ if (typeof u == "string" && (u = u.trim(), sn(u))) {
2735
+ const d = lr(u, t.current);
2736
+ d !== void 0 && (e[l] = d), l === e.length - 1 && (this.finalKeyframe = u);
2734
2737
  }
2735
2738
  }
2736
2739
  if (this.resolveNoneKeyframes(), !Xi.has(i) || e.length !== 2)
@@ -2739,8 +2742,8 @@ class vo extends fn {
2739
2742
  if (a !== o)
2740
2743
  if (Bn(a) && Bn(o))
2741
2744
  for (let l = 0; l < e.length; l++) {
2742
- const d = e[l];
2743
- typeof d == "string" && (e[l] = parseFloat(d));
2745
+ const u = e[l];
2746
+ typeof u == "string" && (e[l] = parseFloat(u));
2744
2747
  }
2745
2748
  else ke[i] && (this.needsMeasurement = !0);
2746
2749
  }
@@ -2766,8 +2769,8 @@ class vo extends fn {
2766
2769
  const r = e.getValue(t);
2767
2770
  r && r.jump(this.measuredOrigin, !1);
2768
2771
  const s = i.length - 1, a = i[s];
2769
- i[s] = ke[t](e.measureViewportBox(), window.getComputedStyle(e.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), (o = this.removedTransforms) != null && o.length && this.removedTransforms.forEach(([l, d]) => {
2770
- e.getValue(l).set(d);
2772
+ i[s] = ke[t](e.measureViewportBox(), window.getComputedStyle(e.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), (o = this.removedTransforms) != null && o.length && this.removedTransforms.forEach(([l, u]) => {
2773
+ e.getValue(l).set(u);
2771
2774
  }), this.resolveNoneKeyframes();
2772
2775
  }
2773
2776
  }
@@ -2806,13 +2809,13 @@ function ko(n, e, t) {
2806
2809
  continue;
2807
2810
  let l = !0;
2808
2811
  if (typeof o == "number" ? l = o === (a.startsWith("scale") ? 1 : 0) : l = parseFloat(o) === 0, !l || t) {
2809
- const d = dr(o, vn[a]);
2812
+ const u = dr(o, vn[a]);
2810
2813
  if (!l) {
2811
2814
  r = !1;
2812
- const u = yo[a] || a;
2813
- i += `${u}(${d}) `;
2815
+ const d = yo[a] || a;
2816
+ i += `${d}(${u}) `;
2814
2817
  }
2815
- t && (e[a] = d);
2818
+ t && (e[a] = u);
2816
2819
  }
2817
2820
  }
2818
2821
  return i = i.trim(), t ? i = t(e, r ? "" : i) : r && (i = "none"), i;
@@ -2821,21 +2824,21 @@ function ur(n, e, t) {
2821
2824
  const { style: i, vars: r, transformOrigin: s } = n;
2822
2825
  let a = !1, o = !1;
2823
2826
  for (const l in e) {
2824
- const d = e[l];
2827
+ const u = e[l];
2825
2828
  if (Oe.has(l)) {
2826
2829
  a = !0;
2827
2830
  continue;
2828
2831
  } else if (Ti(l)) {
2829
- r[l] = d;
2832
+ r[l] = u;
2830
2833
  continue;
2831
2834
  } else {
2832
- const u = dr(d, vn[l]);
2833
- l.startsWith("origin") ? (o = !0, s[l] = u) : i[l] = u;
2835
+ const d = dr(u, vn[l]);
2836
+ l.startsWith("origin") ? (o = !0, s[l] = d) : i[l] = d;
2834
2837
  }
2835
2838
  }
2836
2839
  if (e.transform || (a || t ? i.transform = ko(e, n.transform, t) : i.transform && (i.transform = "none")), o) {
2837
- const { originX: l = "50%", originY: d = "50%", originZ: u = 0 } = s;
2838
- i.transformOrigin = `${l} ${d} ${u}`;
2840
+ const { originX: l = "50%", originY: u = "50%", originZ: d = 0 } = s;
2841
+ i.transformOrigin = `${l} ${u} ${d}`;
2839
2842
  }
2840
2843
  }
2841
2844
  function hr(n, { style: e, vars: t }, i, r) {
@@ -2926,7 +2929,7 @@ function Io(n, e, t = 1, i = 0, r = !0) {
2926
2929
  const a = L.transform(e), o = L.transform(t);
2927
2930
  n[s.array] = `${a} ${o}`;
2928
2931
  }
2929
- function Mo(n, h, l, d, u) {
2932
+ function Mo(n, h, l, u, d) {
2930
2933
  var m = h, {
2931
2934
  attrX: e,
2932
2935
  attrY: t,
@@ -2943,13 +2946,13 @@ function Mo(n, h, l, d, u) {
2943
2946
  "pathOffset"
2944
2947
  ]);
2945
2948
  var b, y;
2946
- if (ur(n, o, d), l) {
2949
+ if (ur(n, o, u), l) {
2947
2950
  n.style.viewBox && (n.attrs.viewBox = n.style.viewBox);
2948
2951
  return;
2949
2952
  }
2950
2953
  n.attrs = n.style, n.style = {};
2951
2954
  const { attrs: p, style: g } = n;
2952
- p.transform && (g.transform = p.transform, delete p.transform), (g.transform || p.transformOrigin) && (g.transformOrigin = (b = p.transformOrigin) != null ? b : "50% 50%", delete p.transformOrigin), g.transform && (g.transformBox = (y = u == null ? void 0 : u.transformBox) != null ? y : "fill-box", delete p.transformBox), e !== void 0 && (p.x = e), t !== void 0 && (p.y = t), i !== void 0 && (p.scale = i), r !== void 0 && Io(p, r, s, a, !1);
2955
+ p.transform && (g.transform = p.transform, delete p.transform), (g.transform || p.transformOrigin) && (g.transformOrigin = (b = p.transformOrigin) != null ? b : "50% 50%", delete p.transformOrigin), g.transform && (g.transformBox = (y = d == null ? void 0 : d.transformBox) != null ? y : "fill-box", delete p.transformBox), e !== void 0 && (p.x = e), t !== void 0 && (p.y = t), i !== void 0 && (p.scale = i), r !== void 0 && Io(p, r, s, a, !1);
2953
2956
  }
2954
2957
  const mr = /* @__PURE__ */ new Set([
2955
2958
  "baseFrequency",
@@ -3068,10 +3071,10 @@ function gr(n, e, t, i) {
3068
3071
  const s = hi(n, e, i), a = s.length;
3069
3072
  ce(!!a, "No valid elements provided.");
3070
3073
  for (let o = 0; o < a; o++) {
3071
- const l = s[o], d = l instanceof Element ? So : Fo;
3072
- Je.has(l) || d(l);
3073
- const u = Je.get(l), h = v({}, t);
3074
- "delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, a)), r.push(...Ha(u, I(v({}, e), { transition: h }), {}));
3074
+ const l = s[o], u = l instanceof Element ? So : Fo;
3075
+ Je.has(l) || u(l);
3076
+ const d = Je.get(l), h = v({}, t);
3077
+ "delay" in h && typeof h.delay == "function" && (h.delay = h.delay(o, a)), r.push(...Ha(d, I(v({}, e), { transition: h }), {}));
3075
3078
  }
3076
3079
  }
3077
3080
  return r;
@@ -3184,7 +3187,7 @@ class br {
3184
3187
  constructor() {
3185
3188
  c(this, "template", `
3186
3189
  <svg class="${S.spinner}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 215 215" fill="none">
3187
- <path d="M214.476 107.728C214.476 132.466 205.898 156.439 190.204 175.562C174.51 194.686 152.671 207.775 128.408 212.602C104.144 217.428 78.9585 213.692 57.141 202.03C35.3236 190.369 18.2247 171.503 8.75763 148.647C-0.709393 125.792 -1.95874 100.361 5.22248 76.6878C12.4037 53.0145 27.5711 32.5636 48.1405 18.8196C68.7098 5.07558 93.4083 -1.11108 118.028 1.31372C142.647 3.73851 165.664 14.6247 183.157 32.1175L168.035 47.2395C154.041 33.2453 135.627 24.5363 115.932 22.5965C96.236 20.6566 76.4772 25.606 60.0217 36.6012C43.5663 47.5964 31.4323 63.9571 25.6874 82.8957C19.9424 101.834 20.9419 122.179 28.5155 140.463C36.0891 158.748 49.7683 173.84 67.2222 183.17C84.6761 192.499 104.825 195.488 124.235 191.627C143.646 187.766 161.117 177.294 173.672 161.995C186.228 146.697 193.09 127.518 193.09 107.728L214.476 107.728Z" fill="white"/>
3190
+ <path d="M214.476 107.728C214.476 132.466 205.898 156.439 190.204 175.562C174.51 194.686 152.671 207.775 128.408 212.602C104.144 217.428 78.9585 213.692 57.141 202.03C35.3236 190.369 18.2247 171.503 8.75763 148.647C-0.709393 125.792 -1.95874 100.361 5.22248 76.6878C12.4037 53.0145 27.5711 32.5636 48.1405 18.8196C68.7098 5.07558 93.4083 -1.11108 118.028 1.31372C142.647 3.73851 165.664 14.6247 183.157 32.1175L168.035 47.2395C154.041 33.2453 135.627 24.5363 115.932 22.5965C96.236 20.6566 76.4772 25.606 60.0217 36.6012C43.5663 47.5964 31.4323 63.9571 25.6874 82.8957C19.9424 101.834 20.9419 122.179 28.5155 140.463C36.0891 158.748 49.7683 173.84 67.2222 183.17C84.6761 192.499 104.825 195.488 124.235 191.627C143.646 187.766 161.117 177.294 173.672 161.995C186.228 146.697 193.09 127.518 193.09 107.728L214.476 107.728Z" fill="currentColor"/>
3188
3191
  </svg>
3189
3192
 
3190
3193
  <span class="${S.srOnly}">Loading...</span>
@@ -3463,8 +3466,8 @@ function fl() {
3463
3466
  for (a = 0; a < r.patterns.length; a++) {
3464
3467
  var l = r.patterns[a];
3465
3468
  if ((0, e.matches)(i, l)) {
3466
- var d = (0, n.clone)(r);
3467
- Array.isArray(l) ? o = String(l[0]).length : o = String(l).length, i.length >= o && (d.matchStrength = o), s.push(d);
3469
+ var u = (0, n.clone)(r);
3470
+ Array.isArray(l) ? o = String(l[0]).length : o = String(l).length, i.length >= o && (u.matchStrength = o), s.push(u);
3468
3471
  break;
3469
3472
  }
3470
3473
  }
@@ -3503,7 +3506,7 @@ function vl() {
3503
3506
  ni = 1;
3504
3507
  var n = He && He.__assign || function() {
3505
3508
  return n = Object.assign || function(g) {
3506
- for (var b, y = 1, E = arguments.length; y < E; y++) {
3509
+ for (var b, y = 1, k = arguments.length; y < k; y++) {
3507
3510
  b = arguments[y];
3508
3511
  for (var V in b) Object.prototype.hasOwnProperty.call(b, V) && (g[V] = b[V]);
3509
3512
  }
@@ -3535,18 +3538,18 @@ function vl() {
3535
3538
  o.MIR,
3536
3539
  o.HIPER,
3537
3540
  o.HIPERCARD
3538
- ], d = (0, s.clone)(l);
3539
- function u(g) {
3541
+ ], u = (0, s.clone)(l);
3542
+ function d(g) {
3540
3543
  return a[g] || e[g];
3541
3544
  }
3542
3545
  function h() {
3543
- return d.map(function(g) {
3544
- return (0, s.clone)(u(g));
3546
+ return u.map(function(g) {
3547
+ return (0, s.clone)(d(g));
3545
3548
  });
3546
3549
  }
3547
3550
  function m(g, b) {
3548
3551
  b === void 0 && (b = !1);
3549
- var y = d.indexOf(g);
3552
+ var y = u.indexOf(g);
3550
3553
  if (!b && y === -1)
3551
3554
  throw new Error('"' + g + '" is not a supported card type.');
3552
3555
  return y;
@@ -3557,34 +3560,34 @@ function vl() {
3557
3560
  return b;
3558
3561
  if (g.length === 0)
3559
3562
  return h();
3560
- d.forEach(function(E) {
3561
- var V = u(E);
3563
+ u.forEach(function(k) {
3564
+ var V = d(k);
3562
3565
  (0, t.addMatchingCardsToResults)(g, V, b);
3563
3566
  });
3564
3567
  var y = (0, r.findBestMatch)(b);
3565
3568
  return y ? [y] : b;
3566
3569
  }
3567
3570
  return p.getTypeInfo = function(g) {
3568
- return (0, s.clone)(u(g));
3571
+ return (0, s.clone)(d(g));
3569
3572
  }, p.removeCard = function(g) {
3570
3573
  var b = m(g);
3571
- d.splice(b, 1);
3574
+ u.splice(b, 1);
3572
3575
  }, p.addCard = function(g) {
3573
3576
  var b = m(g.type, !0);
3574
- a[g.type] = g, b === -1 && d.push(g.type);
3577
+ a[g.type] = g, b === -1 && u.push(g.type);
3575
3578
  }, p.updateCard = function(g, b) {
3576
3579
  var y = a[g] || e[g];
3577
3580
  if (!y)
3578
3581
  throw new Error('"'.concat(g, "\" is not a recognized type. Use `addCard` instead.'"));
3579
3582
  if (b.type && y.type !== b.type)
3580
3583
  throw new Error("Cannot overwrite type parameter.");
3581
- var E = (0, s.clone)(y);
3582
- E = n(n({}, E), b), a[E.type] = E;
3584
+ var k = (0, s.clone)(y);
3585
+ k = n(n({}, k), b), a[k.type] = k;
3583
3586
  }, p.changeOrder = function(g, b) {
3584
3587
  var y = m(g);
3585
- d.splice(y, 1), d.splice(b, 0, g);
3588
+ u.splice(y, 1), u.splice(b, 0, g);
3586
3589
  }, p.resetModifications = function() {
3587
- d = (0, s.clone)(l), a = {};
3590
+ u = (0, s.clone)(l), a = {};
3588
3591
  }, p.types = o, He = p, He;
3589
3592
  }
3590
3593
  var Pe = vl();
@@ -3597,8 +3600,8 @@ Pe.updateCard("unionpay", {
3597
3600
  const yl = (n, e) => {
3598
3601
  const t = Pe.getTypeInfo(e), i = n.replace(/\D/g, ""), r = (t == null ? void 0 : t.gaps) || [4, 8, 12], s = t ? Math.max(...t.lengths) + r.length : 19, a = [0].concat(r, i.length), o = [];
3599
3602
  for (let l = 0; a[l] < i.length; l++) {
3600
- const d = a[l], u = Math.min(a[l + 1], i.length);
3601
- o.push(i.slice(d, u));
3603
+ const u = a[l], d = Math.min(a[l + 1], i.length);
3604
+ o.push(i.slice(u, d));
3602
3605
  }
3603
3606
  return o.join(" ").slice(0, s);
3604
3607
  }, Cl = (n, e) => {
@@ -3916,7 +3919,7 @@ function Nl() {
3916
3919
  switch (f) {
3917
3920
  case b:
3918
3921
  return "Fragment";
3919
- case E:
3922
+ case k:
3920
3923
  return "Profiler";
3921
3924
  case y:
3922
3925
  return "StrictMode";
@@ -4014,7 +4017,7 @@ function Nl() {
4014
4017
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
4015
4018
  )), f = this.props.ref, f !== void 0 ? f : null;
4016
4019
  }
4017
- function d(f, P, N, H, ie, X, Ae, _e) {
4020
+ function u(f, P, N, H, ie, X, Ae, _e) {
4018
4021
  return N = X.ref, f = {
4019
4022
  $$typeof: p,
4020
4023
  type: f,
@@ -4046,7 +4049,7 @@ function Nl() {
4046
4049
  value: _e
4047
4050
  }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
4048
4051
  }
4049
- function u(f, P, N, H, ie, X, Ae, _e) {
4052
+ function d(f, P, N, H, ie, X, Ae, _e) {
4050
4053
  var z = P.children;
4051
4054
  if (z !== void 0)
4052
4055
  if (H)
@@ -4085,7 +4088,7 @@ React keys must be passed directly to JSX without using spread:
4085
4088
  return z && o(
4086
4089
  N,
4087
4090
  typeof f == "function" ? f.displayName || f.name || "Unknown" : f
4088
- ), d(
4091
+ ), u(
4089
4092
  f,
4090
4093
  z,
4091
4094
  X,
@@ -4099,7 +4102,7 @@ React keys must be passed directly to JSX without using spread:
4099
4102
  function h(f) {
4100
4103
  typeof f == "object" && f !== null && f.$$typeof === p && f._store && (f._store.validated = 1);
4101
4104
  }
4102
- var m = xr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), K = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Te = Object.prototype.hasOwnProperty, te = Array.isArray, fe = console.createTask ? console.createTask : function() {
4105
+ var m = xr, p = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), V = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), R = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), K = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Te = Object.prototype.hasOwnProperty, te = Array.isArray, fe = console.createTask ? console.createTask : function() {
4103
4106
  return null;
4104
4107
  };
4105
4108
  m = {
@@ -4113,7 +4116,7 @@ React keys must be passed directly to JSX without using spread:
4113
4116
  )(), at = fe(i(s)), ne = {};
4114
4117
  Ye.Fragment = b, Ye.jsx = function(f, P, N, H, ie) {
4115
4118
  var X = 1e4 > K.recentlyCreatedOwnerStacks++;
4116
- return u(
4119
+ return d(
4117
4120
  f,
4118
4121
  P,
4119
4122
  N,
@@ -4125,7 +4128,7 @@ React keys must be passed directly to JSX without using spread:
4125
4128
  );
4126
4129
  }, Ye.jsxs = function(f, P, N, H, ie) {
4127
4130
  var X = 1e4 > K.recentlyCreatedOwnerStacks++;
4128
- return u(
4131
+ return d(
4129
4132
  f,
4130
4133
  P,
4131
4134
  N,
@@ -4168,20 +4171,20 @@ class jl {
4168
4171
  this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.ev = this.config.service.ev, this.customButtonStyles = t, this.element = document.createElement("div"), this.element.classList.add(Lt.applePay, Lt.hidden);
4169
4172
  }
4170
4173
  init(e) {
4171
- return k(this, null, function* () {
4174
+ return E(this, null, function* () {
4172
4175
  if (!this.config) return !1;
4173
4176
  const t = this.config.state.transaction.getState(), i = this.config.state.translate.locale(), r = Il(t);
4174
4177
  if (!r)
4175
4178
  return !1;
4176
4179
  const s = e ? I(v({}, e), {
4177
4180
  onError: (a) => {
4178
- var l, d;
4181
+ var l, u;
4179
4182
  if (!this.isInitialized) {
4180
4183
  console.error("Apple Pay error:", a);
4181
4184
  return;
4182
4185
  }
4183
4186
  const o = this.config.state.translate.messages();
4184
- a != null && a.toLowerCase().includes("cancelled") ? (l = e.onCancel) == null || l.call(e) : (vt(a, o), (d = e.onError) == null || d.call(e, a));
4187
+ a != null && a.toLowerCase().includes("cancelled") ? (l = e.onCancel) == null || l.call(e) : (vt(a, o), (u = e.onError) == null || u.call(e, a));
4185
4188
  },
4186
4189
  onSuccess: (a) => {
4187
4190
  var o;
@@ -4245,7 +4248,7 @@ class Kl {
4245
4248
  this.config = e, this.ev = this.config.service.ev, this.customButtonStyles = this.config.state.styles.getState().GooglePayButton, this.onPaymentAttempt = this.config.state.checkout.getState().onCheckoutAttempt, this.element = document.createElement("div"), this.element.classList.add(It.googlePay, It.hidden);
4246
4249
  }
4247
4250
  init(e) {
4248
- return k(this, null, function* () {
4251
+ return E(this, null, function* () {
4249
4252
  if (!this.config) return !1;
4250
4253
  const t = this.config.state.transaction.getState(), i = this.config.state.translate.locale(), r = Vl(t);
4251
4254
  if (!r)
@@ -4301,11 +4304,11 @@ class Gl {
4301
4304
  }
4302
4305
  // init
4303
4306
  init(e) {
4304
- return k(this, null, function* () {
4307
+ return E(this, null, function* () {
4305
4308
  var a, o;
4306
4309
  if (!this.config)
4307
4310
  return !1;
4308
- const t = this.config.state.transaction.getState(), i = this.config.state.checkout.getState(), r = () => k(this, null, function* () {
4311
+ const t = this.config.state.transaction.getState(), i = this.config.state.checkout.getState(), r = () => E(this, null, function* () {
4309
4312
  try {
4310
4313
  return yield Dr(i.clientToken, i.environment, i.apiVersion);
4311
4314
  } catch (l) {
@@ -4330,20 +4333,20 @@ class Gl {
4330
4333
  }
4331
4334
  const s = e ? I(v({}, e), {
4332
4335
  onError: (l) => {
4333
- var u, h;
4336
+ var d, h;
4334
4337
  if (this.emitAttemptOnce(), !this.isInitialized) {
4335
4338
  console.error("PayPal error:", l);
4336
4339
  return;
4337
4340
  }
4338
- !this.isUserCancellationError(l) && l ? (u = e.onError) == null || u.call(e, l) : (h = e.onCancel) == null || h.call(e), this.attemptEmitted = !1;
4341
+ !this.isUserCancellationError(l) && l ? (d = e.onError) == null || d.call(e, l) : (h = e.onCancel) == null || h.call(e), this.attemptEmitted = !1;
4339
4342
  },
4340
4343
  onCancel: () => {
4341
4344
  var l;
4342
4345
  this.emitAttemptOnce(), (l = e.onCancel) == null || l.call(e), this.attemptEmitted = !1;
4343
4346
  },
4344
4347
  onSuccess: (l) => {
4345
- var d;
4346
- (d = e.onSuccess) == null || d.call(e, l), this.attemptEmitted = !1;
4348
+ var u;
4349
+ (u = e.onSuccess) == null || u.call(e, l), this.attemptEmitted = !1;
4347
4350
  }
4348
4351
  }) : void 0;
4349
4352
  try {
@@ -4352,9 +4355,9 @@ class Gl {
4352
4355
  onClick: () => {
4353
4356
  this.emitAttemptOnce();
4354
4357
  },
4355
- onApprove: (d) => k(this, [d], function* ({ billingToken: l }) {
4356
- var u;
4357
- (u = s == null ? void 0 : s.onSuccess) == null || u.call(s, l || "");
4358
+ onApprove: (u) => E(this, [u], function* ({ billingToken: l }) {
4359
+ var d;
4360
+ (d = s == null ? void 0 : s.onSuccess) == null || d.call(s, l || "");
4358
4361
  }),
4359
4362
  style: (o = this.customButtonStyles) == null ? void 0 : o.styles,
4360
4363
  onCancel: () => {
@@ -4362,9 +4365,9 @@ class Gl {
4362
4365
  (l = s == null ? void 0 : s.onCancel) == null || l.call(s);
4363
4366
  },
4364
4367
  onError: (l) => {
4365
- var u, h;
4366
- const d = this.isUserCancellationError(l);
4367
- !d && l ? (u = s == null ? void 0 : s.onError) == null || u.call(s, l) : d && ((h = s == null ? void 0 : s.onCancel) == null || h.call(s));
4368
+ var d, h;
4369
+ const u = this.isUserCancellationError(l);
4370
+ !u && l ? (d = s == null ? void 0 : s.onError) == null || d.call(s, l) : u && ((h = s == null ? void 0 : s.onCancel) == null || h.call(s));
4368
4371
  }
4369
4372
  }));
4370
4373
  } catch (l) {
@@ -4493,7 +4496,7 @@ class nc {
4493
4496
  }
4494
4497
  // init
4495
4498
  init(e) {
4496
- return k(this, null, function* () {
4499
+ return E(this, null, function* () {
4497
4500
  var i;
4498
4501
  if (!this.config) return !1;
4499
4502
  const t = this.config.state.transaction.getState();
@@ -4513,7 +4516,7 @@ class nc {
4513
4516
  }
4514
4517
  // display venmo button
4515
4518
  displayVenmoButton(e) {
4516
- Object.assign(this.venmoButton.style, ec), this.venmoButton.addEventListener("click", () => k(this, null, function* () {
4519
+ Object.assign(this.venmoButton.style, ec), this.venmoButton.addEventListener("click", () => E(this, null, function* () {
4517
4520
  if (this.events.onPaymentAttempt.emit(x.VENMO), !this.isProcessing) {
4518
4521
  this.isProcessing = !0, this.venmoButton.disabled = !0;
4519
4522
  try {
@@ -4529,7 +4532,7 @@ class nc {
4529
4532
  }
4530
4533
  // handle existing tokenization results
4531
4534
  handleExistingTokenization(e) {
4532
- return k(this, null, function* () {
4535
+ return E(this, null, function* () {
4533
4536
  try {
4534
4537
  const t = yield this.braintree.tokenize();
4535
4538
  this.handleVenmoSuccess(t, e);
@@ -4545,8 +4548,8 @@ class nc {
4545
4548
  }
4546
4549
  // handle venmo errors
4547
4550
  handleVenmoError(e, t) {
4548
- var i;
4549
- this.isInitialized && ((i = t == null ? void 0 : t.onError) == null || i.call(t, e));
4551
+ var i, r, s;
4552
+ this.isInitialized && ((i = e == null ? void 0 : e.message) != null && i.toLowerCase().includes("close") ? (r = t == null ? void 0 : t.onCancel) == null || r.call(t) : (s = t == null ? void 0 : t.onError) == null || s.call(t, e));
4550
4553
  }
4551
4554
  // add event listener
4552
4555
  addEventListener(e, t) {
@@ -4578,7 +4581,7 @@ class ic {
4578
4581
  }
4579
4582
  // init
4580
4583
  init() {
4581
- return k(this, null, function* () {
4584
+ return E(this, null, function* () {
4582
4585
  this.config.state.transaction.subscribe(() => {
4583
4586
  this.config.service.ev.isReady && this.initPaymentMethods().catch(console.error);
4584
4587
  }), this.config.state.checkout.subscribe(() => {
@@ -4590,7 +4593,7 @@ class ic {
4590
4593
  }
4591
4594
  // init apple
4592
4595
  initApple(e) {
4593
- return k(this, null, function* () {
4596
+ return E(this, null, function* () {
4594
4597
  if (!this.applePay) {
4595
4598
  e == null || e.remove();
4596
4599
  return;
@@ -4629,7 +4632,7 @@ class ic {
4629
4632
  }
4630
4633
  // init google
4631
4634
  initGoogle(e) {
4632
- return k(this, null, function* () {
4635
+ return E(this, null, function* () {
4633
4636
  if (!this.googlePay) {
4634
4637
  e == null || e.remove();
4635
4638
  return;
@@ -4668,7 +4671,7 @@ class ic {
4668
4671
  }
4669
4672
  // init paypal
4670
4673
  initPayPal(e) {
4671
- return k(this, null, function* () {
4674
+ return E(this, null, function* () {
4672
4675
  if (!this.paypal) {
4673
4676
  e == null || e.remove();
4674
4677
  return;
@@ -4694,7 +4697,7 @@ class ic {
4694
4697
  }
4695
4698
  // init braintree
4696
4699
  initBraintreeVenmo(e) {
4697
- return k(this, null, function* () {
4700
+ return E(this, null, function* () {
4698
4701
  if (!this.braintree) {
4699
4702
  e == null || e.remove();
4700
4703
  return;
@@ -4721,7 +4724,7 @@ class ic {
4721
4724
  }
4722
4725
  // init card
4723
4726
  initCard(e) {
4724
- return k(this, null, function* () {
4727
+ return E(this, null, function* () {
4725
4728
  if (!this.card) {
4726
4729
  e == null || e.remove();
4727
4730
  return;
@@ -4731,7 +4734,7 @@ class ic {
4731
4734
  }
4732
4735
  // init payment methods
4733
4736
  initPaymentMethods() {
4734
- return k(this, null, function* () {
4737
+ return E(this, null, function* () {
4735
4738
  const e = this.config.state.transaction.getState(), t = Zl(Bl, (e == null ? void 0 : e.checkout_config) || [], (a, o) => a.type === o.type), i = this.config.state.checkout.getState();
4736
4739
  let r = t.filter(({ is_active: a }) => a);
4737
4740
  (i == null ? void 0 : i.variant) === "default" && (r = r.filter(({ type: a }) => a !== x.CARD));
@@ -4745,13 +4748,13 @@ class ic {
4745
4748
  i && !this.applePay && (this.applePay = new jl(this.config)), r && !this.googlePay && (this.googlePay = new Kl(this.config)), s && !this.paypal && (this.paypal = new Gl(this.config), this.paypal.addEventListener("onPaymentAttempt", (h) => this.events.onPaymentAttempt.emit(h))), a && !this.braintree && (this.braintree = new nc(this.config), this.braintree.addEventListener("onPaymentAttempt", (h) => this.events.onPaymentAttempt.emit(h))), o && !this.card && (this.card = new Wl(this.config), this.card.addEventListener(() => {
4746
4749
  this.events.open.emit();
4747
4750
  }));
4748
- const l = e.sort((h, m) => h.order - m.order), d = /* @__PURE__ */ new Map();
4751
+ const l = e.sort((h, m) => h.order - m.order), u = /* @__PURE__ */ new Map();
4749
4752
  for (const { type: h } of l) {
4750
4753
  const m = document.createElement("div");
4751
- this.buttons.appendChild(m), d.set(h, m);
4754
+ this.buttons.appendChild(m), u.set(h, m);
4752
4755
  }
4753
4756
  return l.map(({ type: h }) => {
4754
- const m = d.get(h);
4757
+ const m = u.get(h);
4755
4758
  if (h === x.APPLE_PAY && this.applePay)
4756
4759
  return this.initApple(m);
4757
4760
  if (h === x.GOOGLE_PAY && this.googlePay)
@@ -4905,13 +4908,13 @@ class Tc {
4905
4908
  c(this, "events", {
4906
4909
  change: new q()
4907
4910
  });
4908
- var r, s, a, o, l, d, u, h, m;
4911
+ var r, s, a, o, l, u, d, h, m;
4909
4912
  const i = e.messages();
4910
4913
  if (this.element = document.createElement("div"), this.element.classList.add($.wrapper), this.inputContainer.classList.add($.inputContainer), (r = t == null ? void 0 : t.container) != null && r.className && F(this.inputContainer, t.container.className), (s = t == null ? void 0 : t.container) != null && s.styles && Object.assign(this.inputContainer.style, t.container.styles), this.input.setAttribute("id", this.id), this.input.setAttribute("autocomplete", "cc-name"), this.input.setAttribute("placeholder", i.card.name.placeholder), this.input.classList.add($.input), (a = t == null ? void 0 : t.field) != null && a.className && F(this.input, t.field.className), (o = t == null ? void 0 : t.field) != null && o.styles && Object.assign(this.input.style, t.field.styles), (l = t == null ? void 0 : t.placeholder) != null && l.styles && Object.keys(t.placeholder.styles).length) {
4911
4914
  const p = (b) => b.replace(/[A-Z]/g, (y) => "-" + y.toLowerCase()), g = Object.entries(t.placeholder.styles).map(([b, y]) => `${p(b)}:${y};`).join("");
4912
4915
  this.placeholderStyle.textContent = `#${this.id}::placeholder{${g}}`, this.element.appendChild(this.placeholderStyle);
4913
4916
  }
4914
- this.endContent.classList.add($.hidden), this.endContent.appendChild(this.warning.render()), this.inputContainer.append(this.input, this.endContent), this.label.setAttribute("for", this.id), this.label.classList.add($.label), (d = t == null ? void 0 : t.label) != null && d.className && F(this.label, t.label.className), (u = t == null ? void 0 : t.label) != null && u.styles && Object.assign(this.label.style, t.label.styles), this.labelText.textContent = i.card.name.label, this.labelError.textContent = i.card.required, this.labelError.classList.add($.labelError, $.hidden), (h = t == null ? void 0 : t.error) != null && h.className && F(this.labelError, t.error.className), (m = t == null ? void 0 : t.error) != null && m.styles && Object.assign(this.labelError.style, t.error.styles), this.label.append(this.labelText, this.labelError), this.element.append(this.label, this.inputContainer), this.input.addEventListener("input", () => this.handleChange(this.input.value)), this.input.addEventListener("paste", () => this.handleChange(this.input.value)), this.input.addEventListener("blur", () => this.validate(this.input.value)), e.subscribe(({ messages: p }) => {
4917
+ this.endContent.classList.add($.hidden), this.endContent.appendChild(this.warning.render()), this.inputContainer.append(this.input, this.endContent), this.label.setAttribute("for", this.id), this.label.classList.add($.label), (u = t == null ? void 0 : t.label) != null && u.className && F(this.label, t.label.className), (d = t == null ? void 0 : t.label) != null && d.styles && Object.assign(this.label.style, t.label.styles), this.labelText.textContent = i.card.name.label, this.labelError.textContent = i.card.required, this.labelError.classList.add($.labelError, $.hidden), (h = t == null ? void 0 : t.error) != null && h.className && F(this.labelError, t.error.className), (m = t == null ? void 0 : t.error) != null && m.styles && Object.assign(this.labelError.style, t.error.styles), this.label.append(this.labelText, this.labelError), this.element.append(this.label, this.inputContainer), this.input.addEventListener("input", () => this.handleChange(this.input.value)), this.input.addEventListener("paste", () => this.handleChange(this.input.value)), this.input.addEventListener("blur", () => this.validate(this.input.value)), e.subscribe(({ messages: p }) => {
4915
4918
  this.input.setAttribute("placeholder", p.card.name.placeholder), this.labelText.textContent = p.card.name.label, this.labelError.textContent = p.card.required;
4916
4919
  });
4917
4920
  }
@@ -4930,7 +4933,7 @@ class Tc {
4930
4933
  }), this.render();
4931
4934
  }
4932
4935
  toggleLabelError(e) {
4933
- return k(this, null, function* () {
4936
+ return E(this, null, function* () {
4934
4937
  if (e) {
4935
4938
  this.inputContainer.classList.add($.errorInput), this.endContent.classList.remove($.hidden), this.labelError.classList.remove($.hidden), yield G(this.labelError, W.open, W.transition);
4936
4939
  return;
@@ -5110,11 +5113,11 @@ class Bc {
5110
5113
  c(this, "events", {
5111
5114
  change: new q()
5112
5115
  });
5113
- var r, s, a, o, l, d, u, h, m;
5116
+ var r, s, a, o, l, u, d, h, m;
5114
5117
  this.translate = e;
5115
5118
  const i = e.messages();
5116
5119
  if (this.element = document.createElement("div"), this.element.classList.add(j.wrapper), this.inputContainer.classList.add(j.inputContainer), (r = t == null ? void 0 : t.container) != null && r.className && F(this.inputContainer, t.container.className), (s = t == null ? void 0 : t.container) != null && s.styles && Object.assign(this.inputContainer.style, t.container.styles), this.input.setAttribute("id", this.id), this.input.setAttribute("autocomplete", "cc-number"), this.input.setAttribute("placeholder", "1234 1234 1234 1234"), this.input.setAttribute("inputmode", "numeric"), this.input.setAttribute("pattern", "[0-9]*"), this.input.setAttribute("enterkeyhint", "done"), this.input.classList.add(j.input), (a = t == null ? void 0 : t.field) != null && a.className && F(this.input, t.field.className), (o = t == null ? void 0 : t.field) != null && o.styles && Object.assign(this.input.style, t.field.styles), (l = t == null ? void 0 : t.placeholder) != null && l.styles && Object.keys(t.placeholder.styles).length) {
5117
- const p = (y) => y.replace(/[A-Z]/g, (E) => "-" + E.toLowerCase()), g = Object.entries(t.placeholder.styles).map(([y, E]) => `${p(y)}:${E} !important;`).join(""), b = `#${this.id}`;
5120
+ const p = (y) => y.replace(/[A-Z]/g, (k) => "-" + k.toLowerCase()), g = Object.entries(t.placeholder.styles).map(([y, k]) => `${p(y)}:${k} !important;`).join(""), b = `#${this.id}`;
5118
5121
  this.placeholderStyle.textContent = `${b}::placeholder{${g}}
5119
5122
  ${b}::-webkit-input-placeholder{${g}}
5120
5123
  ${b}::-moz-placeholder{${g}}
@@ -5122,7 +5125,7 @@ ${b}:-ms-input-placeholder{${g}}
5122
5125
  ${b}::-ms-input-placeholder{${g}}
5123
5126
  `, document.head.appendChild(this.placeholderStyle);
5124
5127
  }
5125
- this.endContent.classList.add(j.endContent), this.endContent.append(...this.getCardIcons()), this.inputContainer.append(this.input, this.endContent), this.label.setAttribute("for", this.id), this.label.classList.add(j.label), (d = t == null ? void 0 : t.label) != null && d.className && F(this.label, t.label.className), (u = t == null ? void 0 : t.label) != null && u.styles && Object.assign(this.label.style, t.label.styles), this.labelText.textContent = i.card.number.label, this.labelError.textContent = i.card.required, this.labelError.classList.add(j.labelError, j.hidden), (h = t == null ? void 0 : t.error) != null && h.className && F(this.labelError, t.error.className), (m = t == null ? void 0 : t.error) != null && m.styles && Object.assign(this.labelError.style, t.error.styles), this.label.append(this.labelText, this.labelError), this.error.classList.add(j.error, j.hidden), this.element.append(this.label, this.inputContainer, this.error), this.input.addEventListener("keydown", (p) => {
5128
+ this.endContent.classList.add(j.endContent), this.endContent.append(...this.getCardIcons()), this.inputContainer.append(this.input, this.endContent), this.label.setAttribute("for", this.id), this.label.classList.add(j.label), (u = t == null ? void 0 : t.label) != null && u.className && F(this.label, t.label.className), (d = t == null ? void 0 : t.label) != null && d.styles && Object.assign(this.label.style, t.label.styles), this.labelText.textContent = i.card.number.label, this.labelError.textContent = i.card.required, this.labelError.classList.add(j.labelError, j.hidden), (h = t == null ? void 0 : t.error) != null && h.className && F(this.labelError, t.error.className), (m = t == null ? void 0 : t.error) != null && m.styles && Object.assign(this.labelError.style, t.error.styles), this.label.append(this.labelText, this.labelError), this.error.classList.add(j.error, j.hidden), this.element.append(this.label, this.inputContainer, this.error), this.input.addEventListener("keydown", (p) => {
5126
5129
  this.isDisabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "Home", "End"].includes(p.key) || p.ctrlKey || p.metaKey || /^\d$/.test(p.key) || p.preventDefault();
5127
5130
  }), this.input.addEventListener("input", (p) => {
5128
5131
  p.stopPropagation();
@@ -5149,7 +5152,7 @@ ${b}::-ms-input-placeholder{${g}}
5149
5152
  }), this.render();
5150
5153
  }
5151
5154
  toggleLabelError(e) {
5152
- return k(this, null, function* () {
5155
+ return E(this, null, function* () {
5153
5156
  if (e) {
5154
5157
  this.inputContainer.classList.add(j.errorInput), this.labelError.classList.remove(j.hidden), yield G(this.labelError, W.open, W.transition);
5155
5158
  return;
@@ -5158,7 +5161,7 @@ ${b}::-ms-input-placeholder{${g}}
5158
5161
  });
5159
5162
  }
5160
5163
  toggleErrorMessage(e) {
5161
- return k(this, null, function* () {
5164
+ return E(this, null, function* () {
5162
5165
  if (e) {
5163
5166
  this.inputContainer.classList.add(j.errorInput), this.error.textContent = this.errorMessage, this.error.classList.remove(j.hidden), yield G(this.error, Q.open, Q.transition);
5164
5167
  return;
@@ -5280,12 +5283,12 @@ class Qc {
5280
5283
  expiryChange: new q(),
5281
5284
  cvcChange: new q()
5282
5285
  });
5283
- var a, o, l, d, u, h, m, p, g, b, y, E, V, _, M, T, D;
5286
+ var a, o, l, u, d, h, m, p, g, b, y, k, V, _, M, T, D;
5284
5287
  this.translate = e;
5285
5288
  const i = e.messages();
5286
- this.element = document.createElement("div"), this.element.classList.add(A.securityContent), this.expiryInputContainer.classList.add(A.inputContainer), (a = t == null ? void 0 : t.container) != null && a.className && F(this.expiryInputContainer, t.container.className), (o = t == null ? void 0 : t.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, t.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("autocomplete", "cc-exp"), this.expiryInput.setAttribute("placeholder", i.card.expiry.placeholder), this.expiryInput.setAttribute("inputmode", "numeric"), this.expiryInput.setAttribute("pattern", "[0-9]*"), this.expiryInput.setAttribute("enterkeyhint", "next"), this.expiryInput.classList.add(A.input), (l = t == null ? void 0 : t.field) != null && l.className && F(this.expiryInput, t.field.className), (d = t == null ? void 0 : t.field) != null && d.styles && Object.assign(this.expiryInput.style, t.field.styles), this.expiryEndContent.classList.add(A.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add(A.label), (u = t == null ? void 0 : t.label) != null && u.className && F(this.expiryLabel, t.label.className), (h = t == null ? void 0 : t.label) != null && h.styles && Object.assign(this.expiryLabel.style, t.label.styles), this.expiryLabelText.contentEditable = "false", this.expiryLabelText.textContent = i.card.expiry.label, this.expiryLabelError.textContent = i.card.required, this.expiryLabelError.classList.add(A.labelError, A.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add(A.error, A.hidden), (m = t == null ? void 0 : t.error) != null && m.className && F(this.expiryError, t.error.className), (p = t == null ? void 0 : t.error) != null && p.styles && Object.assign(this.expiryError.style, t.error.styles);
5289
+ this.element = document.createElement("div"), this.element.classList.add(A.securityContent), this.expiryInputContainer.classList.add(A.inputContainer), (a = t == null ? void 0 : t.container) != null && a.className && F(this.expiryInputContainer, t.container.className), (o = t == null ? void 0 : t.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, t.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("autocomplete", "cc-exp"), this.expiryInput.setAttribute("placeholder", i.card.expiry.placeholder), this.expiryInput.setAttribute("inputmode", "numeric"), this.expiryInput.setAttribute("pattern", "[0-9]*"), this.expiryInput.setAttribute("enterkeyhint", "next"), this.expiryInput.classList.add(A.input), (l = t == null ? void 0 : t.field) != null && l.className && F(this.expiryInput, t.field.className), (u = t == null ? void 0 : t.field) != null && u.styles && Object.assign(this.expiryInput.style, t.field.styles), this.expiryEndContent.classList.add(A.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add(A.label), (d = t == null ? void 0 : t.label) != null && d.className && F(this.expiryLabel, t.label.className), (h = t == null ? void 0 : t.label) != null && h.styles && Object.assign(this.expiryLabel.style, t.label.styles), this.expiryLabelText.contentEditable = "false", this.expiryLabelText.textContent = i.card.expiry.label, this.expiryLabelError.textContent = i.card.required, this.expiryLabelError.classList.add(A.labelError, A.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add(A.error, A.hidden), (m = t == null ? void 0 : t.error) != null && m.className && F(this.expiryError, t.error.className), (p = t == null ? void 0 : t.error) != null && p.styles && Object.assign(this.expiryError.style, t.error.styles);
5287
5290
  const r = document.createElement("div");
5288
- if (r.appendChild(this.expiryError), this.cvcInputContainer.classList.add(A.inputContainer), (g = t == null ? void 0 : t.container) != null && g.className && F(this.cvcInputContainer, t.container.className), (b = t == null ? void 0 : t.container) != null && b.styles && Object.assign(this.cvcInputContainer.style, t.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("autocomplete", "cc-csc"), this.cvcInput.setAttribute("placeholder", i.card.cvc.placeholder), this.cvcInput.setAttribute("inputmode", "numeric"), this.cvcInput.setAttribute("pattern", "[0-9]*"), this.cvcInput.setAttribute("enterkeyhint", "done"), this.cvcInput.classList.add(A.input), (y = t == null ? void 0 : t.field) != null && y.className && F(this.cvcInput, t.field.className), (E = t == null ? void 0 : t.field) != null && E.styles && Object.assign(this.cvcInput.style, t.field.styles), (V = t == null ? void 0 : t.placeholder) != null && V.styles && Object.keys(t.placeholder.styles).length) {
5291
+ if (r.appendChild(this.expiryError), this.cvcInputContainer.classList.add(A.inputContainer), (g = t == null ? void 0 : t.container) != null && g.className && F(this.cvcInputContainer, t.container.className), (b = t == null ? void 0 : t.container) != null && b.styles && Object.assign(this.cvcInputContainer.style, t.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("autocomplete", "cc-csc"), this.cvcInput.setAttribute("placeholder", i.card.cvc.placeholder), this.cvcInput.setAttribute("inputmode", "numeric"), this.cvcInput.setAttribute("pattern", "[0-9]*"), this.cvcInput.setAttribute("enterkeyhint", "done"), this.cvcInput.classList.add(A.input), (y = t == null ? void 0 : t.field) != null && y.className && F(this.cvcInput, t.field.className), (k = t == null ? void 0 : t.field) != null && k.styles && Object.assign(this.cvcInput.style, t.field.styles), (V = t == null ? void 0 : t.placeholder) != null && V.styles && Object.keys(t.placeholder.styles).length) {
5289
5292
  const C = (R) => R.replace(/[A-Z]/g, (O) => "-" + O.toLowerCase()), w = Object.entries(t.placeholder.styles).map(([R, O]) => `${C(R)}:${O};`).join("");
5290
5293
  this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${w}}#${this.cvcId}::placeholder{${w}}`, this.element.appendChild(this.placeholderStyle);
5291
5294
  }
@@ -5342,7 +5345,7 @@ class Qc {
5342
5345
  }), this.cvcInput.value = t, this.render();
5343
5346
  }
5344
5347
  toggleCvcLabelError(e) {
5345
- return k(this, null, function* () {
5348
+ return E(this, null, function* () {
5346
5349
  if (e) {
5347
5350
  this.cvcInputContainer.classList.add(A.errorInput), this.cvcLabelError.classList.remove(A.hidden), yield G(this.cvcLabelError, W.open, W.transition);
5348
5351
  return;
@@ -5351,7 +5354,7 @@ class Qc {
5351
5354
  });
5352
5355
  }
5353
5356
  toggleCvcErrorMessage(e) {
5354
- return k(this, null, function* () {
5357
+ return E(this, null, function* () {
5355
5358
  if (e) {
5356
5359
  this.cvcInputContainer.classList.add(A.errorInput), this.cvcError.textContent = this.cvcErrorMessage, this.cvcError.classList.remove(A.hidden), yield G(this.cvcError, Q.open, Q.transition);
5357
5360
  return;
@@ -5362,10 +5365,10 @@ class Qc {
5362
5365
  expiryValidator(e) {
5363
5366
  const t = !e, i = e.length < 7, r = /* @__PURE__ */ new Date(), [s, a] = e.split(" / ");
5364
5367
  r.setFullYear(2e3 + parseInt(a), parseInt(s) - 1, 31);
5365
- const o = r.getTime() < Date.now(), l = /* @__PURE__ */ new Date(), d = /* @__PURE__ */ new Date();
5366
- d.setFullYear(l.getFullYear() + 50);
5367
- const u = r.getTime() > d.getTime() || r.getFullYear() < l.getFullYear();
5368
- return !t && !i && !o && !u ? null : t ? Y.Empty : i ? Y.Incomplete : u ? "tooFarInFuture" : r.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "dateExpired" : "expired";
5368
+ const o = r.getTime() < Date.now(), l = /* @__PURE__ */ new Date(), u = /* @__PURE__ */ new Date();
5369
+ u.setFullYear(l.getFullYear() + 50);
5370
+ const d = r.getTime() > u.getTime() || r.getFullYear() < l.getFullYear();
5371
+ return !t && !i && !o && !d ? null : t ? Y.Empty : i ? Y.Incomplete : d ? "tooFarInFuture" : r.getFullYear() === (/* @__PURE__ */ new Date()).getFullYear() ? "dateExpired" : "expired";
5369
5372
  }
5370
5373
  // validate expiry
5371
5374
  validateExpiry(e) {
@@ -5393,7 +5396,7 @@ class Qc {
5393
5396
  }
5394
5397
  // toggle expiry label error
5395
5398
  toggleExpiryLabelError(e) {
5396
- return k(this, null, function* () {
5399
+ return E(this, null, function* () {
5397
5400
  if (e) {
5398
5401
  this.expiryInputContainer.classList.add(A.errorInput), this.expiryLabelError.classList.remove(A.hidden), yield G(this.expiryLabelError, W.open, W.transition);
5399
5402
  return;
@@ -5403,7 +5406,7 @@ class Qc {
5403
5406
  }
5404
5407
  // toggle expiry error message
5405
5408
  toggleExpiryErrorMessage(e) {
5406
- return k(this, null, function* () {
5409
+ return E(this, null, function* () {
5407
5410
  if (e) {
5408
5411
  this.expiryInputContainer.classList.add(A.errorInput), this.expiryError.textContent = this.expiryErrorMessage, this.expiryError.classList.remove(A.hidden), yield G(this.expiryError, Q.open, Q.transition);
5409
5412
  return;
@@ -5471,16 +5474,16 @@ class ed {
5471
5474
  this.name.render(),
5472
5475
  this.submit.render()
5473
5476
  ), requestAnimationFrame(() => {
5474
- const l = this.submit.render(), u = window.getComputedStyle(l).backgroundColor || "#5A67D8";
5475
- this.element.style.setProperty("--input-focus-shadow-color", u);
5477
+ const l = this.submit.render(), d = window.getComputedStyle(l).backgroundColor || "#5A67D8";
5478
+ this.element.style.setProperty("--input-focus-shadow-color", d);
5476
5479
  }), this.back.addEventListener(() => this.events.close.emit()), this.number.addEventListener("change", ({ cardType: l }) => this.cardSecurity.updateCardType(l || null)), this.submit.addEventListener((l) => {
5477
5480
  var p;
5478
5481
  l.preventDefault();
5479
- const { cvc: d, expiry: u } = this.cardSecurity.value(), { value: h, cardType: m } = this.number.value();
5482
+ const { cvc: u, expiry: d } = this.cardSecurity.value(), { value: h, cardType: m } = this.number.value();
5480
5483
  this.touchSubmit(), this.validate() && ((p = this.onPaymentAttempt) == null || p.call(this, { paymentMethod: x.CARD }), this.events.submit.emit({
5481
5484
  number: h,
5482
- expiry: u,
5483
- cvc: d,
5485
+ expiry: d,
5486
+ cvc: u,
5484
5487
  name: this.name.value(),
5485
5488
  cardBrand: m
5486
5489
  }));
@@ -5635,12 +5638,12 @@ class od {
5635
5638
  }
5636
5639
  // init
5637
5640
  init() {
5638
- return k(this, null, function* () {
5641
+ return E(this, null, function* () {
5639
5642
  this.buttons.addEventListener("onPaymentAttempt", (e) => {
5640
5643
  var i;
5641
5644
  const t = this.config.state.checkout.getState();
5642
5645
  (i = t.onCheckoutAttempt) == null || i.call(t, { paymentMethod: e }), this.hideError();
5643
- }), this.buttons.addEventListener("ready", () => k(this, null, function* () {
5646
+ }), this.buttons.addEventListener("ready", () => E(this, null, function* () {
5644
5647
  var i;
5645
5648
  this.loader.setClassName(Z.hidden);
5646
5649
  const { variant: e, onCheckoutLoaded: t } = this.config.state.checkout.getState();
@@ -5652,7 +5655,7 @@ class od {
5652
5655
  ).finished) != null ? i : Promise.resolve(), this.checkout.style.height = ""), this.isFormOpen = !0;
5653
5656
  }
5654
5657
  !this.hasLoadedOnce && t && (this.hasLoadedOnce = !0, t({ success: !0 }));
5655
- })), this.buttons.addEventListener("open", () => k(this, null, function* () {
5658
+ })), this.buttons.addEventListener("open", () => E(this, null, function* () {
5656
5659
  var r;
5657
5660
  if (this.isLoading) return;
5658
5661
  this.hideError();
@@ -5694,7 +5697,7 @@ class od {
5694
5697
  case "venmo":
5695
5698
  return this.handleSuccess({ clientSession: t, braintree: { nonce: e } });
5696
5699
  }
5697
- }), this.form.addEventListener("close", () => k(this, null, function* () {
5700
+ }), this.form.addEventListener("close", () => E(this, null, function* () {
5698
5701
  var s, a;
5699
5702
  if (this.isLoading) return;
5700
5703
  this.hideError();
@@ -5714,16 +5717,16 @@ class od {
5714
5717
  { minHeight: [`${e}px`, `${this.closedHeight}px`] },
5715
5718
  { duration: 250, easing: "ease-out", fill: "forwards" }
5716
5719
  ).finished) != null ? a : Promise.resolve(), this.checkout.style.height = "auto"), this.isFormOpen = !1;
5717
- })), this.form.addEventListener("submit", (e) => k(this, null, function* () {
5720
+ })), this.form.addEventListener("submit", (e) => E(this, null, function* () {
5718
5721
  if (this.isLoading || (this.form.touchSubmit(), this.hideError(), !this.form.validate())) return;
5719
- const i = e.number.replace(/\D/g, ""), r = this.config.state.checkout.getState(), s = this.config.service.ev.getEv(), [a, o] = yield Promise.all([s.encrypt(i), s.encrypt(e.cvc)]), [l, d] = e.expiry.split("/");
5722
+ const i = e.number.replace(/\D/g, ""), r = this.config.state.checkout.getState(), s = this.config.service.ev.getEv(), [a, o] = yield Promise.all([s.encrypt(i), s.encrypt(e.cvc)]), [l, u] = e.expiry.split("/");
5720
5723
  yield this.handleSuccess({
5721
5724
  clientSession: r.clientToken,
5722
5725
  card: {
5723
5726
  firstSixDigits: i.slice(0, 6),
5724
5727
  lastFourDigits: i.slice(-4),
5725
5728
  expMonth: Number(l),
5726
- expYear: Number(d),
5729
+ expYear: Number(u),
5727
5730
  cardBrand: e.cardBrand || "",
5728
5731
  number: a,
5729
5732
  cvc: o,
@@ -5745,7 +5748,7 @@ class od {
5745
5748
  }
5746
5749
  // handle success
5747
5750
  handleSuccess(e) {
5748
- return k(this, null, function* () {
5751
+ return E(this, null, function* () {
5749
5752
  var s, a;
5750
5753
  if (this.isLoading) return;
5751
5754
  this.hideError(), this.setLoading(!0);
@@ -5786,7 +5789,7 @@ class od {
5786
5789
  }
5787
5790
  // show success
5788
5791
  showSuccess() {
5789
- return k(this, null, function* () {
5792
+ return E(this, null, function* () {
5790
5793
  this.container.classList.add(Z.hidden), this.success.removeClassName(Z.hidden), yield G(this.success.element, Le.open, Le.transition);
5791
5794
  });
5792
5795
  }
@@ -5837,10 +5840,10 @@ class ld {
5837
5840
  }
5838
5841
  // init
5839
5842
  init() {
5840
- return k(this, null, function* () {
5843
+ return E(this, null, function* () {
5841
5844
  const { checkout: e, transaction: t, translate: i, styles: r } = this.config.state, { apiVersion: s } = e.getState();
5842
- e.subscribe(({ clientToken: a, environment: o, locale: l, translate: d, styles: u }) => {
5843
- l && i.locale() !== l && i.setLocale(l), d && i.overrides() !== d && i.setMessages(d), u && r.setState(u), t.updateTransaction(a, o, s).then((h) => {
5845
+ e.subscribe(({ clientToken: a, environment: o, locale: l, translate: u, styles: d }) => {
5846
+ l && i.locale() !== l && i.setLocale(l), u && i.overrides() !== u && i.setMessages(u), d && r.setState(d), t.updateTransaction(a, o, s).then((h) => {
5844
5847
  var m, p;
5845
5848
  if (h)
5846
5849
  return this.config.service.ev.initEv({
@@ -5858,7 +5861,7 @@ class ld {
5858
5861
  }
5859
5862
  // mount
5860
5863
  mount() {
5861
- return k(this, null, function* () {
5864
+ return E(this, null, function* () {
5862
5865
  return this.component || (this.component = new od(this.config)), yield this.init(), yield this.component.init(), this.component.render();
5863
5866
  });
5864
5867
  }
@@ -5907,7 +5910,7 @@ class pd extends Ct {
5907
5910
  }
5908
5911
  // update transaction
5909
5912
  updateTransaction(t, i, r) {
5910
- return k(this, null, function* () {
5913
+ return E(this, null, function* () {
5911
5914
  if (this.clientToken === t) return this.getState();
5912
5915
  this.clientToken = t;
5913
5916
  try {
@@ -7578,7 +7581,7 @@ class Xd {
7578
7581
  }
7579
7582
  // init
7580
7583
  init(e) {
7581
- return k(this, null, function* () {
7584
+ return E(this, null, function* () {
7582
7585
  if (typeof window == "undefined")
7583
7586
  throw new Error("PayPal can only be initialized in browser environment");
7584
7587
  try {
@@ -7595,7 +7598,7 @@ class Xd {
7595
7598
  }
7596
7599
  // render
7597
7600
  render(e, t) {
7598
- return k(this, null, function* () {
7601
+ return E(this, null, function* () {
7599
7602
  var i, r;
7600
7603
  if (!e.isConnected)
7601
7604
  throw new Error("PayPal parent element must be connected to DOM before render()");
@@ -7620,7 +7623,7 @@ class Qd {
7620
7623
  }
7621
7624
  // init
7622
7625
  init(e) {
7623
- return k(this, null, function* () {
7626
+ return E(this, null, function* () {
7624
7627
  if (typeof window == "undefined")
7625
7628
  throw new Error("Braintree can only be initialized in browser environment");
7626
7629
  try {
@@ -7642,7 +7645,7 @@ class Qd {
7642
7645
  }
7643
7646
  // create venmo instance
7644
7647
  createVenmo(e) {
7645
- return k(this, null, function* () {
7648
+ return E(this, null, function* () {
7646
7649
  if (!this.client)
7647
7650
  throw new Error("Braintree client must be initialized before creating Venmo instance");
7648
7651
  try {
@@ -7671,7 +7674,7 @@ class Qd {
7671
7674
  }
7672
7675
  // tokenize venmo payment
7673
7676
  tokenize() {
7674
- return k(this, null, function* () {
7677
+ return E(this, null, function* () {
7675
7678
  if (!this.venmoInstance)
7676
7679
  throw new Error("Venmo instance not initialized");
7677
7680
  return new Promise((e, t) => {