@fluid-app/fluid-cli-theme-dev 0.1.386 → 0.1.387
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/dist-cli-preview/.vite/manifest.json +24 -24
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{MediaScreen-B10m1cr8.js → MediaScreen-CrN8I-QZ.js} +1 -1
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-Dfh8Yo-E.js → MemberShareablesScreen-BZ8SD2gY.js} +1 -1
- package/dist/dist-cli-preview/chunks/{PlaylistsScreen-Dr1rTRvR.js → PlaylistsScreen-CgeuPfmU.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ProfileScreen-Dyj4Hbtb.js → ProfileScreen-4SKueONT.js} +1 -1
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DsglGUJa.js → SubscriptionsScreen-z4X9iXWa.js} +1 -1
- package/dist/dist-cli-preview/chunks/{cli-preview-BzlIe8s8.js → cli-preview-SH9j9JiW.js} +7 -7
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-CaeBIkLa.js → create-card-entry-container-BeZ1GZwt.js} +560 -543
- package/dist/dist-cli-preview/chunks/{mount-account-screen-DV2sGDq3.js → mount-account-screen-DsB9Cfc4.js} +2 -2
- package/dist/dist-cli-preview/chunks/{navigate-account-screen--r1hXS1k.js → navigate-account-screen-DW2zIQE2.js} +1 -1
- package/dist/dist-cli-preview/chunks/{profile-DCyL4A4m.js → profile-BNrVauGQ.js} +1 -1
- package/dist/dist-cli-preview/chunks/{subscriptions-WfOado8W.js → subscriptions-BFJVoM4l.js} +1 -1
- package/package.json +2 -2
|
@@ -9,13 +9,13 @@ import { u as fe, M as Vr, k as wl, C as $t, R as Ve, j as tt, o as Ft, d as Tt,
|
|
|
9
9
|
import { u as lt, r as pn, p as In, d as go, n as vn, i as gn, e as yn, I as Bn, R as d1, b as rn, P as Rn, g as yo } from "./MemberManagementProviders-BuH1Tx92.js";
|
|
10
10
|
import { u as xo } from "./useInfiniteQuery-pbRaLvNe.js";
|
|
11
11
|
import { u as qr } from "./countries-api-adapter-39yd7wyu.js";
|
|
12
|
-
import { B as c1, a as u1, b as pr, c as m1, d as
|
|
12
|
+
import { B as c1, a as u1, b as pr, c as m1, d as _o, e as bo } from "./Breadcrumb-DLYQ2Vr1.js";
|
|
13
13
|
import { E as El, D as h1, a as f1, b as p1, c as kt, i as $l, P as Vn, g as qn, h as Un, M as wo, C as v1 } from "./MobileActionSheet-k67c8wJk.js";
|
|
14
14
|
import { u as mt, a as Eo } from "./sidebar-D8LwwiTr.js";
|
|
15
15
|
import { T as $o, C as Ur, P as g1, a as Fo, M as zo, B as Co } from "./Textarea-DlTzkeqw.js";
|
|
16
16
|
import { a as H, P as y1, u as Mo } from "./use-store-B00K7G5q.js";
|
|
17
17
|
import { S as Gr, a as Wr, b as Kr, c as Yr, d as Qr, E as Fl } from "./Select-97UR3puI.js";
|
|
18
|
-
import { L as No, a as Pt, b as Xr, g as x1, t as ct, c as Je, m as So, d as Po, e as jo, f as Ao, s as vr, h as
|
|
18
|
+
import { L as No, a as Pt, b as Xr, g as x1, t as ct, c as Je, m as So, d as Po, e as jo, f as Ao, s as vr, h as _1, i as Ho, j as Do, k as b1, l as ko, n as zl, o as To, w as Cl, p as Lo, q as st, r as Oo } from "./isAfter-DAVNjOeD.js";
|
|
19
19
|
import { C as Io, a as Bo, b as Ro, c as Vo, d as qo, e as Uo, f as Go, g as w1, h as Wo } from "./Combobox-I60LziKt.js";
|
|
20
20
|
import { T as xn, u as Zr } from "./trash-2-f4dJpepX.js";
|
|
21
21
|
import { u as Ko } from "./use-optional-store-qUug8CSx.js";
|
|
@@ -118,7 +118,7 @@ var Jr = "ScrollArea", [E1] = Ds(Jr), [d2, ke] = E1(Jr), $1 = m.forwardRef(
|
|
|
118
118
|
dir: a,
|
|
119
119
|
scrollHideDelay: s = 600,
|
|
120
120
|
...o
|
|
121
|
-
} = e, [d, c] = m.useState(null), [u, f] = m.useState(null), [p, v] = m.useState(null), [
|
|
121
|
+
} = e, [d, c] = m.useState(null), [u, f] = m.useState(null), [p, v] = m.useState(null), [b, _] = m.useState(null), [h, x] = m.useState(null), [w, E] = m.useState(0), [z, P] = m.useState(0), [$, C] = m.useState(!1), [F, N] = m.useState(!1), k = St(n, (T) => c(T)), D = Hs(a);
|
|
122
122
|
return /* @__PURE__ */ i.jsx(
|
|
123
123
|
d2,
|
|
124
124
|
{
|
|
@@ -131,8 +131,8 @@ var Jr = "ScrollArea", [E1] = Ds(Jr), [d2, ke] = E1(Jr), $1 = m.forwardRef(
|
|
|
131
131
|
onViewportChange: f,
|
|
132
132
|
content: p,
|
|
133
133
|
onContentChange: v,
|
|
134
|
-
scrollbarX:
|
|
135
|
-
onScrollbarXChange:
|
|
134
|
+
scrollbarX: b,
|
|
135
|
+
onScrollbarXChange: _,
|
|
136
136
|
scrollbarXEnabled: $,
|
|
137
137
|
onScrollbarXEnabledChange: C,
|
|
138
138
|
scrollbarY: h,
|
|
@@ -264,8 +264,8 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
264
264
|
if (u) {
|
|
265
265
|
let p = u[f];
|
|
266
266
|
const v = () => {
|
|
267
|
-
const
|
|
268
|
-
p !==
|
|
267
|
+
const b = u[f];
|
|
268
|
+
p !== b && (c("SCROLL"), o()), p = b;
|
|
269
269
|
};
|
|
270
270
|
return u.addEventListener("scroll", v), () => u.removeEventListener("scroll", v);
|
|
271
271
|
}
|
|
@@ -308,8 +308,8 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
308
308
|
onThumbPointerUp: () => o.current = 0,
|
|
309
309
|
onThumbPointerDown: (v) => o.current = v
|
|
310
310
|
};
|
|
311
|
-
function p(v,
|
|
312
|
-
return g2(v, o.current, d,
|
|
311
|
+
function p(v, b) {
|
|
312
|
+
return g2(v, o.current, d, b);
|
|
313
313
|
}
|
|
314
314
|
return t === "horizontal" ? /* @__PURE__ */ i.jsx(
|
|
315
315
|
m2,
|
|
@@ -318,8 +318,8 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
318
318
|
ref: n,
|
|
319
319
|
onThumbPositionChange: () => {
|
|
320
320
|
if (a.viewport && s.current) {
|
|
321
|
-
const v = a.viewport.scrollLeft,
|
|
322
|
-
s.current.style.transform = `translate3d(${
|
|
321
|
+
const v = a.viewport.scrollLeft, b = Nl(v, d, a.dir);
|
|
322
|
+
s.current.style.transform = `translate3d(${b}px, 0, 0)`;
|
|
323
323
|
}
|
|
324
324
|
},
|
|
325
325
|
onWheelScroll: (v) => {
|
|
@@ -336,8 +336,8 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
336
336
|
ref: n,
|
|
337
337
|
onThumbPositionChange: () => {
|
|
338
338
|
if (a.viewport && s.current) {
|
|
339
|
-
const v = a.viewport.scrollTop,
|
|
340
|
-
s.current.style.transform = `translate3d(0, ${
|
|
339
|
+
const v = a.viewport.scrollTop, b = Nl(v, d);
|
|
340
|
+
s.current.style.transform = `translate3d(0, ${b}px, 0)`;
|
|
341
341
|
}
|
|
342
342
|
},
|
|
343
343
|
onWheelScroll: (v) => {
|
|
@@ -380,8 +380,8 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
380
380
|
viewport: s.viewport.offsetWidth,
|
|
381
381
|
scrollbar: {
|
|
382
382
|
size: c.current.clientWidth,
|
|
383
|
-
paddingStart:
|
|
384
|
-
paddingEnd:
|
|
383
|
+
paddingStart: bn(o.paddingLeft),
|
|
384
|
+
paddingEnd: bn(o.paddingRight)
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
387
|
}
|
|
@@ -420,8 +420,8 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
420
420
|
viewport: s.viewport.offsetHeight,
|
|
421
421
|
scrollbar: {
|
|
422
422
|
size: c.current.clientHeight,
|
|
423
|
-
paddingStart:
|
|
424
|
-
paddingEnd:
|
|
423
|
+
paddingStart: bn(o.paddingTop),
|
|
424
|
+
paddingEnd: bn(o.paddingBottom)
|
|
425
425
|
}
|
|
426
426
|
});
|
|
427
427
|
}
|
|
@@ -440,7 +440,7 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
440
440
|
onWheelScroll: f,
|
|
441
441
|
onResize: p,
|
|
442
442
|
...v
|
|
443
|
-
} = e,
|
|
443
|
+
} = e, b = ke(Ke, t), [_, h] = m.useState(null), x = St(n, (k) => h(k)), w = m.useRef(null), E = m.useRef(""), z = b.viewport, P = r.content - r.viewport, $ = it(f), C = it(c), F = Wn(p, 10);
|
|
444
444
|
function N(k) {
|
|
445
445
|
if (w.current) {
|
|
446
446
|
const D = k.clientX - w.current.left, T = k.clientY - w.current.top;
|
|
@@ -450,14 +450,14 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
450
450
|
return m.useEffect(() => {
|
|
451
451
|
const k = (D) => {
|
|
452
452
|
const T = D.target;
|
|
453
|
-
|
|
453
|
+
_?.contains(T) && $(D, P);
|
|
454
454
|
};
|
|
455
455
|
return document.addEventListener("wheel", k, { passive: !1 }), () => document.removeEventListener("wheel", k, { passive: !1 });
|
|
456
|
-
}, [z,
|
|
456
|
+
}, [z, _, P, $]), m.useEffect(C, [r, C]), zt(_, F), zt(b.content, F), /* @__PURE__ */ i.jsx(
|
|
457
457
|
f2,
|
|
458
458
|
{
|
|
459
459
|
scope: t,
|
|
460
|
-
scrollbar:
|
|
460
|
+
scrollbar: _,
|
|
461
461
|
hasThumb: a,
|
|
462
462
|
onThumbChange: it(s),
|
|
463
463
|
onThumbPointerUp: it(o),
|
|
@@ -470,25 +470,25 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
470
470
|
ref: x,
|
|
471
471
|
style: { position: "absolute", ...v.style },
|
|
472
472
|
onPointerDown: ot(e.onPointerDown, (k) => {
|
|
473
|
-
k.button === 0 && (k.target.setPointerCapture(k.pointerId), w.current =
|
|
473
|
+
k.button === 0 && (k.target.setPointerCapture(k.pointerId), w.current = _.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", b.viewport && (b.viewport.style.scrollBehavior = "auto"), N(k));
|
|
474
474
|
}),
|
|
475
475
|
onPointerMove: ot(e.onPointerMove, N),
|
|
476
476
|
onPointerUp: ot(e.onPointerUp, (k) => {
|
|
477
477
|
const D = k.target;
|
|
478
|
-
D.hasPointerCapture(k.pointerId) && D.releasePointerCapture(k.pointerId), document.body.style.webkitUserSelect = E.current,
|
|
478
|
+
D.hasPointerCapture(k.pointerId) && D.releasePointerCapture(k.pointerId), document.body.style.webkitUserSelect = E.current, b.viewport && (b.viewport.style.scrollBehavior = ""), w.current = null;
|
|
479
479
|
})
|
|
480
480
|
}
|
|
481
481
|
)
|
|
482
482
|
}
|
|
483
483
|
);
|
|
484
|
-
}),
|
|
484
|
+
}), _n = "ScrollAreaThumb", P1 = m.forwardRef(
|
|
485
485
|
(e, n) => {
|
|
486
|
-
const { forceMount: t, ...r } = e, a = N1(
|
|
486
|
+
const { forceMount: t, ...r } = e, a = N1(_n, e.__scopeScrollArea);
|
|
487
487
|
return /* @__PURE__ */ i.jsx(Ln, { present: t || a.hasThumb, children: /* @__PURE__ */ i.jsx(p2, { ref: n, ...r }) });
|
|
488
488
|
}
|
|
489
489
|
), p2 = m.forwardRef(
|
|
490
490
|
(e, n) => {
|
|
491
|
-
const { __scopeScrollArea: t, style: r, ...a } = e, s = ke(
|
|
491
|
+
const { __scopeScrollArea: t, style: r, ...a } = e, s = ke(_n, t), o = N1(_n, t), { onThumbPositionChange: d } = o, c = St(
|
|
492
492
|
n,
|
|
493
493
|
(p) => o.onThumbChange(p)
|
|
494
494
|
), u = m.useRef(void 0), f = Wn(() => {
|
|
@@ -499,8 +499,8 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
499
499
|
if (p) {
|
|
500
500
|
const v = () => {
|
|
501
501
|
if (f(), !u.current) {
|
|
502
|
-
const
|
|
503
|
-
u.current =
|
|
502
|
+
const b = y2(p, d);
|
|
503
|
+
u.current = b, d();
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
506
|
return d(), p.addEventListener("scroll", v), () => p.removeEventListener("scroll", v);
|
|
@@ -517,15 +517,15 @@ var c2 = m.forwardRef((e, n) => {
|
|
|
517
517
|
...r
|
|
518
518
|
},
|
|
519
519
|
onPointerDownCapture: ot(e.onPointerDownCapture, (p) => {
|
|
520
|
-
const
|
|
521
|
-
o.onThumbPointerDown({ x:
|
|
520
|
+
const b = p.target.getBoundingClientRect(), _ = p.clientX - b.left, h = p.clientY - b.top;
|
|
521
|
+
o.onThumbPointerDown({ x: _, y: h });
|
|
522
522
|
}),
|
|
523
523
|
onPointerUp: ot(e.onPointerUp, o.onThumbPointerUp)
|
|
524
524
|
}
|
|
525
525
|
);
|
|
526
526
|
}
|
|
527
527
|
);
|
|
528
|
-
P1.displayName =
|
|
528
|
+
P1.displayName = _n;
|
|
529
529
|
var tl = "ScrollAreaCorner", j1 = m.forwardRef(
|
|
530
530
|
(e, n) => {
|
|
531
531
|
const t = ke(tl, e.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
@@ -558,7 +558,7 @@ var v2 = m.forwardRef((e, n) => {
|
|
|
558
558
|
}
|
|
559
559
|
) : null;
|
|
560
560
|
});
|
|
561
|
-
function
|
|
561
|
+
function bn(e) {
|
|
562
562
|
return e ? parseInt(e, 10) : 0;
|
|
563
563
|
}
|
|
564
564
|
function A1(e, n) {
|
|
@@ -615,7 +615,7 @@ function zt(e, n) {
|
|
|
615
615
|
}
|
|
616
616
|
}, [e, t]);
|
|
617
617
|
}
|
|
618
|
-
var x2 = $1,
|
|
618
|
+
var x2 = $1, _2 = z1, b2 = j1;
|
|
619
619
|
function w2({
|
|
620
620
|
className: e,
|
|
621
621
|
children: n,
|
|
@@ -629,7 +629,7 @@ function w2({
|
|
|
629
629
|
...t,
|
|
630
630
|
children: [
|
|
631
631
|
/* @__PURE__ */ i.jsx(
|
|
632
|
-
|
|
632
|
+
_2,
|
|
633
633
|
{
|
|
634
634
|
"data-slot": "scroll-area-viewport",
|
|
635
635
|
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
@@ -637,7 +637,7 @@ function w2({
|
|
|
637
637
|
}
|
|
638
638
|
),
|
|
639
639
|
/* @__PURE__ */ i.jsx(E2, {}),
|
|
640
|
-
/* @__PURE__ */ i.jsx(
|
|
640
|
+
/* @__PURE__ */ i.jsx(b2, {})
|
|
641
641
|
]
|
|
642
642
|
}
|
|
643
643
|
);
|
|
@@ -866,19 +866,19 @@ function I1({
|
|
|
866
866
|
enabled: u?.phase === "pending",
|
|
867
867
|
refetchInterval: u?.phase === "pending" ? L2 : !1,
|
|
868
868
|
refetchIntervalInBackground: !0
|
|
869
|
-
}), v = p?.subscription.status,
|
|
869
|
+
}), v = p?.subscription.status, b = p?.subscription.last_failed_at, _ = m.useRef({
|
|
870
870
|
subscriptionToken: e,
|
|
871
|
-
lastFailedAt:
|
|
871
|
+
lastFailedAt: b ?? null
|
|
872
872
|
});
|
|
873
|
-
return
|
|
873
|
+
return _.current = {
|
|
874
874
|
subscriptionToken: e,
|
|
875
|
-
lastFailedAt:
|
|
875
|
+
lastFailedAt: b ?? null
|
|
876
876
|
}, m.useEffect(() => {
|
|
877
877
|
if (u?.phase !== "pending" || v === void 0)
|
|
878
878
|
return;
|
|
879
879
|
const h = T2({
|
|
880
880
|
status: v,
|
|
881
|
-
lastFailedAt:
|
|
881
|
+
lastFailedAt: b ?? null,
|
|
882
882
|
baselineLastFailedAt: u.baselineLastFailedAt
|
|
883
883
|
});
|
|
884
884
|
if (c.current === u.subscriptionToken)
|
|
@@ -891,7 +891,7 @@ function I1({
|
|
|
891
891
|
};
|
|
892
892
|
d.current = x, o(x), f.current.onFailed?.();
|
|
893
893
|
} else h === "ended" && (d.current = null, o(null));
|
|
894
|
-
}, [u, v,
|
|
894
|
+
}, [u, v, b]), m.useEffect(() => {
|
|
895
895
|
if (u?.phase !== "pending") return;
|
|
896
896
|
const h = u.subscriptionToken, x = setTimeout(() => {
|
|
897
897
|
const w = Sl(
|
|
@@ -903,7 +903,7 @@ function I1({
|
|
|
903
903
|
return () => clearTimeout(x);
|
|
904
904
|
}, [u]), {
|
|
905
905
|
start: () => {
|
|
906
|
-
const h = c.current, x =
|
|
906
|
+
const h = c.current, x = _.current, w = I2(
|
|
907
907
|
h,
|
|
908
908
|
x.subscriptionToken === h ? x.lastFailedAt : null
|
|
909
909
|
);
|
|
@@ -1277,8 +1277,8 @@ function jl(e) {
|
|
|
1277
1277
|
const [, t, r, a, s, o, d] = n, c = n[8];
|
|
1278
1278
|
if (t == null || r == null || a == null || s == null || o == null || d == null || c == null)
|
|
1279
1279
|
return null;
|
|
1280
|
-
const u = Number(t), f = Number(r), p = Number(a), v = Number(s),
|
|
1281
|
-
if (f < 1 || f > 12 || p < 1 || p > rd(u, f) || v > 23 ||
|
|
1280
|
+
const u = Number(t), f = Number(r), p = Number(a), v = Number(s), b = Number(o), _ = Number(d);
|
|
1281
|
+
if (f < 1 || f > 12 || p < 1 || p > rd(u, f) || v > 23 || b > 59 || _ > 59 || !ld(c))
|
|
1282
1282
|
return null;
|
|
1283
1283
|
const h = new Date(e);
|
|
1284
1284
|
return Number.isNaN(h.getTime()) ? null : h;
|
|
@@ -1816,7 +1816,7 @@ function vd(e) {
|
|
|
1816
1816
|
}
|
|
1817
1817
|
};
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function E_({
|
|
1820
1820
|
children: e
|
|
1821
1821
|
}) {
|
|
1822
1822
|
const n = l1(), t = m.useMemo(() => fd(n), [n]), r = m.useMemo(
|
|
@@ -1884,13 +1884,13 @@ function xd(e) {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
};
|
|
1886
1886
|
}
|
|
1887
|
-
function $
|
|
1887
|
+
function $_({
|
|
1888
1888
|
children: e
|
|
1889
1889
|
}) {
|
|
1890
1890
|
const n = l1(), t = m.useMemo(() => xd(n), [n]);
|
|
1891
1891
|
return /* @__PURE__ */ i.jsx(N2, { api: t, children: e });
|
|
1892
1892
|
}
|
|
1893
|
-
const
|
|
1893
|
+
const _d = {
|
|
1894
1894
|
// Breadcrumbs & navigation
|
|
1895
1895
|
breadcrumb: "Subscriptions",
|
|
1896
1896
|
breadcrumb_detail: "Subscription #{{token}}",
|
|
@@ -2247,6 +2247,23 @@ const bd = {
|
|
|
2247
2247
|
past_due_retry_when_shortly: "shortly",
|
|
2248
2248
|
past_due_retry_when_few_hours: "in the next few hours",
|
|
2249
2249
|
past_due_retry_when_within_day: "within a day",
|
|
2250
|
+
// Milestone items (Subscription Pro). The server sends each occurrence as
|
|
2251
|
+
// a structure and each price formatted, so these only word them.
|
|
2252
|
+
milestones_section: "Milestone items",
|
|
2253
|
+
milestones_heading: "Coming with your next order",
|
|
2254
|
+
milestones_free: "Free",
|
|
2255
|
+
milestones_item_times_quantity: "{{name}} × {{n}}",
|
|
2256
|
+
milestones_first_order: "First order",
|
|
2257
|
+
milestones_order_number: "Order {{order}}",
|
|
2258
|
+
milestones_years_anniversary: "{{count}}-year anniversary",
|
|
2259
|
+
milestones_months_anniversary: "{{count}}-month anniversary",
|
|
2260
|
+
milestones_one_time_item: "One-time item",
|
|
2261
|
+
milestones_next_milestone: "Next milestone:",
|
|
2262
|
+
milestones_next_items: "{{occurrence}} brings {{items}}.",
|
|
2263
|
+
milestones_orders_to_go_singular: "1 more order to go.",
|
|
2264
|
+
milestones_orders_to_go_plural: "{{count}} more orders to go.",
|
|
2265
|
+
milestones_months_to_go_singular: "1 more month to go.",
|
|
2266
|
+
milestones_months_to_go_plural: "{{count}} more months to go.",
|
|
2250
2267
|
// Autoship profile card (shared by the checkout and portal hosts)
|
|
2251
2268
|
profile_heading: "Your autoship",
|
|
2252
2269
|
profile_actions_label: "Autoship actions",
|
|
@@ -2338,8 +2355,8 @@ const bd = {
|
|
|
2338
2355
|
// Misc fallbacks
|
|
2339
2356
|
a_future_date: "a future date",
|
|
2340
2357
|
loading_ellipsis: "..."
|
|
2341
|
-
},
|
|
2342
|
-
fallback:
|
|
2358
|
+
}, bd = co({
|
|
2359
|
+
fallback: _d,
|
|
2343
2360
|
loaders: {
|
|
2344
2361
|
ar: () => import("./ar-DEUMqcX3.js").then(
|
|
2345
2362
|
(e) => e.default
|
|
@@ -2449,10 +2466,10 @@ function wd(e, n) {
|
|
|
2449
2466
|
return oo(e, n);
|
|
2450
2467
|
}
|
|
2451
2468
|
const { Provider: Ed, useTranslation: $d } = uo("Subscriptions"), Fd = Ed, se = $d;
|
|
2452
|
-
function
|
|
2469
|
+
function F_({
|
|
2453
2470
|
children: e
|
|
2454
2471
|
}) {
|
|
2455
|
-
const { locale: n } = On(), t = mo(
|
|
2472
|
+
const { locale: n } = On(), t = mo(bd, n), r = m.useMemo(
|
|
2456
2473
|
() => wd(n, t),
|
|
2457
2474
|
[n, t]
|
|
2458
2475
|
);
|
|
@@ -2545,10 +2562,10 @@ function Y1() {
|
|
|
2545
2562
|
(u, f) => {
|
|
2546
2563
|
n(u);
|
|
2547
2564
|
const p = ++o.current, v = u === "US" ? lr : [];
|
|
2548
|
-
f ? (r(v), s(null), f(u).then((
|
|
2549
|
-
p === o.current && (r(
|
|
2550
|
-
}).catch((
|
|
2551
|
-
p === o.current && (console.error("Failed to fetch states:",
|
|
2565
|
+
f ? (r(v), s(null), f(u).then((b) => {
|
|
2566
|
+
p === o.current && (r(b.length > 0 ? b : v), s(u));
|
|
2567
|
+
}).catch((b) => {
|
|
2568
|
+
p === o.current && (console.error("Failed to fetch states:", b), r(v), s(u));
|
|
2552
2569
|
})) : (r(u === "US" ? lr : []), s(u));
|
|
2553
2570
|
},
|
|
2554
2571
|
[]
|
|
@@ -2572,7 +2589,7 @@ function Q1({
|
|
|
2572
2589
|
disabled: d = !1,
|
|
2573
2590
|
presentation: c = "dialog"
|
|
2574
2591
|
}) {
|
|
2575
|
-
const { t: u } = lt(), [f, p] = m.useState(!1), v = r ?? u("edit"),
|
|
2592
|
+
const { t: u } = lt(), [f, p] = m.useState(!1), v = r ?? u("edit"), b = a ?? u("delete"), _ = s ?? u("make_default"), h = o ?? v;
|
|
2576
2593
|
if (c === "bottom-sheet") {
|
|
2577
2594
|
const x = (w) => {
|
|
2578
2595
|
p(!1), w();
|
|
@@ -2617,7 +2634,7 @@ function Q1({
|
|
|
2617
2634
|
onClick: () => x(t),
|
|
2618
2635
|
children: [
|
|
2619
2636
|
/* @__PURE__ */ i.jsx($t, { className: "size-4" }),
|
|
2620
|
-
|
|
2637
|
+
_
|
|
2621
2638
|
]
|
|
2622
2639
|
}
|
|
2623
2640
|
),
|
|
@@ -2630,7 +2647,7 @@ function Q1({
|
|
|
2630
2647
|
onClick: () => x(e),
|
|
2631
2648
|
children: [
|
|
2632
2649
|
/* @__PURE__ */ i.jsx(xn, { className: "size-4" }),
|
|
2633
|
-
|
|
2650
|
+
b
|
|
2634
2651
|
]
|
|
2635
2652
|
}
|
|
2636
2653
|
)
|
|
@@ -2676,7 +2693,7 @@ function Q1({
|
|
|
2676
2693
|
},
|
|
2677
2694
|
children: [
|
|
2678
2695
|
/* @__PURE__ */ i.jsx($t, { className: "size-3.5 shrink-0" }),
|
|
2679
|
-
/* @__PURE__ */ i.jsx("span", { children:
|
|
2696
|
+
/* @__PURE__ */ i.jsx("span", { children: _ })
|
|
2680
2697
|
]
|
|
2681
2698
|
}
|
|
2682
2699
|
),
|
|
@@ -2691,7 +2708,7 @@ function Q1({
|
|
|
2691
2708
|
},
|
|
2692
2709
|
children: [
|
|
2693
2710
|
/* @__PURE__ */ i.jsx(xn, { className: "size-3.5 shrink-0" }),
|
|
2694
|
-
/* @__PURE__ */ i.jsx("span", { children:
|
|
2711
|
+
/* @__PURE__ */ i.jsx("span", { children: b })
|
|
2695
2712
|
]
|
|
2696
2713
|
}
|
|
2697
2714
|
)
|
|
@@ -2773,7 +2790,7 @@ function Pd({
|
|
|
2773
2790
|
o && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-sm", children: o.message })
|
|
2774
2791
|
] });
|
|
2775
2792
|
}
|
|
2776
|
-
function
|
|
2793
|
+
function z_({
|
|
2777
2794
|
control: e,
|
|
2778
2795
|
name: n,
|
|
2779
2796
|
label: t,
|
|
@@ -2957,8 +2974,8 @@ function ei({
|
|
|
2957
2974
|
disabled: p,
|
|
2958
2975
|
inputClassName: v
|
|
2959
2976
|
}) {
|
|
2960
|
-
const
|
|
2961
|
-
field:
|
|
2977
|
+
const b = jd(), {
|
|
2978
|
+
field: _,
|
|
2962
2979
|
fieldState: { error: h }
|
|
2963
2980
|
} = tn({ name: r, control: e }), [x, w] = m.useState(
|
|
2964
2981
|
[]
|
|
@@ -2979,10 +2996,10 @@ function ei({
|
|
|
2979
2996
|
), m.useEffect(() => {
|
|
2980
2997
|
N.current !== null && (clearTimeout(N.current), N.current = null), F.current += 1, w([]), z(!1), $(!1);
|
|
2981
2998
|
}, [t]), m.useEffect(() => {
|
|
2982
|
-
|
|
2999
|
+
b || console.warn(
|
|
2983
3000
|
"AddressAutocompleteInput: no AddressAutocompleteApiProvider found — address suggestions are disabled."
|
|
2984
3001
|
);
|
|
2985
|
-
}, [
|
|
3002
|
+
}, [b]);
|
|
2986
3003
|
const T = m.useCallback(
|
|
2987
3004
|
(I) => {
|
|
2988
3005
|
n(
|
|
@@ -3010,7 +3027,7 @@ function ei({
|
|
|
3010
3027
|
), B = m.useCallback(
|
|
3011
3028
|
(I) => {
|
|
3012
3029
|
const j = I.target.value;
|
|
3013
|
-
if (
|
|
3030
|
+
if (_.onChange(j), !b) return;
|
|
3014
3031
|
if (N.current !== null && (clearTimeout(N.current), N.current = null), j.length < 1) {
|
|
3015
3032
|
z(!1), $(!1), w([]);
|
|
3016
3033
|
return;
|
|
@@ -3022,12 +3039,12 @@ function ei({
|
|
|
3022
3039
|
$(!1);
|
|
3023
3040
|
const K = ++F.current;
|
|
3024
3041
|
N.current = setTimeout(() => {
|
|
3025
|
-
N.current = null,
|
|
3042
|
+
N.current = null, b.fetchSuggestions({ query: j, countryIso: t }).then((U) => {
|
|
3026
3043
|
K === F.current && (w(U), z(!0));
|
|
3027
3044
|
});
|
|
3028
3045
|
}, Td);
|
|
3029
3046
|
},
|
|
3030
|
-
[
|
|
3047
|
+
[b, t, _, k]
|
|
3031
3048
|
), G = m.useCallback(
|
|
3032
3049
|
async (I) => {
|
|
3033
3050
|
N.current !== null && (clearTimeout(N.current), N.current = null);
|
|
@@ -3041,8 +3058,8 @@ function ei({
|
|
|
3041
3058
|
}), z(!1);
|
|
3042
3059
|
return;
|
|
3043
3060
|
}
|
|
3044
|
-
if (!
|
|
3045
|
-
const { details: K, drilldownSuggestions: U } = await
|
|
3061
|
+
if (!b) return;
|
|
3062
|
+
const { details: K, drilldownSuggestions: U } = await b.fetchDetails({
|
|
3046
3063
|
suggestion: I,
|
|
3047
3064
|
countryIso: t
|
|
3048
3065
|
});
|
|
@@ -3054,7 +3071,7 @@ function ei({
|
|
|
3054
3071
|
w(U), z(!0);
|
|
3055
3072
|
}
|
|
3056
3073
|
},
|
|
3057
|
-
[
|
|
3074
|
+
[b, t, T]
|
|
3058
3075
|
);
|
|
3059
3076
|
return /* @__PURE__ */ i.jsxs("div", { className: "space-y-1", children: [
|
|
3060
3077
|
u && /* @__PURE__ */ i.jsx($e, { htmlFor: D, className: "mb-1.5 block text-sm font-medium", children: u }),
|
|
@@ -3065,10 +3082,10 @@ function ei({
|
|
|
3065
3082
|
id: D,
|
|
3066
3083
|
className: v,
|
|
3067
3084
|
type: "text",
|
|
3068
|
-
ref:
|
|
3069
|
-
value:
|
|
3085
|
+
ref: _.ref,
|
|
3086
|
+
value: _.value ?? "",
|
|
3070
3087
|
onChange: B,
|
|
3071
|
-
onBlur:
|
|
3088
|
+
onBlur: _.onBlur,
|
|
3072
3089
|
placeholder: f,
|
|
3073
3090
|
disabled: p,
|
|
3074
3091
|
"aria-invalid": !!h
|
|
@@ -3225,17 +3242,17 @@ function Ud({
|
|
|
3225
3242
|
isDeleting: p = !1,
|
|
3226
3243
|
presentation: v = "dialog"
|
|
3227
3244
|
}) {
|
|
3228
|
-
const { t:
|
|
3245
|
+
const { t: b } = lt(), [_, h] = m.useState(!1);
|
|
3229
3246
|
m.useEffect(() => {
|
|
3230
3247
|
e || h(!1);
|
|
3231
3248
|
}, [e]), m.useEffect(() => {
|
|
3232
|
-
if (!
|
|
3249
|
+
if (!_) return;
|
|
3233
3250
|
const q = setTimeout(() => h(!1), 3e3);
|
|
3234
3251
|
return () => clearTimeout(q);
|
|
3235
|
-
}, [
|
|
3252
|
+
}, [_]);
|
|
3236
3253
|
const x = m.useMemo(
|
|
3237
|
-
() => Vd((q) =>
|
|
3238
|
-
[
|
|
3254
|
+
() => Vd((q) => b(q)),
|
|
3255
|
+
[b]
|
|
3239
3256
|
), { control: w, handleSubmit: E, reset: z, setValue: P, setError: $, clearErrors: C } = Zr(x, {
|
|
3240
3257
|
defaultValues: {
|
|
3241
3258
|
billing_address: {
|
|
@@ -3310,7 +3327,7 @@ function Ud({
|
|
|
3310
3327
|
regionKey: D?.regionLabel,
|
|
3311
3328
|
postalKey: D?.postalLabel
|
|
3312
3329
|
});
|
|
3313
|
-
return R.label ??
|
|
3330
|
+
return R.label ?? b(R.translationKey ?? q);
|
|
3314
3331
|
}, ge = {
|
|
3315
3332
|
name: "name_is_required",
|
|
3316
3333
|
address1: "address_line_1_is_required",
|
|
@@ -3327,15 +3344,15 @@ function Ud({
|
|
|
3327
3344
|
const A = ge[X];
|
|
3328
3345
|
A && $(Ol(X), {
|
|
3329
3346
|
type: "manual",
|
|
3330
|
-
message:
|
|
3347
|
+
message: b(A)
|
|
3331
3348
|
});
|
|
3332
3349
|
}
|
|
3333
3350
|
return;
|
|
3334
3351
|
}
|
|
3335
3352
|
a(q);
|
|
3336
|
-
}), Ne = m.useMemo(() =>
|
|
3353
|
+
}), Ne = m.useMemo(() => b(p ? "deleting" : _ ? "tap_to_confirm" : "delete_card"), [p, _, b]);
|
|
3337
3354
|
if (!n) return null;
|
|
3338
|
-
const { details: ze } = n, Fe = gt(n,
|
|
3355
|
+
const { details: ze } = n, Fe = gt(n, b("card_fallback")), De = ze.exp_month, Ce = ze.exp_year, Pe = (q) => {
|
|
3339
3356
|
const R = W(q);
|
|
3340
3357
|
return q === "address1" ? /* @__PURE__ */ i.jsx(
|
|
3341
3358
|
ei,
|
|
@@ -3359,7 +3376,7 @@ function Ud({
|
|
|
3359
3376
|
name: "billing_address.state",
|
|
3360
3377
|
label: R,
|
|
3361
3378
|
options: G,
|
|
3362
|
-
placeholder:
|
|
3379
|
+
placeholder: b("select_state")
|
|
3363
3380
|
},
|
|
3364
3381
|
q
|
|
3365
3382
|
) : /* @__PURE__ */ i.jsx(
|
|
@@ -3377,7 +3394,7 @@ function Ud({
|
|
|
3377
3394
|
{
|
|
3378
3395
|
open: e,
|
|
3379
3396
|
onOpenChange: (q) => !q && r(),
|
|
3380
|
-
title:
|
|
3397
|
+
title: b("edit_card"),
|
|
3381
3398
|
presentation: v,
|
|
3382
3399
|
children: [
|
|
3383
3400
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -3393,7 +3410,7 @@ function Ud({
|
|
|
3393
3410
|
/* @__PURE__ */ i.jsxs("div", { className: "flex flex-col", children: [
|
|
3394
3411
|
/* @__PURE__ */ i.jsx("span", { className: "text-foreground text-sm font-medium", children: Fe }),
|
|
3395
3412
|
De != null && Ce != null && /* @__PURE__ */ i.jsxs("span", { className: "text-muted-foreground text-sm", children: [
|
|
3396
|
-
|
|
3413
|
+
b("card_expires"),
|
|
3397
3414
|
" ",
|
|
3398
3415
|
De,
|
|
3399
3416
|
"/",
|
|
@@ -3402,16 +3419,16 @@ function Ud({
|
|
|
3402
3419
|
] })
|
|
3403
3420
|
] }) }),
|
|
3404
3421
|
/* @__PURE__ */ i.jsxs("div", { children: [
|
|
3405
|
-
/* @__PURE__ */ i.jsx("h3", { className: "text-foreground mb-3 text-sm font-medium", children:
|
|
3422
|
+
/* @__PURE__ */ i.jsx("h3", { className: "text-foreground mb-3 text-sm font-medium", children: b("billing_address") }),
|
|
3406
3423
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-3", children: [
|
|
3407
3424
|
/* @__PURE__ */ i.jsx(
|
|
3408
3425
|
Dl,
|
|
3409
3426
|
{
|
|
3410
3427
|
control: w,
|
|
3411
3428
|
name: "billing_address.country_code",
|
|
3412
|
-
label:
|
|
3429
|
+
label: b("country"),
|
|
3413
3430
|
options: B,
|
|
3414
|
-
placeholder:
|
|
3431
|
+
placeholder: b("select_an_option"),
|
|
3415
3432
|
onChange: () => {
|
|
3416
3433
|
j.current = !0, P("billing_address.state", ""), C("billing_address.state");
|
|
3417
3434
|
}
|
|
@@ -3445,7 +3462,7 @@ function Ud({
|
|
|
3445
3462
|
onCheckedChange: (R) => q.onChange(R === !0)
|
|
3446
3463
|
}
|
|
3447
3464
|
),
|
|
3448
|
-
/* @__PURE__ */ i.jsx($e, { htmlFor: "set_as_default", className: "text-sm font-normal", children:
|
|
3465
|
+
/* @__PURE__ */ i.jsx($e, { htmlFor: "set_as_default", className: "text-sm font-normal", children: b("set_as_default_payment_method") })
|
|
3449
3466
|
] })
|
|
3450
3467
|
}
|
|
3451
3468
|
),
|
|
@@ -3457,7 +3474,7 @@ function Ud({
|
|
|
3457
3474
|
type: "button",
|
|
3458
3475
|
variant: "ghost",
|
|
3459
3476
|
onClick: () => {
|
|
3460
|
-
|
|
3477
|
+
_ ? f() : h(!0);
|
|
3461
3478
|
},
|
|
3462
3479
|
disabled: s || p,
|
|
3463
3480
|
className: "text-destructive hover:bg-destructive/10 hover:text-destructive",
|
|
@@ -3475,7 +3492,7 @@ function Ud({
|
|
|
3475
3492
|
variant: "secondary",
|
|
3476
3493
|
onClick: r,
|
|
3477
3494
|
disabled: s || p,
|
|
3478
|
-
children:
|
|
3495
|
+
children: b("cancel")
|
|
3479
3496
|
}
|
|
3480
3497
|
),
|
|
3481
3498
|
/* @__PURE__ */ i.jsxs(
|
|
@@ -3486,7 +3503,7 @@ function Ud({
|
|
|
3486
3503
|
disabled: s || p || !ee,
|
|
3487
3504
|
children: [
|
|
3488
3505
|
s && /* @__PURE__ */ i.jsx("div", { className: "mr-2 size-4 animate-spin rounded-full border-2 border-current/30 border-t-current" }),
|
|
3489
|
-
|
|
3506
|
+
b(s ? "saving" : "save_changes")
|
|
3490
3507
|
]
|
|
3491
3508
|
}
|
|
3492
3509
|
)
|
|
@@ -3581,8 +3598,8 @@ function Il({
|
|
|
3581
3598
|
{
|
|
3582
3599
|
options: u,
|
|
3583
3600
|
value: p?.toString() ?? "",
|
|
3584
|
-
onValueChange: (
|
|
3585
|
-
f(
|
|
3601
|
+
onValueChange: (b) => {
|
|
3602
|
+
f(b), c?.(b);
|
|
3586
3603
|
},
|
|
3587
3604
|
placeholder: r,
|
|
3588
3605
|
emptyText: a,
|
|
@@ -3819,7 +3836,7 @@ function dc() {
|
|
|
3819
3836
|
}
|
|
3820
3837
|
var cc = /Android/i;
|
|
3821
3838
|
function uc(e, n, t, r, a) {
|
|
3822
|
-
|
|
3839
|
+
_r(n, t, r, void 0, a);
|
|
3823
3840
|
}
|
|
3824
3841
|
function mc(e, n, t, r, a) {
|
|
3825
3842
|
if (!ac(n)) {
|
|
@@ -3829,7 +3846,7 @@ function mc(e, n, t, r, a) {
|
|
|
3829
3846
|
case "Backspace":
|
|
3830
3847
|
e.preventDefault();
|
|
3831
3848
|
var o = ic(n);
|
|
3832
|
-
return o ? (hc(n, o),
|
|
3849
|
+
return o ? (hc(n, o), _r(n, t, r, void 0, a)) : _r(n, t, r, s, a);
|
|
3833
3850
|
}
|
|
3834
3851
|
}
|
|
3835
3852
|
}
|
|
@@ -3837,7 +3854,7 @@ function hc(e, n) {
|
|
|
3837
3854
|
var t = e.value;
|
|
3838
3855
|
t = t.slice(0, n.start) + t.slice(n.end), e.value = t, oi(e, n.start);
|
|
3839
3856
|
}
|
|
3840
|
-
function
|
|
3857
|
+
function _r(e, n, t, r, a) {
|
|
3841
3858
|
var s = Xd(e.value, oc(e), n), o = s.value, d = s.caret;
|
|
3842
3859
|
if (r) {
|
|
3843
3860
|
var c = Qd(o, d, r);
|
|
@@ -3891,15 +3908,15 @@ function gc(e, n) {
|
|
|
3891
3908
|
function yc(e) {
|
|
3892
3909
|
var n = e.ref, t = e.parse, r = e.format, a = e.value, s = e.defaultValue, o = e.controlled, d = o === void 0 ? !0 : o, c = e.onChange, u = e.onKeyDown, f = vc(e, fc), p = m.useRef(), v = m.useCallback(function(x) {
|
|
3893
3910
|
p.current = x, n && (typeof n == "function" ? n(x) : n.current = x);
|
|
3894
|
-
}, [n]),
|
|
3911
|
+
}, [n]), b = m.useCallback(function(x) {
|
|
3895
3912
|
return uc(x, p.current, t, r, c);
|
|
3896
|
-
}, [p, t, r, c]),
|
|
3913
|
+
}, [p, t, r, c]), _ = m.useCallback(function(x) {
|
|
3897
3914
|
if (u && u(x), !x.defaultPrevented)
|
|
3898
3915
|
return mc(x, p.current, t, r, c);
|
|
3899
3916
|
}, [p, t, r, c, u]), h = ht(ht({}, f), {}, {
|
|
3900
3917
|
ref: v,
|
|
3901
|
-
onChange:
|
|
3902
|
-
onKeyDown:
|
|
3918
|
+
onChange: b,
|
|
3919
|
+
onKeyDown: _
|
|
3903
3920
|
});
|
|
3904
3921
|
return d ? ht(ht({}, h), {}, {
|
|
3905
3922
|
value: r(Gl(a) ? "" : a).text
|
|
@@ -3921,18 +3938,18 @@ function Wl(e, n) {
|
|
|
3921
3938
|
}
|
|
3922
3939
|
return t;
|
|
3923
3940
|
}
|
|
3924
|
-
function
|
|
3941
|
+
function _c(e) {
|
|
3925
3942
|
for (var n = 1; n < arguments.length; n++) {
|
|
3926
3943
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
3927
3944
|
n % 2 ? Wl(Object(t), !0).forEach(function(r) {
|
|
3928
|
-
|
|
3945
|
+
bc(e, r, t[r]);
|
|
3929
3946
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Wl(Object(t)).forEach(function(r) {
|
|
3930
3947
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
3931
3948
|
});
|
|
3932
3949
|
}
|
|
3933
3950
|
return e;
|
|
3934
3951
|
}
|
|
3935
|
-
function
|
|
3952
|
+
function bc(e, n, t) {
|
|
3936
3953
|
return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
3937
3954
|
}
|
|
3938
3955
|
function wc(e, n) {
|
|
@@ -3953,7 +3970,7 @@ function Ec(e, n) {
|
|
|
3953
3970
|
return t;
|
|
3954
3971
|
}
|
|
3955
3972
|
function Cn(e, n) {
|
|
3956
|
-
var t = e.inputComponent, r = t === void 0 ? "input" : t, a = e.parse, s = e.format, o = e.value, d = e.defaultValue, c = e.onChange, u = e.controlled, f = e.onKeyDown, p = e.type, v = p === void 0 ? "text" : p,
|
|
3973
|
+
var t = e.inputComponent, r = t === void 0 ? "input" : t, a = e.parse, s = e.format, o = e.value, d = e.defaultValue, c = e.onChange, u = e.controlled, f = e.onKeyDown, p = e.type, v = p === void 0 ? "text" : p, b = wc(e, xc), _ = yc(_c({
|
|
3957
3974
|
ref: n,
|
|
3958
3975
|
parse: a,
|
|
3959
3976
|
format: s,
|
|
@@ -3963,8 +3980,8 @@ function Cn(e, n) {
|
|
|
3963
3980
|
controlled: u,
|
|
3964
3981
|
onKeyDown: f,
|
|
3965
3982
|
type: v
|
|
3966
|
-
},
|
|
3967
|
-
return /* @__PURE__ */ l.createElement(r,
|
|
3983
|
+
}, b));
|
|
3984
|
+
return /* @__PURE__ */ l.createElement(r, _);
|
|
3968
3985
|
}
|
|
3969
3986
|
Cn = /* @__PURE__ */ l.forwardRef(Cn);
|
|
3970
3987
|
Cn.propTypes = {
|
|
@@ -4039,7 +4056,7 @@ function Cc(e, n) {
|
|
|
4039
4056
|
}
|
|
4040
4057
|
return String(e);
|
|
4041
4058
|
}
|
|
4042
|
-
var Mc = "1.2.0", Nc = "1.7.35", Yl = " ext. ", Sc = /^\d+$/,
|
|
4059
|
+
var Mc = "1.2.0", Nc = "1.7.35", Yl = " ext. ", Sc = /^\d+$/, be = /* @__PURE__ */ (function() {
|
|
4043
4060
|
function e(n) {
|
|
4044
4061
|
Yn(this, e), di(n), this.metadata = n, ui.call(this, n);
|
|
4045
4062
|
}
|
|
@@ -4459,7 +4476,7 @@ var Hc = function(n) {
|
|
|
4459
4476
|
return Mt(n);
|
|
4460
4477
|
};
|
|
4461
4478
|
function nt(e, n) {
|
|
4462
|
-
if (n = new
|
|
4479
|
+
if (n = new be(n), n.hasCountry(e))
|
|
4463
4480
|
return n.selectNumberingPlan(e).countryCallingCode();
|
|
4464
4481
|
throw new Error("Unknown country: ".concat(e));
|
|
4465
4482
|
}
|
|
@@ -4474,7 +4491,7 @@ function Xn(e, n, t) {
|
|
|
4474
4491
|
return Dc(e, n, void 0, t);
|
|
4475
4492
|
}
|
|
4476
4493
|
function Dc(e, n, t, r) {
|
|
4477
|
-
n && (r = new
|
|
4494
|
+
n && (r = new be(r.metadata), r.selectNumberingPlan(n));
|
|
4478
4495
|
var a = r.type(t), s = a && a.possibleLengths() || r.possibleLengths();
|
|
4479
4496
|
if (!s)
|
|
4480
4497
|
return "IS_POSSIBLE";
|
|
@@ -4482,7 +4499,7 @@ function Dc(e, n, t, r) {
|
|
|
4482
4499
|
return d === o ? "IS_POSSIBLE" : d > o ? "TOO_SHORT" : s[s.length - 1] < o ? "TOO_LONG" : s.indexOf(o, 1) >= 0 ? "IS_POSSIBLE" : "INVALID_LENGTH";
|
|
4483
4500
|
}
|
|
4484
4501
|
function kc(e, n, t) {
|
|
4485
|
-
if (n === void 0 && (n = {}), t = new
|
|
4502
|
+
if (n === void 0 && (n = {}), t = new be(t), n.v2) {
|
|
4486
4503
|
if (!e.countryCallingCode)
|
|
4487
4504
|
throw new Error("Invalid phone number object passed");
|
|
4488
4505
|
t.selectNumberingPlan(e.countryCallingCode);
|
|
@@ -4548,7 +4565,7 @@ function Zl(e, n) {
|
|
|
4548
4565
|
var Oc = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
|
|
4549
4566
|
function il(e, n, t) {
|
|
4550
4567
|
if (n = n || {}, !(!e.country && !e.countryCallingCode)) {
|
|
4551
|
-
t = new
|
|
4568
|
+
t = new be(t), t.selectNumberingPlan(e.country, e.countryCallingCode);
|
|
4552
4569
|
var r = n.v2 ? e.nationalNumber : e.phone;
|
|
4553
4570
|
if (et(r, t.nationalNumberPattern())) {
|
|
4554
4571
|
if (ir(r, "FIXED_LINE", t))
|
|
@@ -4566,25 +4583,25 @@ function ir(e, n, t) {
|
|
|
4566
4583
|
return !r || !r.pattern() || r.possibleLengths() && r.possibleLengths().indexOf(e.length) < 0 ? !1 : et(e, r.pattern());
|
|
4567
4584
|
}
|
|
4568
4585
|
function Ic(e, n, t) {
|
|
4569
|
-
if (n = n || {}, t = new
|
|
4586
|
+
if (n = n || {}, t = new be(t), t.selectNumberingPlan(e.country, e.countryCallingCode), t.hasTypes())
|
|
4570
4587
|
return il(e, n, t.metadata) !== void 0;
|
|
4571
4588
|
var r = n.v2 ? e.nationalNumber : e.phone;
|
|
4572
4589
|
return et(r, t.nationalNumberPattern());
|
|
4573
4590
|
}
|
|
4574
4591
|
function Bc(e, n, t) {
|
|
4575
|
-
var r = new
|
|
4592
|
+
var r = new be(t), a = r.getCountryCodesForCallingCode(e);
|
|
4576
4593
|
return a ? a.filter(function(s) {
|
|
4577
4594
|
return Rc(n, s, t);
|
|
4578
4595
|
}) : [];
|
|
4579
4596
|
}
|
|
4580
4597
|
function Rc(e, n, t) {
|
|
4581
|
-
var r = new
|
|
4598
|
+
var r = new be(t);
|
|
4582
4599
|
return r.selectNumberingPlan(n), r.numberingPlan.possibleLengths().indexOf(e.length) >= 0;
|
|
4583
4600
|
}
|
|
4584
4601
|
var sl = 2, Vc = 17, qc = 3, Se = "0-90-9٠-٩۰-۹", Uc = "-‐-―−ー-", Gc = "//", Wc = "..", Kc = " ", Yc = "()()[]\\[\\]", Qc = "~⁓∼~", Re = "".concat(Uc).concat(Gc).concat(Wc).concat(Kc).concat(Yc).concat(Qc), Zn = "++", Xc = new RegExp("([" + Se + "])");
|
|
4585
4602
|
function hi(e, n, t, r) {
|
|
4586
4603
|
if (n) {
|
|
4587
|
-
var a = new
|
|
4604
|
+
var a = new be(r);
|
|
4588
4605
|
a.selectNumberingPlan(n, t);
|
|
4589
4606
|
var s = new RegExp(a.IDDPrefix());
|
|
4590
4607
|
if (e.search(s) === 0) {
|
|
@@ -4595,7 +4612,7 @@ function hi(e, n, t, r) {
|
|
|
4595
4612
|
}
|
|
4596
4613
|
}
|
|
4597
4614
|
}
|
|
4598
|
-
function
|
|
4615
|
+
function br(e, n) {
|
|
4599
4616
|
if (e && n.numberingPlan.nationalPrefixForParsing()) {
|
|
4600
4617
|
var t = new RegExp("^(?:" + n.numberingPlan.nationalPrefixForParsing() + ")"), r = t.exec(e);
|
|
4601
4618
|
if (r) {
|
|
@@ -4650,7 +4667,7 @@ function Jl(e, n) {
|
|
|
4650
4667
|
}
|
|
4651
4668
|
function fi(e, n) {
|
|
4652
4669
|
var t = n.countries, r = n.metadata;
|
|
4653
|
-
r = new
|
|
4670
|
+
r = new be(r);
|
|
4654
4671
|
for (var a = Zc(t), s; !(s = a()).done; ) {
|
|
4655
4672
|
var o = s.value;
|
|
4656
4673
|
if (r.selectNumberingPlan(o), r.leadingDigits()) {
|
|
@@ -4672,7 +4689,7 @@ function ol(e, n) {
|
|
|
4672
4689
|
});
|
|
4673
4690
|
}
|
|
4674
4691
|
function wr(e, n, t) {
|
|
4675
|
-
var r =
|
|
4692
|
+
var r = br(e, t), a = r.carrierCode, s = r.nationalNumber;
|
|
4676
4693
|
if (s !== e) {
|
|
4677
4694
|
if (!e0(e, s, t))
|
|
4678
4695
|
return {
|
|
@@ -4706,7 +4723,7 @@ function t0(e, n, t) {
|
|
|
4706
4723
|
function pi(e, n, t, r, a) {
|
|
4707
4724
|
var s = n || t ? nt(n || t, a) : r;
|
|
4708
4725
|
if (e.indexOf(s) === 0) {
|
|
4709
|
-
a = new
|
|
4726
|
+
a = new be(a), a.selectNumberingPlan(n || t, s);
|
|
4710
4727
|
var o = e.slice(s.length), d = wr(o, n, a), c = d.nationalNumber, u = wr(e, n, a), f = u.nationalNumber;
|
|
4711
4728
|
if (!et(f, a.nationalNumberPattern()) && et(c, a.nationalNumberPattern()) || Xn(f, n, a) === "TOO_LONG")
|
|
4712
4729
|
return {
|
|
@@ -4745,7 +4762,7 @@ function dl(e, n, t, r, a) {
|
|
|
4745
4762
|
}
|
|
4746
4763
|
if (e[1] === "0")
|
|
4747
4764
|
return {};
|
|
4748
|
-
a = new
|
|
4765
|
+
a = new be(a);
|
|
4749
4766
|
for (var f = 2; f - 1 <= qc && f <= e.length; ) {
|
|
4750
4767
|
var p = e.slice(1, f);
|
|
4751
4768
|
if (a.hasCallingCode(p))
|
|
@@ -4785,7 +4802,7 @@ function yi(e, n, t) {
|
|
|
4785
4802
|
}
|
|
4786
4803
|
var n0 = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
4787
4804
|
function r0(e, n, t) {
|
|
4788
|
-
var r = new
|
|
4805
|
+
var r = new be(t);
|
|
4789
4806
|
if (r.selectNumberingPlan(e, n), r.defaultIDDPrefix())
|
|
4790
4807
|
return r.defaultIDDPrefix();
|
|
4791
4808
|
if (n0.test(r.IDDPrefix()))
|
|
@@ -4795,8 +4812,8 @@ var l0 = ";ext=", ft = function(n) {
|
|
|
4795
4812
|
return "([".concat(Se, "]{1,").concat(n, "})");
|
|
4796
4813
|
};
|
|
4797
4814
|
function xi(e) {
|
|
4798
|
-
var n = "20", t = "15", r = "9", a = "6", s = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", d = "#?", c = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", u = "(?:[xx##~~]|int|int)", f = "[- ]+", p = "[ \\t]*", v = "(?:,{2}|;)",
|
|
4799
|
-
return
|
|
4815
|
+
var n = "20", t = "15", r = "9", a = "6", s = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", d = "#?", c = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", u = "(?:[xx##~~]|int|int)", f = "[- ]+", p = "[ \\t]*", v = "(?:,{2}|;)", b = l0 + ft(n), _ = s + c + o + ft(n) + d, h = s + u + o + ft(r) + d, x = f + ft(a) + "#", w = p + v + o + ft(t) + d, E = p + "(?:,)+" + o + ft(r) + d;
|
|
4816
|
+
return b + "|" + _ + "|" + h + "|" + x + "|" + w + "|" + E;
|
|
4800
4817
|
}
|
|
4801
4818
|
var a0 = "[" + Se + "]{" + sl + "}", i0 = "[" + Zn + "]{0,1}(?:[" + Re + "]*[" + Se + "]){3,}[" + Re + Se + "]*", s0 = new RegExp("^[" + Zn + "]{0,1}(?:[" + Re + "]*[" + Se + "]){1,2}$", "i"), o0 = i0 + // Phone number extensions
|
|
4802
4819
|
"(?:" + xi() + ")?", d0 = new RegExp(
|
|
@@ -4824,7 +4841,7 @@ var ea = {
|
|
|
4824
4841
|
}
|
|
4825
4842
|
};
|
|
4826
4843
|
function h0(e, n, t, r) {
|
|
4827
|
-
if (t ? t = v0({}, ea, t) : t = ea, r = new
|
|
4844
|
+
if (t ? t = v0({}, ea, t) : t = ea, r = new be(r), e.country && e.country !== "001") {
|
|
4828
4845
|
if (!r.hasCountry(e.country))
|
|
4829
4846
|
throw new Error("Unknown country: ".concat(e.country));
|
|
4830
4847
|
r.selectNumberingPlan(e.country);
|
|
@@ -4937,21 +4954,21 @@ function na(e) {
|
|
|
4937
4954
|
return e;
|
|
4938
4955
|
}
|
|
4939
4956
|
function y0(e, n, t) {
|
|
4940
|
-
return (n =
|
|
4957
|
+
return (n = _i(n)) in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
4941
4958
|
}
|
|
4942
4959
|
function x0(e, n) {
|
|
4943
4960
|
if (!(e instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
4944
4961
|
}
|
|
4945
|
-
function
|
|
4962
|
+
function _0(e, n) {
|
|
4946
4963
|
for (var t = 0; t < n.length; t++) {
|
|
4947
4964
|
var r = n[t];
|
|
4948
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
4965
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, _i(r.key), r);
|
|
4949
4966
|
}
|
|
4950
4967
|
}
|
|
4951
|
-
function
|
|
4952
|
-
return n &&
|
|
4968
|
+
function b0(e, n, t) {
|
|
4969
|
+
return n && _0(e.prototype, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
4953
4970
|
}
|
|
4954
|
-
function
|
|
4971
|
+
function _i(e) {
|
|
4955
4972
|
var n = w0(e, "string");
|
|
4956
4973
|
return It(n) == "symbol" ? n : n + "";
|
|
4957
4974
|
}
|
|
@@ -4965,7 +4982,7 @@ function w0(e, n) {
|
|
|
4965
4982
|
}
|
|
4966
4983
|
return String(e);
|
|
4967
4984
|
}
|
|
4968
|
-
var
|
|
4985
|
+
var bi = /* @__PURE__ */ (function() {
|
|
4969
4986
|
function e(n, t, r) {
|
|
4970
4987
|
if (x0(this, e), !n)
|
|
4971
4988
|
throw new TypeError("First argument is required");
|
|
@@ -4992,7 +5009,7 @@ var _i = /* @__PURE__ */ (function() {
|
|
|
4992
5009
|
return r;
|
|
4993
5010
|
};
|
|
4994
5011
|
}
|
|
4995
|
-
return
|
|
5012
|
+
return b0(e, [{
|
|
4996
5013
|
key: "setExt",
|
|
4997
5014
|
value: function(t) {
|
|
4998
5015
|
this.ext = t;
|
|
@@ -5019,7 +5036,7 @@ var _i = /* @__PURE__ */ (function() {
|
|
|
5019
5036
|
}, {
|
|
5020
5037
|
key: "isNonGeographic",
|
|
5021
5038
|
value: function() {
|
|
5022
|
-
var t = new
|
|
5039
|
+
var t = new be(this.getMetadata());
|
|
5023
5040
|
return t.isNonGeographicCallingCode(this.countryCallingCode);
|
|
5024
5041
|
}
|
|
5025
5042
|
}, {
|
|
@@ -5077,7 +5094,7 @@ var _i = /* @__PURE__ */ (function() {
|
|
|
5077
5094
|
return /^[A-Z]{2}$/.test(n);
|
|
5078
5095
|
};
|
|
5079
5096
|
function $0(e, n) {
|
|
5080
|
-
var t, r, a = new
|
|
5097
|
+
var t, r, a = new be(n);
|
|
5081
5098
|
return E0(e) ? (t = e, a.selectNumberingPlan(t), r = a.countryCallingCode()) : r = e, {
|
|
5082
5099
|
country: t,
|
|
5083
5100
|
countryCallingCode: r
|
|
@@ -5366,7 +5383,7 @@ function X0(e, n) {
|
|
|
5366
5383
|
}
|
|
5367
5384
|
var Z0 = 250, J0 = new RegExp("[" + Zn + Se + "]"), e3 = new RegExp("[^" + Se + "#]+$");
|
|
5368
5385
|
function t3(e, n, t) {
|
|
5369
|
-
if (n = n || {}, t = new
|
|
5386
|
+
if (n = n || {}, t = new be(t), n.defaultCountry && !t.hasCountry(n.defaultCountry))
|
|
5370
5387
|
throw n.v2 ? new Xe("INVALID_COUNTRY") : new Error("Unknown country: ".concat(n.defaultCountry));
|
|
5371
5388
|
var r = r3(e, n.v2, n.extract), a = r.number, s = r.ext, o = r.error;
|
|
5372
5389
|
if (!a) {
|
|
@@ -5391,19 +5408,19 @@ function t3(e, n, t) {
|
|
|
5391
5408
|
return {};
|
|
5392
5409
|
}
|
|
5393
5410
|
if (n.v2) {
|
|
5394
|
-
var
|
|
5395
|
-
return c && (
|
|
5411
|
+
var b = new bi(f, u, t.metadata);
|
|
5412
|
+
return c && (b.country = c), v && (b.carrierCode = v), s && (b.ext = s), b.__countryCallingCodeSource = p, b;
|
|
5396
5413
|
}
|
|
5397
|
-
var
|
|
5414
|
+
var _ = (n.extended ? t.hasSelectedNumberingPlan() : c) ? et(u, t.nationalNumberPattern()) : !1;
|
|
5398
5415
|
return n.extended ? {
|
|
5399
5416
|
country: c,
|
|
5400
5417
|
countryCallingCode: f,
|
|
5401
5418
|
carrierCode: v,
|
|
5402
|
-
valid:
|
|
5403
|
-
possible:
|
|
5419
|
+
valid: _,
|
|
5420
|
+
possible: _ ? !0 : !!(n.extended === !0 && t.possibleLengths() && mi(u, c, t)),
|
|
5404
5421
|
phone: u,
|
|
5405
5422
|
ext: s
|
|
5406
|
-
} :
|
|
5423
|
+
} : _ ? l3(c, u, s) : {};
|
|
5407
5424
|
}
|
|
5408
5425
|
function n3(e, n, t) {
|
|
5409
5426
|
if (e) {
|
|
@@ -5644,17 +5661,17 @@ function ha(e) {
|
|
|
5644
5661
|
for (var n = 1; n < arguments.length; n++) {
|
|
5645
5662
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
5646
5663
|
n % 2 ? ma(Object(t), !0).forEach(function(r) {
|
|
5647
|
-
|
|
5664
|
+
_3(e, r, t[r]);
|
|
5648
5665
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ma(Object(t)).forEach(function(r) {
|
|
5649
5666
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
5650
5667
|
});
|
|
5651
5668
|
}
|
|
5652
5669
|
return e;
|
|
5653
5670
|
}
|
|
5654
|
-
function
|
|
5655
|
-
return (n =
|
|
5671
|
+
function _3(e, n, t) {
|
|
5672
|
+
return (n = b3(n)) in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
5656
5673
|
}
|
|
5657
|
-
function
|
|
5674
|
+
function b3(e) {
|
|
5658
5675
|
var n = w3(e, "string");
|
|
5659
5676
|
return Ut(n) == "symbol" ? n : n + "";
|
|
5660
5677
|
}
|
|
@@ -6190,8 +6207,8 @@ function Mr(e, n, t) {
|
|
|
6190
6207
|
// matchedChars: ...
|
|
6191
6208
|
} : void 0;
|
|
6192
6209
|
case "[]":
|
|
6193
|
-
for (var
|
|
6194
|
-
var h =
|
|
6210
|
+
for (var b = ga(n.args), _; !(_ = b()).done; ) {
|
|
6211
|
+
var h = _.value;
|
|
6195
6212
|
if (e[0] === h)
|
|
6196
6213
|
return e.length === 1 ? {
|
|
6197
6214
|
match: !0,
|
|
@@ -6232,12 +6249,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6232
6249
|
}
|
|
6233
6250
|
function tu(e, n) {
|
|
6234
6251
|
if (e) {
|
|
6235
|
-
if (typeof e == "string") return
|
|
6252
|
+
if (typeof e == "string") return _a(e, n);
|
|
6236
6253
|
var t = {}.toString.call(e).slice(8, -1);
|
|
6237
|
-
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ?
|
|
6254
|
+
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _a(e, n) : void 0;
|
|
6238
6255
|
}
|
|
6239
6256
|
}
|
|
6240
|
-
function
|
|
6257
|
+
function _a(e, n) {
|
|
6241
6258
|
(n == null || n > e.length) && (n = e.length);
|
|
6242
6259
|
for (var t = 0, r = Array(n); t < n; t++) r[t] = e[t];
|
|
6243
6260
|
return r;
|
|
@@ -6272,7 +6289,7 @@ var Nr = "9", su = 15, ou = mn(Nr, su), du = /[- ]/, cu = function() {
|
|
|
6272
6289
|
return /\[([^\[\]])*\]/g;
|
|
6273
6290
|
}, uu = function() {
|
|
6274
6291
|
return /\d(?=[^,}][^,}])/g;
|
|
6275
|
-
}, mu = new RegExp("[" + Re + "]*\\$1[" + Re + "]*(\\$\\d[" + Re + "]*)*$"),
|
|
6292
|
+
}, mu = new RegExp("[" + Re + "]*\\$1[" + Re + "]*(\\$\\d[" + Re + "]*)*$"), ba = 3, hu = /* @__PURE__ */ (function() {
|
|
6276
6293
|
function e(n) {
|
|
6277
6294
|
n.state;
|
|
6278
6295
|
var t = n.metadata;
|
|
@@ -6328,7 +6345,7 @@ var Nr = "9", su = 15, ou = mn(Nr, su), du = /[- ]/, cu = function() {
|
|
|
6328
6345
|
}, {
|
|
6329
6346
|
key: "narrowDownMatchingFormats",
|
|
6330
6347
|
value: function(t) {
|
|
6331
|
-
var r = this, a = t.nationalSignificantNumber, s = t.nationalPrefix, o = t.international, d = a, c = d.length -
|
|
6348
|
+
var r = this, a = t.nationalSignificantNumber, s = t.nationalPrefix, o = t.international, d = a, c = d.length - ba;
|
|
6332
6349
|
c < 0 && (c = 0), this.matchingFormats = this.matchingFormats.filter(function(u) {
|
|
6333
6350
|
return r.formatSuits(u, o, s) && r.formatMatches(u, d, c);
|
|
6334
6351
|
}), this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1 && this.resetFormat();
|
|
@@ -6347,7 +6364,7 @@ var Nr = "9", su = 15, ou = mn(Nr, su), du = /[- ]/, cu = function() {
|
|
|
6347
6364
|
return !0;
|
|
6348
6365
|
a = Math.min(a, s - 1);
|
|
6349
6366
|
var o = t.leadingDigitsPatterns()[a];
|
|
6350
|
-
if (r.length <
|
|
6367
|
+
if (r.length < ba)
|
|
6351
6368
|
try {
|
|
6352
6369
|
return new eu(o).match(r, {
|
|
6353
6370
|
allowOverflow: !0
|
|
@@ -6426,18 +6443,18 @@ var Nr = "9", su = 15, ou = mn(Nr, su), du = /[- ]/, cu = function() {
|
|
|
6426
6443
|
if (!(a.length > u.length)) {
|
|
6427
6444
|
var f = new RegExp("^" + c + "$"), p = a.replace(/\d/g, Nr);
|
|
6428
6445
|
f.test(p) && (u = p);
|
|
6429
|
-
var v = this.getFormatFormat(t, s),
|
|
6446
|
+
var v = this.getFormatFormat(t, s), b;
|
|
6430
6447
|
if (this.shouldTryNationalPrefixFormattingRule(t, {
|
|
6431
6448
|
international: s,
|
|
6432
6449
|
nationalPrefix: o
|
|
6433
6450
|
})) {
|
|
6434
|
-
var
|
|
6435
|
-
if (Nn(t.nationalPrefixFormattingRule()) === (o || "") + Nn("$1") && (v =
|
|
6451
|
+
var _ = v.replace(gi, t.nationalPrefixFormattingRule());
|
|
6452
|
+
if (Nn(t.nationalPrefixFormattingRule()) === (o || "") + Nn("$1") && (v = _, b = !0, o))
|
|
6436
6453
|
for (var h = o.length; h > 0; )
|
|
6437
6454
|
v = v.replace(/\d/, Be), h--;
|
|
6438
6455
|
}
|
|
6439
6456
|
var x = u.replace(new RegExp(c), v).replace(new RegExp(Nr, "g"), Be);
|
|
6440
|
-
return
|
|
6457
|
+
return b || (d ? x = mn(Be, d.length) + " " + x : o && (x = mn(Be, o.length) + this.getSeparatorAfterNationalPrefix(t) + x)), s && (x = vi(x)), x;
|
|
6441
6458
|
}
|
|
6442
6459
|
}
|
|
6443
6460
|
}, {
|
|
@@ -6516,13 +6533,13 @@ function yu(e, n) {
|
|
|
6516
6533
|
function xu(e, n) {
|
|
6517
6534
|
for (var t = 0; t < n.length; t++) {
|
|
6518
6535
|
var r = n[t];
|
|
6519
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
6536
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, bu(r.key), r);
|
|
6520
6537
|
}
|
|
6521
6538
|
}
|
|
6522
|
-
function
|
|
6539
|
+
function _u(e, n, t) {
|
|
6523
6540
|
return n && xu(e.prototype, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
6524
6541
|
}
|
|
6525
|
-
function
|
|
6542
|
+
function bu(e) {
|
|
6526
6543
|
var n = wu(e, "string");
|
|
6527
6544
|
return Qt(n) == "symbol" ? n : n + "";
|
|
6528
6545
|
}
|
|
@@ -6541,7 +6558,7 @@ var Eu = "[" + Re + Se + "]+", $u = new RegExp("^" + Eu + "$", "i"), Fu = "(?:["
|
|
|
6541
6558
|
var t = n.defaultCountry, r = n.defaultCallingCode, a = n.metadata, s = n.onNationalSignificantNumberChange;
|
|
6542
6559
|
yu(this, e), this.defaultCountry = t, this.defaultCallingCode = r, this.metadata = a, this.onNationalSignificantNumberChange = s;
|
|
6543
6560
|
}
|
|
6544
|
-
return
|
|
6561
|
+
return _u(e, [{
|
|
6545
6562
|
key: "input",
|
|
6546
6563
|
value: function(t, r) {
|
|
6547
6564
|
var a = Pu(t), s = Fi(a, 2), o = s[0], d = s[1], c = Nn(o), u;
|
|
@@ -6606,7 +6623,7 @@ var Eu = "[" + Re + Se + "]+", $u = new RegExp("^" + Eu + "$", "i"), Fu = "(?:["
|
|
|
6606
6623
|
key: "extractNationalSignificantNumber",
|
|
6607
6624
|
value: function(t, r) {
|
|
6608
6625
|
if (this.hasSelectedNumberingPlan) {
|
|
6609
|
-
var a =
|
|
6626
|
+
var a = br(t, this.metadata), s = a.nationalPrefix, o = a.nationalNumber, d = a.carrierCode;
|
|
6610
6627
|
if (o !== t)
|
|
6611
6628
|
return this.onExtractedNationalNumber(s, d, o, t, r), !0;
|
|
6612
6629
|
}
|
|
@@ -6622,7 +6639,7 @@ var Eu = "[" + Re + Se + "]+", $u = new RegExp("^" + Eu + "$", "i"), Fu = "(?:["
|
|
|
6622
6639
|
if (!this.hasExtractedNationalSignificantNumber)
|
|
6623
6640
|
return this.extractNationalSignificantNumber(t, a);
|
|
6624
6641
|
if (this.couldPossiblyExtractAnotherNationalSignificantNumber) {
|
|
6625
|
-
var s =
|
|
6642
|
+
var s = br(t, this.metadata), o = s.nationalPrefix, d = s.nationalNumber, c = s.carrierCode;
|
|
6626
6643
|
if (d !== r)
|
|
6627
6644
|
return this.onExtractedNationalNumber(o, c, d, t, a), !0;
|
|
6628
6645
|
}
|
|
@@ -6793,7 +6810,7 @@ function Bu(e, n) {
|
|
|
6793
6810
|
}
|
|
6794
6811
|
var jt = /* @__PURE__ */ (function() {
|
|
6795
6812
|
function e(n, t) {
|
|
6796
|
-
Tu(this, e), this.metadata = new
|
|
6813
|
+
Tu(this, e), this.metadata = new be(t);
|
|
6797
6814
|
var r = this.getCountryAndCallingCode(n), a = ju(r, 2), s = a[0], o = a[1];
|
|
6798
6815
|
this.defaultCountry = s, this.defaultCallingCode = o, this.reset();
|
|
6799
6816
|
}
|
|
@@ -7004,7 +7021,7 @@ var jt = /* @__PURE__ */ (function() {
|
|
|
7004
7021
|
var t = this.state, r = t.nationalSignificantNumber, a = t.carrierCode, s = t.callingCode, o = this._getCountry();
|
|
7005
7022
|
if (r && !(!o && !s)) {
|
|
7006
7023
|
if (o && o === this.defaultCountry) {
|
|
7007
|
-
var d = new
|
|
7024
|
+
var d = new be(this.metadata.metadata);
|
|
7008
7025
|
d.selectNumberingPlan(o);
|
|
7009
7026
|
var c = d.numberingPlan.callingCode(), u = this.metadata.getCountryCodesForCallingCode(c);
|
|
7010
7027
|
if (u.length > 1) {
|
|
@@ -7015,7 +7032,7 @@ var jt = /* @__PURE__ */ (function() {
|
|
|
7015
7032
|
f && (o = f);
|
|
7016
7033
|
}
|
|
7017
7034
|
}
|
|
7018
|
-
var p = new
|
|
7035
|
+
var p = new bi(o || s, r, this.metadata.metadata);
|
|
7019
7036
|
return a && (p.carrierCode = a), p;
|
|
7020
7037
|
}
|
|
7021
7038
|
}
|
|
@@ -7072,7 +7089,7 @@ var jt = /* @__PURE__ */ (function() {
|
|
|
7072
7089
|
}]);
|
|
7073
7090
|
})();
|
|
7074
7091
|
function Sr(e) {
|
|
7075
|
-
return new
|
|
7092
|
+
return new be(e).getCountries();
|
|
7076
7093
|
}
|
|
7077
7094
|
function Ru(e, n, t) {
|
|
7078
7095
|
return t || (t = n, n = void 0), new jt(n, t).input(e);
|
|
@@ -7143,12 +7160,12 @@ function Qu(e) {
|
|
|
7143
7160
|
var a = t.onKeyDown, s = t.country, o = t.inputFormat, d = t.metadata, c = d === void 0 ? e : d;
|
|
7144
7161
|
t.international, t.withCountryCallingCode;
|
|
7145
7162
|
var u = Ku(t, Wu), f = m.useCallback(function(v) {
|
|
7146
|
-
var
|
|
7163
|
+
var b = new jt(s, c), _ = zi({
|
|
7147
7164
|
inputFormat: o,
|
|
7148
7165
|
country: s,
|
|
7149
7166
|
metadata: c
|
|
7150
|
-
}), h =
|
|
7151
|
-
return
|
|
7167
|
+
}), h = b.input(_ + v), x = b.getTemplate();
|
|
7168
|
+
return _ && (h = Pr(h, _), x && (x = Pr(x, _))), {
|
|
7152
7169
|
text: h,
|
|
7153
7170
|
template: x
|
|
7154
7171
|
};
|
|
@@ -7237,24 +7254,24 @@ function t4(e) {
|
|
|
7237
7254
|
function n(t, r) {
|
|
7238
7255
|
var a = t.value, s = t.onChange, o = t.onKeyDown, d = t.country, c = t.inputFormat, u = t.metadata, f = u === void 0 ? e : u, p = t.inputComponent, v = p === void 0 ? "input" : p;
|
|
7239
7256
|
t.international, t.withCountryCallingCode;
|
|
7240
|
-
var
|
|
7257
|
+
var b = Ju(t, Zu), _ = zi({
|
|
7241
7258
|
inputFormat: c,
|
|
7242
7259
|
country: d,
|
|
7243
7260
|
metadata: f
|
|
7244
7261
|
}), h = m.useCallback(function(w) {
|
|
7245
7262
|
var E = Fr(w.target.value);
|
|
7246
7263
|
if (E === a) {
|
|
7247
|
-
var z = $a(
|
|
7264
|
+
var z = $a(_, E, d, f);
|
|
7248
7265
|
z.indexOf(w.target.value) === 0 && (E = E.slice(0, -1));
|
|
7249
7266
|
}
|
|
7250
7267
|
s(E);
|
|
7251
|
-
}, [
|
|
7268
|
+
}, [_, a, s, d, f]), x = Ci({
|
|
7252
7269
|
onKeyDown: o,
|
|
7253
7270
|
inputFormat: c
|
|
7254
7271
|
});
|
|
7255
|
-
return /* @__PURE__ */ l.createElement(v, Ar({},
|
|
7272
|
+
return /* @__PURE__ */ l.createElement(v, Ar({}, b, {
|
|
7256
7273
|
ref: r,
|
|
7257
|
-
value: $a(
|
|
7274
|
+
value: $a(_, a, d, f),
|
|
7258
7275
|
onChange: h,
|
|
7259
7276
|
onKeyDown: x
|
|
7260
7277
|
}));
|
|
@@ -7650,10 +7667,10 @@ function x4(e) {
|
|
|
7650
7667
|
function Hi(e) {
|
|
7651
7668
|
x4(e) || console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got", e);
|
|
7652
7669
|
}
|
|
7653
|
-
function
|
|
7670
|
+
function _4(e, n) {
|
|
7654
7671
|
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
7655
7672
|
if (t) return (t = t.call(e)).next.bind(t);
|
|
7656
|
-
if (Array.isArray(e) || (t =
|
|
7673
|
+
if (Array.isArray(e) || (t = b4(e)) || n) {
|
|
7657
7674
|
t && (e = t);
|
|
7658
7675
|
var r = 0;
|
|
7659
7676
|
return function() {
|
|
@@ -7663,7 +7680,7 @@ function b4(e, n) {
|
|
|
7663
7680
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7664
7681
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
7665
7682
|
}
|
|
7666
|
-
function
|
|
7683
|
+
function b4(e, n) {
|
|
7667
7684
|
if (e) {
|
|
7668
7685
|
if (typeof e == "string") return Ca(e, n);
|
|
7669
7686
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -7690,12 +7707,12 @@ function w4(e, n) {
|
|
|
7690
7707
|
else {
|
|
7691
7708
|
var f;
|
|
7692
7709
|
u === "🌐" ? f = void 0 : f = u;
|
|
7693
|
-
var p = e.indexOf(e.filter(function(
|
|
7694
|
-
return
|
|
7710
|
+
var p = e.indexOf(e.filter(function(b) {
|
|
7711
|
+
return b.value === f;
|
|
7695
7712
|
})[0]), v = e[p];
|
|
7696
7713
|
e.splice(p, 1), a.push(v);
|
|
7697
7714
|
}
|
|
7698
|
-
}, o =
|
|
7715
|
+
}, o = _4(n), d; !(d = o()).done; )
|
|
7699
7716
|
s();
|
|
7700
7717
|
return t.concat(e).concat(r);
|
|
7701
7718
|
}
|
|
@@ -7827,7 +7844,7 @@ function Ze(e, n) {
|
|
|
7827
7844
|
}
|
|
7828
7845
|
function P4(e) {
|
|
7829
7846
|
var n = e.value, t = e.phoneNumber, r = e.defaultCountry, a = e.getAnyCountry, s = e.countries, o = e.required, d = e.metadata, c;
|
|
7830
|
-
return t && t.country ? c = t.country : r && (!n ||
|
|
7847
|
+
return t && t.country ? c = t.country : r && (!n || bt(n, r, d)) && (c = r), s && s.indexOf(c) < 0 && (c = void 0), !c && o && s && s.length > 0 && (c = a()), c;
|
|
7831
7848
|
}
|
|
7832
7849
|
function j4(e) {
|
|
7833
7850
|
var n = e.countries, t = e.countryNames, r = e.addInternationalOption, a = e.compareStringsLocales, s = e.compareStrings;
|
|
@@ -7902,7 +7919,7 @@ function D4(e, n, t) {
|
|
|
7902
7919
|
return e;
|
|
7903
7920
|
}
|
|
7904
7921
|
function k4(e, n) {
|
|
7905
|
-
return n = new
|
|
7922
|
+
return n = new be(n), n.selectNumberingPlan(e), n.numberingPlan.possibleLengths()[n.numberingPlan.possibleLengths().length - 1];
|
|
7906
7923
|
}
|
|
7907
7924
|
function Ii(e, n) {
|
|
7908
7925
|
var t = n.country, r = n.countries, a = n.defaultCountry, s = n.latestCountrySelectedByUser, o = n.required, d = n.metadata;
|
|
@@ -7912,10 +7929,10 @@ function Ii(e, n) {
|
|
|
7912
7929
|
if (c)
|
|
7913
7930
|
return !r || r.indexOf(c) >= 0 ? c : void 0;
|
|
7914
7931
|
if (t) {
|
|
7915
|
-
if (
|
|
7916
|
-
if (s &&
|
|
7932
|
+
if (bt(e, t, d)) {
|
|
7933
|
+
if (s && bt(e, s, d))
|
|
7917
7934
|
return s;
|
|
7918
|
-
if (a &&
|
|
7935
|
+
if (a && bt(e, a, d))
|
|
7919
7936
|
return a;
|
|
7920
7937
|
if (!o)
|
|
7921
7938
|
return;
|
|
@@ -7927,12 +7944,12 @@ function Ii(e, n) {
|
|
|
7927
7944
|
function T4(e, n) {
|
|
7928
7945
|
var t = n.prevPhoneDigits, r = n.country, a = n.defaultCountry, s = n.latestCountrySelectedByUser, o = n.countryRequired, d = n.getAnyCountry, c = n.countries, u = n.international, f = n.limitMaxLength, p = n.countryCallingCodeEditable, v = n.metadata;
|
|
7929
7946
|
if (u && p === !1 && r) {
|
|
7930
|
-
var
|
|
7931
|
-
if (e.indexOf(
|
|
7932
|
-
var
|
|
7933
|
-
return h ? (e =
|
|
7947
|
+
var b = Ze(r, v);
|
|
7948
|
+
if (e.indexOf(b) !== 0) {
|
|
7949
|
+
var _, h = e && e[0] !== "+";
|
|
7950
|
+
return h ? (e = b + e, _ = yt(e, r, v)) : e = b, {
|
|
7934
7951
|
phoneDigits: e,
|
|
7935
|
-
value:
|
|
7952
|
+
value: _,
|
|
7936
7953
|
country: r
|
|
7937
7954
|
};
|
|
7938
7955
|
}
|
|
@@ -7995,7 +8012,7 @@ function Bi(e, n, t) {
|
|
|
7995
8012
|
var a = r.getNumber();
|
|
7996
8013
|
return a && a.nationalNumber;
|
|
7997
8014
|
}
|
|
7998
|
-
function
|
|
8015
|
+
function bt(e, n, t) {
|
|
7999
8016
|
for (var r = Ze(n, t), a = 0; a < e.length && a < r.length; ) {
|
|
8000
8017
|
if (e[a] !== r[a])
|
|
8001
8018
|
return !1;
|
|
@@ -8054,16 +8071,16 @@ function V4(e, n) {
|
|
|
8054
8071
|
return (n === "string" ? String : Number)(e);
|
|
8055
8072
|
}
|
|
8056
8073
|
function q4(e, n, t) {
|
|
8057
|
-
var r = e.metadata, a = e.countries, s = e.defaultCountry, o = e.value, d = e.reset, c = e.international, u = e.displayInitialValueAsLocalNumber, f = e.initialValueFormat, p = n.defaultCountry, v = n.value,
|
|
8074
|
+
var r = e.metadata, a = e.countries, s = e.defaultCountry, o = e.value, d = e.reset, c = e.international, u = e.displayInitialValueAsLocalNumber, f = e.initialValueFormat, p = n.defaultCountry, v = n.value, b = n.reset;
|
|
8058
8075
|
t.country;
|
|
8059
|
-
var
|
|
8076
|
+
var _ = t.value, h = t.hasUserSelectedACountry, x = t.latestCountrySelectedByUser, w = function(T) {
|
|
8060
8077
|
return Ri(dn(dn({}, T), {}, {
|
|
8061
8078
|
international: c,
|
|
8062
8079
|
useNationalFormat: u || f === "national",
|
|
8063
8080
|
metadata: r
|
|
8064
8081
|
}));
|
|
8065
8082
|
};
|
|
8066
|
-
if (d !==
|
|
8083
|
+
if (d !== b)
|
|
8067
8084
|
return {
|
|
8068
8085
|
phoneDigits: w({
|
|
8069
8086
|
value: void 0,
|
|
@@ -8077,11 +8094,11 @@ function q4(e, n, t) {
|
|
|
8077
8094
|
if (s !== p) {
|
|
8078
8095
|
var E = !s || er(s, r), z = (
|
|
8079
8096
|
// By default, "no value has been entered" means `value` is `undefined`.
|
|
8080
|
-
!
|
|
8097
|
+
!_ || // When `international` is `true`, and some country has been pre-selected,
|
|
8081
8098
|
// then the `<input/>` contains a pre-filled value of `+${countryCallingCode}${leadingDigits}`,
|
|
8082
8099
|
// so in case of `international` being `true`, "the user hasn't entered anything" situation
|
|
8083
8100
|
// doesn't just mean `value` is `undefined`, but could also mean `value` is `+${countryCallingCode}`.
|
|
8084
|
-
c &&
|
|
8101
|
+
c && _ === w({
|
|
8085
8102
|
value: void 0,
|
|
8086
8103
|
defaultCountry: p
|
|
8087
8104
|
})
|
|
@@ -8102,7 +8119,7 @@ function q4(e, n, t) {
|
|
|
8102
8119
|
value: void 0
|
|
8103
8120
|
};
|
|
8104
8121
|
}
|
|
8105
|
-
if (!Pa(o, v) && !Pa(o,
|
|
8122
|
+
if (!Pa(o, v) && !Pa(o, _)) {
|
|
8106
8123
|
var $, C;
|
|
8107
8124
|
if (o) {
|
|
8108
8125
|
o && Hi(o), $ = Oi(o, r);
|
|
@@ -8116,7 +8133,7 @@ function q4(e, n, t) {
|
|
|
8116
8133
|
var N;
|
|
8117
8134
|
if (o) {
|
|
8118
8135
|
if (x) {
|
|
8119
|
-
var k = C ? x === C :
|
|
8136
|
+
var k = C ? x === C : bt(o, x, r);
|
|
8120
8137
|
k ? C || (C = x) : N = {
|
|
8121
8138
|
latestCountrySelectedByUser: void 0
|
|
8122
8139
|
};
|
|
@@ -8315,7 +8332,7 @@ var t5 = /* @__PURE__ */ (function(e) {
|
|
|
8315
8332
|
value: U,
|
|
8316
8333
|
country: K
|
|
8317
8334
|
};
|
|
8318
|
-
G && U && !
|
|
8335
|
+
G && U && !bt(U, G, N) && (J.latestCountrySelectedByUser = void 0), F === !1 && !U && j === r.state.phoneDigits && (J.forceRerender = {}), r.setState(
|
|
8319
8336
|
J,
|
|
8320
8337
|
// Update the new `value` property.
|
|
8321
8338
|
// Doing it after the `state` has been updated
|
|
@@ -8357,19 +8374,19 @@ var t5 = /* @__PURE__ */ (function(e) {
|
|
|
8357
8374
|
}), r.inputRef = /* @__PURE__ */ l.createRef();
|
|
8358
8375
|
var a = r.props, s = a.value;
|
|
8359
8376
|
a.labels;
|
|
8360
|
-
var o = a.international, d = a.addInternationalOption, c = a.displayInitialValueAsLocalNumber, u = a.initialValueFormat, f = a.metadata, p = r.props, v = p.defaultCountry,
|
|
8361
|
-
v && (r.isCountrySupportedWithError(v) || (v = void 0)), s && Hi(s),
|
|
8362
|
-
var
|
|
8377
|
+
var o = a.international, d = a.addInternationalOption, c = a.displayInitialValueAsLocalNumber, u = a.initialValueFormat, f = a.metadata, p = r.props, v = p.defaultCountry, b = p.countries;
|
|
8378
|
+
v && (r.isCountrySupportedWithError(v) || (v = void 0)), s && Hi(s), b = Di(b, f);
|
|
8379
|
+
var _ = Oi(s, f);
|
|
8363
8380
|
r.CountryIcon = ki(r.props);
|
|
8364
8381
|
var h = P4({
|
|
8365
8382
|
value: s,
|
|
8366
|
-
phoneNumber:
|
|
8383
|
+
phoneNumber: _,
|
|
8367
8384
|
defaultCountry: v,
|
|
8368
8385
|
required: !d,
|
|
8369
|
-
countries:
|
|
8386
|
+
countries: b || Sr(f),
|
|
8370
8387
|
getAnyCountry: function() {
|
|
8371
8388
|
return r.getFirstSupportedCountry({
|
|
8372
|
-
countries:
|
|
8389
|
+
countries: b
|
|
8373
8390
|
});
|
|
8374
8391
|
},
|
|
8375
8392
|
metadata: f
|
|
@@ -8385,7 +8402,7 @@ var t5 = /* @__PURE__ */ (function(e) {
|
|
|
8385
8402
|
// the component uses `this.state.countries` (which are filtered)
|
|
8386
8403
|
// instead of `this.props.countries`
|
|
8387
8404
|
// (which could potentially contain unsupported countries).
|
|
8388
|
-
countries:
|
|
8405
|
+
countries: b,
|
|
8389
8406
|
// `phoneDigits` state property holds non-formatted user's input.
|
|
8390
8407
|
// The reason is that there's no way of finding out
|
|
8391
8408
|
// in which form should `value` be displayed: international or national.
|
|
@@ -8398,7 +8415,7 @@ var t5 = /* @__PURE__ */ (function(e) {
|
|
|
8398
8415
|
// then value is `+78005553535` and `phoneDigits` are `+78005553535`.
|
|
8399
8416
|
phoneDigits: Ri({
|
|
8400
8417
|
value: s,
|
|
8401
|
-
phoneNumber:
|
|
8418
|
+
phoneNumber: _,
|
|
8402
8419
|
defaultCountry: v,
|
|
8403
8420
|
international: o,
|
|
8404
8421
|
useNationalFormat: c || u === "national",
|
|
@@ -8458,7 +8475,7 @@ var t5 = /* @__PURE__ */ (function(e) {
|
|
|
8458
8475
|
value: function() {
|
|
8459
8476
|
var r = this.props, a = r.name, s = r.disabled, o = r.readOnly, d = r.autoComplete, c = r.style, u = r.className;
|
|
8460
8477
|
r.inputRef;
|
|
8461
|
-
var f = r.inputComponent, p = r.numberInputProps, v = r.smartCaret,
|
|
8478
|
+
var f = r.inputComponent, p = r.numberInputProps, v = r.smartCaret, b = r.countrySelectComponent, _ = r.countrySelectProps, h = r.containerComponent, x = r.containerComponentProps;
|
|
8462
8479
|
r.defaultCountry, r.countries, r.countryOptionsOrder;
|
|
8463
8480
|
var w = r.labels;
|
|
8464
8481
|
r.flags, r.flagComponent, r.flagUrl, r.addInternationalOption, r.internationalIcon, r.displayInitialValueAsLocalNumber, r.initialValueFormat, r.onCountryChange, r.limitMaxLength, r.countryCallingCodeEditable, r.focusInputOnCountrySelection, r.reset;
|
|
@@ -8474,17 +8491,17 @@ var t5 = /* @__PURE__ */ (function(e) {
|
|
|
8474
8491
|
"PhoneInput--disabled": s,
|
|
8475
8492
|
"PhoneInput--readOnly": o
|
|
8476
8493
|
})
|
|
8477
|
-
}, x), /* @__PURE__ */ l.createElement(
|
|
8494
|
+
}, x), /* @__PURE__ */ l.createElement(b, wt({
|
|
8478
8495
|
name: a ? "".concat(a, "Country") : void 0,
|
|
8479
8496
|
"aria-label": w.country
|
|
8480
|
-
},
|
|
8497
|
+
}, _, {
|
|
8481
8498
|
value: C,
|
|
8482
8499
|
options: T,
|
|
8483
8500
|
onChange: this.onCountryChange,
|
|
8484
8501
|
onFocus: this.onCountryFocus,
|
|
8485
8502
|
onBlur: this.onCountryBlur,
|
|
8486
|
-
disabled: s ||
|
|
8487
|
-
readOnly: o ||
|
|
8503
|
+
disabled: s || _ && _.disabled,
|
|
8504
|
+
readOnly: o || _ && _.readOnly,
|
|
8488
8505
|
iconComponent: this.CountryIcon
|
|
8489
8506
|
})), /* @__PURE__ */ l.createElement(D, wt({
|
|
8490
8507
|
ref: this.setInputRef,
|
|
@@ -9265,7 +9282,7 @@ function d5() {
|
|
|
9265
9282
|
function c5() {
|
|
9266
9283
|
return Ki(nt, arguments);
|
|
9267
9284
|
}
|
|
9268
|
-
var u5 = ["title"], m5 = ["title"], h5 = ["title"], f5 = ["title"], p5 = ["title"], v5 = ["title"], g5 = ["title"], y5 = ["title"], x5 = ["title"],
|
|
9285
|
+
var u5 = ["title"], m5 = ["title"], h5 = ["title"], f5 = ["title"], p5 = ["title"], v5 = ["title"], g5 = ["title"], y5 = ["title"], x5 = ["title"], _5 = ["title"], b5 = ["title"], w5 = ["title"], E5 = ["title"], $5 = ["title"], F5 = ["title"], z5 = ["title"], C5 = ["title"], M5 = ["title"], N5 = ["title"], S5 = ["title"], P5 = ["title"], j5 = ["title"], A5 = ["title"], H5 = ["title"], D5 = ["title"], k5 = ["title"], T5 = ["title"], L5 = ["title"], O5 = ["title"], I5 = ["title"], B5 = ["title"], R5 = ["title"], V5 = ["title"], q5 = ["title"], U5 = ["title"], G5 = ["title"], W5 = ["title"], K5 = ["title"], Y5 = ["title"], Q5 = ["title"], X5 = ["title"], Z5 = ["title"], J5 = ["title"], em = ["title"], tm = ["title"], nm = ["title"], rm = ["title"], lm = ["title"], am = ["title"], im = ["title"], sm = ["title"], om = ["title"], dm = ["title"], cm = ["title"], um = ["title"], mm = ["title"], hm = ["title"], fm = ["title"], pm = ["title"], vm = ["title"], gm = ["title"], ym = ["title"], xm = ["title"], _m = ["title"], bm = ["title"], wm = ["title"], Em = ["title"], $m = ["title"], Fm = ["title"], zm = ["title"], Cm = ["title"], Mm = ["title"], Nm = ["title"], Sm = ["title"], Pm = ["title"], jm = ["title"], Am = ["title"], Hm = ["title"], Dm = ["title"], km = ["title"], Tm = ["title"], Lm = ["title"], Om = ["title"], Im = ["title"], Bm = ["title"], Rm = ["title"], Vm = ["title"], qm = ["title"], Um = ["title"], Gm = ["title"], Wm = ["title"], Km = ["title"], Ym = ["title"], Qm = ["title"], Xm = ["title"], Zm = ["title"], Jm = ["title"], e7 = ["title"], t7 = ["title"], n7 = ["title"], r7 = ["title"], l7 = ["title"], a7 = ["title"], i7 = ["title"], s7 = ["title"], o7 = ["title"], d7 = ["title"], c7 = ["title"], u7 = ["title"], m7 = ["title"], h7 = ["title"], f7 = ["title"], p7 = ["title"], v7 = ["title"], g7 = ["title"], y7 = ["title"], x7 = ["title"], _7 = ["title"], b7 = ["title"], w7 = ["title"], E7 = ["title"], $7 = ["title"], F7 = ["title"], z7 = ["title"], C7 = ["title"], M7 = ["title"], N7 = ["title"], S7 = ["title"], P7 = ["title"], j7 = ["title"], A7 = ["title"], H7 = ["title"], D7 = ["title"], k7 = ["title"], T7 = ["title"], L7 = ["title"], O7 = ["title"], I7 = ["title"], B7 = ["title"], R7 = ["title"], V7 = ["title"], q7 = ["title"], U7 = ["title"], G7 = ["title"], W7 = ["title"], K7 = ["title"], Y7 = ["title"], Q7 = ["title"], X7 = ["title"], Z7 = ["title"], J7 = ["title"], e6 = ["title"], t6 = ["title"], n6 = ["title"], r6 = ["title"], l6 = ["title"], a6 = ["title"], i6 = ["title"], s6 = ["title"], o6 = ["title"], d6 = ["title"], c6 = ["title"], u6 = ["title"], m6 = ["title"], h6 = ["title"], f6 = ["title"], p6 = ["title"], v6 = ["title"], g6 = ["title"], y6 = ["title"], x6 = ["title"], _6 = ["title"], b6 = ["title"], w6 = ["title"], E6 = ["title"], $6 = ["title"], F6 = ["title"], z6 = ["title"], C6 = ["title"], M6 = ["title"], N6 = ["title"], S6 = ["title"], P6 = ["title"], j6 = ["title"], A6 = ["title"], H6 = ["title"], D6 = ["title"], k6 = ["title"], T6 = ["title"], L6 = ["title"], O6 = ["title"], I6 = ["title"], B6 = ["title"], R6 = ["title"], V6 = ["title"], q6 = ["title"], U6 = ["title"], G6 = ["title"], W6 = ["title"], K6 = ["title"], Y6 = ["title"], Q6 = ["title"], X6 = ["title"], Z6 = ["title"], J6 = ["title"], eh = ["title"], th = ["title"], nh = ["title"], rh = ["title"], lh = ["title"], ah = ["title"], ih = ["title"], sh = ["title"], oh = ["title"], dh = ["title"], ch = ["title"], uh = ["title"], mh = ["title"], hh = ["title"], fh = ["title"], ph = ["title"], vh = ["title"], gh = ["title"], yh = ["title"], xh = ["title"], _h = ["title"], bh = ["title"], wh = ["title"], Eh = ["title"], $h = ["title"], Fh = ["title"], zh = ["title"], Ch = ["title"], Mh = ["title"], Nh = ["title"], Sh = ["title"], Ph = ["title"], jh = ["title"], Ah = ["title"], Hh = ["title"], Dh = ["title"], kh = ["title"], Th = ["title"], Lh = ["title"], Oh = ["title"], Ih = ["title"], Bh = ["title"], Rh = ["title"], Vh = ["title"], qh = ["title"], Uh = ["title"], Gh = ["title"], Wh = ["title"], Kh = ["title"], Yh = ["title"], Qh = ["title"], Xh = ["title"], Zh = ["title"], Jh = ["title"], e8 = ["title"], t8 = ["title"], n8 = ["title"], r8 = ["title"], l8 = ["title"], a8 = ["title"];
|
|
9269
9286
|
function g() {
|
|
9270
9287
|
return g = Object.assign || function(e) {
|
|
9271
9288
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -9530,7 +9547,7 @@ var s8 = function(n) {
|
|
|
9530
9547
|
d: "M206.1 157.2c-7.7 10.3-7.5 23.1 2.8 30.9 0 0 135.2 101.5 136.9 103 1.7 1.5 5.2 2 9.1-2.7 3.7-4.5 2.8-8.1.9-9.7-1.9-1.5-149.7-121.5-149.7-121.5zm47.7 99.1 7.3 18.2 19.5-6-4.8-19.1zm-40.4-3.7-2 19.5 20.1 3.6 4.5-19.1zm-35.7-21.2L167.4 248l16.4 12.1 12.5-15.2z"
|
|
9531
9548
|
})));
|
|
9532
9549
|
}, v8 = function(n) {
|
|
9533
|
-
var t = n.title, r = y(n,
|
|
9550
|
+
var t = n.title, r = y(n, _5);
|
|
9534
9551
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
9535
9552
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9536
9553
|
viewBox: "0 0 744 496"
|
|
@@ -9542,7 +9559,7 @@ var s8 = function(n) {
|
|
|
9542
9559
|
d: "m120 125 90 63 54-14 23-81 61-36 92 14 105 55 6 90 34 12v92l-65 115-78 24-72-17 18-30-8-32-10 9-162-25-49-85 20-46-49-62z"
|
|
9543
9560
|
}));
|
|
9544
9561
|
}, g8 = function(n) {
|
|
9545
|
-
var t = n.title, r = y(n,
|
|
9562
|
+
var t = n.title, r = y(n, b5);
|
|
9546
9563
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
9547
9564
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9548
9565
|
viewBox: "0 0 513 342"
|
|
@@ -9595,7 +9612,7 @@ var s8 = function(n) {
|
|
|
9595
9612
|
fill: "#D80027",
|
|
9596
9613
|
d: "M0 0h513v114H0zm0 228h513v114H0z"
|
|
9597
9614
|
}));
|
|
9598
|
-
},
|
|
9615
|
+
}, _8 = function(n) {
|
|
9599
9616
|
var t = n.title, r = y(n, $5);
|
|
9600
9617
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
9601
9618
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -9622,7 +9639,7 @@ var s8 = function(n) {
|
|
|
9622
9639
|
}), /* @__PURE__ */ l.createElement("path", {
|
|
9623
9640
|
d: "M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"
|
|
9624
9641
|
})));
|
|
9625
|
-
},
|
|
9642
|
+
}, b8 = function(n) {
|
|
9626
9643
|
var t = n.title, r = y(n, F5);
|
|
9627
9644
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
9628
9645
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10571,7 +10588,7 @@ var s8 = function(n) {
|
|
|
10571
10588
|
d: "M190 0h-60v140H0v60h130v142h60V200h323v-60H190z"
|
|
10572
10589
|
}));
|
|
10573
10590
|
}, v9 = function(n) {
|
|
10574
|
-
var t = n.title, r = y(n,
|
|
10591
|
+
var t = n.title, r = y(n, _m);
|
|
10575
10592
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
10576
10593
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10577
10594
|
viewBox: "0 0 513 342"
|
|
@@ -10604,7 +10621,7 @@ var s8 = function(n) {
|
|
|
10604
10621
|
fill: "#496E2D"
|
|
10605
10622
|
}));
|
|
10606
10623
|
}, g9 = function(n) {
|
|
10607
|
-
var t = n.title, r = y(n,
|
|
10624
|
+
var t = n.title, r = y(n, bm);
|
|
10608
10625
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
10609
10626
|
xmlns: "http://www.w3.org/2000/svg",
|
|
10610
10627
|
viewBox: "0 0 513 342"
|
|
@@ -10687,7 +10704,7 @@ var s8 = function(n) {
|
|
|
10687
10704
|
fill: "#338AF3",
|
|
10688
10705
|
d: "M256 110.5c-21.1 0-38.3 17.2-38.3 38.3v11.5h76.5v-11.5c.1-21.1-17.1-38.3-38.2-38.3z"
|
|
10689
10706
|
}));
|
|
10690
|
-
},
|
|
10707
|
+
}, _9 = function(n) {
|
|
10691
10708
|
var t = n.title, r = y(n, $m);
|
|
10692
10709
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
10693
10710
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10702,7 +10719,7 @@ var s8 = function(n) {
|
|
|
10702
10719
|
fill: "#FFF",
|
|
10703
10720
|
d: "M0 228h513v114H0z"
|
|
10704
10721
|
}));
|
|
10705
|
-
},
|
|
10722
|
+
}, b9 = function(n) {
|
|
10706
10723
|
var t = n.title, r = y(n, Fm);
|
|
10707
10724
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
10708
10725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11802,7 +11819,7 @@ var s8 = function(n) {
|
|
|
11802
11819
|
d: "M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"
|
|
11803
11820
|
})));
|
|
11804
11821
|
}, gf = function(n) {
|
|
11805
|
-
var t = n.title, r = y(n,
|
|
11822
|
+
var t = n.title, r = y(n, _7);
|
|
11806
11823
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
11807
11824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11808
11825
|
viewBox: "0 0 513 342"
|
|
@@ -11819,7 +11836,7 @@ var s8 = function(n) {
|
|
|
11819
11836
|
fill: "#547C31"
|
|
11820
11837
|
}));
|
|
11821
11838
|
}, yf = function(n) {
|
|
11822
|
-
var t = n.title, r = y(n,
|
|
11839
|
+
var t = n.title, r = y(n, b7);
|
|
11823
11840
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
11824
11841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11825
11842
|
viewBox: "0 0 513 342"
|
|
@@ -11852,7 +11869,7 @@ var s8 = function(n) {
|
|
|
11852
11869
|
fill: "#D80027",
|
|
11853
11870
|
d: "M513 149.3V192H183.7v149.3H141V192H0v-42.7h141V0h42.7v149.3z"
|
|
11854
11871
|
}));
|
|
11855
|
-
},
|
|
11872
|
+
}, _f = function(n) {
|
|
11856
11873
|
var t = n.title, r = y(n, E7);
|
|
11857
11874
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
11858
11875
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11867,7 +11884,7 @@ var s8 = function(n) {
|
|
|
11867
11884
|
fill: "#CD212A",
|
|
11868
11885
|
d: "M342 0h171v342H342z"
|
|
11869
11886
|
}));
|
|
11870
|
-
},
|
|
11887
|
+
}, bf = function(n) {
|
|
11871
11888
|
var t = n.title, r = y(n, $7);
|
|
11872
11889
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
11873
11890
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -12919,7 +12936,7 @@ var s8 = function(n) {
|
|
|
12919
12936
|
d: "m188.1 104.1-22.8 10.7 12.2 22.1-24.8-4.8-3.1 25-17.3-18.4-17.2 18.4-3.1-25-24.8 4.8 12.2-22.1-22.8-10.7 22.8-10.7-12.2-22.1L112 76l3.1-25 17.2 18.4L149.6 51l3.1 25 24.8-4.7-12.2 22.1z"
|
|
12920
12937
|
}));
|
|
12921
12938
|
}, gp = function(n) {
|
|
12922
|
-
var t = n.title, r = y(n,
|
|
12939
|
+
var t = n.title, r = y(n, _6);
|
|
12923
12940
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
12924
12941
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12925
12942
|
viewBox: "0 0 513 342"
|
|
@@ -12971,7 +12988,7 @@ var s8 = function(n) {
|
|
|
12971
12988
|
d: "M163.4 224.8s1.9-26.6 27.3-26.6 26.5 26.6 26.5 26.6"
|
|
12972
12989
|
})));
|
|
12973
12990
|
}, yp = function(n) {
|
|
12974
|
-
var t = n.title, r = y(n,
|
|
12991
|
+
var t = n.title, r = y(n, b6);
|
|
12975
12992
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
12976
12993
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12977
12994
|
viewBox: "0 0 513 342"
|
|
@@ -13002,7 +13019,7 @@ var s8 = function(n) {
|
|
|
13002
13019
|
d: "M0 0h171v342H0zm342 0h171v342H342zm-38 227L256 75l-48 152h41v40h14v-40z",
|
|
13003
13020
|
fill: "#007934"
|
|
13004
13021
|
}));
|
|
13005
|
-
},
|
|
13022
|
+
}, _p = function(n) {
|
|
13006
13023
|
var t = n.title, r = y(n, E6);
|
|
13007
13024
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
13008
13025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13014,7 +13031,7 @@ var s8 = function(n) {
|
|
|
13014
13031
|
d: "M0 0h171v342H0zm342 0h171v342H342z",
|
|
13015
13032
|
fill: "#008751"
|
|
13016
13033
|
}));
|
|
13017
|
-
},
|
|
13034
|
+
}, bp = function(n) {
|
|
13018
13035
|
var t = n.title, r = y(n, $6);
|
|
13019
13036
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
13020
13037
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14111,7 +14128,7 @@ var s8 = function(n) {
|
|
|
14111
14128
|
ry: 23.3
|
|
14112
14129
|
}));
|
|
14113
14130
|
}, gv = function(n) {
|
|
14114
|
-
var t = n.title, r = y(n,
|
|
14131
|
+
var t = n.title, r = y(n, _h);
|
|
14115
14132
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
14116
14133
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14117
14134
|
viewBox: "0 0 513 342"
|
|
@@ -14152,7 +14169,7 @@ var s8 = function(n) {
|
|
|
14152
14169
|
d: "M156.1 115.2 256.5 171v-15.8l-72-40zm-84.1 0-72 40V171l100.4-55.8zm28.4-59.4L0 0v15.8l72 40zm84.1 0 72-40V0L156.1 55.8z"
|
|
14153
14170
|
})));
|
|
14154
14171
|
}, yv = function(n) {
|
|
14155
|
-
var t = n.title, r = y(n,
|
|
14172
|
+
var t = n.title, r = y(n, bh);
|
|
14156
14173
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
14157
14174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14158
14175
|
viewBox: "0 85.333 512 341.333"
|
|
@@ -14190,7 +14207,7 @@ var s8 = function(n) {
|
|
|
14190
14207
|
fill: "#FFF",
|
|
14191
14208
|
d: "M3.6 0h3.6v7H3.6V0zm10.9 6h5L19 7h-1.5v.5h1l-.5 1h-.5V10h-1V7H15l-.5-1zm4 2.5 1 1.5h-2l1-1.5zm-3 0 1 1.5h-2l1-1.5zm1.5 3L16 10h2l-1 1.5zM20 8c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm-6 0c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm1 4c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm4 0c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5zm-2 1c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5z"
|
|
14192
14209
|
}));
|
|
14193
|
-
},
|
|
14210
|
+
}, _v = function(n) {
|
|
14194
14211
|
var t = n.title, r = y(n, Eh);
|
|
14195
14212
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
14196
14213
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -14208,7 +14225,7 @@ var s8 = function(n) {
|
|
|
14208
14225
|
fill: "#FFF",
|
|
14209
14226
|
d: "m102.026 133.938 13.26 40.812h42.916l-34.718 25.226 13.26 40.814-34.718-25.224-34.719 25.224 13.263-40.814-34.718-25.226h42.913z"
|
|
14210
14227
|
}));
|
|
14211
|
-
},
|
|
14228
|
+
}, bv = function(n) {
|
|
14212
14229
|
var t = n.title, r = y(n, $h);
|
|
14213
14230
|
return /* @__PURE__ */ l.createElement("svg", g({
|
|
14214
14231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15013,8 +15030,8 @@ const rg = {
|
|
|
15013
15030
|
AR: g8,
|
|
15014
15031
|
AS: y8,
|
|
15015
15032
|
AT: x8,
|
|
15016
|
-
AU:
|
|
15017
|
-
AW:
|
|
15033
|
+
AU: _8,
|
|
15034
|
+
AW: b8,
|
|
15018
15035
|
AX: w8,
|
|
15019
15036
|
AZ: E8,
|
|
15020
15037
|
BA: $8,
|
|
@@ -15067,8 +15084,8 @@ const rg = {
|
|
|
15067
15084
|
DO: g9,
|
|
15068
15085
|
DZ: y9,
|
|
15069
15086
|
EC: x9,
|
|
15070
|
-
EE:
|
|
15071
|
-
EG:
|
|
15087
|
+
EE: _9,
|
|
15088
|
+
EG: b9,
|
|
15072
15089
|
EH: w9,
|
|
15073
15090
|
ER: E9,
|
|
15074
15091
|
ES_CT: $9,
|
|
@@ -15120,8 +15137,8 @@ const rg = {
|
|
|
15120
15137
|
IQ: gf,
|
|
15121
15138
|
IR: yf,
|
|
15122
15139
|
IS: xf,
|
|
15123
|
-
IT:
|
|
15124
|
-
JE:
|
|
15140
|
+
IT: _f,
|
|
15141
|
+
JE: bf,
|
|
15125
15142
|
JM: wf,
|
|
15126
15143
|
JO: Ef,
|
|
15127
15144
|
JP: $f,
|
|
@@ -15174,8 +15191,8 @@ const rg = {
|
|
|
15174
15191
|
NC: gp,
|
|
15175
15192
|
NE: yp,
|
|
15176
15193
|
NF: xp,
|
|
15177
|
-
NG:
|
|
15178
|
-
NI:
|
|
15194
|
+
NG: _p,
|
|
15195
|
+
NI: bp,
|
|
15179
15196
|
NL: wp,
|
|
15180
15197
|
NO: Ep,
|
|
15181
15198
|
NP: $p,
|
|
@@ -15228,8 +15245,8 @@ const rg = {
|
|
|
15228
15245
|
TC: gv,
|
|
15229
15246
|
TD: yv,
|
|
15230
15247
|
TF: xv,
|
|
15231
|
-
TG:
|
|
15232
|
-
TH:
|
|
15248
|
+
TG: _v,
|
|
15249
|
+
TH: bv,
|
|
15233
15250
|
TJ: wv,
|
|
15234
15251
|
TK: Ev,
|
|
15235
15252
|
TL: $v,
|
|
@@ -15452,17 +15469,17 @@ function An({
|
|
|
15452
15469
|
isDeleting: f = !1,
|
|
15453
15470
|
defaultCountry: p = "US",
|
|
15454
15471
|
languageIso: v,
|
|
15455
|
-
presentation:
|
|
15472
|
+
presentation: b = "dialog"
|
|
15456
15473
|
}) {
|
|
15457
|
-
const [
|
|
15474
|
+
const [_, h] = m.useState(!1), x = m.useId(), w = ni(), [E, z] = m.useState(null);
|
|
15458
15475
|
m.useEffect(() => {
|
|
15459
15476
|
e || h(!1);
|
|
15460
15477
|
}, [e]), m.useEffect(() => {
|
|
15461
|
-
if (!
|
|
15478
|
+
if (!_) return;
|
|
15462
15479
|
const L = setTimeout(() => h(!1), 3e3);
|
|
15463
15480
|
return () => clearTimeout(L);
|
|
15464
|
-
}, [
|
|
15465
|
-
const P = m.useMemo(() => c(f ? "deleting" :
|
|
15481
|
+
}, [_]);
|
|
15482
|
+
const P = m.useMemo(() => c(f ? "deleting" : _ ? "tap_to_confirm" : "delete_address"), [f, _, c]), { control: $, handleSubmit: C, reset: F, setValue: N, setError: k, clearErrors: D } = Zr(sg, {
|
|
15466
15483
|
defaultValues: {
|
|
15467
15484
|
name: "",
|
|
15468
15485
|
address1: "",
|
|
@@ -15642,7 +15659,7 @@ function An({
|
|
|
15642
15659
|
open: e,
|
|
15643
15660
|
onOpenChange: (L) => !L && n(),
|
|
15644
15661
|
title: c(ve ? "edit_address" : "add_an_address"),
|
|
15645
|
-
presentation:
|
|
15662
|
+
presentation: b,
|
|
15646
15663
|
size: "wide",
|
|
15647
15664
|
children: [
|
|
15648
15665
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-3 pt-2", children: [
|
|
@@ -15678,7 +15695,7 @@ function An({
|
|
|
15678
15695
|
type: "button",
|
|
15679
15696
|
variant: "ghost",
|
|
15680
15697
|
onClick: () => {
|
|
15681
|
-
|
|
15698
|
+
_ ? u() : h(!0);
|
|
15682
15699
|
},
|
|
15683
15700
|
disabled: a || f,
|
|
15684
15701
|
className: "text-destructive hover:bg-destructive/10 hover:text-destructive",
|
|
@@ -15759,7 +15776,7 @@ function cg() {
|
|
|
15759
15776
|
d(z), v.current?.(z);
|
|
15760
15777
|
}, document.head.appendChild(E);
|
|
15761
15778
|
}, [a]);
|
|
15762
|
-
const
|
|
15779
|
+
const b = m.useCallback(
|
|
15763
15780
|
(w) => {
|
|
15764
15781
|
w && u((E) => {
|
|
15765
15782
|
const z = { ...E };
|
|
@@ -15780,7 +15797,7 @@ function cg() {
|
|
|
15780
15797
|
});
|
|
15781
15798
|
},
|
|
15782
15799
|
[]
|
|
15783
|
-
),
|
|
15800
|
+
), _ = m.useCallback(() => {
|
|
15784
15801
|
if (f.current) {
|
|
15785
15802
|
try {
|
|
15786
15803
|
f.current.unmount();
|
|
@@ -15803,7 +15820,7 @@ function cg() {
|
|
|
15803
15820
|
const z = w.vault.environment === "sandbox" ? "sandbox" : "live-eu-1", P = E.create(
|
|
15804
15821
|
w.vault.vault_id,
|
|
15805
15822
|
z,
|
|
15806
|
-
(j) =>
|
|
15823
|
+
(j) => b(j)
|
|
15807
15824
|
);
|
|
15808
15825
|
w.vault.route_id && P.setRouteId(w.vault.route_id), f.current = P;
|
|
15809
15826
|
let $ = 0;
|
|
@@ -15871,7 +15888,7 @@ function cg() {
|
|
|
15871
15888
|
r(!1);
|
|
15872
15889
|
}
|
|
15873
15890
|
},
|
|
15874
|
-
[a,
|
|
15891
|
+
[a, b]
|
|
15875
15892
|
), x = m.useCallback(() => {
|
|
15876
15893
|
if (!f.current) {
|
|
15877
15894
|
v.current?.("Form not initialized");
|
|
@@ -15909,7 +15926,7 @@ function cg() {
|
|
|
15909
15926
|
initializeForm: h,
|
|
15910
15927
|
submitCard: x,
|
|
15911
15928
|
vgsFieldState: c,
|
|
15912
|
-
resetVgs:
|
|
15929
|
+
resetVgs: _,
|
|
15913
15930
|
onSuccessRef: p,
|
|
15914
15931
|
onErrorRef: v
|
|
15915
15932
|
};
|
|
@@ -16026,7 +16043,7 @@ function Qi({
|
|
|
16026
16043
|
t: p,
|
|
16027
16044
|
presentation: v = "dialog"
|
|
16028
16045
|
}) {
|
|
16029
|
-
const
|
|
16046
|
+
const b = Cd(), [_, h] = m.useState(void 0), [x, w] = m.useState(!1), [E, z] = m.useState([]), [P, $] = m.useState(!1), {
|
|
16030
16047
|
isFormReady: C,
|
|
16031
16048
|
isLoading: F,
|
|
16032
16049
|
isScriptLoaded: N,
|
|
@@ -16121,8 +16138,8 @@ function Qi({
|
|
|
16121
16138
|
}
|
|
16122
16139
|
ve(
|
|
16123
16140
|
(Te) => {
|
|
16124
|
-
const
|
|
16125
|
-
if (!Number.isFinite(
|
|
16141
|
+
const _e = Number(Te.billing_address_selection);
|
|
16142
|
+
if (!Number.isFinite(_e)) {
|
|
16126
16143
|
h("Please select a billing address."), w(!1);
|
|
16127
16144
|
return;
|
|
16128
16145
|
}
|
|
@@ -16139,7 +16156,7 @@ function Qi({
|
|
|
16139
16156
|
...Le?.last4 ? { last_four: Le.last4 } : {},
|
|
16140
16157
|
...Le?.cardType ? { card_network: Le.cardType } : {}
|
|
16141
16158
|
},
|
|
16142
|
-
billing_address_id:
|
|
16159
|
+
billing_address_id: _e
|
|
16143
16160
|
}), w(!1);
|
|
16144
16161
|
},
|
|
16145
16162
|
() => {
|
|
@@ -16158,7 +16175,7 @@ function Qi({
|
|
|
16158
16175
|
let R = !1;
|
|
16159
16176
|
return (async () => {
|
|
16160
16177
|
try {
|
|
16161
|
-
const A = await
|
|
16178
|
+
const A = await b.vault.fetchCredentials(o);
|
|
16162
16179
|
R || await D(A);
|
|
16163
16180
|
} catch (A) {
|
|
16164
16181
|
console.error("Failed to fetch vault credentials:", A), R || h("Failed to initialize payment form");
|
|
@@ -16166,7 +16183,7 @@ function Qi({
|
|
|
16166
16183
|
})(), () => {
|
|
16167
16184
|
R = !0;
|
|
16168
16185
|
};
|
|
16169
|
-
}, [e, N, o,
|
|
16186
|
+
}, [e, N, o, b, D]);
|
|
16170
16187
|
const Ce = () => {
|
|
16171
16188
|
a || (G(), L(), h(void 0), w(!1), $(!1), n());
|
|
16172
16189
|
}, Pe = ve(() => {
|
|
@@ -16191,7 +16208,7 @@ function Qi({
|
|
|
16191
16208
|
mg,
|
|
16192
16209
|
{
|
|
16193
16210
|
vgsFieldState: B,
|
|
16194
|
-
networkError:
|
|
16211
|
+
networkError: _ ?? k ?? s
|
|
16195
16212
|
}
|
|
16196
16213
|
),
|
|
16197
16214
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-3 pt-2", children: [
|
|
@@ -16432,9 +16449,9 @@ function yg({
|
|
|
16432
16449
|
r(x);
|
|
16433
16450
|
}), v = m.useEffectEvent((x) => {
|
|
16434
16451
|
a(x);
|
|
16435
|
-
}),
|
|
16452
|
+
}), b = m.useEffectEvent(() => {
|
|
16436
16453
|
d?.();
|
|
16437
|
-
}),
|
|
16454
|
+
}), _ = m.useEffectEvent(() => t()), h = m.useEffectEvent(
|
|
16438
16455
|
(x) => {
|
|
16439
16456
|
c.current || (c.current = !0, x.status === "success" ? p({
|
|
16440
16457
|
success: !0,
|
|
@@ -16467,11 +16484,11 @@ function yg({
|
|
|
16467
16484
|
z && E.bind("vgs_3ds_challenge", P);
|
|
16468
16485
|
const $ = setInterval(async () => {
|
|
16469
16486
|
if (c.current || x) return;
|
|
16470
|
-
const F = await
|
|
16487
|
+
const F = await _();
|
|
16471
16488
|
x || !F || La(o, F.merchantTxId) && (F.completed ? h({ status: "success", merchantTxId: F.merchantTxId }) : F.failed ? h({
|
|
16472
16489
|
status: "failed",
|
|
16473
16490
|
errorMessage: F.errorMessage || `3DS verification ${F.status || "failed"}`
|
|
16474
|
-
}) : F.canceled && (c.current || (c.current = !0,
|
|
16491
|
+
}) : F.canceled && (c.current || (c.current = !0, b())));
|
|
16475
16492
|
}, vg), C = setTimeout(() => {
|
|
16476
16493
|
c.current || x || (console.error("[VGS 3DS] Timed out waiting for 3DS result"), h({
|
|
16477
16494
|
status: "failed",
|
|
@@ -16592,12 +16609,12 @@ function fl(e) {
|
|
|
16592
16609
|
}
|
|
16593
16610
|
};
|
|
16594
16611
|
}
|
|
16595
|
-
const
|
|
16612
|
+
const _g = (e) => new Promise((n) => {
|
|
16596
16613
|
const t = document.createElement("iframe");
|
|
16597
16614
|
t.srcdoc = e, t.style.display = "none", document.body.appendChild(t), setTimeout(() => {
|
|
16598
16615
|
document.body.removeChild(t), n();
|
|
16599
16616
|
}, 1e4);
|
|
16600
|
-
}),
|
|
16617
|
+
}), bg = {
|
|
16601
16618
|
subscribe: () => ({ bind: () => {
|
|
16602
16619
|
}, unbind: () => {
|
|
16603
16620
|
} }),
|
|
@@ -16631,14 +16648,14 @@ function es({
|
|
|
16631
16648
|
}) {
|
|
16632
16649
|
const [s, o] = m.useState(null), [d, c] = m.useState(null), u = m.useRef(null), f = m.useEffectEvent(
|
|
16633
16650
|
(F) => n(F)
|
|
16634
|
-
), p = m.useEffectEvent((F) => t(F)), v = m.useEffectEvent(() => r()),
|
|
16651
|
+
), p = m.useEffectEvent((F) => t(F)), v = m.useEffectEvent(() => r()), b = () => {
|
|
16635
16652
|
u.current = null, o(null), c(null);
|
|
16636
|
-
},
|
|
16637
|
-
u.current && (
|
|
16653
|
+
}, _ = async (F) => {
|
|
16654
|
+
u.current && (b(), await f(F));
|
|
16638
16655
|
}, h = (F) => {
|
|
16639
|
-
u.current && (
|
|
16656
|
+
u.current && (b(), p(F));
|
|
16640
16657
|
}, x = () => {
|
|
16641
|
-
u.current && (
|
|
16658
|
+
u.current && (b(), v());
|
|
16642
16659
|
}, w = (F) => Oa(F) === "three_ds_session_not_found" ? a("payment_verification_timed_out") : Eg(
|
|
16643
16660
|
F,
|
|
16644
16661
|
a("payment_verification_didnt_complete")
|
|
@@ -16660,12 +16677,12 @@ function es({
|
|
|
16660
16677
|
};
|
|
16661
16678
|
u.current = B, o(B);
|
|
16662
16679
|
try {
|
|
16663
|
-
D !== !1 && typeof T == "string" && T.length > 0 && await
|
|
16680
|
+
D !== !1 && typeof T == "string" && T.length > 0 && await _g(T);
|
|
16664
16681
|
const G = await e.confirmPaymentMethod3DS({
|
|
16665
16682
|
session_token: B.sessionToken
|
|
16666
16683
|
});
|
|
16667
16684
|
if (G.status === "approved") {
|
|
16668
|
-
await
|
|
16685
|
+
await _(G);
|
|
16669
16686
|
return;
|
|
16670
16687
|
}
|
|
16671
16688
|
if (!G.challenge_form) {
|
|
@@ -16688,7 +16705,7 @@ function es({
|
|
|
16688
16705
|
});
|
|
16689
16706
|
if (u.current !== N) return;
|
|
16690
16707
|
if (k.status === "approved") {
|
|
16691
|
-
await
|
|
16708
|
+
await _(k);
|
|
16692
16709
|
return;
|
|
16693
16710
|
}
|
|
16694
16711
|
h(a("payment_verification_didnt_complete"));
|
|
@@ -16715,7 +16732,7 @@ function es({
|
|
|
16715
16732
|
};
|
|
16716
16733
|
yg({
|
|
16717
16734
|
channelName: s ? `private-3ds-session-${s.sessionToken}` : "",
|
|
16718
|
-
transport:
|
|
16735
|
+
transport: bg,
|
|
16719
16736
|
checkStatus: P,
|
|
16720
16737
|
merchantTxId: s?.merchantTxId,
|
|
16721
16738
|
enabled: d !== null,
|
|
@@ -16918,8 +16935,8 @@ function kg({
|
|
|
16918
16935
|
{ customerId: e, limit: Ir },
|
|
16919
16936
|
{ enabled: u && d === "all" }
|
|
16920
16937
|
), p = f?.pages[0]?.counts, v = p && d !== "all" ? d : void 0, {
|
|
16921
|
-
data:
|
|
16922
|
-
isLoading:
|
|
16938
|
+
data: b,
|
|
16939
|
+
isLoading: _,
|
|
16923
16940
|
isError: h,
|
|
16924
16941
|
refetch: x,
|
|
16925
16942
|
fetchNextPage: w,
|
|
@@ -16929,11 +16946,11 @@ function kg({
|
|
|
16929
16946
|
{ customerId: e, limit: Ir, status: v },
|
|
16930
16947
|
{ enabled: u }
|
|
16931
16948
|
), P = m.useMemo(
|
|
16932
|
-
() =>
|
|
16933
|
-
[
|
|
16949
|
+
() => b?.pages.flatMap((B) => B.subscriptions) ?? [],
|
|
16950
|
+
[b]
|
|
16934
16951
|
), $ = m.useMemo(
|
|
16935
|
-
() =>
|
|
16936
|
-
[
|
|
16952
|
+
() => b?.pages[0]?.counts ?? p ?? Cg(P),
|
|
16953
|
+
[b, p, P]
|
|
16937
16954
|
), C = m.useMemo(
|
|
16938
16955
|
() => v ? P : P.filter((B) => hn(d, B)),
|
|
16939
16956
|
[P, v, d]
|
|
@@ -16975,7 +16992,7 @@ function kg({
|
|
|
16975
16992
|
t: o
|
|
16976
16993
|
}
|
|
16977
16994
|
),
|
|
16978
|
-
|
|
16995
|
+
_ || n ? /* @__PURE__ */ i.jsx("div", { className: "mt-8 grid grid-cols-1 gap-5 md:grid-cols-2", children: Array(4).fill(0).map((B, G) => /* @__PURE__ */ i.jsx(Gg, {}, G)) }) : h ? /* @__PURE__ */ i.jsx(Kg, { onRetry: () => x(), t: o }) : C.length === 0 ? /* @__PURE__ */ i.jsx(Wg, { filtered: d !== "all", t: o }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
16979
16996
|
(k || D.length > 0) && // Single grid for bundle cards + regular subscription cards so
|
|
16980
16997
|
// they share rows. CSS Grid's default `align-items: stretch`
|
|
16981
16998
|
// makes every cell in the same row match heights, which is
|
|
@@ -17257,12 +17274,12 @@ function Rg({
|
|
|
17257
17274
|
onResume: t,
|
|
17258
17275
|
t: r
|
|
17259
17276
|
}) {
|
|
17260
|
-
const a = xt(e.status, r), s = Jt(e.variant), o = e.quantity ?? 1, d = a.kind === "paused", c = a.kind === "cancelled", u = a.kind === "past_due", f = pl(e.subscription_plan, r), p = e.next_bill_date ? Hn(e.next_bill_date) : null, v = e.last_bill_date ? Hn(e.last_bill_date) : null,
|
|
17277
|
+
const a = xt(e.status, r), s = Jt(e.variant), o = e.quantity ?? 1, d = a.kind === "paused", c = a.kind === "cancelled", u = a.kind === "past_due", f = pl(e.subscription_plan, r), p = e.next_bill_date ? Hn(e.next_bill_date) : null, v = e.last_bill_date ? Hn(e.last_bill_date) : null, b = u && e.next_bill_date ? Math.max(
|
|
17261
17278
|
0,
|
|
17262
17279
|
Math.round(
|
|
17263
17280
|
(Date.now() - new Date(e.next_bill_date).getTime()) / (1e3 * 60 * 60 * 24)
|
|
17264
17281
|
)
|
|
17265
|
-
) : 0,
|
|
17282
|
+
) : 0, _ = jg(e.last_bill_date, e.next_bill_date, r), h = _ != null && !d && !c && !u;
|
|
17266
17283
|
return /* @__PURE__ */ i.jsxs(
|
|
17267
17284
|
"div",
|
|
17268
17285
|
{
|
|
@@ -17310,8 +17327,8 @@ function Rg({
|
|
|
17310
17327
|
"div",
|
|
17311
17328
|
{
|
|
17312
17329
|
className: `text-sm font-bold ${u ? "text-destructive" : "text-foreground"}`,
|
|
17313
|
-
children: u ?
|
|
17314
|
-
n: String(
|
|
17330
|
+
children: u ? b === 1 ? r("list_bill_due_1_day_ago") : b > 0 ? r("list_bill_due_n_days_ago", {
|
|
17331
|
+
n: String(b)
|
|
17315
17332
|
}) : r("list_bill_overdue") : r(d ? "list_last_bill_label" : "list_next_bill_label")
|
|
17316
17333
|
}
|
|
17317
17334
|
),
|
|
@@ -17343,7 +17360,7 @@ function Rg({
|
|
|
17343
17360
|
] })
|
|
17344
17361
|
] })
|
|
17345
17362
|
] }),
|
|
17346
|
-
h &&
|
|
17363
|
+
h && _ && /* @__PURE__ */ i.jsx(Vg, { cycle: _ })
|
|
17347
17364
|
]
|
|
17348
17365
|
}
|
|
17349
17366
|
),
|
|
@@ -17513,7 +17530,7 @@ function Yg({
|
|
|
17513
17530
|
}) {
|
|
17514
17531
|
const [s, o] = m.useState(1), [d, c] = m.useState(
|
|
17515
17532
|
() => /* @__PURE__ */ new Set()
|
|
17516
|
-
), u = m.useMemo(() => /* @__PURE__ */ new Date(), []), [f, p] = m.useState(u.getFullYear()), [v,
|
|
17533
|
+
), u = m.useMemo(() => /* @__PURE__ */ new Date(), []), [f, p] = m.useState(u.getFullYear()), [v, b] = m.useState(null), [_, h] = m.useState(null), [x, w] = m.useState(
|
|
17517
17534
|
() => Va(n, r)
|
|
17518
17535
|
), [E, z] = m.useState(() => qa(t, a));
|
|
17519
17536
|
m.useEffect(() => {
|
|
@@ -17543,23 +17560,23 @@ function Yg({
|
|
|
17543
17560
|
(j) => {
|
|
17544
17561
|
if (p(j), v != null) {
|
|
17545
17562
|
if (gl(j, v, $)) {
|
|
17546
|
-
|
|
17563
|
+
b(null), h(null);
|
|
17547
17564
|
return;
|
|
17548
17565
|
}
|
|
17549
|
-
|
|
17566
|
+
_ != null && fn(j, v, _, $) && h(null);
|
|
17550
17567
|
}
|
|
17551
17568
|
},
|
|
17552
|
-
[v,
|
|
17569
|
+
[v, _, $]
|
|
17553
17570
|
), F = m.useCallback(
|
|
17554
17571
|
(j) => {
|
|
17555
|
-
|
|
17572
|
+
b(j), _ != null && fn(f, j, _, $) && h(null);
|
|
17556
17573
|
},
|
|
17557
|
-
[
|
|
17558
|
-
), N = m.useCallback((j) => h(j), []), k = d.size >= 2, D = v !== null &&
|
|
17559
|
-
if (v == null ||
|
|
17560
|
-
const j = String(v + 1).padStart(2, "0"), K = String(
|
|
17574
|
+
[_, f, $]
|
|
17575
|
+
), N = m.useCallback((j) => h(j), []), k = d.size >= 2, D = v !== null && _ !== null && fn(f, v, _, $), T = v !== null && _ !== null && !D, B = x != null, G = E != null, I = m.useMemo(() => {
|
|
17576
|
+
if (v == null || _ == null) return null;
|
|
17577
|
+
const j = String(v + 1).padStart(2, "0"), K = String(_).padStart(2, "0");
|
|
17561
17578
|
return `${f}-${j}-${K}`;
|
|
17562
|
-
}, [f, v,
|
|
17579
|
+
}, [f, v, _]);
|
|
17563
17580
|
return {
|
|
17564
17581
|
step: s,
|
|
17565
17582
|
setStep: o,
|
|
@@ -17567,7 +17584,7 @@ function Yg({
|
|
|
17567
17584
|
toggleToken: P,
|
|
17568
17585
|
selectedYear: f,
|
|
17569
17586
|
selectedMonth: v,
|
|
17570
|
-
selectedDay:
|
|
17587
|
+
selectedDay: _,
|
|
17571
17588
|
setYear: C,
|
|
17572
17589
|
setMonth: F,
|
|
17573
17590
|
setDay: N,
|
|
@@ -17757,7 +17774,7 @@ function ty({
|
|
|
17757
17774
|
const { t: d } = se(), c = o.today.getFullYear(), u = m.useMemo(
|
|
17758
17775
|
() => [c, c + 1, c + 2],
|
|
17759
17776
|
[c]
|
|
17760
|
-
), f = (
|
|
17777
|
+
), f = (_) => ss(_, o), p = (_) => gl(e, _, o), v = n == null ? 31 : is(e, n), b = (_) => n == null ? !0 : fn(e, n, _, o);
|
|
17761
17778
|
return /* @__PURE__ */ i.jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto px-6 py-4", children: [
|
|
17762
17779
|
/* @__PURE__ */ i.jsxs("div", { className: "mt-2", children: [
|
|
17763
17780
|
/* @__PURE__ */ i.jsx("h3", { className: "text-foreground text-sm font-bold", children: d("bundle_select_new_bill_date") }),
|
|
@@ -17765,24 +17782,24 @@ function ty({
|
|
|
17765
17782
|
] }),
|
|
17766
17783
|
/* @__PURE__ */ i.jsxs("div", { className: "mt-6", children: [
|
|
17767
17784
|
/* @__PURE__ */ i.jsx("h4", { className: "text-foreground mb-3 text-xs font-bold", children: d("bundle_year") }),
|
|
17768
|
-
/* @__PURE__ */ i.jsx("div", { className: "grid grid-cols-3 gap-2", children: u.map((
|
|
17769
|
-
const h = e ===
|
|
17785
|
+
/* @__PURE__ */ i.jsx("div", { className: "grid grid-cols-3 gap-2", children: u.map((_) => {
|
|
17786
|
+
const h = e === _, x = f(_);
|
|
17770
17787
|
return /* @__PURE__ */ i.jsx(
|
|
17771
17788
|
"button",
|
|
17772
17789
|
{
|
|
17773
17790
|
type: "button",
|
|
17774
17791
|
disabled: x,
|
|
17775
|
-
onClick: () => r(
|
|
17792
|
+
onClick: () => r(_),
|
|
17776
17793
|
className: `rounded-lg px-3 py-2.5 text-xs font-semibold transition-all ${h ? "bg-primary text-primary-foreground" : "text-foreground ring-border hover:ring-foreground/20 bg-transparent ring-1"} ${x ? "cursor-not-allowed opacity-40" : ""}`,
|
|
17777
|
-
children:
|
|
17794
|
+
children: _
|
|
17778
17795
|
},
|
|
17779
|
-
|
|
17796
|
+
_
|
|
17780
17797
|
);
|
|
17781
17798
|
}) })
|
|
17782
17799
|
] }),
|
|
17783
17800
|
/* @__PURE__ */ i.jsxs("div", { className: "mt-6", children: [
|
|
17784
17801
|
/* @__PURE__ */ i.jsx("h4", { className: "text-foreground mb-3 text-xs font-bold", children: d("bundle_month") }),
|
|
17785
|
-
/* @__PURE__ */ i.jsx("div", { className: "grid grid-cols-4 gap-2", children: ey.map((
|
|
17802
|
+
/* @__PURE__ */ i.jsx("div", { className: "grid grid-cols-4 gap-2", children: ey.map((_, h) => {
|
|
17786
17803
|
const x = n === h, w = p(h);
|
|
17787
17804
|
return /* @__PURE__ */ i.jsx(
|
|
17788
17805
|
"button",
|
|
@@ -17791,27 +17808,27 @@ function ty({
|
|
|
17791
17808
|
disabled: w,
|
|
17792
17809
|
onClick: () => a(h),
|
|
17793
17810
|
className: `rounded-lg px-3 py-2.5 text-xs font-semibold transition-all ${x ? "bg-primary text-primary-foreground" : "text-foreground ring-border hover:ring-foreground/20 bg-transparent ring-1"} ${w ? "cursor-not-allowed opacity-40" : ""}`,
|
|
17794
|
-
children:
|
|
17811
|
+
children: _
|
|
17795
17812
|
},
|
|
17796
|
-
|
|
17813
|
+
_
|
|
17797
17814
|
);
|
|
17798
17815
|
}) })
|
|
17799
17816
|
] }),
|
|
17800
17817
|
/* @__PURE__ */ i.jsxs("div", { className: "mt-6", children: [
|
|
17801
17818
|
/* @__PURE__ */ i.jsx("h4", { className: "text-foreground mb-3 text-xs font-bold", children: d("bundle_day") }),
|
|
17802
|
-
/* @__PURE__ */ i.jsx("div", { className: "grid grid-cols-8 gap-1.5", children: Array.from({ length: v }, (
|
|
17803
|
-
(
|
|
17804
|
-
const h = t ===
|
|
17819
|
+
/* @__PURE__ */ i.jsx("div", { className: "grid grid-cols-8 gap-1.5", children: Array.from({ length: v }, (_, h) => h + 1).map(
|
|
17820
|
+
(_) => {
|
|
17821
|
+
const h = t === _, x = b(_);
|
|
17805
17822
|
return /* @__PURE__ */ i.jsx(
|
|
17806
17823
|
"button",
|
|
17807
17824
|
{
|
|
17808
17825
|
type: "button",
|
|
17809
17826
|
disabled: x,
|
|
17810
|
-
onClick: () => s(
|
|
17827
|
+
onClick: () => s(_),
|
|
17811
17828
|
className: `rounded-lg py-2 text-xs font-semibold transition-all ${h ? "bg-primary text-primary-foreground" : "text-foreground ring-border hover:ring-foreground/20 bg-transparent ring-1"} ${x ? "cursor-not-allowed opacity-40" : ""}`,
|
|
17812
|
-
children:
|
|
17829
|
+
children: _
|
|
17813
17830
|
},
|
|
17814
|
-
|
|
17831
|
+
_
|
|
17815
17832
|
);
|
|
17816
17833
|
}
|
|
17817
17834
|
) })
|
|
@@ -17977,7 +17994,7 @@ function ly({
|
|
|
17977
17994
|
isLoadingSubscriptions: p,
|
|
17978
17995
|
hasIncompleteSubscriptions: v
|
|
17979
17996
|
}) {
|
|
17980
|
-
const { t:
|
|
17997
|
+
const { t: b } = se(), { isMobile: _ } = mt(), h = Yg({
|
|
17981
17998
|
subscriptions: t,
|
|
17982
17999
|
addresses: r,
|
|
17983
18000
|
paymentMethods: a,
|
|
@@ -17997,7 +18014,7 @@ function ly({
|
|
|
17997
18014
|
}, P = h.canProceedFromStep1 && !p, $ = h.step === 1 && !P || h.step === 2 && !h.canProceedFromStep2 || h.step === 3 && !h.canProceedFromStep3, C = /* @__PURE__ */ i.jsxs(
|
|
17998
18015
|
"div",
|
|
17999
18016
|
{
|
|
18000
|
-
className:
|
|
18017
|
+
className: _ ? "flex min-h-[65dvh] flex-col" : "flex min-h-0 flex-1 flex-col",
|
|
18001
18018
|
children: [
|
|
18002
18019
|
/* @__PURE__ */ i.jsx(
|
|
18003
18020
|
Xg,
|
|
@@ -18057,7 +18074,7 @@ function ly({
|
|
|
18057
18074
|
type: "button",
|
|
18058
18075
|
onClick: E,
|
|
18059
18076
|
className: "text-foreground ring-border hover:bg-muted rounded-lg bg-transparent px-6 py-2.5 text-xs font-bold ring-1 transition-all",
|
|
18060
|
-
children: h.step === 1 ?
|
|
18077
|
+
children: h.step === 1 ? b("bundle_done") : b("bundle_back")
|
|
18061
18078
|
}
|
|
18062
18079
|
),
|
|
18063
18080
|
h.step < 4 ? /* @__PURE__ */ i.jsx(
|
|
@@ -18067,7 +18084,7 @@ function ly({
|
|
|
18067
18084
|
onClick: w,
|
|
18068
18085
|
disabled: $,
|
|
18069
18086
|
className: "bg-primary text-primary-foreground hover:bg-primary/90 rounded-lg px-6 py-2.5 text-xs font-bold transition-all disabled:cursor-not-allowed disabled:opacity-40",
|
|
18070
|
-
children:
|
|
18087
|
+
children: b("next")
|
|
18071
18088
|
}
|
|
18072
18089
|
) : /* @__PURE__ */ i.jsx(
|
|
18073
18090
|
"button",
|
|
@@ -18076,19 +18093,19 @@ function ly({
|
|
|
18076
18093
|
onClick: z,
|
|
18077
18094
|
disabled: !h.canProceedFromStep4 || f,
|
|
18078
18095
|
className: "bg-primary text-primary-foreground hover:bg-primary/90 inline-flex min-w-[140px] items-center justify-center rounded-lg px-6 py-2.5 text-xs font-bold transition-all disabled:cursor-not-allowed disabled:opacity-40",
|
|
18079
|
-
children: f ? /* @__PURE__ */ i.jsx("span", { className: "border-primary-foreground size-5 animate-spin rounded-full border-2 border-t-transparent" }) :
|
|
18096
|
+
children: f ? /* @__PURE__ */ i.jsx("span", { className: "border-primary-foreground size-5 animate-spin rounded-full border-2 border-t-transparent" }) : b("bundle_create")
|
|
18080
18097
|
}
|
|
18081
18098
|
)
|
|
18082
18099
|
] })
|
|
18083
18100
|
]
|
|
18084
18101
|
}
|
|
18085
18102
|
);
|
|
18086
|
-
return
|
|
18103
|
+
return _ ? /* @__PURE__ */ i.jsx(
|
|
18087
18104
|
Vr,
|
|
18088
18105
|
{
|
|
18089
18106
|
open: e,
|
|
18090
18107
|
onOpenChange: n,
|
|
18091
|
-
title:
|
|
18108
|
+
title: b("bundle_subscriptions"),
|
|
18092
18109
|
children: C
|
|
18093
18110
|
}
|
|
18094
18111
|
) : /* @__PURE__ */ i.jsx(Rs, { open: e, onOpenChange: n, children: /* @__PURE__ */ i.jsxs(
|
|
@@ -18097,7 +18114,7 @@ function ly({
|
|
|
18097
18114
|
side: "right",
|
|
18098
18115
|
className: "bg-background flex h-full w-full flex-col gap-0 p-0 sm:max-w-md",
|
|
18099
18116
|
children: [
|
|
18100
|
-
/* @__PURE__ */ i.jsx("div", { className: "border-border flex items-center justify-between border-b px-6 py-4", children: /* @__PURE__ */ i.jsx(qs, { className: "text-foreground text-base font-bold", children:
|
|
18117
|
+
/* @__PURE__ */ i.jsx("div", { className: "border-border flex items-center justify-between border-b px-6 py-4", children: /* @__PURE__ */ i.jsx(qs, { className: "text-foreground text-base font-bold", children: b("bundle_subscriptions") }) }),
|
|
18101
18118
|
C
|
|
18102
18119
|
]
|
|
18103
18120
|
}
|
|
@@ -18159,7 +18176,7 @@ function iy({
|
|
|
18159
18176
|
isLoadingCustomer: n,
|
|
18160
18177
|
onToast: t
|
|
18161
18178
|
}) {
|
|
18162
|
-
const { isMobile: r } = mt(), { navigate: a } = e1(), s = Me(), o = rn(), d = qr(), { t: c } = se(), { t: u } = lt(), { config: f } = t1(), { locale: p } = On(), { data: v } = Mo(),
|
|
18179
|
+
const { isMobile: r } = mt(), { navigate: a } = e1(), s = Me(), o = rn(), d = qr(), { t: c } = se(), { t: u } = lt(), { config: f } = t1(), { locale: p } = On(), { data: v } = Mo(), b = !!v?.bundle_subscriptions_enabled, { data: _ = [] } = je({
|
|
18163
18180
|
queryKey: Ee.addresses.list(),
|
|
18164
18181
|
queryFn: async () => (await o.fetchAddresses()).addresses.map(Ua),
|
|
18165
18182
|
enabled: !!e && !n
|
|
@@ -18185,7 +18202,7 @@ function iy({
|
|
|
18185
18202
|
),
|
|
18186
18203
|
[$]
|
|
18187
18204
|
), F = x?.pages[0]?.counts, N = F ? F.all - F.cancelled : C.length, { data: k } = U2({
|
|
18188
|
-
enabled: !!e && !n &&
|
|
18205
|
+
enabled: !!e && !n && b
|
|
18189
18206
|
}), [D, T] = m.useState(!1), B = m.useRef(!1);
|
|
18190
18207
|
m.useEffect(() => {
|
|
18191
18208
|
if (!D) {
|
|
@@ -18223,7 +18240,7 @@ function iy({
|
|
|
18223
18240
|
// record when an identical address already exists, ignoring `name`). Snapshot
|
|
18224
18241
|
// the current id set before the request and compare against the returned id.
|
|
18225
18242
|
mutationFn: async (A) => {
|
|
18226
|
-
const we = new Set(
|
|
18243
|
+
const we = new Set(_.map((he) => he.id)), de = await o.createAddress({
|
|
18227
18244
|
address: {
|
|
18228
18245
|
name: A.address.name,
|
|
18229
18246
|
street1: A.address.address1,
|
|
@@ -18324,11 +18341,11 @@ function iy({
|
|
|
18324
18341
|
isLoadingCustomer: n,
|
|
18325
18342
|
onSubscriptionClick: X,
|
|
18326
18343
|
onResume: (A) => X(A.subscription_token),
|
|
18327
|
-
onBundleClick:
|
|
18328
|
-
bundles:
|
|
18344
|
+
onBundleClick: b && N >= 2 ? q : void 0,
|
|
18345
|
+
bundles: b ? k : void 0
|
|
18329
18346
|
}
|
|
18330
18347
|
),
|
|
18331
|
-
|
|
18348
|
+
b && /* @__PURE__ */ i.jsx(
|
|
18332
18349
|
ly,
|
|
18333
18350
|
{
|
|
18334
18351
|
open: D,
|
|
@@ -18336,9 +18353,9 @@ function iy({
|
|
|
18336
18353
|
subscriptions: C,
|
|
18337
18354
|
isLoadingSubscriptions: G,
|
|
18338
18355
|
hasIncompleteSubscriptions: P && E,
|
|
18339
|
-
addresses:
|
|
18356
|
+
addresses: _,
|
|
18340
18357
|
paymentMethods: h,
|
|
18341
|
-
defaultAddressId:
|
|
18358
|
+
defaultAddressId: _.find((A) => A.default)?.id ?? _[0]?.id ?? null,
|
|
18342
18359
|
defaultPaymentMethodId: h.find((A) => A.default)?.id ?? h[0]?.id ?? null,
|
|
18343
18360
|
onAddAddress: () => U({ open: !0, selected: null }),
|
|
18344
18361
|
onAddPaymentMethod: () => ne(!0),
|
|
@@ -18354,7 +18371,7 @@ function iy({
|
|
|
18354
18371
|
isOpen: K.open,
|
|
18355
18372
|
onClose: () => U({ open: !1, selected: null }),
|
|
18356
18373
|
selectedAddress: K.selected,
|
|
18357
|
-
defaultCountry:
|
|
18374
|
+
defaultCountry: _.find((A) => A.default)?.country_code ?? f.countryIso ?? "US",
|
|
18358
18375
|
languageIso: p,
|
|
18359
18376
|
t: mr,
|
|
18360
18377
|
onSubmit: async (A) => {
|
|
@@ -18387,8 +18404,8 @@ function iy({
|
|
|
18387
18404
|
},
|
|
18388
18405
|
isSubmitting: De.isPending,
|
|
18389
18406
|
jwt: "",
|
|
18390
|
-
savedAddresses:
|
|
18391
|
-
defaultBillingAddressId:
|
|
18407
|
+
savedAddresses: _,
|
|
18408
|
+
defaultBillingAddressId: _.find((A) => A.default)?.id,
|
|
18392
18409
|
renderAddressFormDialog: ({ isOpen: A, onClose: we, onAddressCreated: de }) => /* @__PURE__ */ i.jsx(
|
|
18393
18410
|
An,
|
|
18394
18411
|
{
|
|
@@ -18396,7 +18413,7 @@ function iy({
|
|
|
18396
18413
|
isOpen: A,
|
|
18397
18414
|
onClose: we,
|
|
18398
18415
|
selectedAddress: null,
|
|
18399
|
-
defaultCountry:
|
|
18416
|
+
defaultCountry: _.find((he) => he.default)?.country_code ?? f.countryIso ?? "US",
|
|
18400
18417
|
languageIso: p,
|
|
18401
18418
|
t: mr,
|
|
18402
18419
|
onSubmit: async (he) => {
|
|
@@ -18416,7 +18433,7 @@ function iy({
|
|
|
18416
18433
|
ze.modal
|
|
18417
18434
|
] });
|
|
18418
18435
|
}
|
|
18419
|
-
function
|
|
18436
|
+
function C_(e) {
|
|
18420
18437
|
const n = rn(), t = m.useMemo(
|
|
18421
18438
|
() => fl(n),
|
|
18422
18439
|
[n]
|
|
@@ -18785,7 +18802,7 @@ class yy extends le {
|
|
|
18785
18802
|
}
|
|
18786
18803
|
set(t, r, a) {
|
|
18787
18804
|
const s = Je(t, 0);
|
|
18788
|
-
return s.setFullYear(a, 0, 4), s.setHours(0, 0, 0, 0),
|
|
18805
|
+
return s.setFullYear(a, 0, 4), s.setHours(0, 0, 0, 0), _1(s);
|
|
18789
18806
|
}
|
|
18790
18807
|
}
|
|
18791
18808
|
class xy extends le {
|
|
@@ -18801,7 +18818,7 @@ class xy extends le {
|
|
|
18801
18818
|
return t.setFullYear(a, 0, 1), t.setHours(0, 0, 0, 0), t;
|
|
18802
18819
|
}
|
|
18803
18820
|
}
|
|
18804
|
-
class
|
|
18821
|
+
class _y extends le {
|
|
18805
18822
|
constructor() {
|
|
18806
18823
|
super(...arguments);
|
|
18807
18824
|
V(this, "priority", 120);
|
|
@@ -18868,7 +18885,7 @@ class by extends le {
|
|
|
18868
18885
|
return t.setMonth((a - 1) * 3, 1), t.setHours(0, 0, 0, 0), t;
|
|
18869
18886
|
}
|
|
18870
18887
|
}
|
|
18871
|
-
class
|
|
18888
|
+
class by extends le {
|
|
18872
18889
|
constructor() {
|
|
18873
18890
|
super(...arguments);
|
|
18874
18891
|
V(this, "priority", 120);
|
|
@@ -19151,7 +19168,7 @@ class Cy extends le {
|
|
|
19151
19168
|
return r >= 1 && r <= 53;
|
|
19152
19169
|
}
|
|
19153
19170
|
set(t, r, a) {
|
|
19154
|
-
return
|
|
19171
|
+
return _1(zy(t, a));
|
|
19155
19172
|
}
|
|
19156
19173
|
}
|
|
19157
19174
|
const My = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ny = [
|
|
@@ -19845,7 +19862,7 @@ class Wy extends le {
|
|
|
19845
19862
|
set(t, r, a) {
|
|
19846
19863
|
return r.timestampIsSet ? t : Je(
|
|
19847
19864
|
t,
|
|
19848
|
-
t.getTime() -
|
|
19865
|
+
t.getTime() - b1(t) - a
|
|
19849
19866
|
);
|
|
19850
19867
|
}
|
|
19851
19868
|
}
|
|
@@ -19882,7 +19899,7 @@ class Ky extends le {
|
|
|
19882
19899
|
set(t, r, a) {
|
|
19883
19900
|
return r.timestampIsSet ? t : Je(
|
|
19884
19901
|
t,
|
|
19885
|
-
t.getTime() -
|
|
19902
|
+
t.getTime() - b1(t) - a
|
|
19886
19903
|
);
|
|
19887
19904
|
}
|
|
19888
19905
|
}
|
|
@@ -19918,8 +19935,8 @@ const Xy = {
|
|
|
19918
19935
|
Y: new gy(),
|
|
19919
19936
|
R: new yy(),
|
|
19920
19937
|
u: new xy(),
|
|
19921
|
-
Q: new
|
|
19922
|
-
q: new
|
|
19938
|
+
Q: new _y(),
|
|
19939
|
+
q: new by(),
|
|
19923
19940
|
M: new wy(),
|
|
19924
19941
|
L: new Ey(),
|
|
19925
19942
|
w: new Fy(),
|
|
@@ -19998,19 +20015,19 @@ function lx(e, n, t, r) {
|
|
|
19998
20015
|
}
|
|
19999
20016
|
if (e.length > 0 && nx.test(e))
|
|
20000
20017
|
return a();
|
|
20001
|
-
const
|
|
20018
|
+
const b = f.map((x) => x.priority).sort((x, w) => w - x).filter((x, w, E) => E.indexOf(x) === w).map(
|
|
20002
20019
|
(x) => f.filter((w) => w.priority === x).sort((w, E) => E.subPriority - w.subPriority)
|
|
20003
20020
|
).map((x) => x[0]);
|
|
20004
|
-
let
|
|
20005
|
-
if (isNaN(+
|
|
20021
|
+
let _ = ct(t, r?.in);
|
|
20022
|
+
if (isNaN(+_)) return a();
|
|
20006
20023
|
const h = {};
|
|
20007
|
-
for (const x of
|
|
20008
|
-
if (!x.validate(
|
|
20024
|
+
for (const x of b) {
|
|
20025
|
+
if (!x.validate(_, u))
|
|
20009
20026
|
return a();
|
|
20010
|
-
const w = x.set(
|
|
20011
|
-
Array.isArray(w) ? (
|
|
20027
|
+
const w = x.set(_, h, u);
|
|
20028
|
+
Array.isArray(w) ? (_ = w[0], Object.assign(h, w[1])) : _ = w;
|
|
20012
20029
|
}
|
|
20013
|
-
return
|
|
20030
|
+
return _;
|
|
20014
20031
|
}
|
|
20015
20032
|
function ax(e) {
|
|
20016
20033
|
return e.match(ex)[1].replace(tx, "'");
|
|
@@ -20031,7 +20048,7 @@ function sx({
|
|
|
20031
20048
|
m.useEffect(() => {
|
|
20032
20049
|
e || v(null);
|
|
20033
20050
|
}, [e]);
|
|
20034
|
-
const
|
|
20051
|
+
const b = async () => {
|
|
20035
20052
|
const h = t();
|
|
20036
20053
|
if (!(h instanceof Promise)) {
|
|
20037
20054
|
n(!1);
|
|
@@ -20045,7 +20062,7 @@ function sx({
|
|
|
20045
20062
|
} finally {
|
|
20046
20063
|
u(!1);
|
|
20047
20064
|
}
|
|
20048
|
-
},
|
|
20065
|
+
}, _ = () => {
|
|
20049
20066
|
p && r(p);
|
|
20050
20067
|
};
|
|
20051
20068
|
return /* @__PURE__ */ i.jsxs(
|
|
@@ -20084,7 +20101,7 @@ function sx({
|
|
|
20084
20101
|
Z,
|
|
20085
20102
|
{
|
|
20086
20103
|
variant: "outline",
|
|
20087
|
-
onClick:
|
|
20104
|
+
onClick: _,
|
|
20088
20105
|
disabled: f || !p,
|
|
20089
20106
|
className: "w-full",
|
|
20090
20107
|
children: d("cancel_dialog_pause_button")
|
|
@@ -20106,7 +20123,7 @@ function sx({
|
|
|
20106
20123
|
Z,
|
|
20107
20124
|
{
|
|
20108
20125
|
variant: "destructive",
|
|
20109
|
-
onClick:
|
|
20126
|
+
onClick: b,
|
|
20110
20127
|
disabled: f,
|
|
20111
20128
|
children: d(f ? "loading_ellipsis" : "cancel_dialog_confirm_button")
|
|
20112
20129
|
}
|
|
@@ -20206,7 +20223,7 @@ function mx(e, n, t) {
|
|
|
20206
20223
|
return a ? t("list_cadence_every_n_units", {
|
|
20207
20224
|
n: e,
|
|
20208
20225
|
unit: t(a.plural)
|
|
20209
|
-
}) : t("list_cadence_every_unit", { unit:
|
|
20226
|
+
}) : t("list_cadence_every_unit", { unit: _l(n) });
|
|
20210
20227
|
}
|
|
20211
20228
|
const ps = /* @__PURE__ */ new Set([
|
|
20212
20229
|
"active",
|
|
@@ -20216,7 +20233,7 @@ const ps = /* @__PURE__ */ new Set([
|
|
|
20216
20233
|
"past_due",
|
|
20217
20234
|
"pending"
|
|
20218
20235
|
]);
|
|
20219
|
-
function
|
|
20236
|
+
function _l(e) {
|
|
20220
20237
|
return e ? e.replace(/_/g, " ").replace(/\b\w/g, (n) => n.toUpperCase()) : "";
|
|
20221
20238
|
}
|
|
20222
20239
|
function kn(e, n = "en-US") {
|
|
@@ -20260,7 +20277,7 @@ function fx({
|
|
|
20260
20277
|
billingIntervalUnit: d = "month",
|
|
20261
20278
|
presentation: c = "dialog"
|
|
20262
20279
|
}) {
|
|
20263
|
-
const { t: u, locale: f } = se(), [p, v] = m.useState("indefinite"), [
|
|
20280
|
+
const { t: u, locale: f } = se(), [p, v] = m.useState("indefinite"), [b, _] = m.useState(
|
|
20264
20281
|
null
|
|
20265
20282
|
), h = X2(
|
|
20266
20283
|
o,
|
|
@@ -20269,26 +20286,26 @@ function fx({
|
|
|
20269
20286
|
), x = Array.from(
|
|
20270
20287
|
{ length: h },
|
|
20271
20288
|
(C, F) => F + 1
|
|
20272
|
-
), w =
|
|
20289
|
+
), w = b && s ? B1(
|
|
20273
20290
|
o,
|
|
20274
20291
|
d,
|
|
20275
|
-
|
|
20292
|
+
b,
|
|
20276
20293
|
s
|
|
20277
20294
|
) : null;
|
|
20278
20295
|
m.useEffect(() => {
|
|
20279
|
-
e && (v("indefinite"),
|
|
20296
|
+
e && (v("indefinite"), _(null));
|
|
20280
20297
|
}, [e]);
|
|
20281
20298
|
const E = () => {
|
|
20282
20299
|
if (p === "indefinite") {
|
|
20283
20300
|
t({ type: "indefinite" });
|
|
20284
20301
|
return;
|
|
20285
20302
|
}
|
|
20286
|
-
p === "order_count" &&
|
|
20303
|
+
p === "order_count" && b && t({
|
|
20287
20304
|
type: "order_count",
|
|
20288
|
-
numberOfOrders:
|
|
20305
|
+
numberOfOrders: b
|
|
20289
20306
|
});
|
|
20290
20307
|
}, z = (C) => {
|
|
20291
|
-
C || (v("indefinite"),
|
|
20308
|
+
C || (v("indefinite"), _(null)), n(C);
|
|
20292
20309
|
}, P = (() => {
|
|
20293
20310
|
if (p === "indefinite")
|
|
20294
20311
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
@@ -20298,7 +20315,7 @@ function fx({
|
|
|
20298
20315
|
" ",
|
|
20299
20316
|
u("pause_indefinite_message_suffix")
|
|
20300
20317
|
] });
|
|
20301
|
-
if (!
|
|
20318
|
+
if (!b) return null;
|
|
20302
20319
|
const C = w ? kn(w, f) : u("a_future_date");
|
|
20303
20320
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
20304
20321
|
u("pause_resume_message_prefix"),
|
|
@@ -20306,7 +20323,7 @@ function fx({
|
|
|
20306
20323
|
/* @__PURE__ */ i.jsx("span", { className: "font-semibold", children: C }),
|
|
20307
20324
|
u("pause_resume_message_suffix")
|
|
20308
20325
|
] });
|
|
20309
|
-
})(), $ = p === "order_count" && !
|
|
20326
|
+
})(), $ = p === "order_count" && !b;
|
|
20310
20327
|
return /* @__PURE__ */ i.jsxs(
|
|
20311
20328
|
Ve,
|
|
20312
20329
|
{
|
|
@@ -20364,8 +20381,8 @@ function fx({
|
|
|
20364
20381
|
/* @__PURE__ */ i.jsxs(
|
|
20365
20382
|
"select",
|
|
20366
20383
|
{
|
|
20367
|
-
value:
|
|
20368
|
-
onChange: (C) =>
|
|
20384
|
+
value: b ?? "",
|
|
20385
|
+
onChange: (C) => _(Number(C.target.value)),
|
|
20369
20386
|
className: "border-input bg-background focus:border-ring focus:ring-ring h-10 w-full rounded-md border px-3 py-2 text-sm focus:ring-2 focus:outline-hidden",
|
|
20370
20387
|
children: [
|
|
20371
20388
|
/* @__PURE__ */ i.jsx("option", { value: "", disabled: !0, children: u("select") }),
|
|
@@ -20416,7 +20433,7 @@ function vx({
|
|
|
20416
20433
|
defaultNextBillDate: s,
|
|
20417
20434
|
presentation: o = "dialog"
|
|
20418
20435
|
}) {
|
|
20419
|
-
const { t: d, locale: c } = se(), [u, f] = m.useState(void 0), [p, v] = m.useState(!1), [
|
|
20436
|
+
const { t: d, locale: c } = se(), [u, f] = m.useState(void 0), [p, v] = m.useState(!1), [b, _] = m.useState(null), h = /* @__PURE__ */ new Date();
|
|
20420
20437
|
h.setHours(0, 0, 0, 0);
|
|
20421
20438
|
const x = Pt(h, 1);
|
|
20422
20439
|
m.useEffect(() => {
|
|
@@ -20444,7 +20461,7 @@ function vx({
|
|
|
20444
20461
|
children: [
|
|
20445
20462
|
/* @__PURE__ */ i.jsx("div", { className: "space-y-4", children: /* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
|
|
20446
20463
|
/* @__PURE__ */ i.jsx($e, { className: "text-foreground text-sm font-semibold", children: d("resume_date") }),
|
|
20447
|
-
/* @__PURE__ */ i.jsx(n1, { container:
|
|
20464
|
+
/* @__PURE__ */ i.jsx(n1, { container: b, children: /* @__PURE__ */ i.jsxs(Vn, { open: p, onOpenChange: v, children: [
|
|
20448
20465
|
/* @__PURE__ */ i.jsx(qn, { asChild: !0, children: /* @__PURE__ */ i.jsxs(
|
|
20449
20466
|
Z,
|
|
20450
20467
|
{
|
|
@@ -20490,7 +20507,7 @@ function vx({
|
|
|
20490
20507
|
/* @__PURE__ */ i.jsx(
|
|
20491
20508
|
"div",
|
|
20492
20509
|
{
|
|
20493
|
-
ref:
|
|
20510
|
+
ref: _,
|
|
20494
20511
|
className: "pointer-events-none fixed inset-0 z-[9998]"
|
|
20495
20512
|
}
|
|
20496
20513
|
),
|
|
@@ -20566,9 +20583,9 @@ function xx({
|
|
|
20566
20583
|
presentation: f = "dialog",
|
|
20567
20584
|
title: p,
|
|
20568
20585
|
confirmLabel: v,
|
|
20569
|
-
description:
|
|
20586
|
+
description: b
|
|
20570
20587
|
}) {
|
|
20571
|
-
const { t:
|
|
20588
|
+
const { t: _, locale: h } = se(), [x, w] = m.useState(void 0), [E, z] = m.useState(!1), [P, $] = m.useState(null), C = /* @__PURE__ */ new Date();
|
|
20572
20589
|
C.setHours(0, 0, 0, 0);
|
|
20573
20590
|
const F = Pt(C, 1), N = wn(
|
|
20574
20591
|
o,
|
|
@@ -20632,20 +20649,20 @@ function xx({
|
|
|
20632
20649
|
x && t(st(x, "yyyy-MM-dd"));
|
|
20633
20650
|
}, G = (j) => {
|
|
20634
20651
|
j || (w(void 0), z(!1)), n(j);
|
|
20635
|
-
}, I = x ? kn(x, h) : s ? kn(vt(s), h) :
|
|
20652
|
+
}, I = x ? kn(x, h) : s ? kn(vt(s), h) : _("a_future_date");
|
|
20636
20653
|
return /* @__PURE__ */ i.jsxs(
|
|
20637
20654
|
Ve,
|
|
20638
20655
|
{
|
|
20639
20656
|
open: e,
|
|
20640
20657
|
onOpenChange: G,
|
|
20641
|
-
title: p ??
|
|
20642
|
-
description:
|
|
20658
|
+
title: p ?? _("edit_bill_date_title"),
|
|
20659
|
+
description: b ?? _("edit_bill_date_description"),
|
|
20643
20660
|
presentation: f,
|
|
20644
20661
|
contentOverflow: "visible",
|
|
20645
20662
|
children: [
|
|
20646
20663
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-4", children: [
|
|
20647
20664
|
/* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
|
|
20648
|
-
/* @__PURE__ */ i.jsx($e, { className: "text-foreground text-sm font-semibold", children:
|
|
20665
|
+
/* @__PURE__ */ i.jsx($e, { className: "text-foreground text-sm font-semibold", children: _("next_bill_date_label") }),
|
|
20649
20666
|
/* @__PURE__ */ i.jsx(n1, { container: P, children: /* @__PURE__ */ i.jsxs(Vn, { open: E, onOpenChange: z, children: [
|
|
20650
20667
|
/* @__PURE__ */ i.jsx(qn, { asChild: !0, children: /* @__PURE__ */ i.jsxs(
|
|
20651
20668
|
Z,
|
|
@@ -20656,7 +20673,7 @@ function xx({
|
|
|
20656
20673
|
!x && "text-muted-foreground hover:text-muted-foreground"
|
|
20657
20674
|
),
|
|
20658
20675
|
children: [
|
|
20659
|
-
x ? st(x, "MM/dd/yyyy") : /* @__PURE__ */ i.jsx("span", { children:
|
|
20676
|
+
x ? st(x, "MM/dd/yyyy") : /* @__PURE__ */ i.jsx("span", { children: _("date_placeholder") }),
|
|
20660
20677
|
/* @__PURE__ */ i.jsx(w1, { className: "text-muted-foreground ml-auto size-4" })
|
|
20661
20678
|
]
|
|
20662
20679
|
}
|
|
@@ -20693,24 +20710,24 @@ function xx({
|
|
|
20693
20710
|
}
|
|
20694
20711
|
),
|
|
20695
20712
|
x && /* @__PURE__ */ i.jsxs("div", { className: "text-muted-foreground text-xs", children: [
|
|
20696
|
-
|
|
20713
|
+
_("bill_date_preview_prefix"),
|
|
20697
20714
|
" ",
|
|
20698
20715
|
/* @__PURE__ */ i.jsx("span", { className: "font-semibold", children: I }),
|
|
20699
|
-
|
|
20716
|
+
_("bill_date_preview_suffix")
|
|
20700
20717
|
] }),
|
|
20701
20718
|
k.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
|
|
20702
|
-
/* @__PURE__ */ i.jsx($e, { className: "text-foreground text-sm font-semibold", children:
|
|
20719
|
+
/* @__PURE__ */ i.jsx($e, { className: "text-foreground text-sm font-semibold", children: _("your_other_subscriptions") }),
|
|
20703
20720
|
/* @__PURE__ */ i.jsx("div", { className: "border-border max-h-40 overflow-auto rounded-md border", children: /* @__PURE__ */ i.jsxs("table", { className: "w-full table-fixed text-sm", children: [
|
|
20704
20721
|
/* @__PURE__ */ i.jsx("thead", { className: "bg-muted text-muted-foreground sticky top-0", children: /* @__PURE__ */ i.jsxs("tr", { children: [
|
|
20705
20722
|
/* @__PURE__ */ i.jsx(
|
|
20706
20723
|
"th",
|
|
20707
20724
|
{
|
|
20708
20725
|
className: "w-6 p-2",
|
|
20709
|
-
"aria-label":
|
|
20726
|
+
"aria-label": _("other_subs_color_aria")
|
|
20710
20727
|
}
|
|
20711
20728
|
),
|
|
20712
|
-
/* @__PURE__ */ i.jsx("th", { className: "px-3 py-2 text-left font-medium", children:
|
|
20713
|
-
/* @__PURE__ */ i.jsx("th", { className: "w-28 px-3 py-2 text-left font-medium", children:
|
|
20729
|
+
/* @__PURE__ */ i.jsx("th", { className: "px-3 py-2 text-left font-medium", children: _("other_subs_product") }),
|
|
20730
|
+
/* @__PURE__ */ i.jsx("th", { className: "w-28 px-3 py-2 text-left font-medium", children: _("other_subs_bill_date") })
|
|
20714
20731
|
] }) }),
|
|
20715
20732
|
/* @__PURE__ */ i.jsx("tbody", { className: "divide-border divide-y", children: k.map((j) => /* @__PURE__ */ i.jsxs("tr", { children: [
|
|
20716
20733
|
/* @__PURE__ */ i.jsx("td", { className: "p-2", children: /* @__PURE__ */ i.jsx(
|
|
@@ -20755,7 +20772,7 @@ function xx({
|
|
|
20755
20772
|
variant: "outline",
|
|
20756
20773
|
className: "h-10 min-w-[70px] rounded p-3",
|
|
20757
20774
|
onClick: () => G(!1),
|
|
20758
|
-
children:
|
|
20775
|
+
children: _("edit_bill_date_cancel")
|
|
20759
20776
|
}
|
|
20760
20777
|
),
|
|
20761
20778
|
/* @__PURE__ */ i.jsx(
|
|
@@ -20765,7 +20782,7 @@ function xx({
|
|
|
20765
20782
|
className: "h-10 min-w-[70px] rounded p-3",
|
|
20766
20783
|
onClick: B,
|
|
20767
20784
|
disabled: !x || r,
|
|
20768
|
-
children: r ? /* @__PURE__ */ i.jsx("div", { className: "border-primary-foreground size-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : v ??
|
|
20785
|
+
children: r ? /* @__PURE__ */ i.jsx("div", { className: "border-primary-foreground size-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : v ?? _("edit_bill_date_action")
|
|
20769
20786
|
}
|
|
20770
20787
|
)
|
|
20771
20788
|
] }) })
|
|
@@ -20776,7 +20793,7 @@ function xx({
|
|
|
20776
20793
|
function Tn(...e) {
|
|
20777
20794
|
return Ws(Ks(e));
|
|
20778
20795
|
}
|
|
20779
|
-
const
|
|
20796
|
+
const _x = {
|
|
20780
20797
|
active: "bg-green-100 text-green-800",
|
|
20781
20798
|
paused: "bg-gray-100 text-gray-800",
|
|
20782
20799
|
cancelled: "bg-red-100 text-red-800",
|
|
@@ -20784,7 +20801,7 @@ const bx = {
|
|
|
20784
20801
|
inactive: "bg-gray-100 text-gray-800",
|
|
20785
20802
|
disabled: "bg-red-100 text-red-800",
|
|
20786
20803
|
past_due: "bg-gray-100 text-gray-800"
|
|
20787
|
-
},
|
|
20804
|
+
}, bx = {
|
|
20788
20805
|
active: "bg-green-500",
|
|
20789
20806
|
paused: "bg-gray-400",
|
|
20790
20807
|
cancelled: "bg-red-500",
|
|
@@ -20794,7 +20811,7 @@ const bx = {
|
|
|
20794
20811
|
past_due: "bg-gray-400"
|
|
20795
20812
|
};
|
|
20796
20813
|
function vs({ status: e, children: n }) {
|
|
20797
|
-
const t = e?.toLowerCase() ?? "", r =
|
|
20814
|
+
const t = e?.toLowerCase() ?? "", r = _x[t] ?? "bg-gray-100 text-gray-800", a = bx[t] ?? "bg-gray-400";
|
|
20798
20815
|
return /* @__PURE__ */ i.jsxs(
|
|
20799
20816
|
"span",
|
|
20800
20817
|
{
|
|
@@ -20822,13 +20839,13 @@ function wx({
|
|
|
20822
20839
|
recoveryDisabled: u = !1,
|
|
20823
20840
|
className: f
|
|
20824
20841
|
}) {
|
|
20825
|
-
const { t: p } = se(), v = n != null,
|
|
20842
|
+
const { t: p } = se(), v = n != null, b = v && (t ?? 0) >= 2, _ = v ? e ? p("past_due_banner_heading_retry_scheduled_for_product", {
|
|
20826
20843
|
product: e
|
|
20827
20844
|
}) : p("past_due_banner_heading_retry_scheduled") : e ? p("past_due_banner_heading_for_product", { product: e }) : p("past_due_banner_heading"), h = (() => {
|
|
20828
20845
|
if (!n) return p("past_due_retry_when_shortly");
|
|
20829
20846
|
const E = new Date(n).getTime() - Date.now();
|
|
20830
20847
|
return E < 6e4 ? p("past_due_retry_when_shortly") : E < 720 * 60 * 1e3 ? p("past_due_retry_when_few_hours") : p("past_due_retry_when_within_day");
|
|
20831
|
-
})(), x =
|
|
20848
|
+
})(), x = b ? p("past_due_banner_body_retry_failed", { when: h }) : p(v ? "past_due_banner_body_retry_scheduled" : "past_due_banner_body"), w = o ? p("retry_saved_payment", { method: o }) : p("retry_payment");
|
|
20832
20849
|
return /* @__PURE__ */ i.jsx(
|
|
20833
20850
|
"div",
|
|
20834
20851
|
{
|
|
@@ -20842,7 +20859,7 @@ function wx({
|
|
|
20842
20859
|
/* @__PURE__ */ i.jsx("div", { className: "bg-destructive/10 text-destructive mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-full", children: /* @__PURE__ */ i.jsx(e2, { className: "size-4", "aria-hidden": !0 }) }),
|
|
20843
20860
|
/* @__PURE__ */ i.jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-3", children: [
|
|
20844
20861
|
/* @__PURE__ */ i.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
20845
|
-
/* @__PURE__ */ i.jsx("h3", { className: "text-foreground text-base font-bold tracking-tight sm:text-lg", children:
|
|
20862
|
+
/* @__PURE__ */ i.jsx("h3", { className: "text-foreground text-base font-bold tracking-tight sm:text-lg", children: _ }),
|
|
20846
20863
|
/* @__PURE__ */ i.jsx("p", { className: "text-muted-foreground text-sm leading-relaxed", children: x })
|
|
20847
20864
|
] }),
|
|
20848
20865
|
(a || r) && /* @__PURE__ */ i.jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
@@ -20958,8 +20975,8 @@ function Ex({
|
|
|
20958
20975
|
}
|
|
20959
20976
|
)
|
|
20960
20977
|
] })
|
|
20961
|
-
] }), v = (
|
|
20962
|
-
r || a(
|
|
20978
|
+
] }), v = (b) => {
|
|
20979
|
+
r || a(b);
|
|
20963
20980
|
};
|
|
20964
20981
|
return o === "bottom-sheet" ? /* @__PURE__ */ i.jsx(
|
|
20965
20982
|
Ve,
|
|
@@ -21007,9 +21024,9 @@ function $x({
|
|
|
21007
21024
|
n: String(u),
|
|
21008
21025
|
unit: f ? a(f.plural) : t.billing_interval_unit
|
|
21009
21026
|
});
|
|
21010
|
-
const
|
|
21027
|
+
const b = a("bundled_with_plan_label", {
|
|
21011
21028
|
cadence: v
|
|
21012
|
-
}),
|
|
21029
|
+
}), _ = `#${d.subscription_token.slice(-8).toUpperCase()}`;
|
|
21013
21030
|
return /* @__PURE__ */ i.jsxs("div", { className: "border-border bg-background my-3 rounded-xl border p-4", children: [
|
|
21014
21031
|
/* @__PURE__ */ i.jsxs("div", { className: "text-foreground text-sm font-bold", children: [
|
|
21015
21032
|
a("bundled_with_title"),
|
|
@@ -21020,9 +21037,9 @@ function $x({
|
|
|
21020
21037
|
type: "button",
|
|
21021
21038
|
onClick: () => r(d.subscription_token),
|
|
21022
21039
|
className: "text-primary focus-visible:ring-foreground/30 rounded font-bold hover:underline focus-visible:ring-2 focus-visible:outline-none",
|
|
21023
|
-
children:
|
|
21040
|
+
children: _
|
|
21024
21041
|
}
|
|
21025
|
-
) : /* @__PURE__ */ i.jsx("span", { className: "text-primary font-bold", children:
|
|
21042
|
+
) : /* @__PURE__ */ i.jsx("span", { className: "text-primary font-bold", children: _ })
|
|
21026
21043
|
] }),
|
|
21027
21044
|
/* @__PURE__ */ i.jsx("p", { className: "text-muted-foreground mt-0.5 text-xs", children: a("bundled_with_subhead", { cadence: p }) }),
|
|
21028
21045
|
/* @__PURE__ */ i.jsx("div", { className: "mt-3 flex flex-col gap-0.5", children: o.map((h) => {
|
|
@@ -21065,7 +21082,7 @@ function $x({
|
|
|
21065
21082
|
})
|
|
21066
21083
|
] })
|
|
21067
21084
|
] }),
|
|
21068
|
-
/* @__PURE__ */ i.jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children:
|
|
21085
|
+
/* @__PURE__ */ i.jsx("span", { className: "text-muted-foreground shrink-0 text-xs", children: b })
|
|
21069
21086
|
] });
|
|
21070
21087
|
return r ? /* @__PURE__ */ i.jsx(
|
|
21071
21088
|
"button",
|
|
@@ -21208,9 +21225,9 @@ function Nx({
|
|
|
21208
21225
|
decrementAriaLabel: o,
|
|
21209
21226
|
incrementAriaLabel: d
|
|
21210
21227
|
}) {
|
|
21211
|
-
const c = m.useRef(null), [u, f] = m.useState(String(n)), p = m.useRef(n), v = m.useRef(null),
|
|
21228
|
+
const c = m.useRef(null), [u, f] = m.useState(String(n)), p = m.useRef(n), v = m.useRef(null), b = m.useRef(a);
|
|
21212
21229
|
m.useEffect(() => {
|
|
21213
|
-
|
|
21230
|
+
b.current = a;
|
|
21214
21231
|
}, [a]), m.useEffect(
|
|
21215
21232
|
() => () => {
|
|
21216
21233
|
v.current && clearTimeout(v.current);
|
|
@@ -21219,13 +21236,13 @@ function Nx({
|
|
|
21219
21236
|
), m.useEffect(() => {
|
|
21220
21237
|
typeof document < "u" && document.activeElement === c.current || f(String(n));
|
|
21221
21238
|
}, [n]);
|
|
21222
|
-
const
|
|
21239
|
+
const _ = (C) => {
|
|
21223
21240
|
v.current && clearTimeout(v.current), v.current = setTimeout(() => {
|
|
21224
|
-
|
|
21241
|
+
b.current(C), p.current = C;
|
|
21225
21242
|
}, 500);
|
|
21226
21243
|
}, h = parseInt(u, 10), x = Number.isFinite(h) && h > 0 ? h : n, w = r || x <= 1, E = r || t != null && x >= t, z = (C) => t != null ? Math.min(t, Math.max(1, C)) : Math.max(1, C), P = (C) => {
|
|
21227
21244
|
const F = z(x + C);
|
|
21228
|
-
F !== x && (f(String(F)),
|
|
21245
|
+
F !== x && (f(String(F)), _(F));
|
|
21229
21246
|
}, $ = re(
|
|
21230
21247
|
"text-muted-foreground hover:text-foreground hover:bg-muted flex h-7 w-7 shrink-0 items-center justify-center rounded-full shadow-xs disabled:cursor-not-allowed"
|
|
21231
21248
|
);
|
|
@@ -21269,7 +21286,7 @@ function Nx({
|
|
|
21269
21286
|
return;
|
|
21270
21287
|
}
|
|
21271
21288
|
const N = parseInt(F, 10);
|
|
21272
|
-
Number.isFinite(N) && N > 0 &&
|
|
21289
|
+
Number.isFinite(N) && N > 0 && _(z(N));
|
|
21273
21290
|
},
|
|
21274
21291
|
onBlur: () => {
|
|
21275
21292
|
v.current && clearTimeout(v.current);
|
|
@@ -21331,7 +21348,7 @@ function Px({
|
|
|
21331
21348
|
isUpdatingQuantity: s = !1,
|
|
21332
21349
|
onNavigateToSubscription: o
|
|
21333
21350
|
}) {
|
|
21334
|
-
const { t: d, locale: c } = se(), u = e.variant, f = u?.product, p = n ?? e.quantity, v = Kn(e),
|
|
21351
|
+
const { t: d, locale: c } = se(), u = e.variant, f = u?.product, p = n ?? e.quantity, v = Kn(e), b = v === "past_due", _ = `subscription-${e.subscription_token}-quantity`, h = W2(e), x = e.currency?.code, w = ux(
|
|
21335
21352
|
h.subtotalUnit,
|
|
21336
21353
|
h.totalUnit,
|
|
21337
21354
|
p,
|
|
@@ -21348,8 +21365,8 @@ function Px({
|
|
|
21348
21365
|
/* @__PURE__ */ i.jsxs("div", { className: "text-muted-foreground", children: [
|
|
21349
21366
|
/* @__PURE__ */ i.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
21350
21367
|
/* @__PURE__ */ i.jsxs("div", { className: "border-border border-r pr-4", children: [
|
|
21351
|
-
/* @__PURE__ */ i.jsx("div", { className: "text-muted-foreground mb-1 text-sm", children: d(
|
|
21352
|
-
/* @__PURE__ */ i.jsx("div", { className: "text-foreground text-2xl font-bold", children:
|
|
21368
|
+
/* @__PURE__ */ i.jsx("div", { className: "text-muted-foreground mb-1 text-sm", children: d(b ? "payment_failed_on" : "next_order_date") }),
|
|
21369
|
+
/* @__PURE__ */ i.jsx("div", { className: "text-foreground text-2xl font-bold", children: b ? e.last_failed_at ? R1(e.last_failed_at, c) : "—" : J2(
|
|
21353
21370
|
$,
|
|
21354
21371
|
v,
|
|
21355
21372
|
F,
|
|
@@ -21415,7 +21432,7 @@ function Px({
|
|
|
21415
21432
|
/* @__PURE__ */ i.jsx(
|
|
21416
21433
|
"label",
|
|
21417
21434
|
{
|
|
21418
|
-
htmlFor:
|
|
21435
|
+
htmlFor: _,
|
|
21419
21436
|
className: "text-muted-foreground mb-1 text-xs",
|
|
21420
21437
|
children: d("quantity_label")
|
|
21421
21438
|
}
|
|
@@ -21423,7 +21440,7 @@ function Px({
|
|
|
21423
21440
|
/* @__PURE__ */ i.jsx(
|
|
21424
21441
|
Nx,
|
|
21425
21442
|
{
|
|
21426
|
-
inputId:
|
|
21443
|
+
inputId: _,
|
|
21427
21444
|
quantity: p,
|
|
21428
21445
|
maxQuantity: e.subscription_plan.max_quantity,
|
|
21429
21446
|
isUpdatingQuantity: s,
|
|
@@ -21472,8 +21489,8 @@ function jx({
|
|
|
21472
21489
|
onEditBillDate: f,
|
|
21473
21490
|
renderPaymentMethod: p,
|
|
21474
21491
|
renderShippingAddress: v,
|
|
21475
|
-
renderAutoApplyPoints:
|
|
21476
|
-
presentation:
|
|
21492
|
+
renderAutoApplyPoints: b,
|
|
21493
|
+
presentation: _
|
|
21477
21494
|
}) {
|
|
21478
21495
|
const { t: h, locale: x } = se(), [w, E] = m.useState(!1), z = e.subscription_plan, P = e.quantity, $ = rt(
|
|
21479
21496
|
e.price * P,
|
|
@@ -21520,8 +21537,8 @@ function jx({
|
|
|
21520
21537
|
/* @__PURE__ */ i.jsxs("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
21521
21538
|
/* @__PURE__ */ i.jsx("h3", { className: "text-foreground text-sm/6 font-semibold", children: h("subscription_details") }),
|
|
21522
21539
|
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
21523
|
-
/* @__PURE__ */ i.jsx(vs, { status: C, children: ps.has(C) ? h(`list_status_${C}`) :
|
|
21524
|
-
n.menu.length > 0 && (
|
|
21540
|
+
/* @__PURE__ */ i.jsx(vs, { status: C, children: ps.has(C) ? h(`list_status_${C}`) : _l(C) }),
|
|
21541
|
+
n.menu.length > 0 && (_ === "bottom-sheet" ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
21525
21542
|
/* @__PURE__ */ i.jsx(
|
|
21526
21543
|
Z,
|
|
21527
21544
|
{
|
|
@@ -21686,7 +21703,7 @@ function jx({
|
|
|
21686
21703
|
]
|
|
21687
21704
|
}
|
|
21688
21705
|
)),
|
|
21689
|
-
|
|
21706
|
+
b?.({
|
|
21690
21707
|
autoApplyPoints: e.auto_apply_points,
|
|
21691
21708
|
pointsEnabled: e.points_enabled,
|
|
21692
21709
|
subscriptionToken: e.subscription_token,
|
|
@@ -21713,7 +21730,7 @@ function Ax({
|
|
|
21713
21730
|
/* @__PURE__ */ i.jsx("tbody", { className: "divide-border divide-y", children: e.orders.map((r) => /* @__PURE__ */ i.jsxs("tr", { children: [
|
|
21714
21731
|
/* @__PURE__ */ i.jsx("td", { className: "text-foreground py-2 pr-3 pl-3 font-medium", children: r.order_number ?? `#${r.id}` }),
|
|
21715
21732
|
/* @__PURE__ */ i.jsx("td", { className: "text-muted-foreground px-3 py-2", children: rl(r.created_at.split("T")[0] ?? "", t) }),
|
|
21716
|
-
/* @__PURE__ */ i.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ i.jsx(vs, { status: r.status, children: ps.has(r.status) ? n(`list_status_${r.status}`) :
|
|
21733
|
+
/* @__PURE__ */ i.jsx("td", { className: "px-3 py-2", children: /* @__PURE__ */ i.jsx(vs, { status: r.status, children: ps.has(r.status) ? n(`list_status_${r.status}`) : _l(r.status) }) }),
|
|
21717
21734
|
/* @__PURE__ */ i.jsx("td", { className: "text-foreground py-2 pr-3 pl-3 text-right", children: r.amount != null ? rt(
|
|
21718
21735
|
Number(r.amount),
|
|
21719
21736
|
r.currency_code,
|
|
@@ -21737,7 +21754,7 @@ function Hx({
|
|
|
21737
21754
|
onUpdatePaymentClick: f,
|
|
21738
21755
|
presentation: p = "dialog"
|
|
21739
21756
|
}) {
|
|
21740
|
-
const { t: v, locale:
|
|
21757
|
+
const { t: v, locale: b } = se(), _ = Me(), h = m.useRef(e);
|
|
21741
21758
|
h.current = e;
|
|
21742
21759
|
const [x, w] = m.useState(null), E = m.useCallback(
|
|
21743
21760
|
({
|
|
@@ -21756,7 +21773,7 @@ function Hx({
|
|
|
21756
21773
|
}), ee = ve && L.isFetching, S = L.data?.failed_cycle_waiver, W = S?.next_bill_date != null && S.next_ship_date != null ? V1({
|
|
21757
21774
|
nextBillDate: S.next_bill_date,
|
|
21758
21775
|
nextShipDate: S.next_ship_date,
|
|
21759
|
-
locale:
|
|
21776
|
+
locale: b,
|
|
21760
21777
|
timezone: Q?.timezone ?? "UTC"
|
|
21761
21778
|
}) : null, ge = ve && !ee && !L.isError && S?.eligible === !0 && W != null, me = I1({
|
|
21762
21779
|
subscriptionToken: e,
|
|
@@ -21779,11 +21796,11 @@ function Hx({
|
|
|
21779
21796
|
onError: (O, { subscriptionToken: ie }) => {
|
|
21780
21797
|
if (Fx(O)) {
|
|
21781
21798
|
if (Promise.all([
|
|
21782
|
-
|
|
21799
|
+
_.invalidateQueries({
|
|
21783
21800
|
queryKey: te.detail(ie),
|
|
21784
21801
|
exact: !0
|
|
21785
21802
|
}),
|
|
21786
|
-
|
|
21803
|
+
_.invalidateQueries({
|
|
21787
21804
|
queryKey: te.failedCycleWaiver(ie),
|
|
21788
21805
|
exact: !0
|
|
21789
21806
|
})
|
|
@@ -21850,10 +21867,10 @@ function Hx({
|
|
|
21850
21867
|
m.useEffect(() => {
|
|
21851
21868
|
j != null && Te != null && Te.startsWith(j) && K(null);
|
|
21852
21869
|
}, [j, Te]);
|
|
21853
|
-
const
|
|
21870
|
+
const _e = U?.subscription.quantity;
|
|
21854
21871
|
m.useEffect(() => {
|
|
21855
|
-
A != null &&
|
|
21856
|
-
}, [A,
|
|
21872
|
+
A != null && _e === A && we(null);
|
|
21873
|
+
}, [A, _e]), m.useEffect(
|
|
21857
21874
|
() => () => {
|
|
21858
21875
|
de.current && clearTimeout(de.current);
|
|
21859
21876
|
},
|
|
@@ -21897,7 +21914,7 @@ function Hx({
|
|
|
21897
21914
|
hasPendingSkip: ed(Q.subscription_skips),
|
|
21898
21915
|
canWaiveFailedCycle: ge,
|
|
21899
21916
|
isWaiverPreviewLoading: ee
|
|
21900
|
-
}), nr = Ne.isPending && Ne.variables?.subscriptionToken === e || me.isProcessing,
|
|
21917
|
+
}), nr = Ne.isPending && Ne.variables?.subscriptionToken === e || me.isProcessing, bl = Ce.isPending || Pe.isPending || q.isPending || R.isPending || X.isPending || He.isPending, bs = x === e, an = ze.isPending && ze.variables?.subscriptionToken === e, rr = nr || bs || an, ws = Ct(Q) || nr || an || bl, Es = bl || rr, $s = (O) => {
|
|
21901
21918
|
const ie = { customerId: ae };
|
|
21902
21919
|
O.type === "order_count" && (ie.numberOfOrders = O.numberOfOrders), Ce.mutate(
|
|
21903
21920
|
{ subscriptionToken: e, pauseParams: ie },
|
|
@@ -22121,21 +22138,21 @@ function Dx({
|
|
|
22121
22138
|
onUpdatePaymentClick: p,
|
|
22122
22139
|
presentation: v = "dialog"
|
|
22123
22140
|
}) {
|
|
22124
|
-
const { t:
|
|
22141
|
+
const { t: b } = se();
|
|
22125
22142
|
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
22126
22143
|
/* @__PURE__ */ i.jsx(Ja, { children: /* @__PURE__ */ i.jsx(c1, { children: /* @__PURE__ */ i.jsxs(u1, { className: "text-lg", children: [
|
|
22127
22144
|
/* @__PURE__ */ i.jsx(pr, { children: /* @__PURE__ */ i.jsx(
|
|
22128
|
-
|
|
22145
|
+
_o,
|
|
22129
22146
|
{
|
|
22130
22147
|
href: "#",
|
|
22131
|
-
onClick: (
|
|
22132
|
-
|
|
22148
|
+
onClick: (_) => {
|
|
22149
|
+
_.preventDefault(), n();
|
|
22133
22150
|
},
|
|
22134
|
-
children:
|
|
22151
|
+
children: b("breadcrumb")
|
|
22135
22152
|
}
|
|
22136
22153
|
) }),
|
|
22137
|
-
/* @__PURE__ */ i.jsx(
|
|
22138
|
-
/* @__PURE__ */ i.jsx(pr, { children: /* @__PURE__ */ i.jsx(m1, { className: "font-semibold", children:
|
|
22154
|
+
/* @__PURE__ */ i.jsx(bo, {}),
|
|
22155
|
+
/* @__PURE__ */ i.jsx(pr, { children: /* @__PURE__ */ i.jsx(m1, { className: "font-semibold", children: b("breadcrumb_detail", { token: e }) }) })
|
|
22139
22156
|
] }) }) }),
|
|
22140
22157
|
/* @__PURE__ */ i.jsx("div", { className: "mx-auto max-w-7xl px-4 py-4 sm:px-6 sm:py-6 lg:px-10 lg:py-8", children: /* @__PURE__ */ i.jsx(
|
|
22141
22158
|
Hx,
|
|
@@ -22170,11 +22187,11 @@ function kx({
|
|
|
22170
22187
|
showAddButton: f = !0,
|
|
22171
22188
|
isLoading: p = !1,
|
|
22172
22189
|
isPending: v = !1,
|
|
22173
|
-
className:
|
|
22174
|
-
presentation:
|
|
22190
|
+
className: b = "",
|
|
22191
|
+
presentation: _ = "dialog"
|
|
22175
22192
|
}) {
|
|
22176
22193
|
const { t: h } = lt(), x = u ?? h("add_a_payment_method"), [w, E] = m.useState(!1), z = m.useId(), P = n ? kl(n, h("card_expires")) : null;
|
|
22177
|
-
return /* @__PURE__ */ i.jsxs("div", { className: re("border-border mb-6 border-b pb-4",
|
|
22194
|
+
return /* @__PURE__ */ i.jsxs("div", { className: re("border-border mb-6 border-b pb-4", b), children: [
|
|
22178
22195
|
/* @__PURE__ */ i.jsxs(
|
|
22179
22196
|
"button",
|
|
22180
22197
|
{
|
|
@@ -22284,7 +22301,7 @@ function kx({
|
|
|
22284
22301
|
children: /* @__PURE__ */ i.jsx(
|
|
22285
22302
|
Q1,
|
|
22286
22303
|
{
|
|
22287
|
-
presentation:
|
|
22304
|
+
presentation: _,
|
|
22288
22305
|
onEdit: o ? () => o($) : void 0,
|
|
22289
22306
|
onDelete: d ? () => d($) : void 0,
|
|
22290
22307
|
onMakeDefault: !$.default && c ? () => c($) : void 0
|
|
@@ -22312,7 +22329,7 @@ function kx({
|
|
|
22312
22329
|
)
|
|
22313
22330
|
] });
|
|
22314
22331
|
}
|
|
22315
|
-
function
|
|
22332
|
+
function _t(e, n) {
|
|
22316
22333
|
return e === n;
|
|
22317
22334
|
}
|
|
22318
22335
|
async function ys(e, n) {
|
|
@@ -22337,7 +22354,7 @@ async function Tx(e) {
|
|
|
22337
22354
|
await ys(
|
|
22338
22355
|
e.queryClient,
|
|
22339
22356
|
e.updatedSubscriptionToken
|
|
22340
|
-
),
|
|
22357
|
+
), _t(
|
|
22341
22358
|
e.getLatestSubscriptionToken(),
|
|
22342
22359
|
e.updatedSubscriptionToken
|
|
22343
22360
|
) && !e.isExternallyDisabled() && e.notifyUpdated();
|
|
@@ -22400,9 +22417,9 @@ function Bx({
|
|
|
22400
22417
|
}) {
|
|
22401
22418
|
const { isMobile: c } = mt(), { t: u } = lt(), { t: f } = se(), { locale: p } = On(), v = m.useRef(n);
|
|
22402
22419
|
v.current = n;
|
|
22403
|
-
const
|
|
22404
|
-
|
|
22405
|
-
const
|
|
22420
|
+
const b = m.useRef(t);
|
|
22421
|
+
b.current = t;
|
|
22422
|
+
const _ = m.useRef(null), h = m.useRef(null), x = (M) => M !== null && _t(
|
|
22406
22423
|
v.current,
|
|
22407
22424
|
M
|
|
22408
22425
|
), w = m.useCallback(
|
|
@@ -22451,16 +22468,16 @@ function Bx({
|
|
|
22451
22468
|
onTimedOut: () => a?.(f("payment_retry_processing"))
|
|
22452
22469
|
}), me = O1({
|
|
22453
22470
|
onSuccess: ({ subscriptionToken: M }) => {
|
|
22454
|
-
|
|
22471
|
+
_t(
|
|
22455
22472
|
v.current,
|
|
22456
22473
|
M
|
|
22457
|
-
) && !
|
|
22474
|
+
) && !b.current && ge.start();
|
|
22458
22475
|
},
|
|
22459
22476
|
onError: async (M, { subscriptionToken: Y }) => {
|
|
22460
22477
|
await ys(
|
|
22461
22478
|
z,
|
|
22462
22479
|
Y
|
|
22463
|
-
),
|
|
22480
|
+
), _t(
|
|
22464
22481
|
v.current,
|
|
22465
22482
|
Y
|
|
22466
22483
|
) && s?.("Failed to queue retry", M);
|
|
@@ -22475,20 +22492,20 @@ function Bx({
|
|
|
22475
22492
|
queryClient: z,
|
|
22476
22493
|
updatedSubscriptionToken: M,
|
|
22477
22494
|
getLatestSubscriptionToken: () => v.current,
|
|
22478
|
-
isExternallyDisabled: () =>
|
|
22495
|
+
isExternallyDisabled: () => b.current,
|
|
22479
22496
|
queueRetry: (Y) => me.mutate({ subscriptionToken: Y }),
|
|
22480
22497
|
notifyUpdated: () => a?.(u("default_payment_method_updated"))
|
|
22481
22498
|
});
|
|
22482
22499
|
},
|
|
22483
22500
|
onError: (M, { subscriptionToken: Y }) => {
|
|
22484
|
-
|
|
22501
|
+
_t(
|
|
22485
22502
|
v.current,
|
|
22486
22503
|
Y
|
|
22487
22504
|
) && s?.(u("failed_to_update_payment_method"), M);
|
|
22488
22505
|
}
|
|
22489
22506
|
}), ze = (M) => {
|
|
22490
|
-
const Y =
|
|
22491
|
-
if (!x(Y) ||
|
|
22507
|
+
const Y = _.current;
|
|
22508
|
+
if (!x(Y) || b.current)
|
|
22492
22509
|
return;
|
|
22493
22510
|
const Ye = k.current;
|
|
22494
22511
|
k.current = !1, Ye ? a?.(u("payment_method_added")) : Ne.mutate({
|
|
@@ -22499,13 +22516,13 @@ function Bx({
|
|
|
22499
22516
|
payApi: E,
|
|
22500
22517
|
t: w,
|
|
22501
22518
|
onApproved: async (M) => {
|
|
22502
|
-
const Y =
|
|
22519
|
+
const Y = _.current;
|
|
22503
22520
|
x(Y) && (await z.invalidateQueries({
|
|
22504
22521
|
queryKey: Ee.paymentMethods.all
|
|
22505
22522
|
}), N(!1), ze(M.payment_method.id));
|
|
22506
22523
|
},
|
|
22507
22524
|
onFailed: (M) => {
|
|
22508
|
-
const Y =
|
|
22525
|
+
const Y = _.current;
|
|
22509
22526
|
x(Y) && U(M);
|
|
22510
22527
|
},
|
|
22511
22528
|
onCanceled: () => {
|
|
@@ -22514,13 +22531,13 @@ function Bx({
|
|
|
22514
22531
|
m.useEffect(() => {
|
|
22515
22532
|
const M = J.current !== n;
|
|
22516
22533
|
M && (J.current = n, k.current = !1, T(null), G(null), j(void 0), U(null));
|
|
22517
|
-
const Y =
|
|
22518
|
-
!Fe.isActive && (M || Y) && (
|
|
22534
|
+
const Y = _.current !== null && _.current !== n;
|
|
22535
|
+
!Fe.isActive && (M || Y) && (_.current = null, N(!1));
|
|
22519
22536
|
}, [Fe.isActive, N, n]);
|
|
22520
22537
|
const De = ts({
|
|
22521
22538
|
begin: Fe.begin,
|
|
22522
22539
|
onCreated: (M) => {
|
|
22523
|
-
const Y =
|
|
22540
|
+
const Y = _.current;
|
|
22524
22541
|
x(Y) && (z.invalidateQueries({
|
|
22525
22542
|
queryKey: Ee.paymentMethods.all
|
|
22526
22543
|
}), N(!1), ze(M));
|
|
@@ -22544,10 +22561,10 @@ function Bx({
|
|
|
22544
22561
|
browser_info: Zi()
|
|
22545
22562
|
}),
|
|
22546
22563
|
onSuccess: async (M) => {
|
|
22547
|
-
x(
|
|
22564
|
+
x(_.current) && await De(M);
|
|
22548
22565
|
},
|
|
22549
22566
|
onError: (M) => {
|
|
22550
|
-
const Y =
|
|
22567
|
+
const Y = _.current;
|
|
22551
22568
|
x(Y) && s?.(u("failed_to_add_payment_method"), M);
|
|
22552
22569
|
}
|
|
22553
22570
|
}), Pe = fe({
|
|
@@ -22637,7 +22654,7 @@ function Bx({
|
|
|
22637
22654
|
}), A = Ox(
|
|
22638
22655
|
ne,
|
|
22639
22656
|
e
|
|
22640
|
-
), we = A.find((M) => M.id === e.id) ?? Lx(e), de = Pe.isPending || q.isPending || R.isPending || X.isPending, he = Ce.isPending || Fe.isActive, He = Ne.isPending || me.isPending || ge.isProcessing || he || de, Te = Ne.isPending && Ne.variables?.subscriptionToken === n || me.isPending && me.variables?.subscriptionToken === n || ge.isProcessing || he &&
|
|
22657
|
+
), we = A.find((M) => M.id === e.id) ?? Lx(e), de = Pe.isPending || q.isPending || R.isPending || X.isPending, he = Ce.isPending || Fe.isActive, He = Ne.isPending || me.isPending || ge.isProcessing || he || de, Te = Ne.isPending && Ne.variables?.subscriptionToken === n || me.isPending && me.variables?.subscriptionToken === n || ge.isProcessing || he && _.current === n || de && h.current === n, _e = t || He;
|
|
22641
22658
|
m.useEffect(() => {
|
|
22642
22659
|
r?.({
|
|
22643
22660
|
subscriptionToken: n,
|
|
@@ -22653,7 +22670,7 @@ function Bx({
|
|
|
22653
22670
|
[r, n]
|
|
22654
22671
|
);
|
|
22655
22672
|
const Le = async () => {
|
|
22656
|
-
if (
|
|
22673
|
+
if (_e || !B) return;
|
|
22657
22674
|
const M = n;
|
|
22658
22675
|
h.current = M, j(void 0);
|
|
22659
22676
|
try {
|
|
@@ -22673,24 +22690,24 @@ function Bx({
|
|
|
22673
22690
|
displayPaymentMethod: we,
|
|
22674
22691
|
paymentMethodList: A,
|
|
22675
22692
|
onAddPaymentMethodClick: () => {
|
|
22676
|
-
|
|
22693
|
+
_e || (k.current = !0, N(!0));
|
|
22677
22694
|
},
|
|
22678
22695
|
addPaymentMethodLabel: u("add_payment_method_action"),
|
|
22679
22696
|
showAddButton: !0,
|
|
22680
22697
|
isLoading: Q,
|
|
22681
|
-
isPending:
|
|
22698
|
+
isPending: _e,
|
|
22682
22699
|
selectedPaymentMethodId: e.id,
|
|
22683
22700
|
onSelectPaymentMethod: (M) => {
|
|
22684
|
-
|
|
22701
|
+
_e || M.id === e.id || Ne.mutate({
|
|
22685
22702
|
subscriptionToken: n,
|
|
22686
22703
|
body: { payment_method_id: M.id }
|
|
22687
22704
|
});
|
|
22688
22705
|
},
|
|
22689
|
-
onEditPaymentMethod:
|
|
22690
|
-
onDeletePaymentMethod:
|
|
22706
|
+
onEditPaymentMethod: _e ? void 0 : (M) => T(M),
|
|
22707
|
+
onDeletePaymentMethod: _e ? void 0 : (M) => {
|
|
22691
22708
|
j(void 0), G(M);
|
|
22692
22709
|
},
|
|
22693
|
-
onMakeDefaultPaymentMethod:
|
|
22710
|
+
onMakeDefaultPaymentMethod: _e ? void 0 : (M) => {
|
|
22694
22711
|
h.current = n, X.mutate(M);
|
|
22695
22712
|
}
|
|
22696
22713
|
}
|
|
@@ -22701,20 +22718,20 @@ function Bx({
|
|
|
22701
22718
|
presentation: c ? "bottom-sheet" : "dialog",
|
|
22702
22719
|
isOpen: F,
|
|
22703
22720
|
onClose: () => {
|
|
22704
|
-
Fe.isActive || (k.current = !1,
|
|
22721
|
+
Fe.isActive || (k.current = !1, _.current = null, U(null), N(!1));
|
|
22705
22722
|
},
|
|
22706
22723
|
error: K ?? void 0,
|
|
22707
22724
|
t: w,
|
|
22708
22725
|
onSubmit: async (M) => {
|
|
22709
|
-
if (!
|
|
22710
|
-
|
|
22726
|
+
if (!_e) {
|
|
22727
|
+
_.current = n, U(null);
|
|
22711
22728
|
try {
|
|
22712
22729
|
await Ce.mutateAsync(M);
|
|
22713
22730
|
} catch {
|
|
22714
22731
|
}
|
|
22715
22732
|
}
|
|
22716
22733
|
},
|
|
22717
|
-
isSubmitting:
|
|
22734
|
+
isSubmitting: _e,
|
|
22718
22735
|
jwt: "",
|
|
22719
22736
|
savedAddresses: ae,
|
|
22720
22737
|
defaultBillingAddressId: ae.find((M) => M.default)?.id,
|
|
@@ -22727,7 +22744,7 @@ function Bx({
|
|
|
22727
22744
|
selectedAddress: null,
|
|
22728
22745
|
t: w,
|
|
22729
22746
|
onSubmit: async (qe) => {
|
|
22730
|
-
if (
|
|
22747
|
+
if (_e) return;
|
|
22731
22748
|
const At = n;
|
|
22732
22749
|
h.current = At;
|
|
22733
22750
|
try {
|
|
@@ -22736,7 +22753,7 @@ function Bx({
|
|
|
22736
22753
|
} catch {
|
|
22737
22754
|
}
|
|
22738
22755
|
},
|
|
22739
|
-
isSubmitting:
|
|
22756
|
+
isSubmitting: _e,
|
|
22740
22757
|
countries: ee,
|
|
22741
22758
|
fetchStates: W,
|
|
22742
22759
|
languageIso: p
|
|
@@ -22754,7 +22771,7 @@ function Bx({
|
|
|
22754
22771
|
billingAddress: D?.billing_address ?? null,
|
|
22755
22772
|
onClose: () => T(null),
|
|
22756
22773
|
onSubmit: async (M) => {
|
|
22757
|
-
if (
|
|
22774
|
+
if (_e || !D) return;
|
|
22758
22775
|
const Y = n;
|
|
22759
22776
|
h.current = Y;
|
|
22760
22777
|
try {
|
|
@@ -22765,7 +22782,7 @@ function Bx({
|
|
|
22765
22782
|
} catch {
|
|
22766
22783
|
}
|
|
22767
22784
|
},
|
|
22768
|
-
isSubmitting:
|
|
22785
|
+
isSubmitting: _e,
|
|
22769
22786
|
countries: ee,
|
|
22770
22787
|
fetchStates: W,
|
|
22771
22788
|
languageIso: p
|
|
@@ -22784,7 +22801,7 @@ function Bx({
|
|
|
22784
22801
|
},
|
|
22785
22802
|
onAction: Le,
|
|
22786
22803
|
errorMsg: I,
|
|
22787
|
-
isLoading:
|
|
22804
|
+
isLoading: _e
|
|
22788
22805
|
}
|
|
22789
22806
|
)
|
|
22790
22807
|
] });
|
|
@@ -22809,12 +22826,12 @@ function xs({
|
|
|
22809
22826
|
showAddButton: f = !0,
|
|
22810
22827
|
isLoading: p = !1,
|
|
22811
22828
|
isPending: v = !1,
|
|
22812
|
-
defaultOpen:
|
|
22813
|
-
className:
|
|
22829
|
+
defaultOpen: b = !1,
|
|
22830
|
+
className: _ = "",
|
|
22814
22831
|
presentation: h = "dialog"
|
|
22815
22832
|
}) {
|
|
22816
|
-
const { t: x } = lt(), w = u ?? x("add_an_address"), [E, z] = m.useState(
|
|
22817
|
-
return /* @__PURE__ */ i.jsxs("div", { className: re("border-border mb-6 border-b pb-4",
|
|
22833
|
+
const { t: x } = lt(), w = u ?? x("add_an_address"), [E, z] = m.useState(b), P = m.useId();
|
|
22834
|
+
return /* @__PURE__ */ i.jsxs("div", { className: re("border-border mb-6 border-b pb-4", _), children: [
|
|
22818
22835
|
/* @__PURE__ */ i.jsxs(
|
|
22819
22836
|
"button",
|
|
22820
22837
|
{
|
|
@@ -22973,22 +22990,22 @@ function Gx({
|
|
|
22973
22990
|
}) {
|
|
22974
22991
|
const { isMobile: o } = mt(), { t: d } = lt(), { t: c } = se(), { config: u } = t1(), { locale: f } = On(), p = m.useRef(t);
|
|
22975
22992
|
p.current = t;
|
|
22976
|
-
const v = (S) =>
|
|
22993
|
+
const v = (S) => _t(
|
|
22977
22994
|
p.current,
|
|
22978
22995
|
S
|
|
22979
|
-
),
|
|
22996
|
+
), b = m.useCallback(
|
|
22980
22997
|
(S) => d(S),
|
|
22981
22998
|
[d]
|
|
22982
|
-
),
|
|
22983
|
-
() => fl(
|
|
22984
|
-
[
|
|
22999
|
+
), _ = rn(), h = Me(), x = m.useMemo(
|
|
23000
|
+
() => fl(_),
|
|
23001
|
+
[_]
|
|
22985
23002
|
), [w, E] = m.useState(!1), [z, P] = m.useState(null), [$, C] = m.useState(null), [F, N] = m.useState(void 0), k = m.useRef(t);
|
|
22986
23003
|
m.useEffect(() => {
|
|
22987
23004
|
k.current !== t && (k.current = t, E(!1), P(null), C(null), N(void 0));
|
|
22988
23005
|
}, [t]);
|
|
22989
23006
|
const { data: D = [], isLoading: T } = je({
|
|
22990
23007
|
queryKey: Ee.addresses.list(),
|
|
22991
|
-
queryFn: async () => (await
|
|
23008
|
+
queryFn: async () => (await _.fetchAddresses()).addresses.map(Vx)
|
|
22992
23009
|
}), B = qr(), { data: G } = je({
|
|
22993
23010
|
queryKey: Rr.countries(f),
|
|
22994
23011
|
queryFn: () => B.listCountries({ languageIso: f }),
|
|
@@ -23021,7 +23038,7 @@ function Gx({
|
|
|
23021
23038
|
mutationFn: async ({
|
|
23022
23039
|
body: S
|
|
23023
23040
|
}) => {
|
|
23024
|
-
const W = new Set(D.map((me) => me.id)), ge = await
|
|
23041
|
+
const W = new Set(D.map((me) => me.id)), ge = await _.createAddress({
|
|
23025
23042
|
address: {
|
|
23026
23043
|
name: S.address.name,
|
|
23027
23044
|
street1: S.address.address1,
|
|
@@ -23046,7 +23063,7 @@ function Gx({
|
|
|
23046
23063
|
mutationFn: ({
|
|
23047
23064
|
addressId: S,
|
|
23048
23065
|
body: W
|
|
23049
|
-
}) =>
|
|
23066
|
+
}) => _.updateAddress(S, {
|
|
23050
23067
|
address: {
|
|
23051
23068
|
name: W.address.name,
|
|
23052
23069
|
street1: W.address.address1,
|
|
@@ -23068,14 +23085,14 @@ function Gx({
|
|
|
23068
23085
|
}), Q = fe({
|
|
23069
23086
|
mutationFn: ({
|
|
23070
23087
|
addressId: S
|
|
23071
|
-
}) =>
|
|
23088
|
+
}) => _.deleteAddress(S),
|
|
23072
23089
|
onSuccess: (S, { subscriptionToken: W }) => {
|
|
23073
23090
|
h.invalidateQueries({ queryKey: Ee.addresses.all }), v(W) && a?.(d("address_deleted"));
|
|
23074
23091
|
}
|
|
23075
23092
|
}), ae = fe({
|
|
23076
23093
|
mutationFn: ({
|
|
23077
23094
|
address: S
|
|
23078
|
-
}) =>
|
|
23095
|
+
}) => _.updateAddress(S.id, {
|
|
23079
23096
|
address: {
|
|
23080
23097
|
name: S.name ?? null,
|
|
23081
23098
|
street1: S.address1 ?? "",
|
|
@@ -23156,7 +23173,7 @@ function Gx({
|
|
|
23156
23173
|
selectedAddress: z,
|
|
23157
23174
|
defaultCountry: D.find((S) => S.default)?.country_code ?? n?.country_code ?? u.countryIso ?? "US",
|
|
23158
23175
|
languageIso: f,
|
|
23159
|
-
t:
|
|
23176
|
+
t: b,
|
|
23160
23177
|
onSubmit: async (S) => {
|
|
23161
23178
|
const W = t;
|
|
23162
23179
|
try {
|
|
@@ -23244,12 +23261,12 @@ function Wx({
|
|
|
23244
23261
|
}
|
|
23245
23262
|
});
|
|
23246
23263
|
}
|
|
23247
|
-
function
|
|
23264
|
+
function _s(e) {
|
|
23248
23265
|
return e.pointsEnabled !== !0 ? !1 : e.renewalBundle != null || e.hasFallbackWrite;
|
|
23249
23266
|
}
|
|
23250
23267
|
function Kx(e) {
|
|
23251
23268
|
return {
|
|
23252
|
-
visible:
|
|
23269
|
+
visible: _s({
|
|
23253
23270
|
pointsEnabled: e.pointsEnabled,
|
|
23254
23271
|
renewalBundle: e.renewalBundle,
|
|
23255
23272
|
hasFallbackWrite: e.hasFallbackWrite
|
|
@@ -23354,8 +23371,8 @@ function Jx({
|
|
|
23354
23371
|
onSuccess: u,
|
|
23355
23372
|
onError: f
|
|
23356
23373
|
}) {
|
|
23357
|
-
const { t: p } = se(), v = m.useId(),
|
|
23358
|
-
|
|
23374
|
+
const { t: p } = se(), v = m.useId(), b = Me(), _ = m.useRef(t);
|
|
23375
|
+
_.current = t;
|
|
23359
23376
|
const [h, x] = m.useState(null), w = m.useRef(!1), [E, z] = m.useState(t);
|
|
23360
23377
|
t !== E && (z(t), x(null), w.current = !1);
|
|
23361
23378
|
const P = fe({
|
|
@@ -23372,13 +23389,13 @@ function Jx({
|
|
|
23372
23389
|
autoApplyPoints: B
|
|
23373
23390
|
}) => {
|
|
23374
23391
|
for (const I of o.lists)
|
|
23375
|
-
|
|
23376
|
-
if (await
|
|
23392
|
+
b.invalidateQueries({ queryKey: I });
|
|
23393
|
+
if (await b.refetchQueries({
|
|
23377
23394
|
queryKey: o.detail(T),
|
|
23378
23395
|
exact: !0
|
|
23379
|
-
}),
|
|
23396
|
+
}), _.current !== T)
|
|
23380
23397
|
return;
|
|
23381
|
-
if (
|
|
23398
|
+
if (b.getQueryData(
|
|
23382
23399
|
o.detail(T)
|
|
23383
23400
|
)?.subscription.auto_apply_points !== B) {
|
|
23384
23401
|
u?.(
|
|
@@ -23392,7 +23409,7 @@ function Jx({
|
|
|
23392
23409
|
u?.(p("auto_apply_points_updated", { label: s }));
|
|
23393
23410
|
},
|
|
23394
23411
|
onError: (D, { subscriptionToken: T }) => {
|
|
23395
|
-
|
|
23412
|
+
_.current === T && f?.(
|
|
23396
23413
|
p("failed_to_update_auto_apply_points", { label: s }),
|
|
23397
23414
|
D
|
|
23398
23415
|
);
|
|
@@ -23519,7 +23536,7 @@ function Jx({
|
|
|
23519
23536
|
) : null
|
|
23520
23537
|
] }) : null;
|
|
23521
23538
|
}
|
|
23522
|
-
function
|
|
23539
|
+
function e_(e) {
|
|
23523
23540
|
const { data: n } = Ko(), t = m.useContext(Eo), r = Ae(), a = m.useCallback(
|
|
23524
23541
|
({
|
|
23525
23542
|
subscriptionToken: s,
|
|
@@ -23529,7 +23546,7 @@ function eb(e) {
|
|
|
23529
23546
|
}),
|
|
23530
23547
|
[r]
|
|
23531
23548
|
);
|
|
23532
|
-
return
|
|
23549
|
+
return _s({
|
|
23533
23550
|
pointsEnabled: e.pointsEnabled,
|
|
23534
23551
|
renewalBundle: e.renewalBundle,
|
|
23535
23552
|
hasFallbackWrite: !0
|
|
@@ -23547,7 +23564,7 @@ function eb(e) {
|
|
|
23547
23564
|
}
|
|
23548
23565
|
) }) : null;
|
|
23549
23566
|
}
|
|
23550
|
-
function
|
|
23567
|
+
function t_(e) {
|
|
23551
23568
|
return {
|
|
23552
23569
|
id: e.id,
|
|
23553
23570
|
address1: e.street1,
|
|
@@ -23562,10 +23579,10 @@ function tb(e) {
|
|
|
23562
23579
|
subdivision_code: null
|
|
23563
23580
|
};
|
|
23564
23581
|
}
|
|
23565
|
-
function
|
|
23566
|
-
return /* @__PURE__ */ i.jsx(Rn, { children: /* @__PURE__ */ i.jsx(
|
|
23582
|
+
function n_(e) {
|
|
23583
|
+
return /* @__PURE__ */ i.jsx(Rn, { children: /* @__PURE__ */ i.jsx(r_, { ...e }) });
|
|
23567
23584
|
}
|
|
23568
|
-
function
|
|
23585
|
+
function r_({
|
|
23569
23586
|
open: e,
|
|
23570
23587
|
onOpenChange: n,
|
|
23571
23588
|
onConfirm: t,
|
|
@@ -23574,7 +23591,7 @@ function rb({
|
|
|
23574
23591
|
}) {
|
|
23575
23592
|
const { t: s } = se(), { isMobile: o } = mt(), d = rn(), { data: c = [], isLoading: u } = je({
|
|
23576
23593
|
queryKey: Ee.addresses.list(),
|
|
23577
|
-
queryFn: async () => (await d.fetchAddresses()).addresses.map(
|
|
23594
|
+
queryFn: async () => (await d.fetchAddresses()).addresses.map(t_),
|
|
23578
23595
|
enabled: e
|
|
23579
23596
|
}), [f, p] = m.useState(
|
|
23580
23597
|
null
|
|
@@ -23582,7 +23599,7 @@ function rb({
|
|
|
23582
23599
|
m.useEffect(() => {
|
|
23583
23600
|
e && p(null);
|
|
23584
23601
|
}, [e]);
|
|
23585
|
-
const v = f != null && c.some((E) => E.id === f) ? f : null,
|
|
23602
|
+
const v = f != null && c.some((E) => E.id === f) ? f : null, b = m.useMemo(
|
|
23586
23603
|
() => c.find((E) => E.id === v) ?? null,
|
|
23587
23604
|
[c, v]
|
|
23588
23605
|
), h = !u && c.length === 0, x = (v != null || h) && !r, w = (E) => {
|
|
@@ -23603,7 +23620,7 @@ function rb({
|
|
|
23603
23620
|
{
|
|
23604
23621
|
presentation: o ? "bottom-sheet" : "dialog",
|
|
23605
23622
|
title: s("shipping_address"),
|
|
23606
|
-
displayAddress:
|
|
23623
|
+
displayAddress: b,
|
|
23607
23624
|
addressList: c,
|
|
23608
23625
|
selectedAddressId: v ?? 0,
|
|
23609
23626
|
onSelectAddress: (E) => p(E.id),
|
|
@@ -23642,7 +23659,7 @@ function rb({
|
|
|
23642
23659
|
}
|
|
23643
23660
|
);
|
|
23644
23661
|
}
|
|
23645
|
-
function
|
|
23662
|
+
function M_({
|
|
23646
23663
|
token: e,
|
|
23647
23664
|
onToast: n
|
|
23648
23665
|
}) {
|
|
@@ -23650,25 +23667,25 @@ function Mb({
|
|
|
23650
23667
|
() => t("subscriptions"),
|
|
23651
23668
|
[t]
|
|
23652
23669
|
), c = m.useCallback(
|
|
23653
|
-
(
|
|
23670
|
+
(b) => t(`subscriptions/${b}`),
|
|
23654
23671
|
[t]
|
|
23655
23672
|
), u = m.useCallback(() => {
|
|
23656
23673
|
n(r("subscription_not_found"), "warning"), t("subscriptions");
|
|
23657
23674
|
}, [n, t, r]), f = m.useCallback(
|
|
23658
|
-
(
|
|
23659
|
-
const
|
|
23660
|
-
n(r("failed_to_load_subscription", { message:
|
|
23675
|
+
(b) => {
|
|
23676
|
+
const _ = b instanceof Error ? b.message : r("error_occurred");
|
|
23677
|
+
n(r("failed_to_load_subscription", { message: _ }), "error");
|
|
23661
23678
|
},
|
|
23662
23679
|
[n, r]
|
|
23663
23680
|
), p = m.useCallback(
|
|
23664
|
-
(
|
|
23665
|
-
n(
|
|
23681
|
+
(b, _ = "success") => {
|
|
23682
|
+
n(b, _);
|
|
23666
23683
|
},
|
|
23667
23684
|
[n]
|
|
23668
23685
|
), v = m.useCallback(
|
|
23669
|
-
(
|
|
23670
|
-
const h =
|
|
23671
|
-
n(`${
|
|
23686
|
+
(b, _) => {
|
|
23687
|
+
const h = _ instanceof Error ? _.message : r("error_occurred");
|
|
23688
|
+
n(`${b}: ${h}`, "error");
|
|
23672
23689
|
},
|
|
23673
23690
|
[n, r]
|
|
23674
23691
|
);
|
|
@@ -23684,46 +23701,46 @@ function Mb({
|
|
|
23684
23701
|
onSuccess: p,
|
|
23685
23702
|
onMutationError: v,
|
|
23686
23703
|
onUpdatePaymentClick: () => o(!0),
|
|
23687
|
-
renderPaymentMethod: (
|
|
23704
|
+
renderPaymentMethod: (b) => /* @__PURE__ */ i.jsx(
|
|
23688
23705
|
Ix,
|
|
23689
23706
|
{
|
|
23690
|
-
...
|
|
23691
|
-
onSuccess: (
|
|
23692
|
-
onError: (
|
|
23707
|
+
...b,
|
|
23708
|
+
onSuccess: (_, h) => n(_, h ?? "success"),
|
|
23709
|
+
onError: (_, h) => {
|
|
23693
23710
|
const x = h instanceof Error ? h.message : r("error_occurred");
|
|
23694
|
-
n(`${
|
|
23711
|
+
n(`${_}: ${x}`, "error");
|
|
23695
23712
|
},
|
|
23696
23713
|
addDialogOpen: s,
|
|
23697
23714
|
onAddDialogOpenChange: o
|
|
23698
23715
|
}
|
|
23699
23716
|
),
|
|
23700
|
-
renderShippingAddress: (
|
|
23717
|
+
renderShippingAddress: (b) => /* @__PURE__ */ i.jsx(
|
|
23701
23718
|
Ux,
|
|
23702
23719
|
{
|
|
23703
|
-
...
|
|
23704
|
-
onSuccess: (
|
|
23705
|
-
onError: (
|
|
23720
|
+
...b,
|
|
23721
|
+
onSuccess: (_, h) => n(_, h ?? "success"),
|
|
23722
|
+
onError: (_, h) => {
|
|
23706
23723
|
const x = h instanceof Error ? h.message : r("error_occurred");
|
|
23707
|
-
n(`${
|
|
23724
|
+
n(`${_}: ${x}`, "error");
|
|
23708
23725
|
}
|
|
23709
23726
|
}
|
|
23710
23727
|
),
|
|
23711
|
-
renderAutoApplyPoints: (
|
|
23712
|
-
|
|
23728
|
+
renderAutoApplyPoints: (b) => /* @__PURE__ */ i.jsx(
|
|
23729
|
+
e_,
|
|
23713
23730
|
{
|
|
23714
|
-
...
|
|
23715
|
-
onSuccess: (
|
|
23716
|
-
onError: (
|
|
23731
|
+
...b,
|
|
23732
|
+
onSuccess: (_, h) => n(_, h ?? "success"),
|
|
23733
|
+
onError: (_, h) => {
|
|
23717
23734
|
const x = h instanceof Error ? h.message : void 0;
|
|
23718
|
-
n(x ? `${
|
|
23735
|
+
n(x ? `${_}: ${x}` : _, "error");
|
|
23719
23736
|
}
|
|
23720
23737
|
}
|
|
23721
23738
|
),
|
|
23722
|
-
renderReactivateDialog: (
|
|
23739
|
+
renderReactivateDialog: (b) => /* @__PURE__ */ i.jsx(n_, { ...b })
|
|
23723
23740
|
}
|
|
23724
23741
|
);
|
|
23725
23742
|
}
|
|
23726
|
-
function
|
|
23743
|
+
function N_(e) {
|
|
23727
23744
|
const n = e.getRootNode();
|
|
23728
23745
|
if (!(n instanceof ShadowRoot) || !(n.host instanceof HTMLElement))
|
|
23729
23746
|
throw new Error("Card entry requires a mounted account screen");
|
|
@@ -23742,14 +23759,14 @@ export {
|
|
|
23742
23759
|
X1 as C,
|
|
23743
23760
|
Ud as E,
|
|
23744
23761
|
Pd as F,
|
|
23745
|
-
|
|
23746
|
-
|
|
23762
|
+
E_ as P,
|
|
23763
|
+
F_ as S,
|
|
23747
23764
|
Xi as T,
|
|
23748
|
-
$
|
|
23749
|
-
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23765
|
+
$_ as a,
|
|
23766
|
+
M_ as b,
|
|
23767
|
+
N_ as c,
|
|
23768
|
+
C_ as d,
|
|
23769
|
+
z_ as e,
|
|
23753
23770
|
Dl as f,
|
|
23754
23771
|
fl as g,
|
|
23755
23772
|
Zi as h,
|