@paynext/sdk 0.0.54 → 0.0.55

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
@@ -1,25 +1,25 @@
1
- var xi = Object.defineProperty, Pi = Object.defineProperties;
2
- var Ri = Object.getOwnPropertyDescriptors;
1
+ var ki = Object.defineProperty, Mi = Object.defineProperties;
2
+ var Si = Object.getOwnPropertyDescriptors;
3
3
  var at = Object.getOwnPropertySymbols;
4
- var wn = Object.prototype.hasOwnProperty, Tn = Object.prototype.propertyIsEnumerable;
5
- var yt = (n, t, e) => t in n ? xi(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, j = (n, t) => {
4
+ var On = Object.prototype.hasOwnProperty, Nn = Object.prototype.propertyIsEnumerable;
5
+ var bt = (n, t, e) => t in n ? ki(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, j = (n, t) => {
6
6
  for (var e in t || (t = {}))
7
- wn.call(t, e) && yt(n, e, t[e]);
7
+ On.call(t, e) && bt(n, e, t[e]);
8
8
  if (at)
9
9
  for (var e of at(t))
10
- Tn.call(t, e) && yt(n, e, t[e]);
10
+ Nn.call(t, e) && bt(n, e, t[e]);
11
11
  return n;
12
- }, J = (n, t) => Pi(n, Ri(t));
12
+ }, X = (n, t) => Mi(n, Si(t));
13
13
  var ge = (n, t) => {
14
14
  var e = {};
15
15
  for (var r in n)
16
- wn.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
16
+ On.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
17
17
  if (n != null && at)
18
18
  for (var r of at(n))
19
- t.indexOf(r) < 0 && Tn.call(n, r) && (e[r] = n[r]);
19
+ t.indexOf(r) < 0 && Nn.call(n, r) && (e[r] = n[r]);
20
20
  return e;
21
21
  };
22
- var b = (n, t, e) => yt(n, typeof t != "symbol" ? t + "" : t, e);
22
+ var b = (n, t, e) => bt(n, typeof t != "symbol" ? t + "" : t, e);
23
23
  var z = (n, t, e) => new Promise((r, i) => {
24
24
  var a = (l) => {
25
25
  try {
@@ -37,7 +37,7 @@ var z = (n, t, e) => new Promise((r, i) => {
37
37
  o((e = e.apply(n, t)).next());
38
38
  });
39
39
  let st = null;
40
- function ki() {
40
+ function Di() {
41
41
  return z(this, null, function* () {
42
42
  return st || (st = new Promise((n, t) => {
43
43
  const e = document.createElement("script");
@@ -51,27 +51,27 @@ function ki() {
51
51
  }), st);
52
52
  });
53
53
  }
54
- function gr() {
54
+ function Er() {
55
55
  return z(this, null, function* () {
56
56
  if (window.Evervault)
57
57
  return window.Evervault;
58
58
  try {
59
- return yield ki(), window.Evervault;
59
+ return yield Di(), window.Evervault;
60
60
  } catch (n) {
61
61
  throw new Error("Failed to load Evervault.js");
62
62
  }
63
63
  });
64
64
  }
65
- function Mi(n, t, e) {
65
+ function Vi(n, t, e) {
66
66
  return z(this, null, function* () {
67
- const r = yield gr();
67
+ const r = yield Er();
68
68
  return new r(n, t, e);
69
69
  });
70
70
  }
71
71
  Promise.resolve().then(() => {
72
- gr();
72
+ Er();
73
73
  });
74
- let Si = class {
74
+ let Fi = class {
75
75
  constructor(t) {
76
76
  b(this, "apple", null);
77
77
  b(this, "isAvailable", !1);
@@ -81,7 +81,7 @@ let Si = class {
81
81
  init(c, d) {
82
82
  return z(this, arguments, function* ({ transaction: t, locale: e, supportedCardTypes: r, onReady: i, onError: a, onSuccess: s, onCancel: o }, l) {
83
83
  const u = this.ev.transactions.create(t);
84
- this.apple = this.ev.ui.applePay(u, J(j({
84
+ this.apple = this.ev.ui.applePay(u, X(j({
85
85
  locale: e,
86
86
  borderRadius: 12,
87
87
  size: {
@@ -112,7 +112,7 @@ let Si = class {
112
112
  !this.apple || !this.isAvailable || (t.innerHTML = "", yield this.apple.mount(t), (e = this.onReady) == null || e.call(this));
113
113
  });
114
114
  }
115
- }, Di = class {
115
+ }, Ui = class {
116
116
  constructor(t) {
117
117
  b(this, "google", null);
118
118
  this.ev = t;
@@ -120,7 +120,7 @@ let Si = class {
120
120
  init(l, c) {
121
121
  return z(this, arguments, function* ({ transaction: t, locale: e, onReady: r, onError: i, onSuccess: a, onCancel: s }, o) {
122
122
  const d = this.ev.transactions.create(t);
123
- this.google = this.ev.ui.googlePay(d, J(j({
123
+ this.google = this.ev.ui.googlePay(d, X(j({
124
124
  locale: e,
125
125
  size: {
126
126
  width: "100%",
@@ -167,7 +167,7 @@ class de {
167
167
  this.listeners = [];
168
168
  }
169
169
  }
170
- class Vi {
170
+ class Bi {
171
171
  constructor(t) {
172
172
  b(this, "threeDs", null);
173
173
  this.ev = t;
@@ -183,7 +183,7 @@ class Vi {
183
183
  });
184
184
  }
185
185
  }
186
- class Fi {
186
+ class ji {
187
187
  constructor() {
188
188
  b(this, "isReady", !1);
189
189
  b(this, "ev", null);
@@ -202,14 +202,14 @@ class Fi {
202
202
  // init ev
203
203
  initEv(t) {
204
204
  return z(this, null, function* () {
205
- this.isShouldLoad(t) && (this.isReady = !1, this.ev = yield Mi(t.teamId, t.appId), this.apple = new Si(this.ev), this.google = new Di(this.ev), this.events.ready.emit(), this.isReady = !0);
205
+ this.isShouldLoad(t) && (this.isReady = !1, this.ev = yield Vi(t.teamId, t.appId), this.apple = new Fi(this.ev), this.google = new Ui(this.ev), this.events.ready.emit(), this.isReady = !0);
206
206
  });
207
207
  }
208
208
  // init three ds
209
209
  initThreeDs(t) {
210
210
  return z(this, null, function* () {
211
211
  if (!this.ev) throw new Error("Evervault should be init before using Three DS Secure");
212
- this.threeDs = new Vi(this.ev), yield this.threeDs.init(t), yield this.threeDs.render();
212
+ this.threeDs = new Bi(this.ev), yield this.threeDs.init(t), yield this.threeDs.render();
213
213
  });
214
214
  }
215
215
  // init apple
@@ -256,10 +256,10 @@ class Fi {
256
256
  return this.ev;
257
257
  }
258
258
  }
259
- function Gt(n) {
259
+ function Yt(n) {
260
260
  return typeof n == "object" && !Array.isArray(n);
261
261
  }
262
- function Ui(n, t, e) {
262
+ function zi(n, t, e) {
263
263
  var r;
264
264
  if (n instanceof EventTarget)
265
265
  return [n];
@@ -270,72 +270,72 @@ function Ui(n, t, e) {
270
270
  }
271
271
  return Array.from(n);
272
272
  }
273
- function yr(n, t, e, r) {
274
- return typeof n == "string" && Gt(t) ? Ui(n, e, r) : n instanceof NodeList ? Array.from(n) : Array.isArray(n) ? n : [n];
273
+ function _r(n, t, e, r) {
274
+ return typeof n == "string" && Yt(t) ? zi(n, e, r) : n instanceof NodeList ? Array.from(n) : Array.isArray(n) ? n : [n];
275
275
  }
276
- function Bi(n, t, e) {
276
+ function Ki(n, t, e) {
277
277
  return n * (t + 1);
278
278
  }
279
- function In(n, t, e, r) {
279
+ function Ln(n, t, e, r) {
280
280
  var i;
281
281
  return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, n + parseFloat(t)) : t === "<" ? e : (i = r.get(t)) != null ? i : n;
282
282
  }
283
- const tt = (n, t, e) => n + (t - n) * e, ji = (n, t, e) => {
283
+ const tt = (n, t, e) => n + (t - n) * e, qi = (n, t, e) => {
284
284
  const r = t - n;
285
285
  return ((e - n) % r + r) % r + n;
286
- }, br = (n) => Array.isArray(n) && typeof n[0] != "number";
287
- function Er(n, t) {
288
- return br(n) ? n[ji(0, n.length, t)] : n;
286
+ }, Cr = (n) => Array.isArray(n) && typeof n[0] != "number";
287
+ function Ar(n, t) {
288
+ return Cr(n) ? n[qi(0, n.length, t)] : n;
289
289
  }
290
- function zi(n, t) {
290
+ function Hi(n, t) {
291
291
  n.indexOf(t) === -1 && n.push(t);
292
292
  }
293
- function _r(n, t) {
293
+ function wr(n, t) {
294
294
  const e = n.indexOf(t);
295
295
  e > -1 && n.splice(e, 1);
296
296
  }
297
- function Ki(n, t, e) {
297
+ function Wi(n, t, e) {
298
298
  for (let r = 0; r < n.length; r++) {
299
299
  const i = n[r];
300
- i.at > t && i.at < e && (_r(n, i), r--);
300
+ i.at > t && i.at < e && (wr(n, i), r--);
301
301
  }
302
302
  }
303
- function qi(n, t, e, r, i, a) {
304
- Ki(n, i, a);
303
+ function Gi(n, t, e, r, i, a) {
304
+ Wi(n, i, a);
305
305
  for (let s = 0; s < t.length; s++)
306
306
  n.push({
307
307
  value: t[s],
308
308
  at: tt(i, a, r[s]),
309
- easing: Er(e, s)
309
+ easing: Ar(e, s)
310
310
  });
311
311
  }
312
- function Hi(n, t) {
312
+ function Yi(n, t) {
313
313
  for (let e = 0; e < n.length; e++)
314
314
  n[e] = n[e] / (t + 1);
315
315
  }
316
- function Wi(n, t) {
316
+ function $i(n, t) {
317
317
  return n.at === t.at ? n.value === null ? 1 : t.value === null ? -1 : 0 : n.at - t.at;
318
318
  }
319
- const me = (n) => !!(n && n.getVelocity), Yt = /* @__NO_SIDE_EFFECTS__ */ (n, t, e) => {
319
+ const me = (n) => !!(n && n.getVelocity), $t = /* @__NO_SIDE_EFFECTS__ */ (n, t, e) => {
320
320
  const r = t - n;
321
321
  return r === 0 ? 1 : (e - n) / r;
322
322
  };
323
- function Cr(n, t) {
323
+ function Tr(n, t) {
324
324
  const e = n[n.length - 1];
325
325
  for (let r = 1; r <= t; r++) {
326
- const i = /* @__PURE__ */ Yt(0, t, r);
326
+ const i = /* @__PURE__ */ $t(0, t, r);
327
327
  n.push(tt(e, 1, i));
328
328
  }
329
329
  }
330
- function Ar(n) {
330
+ function Ir(n) {
331
331
  const t = [0];
332
- return Cr(t, n.length - 1), t;
332
+ return Tr(t, n.length - 1), t;
333
333
  }
334
- function $t(n) {
334
+ function Qt(n) {
335
335
  return typeof n == "function" && "applyToOptions" in n;
336
336
  }
337
337
  const ht = 2e4;
338
- function Qt(n) {
338
+ function Zt(n) {
339
339
  let t = 0;
340
340
  const e = 50;
341
341
  let r = n.next(t);
@@ -344,8 +344,8 @@ function Qt(n) {
344
344
  return t >= ht ? 1 / 0 : t;
345
345
  }
346
346
  const ye = /* @__NO_SIDE_EFFECTS__ */ (n) => n * 1e3, _e = /* @__NO_SIDE_EFFECTS__ */ (n) => n / 1e3;
347
- function wr(n, t = 100, e) {
348
- const r = e(J(j({}, n), { keyframes: [0, t] })), i = Math.min(Qt(r), ht);
347
+ function Or(n, t = 100, e) {
348
+ const r = e(X(j({}, n), { keyframes: [0, t] })), i = Math.min(Zt(r), ht);
349
349
  return {
350
350
  type: "keyframes",
351
351
  ease: (a) => r.next(i * a).value / t,
@@ -361,8 +361,8 @@ process.env.NODE_ENV !== "production" && (nt = (n, t) => {
361
361
  if (!n)
362
362
  throw new Error(t);
363
363
  });
364
- const Gi = "easeInOut", Yi = 20;
365
- function $i(n, a = {}, r, i) {
364
+ const Qi = "easeInOut", Zi = 20;
365
+ function Xi(n, a = {}, r, i) {
366
366
  var s = a, { defaultTransition: t = {} } = s, e = ge(s, ["defaultTransition"]);
367
367
  const o = t.duration || 0.3, l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), d = {}, u = /* @__PURE__ */ new Map();
368
368
  let h = 0, p = 0, m = 0;
@@ -372,56 +372,56 @@ function $i(n, a = {}, r, i) {
372
372
  u.set(v, p);
373
373
  continue;
374
374
  } else if (!Array.isArray(v)) {
375
- u.set(v.name, In(p, v.at, h, u));
375
+ u.set(v.name, Ln(p, v.at, h, u));
376
376
  continue;
377
377
  }
378
378
  let [y, w, T = {}] = v;
379
- T.at !== void 0 && (p = In(p, T.at, h, u));
379
+ T.at !== void 0 && (p = Ln(p, T.at, h, u));
380
380
  let x = 0;
381
381
  const C = (I, O, R, U = 0, H = 0) => {
382
- const W = Qi(I), V = O, { delay: S = 0, times: F = Ar(W), type: q = "keyframes", repeat: ee, repeatType: M, repeatDelay: Y = 0 } = V, K = ge(V, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
382
+ const W = Ji(I), V = O, { delay: S = 0, times: F = Ir(W), type: q = "keyframes", repeat: ee, repeatType: M, repeatDelay: Y = 0 } = V, K = ge(V, ["delay", "times", "type", "repeat", "repeatType", "repeatDelay"]);
383
383
  let { ease: g = t.ease || "easeOut", duration: E } = O;
384
- const k = typeof S == "function" ? S(U, H) : S, B = W.length, _ = $t(q) ? q : i == null ? void 0 : i[q];
384
+ const k = typeof S == "function" ? S(U, H) : S, B = W.length, _ = Qt(q) ? q : i == null ? void 0 : i[q];
385
385
  if (B <= 2 && _) {
386
386
  let L = 100;
387
- if (B === 2 && Ji(W)) {
387
+ if (B === 2 && na(W)) {
388
388
  const se = W[1] - W[0];
389
389
  L = Math.abs(se);
390
390
  }
391
391
  const G = j({}, K);
392
392
  E !== void 0 && (G.duration = /* @__PURE__ */ ye(E));
393
- const X = wr(G, L, _);
394
- g = X.ease, E = X.duration;
393
+ const J = Or(G, L, _);
394
+ g = J.ease, E = J.duration;
395
395
  }
396
396
  E != null || (E = o);
397
397
  const N = p + k;
398
398
  F.length === 1 && F[0] === 0 && (F[1] = 1);
399
399
  const A = F.length - W.length;
400
- if (A > 0 && Cr(F, A), W.length === 1 && W.unshift(null), ee) {
401
- Ce(ee < Yi, "Repeat count too high, must be less than 20"), E = Bi(E, ee);
400
+ if (A > 0 && Tr(F, A), W.length === 1 && W.unshift(null), ee) {
401
+ Ce(ee < Zi, "Repeat count too high, must be less than 20"), E = Ki(E, ee);
402
402
  const L = [...W], G = [...F];
403
403
  g = Array.isArray(g) ? [...g] : [g];
404
- const X = [...g];
404
+ const J = [...g];
405
405
  for (let se = 0; se < ee; se++) {
406
406
  W.push(...L);
407
407
  for (let D = 0; D < L.length; D++)
408
- F.push(G[D] + (se + 1)), g.push(D === 0 ? "linear" : Er(X, D - 1));
408
+ F.push(G[D] + (se + 1)), g.push(D === 0 ? "linear" : Ar(J, D - 1));
409
409
  }
410
- Hi(F, ee);
410
+ Yi(F, ee);
411
411
  }
412
412
  const P = N + E;
413
- qi(R, W, g, F, N, P), x = Math.max(k + E, x), m = Math.max(P, m);
413
+ Gi(R, W, g, F, N, P), x = Math.max(k + E, x), m = Math.max(P, m);
414
414
  };
415
415
  if (me(y)) {
416
- const I = On(y, c);
417
- C(w, T, Nn("default", I));
416
+ const I = xn(y, c);
417
+ C(w, T, Pn("default", I));
418
418
  } else {
419
- const I = yr(y, w, r, d), O = I.length;
419
+ const I = _r(y, w, r, d), O = I.length;
420
420
  for (let R = 0; R < O; R++) {
421
421
  w = w, T = T;
422
- const U = I[R], H = On(U, c);
422
+ const U = I[R], H = xn(U, c);
423
423
  for (const W in w)
424
- C(w[W], Zi(T, W), Nn(W, H), R, O);
424
+ C(w[W], ea(T, W), Pn(W, H), R, O);
425
425
  }
426
426
  }
427
427
  h = p, p += x;
@@ -429,18 +429,18 @@ function $i(n, a = {}, r, i) {
429
429
  return c.forEach((f, v) => {
430
430
  for (const y in f) {
431
431
  const w = f[y];
432
- w.sort(Wi);
432
+ w.sort($i);
433
433
  const T = [], x = [], C = [];
434
434
  for (let O = 0; O < w.length; O++) {
435
435
  const { at: R, value: U, easing: H } = w[O];
436
- T.push(U), x.push(/* @__PURE__ */ Yt(0, m, R)), C.push(H || "easeOut");
436
+ T.push(U), x.push(/* @__PURE__ */ $t(0, m, R)), C.push(H || "easeOut");
437
437
  }
438
- x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), C.unshift(Gi)), x[x.length - 1] !== 1 && (x.push(1), T.push(null)), l.has(v) || l.set(v, {
438
+ x[0] !== 0 && (x.unshift(0), T.unshift(T[0]), C.unshift(Qi)), x[x.length - 1] !== 1 && (x.push(1), T.push(null)), l.has(v) || l.set(v, {
439
439
  keyframes: {},
440
440
  transition: {}
441
441
  });
442
442
  const I = l.get(v);
443
- I.keyframes[y] = T, I.transition[y] = j(J(j({}, t), {
443
+ I.keyframes[y] = T, I.transition[y] = j(X(j({}, t), {
444
444
  duration: m,
445
445
  ease: C,
446
446
  times: x
@@ -448,39 +448,39 @@ function $i(n, a = {}, r, i) {
448
448
  }
449
449
  }), l;
450
450
  }
451
- function On(n, t) {
451
+ function xn(n, t) {
452
452
  return !t.has(n) && t.set(n, {}), t.get(n);
453
453
  }
454
- function Nn(n, t) {
454
+ function Pn(n, t) {
455
455
  return t[n] || (t[n] = []), t[n];
456
456
  }
457
- function Qi(n) {
457
+ function Ji(n) {
458
458
  return Array.isArray(n) ? n : [n];
459
459
  }
460
- function Zi(n, t) {
460
+ function ea(n, t) {
461
461
  return n && n[t] ? j(j({}, n), n[t]) : j({}, n);
462
462
  }
463
- const Xi = (n) => typeof n == "number", Ji = (n) => n.every(Xi), Qe = /* @__PURE__ */ new WeakMap(), ea = (n) => Array.isArray(n);
464
- function Ln(n) {
463
+ const ta = (n) => typeof n == "number", na = (n) => n.every(ta), Qe = /* @__PURE__ */ new WeakMap(), ra = (n) => Array.isArray(n);
464
+ function Rn(n) {
465
465
  const t = [{}, {}];
466
466
  return n == null || n.values.forEach((e, r) => {
467
467
  t[0][r] = e.get(), t[1][r] = e.getVelocity();
468
468
  }), t;
469
469
  }
470
- function Tr(n, t, e, r) {
470
+ function Nr(n, t, e, r) {
471
471
  if (typeof t == "function") {
472
- const [i, a] = Ln(r);
472
+ const [i, a] = Rn(r);
473
473
  t = t(e !== void 0 ? e : n.custom, i, a);
474
474
  }
475
475
  if (typeof t == "string" && (t = n.variants && n.variants[t]), typeof t == "function") {
476
- const [i, a] = Ln(r);
476
+ const [i, a] = Rn(r);
477
477
  t = t(e !== void 0 ? e : n.custom, i, a);
478
478
  }
479
479
  return t;
480
480
  }
481
- function ta(n, t, e) {
481
+ function ia(n, t, e) {
482
482
  const r = n.getProps();
483
- return Tr(r, t, r.custom, n);
483
+ return Nr(r, t, r.custom, n);
484
484
  }
485
485
  const ot = [
486
486
  "setup",
@@ -500,7 +500,7 @@ const ot = [
500
500
  "postRender"
501
501
  // Compute
502
502
  ];
503
- function na(n, t) {
503
+ function aa(n, t) {
504
504
  let e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = !1, a = !1;
505
505
  const s = /* @__PURE__ */ new WeakSet();
506
506
  let o = {
@@ -538,16 +538,16 @@ function na(n, t) {
538
538
  };
539
539
  return c;
540
540
  }
541
- const Ae = {}, ra = 40;
542
- function ia(n, t) {
541
+ const Ae = {}, sa = 40;
542
+ function oa(n, t) {
543
543
  let e = !1, r = !0;
544
544
  const i = {
545
545
  delta: 0,
546
546
  timestamp: 0,
547
547
  isProcessing: !1
548
- }, a = () => e = !0, s = ot.reduce((T, x) => (T[x] = na(a), T), {}), { setup: o, read: l, resolveKeyframes: c, preUpdate: d, update: u, preRender: h, render: p, postRender: m } = s, f = () => {
548
+ }, a = () => e = !0, s = ot.reduce((T, x) => (T[x] = aa(a), T), {}), { setup: o, read: l, resolveKeyframes: c, preUpdate: d, update: u, preRender: h, render: p, postRender: m } = s, f = () => {
549
549
  const T = Ae.useManualTiming ? i.timestamp : performance.now();
550
- e = !1, Ae.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, ra), 1)), i.timestamp = T, i.isProcessing = !0, o.process(i), l.process(i), c.process(i), d.process(i), u.process(i), h.process(i), p.process(i), m.process(i), i.isProcessing = !1, e && t && (r = !1, n(f));
550
+ e = !1, Ae.useManualTiming || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(T - i.timestamp, sa), 1)), i.timestamp = T, i.isProcessing = !0, o.process(i), l.process(i), c.process(i), d.process(i), u.process(i), h.process(i), p.process(i), m.process(i), i.isProcessing = !1, e && t && (r = !1, n(f));
551
551
  }, v = () => {
552
552
  e = !0, r = !0, i.isProcessing || n(f);
553
553
  };
@@ -559,26 +559,26 @@ function ia(n, t) {
559
559
  s[ot[x]].cancel(T);
560
560
  }, state: i, steps: s };
561
561
  }
562
- const Ve = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: we, cancel: xt, state: mt } = /* @__PURE__ */ ia(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Ve, !0);
562
+ const Ve = /* @__NO_SIDE_EFFECTS__ */ (n) => n, { schedule: we, cancel: Pt, state: mt } = /* @__PURE__ */ oa(typeof requestAnimationFrame != "undefined" ? requestAnimationFrame : Ve, !0);
563
563
  let pt;
564
- function aa() {
564
+ function la() {
565
565
  pt = void 0;
566
566
  }
567
567
  const ve = {
568
568
  now: () => (pt === void 0 && ve.set(mt.isProcessing || Ae.useManualTiming ? mt.timestamp : performance.now()), pt),
569
569
  set: (n) => {
570
- pt = n, queueMicrotask(aa);
570
+ pt = n, queueMicrotask(la);
571
571
  }
572
- }, xn = /* @__PURE__ */ new Set();
573
- function Ir(n, t, e) {
574
- n || xn.has(t) || (console.warn(t), xn.add(t));
572
+ }, kn = /* @__PURE__ */ new Set();
573
+ function Lr(n, t, e) {
574
+ n || kn.has(t) || (console.warn(t), kn.add(t));
575
575
  }
576
- class Or {
576
+ class xr {
577
577
  constructor() {
578
578
  this.subscriptions = [];
579
579
  }
580
580
  add(t) {
581
- return zi(this.subscriptions, t), () => _r(this.subscriptions, t);
581
+ return Hi(this.subscriptions, t), () => wr(this.subscriptions, t);
582
582
  }
583
583
  notify(t, e, r) {
584
584
  const i = this.subscriptions.length;
@@ -598,11 +598,11 @@ class Or {
598
598
  this.subscriptions.length = 0;
599
599
  }
600
600
  }
601
- function Nr(n, t) {
601
+ function Pr(n, t) {
602
602
  return t ? n * (1e3 / t) : 0;
603
603
  }
604
- const Pn = 30, sa = (n) => !isNaN(parseFloat(n));
605
- class oa {
604
+ const Mn = 30, ca = (n) => !isNaN(parseFloat(n));
605
+ class da {
606
606
  /**
607
607
  * @param init - The initiating value
608
608
  * @param config - Optional configuration options
@@ -620,7 +620,7 @@ class oa {
620
620
  }, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
621
621
  }
622
622
  setCurrent(t) {
623
- this.current = t, this.updatedAt = ve.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = sa(this.current));
623
+ this.current = t, this.updatedAt = ve.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ca(this.current));
624
624
  }
625
625
  setPrevFrameValue(t = this.current) {
626
626
  this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
@@ -666,10 +666,10 @@ class oa {
666
666
  * @deprecated
667
667
  */
668
668
  onChange(t) {
669
- return process.env.NODE_ENV !== "production" && Ir(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
669
+ return process.env.NODE_ENV !== "production" && Lr(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
670
670
  }
671
671
  on(t, e) {
672
- this.events[t] || (this.events[t] = new Or());
672
+ this.events[t] || (this.events[t] = new xr());
673
673
  const r = this.events[t].add(e);
674
674
  return t === "change" ? () => {
675
675
  r(), we.read(() => {
@@ -750,10 +750,10 @@ class oa {
750
750
  */
751
751
  getVelocity() {
752
752
  const t = ve.now();
753
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Pn)
753
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Mn)
754
754
  return 0;
755
- const e = Math.min(this.updatedAt - this.prevUpdatedAt, Pn);
756
- return Nr(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
755
+ const e = Math.min(this.updatedAt - this.prevUpdatedAt, Mn);
756
+ return Pr(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
757
757
  }
758
758
  /**
759
759
  * Registers a new animation to control this `MotionValue`. Only one
@@ -806,41 +806,41 @@ class oa {
806
806
  }
807
807
  }
808
808
  function Ze(n, t) {
809
- return new oa(n, t);
809
+ return new da(n, t);
810
810
  }
811
- function la(n, t, e) {
811
+ function ua(n, t, e) {
812
812
  n.hasValue(t) ? n.getValue(t).set(e) : n.addValue(t, Ze(e));
813
813
  }
814
- function ca(n) {
815
- return ea(n) ? n[n.length - 1] || 0 : n;
814
+ function pa(n) {
815
+ return ra(n) ? n[n.length - 1] || 0 : n;
816
816
  }
817
- function da(n, t) {
818
- let s = ta(n, t) || {}, { transitionEnd: r = {}, transition: i = {} } = s, a = ge(s, ["transitionEnd", "transition"]);
817
+ function ha(n, t) {
818
+ let s = ia(n, t) || {}, { transitionEnd: r = {}, transition: i = {} } = s, a = ge(s, ["transitionEnd", "transition"]);
819
819
  a = j(j({}, a), r);
820
820
  for (const o in a) {
821
- const l = ca(a[o]);
822
- la(n, o, l);
821
+ const l = pa(a[o]);
822
+ ua(n, o, l);
823
823
  }
824
824
  }
825
- function ua(n) {
825
+ function ma(n) {
826
826
  return !!(me(n) && n.add);
827
827
  }
828
- function pa(n, t) {
828
+ function fa(n, t) {
829
829
  const e = n.getValue("willChange");
830
- if (ua(e))
830
+ if (ma(e))
831
831
  return e.add(t);
832
832
  if (!e && Ae.WillChange) {
833
833
  const r = new Ae.WillChange("auto");
834
834
  n.addValue("willChange", r), r.add(t);
835
835
  }
836
836
  }
837
- const Zt = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ha = "framerAppearId", ma = "data-" + Zt(ha);
838
- function fa(n) {
839
- return n.props[ma];
837
+ const Xt = (n) => n.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), va = "framerAppearId", ga = "data-" + Xt(va);
838
+ function ya(n) {
839
+ return n.props[ga];
840
840
  }
841
- const va = (n) => n !== null;
842
- function ga(n, { repeat: t, repeatType: e = "loop" }, r) {
843
- const i = n.filter(va), a = t && e !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
841
+ const ba = (n) => n !== null;
842
+ function Ea(n, { repeat: t, repeatType: e = "loop" }, r) {
843
+ const i = n.filter(ba), a = t && e !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
844
844
  return i[a];
845
845
  }
846
846
  const Fe = [
@@ -861,62 +861,62 @@ const Fe = [
861
861
  "skew",
862
862
  "skewX",
863
863
  "skewY"
864
- ], Ue = new Set(Fe), ya = {
864
+ ], Ue = new Set(Fe), _a = {
865
865
  type: "spring",
866
866
  stiffness: 500,
867
867
  damping: 25,
868
868
  restSpeed: 10
869
- }, ba = (n) => ({
869
+ }, Ca = (n) => ({
870
870
  type: "spring",
871
871
  stiffness: 550,
872
872
  damping: n === 0 ? 2 * Math.sqrt(550) : 30,
873
873
  restSpeed: 10
874
- }), Ea = {
874
+ }), Aa = {
875
875
  type: "keyframes",
876
876
  duration: 0.8
877
- }, _a = {
877
+ }, wa = {
878
878
  type: "keyframes",
879
879
  ease: [0.25, 0.1, 0.35, 1],
880
880
  duration: 0.3
881
- }, Ca = (n, { keyframes: t }) => t.length > 2 ? Ea : Ue.has(n) ? n.startsWith("scale") ? ba(t[1]) : ya : _a;
882
- function Aa(u) {
881
+ }, Ta = (n, { keyframes: t }) => t.length > 2 ? Aa : Ue.has(n) ? n.startsWith("scale") ? Ca(t[1]) : _a : wa;
882
+ function Ia(u) {
883
883
  var h = u, { when: n, delay: t, delayChildren: e, staggerChildren: r, staggerDirection: i, repeat: a, repeatType: s, repeatDelay: o, from: l, elapsed: c } = h, d = ge(h, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
884
884
  return !!Object.keys(d).length;
885
885
  }
886
- function Lr(n, t) {
886
+ function Rr(n, t) {
887
887
  var e, r;
888
888
  return (r = (e = n == null ? void 0 : n[t]) != null ? e : n == null ? void 0 : n.default) != null ? r : n;
889
889
  }
890
- const xr = (n) => (t) => typeof t == "string" && t.startsWith(n), Pr = /* @__PURE__ */ xr("--"), wa = /* @__PURE__ */ xr("var(--"), Xt = (n) => wa(n) ? Ta.test(n.split("/*")[0].trim()) : !1, Ta = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Pe = (n, t, e) => e > t ? t : e < n ? n : e, Be = {
890
+ const kr = (n) => (t) => typeof t == "string" && t.startsWith(n), Mr = /* @__PURE__ */ kr("--"), Oa = /* @__PURE__ */ kr("var(--"), Jt = (n) => Oa(n) ? Na.test(n.split("/*")[0].trim()) : !1, Na = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Pe = (n, t, e) => e > t ? t : e < n ? n : e, Be = {
891
891
  test: (n) => typeof n == "number",
892
892
  parse: parseFloat,
893
893
  transform: (n) => n
894
- }, Xe = J(j({}, Be), {
894
+ }, Xe = X(j({}, Be), {
895
895
  transform: (n) => Pe(0, 1, n)
896
- }), lt = J(j({}, Be), {
896
+ }), lt = X(j({}, Be), {
897
897
  default: 1
898
- }), $e = (n) => Math.round(n * 1e5) / 1e5, Jt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
899
- function Ia(n) {
898
+ }), $e = (n) => Math.round(n * 1e5) / 1e5, en = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
899
+ function La(n) {
900
900
  return n == null;
901
901
  }
902
- const Oa = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, en = (n, t) => (e) => !!(typeof e == "string" && Oa.test(e) && e.startsWith(n) || t && !Ia(e) && Object.prototype.hasOwnProperty.call(e, t)), Rr = (n, t, e) => (r) => {
902
+ const xa = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, tn = (n, t) => (e) => !!(typeof e == "string" && xa.test(e) && e.startsWith(n) || t && !La(e) && Object.prototype.hasOwnProperty.call(e, t)), Sr = (n, t, e) => (r) => {
903
903
  if (typeof r != "string")
904
904
  return r;
905
- const [i, a, s, o] = r.match(Jt);
905
+ const [i, a, s, o] = r.match(en);
906
906
  return {
907
907
  [n]: parseFloat(i),
908
908
  [t]: parseFloat(a),
909
909
  [e]: parseFloat(s),
910
910
  alpha: o !== void 0 ? parseFloat(o) : 1
911
911
  };
912
- }, Na = (n) => Pe(0, 255, n), bt = J(j({}, Be), {
913
- transform: (n) => Math.round(Na(n))
912
+ }, Pa = (n) => Pe(0, 255, n), Et = X(j({}, Be), {
913
+ transform: (n) => Math.round(Pa(n))
914
914
  }), Oe = {
915
- test: /* @__PURE__ */ en("rgb", "red"),
916
- parse: /* @__PURE__ */ Rr("red", "green", "blue"),
917
- transform: ({ red: n, green: t, blue: e, alpha: r = 1 }) => "rgba(" + bt.transform(n) + ", " + bt.transform(t) + ", " + bt.transform(e) + ", " + $e(Xe.transform(r)) + ")"
915
+ test: /* @__PURE__ */ tn("rgb", "red"),
916
+ parse: /* @__PURE__ */ Sr("red", "green", "blue"),
917
+ transform: ({ red: n, green: t, blue: e, alpha: r = 1 }) => "rgba(" + Et.transform(n) + ", " + Et.transform(t) + ", " + Et.transform(e) + ", " + $e(Xe.transform(r)) + ")"
918
918
  };
919
- function La(n) {
919
+ function Ra(n) {
920
920
  let t = "", e = "", r = "", i = "";
921
921
  return n.length > 5 ? (t = n.substring(1, 3), e = n.substring(3, 5), r = n.substring(5, 7), i = n.substring(7, 9)) : (t = n.substring(1, 2), e = n.substring(2, 3), r = n.substring(3, 4), i = n.substring(4, 5), t += t, e += e, r += r, i += i), {
922
922
  red: parseInt(t, 16),
@@ -925,31 +925,31 @@ function La(n) {
925
925
  alpha: i ? parseInt(i, 16) / 255 : 1
926
926
  };
927
927
  }
928
- const Pt = {
929
- test: /* @__PURE__ */ en("#"),
930
- parse: La,
928
+ const Rt = {
929
+ test: /* @__PURE__ */ tn("#"),
930
+ parse: Ra,
931
931
  transform: Oe.transform
932
932
  }, rt = /* @__NO_SIDE_EFFECTS__ */ (n) => ({
933
933
  test: (t) => typeof t == "string" && t.endsWith(n) && t.split(" ").length === 1,
934
934
  parse: parseFloat,
935
935
  transform: (t) => `${t}${n}`
936
- }), Te = /* @__PURE__ */ rt("deg"), Se = /* @__PURE__ */ rt("%"), Q = /* @__PURE__ */ rt("px"), xa = /* @__PURE__ */ rt("vh"), Pa = /* @__PURE__ */ rt("vw"), Rn = J(j({}, Se), {
936
+ }), Te = /* @__PURE__ */ rt("deg"), Se = /* @__PURE__ */ rt("%"), Q = /* @__PURE__ */ rt("px"), ka = /* @__PURE__ */ rt("vh"), Ma = /* @__PURE__ */ rt("vw"), Sn = X(j({}, Se), {
937
937
  parse: (n) => Se.parse(n) / 100,
938
938
  transform: (n) => Se.transform(n * 100)
939
939
  }), ke = {
940
- test: /* @__PURE__ */ en("hsl", "hue"),
941
- parse: /* @__PURE__ */ Rr("hue", "saturation", "lightness"),
940
+ test: /* @__PURE__ */ tn("hsl", "hue"),
941
+ parse: /* @__PURE__ */ Sr("hue", "saturation", "lightness"),
942
942
  transform: ({ hue: n, saturation: t, lightness: e, alpha: r = 1 }) => "hsla(" + Math.round(n) + ", " + Se.transform($e(t)) + ", " + Se.transform($e(e)) + ", " + $e(Xe.transform(r)) + ")"
943
943
  }, ue = {
944
- test: (n) => Oe.test(n) || Pt.test(n) || ke.test(n),
945
- parse: (n) => Oe.test(n) ? Oe.parse(n) : ke.test(n) ? ke.parse(n) : Pt.parse(n),
944
+ test: (n) => Oe.test(n) || Rt.test(n) || ke.test(n),
945
+ parse: (n) => Oe.test(n) ? Oe.parse(n) : ke.test(n) ? ke.parse(n) : Rt.parse(n),
946
946
  transform: (n) => typeof n == "string" ? n : n.hasOwnProperty("red") ? Oe.transform(n) : ke.transform(n)
947
- }, Ra = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
948
- function ka(n) {
947
+ }, Sa = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
948
+ function Da(n) {
949
949
  var t, e;
950
- return isNaN(n) && typeof n == "string" && (((t = n.match(Jt)) == null ? void 0 : t.length) || 0) + (((e = n.match(Ra)) == null ? void 0 : e.length) || 0) > 0;
950
+ return isNaN(n) && typeof n == "string" && (((t = n.match(en)) == null ? void 0 : t.length) || 0) + (((e = n.match(Sa)) == null ? void 0 : e.length) || 0) > 0;
951
951
  }
952
- const kr = "number", Mr = "color", Ma = "var", Sa = "var(", kn = "${}", Da = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
952
+ const Dr = "number", Vr = "color", Va = "var", Fa = "var(", Dn = "${}", Ua = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
953
953
  function Je(n) {
954
954
  const t = n.toString(), e = [], r = {
955
955
  color: [],
@@ -957,46 +957,46 @@ function Je(n) {
957
957
  var: []
958
958
  }, i = [];
959
959
  let a = 0;
960
- const o = t.replace(Da, (l) => (ue.test(l) ? (r.color.push(a), i.push(Mr), e.push(ue.parse(l))) : l.startsWith(Sa) ? (r.var.push(a), i.push(Ma), e.push(l)) : (r.number.push(a), i.push(kr), e.push(parseFloat(l))), ++a, kn)).split(kn);
960
+ const o = t.replace(Ua, (l) => (ue.test(l) ? (r.color.push(a), i.push(Vr), e.push(ue.parse(l))) : l.startsWith(Fa) ? (r.var.push(a), i.push(Va), e.push(l)) : (r.number.push(a), i.push(Dr), e.push(parseFloat(l))), ++a, Dn)).split(Dn);
961
961
  return { values: e, split: o, indexes: r, types: i };
962
962
  }
963
- function Sr(n) {
963
+ function Fr(n) {
964
964
  return Je(n).values;
965
965
  }
966
- function Dr(n) {
966
+ function Ur(n) {
967
967
  const { split: t, types: e } = Je(n), r = t.length;
968
968
  return (i) => {
969
969
  let a = "";
970
970
  for (let s = 0; s < r; s++)
971
971
  if (a += t[s], i[s] !== void 0) {
972
972
  const o = e[s];
973
- o === kr ? a += $e(i[s]) : o === Mr ? a += ue.transform(i[s]) : a += i[s];
973
+ o === Dr ? a += $e(i[s]) : o === Vr ? a += ue.transform(i[s]) : a += i[s];
974
974
  }
975
975
  return a;
976
976
  };
977
977
  }
978
- const Va = (n) => typeof n == "number" ? 0 : n;
979
- function Fa(n) {
980
- const t = Sr(n);
981
- return Dr(n)(t.map(Va));
978
+ const Ba = (n) => typeof n == "number" ? 0 : n;
979
+ function ja(n) {
980
+ const t = Fr(n);
981
+ return Ur(n)(t.map(Ba));
982
982
  }
983
983
  const je = {
984
- test: ka,
985
- parse: Sr,
986
- createTransformer: Dr,
987
- getAnimatableNone: Fa
984
+ test: Da,
985
+ parse: Fr,
986
+ createTransformer: Ur,
987
+ getAnimatableNone: ja
988
988
  };
989
- function Et(n, t, e) {
989
+ function _t(n, t, e) {
990
990
  return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? n + (t - n) * 6 * e : e < 1 / 2 ? t : e < 2 / 3 ? n + (t - n) * (2 / 3 - e) * 6 : n;
991
991
  }
992
- function Ua({ hue: n, saturation: t, lightness: e, alpha: r }) {
992
+ function za({ hue: n, saturation: t, lightness: e, alpha: r }) {
993
993
  n /= 360, t /= 100, e /= 100;
994
994
  let i = 0, a = 0, s = 0;
995
995
  if (!t)
996
996
  i = a = s = e;
997
997
  else {
998
998
  const o = e < 0.5 ? e * (1 + t) : e + t - e * t, l = 2 * e - o;
999
- i = Et(l, o, n + 1 / 3), a = Et(l, o, n), s = Et(l, o, n - 1 / 3);
999
+ i = _t(l, o, n + 1 / 3), a = _t(l, o, n), s = _t(l, o, n - 1 / 3);
1000
1000
  }
1001
1001
  return {
1002
1002
  red: Math.round(i * 255),
@@ -1008,53 +1008,53 @@ function Ua({ hue: n, saturation: t, lightness: e, alpha: r }) {
1008
1008
  function ft(n, t) {
1009
1009
  return (e) => e > 0 ? t : n;
1010
1010
  }
1011
- const _t = (n, t, e) => {
1011
+ const Ct = (n, t, e) => {
1012
1012
  const r = n * n, i = e * (t * t - r) + r;
1013
1013
  return i < 0 ? 0 : Math.sqrt(i);
1014
- }, Ba = [Pt, Oe, ke], ja = (n) => Ba.find((t) => t.test(n));
1015
- function Mn(n) {
1016
- const t = ja(n);
1014
+ }, Ka = [Rt, Oe, ke], qa = (n) => Ka.find((t) => t.test(n));
1015
+ function Vn(n) {
1016
+ const t = qa(n);
1017
1017
  if (nt(!!t, `'${n}' is not an animatable color. Use the equivalent color code instead.`), !t)
1018
1018
  return !1;
1019
1019
  let e = t.parse(n);
1020
- return t === ke && (e = Ua(e)), e;
1020
+ return t === ke && (e = za(e)), e;
1021
1021
  }
1022
- const Sn = (n, t) => {
1023
- const e = Mn(n), r = Mn(t);
1022
+ const Fn = (n, t) => {
1023
+ const e = Vn(n), r = Vn(t);
1024
1024
  if (!e || !r)
1025
1025
  return ft(n, t);
1026
1026
  const i = j({}, e);
1027
- return (a) => (i.red = _t(e.red, r.red, a), i.green = _t(e.green, r.green, a), i.blue = _t(e.blue, r.blue, a), i.alpha = tt(e.alpha, r.alpha, a), Oe.transform(i));
1028
- }, Rt = /* @__PURE__ */ new Set(["none", "hidden"]);
1029
- function za(n, t) {
1030
- return Rt.has(n) ? (e) => e <= 0 ? n : t : (e) => e >= 1 ? t : n;
1027
+ return (a) => (i.red = Ct(e.red, r.red, a), i.green = Ct(e.green, r.green, a), i.blue = Ct(e.blue, r.blue, a), i.alpha = tt(e.alpha, r.alpha, a), Oe.transform(i));
1028
+ }, kt = /* @__PURE__ */ new Set(["none", "hidden"]);
1029
+ function Ha(n, t) {
1030
+ return kt.has(n) ? (e) => e <= 0 ? n : t : (e) => e >= 1 ? t : n;
1031
1031
  }
1032
- const Ka = (n, t) => (e) => t(n(e)), tn = (...n) => n.reduce(Ka);
1033
- function qa(n, t) {
1032
+ const Wa = (n, t) => (e) => t(n(e)), nn = (...n) => n.reduce(Wa);
1033
+ function Ga(n, t) {
1034
1034
  return (e) => tt(n, t, e);
1035
1035
  }
1036
- function nn(n) {
1037
- return typeof n == "number" ? qa : typeof n == "string" ? Xt(n) ? ft : ue.test(n) ? Sn : Ga : Array.isArray(n) ? Vr : typeof n == "object" ? ue.test(n) ? Sn : Ha : ft;
1036
+ function rn(n) {
1037
+ return typeof n == "number" ? Ga : typeof n == "string" ? Jt(n) ? ft : ue.test(n) ? Fn : Qa : Array.isArray(n) ? Br : typeof n == "object" ? ue.test(n) ? Fn : Ya : ft;
1038
1038
  }
1039
- function Vr(n, t) {
1040
- const e = [...n], r = e.length, i = n.map((a, s) => nn(a)(a, t[s]));
1039
+ function Br(n, t) {
1040
+ const e = [...n], r = e.length, i = n.map((a, s) => rn(a)(a, t[s]));
1041
1041
  return (a) => {
1042
1042
  for (let s = 0; s < r; s++)
1043
1043
  e[s] = i[s](a);
1044
1044
  return e;
1045
1045
  };
1046
1046
  }
1047
- function Ha(n, t) {
1047
+ function Ya(n, t) {
1048
1048
  const e = j(j({}, n), t), r = {};
1049
1049
  for (const i in e)
1050
- n[i] !== void 0 && t[i] !== void 0 && (r[i] = nn(n[i])(n[i], t[i]));
1050
+ n[i] !== void 0 && t[i] !== void 0 && (r[i] = rn(n[i])(n[i], t[i]));
1051
1051
  return (i) => {
1052
1052
  for (const a in r)
1053
1053
  e[a] = r[a](i);
1054
1054
  return e;
1055
1055
  };
1056
1056
  }
1057
- function Wa(n, t) {
1057
+ function $a(n, t) {
1058
1058
  var i;
1059
1059
  const e = [], r = { color: 0, var: 0, number: 0 };
1060
1060
  for (let a = 0; a < t.values.length; a++) {
@@ -1063,34 +1063,34 @@ function Wa(n, t) {
1063
1063
  }
1064
1064
  return e;
1065
1065
  }
1066
- const Ga = (n, t) => {
1066
+ const Qa = (n, t) => {
1067
1067
  const e = je.createTransformer(t), r = Je(n), i = Je(t);
1068
- return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Rt.has(n) && !i.values.length || Rt.has(t) && !r.values.length ? za(n, t) : tn(Vr(Wa(r, i), i.values), e) : (nt(!0, `Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), ft(n, t));
1068
+ return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? kt.has(n) && !i.values.length || kt.has(t) && !r.values.length ? Ha(n, t) : nn(Br($a(r, i), i.values), e) : (nt(!0, `Complex values '${n}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), ft(n, t));
1069
1069
  };
1070
- function Fr(n, t, e) {
1071
- return typeof n == "number" && typeof t == "number" && typeof e == "number" ? tt(n, t, e) : nn(n)(n, t);
1070
+ function jr(n, t, e) {
1071
+ return typeof n == "number" && typeof t == "number" && typeof e == "number" ? tt(n, t, e) : rn(n)(n, t);
1072
1072
  }
1073
- const Ya = (n) => {
1073
+ const Za = (n) => {
1074
1074
  const t = ({ timestamp: e }) => n(e);
1075
1075
  return {
1076
1076
  start: (e = !0) => we.update(t, e),
1077
- stop: () => xt(t),
1077
+ stop: () => Pt(t),
1078
1078
  /**
1079
1079
  * If we're processing this frame we can use the
1080
1080
  * framelocked timestamp to keep things in sync.
1081
1081
  */
1082
1082
  now: () => mt.isProcessing ? mt.timestamp : ve.now()
1083
1083
  };
1084
- }, Ur = (n, t, e = 10) => {
1084
+ }, zr = (n, t, e = 10) => {
1085
1085
  let r = "";
1086
1086
  const i = Math.max(Math.round(t / e), 2);
1087
1087
  for (let a = 0; a < i; a++)
1088
1088
  r += n(a / (i - 1)) + ", ";
1089
1089
  return `linear(${r.substring(0, r.length - 2)})`;
1090
- }, $a = 5;
1091
- function Br(n, t, e) {
1092
- const r = Math.max(t - $a, 0);
1093
- return Nr(e - n(r), t - r);
1090
+ }, Xa = 5;
1091
+ function Kr(n, t, e) {
1092
+ const r = Math.max(t - Xa, 0);
1093
+ return Pr(e - n(r), t - r);
1094
1094
  }
1095
1095
  const ie = {
1096
1096
  // Default spring physics
@@ -1120,17 +1120,17 @@ const ie = {
1120
1120
  // in seconds
1121
1121
  minDamping: 0.05,
1122
1122
  maxDamping: 1
1123
- }, Dn = 1e-3;
1124
- function Qa({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie.velocity, mass: r = ie.mass }) {
1123
+ }, Un = 1e-3;
1124
+ function Ja({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie.velocity, mass: r = ie.mass }) {
1125
1125
  let i, a;
1126
1126
  nt(n <= /* @__PURE__ */ ye(ie.maxDuration), "Spring duration must be 10 seconds or less");
1127
1127
  let s = 1 - t;
1128
1128
  s = Pe(ie.minDamping, ie.maxDamping, s), n = Pe(ie.minDuration, ie.maxDuration, /* @__PURE__ */ _e(n)), s < 1 ? (i = (c) => {
1129
- const d = c * s, u = d * n, h = d - e, p = kt(c, s), m = Math.exp(-u);
1130
- return Dn - h / p * m;
1129
+ const d = c * s, u = d * n, h = d - e, p = Mt(c, s), m = Math.exp(-u);
1130
+ return Un - h / p * m;
1131
1131
  }, a = (c) => {
1132
- const u = c * s * n, h = u * e + e, p = Math.pow(s, 2) * Math.pow(c, 2) * n, m = Math.exp(-u), f = kt(Math.pow(c, 2), s);
1133
- return (-i(c) + Dn > 0 ? -1 : 1) * ((h - p) * m) / f;
1132
+ const u = c * s * n, h = u * e + e, p = Math.pow(s, 2) * Math.pow(c, 2) * n, m = Math.exp(-u), f = Mt(Math.pow(c, 2), s);
1133
+ return (-i(c) + Un > 0 ? -1 : 1) * ((h - p) * m) / f;
1134
1134
  }) : (i = (c) => {
1135
1135
  const d = Math.exp(-c * n), u = (c - e) * n + 1;
1136
1136
  return -1e-3 + d * u;
@@ -1138,7 +1138,7 @@ function Qa({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie
1138
1138
  const d = Math.exp(-c * n), u = (e - c) * (n * n);
1139
1139
  return d * u;
1140
1140
  });
1141
- const o = 5 / n, l = Xa(i, a, o);
1141
+ const o = 5 / n, l = ts(i, a, o);
1142
1142
  if (n = /* @__PURE__ */ ye(n), isNaN(l))
1143
1143
  return {
1144
1144
  stiffness: ie.stiffness,
@@ -1154,21 +1154,21 @@ function Qa({ duration: n = ie.duration, bounce: t = ie.bounce, velocity: e = ie
1154
1154
  };
1155
1155
  }
1156
1156
  }
1157
- const Za = 12;
1158
- function Xa(n, t, e) {
1157
+ const es = 12;
1158
+ function ts(n, t, e) {
1159
1159
  let r = e;
1160
- for (let i = 1; i < Za; i++)
1160
+ for (let i = 1; i < es; i++)
1161
1161
  r = r - n(r) / t(r);
1162
1162
  return r;
1163
1163
  }
1164
- function kt(n, t) {
1164
+ function Mt(n, t) {
1165
1165
  return n * Math.sqrt(1 - t * t);
1166
1166
  }
1167
- const Ja = ["duration", "bounce"], es = ["stiffness", "damping", "mass"];
1168
- function Vn(n, t) {
1167
+ const ns = ["duration", "bounce"], rs = ["stiffness", "damping", "mass"];
1168
+ function Bn(n, t) {
1169
1169
  return t.some((e) => n[e] !== void 0);
1170
1170
  }
1171
- function ts(n) {
1171
+ function is(n) {
1172
1172
  let t = j({
1173
1173
  velocity: ie.velocity,
1174
1174
  stiffness: ie.stiffness,
@@ -1176,17 +1176,17 @@ function ts(n) {
1176
1176
  mass: ie.mass,
1177
1177
  isResolvedFromDuration: !1
1178
1178
  }, n);
1179
- if (!Vn(n, es) && Vn(n, Ja))
1179
+ if (!Bn(n, rs) && Bn(n, ns))
1180
1180
  if (n.visualDuration) {
1181
1181
  const e = n.visualDuration, r = 2 * Math.PI / (e * 1.2), i = r * r, a = 2 * Pe(0.05, 1, 1 - (n.bounce || 0)) * Math.sqrt(i);
1182
- t = J(j({}, t), {
1182
+ t = X(j({}, t), {
1183
1183
  mass: ie.mass,
1184
1184
  stiffness: i,
1185
1185
  damping: a
1186
1186
  });
1187
1187
  } else {
1188
- const e = Qa(n);
1189
- t = J(j(j({}, t), e), {
1188
+ const e = Ja(n);
1189
+ t = X(j(j({}, t), e), {
1190
1190
  mass: ie.mass
1191
1191
  }), t.isResolvedFromDuration = !0;
1192
1192
  }
@@ -1199,13 +1199,13 @@ function et(n = ie.visualDuration, t = ie.bounce) {
1199
1199
  bounce: t
1200
1200
  } : n;
1201
1201
  let { restSpeed: r, restDelta: i } = e;
1202
- const a = e.keyframes[0], s = e.keyframes[e.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: d, duration: u, velocity: h, isResolvedFromDuration: p } = ts(J(j({}, e), {
1202
+ const a = e.keyframes[0], s = e.keyframes[e.keyframes.length - 1], o = { done: !1, value: a }, { stiffness: l, damping: c, mass: d, duration: u, velocity: h, isResolvedFromDuration: p } = is(X(j({}, e), {
1203
1203
  velocity: -/* @__PURE__ */ _e(e.velocity || 0)
1204
1204
  })), m = h || 0, f = c / (2 * Math.sqrt(l * d)), v = s - a, y = /* @__PURE__ */ _e(Math.sqrt(l / d)), w = Math.abs(v) < 5;
1205
1205
  r || (r = w ? ie.restSpeed.granular : ie.restSpeed.default), i || (i = w ? ie.restDelta.granular : ie.restDelta.default);
1206
1206
  let T;
1207
1207
  if (f < 1) {
1208
- const C = kt(y, f);
1208
+ const C = Mt(y, f);
1209
1209
  T = (I) => {
1210
1210
  const O = Math.exp(-f * y * I);
1211
1211
  return s - O * ((m + f * y * v) / C * Math.sin(C * I) + v * Math.cos(C * I));
@@ -1227,14 +1227,14 @@ function et(n = ie.visualDuration, t = ie.bounce) {
1227
1227
  o.done = C >= u;
1228
1228
  else {
1229
1229
  let O = C === 0 ? m : 0;
1230
- f < 1 && (O = C === 0 ? /* @__PURE__ */ ye(m) : Br(T, C, I));
1230
+ f < 1 && (O = C === 0 ? /* @__PURE__ */ ye(m) : Kr(T, C, I));
1231
1231
  const R = Math.abs(O) <= r, U = Math.abs(s - I) <= i;
1232
1232
  o.done = R && U;
1233
1233
  }
1234
1234
  return o.value = o.done ? s : I, o;
1235
1235
  },
1236
1236
  toString: () => {
1237
- const C = Math.min(Qt(x), ht), I = Ur((O) => x.next(C * O).value, C, 30);
1237
+ const C = Math.min(Zt(x), ht), I = zr((O) => x.next(C * O).value, C, 30);
1238
1238
  return C + "ms " + I;
1239
1239
  },
1240
1240
  toTransition: () => {
@@ -1243,10 +1243,10 @@ function et(n = ie.visualDuration, t = ie.bounce) {
1243
1243
  return x;
1244
1244
  }
1245
1245
  et.applyToOptions = (n) => {
1246
- const t = wr(n, 100, et);
1246
+ const t = Or(n, 100, et);
1247
1247
  return n.ease = t.ease, n.duration = /* @__PURE__ */ ye(t.duration), n.type = "keyframes", n;
1248
1248
  };
1249
- function Mt({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: s, min: o, max: l, restDelta: c = 0.5, restSpeed: d }) {
1249
+ function St({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: s, min: o, max: l, restDelta: c = 0.5, restSpeed: d }) {
1250
1250
  const u = n[0], h = {
1251
1251
  done: !1,
1252
1252
  value: u
@@ -1262,7 +1262,7 @@ function Mt({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
1262
1262
  const O = (R) => {
1263
1263
  p(h.value) && (C = R, I = et({
1264
1264
  keyframes: [h.value, m(h.value)],
1265
- velocity: Br(T, R, h.value),
1265
+ velocity: Kr(T, R, h.value),
1266
1266
  // TODO: This should be passing * 1000
1267
1267
  damping: i,
1268
1268
  stiffness: a,
@@ -1278,19 +1278,19 @@ function Mt({ keyframes: n, velocity: t = 0, power: e = 0.8, timeConstant: r = 3
1278
1278
  }
1279
1279
  };
1280
1280
  }
1281
- function ns(n, t, e) {
1282
- const r = [], i = e || Ae.mix || Fr, a = n.length - 1;
1281
+ function as(n, t, e) {
1282
+ const r = [], i = e || Ae.mix || jr, a = n.length - 1;
1283
1283
  for (let s = 0; s < a; s++) {
1284
1284
  let o = i(n[s], n[s + 1]);
1285
1285
  if (t) {
1286
1286
  const l = Array.isArray(t) ? t[s] || Ve : t;
1287
- o = tn(l, o);
1287
+ o = nn(l, o);
1288
1288
  }
1289
1289
  r.push(o);
1290
1290
  }
1291
1291
  return r;
1292
1292
  }
1293
- function rs(n, t, { clamp: e = !0, ease: r, mixer: i } = {}) {
1293
+ function ss(n, t, { clamp: e = !0, ease: r, mixer: i } = {}) {
1294
1294
  const a = n.length;
1295
1295
  if (Ce(a === t.length, "Both input and output ranges must be the same length"), a === 1)
1296
1296
  return () => t[0];
@@ -1298,92 +1298,92 @@ function rs(n, t, { clamp: e = !0, ease: r, mixer: i } = {}) {
1298
1298
  return () => t[1];
1299
1299
  const s = n[0] === n[1];
1300
1300
  n[0] > n[a - 1] && (n = [...n].reverse(), t = [...t].reverse());
1301
- const o = ns(t, r, i), l = o.length, c = (d) => {
1301
+ const o = as(t, r, i), l = o.length, c = (d) => {
1302
1302
  if (s && d < n[0])
1303
1303
  return t[0];
1304
1304
  let u = 0;
1305
1305
  if (l > 1)
1306
1306
  for (; u < n.length - 2 && !(d < n[u + 1]); u++)
1307
1307
  ;
1308
- const h = /* @__PURE__ */ Yt(n[u], n[u + 1], d);
1308
+ const h = /* @__PURE__ */ $t(n[u], n[u + 1], d);
1309
1309
  return o[u](h);
1310
1310
  };
1311
1311
  return e ? (d) => c(Pe(n[0], n[a - 1], d)) : c;
1312
1312
  }
1313
- function is(n, t) {
1313
+ function os(n, t) {
1314
1314
  return n.map((e) => e * t);
1315
1315
  }
1316
- const jr = (n, t, e) => (((1 - 3 * e + 3 * t) * n + (3 * e - 6 * t)) * n + 3 * t) * n, as = 1e-7, ss = 12;
1317
- function os(n, t, e, r, i) {
1316
+ const qr = (n, t, e) => (((1 - 3 * e + 3 * t) * n + (3 * e - 6 * t)) * n + 3 * t) * n, ls = 1e-7, cs = 12;
1317
+ function ds(n, t, e, r, i) {
1318
1318
  let a, s, o = 0;
1319
1319
  do
1320
- s = t + (e - t) / 2, a = jr(s, r, i) - n, a > 0 ? e = s : t = s;
1321
- while (Math.abs(a) > as && ++o < ss);
1320
+ s = t + (e - t) / 2, a = qr(s, r, i) - n, a > 0 ? e = s : t = s;
1321
+ while (Math.abs(a) > ls && ++o < cs);
1322
1322
  return s;
1323
1323
  }
1324
1324
  function it(n, t, e, r) {
1325
1325
  if (n === t && e === r)
1326
1326
  return Ve;
1327
- const i = (a) => os(a, 0, 1, n, e);
1328
- return (a) => a === 0 || a === 1 ? a : jr(i(a), t, r);
1327
+ const i = (a) => ds(a, 0, 1, n, e);
1328
+ return (a) => a === 0 || a === 1 ? a : qr(i(a), t, r);
1329
1329
  }
1330
- const ls = /* @__PURE__ */ it(0.42, 0, 1, 1), cs = /* @__PURE__ */ it(0, 0, 0.58, 1), zr = /* @__PURE__ */ it(0.42, 0, 0.58, 1), Kr = (n) => (t) => t <= 0.5 ? n(2 * t) / 2 : (2 - n(2 * (1 - t))) / 2, qr = (n) => (t) => 1 - n(1 - t), Hr = /* @__PURE__ */ it(0.33, 1.53, 0.69, 0.99), rn = /* @__PURE__ */ qr(Hr), Wr = /* @__PURE__ */ Kr(rn), Gr = (n) => (n *= 2) < 1 ? 0.5 * rn(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), an = (n) => 1 - Math.sin(Math.acos(n)), ds = qr(an), Yr = Kr(an), $r = (n) => Array.isArray(n) && typeof n[0] == "number", Fn = {
1330
+ const us = /* @__PURE__ */ it(0.42, 0, 1, 1), ps = /* @__PURE__ */ it(0, 0, 0.58, 1), Hr = /* @__PURE__ */ it(0.42, 0, 0.58, 1), Wr = (n) => (t) => t <= 0.5 ? n(2 * t) / 2 : (2 - n(2 * (1 - t))) / 2, Gr = (n) => (t) => 1 - n(1 - t), Yr = /* @__PURE__ */ it(0.33, 1.53, 0.69, 0.99), an = /* @__PURE__ */ Gr(Yr), $r = /* @__PURE__ */ Wr(an), Qr = (n) => (n *= 2) < 1 ? 0.5 * an(n) : 0.5 * (2 - Math.pow(2, -10 * (n - 1))), sn = (n) => 1 - Math.sin(Math.acos(n)), hs = Gr(sn), Zr = Wr(sn), Xr = (n) => Array.isArray(n) && typeof n[0] == "number", jn = {
1331
1331
  linear: Ve,
1332
- easeIn: ls,
1333
- easeInOut: zr,
1334
- easeOut: cs,
1335
- circIn: an,
1336
- circInOut: Yr,
1337
- circOut: ds,
1338
- backIn: rn,
1339
- backInOut: Wr,
1340
- backOut: Hr,
1341
- anticipate: Gr
1342
- }, us = (n) => typeof n == "string", Un = (n) => {
1343
- if ($r(n)) {
1332
+ easeIn: us,
1333
+ easeInOut: Hr,
1334
+ easeOut: ps,
1335
+ circIn: sn,
1336
+ circInOut: Zr,
1337
+ circOut: hs,
1338
+ backIn: an,
1339
+ backInOut: $r,
1340
+ backOut: Yr,
1341
+ anticipate: Qr
1342
+ }, ms = (n) => typeof n == "string", zn = (n) => {
1343
+ if (Xr(n)) {
1344
1344
  Ce(n.length === 4, "Cubic bezier arrays must contain four numerical values.");
1345
1345
  const [t, e, r, i] = n;
1346
1346
  return it(t, e, r, i);
1347
- } else if (us(n))
1348
- return Ce(Fn[n] !== void 0, `Invalid easing type '${n}'`), Fn[n];
1347
+ } else if (ms(n))
1348
+ return Ce(jn[n] !== void 0, `Invalid easing type '${n}'`), jn[n];
1349
1349
  return n;
1350
1350
  };
1351
- function ps(n, t) {
1352
- return n.map(() => t || zr).splice(0, n.length - 1);
1351
+ function fs(n, t) {
1352
+ return n.map(() => t || Hr).splice(0, n.length - 1);
1353
1353
  }
1354
1354
  function Me({ duration: n = 300, keyframes: t, times: e, ease: r = "easeInOut" }) {
1355
- const i = br(r) ? r.map(Un) : Un(r), a = {
1355
+ const i = Cr(r) ? r.map(zn) : zn(r), a = {
1356
1356
  done: !1,
1357
1357
  value: t[0]
1358
- }, s = is(
1358
+ }, s = os(
1359
1359
  // Only use the provided offsets if they're the correct length
1360
1360
  // TODO Maybe we should warn here if there's a length mismatch
1361
- e && e.length === t.length ? e : Ar(t),
1361
+ e && e.length === t.length ? e : Ir(t),
1362
1362
  n
1363
- ), o = rs(s, t, {
1364
- ease: Array.isArray(i) ? i : ps(t, i)
1363
+ ), o = ss(s, t, {
1364
+ ease: Array.isArray(i) ? i : fs(t, i)
1365
1365
  });
1366
1366
  return {
1367
1367
  calculatedDuration: n,
1368
1368
  next: (l) => (a.value = o(l), a.done = l >= n, a)
1369
1369
  };
1370
1370
  }
1371
- const hs = (n) => n !== null;
1372
- function sn(n, { repeat: t, repeatType: e = "loop" }, r, i = 1) {
1373
- const a = n.filter(hs), o = i < 0 || t && e !== "loop" && t % 2 === 1 ? 0 : a.length - 1;
1371
+ const vs = (n) => n !== null;
1372
+ function on(n, { repeat: t, repeatType: e = "loop" }, r, i = 1) {
1373
+ const a = n.filter(vs), o = i < 0 || t && e !== "loop" && t % 2 === 1 ? 0 : a.length - 1;
1374
1374
  return !o || r === void 0 ? a[o] : r;
1375
1375
  }
1376
- const ms = {
1377
- decay: Mt,
1378
- inertia: Mt,
1376
+ const gs = {
1377
+ decay: St,
1378
+ inertia: St,
1379
1379
  tween: Me,
1380
1380
  keyframes: Me,
1381
1381
  spring: et
1382
1382
  };
1383
- function Qr(n) {
1384
- typeof n.type == "string" && (n.type = ms[n.type]);
1383
+ function Jr(n) {
1384
+ typeof n.type == "string" && (n.type = gs[n.type]);
1385
1385
  }
1386
- class on {
1386
+ class ln {
1387
1387
  constructor() {
1388
1388
  this.updateFinished();
1389
1389
  }
@@ -1407,8 +1407,8 @@ class on {
1407
1407
  return this.finished.then(t, e);
1408
1408
  }
1409
1409
  }
1410
- const fs = (n) => n / 100;
1411
- class ln extends on {
1410
+ const ys = (n) => n / 100;
1411
+ class cn extends ln {
1412
1412
  constructor(t) {
1413
1413
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
1414
1414
  var r, i;
@@ -1418,16 +1418,16 @@ class ln extends on {
1418
1418
  }
1419
1419
  initAnimation() {
1420
1420
  const { options: t } = this;
1421
- Qr(t);
1421
+ Jr(t);
1422
1422
  const { type: e = Me, repeat: r = 0, repeatDelay: i = 0, repeatType: a, velocity: s = 0 } = t;
1423
1423
  let { keyframes: o } = t;
1424
1424
  const l = e || Me;
1425
- process.env.NODE_ENV !== "production" && l !== Me && Ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Me && typeof o[0] != "number" && (this.mixKeyframes = tn(fs, Fr(o[0], o[1])), o = [0, 100]);
1426
- const c = l(J(j({}, t), { keyframes: o }));
1427
- a === "mirror" && (this.mirroredGenerator = l(J(j({}, t), {
1425
+ process.env.NODE_ENV !== "production" && l !== Me && Ce(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`), l !== Me && typeof o[0] != "number" && (this.mixKeyframes = nn(ys, jr(o[0], o[1])), o = [0, 100]);
1426
+ const c = l(X(j({}, t), { keyframes: o }));
1427
+ a === "mirror" && (this.mirroredGenerator = l(X(j({}, t), {
1428
1428
  keyframes: [...o].reverse(),
1429
1429
  velocity: -s
1430
- }))), c.calculatedDuration === null && (c.calculatedDuration = Qt(c));
1430
+ }))), c.calculatedDuration === null && (c.calculatedDuration = Zt(c));
1431
1431
  const { calculatedDuration: d } = c;
1432
1432
  this.calculatedDuration = d, this.resolvedDuration = d + i, this.totalDuration = this.resolvedDuration * (r + 1) - i, this.generator = c;
1433
1433
  }
@@ -1454,7 +1454,7 @@ class ln extends on {
1454
1454
  let { done: I } = C;
1455
1455
  !w && l !== null && (I = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
1456
1456
  const O = this.holdTime === null && (this.state === "finished" || this.state === "running" && I);
1457
- return O && m !== Mt && (C.value = sn(d, this.options, v, this.speed)), f && f(C.value), O && this.finish(), C;
1457
+ return O && m !== St && (C.value = on(d, this.options, v, this.speed)), f && f(C.value), O && this.finish(), C;
1458
1458
  }
1459
1459
  /**
1460
1460
  * Allows the returned animation to be awaited or promise-chained. Currently
@@ -1486,7 +1486,7 @@ class ln extends on {
1486
1486
  var i, a;
1487
1487
  if (this.isStopped)
1488
1488
  return;
1489
- const { driver: t = Ya, startTime: e } = this.options;
1489
+ const { driver: t = Za, startTime: e } = this.options;
1490
1490
  this.driver || (this.driver = t((s) => this.tick(s))), (a = (i = this.options).onPlay) == null || a.call(i);
1491
1491
  const r = this.driver.now();
1492
1492
  this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = e != null ? e : r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
@@ -1519,15 +1519,15 @@ class ln extends on {
1519
1519
  return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (e = this.driver) == null || e.stop(), t.observe(this);
1520
1520
  }
1521
1521
  }
1522
- function vs(n) {
1522
+ function bs(n) {
1523
1523
  var t;
1524
1524
  for (let e = 1; e < n.length; e++)
1525
1525
  (t = n[e]) != null || (n[e] = n[e - 1]);
1526
1526
  }
1527
- const Ne = (n) => n * 180 / Math.PI, St = (n) => {
1527
+ const Ne = (n) => n * 180 / Math.PI, Dt = (n) => {
1528
1528
  const t = Ne(Math.atan2(n[1], n[0]));
1529
- return Dt(t);
1530
- }, gs = {
1529
+ return Vt(t);
1530
+ }, Es = {
1531
1531
  x: 4,
1532
1532
  y: 5,
1533
1533
  translateX: 4,
@@ -1535,59 +1535,59 @@ const Ne = (n) => n * 180 / Math.PI, St = (n) => {
1535
1535
  scaleX: 0,
1536
1536
  scaleY: 3,
1537
1537
  scale: (n) => (Math.abs(n[0]) + Math.abs(n[3])) / 2,
1538
- rotate: St,
1539
- rotateZ: St,
1538
+ rotate: Dt,
1539
+ rotateZ: Dt,
1540
1540
  skewX: (n) => Ne(Math.atan(n[1])),
1541
1541
  skewY: (n) => Ne(Math.atan(n[2])),
1542
1542
  skew: (n) => (Math.abs(n[1]) + Math.abs(n[2])) / 2
1543
- }, Dt = (n) => (n = n % 360, n < 0 && (n += 360), n), Bn = St, jn = (n) => Math.sqrt(n[0] * n[0] + n[1] * n[1]), zn = (n) => Math.sqrt(n[4] * n[4] + n[5] * n[5]), ys = {
1543
+ }, Vt = (n) => (n = n % 360, n < 0 && (n += 360), n), Kn = Dt, qn = (n) => Math.sqrt(n[0] * n[0] + n[1] * n[1]), Hn = (n) => Math.sqrt(n[4] * n[4] + n[5] * n[5]), _s = {
1544
1544
  x: 12,
1545
1545
  y: 13,
1546
1546
  z: 14,
1547
1547
  translateX: 12,
1548
1548
  translateY: 13,
1549
1549
  translateZ: 14,
1550
- scaleX: jn,
1551
- scaleY: zn,
1552
- scale: (n) => (jn(n) + zn(n)) / 2,
1553
- rotateX: (n) => Dt(Ne(Math.atan2(n[6], n[5]))),
1554
- rotateY: (n) => Dt(Ne(Math.atan2(-n[2], n[0]))),
1555
- rotateZ: Bn,
1556
- rotate: Bn,
1550
+ scaleX: qn,
1551
+ scaleY: Hn,
1552
+ scale: (n) => (qn(n) + Hn(n)) / 2,
1553
+ rotateX: (n) => Vt(Ne(Math.atan2(n[6], n[5]))),
1554
+ rotateY: (n) => Vt(Ne(Math.atan2(-n[2], n[0]))),
1555
+ rotateZ: Kn,
1556
+ rotate: Kn,
1557
1557
  skewX: (n) => Ne(Math.atan(n[4])),
1558
1558
  skewY: (n) => Ne(Math.atan(n[1])),
1559
1559
  skew: (n) => (Math.abs(n[1]) + Math.abs(n[4])) / 2
1560
1560
  };
1561
- function Vt(n) {
1561
+ function Ft(n) {
1562
1562
  return n.includes("scale") ? 1 : 0;
1563
1563
  }
1564
- function Ft(n, t) {
1564
+ function Ut(n, t) {
1565
1565
  if (!n || n === "none")
1566
- return Vt(t);
1566
+ return Ft(t);
1567
1567
  const e = n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
1568
1568
  let r, i;
1569
1569
  if (e)
1570
- r = ys, i = e;
1570
+ r = _s, i = e;
1571
1571
  else {
1572
1572
  const o = n.match(/^matrix\(([-\d.e\s,]+)\)$/u);
1573
- r = gs, i = o;
1573
+ r = Es, i = o;
1574
1574
  }
1575
1575
  if (!i)
1576
- return Vt(t);
1577
- const a = r[t], s = i[1].split(",").map(Es);
1576
+ return Ft(t);
1577
+ const a = r[t], s = i[1].split(",").map(As);
1578
1578
  return typeof a == "function" ? a(s) : s[a];
1579
1579
  }
1580
- const bs = (n, t) => {
1580
+ const Cs = (n, t) => {
1581
1581
  const { transform: e = "none" } = getComputedStyle(n);
1582
- return Ft(e, t);
1582
+ return Ut(e, t);
1583
1583
  };
1584
- function Es(n) {
1584
+ function As(n) {
1585
1585
  return parseFloat(n.trim());
1586
1586
  }
1587
- const Kn = (n) => n === Be || n === Q, _s = /* @__PURE__ */ new Set(["x", "y", "z"]), Cs = Fe.filter((n) => !_s.has(n));
1588
- function As(n) {
1587
+ const Wn = (n) => n === Be || n === Q, ws = /* @__PURE__ */ new Set(["x", "y", "z"]), Ts = Fe.filter((n) => !ws.has(n));
1588
+ function Is(n) {
1589
1589
  const t = [];
1590
- return Cs.forEach((e) => {
1590
+ return Ts.forEach((e) => {
1591
1591
  const r = n.getValue(e);
1592
1592
  r !== void 0 && (t.push([e, r.get()]), r.set(e.startsWith("scale") ? 1 : 0));
1593
1593
  }), t;
@@ -1601,18 +1601,18 @@ const Le = {
1601
1601
  bottom: ({ y: n }, { top: t }) => parseFloat(t) + (n.max - n.min),
1602
1602
  right: ({ x: n }, { left: t }) => parseFloat(t) + (n.max - n.min),
1603
1603
  // Transform
1604
- x: (n, { transform: t }) => Ft(t, "x"),
1605
- y: (n, { transform: t }) => Ft(t, "y")
1604
+ x: (n, { transform: t }) => Ut(t, "x"),
1605
+ y: (n, { transform: t }) => Ut(t, "y")
1606
1606
  };
1607
1607
  Le.translateX = Le.x;
1608
1608
  Le.translateY = Le.y;
1609
1609
  const xe = /* @__PURE__ */ new Set();
1610
- let Ut = !1, Bt = !1, jt = !1;
1611
- function Zr() {
1612
- if (Bt) {
1610
+ let Bt = !1, jt = !1, zt = !1;
1611
+ function ei() {
1612
+ if (jt) {
1613
1613
  const n = Array.from(xe).filter((r) => r.needsMeasurement), t = new Set(n.map((r) => r.element)), e = /* @__PURE__ */ new Map();
1614
1614
  t.forEach((r) => {
1615
- const i = As(r);
1615
+ const i = Is(r);
1616
1616
  i.length && (e.set(r, i), r.render());
1617
1617
  }), n.forEach((r) => r.measureInitialState()), t.forEach((r) => {
1618
1618
  r.render();
@@ -1625,22 +1625,22 @@ function Zr() {
1625
1625
  r.suspendedScrollY !== void 0 && window.scrollTo(0, r.suspendedScrollY);
1626
1626
  });
1627
1627
  }
1628
- Bt = !1, Ut = !1, xe.forEach((n) => n.complete(jt)), xe.clear();
1628
+ jt = !1, Bt = !1, xe.forEach((n) => n.complete(zt)), xe.clear();
1629
1629
  }
1630
- function Xr() {
1630
+ function ti() {
1631
1631
  xe.forEach((n) => {
1632
- n.readKeyframes(), n.needsMeasurement && (Bt = !0);
1632
+ n.readKeyframes(), n.needsMeasurement && (jt = !0);
1633
1633
  });
1634
1634
  }
1635
- function ws() {
1636
- jt = !0, Xr(), Zr(), jt = !1;
1635
+ function Os() {
1636
+ zt = !0, ti(), ei(), zt = !1;
1637
1637
  }
1638
- class cn {
1638
+ class dn {
1639
1639
  constructor(t, e, r, i, a, s = !1) {
1640
1640
  this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = e, this.name = r, this.motionValue = i, this.element = a, this.isAsync = s;
1641
1641
  }
1642
1642
  scheduleResolve() {
1643
- this.state = "scheduled", this.isAsync ? (xe.add(this), Ut || (Ut = !0, we.read(Xr), we.resolveKeyframes(Zr))) : (this.readKeyframes(), this.complete());
1643
+ this.state = "scheduled", this.isAsync ? (xe.add(this), Bt || (Bt = !0, we.read(ti), we.resolveKeyframes(ei))) : (this.readKeyframes(), this.complete());
1644
1644
  }
1645
1645
  readKeyframes() {
1646
1646
  const { unresolvedKeyframes: t, name: e, element: r, motionValue: i } = this;
@@ -1654,7 +1654,7 @@ class cn {
1654
1654
  }
1655
1655
  t[0] === void 0 && (t[0] = s), i && a === void 0 && i.set(t[0]);
1656
1656
  }
1657
- vs(t);
1657
+ bs(t);
1658
1658
  }
1659
1659
  setFinalKeyframe() {
1660
1660
  }
@@ -1674,31 +1674,31 @@ class cn {
1674
1674
  this.state === "pending" && this.scheduleResolve();
1675
1675
  }
1676
1676
  }
1677
- const Ts = (n) => n.startsWith("--");
1678
- function Is(n, t, e) {
1679
- Ts(t) ? n.style.setProperty(t, e) : n.style[t] = e;
1677
+ const Ns = (n) => n.startsWith("--");
1678
+ function Ls(n, t, e) {
1679
+ Ns(t) ? n.style.setProperty(t, e) : n.style[t] = e;
1680
1680
  }
1681
1681
  // @__NO_SIDE_EFFECTS__
1682
- function dn(n) {
1682
+ function un(n) {
1683
1683
  let t;
1684
1684
  return () => (t === void 0 && (t = n()), t);
1685
1685
  }
1686
- const Os = /* @__PURE__ */ dn(() => window.ScrollTimeline !== void 0), Ns = {};
1687
- function Ls(n, t) {
1688
- const e = /* @__PURE__ */ dn(n);
1686
+ const xs = /* @__PURE__ */ un(() => window.ScrollTimeline !== void 0), Ps = {};
1687
+ function Rs(n, t) {
1688
+ const e = /* @__PURE__ */ un(n);
1689
1689
  return () => {
1690
1690
  var r;
1691
- return (r = Ns[t]) != null ? r : e();
1691
+ return (r = Ps[t]) != null ? r : e();
1692
1692
  };
1693
1693
  }
1694
- const Jr = /* @__PURE__ */ Ls(() => {
1694
+ const ni = /* @__PURE__ */ Rs(() => {
1695
1695
  try {
1696
1696
  document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1697
1697
  } catch (n) {
1698
1698
  return !1;
1699
1699
  }
1700
1700
  return !0;
1701
- }, "linearEasing"), Ye = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`, qn = {
1701
+ }, "linearEasing"), Ye = ([n, t, e, r]) => `cubic-bezier(${n}, ${t}, ${e}, ${r})`, Gn = {
1702
1702
  linear: "linear",
1703
1703
  ease: "ease",
1704
1704
  easeIn: "ease-in",
@@ -1709,16 +1709,16 @@ const Jr = /* @__PURE__ */ Ls(() => {
1709
1709
  backIn: /* @__PURE__ */ Ye([0.31, 0.01, 0.66, -0.59]),
1710
1710
  backOut: /* @__PURE__ */ Ye([0.33, 1.53, 0.69, 0.99])
1711
1711
  };
1712
- function ei(n, t) {
1712
+ function ri(n, t) {
1713
1713
  if (n)
1714
- return typeof n == "function" ? Jr() ? Ur(n, t) : "ease-out" : $r(n) ? Ye(n) : Array.isArray(n) ? n.map((e) => ei(e, t) || qn.easeOut) : qn[n];
1714
+ return typeof n == "function" ? ni() ? zr(n, t) : "ease-out" : Xr(n) ? Ye(n) : Array.isArray(n) ? n.map((e) => ri(e, t) || Gn.easeOut) : Gn[n];
1715
1715
  }
1716
- function xs(n, t, e, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: s = "loop", ease: o = "easeOut", times: l } = {}, c = void 0) {
1716
+ function ks(n, t, e, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: s = "loop", ease: o = "easeOut", times: l } = {}, c = void 0) {
1717
1717
  const d = {
1718
1718
  [t]: e
1719
1719
  };
1720
1720
  l && (d.offset = l);
1721
- const u = ei(o, i);
1721
+ const u = ri(o, i);
1722
1722
  Array.isArray(u) && (d.easing = u);
1723
1723
  const h = {
1724
1724
  delay: r,
@@ -1730,22 +1730,22 @@ function xs(n, t, e, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatTyp
1730
1730
  };
1731
1731
  return c && (h.pseudoElement = c), n.animate(d, h);
1732
1732
  }
1733
- function Ps(e) {
1733
+ function Ms(e) {
1734
1734
  var r = e, { type: n } = r, t = ge(r, ["type"]);
1735
1735
  var i, a;
1736
- return $t(n) && Jr() ? n.applyToOptions(t) : ((i = t.duration) != null || (t.duration = 300), (a = t.ease) != null || (t.ease = "easeOut"), t);
1736
+ return Qt(n) && ni() ? n.applyToOptions(t) : ((i = t.duration) != null || (t.duration = 300), (a = t.ease) != null || (t.ease = "easeOut"), t);
1737
1737
  }
1738
- class Rs extends on {
1738
+ class Ss extends ln {
1739
1739
  constructor(t) {
1740
1740
  if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1741
1741
  return;
1742
1742
  const { element: e, name: r, keyframes: i, pseudoElement: a, allowFlatten: s = !1, finalKeyframe: o, onComplete: l } = t;
1743
1743
  this.isPseudoElement = !!a, this.allowFlatten = s, this.options = t, Ce(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1744
- const c = Ps(t);
1745
- this.animation = xs(e, r, i, c, a), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1744
+ const c = Ms(t);
1745
+ this.animation = ks(e, r, i, c, a), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1746
1746
  if (this.finishedTime = this.time, !a) {
1747
- const d = sn(i, this.options, o, this.speed);
1748
- this.updateMotionValue ? this.updateMotionValue(d) : Is(e, r, d), this.animation.cancel();
1747
+ const d = on(i, this.options, o, this.speed);
1748
+ this.updateMotionValue ? this.updateMotionValue(d) : Ls(e, r, d), this.animation.cancel();
1749
1749
  }
1750
1750
  l == null || l(), this.notifyFinished();
1751
1751
  };
@@ -1824,24 +1824,24 @@ class Rs extends on {
1824
1824
  */
1825
1825
  attachTimeline({ timeline: t, observe: e }) {
1826
1826
  var r;
1827
- return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Os() ? (this.animation.timeline = t, Ve) : e(this);
1827
+ return this.allowFlatten && ((r = this.animation.effect) == null || r.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && xs() ? (this.animation.timeline = t, Ve) : e(this);
1828
1828
  }
1829
1829
  }
1830
- const ti = {
1831
- anticipate: Gr,
1832
- backInOut: Wr,
1833
- circInOut: Yr
1830
+ const ii = {
1831
+ anticipate: Qr,
1832
+ backInOut: $r,
1833
+ circInOut: Zr
1834
1834
  };
1835
- function ks(n) {
1836
- return n in ti;
1835
+ function Ds(n) {
1836
+ return n in ii;
1837
1837
  }
1838
- function Ms(n) {
1839
- typeof n.ease == "string" && ks(n.ease) && (n.ease = ti[n.ease]);
1838
+ function Vs(n) {
1839
+ typeof n.ease == "string" && Ds(n.ease) && (n.ease = ii[n.ease]);
1840
1840
  }
1841
- const Hn = 10;
1842
- class Ss extends Rs {
1841
+ const Yn = 10;
1842
+ class Fs extends Ss {
1843
1843
  constructor(t) {
1844
- Ms(t), Qr(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1844
+ Vs(t), Jr(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1845
1845
  }
1846
1846
  /**
1847
1847
  * WAAPI doesn't natively have any interruption capabilities.
@@ -1860,16 +1860,16 @@ class Ss extends Rs {
1860
1860
  e.set(t);
1861
1861
  return;
1862
1862
  }
1863
- const o = new ln(J(j({}, s), {
1863
+ const o = new cn(X(j({}, s), {
1864
1864
  autoplay: !1
1865
1865
  })), l = /* @__PURE__ */ ye((d = this.finishedTime) != null ? d : this.time);
1866
- e.setWithVelocity(o.sample(l - Hn).value, o.sample(l).value, Hn), o.stop();
1866
+ e.setWithVelocity(o.sample(l - Yn).value, o.sample(l).value, Yn), o.stop();
1867
1867
  }
1868
1868
  }
1869
- const Wn = (n, t) => t === "zIndex" ? !1 : !!(typeof n == "number" || Array.isArray(n) || typeof n == "string" && // It's animatable if we have a string
1869
+ const $n = (n, t) => t === "zIndex" ? !1 : !!(typeof n == "number" || Array.isArray(n) || typeof n == "string" && // It's animatable if we have a string
1870
1870
  (je.test(n) || n === "0") && // And it contains numbers and/or colors
1871
1871
  !n.startsWith("url("));
1872
- function Ds(n) {
1872
+ function Us(n) {
1873
1873
  const t = n[0];
1874
1874
  if (n.length === 1)
1875
1875
  return !0;
@@ -1877,43 +1877,43 @@ function Ds(n) {
1877
1877
  if (n[e] !== t)
1878
1878
  return !0;
1879
1879
  }
1880
- function Vs(n, t, e, r) {
1880
+ function Bs(n, t, e, r) {
1881
1881
  const i = n[0];
1882
1882
  if (i === null)
1883
1883
  return !1;
1884
1884
  if (t === "display" || t === "visibility")
1885
1885
  return !0;
1886
- const a = n[n.length - 1], s = Wn(i, t), o = Wn(a, t);
1887
- return nt(s === o, `You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`), !s || !o ? !1 : Ds(n) || (e === "spring" || $t(e)) && r;
1886
+ const a = n[n.length - 1], s = $n(i, t), o = $n(a, t);
1887
+ return nt(s === o, `You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`), !s || !o ? !1 : Us(n) || (e === "spring" || Qt(e)) && r;
1888
1888
  }
1889
- function ni(n) {
1889
+ function ai(n) {
1890
1890
  return typeof n == "object" && n !== null;
1891
1891
  }
1892
- function Fs(n) {
1893
- return ni(n) && "offsetHeight" in n;
1892
+ function js(n) {
1893
+ return ai(n) && "offsetHeight" in n;
1894
1894
  }
1895
- const Us = /* @__PURE__ */ new Set([
1895
+ const zs = /* @__PURE__ */ new Set([
1896
1896
  "opacity",
1897
1897
  "clipPath",
1898
1898
  "filter",
1899
1899
  "transform"
1900
1900
  // TODO: Could be re-enabled now we have support for linear() easing
1901
1901
  // "background-color"
1902
- ]), Bs = /* @__PURE__ */ dn(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1903
- function js(n) {
1902
+ ]), Ks = /* @__PURE__ */ un(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1903
+ function qs(n) {
1904
1904
  var c;
1905
1905
  const { motionValue: t, name: e, repeatDelay: r, repeatType: i, damping: a, type: s } = n;
1906
- if (!Fs((c = t == null ? void 0 : t.owner) == null ? void 0 : c.current))
1906
+ if (!js((c = t == null ? void 0 : t.owner) == null ? void 0 : c.current))
1907
1907
  return !1;
1908
1908
  const { onUpdate: o, transformTemplate: l } = t.owner.getProps();
1909
- return Bs() && e && Us.has(e) && (e !== "transform" || !l) && /**
1909
+ return Ks() && e && zs.has(e) && (e !== "transform" || !l) && /**
1910
1910
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
1911
1911
  * no way to read the value from WAAPI every frame.
1912
1912
  */
1913
1913
  !o && !r && i !== "mirror" && a !== 0 && s !== "inertia";
1914
1914
  }
1915
- const zs = 40;
1916
- class Ks extends on {
1915
+ const Hs = 40;
1916
+ class Ws extends ln {
1917
1917
  constructor(h) {
1918
1918
  var p = h, { autoplay: t = !0, delay: e = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: o, name: l, motionValue: c, element: d } = p, u = ge(p, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType", "keyframes", "name", "motionValue", "element"]);
1919
1919
  var v;
@@ -1931,21 +1931,21 @@ class Ks extends on {
1931
1931
  name: l,
1932
1932
  motionValue: c,
1933
1933
  element: d
1934
- }, u), f = (d == null ? void 0 : d.KeyframeResolver) || cn;
1934
+ }, u), f = (d == null ? void 0 : d.KeyframeResolver) || dn;
1935
1935
  this.keyframeResolver = new f(o, (y, w, T) => this.onKeyframesResolved(y, w, m, !T), l, c, d), (v = this.keyframeResolver) == null || v.scheduleResolve();
1936
1936
  }
1937
1937
  onKeyframesResolved(t, e, r, i) {
1938
1938
  this.keyframeResolver = void 0;
1939
1939
  const { name: a, type: s, velocity: o, delay: l, isHandoff: c, onUpdate: d } = r;
1940
- this.resolvedAt = ve.now(), Vs(t, a, s, o) || ((Ae.instantAnimations || !l) && (d == null || d(sn(t, r, e))), t[0] = t[t.length - 1], r.duration = 0, r.repeat = 0);
1941
- const u = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > zs ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = J(j({
1940
+ this.resolvedAt = ve.now(), Bs(t, a, s, o) || ((Ae.instantAnimations || !l) && (d == null || d(on(t, r, e))), t[0] = t[t.length - 1], r.duration = 0, r.repeat = 0);
1941
+ const u = i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Hs ? this.resolvedAt : this.createdAt : this.createdAt : void 0, h = X(j({
1942
1942
  startTime: u,
1943
1943
  finalKeyframe: e
1944
1944
  }, r), {
1945
1945
  keyframes: t
1946
- }), p = !c && js(h) ? new Ss(J(j({}, h), {
1946
+ }), p = !c && qs(h) ? new Fs(X(j({}, h), {
1947
1947
  element: h.motionValue.owner.current
1948
- })) : new ln(h);
1948
+ })) : new cn(h);
1949
1949
  p.finished.then(() => this.notifyFinished()).catch(Ve), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
1950
1950
  }
1951
1951
  get finished() {
@@ -1957,7 +1957,7 @@ class Ks extends on {
1957
1957
  }
1958
1958
  get animation() {
1959
1959
  var t;
1960
- return this._animation || ((t = this.keyframeResolver) == null || t.resume(), ws()), this._animation;
1960
+ return this._animation || ((t = this.keyframeResolver) == null || t.resume(), Os()), this._animation;
1961
1961
  }
1962
1962
  get duration() {
1963
1963
  return this.animation.duration;
@@ -1997,11 +1997,11 @@ class Ks extends on {
1997
1997
  this._animation && this.animation.cancel(), (t = this.keyframeResolver) == null || t.cancel();
1998
1998
  }
1999
1999
  }
2000
- const ri = (n, t, e, r = {}, i, a) => (s) => {
2001
- const o = Lr(r, n) || {}, l = o.delay || r.delay || 0;
2000
+ const si = (n, t, e, r = {}, i, a) => (s) => {
2001
+ const o = Rr(r, n) || {}, l = o.delay || r.delay || 0;
2002
2002
  let { elapsed: c = 0 } = r;
2003
2003
  c = c - /* @__PURE__ */ ye(l);
2004
- const d = J(j({
2004
+ const d = X(j({
2005
2005
  keyframes: Array.isArray(e) ? e : [null, e],
2006
2006
  ease: "easeOut",
2007
2007
  velocity: t.getVelocity()
@@ -2017,10 +2017,10 @@ const ri = (n, t, e, r = {}, i, a) => (s) => {
2017
2017
  motionValue: t,
2018
2018
  element: a ? void 0 : i
2019
2019
  });
2020
- Aa(o) || Object.assign(d, Ca(n, d)), d.duration && (d.duration = /* @__PURE__ */ ye(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ye(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2020
+ Ia(o) || Object.assign(d, Ta(n, d)), d.duration && (d.duration = /* @__PURE__ */ ye(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ ye(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
2021
2021
  let u = !1;
2022
2022
  if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (d.duration = 0, d.delay === 0 && (u = !0)), (Ae.instantAnimations || Ae.skipAnimations) && (u = !0, d.duration = 0, d.delay = 0), d.allowFlatten = !o.type && !o.ease, u && !a && t.get() !== void 0) {
2023
- const h = ga(d.keyframes, o);
2023
+ const h = Ea(d.keyframes, o);
2024
2024
  if (h !== void 0) {
2025
2025
  we.update(() => {
2026
2026
  d.onUpdate(h), d.onComplete();
@@ -2028,8 +2028,8 @@ const ri = (n, t, e, r = {}, i, a) => (s) => {
2028
2028
  return;
2029
2029
  }
2030
2030
  }
2031
- return o.isSync ? new ln(d) : new Ks(d);
2032
- }, ii = /* @__PURE__ */ new Set([
2031
+ return o.isSync ? new cn(d) : new Ws(d);
2032
+ }, oi = /* @__PURE__ */ new Set([
2033
2033
  "width",
2034
2034
  "height",
2035
2035
  "top",
@@ -2038,49 +2038,49 @@ const ri = (n, t, e, r = {}, i, a) => (s) => {
2038
2038
  "bottom",
2039
2039
  ...Fe
2040
2040
  ]);
2041
- function qs({ protectedKeys: n, needsAnimating: t }, e) {
2041
+ function Gs({ protectedKeys: n, needsAnimating: t }, e) {
2042
2042
  const r = n.hasOwnProperty(e) && t[e] !== !0;
2043
2043
  return t[e] = !1, r;
2044
2044
  }
2045
- function Hs(n, t, { delay: e = 0, transitionOverride: r, type: i } = {}) {
2045
+ function Ys(n, t, { delay: e = 0, transitionOverride: r, type: i } = {}) {
2046
2046
  var u;
2047
2047
  let d = t, { transition: a = n.getDefaultTransition(), transitionEnd: s } = d, o = ge(d, ["transition", "transitionEnd"]);
2048
2048
  r && (a = r);
2049
2049
  const l = [], c = i && n.animationState && n.animationState.getState()[i];
2050
2050
  for (const h in o) {
2051
2051
  const p = n.getValue(h, (u = n.latestValues[h]) != null ? u : null), m = o[h];
2052
- if (m === void 0 || c && qs(c, h))
2052
+ if (m === void 0 || c && Gs(c, h))
2053
2053
  continue;
2054
2054
  const f = j({
2055
2055
  delay: e
2056
- }, Lr(a || {}, h)), v = p.get();
2056
+ }, Rr(a || {}, h)), v = p.get();
2057
2057
  if (v !== void 0 && !p.isAnimating && !Array.isArray(m) && m === v && !f.velocity)
2058
2058
  continue;
2059
2059
  let y = !1;
2060
2060
  if (window.MotionHandoffAnimation) {
2061
- const T = fa(n);
2061
+ const T = ya(n);
2062
2062
  if (T) {
2063
2063
  const x = window.MotionHandoffAnimation(T, h, we);
2064
2064
  x !== null && (f.startTime = x, y = !0);
2065
2065
  }
2066
2066
  }
2067
- pa(n, h), p.start(ri(h, p, m, n.shouldReduceMotion && ii.has(h) ? { type: !1 } : f, n, y));
2067
+ fa(n, h), p.start(si(h, p, m, n.shouldReduceMotion && oi.has(h) ? { type: !1 } : f, n, y));
2068
2068
  const w = p.animation;
2069
2069
  w && l.push(w);
2070
2070
  }
2071
2071
  return s && Promise.all(l).then(() => {
2072
2072
  we.update(() => {
2073
- s && da(n, s);
2073
+ s && ha(n, s);
2074
2074
  });
2075
2075
  }), l;
2076
2076
  }
2077
- function Ws({ top: n, left: t, right: e, bottom: r }) {
2077
+ function $s({ top: n, left: t, right: e, bottom: r }) {
2078
2078
  return {
2079
2079
  x: { min: t, max: e },
2080
2080
  y: { min: n, max: r }
2081
2081
  };
2082
2082
  }
2083
- function Gs(n, t) {
2083
+ function Qs(n, t) {
2084
2084
  if (!t)
2085
2085
  return n;
2086
2086
  const e = t({ x: n.left, y: n.top }), r = t({ x: n.right, y: n.bottom });
@@ -2091,10 +2091,10 @@ function Gs(n, t) {
2091
2091
  right: r.x
2092
2092
  };
2093
2093
  }
2094
- function Ys(n, t) {
2095
- return Ws(Gs(n.getBoundingClientRect(), t));
2094
+ function Zs(n, t) {
2095
+ return $s(Qs(n.getBoundingClientRect(), t));
2096
2096
  }
2097
- const Gn = {
2097
+ const Qn = {
2098
2098
  animation: [
2099
2099
  "animate",
2100
2100
  "variants",
@@ -2113,30 +2113,30 @@ const Gn = {
2113
2113
  pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
2114
2114
  inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2115
2115
  layout: ["layout", "layoutId"]
2116
- }, zt = {};
2117
- for (const n in Gn)
2118
- zt[n] = {
2119
- isEnabled: (t) => Gn[n].some((e) => !!t[e])
2116
+ }, Kt = {};
2117
+ for (const n in Qn)
2118
+ Kt[n] = {
2119
+ isEnabled: (t) => Qn[n].some((e) => !!t[e])
2120
2120
  };
2121
- const Yn = () => ({ min: 0, max: 0 }), un = () => ({
2122
- x: Yn(),
2123
- y: Yn()
2124
- }), $s = typeof window != "undefined", Kt = { current: null }, ai = { current: !1 };
2125
- function Qs() {
2126
- if (ai.current = !0, !!$s)
2121
+ const Zn = () => ({ min: 0, max: 0 }), pn = () => ({
2122
+ x: Zn(),
2123
+ y: Zn()
2124
+ }), Xs = typeof window != "undefined", qt = { current: null }, li = { current: !1 };
2125
+ function Js() {
2126
+ if (li.current = !0, !!Xs)
2127
2127
  if (window.matchMedia) {
2128
- const n = window.matchMedia("(prefers-reduced-motion)"), t = () => Kt.current = n.matches;
2128
+ const n = window.matchMedia("(prefers-reduced-motion)"), t = () => qt.current = n.matches;
2129
2129
  n.addListener(t), t();
2130
2130
  } else
2131
- Kt.current = !1;
2131
+ qt.current = !1;
2132
2132
  }
2133
- function Zs(n) {
2133
+ function eo(n) {
2134
2134
  return n !== null && typeof n == "object" && typeof n.start == "function";
2135
2135
  }
2136
- function Xs(n) {
2136
+ function to(n) {
2137
2137
  return typeof n == "string" || Array.isArray(n);
2138
2138
  }
2139
- const Js = [
2139
+ const no = [
2140
2140
  "animate",
2141
2141
  "whileInView",
2142
2142
  "whileFocus",
@@ -2144,14 +2144,14 @@ const Js = [
2144
2144
  "whileTap",
2145
2145
  "whileDrag",
2146
2146
  "exit"
2147
- ], eo = ["initial", ...Js];
2148
- function si(n) {
2149
- return Zs(n.animate) || eo.some((t) => Xs(n[t]));
2147
+ ], ro = ["initial", ...no];
2148
+ function ci(n) {
2149
+ return eo(n.animate) || ro.some((t) => to(n[t]));
2150
2150
  }
2151
- function to(n) {
2152
- return !!(si(n) || n.variants);
2151
+ function io(n) {
2152
+ return !!(ci(n) || n.variants);
2153
2153
  }
2154
- function no(n, t, e) {
2154
+ function ao(n, t, e) {
2155
2155
  for (const r in t) {
2156
2156
  const i = t[r], a = e[r];
2157
2157
  if (me(i))
@@ -2171,29 +2171,29 @@ function no(n, t, e) {
2171
2171
  t[r] === void 0 && n.removeValue(r);
2172
2172
  return t;
2173
2173
  }
2174
- const oi = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), li = (n) => /^0[^.\s]+$/u.test(n), ro = {
2174
+ const di = (n) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n), ui = (n) => /^0[^.\s]+$/u.test(n), so = {
2175
2175
  test: (n) => n === "auto",
2176
2176
  parse: (n) => n
2177
- }, ci = (n) => (t) => t.test(n), di = [Be, Q, Se, Te, Pa, xa, ro], $n = (n) => di.find(ci(n)), io = [...di, ue, je], ao = (n) => io.find(ci(n)), so = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
2178
- function oo(n) {
2177
+ }, pi = (n) => (t) => t.test(n), hi = [Be, Q, Se, Te, Ma, ka, so], Xn = (n) => hi.find(pi(n)), oo = [...hi, ue, je], lo = (n) => oo.find(pi(n)), co = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
2178
+ function uo(n) {
2179
2179
  const [t, e] = n.slice(0, -1).split("(");
2180
2180
  if (t === "drop-shadow")
2181
2181
  return n;
2182
- const [r] = e.match(Jt) || [];
2182
+ const [r] = e.match(en) || [];
2183
2183
  if (!r)
2184
2184
  return n;
2185
2185
  const i = e.replace(r, "");
2186
- let a = so.has(t) ? 1 : 0;
2186
+ let a = co.has(t) ? 1 : 0;
2187
2187
  return r !== e && (a *= 100), t + "(" + a + i + ")";
2188
2188
  }
2189
- const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2189
+ const po = /\b([a-z-]*)\(.*?\)/gu, Ht = X(j({}, je), {
2190
2190
  getAnimatableNone: (n) => {
2191
- const t = n.match(lo);
2192
- return t ? t.map(oo).join(" ") : n;
2191
+ const t = n.match(po);
2192
+ return t ? t.map(uo).join(" ") : n;
2193
2193
  }
2194
- }), Qn = J(j({}, Be), {
2194
+ }), Jn = X(j({}, Be), {
2195
2195
  transform: Math.round
2196
- }), co = {
2196
+ }), ho = {
2197
2197
  rotate: Te,
2198
2198
  rotateX: Te,
2199
2199
  rotateY: Te,
@@ -2215,10 +2215,10 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2215
2215
  perspective: Q,
2216
2216
  transformPerspective: Q,
2217
2217
  opacity: Xe,
2218
- originX: Rn,
2219
- originY: Rn,
2218
+ originX: Sn,
2219
+ originY: Sn,
2220
2220
  originZ: Q
2221
- }, pn = J(j({
2221
+ }, hn = X(j({
2222
2222
  // Border props
2223
2223
  borderWidth: Q,
2224
2224
  borderTopWidth: Q,
@@ -2254,13 +2254,13 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2254
2254
  // Misc
2255
2255
  backgroundPositionX: Q,
2256
2256
  backgroundPositionY: Q
2257
- }, co), {
2258
- zIndex: Qn,
2257
+ }, ho), {
2258
+ zIndex: Jn,
2259
2259
  // SVG
2260
2260
  fillOpacity: Xe,
2261
2261
  strokeOpacity: Xe,
2262
- numOctaves: Qn
2263
- }), uo = J(j({}, pn), {
2262
+ numOctaves: Jn
2263
+ }), mo = X(j({}, hn), {
2264
2264
  // Color props
2265
2265
  color: ue,
2266
2266
  backgroundColor: ue,
@@ -2273,14 +2273,14 @@ const lo = /\b([a-z-]*)\(.*?\)/gu, qt = J(j({}, je), {
2273
2273
  borderRightColor: ue,
2274
2274
  borderBottomColor: ue,
2275
2275
  borderLeftColor: ue,
2276
- filter: qt,
2277
- WebkitFilter: qt
2278
- }), ui = (n) => uo[n];
2279
- function pi(n, t) {
2280
- let e = ui(n);
2281
- return e !== qt && (e = je), e.getAnimatableNone ? e.getAnimatableNone(t) : void 0;
2282
- }
2283
- const Zn = [
2276
+ filter: Ht,
2277
+ WebkitFilter: Ht
2278
+ }), mi = (n) => mo[n];
2279
+ function fi(n, t) {
2280
+ let e = mi(n);
2281
+ return e !== Ht && (e = je), e.getAnimatableNone ? e.getAnimatableNone(t) : void 0;
2282
+ }
2283
+ const er = [
2284
2284
  "AnimationStart",
2285
2285
  "AnimationComplete",
2286
2286
  "Update",
@@ -2289,7 +2289,7 @@ const Zn = [
2289
2289
  "LayoutAnimationStart",
2290
2290
  "LayoutAnimationComplete"
2291
2291
  ];
2292
- class hi {
2292
+ class vi {
2293
2293
  /**
2294
2294
  * This method takes React props and returns found MotionValues. For example, HTML
2295
2295
  * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
@@ -2301,14 +2301,14 @@ class hi {
2301
2301
  return {};
2302
2302
  }
2303
2303
  constructor({ parent: t, props: e, presenceContext: r, reducedMotionConfig: i, blockInitialAnimation: a, visualState: s }, o = {}) {
2304
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = cn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2304
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = dn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2305
2305
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2306
2306
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2307
2307
  const p = ve.now();
2308
2308
  this.renderScheduledAt < p && (this.renderScheduledAt = p, we.render(this.render, !1, !0));
2309
2309
  };
2310
2310
  const { latestValues: l, renderState: c } = s;
2311
- this.latestValues = l, this.baseTarget = j({}, l), this.initialValues = e.initial ? j({}, l) : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!a, this.isControllingVariants = si(e), this.isVariantNode = to(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2311
+ this.latestValues = l, this.baseTarget = j({}, l), this.initialValues = e.initial ? j({}, l) : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!a, this.isControllingVariants = ci(e), this.isVariantNode = io(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2312
2312
  const h = this.scrapeMotionValuesFromProps(e, {}, this), { willChange: d } = h, u = ge(h, ["willChange"]);
2313
2313
  for (const p in u) {
2314
2314
  const m = u[p];
@@ -2316,10 +2316,10 @@ class hi {
2316
2316
  }
2317
2317
  }
2318
2318
  mount(t) {
2319
- this.current = t, Qe.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, r) => this.bindToMotionValue(r, e)), ai.current || Qs(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Kt.current, process.env.NODE_ENV !== "production" && Ir(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
2319
+ this.current = t, Qe.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, r) => this.bindToMotionValue(r, e)), li.current || Js(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : qt.current, process.env.NODE_ENV !== "production" && Lr(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
2320
2320
  }
2321
2321
  unmount() {
2322
- this.projection && this.projection.unmount(), xt(this.notifyUpdate), xt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2322
+ this.projection && this.projection.unmount(), Pt(this.notifyUpdate), Pt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2323
2323
  for (const t in this.events)
2324
2324
  this.events[t].clear();
2325
2325
  for (const t in this.features) {
@@ -2345,8 +2345,8 @@ class hi {
2345
2345
  }
2346
2346
  updateFeatures() {
2347
2347
  let t = "animation";
2348
- for (t in zt) {
2349
- const e = zt[t];
2348
+ for (t in Kt) {
2349
+ const e = Kt[t];
2350
2350
  if (!e)
2351
2351
  continue;
2352
2352
  const { isEnabled: r, Feature: i } = e;
@@ -2365,7 +2365,7 @@ class hi {
2365
2365
  * removed with a re-render to work.
2366
2366
  */
2367
2367
  measureViewportBox() {
2368
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : un();
2368
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : pn();
2369
2369
  }
2370
2370
  getStaticValue(t) {
2371
2371
  return this.latestValues[t];
@@ -2379,13 +2379,13 @@ class hi {
2379
2379
  */
2380
2380
  update(t, e) {
2381
2381
  (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
2382
- for (let r = 0; r < Zn.length; r++) {
2383
- const i = Zn[r];
2382
+ for (let r = 0; r < er.length; r++) {
2383
+ const i = er[r];
2384
2384
  this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2385
2385
  const a = "on" + i, s = t[a];
2386
2386
  s && (this.propEventSubscriptions[i] = this.on(i, s));
2387
2387
  }
2388
- this.prevMotionValues = no(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2388
+ this.prevMotionValues = ao(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2389
2389
  }
2390
2390
  getProps() {
2391
2391
  return this.props;
@@ -2451,7 +2451,7 @@ class hi {
2451
2451
  readValue(t, e) {
2452
2452
  var i;
2453
2453
  let r = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (i = this.getBaseTargetFromProps(this.props, t)) != null ? i : this.readValueFromInstance(this.current, t, this.options);
2454
- return r != null && (typeof r == "string" && (oi(r) || li(r)) ? r = parseFloat(r) : !ao(r) && je.test(e) && (r = pi(t, e)), this.setBaseTarget(t, me(r) ? r.get() : r)), me(r) ? r.get() : r;
2454
+ return r != null && (typeof r == "string" && (di(r) || ui(r)) ? r = parseFloat(r) : !lo(r) && je.test(e) && (r = fi(t, e)), this.setBaseTarget(t, me(r) ? r.get() : r)), me(r) ? r.get() : r;
2455
2455
  }
2456
2456
  /**
2457
2457
  * Set the base target to later animate back to. This is currently
@@ -2469,7 +2469,7 @@ class hi {
2469
2469
  const { initial: e } = this.props;
2470
2470
  let r;
2471
2471
  if (typeof e == "string" || typeof e == "object") {
2472
- const s = Tr(this.props, e, (a = this.presenceContext) == null ? void 0 : a.custom);
2472
+ const s = Nr(this.props, e, (a = this.presenceContext) == null ? void 0 : a.custom);
2473
2473
  s && (r = s[t]);
2474
2474
  }
2475
2475
  if (e && r !== void 0)
@@ -2478,51 +2478,51 @@ class hi {
2478
2478
  return i !== void 0 && !me(i) ? i : this.initialValues[t] !== void 0 && r === void 0 ? void 0 : this.baseTarget[t];
2479
2479
  }
2480
2480
  on(t, e) {
2481
- return this.events[t] || (this.events[t] = new Or()), this.events[t].add(e);
2481
+ return this.events[t] || (this.events[t] = new xr()), this.events[t].add(e);
2482
2482
  }
2483
2483
  notify(t, ...e) {
2484
2484
  this.events[t] && this.events[t].notify(...e);
2485
2485
  }
2486
2486
  }
2487
- const po = (
2487
+ const fo = (
2488
2488
  // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
2489
2489
  /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
2490
2490
  );
2491
- function ho(n) {
2492
- const t = po.exec(n);
2491
+ function vo(n) {
2492
+ const t = fo.exec(n);
2493
2493
  if (!t)
2494
2494
  return [,];
2495
2495
  const [, e, r, i] = t;
2496
2496
  return [`--${e != null ? e : r}`, i];
2497
2497
  }
2498
- const mo = 4;
2499
- function mi(n, t, e = 1) {
2500
- Ce(e <= mo, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
2501
- const [r, i] = ho(n);
2498
+ const go = 4;
2499
+ function gi(n, t, e = 1) {
2500
+ Ce(e <= go, `Max CSS variable fallback depth detected in property "${n}". This may indicate a circular fallback dependency.`);
2501
+ const [r, i] = vo(n);
2502
2502
  if (!r)
2503
2503
  return;
2504
2504
  const a = window.getComputedStyle(t).getPropertyValue(r);
2505
2505
  if (a) {
2506
2506
  const s = a.trim();
2507
- return oi(s) ? parseFloat(s) : s;
2507
+ return di(s) ? parseFloat(s) : s;
2508
2508
  }
2509
- return Xt(i) ? mi(i, t, e + 1) : i;
2509
+ return Jt(i) ? gi(i, t, e + 1) : i;
2510
2510
  }
2511
- function fo(n) {
2512
- return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" || li(n) : !0;
2511
+ function yo(n) {
2512
+ return typeof n == "number" ? n === 0 : n !== null ? n === "none" || n === "0" || ui(n) : !0;
2513
2513
  }
2514
- const vo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2515
- function go(n, t, e) {
2514
+ const bo = /* @__PURE__ */ new Set(["auto", "none", "0"]);
2515
+ function Eo(n, t, e) {
2516
2516
  let r = 0, i;
2517
2517
  for (; r < n.length && !i; ) {
2518
2518
  const a = n[r];
2519
- typeof a == "string" && !vo.has(a) && Je(a).values.length && (i = n[r]), r++;
2519
+ typeof a == "string" && !bo.has(a) && Je(a).values.length && (i = n[r]), r++;
2520
2520
  }
2521
2521
  if (i && e)
2522
2522
  for (const a of t)
2523
- n[a] = pi(e, i);
2523
+ n[a] = fi(e, i);
2524
2524
  }
2525
- class yo extends cn {
2525
+ class _o extends dn {
2526
2526
  constructor(t, e, r, i, a) {
2527
2527
  super(t, e, r, i, a, !0);
2528
2528
  }
@@ -2533,16 +2533,16 @@ class yo extends cn {
2533
2533
  super.readKeyframes();
2534
2534
  for (let l = 0; l < t.length; l++) {
2535
2535
  let c = t[l];
2536
- if (typeof c == "string" && (c = c.trim(), Xt(c))) {
2537
- const d = mi(c, e.current);
2536
+ if (typeof c == "string" && (c = c.trim(), Jt(c))) {
2537
+ const d = gi(c, e.current);
2538
2538
  d !== void 0 && (t[l] = d), l === t.length - 1 && (this.finalKeyframe = c);
2539
2539
  }
2540
2540
  }
2541
- if (this.resolveNoneKeyframes(), !ii.has(r) || t.length !== 2)
2541
+ if (this.resolveNoneKeyframes(), !oi.has(r) || t.length !== 2)
2542
2542
  return;
2543
- const [i, a] = t, s = $n(i), o = $n(a);
2543
+ const [i, a] = t, s = Xn(i), o = Xn(a);
2544
2544
  if (s !== o)
2545
- if (Kn(s) && Kn(o))
2545
+ if (Wn(s) && Wn(o))
2546
2546
  for (let l = 0; l < t.length; l++) {
2547
2547
  const c = t[l];
2548
2548
  typeof c == "string" && (t[l] = parseFloat(c));
@@ -2552,8 +2552,8 @@ class yo extends cn {
2552
2552
  resolveNoneKeyframes() {
2553
2553
  const { unresolvedKeyframes: t, name: e } = this, r = [];
2554
2554
  for (let i = 0; i < t.length; i++)
2555
- (t[i] === null || fo(t[i])) && r.push(i);
2556
- r.length && go(t, r, e);
2555
+ (t[i] === null || yo(t[i])) && r.push(i);
2556
+ r.length && Eo(t, r, e);
2557
2557
  }
2558
2558
  measureInitialState() {
2559
2559
  const { element: t, unresolvedKeyframes: e, name: r } = this;
@@ -2576,9 +2576,9 @@ class yo extends cn {
2576
2576
  }), this.resolveNoneKeyframes();
2577
2577
  }
2578
2578
  }
2579
- class fi extends hi {
2579
+ class yi extends vi {
2580
2580
  constructor() {
2581
- super(...arguments), this.KeyframeResolver = yo;
2581
+ super(...arguments), this.KeyframeResolver = _o;
2582
2582
  }
2583
2583
  sortInstanceNodePosition(t, e) {
2584
2584
  return t.compareDocumentPosition(e) & 2 ? 1 : -1;
@@ -2597,24 +2597,24 @@ class fi extends hi {
2597
2597
  }));
2598
2598
  }
2599
2599
  }
2600
- const vi = (n, t) => t && typeof n == "number" ? t.transform(n) : n, bo = {
2600
+ const bi = (n, t) => t && typeof n == "number" ? t.transform(n) : n, Co = {
2601
2601
  x: "translateX",
2602
2602
  y: "translateY",
2603
2603
  z: "translateZ",
2604
2604
  transformPerspective: "perspective"
2605
- }, Eo = Fe.length;
2606
- function _o(n, t, e) {
2605
+ }, Ao = Fe.length;
2606
+ function wo(n, t, e) {
2607
2607
  let r = "", i = !0;
2608
- for (let a = 0; a < Eo; a++) {
2608
+ for (let a = 0; a < Ao; a++) {
2609
2609
  const s = Fe[a], o = n[s];
2610
2610
  if (o === void 0)
2611
2611
  continue;
2612
2612
  let l = !0;
2613
2613
  if (typeof o == "number" ? l = o === (s.startsWith("scale") ? 1 : 0) : l = parseFloat(o) === 0, !l || e) {
2614
- const c = vi(o, pn[s]);
2614
+ const c = bi(o, hn[s]);
2615
2615
  if (!l) {
2616
2616
  i = !1;
2617
- const d = bo[s] || s;
2617
+ const d = Co[s] || s;
2618
2618
  r += `${d}(${c}) `;
2619
2619
  }
2620
2620
  e && (t[s] = c);
@@ -2622,7 +2622,7 @@ function _o(n, t, e) {
2622
2622
  }
2623
2623
  return r = r.trim(), e ? r = e(t, i ? "" : r) : i && (r = "none"), r;
2624
2624
  }
2625
- function gi(n, t, e) {
2625
+ function Ei(n, t, e) {
2626
2626
  const { style: r, vars: i, transformOrigin: a } = n;
2627
2627
  let s = !1, o = !1;
2628
2628
  for (const l in t) {
@@ -2630,70 +2630,70 @@ function gi(n, t, e) {
2630
2630
  if (Ue.has(l)) {
2631
2631
  s = !0;
2632
2632
  continue;
2633
- } else if (Pr(l)) {
2633
+ } else if (Mr(l)) {
2634
2634
  i[l] = c;
2635
2635
  continue;
2636
2636
  } else {
2637
- const d = vi(c, pn[l]);
2637
+ const d = bi(c, hn[l]);
2638
2638
  l.startsWith("origin") ? (o = !0, a[l] = d) : r[l] = d;
2639
2639
  }
2640
2640
  }
2641
- if (t.transform || (s || e ? r.transform = _o(t, n.transform, e) : r.transform && (r.transform = "none")), o) {
2641
+ if (t.transform || (s || e ? r.transform = wo(t, n.transform, e) : r.transform && (r.transform = "none")), o) {
2642
2642
  const { originX: l = "50%", originY: c = "50%", originZ: d = 0 } = a;
2643
2643
  r.transformOrigin = `${l} ${c} ${d}`;
2644
2644
  }
2645
2645
  }
2646
- function yi(n, { style: t, vars: e }, r, i) {
2646
+ function _i(n, { style: t, vars: e }, r, i) {
2647
2647
  Object.assign(n.style, t, i && i.getProjectionStyles(r));
2648
2648
  for (const a in e)
2649
2649
  n.style.setProperty(a, e[a]);
2650
2650
  }
2651
- const Co = {};
2652
- function Ao(n, { layout: t, layoutId: e }) {
2653
- return Ue.has(n) || n.startsWith("origin") || (t || e !== void 0) && (!!Co[n] || n === "opacity");
2651
+ const To = {};
2652
+ function Io(n, { layout: t, layoutId: e }) {
2653
+ return Ue.has(n) || n.startsWith("origin") || (t || e !== void 0) && (!!To[n] || n === "opacity");
2654
2654
  }
2655
- function bi(n, t, e) {
2655
+ function Ci(n, t, e) {
2656
2656
  var a;
2657
2657
  const { style: r } = n, i = {};
2658
2658
  for (const s in r)
2659
- (me(r[s]) || t.style && me(t.style[s]) || Ao(s, n) || ((a = e == null ? void 0 : e.getValue(s)) == null ? void 0 : a.liveStyle) !== void 0) && (i[s] = r[s]);
2659
+ (me(r[s]) || t.style && me(t.style[s]) || Io(s, n) || ((a = e == null ? void 0 : e.getValue(s)) == null ? void 0 : a.liveStyle) !== void 0) && (i[s] = r[s]);
2660
2660
  return i;
2661
2661
  }
2662
- function wo(n) {
2662
+ function Oo(n) {
2663
2663
  return window.getComputedStyle(n);
2664
2664
  }
2665
- class To extends fi {
2665
+ class No extends yi {
2666
2666
  constructor() {
2667
- super(...arguments), this.type = "html", this.renderInstance = yi;
2667
+ super(...arguments), this.type = "html", this.renderInstance = _i;
2668
2668
  }
2669
2669
  readValueFromInstance(t, e) {
2670
2670
  var r;
2671
2671
  if (Ue.has(e))
2672
- return (r = this.projection) != null && r.isProjecting ? Vt(e) : bs(t, e);
2672
+ return (r = this.projection) != null && r.isProjecting ? Ft(e) : Cs(t, e);
2673
2673
  {
2674
- const i = wo(t), a = (Pr(e) ? i.getPropertyValue(e) : i[e]) || 0;
2674
+ const i = Oo(t), a = (Mr(e) ? i.getPropertyValue(e) : i[e]) || 0;
2675
2675
  return typeof a == "string" ? a.trim() : a;
2676
2676
  }
2677
2677
  }
2678
2678
  measureInstanceViewportBox(t, { transformPagePoint: e }) {
2679
- return Ys(t, e);
2679
+ return Zs(t, e);
2680
2680
  }
2681
2681
  build(t, e, r) {
2682
- gi(t, e, r.transformTemplate);
2682
+ Ei(t, e, r.transformTemplate);
2683
2683
  }
2684
2684
  scrapeMotionValuesFromProps(t, e, r) {
2685
- return bi(t, e, r);
2685
+ return Ci(t, e, r);
2686
2686
  }
2687
2687
  }
2688
- function Io(n, t) {
2688
+ function Lo(n, t) {
2689
2689
  return n in t;
2690
2690
  }
2691
- class Oo extends hi {
2691
+ class xo extends vi {
2692
2692
  constructor() {
2693
2693
  super(...arguments), this.type = "object";
2694
2694
  }
2695
2695
  readValueFromInstance(t, e) {
2696
- if (Io(e, t)) {
2696
+ if (Lo(e, t)) {
2697
2697
  const r = t[e];
2698
2698
  if (typeof r == "string" || typeof r == "number")
2699
2699
  return r;
@@ -2705,7 +2705,7 @@ class Oo extends hi {
2705
2705
  delete e.output[t];
2706
2706
  }
2707
2707
  measureInstanceViewportBox() {
2708
- return un();
2708
+ return pn();
2709
2709
  }
2710
2710
  build(t, e) {
2711
2711
  Object.assign(t.output, e);
@@ -2717,21 +2717,21 @@ class Oo extends hi {
2717
2717
  return 0;
2718
2718
  }
2719
2719
  }
2720
- const No = {
2720
+ const Po = {
2721
2721
  offset: "stroke-dashoffset",
2722
2722
  array: "stroke-dasharray"
2723
- }, Lo = {
2723
+ }, Ro = {
2724
2724
  offset: "strokeDashoffset",
2725
2725
  array: "strokeDasharray"
2726
2726
  };
2727
- function xo(n, t, e = 1, r = 0, i = !0) {
2727
+ function ko(n, t, e = 1, r = 0, i = !0) {
2728
2728
  n.pathLength = 1;
2729
- const a = i ? No : Lo;
2729
+ const a = i ? Po : Ro;
2730
2730
  n[a.offset] = Q.transform(-r);
2731
2731
  const s = Q.transform(t), o = Q.transform(e);
2732
2732
  n[a.array] = `${s} ${o}`;
2733
2733
  }
2734
- function Po(n, u, l, c, d) {
2734
+ function Mo(n, u, l, c, d) {
2735
2735
  var h = u, {
2736
2736
  attrX: t,
2737
2737
  attrY: e,
@@ -2748,15 +2748,15 @@ function Po(n, u, l, c, d) {
2748
2748
  "pathOffset"
2749
2749
  ]);
2750
2750
  var f, v;
2751
- if (gi(n, o, c), l) {
2751
+ if (Ei(n, o, c), l) {
2752
2752
  n.style.viewBox && (n.attrs.viewBox = n.style.viewBox);
2753
2753
  return;
2754
2754
  }
2755
2755
  n.attrs = n.style, n.style = {};
2756
2756
  const { attrs: p, style: m } = n;
2757
- p.transform && (m.transform = p.transform, delete p.transform), (m.transform || p.transformOrigin) && (m.transformOrigin = (f = p.transformOrigin) != null ? f : "50% 50%", delete p.transformOrigin), m.transform && (m.transformBox = (v = d == null ? void 0 : d.transformBox) != null ? v : "fill-box", delete p.transformBox), t !== void 0 && (p.x = t), e !== void 0 && (p.y = e), r !== void 0 && (p.scale = r), i !== void 0 && xo(p, i, a, s, !1);
2757
+ p.transform && (m.transform = p.transform, delete p.transform), (m.transform || p.transformOrigin) && (m.transformOrigin = (f = p.transformOrigin) != null ? f : "50% 50%", delete p.transformOrigin), m.transform && (m.transformBox = (v = d == null ? void 0 : d.transformBox) != null ? v : "fill-box", delete p.transformBox), t !== void 0 && (p.x = t), e !== void 0 && (p.y = e), r !== void 0 && (p.scale = r), i !== void 0 && ko(p, i, a, s, !1);
2758
2758
  }
2759
- const Ei = /* @__PURE__ */ new Set([
2759
+ const Ai = /* @__PURE__ */ new Set([
2760
2760
  "baseFrequency",
2761
2761
  "diffuseConstant",
2762
2762
  "kernelMatrix",
@@ -2780,14 +2780,14 @@ const Ei = /* @__PURE__ */ new Set([
2780
2780
  "startOffset",
2781
2781
  "textLength",
2782
2782
  "lengthAdjust"
2783
- ]), Ro = (n) => typeof n == "string" && n.toLowerCase() === "svg";
2784
- function ko(n, t, e, r) {
2785
- yi(n, t, void 0, r);
2783
+ ]), So = (n) => typeof n == "string" && n.toLowerCase() === "svg";
2784
+ function Do(n, t, e, r) {
2785
+ _i(n, t, void 0, r);
2786
2786
  for (const i in t.attrs)
2787
- n.setAttribute(Ei.has(i) ? i : Zt(i), t.attrs[i]);
2787
+ n.setAttribute(Ai.has(i) ? i : Xt(i), t.attrs[i]);
2788
2788
  }
2789
- function Mo(n, t, e) {
2790
- const r = bi(n, t, e);
2789
+ function Vo(n, t, e) {
2790
+ const r = Ci(n, t, e);
2791
2791
  for (const i in n)
2792
2792
  if (me(n[i]) || me(t[i])) {
2793
2793
  const a = Fe.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
@@ -2795,40 +2795,40 @@ function Mo(n, t, e) {
2795
2795
  }
2796
2796
  return r;
2797
2797
  }
2798
- class So extends fi {
2798
+ class Fo extends yi {
2799
2799
  constructor() {
2800
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = un;
2800
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = pn;
2801
2801
  }
2802
2802
  getBaseTargetFromProps(t, e) {
2803
2803
  return t[e];
2804
2804
  }
2805
2805
  readValueFromInstance(t, e) {
2806
2806
  if (Ue.has(e)) {
2807
- const r = ui(e);
2807
+ const r = mi(e);
2808
2808
  return r && r.default || 0;
2809
2809
  }
2810
- return e = Ei.has(e) ? e : Zt(e), t.getAttribute(e);
2810
+ return e = Ai.has(e) ? e : Xt(e), t.getAttribute(e);
2811
2811
  }
2812
2812
  scrapeMotionValuesFromProps(t, e, r) {
2813
- return Mo(t, e, r);
2813
+ return Vo(t, e, r);
2814
2814
  }
2815
2815
  build(t, e, r) {
2816
- Po(t, e, this.isSVGTag, r.transformTemplate, r.style);
2816
+ Mo(t, e, this.isSVGTag, r.transformTemplate, r.style);
2817
2817
  }
2818
2818
  renderInstance(t, e, r, i) {
2819
- ko(t, e, r, i);
2819
+ Do(t, e, r, i);
2820
2820
  }
2821
2821
  mount(t) {
2822
- this.isSVGTag = Ro(t.tagName), super.mount(t);
2822
+ this.isSVGTag = So(t.tagName), super.mount(t);
2823
2823
  }
2824
2824
  }
2825
- function _i(n) {
2826
- return ni(n) && "ownerSVGElement" in n;
2825
+ function wi(n) {
2826
+ return ai(n) && "ownerSVGElement" in n;
2827
2827
  }
2828
- function Do(n) {
2829
- return _i(n) && n.tagName === "svg";
2828
+ function Uo(n) {
2829
+ return wi(n) && n.tagName === "svg";
2830
2830
  }
2831
- function Vo(n) {
2831
+ function Bo(n) {
2832
2832
  const t = {
2833
2833
  presenceContext: null,
2834
2834
  props: {},
@@ -2842,10 +2842,10 @@ function Vo(n) {
2842
2842
  },
2843
2843
  latestValues: {}
2844
2844
  }
2845
- }, e = _i(n) && !Do(n) ? new So(t) : new To(t);
2845
+ }, e = wi(n) && !Uo(n) ? new Fo(t) : new No(t);
2846
2846
  e.mount(n), Qe.set(n, e);
2847
2847
  }
2848
- function Fo(n) {
2848
+ function jo(n) {
2849
2849
  const t = {
2850
2850
  presenceContext: null,
2851
2851
  props: {},
@@ -2855,39 +2855,39 @@ function Fo(n) {
2855
2855
  },
2856
2856
  latestValues: {}
2857
2857
  }
2858
- }, e = new Oo(t);
2858
+ }, e = new xo(t);
2859
2859
  e.mount(n), Qe.set(n, e);
2860
2860
  }
2861
- function Uo(n, t, e) {
2861
+ function zo(n, t, e) {
2862
2862
  const r = me(n) ? n : Ze(n);
2863
- return r.start(ri("", r, t, e)), r.animation;
2863
+ return r.start(si("", r, t, e)), r.animation;
2864
2864
  }
2865
- function Bo(n, t) {
2866
- return me(n) || typeof n == "number" || typeof n == "string" && !Gt(t);
2865
+ function Ko(n, t) {
2866
+ return me(n) || typeof n == "number" || typeof n == "string" && !Yt(t);
2867
2867
  }
2868
- function Ci(n, t, e, r) {
2868
+ function Ti(n, t, e, r) {
2869
2869
  const i = [];
2870
- if (Bo(n, t))
2871
- i.push(Uo(n, Gt(t) && t.default || t, e && (e.default || e)));
2870
+ if (Ko(n, t))
2871
+ i.push(zo(n, Yt(t) && t.default || t, e && (e.default || e)));
2872
2872
  else {
2873
- const a = yr(n, t, r), s = a.length;
2873
+ const a = _r(n, t, r), s = a.length;
2874
2874
  Ce(!!s, "No valid elements provided.");
2875
2875
  for (let o = 0; o < s; o++) {
2876
- const l = a[o], c = l instanceof Element ? Vo : Fo;
2876
+ const l = a[o], c = l instanceof Element ? Bo : jo;
2877
2877
  Qe.has(l) || c(l);
2878
2878
  const d = Qe.get(l), u = j({}, e);
2879
- "delay" in u && typeof u.delay == "function" && (u.delay = u.delay(o, s)), i.push(...Hs(d, J(j({}, t), { transition: u }), {}));
2879
+ "delay" in u && typeof u.delay == "function" && (u.delay = u.delay(o, s)), i.push(...Ys(d, X(j({}, t), { transition: u }), {}));
2880
2880
  }
2881
2881
  }
2882
2882
  return i;
2883
2883
  }
2884
- function jo(n, t, e) {
2884
+ function qo(n, t, e) {
2885
2885
  const r = [];
2886
- return $i(n, t, e, { spring: et }).forEach(({ keyframes: a, transition: s }, o) => {
2887
- r.push(...Ci(o, a, s));
2886
+ return Xi(n, t, e, { spring: et }).forEach(({ keyframes: a, transition: s }, o) => {
2887
+ r.push(...Ti(o, a, s));
2888
2888
  }), r;
2889
2889
  }
2890
- class zo {
2890
+ class Ho {
2891
2891
  constructor(t) {
2892
2892
  this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
2893
2893
  }
@@ -2952,34 +2952,34 @@ class zo {
2952
2952
  this.runAll("complete");
2953
2953
  }
2954
2954
  }
2955
- class Ko extends zo {
2955
+ class Wo extends Ho {
2956
2956
  then(t, e) {
2957
2957
  return this.finished.finally(t).then(() => {
2958
2958
  });
2959
2959
  }
2960
2960
  }
2961
- function qo(n) {
2961
+ function Go(n) {
2962
2962
  return Array.isArray(n) && n.some(Array.isArray);
2963
2963
  }
2964
- function Ho(n) {
2964
+ function Yo(n) {
2965
2965
  function t(e, r, i) {
2966
2966
  let a = [];
2967
- return qo(e) ? a = jo(e, r, n) : a = Ci(e, r, i, n), new Ko(a);
2967
+ return Go(e) ? a = qo(e, r, n) : a = Ti(e, r, i, n), new Wo(a);
2968
2968
  }
2969
2969
  return t;
2970
2970
  }
2971
- const oe = Ho(), Wo = "_spinner_1waxg_1", Go = "_spinnerContainer_1waxg_5", Yo = "_success_1waxg_9", $o = "_successContainer_1waxg_13", Qo = "_container_1waxg_17", Zo = "_card_1waxg_26", Xo = "_warning_1waxg_35", Jo = "_svg_1waxg_43", el = "_srOnly_1waxg_48", Z = {
2972
- spinner: Wo,
2973
- spinnerContainer: Go,
2974
- success: Yo,
2975
- successContainer: $o,
2976
- container: Qo,
2977
- card: Zo,
2978
- warning: Xo,
2979
- svg: Jo,
2980
- srOnly: el
2971
+ const oe = Yo(), $o = "_spinner_1waxg_1", Qo = "_spinnerContainer_1waxg_5", Zo = "_success_1waxg_9", Xo = "_successContainer_1waxg_13", Jo = "_container_1waxg_17", el = "_card_1waxg_26", tl = "_warning_1waxg_35", nl = "_svg_1waxg_43", rl = "_srOnly_1waxg_48", Z = {
2972
+ spinner: $o,
2973
+ spinnerContainer: Qo,
2974
+ success: Zo,
2975
+ successContainer: Xo,
2976
+ container: Jo,
2977
+ card: el,
2978
+ warning: tl,
2979
+ svg: nl,
2980
+ srOnly: rl
2981
2981
  };
2982
- class Ai {
2982
+ class Ii {
2983
2983
  constructor() {
2984
2984
  b(this, "template", `
2985
2985
  <svg aria-hidden="true" class="${Z.spinner}" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -3001,40 +3001,40 @@ class Ai {
3001
3001
  return this.spinner;
3002
3002
  }
3003
3003
  }
3004
- const tl = "_loader_nwq3e_1", Xn = {
3005
- loader: tl
3004
+ const il = "_loader_nwq3e_1", tr = {
3005
+ loader: il
3006
3006
  };
3007
- class nl {
3007
+ class al {
3008
3008
  constructor() {
3009
3009
  b(this, "loader");
3010
- this.loader = document.createElement("div"), this.loader.classList.add(Xn.loader), this.loader.appendChild(new Ai().render());
3010
+ this.loader = document.createElement("div"), this.loader.classList.add(tr.loader), this.loader.appendChild(new Ii().render());
3011
3011
  }
3012
3012
  setClassName(t) {
3013
- t ? this.loader.classList.add(t) : this.loader.className = Xn.loader;
3013
+ t ? this.loader.classList.add(t) : this.loader.className = tr.loader;
3014
3014
  }
3015
3015
  render() {
3016
3016
  return this.loader;
3017
3017
  }
3018
3018
  }
3019
- const rl = "_checkout_5sq3n_1", il = "_hidden_5sq3n_7", al = "_formInitial_5sq3n_11", sl = "_btnsInitial_5sq3n_16", ce = {
3020
- checkout: rl,
3021
- hidden: il,
3022
- formInitial: al,
3023
- btnsInitial: sl
3024
- }, ol = "_buttons_1i8cu_1", ll = "_hidden_1i8cu_5", Ct = {
3025
- buttons: ol,
3026
- hidden: ll
3027
- }, cl = "_applePay_1y98r_1", dl = "_hidden_1y98r_22", At = {
3028
- applePay: cl,
3029
- hidden: dl
3019
+ const sl = "_checkout_5sq3n_1", ol = "_hidden_5sq3n_7", ll = "_formInitial_5sq3n_11", cl = "_btnsInitial_5sq3n_16", ce = {
3020
+ checkout: sl,
3021
+ hidden: ol,
3022
+ formInitial: ll,
3023
+ btnsInitial: cl
3024
+ }, dl = "_buttons_1i8cu_1", ul = "_hidden_1i8cu_5", At = {
3025
+ buttons: dl,
3026
+ hidden: ul
3027
+ }, pl = "_applePay_1y98r_1", hl = "_hidden_1y98r_22", wt = {
3028
+ applePay: pl,
3029
+ hidden: hl
3030
3030
  };
3031
- function wi(n) {
3031
+ function Oi(n) {
3032
3032
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
3033
3033
  }
3034
- var wt, Jn;
3035
- function ul() {
3036
- if (Jn) return wt;
3037
- Jn = 1;
3034
+ var Tt, nr;
3035
+ function ml() {
3036
+ if (nr) return Tt;
3037
+ nr = 1;
3038
3038
  var n = {
3039
3039
  visa: {
3040
3040
  niceType: "Visa",
@@ -3227,21 +3227,21 @@ function ul() {
3227
3227
  }
3228
3228
  }
3229
3229
  };
3230
- return wt = n, wt;
3230
+ return Tt = n, Tt;
3231
3231
  }
3232
- var ze = {}, Ke = {}, er;
3233
- function Ti() {
3234
- if (er) return Ke;
3235
- er = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.clone = void 0;
3232
+ var ze = {}, Ke = {}, rr;
3233
+ function Ni() {
3234
+ if (rr) return Ke;
3235
+ rr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.clone = void 0;
3236
3236
  function n(t) {
3237
3237
  return t ? JSON.parse(JSON.stringify(t)) : null;
3238
3238
  }
3239
3239
  return Ke.clone = n, Ke;
3240
3240
  }
3241
- var qe = {}, tr;
3242
- function pl() {
3243
- if (tr) return qe;
3244
- tr = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.matches = void 0;
3241
+ var qe = {}, ir;
3242
+ function fl() {
3243
+ if (ir) return qe;
3244
+ ir = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.matches = void 0;
3245
3245
  function n(r, i, a) {
3246
3246
  var s = String(i).length, o = r.substr(0, s), l = parseInt(o, 10);
3247
3247
  return i = parseInt(String(i).substr(0, o.length), 10), a = parseInt(String(a).substr(0, o.length), 10), l >= i && l <= a;
@@ -3254,11 +3254,11 @@ function pl() {
3254
3254
  }
3255
3255
  return qe.matches = e, qe;
3256
3256
  }
3257
- var nr;
3258
- function hl() {
3259
- if (nr) return ze;
3260
- nr = 1, Object.defineProperty(ze, "__esModule", { value: !0 }), ze.addMatchingCardsToResults = void 0;
3261
- var n = Ti(), t = pl();
3257
+ var ar;
3258
+ function vl() {
3259
+ if (ar) return ze;
3260
+ ar = 1, Object.defineProperty(ze, "__esModule", { value: !0 }), ze.addMatchingCardsToResults = void 0;
3261
+ var n = Ni(), t = fl();
3262
3262
  function e(r, i, a) {
3263
3263
  var s, o;
3264
3264
  for (s = 0; s < i.patterns.length; s++) {
@@ -3272,19 +3272,19 @@ function hl() {
3272
3272
  }
3273
3273
  return ze.addMatchingCardsToResults = e, ze;
3274
3274
  }
3275
- var He = {}, rr;
3276
- function ml() {
3277
- if (rr) return He;
3278
- rr = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.isValidInputType = void 0;
3275
+ var He = {}, sr;
3276
+ function gl() {
3277
+ if (sr) return He;
3278
+ sr = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.isValidInputType = void 0;
3279
3279
  function n(t) {
3280
3280
  return typeof t == "string" || t instanceof String;
3281
3281
  }
3282
3282
  return He.isValidInputType = n, He;
3283
3283
  }
3284
- var We = {}, ir;
3285
- function fl() {
3286
- if (ir) return We;
3287
- ir = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.findBestMatch = void 0;
3284
+ var We = {}, or;
3285
+ function yl() {
3286
+ if (or) return We;
3287
+ or = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.findBestMatch = void 0;
3288
3288
  function n(e) {
3289
3289
  var r = e.filter(function(i) {
3290
3290
  return i.matchStrength;
@@ -3298,10 +3298,10 @@ function fl() {
3298
3298
  }
3299
3299
  return We.findBestMatch = t, We;
3300
3300
  }
3301
- var Ge, ar;
3302
- function vl() {
3303
- if (ar) return Ge;
3304
- ar = 1;
3301
+ var Ge, lr;
3302
+ function bl() {
3303
+ if (lr) return Ge;
3304
+ lr = 1;
3305
3305
  var n = Ge && Ge.__assign || function() {
3306
3306
  return n = Object.assign || function(m) {
3307
3307
  for (var f, v = 1, y = arguments.length; v < y; v++) {
@@ -3310,7 +3310,7 @@ function vl() {
3310
3310
  }
3311
3311
  return m;
3312
3312
  }, n.apply(this, arguments);
3313
- }, t = ul(), e = hl(), r = ml(), i = fl(), a = Ti(), s = {}, o = {
3313
+ }, t = ml(), e = vl(), r = gl(), i = yl(), a = Ni(), s = {}, o = {
3314
3314
  VISA: "visa",
3315
3315
  MASTERCARD: "mastercard",
3316
3316
  AMERICAN_EXPRESS: "american-express",
@@ -3388,24 +3388,24 @@ function vl() {
3388
3388
  c = (0, a.clone)(l), s = {};
3389
3389
  }, p.types = o, Ge = p, Ge;
3390
3390
  }
3391
- var De = vl();
3391
+ var De = bl();
3392
3392
  De.updateCard("visa", {
3393
3393
  lengths: [16]
3394
3394
  });
3395
3395
  De.updateCard("unionpay", {
3396
3396
  gaps: [4, 8, 12, 16]
3397
3397
  });
3398
- const gl = (n, t) => {
3398
+ const El = (n, t) => {
3399
3399
  const e = De.getTypeInfo(t), r = n.replace(/\D/g, ""), i = (e == null ? void 0 : e.gaps) || [4, 8, 12], a = e ? Math.max(...e.lengths) + i.length : 19, s = [0].concat(i, r.length), o = [];
3400
3400
  for (let l = 0; s[l] < r.length; l++) {
3401
3401
  const c = s[l], d = Math.min(s[l + 1], r.length);
3402
3402
  o.push(r.slice(c, d));
3403
3403
  }
3404
3404
  return o.join(" ").slice(0, a);
3405
- }, yl = (n, t) => {
3405
+ }, _l = (n, t) => {
3406
3406
  const e = De.getTypeInfo(t), r = (e == null ? void 0 : e.code.size) || 4;
3407
3407
  return n.replace(/\D/g, "").slice(0, r);
3408
- }, bl = (n, t) => {
3408
+ }, Cl = (n, t) => {
3409
3409
  const e = n.replace(/\D/g, "");
3410
3410
  let r = e.slice(0, 2);
3411
3411
  if (!r) return "";
@@ -3469,20 +3469,20 @@ const vt = [
3469
3469
  minLength: 12,
3470
3470
  maxLength: 19
3471
3471
  }
3472
- ], Ii = (n) => vt.find((t) => t.pattern.test(n)) || null, sr = (n) => vt.filter((t) => t.pattern.test(n)), El = (n) => {
3472
+ ], Li = (n) => vt.find((t) => t.pattern.test(n)) || null, cr = (n) => vt.filter((t) => t.pattern.test(n)), Al = (n) => {
3473
3473
  let t = 0, e = !1;
3474
3474
  for (let r = n.length - 1; r >= 0; r--) {
3475
3475
  let i = parseInt(n[r]);
3476
3476
  e && (i *= 2, i > 9 && (i -= 9)), t += i, e = !e;
3477
3477
  }
3478
3478
  return t % 10 === 0;
3479
- }, or = (n, t) => {
3479
+ }, dr = (n, t) => {
3480
3480
  const e = n.replace(/\D/g, "");
3481
3481
  if (!e)
3482
3482
  return { isValid: !1, cardType: null, error: le.Empty };
3483
3483
  if (!/^\d+$/.test(e))
3484
3484
  return { isValid: !1, cardType: null, error: le.Invalid };
3485
- const r = Ii(e);
3485
+ const r = Li(e);
3486
3486
  if (r) {
3487
3487
  if (e.length < r.minLength || e.length > r.maxLength)
3488
3488
  return {
@@ -3500,7 +3500,7 @@ const vt = [
3500
3500
  isValid: !1,
3501
3501
  cardType: r.name,
3502
3502
  error: "unsupported"
3503
- } : El(e) ? {
3503
+ } : Al(e) ? {
3504
3504
  isValid: !0,
3505
3505
  cardType: (r == null ? void 0 : r.name) || null,
3506
3506
  error: null
@@ -3509,7 +3509,7 @@ const vt = [
3509
3509
  cardType: (r == null ? void 0 : r.name) || null,
3510
3510
  error: le.Invalid
3511
3511
  };
3512
- }, _l = (n) => {
3512
+ }, wl = (n) => {
3513
3513
  var t;
3514
3514
  return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((t = n.checkout_config) == null ? void 0 : t.find(
3515
3515
  ({ is_active: r, type: i }) => r && i === "google-pay"
@@ -3520,7 +3520,7 @@ const vt = [
3520
3520
  merchantId: n.merchant_id,
3521
3521
  lineItems: []
3522
3522
  };
3523
- }, Cl = (n) => {
3523
+ }, Tl = (n) => {
3524
3524
  var t, e;
3525
3525
  return !n || typeof n.amount != "number" || !n.currency || !n.country || !n.merchant_id || n.checkout_config && !((t = n.checkout_config) == null ? void 0 : t.find(
3526
3526
  ({ is_active: i, type: a }) => i && a === "apple-pay"
@@ -3531,7 +3531,7 @@ const vt = [
3531
3531
  merchantId: n.merchant_id,
3532
3532
  lineItems: ((e = n.apple_pay_info) == null ? void 0 : e.line_items) || []
3533
3533
  };
3534
- }, Al = (n = []) => n.reduce((t, e) => {
3534
+ }, Il = (n = []) => n.reduce((t, e) => {
3535
3535
  switch (e) {
3536
3536
  case he.Visa:
3537
3537
  return t.push("visa"), t;
@@ -3548,7 +3548,7 @@ const vt = [
3548
3548
  default:
3549
3549
  return t;
3550
3550
  }
3551
- }, []), wl = (n) => ({
3551
+ }, []), Ol = (n) => ({
3552
3552
  ar: "ar-AB",
3553
3553
  en: "en-GB",
3554
3554
  cs: "cs-CZ",
@@ -3567,17 +3567,19 @@ const vt = [
3567
3567
  ms: "ms-MY",
3568
3568
  ru: "ru-RU",
3569
3569
  nb: "nb-NO",
3570
+ no: "nb-NO",
3570
3571
  nl: "nl-NL",
3571
3572
  pl: "pl-PL",
3572
3573
  pt: "pt-PT",
3573
3574
  ro: "ro-RO",
3575
+ ua: "uk-UA",
3574
3576
  sk: "sk-SK",
3575
3577
  sv: "sv-SE",
3576
3578
  th: "th-TH",
3577
3579
  tr: "tr-TR",
3578
3580
  vi: "vi-VN",
3579
3581
  zh: "zh-CN"
3580
- })[n] || "en-US", Tl = (n) => ({
3582
+ })[n] || "en-US", Nl = (n) => ({
3581
3583
  en: "en",
3582
3584
  ar: "ar",
3583
3585
  cs: "cs",
@@ -3602,7 +3604,7 @@ const vt = [
3602
3604
  tr: "tr",
3603
3605
  zh: "zh"
3604
3606
  })[n] || "en";
3605
- class Il {
3607
+ class Ll {
3606
3608
  constructor(t) {
3607
3609
  b(this, "element");
3608
3610
  b(this, "events", {
@@ -3612,20 +3614,20 @@ class Il {
3612
3614
  b(this, "customButtonStyles");
3613
3615
  this.config = t;
3614
3616
  const e = this.config.state.styles.getState().ApplePayButton;
3615
- this.ev = this.config.service.ev, this.customButtonStyles = e, this.element = document.createElement("div"), this.element.classList.add(At.applePay, At.hidden);
3617
+ this.ev = this.config.service.ev, this.customButtonStyles = e, this.element = document.createElement("div"), this.element.classList.add(wt.applePay, wt.hidden);
3616
3618
  }
3617
3619
  init(t) {
3618
3620
  return z(this, null, function* () {
3619
3621
  if (!this.config) return;
3620
- const e = this.config.state.transaction.getState(), { locale: r, supportedCardTypes: i } = this.config.state.checkout.getState(), a = Cl(e);
3622
+ const e = this.config.state.transaction.getState(), { locale: r, supportedCardTypes: i } = this.config.state.checkout.getState(), a = Tl(e);
3621
3623
  a && (yield this.ev.initApple(
3622
- J(j({}, t), {
3624
+ X(j({}, t), {
3623
3625
  transaction: a,
3624
- supportedCardTypes: Al(i),
3625
- locale: wl(r || "en")
3626
+ supportedCardTypes: Il(i),
3627
+ locale: Ol(r || "en")
3626
3628
  }),
3627
3629
  this.customButtonStyles
3628
- ), this.ev.isAppleAvailable() && (yield this.ev.renderApple(this.element), this.element.classList.remove(At.hidden), this.events.ready.emit()));
3630
+ ), this.ev.isAppleAvailable() && (yield this.ev.renderApple(this.element), this.element.classList.remove(wt.hidden), this.events.ready.emit()));
3629
3631
  });
3630
3632
  }
3631
3633
  addEventListener(t, e) {
@@ -3636,12 +3638,12 @@ class Il {
3636
3638
  }
3637
3639
  }
3638
3640
  var te = /* @__PURE__ */ ((n) => (n.PAYPAL = "paypal", n.APPLE_PAY = "apple-pay", n.GOOGLE_PAY = "google-pay", n.CARD = "card", n.VENMO = "venmo", n))(te || {});
3639
- const hn = (n = "sandbox") => ({
3641
+ const mn = (n = "sandbox") => ({
3640
3642
  develop: "https://api-dev.paynext.com",
3641
3643
  sandbox: "https://api-sandbox.paynext.com",
3642
3644
  staging: "https://api-staging.paynext.com",
3643
3645
  production: "https://api.paynext.com"
3644
- })[n], Ol = [
3646
+ })[n], xl = [
3645
3647
  {
3646
3648
  type: te.PAYPAL,
3647
3649
  order: 1,
@@ -3662,14 +3664,14 @@ const hn = (n = "sandbox") => ({
3662
3664
  order: 4,
3663
3665
  is_active: !0
3664
3666
  }
3665
- ], Nl = {
3667
+ ], Pl = {
3666
3668
  [te.GOOGLE_PAY]: "GPAY",
3667
3669
  [te.APPLE_PAY]: "APPLEPAY",
3668
3670
  [te.PAYPAL]: "PAYPAL",
3669
3671
  [te.CARD]: "CARD",
3670
- [te.VENMO]: "BRAINTREE"
3672
+ [te.VENMO]: "VENMO"
3671
3673
  // Venmo uses Braintree
3672
- }, Ll = (n) => n.googlePay ? te.GOOGLE_PAY : n.applePay ? te.APPLE_PAY : n.paypal ? te.PAYPAL : n.braintree ? te.VENMO : te.CARD, xl = (n) => Nl[n], Pl = (n) => {
3674
+ }, Rl = (n) => n.googlePay ? te.GOOGLE_PAY : n.applePay ? te.APPLE_PAY : n.paypal ? te.PAYPAL : n.braintree ? te.VENMO : te.CARD, kl = (n) => Pl[n], Ml = (n) => {
3673
3675
  const t = n.card;
3674
3676
  if (t)
3675
3677
  return {
@@ -3688,14 +3690,14 @@ const hn = (n = "sandbox") => ({
3688
3690
  last4: t.lastFourDigits,
3689
3691
  number: t.number
3690
3692
  };
3691
- }, Rl = (n) => {
3693
+ }, Sl = (n) => {
3692
3694
  var e;
3693
3695
  const t = n.paypal;
3694
3696
  if ((e = t == null ? void 0 : t.billing_agreement_token) != null && e.paypalId)
3695
3697
  return {
3696
3698
  billing_agreement_token: t.billing_agreement_token.paypalId
3697
3699
  };
3698
- }, kl = (n) => {
3700
+ }, Dl = (n) => {
3699
3701
  var e, r;
3700
3702
  const t = n.googlePay;
3701
3703
  if (t != null && t.token)
@@ -3707,7 +3709,7 @@ const hn = (n = "sandbox") => ({
3707
3709
  token: t.token.number,
3708
3710
  token_service_provider: t.token.tokenServiceProvider
3709
3711
  };
3710
- }, Ml = (n) => {
3712
+ }, Vl = (n) => {
3711
3713
  var e, r, i, a, s, o;
3712
3714
  const t = n.applePay;
3713
3715
  if (t)
@@ -3719,13 +3721,13 @@ const hn = (n = "sandbox") => ({
3719
3721
  token: (s = t.networkToken) == null ? void 0 : s.number,
3720
3722
  token_service_provider: (o = t.networkToken) == null ? void 0 : o.tokenServiceProvider
3721
3723
  };
3722
- }, Sl = (n) => {
3724
+ }, Fl = (n) => {
3723
3725
  const t = n.braintree;
3724
3726
  if (t)
3725
3727
  return {
3726
3728
  payment_method_nonce: t.nonce
3727
3729
  };
3728
- }, lr = (n) => {
3730
+ }, ur = (n) => {
3729
3731
  var r, i, a, s, o, l, c, d, u, h, p, m, f, v;
3730
3732
  const { applePay: t, googlePay: e } = n;
3731
3733
  if (!(!t && !e))
@@ -3737,7 +3739,7 @@ const hn = (n = "sandbox") => ({
3737
3739
  postal_code: ((p = t == null ? void 0 : t.billingContact) == null ? void 0 : p.postalCode) || ((m = e == null ? void 0 : e.billingAddress) == null ? void 0 : m.postalCode) || void 0,
3738
3740
  state: ((f = t == null ? void 0 : t.billingContact) == null ? void 0 : f.administrativeArea) || ((v = e == null ? void 0 : e.billingAddress) == null ? void 0 : v.administrativeArea) || void 0
3739
3741
  };
3740
- }, cr = (n) => {
3742
+ }, pr = (n) => {
3741
3743
  var i, a, s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I;
3742
3744
  const { card: t, googlePay: e, applePay: r } = n;
3743
3745
  if (!(!t && !(e != null && e.card) && !(r != null && r.card)))
@@ -3757,70 +3759,70 @@ const hn = (n = "sandbox") => ({
3757
3759
  last4: (t == null ? void 0 : t.lastFourDigits) || ((x = e == null ? void 0 : e.card) == null ? void 0 : x.lastFour) || ((C = r == null ? void 0 : r.card) == null ? void 0 : C.lastFour),
3758
3760
  number: (t == null ? void 0 : t.number) || ((I = e == null ? void 0 : e.card) == null ? void 0 : I.number)
3759
3761
  };
3760
- }, dr = (n) => {
3762
+ }, hr = (n) => {
3761
3763
  var r, i;
3762
3764
  const { applePay: t, card: e } = n;
3763
3765
  return (r = t == null ? void 0 : t.billingContact) != null && r.givenName ? `${t.billingContact.givenName} ${t.billingContact.familyName || ""}`.trim() : (i = e == null ? void 0 : e.metadata) == null ? void 0 : i.name;
3764
- }, Dl = (n) => {
3766
+ }, Ul = (n) => {
3765
3767
  var i, a;
3766
- const t = Ll(n), e = xl(t), r = {
3768
+ const t = Rl(n), e = kl(t), r = {
3767
3769
  client_session: n.clientSession,
3768
3770
  three_ds_session_id: n.threeDsSessionId,
3769
3771
  type: e
3770
3772
  };
3771
3773
  switch (t) {
3772
3774
  case te.CARD:
3773
- return J(j({}, r), {
3774
- name: dr(n),
3775
- card: Pl(n)
3775
+ return X(j({}, r), {
3776
+ name: hr(n),
3777
+ card: Ml(n)
3776
3778
  });
3777
3779
  case te.PAYPAL:
3778
- return J(j({}, r), {
3779
- paypal: Rl(n)
3780
+ return X(j({}, r), {
3781
+ paypal: Sl(n)
3780
3782
  });
3781
3783
  case te.GOOGLE_PAY:
3782
- return J(j({}, r), {
3783
- card: cr(n),
3784
- google_pay: kl(n),
3785
- billing_address: lr(n)
3784
+ return X(j({}, r), {
3785
+ card: pr(n),
3786
+ google_pay: Dl(n),
3787
+ billing_address: ur(n)
3786
3788
  });
3787
3789
  case te.APPLE_PAY:
3788
- return J(j({}, r), {
3789
- name: dr(n),
3790
- card: cr(n),
3791
- apple_pay: Ml(n),
3790
+ return X(j({}, r), {
3791
+ name: hr(n),
3792
+ card: pr(n),
3793
+ apple_pay: Vl(n),
3792
3794
  phone: (a = (i = n.applePay) == null ? void 0 : i.shippingContact) == null ? void 0 : a.phoneNumber,
3793
- billing_address: lr(n)
3795
+ billing_address: ur(n)
3794
3796
  });
3795
3797
  case te.VENMO:
3796
- return J(j({}, r), {
3797
- braintree: Sl(n)
3798
+ return X(j({}, r), {
3799
+ venmo: Fl(n)
3798
3800
  });
3799
3801
  default:
3800
3802
  throw new Error(`Unsupported payment method: ${t}`);
3801
3803
  }
3802
- }, Vl = (n, t, e) => z(void 0, null, function* () {
3803
- const r = `${hn(t)}/internal/payments/create`, i = new Headers();
3804
- i.append("Content-Type", "application/json"), i.append("X-API-Version", e);
3805
- const a = Dl(n);
3806
- return yield (yield fetch(r, {
3804
+ }, Bl = (n, t, e, r) => z(void 0, null, function* () {
3805
+ const i = `${mn(t)}/internal/payments/create`, a = new Headers();
3806
+ a.append("Content-Type", "application/json"), a.append("X-API-Version", e);
3807
+ const s = Ul(n);
3808
+ return yield (yield fetch(i, {
3807
3809
  method: "POST",
3808
- headers: i,
3809
- body: JSON.stringify(a)
3810
+ headers: a,
3811
+ body: JSON.stringify(X(j({}, s), { use_workflows: r || void 0 }))
3810
3812
  })).json();
3811
- }), Fl = (n, t, e) => z(void 0, null, function* () {
3812
- const r = `${hn(t)}/internal/payments/create/billing/agreement`, i = new Headers();
3813
+ }), jl = (n, t, e) => z(void 0, null, function* () {
3814
+ const r = `${mn(t)}/internal/payments/create/billing/agreement`, i = new Headers();
3813
3815
  return i.append("Content-Type", "application/json"), i.append("X-API-Version", e), (yield (yield fetch(r, {
3814
3816
  method: "POST",
3815
3817
  headers: i,
3816
3818
  body: JSON.stringify({ client_session: n })
3817
3819
  })).json()).paypal_agreement_token_response.token_id || "";
3818
- }), Ul = (n, t, e) => z(void 0, null, function* () {
3819
- const r = `${hn(t)}/internal/payments/config?client_session_id=${n}`, i = new Headers();
3820
+ }), zl = (n, t, e) => z(void 0, null, function* () {
3821
+ const r = `${mn(t)}/internal/payments/config?client_session_id=${n}`, i = new Headers();
3820
3822
  i.append("X-API-Version", e);
3821
3823
  const s = yield (yield fetch(r, { headers: i })).json();
3822
- return s.checkout_config || (s.checkout_config = Ol), s;
3823
- }), Bl = [
3824
+ return s.checkout_config || (s.checkout_config = xl), s;
3825
+ }), Kl = [
3824
3826
  { type: te.PAYPAL, is_active: !0, order: 1 },
3825
3827
  { type: te.APPLE_PAY, is_active: !0, order: 2 },
3826
3828
  { type: te.GOOGLE_PAY, is_active: !0, order: 3 },
@@ -3842,11 +3844,11 @@ const hn = (n = "sandbox") => ({
3842
3844
  open: { y: 0, opacity: 1, height: "auto" },
3843
3845
  close: { y: -15, opacity: 0, height: 0 },
3844
3846
  transition: { duration: 0.5, type: "spring", bounce: 0 }
3845
- }, jl = "_googlePay_1xmjo_1", zl = "_hidden_1xmjo_17", Tt = {
3846
- googlePay: jl,
3847
- hidden: zl
3847
+ }, ql = "_googlePay_1xmjo_1", Hl = "_hidden_1xmjo_17", It = {
3848
+ googlePay: ql,
3849
+ hidden: Hl
3848
3850
  };
3849
- class Kl {
3851
+ class Wl {
3850
3852
  constructor(t) {
3851
3853
  b(this, "element");
3852
3854
  b(this, "events", {
@@ -3854,19 +3856,26 @@ class Kl {
3854
3856
  });
3855
3857
  b(this, "ev");
3856
3858
  b(this, "customButtonStyles");
3857
- this.config = t, this.ev = this.config.service.ev, this.customButtonStyles = this.config.state.styles.getState().GooglePayButton, this.element = document.createElement("div"), this.element.classList.add(Tt.googlePay, Tt.hidden);
3859
+ this.config = t, this.ev = this.config.service.ev, this.customButtonStyles = this.config.state.styles.getState().GooglePayButton, this.element = document.createElement("div"), this.element.classList.add(It.googlePay, It.hidden);
3860
+ }
3861
+ // detect iOS to disable Google Pay
3862
+ isIOS() {
3863
+ if (typeof navigator == "undefined") return !1;
3864
+ const t = navigator.userAgent || "";
3865
+ return /iPad|iPhone|iPod/.test(t) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
3858
3866
  }
3859
3867
  init(t) {
3860
3868
  return z(this, null, function* () {
3861
- if (!this.config) return;
3862
- const e = this.config.state.transaction.getState(), { locale: r } = this.config.state.checkout.getState(), i = _l(e);
3869
+ if (!this.config || this.isIOS())
3870
+ return;
3871
+ const e = this.config.state.transaction.getState(), { locale: r } = this.config.state.checkout.getState(), i = wl(e);
3863
3872
  i && (yield this.ev.initGoogle(
3864
- J(j({}, t), {
3873
+ X(j({}, t), {
3865
3874
  transaction: i,
3866
- locale: Tl(r || "en")
3875
+ locale: Nl(r || "en")
3867
3876
  }),
3868
3877
  this.customButtonStyles
3869
- ), yield this.ev.renderGoogle(this.element), this.element.classList.remove(Tt.hidden), this.events.ready.emit());
3878
+ ), yield this.ev.renderGoogle(this.element), this.element.classList.remove(It.hidden), this.events.ready.emit());
3870
3879
  });
3871
3880
  }
3872
3881
  addEventListener(t, e) {
@@ -3876,11 +3885,11 @@ class Kl {
3876
3885
  return this.element;
3877
3886
  }
3878
3887
  }
3879
- const ql = "_paypal_7twkb_1", Hl = "_hidden_7twkb_8", It = {
3880
- paypal: ql,
3881
- hidden: Hl
3888
+ const Gl = "_paypal_7twkb_1", Yl = "_hidden_7twkb_8", Ot = {
3889
+ paypal: Gl,
3890
+ hidden: Yl
3882
3891
  };
3883
- class Wl {
3892
+ class $l {
3884
3893
  constructor(t) {
3885
3894
  b(this, "element");
3886
3895
  b(this, "events", {
@@ -3888,7 +3897,7 @@ class Wl {
3888
3897
  });
3889
3898
  b(this, "paypal");
3890
3899
  b(this, "customButtonStyles");
3891
- this.config = t, this.paypal = this.config.service.paypal, this.customButtonStyles = this.config.state.styles.getState().PayPalButton, this.element = document.createElement("div"), this.element.classList.add(It.paypal, It.hidden);
3900
+ this.config = t, this.paypal = this.config.service.paypal, this.customButtonStyles = this.config.state.styles.getState().PayPalButton, this.element = document.createElement("div"), this.element.classList.add(Ot.paypal, Ot.hidden);
3892
3901
  }
3893
3902
  // init
3894
3903
  init(t) {
@@ -3896,13 +3905,13 @@ class Wl {
3896
3905
  var a, s, o;
3897
3906
  if (!this.config) return;
3898
3907
  const e = this.config.state.transaction.getState(), r = this.config.state.checkout.getState(), i = () => z(this, null, function* () {
3899
- return yield Fl(r.clientToken, r.environment, r.apiVersion);
3908
+ return yield jl(r.clientToken, r.environment, r.apiVersion);
3900
3909
  });
3901
3910
  e && (yield this.paypal.init({
3902
3911
  clientId: ((a = e == null ? void 0 : e.paypal_info) == null ? void 0 : a.client_id) || "",
3903
3912
  environment: ((s = e == null ? void 0 : e.paypal_info) == null ? void 0 : s.environment) || "sandbox",
3904
3913
  vault: !0
3905
- }), yield this.paypal.render(this.element, J(j({}, t), {
3914
+ }), yield this.paypal.render(this.element, X(j({}, t), {
3906
3915
  createBillingAgreement: i,
3907
3916
  onApprove: (c) => z(this, [c], function* ({ billingToken: l }) {
3908
3917
  var d;
@@ -3911,7 +3920,7 @@ class Wl {
3911
3920
  style: (o = this.customButtonStyles) == null ? void 0 : o.styles,
3912
3921
  onCancel: t == null ? void 0 : t.onCancel,
3913
3922
  onError: t == null ? void 0 : t.onError
3914
- })), this.element.classList.remove(It.hidden), this.events.ready.emit());
3923
+ })), this.element.classList.remove(Ot.hidden), this.events.ready.emit());
3915
3924
  });
3916
3925
  }
3917
3926
  // add event listener
@@ -3923,7 +3932,7 @@ class Wl {
3923
3932
  return this.element;
3924
3933
  }
3925
3934
  }
3926
- class Gl {
3935
+ class Ql {
3927
3936
  constructor() {
3928
3937
  b(this, "template", `
3929
3938
  <svg
@@ -3948,14 +3957,14 @@ class Gl {
3948
3957
  return this.element;
3949
3958
  }
3950
3959
  }
3951
- const Yl = "_button_1br9w_1", $l = "_press_1br9w_21", dt = {
3952
- button: Yl,
3953
- press: $l
3960
+ const Zl = "_button_1br9w_1", Xl = "_press_1br9w_21", dt = {
3961
+ button: Zl,
3962
+ press: Xl
3954
3963
  };
3955
- class Ql {
3964
+ class Jl {
3956
3965
  constructor(t) {
3957
3966
  b(this, "element");
3958
- b(this, "icon", new Gl());
3967
+ b(this, "icon", new Ql());
3959
3968
  this.config = t;
3960
3969
  const e = this.config.state.styles.getState().WalletButton, r = this.config.state.translate;
3961
3970
  this.element = document.createElement("button"), this.element.classList.add(dt.button), e != null && e.className && this.element.classList.add(e.className), e != null && e.styles && Object.assign(this.element.style, e.styles);
@@ -3971,15 +3980,18 @@ class Ql {
3971
3980
  return this.element;
3972
3981
  }
3973
3982
  }
3974
- const Zl = (n, t, e) => t.concat(n.filter((r) => t.every((i) => !e(r, i)))), Xl = "_venmo_10t25_1", Jl = "_hidden_10t25_17", Ot = {
3975
- venmo: Xl,
3976
- hidden: Jl
3977
- }, ec = {
3983
+ const ec = (n, t, e) => t.concat(n.filter((r) => t.every((i) => !e(r, i)))), tc = "_venmo_w4oaz_1", nc = "_hidden_w4oaz_26", Nt = {
3984
+ venmo: tc,
3985
+ hidden: nc
3986
+ }, rc = {
3978
3987
  display: "block",
3979
3988
  height: 40,
3980
3989
  borderRadius: 12
3981
- };
3982
- class tc {
3990
+ }, ic = `<svg viewBox="2.3 484.3 611.9 117.80000000000001" xmlns="http://www.w3.org/2000/svg">
3991
+ <path d="M103.1 485.8c4.2 7 5.7 14 5.7 22.4 0 28-23.8 65.9-43.4 91.1H20.5L2.3 491.5l40.6-2.8 9.8 77.1c8.4-14 19.7-37.9 19.7-53.2 0-8.4-1.4-14-4.2-19.7zm51.8 47.7c7 0 25.2-2.8 25.2-14 0-5.7-2.8-7-7-7-8.3 0-18.2 8.4-18.2 21zm-1.3 21c0 12.7 7 18.2 16.8 18.2s19.7-2.8 32.2-8.4l-5.7 30.8c-8.4 4.2-22.4 7-36.4 7-33.5 0-46.2-21-46.2-46.2 0-33.5 19.7-68.6 60.2-68.6 22.4 0 35 12.7 35 30.8 1.5 26.6-35 36.4-55.9 36.4zM324.4 511c0 4.2 0 9.8-1.4 14l-11.2 74.2H274l11.2-68.6c0-1.4 1.4-5.7 1.4-7 0-5.7-2.8-5.7-7-5.7-5.7 0-9.8 2.8-12.7 4.2l-14 77.1H215l16.8-112.1h33.5v8.4c8.4-5.7 18.2-11.2 32.2-11.2 19.9 3 26.9 12.7 26.9 26.7zm113.4-12.5c11.2-8.4 21-12.7 35-12.7 19.7 0 26.7 9.8 26.7 25.2 0 4.2 0 9.8-1.4 14L487 599.3h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7s-9.8 1.4-12.7 4.2L428 599.2h-37.9l11.2-70v-5.7c0-5.7-2.8-7-7-7-5.7 0-9.8 2.8-12.7 4.2L369 599h-37.9L348 487h32.2l1.4 9.8c7-5.7 18.2-11.2 32.2-11.2 11.4 1.7 19.7 5.9 24 12.9zM575 532.1c0-9.8-2.8-15.4-9.8-15.4-15.4 0-18.2 26.7-18.2 40.6 0 9.8 2.8 16.8 9.8 16.8 15.5-1.4 18.2-29.4 18.2-42zm-65.8 22.4c0-35 18.2-68.6 61.6-68.6 32.2 0 43.4 19.7 43.4 44.9 0 35-18.2 70-61.6 70-32.2 1.3-43.4-19.7-43.4-46.3z"
3992
+ fill="currentColor"/>
3993
+ </svg>`;
3994
+ class ac {
3983
3995
  constructor(t) {
3984
3996
  b(this, "isProcessing", !1);
3985
3997
  b(this, "venmoButton");
@@ -3989,7 +4001,7 @@ class tc {
3989
4001
  b(this, "braintree");
3990
4002
  this.config = t, this.braintree = this.config.service.braintree;
3991
4003
  const e = this.config.state.styles.getState().BraintreeButton;
3992
- this.venmoButton = document.createElement("button"), this.venmoButton.classList.add(Ot.venmo, Ot.hidden), e != null && e.className && this.venmoButton.classList.add(e.className), e != null && e.styles && Object.assign(this.venmoButton.style, e.styles), this.venmoButton.textContent = "Venmo";
4004
+ this.venmoButton = document.createElement("button"), this.venmoButton.classList.add(Nt.venmo, Nt.hidden), e != null && e.className && this.venmoButton.classList.add(e.className), e != null && e.styles && Object.assign(this.venmoButton.style, e.styles), this.venmoButton.setAttribute("aria-label", "Venmo"), this.venmoButton.innerHTML = ic;
3993
4005
  }
3994
4006
  // init
3995
4007
  init(t) {
@@ -4013,7 +4025,7 @@ class tc {
4013
4025
  yield this.handleExistingTokenization(t);
4014
4026
  return;
4015
4027
  }
4016
- this.venmoButton.classList.remove(Ot.hidden), this.events.ready.emit();
4028
+ this.venmoButton.classList.remove(Nt.hidden), this.events.ready.emit();
4017
4029
  } catch (i) {
4018
4030
  console.error("Error initializing Venmo:", i), this.handleVenmoError(i);
4019
4031
  }
@@ -4021,7 +4033,7 @@ class tc {
4021
4033
  }
4022
4034
  // display venmo button
4023
4035
  displayVenmoButton(t) {
4024
- Object.assign(this.venmoButton.style, ec), this.venmoButton.addEventListener("click", () => z(this, null, function* () {
4036
+ Object.assign(this.venmoButton.style, rc), this.venmoButton.addEventListener("click", () => z(this, null, function* () {
4025
4037
  if (!this.isProcessing) {
4026
4038
  this.isProcessing = !0, this.venmoButton.disabled = !0;
4027
4039
  try {
@@ -4065,7 +4077,7 @@ class tc {
4065
4077
  return this.venmoButton;
4066
4078
  }
4067
4079
  }
4068
- class nc {
4080
+ class sc {
4069
4081
  constructor(t) {
4070
4082
  b(this, "isAppleReady", !0);
4071
4083
  b(this, "isGoogleReady", !0);
@@ -4084,7 +4096,7 @@ class nc {
4084
4096
  cancel: new de(),
4085
4097
  success: new de()
4086
4098
  });
4087
- this.config = t, this.applePay = new Il(t), this.paypal = new Wl(t), this.googlePay = new Kl(t), this.braintree = new tc(t), this.card = new Ql(t), this.buttons = document.createElement("div"), this.buttons.classList.add(Ct.buttons, Ct.hidden);
4099
+ this.config = t, this.applePay = new Ll(t), this.paypal = new $l(t), this.googlePay = new Wl(t), this.braintree = new ac(t), this.card = new Jl(t), this.buttons = document.createElement("div"), this.buttons.classList.add(At.buttons, At.hidden);
4088
4100
  }
4089
4101
  // init
4090
4102
  init() {
@@ -4106,7 +4118,7 @@ class nc {
4106
4118
  yield this.applePay.init({
4107
4119
  onError: () => this.events.error.emit(),
4108
4120
  onCancel: () => this.events.cancel.emit(),
4109
- onSuccess: (t) => this.events.success.emit(J(j({}, t), { type: "apple" }))
4121
+ onSuccess: (t) => this.events.success.emit(X(j({}, t), { type: "apple" }))
4110
4122
  });
4111
4123
  } catch (t) {
4112
4124
  console.error(t);
@@ -4123,7 +4135,7 @@ class nc {
4123
4135
  yield this.googlePay.init({
4124
4136
  onError: () => this.events.error.emit(),
4125
4137
  onCancel: () => this.events.cancel.emit(),
4126
- onSuccess: (t) => this.events.success.emit(J(j({}, t), { type: "google" }))
4138
+ onSuccess: (t) => this.events.success.emit(X(j({}, t), { type: "google" }))
4127
4139
  });
4128
4140
  } catch (t) {
4129
4141
  console.error(t);
@@ -4176,7 +4188,7 @@ class nc {
4176
4188
  // init payment methods
4177
4189
  initPaymentMethods() {
4178
4190
  return z(this, null, function* () {
4179
- const t = this.config.state.transaction.getState(), r = Zl(Bl, (t == null ? void 0 : t.checkout_config) || [], (i, a) => i.type === a.type).filter(({ is_active: i }) => i).sort((i, a) => i.order - a.order).map(({ type: i }) => {
4191
+ const t = this.config.state.transaction.getState(), r = ec(Kl, (t == null ? void 0 : t.checkout_config) || [], (i, a) => i.type === a.type).filter(({ is_active: i }) => i).sort((i, a) => i.order - a.order).map(({ type: i }) => {
4180
4192
  switch (i) {
4181
4193
  case te.APPLE_PAY:
4182
4194
  return this.initApple();
@@ -4205,14 +4217,14 @@ class nc {
4205
4217
  }
4206
4218
  // show button
4207
4219
  showButton() {
4208
- this.buttons.classList.remove(Ct.hidden);
4220
+ this.buttons.classList.remove(At.hidden);
4209
4221
  }
4210
4222
  // render
4211
4223
  render() {
4212
4224
  return this.buttons;
4213
4225
  }
4214
4226
  }
4215
- class rc {
4227
+ class oc {
4216
4228
  constructor() {
4217
4229
  b(this, "template", `
4218
4230
  <svg
@@ -4238,14 +4250,14 @@ class rc {
4238
4250
  return this.element;
4239
4251
  }
4240
4252
  }
4241
- const ic = "_button_125my_1", ac = {
4242
- button: ic
4253
+ const lc = "_button_125my_1", cc = {
4254
+ button: lc
4243
4255
  };
4244
- class sc {
4256
+ class dc {
4245
4257
  constructor() {
4246
4258
  b(this, "element");
4247
- b(this, "icon", new rc());
4248
- this.element = document.createElement("div"), this.element.classList.add(ac.button), this.element.appendChild(this.icon.render());
4259
+ b(this, "icon", new oc());
4260
+ this.element = document.createElement("div"), this.element.classList.add(cc.button), this.element.appendChild(this.icon.render());
4249
4261
  }
4250
4262
  addEventListener(t) {
4251
4263
  return this.element.addEventListener("click", t);
@@ -4254,17 +4266,17 @@ class sc {
4254
4266
  return this.element;
4255
4267
  }
4256
4268
  }
4257
- const oc = "_button_rx9be_1", lc = "_disabled_rx9be_17", cc = "_press_rx9be_22", dc = "_hidden_rx9be_26", uc = "_spinner_rx9be_30", Ee = {
4258
- button: oc,
4259
- disabled: lc,
4260
- press: cc,
4261
- hidden: dc,
4262
- spinner: uc
4269
+ const uc = "_button_rx9be_1", pc = "_disabled_rx9be_17", hc = "_press_rx9be_22", mc = "_hidden_rx9be_26", fc = "_spinner_rx9be_30", Ee = {
4270
+ button: uc,
4271
+ disabled: pc,
4272
+ press: hc,
4273
+ hidden: mc,
4274
+ spinner: fc
4263
4275
  };
4264
- class pc {
4276
+ class vc {
4265
4277
  constructor(t, e) {
4266
4278
  b(this, "element");
4267
- b(this, "spinner", new Ai());
4279
+ b(this, "spinner", new Ii());
4268
4280
  b(this, "message", document.createElement("span"));
4269
4281
  this.element = document.createElement("button"), this.element.classList.add(Ee.button), e != null && e.className && this.element.classList.add(e.className), e != null && e.styles && Object.assign(this.element.style, e.styles), this.spinner.addClass(Ee.spinner), this.spinner.addClass(Ee.hidden), this.message.textContent = t.messages().card.pay.button, this.element.append(this.spinner.render(), this.message), this.element.addEventListener("mousedown", () => this.element.classList.add(Ee.press)), this.element.addEventListener("mouseup", () => this.element.classList.remove(Ee.press)), this.element.addEventListener("mouseout", () => this.element.classList.remove(Ee.press)), t.subscribe((r) => {
4270
4282
  this.message.textContent = r.messages.card.pay.button;
@@ -4280,21 +4292,21 @@ class pc {
4280
4292
  return this.element;
4281
4293
  }
4282
4294
  }
4283
- const hc = "_cardForm_isqbi_1", mc = "_hidden_isqbi_5", ut = {
4284
- cardForm: hc,
4285
- hidden: mc
4286
- }, fc = "_wrapper_4knhb_1", vc = "_inputContainer_4knhb_5", gc = "_input_4knhb_5", yc = "_errorInput_4knhb_24", bc = "_label_4knhb_28", Ec = "_labelError_4knhb_32", _c = "_disabled_4knhb_36", Cc = "_disabledInput_4knhb_40", Ac = "_hidden_4knhb_47", ae = {
4287
- wrapper: fc,
4288
- inputContainer: vc,
4289
- input: gc,
4290
- errorInput: yc,
4291
- label: bc,
4292
- labelError: Ec,
4293
- disabled: _c,
4294
- disabledInput: Cc,
4295
- hidden: Ac
4295
+ const gc = "_cardForm_isqbi_1", yc = "_hidden_isqbi_5", ut = {
4296
+ cardForm: gc,
4297
+ hidden: yc
4298
+ }, bc = "_wrapper_4knhb_1", Ec = "_inputContainer_4knhb_5", _c = "_input_4knhb_5", Cc = "_errorInput_4knhb_24", Ac = "_label_4knhb_28", wc = "_labelError_4knhb_32", Tc = "_disabled_4knhb_36", Ic = "_disabledInput_4knhb_40", Oc = "_hidden_4knhb_47", ae = {
4299
+ wrapper: bc,
4300
+ inputContainer: Ec,
4301
+ input: _c,
4302
+ errorInput: Cc,
4303
+ label: Ac,
4304
+ labelError: wc,
4305
+ disabled: Tc,
4306
+ disabledInput: Ic,
4307
+ hidden: Oc
4296
4308
  };
4297
- class mn {
4309
+ class gt {
4298
4310
  constructor() {
4299
4311
  b(this, "template", `
4300
4312
  <svg focusable='false' fill='#dc2626' color='#dc2626' height='12' viewBox='0 0 12 12' width='12'>
@@ -4315,7 +4327,7 @@ class mn {
4315
4327
  return this.element;
4316
4328
  }
4317
4329
  }
4318
- class wc {
4330
+ class Nc {
4319
4331
  constructor(t, e) {
4320
4332
  b(this, "id", "paynext-card-input-name");
4321
4333
  b(this, "element");
@@ -4325,7 +4337,7 @@ class wc {
4325
4337
  b(this, "labelText", document.createElement("span"));
4326
4338
  b(this, "labelError", document.createElement("span"));
4327
4339
  b(this, "endContent", document.createElement("div"));
4328
- b(this, "warning", new mn());
4340
+ b(this, "warning", new gt());
4329
4341
  b(this, "placeholderStyle", document.createElement("style"));
4330
4342
  b(this, "isTouchSubmit", !1);
4331
4343
  b(this, "isRequired", !1);
@@ -4383,20 +4395,20 @@ class wc {
4383
4395
  return this.toggleLabelError(r), this.isDisabled ? (this.inputContainer.classList.add(ae.disabled), this.input.classList.add(ae.disabledInput)) : (this.inputContainer.classList.remove(ae.disabled), this.input.classList.remove(ae.disabledInput)), this.element;
4384
4396
  }
4385
4397
  }
4386
- const Tc = "_wrapper_j8wuo_1", Ic = "_inputContainer_j8wuo_5", Oc = "_input_j8wuo_5", Nc = "_endContent_j8wuo_20", Lc = "_errorInput_j8wuo_24", xc = "_error_j8wuo_24", Pc = "_label_j8wuo_32", Rc = "_labelError_j8wuo_36", kc = "_disabled_j8wuo_40", Mc = "_disabledInput_j8wuo_44", Sc = "_hidden_j8wuo_51", re = {
4387
- wrapper: Tc,
4388
- inputContainer: Ic,
4389
- input: Oc,
4390
- endContent: Nc,
4391
- errorInput: Lc,
4392
- error: xc,
4393
- label: Pc,
4394
- labelError: Rc,
4395
- disabled: kc,
4396
- disabledInput: Mc,
4397
- hidden: Sc
4398
+ const Lc = "_wrapper_j8wuo_1", xc = "_inputContainer_j8wuo_5", Pc = "_input_j8wuo_5", Rc = "_endContent_j8wuo_20", kc = "_errorInput_j8wuo_24", Mc = "_error_j8wuo_24", Sc = "_label_j8wuo_32", Dc = "_labelError_j8wuo_36", Vc = "_disabled_j8wuo_40", Fc = "_disabledInput_j8wuo_44", Uc = "_hidden_j8wuo_51", re = {
4399
+ wrapper: Lc,
4400
+ inputContainer: xc,
4401
+ input: Pc,
4402
+ endContent: Rc,
4403
+ errorInput: kc,
4404
+ error: Mc,
4405
+ label: Sc,
4406
+ labelError: Dc,
4407
+ disabled: Vc,
4408
+ disabledInput: Fc,
4409
+ hidden: Uc
4398
4410
  };
4399
- class Dc {
4411
+ class Bc {
4400
4412
  constructor() {
4401
4413
  b(this, "template", `
4402
4414
  <svg
@@ -4434,7 +4446,7 @@ class Dc {
4434
4446
  return this.element;
4435
4447
  }
4436
4448
  }
4437
- class Vc {
4449
+ class jc {
4438
4450
  constructor() {
4439
4451
  b(this, "template", `
4440
4452
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' class='${Z.svg}'>
@@ -4471,7 +4483,7 @@ class Vc {
4471
4483
  return this.element;
4472
4484
  }
4473
4485
  }
4474
- class Fc {
4486
+ class zc {
4475
4487
  constructor() {
4476
4488
  b(this, "template", `
4477
4489
  <svg
@@ -4521,7 +4533,7 @@ class Fc {
4521
4533
  return this.element;
4522
4534
  }
4523
4535
  }
4524
- class Uc {
4536
+ class Kc {
4525
4537
  constructor() {
4526
4538
  b(this, "template", `
4527
4539
  <svg
@@ -4576,7 +4588,7 @@ class Uc {
4576
4588
  return this.element;
4577
4589
  }
4578
4590
  }
4579
- class Bc {
4591
+ class qc {
4580
4592
  constructor() {
4581
4593
  b(this, "template", `
4582
4594
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 23 16' width='23' class='${Z.svg}'>
@@ -4616,7 +4628,7 @@ class Bc {
4616
4628
  return this.element;
4617
4629
  }
4618
4630
  }
4619
- class jc {
4631
+ class Hc {
4620
4632
  constructor() {
4621
4633
  b(this, "template", `
4622
4634
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
@@ -4639,7 +4651,7 @@ class jc {
4639
4651
  return this.element;
4640
4652
  }
4641
4653
  }
4642
- class zc {
4654
+ class Wc {
4643
4655
  constructor() {
4644
4656
  b(this, "template", `
4645
4657
  <svg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 0 24 16' width='24' class='${Z.svg}'>
@@ -4671,7 +4683,7 @@ class zc {
4671
4683
  return this.element;
4672
4684
  }
4673
4685
  }
4674
- class Kc {
4686
+ class Gc {
4675
4687
  constructor() {
4676
4688
  b(this, "template", `
4677
4689
  <svg
@@ -4720,7 +4732,7 @@ class Kc {
4720
4732
  return this.element;
4721
4733
  }
4722
4734
  }
4723
- class qc {
4735
+ class Yc {
4724
4736
  constructor(t, e) {
4725
4737
  b(this, "id", "paynext-card-input-number");
4726
4738
  b(this, "initialCardTypes", vt.map((t) => t.type));
@@ -4732,14 +4744,14 @@ class qc {
4732
4744
  b(this, "labelError", document.createElement("span"));
4733
4745
  b(this, "endContent", document.createElement("div"));
4734
4746
  b(this, "error", document.createElement("p"));
4735
- b(this, "unknownCard", new Dc());
4736
- b(this, "amex", new Vc());
4737
- b(this, "dinerClub", new Fc());
4738
- b(this, "discover", new Uc());
4739
- b(this, "jcb", new Bc());
4740
- b(this, "masterCard", new jc());
4741
- b(this, "unionPay", new zc());
4742
- b(this, "visa", new Kc());
4747
+ b(this, "unknownCard", new Bc());
4748
+ b(this, "amex", new jc());
4749
+ b(this, "dinerClub", new zc());
4750
+ b(this, "discover", new Kc());
4751
+ b(this, "jcb", new qc());
4752
+ b(this, "masterCard", new Hc());
4753
+ b(this, "unionPay", new Wc());
4754
+ b(this, "visa", new Gc());
4743
4755
  b(this, "placeholderStyle", document.createElement("style"));
4744
4756
  b(this, "supportedCardTypes", this.initialCardTypes);
4745
4757
  b(this, "isTouchSubmit", !1);
@@ -4769,12 +4781,12 @@ class qc {
4769
4781
  handleChange(t) {
4770
4782
  if (this.isDisabled) return;
4771
4783
  this.isRequired = !1, this.errorMessage = "", this.isChanged || (this.isChanged = !0);
4772
- const e = sr(t).map((a) => a.type), r = Ii(t), i = gl(t, (r == null ? void 0 : r.type) || "");
4784
+ const e = cr(t).map((a) => a.type), r = Li(t), i = El(t, (r == null ? void 0 : r.type) || "");
4773
4785
  i.replace(/\D/g, "").length === ((r == null ? void 0 : r.maxLength) || 16) && this.validate(i), this.supportedCardTypes = e.length ? e : this.initialCardTypes, this.input.value = i, this.events.change.emit({
4774
4786
  card: i,
4775
4787
  cardType: r == null ? void 0 : r.type,
4776
4788
  cardTypes: e,
4777
- isValid: or(t, this.supportedCardTypes).isValid
4789
+ isValid: dr(t, this.supportedCardTypes).isValid
4778
4790
  }), this.render();
4779
4791
  }
4780
4792
  toggleLabelError(t) {
@@ -4829,11 +4841,11 @@ class qc {
4829
4841
  var t;
4830
4842
  return {
4831
4843
  value: this.input.value,
4832
- cardType: ((t = sr(this.input.value)[0]) == null ? void 0 : t.type) || ""
4844
+ cardType: ((t = cr(this.input.value)[0]) == null ? void 0 : t.type) || ""
4833
4845
  };
4834
4846
  }
4835
4847
  validate(t) {
4836
- const e = this.translate.messages(), { isValid: r, error: i } = or(t, this.supportedCardTypes);
4848
+ const e = this.translate.messages(), { isValid: r, error: i } = dr(t, this.supportedCardTypes);
4837
4849
  return r ? (this.isRequired = !1, this.errorMessage = "", this.render(), r) : (i === le.Empty ? (this.errorMessage = "", this.isRequired = !0) : i === le.Unsupported ? (this.errorMessage = e.card.number.error.unsupported, this.isRequired = !1) : (this.errorMessage = i === le.Incomplete ? e.card.number.error.incomplete : e.card.number.error.invalid, this.isRequired = !1), this.render(), r);
4838
4850
  }
4839
4851
  render() {
@@ -4841,20 +4853,20 @@ class qc {
4841
4853
  return this.toggleLabelError(e), this.toggleErrorMessage(r), !e && !r ? (this.inputContainer.classList.remove(re.errorInput), this.endContent.innerHTML = "", this.endContent.append(...this.getCardIcons())) : (this.endContent.innerHTML = "", this.endContent.appendChild(this.unknownCard.render())), this.isDisabled ? (this.inputContainer.classList.add(re.disabled), this.input.classList.add(re.disabledInput)) : (this.inputContainer.classList.remove(re.disabled), this.input.classList.remove(re.disabledInput)), this.element;
4842
4854
  }
4843
4855
  }
4844
- const Hc = "_inputContainer_1xdj3_5", Wc = "_input_1xdj3_5", Gc = "_endContent_1xdj3_20", Yc = "_errorInput_1xdj3_24", $c = "_error_1xdj3_24", Qc = "_label_1xdj3_32", Zc = "_labelError_1xdj3_36", Xc = "_disabled_1xdj3_40", Jc = "_disabledInput_1xdj3_44", ed = "_hidden_1xdj3_51", td = "_securityContent_1xdj3_55", $ = {
4845
- inputContainer: Hc,
4846
- input: Wc,
4847
- endContent: Gc,
4848
- errorInput: Yc,
4849
- error: $c,
4850
- label: Qc,
4851
- labelError: Zc,
4852
- disabled: Xc,
4853
- disabledInput: Jc,
4854
- hidden: ed,
4855
- securityContent: td
4856
+ const $c = "_inputContainer_1xdj3_5", Qc = "_input_1xdj3_5", Zc = "_endContent_1xdj3_20", Xc = "_errorInput_1xdj3_24", Jc = "_error_1xdj3_24", ed = "_label_1xdj3_32", td = "_labelError_1xdj3_36", nd = "_disabled_1xdj3_40", rd = "_disabledInput_1xdj3_44", id = "_hidden_1xdj3_51", ad = "_securityContent_1xdj3_55", $ = {
4857
+ inputContainer: $c,
4858
+ input: Qc,
4859
+ endContent: Zc,
4860
+ errorInput: Xc,
4861
+ error: Jc,
4862
+ label: ed,
4863
+ labelError: td,
4864
+ disabled: nd,
4865
+ disabledInput: rd,
4866
+ hidden: id,
4867
+ securityContent: ad
4856
4868
  };
4857
- class nd {
4869
+ class sd {
4858
4870
  constructor() {
4859
4871
  b(this, "template", `
4860
4872
  <svg class='${Z.svg}' focusable='false' viewBox='0 0 32 21' role='img' aria-label='CVC'>
@@ -4883,13 +4895,14 @@ class nd {
4883
4895
  return this.element;
4884
4896
  }
4885
4897
  }
4886
- class rd {
4898
+ class od {
4887
4899
  constructor(t, e) {
4888
4900
  b(this, "cvcId", "paynext-card-input-cvc");
4889
4901
  b(this, "expiryId", "paynext-card-input-expiry");
4890
4902
  b(this, "element");
4891
- b(this, "warning", new mn());
4892
- b(this, "cardCvc", new nd());
4903
+ b(this, "expiryWarning", new gt());
4904
+ b(this, "cvcWarning", new gt());
4905
+ b(this, "cardCvc", new sd());
4893
4906
  b(this, "expiryInputContainer", document.createElement("div"));
4894
4907
  b(this, "expiryInput", document.createElement("input"));
4895
4908
  b(this, "expiryLabel", document.createElement("label"));
@@ -4922,9 +4935,9 @@ class rd {
4922
4935
  var s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I;
4923
4936
  this.translate = t;
4924
4937
  const r = t.messages();
4925
- this.element = document.createElement("div"), this.element.classList.add($.securityContent), this.expiryInputContainer.classList.add($.inputContainer), (s = e == null ? void 0 : e.container) != null && s.className && this.expiryInputContainer.classList.add(e.container.className), (o = e == null ? void 0 : e.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, e.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("auto-complete", "cc-expiry"), this.expiryInput.setAttribute("placeholder", r.card.expiry.placeholder), this.expiryInput.classList.add($.input), (l = e == null ? void 0 : e.field) != null && l.className && this.expiryInput.classList.add(e.field.className), (c = e == null ? void 0 : e.field) != null && c.styles && Object.assign(this.expiryInput.style, e.field.styles), this.expiryEndContent.classList.add($.endContent), this.expiryEndContent.appendChild(this.warning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add($.label), (d = e == null ? void 0 : e.label) != null && d.className && this.expiryLabel.classList.add(e.label.className), (u = e == null ? void 0 : e.label) != null && u.styles && Object.assign(this.expiryLabel.style, e.label.styles), this.expiryLabelText.textContent = r.card.expiry.label, this.expiryLabelError.textContent = r.card.expiry.error.required, this.expiryLabelError.classList.add($.labelError, $.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add($.error, $.hidden), (h = e == null ? void 0 : e.error) != null && h.className && this.expiryError.classList.add(e.error.className), (p = e == null ? void 0 : e.error) != null && p.styles && Object.assign(this.expiryError.style, e.error.styles);
4938
+ this.element = document.createElement("div"), this.element.classList.add($.securityContent), this.expiryInputContainer.classList.add($.inputContainer), (s = e == null ? void 0 : e.container) != null && s.className && this.expiryInputContainer.classList.add(e.container.className), (o = e == null ? void 0 : e.container) != null && o.styles && Object.assign(this.expiryInputContainer.style, e.container.styles), this.expiryInput.setAttribute("id", this.expiryId), this.expiryInput.setAttribute("auto-complete", "cc-expiry"), this.expiryInput.setAttribute("placeholder", r.card.expiry.placeholder), this.expiryInput.classList.add($.input), (l = e == null ? void 0 : e.field) != null && l.className && this.expiryInput.classList.add(e.field.className), (c = e == null ? void 0 : e.field) != null && c.styles && Object.assign(this.expiryInput.style, e.field.styles), this.expiryEndContent.classList.add($.endContent), this.expiryEndContent.appendChild(this.expiryWarning.render()), this.expiryInputContainer.append(this.expiryInput, this.expiryEndContent), this.expiryLabel.setAttribute("for", this.expiryId), this.expiryLabel.classList.add($.label), (d = e == null ? void 0 : e.label) != null && d.className && this.expiryLabel.classList.add(e.label.className), (u = e == null ? void 0 : e.label) != null && u.styles && Object.assign(this.expiryLabel.style, e.label.styles), this.expiryLabelText.textContent = r.card.expiry.label, this.expiryLabelError.textContent = r.card.expiry.error.required, this.expiryLabelError.classList.add($.labelError, $.hidden), this.expiryLabel.append(this.expiryLabelText, this.expiryLabelError), this.expiryError.classList.add($.error, $.hidden), (h = e == null ? void 0 : e.error) != null && h.className && this.expiryError.classList.add(e.error.className), (p = e == null ? void 0 : e.error) != null && p.styles && Object.assign(this.expiryError.style, e.error.styles);
4926
4939
  const i = document.createElement("div");
4927
- if (i.appendChild(this.cvcError), this.cvcInputContainer.classList.add($.inputContainer), (m = e == null ? void 0 : e.container) != null && m.className && this.cvcInputContainer.classList.add(e.container.className), (f = e == null ? void 0 : e.container) != null && f.styles && Object.assign(this.cvcInputContainer.style, e.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("auto-complete", "cc-cvc"), this.cvcInput.setAttribute("placeholder", r.card.cvc.placeholder), this.cvcInput.classList.add($.input), (v = e == null ? void 0 : e.field) != null && v.className && this.cvcInput.classList.add(e.field.className), (y = e == null ? void 0 : e.field) != null && y.styles && Object.assign(this.cvcInput.style, e.field.styles), (w = e == null ? void 0 : e.placeholder) != null && w.styles && Object.keys(e.placeholder.styles).length) {
4940
+ if (i.appendChild(this.expiryError), this.cvcInputContainer.classList.add($.inputContainer), (m = e == null ? void 0 : e.container) != null && m.className && this.cvcInputContainer.classList.add(e.container.className), (f = e == null ? void 0 : e.container) != null && f.styles && Object.assign(this.cvcInputContainer.style, e.container.styles), this.cvcInput.setAttribute("id", this.cvcId), this.cvcInput.setAttribute("auto-complete", "cc-cvc"), this.cvcInput.setAttribute("placeholder", r.card.cvc.placeholder), this.cvcInput.classList.add($.input), (v = e == null ? void 0 : e.field) != null && v.className && this.cvcInput.classList.add(e.field.className), (y = e == null ? void 0 : e.field) != null && y.styles && Object.assign(this.cvcInput.style, e.field.styles), (w = e == null ? void 0 : e.placeholder) != null && w.styles && Object.keys(e.placeholder.styles).length) {
4928
4941
  const O = (U) => U.replace(/[A-Z]/g, (H) => "-" + H.toLowerCase()), R = Object.entries(e.placeholder.styles).map(([U, H]) => `${O(U)}:${H};`).join("");
4929
4942
  this.placeholderStyle.textContent = `#${this.expiryId}::placeholder{${R}}#${this.cvcId}::placeholder{${R}}`, this.element.appendChild(this.placeholderStyle);
4930
4943
  }
@@ -4971,7 +4984,7 @@ class rd {
4971
4984
  handleCvcChange(t) {
4972
4985
  if (this.isDisabled) return;
4973
4986
  this.isCvcRequired = !1, this.cvcErrorMessage = "", this.isCvcChanged || (this.isCvcChanged = !0);
4974
- const e = yl(t, this.cardType || ""), r = De.getTypeInfo(this.cardType || "");
4987
+ const e = _l(t, this.cardType || ""), r = De.getTypeInfo(this.cardType || "");
4975
4988
  e.length === (r == null ? void 0 : r.code.size) && this.validateCvc(e), this.events.cvcChange.emit({
4976
4989
  value: e,
4977
4990
  isValid: this.cvcValidator(e) === null
@@ -5018,7 +5031,7 @@ class rd {
5018
5031
  handleExpiryChange(t) {
5019
5032
  if (this.isDisabled) return;
5020
5033
  this.isExpiryRequired = !1, this.expiryErrorMessage = "", this.isExpiryChanged || (this.isExpiryChanged = !0);
5021
- const e = bl(t, this.expiryPrevValue);
5034
+ const e = Cl(t, this.expiryPrevValue);
5022
5035
  e.length === 7 && this.validateExpiry(e), this.events.expiryChange.emit({
5023
5036
  value: e,
5024
5037
  isValid: this.expiryValidator(e) === null
@@ -5068,19 +5081,19 @@ class rd {
5068
5081
  const t = this.isTouchSubmit || this.isExpiryChanged, e = t && !this.isDisabled && this.isExpiryRequired, r = t && !this.isDisabled && !!this.expiryErrorMessage;
5069
5082
  this.toggleExpiryLabelError(e), this.toggleExpiryErrorMessage(r), !e && !r ? (this.expiryInputContainer.classList.remove($.errorInput), this.expiryEndContent.classList.add($.hidden)) : this.expiryEndContent.classList.remove($.hidden);
5070
5083
  const i = this.isTouchSubmit || this.isCvcChanged, a = i && !this.isDisabled && this.isCvcRequired, s = i && !this.isDisabled && !!this.cvcErrorMessage;
5071
- return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove($.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.warning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add($.disabled), this.expiryInput.classList.add($.disabledInput), this.cvcInputContainer.classList.add($.disabled), this.cvcInput.classList.add($.disabledInput)) : (this.expiryInputContainer.classList.remove($.disabled), this.expiryInput.classList.remove($.disabledInput), this.cvcInputContainer.classList.remove($.disabled), this.cvcInput.classList.remove($.disabledInput)), this.element;
5084
+ return this.toggleCvcLabelError(a), this.toggleCvcErrorMessage(s), !a && !s ? (this.cvcInputContainer.classList.remove($.errorInput), this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cardCvc.render())) : (this.cvcEndContent.innerHTML = "", this.cvcEndContent.appendChild(this.cvcWarning.render())), this.isDisabled ? (this.expiryInputContainer.classList.add($.disabled), this.expiryInput.classList.add($.disabledInput), this.cvcInputContainer.classList.add($.disabled), this.cvcInput.classList.add($.disabledInput)) : (this.expiryInputContainer.classList.remove($.disabled), this.expiryInput.classList.remove($.disabledInput), this.cvcInputContainer.classList.remove($.disabled), this.cvcInput.classList.remove($.disabledInput)), this.element;
5072
5085
  }
5073
5086
  }
5074
- const id = "_container_94v1h_1", ad = "_title_94v1h_10", ur = {
5075
- container: id,
5076
- title: ad
5087
+ const ld = "_container_94v1h_1", cd = "_title_94v1h_10", mr = {
5088
+ container: ld,
5089
+ title: cd
5077
5090
  };
5078
- class Oi {
5091
+ class xi {
5079
5092
  constructor(t) {
5080
5093
  b(this, "element");
5081
5094
  b(this, "message", document.createElement("p"));
5082
- b(this, "icon", new mn());
5083
- this.translate = t, this.element = document.createElement("div"), this.element.classList.add(ur.container), this.message.classList.add(ur.title), this.message.textContent = t.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5095
+ b(this, "icon", new gt());
5096
+ this.translate = t, this.element = document.createElement("div"), this.element.classList.add(mr.container), this.message.classList.add(mr.title), this.message.textContent = t.messages().status.error, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5084
5097
  this.message.textContent = e.status.success;
5085
5098
  });
5086
5099
  }
@@ -5094,7 +5107,7 @@ class Oi {
5094
5107
  return this.element;
5095
5108
  }
5096
5109
  }
5097
- class sd {
5110
+ class dd {
5098
5111
  constructor({ translate: t, className: e, stylesState: r }) {
5099
5112
  b(this, "element");
5100
5113
  b(this, "error");
@@ -5108,7 +5121,7 @@ class sd {
5108
5121
  close: new de()
5109
5122
  });
5110
5123
  const i = r.getState();
5111
- this.element = document.createElement("form"), this.error = new Oi(t), this.submit = new pc(t, i.SubmitButton), this.back = new sc(), this.number = new qc(t, i.Input), this.name = new wc(t, i.Input), this.cardSecurity = new rd(t, i.Input), this.error.addClassName(ut.hidden), this.element.classList.add(ut.cardForm, e || ""), this.element.append(
5124
+ this.element = document.createElement("form"), this.error = new xi(t), this.submit = new vc(t, i.SubmitButton), this.back = new dc(), this.number = new Yc(t, i.Input), this.name = new Nc(t, i.Input), this.cardSecurity = new od(t, i.Input), this.error.addClassName(ut.hidden), this.element.classList.add(ut.cardForm, e || ""), this.element.append(
5112
5125
  this.back.render(),
5113
5126
  this.number.render(),
5114
5127
  this.cardSecurity.render(),
@@ -5150,7 +5163,7 @@ class sd {
5150
5163
  return this.element;
5151
5164
  }
5152
5165
  }
5153
- class od {
5166
+ class ud {
5154
5167
  constructor() {
5155
5168
  b(this, "template", `
5156
5169
  <svg
@@ -5177,16 +5190,16 @@ class od {
5177
5190
  return this.element;
5178
5191
  }
5179
5192
  }
5180
- const ld = "_container_hoha1_1", cd = "_title_hoha1_5", pr = {
5181
- container: ld,
5182
- title: cd
5193
+ const pd = "_container_hoha1_1", hd = "_title_hoha1_5", fr = {
5194
+ container: pd,
5195
+ title: hd
5183
5196
  };
5184
- class dd {
5197
+ class md {
5185
5198
  constructor(t) {
5186
5199
  b(this, "element");
5187
5200
  b(this, "message", document.createElement("p"));
5188
- b(this, "icon", new od());
5189
- this.translate = t, this.element = document.createElement("div"), this.element.classList.add(pr.container), this.message.classList.add(pr.title), this.message.textContent = t.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5201
+ b(this, "icon", new ud());
5202
+ this.translate = t, this.element = document.createElement("div"), this.element.classList.add(fr.container), this.message.classList.add(fr.title), this.message.textContent = t.messages().status.success, this.element.append(this.icon.render(), this.message), this.translate.subscribe(({ messages: e }) => {
5190
5203
  this.message.textContent = e.status.success;
5191
5204
  });
5192
5205
  }
@@ -5200,22 +5213,22 @@ class dd {
5200
5213
  return this.element;
5201
5214
  }
5202
5215
  }
5203
- class ud {
5216
+ class fd {
5204
5217
  constructor(t) {
5205
5218
  b(this, "isLoading", !1);
5206
5219
  b(this, "isFormOpen", !1);
5207
5220
  b(this, "checkout");
5208
5221
  b(this, "container", document.createElement("div"));
5209
- b(this, "loader", new nl());
5222
+ b(this, "loader", new al());
5210
5223
  b(this, "error");
5211
5224
  b(this, "success");
5212
5225
  b(this, "buttons");
5213
5226
  b(this, "form");
5214
- this.config = t, this.buttons = new nc(t), this.form = new sd({
5227
+ this.config = t, this.buttons = new sc(t), this.form = new dd({
5215
5228
  translate: t.state.translate,
5216
5229
  className: ce.hidden,
5217
5230
  stylesState: t.state.styles
5218
- }), this.error = new Oi(t.state.translate), this.success = new dd(t.state.translate), this.error.addClassName(ce.hidden), this.success.addClassName(ce.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(ce.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
5231
+ }), this.error = new xi(t.state.translate), this.success = new md(t.state.translate), this.error.addClassName(ce.hidden), this.success.addClassName(ce.hidden), this.container.append(this.loader.render(), this.buttons.render(), this.form.render()), this.checkout = document.createElement("div"), this.checkout.classList.add(ce.checkout), this.checkout.append(this.container, this.error.render(), this.success.render());
5219
5232
  }
5220
5233
  // init
5221
5234
  init() {
@@ -5282,14 +5295,14 @@ class ud {
5282
5295
  this.hideError(), this.setLoading(!0);
5283
5296
  const e = this.config.state.checkout.getState(), r = this.config.state.translate.messages();
5284
5297
  try {
5285
- const a = yield Vl(t, e.environment, e.apiVersion);
5298
+ const a = yield Bl(t, e.environment, e.apiVersion, e.useWorkflows);
5286
5299
  if (a.error)
5287
5300
  throw new Error(r.status.error);
5288
5301
  if (a.three_ds_session_id) {
5289
5302
  yield this.config.service.ev.initThreeDs({
5290
5303
  threeDsId: a.three_ds_session_id,
5291
5304
  onSuccess: () => {
5292
- this.setLoading(!1), this.handleSuccess(J(j({}, t), { threeDsSessionId: a.three_ds_session_id }));
5305
+ this.setLoading(!1), this.handleSuccess(X(j({}, t), { threeDsSessionId: a.three_ds_session_id }));
5293
5306
  },
5294
5307
  onError: () => {
5295
5308
  this.handleError("Three DS Error");
@@ -5326,10 +5339,10 @@ class ud {
5326
5339
  return this.checkout;
5327
5340
  }
5328
5341
  }
5329
- class pd {
5342
+ class vd {
5330
5343
  constructor(t) {
5331
5344
  b(this, "component");
5332
- this.config = t, this.component = new ud(t);
5345
+ this.config = t, this.component = new fd(t);
5333
5346
  }
5334
5347
  // init
5335
5348
  init() {
@@ -5354,7 +5367,7 @@ class pd {
5354
5367
  });
5355
5368
  }
5356
5369
  }
5357
- class gt {
5370
+ class yt {
5358
5371
  constructor(t) {
5359
5372
  b(this, "initialState");
5360
5373
  b(this, "state");
@@ -5374,23 +5387,25 @@ class gt {
5374
5387
  return this.observer.addListener(t);
5375
5388
  }
5376
5389
  }
5377
- const hd = {
5390
+ const gd = {
5378
5391
  clientToken: "",
5379
5392
  environment: "sandbox",
5380
- apiVersion: "1.0.0"
5393
+ apiVersion: "1.0.0",
5394
+ // TODO: remove useWorkflows after testing
5395
+ useWorkflows: !1
5381
5396
  };
5382
- class md extends gt {
5397
+ class yd extends yt {
5383
5398
  constructor(t) {
5384
- super(j(j({}, hd), t));
5399
+ super(j(j({}, gd), t));
5385
5400
  }
5386
5401
  }
5387
- const fd = {};
5388
- class vd extends gt {
5402
+ const bd = {};
5403
+ class Ed extends yt {
5389
5404
  constructor(t) {
5390
- super(j(j({}, fd), t));
5405
+ super(j(j({}, bd), t));
5391
5406
  }
5392
5407
  }
5393
- class gd extends gt {
5408
+ class _d extends yt {
5394
5409
  constructor(e) {
5395
5410
  super(e || null);
5396
5411
  b(this, "clientToken", "");
@@ -5400,12 +5415,12 @@ class gd extends gt {
5400
5415
  return z(this, null, function* () {
5401
5416
  if (this.clientToken === e) return this.getState();
5402
5417
  this.clientToken = e;
5403
- const a = yield Ul(e, r, i);
5418
+ const a = yield zl(e, r, i);
5404
5419
  return this.setState(a), a;
5405
5420
  });
5406
5421
  }
5407
5422
  }
5408
- const yd = {
5423
+ const Cd = {
5409
5424
  card: {
5410
5425
  title: "طريقة الدفع",
5411
5426
  number: {
@@ -5455,7 +5470,7 @@ const yd = {
5455
5470
  success: "تمت عملية الدفع الخاصة بك بنجاح!",
5456
5471
  error: "لم نتمكن من التحقق من طريقة الدفع الخاصة بك. يرجى اختيار طريقة دفع أخرى وإعادة المحاولة."
5457
5472
  }
5458
- }, bd = {
5473
+ }, Ad = {
5459
5474
  card: {
5460
5475
  title: "Метод на плащане",
5461
5476
  number: {
@@ -5505,7 +5520,7 @@ const yd = {
5505
5520
  success: "Успех",
5506
5521
  error: "Не можем да удостоверим автентичността на вашия метод на плащане. Моля, изберете друг метод на плащане и опитайте отново."
5507
5522
  }
5508
- }, Ed = {
5523
+ }, wd = {
5509
5524
  card: {
5510
5525
  title: "Způsob platby",
5511
5526
  number: {
@@ -5555,7 +5570,7 @@ const yd = {
5555
5570
  success: "Úspěch",
5556
5571
  error: "Váš způsob platby se nám nedaří ověřit. Zvolte prosím jiný způsob platby a zkuste to znovu."
5557
5572
  }
5558
- }, _d = {
5573
+ }, Td = {
5559
5574
  card: {
5560
5575
  title: "Betalingsmetode",
5561
5576
  number: {
@@ -5605,7 +5620,7 @@ const yd = {
5605
5620
  success: "Succes",
5606
5621
  error: "Vi kan ikke godkende din betalingsmetode. Vælg venligst en anden betalingsmetode og prøv igen."
5607
5622
  }
5608
- }, Cd = {
5623
+ }, Id = {
5609
5624
  card: {
5610
5625
  title: "Zahlungsmethode",
5611
5626
  number: {
@@ -5655,7 +5670,7 @@ const yd = {
5655
5670
  success: "Erfolg",
5656
5671
  error: "Wir können Ihre Zahlungsmethode nicht authentifizieren. Bitte wählen Sie eine andere Zahlungsmethode und versuchen Sie es erneut."
5657
5672
  }
5658
- }, Ad = {
5673
+ }, Od = {
5659
5674
  card: {
5660
5675
  title: "Μέθοδος πληρωμής",
5661
5676
  number: {
@@ -5705,7 +5720,7 @@ const yd = {
5705
5720
  success: "Επιτυχία",
5706
5721
  error: "Δεν μπορούμε να πιστοποιήσουμε τη μέθοδο πληρωμής σας. Παρακαλούμε επιλέξτε μια διαφορετική μέθοδο πληρωμής και προσπαθήστε ξανά."
5707
5722
  }
5708
- }, wd = {
5723
+ }, Nd = {
5709
5724
  card: {
5710
5725
  title: "Payment method",
5711
5726
  number: {
@@ -5755,7 +5770,7 @@ const yd = {
5755
5770
  success: "Your payment was successful!",
5756
5771
  error: "We are unable to authenticate your payment method. Please choose a different payment method and try again."
5757
5772
  }
5758
- }, Td = {
5773
+ }, Ld = {
5759
5774
  card: {
5760
5775
  title: "Método de pago",
5761
5776
  number: {
@@ -5805,7 +5820,7 @@ const yd = {
5805
5820
  success: "Éxito",
5806
5821
  error: "No podemos autenticar su método de pago. Elija otro método de pago e inténtelo de nuevo."
5807
5822
  }
5808
- }, Id = {
5823
+ }, xd = {
5809
5824
  card: {
5810
5825
  title: "Makseviis",
5811
5826
  number: {
@@ -5855,7 +5870,7 @@ const yd = {
5855
5870
  success: "Edu",
5856
5871
  error: "Me ei suuda teie makseviisi autentida. Palun valige teine makseviis ja proovige uuesti."
5857
5872
  }
5858
- }, Od = {
5873
+ }, Pd = {
5859
5874
  card: {
5860
5875
  title: "Maksutapa",
5861
5876
  number: {
@@ -5905,7 +5920,7 @@ const yd = {
5905
5920
  success: "Menestys",
5906
5921
  error: "Emme pysty todentamaan maksutapaasi. Valitse toinen maksutapa ja yritä uudelleen."
5907
5922
  }
5908
- }, Nd = {
5923
+ }, Rd = {
5909
5924
  card: {
5910
5925
  title: "Paraan ng pagbabayad",
5911
5926
  number: {
@@ -5955,7 +5970,7 @@ const yd = {
5955
5970
  success: "Tagumpay",
5956
5971
  error: "Hindi namin ma-authenticate ang iyong paraan ng pagbabayad. Mangyaring pumili ng ibang paraan ng pagbabayad at subukang muli."
5957
5972
  }
5958
- }, Ld = {
5973
+ }, kd = {
5959
5974
  card: {
5960
5975
  title: "Moyen de paiement",
5961
5976
  number: {
@@ -6005,7 +6020,7 @@ const yd = {
6005
6020
  success: "Succès",
6006
6021
  error: "Nous ne sommes pas en mesure d'authentifier votre méthode de paiement. Veuillez choisir un autre mode de paiement et réessayer."
6007
6022
  }
6008
- }, xd = {
6023
+ }, Md = {
6009
6024
  card: {
6010
6025
  title: "Način plaćanja",
6011
6026
  number: {
@@ -6055,7 +6070,7 @@ const yd = {
6055
6070
  success: "Uspjeh",
6056
6071
  error: "Ne možemo provjeriti autentičnost vašeg načina plaćanja. Odaberite drugi način plaćanja i pokušajte ponovno."
6057
6072
  }
6058
- }, Pd = {
6073
+ }, Sd = {
6059
6074
  card: {
6060
6075
  title: "Fizetési mód",
6061
6076
  number: {
@@ -6105,7 +6120,7 @@ const yd = {
6105
6120
  success: "Siker",
6106
6121
  error: "Nem tudjuk hitelesíteni a fizetési módját. Kérjük, válasszon másik fizetési módot, és próbálja meg újra."
6107
6122
  }
6108
- }, Rd = {
6123
+ }, Dd = {
6109
6124
  card: {
6110
6125
  title: "Metode pembayaran",
6111
6126
  number: {
@@ -6155,7 +6170,7 @@ const yd = {
6155
6170
  success: "Sukses",
6156
6171
  error: "Kami tidak dapat mengautentikasi metode pembayaran Anda. Silakan pilih metode pembayaran lain dan coba lagi."
6157
6172
  }
6158
- }, kd = {
6173
+ }, Vd = {
6159
6174
  card: {
6160
6175
  title: "Modalità di pagamento",
6161
6176
  number: {
@@ -6205,7 +6220,7 @@ const yd = {
6205
6220
  success: "Il successo",
6206
6221
  error: "Non siamo in grado di autenticare il suo metodo di pagamento. Scegliere un altro metodo di pagamento e riprovare."
6207
6222
  }
6208
- }, Md = {
6223
+ }, Fd = {
6209
6224
  card: {
6210
6225
  title: "支払い方法",
6211
6226
  number: {
@@ -6255,7 +6270,7 @@ const yd = {
6255
6270
  success: "成功",
6256
6271
  error: "お客様のお支払い方法を認証できません。別のお支払い方法を選択し、再度お試しください。"
6257
6272
  }
6258
- }, Sd = {
6273
+ }, Ud = {
6259
6274
  card: {
6260
6275
  title: "결제 방식",
6261
6276
  number: {
@@ -6305,7 +6320,7 @@ const yd = {
6305
6320
  success: "성공",
6306
6321
  error: "결제 방법을 인증할 수 없습니다. 다른 결제 방법을 선택하고 다시 시도해 주세요."
6307
6322
  }
6308
- }, Dd = {
6323
+ }, Bd = {
6309
6324
  card: {
6310
6325
  title: "Mokėjimo būdas",
6311
6326
  number: {
@@ -6355,7 +6370,7 @@ const yd = {
6355
6370
  success: "Sėkmė",
6356
6371
  error: "Negalime patvirtinti jūsų mokėjimo būdo. Pasirinkite kitą mokėjimo būdą ir bandykite dar kartą."
6357
6372
  }
6358
- }, Vd = {
6373
+ }, jd = {
6359
6374
  card: {
6360
6375
  title: "Maksājumu veids",
6361
6376
  number: {
@@ -6405,7 +6420,7 @@ const yd = {
6405
6420
  success: "Panākumi",
6406
6421
  error: "Mēs nevaram pārbaudīt jūsu maksājuma metodes autentiskumu. Lūdzu, izvēlieties citu maksājumu metodi un mēģiniet vēlreiz."
6407
6422
  }
6408
- }, Fd = {
6423
+ }, zd = {
6409
6424
  card: {
6410
6425
  title: "Kaedah pembayaran",
6411
6426
  number: {
@@ -6455,7 +6470,7 @@ const yd = {
6455
6470
  success: "Kejayaan",
6456
6471
  error: "Kami tidak dapat mengesahkan kaedah pembayaran anda. Sila pilih kaedah pembayaran lain dan cuba lagi."
6457
6472
  }
6458
- }, Ud = {
6473
+ }, Kd = {
6459
6474
  card: {
6460
6475
  title: "Metodu tal-ħlas",
6461
6476
  number: {
@@ -6505,7 +6520,57 @@ const yd = {
6505
6520
  success: "Suċċess",
6506
6521
  error: "Aħna ma nistgħux jawtentikaw il-metodu tal-ħlas tiegħek. Jekk jogħġbok agħżel metodu ta' ħlas differenti u erġa' pprova."
6507
6522
  }
6508
- }, Bd = {
6523
+ }, qd = {
6524
+ card: {
6525
+ title: "Betalingsmetode",
6526
+ number: {
6527
+ label: "Kortnummer",
6528
+ error: {
6529
+ required: "PÅKREVD",
6530
+ invalid: "Kortnummeret er ugyldig",
6531
+ incomplete: "Kortnummeret er ufullstendig",
6532
+ unsupported: "Ikke støttet korttype"
6533
+ }
6534
+ },
6535
+ expiry: {
6536
+ label: "Utløpsdato",
6537
+ placeholder: "MM / ÅÅ",
6538
+ error: {
6539
+ required: "PÅKREVD",
6540
+ invalid: "Utløpsdatoen er ugyldig",
6541
+ incomplete: "Kortets utløpsdato er ufullstendig",
6542
+ expired: "Kortet har utløpt"
6543
+ }
6544
+ },
6545
+ cvc: {
6546
+ label: "Sikkerhetskode",
6547
+ placeholder: "CVC",
6548
+ error: {
6549
+ required: "PÅKREVD",
6550
+ incomplete: "Sikkerhetskoden er ufullstendig",
6551
+ invalid: "CVC-koden er ugyldig"
6552
+ }
6553
+ },
6554
+ name: {
6555
+ label: "Kortholders navn",
6556
+ placeholder: "Fullt navn",
6557
+ error: {
6558
+ required: "PÅKREVD",
6559
+ invalid: "Oppgi fullt navn"
6560
+ }
6561
+ },
6562
+ pay: {
6563
+ button: "Betal"
6564
+ },
6565
+ compact: {
6566
+ button: "Kort"
6567
+ }
6568
+ },
6569
+ status: {
6570
+ success: "Betalingen var vellykket!",
6571
+ error: "Vi kan ikke autentisere betalingsmetoden din. Velg en annen betalingsmetode og prøv igjen."
6572
+ }
6573
+ }, Hd = {
6509
6574
  card: {
6510
6575
  title: "Betalingsmetode",
6511
6576
  number: {
@@ -6555,7 +6620,7 @@ const yd = {
6555
6620
  success: "Suksess",
6556
6621
  error: "Vi kan ikke godkjenne betalingsmåten din. Vennligst velg en annen betalingsmetode og prøv på nytt."
6557
6622
  }
6558
- }, jd = {
6623
+ }, Wd = {
6559
6624
  card: {
6560
6625
  title: "Betaalmethode",
6561
6626
  number: {
@@ -6605,7 +6670,7 @@ const yd = {
6605
6670
  success: "Succes",
6606
6671
  error: "We kunnen je betaalmethode niet verifiëren. Kies een andere betaalmethode en probeer het opnieuw."
6607
6672
  }
6608
- }, zd = {
6673
+ }, Gd = {
6609
6674
  card: {
6610
6675
  title: "Metoda płatności",
6611
6676
  number: {
@@ -6655,7 +6720,7 @@ const yd = {
6655
6720
  success: "Sukces",
6656
6721
  error: "Nie możemy uwierzytelnić metody płatności. Wybierz inną metodę płatności i spróbuj ponownie."
6657
6722
  }
6658
- }, Kd = {
6723
+ }, Yd = {
6659
6724
  card: {
6660
6725
  title: "Forma de pagamento",
6661
6726
  number: {
@@ -6705,7 +6770,7 @@ const yd = {
6705
6770
  success: "Sucesso",
6706
6771
  error: "Não foi possível autenticar o seu método de pagamento. Selecione outro método de pagamento e tente novamente."
6707
6772
  }
6708
- }, qd = {
6773
+ }, $d = {
6709
6774
  card: {
6710
6775
  title: "Metoda de plată",
6711
6776
  number: {
@@ -6755,7 +6820,7 @@ const yd = {
6755
6820
  success: "Succes",
6756
6821
  error: "Nu putem să vă autentificăm metoda de plată. Vă rugăm să alegeți o altă metodă de plată și să încercați din nou."
6757
6822
  }
6758
- }, Hd = {
6823
+ }, Qd = {
6759
6824
  card: {
6760
6825
  title: "Метод оплаты",
6761
6826
  number: {
@@ -6805,7 +6870,57 @@ const yd = {
6805
6870
  success: "Успех",
6806
6871
  error: "Мы не можем проверить подлинность вашего способа оплаты. Пожалуйста, выберите другой способ оплаты и повторите попытку."
6807
6872
  }
6808
- }, Wd = {
6873
+ }, Zd = {
6874
+ card: {
6875
+ title: "Спосіб оплати",
6876
+ number: {
6877
+ label: "Номер картки",
6878
+ error: {
6879
+ required: "ОБОВʼЯЗКОВО",
6880
+ invalid: "Невірний номер картки",
6881
+ incomplete: "Номер картки неповний",
6882
+ unsupported: "Непідтримуваний тип картки"
6883
+ }
6884
+ },
6885
+ expiry: {
6886
+ label: "Термін дії",
6887
+ placeholder: "ММ / РР",
6888
+ error: {
6889
+ required: "ОБОВʼЯЗКОВО",
6890
+ invalid: "Невірний термін дії картки",
6891
+ incomplete: "Термін дії картки вказано не повністю",
6892
+ expired: "Термін дії картки минув"
6893
+ }
6894
+ },
6895
+ cvc: {
6896
+ label: "Код безпеки",
6897
+ placeholder: "CVC",
6898
+ error: {
6899
+ required: "ОБОВʼЯЗКОВО",
6900
+ incomplete: "Код безпеки картки введено не повністю",
6901
+ invalid: "Невірний CVC-код картки"
6902
+ }
6903
+ },
6904
+ name: {
6905
+ label: "Імʼя власника картки",
6906
+ placeholder: "Повне імʼя",
6907
+ error: {
6908
+ required: "ОБОВʼЯЗКОВО",
6909
+ invalid: "Вкажіть своє повне імʼя"
6910
+ }
6911
+ },
6912
+ pay: {
6913
+ button: "Сплатити"
6914
+ },
6915
+ compact: {
6916
+ button: "Картка"
6917
+ }
6918
+ },
6919
+ status: {
6920
+ success: "Платіж успішний!",
6921
+ error: "Не вдалося підтвердити ваш спосіб оплати. Будь ласка, оберіть інший спосіб оплати та спробуйте ще раз."
6922
+ }
6923
+ }, Xd = {
6809
6924
  card: {
6810
6925
  title: "Spôsob platby",
6811
6926
  number: {
@@ -6855,7 +6970,7 @@ const yd = {
6855
6970
  success: "Úspech",
6856
6971
  error: "Nemôžeme overiť váš spôsob platby. Vyberte si iný spôsob platby a skúste to znova."
6857
6972
  }
6858
- }, Gd = {
6973
+ }, Jd = {
6859
6974
  card: {
6860
6975
  title: "Način plačila",
6861
6976
  number: {
@@ -6905,7 +7020,7 @@ const yd = {
6905
7020
  success: "Uspeh",
6906
7021
  error: "Vašega načina plačila ne moremo preveriti. Izberite drug način plačila in poskusite znova."
6907
7022
  }
6908
- }, Yd = {
7023
+ }, eu = {
6909
7024
  card: {
6910
7025
  title: "Betalningsmetod",
6911
7026
  number: {
@@ -6955,7 +7070,7 @@ const yd = {
6955
7070
  success: "Framgång",
6956
7071
  error: "Vi kan inte verifiera din betalningsmetod. Vänligen välj en annan betalningsmetod och försök igen."
6957
7072
  }
6958
- }, $d = {
7073
+ }, tu = {
6959
7074
  card: {
6960
7075
  title: "วิธีการชำระเงิน",
6961
7076
  number: {
@@ -7005,7 +7120,7 @@ const yd = {
7005
7120
  success: "ความสำเร็จ",
7006
7121
  error: "เราไม่สามารถตรวจสอบวิธีการชำระเงินของคุณได้ โปรดเลือกวิธีการชำระเงินอื่นแล้วลองอีกครั้ง"
7007
7122
  }
7008
- }, Qd = {
7123
+ }, nu = {
7009
7124
  card: {
7010
7125
  title: "Ödeme yöntemi",
7011
7126
  number: {
@@ -7055,7 +7170,7 @@ const yd = {
7055
7170
  success: "Başarı",
7056
7171
  error: "Ödeme yönteminizi doğrulayamıyoruz. Lütfen farklı bir ödeme yöntemi seçin ve tekrar deneyin."
7057
7172
  }
7058
- }, Zd = {
7173
+ }, ru = {
7059
7174
  card: {
7060
7175
  title: "Phương thức thanh toán",
7061
7176
  number: {
@@ -7105,7 +7220,7 @@ const yd = {
7105
7220
  success: "Thành công",
7106
7221
  error: "Chúng tôi không thể xác thực phương thức thanh toán của bạn. Vui lòng chọn phương thức thanh toán khác và thử lại."
7107
7222
  }
7108
- }, Xd = {
7223
+ }, iu = {
7109
7224
  card: {
7110
7225
  title: "支付方式",
7111
7226
  number: {
@@ -7155,49 +7270,51 @@ const yd = {
7155
7270
  success: "成功",
7156
7271
  error: "我们无法验证您的付款方式。请选择其他付款方式并重试。"
7157
7272
  }
7158
- }, Ht = {
7159
- ar: yd,
7160
- en: wd,
7161
- bg: bd,
7162
- cs: Ed,
7163
- da: _d,
7164
- de: Cd,
7165
- el: Ad,
7166
- es: Td,
7167
- et: Id,
7168
- fi: Od,
7169
- fil: Nd,
7170
- fr: Ld,
7171
- hr: xd,
7172
- hu: Pd,
7173
- id: Rd,
7174
- it: kd,
7175
- ja: Md,
7176
- ko: Sd,
7177
- lt: Dd,
7178
- lv: Vd,
7179
- ms: Fd,
7180
- ru: Hd,
7181
- mt: Ud,
7182
- nb: Bd,
7183
- nl: jd,
7184
- pl: zd,
7185
- pt: Kd,
7186
- ro: qd,
7187
- sk: Wd,
7188
- sl: Gd,
7189
- sv: Yd,
7190
- th: $d,
7191
- tr: Qd,
7192
- vi: Zd,
7193
- zh: Xd
7194
- }, Wt = () => {
7273
+ }, Wt = {
7274
+ ar: Cd,
7275
+ en: Nd,
7276
+ bg: Ad,
7277
+ cs: wd,
7278
+ da: Td,
7279
+ de: Id,
7280
+ el: Od,
7281
+ es: Ld,
7282
+ et: xd,
7283
+ fi: Pd,
7284
+ fil: Rd,
7285
+ fr: kd,
7286
+ hr: Md,
7287
+ hu: Sd,
7288
+ id: Dd,
7289
+ it: Vd,
7290
+ ja: Fd,
7291
+ ko: Ud,
7292
+ lt: Bd,
7293
+ lv: jd,
7294
+ ms: zd,
7295
+ ru: Qd,
7296
+ mt: Kd,
7297
+ no: qd,
7298
+ nb: Hd,
7299
+ nl: Wd,
7300
+ pl: Gd,
7301
+ pt: Yd,
7302
+ ro: $d,
7303
+ ua: Zd,
7304
+ sk: Xd,
7305
+ sl: Jd,
7306
+ sv: eu,
7307
+ th: tu,
7308
+ tr: nu,
7309
+ vi: ru,
7310
+ zh: iu
7311
+ }, Gt = () => {
7195
7312
  const n = navigator == null ? void 0 : navigator.language.split("-")[0];
7196
- return Ht[n] || Ht.en;
7197
- }, hr = (n, t = {}) => {
7198
- var r, i, a, s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I, O, R, U, H, W, S, F, q, ee, M, Y, K, g, E, k, B, _, N, A, P, V, L, G, X, se, D, ne, be, fn, vn, gn, yn, bn, En, _n, Cn, An;
7199
- if (!n) return Wt();
7200
- const e = Ht[n] || Wt();
7313
+ return Wt[n] || Wt.en;
7314
+ }, vr = (n, t = {}) => {
7315
+ var r, i, a, s, o, l, c, d, u, h, p, m, f, v, y, w, T, x, C, I, O, R, U, H, W, S, F, q, ee, M, Y, K, g, E, k, B, _, N, A, P, V, L, G, J, se, D, ne, be, fn, vn, gn, yn, bn, En, _n, Cn, An, wn, Tn, In;
7316
+ if (!n) return Gt();
7317
+ const e = Wt[n] || Gt();
7201
7318
  return {
7202
7319
  card: {
7203
7320
  title: ((r = t == null ? void 0 : t.card) == null ? void 0 : r.title) || e.card.title,
@@ -7222,47 +7339,47 @@ const yd = {
7222
7339
  },
7223
7340
  cvc: {
7224
7341
  label: ((g = (K = t == null ? void 0 : t.card) == null ? void 0 : K.cvc) == null ? void 0 : g.label) || e.card.cvc.label,
7225
- placeholder: ((k = (E = t == null ? void 0 : t.card) == null ? void 0 : E.cvc) == null ? void 0 : k.label) || e.card.cvc.label,
7342
+ placeholder: ((k = (E = t == null ? void 0 : t.card) == null ? void 0 : E.cvc) == null ? void 0 : k.placeholder) || e.card.cvc.placeholder,
7226
7343
  error: {
7227
- required: ((_ = (B = t == null ? void 0 : t.card) == null ? void 0 : B.cvc) == null ? void 0 : _.label) || e.card.cvc.label,
7228
- incomplete: ((A = (N = t == null ? void 0 : t.card) == null ? void 0 : N.cvc) == null ? void 0 : A.label) || e.card.cvc.label,
7229
- invalid: ((V = (P = t == null ? void 0 : t.card) == null ? void 0 : P.cvc) == null ? void 0 : V.label) || e.card.cvc.label
7344
+ required: ((N = (_ = (B = t == null ? void 0 : t.card) == null ? void 0 : B.cvc) == null ? void 0 : _.error) == null ? void 0 : N.required) || e.card.cvc.error.required,
7345
+ incomplete: ((V = (P = (A = t == null ? void 0 : t.card) == null ? void 0 : A.cvc) == null ? void 0 : P.error) == null ? void 0 : V.incomplete) || e.card.cvc.error.incomplete,
7346
+ invalid: ((J = (G = (L = t == null ? void 0 : t.card) == null ? void 0 : L.cvc) == null ? void 0 : G.error) == null ? void 0 : J.invalid) || e.card.cvc.error.invalid
7230
7347
  }
7231
7348
  },
7232
7349
  name: {
7233
- label: ((G = (L = t == null ? void 0 : t.card) == null ? void 0 : L.name) == null ? void 0 : G.label) || e.card.name.label,
7234
- placeholder: ((se = (X = t == null ? void 0 : t.card) == null ? void 0 : X.name) == null ? void 0 : se.placeholder) || e.card.name.placeholder,
7350
+ label: ((D = (se = t == null ? void 0 : t.card) == null ? void 0 : se.name) == null ? void 0 : D.label) || e.card.name.label,
7351
+ placeholder: ((be = (ne = t == null ? void 0 : t.card) == null ? void 0 : ne.name) == null ? void 0 : be.placeholder) || e.card.name.placeholder,
7235
7352
  error: {
7236
- required: ((be = (ne = (D = t == null ? void 0 : t.card) == null ? void 0 : D.name) == null ? void 0 : ne.error) == null ? void 0 : be.required) || e.card.name.error.required,
7237
- invalid: ((gn = (vn = (fn = t == null ? void 0 : t.card) == null ? void 0 : fn.name) == null ? void 0 : vn.error) == null ? void 0 : gn.invalid) || e.card.name.error.invalid
7353
+ required: ((gn = (vn = (fn = t == null ? void 0 : t.card) == null ? void 0 : fn.name) == null ? void 0 : vn.error) == null ? void 0 : gn.required) || e.card.name.error.required,
7354
+ invalid: ((En = (bn = (yn = t == null ? void 0 : t.card) == null ? void 0 : yn.name) == null ? void 0 : bn.error) == null ? void 0 : En.invalid) || e.card.name.error.invalid
7238
7355
  }
7239
7356
  },
7240
7357
  pay: {
7241
- button: ((bn = (yn = t == null ? void 0 : t.card) == null ? void 0 : yn.pay) == null ? void 0 : bn.button) || e.card.pay.button
7358
+ button: ((Cn = (_n = t == null ? void 0 : t.card) == null ? void 0 : _n.pay) == null ? void 0 : Cn.button) || e.card.pay.button
7242
7359
  },
7243
7360
  compact: {
7244
- button: ((_n = (En = t == null ? void 0 : t.card) == null ? void 0 : En.compact) == null ? void 0 : _n.button) || e.card.compact.button
7361
+ button: ((wn = (An = t == null ? void 0 : t.card) == null ? void 0 : An.compact) == null ? void 0 : wn.button) || e.card.compact.button
7245
7362
  }
7246
7363
  },
7247
7364
  status: {
7248
- success: ((Cn = t == null ? void 0 : t.status) == null ? void 0 : Cn.success) || e.status.success,
7249
- error: ((An = t == null ? void 0 : t.status) == null ? void 0 : An.error) || e.status.error
7365
+ success: ((Tn = t == null ? void 0 : t.status) == null ? void 0 : Tn.success) || e.status.success,
7366
+ error: ((In = t == null ? void 0 : t.status) == null ? void 0 : In.error) || e.status.error
7250
7367
  }
7251
7368
  };
7252
7369
  };
7253
- class Jd extends gt {
7370
+ class au extends yt {
7254
7371
  constructor() {
7255
7372
  super({
7256
- messages: Wt(),
7373
+ messages: Gt(),
7257
7374
  locale: (navigator == null ? void 0 : navigator.language.split("-")[0]) || "en"
7258
7375
  });
7259
7376
  }
7260
7377
  setMessages(t) {
7261
- const e = this.locale(), r = hr(e, t);
7378
+ const e = this.locale(), r = vr(e, t);
7262
7379
  this.setState({ locale: e, messages: r, overrides: t });
7263
7380
  }
7264
7381
  setLocale(t) {
7265
- const e = this.overrides(), r = hr(t, e);
7382
+ const e = this.overrides(), r = vr(t, e);
7266
7383
  this.setState({ locale: t, messages: r, overrides: e });
7267
7384
  }
7268
7385
  overrides() {
@@ -7297,7 +7414,7 @@ class Jd extends gt {
7297
7414
  * See the License for the specific language governing permissions and
7298
7415
  * limitations under the License.
7299
7416
  */
7300
- function eu(n, t) {
7417
+ function su(n, t) {
7301
7418
  var e = {};
7302
7419
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
7303
7420
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -7305,11 +7422,11 @@ function eu(n, t) {
7305
7422
  t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (e[r[i]] = n[r[i]]);
7306
7423
  return e;
7307
7424
  }
7308
- function tu(n, t) {
7425
+ function ou(n, t) {
7309
7426
  var e = document.querySelector('script[src="'.concat(n, '"]'));
7310
7427
  if (e === null)
7311
7428
  return null;
7312
- var r = Ni(n, t), i = e.cloneNode();
7429
+ var r = Pi(n, t), i = e.cloneNode();
7313
7430
  if (delete i.dataset.uidAuto, Object.keys(i.dataset).length !== Object.keys(r.dataset).length)
7314
7431
  return null;
7315
7432
  var a = !0;
@@ -7317,63 +7434,63 @@ function tu(n, t) {
7317
7434
  i.dataset[s] !== r.dataset[s] && (a = !1);
7318
7435
  }), a ? e : null;
7319
7436
  }
7320
- function nu(n) {
7321
- var t = n.url, e = n.attributes, r = n.onSuccess, i = n.onError, a = Ni(t, e);
7437
+ function lu(n) {
7438
+ var t = n.url, e = n.attributes, r = n.onSuccess, i = n.onError, a = Pi(t, e);
7322
7439
  a.onerror = i, a.onload = r, document.head.insertBefore(a, document.head.firstElementChild);
7323
7440
  }
7324
- function ru(n) {
7325
- var t = n.sdkBaseUrl, e = n.environment, r = eu(n, ["sdkBaseUrl", "environment"]), i = t || su(e), a = r, s = Object.keys(a).filter(function(c) {
7441
+ function cu(n) {
7442
+ var t = n.sdkBaseUrl, e = n.environment, r = su(n, ["sdkBaseUrl", "environment"]), i = t || pu(e), a = r, s = Object.keys(a).filter(function(c) {
7326
7443
  return typeof a[c] != "undefined" && a[c] !== null && a[c] !== "";
7327
7444
  }).reduce(function(c, d) {
7328
7445
  var u = a[d].toString();
7329
- return d = iu(d), d.substring(0, 4) === "data" || d === "crossorigin" ? c.attributes[d] = u : c.queryParams[d] = u, c;
7446
+ return d = du(d), d.substring(0, 4) === "data" || d === "crossorigin" ? c.attributes[d] = u : c.queryParams[d] = u, c;
7330
7447
  }, {
7331
7448
  queryParams: {},
7332
7449
  attributes: {}
7333
7450
  }), o = s.queryParams, l = s.attributes;
7334
7451
  return o["merchant-id"] && o["merchant-id"].indexOf(",") !== -1 && (l["data-merchant-id"] = o["merchant-id"], o["merchant-id"] = "*"), {
7335
- url: "".concat(i, "?").concat(au(o)),
7452
+ url: "".concat(i, "?").concat(uu(o)),
7336
7453
  attributes: l
7337
7454
  };
7338
7455
  }
7339
- function iu(n) {
7456
+ function du(n) {
7340
7457
  var t = function(e, r) {
7341
7458
  return (r ? "-" : "") + e.toLowerCase();
7342
7459
  };
7343
7460
  return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g, t);
7344
7461
  }
7345
- function au(n) {
7462
+ function uu(n) {
7346
7463
  var t = "";
7347
7464
  return Object.keys(n).forEach(function(e) {
7348
7465
  t.length !== 0 && (t += "&"), t += e + "=" + n[e];
7349
7466
  }), t;
7350
7467
  }
7351
- function su(n) {
7468
+ function pu(n) {
7352
7469
  return n === "sandbox" ? "https://www.sandbox.paypal.com/sdk/js" : "https://www.paypal.com/sdk/js";
7353
7470
  }
7354
- function Ni(n, t) {
7471
+ function Pi(n, t) {
7355
7472
  t === void 0 && (t = {});
7356
7473
  var e = document.createElement("script");
7357
7474
  return e.src = n, Object.keys(t).forEach(function(r) {
7358
7475
  e.setAttribute(r, t[r]), r === "data-csp-nonce" && e.setAttribute("nonce", t["data-csp-nonce"]);
7359
7476
  }), e;
7360
7477
  }
7361
- function ou(n, t) {
7362
- if (t === void 0 && (t = Promise), Li(n, t), typeof document == "undefined")
7478
+ function hu(n, t) {
7479
+ if (t === void 0 && (t = Promise), Ri(n, t), typeof document == "undefined")
7363
7480
  return t.resolve(null);
7364
- var e = ru(n), r = e.url, i = e.attributes, a = i["data-namespace"] || "paypal", s = mr(a);
7365
- return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), tu(r, i) && s ? t.resolve(s) : lu({
7481
+ var e = cu(n), r = e.url, i = e.attributes, a = i["data-namespace"] || "paypal", s = gr(a);
7482
+ return i["data-js-sdk-library"] || (i["data-js-sdk-library"] = "paypal-js"), ou(r, i) && s ? t.resolve(s) : mu({
7366
7483
  url: r,
7367
7484
  attributes: i
7368
7485
  }, t).then(function() {
7369
- var o = mr(a);
7486
+ var o = gr(a);
7370
7487
  if (o)
7371
7488
  return o;
7372
7489
  throw new Error("The window.".concat(a, " global variable is not available."));
7373
7490
  });
7374
7491
  }
7375
- function lu(n, t) {
7376
- t === void 0 && (t = Promise), Li(n, t);
7492
+ function mu(n, t) {
7493
+ t === void 0 && (t = Promise), Ri(n, t);
7377
7494
  var e = n.url, r = n.attributes;
7378
7495
  if (typeof e != "string" || e.length === 0)
7379
7496
  throw new Error("Invalid url.");
@@ -7382,7 +7499,7 @@ function lu(n, t) {
7382
7499
  return new t(function(i, a) {
7383
7500
  if (typeof document == "undefined")
7384
7501
  return i();
7385
- nu({
7502
+ lu({
7386
7503
  url: e,
7387
7504
  attributes: r,
7388
7505
  onSuccess: function() {
@@ -7395,10 +7512,10 @@ function lu(n, t) {
7395
7512
  });
7396
7513
  });
7397
7514
  }
7398
- function mr(n) {
7515
+ function gr(n) {
7399
7516
  return window[n];
7400
7517
  }
7401
- function Li(n, t) {
7518
+ function Ri(n, t) {
7402
7519
  if (typeof n != "object" || n === null)
7403
7520
  throw new Error("Expected an options object.");
7404
7521
  var e = n.environment;
@@ -7407,13 +7524,13 @@ function Li(n, t) {
7407
7524
  if (typeof t != "undefined" && typeof t != "function")
7408
7525
  throw new Error("Expected PromisePonyfill to be a function.");
7409
7526
  }
7410
- const cu = {
7527
+ const fu = {
7411
7528
  layout: "vertical",
7412
7529
  tagline: !1,
7413
7530
  height: 40,
7414
7531
  borderRadius: 12
7415
7532
  };
7416
- class du {
7533
+ class vu {
7417
7534
  constructor() {
7418
7535
  b(this, "paypal", null);
7419
7536
  }
@@ -7421,7 +7538,7 @@ class du {
7421
7538
  init(t) {
7422
7539
  return z(this, null, function* () {
7423
7540
  try {
7424
- this.paypal = yield ou(t);
7541
+ this.paypal = yield hu(t);
7425
7542
  } catch (e) {
7426
7543
  console.error("failed to load the PayPal JS SDK script", e);
7427
7544
  }
@@ -7432,8 +7549,8 @@ class du {
7432
7549
  return z(this, null, function* () {
7433
7550
  var r, i;
7434
7551
  if (this.paypal) {
7435
- const a = j(j({}, cu), (e == null ? void 0 : e.style) || {});
7436
- yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, J(j({
7552
+ const a = j(j({}, fu), (e == null ? void 0 : e.style) || {});
7553
+ yield (i = (r = this.paypal).Buttons) == null ? void 0 : i.call(r, X(j({
7437
7554
  fundingSource: "paypal"
7438
7555
  }, e), {
7439
7556
  style: a
@@ -7445,9 +7562,9 @@ class du {
7445
7562
  function Ie(n) {
7446
7563
  throw new Error('Could not dynamically require "' + n + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
7447
7564
  }
7448
- var Nt = { exports: {} }, fr;
7449
- function uu() {
7450
- return fr || (fr = 1, function(n, t) {
7565
+ var Lt = { exports: {} }, yr;
7566
+ function gu() {
7567
+ return yr || (yr = 1, function(n, t) {
7451
7568
  (function(e) {
7452
7569
  n.exports = e();
7453
7570
  })(function() {
@@ -7591,7 +7708,7 @@ function uu() {
7591
7708
  });
7592
7709
  }
7593
7710
  return new (A || (A = Promise))(function(L, G) {
7594
- function X(ne) {
7711
+ function J(ne) {
7595
7712
  try {
7596
7713
  D(P.next(ne));
7597
7714
  } catch (be) {
@@ -7606,7 +7723,7 @@ function uu() {
7606
7723
  }
7607
7724
  }
7608
7725
  function D(ne) {
7609
- ne.done ? L(ne.value) : V(ne.value).then(X, se);
7726
+ ne.done ? L(ne.value) : V(ne.value).then(J, se);
7610
7727
  }
7611
7728
  D((P = P.apply(_, [])).next());
7612
7729
  });
@@ -7616,10 +7733,10 @@ function uu() {
7616
7733
  if (L[0] & 1) throw L[1];
7617
7734
  return L[1];
7618
7735
  }, trys: [], ops: [] }, P, V, L, G;
7619
- return G = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
7736
+ return G = { next: J(0), throw: J(1), return: J(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
7620
7737
  return this;
7621
7738
  }), G;
7622
- function X(D) {
7739
+ function J(D) {
7623
7740
  return function(ne) {
7624
7741
  return se([D, ne]);
7625
7742
  };
@@ -7679,13 +7796,13 @@ function uu() {
7679
7796
  var P = document.createElement("script"), V = _.dataAttributes || {}, L = _.container || document.head;
7680
7797
  return P.src = _.src, P.id = _.id || "", P.async = !0, _.type && P.setAttribute("type", "".concat(_.type)), _.crossorigin && P.setAttribute("crossorigin", "".concat(_.crossorigin)), Object.keys(V).forEach(function(G) {
7681
7798
  P.setAttribute("data-".concat(G), "".concat(V[G]));
7682
- }), N = new Promise(function(G, X) {
7799
+ }), N = new Promise(function(G, J) {
7683
7800
  P.addEventListener("load", function() {
7684
7801
  G(P);
7685
7802
  }), P.addEventListener("error", function() {
7686
- X(new Error("".concat(_.src, " failed to load.")));
7803
+ J(new Error("".concat(_.src, " failed to load.")));
7687
7804
  }), P.addEventListener("abort", function() {
7688
- X(new Error("".concat(_.src, " has aborted.")));
7805
+ J(new Error("".concat(_.src, " has aborted.")));
7689
7806
  }), L.appendChild(P);
7690
7807
  }), c[A] = N, N;
7691
7808
  }
@@ -7725,7 +7842,7 @@ function uu() {
7725
7842
  var P, V;
7726
7843
  return A === void 0 && (A = !0), s(this, void 0, void 0, function() {
7727
7844
  var L, G;
7728
- return o(this, function(X) {
7845
+ return o(this, function(J) {
7729
7846
  if (L = W(), L && L[_.module]) {
7730
7847
  if (N && ((P = L[_.module]) === null || P === void 0 ? void 0 : P.VERSION) !== N)
7731
7848
  throw G = (V = L[_.module]) === null || V === void 0 ? void 0 : V.VERSION, new Error("".concat(_.module, " already loaded with version ").concat(G, " cannot load version ").concat(N));
@@ -7951,7 +8068,7 @@ function uu() {
7951
8068
  A.url = N + M.endpoint, A.sendAnalyticsEvent = function(V) {
7952
8069
  w.sendEvent(K, V);
7953
8070
  }, K._request(A, function(V, L, G) {
7954
- var X, se;
8071
+ var J, se;
7955
8072
  if (se = q(G, V), se) {
7956
8073
  k(se);
7957
8074
  return;
@@ -7966,10 +8083,10 @@ function uu() {
7966
8083
  );
7967
8084
  return;
7968
8085
  }
7969
- X = y({ _httpStatus: G }, L), P && X.creditCards && X.creditCards.length > 0 && (K._findOrCreateFraudnetJSON(X.creditCards[0].nonce), R.loadScript({
8086
+ J = y({ _httpStatus: G }, L), P && J.creditCards && J.creditCards.length > 0 && (K._findOrCreateFraudnetJSON(J.creditCards[0].nonce), R.loadScript({
7970
8087
  src: W,
7971
8088
  forceScriptReload: !0
7972
- })), E(X);
8089
+ })), E(J);
7973
8090
  });
7974
8091
  });
7975
8092
  if (typeof Y == "function") {
@@ -9118,13 +9235,13 @@ function uu() {
9118
9235
  };
9119
9236
  }, {}] }, {}, [13])(13);
9120
9237
  });
9121
- }(Nt)), Nt.exports;
9238
+ }(Lt)), Lt.exports;
9122
9239
  }
9123
- var pu = uu();
9124
- const hu = /* @__PURE__ */ wi(pu);
9125
- var Lt = { exports: {} }, vr;
9126
- function mu() {
9127
- return vr || (vr = 1, function(n, t) {
9240
+ var yu = gu();
9241
+ const bu = /* @__PURE__ */ Oi(yu);
9242
+ var xt = { exports: {} }, br;
9243
+ function Eu() {
9244
+ return br || (br = 1, function(n, t) {
9128
9245
  (function(e) {
9129
9246
  n.exports = e();
9130
9247
  })(function() {
@@ -9488,7 +9605,7 @@ function mu() {
9488
9605
  });
9489
9606
  }
9490
9607
  return new (A || (A = Promise))(function(L, G) {
9491
- function X(ne) {
9608
+ function J(ne) {
9492
9609
  try {
9493
9610
  D(P.next(ne));
9494
9611
  } catch (be) {
@@ -9503,7 +9620,7 @@ function mu() {
9503
9620
  }
9504
9621
  }
9505
9622
  function D(ne) {
9506
- ne.done ? L(ne.value) : V(ne.value).then(X, se);
9623
+ ne.done ? L(ne.value) : V(ne.value).then(J, se);
9507
9624
  }
9508
9625
  D((P = P.apply(_, [])).next());
9509
9626
  });
@@ -9513,10 +9630,10 @@ function mu() {
9513
9630
  if (L[0] & 1) throw L[1];
9514
9631
  return L[1];
9515
9632
  }, trys: [], ops: [] }, P, V, L, G;
9516
- return G = { next: X(0), throw: X(1), return: X(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
9633
+ return G = { next: J(0), throw: J(1), return: J(2) }, typeof Symbol == "function" && (G[Symbol.iterator] = function() {
9517
9634
  return this;
9518
9635
  }), G;
9519
- function X(D) {
9636
+ function J(D) {
9520
9637
  return function(ne) {
9521
9638
  return se([D, ne]);
9522
9639
  };
@@ -9576,13 +9693,13 @@ function mu() {
9576
9693
  var P = document.createElement("script"), V = _.dataAttributes || {}, L = _.container || document.head;
9577
9694
  return P.src = _.src, P.id = _.id || "", P.async = !0, _.type && P.setAttribute("type", "".concat(_.type)), _.crossorigin && P.setAttribute("crossorigin", "".concat(_.crossorigin)), Object.keys(V).forEach(function(G) {
9578
9695
  P.setAttribute("data-".concat(G), "".concat(V[G]));
9579
- }), N = new Promise(function(G, X) {
9696
+ }), N = new Promise(function(G, J) {
9580
9697
  P.addEventListener("load", function() {
9581
9698
  G(P);
9582
9699
  }), P.addEventListener("error", function() {
9583
- X(new Error("".concat(_.src, " failed to load.")));
9700
+ J(new Error("".concat(_.src, " failed to load.")));
9584
9701
  }), P.addEventListener("abort", function() {
9585
- X(new Error("".concat(_.src, " has aborted.")));
9702
+ J(new Error("".concat(_.src, " has aborted.")));
9586
9703
  }), L.appendChild(P);
9587
9704
  }), c[A] = N, N;
9588
9705
  }
@@ -9622,7 +9739,7 @@ function mu() {
9622
9739
  var P, V;
9623
9740
  return A === void 0 && (A = !0), s(this, void 0, void 0, function() {
9624
9741
  var L, G;
9625
- return o(this, function(X) {
9742
+ return o(this, function(J) {
9626
9743
  if (L = W(), L && L[_.module]) {
9627
9744
  if (N && ((P = L[_.module]) === null || P === void 0 ? void 0 : P.VERSION) !== N)
9628
9745
  throw G = (V = L[_.module]) === null || V === void 0 ? void 0 : V.VERSION, new Error("".concat(_.module, " already loaded with version ").concat(G, " cannot load version ").concat(N));
@@ -11532,10 +11649,10 @@ function mu() {
11532
11649
  });
11533
11650
  }
11534
11651
  return B.then(function(L) {
11535
- var G = new Date(L.expiresAt) - new Date(L.createdAt), X = G * 0.6666;
11652
+ var G = new Date(L.expiresAt) - new Date(L.createdAt), J = G * 0.6666;
11536
11653
  clearTimeout(k._refreshPaymentContextTimeout), k._refreshPaymentContextTimeout = setTimeout(function() {
11537
11654
  k._tokenizationInProgress || k._createVenmoPaymentContext(g, !0);
11538
- }, X), !(E && k._tokenizationInProgress) && (k._venmoPaymentContextStatus = L.status, k._venmoPaymentContextId = L.id);
11655
+ }, J), !(E && k._tokenizationInProgress) && (k._venmoPaymentContextStatus = L.status, k._venmoPaymentContextId = L.id);
11539
11656
  });
11540
11657
  }, S.prototype._popupBridgeIsInstalled = function() {
11541
11658
  return window.popupBridge && typeof window.popupBridge.open == "function";
@@ -12014,11 +12131,11 @@ function mu() {
12014
12131
  r.exports = f.wrapPrototype(S);
12015
12132
  }, { "../lib/analytics": 55, "../lib/assign": 57, "../lib/braintree-error": 59, "../lib/convert-methods-to-error": 61, "../lib/in-iframe": 78, "../lib/is-verified-domain": 79, "../lib/methods": 81, "../lib/querystring": 82, "../lib/snake-case-to-camel-case": 83, "../lib/url-params": 84, "./external/": 87, "./external/queries": 88, "./shared/browser-detection": 91, "./shared/constants": 92, "./shared/errors": 93, "./shared/get-venmo-url": 95, "./shared/supports-venmo": 96, "./shared/web-login-backdrop": 97, "@braintree/extended-promise": 26, "@braintree/wrap-promise": 35 }] }, {}, [90])(90);
12016
12133
  });
12017
- }(Lt)), Lt.exports;
12134
+ }(xt)), xt.exports;
12018
12135
  }
12019
- var fu = mu();
12020
- const vu = /* @__PURE__ */ wi(fu);
12021
- class gu {
12136
+ var _u = Eu();
12137
+ const Cu = /* @__PURE__ */ Oi(_u);
12138
+ class Au {
12022
12139
  constructor() {
12023
12140
  b(this, "client", null);
12024
12141
  b(this, "venmoInstance", null);
@@ -12027,7 +12144,7 @@ class gu {
12027
12144
  init(t) {
12028
12145
  return z(this, null, function* () {
12029
12146
  try {
12030
- this.client = yield hu.create({ authorization: t.authorization });
12147
+ this.client = yield bu.create({ authorization: t.authorization });
12031
12148
  } catch (e) {
12032
12149
  throw console.error("Failed to initialize Braintree client:", e), e;
12033
12150
  }
@@ -12039,7 +12156,7 @@ class gu {
12039
12156
  if (!this.client)
12040
12157
  throw new Error("Braintree client must be initialized before creating Venmo instance");
12041
12158
  try {
12042
- return this.venmoInstance = yield vu.create(j({
12159
+ return this.venmoInstance = yield Cu.create(j({
12043
12160
  client: this.client,
12044
12161
  allowDesktop: !0,
12045
12162
  mobileWebFallBack: !0,
@@ -12074,18 +12191,18 @@ class gu {
12074
12191
  });
12075
12192
  }
12076
12193
  }
12077
- class yu {
12194
+ class wu {
12078
12195
  constructor() {
12079
- b(this, "ev", new Fi());
12080
- b(this, "paypal", new du());
12081
- b(this, "braintree", new gu());
12196
+ b(this, "ev", new ji());
12197
+ b(this, "paypal", new vu());
12198
+ b(this, "braintree", new Au());
12082
12199
  b(this, "state", {
12083
- translate: new Jd(),
12084
- checkout: new md(),
12085
- transaction: new gd(),
12086
- styles: new vd()
12200
+ translate: new au(),
12201
+ checkout: new yd(),
12202
+ transaction: new _d(),
12203
+ styles: new Ed()
12087
12204
  });
12088
- b(this, "checkout", new pd({
12205
+ b(this, "checkout", new vd({
12089
12206
  state: this.state,
12090
12207
  service: { ev: this.ev, paypal: this.paypal, braintree: this.braintree }
12091
12208
  }));
@@ -12094,10 +12211,10 @@ class yu {
12094
12211
  Object.values(this.state).forEach((t) => t.clearState());
12095
12212
  }
12096
12213
  }
12097
- class Cu {
12214
+ class Nu {
12098
12215
  constructor(t) {
12099
12216
  b(this, "parent");
12100
- b(this, "core", new yu());
12217
+ b(this, "core", new wu());
12101
12218
  this.parent = t;
12102
12219
  }
12103
12220
  mount(t) {
@@ -12113,7 +12230,7 @@ class Cu {
12113
12230
  }
12114
12231
  }
12115
12232
  export {
12116
- yu as Core,
12117
- Cu as PayNextCheckout
12233
+ wu as Core,
12234
+ Nu as PayNextCheckout
12118
12235
  };
12119
12236
  //# sourceMappingURL=index.es.js.map