@nok-integration/storefront-react 0.20.17 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +320 -41
- package/dist/index.mjs +903 -539
- package/dist/standalone/storefront.mjs +903 -539
- package/dist/standalone/styles.css +71 -0
- package/dist/styles.css +71 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4491,6 +4491,80 @@ function requireIds() {
|
|
|
4491
4491
|
ids.RequestId = prefixedId("req_");
|
|
4492
4492
|
return ids;
|
|
4493
4493
|
}
|
|
4494
|
+
var vip = {};
|
|
4495
|
+
var hasRequiredVip;
|
|
4496
|
+
function requireVip() {
|
|
4497
|
+
if (hasRequiredVip) return vip;
|
|
4498
|
+
hasRequiredVip = 1;
|
|
4499
|
+
(function(exports) {
|
|
4500
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4501
|
+
value: true
|
|
4502
|
+
});
|
|
4503
|
+
exports.VipClaimResponse = exports.VipClaimRefusalReason = exports.VipClaimRequest = exports.VipClaimLine = exports.VipCartItemRequest = exports.VipInviteView = exports.VipHero = exports.VipInviteOffer = exports.VipInviteResolveRequest = exports.VipDeliveryRule = exports.VIP_TOKEN_PATTERN = exports.VipInviteRef = void 0;
|
|
4504
|
+
const zod_1 = requireZod();
|
|
4505
|
+
const common_1 = requireCommon();
|
|
4506
|
+
const ids_1 = requireIds();
|
|
4507
|
+
exports.VipInviteRef = (0, ids_1.prefixedId)("vip_", "VipInviteRef");
|
|
4508
|
+
exports.VIP_TOKEN_PATTERN = /^[A-Za-z0-9_-]{43}$/;
|
|
4509
|
+
exports.VipDeliveryRule = zod_1.z.enum(["both_free", "standard_free", "both_paid"]);
|
|
4510
|
+
exports.VipInviteResolveRequest = zod_1.z.object({
|
|
4511
|
+
token: zod_1.z.string().regex(exports.VIP_TOKEN_PATTERN)
|
|
4512
|
+
}).strict();
|
|
4513
|
+
exports.VipInviteOffer = zod_1.z.object({
|
|
4514
|
+
product_sku: common_1.Sku,
|
|
4515
|
+
quantity: zod_1.z.number().int().positive()
|
|
4516
|
+
});
|
|
4517
|
+
exports.VipHero = zod_1.z.object({
|
|
4518
|
+
image: common_1.Url.nullable(),
|
|
4519
|
+
headline: zod_1.z.string(),
|
|
4520
|
+
body: zod_1.z.string().nullable(),
|
|
4521
|
+
cta_label: zod_1.z.string()
|
|
4522
|
+
});
|
|
4523
|
+
exports.VipInviteView = zod_1.z.discriminatedUnion("state", [zod_1.z.object({
|
|
4524
|
+
state: zod_1.z.literal("active"),
|
|
4525
|
+
invite_ref: exports.VipInviteRef,
|
|
4526
|
+
recipient_name: zod_1.z.string(),
|
|
4527
|
+
personal_message: zod_1.z.string().nullable(),
|
|
4528
|
+
delivery_rule: exports.VipDeliveryRule,
|
|
4529
|
+
expires_at: common_1.Timestamp,
|
|
4530
|
+
items: zod_1.z.array(exports.VipInviteOffer).min(1),
|
|
4531
|
+
hero: exports.VipHero.nullable().optional()
|
|
4532
|
+
}), zod_1.z.object({
|
|
4533
|
+
state: zod_1.z.literal("scheduled"),
|
|
4534
|
+
opens_at: common_1.Timestamp
|
|
4535
|
+
}), zod_1.z.object({
|
|
4536
|
+
state: zod_1.z.literal("claimed")
|
|
4537
|
+
}), zod_1.z.object({
|
|
4538
|
+
state: zod_1.z.literal("expired")
|
|
4539
|
+
}), zod_1.z.object({
|
|
4540
|
+
state: zod_1.z.literal("revoked")
|
|
4541
|
+
})]);
|
|
4542
|
+
exports.VipCartItemRequest = zod_1.z.object({
|
|
4543
|
+
token: zod_1.z.string().regex(exports.VIP_TOKEN_PATTERN),
|
|
4544
|
+
sku: common_1.Sku,
|
|
4545
|
+
qty: zod_1.z.number().int().positive().max(99)
|
|
4546
|
+
}).strict();
|
|
4547
|
+
exports.VipClaimLine = zod_1.z.object({
|
|
4548
|
+
sku: common_1.Sku,
|
|
4549
|
+
qty: zod_1.z.number().int().positive()
|
|
4550
|
+
}).strict();
|
|
4551
|
+
exports.VipClaimRequest = zod_1.z.object({
|
|
4552
|
+
invite_ref: exports.VipInviteRef,
|
|
4553
|
+
dazn_user_id: zod_1.z.string().min(1).max(200),
|
|
4554
|
+
lines: zod_1.z.array(exports.VipClaimLine).min(1).max(50)
|
|
4555
|
+
}).strict();
|
|
4556
|
+
exports.VipClaimRefusalReason = zod_1.z.enum(["unknown", "revoked", "expired", "not_yet_valid", "claimed_by_another", "already_ordered", "outside_entitlement"]);
|
|
4557
|
+
exports.VipClaimResponse = zod_1.z.discriminatedUnion("result", [zod_1.z.object({
|
|
4558
|
+
result: zod_1.z.literal("claimed"),
|
|
4559
|
+
invite_ref: exports.VipInviteRef
|
|
4560
|
+
}), zod_1.z.object({
|
|
4561
|
+
result: zod_1.z.literal("refused"),
|
|
4562
|
+
invite_ref: exports.VipInviteRef,
|
|
4563
|
+
reason: exports.VipClaimRefusalReason
|
|
4564
|
+
})]);
|
|
4565
|
+
})(vip);
|
|
4566
|
+
return vip;
|
|
4567
|
+
}
|
|
4494
4568
|
var hasRequiredCart;
|
|
4495
4569
|
function requireCart() {
|
|
4496
4570
|
if (hasRequiredCart) return cart;
|
|
@@ -4505,6 +4579,7 @@ function requireCart() {
|
|
|
4505
4579
|
const ids_1 = requireIds();
|
|
4506
4580
|
const money_2 = requireMoney();
|
|
4507
4581
|
const common_1 = requireCommon();
|
|
4582
|
+
const vip_1 = requireVip();
|
|
4508
4583
|
exports.CartItem = zod_1.z.object({
|
|
4509
4584
|
sku: common_1.Sku,
|
|
4510
4585
|
qty: zod_1.z.number().int().positive(),
|
|
@@ -4537,7 +4612,10 @@ function requireCart() {
|
|
|
4537
4612
|
totals: exports.CartTotals,
|
|
4538
4613
|
locked: exports.CartLock.optional(),
|
|
4539
4614
|
hold: exports.CartHold.optional(),
|
|
4540
|
-
hidden_lines: zod_1.z.array(exports.HiddenSummaryLine).optional()
|
|
4615
|
+
hidden_lines: zod_1.z.array(exports.HiddenSummaryLine).optional(),
|
|
4616
|
+
vip: zod_1.z.object({
|
|
4617
|
+
invite_ref: vip_1.VipInviteRef
|
|
4618
|
+
}).optional()
|
|
4541
4619
|
});
|
|
4542
4620
|
exports.CartMarketQuery = common_1.MarketQuery;
|
|
4543
4621
|
exports.AddCartItemRequest = zod_1.z.object({
|
|
@@ -4563,7 +4641,8 @@ function requireCart() {
|
|
|
4563
4641
|
items: zod_1.z.array(exports.CartItem),
|
|
4564
4642
|
cart_items: zod_1.z.array(exports.PartnerCartItem),
|
|
4565
4643
|
totals: exports.CartTotals,
|
|
4566
|
-
locked: exports.CartLock.optional()
|
|
4644
|
+
locked: exports.CartLock.optional(),
|
|
4645
|
+
vip_invite_ref: vip_1.VipInviteRef.optional()
|
|
4567
4646
|
});
|
|
4568
4647
|
})(cart);
|
|
4569
4648
|
return cart;
|
|
@@ -4620,6 +4699,7 @@ function requireOrders() {
|
|
|
4620
4699
|
const money_1 = requireMoney();
|
|
4621
4700
|
const ids_1 = requireIds();
|
|
4622
4701
|
const common_1 = requireCommon();
|
|
4702
|
+
const vip_1 = requireVip();
|
|
4623
4703
|
exports.OrderEventEnvelope = zod_1.z.object({
|
|
4624
4704
|
event_id: ids_1.EventId,
|
|
4625
4705
|
occurred_at: common_1.Timestamp
|
|
@@ -4658,7 +4738,8 @@ function requireOrders() {
|
|
|
4658
4738
|
ship_to: common_1.Address,
|
|
4659
4739
|
lines: zod_1.z.array(exports.OrderLine).min(1),
|
|
4660
4740
|
totals: exports.OrderTotals,
|
|
4661
|
-
payment: exports.OrderPaymentSummary.optional()
|
|
4741
|
+
payment: exports.OrderPaymentSummary.optional(),
|
|
4742
|
+
vip_invite_ref: vip_1.VipInviteRef.optional()
|
|
4662
4743
|
}).strict();
|
|
4663
4744
|
exports.CancelReason = zod_1.z.enum(["customer_request", "payment_failed", "fraud", "unfulfillable", "other"]);
|
|
4664
4745
|
exports.OrderLineAction = zod_1.z.object({
|
|
@@ -4701,6 +4782,7 @@ function requireOrderTracking() {
|
|
|
4701
4782
|
const ids_1 = requireIds();
|
|
4702
4783
|
const common_1 = requireCommon();
|
|
4703
4784
|
const orders_1 = requireOrders();
|
|
4785
|
+
const vip_1 = requireVip();
|
|
4704
4786
|
exports.OrderProgressStep = zod_1.z.enum(["packing", "on_its_way", "out_for_delivery", "delivered", "cancelled"]);
|
|
4705
4787
|
exports.OrderProgressEntry = zod_1.z.object({
|
|
4706
4788
|
step: exports.OrderProgressStep,
|
|
@@ -4780,7 +4862,10 @@ function requireOrderTracking() {
|
|
|
4780
4862
|
totals: orders_1.OrderTotals,
|
|
4781
4863
|
can_cancel: zod_1.z.boolean().optional(),
|
|
4782
4864
|
can_return: zod_1.z.boolean().optional(),
|
|
4783
|
-
returns: zod_1.z.array(exports.ReturnSummary).optional()
|
|
4865
|
+
returns: zod_1.z.array(exports.ReturnSummary).optional(),
|
|
4866
|
+
vip: zod_1.z.object({
|
|
4867
|
+
invite_ref: vip_1.VipInviteRef
|
|
4868
|
+
}).optional()
|
|
4784
4869
|
});
|
|
4785
4870
|
exports.FanCancelReason = zod_1.z.enum(["changed_my_mind", "ordered_by_mistake", "delivery_too_long"]);
|
|
4786
4871
|
exports.RequestCancellationRequest = zod_1.z.object({
|
|
@@ -4891,7 +4976,7 @@ function requireErrors() {
|
|
|
4891
4976
|
});
|
|
4892
4977
|
exports.ErrorResponse = exports.ApiErrorBody = exports.ERROR_CODE_STATUS = exports.ErrorCode = void 0;
|
|
4893
4978
|
const zod_1 = requireZod();
|
|
4894
|
-
exports.ErrorCode = zod_1.z.enum(["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "cart_not_found", "support_ticket_not_found", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]);
|
|
4979
|
+
exports.ErrorCode = zod_1.z.enum(["invalid_request", "unauthorized", "out_of_stock", "cart_locked", "sku_not_found", "category_not_found", "amount_mismatch", "duplicate_order", "order_not_found", "order_not_cancellable", "cart_not_found", "support_ticket_not_found", "vip_invite_not_found", "vip_cart_conflict", "vip_invite_mismatch", "size_chart_not_found", "forbidden", "invalid_transition", "rate_limited", "server_error"]);
|
|
4895
4980
|
exports.ERROR_CODE_STATUS = {
|
|
4896
4981
|
invalid_request: 400,
|
|
4897
4982
|
unauthorized: 401,
|
|
@@ -4905,6 +4990,9 @@ function requireErrors() {
|
|
|
4905
4990
|
order_not_cancellable: 409,
|
|
4906
4991
|
cart_not_found: 404,
|
|
4907
4992
|
support_ticket_not_found: 404,
|
|
4993
|
+
vip_invite_not_found: 404,
|
|
4994
|
+
vip_cart_conflict: 409,
|
|
4995
|
+
vip_invite_mismatch: 409,
|
|
4908
4996
|
size_chart_not_found: 404,
|
|
4909
4997
|
forbidden: 403,
|
|
4910
4998
|
invalid_transition: 409,
|
|
@@ -4941,6 +5029,7 @@ function requireClient() {
|
|
|
4941
5029
|
const order_tracking_1 = requireOrderTracking();
|
|
4942
5030
|
const stock_alerts_1 = requireStockAlerts();
|
|
4943
5031
|
const support_1 = requireSupport();
|
|
5032
|
+
const vip_1 = requireVip();
|
|
4944
5033
|
const errors_1 = requireErrors();
|
|
4945
5034
|
class DaznApiError extends Error {
|
|
4946
5035
|
status;
|
|
@@ -5170,6 +5259,24 @@ function requireClient() {
|
|
|
5170
5259
|
schema: support_1.SupportTicket
|
|
5171
5260
|
})
|
|
5172
5261
|
},
|
|
5262
|
+
vip: {
|
|
5263
|
+
resolve: (token, query = {}) => request({
|
|
5264
|
+
method: "POST",
|
|
5265
|
+
path: "/vip/resolve",
|
|
5266
|
+
body: {
|
|
5267
|
+
token
|
|
5268
|
+
},
|
|
5269
|
+
query: market(query),
|
|
5270
|
+
schema: vip_1.VipInviteView
|
|
5271
|
+
}),
|
|
5272
|
+
addToCart: (body3, query = {}) => request({
|
|
5273
|
+
method: "POST",
|
|
5274
|
+
path: "/vip/cart/items",
|
|
5275
|
+
body: body3,
|
|
5276
|
+
query: market(query),
|
|
5277
|
+
schema: cart_1.Cart
|
|
5278
|
+
})
|
|
5279
|
+
},
|
|
5173
5280
|
auth: {
|
|
5174
5281
|
exchangeSession: (body3) => request({
|
|
5175
5282
|
method: "POST",
|
|
@@ -5790,7 +5897,7 @@ const neutral$2 = "_neutral_1bagf_12";
|
|
|
5790
5897
|
const success$1 = "_success_1bagf_17";
|
|
5791
5898
|
const critical$2 = "_critical_1bagf_22";
|
|
5792
5899
|
const promo = "_promo_1bagf_27";
|
|
5793
|
-
const styles$
|
|
5900
|
+
const styles$T = {
|
|
5794
5901
|
badge: badge$5,
|
|
5795
5902
|
neutral: neutral$2,
|
|
5796
5903
|
success: success$1,
|
|
@@ -5799,7 +5906,7 @@ const styles$S = {
|
|
|
5799
5906
|
};
|
|
5800
5907
|
function Badge({ tone = "neutral", children }) {
|
|
5801
5908
|
return jsx("span", {
|
|
5802
|
-
className: [styles$
|
|
5909
|
+
className: [styles$T.badge, styles$T[tone]].join(" "),
|
|
5803
5910
|
children
|
|
5804
5911
|
});
|
|
5805
5912
|
}
|
|
@@ -5808,7 +5915,7 @@ const fullWidth = "_fullWidth_ci424_25";
|
|
|
5808
5915
|
const primary = "_primary_ci424_29";
|
|
5809
5916
|
const secondary = "_secondary_ci424_34";
|
|
5810
5917
|
const ghost = "_ghost_ci424_40";
|
|
5811
|
-
const styles$
|
|
5918
|
+
const styles$S = {
|
|
5812
5919
|
button: button$1,
|
|
5813
5920
|
fullWidth,
|
|
5814
5921
|
primary,
|
|
@@ -5816,12 +5923,12 @@ const styles$R = {
|
|
|
5816
5923
|
ghost
|
|
5817
5924
|
};
|
|
5818
5925
|
const spinner = "_spinner_1rueh_5";
|
|
5819
|
-
const styles$
|
|
5926
|
+
const styles$R = {
|
|
5820
5927
|
spinner
|
|
5821
5928
|
};
|
|
5822
5929
|
function Spinner({ className }) {
|
|
5823
5930
|
return jsx("span", {
|
|
5824
|
-
className: [styles$
|
|
5931
|
+
className: [styles$R.spinner, className ?? ""].filter(Boolean).join(" "),
|
|
5825
5932
|
"aria-hidden": "true"
|
|
5826
5933
|
});
|
|
5827
5934
|
}
|
|
@@ -5830,7 +5937,7 @@ const Button = forwardRef(function Button2({ variant = "primary", loading = fals
|
|
|
5830
5937
|
return jsxs("button", {
|
|
5831
5938
|
ref,
|
|
5832
5939
|
type,
|
|
5833
|
-
className: [styles$
|
|
5940
|
+
className: [styles$S.button, styles$S[variant], fullWidth2 ? styles$S.fullWidth : "", className ?? ""].filter(Boolean).join(" "),
|
|
5834
5941
|
disabled: isDisabled,
|
|
5835
5942
|
"aria-busy": loading || void 0,
|
|
5836
5943
|
...rest,
|
|
@@ -5840,7 +5947,7 @@ const Button = forwardRef(function Button2({ variant = "primary", loading = fals
|
|
|
5840
5947
|
});
|
|
5841
5948
|
});
|
|
5842
5949
|
const skeleton = "_skeleton_1nxz7_1";
|
|
5843
|
-
const styles$
|
|
5950
|
+
const styles$Q = {
|
|
5844
5951
|
skeleton
|
|
5845
5952
|
};
|
|
5846
5953
|
function Skeleton({ width, height, radius, className, circle }) {
|
|
@@ -5851,13 +5958,13 @@ function Skeleton({ width, height, radius, className, circle }) {
|
|
|
5851
5958
|
};
|
|
5852
5959
|
return jsx("span", {
|
|
5853
5960
|
"aria-hidden": "true",
|
|
5854
|
-
className: [styles$
|
|
5961
|
+
className: [styles$Q.skeleton, className ?? ""].filter(Boolean).join(" "),
|
|
5855
5962
|
style
|
|
5856
5963
|
});
|
|
5857
5964
|
}
|
|
5858
5965
|
const surface$1 = "_surface_stwld_10";
|
|
5859
5966
|
const fill = "_fill_stwld_35";
|
|
5860
|
-
const styles$
|
|
5967
|
+
const styles$P = {
|
|
5861
5968
|
surface: surface$1,
|
|
5862
5969
|
fill
|
|
5863
5970
|
};
|
|
@@ -6004,7 +6111,7 @@ const ShopSurface = forwardRef(function ShopSurface2({ tone, fill: fill2 = false
|
|
|
6004
6111
|
...rest,
|
|
6005
6112
|
ref: attach,
|
|
6006
6113
|
"data-shop-theme": tone,
|
|
6007
|
-
className: [styles$
|
|
6114
|
+
className: [styles$P.surface, fill2 ? styles$P.fill : "", className ?? ""].filter(Boolean).join(" "),
|
|
6008
6115
|
children
|
|
6009
6116
|
});
|
|
6010
6117
|
});
|
|
@@ -6017,7 +6124,7 @@ const lineMid = "_lineMid_ney0g_45";
|
|
|
6017
6124
|
const lineNarrow = "_lineNarrow_ney0g_49";
|
|
6018
6125
|
const row$9 = "_row_ney0g_53";
|
|
6019
6126
|
const action$2 = "_action_ney0g_57";
|
|
6020
|
-
const styles$
|
|
6127
|
+
const styles$O = {
|
|
6021
6128
|
root: root$6,
|
|
6022
6129
|
inner,
|
|
6023
6130
|
media: media$3,
|
|
@@ -6280,7 +6387,13 @@ const ES = {
|
|
|
6280
6387
|
Less: "Menos",
|
|
6281
6388
|
more: "más",
|
|
6282
6389
|
"Close reasons": "Cerrar motivos",
|
|
6283
|
-
Select: "Seleccionar"
|
|
6390
|
+
Select: "Seleccionar",
|
|
6391
|
+
"Claim yours": "Consigue el tuyo",
|
|
6392
|
+
"Sold out": "Agotado",
|
|
6393
|
+
"This invitation can no longer be used.": "Esta invitación ya no se puede usar.",
|
|
6394
|
+
"Invitation unavailable": "Invitación no disponible",
|
|
6395
|
+
"Your basket has other items": "Tu cesta tiene otros artículos",
|
|
6396
|
+
"Empty your basket to claim this item.": "Vacía tu cesta para conseguir este artículo."
|
|
6284
6397
|
};
|
|
6285
6398
|
const CATALOGUES = {
|
|
6286
6399
|
es: ES
|
|
@@ -6310,36 +6423,36 @@ function ScreenSkeleton({ tone, shape = "media" }) {
|
|
|
6310
6423
|
return jsx(ShopSurface, {
|
|
6311
6424
|
tone,
|
|
6312
6425
|
fill: true,
|
|
6313
|
-
className: styles$
|
|
6426
|
+
className: styles$O.root,
|
|
6314
6427
|
children: jsx("div", {
|
|
6315
|
-
className: styles$
|
|
6428
|
+
className: styles$O.inner,
|
|
6316
6429
|
role: "status",
|
|
6317
6430
|
"aria-label": t("Loading"),
|
|
6318
6431
|
children: shape === "media" ? jsxs(Fragment, {
|
|
6319
6432
|
children: [jsx(Skeleton, {
|
|
6320
|
-
className: styles$
|
|
6433
|
+
className: styles$O.media
|
|
6321
6434
|
}), jsxs("div", {
|
|
6322
|
-
className: styles$
|
|
6435
|
+
className: styles$O.lines,
|
|
6323
6436
|
children: [jsx(Skeleton, {
|
|
6324
6437
|
height: 22,
|
|
6325
|
-
className: styles$
|
|
6438
|
+
className: styles$O.lineWide
|
|
6326
6439
|
}), jsx(Skeleton, {
|
|
6327
6440
|
height: 16,
|
|
6328
|
-
className: styles$
|
|
6441
|
+
className: styles$O.lineMid
|
|
6329
6442
|
}), jsx(Skeleton, {
|
|
6330
6443
|
height: 16,
|
|
6331
|
-
className: styles$
|
|
6444
|
+
className: styles$O.lineNarrow
|
|
6332
6445
|
})]
|
|
6333
6446
|
}), jsx(Skeleton, {
|
|
6334
6447
|
height: 48,
|
|
6335
6448
|
radius: 8,
|
|
6336
|
-
className: styles$
|
|
6449
|
+
className: styles$O.action
|
|
6337
6450
|
})]
|
|
6338
6451
|
}) : jsx("div", {
|
|
6339
|
-
className: styles$
|
|
6452
|
+
className: styles$O.lines,
|
|
6340
6453
|
children: [0, 1, 2, 3].map((i) => jsx(Skeleton, {
|
|
6341
6454
|
height: 72,
|
|
6342
|
-
className: styles$
|
|
6455
|
+
className: styles$O.row
|
|
6343
6456
|
}, i))
|
|
6344
6457
|
})
|
|
6345
6458
|
})
|
|
@@ -6347,36 +6460,36 @@ function ScreenSkeleton({ tone, shape = "media" }) {
|
|
|
6347
6460
|
}
|
|
6348
6461
|
const root$5 = "_root_ryf3q_6";
|
|
6349
6462
|
const icon$4 = "_icon_ryf3q_15";
|
|
6350
|
-
const text$
|
|
6463
|
+
const text$6 = "_text_ryf3q_21";
|
|
6351
6464
|
const title$n = "_title_ryf3q_35";
|
|
6352
|
-
const body$
|
|
6465
|
+
const body$9 = "_body_ryf3q_40";
|
|
6353
6466
|
const action$1 = "_action_ryf3q_48";
|
|
6354
|
-
const styles$
|
|
6467
|
+
const styles$N = {
|
|
6355
6468
|
root: root$5,
|
|
6356
6469
|
icon: icon$4,
|
|
6357
|
-
text: text$
|
|
6470
|
+
text: text$6,
|
|
6358
6471
|
title: title$n,
|
|
6359
|
-
body: body$
|
|
6472
|
+
body: body$9,
|
|
6360
6473
|
action: action$1
|
|
6361
6474
|
};
|
|
6362
6475
|
function EmptyState({ title: title2, body: body3, action: action2, icon: icon2 }) {
|
|
6363
6476
|
return jsxs("div", {
|
|
6364
|
-
className: styles$
|
|
6477
|
+
className: styles$N.root,
|
|
6365
6478
|
role: "status",
|
|
6366
6479
|
children: [icon2 && jsx("div", {
|
|
6367
|
-
className: styles$
|
|
6480
|
+
className: styles$N.icon,
|
|
6368
6481
|
children: icon2
|
|
6369
6482
|
}), jsxs("div", {
|
|
6370
|
-
className: styles$
|
|
6483
|
+
className: styles$N.text,
|
|
6371
6484
|
children: [jsx("h2", {
|
|
6372
|
-
className: styles$
|
|
6485
|
+
className: styles$N.title,
|
|
6373
6486
|
children: title2
|
|
6374
6487
|
}), body3 && jsx("p", {
|
|
6375
|
-
className: styles$
|
|
6488
|
+
className: styles$N.body,
|
|
6376
6489
|
children: body3
|
|
6377
6490
|
})]
|
|
6378
6491
|
}), action2 && jsx("div", {
|
|
6379
|
-
className: styles$
|
|
6492
|
+
className: styles$N.action,
|
|
6380
6493
|
children: action2
|
|
6381
6494
|
})]
|
|
6382
6495
|
});
|
|
@@ -6433,6 +6546,16 @@ const TREATMENTS = {
|
|
|
6433
6546
|
body: "This order was already confirmed.",
|
|
6434
6547
|
retriable: false
|
|
6435
6548
|
},
|
|
6549
|
+
vip_invite_not_found: {
|
|
6550
|
+
title: "Invitation unavailable",
|
|
6551
|
+
body: "This invitation can no longer be used.",
|
|
6552
|
+
retriable: false
|
|
6553
|
+
},
|
|
6554
|
+
vip_cart_conflict: {
|
|
6555
|
+
title: "Your basket has other items",
|
|
6556
|
+
body: "Empty your basket to claim this item.",
|
|
6557
|
+
retriable: false
|
|
6558
|
+
},
|
|
6436
6559
|
rate_limited: {
|
|
6437
6560
|
title: "One moment",
|
|
6438
6561
|
body: "Too many requests. Retrying shortly.",
|
|
@@ -6458,6 +6581,11 @@ const TREATMENTS = {
|
|
|
6458
6581
|
body: "This order has already been despatched.",
|
|
6459
6582
|
retriable: false
|
|
6460
6583
|
},
|
|
6584
|
+
vip_invite_mismatch: {
|
|
6585
|
+
title: "Invitation unavailable",
|
|
6586
|
+
body: "This invitation can no longer be used.",
|
|
6587
|
+
retriable: false
|
|
6588
|
+
},
|
|
6461
6589
|
forbidden: {
|
|
6462
6590
|
title: "Not available to you",
|
|
6463
6591
|
body: "You do not have access to this.",
|
|
@@ -6497,24 +6625,24 @@ function isDuplicateOrder(err) {
|
|
|
6497
6625
|
}
|
|
6498
6626
|
const root$4 = "_root_1lbpx_1";
|
|
6499
6627
|
const title$m = "_title_1lbpx_10";
|
|
6500
|
-
const body$
|
|
6501
|
-
const styles$
|
|
6628
|
+
const body$8 = "_body_1lbpx_15";
|
|
6629
|
+
const styles$M = {
|
|
6502
6630
|
root: root$4,
|
|
6503
6631
|
title: title$m,
|
|
6504
|
-
body: body$
|
|
6632
|
+
body: body$8
|
|
6505
6633
|
};
|
|
6506
6634
|
function ErrorState({ code, title: title2, body: body3, onRetry, retryLabel }) {
|
|
6507
6635
|
const t = useT();
|
|
6508
6636
|
const treatment = treatmentFor(code);
|
|
6509
6637
|
const showRetry = Boolean(onRetry) && treatment.retriable;
|
|
6510
6638
|
return jsxs("div", {
|
|
6511
|
-
className: styles$
|
|
6639
|
+
className: styles$M.root,
|
|
6512
6640
|
role: "alert",
|
|
6513
6641
|
children: [jsx("h2", {
|
|
6514
|
-
className: styles$
|
|
6642
|
+
className: styles$M.title,
|
|
6515
6643
|
children: title2 ?? t(treatment.title)
|
|
6516
6644
|
}), jsx("p", {
|
|
6517
|
-
className: styles$
|
|
6645
|
+
className: styles$M.body,
|
|
6518
6646
|
children: body3 ?? t(treatment.body)
|
|
6519
6647
|
}), showRetry && jsx(Button, {
|
|
6520
6648
|
variant: "secondary",
|
|
@@ -6552,7 +6680,7 @@ const viewport = "_viewport_oz4st_14";
|
|
|
6552
6680
|
const anchor = "_anchor_oz4st_41";
|
|
6553
6681
|
const caret = "_caret_oz4st_59";
|
|
6554
6682
|
const toast = "_toast_oz4st_82";
|
|
6555
|
-
const text$
|
|
6683
|
+
const text$5 = "_text_oz4st_111";
|
|
6556
6684
|
const message$1 = "_message_oz4st_120";
|
|
6557
6685
|
const action = "_action_oz4st_133";
|
|
6558
6686
|
const neutral$1 = "_neutral_oz4st_158";
|
|
@@ -6562,12 +6690,12 @@ const rich = "_rich_oz4st_183";
|
|
|
6562
6690
|
const description = "_description_oz4st_198";
|
|
6563
6691
|
const thumb$3 = "_thumb_oz4st_216";
|
|
6564
6692
|
const thumbImage = "_thumbImage_oz4st_227";
|
|
6565
|
-
const styles$
|
|
6693
|
+
const styles$L = {
|
|
6566
6694
|
viewport,
|
|
6567
6695
|
anchor,
|
|
6568
6696
|
caret,
|
|
6569
6697
|
toast,
|
|
6570
|
-
text: text$
|
|
6698
|
+
text: text$5,
|
|
6571
6699
|
message: message$1,
|
|
6572
6700
|
action,
|
|
6573
6701
|
neutral: neutral$1,
|
|
@@ -6685,41 +6813,41 @@ function ToastProvider({ children }) {
|
|
|
6685
6813
|
return jsxs(ToastContext.Provider, {
|
|
6686
6814
|
value: api,
|
|
6687
6815
|
children: [children, jsx("div", {
|
|
6688
|
-
className: styles$
|
|
6816
|
+
className: styles$L.viewport,
|
|
6689
6817
|
ref: viewportRef,
|
|
6690
6818
|
"aria-live": "polite",
|
|
6691
6819
|
"aria-atomic": "false",
|
|
6692
6820
|
children: toasts.map((t) => {
|
|
6693
6821
|
const rich2 = Boolean(t.description || t.image);
|
|
6694
6822
|
return jsxs("div", {
|
|
6695
|
-
className: styles$
|
|
6823
|
+
className: styles$L.anchor,
|
|
6696
6824
|
children: [t.anchor === "cart" && jsx("span", {
|
|
6697
|
-
className: styles$
|
|
6825
|
+
className: styles$L.caret,
|
|
6698
6826
|
children: jsx(Caret, {})
|
|
6699
6827
|
}), jsxs("div", {
|
|
6700
|
-
className: [styles$
|
|
6828
|
+
className: [styles$L.toast, rich2 ? styles$L.rich : styles$L[t.tone]].join(" "),
|
|
6701
6829
|
role: "status",
|
|
6702
6830
|
children: [t.image && jsx("span", {
|
|
6703
|
-
className: styles$
|
|
6831
|
+
className: styles$L.thumb,
|
|
6704
6832
|
children: jsx(ShopImage, {
|
|
6705
6833
|
src: t.image,
|
|
6706
6834
|
alt: "",
|
|
6707
6835
|
fill: true,
|
|
6708
6836
|
sizes: "40px",
|
|
6709
|
-
className: styles$
|
|
6837
|
+
className: styles$L.thumbImage
|
|
6710
6838
|
})
|
|
6711
6839
|
}), jsxs("span", {
|
|
6712
|
-
className: styles$
|
|
6840
|
+
className: styles$L.text,
|
|
6713
6841
|
children: [jsx("span", {
|
|
6714
|
-
className: styles$
|
|
6842
|
+
className: styles$L.message,
|
|
6715
6843
|
children: t.message
|
|
6716
6844
|
}), t.description && jsx("span", {
|
|
6717
|
-
className: styles$
|
|
6845
|
+
className: styles$L.description,
|
|
6718
6846
|
children: t.description
|
|
6719
6847
|
})]
|
|
6720
6848
|
}), t.action && jsx("button", {
|
|
6721
6849
|
type: "button",
|
|
6722
|
-
className: styles$
|
|
6850
|
+
className: styles$L.action,
|
|
6723
6851
|
onClick: () => {
|
|
6724
6852
|
t.action?.onAction();
|
|
6725
6853
|
dismiss(t.id);
|
|
@@ -6734,15 +6862,15 @@ function ToastProvider({ children }) {
|
|
|
6734
6862
|
}
|
|
6735
6863
|
const badge$4 = "_badge_156ya_2";
|
|
6736
6864
|
const icon$3 = "_icon_156ya_18";
|
|
6737
|
-
const styles$
|
|
6865
|
+
const styles$K = {
|
|
6738
6866
|
badge: badge$4,
|
|
6739
6867
|
icon: icon$3
|
|
6740
6868
|
};
|
|
6741
6869
|
function SaleBadge({ pct }) {
|
|
6742
6870
|
return jsxs("span", {
|
|
6743
|
-
className: styles$
|
|
6871
|
+
className: styles$K.badge,
|
|
6744
6872
|
children: [jsxs("svg", {
|
|
6745
|
-
className: styles$
|
|
6873
|
+
className: styles$K.icon,
|
|
6746
6874
|
width: "12",
|
|
6747
6875
|
height: "12",
|
|
6748
6876
|
viewBox: "0 0 24 24",
|
|
@@ -6772,7 +6900,7 @@ const badge$3 = "_badge_rvfx9_48";
|
|
|
6772
6900
|
const price$4 = "_price_rvfx9_52";
|
|
6773
6901
|
const compareAt = "_compareAt_rvfx9_57";
|
|
6774
6902
|
const strikethrough = "_strikethrough_rvfx9_65";
|
|
6775
|
-
const styles$
|
|
6903
|
+
const styles$J = {
|
|
6776
6904
|
root: root$3,
|
|
6777
6905
|
center: center$1,
|
|
6778
6906
|
end,
|
|
@@ -6790,12 +6918,12 @@ function PriceBlock({ price: price2, compareAt: compareAt2, discountPct: discoun
|
|
|
6790
6918
|
const pct = discountPct$1 ?? discountPct(price2, compareAt2);
|
|
6791
6919
|
const hasCompare = compareAt2 && compareAt2.amount > price2.amount;
|
|
6792
6920
|
return jsxs("div", {
|
|
6793
|
-
className: [styles$
|
|
6921
|
+
className: [styles$J.root, styles$J[size], styles$J[align], styles$J[variant]].join(" "),
|
|
6794
6922
|
children: [jsx("span", {
|
|
6795
|
-
className: styles$
|
|
6923
|
+
className: styles$J.price,
|
|
6796
6924
|
children: format(price2)
|
|
6797
6925
|
}), hasCompare && jsxs("span", {
|
|
6798
|
-
className: styles$
|
|
6926
|
+
className: styles$J.compareAt,
|
|
6799
6927
|
children: [jsx("span", {
|
|
6800
6928
|
className: "visually-hidden",
|
|
6801
6929
|
children: t("Was {0}", format(compareAt2))
|
|
@@ -6859,13 +6987,13 @@ const marker = "_marker_1cum7_27";
|
|
|
6859
6987
|
const tick = "_tick_1cum7_35";
|
|
6860
6988
|
const pending$2 = "_pending_1cum7_44";
|
|
6861
6989
|
const connector = "_connector_1cum7_68";
|
|
6862
|
-
const text$
|
|
6990
|
+
const text$4 = "_text_1cum7_84";
|
|
6863
6991
|
const label$2 = "_label_1cum7_101";
|
|
6864
6992
|
const past = "_past_1cum7_113";
|
|
6865
6993
|
const current = "_current_1cum7_118";
|
|
6866
6994
|
const future = "_future_1cum7_133";
|
|
6867
6995
|
const date$1 = "_date_1cum7_138";
|
|
6868
|
-
const styles$
|
|
6996
|
+
const styles$I = {
|
|
6869
6997
|
timeline,
|
|
6870
6998
|
row: row$8,
|
|
6871
6999
|
line: line$3,
|
|
@@ -6873,7 +7001,7 @@ const styles$H = {
|
|
|
6873
7001
|
tick,
|
|
6874
7002
|
pending: pending$2,
|
|
6875
7003
|
connector,
|
|
6876
|
-
text: text$
|
|
7004
|
+
text: text$4,
|
|
6877
7005
|
label: label$2,
|
|
6878
7006
|
past,
|
|
6879
7007
|
current,
|
|
@@ -6899,39 +7027,39 @@ function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeP
|
|
|
6899
7027
|
const t = useT();
|
|
6900
7028
|
const currentIndex = progress2.findIndex((e) => e.current);
|
|
6901
7029
|
return jsx("ol", {
|
|
6902
|
-
className: styles$
|
|
7030
|
+
className: styles$I.timeline,
|
|
6903
7031
|
children: progress2.map((entry, i) => {
|
|
6904
7032
|
const state = stateOf(entry, i, currentIndex);
|
|
6905
7033
|
const estimate = !entry.at && i === progress2.length - 1 && estimatedDelivery ? formatWindow(estimatedDelivery, locale) : void 0;
|
|
6906
7034
|
return jsxs("li", {
|
|
6907
|
-
className: styles$
|
|
7035
|
+
className: styles$I.row,
|
|
6908
7036
|
"aria-current": entry.current ? "step" : void 0,
|
|
6909
7037
|
children: [jsxs("div", {
|
|
6910
|
-
className: styles$
|
|
7038
|
+
className: styles$I.line,
|
|
6911
7039
|
children: [jsx("span", {
|
|
6912
|
-
className: styles$
|
|
7040
|
+
className: styles$I.marker,
|
|
6913
7041
|
children: state === "future" ? jsx("span", {
|
|
6914
|
-
className: styles$
|
|
7042
|
+
className: styles$I.pending,
|
|
6915
7043
|
"aria-hidden": "true"
|
|
6916
7044
|
}) : jsx(StepTick, {
|
|
6917
7045
|
tone: state
|
|
6918
7046
|
})
|
|
6919
7047
|
}), jsxs("span", {
|
|
6920
|
-
className: styles$
|
|
7048
|
+
className: styles$I.text,
|
|
6921
7049
|
children: [jsx("span", {
|
|
6922
|
-
className: [styles$
|
|
7050
|
+
className: [styles$I.label, styles$I[state]].join(" "),
|
|
6923
7051
|
children: t(labelFor(entry))
|
|
6924
7052
|
}), entry.at ? jsx("time", {
|
|
6925
|
-
className: styles$
|
|
7053
|
+
className: styles$I.date,
|
|
6926
7054
|
dateTime: entry.at,
|
|
6927
7055
|
children: formatStepDate(entry.at, locale)
|
|
6928
7056
|
}) : estimate && jsx("span", {
|
|
6929
|
-
className: styles$
|
|
7057
|
+
className: styles$I.date,
|
|
6930
7058
|
children: estimate
|
|
6931
7059
|
})]
|
|
6932
7060
|
})]
|
|
6933
7061
|
}), i < progress2.length - 1 && jsx("span", {
|
|
6934
|
-
className: styles$
|
|
7062
|
+
className: styles$I.connector,
|
|
6935
7063
|
"aria-hidden": "true"
|
|
6936
7064
|
})]
|
|
6937
7065
|
}, entry.step);
|
|
@@ -6945,7 +7073,7 @@ function stateOf(entry, index, currentIndex) {
|
|
|
6945
7073
|
}
|
|
6946
7074
|
function StepTick({ tone }) {
|
|
6947
7075
|
return jsxs("svg", {
|
|
6948
|
-
className: styles$
|
|
7076
|
+
className: styles$I.tick,
|
|
6949
7077
|
width: "28",
|
|
6950
7078
|
height: "28",
|
|
6951
7079
|
viewBox: "0 0 28 28",
|
|
@@ -7090,7 +7218,7 @@ const row$7 = "_row_1hsxt_16";
|
|
|
7090
7218
|
const free = "_free_1hsxt_53";
|
|
7091
7219
|
const pending$1 = "_pending_1hsxt_59";
|
|
7092
7220
|
const discount = "_discount_1hsxt_69";
|
|
7093
|
-
const styles$
|
|
7221
|
+
const styles$H = {
|
|
7094
7222
|
summary,
|
|
7095
7223
|
row: row$7,
|
|
7096
7224
|
free,
|
|
@@ -7119,11 +7247,11 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
|
|
|
7119
7247
|
const isDeferred = (key) => deferred.includes(key);
|
|
7120
7248
|
const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "discount" || discount2 !== void 0);
|
|
7121
7249
|
return jsx("dl", {
|
|
7122
|
-
className: styles$
|
|
7250
|
+
className: styles$H.summary,
|
|
7123
7251
|
children: visible.map(({ label: label2, key }) => {
|
|
7124
7252
|
if (key === "discount" && discount2) {
|
|
7125
7253
|
return jsxs("div", {
|
|
7126
|
-
className: [styles$
|
|
7254
|
+
className: [styles$H.row, styles$H.discount].join(" "),
|
|
7127
7255
|
children: [jsx("dt", {
|
|
7128
7256
|
children: t(label2)
|
|
7129
7257
|
}), jsx("dd", {
|
|
@@ -7133,11 +7261,11 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
|
|
|
7133
7261
|
}
|
|
7134
7262
|
const pending2 = key !== "total" && isDeferred(key);
|
|
7135
7263
|
return jsxs("div", {
|
|
7136
|
-
className: styles$
|
|
7264
|
+
className: styles$H.row,
|
|
7137
7265
|
children: [jsx("dt", {
|
|
7138
7266
|
children: t(label2)
|
|
7139
7267
|
}), jsx("dd", {
|
|
7140
|
-
className: pending2 ? styles$
|
|
7268
|
+
className: pending2 ? styles$H.pending : void 0,
|
|
7141
7269
|
children: pending2 ? t("Calculated at checkout") : renderValue(key, pricing, format, t)
|
|
7142
7270
|
})]
|
|
7143
7271
|
}, key);
|
|
@@ -7147,7 +7275,7 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
|
|
|
7147
7275
|
function renderValue(key, pricing, format, t) {
|
|
7148
7276
|
if (key === "shipping" && pricing.shipping.amount === 0) {
|
|
7149
7277
|
return jsx("span", {
|
|
7150
|
-
className: styles$
|
|
7278
|
+
className: styles$H.free,
|
|
7151
7279
|
children: t("Free")
|
|
7152
7280
|
});
|
|
7153
7281
|
}
|
|
@@ -7156,7 +7284,7 @@ function renderValue(key, pricing, format, t) {
|
|
|
7156
7284
|
const lines$1 = "_lines_1lx0d_19";
|
|
7157
7285
|
const line$2 = "_line_1lx0d_19";
|
|
7158
7286
|
const thumb$2 = "_thumb_1lx0d_34";
|
|
7159
|
-
const image$
|
|
7287
|
+
const image$a = "_image_1lx0d_44";
|
|
7160
7288
|
const placeholder$8 = "_placeholder_1lx0d_51";
|
|
7161
7289
|
const lineBody = "_lineBody_1lx0d_56";
|
|
7162
7290
|
const lineText = "_lineText_1lx0d_65";
|
|
@@ -7174,11 +7302,11 @@ const itemsHeader = "_itemsHeader_1lx0d_14";
|
|
|
7174
7302
|
const itemsTitle = "_itemsTitle_1lx0d_238";
|
|
7175
7303
|
const itemsCount = "_itemsCount_1lx0d_249";
|
|
7176
7304
|
const cardLines = "_cardLines_1lx0d_268";
|
|
7177
|
-
const styles$
|
|
7305
|
+
const styles$G = {
|
|
7178
7306
|
lines: lines$1,
|
|
7179
7307
|
line: line$2,
|
|
7180
7308
|
thumb: thumb$2,
|
|
7181
|
-
image: image$
|
|
7309
|
+
image: image$a,
|
|
7182
7310
|
placeholder: placeholder$8,
|
|
7183
7311
|
lineBody,
|
|
7184
7312
|
lineText,
|
|
@@ -7217,42 +7345,42 @@ function OrderLine({ item: item2 }) {
|
|
|
7217
7345
|
const pct = compareAt2 ? discountPct(item2.unit_price, compareAt2) : void 0;
|
|
7218
7346
|
const details2 = detailsOf(item2, t);
|
|
7219
7347
|
return jsxs("li", {
|
|
7220
|
-
className: styles$
|
|
7348
|
+
className: styles$G.line,
|
|
7221
7349
|
children: [jsx("div", {
|
|
7222
|
-
className: styles$
|
|
7350
|
+
className: styles$G.thumb,
|
|
7223
7351
|
children: item2.image ? jsx(ShopImage, {
|
|
7224
7352
|
src: item2.image,
|
|
7225
7353
|
alt: "",
|
|
7226
7354
|
fill: true,
|
|
7227
7355
|
sizes: "48px",
|
|
7228
|
-
className: styles$
|
|
7356
|
+
className: styles$G.image
|
|
7229
7357
|
}) : jsx("div", {
|
|
7230
|
-
className: styles$
|
|
7358
|
+
className: styles$G.placeholder,
|
|
7231
7359
|
"aria-hidden": "true"
|
|
7232
7360
|
})
|
|
7233
7361
|
}), jsxs("div", {
|
|
7234
|
-
className: styles$
|
|
7362
|
+
className: styles$G.lineBody,
|
|
7235
7363
|
children: [jsxs("div", {
|
|
7236
|
-
className: styles$
|
|
7364
|
+
className: styles$G.lineText,
|
|
7237
7365
|
children: [jsx("span", {
|
|
7238
|
-
className: styles$
|
|
7366
|
+
className: styles$G.lineTitle,
|
|
7239
7367
|
children: item2.title ?? item2.sku
|
|
7240
7368
|
}), jsxs("span", {
|
|
7241
|
-
className: styles$
|
|
7369
|
+
className: styles$G.lineMeta,
|
|
7242
7370
|
children: [details2.map((detail2) => jsx("span", {
|
|
7243
|
-
className: styles$
|
|
7371
|
+
className: styles$G.detail,
|
|
7244
7372
|
children: detail2
|
|
7245
7373
|
}, detail2)), pct !== void 0 && jsx(SaleBadge, {
|
|
7246
7374
|
pct
|
|
7247
7375
|
})]
|
|
7248
7376
|
})]
|
|
7249
7377
|
}), jsxs("span", {
|
|
7250
|
-
className: styles$
|
|
7378
|
+
className: styles$G.linePrice,
|
|
7251
7379
|
children: [jsx("span", {
|
|
7252
|
-
className: styles$
|
|
7380
|
+
className: styles$G.paid,
|
|
7253
7381
|
children: format(item2.line_total)
|
|
7254
7382
|
}), compareAt2 && jsxs("span", {
|
|
7255
|
-
className: styles$
|
|
7383
|
+
className: styles$G.was,
|
|
7256
7384
|
children: [jsx("span", {
|
|
7257
7385
|
className: "visually-hidden",
|
|
7258
7386
|
children: t("Was {0}", format(compareAt2))
|
|
@@ -7268,7 +7396,7 @@ function OrderLine({ item: item2 }) {
|
|
|
7268
7396
|
function OrderLines({ order }) {
|
|
7269
7397
|
const t = useT();
|
|
7270
7398
|
return jsx("ul", {
|
|
7271
|
-
className: styles$
|
|
7399
|
+
className: styles$G.lines,
|
|
7272
7400
|
"aria-label": t("Items"),
|
|
7273
7401
|
children: order.items.map((item2) => jsx(OrderLine, {
|
|
7274
7402
|
item: item2
|
|
@@ -7279,19 +7407,19 @@ function OrderItemsCard({ order }) {
|
|
|
7279
7407
|
const t = useT();
|
|
7280
7408
|
const itemCount = order.items.reduce((n, i) => n + i.qty, 0);
|
|
7281
7409
|
return jsxs("section", {
|
|
7282
|
-
className: styles$
|
|
7410
|
+
className: styles$G.card,
|
|
7283
7411
|
"aria-label": t("Items"),
|
|
7284
7412
|
children: [jsxs("div", {
|
|
7285
|
-
className: styles$
|
|
7413
|
+
className: styles$G.itemsHeader,
|
|
7286
7414
|
children: [jsx("h2", {
|
|
7287
|
-
className: styles$
|
|
7415
|
+
className: styles$G.itemsTitle,
|
|
7288
7416
|
children: t("Items")
|
|
7289
7417
|
}), jsx("span", {
|
|
7290
|
-
className: styles$
|
|
7418
|
+
className: styles$G.itemsCount,
|
|
7291
7419
|
children: itemCount
|
|
7292
7420
|
})]
|
|
7293
7421
|
}), jsx("ul", {
|
|
7294
|
-
className: [styles$
|
|
7422
|
+
className: [styles$G.lines, styles$G.cardLines].join(" "),
|
|
7295
7423
|
children: order.items.map((item2) => jsx(OrderLine, {
|
|
7296
7424
|
item: item2
|
|
7297
7425
|
}, item2.line_ref))
|
|
@@ -7301,13 +7429,13 @@ function OrderItemsCard({ order }) {
|
|
|
7301
7429
|
function ShippingAddressCard({ order }) {
|
|
7302
7430
|
const t = useT();
|
|
7303
7431
|
return jsxs("section", {
|
|
7304
|
-
className: styles$
|
|
7432
|
+
className: styles$G.card,
|
|
7305
7433
|
"aria-label": t("Shipping address"),
|
|
7306
7434
|
children: [jsx("h2", {
|
|
7307
|
-
className: styles$
|
|
7435
|
+
className: styles$G.cardTitle,
|
|
7308
7436
|
children: t("Shipping address")
|
|
7309
7437
|
}), jsx("p", {
|
|
7310
|
-
className: styles$
|
|
7438
|
+
className: styles$G.cardBody,
|
|
7311
7439
|
children: formatAddress(order.ship_to)
|
|
7312
7440
|
})]
|
|
7313
7441
|
});
|
|
@@ -7315,10 +7443,10 @@ function ShippingAddressCard({ order }) {
|
|
|
7315
7443
|
function OrderSummaryCard({ order }) {
|
|
7316
7444
|
const t = useT();
|
|
7317
7445
|
return jsxs("section", {
|
|
7318
|
-
className: [styles$
|
|
7446
|
+
className: [styles$G.card, styles$G.summaryCard].join(" "),
|
|
7319
7447
|
"aria-label": t("Order summary"),
|
|
7320
7448
|
children: [jsx("h2", {
|
|
7321
|
-
className: styles$
|
|
7449
|
+
className: styles$G.cardTitle,
|
|
7322
7450
|
children: t("Order summary")
|
|
7323
7451
|
}), jsx(OrderSummary, {
|
|
7324
7452
|
pricing: toPricing(order),
|
|
@@ -7355,7 +7483,7 @@ const handleSlot = "_handleSlot_1f3nh_23";
|
|
|
7355
7483
|
const handle = "_handle_1f3nh_23";
|
|
7356
7484
|
const closeSlot$1 = "_closeSlot_1f3nh_35";
|
|
7357
7485
|
const close$2 = "_close_1f3nh_35";
|
|
7358
|
-
const styles$
|
|
7486
|
+
const styles$F = {
|
|
7359
7487
|
header: header$6,
|
|
7360
7488
|
slot,
|
|
7361
7489
|
handleSlot,
|
|
@@ -7383,23 +7511,23 @@ function CloseIcon$1() {
|
|
|
7383
7511
|
}
|
|
7384
7512
|
function SheetHeader({ onClose, closeLabel }) {
|
|
7385
7513
|
return jsxs("div", {
|
|
7386
|
-
className: styles$
|
|
7514
|
+
className: styles$F.header,
|
|
7387
7515
|
children: [jsx("div", {
|
|
7388
|
-
className: styles$
|
|
7516
|
+
className: styles$F.slot,
|
|
7389
7517
|
"aria-hidden": "true"
|
|
7390
7518
|
}), jsx("div", {
|
|
7391
|
-
className: styles$
|
|
7519
|
+
className: styles$F.handleSlot,
|
|
7392
7520
|
"aria-hidden": "true",
|
|
7393
7521
|
children: jsx("div", {
|
|
7394
|
-
className: styles$
|
|
7522
|
+
className: styles$F.handle
|
|
7395
7523
|
})
|
|
7396
7524
|
}), jsx("button", {
|
|
7397
7525
|
type: "button",
|
|
7398
|
-
className: styles$
|
|
7526
|
+
className: styles$F.closeSlot,
|
|
7399
7527
|
onClick: onClose,
|
|
7400
7528
|
"aria-label": closeLabel,
|
|
7401
7529
|
children: jsx("span", {
|
|
7402
|
-
className: styles$
|
|
7530
|
+
className: styles$F.close,
|
|
7403
7531
|
children: jsx(CloseIcon$1, {})
|
|
7404
7532
|
})
|
|
7405
7533
|
})]
|
|
@@ -7447,7 +7575,7 @@ function useModalDialog(open, onClose, ref) {
|
|
|
7447
7575
|
}
|
|
7448
7576
|
const scrim$5 = "_scrim_1oaa3_8";
|
|
7449
7577
|
const sheet$3 = "_sheet_1oaa3_20";
|
|
7450
|
-
const body$
|
|
7578
|
+
const body$7 = "_body_1oaa3_32";
|
|
7451
7579
|
const title$l = "_title_1oaa3_53";
|
|
7452
7580
|
const options$1 = "_options_1oaa3_61";
|
|
7453
7581
|
const option$1 = "_option_1oaa3_61";
|
|
@@ -7455,10 +7583,10 @@ const radio = "_radio_1oaa3_95";
|
|
|
7455
7583
|
const label$1 = "_label_1oaa3_125";
|
|
7456
7584
|
const footer$1 = "_footer_1oaa3_134";
|
|
7457
7585
|
const error$1 = "_error_1oaa3_142";
|
|
7458
|
-
const styles$
|
|
7586
|
+
const styles$E = {
|
|
7459
7587
|
scrim: scrim$5,
|
|
7460
7588
|
sheet: sheet$3,
|
|
7461
|
-
body: body$
|
|
7589
|
+
body: body$7,
|
|
7462
7590
|
title: title$l,
|
|
7463
7591
|
options: options$1,
|
|
7464
7592
|
option: option$1,
|
|
@@ -7473,12 +7601,12 @@ function ReasonSheet({ title: title2, options: options2, ctaLabel, selected: sel
|
|
|
7473
7601
|
const t = useT();
|
|
7474
7602
|
useModalDialog(true, onClose, sheetRef);
|
|
7475
7603
|
return jsx("div", {
|
|
7476
|
-
className: styles$
|
|
7604
|
+
className: styles$E.scrim,
|
|
7477
7605
|
onClick: onClose,
|
|
7478
7606
|
children: jsxs(ShopSurface, {
|
|
7479
7607
|
tone: "light",
|
|
7480
7608
|
ref: sheetRef,
|
|
7481
|
-
className: styles$
|
|
7609
|
+
className: styles$E.sheet,
|
|
7482
7610
|
role: "dialog",
|
|
7483
7611
|
"aria-modal": "true",
|
|
7484
7612
|
"aria-labelledby": "reason-sheet-title",
|
|
@@ -7487,23 +7615,23 @@ function ReasonSheet({ title: title2, options: options2, ctaLabel, selected: sel
|
|
|
7487
7615
|
onClose,
|
|
7488
7616
|
closeLabel
|
|
7489
7617
|
}), jsxs("div", {
|
|
7490
|
-
className: styles$
|
|
7618
|
+
className: styles$E.body,
|
|
7491
7619
|
children: [jsx("h2", {
|
|
7492
7620
|
id: "reason-sheet-title",
|
|
7493
|
-
className: styles$
|
|
7621
|
+
className: styles$E.title,
|
|
7494
7622
|
children: t(title2)
|
|
7495
7623
|
}), jsx("div", {
|
|
7496
|
-
className: styles$
|
|
7624
|
+
className: styles$E.options,
|
|
7497
7625
|
role: "radiogroup",
|
|
7498
7626
|
"aria-labelledby": "reason-sheet-title",
|
|
7499
7627
|
children: options2.map((o) => jsxs("button", {
|
|
7500
7628
|
type: "button",
|
|
7501
7629
|
role: "radio",
|
|
7502
7630
|
"aria-checked": o.value === choice,
|
|
7503
|
-
className: styles$
|
|
7631
|
+
className: styles$E.option,
|
|
7504
7632
|
onClick: () => setChoice(o.value),
|
|
7505
7633
|
children: [jsx("span", {
|
|
7506
|
-
className: styles$
|
|
7634
|
+
className: styles$E.radio,
|
|
7507
7635
|
"aria-hidden": "true",
|
|
7508
7636
|
children: o.value === choice && jsxs("svg", {
|
|
7509
7637
|
width: "20",
|
|
@@ -7524,15 +7652,15 @@ function ReasonSheet({ title: title2, options: options2, ctaLabel, selected: sel
|
|
|
7524
7652
|
})]
|
|
7525
7653
|
})
|
|
7526
7654
|
}), jsx("span", {
|
|
7527
|
-
className: styles$
|
|
7655
|
+
className: styles$E.label,
|
|
7528
7656
|
children: t(o.label)
|
|
7529
7657
|
})]
|
|
7530
7658
|
}, o.value))
|
|
7531
7659
|
})]
|
|
7532
7660
|
}), jsxs("div", {
|
|
7533
|
-
className: styles$
|
|
7661
|
+
className: styles$E.footer,
|
|
7534
7662
|
children: [error2 && jsx("p", {
|
|
7535
|
-
className: styles$
|
|
7663
|
+
className: styles$E.error,
|
|
7536
7664
|
role: "alert",
|
|
7537
7665
|
children: error2
|
|
7538
7666
|
}), jsx(Button, {
|
|
@@ -7557,7 +7685,7 @@ const attrs$1 = "_attrs_1pjby_55";
|
|
|
7557
7685
|
const price$3 = "_price_1pjby_63";
|
|
7558
7686
|
const paid$2 = "_paid_1pjby_72";
|
|
7559
7687
|
const was$3 = "_was_1pjby_80";
|
|
7560
|
-
const styles$
|
|
7688
|
+
const styles$D = {
|
|
7561
7689
|
line: line$1,
|
|
7562
7690
|
thumb: thumb$1,
|
|
7563
7691
|
img: img$1,
|
|
@@ -7573,35 +7701,35 @@ function ReturnItemRow({ item: item2, className }) {
|
|
|
7573
7701
|
const { format } = useMoney();
|
|
7574
7702
|
const t = useT();
|
|
7575
7703
|
return jsxs("div", {
|
|
7576
|
-
className: [styles$
|
|
7704
|
+
className: [styles$D.line, className ?? ""].join(" ").trim(),
|
|
7577
7705
|
children: [jsx("div", {
|
|
7578
|
-
className: styles$
|
|
7706
|
+
className: styles$D.thumb,
|
|
7579
7707
|
children: item2.image ? jsx(ShopImage, {
|
|
7580
7708
|
src: item2.image,
|
|
7581
7709
|
alt: "",
|
|
7582
7710
|
fill: true,
|
|
7583
7711
|
sizes: "48px",
|
|
7584
|
-
className: styles$
|
|
7712
|
+
className: styles$D.img
|
|
7585
7713
|
}) : jsx("div", {
|
|
7586
|
-
className: styles$
|
|
7714
|
+
className: styles$D.placeholder,
|
|
7587
7715
|
"aria-hidden": "true"
|
|
7588
7716
|
})
|
|
7589
7717
|
}), jsxs("div", {
|
|
7590
|
-
className: styles$
|
|
7718
|
+
className: styles$D.meta,
|
|
7591
7719
|
children: [jsx("p", {
|
|
7592
|
-
className: styles$
|
|
7720
|
+
className: styles$D.name,
|
|
7593
7721
|
children: item2.title ?? item2.sku
|
|
7594
7722
|
}), item2.attributes?.size && jsx("p", {
|
|
7595
|
-
className: styles$
|
|
7723
|
+
className: styles$D.attrs,
|
|
7596
7724
|
children: t("Size: {0}", item2.attributes.size)
|
|
7597
7725
|
})]
|
|
7598
7726
|
}), jsxs("div", {
|
|
7599
|
-
className: styles$
|
|
7727
|
+
className: styles$D.price,
|
|
7600
7728
|
children: [jsx("span", {
|
|
7601
|
-
className: styles$
|
|
7729
|
+
className: styles$D.paid,
|
|
7602
7730
|
children: format(item2.unit_price)
|
|
7603
7731
|
}), item2.compare_at_unit_price && jsxs("span", {
|
|
7604
|
-
className: styles$
|
|
7732
|
+
className: styles$D.was,
|
|
7605
7733
|
children: [jsx("span", {
|
|
7606
7734
|
className: "visually-hidden",
|
|
7607
7735
|
children: t("Was {0}", format(item2.compare_at_unit_price))
|
|
@@ -7624,7 +7752,7 @@ const check = "_check_15fz5_66";
|
|
|
7624
7752
|
const row$6 = "_row_15fz5_110";
|
|
7625
7753
|
const reason = "_reason_15fz5_135";
|
|
7626
7754
|
const reasonSet = "_reasonSet_15fz5_155";
|
|
7627
|
-
const styles$
|
|
7755
|
+
const styles$C = {
|
|
7628
7756
|
page: page$6,
|
|
7629
7757
|
titles: titles$2,
|
|
7630
7758
|
title: title$k,
|
|
@@ -7731,55 +7859,55 @@ function ReturnItemsView({ order, onSubmit, busy = false }) {
|
|
|
7731
7859
|
}
|
|
7732
7860
|
if (returnable.length === 0) {
|
|
7733
7861
|
return jsx("div", {
|
|
7734
|
-
className: styles$
|
|
7862
|
+
className: styles$C.page,
|
|
7735
7863
|
children: jsxs("div", {
|
|
7736
|
-
className: styles$
|
|
7864
|
+
className: styles$C.titles,
|
|
7737
7865
|
children: [jsx("h1", {
|
|
7738
|
-
className: styles$
|
|
7866
|
+
className: styles$C.title,
|
|
7739
7867
|
children: t("Nothing left to return")
|
|
7740
7868
|
}), jsx("p", {
|
|
7741
|
-
className: styles$
|
|
7869
|
+
className: styles$C.subtitle,
|
|
7742
7870
|
children: t("Every item on this order has already been returned or cancelled.")
|
|
7743
7871
|
})]
|
|
7744
7872
|
})
|
|
7745
7873
|
});
|
|
7746
7874
|
}
|
|
7747
7875
|
return jsxs("div", {
|
|
7748
|
-
className: styles$
|
|
7876
|
+
className: styles$C.page,
|
|
7749
7877
|
children: [jsxs("div", {
|
|
7750
|
-
className: styles$
|
|
7878
|
+
className: styles$C.titles,
|
|
7751
7879
|
children: [jsx("h1", {
|
|
7752
|
-
className: styles$
|
|
7880
|
+
className: styles$C.title,
|
|
7753
7881
|
children: t("What do you want to return?")
|
|
7754
7882
|
}), jsx("p", {
|
|
7755
|
-
className: styles$
|
|
7883
|
+
className: styles$C.subtitle,
|
|
7756
7884
|
children: t("Select items you want to return")
|
|
7757
7885
|
})]
|
|
7758
7886
|
}), jsx("div", {
|
|
7759
|
-
className: styles$
|
|
7887
|
+
className: styles$C.list,
|
|
7760
7888
|
children: returnable.map((item2) => {
|
|
7761
7889
|
const picked = item2.line_ref in chosen;
|
|
7762
7890
|
const reason2 = chosen[item2.line_ref];
|
|
7763
7891
|
return jsxs("div", {
|
|
7764
|
-
className: styles$
|
|
7892
|
+
className: styles$C.card,
|
|
7765
7893
|
children: [jsx("button", {
|
|
7766
7894
|
type: "button",
|
|
7767
7895
|
role: "checkbox",
|
|
7768
7896
|
"aria-checked": picked,
|
|
7769
7897
|
"aria-label": item2.title ?? item2.sku,
|
|
7770
|
-
className: styles$
|
|
7898
|
+
className: styles$C.checkSlot,
|
|
7771
7899
|
onClick: () => toggle2(item2.line_ref),
|
|
7772
7900
|
children: jsx("span", {
|
|
7773
|
-
className: styles$
|
|
7901
|
+
className: styles$C.check,
|
|
7774
7902
|
children: picked ? jsx(Tick, {}) : null
|
|
7775
7903
|
})
|
|
7776
7904
|
}), jsxs("div", {
|
|
7777
|
-
className: styles$
|
|
7905
|
+
className: styles$C.row,
|
|
7778
7906
|
children: [jsx(ReturnItemRow, {
|
|
7779
7907
|
item: item2
|
|
7780
7908
|
}), jsxs("button", {
|
|
7781
7909
|
type: "button",
|
|
7782
|
-
className: `${styles$
|
|
7910
|
+
className: `${styles$C.reason} ${reason2 ? styles$C.reasonSet : ""}`,
|
|
7783
7911
|
onClick: () => setReasonFor(item2.line_ref),
|
|
7784
7912
|
"aria-haspopup": "dialog",
|
|
7785
7913
|
children: [jsx("span", {
|
|
@@ -7827,11 +7955,11 @@ const step2 = "_step2_51f4e_74";
|
|
|
7827
7955
|
const stepHead = "_stepHead_51f4e_80";
|
|
7828
7956
|
const number = "_number_51f4e_87";
|
|
7829
7957
|
const stepTitle = "_stepTitle_51f4e_102";
|
|
7830
|
-
const body$
|
|
7958
|
+
const body$6 = "_body_51f4e_113";
|
|
7831
7959
|
const body2 = "_body2_51f4e_121";
|
|
7832
7960
|
const download = "_download_51f4e_139";
|
|
7833
7961
|
const note$1 = "_note_51f4e_161";
|
|
7834
|
-
const styles$
|
|
7962
|
+
const styles$B = {
|
|
7835
7963
|
page: page$5,
|
|
7836
7964
|
top,
|
|
7837
7965
|
items: items$2,
|
|
@@ -7844,7 +7972,7 @@ const styles$A = {
|
|
|
7844
7972
|
stepHead,
|
|
7845
7973
|
number,
|
|
7846
7974
|
stepTitle,
|
|
7847
|
-
body: body$
|
|
7975
|
+
body: body$6,
|
|
7848
7976
|
body2,
|
|
7849
7977
|
download,
|
|
7850
7978
|
note: note$1
|
|
@@ -7905,42 +8033,42 @@ function ReturnLabelView({ ret, onDone }) {
|
|
|
7905
8033
|
const t = useT();
|
|
7906
8034
|
const { preparing, unavailable, onDownload } = useLabelDownload(ret.label_url);
|
|
7907
8035
|
return jsxs("div", {
|
|
7908
|
-
className: styles$
|
|
8036
|
+
className: styles$B.page,
|
|
7909
8037
|
children: [jsxs("div", {
|
|
7910
|
-
className: styles$
|
|
8038
|
+
className: styles$B.top,
|
|
7911
8039
|
children: [jsx("div", {
|
|
7912
|
-
className: styles$
|
|
8040
|
+
className: styles$B.items,
|
|
7913
8041
|
children: ret.items.map((item2) => jsx(ReturnItemRow, {
|
|
7914
8042
|
item: item2
|
|
7915
8043
|
}, item2.line_ref))
|
|
7916
8044
|
}), jsxs("div", {
|
|
7917
|
-
className: styles$
|
|
8045
|
+
className: styles$B.intro,
|
|
7918
8046
|
children: [jsx("h1", {
|
|
7919
|
-
className: styles$
|
|
8047
|
+
className: styles$B.title,
|
|
7920
8048
|
children: t("We’ve generated your return label")
|
|
7921
8049
|
}), jsx("p", {
|
|
7922
|
-
className: styles$
|
|
8050
|
+
className: styles$B.subtitle,
|
|
7923
8051
|
children: t("Follow the instructions below to complete your return")
|
|
7924
8052
|
})]
|
|
7925
8053
|
}), jsxs("div", {
|
|
7926
|
-
className: styles$
|
|
8054
|
+
className: styles$B.card,
|
|
7927
8055
|
children: [jsxs("section", {
|
|
7928
|
-
className: styles$
|
|
8056
|
+
className: styles$B.step,
|
|
7929
8057
|
children: [jsxs("div", {
|
|
7930
|
-
className: styles$
|
|
8058
|
+
className: styles$B.stepHead,
|
|
7931
8059
|
children: [jsx("span", {
|
|
7932
|
-
className: styles$
|
|
8060
|
+
className: styles$B.number,
|
|
7933
8061
|
"aria-hidden": "true",
|
|
7934
8062
|
children: "1"
|
|
7935
8063
|
}), jsx("h2", {
|
|
7936
|
-
className: styles$
|
|
8064
|
+
className: styles$B.stepTitle,
|
|
7937
8065
|
children: t("Download your return label")
|
|
7938
8066
|
})]
|
|
7939
8067
|
}), jsx("p", {
|
|
7940
|
-
className: styles$
|
|
8068
|
+
className: styles$B.body,
|
|
7941
8069
|
children: t("Tap the button below to download your pre-paid return label")
|
|
7942
8070
|
}), ret.label_url && jsxs("a", {
|
|
7943
|
-
className: styles$
|
|
8071
|
+
className: styles$B.download,
|
|
7944
8072
|
href: ret.label_url,
|
|
7945
8073
|
target: "_blank",
|
|
7946
8074
|
rel: "noopener noreferrer",
|
|
@@ -7952,27 +8080,27 @@ function ReturnLabelView({ ret, onDone }) {
|
|
|
7952
8080
|
children: ` ${t("(opens in a new tab)")}`
|
|
7953
8081
|
})]
|
|
7954
8082
|
}), unavailable && jsx("p", {
|
|
7955
|
-
className: styles$
|
|
8083
|
+
className: styles$B.note,
|
|
7956
8084
|
role: "status",
|
|
7957
8085
|
children: t("Your return label is not ready yet. Try again in a moment.")
|
|
7958
8086
|
}), ret.label_email && jsxs("p", {
|
|
7959
|
-
className: styles$
|
|
8087
|
+
className: styles$B.note,
|
|
7960
8088
|
children: [t("You’ll receive a shipping label PDF to your email as well."), jsx("br", {}), ret.label_email]
|
|
7961
8089
|
})]
|
|
7962
8090
|
}), jsxs("section", {
|
|
7963
|
-
className: styles$
|
|
8091
|
+
className: styles$B.step2,
|
|
7964
8092
|
children: [jsxs("div", {
|
|
7965
|
-
className: styles$
|
|
8093
|
+
className: styles$B.stepHead,
|
|
7966
8094
|
children: [jsx("span", {
|
|
7967
|
-
className: styles$
|
|
8095
|
+
className: styles$B.number,
|
|
7968
8096
|
"aria-hidden": "true",
|
|
7969
8097
|
children: "2"
|
|
7970
8098
|
}), jsx("h2", {
|
|
7971
|
-
className: styles$
|
|
8099
|
+
className: styles$B.stepTitle,
|
|
7972
8100
|
children: t("Pack and ship the item")
|
|
7973
8101
|
})]
|
|
7974
8102
|
}), jsxs("p", {
|
|
7975
|
-
className: styles$
|
|
8103
|
+
className: styles$B.body2,
|
|
7976
8104
|
children: [t("Repackage the item securely and attach the return label to the outside of the package."), jsx("br", {}), t("Drop it off at your local carrier or post office.")]
|
|
7977
8105
|
})]
|
|
7978
8106
|
})]
|
|
@@ -8000,7 +8128,7 @@ const attrs = "_attrs_g4vus_108";
|
|
|
8000
8128
|
const price$2 = "_price_g4vus_123";
|
|
8001
8129
|
const paid$1 = "_paid_g4vus_132";
|
|
8002
8130
|
const was$2 = "_was_g4vus_140";
|
|
8003
|
-
const styles$
|
|
8131
|
+
const styles$A = {
|
|
8004
8132
|
page: page$4,
|
|
8005
8133
|
titles: titles$1,
|
|
8006
8134
|
title: title$i,
|
|
@@ -8034,42 +8162,42 @@ function ReturnTrackingView({ ret, locale: localeProp }) {
|
|
|
8034
8162
|
tone: "light",
|
|
8035
8163
|
fill: true,
|
|
8036
8164
|
children: jsxs("div", {
|
|
8037
|
-
className: styles$
|
|
8165
|
+
className: styles$A.page,
|
|
8038
8166
|
children: [jsxs("div", {
|
|
8039
|
-
className: styles$
|
|
8167
|
+
className: styles$A.titles,
|
|
8040
8168
|
children: [jsx("h1", {
|
|
8041
|
-
className: styles$
|
|
8169
|
+
className: styles$A.title,
|
|
8042
8170
|
children: t("Return in progress")
|
|
8043
8171
|
}), jsx("p", {
|
|
8044
|
-
className: styles$
|
|
8172
|
+
className: styles$A.subtitle,
|
|
8045
8173
|
children: t("Return #{0} · Reported {1}", ret.return_ref, reported)
|
|
8046
8174
|
})]
|
|
8047
8175
|
}), jsx(OrderTimeline, {
|
|
8048
8176
|
progress: ret.progress,
|
|
8049
8177
|
locale
|
|
8050
8178
|
}), jsx("ul", {
|
|
8051
|
-
className: styles$
|
|
8179
|
+
className: styles$A.items,
|
|
8052
8180
|
children: ret.items.map((item2) => jsxs("li", {
|
|
8053
|
-
className: styles$
|
|
8181
|
+
className: styles$A.item,
|
|
8054
8182
|
children: [jsx("div", {
|
|
8055
|
-
className: styles$
|
|
8183
|
+
className: styles$A.thumb,
|
|
8056
8184
|
children: item2.image ? jsx(ShopImage, {
|
|
8057
8185
|
src: item2.image,
|
|
8058
8186
|
alt: "",
|
|
8059
8187
|
fill: true,
|
|
8060
8188
|
sizes: "48px",
|
|
8061
|
-
className: styles$
|
|
8189
|
+
className: styles$A.img
|
|
8062
8190
|
}) : jsx("div", {
|
|
8063
|
-
className: styles$
|
|
8191
|
+
className: styles$A.placeholder,
|
|
8064
8192
|
"aria-hidden": "true"
|
|
8065
8193
|
})
|
|
8066
8194
|
}), jsxs("div", {
|
|
8067
|
-
className: styles$
|
|
8195
|
+
className: styles$A.meta,
|
|
8068
8196
|
children: [jsx("p", {
|
|
8069
|
-
className: styles$
|
|
8197
|
+
className: styles$A.name,
|
|
8070
8198
|
children: item2.title ?? item2.sku
|
|
8071
8199
|
}), (item2.attributes?.size || pctOff(item2)) && jsxs("p", {
|
|
8072
|
-
className: styles$
|
|
8200
|
+
className: styles$A.attrs,
|
|
8073
8201
|
children: [item2.attributes?.size && jsx("span", {
|
|
8074
8202
|
children: t("Size: {0}", item2.attributes.size)
|
|
8075
8203
|
}), pctOff(item2) !== void 0 && jsx(SaleBadge, {
|
|
@@ -8077,12 +8205,12 @@ function ReturnTrackingView({ ret, locale: localeProp }) {
|
|
|
8077
8205
|
})]
|
|
8078
8206
|
})]
|
|
8079
8207
|
}), jsxs("div", {
|
|
8080
|
-
className: styles$
|
|
8208
|
+
className: styles$A.price,
|
|
8081
8209
|
children: [jsx("span", {
|
|
8082
|
-
className: styles$
|
|
8210
|
+
className: styles$A.paid,
|
|
8083
8211
|
children: format(item2.unit_price)
|
|
8084
8212
|
}), item2.compare_at_unit_price && jsx("span", {
|
|
8085
|
-
className: styles$
|
|
8213
|
+
className: styles$A.was,
|
|
8086
8214
|
children: format(item2.compare_at_unit_price)
|
|
8087
8215
|
})]
|
|
8088
8216
|
})]
|
|
@@ -8201,7 +8329,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
|
|
|
8201
8329
|
const page$3 = "_page_1iwin_8";
|
|
8202
8330
|
const widget = "_widget_1iwin_18";
|
|
8203
8331
|
const titleRow = "_titleRow_1iwin_26";
|
|
8204
|
-
const headline$
|
|
8332
|
+
const headline$2 = "_headline_1iwin_42";
|
|
8205
8333
|
const track$5 = "_track_1iwin_74";
|
|
8206
8334
|
const rule$1 = "_rule_1iwin_99";
|
|
8207
8335
|
const help = "_help_1iwin_109";
|
|
@@ -8214,11 +8342,11 @@ const cancel = "_cancel_1iwin_197";
|
|
|
8214
8342
|
const cancelledHead = "_cancelledHead_1iwin_221";
|
|
8215
8343
|
const cancelledTitle = "_cancelledTitle_1iwin_227";
|
|
8216
8344
|
const cancelledMeta = "_cancelledMeta_1iwin_241";
|
|
8217
|
-
const styles$
|
|
8345
|
+
const styles$z = {
|
|
8218
8346
|
page: page$3,
|
|
8219
8347
|
widget,
|
|
8220
8348
|
titleRow,
|
|
8221
|
-
headline: headline$
|
|
8349
|
+
headline: headline$2,
|
|
8222
8350
|
track: track$5,
|
|
8223
8351
|
rule: rule$1,
|
|
8224
8352
|
help,
|
|
@@ -8321,7 +8449,7 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onO
|
|
|
8321
8449
|
}, [cancelled]);
|
|
8322
8450
|
if (state === "loading") {
|
|
8323
8451
|
return jsxs("div", {
|
|
8324
|
-
className: styles$
|
|
8452
|
+
className: styles$z.page,
|
|
8325
8453
|
children: [jsx(Skeleton, {
|
|
8326
8454
|
height: 206,
|
|
8327
8455
|
radius: 8
|
|
@@ -8399,18 +8527,18 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onO
|
|
|
8399
8527
|
}
|
|
8400
8528
|
if (order.status === "cancelled") {
|
|
8401
8529
|
return jsxs("div", {
|
|
8402
|
-
className: styles$
|
|
8530
|
+
className: styles$z.page,
|
|
8403
8531
|
ref: cancelledPage,
|
|
8404
8532
|
children: [jsxs("div", {
|
|
8405
|
-
className: styles$
|
|
8533
|
+
className: styles$z.cancelledHead,
|
|
8406
8534
|
children: [jsx("h1", {
|
|
8407
|
-
className: styles$
|
|
8535
|
+
className: styles$z.cancelledTitle,
|
|
8408
8536
|
children: t("Order cancelled")
|
|
8409
8537
|
}), jsx("p", {
|
|
8410
|
-
className: styles$
|
|
8538
|
+
className: styles$z.cancelledMeta,
|
|
8411
8539
|
children: t("Order #{0} · Placed {1}", shortRef$1(order.order_ref), placedOn(order.placed_at, locale))
|
|
8412
8540
|
})]
|
|
8413
|
-
}), jsx(Button, {
|
|
8541
|
+
}), !order.vip && jsx(Button, {
|
|
8414
8542
|
variant: "primary",
|
|
8415
8543
|
fullWidth: true,
|
|
8416
8544
|
loading: reordering,
|
|
@@ -8426,17 +8554,17 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onO
|
|
|
8426
8554
|
});
|
|
8427
8555
|
}
|
|
8428
8556
|
return jsxs("div", {
|
|
8429
|
-
className: styles$
|
|
8557
|
+
className: styles$z.page,
|
|
8430
8558
|
children: [jsxs("section", {
|
|
8431
|
-
className: styles$
|
|
8559
|
+
className: styles$z.widget,
|
|
8432
8560
|
"aria-label": t("Delivery status"),
|
|
8433
8561
|
children: [jsxs("div", {
|
|
8434
|
-
className: styles$
|
|
8562
|
+
className: styles$z.titleRow,
|
|
8435
8563
|
children: [jsx("h1", {
|
|
8436
|
-
className: styles$
|
|
8564
|
+
className: styles$z.headline,
|
|
8437
8565
|
children: t("Order #{0}", shortRef$1(order.order_ref))
|
|
8438
8566
|
}), order.tracking?.url && inTransit && jsxs("a", {
|
|
8439
|
-
className: styles$
|
|
8567
|
+
className: styles$z.track,
|
|
8440
8568
|
href: order.tracking.url,
|
|
8441
8569
|
target: "_blank",
|
|
8442
8570
|
rel: "noopener noreferrer",
|
|
@@ -8453,7 +8581,7 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onO
|
|
|
8453
8581
|
locale
|
|
8454
8582
|
})]
|
|
8455
8583
|
}), jsx("hr", {
|
|
8456
|
-
className: styles$
|
|
8584
|
+
className: styles$z.rule
|
|
8457
8585
|
}), jsx(OrderLines, {
|
|
8458
8586
|
order
|
|
8459
8587
|
}), jsx(ShippingAddressCard, {
|
|
@@ -8462,7 +8590,7 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onO
|
|
|
8462
8590
|
order
|
|
8463
8591
|
}), order.can_cancel && jsx("button", {
|
|
8464
8592
|
type: "button",
|
|
8465
|
-
className: styles$
|
|
8593
|
+
className: styles$z.cancel,
|
|
8466
8594
|
onClick: () => setCancelOpen(true),
|
|
8467
8595
|
children: t("Cancel order")
|
|
8468
8596
|
}), jsx(NeedHelp, {
|
|
@@ -8515,14 +8643,14 @@ function NeedHelp({ order, onStartReturn, onOpenReturn, onContactSupport }) {
|
|
|
8515
8643
|
if (order.status !== "delivered") return null;
|
|
8516
8644
|
const returns = order.returns ?? [];
|
|
8517
8645
|
return jsxs("section", {
|
|
8518
|
-
className: styles$
|
|
8646
|
+
className: styles$z.help,
|
|
8519
8647
|
"aria-labelledby": "order-help",
|
|
8520
8648
|
children: [jsx("h2", {
|
|
8521
|
-
className: styles$
|
|
8649
|
+
className: styles$z.helpTitle,
|
|
8522
8650
|
id: "order-help",
|
|
8523
8651
|
children: t("Need help?")
|
|
8524
8652
|
}), jsxs("div", {
|
|
8525
|
-
className: styles$
|
|
8653
|
+
className: styles$z.helpRows,
|
|
8526
8654
|
children: [returns.map((ret) => jsx(HelpRow, {
|
|
8527
8655
|
label: returns.length > 1 ? t("Track return {0}", ret.return_ref) : "Track your return",
|
|
8528
8656
|
status: RETURN_STATUS[ret.status] ?? ret.status.replace(/_/g, " "),
|
|
@@ -8552,14 +8680,14 @@ function HelpRow({ label: label2, status, onClick }) {
|
|
|
8552
8680
|
const t = useT();
|
|
8553
8681
|
return jsxs("button", {
|
|
8554
8682
|
type: "button",
|
|
8555
|
-
className: styles$
|
|
8683
|
+
className: styles$z.helpRow,
|
|
8556
8684
|
onClick,
|
|
8557
8685
|
children: [jsx("span", {
|
|
8558
8686
|
children: t(label2)
|
|
8559
8687
|
}), jsxs("span", {
|
|
8560
|
-
className: styles$
|
|
8688
|
+
className: styles$z.helpRowEnd,
|
|
8561
8689
|
children: [status && jsx("span", {
|
|
8562
|
-
className: styles$
|
|
8690
|
+
className: styles$z.helpStatus,
|
|
8563
8691
|
children: t(status)
|
|
8564
8692
|
}), jsx(ChevronRight$1, {})]
|
|
8565
8693
|
})]
|
|
@@ -8571,15 +8699,15 @@ function shortRef$1(orderRef) {
|
|
|
8571
8699
|
const page$2 = "_page_vqbqs_6";
|
|
8572
8700
|
const confirmed = "_confirmed_vqbqs_16";
|
|
8573
8701
|
const title$h = "_title_vqbqs_22";
|
|
8574
|
-
const headline = "_headline_vqbqs_47";
|
|
8702
|
+
const headline$1 = "_headline_vqbqs_47";
|
|
8575
8703
|
const subtitle$4 = "_subtitle_vqbqs_65";
|
|
8576
8704
|
const rule = "_rule_vqbqs_77";
|
|
8577
8705
|
const done = "_done_vqbqs_94";
|
|
8578
|
-
const styles$
|
|
8706
|
+
const styles$y = {
|
|
8579
8707
|
page: page$2,
|
|
8580
8708
|
confirmed,
|
|
8581
8709
|
title: title$h,
|
|
8582
|
-
headline,
|
|
8710
|
+
headline: headline$1,
|
|
8583
8711
|
subtitle: subtitle$4,
|
|
8584
8712
|
rule,
|
|
8585
8713
|
done
|
|
@@ -8629,7 +8757,7 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
|
|
|
8629
8757
|
}, [load]);
|
|
8630
8758
|
if (state === "loading") {
|
|
8631
8759
|
return jsxs("div", {
|
|
8632
|
-
className: styles$
|
|
8760
|
+
className: styles$y.page,
|
|
8633
8761
|
children: [jsx(Skeleton, {
|
|
8634
8762
|
height: 140,
|
|
8635
8763
|
radius: 8
|
|
@@ -8652,17 +8780,17 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
|
|
|
8652
8780
|
});
|
|
8653
8781
|
}
|
|
8654
8782
|
return jsxs("div", {
|
|
8655
|
-
className: styles$
|
|
8783
|
+
className: styles$y.page,
|
|
8656
8784
|
children: [jsxs("section", {
|
|
8657
|
-
className: styles$
|
|
8785
|
+
className: styles$y.confirmed,
|
|
8658
8786
|
"aria-label": t("Order confirmation"),
|
|
8659
8787
|
children: [jsxs("div", {
|
|
8660
|
-
className: styles$
|
|
8788
|
+
className: styles$y.title,
|
|
8661
8789
|
children: [jsx("h1", {
|
|
8662
|
-
className: styles$
|
|
8790
|
+
className: styles$y.headline,
|
|
8663
8791
|
children: t("Your order is confirmed")
|
|
8664
8792
|
}), order.email && jsx("p", {
|
|
8665
|
-
className: styles$
|
|
8793
|
+
className: styles$y.subtitle,
|
|
8666
8794
|
children: t("We’ve sent a confirmation to {0}", order.email)
|
|
8667
8795
|
})]
|
|
8668
8796
|
}), jsx(OrderTimeline, {
|
|
@@ -8673,7 +8801,7 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
|
|
|
8673
8801
|
locale
|
|
8674
8802
|
})]
|
|
8675
8803
|
}), jsx("hr", {
|
|
8676
|
-
className: styles$
|
|
8804
|
+
className: styles$y.rule
|
|
8677
8805
|
}), jsx(OrderLines, {
|
|
8678
8806
|
order
|
|
8679
8807
|
}), jsx(ShippingAddressCard, {
|
|
@@ -8683,7 +8811,7 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
|
|
|
8683
8811
|
}), onDone && jsx(Button, {
|
|
8684
8812
|
variant: "secondary",
|
|
8685
8813
|
fullWidth: true,
|
|
8686
|
-
className: styles$
|
|
8814
|
+
className: styles$y.done,
|
|
8687
8815
|
onClick: onDone,
|
|
8688
8816
|
children: t("Done")
|
|
8689
8817
|
})]
|
|
@@ -8694,7 +8822,7 @@ const progress = "_progress_u46qd_22";
|
|
|
8694
8822
|
const delivered = "_delivered_u46qd_27";
|
|
8695
8823
|
const neutral = "_neutral_u46qd_34";
|
|
8696
8824
|
const critical = "_critical_u46qd_43";
|
|
8697
|
-
const styles$
|
|
8825
|
+
const styles$x = {
|
|
8698
8826
|
badge: badge$2,
|
|
8699
8827
|
progress,
|
|
8700
8828
|
delivered,
|
|
@@ -8720,7 +8848,7 @@ function OrderStatusBadge({ status }) {
|
|
|
8720
8848
|
const label2 = LABEL[status] ?? status.replace(/_/g, " ");
|
|
8721
8849
|
const tone = TONE[status] ?? "neutral";
|
|
8722
8850
|
return jsx("span", {
|
|
8723
|
-
className: [styles$
|
|
8851
|
+
className: [styles$x.badge, styles$x[tone]].join(" "),
|
|
8724
8852
|
children: t(label2)
|
|
8725
8853
|
});
|
|
8726
8854
|
}
|
|
@@ -8739,13 +8867,13 @@ function ReturnStatusBadge({ status }) {
|
|
|
8739
8867
|
const label2 = RETURN_LABEL[status] ?? status.replace(/_/g, " ");
|
|
8740
8868
|
const tone = RETURN_TONE[status] ?? "neutral";
|
|
8741
8869
|
return jsx("span", {
|
|
8742
|
-
className: [styles$
|
|
8870
|
+
className: [styles$x.badge, styles$x[tone]].join(" "),
|
|
8743
8871
|
children: t(label2)
|
|
8744
8872
|
});
|
|
8745
8873
|
}
|
|
8746
8874
|
const page$1 = "_page_qj11j_2";
|
|
8747
8875
|
const empty = "_empty_qj11j_22";
|
|
8748
|
-
const cta$
|
|
8876
|
+
const cta$2 = "_cta_qj11j_32";
|
|
8749
8877
|
const card$1 = "_card_qj11j_55";
|
|
8750
8878
|
const tappable = "_tappable_qj11j_70";
|
|
8751
8879
|
const head$1 = "_head_qj11j_79";
|
|
@@ -8756,14 +8884,14 @@ const bottom$1 = "_bottom_qj11j_120";
|
|
|
8756
8884
|
const strip = "_strip_qj11j_128";
|
|
8757
8885
|
const meta$1 = "_meta_qj11j_141";
|
|
8758
8886
|
const tile$2 = "_tile_qj11j_150";
|
|
8759
|
-
const image$
|
|
8887
|
+
const image$9 = "_image_qj11j_160";
|
|
8760
8888
|
const placeholder$5 = "_placeholder_qj11j_167";
|
|
8761
8889
|
const more = "_more_qj11j_174";
|
|
8762
8890
|
const chevron$2 = "_chevron_qj11j_187";
|
|
8763
|
-
const styles$
|
|
8891
|
+
const styles$w = {
|
|
8764
8892
|
page: page$1,
|
|
8765
8893
|
empty,
|
|
8766
|
-
cta: cta$
|
|
8894
|
+
cta: cta$2,
|
|
8767
8895
|
card: card$1,
|
|
8768
8896
|
tappable,
|
|
8769
8897
|
head: head$1,
|
|
@@ -8774,7 +8902,7 @@ const styles$v = {
|
|
|
8774
8902
|
strip,
|
|
8775
8903
|
meta: meta$1,
|
|
8776
8904
|
tile: tile$2,
|
|
8777
|
-
image: image$
|
|
8905
|
+
image: image$9,
|
|
8778
8906
|
placeholder: placeholder$5,
|
|
8779
8907
|
more,
|
|
8780
8908
|
chevron: chevron$2
|
|
@@ -8838,7 +8966,7 @@ function OrderListContent({ onOpenOrder, onOpenReturn, onStartShopping, locale:
|
|
|
8838
8966
|
}, [load]);
|
|
8839
8967
|
if (state === "loading") {
|
|
8840
8968
|
return jsxs("div", {
|
|
8841
|
-
className: styles$
|
|
8969
|
+
className: styles$w.page,
|
|
8842
8970
|
children: [jsx(Skeleton, {
|
|
8843
8971
|
height: 148,
|
|
8844
8972
|
radius: 12
|
|
@@ -8859,14 +8987,14 @@ function OrderListContent({ onOpenOrder, onOpenReturn, onStartShopping, locale:
|
|
|
8859
8987
|
}
|
|
8860
8988
|
if (orders2.length === 0 && returns.length === 0) {
|
|
8861
8989
|
return jsx("div", {
|
|
8862
|
-
className: styles$
|
|
8990
|
+
className: styles$w.empty,
|
|
8863
8991
|
children: jsx(EmptyState, {
|
|
8864
8992
|
title: t("Nothing here yet"),
|
|
8865
8993
|
body: t("Your orders will show up here once you've shopped."),
|
|
8866
8994
|
...onStartShopping ? {
|
|
8867
8995
|
action: jsx("button", {
|
|
8868
8996
|
type: "button",
|
|
8869
|
-
className: styles$
|
|
8997
|
+
className: styles$w.cta,
|
|
8870
8998
|
onClick: onStartShopping,
|
|
8871
8999
|
children: t("Continue shopping")
|
|
8872
9000
|
})
|
|
@@ -8884,7 +9012,7 @@ function OrderListContent({ onOpenOrder, onOpenReturn, onStartShopping, locale:
|
|
|
8884
9012
|
ret
|
|
8885
9013
|
}))].sort((a, b) => Date.parse(b.at) - Date.parse(a.at));
|
|
8886
9014
|
return jsx("ul", {
|
|
8887
|
-
className: styles$
|
|
9015
|
+
className: styles$w.page,
|
|
8888
9016
|
children: rows.map((row2) => jsx("li", {
|
|
8889
9017
|
children: "order" in row2 ? jsx(OrderCard, {
|
|
8890
9018
|
order: row2.order,
|
|
@@ -8908,39 +9036,39 @@ function ReturnCard({ ret, locale, onOpen }) {
|
|
|
8908
9036
|
const items2 = `${ret.item_count} ${ret.item_count === 1 ? t("item") : t("items")}`;
|
|
8909
9037
|
const body3 = jsxs(Fragment, {
|
|
8910
9038
|
children: [jsxs("div", {
|
|
8911
|
-
className: styles$
|
|
9039
|
+
className: styles$w.head,
|
|
8912
9040
|
children: [jsxs("div", {
|
|
8913
|
-
className: styles$
|
|
9041
|
+
className: styles$w.heading,
|
|
8914
9042
|
children: [jsx("span", {
|
|
8915
|
-
className: styles$
|
|
9043
|
+
className: styles$w.title,
|
|
8916
9044
|
children: `${t("Return")} #${shortRef(ret.return_ref)}`
|
|
8917
9045
|
}), jsx("span", {
|
|
8918
|
-
className: styles$
|
|
9046
|
+
className: styles$w.date,
|
|
8919
9047
|
children: formatPlaced(ret.reported_at, locale)
|
|
8920
9048
|
})]
|
|
8921
9049
|
}), jsx(ReturnStatusBadge, {
|
|
8922
9050
|
status: ret.status
|
|
8923
9051
|
})]
|
|
8924
9052
|
}), jsxs("div", {
|
|
8925
|
-
className: styles$
|
|
9053
|
+
className: styles$w.bottom,
|
|
8926
9054
|
children: [jsx(ReturnThumbnails, {
|
|
8927
9055
|
ret
|
|
8928
9056
|
}), jsx("span", {
|
|
8929
|
-
className: styles$
|
|
9057
|
+
className: styles$w.meta,
|
|
8930
9058
|
children: `${items2} · ${money2(ret.value)}`
|
|
8931
9059
|
}), onOpen && jsx("span", {
|
|
8932
|
-
className: styles$
|
|
9060
|
+
className: styles$w.chevron,
|
|
8933
9061
|
children: jsx(Chevron, {})
|
|
8934
9062
|
})]
|
|
8935
9063
|
})]
|
|
8936
9064
|
});
|
|
8937
9065
|
if (!onOpen) return jsx("div", {
|
|
8938
|
-
className: styles$
|
|
9066
|
+
className: styles$w.card,
|
|
8939
9067
|
children: body3
|
|
8940
9068
|
});
|
|
8941
9069
|
return jsx("button", {
|
|
8942
9070
|
type: "button",
|
|
8943
|
-
className: [styles$
|
|
9071
|
+
className: [styles$w.card, styles$w.tappable].join(" "),
|
|
8944
9072
|
onClick: onOpen,
|
|
8945
9073
|
"aria-label": `${t("Return")} ${shortRef(ret.return_ref)}, ${ret.headline}`,
|
|
8946
9074
|
children: body3
|
|
@@ -8953,27 +9081,27 @@ function ReturnThumbnails({ ret }) {
|
|
|
8953
9081
|
const overflow = images.length >= TILES && hidden > 1 ? hidden : 0;
|
|
8954
9082
|
if (images.length === 0) {
|
|
8955
9083
|
return jsx("div", {
|
|
8956
|
-
className: styles$
|
|
9084
|
+
className: styles$w.strip,
|
|
8957
9085
|
children: jsx("div", {
|
|
8958
|
-
className: [styles$
|
|
9086
|
+
className: [styles$w.tile, styles$w.placeholder].join(" "),
|
|
8959
9087
|
"aria-hidden": "true"
|
|
8960
9088
|
})
|
|
8961
9089
|
});
|
|
8962
9090
|
}
|
|
8963
9091
|
return jsx("div", {
|
|
8964
|
-
className: styles$
|
|
9092
|
+
className: styles$w.strip,
|
|
8965
9093
|
children: images.map((src, i) => {
|
|
8966
9094
|
const last = i === images.length - 1;
|
|
8967
9095
|
return jsxs("div", {
|
|
8968
|
-
className: styles$
|
|
9096
|
+
className: styles$w.tile,
|
|
8969
9097
|
children: [jsx(ShopImage, {
|
|
8970
9098
|
src,
|
|
8971
9099
|
alt: "",
|
|
8972
9100
|
fill: true,
|
|
8973
9101
|
sizes: "56px",
|
|
8974
|
-
className: styles$
|
|
9102
|
+
className: styles$w.image
|
|
8975
9103
|
}), overflow > 0 && last && jsxs("span", {
|
|
8976
|
-
className: styles$
|
|
9104
|
+
className: styles$w.more,
|
|
8977
9105
|
children: [jsxs("span", {
|
|
8978
9106
|
"aria-hidden": "true",
|
|
8979
9107
|
children: ["+", overflow]
|
|
@@ -8990,36 +9118,36 @@ function OrderCard({ order, locale, onOpen }) {
|
|
|
8990
9118
|
const t = useT();
|
|
8991
9119
|
const body3 = jsxs(Fragment, {
|
|
8992
9120
|
children: [jsxs("div", {
|
|
8993
|
-
className: styles$
|
|
9121
|
+
className: styles$w.head,
|
|
8994
9122
|
children: [jsxs("div", {
|
|
8995
|
-
className: styles$
|
|
9123
|
+
className: styles$w.heading,
|
|
8996
9124
|
children: [jsx("span", {
|
|
8997
|
-
className: styles$
|
|
9125
|
+
className: styles$w.title,
|
|
8998
9126
|
children: t("Order #{0}", shortRef(order.order_ref))
|
|
8999
9127
|
}), jsx("span", {
|
|
9000
|
-
className: styles$
|
|
9128
|
+
className: styles$w.date,
|
|
9001
9129
|
children: formatPlaced(order.placed_at, locale)
|
|
9002
9130
|
})]
|
|
9003
9131
|
}), jsx(OrderStatusBadge, {
|
|
9004
9132
|
status: order.status
|
|
9005
9133
|
})]
|
|
9006
9134
|
}), jsxs("div", {
|
|
9007
|
-
className: styles$
|
|
9135
|
+
className: styles$w.bottom,
|
|
9008
9136
|
children: [jsx(Thumbnails, {
|
|
9009
9137
|
order
|
|
9010
9138
|
}), onOpen && jsx("span", {
|
|
9011
|
-
className: styles$
|
|
9139
|
+
className: styles$w.chevron,
|
|
9012
9140
|
children: jsx(Chevron, {})
|
|
9013
9141
|
})]
|
|
9014
9142
|
})]
|
|
9015
9143
|
});
|
|
9016
9144
|
if (!onOpen) return jsx("div", {
|
|
9017
|
-
className: styles$
|
|
9145
|
+
className: styles$w.card,
|
|
9018
9146
|
children: body3
|
|
9019
9147
|
});
|
|
9020
9148
|
return jsx("button", {
|
|
9021
9149
|
type: "button",
|
|
9022
|
-
className: [styles$
|
|
9150
|
+
className: [styles$w.card, styles$w.tappable].join(" "),
|
|
9023
9151
|
onClick: onOpen,
|
|
9024
9152
|
"aria-label": `Order ${shortRef(order.order_ref)}, ${order.headline}`,
|
|
9025
9153
|
children: body3
|
|
@@ -9032,27 +9160,27 @@ function Thumbnails({ order }) {
|
|
|
9032
9160
|
const overflow = images.length >= TILES && hidden > 1 ? hidden : 0;
|
|
9033
9161
|
if (images.length === 0) {
|
|
9034
9162
|
return jsx("div", {
|
|
9035
|
-
className: styles$
|
|
9163
|
+
className: styles$w.strip,
|
|
9036
9164
|
children: jsx("div", {
|
|
9037
|
-
className: [styles$
|
|
9165
|
+
className: [styles$w.tile, styles$w.placeholder].join(" "),
|
|
9038
9166
|
"aria-hidden": "true"
|
|
9039
9167
|
})
|
|
9040
9168
|
});
|
|
9041
9169
|
}
|
|
9042
9170
|
return jsx("div", {
|
|
9043
|
-
className: styles$
|
|
9171
|
+
className: styles$w.strip,
|
|
9044
9172
|
children: images.map((src, i) => {
|
|
9045
9173
|
const last = i === images.length - 1;
|
|
9046
9174
|
return jsxs("div", {
|
|
9047
|
-
className: styles$
|
|
9175
|
+
className: styles$w.tile,
|
|
9048
9176
|
children: [jsx(ShopImage, {
|
|
9049
9177
|
src,
|
|
9050
9178
|
alt: "",
|
|
9051
9179
|
fill: true,
|
|
9052
9180
|
sizes: "56px",
|
|
9053
|
-
className: styles$
|
|
9181
|
+
className: styles$w.image
|
|
9054
9182
|
}), overflow > 0 && last && jsxs("span", {
|
|
9055
|
-
className: styles$
|
|
9183
|
+
className: styles$w.more,
|
|
9056
9184
|
children: [jsxs("span", {
|
|
9057
9185
|
"aria-hidden": "true",
|
|
9058
9186
|
children: ["+", overflow]
|
|
@@ -9082,7 +9210,7 @@ const swatches = "_swatches_mdi63_1";
|
|
|
9082
9210
|
const swatch = "_swatch_mdi63_1";
|
|
9083
9211
|
const swatchActive = "_swatchActive_mdi63_18";
|
|
9084
9212
|
const swatchDot = "_swatchDot_mdi63_22";
|
|
9085
|
-
const styles$
|
|
9213
|
+
const styles$v = {
|
|
9086
9214
|
swatches,
|
|
9087
9215
|
swatch,
|
|
9088
9216
|
swatchActive,
|
|
@@ -9092,12 +9220,12 @@ function ColourSwatches({ variants, className }) {
|
|
|
9092
9220
|
const colours = colourOptions(variants);
|
|
9093
9221
|
if (colours.length === 0) return null;
|
|
9094
9222
|
return jsx("div", {
|
|
9095
|
-
className: [styles$
|
|
9223
|
+
className: [styles$v.swatches, className ?? ""].join(" ").trim(),
|
|
9096
9224
|
"aria-hidden": "true",
|
|
9097
9225
|
children: colours.map((c, i) => jsx("span", {
|
|
9098
|
-
className: [styles$
|
|
9226
|
+
className: [styles$v.swatch, i === 0 ? styles$v.swatchActive : ""].join(" "),
|
|
9099
9227
|
children: jsx("span", {
|
|
9100
|
-
className: styles$
|
|
9228
|
+
className: styles$v.swatchDot,
|
|
9101
9229
|
style: {
|
|
9102
9230
|
background: swatchColour(c.value)
|
|
9103
9231
|
}
|
|
@@ -9107,7 +9235,7 @@ function ColourSwatches({ variants, className }) {
|
|
|
9107
9235
|
}
|
|
9108
9236
|
const tile$1 = "_tile_yg69t_7";
|
|
9109
9237
|
const media$2 = "_media_yg69t_15";
|
|
9110
|
-
const image$
|
|
9238
|
+
const image$8 = "_image_yg69t_25";
|
|
9111
9239
|
const placeholder$4 = "_placeholder_yg69t_29";
|
|
9112
9240
|
const topBadge = "_topBadge_yg69t_37";
|
|
9113
9241
|
const saleBadge$2 = "_saleBadge_yg69t_78";
|
|
@@ -9117,10 +9245,10 @@ const titlePrice$1 = "_titlePrice_yg69t_100";
|
|
|
9117
9245
|
const title$f = "_title_yg69t_5";
|
|
9118
9246
|
const large = "_large_yg69t_185";
|
|
9119
9247
|
const swatchSlot = "_swatchSlot_yg69t_223";
|
|
9120
|
-
const styles$
|
|
9248
|
+
const styles$u = {
|
|
9121
9249
|
tile: tile$1,
|
|
9122
9250
|
media: media$2,
|
|
9123
|
-
image: image$
|
|
9251
|
+
image: image$8,
|
|
9124
9252
|
placeholder: placeholder$4,
|
|
9125
9253
|
topBadge,
|
|
9126
9254
|
saleBadge: saleBadge$2,
|
|
@@ -9139,37 +9267,37 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
9139
9267
|
const t = useT();
|
|
9140
9268
|
return jsxs(ShopLink, {
|
|
9141
9269
|
to: `/product/${encodeURIComponent(product.sku)}`,
|
|
9142
|
-
className: [styles$
|
|
9270
|
+
className: [styles$u.tile, size === "large" ? styles$u.large : ""].join(" "),
|
|
9143
9271
|
children: [jsxs("div", {
|
|
9144
|
-
className: styles$
|
|
9272
|
+
className: styles$u.media,
|
|
9145
9273
|
children: [image2 ? jsx(ShopImage, {
|
|
9146
9274
|
src: image2,
|
|
9147
9275
|
alt: product.title,
|
|
9148
9276
|
fill: true,
|
|
9149
9277
|
sizes: size === "large" ? "(max-width: 480px) 100vw, 480px" : "(max-width: 480px) 45vw, 200px",
|
|
9150
|
-
className: styles$
|
|
9278
|
+
className: styles$u.image,
|
|
9151
9279
|
priority
|
|
9152
9280
|
}) : jsx("div", {
|
|
9153
|
-
className: styles$
|
|
9281
|
+
className: styles$u.placeholder,
|
|
9154
9282
|
"aria-hidden": "true"
|
|
9155
9283
|
}), anyInStock && topBadge2 && jsx("span", {
|
|
9156
|
-
className: styles$
|
|
9284
|
+
className: styles$u.topBadge,
|
|
9157
9285
|
children: topBadge2
|
|
9158
9286
|
}), anyInStock && pct !== void 0 && jsx("span", {
|
|
9159
|
-
className: styles$
|
|
9287
|
+
className: styles$u.saleBadge,
|
|
9160
9288
|
children: jsx(SaleBadge, {
|
|
9161
9289
|
pct
|
|
9162
9290
|
})
|
|
9163
9291
|
}), !anyInStock && jsx("span", {
|
|
9164
|
-
className: styles$
|
|
9292
|
+
className: styles$u.oos,
|
|
9165
9293
|
children: t("Out of stock")
|
|
9166
9294
|
})]
|
|
9167
9295
|
}), jsxs("div", {
|
|
9168
|
-
className: styles$
|
|
9296
|
+
className: styles$u.bottom,
|
|
9169
9297
|
children: [jsxs("div", {
|
|
9170
|
-
className: styles$
|
|
9298
|
+
className: styles$u.titlePrice,
|
|
9171
9299
|
children: [jsx("span", {
|
|
9172
|
-
className: styles$
|
|
9300
|
+
className: styles$u.title,
|
|
9173
9301
|
children: product.title
|
|
9174
9302
|
}), jsx(PriceBlock, {
|
|
9175
9303
|
price: product.price,
|
|
@@ -9180,7 +9308,7 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
9180
9308
|
})]
|
|
9181
9309
|
}), jsx(ColourSwatches, {
|
|
9182
9310
|
variants: product.variants,
|
|
9183
|
-
className: styles$
|
|
9311
|
+
className: styles$u.swatchSlot
|
|
9184
9312
|
})]
|
|
9185
9313
|
})]
|
|
9186
9314
|
});
|
|
@@ -9190,7 +9318,7 @@ const title$e = "_title_v48ok_21";
|
|
|
9190
9318
|
const link = "_link_v48ok_30";
|
|
9191
9319
|
const track$4 = "_track_v48ok_42";
|
|
9192
9320
|
const frame = "_frame_v48ok_62";
|
|
9193
|
-
const image$
|
|
9321
|
+
const image$7 = "_image_v48ok_73";
|
|
9194
9322
|
const placeholder$3 = "_placeholder_v48ok_77";
|
|
9195
9323
|
const saleBadge$1 = "_saleBadge_v48ok_89";
|
|
9196
9324
|
const oos$2 = "_oos_v48ok_97";
|
|
@@ -9200,13 +9328,13 @@ const name = "_name_v48ok_142";
|
|
|
9200
9328
|
const price$1 = "_price_v48ok_155";
|
|
9201
9329
|
const paid = "_paid_v48ok_164";
|
|
9202
9330
|
const was$1 = "_was_v48ok_170";
|
|
9203
|
-
const styles$
|
|
9331
|
+
const styles$t = {
|
|
9204
9332
|
section: section$3,
|
|
9205
9333
|
title: title$e,
|
|
9206
9334
|
link,
|
|
9207
9335
|
track: track$4,
|
|
9208
9336
|
frame,
|
|
9209
|
-
image: image$
|
|
9337
|
+
image: image$7,
|
|
9210
9338
|
placeholder: placeholder$3,
|
|
9211
9339
|
saleBadge: saleBadge$1,
|
|
9212
9340
|
oos: oos$2,
|
|
@@ -9224,54 +9352,54 @@ function ProductGallery({ title: title2, product }) {
|
|
|
9224
9352
|
const inStock = product.variants.some((v) => v.in_stock);
|
|
9225
9353
|
const images = product.media.length > 0 ? product.media : [void 0];
|
|
9226
9354
|
return jsxs("section", {
|
|
9227
|
-
className: styles$
|
|
9355
|
+
className: styles$t.section,
|
|
9228
9356
|
"aria-labelledby": `gallery-${product.sku}`,
|
|
9229
9357
|
children: [jsx("h2", {
|
|
9230
|
-
className: styles$
|
|
9358
|
+
className: styles$t.title,
|
|
9231
9359
|
id: `gallery-${product.sku}`,
|
|
9232
9360
|
children: title2
|
|
9233
9361
|
}), jsxs(ShopLink, {
|
|
9234
9362
|
to: `/product/${encodeURIComponent(product.sku)}`,
|
|
9235
|
-
className: styles$
|
|
9363
|
+
className: styles$t.link,
|
|
9236
9364
|
children: [jsx("ul", {
|
|
9237
|
-
className: styles$
|
|
9365
|
+
className: styles$t.track,
|
|
9238
9366
|
"aria-label": t("{0} photographs", product.title),
|
|
9239
9367
|
children: images.map((src, i) => jsxs("li", {
|
|
9240
|
-
className: styles$
|
|
9368
|
+
className: styles$t.frame,
|
|
9241
9369
|
children: [src ? jsx(ShopImage, {
|
|
9242
9370
|
src,
|
|
9243
9371
|
alt: "",
|
|
9244
9372
|
fill: true,
|
|
9245
9373
|
sizes: "165px",
|
|
9246
|
-
className: styles$
|
|
9374
|
+
className: styles$t.image,
|
|
9247
9375
|
...i === 0 ? {
|
|
9248
9376
|
priority: true
|
|
9249
9377
|
} : {}
|
|
9250
9378
|
}) : jsx("div", {
|
|
9251
|
-
className: styles$
|
|
9379
|
+
className: styles$t.placeholder,
|
|
9252
9380
|
"aria-hidden": "true"
|
|
9253
9381
|
}), i === 0 && inStock && pct !== void 0 && jsx("span", {
|
|
9254
|
-
className: styles$
|
|
9382
|
+
className: styles$t.saleBadge,
|
|
9255
9383
|
children: jsx(SaleBadge, {
|
|
9256
9384
|
pct
|
|
9257
9385
|
})
|
|
9258
9386
|
}), i === 0 && !inStock && jsx("span", {
|
|
9259
|
-
className: styles$
|
|
9387
|
+
className: styles$t.oos,
|
|
9260
9388
|
children: t("Out of stock")
|
|
9261
9389
|
})]
|
|
9262
9390
|
}, src ?? i))
|
|
9263
9391
|
}), jsxs("div", {
|
|
9264
|
-
className: styles$
|
|
9392
|
+
className: styles$t.caption,
|
|
9265
9393
|
children: [jsx("span", {
|
|
9266
|
-
className: styles$
|
|
9394
|
+
className: styles$t.name,
|
|
9267
9395
|
children: product.title
|
|
9268
9396
|
}), jsxs("span", {
|
|
9269
|
-
className: styles$
|
|
9397
|
+
className: styles$t.price,
|
|
9270
9398
|
children: [jsx("span", {
|
|
9271
|
-
className: styles$
|
|
9399
|
+
className: styles$t.paid,
|
|
9272
9400
|
children: format(product.price)
|
|
9273
9401
|
}), product.compare_at && jsxs("span", {
|
|
9274
|
-
className: styles$
|
|
9402
|
+
className: styles$t.was,
|
|
9275
9403
|
children: [jsx("span", {
|
|
9276
9404
|
className: "visually-hidden",
|
|
9277
9405
|
children: t("Was {0}", format(product.compare_at))
|
|
@@ -9282,7 +9410,7 @@ function ProductGallery({ title: title2, product }) {
|
|
|
9282
9410
|
})]
|
|
9283
9411
|
}), jsx(ColourSwatches, {
|
|
9284
9412
|
variants: product.variants,
|
|
9285
|
-
className: styles$
|
|
9413
|
+
className: styles$t.swatchRow
|
|
9286
9414
|
})]
|
|
9287
9415
|
})]
|
|
9288
9416
|
})]
|
|
@@ -9293,7 +9421,7 @@ const chips$1 = "_chips_6p29u_8";
|
|
|
9293
9421
|
const chip$1 = "_chip_6p29u_8";
|
|
9294
9422
|
const on = "_on_6p29u_36";
|
|
9295
9423
|
const clear = "_clear_6p29u_42";
|
|
9296
|
-
const styles$
|
|
9424
|
+
const styles$s = {
|
|
9297
9425
|
bar: bar$1,
|
|
9298
9426
|
chips: chips$1,
|
|
9299
9427
|
chip: chip$1,
|
|
@@ -9304,24 +9432,24 @@ function FilterBar({ options: options2, active, onToggle, onClear }) {
|
|
|
9304
9432
|
const t = useT();
|
|
9305
9433
|
const hasActive = active.length > 0;
|
|
9306
9434
|
return jsxs("div", {
|
|
9307
|
-
className: styles$
|
|
9435
|
+
className: styles$s.bar,
|
|
9308
9436
|
role: "group",
|
|
9309
9437
|
"aria-label": t("Filters"),
|
|
9310
9438
|
children: [jsx("div", {
|
|
9311
|
-
className: styles$
|
|
9439
|
+
className: styles$s.chips,
|
|
9312
9440
|
children: options2.map((opt) => {
|
|
9313
9441
|
const on2 = active.includes(opt.value);
|
|
9314
9442
|
return jsx("button", {
|
|
9315
9443
|
type: "button",
|
|
9316
9444
|
"aria-pressed": on2,
|
|
9317
|
-
className: [styles$
|
|
9445
|
+
className: [styles$s.chip, on2 ? styles$s.on : ""].join(" "),
|
|
9318
9446
|
onClick: () => onToggle(opt.value),
|
|
9319
9447
|
children: opt.label
|
|
9320
9448
|
}, opt.value);
|
|
9321
9449
|
})
|
|
9322
9450
|
}), hasActive && onClear && jsx("button", {
|
|
9323
9451
|
type: "button",
|
|
9324
|
-
className: styles$
|
|
9452
|
+
className: styles$s.clear,
|
|
9325
9453
|
onClick: onClear,
|
|
9326
9454
|
children: t("Clear")
|
|
9327
9455
|
})]
|
|
@@ -9329,7 +9457,7 @@ function FilterBar({ options: options2, active, onToggle, onClear }) {
|
|
|
9329
9457
|
}
|
|
9330
9458
|
const wrap$2 = "_wrap_15ntf_1";
|
|
9331
9459
|
const grid$1 = "_grid_15ntf_7";
|
|
9332
|
-
const styles$
|
|
9460
|
+
const styles$r = {
|
|
9333
9461
|
wrap: wrap$2,
|
|
9334
9462
|
grid: grid$1
|
|
9335
9463
|
};
|
|
@@ -9375,7 +9503,7 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
|
|
|
9375
9503
|
}, [loadMore]);
|
|
9376
9504
|
const visible = active.length === 0 ? products : products.filter((p) => active.includes(p.category));
|
|
9377
9505
|
return jsxs("div", {
|
|
9378
|
-
className: styles$
|
|
9506
|
+
className: styles$r.wrap,
|
|
9379
9507
|
children: [filters.length > 0 && jsx(FilterBar, {
|
|
9380
9508
|
options: filters,
|
|
9381
9509
|
active,
|
|
@@ -9390,7 +9518,7 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
|
|
|
9390
9518
|
children: t("Clear filters")
|
|
9391
9519
|
}) : void 0
|
|
9392
9520
|
}) : jsx("ul", {
|
|
9393
|
-
className: styles$
|
|
9521
|
+
className: styles$r.grid,
|
|
9394
9522
|
children: visible.map((product, i) => jsx("li", {
|
|
9395
9523
|
children: jsx(ProductTile, {
|
|
9396
9524
|
product,
|
|
@@ -9398,7 +9526,7 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
|
|
|
9398
9526
|
})
|
|
9399
9527
|
}, product.sku))
|
|
9400
9528
|
}), loading && jsx("div", {
|
|
9401
|
-
className: styles$
|
|
9529
|
+
className: styles$r.grid,
|
|
9402
9530
|
"aria-hidden": "true",
|
|
9403
9531
|
children: [0, 1].map((i) => jsx(Skeleton, {
|
|
9404
9532
|
height: 200,
|
|
@@ -9417,7 +9545,7 @@ const seeAll = "_seeAll_1rll1_27";
|
|
|
9417
9545
|
const track$3 = "_track_1rll1_33";
|
|
9418
9546
|
const item = "_item_1rll1_67";
|
|
9419
9547
|
const inset = "_inset_1rll1_79";
|
|
9420
|
-
const styles$
|
|
9548
|
+
const styles$q = {
|
|
9421
9549
|
rail,
|
|
9422
9550
|
header: header$5,
|
|
9423
9551
|
title: title$d,
|
|
@@ -9430,22 +9558,22 @@ function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
|
|
|
9430
9558
|
const t = useT();
|
|
9431
9559
|
if (products.length === 0) return null;
|
|
9432
9560
|
return jsxs("section", {
|
|
9433
|
-
className: [styles$
|
|
9561
|
+
className: [styles$q.rail, inset2 ? styles$q.inset : ""].join(" "),
|
|
9434
9562
|
"aria-label": title2,
|
|
9435
9563
|
children: [jsxs("div", {
|
|
9436
|
-
className: styles$
|
|
9564
|
+
className: styles$q.header,
|
|
9437
9565
|
children: [jsx("h2", {
|
|
9438
|
-
className: styles$
|
|
9566
|
+
className: styles$q.title,
|
|
9439
9567
|
children: title2
|
|
9440
9568
|
}), seeAllTo && jsx(ShopLink, {
|
|
9441
|
-
className: styles$
|
|
9569
|
+
className: styles$q.seeAll,
|
|
9442
9570
|
to: seeAllTo,
|
|
9443
9571
|
children: t("See all")
|
|
9444
9572
|
})]
|
|
9445
9573
|
}), jsx("ul", {
|
|
9446
|
-
className: styles$
|
|
9574
|
+
className: styles$q.track,
|
|
9447
9575
|
children: products.map((product, i) => jsx("li", {
|
|
9448
|
-
className: styles$
|
|
9576
|
+
className: styles$q.item,
|
|
9449
9577
|
children: jsx(ProductTile, {
|
|
9450
9578
|
product,
|
|
9451
9579
|
priority: i < 2
|
|
@@ -9462,9 +9590,9 @@ const grabber = "_grabber_uxpgl_51";
|
|
|
9462
9590
|
const header$4 = "_header_uxpgl_59";
|
|
9463
9591
|
const title$c = "_title_uxpgl_67";
|
|
9464
9592
|
const close$1 = "_close_uxpgl_71";
|
|
9465
|
-
const body$
|
|
9593
|
+
const body$5 = "_body_uxpgl_84";
|
|
9466
9594
|
const footer = "_footer_uxpgl_97";
|
|
9467
|
-
const styles$
|
|
9595
|
+
const styles$p = {
|
|
9468
9596
|
overlay: overlay$2,
|
|
9469
9597
|
scrim: scrim$4,
|
|
9470
9598
|
sheet: sheet$2,
|
|
@@ -9473,7 +9601,7 @@ const styles$o = {
|
|
|
9473
9601
|
header: header$4,
|
|
9474
9602
|
title: title$c,
|
|
9475
9603
|
close: close$1,
|
|
9476
|
-
body: body$
|
|
9604
|
+
body: body$5,
|
|
9477
9605
|
footer
|
|
9478
9606
|
};
|
|
9479
9607
|
const DISMISS_THRESHOLD_PX = 96;
|
|
@@ -9504,14 +9632,14 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
9504
9632
|
useModalDialog(open, onClose, sheetRef);
|
|
9505
9633
|
if (!open) return null;
|
|
9506
9634
|
return jsxs("div", {
|
|
9507
|
-
className: styles$
|
|
9635
|
+
className: styles$p.overlay,
|
|
9508
9636
|
children: [jsx("div", {
|
|
9509
|
-
className: styles$
|
|
9637
|
+
className: styles$p.scrim,
|
|
9510
9638
|
onClick: onClose,
|
|
9511
9639
|
"aria-hidden": "true"
|
|
9512
9640
|
}), jsxs(ShopSurface, {
|
|
9513
9641
|
tone: "light",
|
|
9514
|
-
className: styles$
|
|
9642
|
+
className: styles$p.sheet,
|
|
9515
9643
|
role: "dialog",
|
|
9516
9644
|
"aria-modal": "true",
|
|
9517
9645
|
"aria-labelledby": titleId,
|
|
@@ -9521,7 +9649,7 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
9521
9649
|
transition: "none"
|
|
9522
9650
|
} : void 0,
|
|
9523
9651
|
children: [jsx("div", {
|
|
9524
|
-
className: styles$
|
|
9652
|
+
className: styles$p.grabArea,
|
|
9525
9653
|
onPointerDown: (e) => {
|
|
9526
9654
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
9527
9655
|
onDragStart(e.clientY);
|
|
@@ -9530,18 +9658,18 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
9530
9658
|
onPointerUp: onDragEnd,
|
|
9531
9659
|
onPointerCancel: onDragEnd,
|
|
9532
9660
|
children: jsx("div", {
|
|
9533
|
-
className: styles$
|
|
9661
|
+
className: styles$p.grabber,
|
|
9534
9662
|
"aria-hidden": "true"
|
|
9535
9663
|
})
|
|
9536
9664
|
}), jsxs("div", {
|
|
9537
|
-
className: styles$
|
|
9665
|
+
className: styles$p.header,
|
|
9538
9666
|
children: [jsx("h2", {
|
|
9539
9667
|
id: titleId,
|
|
9540
|
-
className: styles$
|
|
9668
|
+
className: styles$p.title,
|
|
9541
9669
|
children: title2
|
|
9542
9670
|
}), jsx("button", {
|
|
9543
9671
|
type: "button",
|
|
9544
|
-
className: styles$
|
|
9672
|
+
className: styles$p.close,
|
|
9545
9673
|
onClick: onClose,
|
|
9546
9674
|
"aria-label": t("Close"),
|
|
9547
9675
|
children: jsx("svg", {
|
|
@@ -9559,10 +9687,10 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
9559
9687
|
})
|
|
9560
9688
|
})]
|
|
9561
9689
|
}), jsx("div", {
|
|
9562
|
-
className: styles$
|
|
9690
|
+
className: styles$p.body,
|
|
9563
9691
|
children
|
|
9564
9692
|
}), footer2 && jsx("div", {
|
|
9565
|
-
className: styles$
|
|
9693
|
+
className: styles$p.footer,
|
|
9566
9694
|
children: footer2
|
|
9567
9695
|
})]
|
|
9568
9696
|
})]
|
|
@@ -9582,7 +9710,7 @@ const stepper = "_stepper_1rmip_10";
|
|
|
9582
9710
|
const cap = "_cap_1rmip_23";
|
|
9583
9711
|
const button = "_button_1rmip_31";
|
|
9584
9712
|
const value$1 = "_value_1rmip_50";
|
|
9585
|
-
const styles$
|
|
9713
|
+
const styles$o = {
|
|
9586
9714
|
wrap: wrap$1,
|
|
9587
9715
|
stepper,
|
|
9588
9716
|
cap,
|
|
@@ -9660,24 +9788,24 @@ function QtyStepper({ qty, max, onChange, onRemove, disabled: disabled2, capDesc
|
|
|
9660
9788
|
if (!atMax) onChange(qty + 1);
|
|
9661
9789
|
}
|
|
9662
9790
|
return jsxs("div", {
|
|
9663
|
-
className: styles$
|
|
9791
|
+
className: styles$o.wrap,
|
|
9664
9792
|
children: [jsxs("div", {
|
|
9665
|
-
className: styles$
|
|
9793
|
+
className: styles$o.stepper,
|
|
9666
9794
|
children: [jsx("button", {
|
|
9667
9795
|
type: "button",
|
|
9668
|
-
className: styles$
|
|
9796
|
+
className: styles$o.button,
|
|
9669
9797
|
onClick: decrement,
|
|
9670
9798
|
disabled: disabled2,
|
|
9671
9799
|
"aria-label": willDelete ? t("Remove item") : t("Decrease quantity"),
|
|
9672
9800
|
children: willDelete ? jsx(TrashIcon, {}) : jsx(MinusIcon, {})
|
|
9673
9801
|
}), jsx("span", {
|
|
9674
|
-
className: styles$
|
|
9802
|
+
className: styles$o.value,
|
|
9675
9803
|
"aria-live": "polite",
|
|
9676
9804
|
"aria-label": `Quantity ${qty}`,
|
|
9677
9805
|
children: qty
|
|
9678
9806
|
}), jsx("button", {
|
|
9679
9807
|
type: "button",
|
|
9680
|
-
className: styles$
|
|
9808
|
+
className: styles$o.button,
|
|
9681
9809
|
onClick: increment,
|
|
9682
9810
|
disabled: disabled2 || atMax,
|
|
9683
9811
|
"aria-label": t("Increase quantity"),
|
|
@@ -9686,7 +9814,7 @@ function QtyStepper({ qty, max, onChange, onRemove, disabled: disabled2, capDesc
|
|
|
9686
9814
|
})]
|
|
9687
9815
|
}), atMax && capDescribedBy === void 0 && jsx("span", {
|
|
9688
9816
|
id: ownCapId,
|
|
9689
|
-
className: styles$
|
|
9817
|
+
className: styles$o.cap,
|
|
9690
9818
|
role: "status",
|
|
9691
9819
|
children: max === 0 ? t("Out of stock") : t("Only {0} left", max)
|
|
9692
9820
|
})]
|
|
@@ -9698,7 +9826,7 @@ const pending = "_pending_1dx14_18";
|
|
|
9698
9826
|
const labels = "_labels_1dx14_24";
|
|
9699
9827
|
const lowStock$1 = "_lowStock_1dx14_39";
|
|
9700
9828
|
const media$1 = "_media_1dx14_49";
|
|
9701
|
-
const image$
|
|
9829
|
+
const image$6 = "_image_1dx14_59";
|
|
9702
9830
|
const placeholder$2 = "_placeholder_1dx14_75";
|
|
9703
9831
|
const saleBadge = "_saleBadge_1dx14_88";
|
|
9704
9832
|
const oos$1 = "_oos_1dx14_103";
|
|
@@ -9711,14 +9839,14 @@ const detail = "_detail_1dx14_164";
|
|
|
9711
9839
|
const price = "_price_1dx14_183";
|
|
9712
9840
|
const amount = "_amount_1dx14_191";
|
|
9713
9841
|
const was = "_was_1dx14_200";
|
|
9714
|
-
const styles$
|
|
9842
|
+
const styles$n = {
|
|
9715
9843
|
line,
|
|
9716
9844
|
row: row$5,
|
|
9717
9845
|
pending,
|
|
9718
9846
|
labels,
|
|
9719
9847
|
lowStock: lowStock$1,
|
|
9720
9848
|
media: media$1,
|
|
9721
|
-
image: image$
|
|
9849
|
+
image: image$6,
|
|
9722
9850
|
placeholder: placeholder$2,
|
|
9723
9851
|
saleBadge,
|
|
9724
9852
|
oos: oos$1,
|
|
@@ -9745,53 +9873,53 @@ function CartLineItem({ item: item2, title: title2, image: image2, compareAt: co
|
|
|
9745
9873
|
const noticeId = useStableId("cart-line-stock");
|
|
9746
9874
|
const notice = lowStock2 || soldOut ? noticeId : void 0;
|
|
9747
9875
|
return jsxs("div", {
|
|
9748
|
-
className: [styles$
|
|
9876
|
+
className: [styles$n.line, pending2 ? styles$n.pending : ""].join(" "),
|
|
9749
9877
|
children: [jsxs("div", {
|
|
9750
|
-
className: styles$
|
|
9878
|
+
className: styles$n.row,
|
|
9751
9879
|
children: [jsxs("div", {
|
|
9752
|
-
className: styles$
|
|
9880
|
+
className: styles$n.media,
|
|
9753
9881
|
children: [displayImage ? jsx(ShopImage, {
|
|
9754
9882
|
src: displayImage,
|
|
9755
9883
|
alt: "",
|
|
9756
9884
|
fill: true,
|
|
9757
9885
|
sizes: "100px",
|
|
9758
|
-
className: styles$
|
|
9886
|
+
className: styles$n.image
|
|
9759
9887
|
}) : jsx("div", {
|
|
9760
|
-
className: styles$
|
|
9888
|
+
className: styles$n.placeholder,
|
|
9761
9889
|
"aria-hidden": "true"
|
|
9762
9890
|
}), soldOut ? jsx("span", {
|
|
9763
|
-
className: styles$
|
|
9891
|
+
className: styles$n.oos,
|
|
9764
9892
|
id: noticeId,
|
|
9765
9893
|
children: t("Out of stock")
|
|
9766
9894
|
}) : pct !== void 0 && jsx("span", {
|
|
9767
|
-
className: styles$
|
|
9895
|
+
className: styles$n.saleBadge,
|
|
9768
9896
|
children: jsx(SaleBadge, {
|
|
9769
9897
|
pct
|
|
9770
9898
|
})
|
|
9771
9899
|
})]
|
|
9772
9900
|
}), jsxs("div", {
|
|
9773
|
-
className: styles$
|
|
9901
|
+
className: styles$n.info,
|
|
9774
9902
|
children: [jsxs("div", {
|
|
9775
|
-
className: styles$
|
|
9903
|
+
className: styles$n.head,
|
|
9776
9904
|
children: [jsxs("div", {
|
|
9777
|
-
className: styles$
|
|
9905
|
+
className: styles$n.meta,
|
|
9778
9906
|
children: [jsx("span", {
|
|
9779
|
-
className: styles$
|
|
9907
|
+
className: styles$n.title,
|
|
9780
9908
|
children: displayTitle
|
|
9781
9909
|
}), pairs.length > 0 && jsx("div", {
|
|
9782
|
-
className: styles$
|
|
9910
|
+
className: styles$n.details,
|
|
9783
9911
|
children: pairs.map(({ key, label: label2, value: value2 }) => jsxs("span", {
|
|
9784
|
-
className: styles$
|
|
9912
|
+
className: styles$n.detail,
|
|
9785
9913
|
children: [t(label2), ": ", value2]
|
|
9786
9914
|
}, key))
|
|
9787
9915
|
})]
|
|
9788
9916
|
}), jsxs("div", {
|
|
9789
|
-
className: styles$
|
|
9917
|
+
className: styles$n.price,
|
|
9790
9918
|
children: [jsx("span", {
|
|
9791
|
-
className: styles$
|
|
9919
|
+
className: styles$n.amount,
|
|
9792
9920
|
children: format(item2.line_total)
|
|
9793
9921
|
}), compareAt2 && jsx("span", {
|
|
9794
|
-
className: styles$
|
|
9922
|
+
className: styles$n.was,
|
|
9795
9923
|
children: format(compareAt2)
|
|
9796
9924
|
})]
|
|
9797
9925
|
})]
|
|
@@ -9805,10 +9933,10 @@ function CartLineItem({ item: item2, title: title2, image: image2, compareAt: co
|
|
|
9805
9933
|
})]
|
|
9806
9934
|
})]
|
|
9807
9935
|
}), lowStock2 && jsx("div", {
|
|
9808
|
-
className: styles$
|
|
9936
|
+
className: styles$n.labels,
|
|
9809
9937
|
children: jsx("span", {
|
|
9810
9938
|
id: noticeId,
|
|
9811
|
-
className: styles$
|
|
9939
|
+
className: styles$n.lowStock,
|
|
9812
9940
|
role: "status",
|
|
9813
9941
|
children: t("Only {0} left", available)
|
|
9814
9942
|
})
|
|
@@ -9820,7 +9948,7 @@ const row$4 = "_row_1cf1a_10";
|
|
|
9820
9948
|
const icon$2 = "_icon_1cf1a_16";
|
|
9821
9949
|
const label = "_label_1cf1a_22";
|
|
9822
9950
|
const divider$1 = "_divider_1cf1a_29";
|
|
9823
|
-
const styles$
|
|
9951
|
+
const styles$m = {
|
|
9824
9952
|
box: box$1,
|
|
9825
9953
|
row: row$4,
|
|
9826
9954
|
icon: icon$2,
|
|
@@ -9830,12 +9958,12 @@ const styles$l = {
|
|
|
9830
9958
|
function ShippingInfo() {
|
|
9831
9959
|
const t = useT();
|
|
9832
9960
|
return jsxs("section", {
|
|
9833
|
-
className: styles$
|
|
9961
|
+
className: styles$m.box,
|
|
9834
9962
|
"aria-label": t("Shipping and returns"),
|
|
9835
9963
|
children: [jsxs("div", {
|
|
9836
|
-
className: styles$
|
|
9964
|
+
className: styles$m.row,
|
|
9837
9965
|
children: [jsxs("svg", {
|
|
9838
|
-
className: styles$
|
|
9966
|
+
className: styles$m.icon,
|
|
9839
9967
|
width: "24",
|
|
9840
9968
|
height: "24",
|
|
9841
9969
|
viewBox: "0 0 24 24",
|
|
@@ -9860,16 +9988,16 @@ function ShippingInfo() {
|
|
|
9860
9988
|
strokeWidth: "1.5"
|
|
9861
9989
|
})]
|
|
9862
9990
|
}), jsx("p", {
|
|
9863
|
-
className: styles$
|
|
9991
|
+
className: styles$m.label,
|
|
9864
9992
|
children: t("Standard or express delivery")
|
|
9865
9993
|
})]
|
|
9866
9994
|
}), jsx("div", {
|
|
9867
|
-
className: styles$
|
|
9995
|
+
className: styles$m.divider,
|
|
9868
9996
|
role: "presentation"
|
|
9869
9997
|
}), jsxs("div", {
|
|
9870
|
-
className: styles$
|
|
9998
|
+
className: styles$m.row,
|
|
9871
9999
|
children: [jsxs("svg", {
|
|
9872
|
-
className: styles$
|
|
10000
|
+
className: styles$m.icon,
|
|
9873
10001
|
width: "24",
|
|
9874
10002
|
height: "24",
|
|
9875
10003
|
viewBox: "0 0 24 24",
|
|
@@ -9889,7 +10017,7 @@ function ShippingInfo() {
|
|
|
9889
10017
|
strokeLinejoin: "round"
|
|
9890
10018
|
})]
|
|
9891
10019
|
}), jsx("p", {
|
|
9892
|
-
className: styles$
|
|
10020
|
+
className: styles$m.label,
|
|
9893
10021
|
children: t("14 days returns")
|
|
9894
10022
|
})]
|
|
9895
10023
|
})]
|
|
@@ -9900,7 +10028,7 @@ const floating$1 = "_floating_23dkv_52";
|
|
|
9900
10028
|
const divider = "_divider_23dkv_58";
|
|
9901
10029
|
const info$1 = "_info_23dkv_62";
|
|
9902
10030
|
const actions = "_actions_23dkv_70";
|
|
9903
|
-
const styles$
|
|
10031
|
+
const styles$l = {
|
|
9904
10032
|
bar,
|
|
9905
10033
|
floating: floating$1,
|
|
9906
10034
|
divider,
|
|
@@ -9909,28 +10037,28 @@ const styles$k = {
|
|
|
9909
10037
|
};
|
|
9910
10038
|
function StickyCtaBar({ children, info: info2, variant = "floating" }) {
|
|
9911
10039
|
return jsxs("div", {
|
|
9912
|
-
className: [styles$
|
|
10040
|
+
className: [styles$l.bar, styles$l[variant]].join(" "),
|
|
9913
10041
|
children: [info2 && jsx("div", {
|
|
9914
|
-
className: styles$
|
|
10042
|
+
className: styles$l.info,
|
|
9915
10043
|
children: info2
|
|
9916
10044
|
}), jsx("div", {
|
|
9917
|
-
className: styles$
|
|
10045
|
+
className: styles$l.actions,
|
|
9918
10046
|
children
|
|
9919
10047
|
})]
|
|
9920
10048
|
});
|
|
9921
10049
|
}
|
|
9922
10050
|
const surface = "_surface_1bdb0_15";
|
|
9923
10051
|
const screen = "_screen_1bdb0_20";
|
|
9924
|
-
const body$
|
|
10052
|
+
const body$4 = "_body_1bdb0_12";
|
|
9925
10053
|
const items = "_items_1bdb0_34";
|
|
9926
10054
|
const sectionHeader = "_sectionHeader_1bdb0_40";
|
|
9927
10055
|
const sectionTitle = "_sectionTitle_1bdb0_46";
|
|
9928
10056
|
const count = "_count_1bdb0_67";
|
|
9929
10057
|
const lines = "_lines_1bdb0_91";
|
|
9930
|
-
const styles$
|
|
10058
|
+
const styles$k = {
|
|
9931
10059
|
surface,
|
|
9932
10060
|
screen,
|
|
9933
|
-
body: body$
|
|
10061
|
+
body: body$4,
|
|
9934
10062
|
items,
|
|
9935
10063
|
sectionHeader,
|
|
9936
10064
|
sectionTitle,
|
|
@@ -9943,7 +10071,7 @@ function CartView(props = {}) {
|
|
|
9943
10071
|
return jsx(ShopSurface, {
|
|
9944
10072
|
tone: "light",
|
|
9945
10073
|
fill: true,
|
|
9946
|
-
className: styles$
|
|
10074
|
+
className: styles$k.surface,
|
|
9947
10075
|
children: jsx(CartViewContent, {
|
|
9948
10076
|
...props
|
|
9949
10077
|
})
|
|
@@ -10105,22 +10233,22 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
|
|
|
10105
10233
|
}
|
|
10106
10234
|
const itemCount = cart2.items.reduce((n, i) => n + i.qty, 0);
|
|
10107
10235
|
return jsxs("div", {
|
|
10108
|
-
className: styles$
|
|
10236
|
+
className: styles$k.screen,
|
|
10109
10237
|
children: [jsxs("div", {
|
|
10110
|
-
className: styles$
|
|
10238
|
+
className: styles$k.body,
|
|
10111
10239
|
children: [jsxs("section", {
|
|
10112
|
-
className: styles$
|
|
10240
|
+
className: styles$k.items,
|
|
10113
10241
|
children: [jsxs("div", {
|
|
10114
|
-
className: styles$
|
|
10242
|
+
className: styles$k.sectionHeader,
|
|
10115
10243
|
children: [jsx("h2", {
|
|
10116
|
-
className: styles$
|
|
10244
|
+
className: styles$k.sectionTitle,
|
|
10117
10245
|
children: t("Items")
|
|
10118
10246
|
}), jsx("span", {
|
|
10119
|
-
className: styles$
|
|
10247
|
+
className: styles$k.count,
|
|
10120
10248
|
children: itemCount
|
|
10121
10249
|
})]
|
|
10122
10250
|
}), jsx("ul", {
|
|
10123
|
-
className: styles$
|
|
10251
|
+
className: styles$k.lines,
|
|
10124
10252
|
children: cart2.items.map((item2) => jsx("li", {
|
|
10125
10253
|
children: jsx(CartLineItem, {
|
|
10126
10254
|
item: item2,
|
|
@@ -10188,16 +10316,16 @@ function CartSheetProvider({ children }) {
|
|
|
10188
10316
|
const gallery = "_gallery_1vbj7_1";
|
|
10189
10317
|
const track$2 = "_track_1vbj7_5";
|
|
10190
10318
|
const slide$1 = "_slide_1vbj7_20";
|
|
10191
|
-
const image$
|
|
10319
|
+
const image$5 = "_image_1vbj7_27";
|
|
10192
10320
|
const placeholder$1 = "_placeholder_1vbj7_31";
|
|
10193
10321
|
const dots$2 = "_dots_1vbj7_49";
|
|
10194
10322
|
const dot$2 = "_dot_1vbj7_49";
|
|
10195
10323
|
const dotActive$2 = "_dotActive_1vbj7_100";
|
|
10196
|
-
const styles$
|
|
10324
|
+
const styles$j = {
|
|
10197
10325
|
gallery,
|
|
10198
10326
|
track: track$2,
|
|
10199
10327
|
slide: slide$1,
|
|
10200
|
-
image: image$
|
|
10328
|
+
image: image$5,
|
|
10201
10329
|
placeholder: placeholder$1,
|
|
10202
10330
|
dots: dots$2,
|
|
10203
10331
|
dot: dot$2,
|
|
@@ -10244,30 +10372,30 @@ function MediaGallery({ media: media2, alt, focus }) {
|
|
|
10244
10372
|
}
|
|
10245
10373
|
if (media2.length === 0) {
|
|
10246
10374
|
return jsx("div", {
|
|
10247
|
-
className: styles$
|
|
10375
|
+
className: styles$j.placeholder,
|
|
10248
10376
|
"aria-hidden": "true"
|
|
10249
10377
|
});
|
|
10250
10378
|
}
|
|
10251
10379
|
return jsxs("div", {
|
|
10252
|
-
className: styles$
|
|
10380
|
+
className: styles$j.gallery,
|
|
10253
10381
|
children: [jsx("div", {
|
|
10254
|
-
className: styles$
|
|
10382
|
+
className: styles$j.track,
|
|
10255
10383
|
ref: trackRef,
|
|
10256
10384
|
role: "group",
|
|
10257
10385
|
"aria-label": `${alt} images`,
|
|
10258
10386
|
children: media2.map((src, i) => jsx("div", {
|
|
10259
|
-
className: styles$
|
|
10387
|
+
className: styles$j.slide,
|
|
10260
10388
|
children: jsx(ShopImage, {
|
|
10261
10389
|
src,
|
|
10262
10390
|
alt: `${alt} — image ${i + 1} of ${media2.length}`,
|
|
10263
10391
|
fill: true,
|
|
10264
10392
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
10265
|
-
className: styles$
|
|
10393
|
+
className: styles$j.image,
|
|
10266
10394
|
priority: i === 0
|
|
10267
10395
|
})
|
|
10268
10396
|
}, src))
|
|
10269
10397
|
}), media2.length > 1 && jsx("div", {
|
|
10270
|
-
className: styles$
|
|
10398
|
+
className: styles$j.dots,
|
|
10271
10399
|
role: "tablist",
|
|
10272
10400
|
"aria-label": t("Gallery pagination"),
|
|
10273
10401
|
children: media2.map((src, i) => jsx("button", {
|
|
@@ -10275,7 +10403,7 @@ function MediaGallery({ media: media2, alt, focus }) {
|
|
|
10275
10403
|
role: "tab",
|
|
10276
10404
|
"aria-selected": i === active,
|
|
10277
10405
|
"aria-label": `Go to image ${i + 1}`,
|
|
10278
|
-
className: [styles$
|
|
10406
|
+
className: [styles$j.dot, i === active ? styles$j.dotActive : ""].join(" "),
|
|
10279
10407
|
onClick: () => goTo(i)
|
|
10280
10408
|
}, src))
|
|
10281
10409
|
})]
|
|
@@ -10283,7 +10411,7 @@ function MediaGallery({ media: media2, alt, focus }) {
|
|
|
10283
10411
|
}
|
|
10284
10412
|
const scrim$3 = "_scrim_r4azu_8";
|
|
10285
10413
|
const sheet$1 = "_sheet_r4azu_2";
|
|
10286
|
-
const body$
|
|
10414
|
+
const body$3 = "_body_r4azu_40";
|
|
10287
10415
|
const titles = "_titles_r4azu_67";
|
|
10288
10416
|
const title$a = "_title_r4azu_67";
|
|
10289
10417
|
const subtitle$3 = "_subtitle_r4azu_83";
|
|
@@ -10306,10 +10434,10 @@ const fabric = "_fabric_r4azu_328";
|
|
|
10306
10434
|
const fabricLabel = "_fabricLabel_r4azu_336";
|
|
10307
10435
|
const fabricText = "_fabricText_r4azu_344";
|
|
10308
10436
|
const notes = "_notes_r4azu_355";
|
|
10309
|
-
const styles$
|
|
10437
|
+
const styles$i = {
|
|
10310
10438
|
scrim: scrim$3,
|
|
10311
10439
|
sheet: sheet$1,
|
|
10312
|
-
body: body$
|
|
10440
|
+
body: body$3,
|
|
10313
10441
|
titles,
|
|
10314
10442
|
title: title$a,
|
|
10315
10443
|
subtitle: subtitle$3,
|
|
@@ -10360,12 +10488,12 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
10360
10488
|
const shown = useMemo(() => authored && unit2 && unit2 !== authored ? rows.map((row2) => row2.map((cell) => convert(cell, authored, unit2))) : rows, [rows, authored, unit2]);
|
|
10361
10489
|
useModalDialog(true, onClose, sheetRef);
|
|
10362
10490
|
return jsx("div", {
|
|
10363
|
-
className: styles$
|
|
10491
|
+
className: styles$i.scrim,
|
|
10364
10492
|
onClick: onClose,
|
|
10365
10493
|
children: jsxs(ShopSurface, {
|
|
10366
10494
|
tone: "light",
|
|
10367
10495
|
ref: sheetRef,
|
|
10368
|
-
className: styles$
|
|
10496
|
+
className: styles$i.sheet,
|
|
10369
10497
|
role: "dialog",
|
|
10370
10498
|
"aria-modal": "true",
|
|
10371
10499
|
"aria-labelledby": "size-guide-title",
|
|
@@ -10374,36 +10502,36 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
10374
10502
|
onClose,
|
|
10375
10503
|
closeLabel: t("Close size guide")
|
|
10376
10504
|
}), jsxs("div", {
|
|
10377
|
-
className: styles$
|
|
10505
|
+
className: styles$i.body,
|
|
10378
10506
|
children: [jsxs("div", {
|
|
10379
|
-
className: styles$
|
|
10507
|
+
className: styles$i.titles,
|
|
10380
10508
|
children: [jsx("h2", {
|
|
10381
10509
|
id: "size-guide-title",
|
|
10382
|
-
className: styles$
|
|
10510
|
+
className: styles$i.title,
|
|
10383
10511
|
children: guide.title
|
|
10384
10512
|
}), guide.subtitle && jsx("p", {
|
|
10385
|
-
className: styles$
|
|
10513
|
+
className: styles$i.subtitle,
|
|
10386
10514
|
children: guide.subtitle
|
|
10387
10515
|
})]
|
|
10388
10516
|
}), hasTable && authored && unit2 && jsx("div", {
|
|
10389
|
-
className: styles$
|
|
10517
|
+
className: styles$i.units,
|
|
10390
10518
|
role: "radiogroup",
|
|
10391
10519
|
"aria-label": t("Measurement unit"),
|
|
10392
10520
|
children: [authored, otherUnit(authored)].map((u) => jsx("button", {
|
|
10393
10521
|
type: "button",
|
|
10394
10522
|
role: "radio",
|
|
10395
10523
|
"aria-checked": u === unit2,
|
|
10396
|
-
className: `${styles$
|
|
10524
|
+
className: `${styles$i.unit} ${u === unit2 ? styles$i.unitOn : styles$i.unitOff}`,
|
|
10397
10525
|
onClick: () => setUnit(u),
|
|
10398
10526
|
children: UNIT_LABEL[u]
|
|
10399
10527
|
}, u))
|
|
10400
10528
|
}), hasTable && jsx("div", {
|
|
10401
|
-
className: styles$
|
|
10529
|
+
className: styles$i.tableWrap,
|
|
10402
10530
|
children: jsxs("table", {
|
|
10403
|
-
className: styles$
|
|
10531
|
+
className: styles$i.table,
|
|
10404
10532
|
children: [jsx("colgroup", {
|
|
10405
10533
|
children: columns.map((c, i) => jsx("col", {
|
|
10406
|
-
className: i === 0 || i === columns.length - 1 ? styles$
|
|
10534
|
+
className: i === 0 || i === columns.length - 1 ? styles$i.colEdge : styles$i.col
|
|
10407
10535
|
}, c))
|
|
10408
10536
|
}), jsx("thead", {
|
|
10409
10537
|
children: jsx("tr", {
|
|
@@ -10424,39 +10552,39 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
10424
10552
|
})]
|
|
10425
10553
|
})
|
|
10426
10554
|
}), guide.note && jsx("p", {
|
|
10427
|
-
className: styles$
|
|
10555
|
+
className: styles$i.note,
|
|
10428
10556
|
children: guide.note
|
|
10429
10557
|
}), measurements.length > 0 && jsxs("section", {
|
|
10430
|
-
className: styles$
|
|
10558
|
+
className: styles$i.how,
|
|
10431
10559
|
"aria-labelledby": "size-guide-how",
|
|
10432
10560
|
children: [jsx("h3", {
|
|
10433
10561
|
id: "size-guide-how",
|
|
10434
|
-
className: styles$
|
|
10562
|
+
className: styles$i.howTitle,
|
|
10435
10563
|
children: t("How to measure")
|
|
10436
10564
|
}), jsx("dl", {
|
|
10437
|
-
className: styles$
|
|
10565
|
+
className: styles$i.howList,
|
|
10438
10566
|
children: measurements.map((m) => jsxs("div", {
|
|
10439
|
-
className: styles$
|
|
10567
|
+
className: styles$i.howItem,
|
|
10440
10568
|
children: [jsx("dt", {
|
|
10441
|
-
className: styles$
|
|
10569
|
+
className: styles$i.howLabel,
|
|
10442
10570
|
children: m.label
|
|
10443
10571
|
}), jsx("dd", {
|
|
10444
|
-
className: styles$
|
|
10572
|
+
className: styles$i.howText,
|
|
10445
10573
|
children: m.description
|
|
10446
10574
|
})]
|
|
10447
10575
|
}, m.label))
|
|
10448
10576
|
})]
|
|
10449
10577
|
}), guide.fabric && jsxs("div", {
|
|
10450
|
-
className: styles$
|
|
10578
|
+
className: styles$i.fabric,
|
|
10451
10579
|
children: [jsx("p", {
|
|
10452
|
-
className: styles$
|
|
10580
|
+
className: styles$i.fabricLabel,
|
|
10453
10581
|
children: t("Fabric")
|
|
10454
10582
|
}), jsx("p", {
|
|
10455
|
-
className: styles$
|
|
10583
|
+
className: styles$i.fabricText,
|
|
10456
10584
|
children: guide.fabric
|
|
10457
10585
|
})]
|
|
10458
10586
|
}), notes2.length > 0 && jsx("ul", {
|
|
10459
|
-
className: styles$
|
|
10587
|
+
className: styles$i.notes,
|
|
10460
10588
|
children: notes2.map((n) => jsx("li", {
|
|
10461
10589
|
children: n
|
|
10462
10590
|
}, n))
|
|
@@ -10476,7 +10604,7 @@ const lowStock = "_lowStock_1q3xe_74";
|
|
|
10476
10604
|
const error = "_error_1q3xe_84";
|
|
10477
10605
|
const sizeGuide = "_sizeGuide_1q3xe_91";
|
|
10478
10606
|
const info = "_info_1q3xe_115";
|
|
10479
|
-
const styles$
|
|
10607
|
+
const styles$h = {
|
|
10480
10608
|
root: root$2,
|
|
10481
10609
|
header: header$3,
|
|
10482
10610
|
title: title$9,
|
|
@@ -10494,22 +10622,22 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
|
|
|
10494
10622
|
const [guideOpen, setGuideOpen] = useState(false);
|
|
10495
10623
|
const showGuide = useShopFeatures().sizeCharts && guide !== void 0;
|
|
10496
10624
|
return jsxs("section", {
|
|
10497
|
-
className: styles$
|
|
10625
|
+
className: styles$h.root,
|
|
10498
10626
|
"aria-labelledby": "size-heading",
|
|
10499
10627
|
children: [jsxs("div", {
|
|
10500
|
-
className: styles$
|
|
10628
|
+
className: styles$h.header,
|
|
10501
10629
|
children: [jsx("h2", {
|
|
10502
10630
|
id: "size-heading",
|
|
10503
|
-
className: styles$
|
|
10631
|
+
className: styles$h.title,
|
|
10504
10632
|
children: t("Size")
|
|
10505
10633
|
}), showGuide && jsxs("button", {
|
|
10506
10634
|
type: "button",
|
|
10507
|
-
className: styles$
|
|
10635
|
+
className: styles$h.sizeGuide,
|
|
10508
10636
|
onClick: () => setGuideOpen(true),
|
|
10509
10637
|
"aria-haspopup": "dialog",
|
|
10510
10638
|
"aria-expanded": guideOpen,
|
|
10511
10639
|
children: [t("Size guide"), jsxs("svg", {
|
|
10512
|
-
className: styles$
|
|
10640
|
+
className: styles$h.info,
|
|
10513
10641
|
width: "12",
|
|
10514
10642
|
height: "12",
|
|
10515
10643
|
viewBox: "0 0 12 12",
|
|
@@ -10535,7 +10663,7 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
|
|
|
10535
10663
|
})]
|
|
10536
10664
|
})]
|
|
10537
10665
|
}), jsx("div", {
|
|
10538
|
-
className: styles$
|
|
10666
|
+
className: styles$h.chips,
|
|
10539
10667
|
role: "radiogroup",
|
|
10540
10668
|
"aria-label": t("Size"),
|
|
10541
10669
|
"aria-required": "true",
|
|
@@ -10548,7 +10676,7 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
|
|
|
10548
10676
|
"aria-checked": isSelected,
|
|
10549
10677
|
"aria-disabled": disabled2 || void 0,
|
|
10550
10678
|
disabled: disabled2,
|
|
10551
|
-
className: [styles$
|
|
10679
|
+
className: [styles$h.chip, isSelected ? styles$h.selected : "", disabled2 ? styles$h.disabled : ""].filter(Boolean).join(" "),
|
|
10552
10680
|
onClick: () => !disabled2 && onSelect(size.value),
|
|
10553
10681
|
children: [size.value, disabled2 && jsx("span", {
|
|
10554
10682
|
className: "visually-hidden",
|
|
@@ -10557,11 +10685,11 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
|
|
|
10557
10685
|
}, size.value);
|
|
10558
10686
|
})
|
|
10559
10687
|
}), error2 && jsx("p", {
|
|
10560
|
-
className: styles$
|
|
10688
|
+
className: styles$h.error,
|
|
10561
10689
|
role: "alert",
|
|
10562
10690
|
children: t("Please select a size")
|
|
10563
10691
|
}), lowStock2 && !error2 && jsx("p", {
|
|
10564
|
-
className: styles$
|
|
10692
|
+
className: styles$h.lowStock,
|
|
10565
10693
|
role: "status",
|
|
10566
10694
|
children: lowStock2
|
|
10567
10695
|
}), showGuide && guideOpen && jsx(SizeGuideSheet, {
|
|
@@ -10578,11 +10706,11 @@ const tiles = "_tiles_1h4ny_28";
|
|
|
10578
10706
|
const tile = "_tile_1h4ny_28";
|
|
10579
10707
|
const selected$1 = "_selected_1h4ny_52";
|
|
10580
10708
|
const media = "_media_1h4ny_36";
|
|
10581
|
-
const image$
|
|
10709
|
+
const image$4 = "_image_1h4ny_64";
|
|
10582
10710
|
const placeholder = "_placeholder_1h4ny_68";
|
|
10583
10711
|
const scrim$2 = "_scrim_1h4ny_76";
|
|
10584
10712
|
const stockBadge = "_stockBadge_1h4ny_95";
|
|
10585
|
-
const styles$
|
|
10713
|
+
const styles$g = {
|
|
10586
10714
|
root: root$1,
|
|
10587
10715
|
header: header$2,
|
|
10588
10716
|
title: title$8,
|
|
@@ -10591,7 +10719,7 @@ const styles$f = {
|
|
|
10591
10719
|
tile,
|
|
10592
10720
|
selected: selected$1,
|
|
10593
10721
|
media,
|
|
10594
|
-
image: image$
|
|
10722
|
+
image: image$4,
|
|
10595
10723
|
placeholder,
|
|
10596
10724
|
scrim: scrim$2,
|
|
10597
10725
|
stockBadge
|
|
@@ -10599,20 +10727,20 @@ const styles$f = {
|
|
|
10599
10727
|
function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
10600
10728
|
const t = useT();
|
|
10601
10729
|
return jsxs("section", {
|
|
10602
|
-
className: styles$
|
|
10730
|
+
className: styles$g.root,
|
|
10603
10731
|
"aria-labelledby": "colour-heading",
|
|
10604
10732
|
children: [jsxs("p", {
|
|
10605
|
-
className: styles$
|
|
10733
|
+
className: styles$g.header,
|
|
10606
10734
|
children: [jsx("span", {
|
|
10607
10735
|
id: "colour-heading",
|
|
10608
|
-
className: styles$
|
|
10736
|
+
className: styles$g.title,
|
|
10609
10737
|
children: "Color:"
|
|
10610
10738
|
}), " ", jsx("span", {
|
|
10611
|
-
className: styles$
|
|
10739
|
+
className: styles$g.value,
|
|
10612
10740
|
children: selected2 ?? "Select"
|
|
10613
10741
|
})]
|
|
10614
10742
|
}), jsx("div", {
|
|
10615
|
-
className: styles$
|
|
10743
|
+
className: styles$g.tiles,
|
|
10616
10744
|
role: "radiogroup",
|
|
10617
10745
|
"aria-label": t("Color"),
|
|
10618
10746
|
"aria-required": "true",
|
|
@@ -10625,26 +10753,26 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
|
10625
10753
|
role: "radio",
|
|
10626
10754
|
"aria-checked": isSelected,
|
|
10627
10755
|
"aria-label": `${c.value}${soldOut ? " (out of stock)" : ""}`,
|
|
10628
|
-
className: [styles$
|
|
10756
|
+
className: [styles$g.tile, isSelected ? styles$g.selected : ""].filter(Boolean).join(" "),
|
|
10629
10757
|
onClick: () => onSelect(c.value),
|
|
10630
10758
|
children: [jsxs("span", {
|
|
10631
|
-
className: styles$
|
|
10759
|
+
className: styles$g.media,
|
|
10632
10760
|
children: [c.image ? jsx(ShopImage, {
|
|
10633
10761
|
src: c.image,
|
|
10634
10762
|
alt: "",
|
|
10635
10763
|
fill: true,
|
|
10636
10764
|
sizes: "79px",
|
|
10637
|
-
className: styles$
|
|
10765
|
+
className: styles$g.image
|
|
10638
10766
|
}) : jsx("span", {
|
|
10639
|
-
className: styles$
|
|
10767
|
+
className: styles$g.placeholder,
|
|
10640
10768
|
"aria-hidden": "true"
|
|
10641
10769
|
}), soldOut && jsx("span", {
|
|
10642
|
-
className: styles$
|
|
10770
|
+
className: styles$g.scrim,
|
|
10643
10771
|
"aria-hidden": "true",
|
|
10644
10772
|
children: t("Out of stock")
|
|
10645
10773
|
})]
|
|
10646
10774
|
}), lowStock2 && jsx("span", {
|
|
10647
|
-
className: styles$
|
|
10775
|
+
className: styles$g.stockBadge,
|
|
10648
10776
|
"aria-hidden": "true",
|
|
10649
10777
|
children: t("{0} left", c.remaining)
|
|
10650
10778
|
})]
|
|
@@ -10659,7 +10787,7 @@ const options = "_options_1mnz1_16";
|
|
|
10659
10787
|
const option = "_option_1mnz1_16";
|
|
10660
10788
|
const selected = "_selected_1mnz1_36";
|
|
10661
10789
|
const disabled = "_disabled_1mnz1_42";
|
|
10662
|
-
const styles$
|
|
10790
|
+
const styles$f = {
|
|
10663
10791
|
fieldset,
|
|
10664
10792
|
legend,
|
|
10665
10793
|
options,
|
|
@@ -10677,12 +10805,12 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
|
|
|
10677
10805
|
return values.length > 0 ? values.join(" · ") : variant.sku;
|
|
10678
10806
|
}
|
|
10679
10807
|
return jsxs("fieldset", {
|
|
10680
|
-
className: styles$
|
|
10808
|
+
className: styles$f.fieldset,
|
|
10681
10809
|
children: [jsx("legend", {
|
|
10682
|
-
className: styles$
|
|
10810
|
+
className: styles$f.legend,
|
|
10683
10811
|
children: t("Select an option")
|
|
10684
10812
|
}), jsx("div", {
|
|
10685
|
-
className: styles$
|
|
10813
|
+
className: styles$f.options,
|
|
10686
10814
|
role: "radiogroup",
|
|
10687
10815
|
"aria-label": t("Variant"),
|
|
10688
10816
|
children: variants.map((variant) => {
|
|
@@ -10694,7 +10822,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
|
|
|
10694
10822
|
"aria-checked": selected2,
|
|
10695
10823
|
"aria-disabled": disabled2 || void 0,
|
|
10696
10824
|
disabled: disabled2,
|
|
10697
|
-
className: [styles$
|
|
10825
|
+
className: [styles$f.option, selected2 ? styles$f.selected : "", disabled2 ? styles$f.disabled : ""].filter(Boolean).join(" "),
|
|
10698
10826
|
onClick: () => !disabled2 && onSelect(variant.sku),
|
|
10699
10827
|
children: [labelFor2(variant), disabled2 && jsx("span", {
|
|
10700
10828
|
className: "visually-hidden",
|
|
@@ -10708,15 +10836,15 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
|
|
|
10708
10836
|
const root = "_root_9cj0g_2";
|
|
10709
10837
|
const group = "_group_9cj0g_8";
|
|
10710
10838
|
const title$7 = "_title_9cj0g_14";
|
|
10711
|
-
const body$
|
|
10839
|
+
const body$2 = "_body_9cj0g_22";
|
|
10712
10840
|
const paragraph = "_paragraph_9cj0g_26";
|
|
10713
10841
|
const clamped = "_clamped_9cj0g_46";
|
|
10714
10842
|
const toggle = "_toggle_9cj0g_51";
|
|
10715
|
-
const styles$
|
|
10843
|
+
const styles$e = {
|
|
10716
10844
|
root,
|
|
10717
10845
|
group,
|
|
10718
10846
|
title: title$7,
|
|
10719
|
-
body: body$
|
|
10847
|
+
body: body$2,
|
|
10720
10848
|
paragraph,
|
|
10721
10849
|
clamped,
|
|
10722
10850
|
toggle
|
|
@@ -10750,25 +10878,25 @@ function ProductDetails({ description: description2 }) {
|
|
|
10750
10878
|
const t = useT();
|
|
10751
10879
|
if (paragraphs.length === 0) return null;
|
|
10752
10880
|
return jsxs("section", {
|
|
10753
|
-
className: styles$
|
|
10881
|
+
className: styles$e.root,
|
|
10754
10882
|
"aria-labelledby": "details-heading",
|
|
10755
10883
|
children: [jsxs("div", {
|
|
10756
|
-
className: styles$
|
|
10884
|
+
className: styles$e.group,
|
|
10757
10885
|
children: [jsx("h2", {
|
|
10758
10886
|
id: "details-heading",
|
|
10759
|
-
className: styles$
|
|
10887
|
+
className: styles$e.title,
|
|
10760
10888
|
children: t("Product details")
|
|
10761
10889
|
}), jsx("div", {
|
|
10762
10890
|
ref: bodyRef,
|
|
10763
|
-
className: [styles$
|
|
10891
|
+
className: [styles$e.body, expanded ? "" : styles$e.clamped].join(" "),
|
|
10764
10892
|
children: paragraphs.map((p) => jsx("p", {
|
|
10765
|
-
className: styles$
|
|
10893
|
+
className: styles$e.paragraph,
|
|
10766
10894
|
children: p
|
|
10767
10895
|
}, p))
|
|
10768
10896
|
})]
|
|
10769
10897
|
}), clipped ? jsx("button", {
|
|
10770
10898
|
type: "button",
|
|
10771
|
-
className: styles$
|
|
10899
|
+
className: styles$e.toggle,
|
|
10772
10900
|
"aria-expanded": expanded,
|
|
10773
10901
|
onClick: () => setExpanded((v) => !v),
|
|
10774
10902
|
children: expanded ? t("Less") : t("more")
|
|
@@ -10777,7 +10905,7 @@ function ProductDetails({ description: description2 }) {
|
|
|
10777
10905
|
}
|
|
10778
10906
|
const row$3 = "_row_l4edh_1";
|
|
10779
10907
|
const badge$1 = "_badge_l4edh_11";
|
|
10780
|
-
const styles$
|
|
10908
|
+
const styles$d = {
|
|
10781
10909
|
row: row$3,
|
|
10782
10910
|
badge: badge$1
|
|
10783
10911
|
};
|
|
@@ -10785,9 +10913,9 @@ function PdpBadges({ badges }) {
|
|
|
10785
10913
|
const flags = badges.filter((b) => b.trim().length > 0);
|
|
10786
10914
|
if (flags.length === 0) return null;
|
|
10787
10915
|
return jsx("ul", {
|
|
10788
|
-
className: styles$
|
|
10916
|
+
className: styles$d.row,
|
|
10789
10917
|
children: flags.map((flag) => jsx("li", {
|
|
10790
|
-
className: styles$
|
|
10918
|
+
className: styles$d.badge,
|
|
10791
10919
|
children: flag
|
|
10792
10920
|
}, flag))
|
|
10793
10921
|
});
|
|
@@ -10796,7 +10924,7 @@ const banner = "_banner_1xvw4_2";
|
|
|
10796
10924
|
const message = "_message_1xvw4_14";
|
|
10797
10925
|
const icon$1 = "_icon_1xvw4_22";
|
|
10798
10926
|
const timer = "_timer_1xvw4_27";
|
|
10799
|
-
const styles$
|
|
10927
|
+
const styles$c = {
|
|
10800
10928
|
banner,
|
|
10801
10929
|
message,
|
|
10802
10930
|
icon: icon$1,
|
|
@@ -10820,11 +10948,11 @@ function PromoBanner({ promo: promo2 }) {
|
|
|
10820
10948
|
const remaining = promo2.ends_at && now !== null ? new Date(promo2.ends_at).getTime() - now : null;
|
|
10821
10949
|
const showTimer = remaining !== null && remaining > 0;
|
|
10822
10950
|
return jsxs("div", {
|
|
10823
|
-
className: styles$
|
|
10951
|
+
className: styles$c.banner,
|
|
10824
10952
|
children: [jsxs("span", {
|
|
10825
|
-
className: styles$
|
|
10953
|
+
className: styles$c.message,
|
|
10826
10954
|
children: [jsxs("svg", {
|
|
10827
|
-
className: styles$
|
|
10955
|
+
className: styles$c.icon,
|
|
10828
10956
|
width: "24",
|
|
10829
10957
|
height: "24",
|
|
10830
10958
|
viewBox: "0 0 24 24",
|
|
@@ -10846,7 +10974,7 @@ function PromoBanner({ promo: promo2 }) {
|
|
|
10846
10974
|
})]
|
|
10847
10975
|
}), promo2.message]
|
|
10848
10976
|
}), showTimer && jsxs("span", {
|
|
10849
|
-
className: styles$
|
|
10977
|
+
className: styles$c.timer,
|
|
10850
10978
|
children: [jsxs("svg", {
|
|
10851
10979
|
width: "16",
|
|
10852
10980
|
height: "16",
|
|
@@ -10879,7 +11007,7 @@ const title$6 = "_title_1hv16_34";
|
|
|
10879
11007
|
const availability = "_availability_1hv16_55";
|
|
10880
11008
|
const low = "_low_1hv16_62";
|
|
10881
11009
|
const oos = "_oos_1hv16_66";
|
|
10882
|
-
const styles$
|
|
11010
|
+
const styles$b = {
|
|
10883
11011
|
page,
|
|
10884
11012
|
content,
|
|
10885
11013
|
intro,
|
|
@@ -10890,7 +11018,7 @@ const styles$a = {
|
|
|
10890
11018
|
low,
|
|
10891
11019
|
oos
|
|
10892
11020
|
};
|
|
10893
|
-
function ProductDetail({ product, inventory: inventory2, recommendations = [] }) {
|
|
11021
|
+
function ProductDetail({ product, inventory: inventory2, recommendations = [], claim }) {
|
|
10894
11022
|
const t = useT();
|
|
10895
11023
|
const toast2 = useToast();
|
|
10896
11024
|
const { api, emit } = useShop();
|
|
@@ -11049,6 +11177,17 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
11049
11177
|
}
|
|
11050
11178
|
return selectedSku !== null;
|
|
11051
11179
|
}
|
|
11180
|
+
async function handleClaim() {
|
|
11181
|
+
if (!claim || !ensureSelection()) return;
|
|
11182
|
+
const sku = selectedSku;
|
|
11183
|
+
if (!sku) return;
|
|
11184
|
+
setBusy("claim");
|
|
11185
|
+
try {
|
|
11186
|
+
await claim(sku);
|
|
11187
|
+
} finally {
|
|
11188
|
+
setBusy(null);
|
|
11189
|
+
}
|
|
11190
|
+
}
|
|
11052
11191
|
async function handleAdd() {
|
|
11053
11192
|
if (!ensureSelection()) return;
|
|
11054
11193
|
const sku = selectedSku;
|
|
@@ -11075,9 +11214,19 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
11075
11214
|
const available = selectedVariant?.available ?? inventory2?.available ?? 0;
|
|
11076
11215
|
const lowStock2 = isLowStock(available);
|
|
11077
11216
|
const sizeLowStock = lowStock2 && hasSizes && selectedSize ? t("Only {0} left in {1} size", available, selectedSize) : void 0;
|
|
11078
|
-
const stockNotice = !purchasable || lowStock2 && !sizeLowStock;
|
|
11217
|
+
const stockNotice = claim ? purchasable && lowStock2 && !sizeLowStock : !purchasable || lowStock2 && !sizeLowStock;
|
|
11079
11218
|
const availabilityLabel = !purchasable ? t("Out of stock") : lowStock2 ? t("Only {0} left", available) : "";
|
|
11080
|
-
const cta2 = purchasable ? jsx(Button, {
|
|
11219
|
+
const cta2 = claim ? purchasable ? jsx(Button, {
|
|
11220
|
+
variant: "primary",
|
|
11221
|
+
onClick: handleClaim,
|
|
11222
|
+
loading: busy === "claim",
|
|
11223
|
+
disabled: busy !== null,
|
|
11224
|
+
children: t("Claim yours")
|
|
11225
|
+
}) : jsx(Button, {
|
|
11226
|
+
variant: "primary",
|
|
11227
|
+
disabled: true,
|
|
11228
|
+
children: t("Sold out")
|
|
11229
|
+
}) : purchasable ? jsx(Button, {
|
|
11081
11230
|
variant: "primary",
|
|
11082
11231
|
onClick: inCart ? openCart : handleAdd,
|
|
11083
11232
|
loading: busy === "add",
|
|
@@ -11097,7 +11246,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
11097
11246
|
return jsxs(ShopSurface, {
|
|
11098
11247
|
tone: "light",
|
|
11099
11248
|
fill: true,
|
|
11100
|
-
className: styles$
|
|
11249
|
+
className: styles$b.page,
|
|
11101
11250
|
children: [jsx(MediaGallery, {
|
|
11102
11251
|
media: media2,
|
|
11103
11252
|
alt: product.title,
|
|
@@ -11105,31 +11254,34 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
11105
11254
|
focus
|
|
11106
11255
|
} : {}
|
|
11107
11256
|
}), jsxs("div", {
|
|
11108
|
-
className: styles$
|
|
11257
|
+
className: styles$b.content,
|
|
11109
11258
|
children: [jsxs("div", {
|
|
11110
|
-
className: styles$
|
|
11259
|
+
className: styles$b.intro,
|
|
11111
11260
|
children: [jsx(PdpBadges, {
|
|
11112
11261
|
badges: product.badges ?? []
|
|
11113
11262
|
}), jsxs("div", {
|
|
11114
|
-
className: styles$
|
|
11263
|
+
className: styles$b.productInfo,
|
|
11115
11264
|
children: [jsxs("div", {
|
|
11116
|
-
className: styles$
|
|
11265
|
+
className: styles$b.titlePrice,
|
|
11117
11266
|
children: [jsx("h1", {
|
|
11118
|
-
className: styles$
|
|
11267
|
+
className: styles$b.title,
|
|
11119
11268
|
children: product.title
|
|
11120
11269
|
}), jsx(PriceBlock, {
|
|
11121
|
-
price:
|
|
11122
|
-
|
|
11270
|
+
price: claim ? {
|
|
11271
|
+
amount: 0,
|
|
11272
|
+
currency: product.price.currency
|
|
11273
|
+
} : product.price,
|
|
11274
|
+
compareAt: claim ? product.price : product.compare_at,
|
|
11123
11275
|
size: "md",
|
|
11124
11276
|
variant: "badge",
|
|
11125
11277
|
align: "center"
|
|
11126
11278
|
})]
|
|
11127
|
-
}), product.promo && jsx(PromoBanner, {
|
|
11279
|
+
}), product.promo && !claim && jsx(PromoBanner, {
|
|
11128
11280
|
promo: product.promo
|
|
11129
11281
|
})]
|
|
11130
11282
|
})]
|
|
11131
11283
|
}), stockNotice && jsx("p", {
|
|
11132
|
-
className: [styles$
|
|
11284
|
+
className: [styles$b.availability, anyInStock ? styles$b.low : styles$b.oos].join(" "),
|
|
11133
11285
|
role: "status",
|
|
11134
11286
|
children: availabilityLabel
|
|
11135
11287
|
}), hasColours && jsx("div", {
|
|
@@ -11157,7 +11309,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
11157
11309
|
onSelect: setGenericSku
|
|
11158
11310
|
}), jsx(ShippingInfo, {}), product.description && jsx(ProductDetails, {
|
|
11159
11311
|
description: product.description
|
|
11160
|
-
}), jsx(RailCarousel, {
|
|
11312
|
+
}), !claim && jsx(RailCarousel, {
|
|
11161
11313
|
title: t("You may also like"),
|
|
11162
11314
|
products: recommendations.filter((p) => p.sku !== product.sku),
|
|
11163
11315
|
inset: true
|
|
@@ -11167,20 +11319,20 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
11167
11319
|
})]
|
|
11168
11320
|
});
|
|
11169
11321
|
}
|
|
11170
|
-
const hero$
|
|
11171
|
-
const image$
|
|
11322
|
+
const hero$2 = "_hero_1tiqx_10";
|
|
11323
|
+
const image$3 = "_image_1tiqx_42";
|
|
11172
11324
|
const scrim$1 = "_scrim_1tiqx_70";
|
|
11173
11325
|
const fade = "_fade_1tiqx_94";
|
|
11174
|
-
const text$
|
|
11326
|
+
const text$3 = "_text_1tiqx_108";
|
|
11175
11327
|
const title$5 = "_title_1tiqx_157";
|
|
11176
11328
|
const subtitle$2 = "_subtitle_1tiqx_168";
|
|
11177
11329
|
const noImage = "_noImage_1tiqx_183";
|
|
11178
|
-
const styles$
|
|
11179
|
-
hero: hero$
|
|
11180
|
-
image: image$
|
|
11330
|
+
const styles$a = {
|
|
11331
|
+
hero: hero$2,
|
|
11332
|
+
image: image$3,
|
|
11181
11333
|
scrim: scrim$1,
|
|
11182
11334
|
fade,
|
|
11183
|
-
text: text$
|
|
11335
|
+
text: text$3,
|
|
11184
11336
|
title: title$5,
|
|
11185
11337
|
subtitle: subtitle$2,
|
|
11186
11338
|
noImage
|
|
@@ -11191,10 +11343,10 @@ function PcpHero({ hero: hero2 }) {
|
|
|
11191
11343
|
const t = useT();
|
|
11192
11344
|
return jsxs("section", {
|
|
11193
11345
|
ref: heroRef,
|
|
11194
|
-
className: [styles$
|
|
11346
|
+
className: [styles$a.hero, hero2.image ? "" : styles$a.noImage].join(" "),
|
|
11195
11347
|
children: [hero2.image && jsxs(Fragment, {
|
|
11196
11348
|
children: [jsx("div", {
|
|
11197
|
-
className: styles$
|
|
11349
|
+
className: styles$a.image,
|
|
11198
11350
|
children: jsx(ShopImage, {
|
|
11199
11351
|
src: hero2.image,
|
|
11200
11352
|
alt: "",
|
|
@@ -11203,35 +11355,35 @@ function PcpHero({ hero: hero2 }) {
|
|
|
11203
11355
|
priority: true
|
|
11204
11356
|
})
|
|
11205
11357
|
}), jsx("div", {
|
|
11206
|
-
className: styles$
|
|
11358
|
+
className: styles$a.scrim,
|
|
11207
11359
|
"aria-hidden": "true"
|
|
11208
11360
|
}), jsx("div", {
|
|
11209
|
-
className: styles$
|
|
11361
|
+
className: styles$a.fade,
|
|
11210
11362
|
"aria-hidden": "true"
|
|
11211
11363
|
})]
|
|
11212
11364
|
}), jsxs("div", {
|
|
11213
|
-
className: styles$
|
|
11365
|
+
className: styles$a.text,
|
|
11214
11366
|
children: [jsx("h1", {
|
|
11215
|
-
className: styles$
|
|
11367
|
+
className: styles$a.title,
|
|
11216
11368
|
children: t(hero2.title)
|
|
11217
11369
|
}), hero2.subtitle && jsx("p", {
|
|
11218
|
-
className: styles$
|
|
11370
|
+
className: styles$a.subtitle,
|
|
11219
11371
|
children: t(hero2.subtitle)
|
|
11220
11372
|
})]
|
|
11221
11373
|
})]
|
|
11222
11374
|
});
|
|
11223
11375
|
}
|
|
11224
|
-
const text$
|
|
11376
|
+
const text$2 = "_text_1saw4_6";
|
|
11225
11377
|
const center = "_center_1saw4_18";
|
|
11226
11378
|
const left = "_left_1saw4_23";
|
|
11227
|
-
const styles$
|
|
11228
|
-
text: text$
|
|
11379
|
+
const styles$9 = {
|
|
11380
|
+
text: text$2,
|
|
11229
11381
|
center,
|
|
11230
11382
|
left
|
|
11231
11383
|
};
|
|
11232
11384
|
function LifestyleText({ text: text2, align = "center" }) {
|
|
11233
11385
|
return jsx("p", {
|
|
11234
|
-
className: [styles$
|
|
11386
|
+
className: [styles$9.text, align === "left" ? styles$9.left : styles$9.center].join(" "),
|
|
11235
11387
|
children: text2
|
|
11236
11388
|
});
|
|
11237
11389
|
}
|
|
@@ -11239,16 +11391,16 @@ const wrap = "_wrap_79nr3_10";
|
|
|
11239
11391
|
const box = "_box_79nr3_14";
|
|
11240
11392
|
const track$1 = "_track_79nr3_23";
|
|
11241
11393
|
const slide = "_slide_79nr3_39";
|
|
11242
|
-
const image$
|
|
11394
|
+
const image$2 = "_image_79nr3_46";
|
|
11243
11395
|
const dots$1 = "_dots_79nr3_51";
|
|
11244
11396
|
const dot$1 = "_dot_79nr3_51";
|
|
11245
11397
|
const dotActive$1 = "_dotActive_79nr3_76";
|
|
11246
|
-
const styles$
|
|
11398
|
+
const styles$8 = {
|
|
11247
11399
|
wrap,
|
|
11248
11400
|
box,
|
|
11249
11401
|
track: track$1,
|
|
11250
11402
|
slide,
|
|
11251
|
-
image: image$
|
|
11403
|
+
image: image$2,
|
|
11252
11404
|
dots: dots$1,
|
|
11253
11405
|
dot: dot$1,
|
|
11254
11406
|
dotActive: dotActive$1
|
|
@@ -11267,36 +11419,36 @@ function LifestyleImage({ images, videos }) {
|
|
|
11267
11419
|
}, []);
|
|
11268
11420
|
if (images.length === 0) return null;
|
|
11269
11421
|
return jsx("div", {
|
|
11270
|
-
className: styles$
|
|
11422
|
+
className: styles$8.wrap,
|
|
11271
11423
|
children: jsxs("div", {
|
|
11272
|
-
className: styles$
|
|
11424
|
+
className: styles$8.box,
|
|
11273
11425
|
children: [jsx("ul", {
|
|
11274
|
-
className: styles$
|
|
11426
|
+
className: styles$8.track,
|
|
11275
11427
|
ref: trackRef,
|
|
11276
11428
|
children: images.map((src, i) => {
|
|
11277
11429
|
const clip = videos?.[i];
|
|
11278
11430
|
return jsx("li", {
|
|
11279
|
-
className: styles$
|
|
11431
|
+
className: styles$8.slide,
|
|
11280
11432
|
children: clip ? jsx(ShopVideo, {
|
|
11281
11433
|
src: clip,
|
|
11282
11434
|
poster: src,
|
|
11283
11435
|
fill: true,
|
|
11284
|
-
className: styles$
|
|
11436
|
+
className: styles$8.image
|
|
11285
11437
|
}) : jsx(ShopImage, {
|
|
11286
11438
|
src,
|
|
11287
11439
|
alt: "",
|
|
11288
11440
|
fill: true,
|
|
11289
11441
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
11290
|
-
className: styles$
|
|
11442
|
+
className: styles$8.image,
|
|
11291
11443
|
priority: i === 0
|
|
11292
11444
|
})
|
|
11293
11445
|
}, src);
|
|
11294
11446
|
})
|
|
11295
11447
|
}), images.length > 1 && jsx("div", {
|
|
11296
|
-
className: styles$
|
|
11448
|
+
className: styles$8.dots,
|
|
11297
11449
|
"aria-hidden": "true",
|
|
11298
11450
|
children: images.map((src, i) => jsx("span", {
|
|
11299
|
-
className: [styles$
|
|
11451
|
+
className: [styles$8.dot, i === active ? styles$8.dotActive : ""].join(" ")
|
|
11300
11452
|
}, src))
|
|
11301
11453
|
})]
|
|
11302
11454
|
})
|
|
@@ -11310,7 +11462,7 @@ const author = "_author_qsxtq_58";
|
|
|
11310
11462
|
const dots = "_dots_qsxtq_69";
|
|
11311
11463
|
const dot = "_dot_qsxtq_69";
|
|
11312
11464
|
const dotActive = "_dotActive_qsxtq_85";
|
|
11313
|
-
const styles$
|
|
11465
|
+
const styles$7 = {
|
|
11314
11466
|
section: section$2,
|
|
11315
11467
|
track,
|
|
11316
11468
|
card,
|
|
@@ -11334,26 +11486,26 @@ function ReviewCarousel({ quotes }) {
|
|
|
11334
11486
|
return () => track2.removeEventListener("scroll", onScroll);
|
|
11335
11487
|
}, []);
|
|
11336
11488
|
return jsxs("section", {
|
|
11337
|
-
className: styles$
|
|
11489
|
+
className: styles$7.section,
|
|
11338
11490
|
"aria-label": t("Reviews"),
|
|
11339
11491
|
children: [jsx("ul", {
|
|
11340
|
-
className: styles$
|
|
11492
|
+
className: styles$7.track,
|
|
11341
11493
|
ref: trackRef,
|
|
11342
11494
|
children: quotes.map((q, i) => jsxs("li", {
|
|
11343
|
-
className: styles$
|
|
11495
|
+
className: styles$7.card,
|
|
11344
11496
|
children: [jsxs("blockquote", {
|
|
11345
|
-
className: styles$
|
|
11497
|
+
className: styles$7.quote,
|
|
11346
11498
|
children: ["“", q.quote, "”"]
|
|
11347
11499
|
}), jsx("p", {
|
|
11348
|
-
className: styles$
|
|
11500
|
+
className: styles$7.author,
|
|
11349
11501
|
children: q.author
|
|
11350
11502
|
})]
|
|
11351
11503
|
}, i))
|
|
11352
11504
|
}), quotes.length > 1 && jsx("div", {
|
|
11353
|
-
className: styles$
|
|
11505
|
+
className: styles$7.dots,
|
|
11354
11506
|
"aria-hidden": "true",
|
|
11355
11507
|
children: quotes.map((_, i) => jsx("span", {
|
|
11356
|
-
className: [styles$
|
|
11508
|
+
className: [styles$7.dot, i === active ? styles$7.dotActive : ""].join(" ")
|
|
11357
11509
|
}, i))
|
|
11358
11510
|
})]
|
|
11359
11511
|
});
|
|
@@ -11361,25 +11513,25 @@ function ReviewCarousel({ quotes }) {
|
|
|
11361
11513
|
const section$1 = "_section_1nrsi_1";
|
|
11362
11514
|
const row$2 = "_row_1nrsi_9";
|
|
11363
11515
|
const title$4 = "_title_1nrsi_20";
|
|
11364
|
-
const body = "_body_1nrsi_43";
|
|
11365
|
-
const styles$
|
|
11516
|
+
const body$1 = "_body_1nrsi_43";
|
|
11517
|
+
const styles$6 = {
|
|
11366
11518
|
section: section$1,
|
|
11367
11519
|
row: row$2,
|
|
11368
11520
|
title: title$4,
|
|
11369
|
-
body
|
|
11521
|
+
body: body$1
|
|
11370
11522
|
};
|
|
11371
11523
|
function WhyUs({ items: items2 }) {
|
|
11372
11524
|
const t = useT();
|
|
11373
11525
|
return jsx("section", {
|
|
11374
|
-
className: styles$
|
|
11526
|
+
className: styles$6.section,
|
|
11375
11527
|
"aria-label": t("Why shop with us"),
|
|
11376
11528
|
children: items2.map((it, i) => jsxs("div", {
|
|
11377
|
-
className: styles$
|
|
11529
|
+
className: styles$6.row,
|
|
11378
11530
|
children: [jsx("p", {
|
|
11379
|
-
className: styles$
|
|
11531
|
+
className: styles$6.title,
|
|
11380
11532
|
children: it.title
|
|
11381
11533
|
}), jsx("p", {
|
|
11382
|
-
className: styles$
|
|
11534
|
+
className: styles$6.body,
|
|
11383
11535
|
children: it.body
|
|
11384
11536
|
})]
|
|
11385
11537
|
}, i))
|
|
@@ -11389,7 +11541,7 @@ const section = "_section_snuuj_1";
|
|
|
11389
11541
|
const title$3 = "_title_snuuj_10";
|
|
11390
11542
|
const list$1 = "_list_snuuj_17";
|
|
11391
11543
|
const row$1 = "_row_snuuj_32";
|
|
11392
|
-
const styles$
|
|
11544
|
+
const styles$5 = {
|
|
11393
11545
|
section,
|
|
11394
11546
|
title: title$3,
|
|
11395
11547
|
list: list$1,
|
|
@@ -11398,17 +11550,17 @@ const styles$4 = {
|
|
|
11398
11550
|
function ExploreList({ title: title2, links }) {
|
|
11399
11551
|
const t = useT();
|
|
11400
11552
|
return jsxs("section", {
|
|
11401
|
-
className: styles$
|
|
11553
|
+
className: styles$5.section,
|
|
11402
11554
|
"aria-label": title2,
|
|
11403
11555
|
children: [jsx("h2", {
|
|
11404
|
-
className: styles$
|
|
11556
|
+
className: styles$5.title,
|
|
11405
11557
|
children: title2
|
|
11406
11558
|
}), jsx("ul", {
|
|
11407
|
-
className: styles$
|
|
11559
|
+
className: styles$5.list,
|
|
11408
11560
|
children: links.map((l) => jsx("li", {
|
|
11409
11561
|
children: jsxs(ShopLink, {
|
|
11410
11562
|
to: `/category/${encodeURIComponent(l.code)}`,
|
|
11411
|
-
className: styles$
|
|
11563
|
+
className: styles$5.row,
|
|
11412
11564
|
children: [jsx("span", {
|
|
11413
11565
|
children: t(l.label)
|
|
11414
11566
|
}), jsx("svg", {
|
|
@@ -11436,7 +11588,7 @@ const featured = "_featured_1kft8_36";
|
|
|
11436
11588
|
const gridBlock = "_gridBlock_1kft8_37";
|
|
11437
11589
|
const blockTitle = "_blockTitle_1kft8_44";
|
|
11438
11590
|
const grid = "_grid_1kft8_37";
|
|
11439
|
-
const styles$
|
|
11591
|
+
const styles$4 = {
|
|
11440
11592
|
pcp,
|
|
11441
11593
|
blocks,
|
|
11442
11594
|
featured,
|
|
@@ -11459,9 +11611,9 @@ function Block({ block }) {
|
|
|
11459
11611
|
});
|
|
11460
11612
|
case "featured":
|
|
11461
11613
|
return jsxs("div", {
|
|
11462
|
-
className: styles$
|
|
11614
|
+
className: styles$4.featured,
|
|
11463
11615
|
children: [block.title && jsx("h2", {
|
|
11464
|
-
className: styles$
|
|
11616
|
+
className: styles$4.blockTitle,
|
|
11465
11617
|
children: t(block.title)
|
|
11466
11618
|
}), jsx(ProductTile, {
|
|
11467
11619
|
product: block.product,
|
|
@@ -11481,12 +11633,12 @@ function Block({ block }) {
|
|
|
11481
11633
|
});
|
|
11482
11634
|
case "grid":
|
|
11483
11635
|
return jsxs("div", {
|
|
11484
|
-
className: styles$
|
|
11636
|
+
className: styles$4.gridBlock,
|
|
11485
11637
|
children: [block.title && jsx("h2", {
|
|
11486
|
-
className: styles$
|
|
11638
|
+
className: styles$4.blockTitle,
|
|
11487
11639
|
children: t(block.title)
|
|
11488
11640
|
}), jsx("ul", {
|
|
11489
|
-
className: styles$
|
|
11641
|
+
className: styles$4.grid,
|
|
11490
11642
|
children: block.products.map((p) => jsx("li", {
|
|
11491
11643
|
children: jsx(ProductTile, {
|
|
11492
11644
|
product: p
|
|
@@ -11515,11 +11667,11 @@ function CategoryContent({ page: page2 }) {
|
|
|
11515
11667
|
return jsxs(ShopSurface, {
|
|
11516
11668
|
tone: "dark",
|
|
11517
11669
|
fill: true,
|
|
11518
|
-
className: styles$
|
|
11670
|
+
className: styles$4.pcp,
|
|
11519
11671
|
children: [jsx(PcpHero, {
|
|
11520
11672
|
hero: page2.hero
|
|
11521
11673
|
}), jsx("div", {
|
|
11522
|
-
className: styles$
|
|
11674
|
+
className: styles$4.blocks,
|
|
11523
11675
|
children: page2.blocks.map((block, i) => jsx(Block, {
|
|
11524
11676
|
block
|
|
11525
11677
|
}, i))
|
|
@@ -11693,6 +11845,216 @@ function ProductView({ sku, initialData, showRecommendations = true, onNotFound
|
|
|
11693
11845
|
})
|
|
11694
11846
|
});
|
|
11695
11847
|
}
|
|
11848
|
+
const hero$1 = "_hero_1j0m8_1";
|
|
11849
|
+
const image$1 = "_image_1j0m8_11";
|
|
11850
|
+
const foot = "_foot_1j0m8_34";
|
|
11851
|
+
const text$1 = "_text_1j0m8_40";
|
|
11852
|
+
const logo$1 = "_logo_1j0m8_48";
|
|
11853
|
+
const copy$1 = "_copy_1j0m8_53";
|
|
11854
|
+
const headline = "_headline_1j0m8_62";
|
|
11855
|
+
const body = "_body_1j0m8_70";
|
|
11856
|
+
const cta$1 = "_cta_1j0m8_79";
|
|
11857
|
+
const styles$3 = {
|
|
11858
|
+
hero: hero$1,
|
|
11859
|
+
image: image$1,
|
|
11860
|
+
foot,
|
|
11861
|
+
text: text$1,
|
|
11862
|
+
logo: logo$1,
|
|
11863
|
+
copy: copy$1,
|
|
11864
|
+
headline,
|
|
11865
|
+
body,
|
|
11866
|
+
cta: cta$1
|
|
11867
|
+
};
|
|
11868
|
+
function VipHero({ hero: hero2, onContinue }) {
|
|
11869
|
+
const t = useT();
|
|
11870
|
+
const assetUrl = useAssetUrl();
|
|
11871
|
+
const ref = useRef(null);
|
|
11872
|
+
useTopOffset(ref, "--vip-hero-top");
|
|
11873
|
+
return jsx(ShopSurface, {
|
|
11874
|
+
tone: "dark",
|
|
11875
|
+
fill: true,
|
|
11876
|
+
children: jsxs("section", {
|
|
11877
|
+
ref,
|
|
11878
|
+
className: styles$3.hero,
|
|
11879
|
+
children: [hero2.image && jsx("div", {
|
|
11880
|
+
className: styles$3.image,
|
|
11881
|
+
children: jsx(ShopImage, {
|
|
11882
|
+
src: hero2.image,
|
|
11883
|
+
alt: "",
|
|
11884
|
+
fill: true,
|
|
11885
|
+
sizes: "(max-width: 480px) 100vw, 480px",
|
|
11886
|
+
priority: true
|
|
11887
|
+
})
|
|
11888
|
+
}), jsxs("div", {
|
|
11889
|
+
className: styles$3.foot,
|
|
11890
|
+
children: [jsxs("div", {
|
|
11891
|
+
className: styles$3.text,
|
|
11892
|
+
children: [jsx("img", {
|
|
11893
|
+
src: assetUrl("/figma/home/dazn-logo.svg"),
|
|
11894
|
+
alt: t("DAZN"),
|
|
11895
|
+
className: styles$3.logo
|
|
11896
|
+
}), jsxs("div", {
|
|
11897
|
+
className: styles$3.copy,
|
|
11898
|
+
children: [jsx("h1", {
|
|
11899
|
+
className: styles$3.headline,
|
|
11900
|
+
children: hero2.headline
|
|
11901
|
+
}), hero2.body && jsx("p", {
|
|
11902
|
+
className: styles$3.body,
|
|
11903
|
+
children: hero2.body
|
|
11904
|
+
})]
|
|
11905
|
+
})]
|
|
11906
|
+
}), jsx("div", {
|
|
11907
|
+
className: styles$3.cta,
|
|
11908
|
+
children: jsx(Button, {
|
|
11909
|
+
variant: "primary",
|
|
11910
|
+
fullWidth: true,
|
|
11911
|
+
onClick: onContinue,
|
|
11912
|
+
children: hero2.cta_label
|
|
11913
|
+
})
|
|
11914
|
+
})]
|
|
11915
|
+
})]
|
|
11916
|
+
})
|
|
11917
|
+
});
|
|
11918
|
+
}
|
|
11919
|
+
function VipLandingView({ token, onUnavailable }) {
|
|
11920
|
+
const t = useT();
|
|
11921
|
+
const { api, emit } = useShop();
|
|
11922
|
+
const [load, setLoad] = useState({
|
|
11923
|
+
status: "loading"
|
|
11924
|
+
});
|
|
11925
|
+
const emitRef = useRef(emit);
|
|
11926
|
+
emitRef.current = emit;
|
|
11927
|
+
useEffect(() => {
|
|
11928
|
+
let live = true;
|
|
11929
|
+
setLoad({
|
|
11930
|
+
status: "loading"
|
|
11931
|
+
});
|
|
11932
|
+
api.vip.resolve(token).then((invite2) => {
|
|
11933
|
+
if (live) setLoad({
|
|
11934
|
+
status: "done",
|
|
11935
|
+
invite: invite2
|
|
11936
|
+
});
|
|
11937
|
+
}).catch((err) => {
|
|
11938
|
+
if (!live) return;
|
|
11939
|
+
const code = codeOf(err);
|
|
11940
|
+
emitRef.current({
|
|
11941
|
+
type: "error",
|
|
11942
|
+
code,
|
|
11943
|
+
scope: "vip.resolve"
|
|
11944
|
+
});
|
|
11945
|
+
setLoad({
|
|
11946
|
+
status: "error",
|
|
11947
|
+
code
|
|
11948
|
+
});
|
|
11949
|
+
});
|
|
11950
|
+
return () => {
|
|
11951
|
+
live = false;
|
|
11952
|
+
};
|
|
11953
|
+
}, [api, token]);
|
|
11954
|
+
if (load.status === "loading") return jsx(ScreenSkeleton, {
|
|
11955
|
+
tone: "light"
|
|
11956
|
+
});
|
|
11957
|
+
if (load.status === "error") {
|
|
11958
|
+
return jsx(ShopSurface, {
|
|
11959
|
+
tone: "light",
|
|
11960
|
+
fill: true,
|
|
11961
|
+
children: jsx(ErrorState, {
|
|
11962
|
+
code: load.code
|
|
11963
|
+
})
|
|
11964
|
+
});
|
|
11965
|
+
}
|
|
11966
|
+
const { invite } = load;
|
|
11967
|
+
if (invite.state !== "active") {
|
|
11968
|
+
if (onUnavailable) return jsx(Fragment, {
|
|
11969
|
+
children: onUnavailable(invite.state)
|
|
11970
|
+
});
|
|
11971
|
+
return jsx(ShopSurface, {
|
|
11972
|
+
tone: "light",
|
|
11973
|
+
fill: true,
|
|
11974
|
+
children: jsx(EmptyState, {
|
|
11975
|
+
title: t("Item unavailable"),
|
|
11976
|
+
body: t("This invitation can no longer be used.")
|
|
11977
|
+
})
|
|
11978
|
+
});
|
|
11979
|
+
}
|
|
11980
|
+
return jsx(ActiveLanding, {
|
|
11981
|
+
token,
|
|
11982
|
+
invite
|
|
11983
|
+
});
|
|
11984
|
+
}
|
|
11985
|
+
function ActiveLanding({ token, invite }) {
|
|
11986
|
+
const t = useT();
|
|
11987
|
+
const toast2 = useToast();
|
|
11988
|
+
const { api, emit } = useShop();
|
|
11989
|
+
const product = useInPlaceScreen("vipProduct");
|
|
11990
|
+
const sku = invite.items[0]?.product_sku ?? "";
|
|
11991
|
+
const loaded = useProduct(sku, {
|
|
11992
|
+
showRecommendations: false
|
|
11993
|
+
});
|
|
11994
|
+
const claim = useCallback(async (variantSku) => {
|
|
11995
|
+
try {
|
|
11996
|
+
const current2 = await api.cart.get().catch(() => null);
|
|
11997
|
+
if (current2?.vip?.invite_ref === invite.invite_ref) {
|
|
11998
|
+
for (const line2 of current2.items) await api.cart.removeItem(line2.sku);
|
|
11999
|
+
}
|
|
12000
|
+
const cart2 = await api.vip.addToCart({
|
|
12001
|
+
token,
|
|
12002
|
+
sku: variantSku,
|
|
12003
|
+
qty: 1
|
|
12004
|
+
});
|
|
12005
|
+
emit({
|
|
12006
|
+
type: "cart_updated",
|
|
12007
|
+
itemCount: cart2.items.reduce((n, i) => n + i.qty, 0),
|
|
12008
|
+
subtotal: cart2.totals.subtotal
|
|
12009
|
+
});
|
|
12010
|
+
const { checkout_url } = await api.cart.handoff();
|
|
12011
|
+
emit({
|
|
12012
|
+
type: "checkout_handoff",
|
|
12013
|
+
cartId: cart2.cart_id,
|
|
12014
|
+
url: checkout_url
|
|
12015
|
+
});
|
|
12016
|
+
window.location.assign(checkout_url);
|
|
12017
|
+
} catch (err) {
|
|
12018
|
+
const code = codeOf(err);
|
|
12019
|
+
if (code === "unauthorized") {
|
|
12020
|
+
emit({
|
|
12021
|
+
type: "session_required",
|
|
12022
|
+
action: "vip_claim"
|
|
12023
|
+
});
|
|
12024
|
+
return;
|
|
12025
|
+
}
|
|
12026
|
+
emit({
|
|
12027
|
+
type: "error",
|
|
12028
|
+
code,
|
|
12029
|
+
scope: "vip.claim"
|
|
12030
|
+
});
|
|
12031
|
+
toast2.show(t(treatmentFor(code).body), "critical");
|
|
12032
|
+
}
|
|
12033
|
+
}, [api, emit, invite.invite_ref, t, toast2, token]);
|
|
12034
|
+
if (invite.hero && product.value === null) {
|
|
12035
|
+
return jsx(VipHero, {
|
|
12036
|
+
hero: invite.hero,
|
|
12037
|
+
onContinue: () => product.open("1")
|
|
12038
|
+
});
|
|
12039
|
+
}
|
|
12040
|
+
if (loaded.product) {
|
|
12041
|
+
return jsx(ProductDetail, {
|
|
12042
|
+
product: loaded.product,
|
|
12043
|
+
inventory: loaded.inventory,
|
|
12044
|
+
claim
|
|
12045
|
+
}, loaded.product.sku);
|
|
12046
|
+
}
|
|
12047
|
+
if (loaded.loading) return jsx(ScreenSkeleton, {
|
|
12048
|
+
tone: "light"
|
|
12049
|
+
});
|
|
12050
|
+
return jsx(ShopSurface, {
|
|
12051
|
+
tone: "light",
|
|
12052
|
+
fill: true,
|
|
12053
|
+
children: jsx(ErrorState, {
|
|
12054
|
+
code: loaded.error === "sku_not_found" ? void 0 : loaded.error
|
|
12055
|
+
})
|
|
12056
|
+
});
|
|
12057
|
+
}
|
|
11696
12058
|
const showcase = "_showcase_9ibf6_14";
|
|
11697
12059
|
const panel = "_panel_9ibf6_40";
|
|
11698
12060
|
const image = "_image_9ibf6_93";
|
|
@@ -12653,6 +13015,8 @@ export {
|
|
|
12653
13015
|
StickyCtaBar,
|
|
12654
13016
|
ToastProvider,
|
|
12655
13017
|
VariantSelector,
|
|
13018
|
+
VipHero,
|
|
13019
|
+
VipLandingView,
|
|
12656
13020
|
WhyUs,
|
|
12657
13021
|
asApiError,
|
|
12658
13022
|
codeOf,
|