@nok-integration/storefront-react 0.16.5 → 0.17.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 +198 -27
- package/dist/index.mjs +793 -339
- package/dist/standalone/storefront.mjs +793 -339
- package/dist/standalone/styles.css +956 -182
- package/dist/styles.css +956 -182
- package/package.json +1 -1
|
@@ -4680,6 +4680,19 @@ function requireOrders() {
|
|
|
4680
4680
|
/** Per-unit, for reconciliation and the credit note. We never recompute it. */
|
|
4681
4681
|
unit_price: money_1.Money,
|
|
4682
4682
|
line_total: money_1.Money,
|
|
4683
|
+
/**
|
|
4684
|
+
* What the line would have cost undiscounted, per unit. Display only.
|
|
4685
|
+
*
|
|
4686
|
+
* The order screens draw a struck-through price and a discount badge beside the price
|
|
4687
|
+
* paid, and this is the only place that figure can honestly come from. Our catalogue
|
|
4688
|
+
* holds a `compare_at` too, but a receipt read from the catalogue is a receipt that
|
|
4689
|
+
* changes when merchandising does; what the fan was shown at the moment they bought is
|
|
4690
|
+
* DAZN's to state, once, here.
|
|
4691
|
+
*
|
|
4692
|
+
* Optional, and absent means the line was sold at full price. A value equal to or below
|
|
4693
|
+
* `unit_price` is treated the same way rather than drawn as a saving of zero or less.
|
|
4694
|
+
*/
|
|
4695
|
+
compare_at_unit_price: money_1.Money.optional(),
|
|
4683
4696
|
/** Display name as DAZN sold it. Advisory: the picking list shows Odoo's own. */
|
|
4684
4697
|
title: zod_1.z.string().optional()
|
|
4685
4698
|
});
|
|
@@ -4700,6 +4713,18 @@ function requireOrders() {
|
|
|
4700
4713
|
items: money_1.Money,
|
|
4701
4714
|
shipping: money_1.Money,
|
|
4702
4715
|
tax: money_1.Money,
|
|
4716
|
+
/**
|
|
4717
|
+
* What came off, as a positive amount. Optional; absent means nothing did.
|
|
4718
|
+
*
|
|
4719
|
+
* Positive rather than signed, and the surfaces that draw it own the minus sign. A
|
|
4720
|
+
* signed field invites the reader to add it to a running total, and nothing here is a
|
|
4721
|
+
* running total: `grand_total` is what DAZN charged and is never derived from the parts.
|
|
4722
|
+
*
|
|
4723
|
+
* Kept out of `items` deliberately. The order screen lists a subtotal and a discount as
|
|
4724
|
+
* two rows because the fan is owed both figures, and folding the saving into the
|
|
4725
|
+
* subtotal loses the one they care about.
|
|
4726
|
+
*/
|
|
4727
|
+
discount: money_1.Money.optional(),
|
|
4703
4728
|
grand_total: money_1.Money
|
|
4704
4729
|
});
|
|
4705
4730
|
exports.OrderPaymentSummary = zod_1.z.object({
|
|
@@ -4827,6 +4852,14 @@ function requireOrderTracking() {
|
|
|
4827
4852
|
qty: zod_1.z.number().int().positive(),
|
|
4828
4853
|
unit_price: money_1.Money,
|
|
4829
4854
|
line_total: money_1.Money,
|
|
4855
|
+
/**
|
|
4856
|
+
* The undiscounted per-unit price, echoed from intake. Display only.
|
|
4857
|
+
*
|
|
4858
|
+
* Drawn as a struck-through price with a saving badge beside what was paid. Absent
|
|
4859
|
+
* means the line was sold at full price, which is the ordinary case; see `OrderLine`
|
|
4860
|
+
* for why this is DAZN's figure and not our catalogue's.
|
|
4861
|
+
*/
|
|
4862
|
+
compare_at_unit_price: money_1.Money.optional(),
|
|
4830
4863
|
title: zod_1.z.string().optional(),
|
|
4831
4864
|
image: common_1.Url.optional(),
|
|
4832
4865
|
/** Variant attributes, e.g. `{ size: 'M' }`. Same shape as everywhere else. */
|
|
@@ -4869,6 +4902,18 @@ function requireOrderTracking() {
|
|
|
4869
4902
|
order_ref: ids_1.OrderRef,
|
|
4870
4903
|
placed_at: common_1.Timestamp,
|
|
4871
4904
|
currency: money_1.Currency,
|
|
4905
|
+
/**
|
|
4906
|
+
* Where the order confirmation went, for the confirmation screen's "We've sent a
|
|
4907
|
+
* confirmation to ..." line. The address DAZN gave us at intake, echoed back.
|
|
4908
|
+
*
|
|
4909
|
+
* Returned only on the detail read, which is already scoped to the order's own owner,
|
|
4910
|
+
* and never on the list. It is PII: render it, and keep it out of logs and analytics
|
|
4911
|
+
* like every other address in this package.
|
|
4912
|
+
*
|
|
4913
|
+
* Optional because intake's is: a market whose carrier takes no email places orders
|
|
4914
|
+
* without one. Absent means the line is not drawn, never that a placeholder is.
|
|
4915
|
+
*/
|
|
4916
|
+
email: zod_1.z.string().email().optional(),
|
|
4872
4917
|
status: exports.OrderProgressStep,
|
|
4873
4918
|
headline: zod_1.z.string().min(1),
|
|
4874
4919
|
estimated_delivery: zod_1.z.object({ from: common_1.Timestamp, to: common_1.Timestamp }).optional(),
|
|
@@ -4908,6 +4953,54 @@ function requireStockAlerts() {
|
|
|
4908
4953
|
});
|
|
4909
4954
|
return stockAlerts;
|
|
4910
4955
|
}
|
|
4956
|
+
var support = {};
|
|
4957
|
+
var hasRequiredSupport;
|
|
4958
|
+
function requireSupport() {
|
|
4959
|
+
if (hasRequiredSupport) return support;
|
|
4960
|
+
hasRequiredSupport = 1;
|
|
4961
|
+
(function(exports) {
|
|
4962
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4963
|
+
exports.SupportAttachment = exports.SupportTicket = exports.SupportTicketRequest = exports.SupportCategory = void 0;
|
|
4964
|
+
const zod_1 = /* @__PURE__ */ requireZod();
|
|
4965
|
+
const common_1 = requireCommon();
|
|
4966
|
+
exports.SupportCategory = zod_1.z.string().trim().min(1).max(120);
|
|
4967
|
+
exports.SupportTicketRequest = zod_1.z.object({
|
|
4968
|
+
/**
|
|
4969
|
+
* Where the fan wants the reply. Pre-filled from the account in the design, and
|
|
4970
|
+
* editable — so this is a contact address, not proof of identity.
|
|
4971
|
+
*/
|
|
4972
|
+
email: zod_1.z.string().email().max(254),
|
|
4973
|
+
category: exports.SupportCategory,
|
|
4974
|
+
/**
|
|
4975
|
+
* The fan's own words. Bounded at 4000 characters because an unbounded text column
|
|
4976
|
+
* reachable from the open internet is a storage-exhaustion vector, not because CS
|
|
4977
|
+
* asked for a limit — they have not, and this is the one number here we chose. It is
|
|
4978
|
+
* roughly two pages, and it is configuration away from being different.
|
|
4979
|
+
*/
|
|
4980
|
+
description: zod_1.z.string().trim().min(1).max(4e3),
|
|
4981
|
+
/**
|
|
4982
|
+
* One attachment, as a URL — the shape CS specified.
|
|
4983
|
+
*
|
|
4984
|
+
* The URL is not free-form: it must be one the engine issued from
|
|
4985
|
+
* `POST /v1/support/attachments`. A ticket carrying an arbitrary address would have a
|
|
4986
|
+
* CS agent's browser fetch whatever a stranger typed, from inside DAZN's network, on
|
|
4987
|
+
* a page showing another customer's data.
|
|
4988
|
+
*/
|
|
4989
|
+
image_url: zod_1.z.string().url().max(2048).optional()
|
|
4990
|
+
}).strict();
|
|
4991
|
+
exports.SupportTicket = zod_1.z.object({
|
|
4992
|
+
reference: zod_1.z.string().min(1),
|
|
4993
|
+
category: exports.SupportCategory,
|
|
4994
|
+
created_at: common_1.Timestamp
|
|
4995
|
+
});
|
|
4996
|
+
exports.SupportAttachment = zod_1.z.object({
|
|
4997
|
+
url: zod_1.z.string().url(),
|
|
4998
|
+
content_type: zod_1.z.string().min(1),
|
|
4999
|
+
bytes: zod_1.z.number().int().positive()
|
|
5000
|
+
});
|
|
5001
|
+
})(support);
|
|
5002
|
+
return support;
|
|
5003
|
+
}
|
|
4911
5004
|
var errors = {};
|
|
4912
5005
|
var hasRequiredErrors;
|
|
4913
5006
|
function requireErrors() {
|
|
@@ -4938,6 +5031,11 @@ function requireErrors() {
|
|
|
4938
5031
|
// "this fan has an empty cart" are the same fact to a caller about to charge for it, and
|
|
4939
5032
|
// neither should be checked out. One answer, and it is not a success.
|
|
4940
5033
|
"cart_not_found",
|
|
5034
|
+
// A Help Center ticket reference the engine does not hold (ADR-0021). Distinct from
|
|
5035
|
+
// `invalid_request` because nothing about the request is malformed, and distinct from
|
|
5036
|
+
// `order_not_found` because saying "unknown order" about a support ticket sends whoever
|
|
5037
|
+
// reads it looking in the wrong table.
|
|
5038
|
+
"support_ticket_not_found",
|
|
4941
5039
|
// Admin/CMS (`/admin/v1`). The error OBJECT is shared infrastructure — one shape, one
|
|
4942
5040
|
// `code` vocabulary, one filter — so admin failures name themselves here rather than in
|
|
4943
5041
|
// a second enum. `forbidden` is authenticated-but-not-permitted, which `unauthorized`
|
|
@@ -4961,6 +5059,7 @@ function requireErrors() {
|
|
|
4961
5059
|
order_not_found: 404,
|
|
4962
5060
|
order_not_cancellable: 409,
|
|
4963
5061
|
cart_not_found: 404,
|
|
5062
|
+
support_ticket_not_found: 404,
|
|
4964
5063
|
forbidden: 403,
|
|
4965
5064
|
invalid_transition: 409,
|
|
4966
5065
|
rate_limited: 429,
|
|
@@ -4992,6 +5091,7 @@ function requireClient() {
|
|
|
4992
5091
|
const session_1 = requireSession();
|
|
4993
5092
|
const order_tracking_1 = requireOrderTracking();
|
|
4994
5093
|
const stock_alerts_1 = requireStockAlerts();
|
|
5094
|
+
const support_1 = requireSupport();
|
|
4995
5095
|
const errors_1 = requireErrors();
|
|
4996
5096
|
class DaznApiError extends Error {
|
|
4997
5097
|
status;
|
|
@@ -5054,6 +5154,33 @@ function requireClient() {
|
|
|
5054
5154
|
}
|
|
5055
5155
|
return config.schema.parse(await res.json());
|
|
5056
5156
|
}
|
|
5157
|
+
async function upload(path, file, schema) {
|
|
5158
|
+
const token = await options2.getToken?.();
|
|
5159
|
+
const headers = {
|
|
5160
|
+
accept: "application/json",
|
|
5161
|
+
...options2.defaultHeaders
|
|
5162
|
+
};
|
|
5163
|
+
if (token)
|
|
5164
|
+
headers["authorization"] = `Bearer ${token}`;
|
|
5165
|
+
const form = new FormData();
|
|
5166
|
+
form.append("file", file);
|
|
5167
|
+
const res = await doFetch(`${base}${path}`, {
|
|
5168
|
+
method: "POST",
|
|
5169
|
+
headers,
|
|
5170
|
+
credentials: options2.credentials ?? "include",
|
|
5171
|
+
body: form
|
|
5172
|
+
});
|
|
5173
|
+
if (!res.ok) {
|
|
5174
|
+
let parsed;
|
|
5175
|
+
try {
|
|
5176
|
+
parsed = errors_1.ErrorResponse.parse(await res.json());
|
|
5177
|
+
} catch {
|
|
5178
|
+
parsed = void 0;
|
|
5179
|
+
}
|
|
5180
|
+
throw new DaznApiError(res.status, parsed);
|
|
5181
|
+
}
|
|
5182
|
+
return schema.parse(await res.json());
|
|
5183
|
+
}
|
|
5057
5184
|
return {
|
|
5058
5185
|
catalog: {
|
|
5059
5186
|
listProducts: (query = {}) => request({
|
|
@@ -5147,6 +5274,22 @@ function requireClient() {
|
|
|
5147
5274
|
schema: order_tracking_1.OrderDetail
|
|
5148
5275
|
})
|
|
5149
5276
|
},
|
|
5277
|
+
/**
|
|
5278
|
+
* The Help Center form (ADR-0021). Session-scoped: the ticket is filed against the
|
|
5279
|
+
* fan already signed in, and there is no parameter that names a different one.
|
|
5280
|
+
*/
|
|
5281
|
+
support: {
|
|
5282
|
+
/**
|
|
5283
|
+
* Upload the one attachment and get the URL to put on the ticket.
|
|
5284
|
+
*
|
|
5285
|
+
* Call this first, then pass the returned `url` as `image_url`. Uploading nothing is
|
|
5286
|
+
* the normal case — the field is optional and the form's Send button does not wait
|
|
5287
|
+
* on it.
|
|
5288
|
+
*/
|
|
5289
|
+
uploadAttachment: (file) => upload("/support/attachments", file, support_1.SupportAttachment),
|
|
5290
|
+
/** File the ticket. Repeating an identical one within a few minutes returns the first. */
|
|
5291
|
+
createTicket: (body2) => request({ method: "POST", path: "/support/tickets", body: body2, schema: support_1.SupportTicket })
|
|
5292
|
+
},
|
|
5150
5293
|
auth: {
|
|
5151
5294
|
/** Exchange a single-use DAZN identity JWT for a session (sets the cookie). */
|
|
5152
5295
|
exchangeSession: (body2) => request({
|
|
@@ -5397,7 +5540,7 @@ const neutral$1 = "_neutral_1bagf_12";
|
|
|
5397
5540
|
const success$1 = "_success_1bagf_17";
|
|
5398
5541
|
const critical$1 = "_critical_1bagf_22";
|
|
5399
5542
|
const promo = "_promo_1bagf_27";
|
|
5400
|
-
const styles$
|
|
5543
|
+
const styles$I = {
|
|
5401
5544
|
badge: badge$4,
|
|
5402
5545
|
neutral: neutral$1,
|
|
5403
5546
|
success: success$1,
|
|
@@ -5405,25 +5548,23 @@ const styles$H = {
|
|
|
5405
5548
|
promo
|
|
5406
5549
|
};
|
|
5407
5550
|
function Badge({ tone = "neutral", children }) {
|
|
5408
|
-
return /* @__PURE__ */ jsx("span", { className: [styles$
|
|
5409
|
-
}
|
|
5410
|
-
const button$1 = "
|
|
5411
|
-
const fullWidth = "
|
|
5412
|
-
const primary = "
|
|
5413
|
-
const secondary = "
|
|
5414
|
-
const ghost = "
|
|
5415
|
-
const spinner = "
|
|
5416
|
-
const spin = "
|
|
5417
|
-
const
|
|
5418
|
-
const styles$G = {
|
|
5551
|
+
return /* @__PURE__ */ jsx("span", { className: [styles$I.badge, styles$I[tone]].join(" "), children });
|
|
5552
|
+
}
|
|
5553
|
+
const button$1 = "_button_tdhm8_1";
|
|
5554
|
+
const fullWidth = "_fullWidth_tdhm8_25";
|
|
5555
|
+
const primary = "_primary_tdhm8_29";
|
|
5556
|
+
const secondary = "_secondary_tdhm8_34";
|
|
5557
|
+
const ghost = "_ghost_tdhm8_40";
|
|
5558
|
+
const spinner = "_spinner_tdhm8_62";
|
|
5559
|
+
const spin = "_spin_tdhm8_62";
|
|
5560
|
+
const styles$H = {
|
|
5419
5561
|
button: button$1,
|
|
5420
5562
|
fullWidth,
|
|
5421
5563
|
primary,
|
|
5422
5564
|
secondary,
|
|
5423
5565
|
ghost,
|
|
5424
5566
|
spinner,
|
|
5425
|
-
spin
|
|
5426
|
-
labelLoading
|
|
5567
|
+
spin
|
|
5427
5568
|
};
|
|
5428
5569
|
const Button = forwardRef(function Button2({
|
|
5429
5570
|
variant = "primary",
|
|
@@ -5442,23 +5583,23 @@ const Button = forwardRef(function Button2({
|
|
|
5442
5583
|
ref,
|
|
5443
5584
|
type,
|
|
5444
5585
|
className: [
|
|
5445
|
-
styles$
|
|
5446
|
-
styles$
|
|
5447
|
-
fullWidth2 ? styles$
|
|
5586
|
+
styles$H.button,
|
|
5587
|
+
styles$H[variant],
|
|
5588
|
+
fullWidth2 ? styles$H.fullWidth : "",
|
|
5448
5589
|
className ?? ""
|
|
5449
5590
|
].filter(Boolean).join(" "),
|
|
5450
5591
|
disabled: isDisabled,
|
|
5451
5592
|
"aria-busy": loading || void 0,
|
|
5452
5593
|
...rest,
|
|
5453
5594
|
children: [
|
|
5454
|
-
loading && /* @__PURE__ */ jsx("span", { className: styles$
|
|
5455
|
-
/* @__PURE__ */ jsx("span", {
|
|
5595
|
+
loading && /* @__PURE__ */ jsx("span", { className: styles$H.spinner, "aria-hidden": "true" }),
|
|
5596
|
+
/* @__PURE__ */ jsx("span", { children })
|
|
5456
5597
|
]
|
|
5457
5598
|
}
|
|
5458
5599
|
);
|
|
5459
5600
|
});
|
|
5460
5601
|
const skeleton = "_skeleton_1nxz7_1";
|
|
5461
|
-
const styles$
|
|
5602
|
+
const styles$G = {
|
|
5462
5603
|
skeleton
|
|
5463
5604
|
};
|
|
5464
5605
|
function Skeleton({ width, height, radius, className, circle }) {
|
|
@@ -5471,14 +5612,14 @@ function Skeleton({ width, height, radius, className, circle }) {
|
|
|
5471
5612
|
"span",
|
|
5472
5613
|
{
|
|
5473
5614
|
"aria-hidden": "true",
|
|
5474
|
-
className: [styles$
|
|
5615
|
+
className: [styles$G.skeleton, className ?? ""].filter(Boolean).join(" "),
|
|
5475
5616
|
style
|
|
5476
5617
|
}
|
|
5477
5618
|
);
|
|
5478
5619
|
}
|
|
5479
5620
|
const surface$1 = "_surface_cfqo9_10";
|
|
5480
5621
|
const fill = "_fill_cfqo9_35";
|
|
5481
|
-
const styles$
|
|
5622
|
+
const styles$F = {
|
|
5482
5623
|
surface: surface$1,
|
|
5483
5624
|
fill
|
|
5484
5625
|
};
|
|
@@ -5519,7 +5660,7 @@ const ShopSurface = forwardRef(function ShopSurface2({ tone, fill: fill2 = false
|
|
|
5519
5660
|
...rest,
|
|
5520
5661
|
ref: attach,
|
|
5521
5662
|
"data-shop-theme": tone,
|
|
5522
|
-
className: [styles$
|
|
5663
|
+
className: [styles$F.surface, fill2 ? styles$F.fill : "", className ?? ""].filter(Boolean).join(" "),
|
|
5523
5664
|
children
|
|
5524
5665
|
}
|
|
5525
5666
|
);
|
|
@@ -5527,17 +5668,17 @@ const ShopSurface = forwardRef(function ShopSurface2({ tone, fill: fill2 = false
|
|
|
5527
5668
|
const root$6 = "_root_ney0g_1";
|
|
5528
5669
|
const inner = "_inner_ney0g_6";
|
|
5529
5670
|
const media$3 = "_media_ney0g_20";
|
|
5530
|
-
const lines$
|
|
5671
|
+
const lines$3 = "_lines_ney0g_32";
|
|
5531
5672
|
const lineWide = "_lineWide_ney0g_41";
|
|
5532
5673
|
const lineMid = "_lineMid_ney0g_45";
|
|
5533
5674
|
const lineNarrow = "_lineNarrow_ney0g_49";
|
|
5534
5675
|
const row$8 = "_row_ney0g_53";
|
|
5535
5676
|
const action$2 = "_action_ney0g_57";
|
|
5536
|
-
const styles$
|
|
5677
|
+
const styles$E = {
|
|
5537
5678
|
root: root$6,
|
|
5538
5679
|
inner,
|
|
5539
5680
|
media: media$3,
|
|
5540
|
-
lines: lines$
|
|
5681
|
+
lines: lines$3,
|
|
5541
5682
|
lineWide,
|
|
5542
5683
|
lineMid,
|
|
5543
5684
|
lineNarrow,
|
|
@@ -5545,34 +5686,34 @@ const styles$D = {
|
|
|
5545
5686
|
action: action$2
|
|
5546
5687
|
};
|
|
5547
5688
|
function ScreenSkeleton({ tone, shape = "media" }) {
|
|
5548
|
-
return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$
|
|
5549
|
-
/* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
5550
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
5551
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 22, className: styles$
|
|
5552
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$
|
|
5553
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$
|
|
5689
|
+
return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$E.root, children: /* @__PURE__ */ jsx("div", { className: styles$E.inner, role: "status", "aria-label": "Loading", children: shape === "media" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5690
|
+
/* @__PURE__ */ jsx(Skeleton, { className: styles$E.media }),
|
|
5691
|
+
/* @__PURE__ */ jsxs("div", { className: styles$E.lines, children: [
|
|
5692
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 22, className: styles$E.lineWide }),
|
|
5693
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$E.lineMid }),
|
|
5694
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$E.lineNarrow })
|
|
5554
5695
|
] }),
|
|
5555
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 48, radius: 8, className: styles$
|
|
5556
|
-
] }) : /* @__PURE__ */ jsx("div", { className: styles$
|
|
5696
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 48, radius: 8, className: styles$E.action })
|
|
5697
|
+
] }) : /* @__PURE__ */ jsx("div", { className: styles$E.lines, children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsx(Skeleton, { height: 72, className: styles$E.row }, i)) }) }) });
|
|
5557
5698
|
}
|
|
5558
5699
|
const root$5 = "_root_1u83t_1";
|
|
5559
5700
|
const icon$4 = "_icon_1u83t_10";
|
|
5560
|
-
const title$
|
|
5701
|
+
const title$j = "_title_1u83t_15";
|
|
5561
5702
|
const body$5 = "_body_1u83t_20";
|
|
5562
5703
|
const action$1 = "_action_1u83t_33";
|
|
5563
|
-
const styles$
|
|
5704
|
+
const styles$D = {
|
|
5564
5705
|
root: root$5,
|
|
5565
5706
|
icon: icon$4,
|
|
5566
|
-
title: title$
|
|
5707
|
+
title: title$j,
|
|
5567
5708
|
body: body$5,
|
|
5568
5709
|
action: action$1
|
|
5569
5710
|
};
|
|
5570
5711
|
function EmptyState({ title: title2, body: body2, action: action2, icon: icon2 }) {
|
|
5571
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5572
|
-
icon2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
5573
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
5574
|
-
body2 && /* @__PURE__ */ jsx("p", { className: styles$
|
|
5575
|
-
action2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
5712
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$D.root, role: "status", children: [
|
|
5713
|
+
icon2 && /* @__PURE__ */ jsx("div", { className: styles$D.icon, children: icon2 }),
|
|
5714
|
+
/* @__PURE__ */ jsx("h2", { className: styles$D.title, children: title2 }),
|
|
5715
|
+
body2 && /* @__PURE__ */ jsx("p", { className: styles$D.body, children: body2 }),
|
|
5716
|
+
action2 && /* @__PURE__ */ jsx("div", { className: styles$D.action, children: action2 })
|
|
5576
5717
|
] });
|
|
5577
5718
|
}
|
|
5578
5719
|
const TREATMENTS = {
|
|
@@ -5658,6 +5799,14 @@ const TREATMENTS = {
|
|
|
5658
5799
|
body: "We could not find that order.",
|
|
5659
5800
|
retriable: false
|
|
5660
5801
|
},
|
|
5802
|
+
support_ticket_not_found: {
|
|
5803
|
+
title: "Request not found",
|
|
5804
|
+
// "Request", not "ticket": the fan sent a message from the Help Center and has no
|
|
5805
|
+
// reason to know we filed it as a ticket anywhere. Not retriable, because the same
|
|
5806
|
+
// reference answers the same way every time.
|
|
5807
|
+
body: "We could not find that support request.",
|
|
5808
|
+
retriable: false
|
|
5809
|
+
},
|
|
5661
5810
|
order_not_cancellable: {
|
|
5662
5811
|
title: "Too late to change this",
|
|
5663
5812
|
body: "This order has already been despatched.",
|
|
@@ -5701,19 +5850,19 @@ function isDuplicateOrder(err) {
|
|
|
5701
5850
|
return codeOf(err) === "duplicate_order";
|
|
5702
5851
|
}
|
|
5703
5852
|
const root$4 = "_root_1lbpx_1";
|
|
5704
|
-
const title$
|
|
5853
|
+
const title$i = "_title_1lbpx_10";
|
|
5705
5854
|
const body$4 = "_body_1lbpx_15";
|
|
5706
|
-
const styles$
|
|
5855
|
+
const styles$C = {
|
|
5707
5856
|
root: root$4,
|
|
5708
|
-
title: title$
|
|
5857
|
+
title: title$i,
|
|
5709
5858
|
body: body$4
|
|
5710
5859
|
};
|
|
5711
5860
|
function ErrorState({ code, title: title2, body: body2, onRetry, retryLabel }) {
|
|
5712
5861
|
const treatment = treatmentFor(code);
|
|
5713
5862
|
const showRetry = Boolean(onRetry) && treatment.retriable;
|
|
5714
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5715
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
5716
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
5863
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$C.root, role: "alert", children: [
|
|
5864
|
+
/* @__PURE__ */ jsx("h2", { className: styles$C.title, children: title2 ?? treatment.title }),
|
|
5865
|
+
/* @__PURE__ */ jsx("p", { className: styles$C.body, children: body2 ?? treatment.body }),
|
|
5717
5866
|
showRetry && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, children: retryLabel ?? "Try again" })
|
|
5718
5867
|
] });
|
|
5719
5868
|
}
|
|
@@ -5738,20 +5887,24 @@ function StatusBadge({ status: status2 }) {
|
|
|
5738
5887
|
const label2 = STATUS_LABEL[status2] ?? status2;
|
|
5739
5888
|
return /* @__PURE__ */ jsx(Badge, { tone, children: label2 });
|
|
5740
5889
|
}
|
|
5741
|
-
const viewport = "
|
|
5742
|
-
const
|
|
5743
|
-
const
|
|
5744
|
-
const
|
|
5745
|
-
const
|
|
5746
|
-
const
|
|
5747
|
-
const
|
|
5748
|
-
const
|
|
5749
|
-
const
|
|
5750
|
-
const
|
|
5751
|
-
const
|
|
5752
|
-
const
|
|
5753
|
-
const
|
|
5890
|
+
const viewport = "_viewport_5aafz_14";
|
|
5891
|
+
const anchor = "_anchor_5aafz_41";
|
|
5892
|
+
const caret = "_caret_5aafz_59";
|
|
5893
|
+
const toast = "_toast_5aafz_82";
|
|
5894
|
+
const text$4 = "_text_5aafz_111";
|
|
5895
|
+
const message$1 = "_message_5aafz_120";
|
|
5896
|
+
const action = "_action_5aafz_133";
|
|
5897
|
+
const neutral = "_neutral_5aafz_158";
|
|
5898
|
+
const success = "_success_5aafz_163";
|
|
5899
|
+
const critical = "_critical_5aafz_168";
|
|
5900
|
+
const rich = "_rich_5aafz_183";
|
|
5901
|
+
const description = "_description_5aafz_198";
|
|
5902
|
+
const thumb$2 = "_thumb_5aafz_216";
|
|
5903
|
+
const thumbImage = "_thumbImage_5aafz_227";
|
|
5904
|
+
const styles$B = {
|
|
5754
5905
|
viewport,
|
|
5906
|
+
anchor,
|
|
5907
|
+
caret,
|
|
5755
5908
|
toast,
|
|
5756
5909
|
text: text$4,
|
|
5757
5910
|
message: message$1,
|
|
@@ -5761,10 +5914,14 @@ const styles$A = {
|
|
|
5761
5914
|
critical,
|
|
5762
5915
|
rich,
|
|
5763
5916
|
description,
|
|
5764
|
-
thumb: thumb$
|
|
5917
|
+
thumb: thumb$2,
|
|
5765
5918
|
thumbImage
|
|
5766
5919
|
};
|
|
5767
5920
|
const ToastContext = createContext(null);
|
|
5921
|
+
const CART_TRIGGER_SELECTOR = "[data-shop-cart-trigger]";
|
|
5922
|
+
const CARET_GAP = 32;
|
|
5923
|
+
const EDGE_GAP = 12;
|
|
5924
|
+
const CARET_MIN_INSET = 24;
|
|
5768
5925
|
function useToast() {
|
|
5769
5926
|
const ctx = useContext(ToastContext);
|
|
5770
5927
|
const emit = useShopOptional()?.emit;
|
|
@@ -5781,9 +5938,19 @@ function useToast() {
|
|
|
5781
5938
|
function normalise(toneOrOptions) {
|
|
5782
5939
|
return typeof toneOrOptions === "string" ? { tone: toneOrOptions } : toneOrOptions ?? {};
|
|
5783
5940
|
}
|
|
5941
|
+
function Caret() {
|
|
5942
|
+
return /* @__PURE__ */ jsx("svg", { width: "24", height: "10", viewBox: "0 0 24 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
5943
|
+
"path",
|
|
5944
|
+
{
|
|
5945
|
+
d: "M0 10L10.8906 0.280023C11.5624 -0.0933413 12.4376 -0.0933413 13.1094 0.280025L24 10H0Z",
|
|
5946
|
+
fill: "#080E12"
|
|
5947
|
+
}
|
|
5948
|
+
) });
|
|
5949
|
+
}
|
|
5784
5950
|
let nextId = 0;
|
|
5785
5951
|
function ToastProvider({ children }) {
|
|
5786
5952
|
const [toasts, setToasts] = useState([]);
|
|
5953
|
+
const viewportRef = useRef(null);
|
|
5787
5954
|
const dismiss = useCallback((id) => {
|
|
5788
5955
|
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
5789
5956
|
}, []);
|
|
@@ -5811,38 +5978,79 @@ function ToastProvider({ children }) {
|
|
|
5811
5978
|
},
|
|
5812
5979
|
[dismiss, hostOwnsNotifications, emit]
|
|
5813
5980
|
);
|
|
5981
|
+
useEffect(() => {
|
|
5982
|
+
const el = viewportRef.current;
|
|
5983
|
+
if (!el || toasts.length === 0) return;
|
|
5984
|
+
const measure = () => {
|
|
5985
|
+
const trigger = document.querySelector(CART_TRIGGER_SELECTOR);
|
|
5986
|
+
const icon2 = trigger ? trigger.getBoundingClientRect() : null;
|
|
5987
|
+
if (!icon2 || icon2.width === 0 || icon2.bottom <= 0 || icon2.top >= window.innerHeight) {
|
|
5988
|
+
el.style.setProperty("--toast-top", `${EDGE_GAP}px`);
|
|
5989
|
+
el.style.removeProperty("--toast-caret-right");
|
|
5990
|
+
return;
|
|
5991
|
+
}
|
|
5992
|
+
el.style.setProperty("--toast-top", `${Math.round(icon2.bottom + CARET_GAP)}px`);
|
|
5993
|
+
const card2 = el.firstElementChild;
|
|
5994
|
+
if (!card2) return;
|
|
5995
|
+
const box2 = card2.getBoundingClientRect();
|
|
5996
|
+
const centre = icon2.left + icon2.width / 2;
|
|
5997
|
+
const inset2 = Math.min(
|
|
5998
|
+
Math.max(box2.right - centre, CARET_MIN_INSET),
|
|
5999
|
+
Math.max(box2.width - CARET_MIN_INSET, CARET_MIN_INSET)
|
|
6000
|
+
);
|
|
6001
|
+
el.style.setProperty("--toast-caret-right", `${Math.round(inset2)}px`);
|
|
6002
|
+
};
|
|
6003
|
+
measure();
|
|
6004
|
+
window.addEventListener("resize", measure);
|
|
6005
|
+
window.addEventListener("orientationchange", measure);
|
|
6006
|
+
return () => {
|
|
6007
|
+
window.removeEventListener("resize", measure);
|
|
6008
|
+
window.removeEventListener("orientationchange", measure);
|
|
6009
|
+
};
|
|
6010
|
+
}, [toasts.length]);
|
|
5814
6011
|
const api = useMemo(() => ({ show }), [show]);
|
|
5815
6012
|
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: api, children: [
|
|
5816
6013
|
children,
|
|
5817
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6014
|
+
/* @__PURE__ */ jsx("div", { className: styles$B.viewport, ref: viewportRef, "aria-live": "polite", "aria-atomic": "false", children: toasts.map((t) => {
|
|
5818
6015
|
const rich2 = Boolean(t.description || t.image);
|
|
5819
|
-
return /* @__PURE__ */ jsxs(
|
|
5820
|
-
"
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
},
|
|
5839
|
-
children: t.
|
|
5840
|
-
}
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
6016
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$B.anchor, children: [
|
|
6017
|
+
t.anchor === "cart" && /* @__PURE__ */ jsx("span", { className: styles$B.caret, children: /* @__PURE__ */ jsx(Caret, {}) }),
|
|
6018
|
+
/* @__PURE__ */ jsxs(
|
|
6019
|
+
"div",
|
|
6020
|
+
{
|
|
6021
|
+
className: [styles$B.toast, rich2 ? styles$B.rich : styles$B[t.tone]].join(" "),
|
|
6022
|
+
role: "status",
|
|
6023
|
+
children: [
|
|
6024
|
+
t.image && /* @__PURE__ */ jsx("span", { className: styles$B.thumb, children: /* @__PURE__ */ jsx(
|
|
6025
|
+
ShopImage,
|
|
6026
|
+
{
|
|
6027
|
+
src: t.image,
|
|
6028
|
+
alt: "",
|
|
6029
|
+
fill: true,
|
|
6030
|
+
sizes: "40px",
|
|
6031
|
+
className: styles$B.thumbImage
|
|
6032
|
+
}
|
|
6033
|
+
) }),
|
|
6034
|
+
/* @__PURE__ */ jsxs("span", { className: styles$B.text, children: [
|
|
6035
|
+
/* @__PURE__ */ jsx("span", { className: styles$B.message, children: t.message }),
|
|
6036
|
+
t.description && /* @__PURE__ */ jsx("span", { className: styles$B.description, children: t.description })
|
|
6037
|
+
] }),
|
|
6038
|
+
t.action && /* @__PURE__ */ jsx(
|
|
6039
|
+
"button",
|
|
6040
|
+
{
|
|
6041
|
+
type: "button",
|
|
6042
|
+
className: styles$B.action,
|
|
6043
|
+
onClick: () => {
|
|
6044
|
+
t.action?.onAction();
|
|
6045
|
+
dismiss(t.id);
|
|
6046
|
+
},
|
|
6047
|
+
children: t.action.label
|
|
6048
|
+
}
|
|
6049
|
+
)
|
|
6050
|
+
]
|
|
6051
|
+
}
|
|
6052
|
+
)
|
|
6053
|
+
] }, t.id);
|
|
5846
6054
|
}) })
|
|
5847
6055
|
] });
|
|
5848
6056
|
}
|
|
@@ -5894,13 +6102,13 @@ function useLocale(override) {
|
|
|
5894
6102
|
}
|
|
5895
6103
|
const badge$3 = "_badge_156ya_2";
|
|
5896
6104
|
const icon$3 = "_icon_156ya_18";
|
|
5897
|
-
const styles$
|
|
6105
|
+
const styles$A = {
|
|
5898
6106
|
badge: badge$3,
|
|
5899
6107
|
icon: icon$3
|
|
5900
6108
|
};
|
|
5901
6109
|
function SaleBadge({ pct }) {
|
|
5902
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
5903
|
-
/* @__PURE__ */ jsxs("svg", { className: styles$
|
|
6110
|
+
return /* @__PURE__ */ jsxs("span", { className: styles$A.badge, children: [
|
|
6111
|
+
/* @__PURE__ */ jsxs("svg", { className: styles$A.icon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
5904
6112
|
/* @__PURE__ */ jsx(
|
|
5905
6113
|
"path",
|
|
5906
6114
|
{
|
|
@@ -5926,7 +6134,7 @@ const lg = "_lg_n3nm5_27";
|
|
|
5926
6134
|
const price$1 = "_price_n3nm5_31";
|
|
5927
6135
|
const compareAt = "_compareAt_n3nm5_36";
|
|
5928
6136
|
const strikethrough = "_strikethrough_n3nm5_44";
|
|
5929
|
-
const styles$
|
|
6137
|
+
const styles$z = {
|
|
5930
6138
|
root: root$3,
|
|
5931
6139
|
center: center$1,
|
|
5932
6140
|
end,
|
|
@@ -5948,9 +6156,9 @@ function PriceBlock({
|
|
|
5948
6156
|
const { format } = useMoney();
|
|
5949
6157
|
const pct = discountPct$1 ?? discountPct(price2, compareAt2);
|
|
5950
6158
|
const hasCompare = compareAt2 && compareAt2.amount > price2.amount;
|
|
5951
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
5952
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
5953
|
-
hasCompare && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6159
|
+
return /* @__PURE__ */ jsxs("div", { className: [styles$z.root, styles$z[size], styles$z[align], styles$z[variant]].join(" "), children: [
|
|
6160
|
+
/* @__PURE__ */ jsx("span", { className: styles$z.price, children: format(price2) }),
|
|
6161
|
+
hasCompare && /* @__PURE__ */ jsxs("span", { className: styles$z.compareAt, children: [
|
|
5954
6162
|
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: `Was ${format(compareAt2)}` }),
|
|
5955
6163
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: format(compareAt2) })
|
|
5956
6164
|
] }),
|
|
@@ -6045,23 +6253,23 @@ const SWATCH_HEX = {
|
|
|
6045
6253
|
function swatchColour(name) {
|
|
6046
6254
|
return SWATCH_HEX[name.toLowerCase().trim()] ?? "#c9cdd0";
|
|
6047
6255
|
}
|
|
6048
|
-
const timeline = "
|
|
6049
|
-
const row$7 = "
|
|
6050
|
-
const line$
|
|
6051
|
-
const marker = "
|
|
6052
|
-
const tick = "
|
|
6053
|
-
const pending$2 = "
|
|
6054
|
-
const connector = "
|
|
6055
|
-
const text$3 = "
|
|
6056
|
-
const label$1 = "
|
|
6057
|
-
const past = "
|
|
6058
|
-
const current = "
|
|
6059
|
-
const future = "
|
|
6060
|
-
const date$1 = "
|
|
6061
|
-
const styles$
|
|
6256
|
+
const timeline = "_timeline_1cum7_7";
|
|
6257
|
+
const row$7 = "_row_1cum7_15";
|
|
6258
|
+
const line$2 = "_line_1cum7_20";
|
|
6259
|
+
const marker = "_marker_1cum7_27";
|
|
6260
|
+
const tick = "_tick_1cum7_35";
|
|
6261
|
+
const pending$2 = "_pending_1cum7_44";
|
|
6262
|
+
const connector = "_connector_1cum7_68";
|
|
6263
|
+
const text$3 = "_text_1cum7_84";
|
|
6264
|
+
const label$1 = "_label_1cum7_101";
|
|
6265
|
+
const past = "_past_1cum7_113";
|
|
6266
|
+
const current = "_current_1cum7_118";
|
|
6267
|
+
const future = "_future_1cum7_133";
|
|
6268
|
+
const date$1 = "_date_1cum7_138";
|
|
6269
|
+
const styles$y = {
|
|
6062
6270
|
timeline,
|
|
6063
6271
|
row: row$7,
|
|
6064
|
-
line: line$
|
|
6272
|
+
line: line$2,
|
|
6065
6273
|
marker,
|
|
6066
6274
|
tick,
|
|
6067
6275
|
pending: pending$2,
|
|
@@ -6076,22 +6284,22 @@ const styles$x = {
|
|
|
6076
6284
|
function OrderTimeline({ progress: progress2, locale: localeProp }) {
|
|
6077
6285
|
const locale = useLocale(localeProp);
|
|
6078
6286
|
const currentIndex = progress2.findIndex((e) => e.current);
|
|
6079
|
-
return /* @__PURE__ */ jsx("ol", { className: styles$
|
|
6287
|
+
return /* @__PURE__ */ jsx("ol", { className: styles$y.timeline, children: progress2.map((entry, i) => {
|
|
6080
6288
|
const state = stateOf(entry, i, currentIndex);
|
|
6081
6289
|
return /* @__PURE__ */ jsxs(
|
|
6082
6290
|
"li",
|
|
6083
6291
|
{
|
|
6084
|
-
className: styles$
|
|
6292
|
+
className: styles$y.row,
|
|
6085
6293
|
"aria-current": entry.current ? "step" : void 0,
|
|
6086
6294
|
children: [
|
|
6087
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6088
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6089
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
6090
|
-
/* @__PURE__ */ jsx("span", { className: [styles$
|
|
6091
|
-
entry.at && /* @__PURE__ */ jsx("time", { className: styles$
|
|
6295
|
+
/* @__PURE__ */ jsxs("div", { className: styles$y.line, children: [
|
|
6296
|
+
/* @__PURE__ */ jsx("span", { className: styles$y.marker, children: state === "future" ? /* @__PURE__ */ jsx("span", { className: styles$y.pending, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(StepTick, { tone: state }) }),
|
|
6297
|
+
/* @__PURE__ */ jsxs("span", { className: styles$y.text, children: [
|
|
6298
|
+
/* @__PURE__ */ jsx("span", { className: [styles$y.label, styles$y[state]].join(" "), children: entry.label }),
|
|
6299
|
+
entry.at && /* @__PURE__ */ jsx("time", { className: styles$y.date, dateTime: entry.at, children: formatStepDate(entry.at, locale) })
|
|
6092
6300
|
] })
|
|
6093
6301
|
] }),
|
|
6094
|
-
i < progress2.length - 1 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6302
|
+
i < progress2.length - 1 && /* @__PURE__ */ jsx("span", { className: styles$y.connector, "aria-hidden": "true" })
|
|
6095
6303
|
]
|
|
6096
6304
|
},
|
|
6097
6305
|
entry.step
|
|
@@ -6107,7 +6315,7 @@ function StepTick({ tone }) {
|
|
|
6107
6315
|
return /* @__PURE__ */ jsxs(
|
|
6108
6316
|
"svg",
|
|
6109
6317
|
{
|
|
6110
|
-
className: styles$
|
|
6318
|
+
className: styles$y.tick,
|
|
6111
6319
|
width: "28",
|
|
6112
6320
|
height: "28",
|
|
6113
6321
|
viewBox: "0 0 28 28",
|
|
@@ -6140,15 +6348,17 @@ function formatStepDate(iso, locale) {
|
|
|
6140
6348
|
const dayMonth = date2.toLocaleDateString(locale, { day: "numeric", month: "short" });
|
|
6141
6349
|
return `${weekday}, ${dayMonth}`;
|
|
6142
6350
|
}
|
|
6143
|
-
const summary = "
|
|
6144
|
-
const row$6 = "
|
|
6145
|
-
const free = "
|
|
6146
|
-
const pending$1 = "
|
|
6147
|
-
const
|
|
6351
|
+
const summary = "_summary_1hsxt_2";
|
|
6352
|
+
const row$6 = "_row_1hsxt_16";
|
|
6353
|
+
const free = "_free_1hsxt_53";
|
|
6354
|
+
const pending$1 = "_pending_1hsxt_59";
|
|
6355
|
+
const discount = "_discount_1hsxt_69";
|
|
6356
|
+
const styles$x = {
|
|
6148
6357
|
summary,
|
|
6149
6358
|
row: row$6,
|
|
6150
6359
|
free,
|
|
6151
|
-
pending: pending$1
|
|
6360
|
+
pending: pending$1,
|
|
6361
|
+
discount
|
|
6152
6362
|
};
|
|
6153
6363
|
const CART_ROWS = [
|
|
6154
6364
|
{ label: "Subtotal", key: "subtotal" },
|
|
@@ -6160,49 +6370,56 @@ function OrderSummary({
|
|
|
6160
6370
|
pricing,
|
|
6161
6371
|
deferred = [],
|
|
6162
6372
|
hidden = [],
|
|
6163
|
-
rows = CART_ROWS
|
|
6373
|
+
rows = CART_ROWS,
|
|
6374
|
+
discount: discount2
|
|
6164
6375
|
}) {
|
|
6165
6376
|
const { format } = useMoney();
|
|
6166
6377
|
const isDeferred = (key) => deferred.includes(key);
|
|
6167
6378
|
const anyDeferred = deferred.length > 0;
|
|
6168
|
-
const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "total" || !anyDeferred);
|
|
6169
|
-
return /* @__PURE__ */ jsx("dl", { className: styles$
|
|
6379
|
+
const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "total" || !anyDeferred).filter((row2) => row2.key !== "discount" || discount2 !== void 0);
|
|
6380
|
+
return /* @__PURE__ */ jsx("dl", { className: styles$x.summary, children: visible.map(({ label: label2, key }) => {
|
|
6381
|
+
if (key === "discount" && discount2) {
|
|
6382
|
+
return /* @__PURE__ */ jsxs("div", { className: [styles$x.row, styles$x.discount].join(" "), children: [
|
|
6383
|
+
/* @__PURE__ */ jsx("dt", { children: label2 }),
|
|
6384
|
+
/* @__PURE__ */ jsx("dd", { children: `−${format(discount2)}` })
|
|
6385
|
+
] }, key);
|
|
6386
|
+
}
|
|
6170
6387
|
const pending2 = key !== "total" && isDeferred(key);
|
|
6171
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6388
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$x.row, children: [
|
|
6172
6389
|
/* @__PURE__ */ jsx("dt", { children: label2 }),
|
|
6173
|
-
/* @__PURE__ */ jsx("dd", { className: pending2 ? styles$
|
|
6390
|
+
/* @__PURE__ */ jsx("dd", { className: pending2 ? styles$x.pending : void 0, children: pending2 ? "Calculated at checkout" : renderValue(key, pricing, format) })
|
|
6174
6391
|
] }, key);
|
|
6175
6392
|
}) });
|
|
6176
6393
|
}
|
|
6177
6394
|
function renderValue(key, pricing, format) {
|
|
6178
6395
|
if (key === "shipping" && pricing.shipping.amount === 0) {
|
|
6179
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
6396
|
+
return /* @__PURE__ */ jsx("span", { className: styles$x.free, children: "Free" });
|
|
6180
6397
|
}
|
|
6181
|
-
return format(pricing[key]);
|
|
6398
|
+
return key === "discount" ? null : format(pricing[key]);
|
|
6182
6399
|
}
|
|
6183
|
-
const page$
|
|
6400
|
+
const page$3 = "_page_1eqkm_1";
|
|
6184
6401
|
const status = "_status_1eqkm_10";
|
|
6185
6402
|
const widget = "_widget_1eqkm_18";
|
|
6186
|
-
const title$
|
|
6187
|
-
const headline = "_headline_1eqkm_30";
|
|
6188
|
-
const subtitle$
|
|
6403
|
+
const title$h = "_title_1eqkm_24";
|
|
6404
|
+
const headline$1 = "_headline_1eqkm_30";
|
|
6405
|
+
const subtitle$4 = "_subtitle_1eqkm_37";
|
|
6189
6406
|
const dot$3 = "_dot_1eqkm_48";
|
|
6190
6407
|
const trackButton = "_trackButton_1eqkm_58";
|
|
6191
6408
|
const srOnly = "_srOnly_1eqkm_78";
|
|
6192
6409
|
const itemsCard = "_itemsCard_1eqkm_92";
|
|
6193
6410
|
const cardHeader = "_cardHeader_1eqkm_100";
|
|
6194
|
-
const cardTitle = "_cardTitle_1eqkm_108";
|
|
6411
|
+
const cardTitle$1 = "_cardTitle_1eqkm_108";
|
|
6195
6412
|
const count$1 = "_count_1eqkm_115";
|
|
6196
|
-
const lines$
|
|
6197
|
-
const line = "_line_1eqkm_130";
|
|
6198
|
-
const thumb = "_thumb_1eqkm_152";
|
|
6199
|
-
const image$
|
|
6200
|
-
const placeholder$
|
|
6201
|
-
const lineBody = "_lineBody_1eqkm_172";
|
|
6202
|
-
const lineText = "_lineText_1eqkm_180";
|
|
6203
|
-
const lineTitle = "_lineTitle_1eqkm_189";
|
|
6413
|
+
const lines$2 = "_lines_1eqkm_130";
|
|
6414
|
+
const line$1 = "_line_1eqkm_130";
|
|
6415
|
+
const thumb$1 = "_thumb_1eqkm_152";
|
|
6416
|
+
const image$9 = "_image_1eqkm_162";
|
|
6417
|
+
const placeholder$6 = "_placeholder_1eqkm_166";
|
|
6418
|
+
const lineBody$1 = "_lineBody_1eqkm_172";
|
|
6419
|
+
const lineText$1 = "_lineText_1eqkm_180";
|
|
6420
|
+
const lineTitle$1 = "_lineTitle_1eqkm_189";
|
|
6204
6421
|
const lineDetails = "_lineDetails_1eqkm_197";
|
|
6205
|
-
const linePrice = "_linePrice_1eqkm_205";
|
|
6422
|
+
const linePrice$1 = "_linePrice_1eqkm_205";
|
|
6206
6423
|
const details$1 = "_details_1eqkm_215";
|
|
6207
6424
|
const detailBlock = "_detailBlock_1eqkm_228";
|
|
6208
6425
|
const payment = "_payment_1eqkm_235";
|
|
@@ -6211,31 +6428,31 @@ const detailValue = "_detailValue_1eqkm_245";
|
|
|
6211
6428
|
const last4 = "_last4_1eqkm_256";
|
|
6212
6429
|
const brand = "_brand_1eqkm_262";
|
|
6213
6430
|
const divider$2 = "_divider_1eqkm_268";
|
|
6214
|
-
const summaryCard = "_summaryCard_1eqkm_275";
|
|
6215
|
-
const styles$
|
|
6216
|
-
page: page$
|
|
6431
|
+
const summaryCard$1 = "_summaryCard_1eqkm_275";
|
|
6432
|
+
const styles$w = {
|
|
6433
|
+
page: page$3,
|
|
6217
6434
|
status,
|
|
6218
6435
|
widget,
|
|
6219
|
-
title: title$
|
|
6220
|
-
headline,
|
|
6221
|
-
subtitle: subtitle$
|
|
6436
|
+
title: title$h,
|
|
6437
|
+
headline: headline$1,
|
|
6438
|
+
subtitle: subtitle$4,
|
|
6222
6439
|
dot: dot$3,
|
|
6223
6440
|
trackButton,
|
|
6224
6441
|
srOnly,
|
|
6225
6442
|
itemsCard,
|
|
6226
6443
|
cardHeader,
|
|
6227
|
-
cardTitle,
|
|
6444
|
+
cardTitle: cardTitle$1,
|
|
6228
6445
|
count: count$1,
|
|
6229
|
-
lines: lines$
|
|
6230
|
-
line,
|
|
6231
|
-
thumb,
|
|
6232
|
-
image: image$
|
|
6233
|
-
placeholder: placeholder$
|
|
6234
|
-
lineBody,
|
|
6235
|
-
lineText,
|
|
6236
|
-
lineTitle,
|
|
6446
|
+
lines: lines$2,
|
|
6447
|
+
line: line$1,
|
|
6448
|
+
thumb: thumb$1,
|
|
6449
|
+
image: image$9,
|
|
6450
|
+
placeholder: placeholder$6,
|
|
6451
|
+
lineBody: lineBody$1,
|
|
6452
|
+
lineText: lineText$1,
|
|
6453
|
+
lineTitle: lineTitle$1,
|
|
6237
6454
|
lineDetails,
|
|
6238
|
-
linePrice,
|
|
6455
|
+
linePrice: linePrice$1,
|
|
6239
6456
|
details: details$1,
|
|
6240
6457
|
detailBlock,
|
|
6241
6458
|
payment,
|
|
@@ -6244,9 +6461,9 @@ const styles$v = {
|
|
|
6244
6461
|
last4,
|
|
6245
6462
|
brand,
|
|
6246
6463
|
divider: divider$2,
|
|
6247
|
-
summaryCard
|
|
6464
|
+
summaryCard: summaryCard$1
|
|
6248
6465
|
};
|
|
6249
|
-
const SUMMARY_ROWS = [
|
|
6466
|
+
const SUMMARY_ROWS$1 = [
|
|
6250
6467
|
{ label: "Subtotal", key: "subtotal" },
|
|
6251
6468
|
{ label: "Tax", key: "tax" },
|
|
6252
6469
|
{ label: "Shipping", key: "shipping" },
|
|
@@ -6275,7 +6492,7 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6275
6492
|
void load();
|
|
6276
6493
|
}, [load]);
|
|
6277
6494
|
if (state === "loading") {
|
|
6278
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6495
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$w.page, children: [
|
|
6279
6496
|
/* @__PURE__ */ jsx(Skeleton, { height: 120, radius: 8 }),
|
|
6280
6497
|
/* @__PURE__ */ jsx(Skeleton, { height: 220, radius: 18 }),
|
|
6281
6498
|
/* @__PURE__ */ jsx(Skeleton, { height: 140, radius: 18 })
|
|
@@ -6284,46 +6501,46 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6284
6501
|
if (state === "error" || !order) {
|
|
6285
6502
|
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6286
6503
|
}
|
|
6287
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6288
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6289
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6290
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
6291
|
-
/* @__PURE__ */ jsxs("p", { className: styles$
|
|
6504
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$w.page, children: [
|
|
6505
|
+
/* @__PURE__ */ jsxs("section", { className: styles$w.status, "aria-label": "Delivery status", children: [
|
|
6506
|
+
/* @__PURE__ */ jsxs("div", { className: styles$w.title, children: [
|
|
6507
|
+
/* @__PURE__ */ jsx("h1", { className: styles$w.headline, children: order.headline }),
|
|
6508
|
+
/* @__PURE__ */ jsxs("p", { className: styles$w.subtitle, children: [
|
|
6292
6509
|
/* @__PURE__ */ jsx("span", { children: `Order #${shortRef$1(order.order_ref)}` }),
|
|
6293
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6510
|
+
/* @__PURE__ */ jsx("span", { className: styles$w.dot, "aria-hidden": "true" }),
|
|
6294
6511
|
/* @__PURE__ */ jsx("span", { children: `Placed ${formatPlaced$1(order.placed_at, locale)}` })
|
|
6295
6512
|
] })
|
|
6296
6513
|
] }),
|
|
6297
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6514
|
+
/* @__PURE__ */ jsxs("div", { className: styles$w.widget, children: [
|
|
6298
6515
|
/* @__PURE__ */ jsx(OrderTimeline, { progress: order.progress, locale }),
|
|
6299
6516
|
order.tracking?.url && /* @__PURE__ */ jsxs(
|
|
6300
6517
|
"a",
|
|
6301
6518
|
{
|
|
6302
|
-
className: styles$
|
|
6519
|
+
className: styles$w.trackButton,
|
|
6303
6520
|
href: order.tracking.url,
|
|
6304
6521
|
target: "_blank",
|
|
6305
6522
|
rel: "noopener noreferrer",
|
|
6306
6523
|
children: [
|
|
6307
6524
|
"Track order",
|
|
6308
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6525
|
+
/* @__PURE__ */ jsx("span", { className: styles$w.srOnly, children: ` (opens ${order.tracking.carrier} in a new tab)` })
|
|
6309
6526
|
]
|
|
6310
6527
|
}
|
|
6311
6528
|
)
|
|
6312
6529
|
] })
|
|
6313
6530
|
] }),
|
|
6314
6531
|
/* @__PURE__ */ jsx(ItemsCard, { order }),
|
|
6315
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6316
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6317
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6318
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
6532
|
+
/* @__PURE__ */ jsxs("section", { className: styles$w.details, "aria-label": "Delivery and payment", children: [
|
|
6533
|
+
/* @__PURE__ */ jsxs("div", { className: styles$w.detailBlock, children: [
|
|
6534
|
+
/* @__PURE__ */ jsx("h2", { className: styles$w.detailLabel, children: "Shipping address" }),
|
|
6535
|
+
/* @__PURE__ */ jsx("p", { className: styles$w.detailValue, children: formatAddress$1(order.ship_to) })
|
|
6319
6536
|
] }),
|
|
6320
6537
|
order.payment && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6321
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6322
|
-
/* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6323
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6324
|
-
/* @__PURE__ */ jsxs("p", { className: styles$
|
|
6325
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6326
|
-
order.payment.last4 && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6538
|
+
/* @__PURE__ */ jsx("div", { className: styles$w.divider, role: "presentation" }),
|
|
6539
|
+
/* @__PURE__ */ jsxs("div", { className: [styles$w.detailBlock, styles$w.payment].join(" "), children: [
|
|
6540
|
+
/* @__PURE__ */ jsx("h2", { className: styles$w.detailLabel, children: "Payment" }),
|
|
6541
|
+
/* @__PURE__ */ jsxs("p", { className: styles$w.detailValue, children: [
|
|
6542
|
+
/* @__PURE__ */ jsx("span", { className: styles$w.brand, children: order.payment.brand }),
|
|
6543
|
+
order.payment.last4 && /* @__PURE__ */ jsxs("span", { className: styles$w.last4, children: [
|
|
6327
6544
|
"•••• ",
|
|
6328
6545
|
order.payment.last4
|
|
6329
6546
|
] })
|
|
@@ -6331,36 +6548,36 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6331
6548
|
] })
|
|
6332
6549
|
] })
|
|
6333
6550
|
] }),
|
|
6334
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6335
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6336
|
-
/* @__PURE__ */ jsx(OrderSummary, { pricing: toPricing(order), rows: SUMMARY_ROWS })
|
|
6551
|
+
/* @__PURE__ */ jsxs("section", { className: styles$w.summaryCard, "aria-label": "Order summary", children: [
|
|
6552
|
+
/* @__PURE__ */ jsx("h2", { className: styles$w.cardTitle, children: "Order summary" }),
|
|
6553
|
+
/* @__PURE__ */ jsx(OrderSummary, { pricing: toPricing$1(order), rows: SUMMARY_ROWS$1 })
|
|
6337
6554
|
] })
|
|
6338
6555
|
] });
|
|
6339
6556
|
}
|
|
6340
6557
|
function ItemsCard({ order }) {
|
|
6341
6558
|
const { format } = useMoney();
|
|
6342
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
6343
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6344
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6345
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6559
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$w.itemsCard, "aria-label": "Items", children: [
|
|
6560
|
+
/* @__PURE__ */ jsxs("div", { className: styles$w.cardHeader, children: [
|
|
6561
|
+
/* @__PURE__ */ jsx("h2", { className: styles$w.cardTitle, children: "Items" }),
|
|
6562
|
+
/* @__PURE__ */ jsx("span", { className: styles$w.count, children: order.items.reduce((n, i) => n + i.qty, 0) })
|
|
6346
6563
|
] }),
|
|
6347
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
6348
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6349
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6350
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6351
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6352
|
-
detailsOf(item2).length > 0 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6564
|
+
/* @__PURE__ */ jsx("ul", { className: styles$w.lines, children: order.items.map((item2) => /* @__PURE__ */ jsxs("li", { className: styles$w.line, children: [
|
|
6565
|
+
/* @__PURE__ */ jsx("div", { className: styles$w.thumb, children: item2.image ? /* @__PURE__ */ jsx(ShopImage, { src: item2.image, alt: "", fill: true, sizes: "48px", className: styles$w.image }) : /* @__PURE__ */ jsx("div", { className: styles$w.placeholder, "aria-hidden": "true" }) }),
|
|
6566
|
+
/* @__PURE__ */ jsxs("div", { className: styles$w.lineBody, children: [
|
|
6567
|
+
/* @__PURE__ */ jsxs("div", { className: styles$w.lineText, children: [
|
|
6568
|
+
/* @__PURE__ */ jsx("span", { className: styles$w.lineTitle, children: item2.title ?? item2.sku }),
|
|
6569
|
+
detailsOf$1(item2).length > 0 && /* @__PURE__ */ jsx("span", { className: styles$w.lineDetails, children: detailsOf$1(item2).map((detail2) => /* @__PURE__ */ jsx("span", { children: detail2 }, detail2)) })
|
|
6353
6570
|
] }),
|
|
6354
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6571
|
+
/* @__PURE__ */ jsx("span", { className: styles$w.linePrice, children: format(item2.line_total) })
|
|
6355
6572
|
] })
|
|
6356
6573
|
] }, item2.line_ref)) })
|
|
6357
6574
|
] });
|
|
6358
6575
|
}
|
|
6359
|
-
function detailsOf(item2) {
|
|
6576
|
+
function detailsOf$1(item2) {
|
|
6360
6577
|
const pairs = variantPairs(item2.attributes).map((p) => `${p.label}: ${p.value}`);
|
|
6361
6578
|
return item2.qty > 1 ? [...pairs, `Qty: ${item2.qty}`] : pairs;
|
|
6362
6579
|
}
|
|
6363
|
-
function toPricing(order) {
|
|
6580
|
+
function toPricing$1(order) {
|
|
6364
6581
|
return {
|
|
6365
6582
|
subtotal: order.totals.items,
|
|
6366
6583
|
shipping: order.totals.shipping,
|
|
@@ -6378,6 +6595,164 @@ function formatPlaced$1(iso, locale) {
|
|
|
6378
6595
|
year: "numeric"
|
|
6379
6596
|
});
|
|
6380
6597
|
}
|
|
6598
|
+
function formatAddress$1(address) {
|
|
6599
|
+
return [address.line1, address.line2, address.postcode, address.city, address.country].filter(Boolean).join(", ");
|
|
6600
|
+
}
|
|
6601
|
+
const page$2 = "_page_8yxu9_6";
|
|
6602
|
+
const confirmed = "_confirmed_8yxu9_16";
|
|
6603
|
+
const title$g = "_title_8yxu9_22";
|
|
6604
|
+
const headline = "_headline_8yxu9_47";
|
|
6605
|
+
const subtitle$3 = "_subtitle_8yxu9_65";
|
|
6606
|
+
const lines$1 = "_lines_8yxu9_88";
|
|
6607
|
+
const line = "_line_8yxu9_88";
|
|
6608
|
+
const thumb = "_thumb_8yxu9_103";
|
|
6609
|
+
const image$8 = "_image_8yxu9_113";
|
|
6610
|
+
const placeholder$5 = "_placeholder_8yxu9_117";
|
|
6611
|
+
const lineBody = "_lineBody_8yxu9_122";
|
|
6612
|
+
const lineText = "_lineText_8yxu9_131";
|
|
6613
|
+
const lineTitle = "_lineTitle_8yxu9_141";
|
|
6614
|
+
const lineMeta = "_lineMeta_8yxu9_160";
|
|
6615
|
+
const linePrice = "_linePrice_8yxu9_175";
|
|
6616
|
+
const paid = "_paid_8yxu9_187";
|
|
6617
|
+
const was$1 = "_was_8yxu9_193";
|
|
6618
|
+
const card$2 = "_card_8yxu9_213";
|
|
6619
|
+
const cardTitle = "_cardTitle_8yxu9_221";
|
|
6620
|
+
const cardBody = "_cardBody_8yxu9_233";
|
|
6621
|
+
const summaryCard = "_summaryCard_8yxu9_205";
|
|
6622
|
+
const done = "_done_8yxu9_261";
|
|
6623
|
+
const styles$v = {
|
|
6624
|
+
page: page$2,
|
|
6625
|
+
confirmed,
|
|
6626
|
+
title: title$g,
|
|
6627
|
+
headline,
|
|
6628
|
+
subtitle: subtitle$3,
|
|
6629
|
+
lines: lines$1,
|
|
6630
|
+
line,
|
|
6631
|
+
thumb,
|
|
6632
|
+
image: image$8,
|
|
6633
|
+
placeholder: placeholder$5,
|
|
6634
|
+
lineBody,
|
|
6635
|
+
lineText,
|
|
6636
|
+
lineTitle,
|
|
6637
|
+
lineMeta,
|
|
6638
|
+
linePrice,
|
|
6639
|
+
paid,
|
|
6640
|
+
was: was$1,
|
|
6641
|
+
card: card$2,
|
|
6642
|
+
cardTitle,
|
|
6643
|
+
cardBody,
|
|
6644
|
+
summaryCard,
|
|
6645
|
+
done
|
|
6646
|
+
};
|
|
6647
|
+
const SUMMARY_ROWS = [
|
|
6648
|
+
{ label: "Subtotal", key: "subtotal" },
|
|
6649
|
+
{ label: "Discount", key: "discount" },
|
|
6650
|
+
{ label: "Shipping", key: "shipping" },
|
|
6651
|
+
{ label: "Total", key: "total" }
|
|
6652
|
+
];
|
|
6653
|
+
function OrderConfirmationView(props) {
|
|
6654
|
+
return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(OrderConfirmationContent, { ...props }) });
|
|
6655
|
+
}
|
|
6656
|
+
function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
|
|
6657
|
+
const { api } = useShop();
|
|
6658
|
+
const locale = useLocale(localeProp);
|
|
6659
|
+
const [order, setOrder] = useState(null);
|
|
6660
|
+
const [state, setState] = useState("loading");
|
|
6661
|
+
const [errorCode, setErrorCode] = useState(void 0);
|
|
6662
|
+
const load = useCallback(async () => {
|
|
6663
|
+
setState("loading");
|
|
6664
|
+
try {
|
|
6665
|
+
setOrder(await api.orders.get(orderRef));
|
|
6666
|
+
setState("ready");
|
|
6667
|
+
} catch (err) {
|
|
6668
|
+
setErrorCode(codeOf(err));
|
|
6669
|
+
setState("error");
|
|
6670
|
+
}
|
|
6671
|
+
}, [api, orderRef]);
|
|
6672
|
+
useEffect(() => {
|
|
6673
|
+
void load();
|
|
6674
|
+
}, [load]);
|
|
6675
|
+
if (state === "loading") {
|
|
6676
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$v.page, children: [
|
|
6677
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 140, radius: 8 }),
|
|
6678
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 72, radius: 8 }),
|
|
6679
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 120, radius: 18 }),
|
|
6680
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 240, radius: 18 })
|
|
6681
|
+
] });
|
|
6682
|
+
}
|
|
6683
|
+
if (state === "error" || !order) {
|
|
6684
|
+
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6685
|
+
}
|
|
6686
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$v.page, children: [
|
|
6687
|
+
/* @__PURE__ */ jsxs("section", { className: styles$v.confirmed, "aria-label": "Order confirmation", children: [
|
|
6688
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.title, children: [
|
|
6689
|
+
/* @__PURE__ */ jsx("h1", { className: styles$v.headline, children: "Your order is confirmed" }),
|
|
6690
|
+
order.email && /* @__PURE__ */ jsx("p", { className: styles$v.subtitle, children: `We’ve sent a confirmation to ${order.email}` })
|
|
6691
|
+
] }),
|
|
6692
|
+
/* @__PURE__ */ jsx(OrderTimeline, { progress: order.progress, locale })
|
|
6693
|
+
] }),
|
|
6694
|
+
/* @__PURE__ */ jsx("ul", { className: styles$v.lines, "aria-label": "Items", children: order.items.map((item2) => /* @__PURE__ */ jsx(ConfirmationLine, { item: item2 }, item2.line_ref)) }),
|
|
6695
|
+
/* @__PURE__ */ jsxs("section", { className: styles$v.card, "aria-label": "Shipping address", children: [
|
|
6696
|
+
/* @__PURE__ */ jsx("h2", { className: styles$v.cardTitle, children: "Shipping address" }),
|
|
6697
|
+
/* @__PURE__ */ jsx("p", { className: styles$v.cardBody, children: formatAddress(order.ship_to) })
|
|
6698
|
+
] }),
|
|
6699
|
+
/* @__PURE__ */ jsxs("section", { className: [styles$v.card, styles$v.summaryCard].join(" "), "aria-label": "Order summary", children: [
|
|
6700
|
+
/* @__PURE__ */ jsx("h2", { className: styles$v.cardTitle, children: "Order summary" }),
|
|
6701
|
+
/* @__PURE__ */ jsx(
|
|
6702
|
+
OrderSummary,
|
|
6703
|
+
{
|
|
6704
|
+
pricing: toPricing(order),
|
|
6705
|
+
rows: rowsFor(order),
|
|
6706
|
+
discount: order.totals.discount
|
|
6707
|
+
}
|
|
6708
|
+
)
|
|
6709
|
+
] }),
|
|
6710
|
+
onDone && /* @__PURE__ */ jsx(Button, { variant: "secondary", fullWidth: true, className: styles$v.done, onClick: onDone, children: "Done" })
|
|
6711
|
+
] });
|
|
6712
|
+
}
|
|
6713
|
+
function ConfirmationLine({ item: item2 }) {
|
|
6714
|
+
const { format } = useMoney();
|
|
6715
|
+
const compareAt2 = item2.compare_at_unit_price;
|
|
6716
|
+
const pct = compareAt2 ? discountPct(item2.unit_price, compareAt2) : void 0;
|
|
6717
|
+
const details2 = detailsOf(item2);
|
|
6718
|
+
return /* @__PURE__ */ jsxs("li", { className: styles$v.line, children: [
|
|
6719
|
+
/* @__PURE__ */ jsx("div", { className: styles$v.thumb, children: item2.image ? /* @__PURE__ */ jsx(ShopImage, { src: item2.image, alt: "", fill: true, sizes: "48px", className: styles$v.image }) : /* @__PURE__ */ jsx("div", { className: styles$v.placeholder, "aria-hidden": "true" }) }),
|
|
6720
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.lineBody, children: [
|
|
6721
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.lineText, children: [
|
|
6722
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.lineTitle, children: item2.title ?? item2.sku }),
|
|
6723
|
+
/* @__PURE__ */ jsxs("span", { className: styles$v.lineMeta, children: [
|
|
6724
|
+
details2.map((detail2) => /* @__PURE__ */ jsx("span", { children: detail2 }, detail2)),
|
|
6725
|
+
pct !== void 0 && /* @__PURE__ */ jsx(SaleBadge, { pct })
|
|
6726
|
+
] })
|
|
6727
|
+
] }),
|
|
6728
|
+
/* @__PURE__ */ jsxs("span", { className: styles$v.linePrice, children: [
|
|
6729
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.paid, children: format(item2.line_total) }),
|
|
6730
|
+
compareAt2 && /* @__PURE__ */ jsxs("span", { className: styles$v.was, children: [
|
|
6731
|
+
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: `Was ${format(compareAt2)}` }),
|
|
6732
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: format(compareAt2) })
|
|
6733
|
+
] })
|
|
6734
|
+
] })
|
|
6735
|
+
] })
|
|
6736
|
+
] });
|
|
6737
|
+
}
|
|
6738
|
+
function detailsOf(item2) {
|
|
6739
|
+
const pairs = variantPairs(item2.attributes).map((p) => `${p.label}: ${p.value}`);
|
|
6740
|
+
return item2.qty > 1 ? [...pairs, `Qty: ${item2.qty}`] : pairs;
|
|
6741
|
+
}
|
|
6742
|
+
function rowsFor(order) {
|
|
6743
|
+
if (order.totals.tax.amount === 0) return SUMMARY_ROWS;
|
|
6744
|
+
return SUMMARY_ROWS.flatMap(
|
|
6745
|
+
(row2) => row2.key === "shipping" ? [row2, { label: "Tax", key: "tax" }] : [row2]
|
|
6746
|
+
);
|
|
6747
|
+
}
|
|
6748
|
+
function toPricing(order) {
|
|
6749
|
+
return {
|
|
6750
|
+
subtotal: order.totals.items,
|
|
6751
|
+
shipping: order.totals.shipping,
|
|
6752
|
+
tax: order.totals.tax,
|
|
6753
|
+
total: order.totals.grand_total
|
|
6754
|
+
};
|
|
6755
|
+
}
|
|
6381
6756
|
function formatAddress(address) {
|
|
6382
6757
|
return [address.line1, address.line2, address.postcode, address.city, address.country].filter(Boolean).join(", ");
|
|
6383
6758
|
}
|
|
@@ -6417,7 +6792,7 @@ const card$1 = "_card_y686q_45";
|
|
|
6417
6792
|
const tappable = "_tappable_y686q_60";
|
|
6418
6793
|
const head$1 = "_head_y686q_69";
|
|
6419
6794
|
const heading = "_heading_y686q_77";
|
|
6420
|
-
const title$
|
|
6795
|
+
const title$f = "_title_y686q_86";
|
|
6421
6796
|
const date = "_date_y686q_97";
|
|
6422
6797
|
const bottom$1 = "_bottom_y686q_102";
|
|
6423
6798
|
const strip = "_strip_y686q_110";
|
|
@@ -6434,7 +6809,7 @@ const styles$t = {
|
|
|
6434
6809
|
tappable,
|
|
6435
6810
|
head: head$1,
|
|
6436
6811
|
heading,
|
|
6437
|
-
title: title$
|
|
6812
|
+
title: title$f,
|
|
6438
6813
|
date,
|
|
6439
6814
|
bottom: bottom$1,
|
|
6440
6815
|
strip,
|
|
@@ -6579,7 +6954,7 @@ const saleBadge$1 = "_saleBadge_1u9l8_56";
|
|
|
6579
6954
|
const oos$2 = "_oos_1u9l8_63";
|
|
6580
6955
|
const bottom = "_bottom_1u9l8_88";
|
|
6581
6956
|
const titlePrice$1 = "_titlePrice_1u9l8_1";
|
|
6582
|
-
const title$
|
|
6957
|
+
const title$e = "_title_1u9l8_1";
|
|
6583
6958
|
const swatches = "_swatches_1u9l8_119";
|
|
6584
6959
|
const swatch = "_swatch_1u9l8_119";
|
|
6585
6960
|
const swatchActive = "_swatchActive_1u9l8_132";
|
|
@@ -6595,7 +6970,7 @@ const styles$s = {
|
|
|
6595
6970
|
oos: oos$2,
|
|
6596
6971
|
bottom,
|
|
6597
6972
|
titlePrice: titlePrice$1,
|
|
6598
|
-
title: title$
|
|
6973
|
+
title: title$e,
|
|
6599
6974
|
swatches,
|
|
6600
6975
|
swatch,
|
|
6601
6976
|
swatchActive,
|
|
@@ -6760,7 +7135,7 @@ function ProductGrid({
|
|
|
6760
7135
|
}
|
|
6761
7136
|
const rail = "_rail_5z5e9_2";
|
|
6762
7137
|
const header$6 = "_header_5z5e9_9";
|
|
6763
|
-
const title$
|
|
7138
|
+
const title$d = "_title_5z5e9_16";
|
|
6764
7139
|
const seeAll = "_seeAll_5z5e9_22";
|
|
6765
7140
|
const track$3 = "_track_5z5e9_28";
|
|
6766
7141
|
const item = "_item_5z5e9_45";
|
|
@@ -6768,7 +7143,7 @@ const inset = "_inset_5z5e9_57";
|
|
|
6768
7143
|
const styles$p = {
|
|
6769
7144
|
rail,
|
|
6770
7145
|
header: header$6,
|
|
6771
|
-
title: title$
|
|
7146
|
+
title: title$d,
|
|
6772
7147
|
seeAll,
|
|
6773
7148
|
track: track$3,
|
|
6774
7149
|
item,
|
|
@@ -6835,7 +7210,7 @@ const sheet$2 = "_sheet_s4eai_16";
|
|
|
6835
7210
|
const grabArea = "_grabArea_s4eai_41";
|
|
6836
7211
|
const grabber$1 = "_grabber_s4eai_51";
|
|
6837
7212
|
const header$5 = "_header_s4eai_59";
|
|
6838
|
-
const title$
|
|
7213
|
+
const title$c = "_title_s4eai_67";
|
|
6839
7214
|
const close$2 = "_close_s4eai_71";
|
|
6840
7215
|
const body$3 = "_body_s4eai_84";
|
|
6841
7216
|
const footer = "_footer_s4eai_90";
|
|
@@ -6846,7 +7221,7 @@ const styles$o = {
|
|
|
6846
7221
|
grabArea,
|
|
6847
7222
|
grabber: grabber$1,
|
|
6848
7223
|
header: header$5,
|
|
6849
|
-
title: title$
|
|
7224
|
+
title: title$c,
|
|
6850
7225
|
close: close$2,
|
|
6851
7226
|
body: body$3,
|
|
6852
7227
|
footer
|
|
@@ -7026,7 +7401,7 @@ const oos$1 = "_oos_1xbbn_45";
|
|
|
7026
7401
|
const info$1 = "_info_1xbbn_58";
|
|
7027
7402
|
const head = "_head_1xbbn_66";
|
|
7028
7403
|
const meta = "_meta_1xbbn_73";
|
|
7029
|
-
const title$
|
|
7404
|
+
const title$b = "_title_1xbbn_80";
|
|
7030
7405
|
const details = "_details_1xbbn_92";
|
|
7031
7406
|
const detail = "_detail_1xbbn_92";
|
|
7032
7407
|
const price = "_price_1xbbn_106";
|
|
@@ -7043,7 +7418,7 @@ const styles$m = {
|
|
|
7043
7418
|
info: info$1,
|
|
7044
7419
|
head,
|
|
7045
7420
|
meta,
|
|
7046
|
-
title: title$
|
|
7421
|
+
title: title$b,
|
|
7047
7422
|
details,
|
|
7048
7423
|
detail,
|
|
7049
7424
|
price,
|
|
@@ -7153,15 +7528,15 @@ function ShippingInfo() {
|
|
|
7153
7528
|
}
|
|
7154
7529
|
)
|
|
7155
7530
|
] }),
|
|
7156
|
-
/* @__PURE__ */ jsx("p", { className: styles$l.label, children: "
|
|
7531
|
+
/* @__PURE__ */ jsx("p", { className: styles$l.label, children: "14 days returns" })
|
|
7157
7532
|
] })
|
|
7158
7533
|
] });
|
|
7159
7534
|
}
|
|
7160
|
-
const bar = "
|
|
7161
|
-
const floating$1 = "
|
|
7162
|
-
const divider = "
|
|
7163
|
-
const info = "
|
|
7164
|
-
const actions = "
|
|
7535
|
+
const bar = "_bar_xqpxa_1";
|
|
7536
|
+
const floating$1 = "_floating_xqpxa_31";
|
|
7537
|
+
const divider = "_divider_xqpxa_37";
|
|
7538
|
+
const info = "_info_xqpxa_41";
|
|
7539
|
+
const actions = "_actions_xqpxa_49";
|
|
7165
7540
|
const styles$k = {
|
|
7166
7541
|
bar,
|
|
7167
7542
|
floating: floating$1,
|
|
@@ -7481,7 +7856,7 @@ const scrim$3 = "_scrim_8wz6r_6";
|
|
|
7481
7856
|
const sheet$1 = "_sheet_8wz6r_17";
|
|
7482
7857
|
const grabber = "_grabber_8wz6r_29";
|
|
7483
7858
|
const header$4 = "_header_8wz6r_37";
|
|
7484
|
-
const title$
|
|
7859
|
+
const title$a = "_title_8wz6r_45";
|
|
7485
7860
|
const close$1 = "_close_8wz6r_51";
|
|
7486
7861
|
const tableWrap = "_tableWrap_8wz6r_71";
|
|
7487
7862
|
const table = "_table_8wz6r_71";
|
|
@@ -7491,7 +7866,7 @@ const styles$h = {
|
|
|
7491
7866
|
sheet: sheet$1,
|
|
7492
7867
|
grabber,
|
|
7493
7868
|
header: header$4,
|
|
7494
|
-
title: title$
|
|
7869
|
+
title: title$a,
|
|
7495
7870
|
close: close$1,
|
|
7496
7871
|
tableWrap,
|
|
7497
7872
|
table,
|
|
@@ -7556,7 +7931,7 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
7556
7931
|
}
|
|
7557
7932
|
const root$2 = "_root_9zj90_1";
|
|
7558
7933
|
const header$3 = "_header_9zj90_7";
|
|
7559
|
-
const title$
|
|
7934
|
+
const title$9 = "_title_9zj90_12";
|
|
7560
7935
|
const chips = "_chips_9zj90_20";
|
|
7561
7936
|
const chip = "_chip_9zj90_20";
|
|
7562
7937
|
const selected$2 = "_selected_9zj90_44";
|
|
@@ -7567,7 +7942,7 @@ const chevron$2 = "_chevron_9zj90_85";
|
|
|
7567
7942
|
const styles$g = {
|
|
7568
7943
|
root: root$2,
|
|
7569
7944
|
header: header$3,
|
|
7570
|
-
title: title$
|
|
7945
|
+
title: title$9,
|
|
7571
7946
|
chips,
|
|
7572
7947
|
chip,
|
|
7573
7948
|
selected: selected$2,
|
|
@@ -7647,7 +8022,7 @@ function SizeSelector({
|
|
|
7647
8022
|
}
|
|
7648
8023
|
const root$1 = "_root_1j4n8_1";
|
|
7649
8024
|
const header$2 = "_header_1j4n8_7";
|
|
7650
|
-
const title$
|
|
8025
|
+
const title$8 = "_title_1j4n8_14";
|
|
7651
8026
|
const value = "_value_1j4n8_19";
|
|
7652
8027
|
const tiles = "_tiles_1j4n8_24";
|
|
7653
8028
|
const tile = "_tile_1j4n8_24";
|
|
@@ -7660,7 +8035,7 @@ const stockBadge = "_stockBadge_1j4n8_91";
|
|
|
7660
8035
|
const styles$f = {
|
|
7661
8036
|
root: root$1,
|
|
7662
8037
|
header: header$2,
|
|
7663
|
-
title: title$
|
|
8038
|
+
title: title$8,
|
|
7664
8039
|
value,
|
|
7665
8040
|
tiles,
|
|
7666
8041
|
tile,
|
|
@@ -7762,7 +8137,7 @@ function VariantSelector({
|
|
|
7762
8137
|
}
|
|
7763
8138
|
const root = "_root_t4qba_2";
|
|
7764
8139
|
const group = "_group_t4qba_8";
|
|
7765
|
-
const title$
|
|
8140
|
+
const title$7 = "_title_t4qba_14";
|
|
7766
8141
|
const body$1 = "_body_t4qba_22";
|
|
7767
8142
|
const paragraph = "_paragraph_t4qba_26";
|
|
7768
8143
|
const clamped = "_clamped_t4qba_46";
|
|
@@ -7770,7 +8145,7 @@ const toggle = "_toggle_t4qba_51";
|
|
|
7770
8145
|
const styles$d = {
|
|
7771
8146
|
root,
|
|
7772
8147
|
group,
|
|
7773
|
-
title: title$
|
|
8148
|
+
title: title$7,
|
|
7774
8149
|
body: body$1,
|
|
7775
8150
|
paragraph,
|
|
7776
8151
|
clamped,
|
|
@@ -7860,7 +8235,7 @@ const content = "_content_1hv16_14";
|
|
|
7860
8235
|
const intro = "_intro_1hv16_21";
|
|
7861
8236
|
const productInfo = "_productInfo_1hv16_28";
|
|
7862
8237
|
const titlePrice = "_titlePrice_1hv16_34";
|
|
7863
|
-
const title$
|
|
8238
|
+
const title$6 = "_title_1hv16_34";
|
|
7864
8239
|
const availability = "_availability_1hv16_55";
|
|
7865
8240
|
const low = "_low_1hv16_62";
|
|
7866
8241
|
const oos = "_oos_1hv16_66";
|
|
@@ -7870,7 +8245,7 @@ const styles$a = {
|
|
|
7870
8245
|
intro,
|
|
7871
8246
|
productInfo,
|
|
7872
8247
|
titlePrice,
|
|
7873
|
-
title: title$
|
|
8248
|
+
title: title$6,
|
|
7874
8249
|
availability,
|
|
7875
8250
|
low,
|
|
7876
8251
|
oos
|
|
@@ -7906,6 +8281,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7906
8281
|
const [busy, setBusy] = useState(null);
|
|
7907
8282
|
const [sizeError, setSizeError] = useState(false);
|
|
7908
8283
|
const [reminded, setReminded] = useState([]);
|
|
8284
|
+
const [added, setAdded] = useState([]);
|
|
7909
8285
|
const sizeRef = useRef(null);
|
|
7910
8286
|
const colourRef = useRef(null);
|
|
7911
8287
|
const selectedSku = structured ? resolveSku(variants, selectedSize, selectedColour) : hasVariants ? genericSku : product.sku;
|
|
@@ -7930,15 +8306,15 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7930
8306
|
if (!selectedSku) return false;
|
|
7931
8307
|
try {
|
|
7932
8308
|
const cart2 = await api.cart.addItem({ sku: selectedSku, qty: 1 });
|
|
7933
|
-
const
|
|
8309
|
+
const added2 = variants.find((v) => v.sku === selectedSku);
|
|
7934
8310
|
emit({
|
|
7935
8311
|
type: "add_to_cart",
|
|
7936
8312
|
sku: selectedSku,
|
|
7937
8313
|
qty: 1,
|
|
7938
8314
|
title: product.title,
|
|
7939
|
-
size:
|
|
7940
|
-
attributes:
|
|
7941
|
-
image:
|
|
8315
|
+
size: added2?.attributes.size ?? selectedSize ?? void 0,
|
|
8316
|
+
attributes: added2?.attributes,
|
|
8317
|
+
image: added2?.image ?? product.media[0]
|
|
7942
8318
|
});
|
|
7943
8319
|
emit({
|
|
7944
8320
|
type: "cart_updated",
|
|
@@ -7995,24 +8371,61 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7995
8371
|
}
|
|
7996
8372
|
async function handleAdd() {
|
|
7997
8373
|
if (!ensureSelection()) return;
|
|
8374
|
+
const sku = selectedSku;
|
|
8375
|
+
if (!sku) return;
|
|
7998
8376
|
setBusy("add");
|
|
7999
8377
|
const ok = await add();
|
|
8000
8378
|
setBusy(null);
|
|
8001
8379
|
if (!ok) return;
|
|
8002
|
-
const
|
|
8003
|
-
const size =
|
|
8380
|
+
const variant = variants.find((v) => v.sku === sku);
|
|
8381
|
+
const size = variant?.attributes.size ?? selectedSize;
|
|
8382
|
+
setAdded((current2) => current2.includes(sku) ? current2 : [...current2, sku]);
|
|
8004
8383
|
toast2.show("Added to cart", {
|
|
8005
8384
|
description: [product.title, size && `Size ${size}`].filter(Boolean).join(" · "),
|
|
8006
|
-
image:
|
|
8385
|
+
image: variant?.image ?? product.media[0],
|
|
8007
8386
|
// Falls back to the /cart route where the sheet provider isn't mounted.
|
|
8008
|
-
action: cartSheet || navigate ? { label: "View cart", onAction: openCart } : void 0
|
|
8387
|
+
action: cartSheet || navigate ? { label: "View cart", onAction: openCart } : void 0,
|
|
8388
|
+
// Points the caret at the cart icon this just landed in.
|
|
8389
|
+
anchor: "cart"
|
|
8009
8390
|
});
|
|
8010
8391
|
}
|
|
8392
|
+
const inCart = selectedSku !== null && added.includes(selectedSku);
|
|
8011
8393
|
const selectedVariant = hasVariants ? variants.find((v) => v.sku === selectedSku) : void 0;
|
|
8012
8394
|
const available = selectedVariant?.available ?? inventory2?.available ?? 0;
|
|
8013
8395
|
const lowStock = available > 0 && available <= 5;
|
|
8014
8396
|
const stockNotice = !purchasable || lowStock;
|
|
8015
8397
|
const availabilityLabel = !purchasable ? "Out of stock" : lowStock ? `Only ${available} left` : "";
|
|
8398
|
+
const cta2 = purchasable ? (
|
|
8399
|
+
/*
|
|
8400
|
+
* Three labels, one button (5241:71382 / 5295:75115 / 5268:72907). "Adding to cart"
|
|
8401
|
+
* is the wait, and "Go to cart" is what the button becomes once the thing is in
|
|
8402
|
+
* there — it stays that way after the toast has gone, so the confirmation is not the
|
|
8403
|
+
* only trace of what happened.
|
|
8404
|
+
*
|
|
8405
|
+
* The added state changes what the button DOES, not just what it says. A second
|
|
8406
|
+
* press would otherwise add a second one, which is not what a fan reading "Go to
|
|
8407
|
+
* cart" is agreeing to.
|
|
8408
|
+
*/
|
|
8409
|
+
/* @__PURE__ */ jsx(
|
|
8410
|
+
Button,
|
|
8411
|
+
{
|
|
8412
|
+
variant: "primary",
|
|
8413
|
+
onClick: inCart ? openCart : handleAdd,
|
|
8414
|
+
loading: busy === "add",
|
|
8415
|
+
disabled: busy !== null,
|
|
8416
|
+
children: busy === "add" ? "Adding to cart" : inCart ? "Go to cart" : "Add to cart"
|
|
8417
|
+
}
|
|
8418
|
+
)
|
|
8419
|
+
) : /* @__PURE__ */ jsx(
|
|
8420
|
+
Button,
|
|
8421
|
+
{
|
|
8422
|
+
variant: "primary",
|
|
8423
|
+
onClick: handleRemind,
|
|
8424
|
+
loading: busy === "remind",
|
|
8425
|
+
disabled: alerted || busy !== null,
|
|
8426
|
+
children: alerted ? "We'll remind you" : "Remind me when available"
|
|
8427
|
+
}
|
|
8428
|
+
);
|
|
8016
8429
|
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "light", fill: true, className: styles$a.page, children: [
|
|
8017
8430
|
/* @__PURE__ */ jsx(MediaGallery, { media: media2, alt: product.title }),
|
|
8018
8431
|
/* @__PURE__ */ jsxs("div", { className: styles$a.content, children: [
|
|
@@ -8043,7 +8456,14 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
8043
8456
|
children: availabilityLabel
|
|
8044
8457
|
}
|
|
8045
8458
|
),
|
|
8046
|
-
|
|
8459
|
+
hasColours && /* @__PURE__ */ jsx("div", { ref: colourRef, children: /* @__PURE__ */ jsx(
|
|
8460
|
+
ColorSelector,
|
|
8461
|
+
{
|
|
8462
|
+
colours,
|
|
8463
|
+
selected: selectedColour,
|
|
8464
|
+
onSelect: setSelectedColour
|
|
8465
|
+
}
|
|
8466
|
+
) }),
|
|
8047
8467
|
hasSizes && /* @__PURE__ */ jsx("div", { ref: sizeRef, children: /* @__PURE__ */ jsx(
|
|
8048
8468
|
SizeSelector,
|
|
8049
8469
|
{
|
|
@@ -8054,59 +8474,34 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
8054
8474
|
guide: product.size_guide
|
|
8055
8475
|
}
|
|
8056
8476
|
) }),
|
|
8057
|
-
hasColours && /* @__PURE__ */ jsx("div", { ref: colourRef, children: /* @__PURE__ */ jsx(
|
|
8058
|
-
ColorSelector,
|
|
8059
|
-
{
|
|
8060
|
-
colours,
|
|
8061
|
-
selected: selectedColour,
|
|
8062
|
-
onSelect: setSelectedColour
|
|
8063
|
-
}
|
|
8064
|
-
) }),
|
|
8065
8477
|
hasVariants && !structured && /* @__PURE__ */ jsx(VariantSelector, { variants, selectedSku: genericSku, onSelect: setGenericSku }),
|
|
8066
8478
|
/* @__PURE__ */ jsx(ShippingInfo, {}),
|
|
8479
|
+
product.description && /* @__PURE__ */ jsx(ProductDetails, { description: product.description }),
|
|
8067
8480
|
/* @__PURE__ */ jsx(
|
|
8068
8481
|
RailCarousel,
|
|
8069
8482
|
{
|
|
8070
|
-
title: "You may like
|
|
8483
|
+
title: "You may also like",
|
|
8071
8484
|
products: recommendations.filter((p) => p.sku !== product.sku),
|
|
8072
8485
|
inset: true
|
|
8073
8486
|
}
|
|
8074
8487
|
)
|
|
8075
8488
|
] }),
|
|
8076
|
-
/* @__PURE__ */ jsx(StickyCtaBar, { children:
|
|
8077
|
-
Button,
|
|
8078
|
-
{
|
|
8079
|
-
variant: "primary",
|
|
8080
|
-
onClick: handleAdd,
|
|
8081
|
-
loading: busy === "add",
|
|
8082
|
-
disabled: busy !== null,
|
|
8083
|
-
children: "Add to cart"
|
|
8084
|
-
}
|
|
8085
|
-
) : /* @__PURE__ */ jsx(
|
|
8086
|
-
Button,
|
|
8087
|
-
{
|
|
8088
|
-
variant: "primary",
|
|
8089
|
-
onClick: handleRemind,
|
|
8090
|
-
loading: busy === "remind",
|
|
8091
|
-
disabled: alerted || busy !== null,
|
|
8092
|
-
children: alerted ? "We'll remind you" : "Remind me when available"
|
|
8093
|
-
}
|
|
8094
|
-
) })
|
|
8489
|
+
/* @__PURE__ */ jsx(StickyCtaBar, { children: cta2 })
|
|
8095
8490
|
] });
|
|
8096
8491
|
}
|
|
8097
|
-
const hero$1 = "
|
|
8098
|
-
const image$2 = "
|
|
8099
|
-
const scrim$1 = "
|
|
8100
|
-
const text$2 = "
|
|
8101
|
-
const title$
|
|
8102
|
-
const subtitle$2 = "
|
|
8103
|
-
const noImage = "
|
|
8492
|
+
const hero$1 = "_hero_pi6qp_10";
|
|
8493
|
+
const image$2 = "_image_pi6qp_37";
|
|
8494
|
+
const scrim$1 = "_scrim_pi6qp_51";
|
|
8495
|
+
const text$2 = "_text_pi6qp_57";
|
|
8496
|
+
const title$5 = "_title_pi6qp_79";
|
|
8497
|
+
const subtitle$2 = "_subtitle_pi6qp_90";
|
|
8498
|
+
const noImage = "_noImage_pi6qp_105";
|
|
8104
8499
|
const styles$9 = {
|
|
8105
8500
|
hero: hero$1,
|
|
8106
8501
|
image: image$2,
|
|
8107
8502
|
scrim: scrim$1,
|
|
8108
8503
|
text: text$2,
|
|
8109
|
-
title: title$
|
|
8504
|
+
title: title$5,
|
|
8110
8505
|
subtitle: subtitle$2,
|
|
8111
8506
|
noImage
|
|
8112
8507
|
};
|
|
@@ -8237,12 +8632,12 @@ function ReviewCarousel({ quotes, disclaimer: disclaimer2 }) {
|
|
|
8237
8632
|
}
|
|
8238
8633
|
const section$1 = "_section_145t0_1";
|
|
8239
8634
|
const row$2 = "_row_145t0_9";
|
|
8240
|
-
const title$
|
|
8635
|
+
const title$4 = "_title_145t0_21";
|
|
8241
8636
|
const body = "_body_145t0_29";
|
|
8242
8637
|
const styles$5 = {
|
|
8243
8638
|
section: section$1,
|
|
8244
8639
|
row: row$2,
|
|
8245
|
-
title: title$
|
|
8640
|
+
title: title$4,
|
|
8246
8641
|
body
|
|
8247
8642
|
};
|
|
8248
8643
|
function WhyUs({ items: items2 }) {
|
|
@@ -8252,12 +8647,12 @@ function WhyUs({ items: items2 }) {
|
|
|
8252
8647
|
] }, i)) });
|
|
8253
8648
|
}
|
|
8254
8649
|
const section = "_section_opjfc_1";
|
|
8255
|
-
const title$
|
|
8650
|
+
const title$3 = "_title_opjfc_8";
|
|
8256
8651
|
const list$1 = "_list_opjfc_15";
|
|
8257
8652
|
const row$1 = "_row_opjfc_26";
|
|
8258
8653
|
const styles$4 = {
|
|
8259
8654
|
section,
|
|
8260
|
-
title: title$
|
|
8655
|
+
title: title$3,
|
|
8261
8656
|
list: list$1,
|
|
8262
8657
|
row: row$1
|
|
8263
8658
|
};
|
|
@@ -8399,24 +8794,24 @@ function ProductView({
|
|
|
8399
8794
|
}
|
|
8400
8795
|
return unavailable;
|
|
8401
8796
|
}
|
|
8402
|
-
const showcase = "
|
|
8403
|
-
const panel = "
|
|
8404
|
-
const image = "
|
|
8405
|
-
const heroImageBox = "
|
|
8406
|
-
const hero = "
|
|
8407
|
-
const heroContent = "
|
|
8408
|
-
const heroText = "
|
|
8409
|
-
const logo = "
|
|
8410
|
-
const heroTitle = "
|
|
8411
|
-
const heroSub = "
|
|
8412
|
-
const swipe = "
|
|
8413
|
-
const swipeLabel = "
|
|
8414
|
-
const chevron$1 = "
|
|
8415
|
-
const overlay$1 = "
|
|
8416
|
-
const copy = "
|
|
8417
|
-
const title$
|
|
8418
|
-
const subtitle$1 = "
|
|
8419
|
-
const cta = "
|
|
8797
|
+
const showcase = "_showcase_1sarz_31";
|
|
8798
|
+
const panel = "_panel_1sarz_50";
|
|
8799
|
+
const image = "_image_1sarz_60";
|
|
8800
|
+
const heroImageBox = "_heroImageBox_1sarz_108";
|
|
8801
|
+
const hero = "_hero_1sarz_108";
|
|
8802
|
+
const heroContent = "_heroContent_1sarz_179";
|
|
8803
|
+
const heroText = "_heroText_1sarz_196";
|
|
8804
|
+
const logo = "_logo_1sarz_205";
|
|
8805
|
+
const heroTitle = "_heroTitle_1sarz_225";
|
|
8806
|
+
const heroSub = "_heroSub_1sarz_249";
|
|
8807
|
+
const swipe = "_swipe_1sarz_262";
|
|
8808
|
+
const swipeLabel = "_swipeLabel_1sarz_270";
|
|
8809
|
+
const chevron$1 = "_chevron_1sarz_276";
|
|
8810
|
+
const overlay$1 = "_overlay_1sarz_293";
|
|
8811
|
+
const copy = "_copy_1sarz_304";
|
|
8812
|
+
const title$2 = "_title_1sarz_309";
|
|
8813
|
+
const subtitle$1 = "_subtitle_1sarz_316";
|
|
8814
|
+
const cta = "_cta_1sarz_322";
|
|
8420
8815
|
const styles$2 = {
|
|
8421
8816
|
showcase,
|
|
8422
8817
|
panel,
|
|
@@ -8433,7 +8828,7 @@ const styles$2 = {
|
|
|
8433
8828
|
chevron: chevron$1,
|
|
8434
8829
|
overlay: overlay$1,
|
|
8435
8830
|
copy,
|
|
8436
|
-
title: title$
|
|
8831
|
+
title: title$2,
|
|
8437
8832
|
subtitle: subtitle$1,
|
|
8438
8833
|
cta
|
|
8439
8834
|
};
|
|
@@ -8590,9 +8985,19 @@ function HomeShowcase() {
|
|
|
8590
8985
|
function CartTrigger({ className, children, ...rest }) {
|
|
8591
8986
|
const sheet2 = useCartSheet();
|
|
8592
8987
|
if (!sheet2) {
|
|
8593
|
-
return /* @__PURE__ */ jsx(ShopLink, { to: "/cart", className, ...rest, children });
|
|
8988
|
+
return /* @__PURE__ */ jsx(ShopLink, { to: "/cart", className, "data-shop-cart-trigger": "", ...rest, children });
|
|
8594
8989
|
}
|
|
8595
|
-
return /* @__PURE__ */ jsx(
|
|
8990
|
+
return /* @__PURE__ */ jsx(
|
|
8991
|
+
"button",
|
|
8992
|
+
{
|
|
8993
|
+
type: "button",
|
|
8994
|
+
className,
|
|
8995
|
+
"data-shop-cart-trigger": "",
|
|
8996
|
+
onClick: sheet2.open,
|
|
8997
|
+
...rest,
|
|
8998
|
+
children
|
|
8999
|
+
}
|
|
9000
|
+
);
|
|
8596
9001
|
}
|
|
8597
9002
|
function IdentityGate({ returnTo }) {
|
|
8598
9003
|
const emit = useShopEvent();
|
|
@@ -8630,21 +9035,29 @@ function useCartCount() {
|
|
|
8630
9035
|
}, [subscribe]);
|
|
8631
9036
|
return count2;
|
|
8632
9037
|
}
|
|
8633
|
-
const header$1 = "
|
|
8634
|
-
const floating = "
|
|
8635
|
-
const
|
|
8636
|
-
const
|
|
8637
|
-
const
|
|
8638
|
-
const
|
|
8639
|
-
const
|
|
9038
|
+
const header$1 = "_header_oq0bd_25";
|
|
9039
|
+
const floating = "_floating_oq0bd_44";
|
|
9040
|
+
const scrolled = "_scrolled_oq0bd_87";
|
|
9041
|
+
const title$1 = "_title_oq0bd_161";
|
|
9042
|
+
const right = "_right_oq0bd_174";
|
|
9043
|
+
const spacer = "_spacer_oq0bd_187";
|
|
9044
|
+
const iconBtn = "_iconBtn_oq0bd_192";
|
|
9045
|
+
const menuBtn = "_menuBtn_oq0bd_219";
|
|
9046
|
+
const badge = "_badge_oq0bd_247";
|
|
9047
|
+
const closeSlot = "_closeSlot_oq0bd_274";
|
|
9048
|
+
const centred = "_centred_oq0bd_289";
|
|
8640
9049
|
const styles$1 = {
|
|
8641
9050
|
header: header$1,
|
|
8642
9051
|
floating,
|
|
9052
|
+
scrolled,
|
|
9053
|
+
title: title$1,
|
|
8643
9054
|
right,
|
|
8644
9055
|
spacer,
|
|
8645
9056
|
iconBtn,
|
|
8646
9057
|
menuBtn,
|
|
8647
|
-
badge
|
|
9058
|
+
badge,
|
|
9059
|
+
closeSlot,
|
|
9060
|
+
centred
|
|
8648
9061
|
};
|
|
8649
9062
|
function ChevronLeft() {
|
|
8650
9063
|
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(6.48 2.988)", children: /* @__PURE__ */ jsx(
|
|
@@ -8680,20 +9093,79 @@ function MenuIcon() {
|
|
|
8680
9093
|
}
|
|
8681
9094
|
) }) });
|
|
8682
9095
|
}
|
|
8683
|
-
function
|
|
9096
|
+
function useScrolledUnder(enabled) {
|
|
9097
|
+
const [scrolled2, setScrolled] = useState(false);
|
|
9098
|
+
useEffect(() => {
|
|
9099
|
+
if (!enabled) return;
|
|
9100
|
+
const read = (event) => {
|
|
9101
|
+
const target = event?.target;
|
|
9102
|
+
const top = target && target !== document && target instanceof HTMLElement ? target.scrollTop : window.scrollY || document.documentElement.scrollTop;
|
|
9103
|
+
setScrolled(top > 0);
|
|
9104
|
+
};
|
|
9105
|
+
read();
|
|
9106
|
+
document.addEventListener("scroll", read, { capture: true, passive: true });
|
|
9107
|
+
return () => document.removeEventListener("scroll", read, { capture: true });
|
|
9108
|
+
}, [enabled]);
|
|
9109
|
+
return enabled ? scrolled2 : false;
|
|
9110
|
+
}
|
|
9111
|
+
function CloseMedium() {
|
|
9112
|
+
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(5.03 5.03)", children: /* @__PURE__ */ jsx(
|
|
9113
|
+
"path",
|
|
9114
|
+
{
|
|
9115
|
+
d: "M12.233 0.292847C12.6235 -0.0975851 13.2566 -0.0976464 13.6471 0.292847C14.0375 0.683347 14.0375 1.3164 13.6471 1.70691L8.38437 6.9696L13.6471 12.2323C14.0376 12.6228 14.0376 13.2558 13.6471 13.6464C13.2565 14.0369 12.6235 14.0369 12.233 13.6464L6.96933 8.38367L1.70761 13.6464C1.31711 14.0369 0.684078 14.0368 0.293548 13.6464C-0.0969764 13.2558 -0.0969764 12.6228 0.293548 12.2323L5.55527 6.9696L0.292571 1.70691C-0.0976189 1.31653 -0.0974286 0.683349 0.292571 0.292847C0.683065 -0.0976464 1.31708 -0.0975851 1.70761 0.292847L6.97031 5.55554L12.233 0.292847Z",
|
|
9116
|
+
fill: "currentColor"
|
|
9117
|
+
}
|
|
9118
|
+
) }) });
|
|
9119
|
+
}
|
|
9120
|
+
function ShopHeader(props) {
|
|
9121
|
+
return props.context === "checkout" ? /* @__PURE__ */ jsx(CheckoutBar, { ...props }) : /* @__PURE__ */ jsx(ShopBar, { ...props });
|
|
9122
|
+
}
|
|
9123
|
+
function CheckoutBar({
|
|
9124
|
+
title: title2,
|
|
9125
|
+
onClose,
|
|
9126
|
+
closeLabel = "Close",
|
|
9127
|
+
className
|
|
9128
|
+
}) {
|
|
9129
|
+
const classes = [styles$1.header, className ?? ""].filter(Boolean).join(" ");
|
|
9130
|
+
return /* @__PURE__ */ jsxs("header", { className: classes, children: [
|
|
9131
|
+
/* @__PURE__ */ jsx("span", { className: styles$1.closeSlot, "aria-hidden": "true" }),
|
|
9132
|
+
title2 ? /* @__PURE__ */ jsx("span", { className: [styles$1.title, styles$1.centred].join(" "), children: title2 }) : null,
|
|
9133
|
+
onClose ? /* @__PURE__ */ jsx(
|
|
9134
|
+
"button",
|
|
9135
|
+
{
|
|
9136
|
+
type: "button",
|
|
9137
|
+
className: [styles$1.iconBtn, styles$1.closeSlot].join(" "),
|
|
9138
|
+
"aria-label": closeLabel,
|
|
9139
|
+
onClick: onClose,
|
|
9140
|
+
children: /* @__PURE__ */ jsx(CloseMedium, {})
|
|
9141
|
+
}
|
|
9142
|
+
) : /* @__PURE__ */ jsx("span", { className: styles$1.closeSlot, "aria-hidden": "true" })
|
|
9143
|
+
] });
|
|
9144
|
+
}
|
|
9145
|
+
function ShopBar({
|
|
8684
9146
|
onBack,
|
|
8685
9147
|
onMenu,
|
|
9148
|
+
title: title2,
|
|
8686
9149
|
showCart = true,
|
|
8687
9150
|
floating: floating2 = false,
|
|
9151
|
+
scrolled: scrolled2,
|
|
8688
9152
|
backLabel = "Back",
|
|
8689
9153
|
menuLabel = "More options",
|
|
8690
9154
|
className
|
|
8691
9155
|
}) {
|
|
8692
9156
|
const cartCount = useCartCount();
|
|
9157
|
+
const atTop = useScrolledUnder(floating2 && scrolled2 === void 0);
|
|
9158
|
+
const isScrolled = scrolled2 ?? atTop;
|
|
8693
9159
|
const cartLabel = cartCount === null ? "Cart" : cartCount === 0 ? "Cart, empty" : `Cart, ${cartCount} item${cartCount === 1 ? "" : "s"}`;
|
|
8694
|
-
const classes = [
|
|
9160
|
+
const classes = [
|
|
9161
|
+
styles$1.header,
|
|
9162
|
+
floating2 ? styles$1.floating : "",
|
|
9163
|
+
floating2 && isScrolled ? styles$1.scrolled : "",
|
|
9164
|
+
className ?? ""
|
|
9165
|
+
].filter(Boolean).join(" ");
|
|
8695
9166
|
return /* @__PURE__ */ jsxs("header", { className: classes, children: [
|
|
8696
9167
|
onBack ? /* @__PURE__ */ jsx("button", { type: "button", className: styles$1.iconBtn, "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx(ChevronLeft, {}) }) : /* @__PURE__ */ jsx("span", { className: styles$1.spacer, "aria-hidden": "true" }),
|
|
9168
|
+
title2 ? /* @__PURE__ */ jsx("span", { className: styles$1.title, children: title2 }) : null,
|
|
8697
9169
|
/* @__PURE__ */ jsxs("div", { className: styles$1.right, children: [
|
|
8698
9170
|
showCart ? /* @__PURE__ */ jsxs(CartTrigger, { className: styles$1.iconBtn, "aria-label": cartLabel, children: [
|
|
8699
9171
|
/* @__PURE__ */ jsx(CartIcon, {}),
|
|
@@ -8712,18 +9184,18 @@ function ShopHeader({
|
|
|
8712
9184
|
] })
|
|
8713
9185
|
] });
|
|
8714
9186
|
}
|
|
8715
|
-
const overlay = "
|
|
8716
|
-
const scrim = "
|
|
8717
|
-
const sheet = "
|
|
8718
|
-
const header = "
|
|
8719
|
-
const close = "
|
|
8720
|
-
const list = "
|
|
8721
|
-
const row = "
|
|
8722
|
-
const icon = "
|
|
8723
|
-
const text = "
|
|
8724
|
-
const title = "
|
|
8725
|
-
const subtitle = "
|
|
8726
|
-
const chevron = "
|
|
9187
|
+
const overlay = "_overlay_1i5ok_5";
|
|
9188
|
+
const scrim = "_scrim_1i5ok_21";
|
|
9189
|
+
const sheet = "_sheet_1i5ok_31";
|
|
9190
|
+
const header = "_header_1i5ok_73";
|
|
9191
|
+
const close = "_close_1i5ok_79";
|
|
9192
|
+
const list = "_list_1i5ok_98";
|
|
9193
|
+
const row = "_row_1i5ok_113";
|
|
9194
|
+
const icon = "_icon_1i5ok_142";
|
|
9195
|
+
const text = "_text_1i5ok_150";
|
|
9196
|
+
const title = "_title_1i5ok_158";
|
|
9197
|
+
const subtitle = "_subtitle_1i5ok_165";
|
|
9198
|
+
const chevron = "_chevron_1i5ok_171";
|
|
8727
9199
|
const styles = {
|
|
8728
9200
|
overlay,
|
|
8729
9201
|
scrim,
|
|
@@ -8772,17 +9244,6 @@ function OrderIcon() {
|
|
|
8772
9244
|
) })
|
|
8773
9245
|
] });
|
|
8774
9246
|
}
|
|
8775
|
-
function GiftIcon() {
|
|
8776
|
-
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(1.94 2.995)", children: /* @__PURE__ */ jsx(
|
|
8777
|
-
"path",
|
|
8778
|
-
{
|
|
8779
|
-
fillRule: "evenodd",
|
|
8780
|
-
clipRule: "evenodd",
|
|
8781
|
-
d: "M13.751 0.00124025C14.5259 0.00509296 15.2681 0.313462 15.8164 0.861592C16.368 1.41322 16.6786 2.16162 16.6787 2.94167C16.6787 3.33886 16.5962 3.72712 16.4443 4.0862L18.21 4.08425C19.2573 4.08425 20.1182 4.92951 20.1182 5.98464V7.98464C20.118 8.77361 19.6366 9.44353 18.9561 9.73171V15.011C18.9561 15.8024 18.6451 16.5636 18.0889 17.1272C17.6018 17.6207 16.9612 17.9275 16.2773 17.9964L15.9814 18.011L4.14355 18.0051C3.35071 18.005 2.59271 17.6863 2.03613 17.1223C1.47995 16.5588 1.16992 15.7965 1.16992 15.0051V9.76198C0.48514 9.4754 0.000197787 8.80207 0 8.01003V6.01003C3.22233e-05 4.95527 0.859419 4.11117 1.90625 4.11062L3.68457 4.10671C3.52717 3.74203 3.44242 3.34633 3.44238 2.94167C3.4425 2.16158 3.7531 1.41323 4.30469 0.861592C4.85271 0.313663 5.59461 0.00439982 6.36914 0.000263685C6.37301 0.000209284 6.377 0.00129387 6.38086 0.00124025C6.38214 0.00120826 6.38348 0.00124029 6.38477 0.00124025C7.48869 -0.0127605 8.48921 0.527887 9.26953 1.39479C9.56436 1.7224 9.82868 2.09657 10.0605 2.50612C10.2924 2.09651 10.5567 1.72244 10.8516 1.39479C11.6319 0.527865 12.6324 -0.0136996 13.7363 0.000263685L13.7393 0.00124025C13.7435 0.0012842 13.7477 0.000190595 13.752 0.000263685L13.751 0.00124025ZM3.16992 9.90749V15.0051C3.16992 15.2745 3.2759 15.5305 3.45996 15.7171C3.64354 15.9031 3.88967 16.005 4.14355 16.0051L15.9814 16.01C16.2355 16.01 16.4823 15.909 16.666 15.7229C16.8271 15.5597 16.9284 15.3435 16.9512 15.1116L16.9561 15.011V9.88601L3.16992 9.90749ZM1.9082 5.91042C1.84343 5.91045 1.80082 5.96063 1.80078 6.01003V8.01003C1.80105 8.05904 1.84222 8.10813 1.90625 8.10866L18.21 8.08425C18.2746 8.08425 18.3181 8.03392 18.3184 7.98464V5.98464C18.3184 5.9352 18.2758 5.88503 18.2109 5.88503L1.9082 5.91042ZM6.38477 1.80007C6.0819 1.8001 5.79131 1.92087 5.57715 2.13503C5.36332 2.34907 5.24329 2.63912 5.24316 2.94167C5.24323 3.24435 5.3632 3.53519 5.57715 3.74929C5.79129 3.96335 6.08197 4.08422 6.38477 4.08425C6.44761 4.08425 6.50914 4.08955 6.56836 4.10183L8.83203 4.09792C8.58292 3.48766 8.27452 2.97992 7.93164 2.5989C7.4044 2.01319 6.86607 1.79198 6.40039 1.80007C6.39524 1.80016 6.38992 1.80007 6.38477 1.80007ZM13.7207 1.80007C13.255 1.79196 12.7167 2.0131 12.1895 2.5989C11.847 2.9794 11.538 3.48583 11.2891 4.09499L13.6289 4.09108C13.6641 4.08689 13.7 4.08425 13.7363 4.08425C14.0392 4.08423 14.3298 3.9634 14.5439 3.74929C14.758 3.53518 14.8788 3.2444 14.8789 2.94167C14.8788 2.63911 14.7578 2.34907 14.5439 2.13503C14.3298 1.92086 14.0392 1.80009 13.7363 1.80007C13.7312 1.80007 13.7259 1.80016 13.7207 1.80007Z",
|
|
8782
|
-
fill: "currentColor"
|
|
8783
|
-
}
|
|
8784
|
-
) }) });
|
|
8785
|
-
}
|
|
8786
9247
|
function HelpIcon() {
|
|
8787
9248
|
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("g", { transform: "translate(1.93 1.93)", children: [
|
|
8788
9249
|
/* @__PURE__ */ jsx(
|
|
@@ -8826,7 +9287,6 @@ function ShopMenuSheet({
|
|
|
8826
9287
|
open,
|
|
8827
9288
|
onClose,
|
|
8828
9289
|
onManageOrders,
|
|
8829
|
-
onRedeemCode,
|
|
8830
9290
|
onHelp,
|
|
8831
9291
|
closeLabel = "Close",
|
|
8832
9292
|
label: label2 = "Shop menu"
|
|
@@ -8842,13 +9302,6 @@ function ShopMenuSheet({
|
|
|
8842
9302
|
subtitle: "View your order history and track shipments",
|
|
8843
9303
|
...onManageOrders ? { onSelect: onManageOrders } : {}
|
|
8844
9304
|
},
|
|
8845
|
-
{
|
|
8846
|
-
key: "redeem",
|
|
8847
|
-
icon: /* @__PURE__ */ jsx(GiftIcon, {}),
|
|
8848
|
-
title: "Redeem a code",
|
|
8849
|
-
subtitle: "Got a code for DAZN shop? Claim it here",
|
|
8850
|
-
...onRedeemCode ? { onSelect: onRedeemCode } : {}
|
|
8851
|
-
},
|
|
8852
9305
|
{
|
|
8853
9306
|
key: "help",
|
|
8854
9307
|
icon: /* @__PURE__ */ jsx(HelpIcon, {}),
|
|
@@ -8914,6 +9367,7 @@ export {
|
|
|
8914
9367
|
LifestyleImage,
|
|
8915
9368
|
LifestyleText,
|
|
8916
9369
|
MediaGallery,
|
|
9370
|
+
OrderConfirmationView,
|
|
8917
9371
|
OrderListView,
|
|
8918
9372
|
OrderStatusBadge,
|
|
8919
9373
|
OrderSummary,
|