@nok-integration/storefront-react 0.25.0 → 0.26.0

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.
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { useContext, useEffect, useState, useRef, useCallback, useMemo, createContext, forwardRef, useLayoutEffect, Fragment as Fragment$1 } from "react";
4
- var client = {};
5
- var catalog = {};
4
+ var client$1 = {};
5
+ var catalog$1 = {};
6
6
  var zod = {};
7
7
  var external = {};
8
- var errors$1 = {};
8
+ var errors$2 = {};
9
9
  var en = {};
10
10
  var ZodError = {};
11
11
  var util = {};
@@ -350,23 +350,23 @@ function requireEn() {
350
350
  en.default = errorMap;
351
351
  return en;
352
352
  }
353
- var hasRequiredErrors$1;
354
- function requireErrors$1() {
355
- if (hasRequiredErrors$1) return errors$1;
356
- hasRequiredErrors$1 = 1;
357
- var __importDefault = errors$1 && errors$1.__importDefault || function(mod) {
353
+ var hasRequiredErrors$2;
354
+ function requireErrors$2() {
355
+ if (hasRequiredErrors$2) return errors$2;
356
+ hasRequiredErrors$2 = 1;
357
+ var __importDefault = errors$2 && errors$2.__importDefault || function(mod) {
358
358
  return mod && mod.__esModule ? mod : {
359
359
  default: mod
360
360
  };
361
361
  };
362
- Object.defineProperty(errors$1, "__esModule", {
362
+ Object.defineProperty(errors$2, "__esModule", {
363
363
  value: true
364
364
  });
365
- errors$1.defaultErrorMap = void 0;
366
- errors$1.setErrorMap = setErrorMap;
367
- errors$1.getErrorMap = getErrorMap;
365
+ errors$2.defaultErrorMap = void 0;
366
+ errors$2.setErrorMap = setErrorMap;
367
+ errors$2.getErrorMap = getErrorMap;
368
368
  const en_js_1 = __importDefault(requireEn());
369
- errors$1.defaultErrorMap = en_js_1.default;
369
+ errors$2.defaultErrorMap = en_js_1.default;
370
370
  let overrideErrorMap = en_js_1.default;
371
371
  function setErrorMap(map) {
372
372
  overrideErrorMap = map;
@@ -374,7 +374,7 @@ function requireErrors$1() {
374
374
  function getErrorMap() {
375
375
  return overrideErrorMap;
376
376
  }
377
- return errors$1;
377
+ return errors$2;
378
378
  }
379
379
  var parseUtil = {};
380
380
  var hasRequiredParseUtil;
@@ -392,7 +392,7 @@ function requireParseUtil() {
392
392
  });
393
393
  exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.EMPTY_PATH = exports.makeIssue = void 0;
394
394
  exports.addIssueToContext = addIssueToContext;
395
- const errors_js_1 = requireErrors$1();
395
+ const errors_js_1 = requireErrors$2();
396
396
  const en_js_1 = __importDefault(requireEn());
397
397
  const makeIssue = (params) => {
398
398
  const { data, path, errorMaps, issueData } = params;
@@ -552,7 +552,7 @@ function requireTypes() {
552
552
  types.datetimeRegex = datetimeRegex;
553
553
  types.custom = custom;
554
554
  const ZodError_js_1 = requireZodError();
555
- const errors_js_1 = requireErrors$1();
555
+ const errors_js_1 = requireErrors$2();
556
556
  const errorUtil_js_1 = requireErrorUtil();
557
557
  const parseUtil_js_1 = requireParseUtil();
558
558
  const util_js_1 = requireUtil();
@@ -4110,7 +4110,7 @@ function requireExternal() {
4110
4110
  Object.defineProperty(exports, "__esModule", {
4111
4111
  value: true
4112
4112
  });
4113
- __exportStar(requireErrors$1(), exports);
4113
+ __exportStar(requireErrors$2(), exports);
4114
4114
  __exportStar(requireParseUtil(), exports);
4115
4115
  __exportStar(requireTypeAliases(), exports);
4116
4116
  __exportStar(requireUtil(), exports);
@@ -4171,11 +4171,11 @@ function requireZod() {
4171
4171
  })(zod);
4172
4172
  return zod;
4173
4173
  }
4174
- var money = {};
4175
- var hasRequiredMoney;
4176
- function requireMoney() {
4177
- if (hasRequiredMoney) return money;
4178
- hasRequiredMoney = 1;
4174
+ var money$1 = {};
4175
+ var hasRequiredMoney$1;
4176
+ function requireMoney$1() {
4177
+ if (hasRequiredMoney$1) return money$1;
4178
+ hasRequiredMoney$1 = 1;
4179
4179
  (function(exports) {
4180
4180
  Object.defineProperty(exports, "__esModule", {
4181
4181
  value: true
@@ -4187,21 +4187,21 @@ function requireMoney() {
4187
4187
  amount: zod_1.z.number().int("amount must be an integer number of minor units (no floats)"),
4188
4188
  currency: exports.Currency
4189
4189
  }).strict();
4190
- })(money);
4191
- return money;
4192
- }
4193
- var common = {};
4194
- var hasRequiredCommon;
4195
- function requireCommon() {
4196
- if (hasRequiredCommon) return common;
4197
- hasRequiredCommon = 1;
4190
+ })(money$1);
4191
+ return money$1;
4192
+ }
4193
+ var common$1 = {};
4194
+ var hasRequiredCommon$1;
4195
+ function requireCommon$1() {
4196
+ if (hasRequiredCommon$1) return common$1;
4197
+ hasRequiredCommon$1 = 1;
4198
4198
  (function(exports) {
4199
4199
  Object.defineProperty(exports, "__esModule", {
4200
4200
  value: true
4201
4201
  });
4202
4202
  exports.Pricing = exports.Address = exports.PaginationParams = exports.Page = exports.Attributes = exports.MarketQuery = exports.LanguageTag = exports.CountryCode = exports.Sku = exports.Url = exports.Timestamp = void 0;
4203
4203
  const zod_1 = requireZod();
4204
- const money_1 = requireMoney();
4204
+ const money_1 = requireMoney$1();
4205
4205
  exports.Timestamp = zod_1.z.string().datetime({
4206
4206
  offset: true
4207
4207
  });
@@ -4237,21 +4237,21 @@ function requireCommon() {
4237
4237
  tax: money_1.Money,
4238
4238
  total: money_1.Money
4239
4239
  });
4240
- })(common);
4241
- return common;
4240
+ })(common$1);
4241
+ return common$1;
4242
4242
  }
4243
- var hasRequiredCatalog;
4244
- function requireCatalog() {
4245
- if (hasRequiredCatalog) return catalog;
4246
- hasRequiredCatalog = 1;
4243
+ var hasRequiredCatalog$1;
4244
+ function requireCatalog$1() {
4245
+ if (hasRequiredCatalog$1) return catalog$1;
4246
+ hasRequiredCatalog$1 = 1;
4247
4247
  (function(exports) {
4248
4248
  Object.defineProperty(exports, "__esModule", {
4249
4249
  value: true
4250
4250
  });
4251
4251
  exports.CatalogReadQuery = exports.ListProductsQuery = exports.RecommendationsResponse = exports.ProductListResponse = exports.Product = exports.SizeGuide = exports.SizeGuideMeasurement = exports.SizeChartUnit = exports.ProductPromo = exports.ProductVariant = void 0;
4252
4252
  const zod_1 = requireZod();
4253
- const money_1 = requireMoney();
4254
- const common_1 = requireCommon();
4253
+ const money_1 = requireMoney$1();
4254
+ const common_1 = requireCommon$1();
4255
4255
  exports.ProductVariant = zod_1.z.object({
4256
4256
  sku: common_1.Sku,
4257
4257
  attributes: common_1.Attributes,
@@ -4306,22 +4306,22 @@ function requireCatalog() {
4306
4306
  limit: zod_1.z.number().int().positive().max(100).optional()
4307
4307
  });
4308
4308
  exports.CatalogReadQuery = common_1.MarketQuery;
4309
- })(catalog);
4310
- return catalog;
4311
- }
4312
- var content$1 = {};
4313
- var hasRequiredContent;
4314
- function requireContent() {
4315
- if (hasRequiredContent) return content$1;
4316
- hasRequiredContent = 1;
4309
+ })(catalog$1);
4310
+ return catalog$1;
4311
+ }
4312
+ var content$2 = {};
4313
+ var hasRequiredContent$1;
4314
+ function requireContent$1() {
4315
+ if (hasRequiredContent$1) return content$2;
4316
+ hasRequiredContent$1 = 1;
4317
4317
  (function(exports) {
4318
4318
  Object.defineProperty(exports, "__esModule", {
4319
4319
  value: true
4320
4320
  });
4321
4321
  exports.HomeContent = exports.HomeSlide = exports.CategoryPage = exports.CategoryBlock = exports.ProductGalleryBlock = exports.ExploreBlock = exports.WhyUsBlock = exports.ReviewBlock = exports.GridBlock = exports.LifestyleImageBlock = exports.FeaturedBlock = exports.LifestyleTextBlock = exports.RailBlock = exports.CategoryHero = void 0;
4322
4322
  const zod_1 = requireZod();
4323
- const common_1 = requireCommon();
4324
- const catalog_1 = requireCatalog();
4323
+ const common_1 = requireCommon$1();
4324
+ const catalog_1 = requireCatalog$1();
4325
4325
  exports.CategoryHero = zod_1.z.object({
4326
4326
  title: zod_1.z.string(),
4327
4327
  subtitle: zod_1.z.string().optional(),
@@ -4403,14 +4403,14 @@ function requireContent() {
4403
4403
  exports.HomeContent = zod_1.z.object({
4404
4404
  slides: zod_1.z.array(exports.HomeSlide)
4405
4405
  });
4406
- })(content$1);
4407
- return content$1;
4406
+ })(content$2);
4407
+ return content$2;
4408
4408
  }
4409
- var storefrontConfig = {};
4410
- var hasRequiredStorefrontConfig;
4411
- function requireStorefrontConfig() {
4412
- if (hasRequiredStorefrontConfig) return storefrontConfig;
4413
- hasRequiredStorefrontConfig = 1;
4409
+ var storefrontConfig$1 = {};
4410
+ var hasRequiredStorefrontConfig$1;
4411
+ function requireStorefrontConfig$1() {
4412
+ if (hasRequiredStorefrontConfig$1) return storefrontConfig$1;
4413
+ hasRequiredStorefrontConfig$1 = 1;
4414
4414
  (function(exports) {
4415
4415
  Object.defineProperty(exports, "__esModule", {
4416
4416
  value: true
@@ -4450,63 +4450,63 @@ function requireStorefrontConfig() {
4450
4450
  default_lang: "en"
4451
4451
  }
4452
4452
  };
4453
- })(storefrontConfig);
4454
- return storefrontConfig;
4455
- }
4456
- var inventory = {};
4457
- var hasRequiredInventory;
4458
- function requireInventory() {
4459
- if (hasRequiredInventory) return inventory;
4460
- hasRequiredInventory = 1;
4461
- Object.defineProperty(inventory, "__esModule", {
4453
+ })(storefrontConfig$1);
4454
+ return storefrontConfig$1;
4455
+ }
4456
+ var inventory$1 = {};
4457
+ var hasRequiredInventory$1;
4458
+ function requireInventory$1() {
4459
+ if (hasRequiredInventory$1) return inventory$1;
4460
+ hasRequiredInventory$1 = 1;
4461
+ Object.defineProperty(inventory$1, "__esModule", {
4462
4462
  value: true
4463
4463
  });
4464
- inventory.Inventory = void 0;
4464
+ inventory$1.Inventory = void 0;
4465
4465
  const zod_1 = requireZod();
4466
- const common_1 = requireCommon();
4467
- inventory.Inventory = zod_1.z.object({
4466
+ const common_1 = requireCommon$1();
4467
+ inventory$1.Inventory = zod_1.z.object({
4468
4468
  sku: common_1.Sku,
4469
4469
  available: zod_1.z.number().int().nonnegative(),
4470
4470
  in_stock: zod_1.z.boolean()
4471
4471
  });
4472
- return inventory;
4472
+ return inventory$1;
4473
4473
  }
4474
- var cart = {};
4475
- var ids = {};
4476
- var hasRequiredIds;
4477
- function requireIds() {
4478
- if (hasRequiredIds) return ids;
4479
- hasRequiredIds = 1;
4480
- Object.defineProperty(ids, "__esModule", {
4474
+ var cart$1 = {};
4475
+ var ids$1 = {};
4476
+ var hasRequiredIds$1;
4477
+ function requireIds$1() {
4478
+ if (hasRequiredIds$1) return ids$1;
4479
+ hasRequiredIds$1 = 1;
4480
+ Object.defineProperty(ids$1, "__esModule", {
4481
4481
  value: true
4482
4482
  });
4483
- ids.RequestId = ids.EventId = ids.OrderRef = ids.CheckoutId = ids.CartId = ids.UserId = void 0;
4484
- ids.prefixedId = prefixedId;
4483
+ ids$1.RequestId = ids$1.EventId = ids$1.OrderRef = ids$1.CheckoutId = ids$1.CartId = ids$1.UserId = void 0;
4484
+ ids$1.prefixedId = prefixedId;
4485
4485
  const zod_1 = requireZod();
4486
4486
  function prefixedId(prefix, _brand) {
4487
4487
  return zod_1.z.string().regex(new RegExp(`^${prefix}[A-Za-z0-9._-]+$`), `must be a '${prefix}…' identifier`).brand();
4488
4488
  }
4489
- ids.UserId = prefixedId("usr_");
4490
- ids.CartId = prefixedId("cart_");
4491
- ids.CheckoutId = prefixedId("chk_");
4492
- ids.OrderRef = zod_1.z.string().regex(/^(?:ord_[A-Za-z0-9._-]+|\d+)$/, "must be an 'ord_…' identifier or a numeric order reference").brand();
4493
- ids.EventId = prefixedId("evt_");
4494
- ids.RequestId = prefixedId("req_");
4495
- return ids;
4496
- }
4497
- var vip$1 = {};
4498
- var hasRequiredVip;
4499
- function requireVip() {
4500
- if (hasRequiredVip) return vip$1;
4501
- hasRequiredVip = 1;
4489
+ ids$1.UserId = prefixedId("usr_");
4490
+ ids$1.CartId = prefixedId("cart_");
4491
+ ids$1.CheckoutId = prefixedId("chk_");
4492
+ ids$1.OrderRef = zod_1.z.string().regex(/^(?:ord_[A-Za-z0-9._-]+|\d+)$/, "must be an 'ord_…' identifier or a numeric order reference").brand();
4493
+ ids$1.EventId = prefixedId("evt_");
4494
+ ids$1.RequestId = prefixedId("req_");
4495
+ return ids$1;
4496
+ }
4497
+ var vip$2 = {};
4498
+ var hasRequiredVip$1;
4499
+ function requireVip$1() {
4500
+ if (hasRequiredVip$1) return vip$2;
4501
+ hasRequiredVip$1 = 1;
4502
4502
  (function(exports) {
4503
4503
  Object.defineProperty(exports, "__esModule", {
4504
4504
  value: true
4505
4505
  });
4506
4506
  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;
4507
4507
  const zod_1 = requireZod();
4508
- const common_1 = requireCommon();
4509
- const ids_1 = requireIds();
4508
+ const common_1 = requireCommon$1();
4509
+ const ids_1 = requireIds$1();
4510
4510
  exports.VipInviteRef = (0, ids_1.prefixedId)("vip_", "VipInviteRef");
4511
4511
  exports.VIP_TOKEN_PATTERN = /^[A-Za-z0-9_-]{43}$/;
4512
4512
  exports.VipDeliveryRule = zod_1.z.enum(["both_free", "standard_free", "both_paid"]);
@@ -4576,24 +4576,24 @@ function requireVip() {
4576
4576
  invite_ref: exports.VipInviteRef,
4577
4577
  reason: exports.VipClaimRefusalReason
4578
4578
  })]);
4579
- })(vip$1);
4580
- return vip$1;
4579
+ })(vip$2);
4580
+ return vip$2;
4581
4581
  }
4582
- var hasRequiredCart;
4583
- function requireCart() {
4584
- if (hasRequiredCart) return cart;
4585
- hasRequiredCart = 1;
4582
+ var hasRequiredCart$1;
4583
+ function requireCart$1() {
4584
+ if (hasRequiredCart$1) return cart$1;
4585
+ hasRequiredCart$1 = 1;
4586
4586
  (function(exports) {
4587
4587
  Object.defineProperty(exports, "__esModule", {
4588
4588
  value: true
4589
4589
  });
4590
4590
  exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.CartMarketQuery = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
4591
4591
  const zod_1 = requireZod();
4592
- const money_1 = requireMoney();
4593
- const ids_1 = requireIds();
4594
- const money_2 = requireMoney();
4595
- const common_1 = requireCommon();
4596
- const vip_1 = requireVip();
4592
+ const money_1 = requireMoney$1();
4593
+ const ids_1 = requireIds$1();
4594
+ const money_2 = requireMoney$1();
4595
+ const common_1 = requireCommon$1();
4596
+ const vip_1 = requireVip$1();
4597
4597
  exports.CartItem = zod_1.z.object({
4598
4598
  sku: common_1.Sku,
4599
4599
  qty: zod_1.z.number().int().positive(),
@@ -4606,7 +4606,8 @@ function requireCart() {
4606
4606
  available: zod_1.z.number().int().nonnegative().optional()
4607
4607
  });
4608
4608
  exports.CartTotals = common_1.Pricing.extend({
4609
- discount: money_1.Money.optional()
4609
+ discount: money_1.Money.optional(),
4610
+ subtotal_before_discount: money_1.Money.optional()
4610
4611
  });
4611
4612
  exports.CartLockReason = zod_1.z.enum(["checkout_handoff"]);
4612
4613
  exports.CartLock = zod_1.z.object({
@@ -4658,21 +4659,21 @@ function requireCart() {
4658
4659
  locked: exports.CartLock.optional(),
4659
4660
  vip_invite_ref: vip_1.VipInviteRef.optional()
4660
4661
  });
4661
- })(cart);
4662
- return cart;
4662
+ })(cart$1);
4663
+ return cart$1;
4663
4664
  }
4664
- var session = {};
4665
- var hasRequiredSession;
4666
- function requireSession() {
4667
- if (hasRequiredSession) return session;
4668
- hasRequiredSession = 1;
4665
+ var session$1 = {};
4666
+ var hasRequiredSession$1;
4667
+ function requireSession$1() {
4668
+ if (hasRequiredSession$1) return session$1;
4669
+ hasRequiredSession$1 = 1;
4669
4670
  (function(exports) {
4670
4671
  Object.defineProperty(exports, "__esModule", {
4671
4672
  value: true
4672
4673
  });
4673
4674
  exports.ShopSessionResponse = exports.ShopSessionProduct = exports.ShopSessionRequest = exports.SessionExchangeResponse = exports.SessionExchangeRequest = void 0;
4674
4675
  const zod_1 = requireZod();
4675
- const ids_1 = requireIds();
4676
+ const ids_1 = requireIds$1();
4676
4677
  exports.SessionExchangeRequest = zod_1.z.object({
4677
4678
  token: zod_1.z.string().min(1)
4678
4679
  }).strict();
@@ -4695,25 +4696,25 @@ function requireSession() {
4695
4696
  email: zod_1.z.string().optional(),
4696
4697
  product: exports.ShopSessionProduct.nullish()
4697
4698
  });
4698
- })(session);
4699
- return session;
4699
+ })(session$1);
4700
+ return session$1;
4700
4701
  }
4701
- var orderTracking = {};
4702
- var orders = {};
4703
- var hasRequiredOrders;
4704
- function requireOrders() {
4705
- if (hasRequiredOrders) return orders;
4706
- hasRequiredOrders = 1;
4702
+ var orderTracking$1 = {};
4703
+ var orders$1 = {};
4704
+ var hasRequiredOrders$1;
4705
+ function requireOrders$1() {
4706
+ if (hasRequiredOrders$1) return orders$1;
4707
+ hasRequiredOrders$1 = 1;
4707
4708
  (function(exports) {
4708
4709
  Object.defineProperty(exports, "__esModule", {
4709
4710
  value: true
4710
4711
  });
4711
4712
  exports.OrderIntakeResponse = exports.OrderRefundRequest = exports.RefundReason = exports.OrderCancelRequest = exports.OrderLineAction = exports.CancelReason = exports.OrderPlacedRequest = exports.OrderPaymentSummary = exports.OrderTotals = exports.OrderCustomer = exports.OrderLine = exports.OrderEventEnvelope = void 0;
4712
4713
  const zod_1 = requireZod();
4713
- const money_1 = requireMoney();
4714
- const ids_1 = requireIds();
4715
- const common_1 = requireCommon();
4716
- const vip_1 = requireVip();
4714
+ const money_1 = requireMoney$1();
4715
+ const ids_1 = requireIds$1();
4716
+ const common_1 = requireCommon$1();
4717
+ const vip_1 = requireVip$1();
4717
4718
  exports.OrderEventEnvelope = zod_1.z.object({
4718
4719
  event_id: ids_1.EventId,
4719
4720
  occurred_at: common_1.Timestamp
@@ -4779,24 +4780,24 @@ function requireOrders() {
4779
4780
  status: zod_1.z.enum(["accepted", "duplicate"]),
4780
4781
  received_at: common_1.Timestamp
4781
4782
  });
4782
- })(orders);
4783
- return orders;
4783
+ })(orders$1);
4784
+ return orders$1;
4784
4785
  }
4785
- var hasRequiredOrderTracking;
4786
- function requireOrderTracking() {
4787
- if (hasRequiredOrderTracking) return orderTracking;
4788
- hasRequiredOrderTracking = 1;
4786
+ var hasRequiredOrderTracking$1;
4787
+ function requireOrderTracking$1() {
4788
+ if (hasRequiredOrderTracking$1) return orderTracking$1;
4789
+ hasRequiredOrderTracking$1 = 1;
4789
4790
  (function(exports) {
4790
4791
  Object.defineProperty(exports, "__esModule", {
4791
4792
  value: true
4792
4793
  });
4793
4794
  exports.ReturnDetail = exports.ReturnItem = exports.ReturnProgressEntry = exports.CreateReturnRequest = exports.ReturnRequestItem = exports.RecordedReturnReason = exports.FanReturnReason = exports.RequestCancellationRequest = exports.FanCancelReason = exports.OrderDetail = exports.ReturnSummary = exports.OrderList = exports.ReturnSummaryItem = exports.OrderSummaryItem = exports.ReturnOutcome = exports.ReturnStatus = exports.OrderItem = exports.OrderTracking = exports.OrderProgressEntry = exports.OrderProgressStep = void 0;
4794
4795
  const zod_1 = requireZod();
4795
- const money_1 = requireMoney();
4796
- const ids_1 = requireIds();
4797
- const common_1 = requireCommon();
4798
- const orders_1 = requireOrders();
4799
- const vip_1 = requireVip();
4796
+ const money_1 = requireMoney$1();
4797
+ const ids_1 = requireIds$1();
4798
+ const common_1 = requireCommon$1();
4799
+ const orders_1 = requireOrders$1();
4800
+ const vip_1 = requireVip$1();
4800
4801
  exports.OrderProgressStep = zod_1.z.enum(["packing", "on_its_way", "out_for_delivery", "delivered", "cancelled"]);
4801
4802
  exports.OrderProgressEntry = zod_1.z.object({
4802
4803
  step: exports.OrderProgressStep,
@@ -4922,42 +4923,42 @@ function requireOrderTracking() {
4922
4923
  label_url: common_1.Url.optional(),
4923
4924
  label_email: zod_1.z.string().email().optional()
4924
4925
  });
4925
- })(orderTracking);
4926
- return orderTracking;
4926
+ })(orderTracking$1);
4927
+ return orderTracking$1;
4927
4928
  }
4928
- var stockAlerts = {};
4929
- var hasRequiredStockAlerts;
4930
- function requireStockAlerts() {
4931
- if (hasRequiredStockAlerts) return stockAlerts;
4932
- hasRequiredStockAlerts = 1;
4933
- Object.defineProperty(stockAlerts, "__esModule", {
4929
+ var stockAlerts$1 = {};
4930
+ var hasRequiredStockAlerts$1;
4931
+ function requireStockAlerts$1() {
4932
+ if (hasRequiredStockAlerts$1) return stockAlerts$1;
4933
+ hasRequiredStockAlerts$1 = 1;
4934
+ Object.defineProperty(stockAlerts$1, "__esModule", {
4934
4935
  value: true
4935
4936
  });
4936
- stockAlerts.StockAlert = stockAlerts.StockAlertRequest = void 0;
4937
+ stockAlerts$1.StockAlert = stockAlerts$1.StockAlertRequest = void 0;
4937
4938
  const zod_1 = requireZod();
4938
- const common_1 = requireCommon();
4939
- stockAlerts.StockAlertRequest = zod_1.z.object({
4939
+ const common_1 = requireCommon$1();
4940
+ stockAlerts$1.StockAlertRequest = zod_1.z.object({
4940
4941
  sku: common_1.Sku
4941
4942
  }).strict();
4942
- stockAlerts.StockAlert = zod_1.z.object({
4943
+ stockAlerts$1.StockAlert = zod_1.z.object({
4943
4944
  sku: common_1.Sku,
4944
4945
  created_at: common_1.Timestamp,
4945
4946
  notified_at: common_1.Timestamp.optional()
4946
4947
  });
4947
- return stockAlerts;
4948
+ return stockAlerts$1;
4948
4949
  }
4949
- var support = {};
4950
- var hasRequiredSupport;
4951
- function requireSupport() {
4952
- if (hasRequiredSupport) return support;
4953
- hasRequiredSupport = 1;
4950
+ var support$1 = {};
4951
+ var hasRequiredSupport$1;
4952
+ function requireSupport$1() {
4953
+ if (hasRequiredSupport$1) return support$1;
4954
+ hasRequiredSupport$1 = 1;
4954
4955
  (function(exports) {
4955
4956
  Object.defineProperty(exports, "__esModule", {
4956
4957
  value: true
4957
4958
  });
4958
4959
  exports.SupportAttachment = exports.SupportTicket = exports.SupportTicketRequest = exports.SupportCategory = void 0;
4959
4960
  const zod_1 = requireZod();
4960
- const common_1 = requireCommon();
4961
+ const common_1 = requireCommon$1();
4961
4962
  exports.SupportCategory = zod_1.z.string().trim().min(1).max(120);
4962
4963
  exports.SupportTicketRequest = zod_1.z.object({
4963
4964
  email: zod_1.z.string().email().max(254),
@@ -4976,14 +4977,14 @@ function requireSupport() {
4976
4977
  content_type: zod_1.z.string().min(1),
4977
4978
  bytes: zod_1.z.number().int().positive()
4978
4979
  });
4979
- })(support);
4980
- return support;
4980
+ })(support$1);
4981
+ return support$1;
4981
4982
  }
4982
- var errors = {};
4983
- var hasRequiredErrors;
4984
- function requireErrors() {
4985
- if (hasRequiredErrors) return errors;
4986
- hasRequiredErrors = 1;
4983
+ var errors$1 = {};
4984
+ var hasRequiredErrors$1;
4985
+ function requireErrors$1() {
4986
+ if (hasRequiredErrors$1) return errors$1;
4987
+ hasRequiredErrors$1 = 1;
4987
4988
  (function(exports) {
4988
4989
  Object.defineProperty(exports, "__esModule", {
4989
4990
  value: true
@@ -5022,29 +5023,29 @@ function requireErrors() {
5022
5023
  error: exports.ApiErrorBody,
5023
5024
  request_id: zod_1.z.string()
5024
5025
  });
5025
- })(errors);
5026
- return errors;
5026
+ })(errors$1);
5027
+ return errors$1;
5027
5028
  }
5028
- var hasRequiredClient;
5029
- function requireClient() {
5030
- if (hasRequiredClient) return client;
5031
- hasRequiredClient = 1;
5032
- Object.defineProperty(client, "__esModule", {
5029
+ var hasRequiredClient$1;
5030
+ function requireClient$1() {
5031
+ if (hasRequiredClient$1) return client$1;
5032
+ hasRequiredClient$1 = 1;
5033
+ Object.defineProperty(client$1, "__esModule", {
5033
5034
  value: true
5034
5035
  });
5035
- client.DaznApiError = void 0;
5036
- client.createClient = createClient;
5037
- const catalog_1 = requireCatalog();
5038
- const content_1 = requireContent();
5039
- const storefront_config_1 = requireStorefrontConfig();
5040
- const inventory_1 = requireInventory();
5041
- const cart_1 = requireCart();
5042
- const session_1 = requireSession();
5043
- const order_tracking_1 = requireOrderTracking();
5044
- const stock_alerts_1 = requireStockAlerts();
5045
- const support_1 = requireSupport();
5046
- const vip_1 = requireVip();
5047
- const errors_1 = requireErrors();
5036
+ client$1.DaznApiError = void 0;
5037
+ client$1.createClient = createClient;
5038
+ const catalog_1 = requireCatalog$1();
5039
+ const content_1 = requireContent$1();
5040
+ const storefront_config_1 = requireStorefrontConfig$1();
5041
+ const inventory_1 = requireInventory$1();
5042
+ const cart_1 = requireCart$1();
5043
+ const session_1 = requireSession$1();
5044
+ const order_tracking_1 = requireOrderTracking$1();
5045
+ const stock_alerts_1 = requireStockAlerts$1();
5046
+ const support_1 = requireSupport$1();
5047
+ const vip_1 = requireVip$1();
5048
+ const errors_1 = requireErrors$1();
5048
5049
  class DaznApiError extends Error {
5049
5050
  status;
5050
5051
  code;
@@ -5059,7 +5060,7 @@ function requireClient() {
5059
5060
  this.body = parsed?.error;
5060
5061
  }
5061
5062
  }
5062
- client.DaznApiError = DaznApiError;
5063
+ client$1.DaznApiError = DaznApiError;
5063
5064
  function buildQuery(query) {
5064
5065
  if (!query) return "";
5065
5066
  const params = new URLSearchParams();
@@ -5308,9 +5309,9 @@ function requireClient() {
5308
5309
  }
5309
5310
  };
5310
5311
  }
5311
- return client;
5312
+ return client$1;
5312
5313
  }
5313
- var clientExports = requireClient();
5314
+ var clientExports = requireClient$1();
5314
5315
  const TOP = {
5315
5316
  doc: 0,
5316
5317
  pane: 0
@@ -6527,6 +6528,7 @@ const ES = {
6527
6528
  Select: "Seleccionar",
6528
6529
  Shop: "Tienda",
6529
6530
  "Scroll down for more": "Desplázate hacia abajo para ver más",
6531
+ "Limited edition": "Edición limitada",
6530
6532
  Previous: "Anterior",
6531
6533
  Next: "Siguiente",
6532
6534
  "Claim yours": "Consigue el tuyo",
@@ -6546,7 +6548,8 @@ const ES = {
6546
6548
  "Return #{0}": "Devolución n.º {0}",
6547
6549
  "Return reported": "Devolución notificada",
6548
6550
  "Return received": "Devolución recibida",
6549
- "Return completed": "Devolución completada"
6551
+ "Return completed": "Devolución completada",
6552
+ "Your session has timed out. Please try again.": "Tu sesión ha caducado. Inténtalo de nuevo."
6550
6553
  };
6551
6554
  const CATALOGUES = {
6552
6555
  es: ES
@@ -7406,6 +7409,11 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
7406
7409
  const { format } = useMoney();
7407
7410
  const isDeferred = (key) => deferred.includes(key);
7408
7411
  const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "discount" || discount2 !== void 0).filter((row2) => !collapsible || expanded || row2.key === "shipping" || row2.key === "total");
7412
+ const drawsDiscount = discount2 !== void 0 && rows.some((row2) => row2.key === "discount");
7413
+ const shown = drawsDiscount && pricing.subtotal_before_discount ? {
7414
+ ...pricing,
7415
+ subtotal: pricing.subtotal_before_discount
7416
+ } : pricing;
7409
7417
  return jsx("dl", {
7410
7418
  className: styles$M.summary,
7411
7419
  children: visible.map(({ label: label2, key }) => {
@@ -7446,7 +7454,7 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
7446
7454
  }) : t(label2)
7447
7455
  }), jsx("dd", {
7448
7456
  className: pending2 ? styles$M.pending : void 0,
7449
- children: pending2 ? t("Calculated at checkout") : renderValue(key, pricing, format, t)
7457
+ children: pending2 ? t("Calculated at checkout") : renderValue(key, shown, format, t)
7450
7458
  })]
7451
7459
  }, key);
7452
7460
  })
@@ -7699,7 +7707,8 @@ function SheetHeader({ onClose, closeLabel }) {
7699
7707
  className: styles$K.handleSlot,
7700
7708
  "aria-hidden": "true",
7701
7709
  children: jsx("div", {
7702
- className: styles$K.handle
7710
+ className: styles$K.handle,
7711
+ "data-sheet-handle": ""
7703
7712
  })
7704
7713
  }), jsx("button", {
7705
7714
  type: "button",
@@ -8981,7 +8990,7 @@ const cancelledMeta = "_cancelledMeta_18zlk_241";
8981
8990
  const aside$1 = "_aside_18zlk_249";
8982
8991
  const cancelledMain = "_cancelledMain_18zlk_250";
8983
8992
  const wide$3 = "_wide_18zlk_255";
8984
- const vip = "_vip_18zlk_305";
8993
+ const vip$1 = "_vip_18zlk_305";
8985
8994
  const reorder = "_reorder_18zlk_312";
8986
8995
  const cancelledSub = "_cancelledSub_18zlk_320";
8987
8996
  const dot$3 = "_dot_18zlk_332";
@@ -9005,7 +9014,7 @@ const styles$D = {
9005
9014
  aside: aside$1,
9006
9015
  cancelledMain,
9007
9016
  wide: wide$3,
9008
- vip,
9017
+ vip: vip$1,
9009
9018
  reorder,
9010
9019
  cancelledSub,
9011
9020
  dot: dot$3
@@ -10212,10 +10221,10 @@ const styles$y = {
10212
10221
  large,
10213
10222
  swatchSlot
10214
10223
  };
10215
- function ProductTile({ product, priority, size = "default" }) {
10224
+ function ProductTile({ product, priority, size = "default", flag }) {
10216
10225
  const image2 = product.media[0];
10217
10226
  const anyInStock = product.variants.length === 0 ? true : product.variants.some((v) => v.in_stock);
10218
- const topBadge2 = product.badges?.[0];
10227
+ const topBadge2 = flag ?? product.badges?.[0];
10219
10228
  const pct = discountPct(product.price, product.compare_at);
10220
10229
  const t = useT();
10221
10230
  return jsxs(ShopLink, {
@@ -10999,16 +11008,17 @@ function StickyCtaBar({ children, info: info2, variant = "floating", className }
10999
11008
  })]
11000
11009
  });
11001
11010
  }
11002
- const surface = "_surface_1pa1k_15";
11003
- const screen = "_screen_1pa1k_20";
11004
- const body$4 = "_body_1pa1k_12";
11005
- const items = "_items_1pa1k_34";
11006
- const sectionHeader = "_sectionHeader_1pa1k_40";
11007
- const sectionTitle = "_sectionTitle_1pa1k_46";
11008
- const count = "_count_1pa1k_67";
11009
- const lines = "_lines_1pa1k_91";
11010
- const footer = "_footer_1pa1k_101";
11011
- const cta$4 = "_cta_1pa1k_127";
11011
+ const surface = "_surface_qvckt_15";
11012
+ const screen = "_screen_qvckt_20";
11013
+ const body$4 = "_body_qvckt_12";
11014
+ const items = "_items_qvckt_34";
11015
+ const sectionHeader = "_sectionHeader_qvckt_40";
11016
+ const sectionTitle = "_sectionTitle_qvckt_46";
11017
+ const count = "_count_qvckt_67";
11018
+ const lines = "_lines_qvckt_91";
11019
+ const footer = "_footer_qvckt_101";
11020
+ const cta$4 = "_cta_qvckt_127";
11021
+ const ctaError = "_ctaError_qvckt_135";
11012
11022
  const styles$o = {
11013
11023
  surface,
11014
11024
  screen,
@@ -11019,7 +11029,8 @@ const styles$o = {
11019
11029
  count,
11020
11030
  lines,
11021
11031
  footer,
11022
- cta: cta$4
11032
+ cta: cta$4,
11033
+ ctaError
11023
11034
  };
11024
11035
  function CartView(props = {}) {
11025
11036
  const t = useT();
@@ -11049,6 +11060,7 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
11049
11060
  const wide2 = useDesktopLayout();
11050
11061
  const panelSummary = useInSidePanel() && wide2;
11051
11062
  const [handingOff, setHandingOff] = useState(false);
11063
+ const [sessionLapsed, setSessionLapsed] = useState(false);
11052
11064
  const load = useCallback(async () => {
11053
11065
  if (!carts?.get()) setState("loading");
11054
11066
  try {
@@ -11182,6 +11194,7 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
11182
11194
  async function handOff(current2) {
11183
11195
  messageToNative("showLoader");
11184
11196
  setHandingOff(true);
11197
+ setSessionLapsed(false);
11185
11198
  try {
11186
11199
  const { checkout_url } = await api.cart.handoff();
11187
11200
  emit({
@@ -11192,7 +11205,15 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
11192
11205
  window.location.assign(checkout_url);
11193
11206
  } catch (err) {
11194
11207
  const code = codeOf(err);
11195
- toast2.show(t(treatmentFor(code).body), "critical");
11208
+ if (isUnauthorized(err)) {
11209
+ emit({
11210
+ type: "session_required",
11211
+ action: "checkout"
11212
+ });
11213
+ setSessionLapsed(true);
11214
+ } else {
11215
+ toast2.show(t(treatmentFor(code).body), "critical");
11216
+ }
11196
11217
  setHandingOff(false);
11197
11218
  }
11198
11219
  }
@@ -11248,6 +11269,13 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
11248
11269
  }), jsx(StickyCtaBar, {
11249
11270
  variant: "divider",
11250
11271
  className: styles$o.cta,
11272
+ ...sessionLapsed ? {
11273
+ info: jsx("p", {
11274
+ className: styles$o.ctaError,
11275
+ role: "alert",
11276
+ children: t("Your session has timed out. Please try again.")
11277
+ })
11278
+ } : {},
11251
11279
  children: jsx(Button, {
11252
11280
  variant: "primary",
11253
11281
  onClick: () => void handOff(cart2),
@@ -11464,31 +11492,31 @@ function DesktopGallery({ media: media2, alt, badges: badges2, focus }) {
11464
11492
  })]
11465
11493
  });
11466
11494
  }
11467
- const scrim$3 = "_scrim_qr198_8";
11468
- const sheet$1 = "_sheet_qr198_2";
11469
- const body$3 = "_body_qr198_40";
11470
- const titles = "_titles_qr198_67";
11471
- const title$b = "_title_qr198_67";
11472
- const subtitle$4 = "_subtitle_qr198_83";
11473
- const units = "_units_qr198_96";
11474
- const unit = "_unit_qr198_96";
11475
- const unitOn = "_unitOn_qr198_130";
11476
- const unitOff = "_unitOff_qr198_138";
11477
- const tableWrap = "_tableWrap_qr198_147";
11478
- const table = "_table_qr198_147";
11479
- const col = "_col_qr198_179";
11480
- const colEdge = "_colEdge_qr198_183";
11481
- const note = "_note_qr198_251";
11482
- const how = "_how_qr198_263";
11483
- const howTitle = "_howTitle_qr198_269";
11484
- const howList = "_howList_qr198_277";
11485
- const howItem = "_howItem_qr198_284";
11486
- const howLabel = "_howLabel_qr198_309";
11487
- const howText = "_howText_qr198_319";
11488
- const fabric = "_fabric_qr198_328";
11489
- const fabricLabel = "_fabricLabel_qr198_336";
11490
- const fabricText = "_fabricText_qr198_344";
11491
- const notes = "_notes_qr198_355";
11495
+ const scrim$3 = "_scrim_n0uqj_8";
11496
+ const sheet$1 = "_sheet_n0uqj_2";
11497
+ const body$3 = "_body_n0uqj_40";
11498
+ const titles = "_titles_n0uqj_67";
11499
+ const title$b = "_title_n0uqj_67";
11500
+ const subtitle$4 = "_subtitle_n0uqj_83";
11501
+ const units = "_units_n0uqj_96";
11502
+ const unit = "_unit_n0uqj_96";
11503
+ const unitOn = "_unitOn_n0uqj_130";
11504
+ const unitOff = "_unitOff_n0uqj_138";
11505
+ const tableWrap = "_tableWrap_n0uqj_147";
11506
+ const table = "_table_n0uqj_147";
11507
+ const col = "_col_n0uqj_179";
11508
+ const colEdge = "_colEdge_n0uqj_183";
11509
+ const note = "_note_n0uqj_251";
11510
+ const how = "_how_n0uqj_263";
11511
+ const howTitle = "_howTitle_n0uqj_269";
11512
+ const howList = "_howList_n0uqj_277";
11513
+ const howItem = "_howItem_n0uqj_284";
11514
+ const howLabel = "_howLabel_n0uqj_309";
11515
+ const howText = "_howText_n0uqj_319";
11516
+ const fabric = "_fabric_n0uqj_328";
11517
+ const fabricLabel = "_fabricLabel_n0uqj_336";
11518
+ const fabricText = "_fabricText_n0uqj_344";
11519
+ const notes = "_notes_n0uqj_355";
11492
11520
  const styles$k = {
11493
11521
  scrim: scrim$3,
11494
11522
  sheet: sheet$1,
@@ -12041,7 +12069,7 @@ function PromoBanner({ promo: promo2 }) {
12041
12069
  });
12042
12070
  }
12043
12071
  const page = "_page_5si5d_1";
12044
- const content = "_content_5si5d_14";
12072
+ const content$1 = "_content_5si5d_14";
12045
12073
  const intro = "_intro_5si5d_21";
12046
12074
  const productInfo = "_productInfo_5si5d_28";
12047
12075
  const titlePrice = "_titlePrice_5si5d_34";
@@ -12061,7 +12089,7 @@ const cta$3 = "_cta_5si5d_128";
12061
12089
  const shop = "_shop_5si5d_145";
12062
12090
  const styles$e = {
12063
12091
  page,
12064
- content,
12092
+ content: content$1,
12065
12093
  intro,
12066
12094
  productInfo,
12067
12095
  titlePrice,
@@ -12837,15 +12865,16 @@ function ClaimScreenNav({ crumbs: crumbs2, tone }) {
12837
12865
  useSetScreenNav(crumbs2, tone);
12838
12866
  return null;
12839
12867
  }
12840
- const pcp = "_pcp_1rio4_6";
12841
- const blocks = "_blocks_1rio4_24";
12842
- const featured = "_featured_1rio4_36";
12843
- const gridBlock = "_gridBlock_1rio4_37";
12844
- const blockTitle = "_blockTitle_1rio4_44";
12845
- const grid = "_grid_1rio4_37";
12846
- const block = "_block_1rio4_24";
12847
- const phoneOnly$2 = "_phoneOnly_1rio4_65";
12848
- const wideOnly$1 = "_wideOnly_1rio4_69";
12868
+ const pcp = "_pcp_1x54p_6";
12869
+ const blocks = "_blocks_1x54p_24";
12870
+ const featured = "_featured_1x54p_36";
12871
+ const gridBlock = "_gridBlock_1x54p_37";
12872
+ const blockTitle = "_blockTitle_1x54p_44";
12873
+ const grid = "_grid_1x54p_37";
12874
+ const block = "_block_1x54p_24";
12875
+ const phoneOnly$2 = "_phoneOnly_1x54p_65";
12876
+ const wideOnly$1 = "_wideOnly_1x54p_69";
12877
+ const wideItem = "_wideItem_1x54p_111";
12849
12878
  const styles$6 = {
12850
12879
  pcp,
12851
12880
  blocks,
@@ -12855,9 +12884,10 @@ const styles$6 = {
12855
12884
  grid,
12856
12885
  block,
12857
12886
  phoneOnly: phoneOnly$2,
12858
- wideOnly: wideOnly$1
12887
+ wideOnly: wideOnly$1,
12888
+ wideItem
12859
12889
  };
12860
- function Block({ block: block2 }) {
12890
+ function Block({ block: block2, lead = [] }) {
12861
12891
  const t = useT();
12862
12892
  switch (block2.kind) {
12863
12893
  case "rail":
@@ -12899,13 +12929,21 @@ function Block({ block: block2 }) {
12899
12929
  children: [block2.title && jsx("h2", {
12900
12930
  className: styles$6.blockTitle,
12901
12931
  children: t(block2.title)
12902
- }), jsx("ul", {
12932
+ }), jsxs("ul", {
12903
12933
  className: styles$6.grid,
12904
- children: block2.products.map((p) => jsx("li", {
12934
+ children: [lead.map(({ product, flag }) => jsx("li", {
12935
+ className: styles$6.wideItem,
12936
+ children: jsx(ProductTile, {
12937
+ product,
12938
+ ...flag ? {
12939
+ flag: t(flag)
12940
+ } : {}
12941
+ })
12942
+ }, product.sku)), block2.products.map((p) => jsx("li", {
12905
12943
  children: jsx(ProductTile, {
12906
12944
  product: p
12907
12945
  })
12908
- }, p.sku))
12946
+ }, p.sku))]
12909
12947
  })]
12910
12948
  });
12911
12949
  case "review":
@@ -12937,6 +12975,28 @@ function Block({ block: block2 }) {
12937
12975
  }
12938
12976
  }
12939
12977
  const PHONE_ONLY_KINDS = /* @__PURE__ */ new Set(["rail", "product_gallery", "featured", "why_us"]);
12978
+ function leadOf(blocks2, grid2) {
12979
+ const target = blocks2[grid2];
12980
+ if (!target || target.kind !== "grid") return [];
12981
+ const seen = new Set(target.products.map((p) => p.sku));
12982
+ const lead = [];
12983
+ const add = (product, flag) => {
12984
+ if (seen.has(product.sku)) return;
12985
+ seen.add(product.sku);
12986
+ lead.push(flag ? {
12987
+ product,
12988
+ flag
12989
+ } : {
12990
+ product
12991
+ });
12992
+ };
12993
+ for (const block2 of blocks2) {
12994
+ if (block2.kind === "product_gallery") add(block2.product, block2.title || void 0);
12995
+ else if (block2.kind === "featured") add(block2.product);
12996
+ else if (block2.kind === "rail") block2.products.forEach((p) => add(p));
12997
+ }
12998
+ return lead;
12999
+ }
12940
13000
  function statementIndex(blocks2) {
12941
13001
  const image2 = blocks2.findIndex((b) => b.kind === "lifestyle_image");
12942
13002
  if (image2 > 0 && blocks2[image2 - 1]?.kind === "lifestyle_text") return image2 - 1;
@@ -12957,6 +13017,8 @@ function CategoryNav({ title: title2 }) {
12957
13017
  }
12958
13018
  function CategoryContent({ page: page2 }) {
12959
13019
  const statement = statementIndex(page2.blocks);
13020
+ const grid2 = page2.blocks.findIndex((b) => b.kind === "grid");
13021
+ const lead = leadOf(page2.blocks, grid2);
12960
13022
  return jsxs(ShopSurface, {
12961
13023
  tone: "dark",
12962
13024
  fill: true,
@@ -12972,7 +13034,10 @@ function CategoryContent({ page: page2 }) {
12972
13034
  className: styles$6.block,
12973
13035
  "data-wide": PHONE_ONLY_KINDS.has(block2.kind) || block2.kind === "lifestyle_text" && i !== statement ? "off" : "on",
12974
13036
  children: jsx(Block, {
12975
- block: block2
13037
+ block: block2,
13038
+ ...i === grid2 ? {
13039
+ lead
13040
+ } : {}
12976
13041
  })
12977
13042
  }, i))
12978
13043
  })]
@@ -13145,71 +13210,1482 @@ function ProductView({ sku, initialData, showRecommendations = true, onNotFound
13145
13210
  })
13146
13211
  });
13147
13212
  }
13148
- const hero$1 = "_hero_dctyt_1";
13149
- const image$1 = "_image_dctyt_11";
13150
- const foot = "_foot_dctyt_34";
13151
- const text$1 = "_text_dctyt_40";
13152
- const logo$1 = "_logo_dctyt_48";
13153
- const copy$1 = "_copy_dctyt_53";
13154
- const headline = "_headline_dctyt_62";
13155
- const body = "_body_dctyt_70";
13156
- const cta$2 = "_cta_dctyt_79";
13157
- const video = "_video_dctyt_83";
13158
- const desktopOnly = "_desktopOnly_dctyt_87";
13159
- const phoneOnly$1 = "_phoneOnly_dctyt_97";
13160
- const hero$2 = {
13161
- hero: hero$1,
13162
- image: image$1,
13163
- foot,
13164
- text: text$1,
13165
- logo: logo$1,
13166
- copy: copy$1,
13167
- headline,
13168
- body,
13169
- cta: cta$2,
13170
- video,
13171
- desktopOnly,
13172
- phoneOnly: phoneOnly$1
13173
- };
13174
- function VipHero({ hero: hero2, onContinue }) {
13175
- const t = useT();
13176
- const assetUrl = useAssetUrl();
13177
- const ref = useRef(null);
13178
- useTopOffset(ref, "--vip-hero-top");
13179
- const desktopImage = hero2.desktop_image ?? null;
13180
- const desktopVideo = hero2.desktop_video ?? null;
13181
- const wide2 = desktopImage !== null || desktopVideo !== null;
13182
- return jsx(ShopSurface, {
13183
- tone: "dark",
13184
- fill: true,
13185
- "data-shop-layout": "wide",
13186
- children: jsxs("section", {
13187
- ref,
13188
- className: hero$2.hero,
13189
- children: [hero2.image && jsx("div", {
13190
- className: [hero$2.image, wide2 ? hero$2.phoneOnly : ""].join(" "),
13191
- children: jsx(ShopImage, {
13192
- src: hero2.image,
13193
- alt: "",
13194
- fill: true,
13195
- sizes: "(max-width: 480px) 100vw, 480px",
13196
- priority: true
13197
- })
13198
- }), wide2 && jsxs("div", {
13199
- className: [hero$2.image, hero$2.desktopOnly].join(" "),
13200
- children: [desktopImage && jsx(ShopImage, {
13201
- src: desktopImage,
13202
- alt: "",
13203
- fill: true,
13204
- sizes: "100vw"
13205
- }), desktopVideo && jsx(ShopVideo, {
13206
- src: desktopVideo,
13207
- ...desktopImage ? {
13208
- poster: desktopImage
13209
- } : {},
13210
- fill: true,
13211
- className: hero$2.video
13212
- })]
13213
+ var dist = {};
13214
+ var money = {};
13215
+ var hasRequiredMoney;
13216
+ function requireMoney() {
13217
+ if (hasRequiredMoney) return money;
13218
+ hasRequiredMoney = 1;
13219
+ (function(exports) {
13220
+ Object.defineProperty(exports, "__esModule", {
13221
+ value: true
13222
+ });
13223
+ exports.Money = exports.Currency = void 0;
13224
+ const zod_1 = requireZod();
13225
+ exports.Currency = zod_1.z.string().regex(/^[A-Z]{3}$/, "currency must be an ISO-4217 alpha-3 code (e.g. GBP)");
13226
+ exports.Money = zod_1.z.object({
13227
+ amount: zod_1.z.number().int("amount must be an integer number of minor units (no floats)"),
13228
+ currency: exports.Currency
13229
+ }).strict();
13230
+ })(money);
13231
+ return money;
13232
+ }
13233
+ var ids = {};
13234
+ var hasRequiredIds;
13235
+ function requireIds() {
13236
+ if (hasRequiredIds) return ids;
13237
+ hasRequiredIds = 1;
13238
+ Object.defineProperty(ids, "__esModule", {
13239
+ value: true
13240
+ });
13241
+ ids.RequestId = ids.EventId = ids.OrderRef = ids.CheckoutId = ids.CartId = ids.UserId = void 0;
13242
+ ids.prefixedId = prefixedId;
13243
+ const zod_1 = requireZod();
13244
+ function prefixedId(prefix, _brand) {
13245
+ return zod_1.z.string().regex(new RegExp(`^${prefix}[A-Za-z0-9._-]+$`), `must be a '${prefix}…' identifier`).brand();
13246
+ }
13247
+ ids.UserId = prefixedId("usr_");
13248
+ ids.CartId = prefixedId("cart_");
13249
+ ids.CheckoutId = prefixedId("chk_");
13250
+ ids.OrderRef = zod_1.z.string().regex(/^(?:ord_[A-Za-z0-9._-]+|\d+)$/, "must be an 'ord_…' identifier or a numeric order reference").brand();
13251
+ ids.EventId = prefixedId("evt_");
13252
+ ids.RequestId = prefixedId("req_");
13253
+ return ids;
13254
+ }
13255
+ var common = {};
13256
+ var hasRequiredCommon;
13257
+ function requireCommon() {
13258
+ if (hasRequiredCommon) return common;
13259
+ hasRequiredCommon = 1;
13260
+ (function(exports) {
13261
+ Object.defineProperty(exports, "__esModule", {
13262
+ value: true
13263
+ });
13264
+ exports.Pricing = exports.Address = exports.PaginationParams = exports.Page = exports.Attributes = exports.MarketQuery = exports.LanguageTag = exports.CountryCode = exports.Sku = exports.Url = exports.Timestamp = void 0;
13265
+ const zod_1 = requireZod();
13266
+ const money_1 = requireMoney();
13267
+ exports.Timestamp = zod_1.z.string().datetime({
13268
+ offset: true
13269
+ });
13270
+ exports.Url = zod_1.z.string().url();
13271
+ exports.Sku = zod_1.z.string().min(1);
13272
+ exports.CountryCode = zod_1.z.string().regex(/^[A-Z]{2}$/, "country must be an ISO-3166-1 alpha-2 code (e.g. GB)");
13273
+ exports.LanguageTag = zod_1.z.string().regex(/^[a-z]{2}(-[A-Z]{2})?$/, "lang must be an IETF language tag (e.g. en, es, en-GB)");
13274
+ exports.MarketQuery = zod_1.z.object({
13275
+ country: exports.CountryCode.optional(),
13276
+ lang: exports.LanguageTag.optional()
13277
+ });
13278
+ exports.Attributes = zod_1.z.record(zod_1.z.string(), zod_1.z.string());
13279
+ exports.Page = zod_1.z.object({
13280
+ cursor: zod_1.z.string().nullable(),
13281
+ has_more: zod_1.z.boolean()
13282
+ });
13283
+ exports.PaginationParams = zod_1.z.object({
13284
+ cursor: zod_1.z.string().optional(),
13285
+ limit: zod_1.z.number().int().positive().max(100).optional()
13286
+ });
13287
+ exports.Address = zod_1.z.object({
13288
+ name: zod_1.z.string().min(1),
13289
+ line1: zod_1.z.string().min(1),
13290
+ line2: zod_1.z.string().optional(),
13291
+ city: zod_1.z.string().min(1),
13292
+ region: zod_1.z.string().optional(),
13293
+ postcode: zod_1.z.string().min(1),
13294
+ country: exports.CountryCode
13295
+ });
13296
+ exports.Pricing = zod_1.z.object({
13297
+ subtotal: money_1.Money,
13298
+ shipping: money_1.Money,
13299
+ tax: money_1.Money,
13300
+ total: money_1.Money
13301
+ });
13302
+ })(common);
13303
+ return common;
13304
+ }
13305
+ var session = {};
13306
+ var hasRequiredSession;
13307
+ function requireSession() {
13308
+ if (hasRequiredSession) return session;
13309
+ hasRequiredSession = 1;
13310
+ (function(exports) {
13311
+ Object.defineProperty(exports, "__esModule", {
13312
+ value: true
13313
+ });
13314
+ exports.ShopSessionResponse = exports.ShopSessionProduct = exports.ShopSessionRequest = exports.SessionExchangeResponse = exports.SessionExchangeRequest = void 0;
13315
+ const zod_1 = requireZod();
13316
+ const ids_1 = requireIds();
13317
+ exports.SessionExchangeRequest = zod_1.z.object({
13318
+ token: zod_1.z.string().min(1)
13319
+ }).strict();
13320
+ exports.SessionExchangeResponse = zod_1.z.object({
13321
+ user_id: ids_1.UserId
13322
+ });
13323
+ exports.ShopSessionRequest = zod_1.z.object({
13324
+ session: zod_1.z.string().min(1),
13325
+ code: zod_1.z.string().min(1)
13326
+ }).strict();
13327
+ exports.ShopSessionProduct = zod_1.z.object({
13328
+ id: zod_1.z.string(),
13329
+ vendor_id: zod_1.z.string(),
13330
+ title: zod_1.z.string()
13331
+ });
13332
+ exports.ShopSessionResponse = zod_1.z.object({
13333
+ shop_session_id: zod_1.z.string(),
13334
+ session_token: zod_1.z.string(),
13335
+ expires_at: zod_1.z.number().int(),
13336
+ email: zod_1.z.string().optional(),
13337
+ product: exports.ShopSessionProduct.nullish()
13338
+ });
13339
+ })(session);
13340
+ return session;
13341
+ }
13342
+ var catalog = {};
13343
+ var hasRequiredCatalog;
13344
+ function requireCatalog() {
13345
+ if (hasRequiredCatalog) return catalog;
13346
+ hasRequiredCatalog = 1;
13347
+ (function(exports) {
13348
+ Object.defineProperty(exports, "__esModule", {
13349
+ value: true
13350
+ });
13351
+ exports.CatalogReadQuery = exports.ListProductsQuery = exports.RecommendationsResponse = exports.ProductListResponse = exports.Product = exports.SizeGuide = exports.SizeGuideMeasurement = exports.SizeChartUnit = exports.ProductPromo = exports.ProductVariant = void 0;
13352
+ const zod_1 = requireZod();
13353
+ const money_1 = requireMoney();
13354
+ const common_1 = requireCommon();
13355
+ exports.ProductVariant = zod_1.z.object({
13356
+ sku: common_1.Sku,
13357
+ attributes: common_1.Attributes,
13358
+ in_stock: zod_1.z.boolean(),
13359
+ image: common_1.Url.optional(),
13360
+ available: zod_1.z.number().int().nonnegative().optional()
13361
+ });
13362
+ exports.ProductPromo = zod_1.z.object({
13363
+ message: zod_1.z.string(),
13364
+ ends_at: common_1.Timestamp.optional()
13365
+ });
13366
+ exports.SizeChartUnit = zod_1.z.enum(["cm", "in"]);
13367
+ exports.SizeGuideMeasurement = zod_1.z.object({
13368
+ label: zod_1.z.string().min(1),
13369
+ description: zod_1.z.string().min(1)
13370
+ });
13371
+ exports.SizeGuide = zod_1.z.object({
13372
+ title: zod_1.z.string(),
13373
+ subtitle: zod_1.z.string().min(1).optional(),
13374
+ columns: zod_1.z.array(zod_1.z.string()).optional(),
13375
+ rows: zod_1.z.array(zod_1.z.array(zod_1.z.string())).optional(),
13376
+ unit: exports.SizeChartUnit.optional(),
13377
+ note: zod_1.z.string().min(1).optional(),
13378
+ measurements: zod_1.z.array(exports.SizeGuideMeasurement).optional(),
13379
+ fabric: zod_1.z.string().min(1).optional(),
13380
+ notes: zod_1.z.array(zod_1.z.string()).optional()
13381
+ });
13382
+ exports.Product = zod_1.z.object({
13383
+ sku: common_1.Sku,
13384
+ title: zod_1.z.string(),
13385
+ category: zod_1.z.string(),
13386
+ price: money_1.Money,
13387
+ compare_at: money_1.Money.optional(),
13388
+ media: zod_1.z.array(common_1.Url),
13389
+ media_by_colour: zod_1.z.record(zod_1.z.string(), zod_1.z.array(common_1.Url)).optional(),
13390
+ variants: zod_1.z.array(exports.ProductVariant),
13391
+ description: zod_1.z.string().optional(),
13392
+ badges: zod_1.z.array(zod_1.z.string()).optional(),
13393
+ promo: exports.ProductPromo.optional(),
13394
+ size_guide: exports.SizeGuide.optional()
13395
+ });
13396
+ exports.ProductListResponse = zod_1.z.object({
13397
+ data: zod_1.z.array(exports.Product),
13398
+ page: common_1.Page
13399
+ });
13400
+ exports.RecommendationsResponse = zod_1.z.object({
13401
+ data: zod_1.z.array(exports.Product)
13402
+ });
13403
+ exports.ListProductsQuery = common_1.MarketQuery.extend({
13404
+ category: zod_1.z.string().optional(),
13405
+ cursor: zod_1.z.string().optional(),
13406
+ limit: zod_1.z.number().int().positive().max(100).optional()
13407
+ });
13408
+ exports.CatalogReadQuery = common_1.MarketQuery;
13409
+ })(catalog);
13410
+ return catalog;
13411
+ }
13412
+ var content = {};
13413
+ var hasRequiredContent;
13414
+ function requireContent() {
13415
+ if (hasRequiredContent) return content;
13416
+ hasRequiredContent = 1;
13417
+ (function(exports) {
13418
+ Object.defineProperty(exports, "__esModule", {
13419
+ value: true
13420
+ });
13421
+ exports.HomeContent = exports.HomeSlide = exports.CategoryPage = exports.CategoryBlock = exports.ProductGalleryBlock = exports.ExploreBlock = exports.WhyUsBlock = exports.ReviewBlock = exports.GridBlock = exports.LifestyleImageBlock = exports.FeaturedBlock = exports.LifestyleTextBlock = exports.RailBlock = exports.CategoryHero = void 0;
13422
+ const zod_1 = requireZod();
13423
+ const common_1 = requireCommon();
13424
+ const catalog_1 = requireCatalog();
13425
+ exports.CategoryHero = zod_1.z.object({
13426
+ title: zod_1.z.string(),
13427
+ subtitle: zod_1.z.string().optional(),
13428
+ image: common_1.Url.optional(),
13429
+ desktop_image: common_1.Url.optional()
13430
+ });
13431
+ exports.RailBlock = zod_1.z.object({
13432
+ kind: zod_1.z.literal("rail"),
13433
+ title: zod_1.z.string(),
13434
+ products: zod_1.z.array(catalog_1.Product)
13435
+ });
13436
+ exports.LifestyleTextBlock = zod_1.z.object({
13437
+ kind: zod_1.z.literal("lifestyle_text"),
13438
+ text: zod_1.z.string(),
13439
+ align: zod_1.z.enum(["center", "left"]).default("center")
13440
+ });
13441
+ exports.FeaturedBlock = zod_1.z.object({
13442
+ kind: zod_1.z.literal("featured"),
13443
+ title: zod_1.z.string().min(1).optional(),
13444
+ product: catalog_1.Product
13445
+ });
13446
+ exports.LifestyleImageBlock = zod_1.z.object({
13447
+ kind: zod_1.z.literal("lifestyle_image"),
13448
+ images: zod_1.z.array(common_1.Url).min(1),
13449
+ videos: zod_1.z.array(common_1.Url.nullable()).optional(),
13450
+ desktop_images: zod_1.z.array(common_1.Url.nullable()).optional()
13451
+ });
13452
+ exports.GridBlock = zod_1.z.object({
13453
+ kind: zod_1.z.literal("grid"),
13454
+ title: zod_1.z.string().min(1).optional(),
13455
+ products: zod_1.z.array(catalog_1.Product)
13456
+ });
13457
+ exports.ReviewBlock = zod_1.z.object({
13458
+ kind: zod_1.z.literal("review"),
13459
+ quotes: zod_1.z.array(zod_1.z.object({
13460
+ quote: zod_1.z.string(),
13461
+ author: zod_1.z.string()
13462
+ })).min(1),
13463
+ disclaimer: zod_1.z.string().min(1).optional()
13464
+ });
13465
+ exports.WhyUsBlock = zod_1.z.object({
13466
+ kind: zod_1.z.literal("why_us"),
13467
+ items: zod_1.z.array(zod_1.z.object({
13468
+ icon: zod_1.z.enum(["payment", "delivery", "returns"]).optional(),
13469
+ title: zod_1.z.string(),
13470
+ body: zod_1.z.string()
13471
+ })).min(1)
13472
+ });
13473
+ exports.ExploreBlock = zod_1.z.object({
13474
+ kind: zod_1.z.literal("explore"),
13475
+ title: zod_1.z.string(),
13476
+ links: zod_1.z.array(zod_1.z.object({
13477
+ label: zod_1.z.string(),
13478
+ code: zod_1.z.string()
13479
+ })).min(1)
13480
+ });
13481
+ exports.ProductGalleryBlock = zod_1.z.object({
13482
+ kind: zod_1.z.literal("product_gallery"),
13483
+ title: zod_1.z.string().min(1),
13484
+ product: catalog_1.Product
13485
+ });
13486
+ exports.CategoryBlock = zod_1.z.discriminatedUnion("kind", [exports.RailBlock, exports.LifestyleTextBlock, exports.FeaturedBlock, exports.ProductGalleryBlock, exports.LifestyleImageBlock, exports.GridBlock, exports.ReviewBlock, exports.WhyUsBlock, exports.ExploreBlock]);
13487
+ exports.CategoryPage = zod_1.z.object({
13488
+ code: zod_1.z.string(),
13489
+ hero: exports.CategoryHero,
13490
+ blocks: zod_1.z.array(exports.CategoryBlock)
13491
+ });
13492
+ exports.HomeSlide = zod_1.z.object({
13493
+ key: zod_1.z.string().min(1),
13494
+ title: zod_1.z.string().min(1),
13495
+ subtitle: zod_1.z.string(),
13496
+ cta: zod_1.z.string().min(1),
13497
+ target: zod_1.z.string().min(1).optional(),
13498
+ image: zod_1.z.string().min(1).optional(),
13499
+ video: zod_1.z.string().min(1).optional(),
13500
+ desktop_image: zod_1.z.string().min(1).optional(),
13501
+ focal_y: zod_1.z.number().int().min(0).max(100).optional()
13502
+ });
13503
+ exports.HomeContent = zod_1.z.object({
13504
+ slides: zod_1.z.array(exports.HomeSlide)
13505
+ });
13506
+ })(content);
13507
+ return content;
13508
+ }
13509
+ var inventory = {};
13510
+ var hasRequiredInventory;
13511
+ function requireInventory() {
13512
+ if (hasRequiredInventory) return inventory;
13513
+ hasRequiredInventory = 1;
13514
+ Object.defineProperty(inventory, "__esModule", {
13515
+ value: true
13516
+ });
13517
+ inventory.Inventory = void 0;
13518
+ const zod_1 = requireZod();
13519
+ const common_1 = requireCommon();
13520
+ inventory.Inventory = zod_1.z.object({
13521
+ sku: common_1.Sku,
13522
+ available: zod_1.z.number().int().nonnegative(),
13523
+ in_stock: zod_1.z.boolean()
13524
+ });
13525
+ return inventory;
13526
+ }
13527
+ var cart = {};
13528
+ var vip = {};
13529
+ var hasRequiredVip;
13530
+ function requireVip() {
13531
+ if (hasRequiredVip) return vip;
13532
+ hasRequiredVip = 1;
13533
+ (function(exports) {
13534
+ Object.defineProperty(exports, "__esModule", {
13535
+ value: true
13536
+ });
13537
+ 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;
13538
+ const zod_1 = requireZod();
13539
+ const common_1 = requireCommon();
13540
+ const ids_1 = requireIds();
13541
+ exports.VipInviteRef = (0, ids_1.prefixedId)("vip_", "VipInviteRef");
13542
+ exports.VIP_TOKEN_PATTERN = /^[A-Za-z0-9_-]{43}$/;
13543
+ exports.VipDeliveryRule = zod_1.z.enum(["both_free", "standard_free", "both_paid"]);
13544
+ exports.VipInviteResolveRequest = zod_1.z.union([zod_1.z.object({
13545
+ token: zod_1.z.string().regex(exports.VIP_TOKEN_PATTERN)
13546
+ }).strict(), zod_1.z.object({
13547
+ invite_ref: exports.VipInviteRef
13548
+ }).strict()]);
13549
+ exports.VipInviteOffer = zod_1.z.object({
13550
+ product_sku: common_1.Sku,
13551
+ quantity: zod_1.z.number().int().positive()
13552
+ });
13553
+ exports.VipHero = zod_1.z.object({
13554
+ image: common_1.Url.nullable(),
13555
+ desktop_image: common_1.Url.nullable().optional(),
13556
+ desktop_video: common_1.Url.nullable().optional(),
13557
+ headline: zod_1.z.string(),
13558
+ body: zod_1.z.string().nullable(),
13559
+ cta_label: zod_1.z.string()
13560
+ });
13561
+ exports.VipInviteView = zod_1.z.discriminatedUnion("state", [zod_1.z.object({
13562
+ state: zod_1.z.literal("active"),
13563
+ invite_ref: exports.VipInviteRef,
13564
+ recipient_name: zod_1.z.string(),
13565
+ personal_message: zod_1.z.string().nullable(),
13566
+ delivery_rule: exports.VipDeliveryRule,
13567
+ expires_at: common_1.Timestamp,
13568
+ items: zod_1.z.array(exports.VipInviteOffer).min(1),
13569
+ hero: exports.VipHero.nullable().optional()
13570
+ }), zod_1.z.object({
13571
+ state: zod_1.z.literal("scheduled"),
13572
+ opens_at: common_1.Timestamp
13573
+ }), zod_1.z.object({
13574
+ state: zod_1.z.literal("claimed"),
13575
+ order_ref: ids_1.OrderRef.optional()
13576
+ }), zod_1.z.object({
13577
+ state: zod_1.z.literal("expired")
13578
+ }), zod_1.z.object({
13579
+ state: zod_1.z.literal("revoked")
13580
+ })]);
13581
+ const VipCartLine = {
13582
+ sku: common_1.Sku,
13583
+ qty: zod_1.z.number().int().positive().max(99)
13584
+ };
13585
+ exports.VipCartItemRequest = zod_1.z.union([zod_1.z.object({
13586
+ token: zod_1.z.string().regex(exports.VIP_TOKEN_PATTERN),
13587
+ ...VipCartLine
13588
+ }).strict(), zod_1.z.object({
13589
+ invite_ref: exports.VipInviteRef,
13590
+ ...VipCartLine
13591
+ }).strict()]);
13592
+ exports.VipClaimLine = zod_1.z.object({
13593
+ sku: common_1.Sku,
13594
+ qty: zod_1.z.number().int().positive()
13595
+ }).strict();
13596
+ exports.VipClaimRequest = zod_1.z.object({
13597
+ invite_ref: exports.VipInviteRef,
13598
+ dazn_user_id: zod_1.z.string().min(1).max(200),
13599
+ lines: zod_1.z.array(exports.VipClaimLine).min(1).max(50)
13600
+ }).strict();
13601
+ exports.VipClaimRefusalReason = zod_1.z.enum(["unknown", "revoked", "expired", "not_yet_valid", "claimed_by_another", "already_ordered", "outside_entitlement"]);
13602
+ exports.VipClaimResponse = zod_1.z.discriminatedUnion("result", [zod_1.z.object({
13603
+ result: zod_1.z.literal("claimed"),
13604
+ invite_ref: exports.VipInviteRef
13605
+ }), zod_1.z.object({
13606
+ result: zod_1.z.literal("refused"),
13607
+ invite_ref: exports.VipInviteRef,
13608
+ reason: exports.VipClaimRefusalReason
13609
+ })]);
13610
+ })(vip);
13611
+ return vip;
13612
+ }
13613
+ var hasRequiredCart;
13614
+ function requireCart() {
13615
+ if (hasRequiredCart) return cart;
13616
+ hasRequiredCart = 1;
13617
+ (function(exports) {
13618
+ Object.defineProperty(exports, "__esModule", {
13619
+ value: true
13620
+ });
13621
+ exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.CartMarketQuery = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
13622
+ const zod_1 = requireZod();
13623
+ const money_1 = requireMoney();
13624
+ const ids_1 = requireIds();
13625
+ const money_2 = requireMoney();
13626
+ const common_1 = requireCommon();
13627
+ const vip_1 = requireVip();
13628
+ exports.CartItem = zod_1.z.object({
13629
+ sku: common_1.Sku,
13630
+ qty: zod_1.z.number().int().positive(),
13631
+ unit_price: money_1.Money,
13632
+ line_total: money_1.Money,
13633
+ compare_at_unit_price: money_1.Money.optional(),
13634
+ title: zod_1.z.string().optional(),
13635
+ image: common_1.Url.optional(),
13636
+ attributes: common_1.Attributes.optional(),
13637
+ available: zod_1.z.number().int().nonnegative().optional()
13638
+ });
13639
+ exports.CartTotals = common_1.Pricing.extend({
13640
+ discount: money_1.Money.optional(),
13641
+ subtotal_before_discount: money_1.Money.optional()
13642
+ });
13643
+ exports.CartLockReason = zod_1.z.enum(["checkout_handoff"]);
13644
+ exports.CartLock = zod_1.z.object({
13645
+ since: zod_1.z.string().datetime(),
13646
+ expires_at: zod_1.z.string().datetime().optional(),
13647
+ reason: exports.CartLockReason
13648
+ });
13649
+ exports.CartHold = zod_1.z.object({
13650
+ taken_at: zod_1.z.string().datetime(),
13651
+ expires_at: zod_1.z.string().datetime()
13652
+ });
13653
+ exports.HiddenSummaryLine = zod_1.z.enum(["tax", "shipping"]);
13654
+ exports.Cart = zod_1.z.object({
13655
+ cart_id: ids_1.CartId,
13656
+ currency: money_2.Currency,
13657
+ items: zod_1.z.array(exports.CartItem),
13658
+ totals: exports.CartTotals,
13659
+ locked: exports.CartLock.optional(),
13660
+ hold: exports.CartHold.optional(),
13661
+ hidden_lines: zod_1.z.array(exports.HiddenSummaryLine).optional(),
13662
+ vip: zod_1.z.object({
13663
+ invite_ref: vip_1.VipInviteRef
13664
+ }).optional()
13665
+ });
13666
+ exports.CartMarketQuery = common_1.MarketQuery;
13667
+ exports.AddCartItemRequest = zod_1.z.object({
13668
+ sku: common_1.Sku,
13669
+ qty: zod_1.z.number().int().positive()
13670
+ }).strict();
13671
+ exports.UpdateCartItemRequest = zod_1.z.object({
13672
+ qty: zod_1.z.number().int().positive()
13673
+ }).strict();
13674
+ exports.CartHandoffResponse = zod_1.z.object({
13675
+ checkout_url: zod_1.z.string().url()
13676
+ });
13677
+ exports.PartnerCartItem = zod_1.z.object({
13678
+ variantId: common_1.Sku,
13679
+ price: zod_1.z.number().nonnegative(),
13680
+ quantity: zod_1.z.number().int().positive()
13681
+ });
13682
+ exports.PartnerCart = zod_1.z.object({
13683
+ cart_id: ids_1.CartId,
13684
+ partner_id: zod_1.z.string().min(1),
13685
+ currency: money_2.Currency,
13686
+ version: zod_1.z.number().int().nonnegative(),
13687
+ items: zod_1.z.array(exports.CartItem),
13688
+ cart_items: zod_1.z.array(exports.PartnerCartItem),
13689
+ totals: exports.CartTotals,
13690
+ locked: exports.CartLock.optional(),
13691
+ vip_invite_ref: vip_1.VipInviteRef.optional()
13692
+ });
13693
+ })(cart);
13694
+ return cart;
13695
+ }
13696
+ var orders = {};
13697
+ var hasRequiredOrders;
13698
+ function requireOrders() {
13699
+ if (hasRequiredOrders) return orders;
13700
+ hasRequiredOrders = 1;
13701
+ (function(exports) {
13702
+ Object.defineProperty(exports, "__esModule", {
13703
+ value: true
13704
+ });
13705
+ exports.OrderIntakeResponse = exports.OrderRefundRequest = exports.RefundReason = exports.OrderCancelRequest = exports.OrderLineAction = exports.CancelReason = exports.OrderPlacedRequest = exports.OrderPaymentSummary = exports.OrderTotals = exports.OrderCustomer = exports.OrderLine = exports.OrderEventEnvelope = void 0;
13706
+ const zod_1 = requireZod();
13707
+ const money_1 = requireMoney();
13708
+ const ids_1 = requireIds();
13709
+ const common_1 = requireCommon();
13710
+ const vip_1 = requireVip();
13711
+ exports.OrderEventEnvelope = zod_1.z.object({
13712
+ event_id: ids_1.EventId,
13713
+ occurred_at: common_1.Timestamp
13714
+ });
13715
+ exports.OrderLine = zod_1.z.object({
13716
+ line_ref: zod_1.z.string().min(1),
13717
+ sku: common_1.Sku,
13718
+ qty: zod_1.z.number().int().positive(),
13719
+ unit_price: money_1.Money,
13720
+ line_total: money_1.Money,
13721
+ compare_at_unit_price: money_1.Money.optional(),
13722
+ title: zod_1.z.string().optional()
13723
+ });
13724
+ exports.OrderCustomer = zod_1.z.object({
13725
+ customer_ref: zod_1.z.string().min(1),
13726
+ name: zod_1.z.string().min(1).optional(),
13727
+ email: zod_1.z.string().email().optional(),
13728
+ phone: zod_1.z.string().min(1).optional()
13729
+ });
13730
+ exports.OrderTotals = zod_1.z.object({
13731
+ items: money_1.Money,
13732
+ shipping: money_1.Money,
13733
+ tax: money_1.Money,
13734
+ discount: money_1.Money.optional(),
13735
+ grand_total: money_1.Money
13736
+ });
13737
+ exports.OrderPaymentSummary = zod_1.z.object({
13738
+ brand: zod_1.z.string().min(1),
13739
+ last4: zod_1.z.string().regex(/^\d{4}$/).optional()
13740
+ });
13741
+ exports.OrderPlacedRequest = exports.OrderEventEnvelope.extend({
13742
+ order_ref: ids_1.OrderRef.optional(),
13743
+ placed_at: common_1.Timestamp,
13744
+ currency: money_1.Currency,
13745
+ customer: exports.OrderCustomer,
13746
+ ship_to: common_1.Address,
13747
+ lines: zod_1.z.array(exports.OrderLine).min(1),
13748
+ totals: exports.OrderTotals,
13749
+ payment: exports.OrderPaymentSummary.optional(),
13750
+ vip_invite_ref: vip_1.VipInviteRef.optional()
13751
+ }).strict();
13752
+ exports.CancelReason = zod_1.z.enum(["customer_request", "payment_failed", "fraud", "unfulfillable", "other"]);
13753
+ exports.OrderLineAction = zod_1.z.object({
13754
+ line_ref: zod_1.z.string().min(1),
13755
+ qty: zod_1.z.number().int().positive()
13756
+ });
13757
+ exports.OrderCancelRequest = exports.OrderEventEnvelope.extend({
13758
+ reason: exports.CancelReason,
13759
+ note: zod_1.z.string().max(500).optional(),
13760
+ lines: zod_1.z.array(exports.OrderLineAction).min(1)
13761
+ }).strict();
13762
+ exports.RefundReason = zod_1.z.enum(["customer_request", "return", "damaged", "not_delivered", "goodwill", "other"]);
13763
+ exports.OrderRefundRequest = exports.OrderEventEnvelope.extend({
13764
+ reason: exports.RefundReason,
13765
+ note: zod_1.z.string().max(500).optional(),
13766
+ amount: money_1.Money,
13767
+ restock: zod_1.z.boolean(),
13768
+ lines: zod_1.z.array(exports.OrderLineAction).min(1)
13769
+ }).strict();
13770
+ exports.OrderIntakeResponse = zod_1.z.object({
13771
+ order_ref: ids_1.OrderRef,
13772
+ event_id: ids_1.EventId,
13773
+ status: zod_1.z.enum(["accepted", "duplicate"]),
13774
+ received_at: common_1.Timestamp
13775
+ });
13776
+ })(orders);
13777
+ return orders;
13778
+ }
13779
+ var orderTracking = {};
13780
+ var hasRequiredOrderTracking;
13781
+ function requireOrderTracking() {
13782
+ if (hasRequiredOrderTracking) return orderTracking;
13783
+ hasRequiredOrderTracking = 1;
13784
+ (function(exports) {
13785
+ Object.defineProperty(exports, "__esModule", {
13786
+ value: true
13787
+ });
13788
+ exports.ReturnDetail = exports.ReturnItem = exports.ReturnProgressEntry = exports.CreateReturnRequest = exports.ReturnRequestItem = exports.RecordedReturnReason = exports.FanReturnReason = exports.RequestCancellationRequest = exports.FanCancelReason = exports.OrderDetail = exports.ReturnSummary = exports.OrderList = exports.ReturnSummaryItem = exports.OrderSummaryItem = exports.ReturnOutcome = exports.ReturnStatus = exports.OrderItem = exports.OrderTracking = exports.OrderProgressEntry = exports.OrderProgressStep = void 0;
13789
+ const zod_1 = requireZod();
13790
+ const money_1 = requireMoney();
13791
+ const ids_1 = requireIds();
13792
+ const common_1 = requireCommon();
13793
+ const orders_1 = requireOrders();
13794
+ const vip_1 = requireVip();
13795
+ exports.OrderProgressStep = zod_1.z.enum(["packing", "on_its_way", "out_for_delivery", "delivered", "cancelled"]);
13796
+ exports.OrderProgressEntry = zod_1.z.object({
13797
+ step: exports.OrderProgressStep,
13798
+ label: zod_1.z.string().min(1),
13799
+ at: common_1.Timestamp.optional(),
13800
+ current: zod_1.z.boolean()
13801
+ });
13802
+ exports.OrderTracking = zod_1.z.object({
13803
+ carrier: zod_1.z.string().min(1),
13804
+ reference: zod_1.z.string().min(1).optional(),
13805
+ url: common_1.Url.optional()
13806
+ });
13807
+ exports.OrderItem = zod_1.z.object({
13808
+ line_ref: zod_1.z.string().min(1),
13809
+ sku: common_1.Sku,
13810
+ qty: zod_1.z.number().int().positive(),
13811
+ unit_price: money_1.Money,
13812
+ line_total: money_1.Money,
13813
+ compare_at_unit_price: money_1.Money.optional(),
13814
+ title: zod_1.z.string().optional(),
13815
+ image: common_1.Url.optional(),
13816
+ attributes: common_1.Attributes.optional(),
13817
+ cancelled_qty: zod_1.z.number().int().nonnegative(),
13818
+ refunded_qty: zod_1.z.number().int().nonnegative(),
13819
+ returned_qty: zod_1.z.number().int().nonnegative().optional()
13820
+ });
13821
+ exports.ReturnStatus = zod_1.z.enum(["reported", "package_received", "completed"]);
13822
+ exports.ReturnOutcome = zod_1.z.enum(["accepted", "rejected", "partial"]);
13823
+ exports.OrderSummaryItem = zod_1.z.object({
13824
+ order_ref: ids_1.OrderRef,
13825
+ placed_at: common_1.Timestamp,
13826
+ currency: money_1.Currency,
13827
+ status: exports.OrderProgressStep,
13828
+ headline: zod_1.z.string().min(1),
13829
+ total: money_1.Money,
13830
+ item_count: zod_1.z.number().int().nonnegative(),
13831
+ image: common_1.Url.optional(),
13832
+ images: zod_1.z.array(common_1.Url).max(3).optional(),
13833
+ return_status: exports.ReturnStatus.optional()
13834
+ });
13835
+ exports.ReturnSummaryItem = zod_1.z.object({
13836
+ return_ref: zod_1.z.string().min(1),
13837
+ order_ref: ids_1.OrderRef,
13838
+ status: exports.ReturnStatus,
13839
+ reported_at: common_1.Timestamp,
13840
+ currency: money_1.Currency,
13841
+ headline: zod_1.z.string().min(1),
13842
+ value: money_1.Money,
13843
+ item_count: zod_1.z.number().int().nonnegative(),
13844
+ images: zod_1.z.array(common_1.Url).max(3).optional()
13845
+ });
13846
+ exports.OrderList = zod_1.z.object({
13847
+ orders: zod_1.z.array(exports.OrderSummaryItem),
13848
+ returns: zod_1.z.array(exports.ReturnSummaryItem).optional()
13849
+ });
13850
+ exports.ReturnSummary = zod_1.z.object({
13851
+ return_ref: zod_1.z.string().min(1),
13852
+ status: exports.ReturnStatus,
13853
+ reported_at: common_1.Timestamp
13854
+ });
13855
+ exports.OrderDetail = zod_1.z.object({
13856
+ order_ref: ids_1.OrderRef,
13857
+ placed_at: common_1.Timestamp,
13858
+ currency: money_1.Currency,
13859
+ email: zod_1.z.string().email().optional(),
13860
+ status: exports.OrderProgressStep,
13861
+ headline: zod_1.z.string().min(1),
13862
+ estimated_delivery: zod_1.z.object({
13863
+ from: common_1.Timestamp,
13864
+ to: common_1.Timestamp
13865
+ }).optional(),
13866
+ progress: zod_1.z.array(exports.OrderProgressEntry).min(1),
13867
+ tracking: exports.OrderTracking.optional(),
13868
+ items: zod_1.z.array(exports.OrderItem).min(1),
13869
+ ship_to: common_1.Address,
13870
+ payment: orders_1.OrderPaymentSummary.optional(),
13871
+ totals: orders_1.OrderTotals,
13872
+ can_cancel: zod_1.z.boolean().optional(),
13873
+ can_return: zod_1.z.boolean().optional(),
13874
+ returns: zod_1.z.array(exports.ReturnSummary).optional(),
13875
+ vip: zod_1.z.object({
13876
+ invite_ref: vip_1.VipInviteRef
13877
+ }).optional()
13878
+ });
13879
+ exports.FanCancelReason = zod_1.z.enum(["changed_my_mind", "ordered_by_mistake", "delivery_too_long"]);
13880
+ exports.RequestCancellationRequest = zod_1.z.object({
13881
+ reason: exports.FanCancelReason
13882
+ }).strict();
13883
+ exports.FanReturnReason = zod_1.z.enum(["too_large", "too_small", "arrived_too_late", "item_damaged", "not_as_described"]);
13884
+ exports.RecordedReturnReason = zod_1.z.enum([...exports.FanReturnReason.options, "changed_my_mind"]);
13885
+ exports.ReturnRequestItem = zod_1.z.object({
13886
+ line_ref: zod_1.z.string().min(1),
13887
+ qty: zod_1.z.number().int().positive(),
13888
+ reason: exports.FanReturnReason
13889
+ });
13890
+ exports.CreateReturnRequest = zod_1.z.object({
13891
+ items: zod_1.z.array(exports.ReturnRequestItem).min(1)
13892
+ }).strict();
13893
+ exports.ReturnProgressEntry = zod_1.z.object({
13894
+ step: exports.ReturnStatus,
13895
+ label: zod_1.z.string().min(1),
13896
+ at: common_1.Timestamp.optional(),
13897
+ current: zod_1.z.boolean()
13898
+ });
13899
+ exports.ReturnItem = zod_1.z.object({
13900
+ line_ref: zod_1.z.string().min(1),
13901
+ sku: common_1.Sku,
13902
+ qty: zod_1.z.number().int().positive(),
13903
+ reason: exports.RecordedReturnReason,
13904
+ unit_price: money_1.Money,
13905
+ compare_at_unit_price: money_1.Money.optional(),
13906
+ title: zod_1.z.string().optional(),
13907
+ image: common_1.Url.optional(),
13908
+ attributes: common_1.Attributes.optional()
13909
+ });
13910
+ exports.ReturnDetail = zod_1.z.object({
13911
+ return_ref: zod_1.z.string().min(1),
13912
+ order_ref: ids_1.OrderRef,
13913
+ status: exports.ReturnStatus,
13914
+ reported_at: common_1.Timestamp,
13915
+ progress: zod_1.z.array(exports.ReturnProgressEntry).min(1),
13916
+ items: zod_1.z.array(exports.ReturnItem).min(1),
13917
+ label_url: common_1.Url.optional(),
13918
+ label_email: zod_1.z.string().email().optional()
13919
+ });
13920
+ })(orderTracking);
13921
+ return orderTracking;
13922
+ }
13923
+ var deliveryOptions = {};
13924
+ var hasRequiredDeliveryOptions;
13925
+ function requireDeliveryOptions() {
13926
+ if (hasRequiredDeliveryOptions) return deliveryOptions;
13927
+ hasRequiredDeliveryOptions = 1;
13928
+ (function(exports) {
13929
+ Object.defineProperty(exports, "__esModule", {
13930
+ value: true
13931
+ });
13932
+ exports.DeliveryOptionsResponse = exports.DeliveryTax = exports.TaxRateType = exports.DeliveryServiceability = exports.DeliveryOption = exports.DeliveryEstimate = exports.DeliveryEstimateUnit = exports.DeliveryOptionType = exports.DeliveryOptionsRequest = exports.DeliveryShippingAddress = void 0;
13933
+ const zod_1 = requireZod();
13934
+ const vip_1 = requireVip();
13935
+ const money_1 = requireMoney();
13936
+ const common_1 = requireCommon();
13937
+ exports.DeliveryShippingAddress = zod_1.z.object({
13938
+ line1: zod_1.z.string().min(1),
13939
+ line2: zod_1.z.string().optional(),
13940
+ city: zod_1.z.string().min(1),
13941
+ state: zod_1.z.string().optional(),
13942
+ postalCode: zod_1.z.string().min(1),
13943
+ country: common_1.CountryCode
13944
+ }).strict();
13945
+ exports.DeliveryOptionsRequest = zod_1.z.object({
13946
+ shippingAddress: exports.DeliveryShippingAddress,
13947
+ inviteRef: vip_1.VipInviteRef.optional()
13948
+ }).strict();
13949
+ exports.DeliveryOptionType = zod_1.z.enum(["STANDARD", "EXPRESS"]);
13950
+ exports.DeliveryEstimateUnit = zod_1.z.enum(["BUSINESS_DAYS"]);
13951
+ exports.DeliveryEstimate = zod_1.z.object({
13952
+ minDays: zod_1.z.number().int().nonnegative(),
13953
+ maxDays: zod_1.z.number().int().nonnegative(),
13954
+ unit: exports.DeliveryEstimateUnit
13955
+ }).strict().refine((e) => e.maxDays >= e.minDays, {
13956
+ message: "maxDays must be greater than or equal to minDays"
13957
+ });
13958
+ exports.DeliveryOption = zod_1.z.object({
13959
+ id: zod_1.z.string().min(1),
13960
+ type: exports.DeliveryOptionType,
13961
+ name: zod_1.z.string().min(1),
13962
+ price: money_1.Money,
13963
+ deliveryEstimate: exports.DeliveryEstimate
13964
+ }).strict();
13965
+ exports.DeliveryServiceability = zod_1.z.object({
13966
+ isServiceable: zod_1.z.boolean()
13967
+ }).strict();
13968
+ exports.TaxRateType = zod_1.z.enum(["PERCENTAGE"]);
13969
+ exports.DeliveryTax = zod_1.z.object({
13970
+ applicable: zod_1.z.boolean(),
13971
+ rate: zod_1.z.number().nonnegative(),
13972
+ rateType: exports.TaxRateType
13973
+ }).strict();
13974
+ exports.DeliveryOptionsResponse = zod_1.z.object({
13975
+ serviceability: exports.DeliveryServiceability,
13976
+ shippingOptions: zod_1.z.array(exports.DeliveryOption),
13977
+ tax: exports.DeliveryTax
13978
+ }).strict();
13979
+ })(deliveryOptions);
13980
+ return deliveryOptions;
13981
+ }
13982
+ var health = {};
13983
+ var hasRequiredHealth;
13984
+ function requireHealth() {
13985
+ if (hasRequiredHealth) return health;
13986
+ hasRequiredHealth = 1;
13987
+ Object.defineProperty(health, "__esModule", {
13988
+ value: true
13989
+ });
13990
+ health.HealthReady = health.HealthLive = void 0;
13991
+ const zod_1 = requireZod();
13992
+ health.HealthLive = zod_1.z.object({
13993
+ status: zod_1.z.literal("ok")
13994
+ });
13995
+ health.HealthReady = zod_1.z.object({
13996
+ status: zod_1.z.enum(["ok", "degraded"]),
13997
+ checks: zod_1.z.record(zod_1.z.string(), zod_1.z.boolean())
13998
+ });
13999
+ return health;
14000
+ }
14001
+ var stockAlerts = {};
14002
+ var hasRequiredStockAlerts;
14003
+ function requireStockAlerts() {
14004
+ if (hasRequiredStockAlerts) return stockAlerts;
14005
+ hasRequiredStockAlerts = 1;
14006
+ Object.defineProperty(stockAlerts, "__esModule", {
14007
+ value: true
14008
+ });
14009
+ stockAlerts.StockAlert = stockAlerts.StockAlertRequest = void 0;
14010
+ const zod_1 = requireZod();
14011
+ const common_1 = requireCommon();
14012
+ stockAlerts.StockAlertRequest = zod_1.z.object({
14013
+ sku: common_1.Sku
14014
+ }).strict();
14015
+ stockAlerts.StockAlert = zod_1.z.object({
14016
+ sku: common_1.Sku,
14017
+ created_at: common_1.Timestamp,
14018
+ notified_at: common_1.Timestamp.optional()
14019
+ });
14020
+ return stockAlerts;
14021
+ }
14022
+ var support = {};
14023
+ var hasRequiredSupport;
14024
+ function requireSupport() {
14025
+ if (hasRequiredSupport) return support;
14026
+ hasRequiredSupport = 1;
14027
+ (function(exports) {
14028
+ Object.defineProperty(exports, "__esModule", {
14029
+ value: true
14030
+ });
14031
+ exports.SupportAttachment = exports.SupportTicket = exports.SupportTicketRequest = exports.SupportCategory = void 0;
14032
+ const zod_1 = requireZod();
14033
+ const common_1 = requireCommon();
14034
+ exports.SupportCategory = zod_1.z.string().trim().min(1).max(120);
14035
+ exports.SupportTicketRequest = zod_1.z.object({
14036
+ email: zod_1.z.string().email().max(254),
14037
+ category: exports.SupportCategory,
14038
+ description: zod_1.z.string().trim().min(1).max(4e3),
14039
+ image_url: zod_1.z.string().url().max(2048).optional(),
14040
+ dazn_user_id: zod_1.z.string().trim().min(1).max(128).optional()
14041
+ }).strict();
14042
+ exports.SupportTicket = zod_1.z.object({
14043
+ reference: zod_1.z.string().min(1),
14044
+ category: exports.SupportCategory,
14045
+ created_at: common_1.Timestamp
14046
+ });
14047
+ exports.SupportAttachment = zod_1.z.object({
14048
+ url: zod_1.z.string().url(),
14049
+ content_type: zod_1.z.string().min(1),
14050
+ bytes: zod_1.z.number().int().positive()
14051
+ });
14052
+ })(support);
14053
+ return support;
14054
+ }
14055
+ var storefrontConfig = {};
14056
+ var hasRequiredStorefrontConfig;
14057
+ function requireStorefrontConfig() {
14058
+ if (hasRequiredStorefrontConfig) return storefrontConfig;
14059
+ hasRequiredStorefrontConfig = 1;
14060
+ (function(exports) {
14061
+ Object.defineProperty(exports, "__esModule", {
14062
+ value: true
14063
+ });
14064
+ exports.STOREFRONT_CONFIG_FALLBACK = exports.StorefrontConfig = exports.StorefrontMarketConfig = exports.StorefrontPresentationConfig = exports.StorefrontAnalyticsConfig = void 0;
14065
+ const zod_1 = requireZod();
14066
+ exports.StorefrontAnalyticsConfig = zod_1.z.object({
14067
+ ga4_measurement_id: zod_1.z.string().nullable(),
14068
+ debug: zod_1.z.boolean()
14069
+ });
14070
+ exports.StorefrontPresentationConfig = zod_1.z.object({
14071
+ show_cart_tax: zod_1.z.boolean(),
14072
+ show_size_charts: zod_1.z.boolean(),
14073
+ show_stock_alerts: zod_1.z.boolean()
14074
+ });
14075
+ exports.StorefrontMarketConfig = zod_1.z.object({
14076
+ default_country: zod_1.z.string(),
14077
+ default_lang: zod_1.z.string()
14078
+ });
14079
+ exports.StorefrontConfig = zod_1.z.object({
14080
+ analytics: exports.StorefrontAnalyticsConfig,
14081
+ presentation: exports.StorefrontPresentationConfig,
14082
+ market: exports.StorefrontMarketConfig
14083
+ });
14084
+ exports.STOREFRONT_CONFIG_FALLBACK = {
14085
+ analytics: {
14086
+ ga4_measurement_id: null,
14087
+ debug: false
14088
+ },
14089
+ presentation: {
14090
+ show_cart_tax: true,
14091
+ show_size_charts: true,
14092
+ show_stock_alerts: true
14093
+ },
14094
+ market: {
14095
+ default_country: "GB",
14096
+ default_lang: "en"
14097
+ }
14098
+ };
14099
+ })(storefrontConfig);
14100
+ return storefrontConfig;
14101
+ }
14102
+ var errors = {};
14103
+ var hasRequiredErrors;
14104
+ function requireErrors() {
14105
+ if (hasRequiredErrors) return errors;
14106
+ hasRequiredErrors = 1;
14107
+ (function(exports) {
14108
+ Object.defineProperty(exports, "__esModule", {
14109
+ value: true
14110
+ });
14111
+ exports.ErrorResponse = exports.ApiErrorBody = exports.ERROR_CODE_STATUS = exports.ErrorCode = void 0;
14112
+ const zod_1 = requireZod();
14113
+ 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"]);
14114
+ exports.ERROR_CODE_STATUS = {
14115
+ invalid_request: 400,
14116
+ unauthorized: 401,
14117
+ out_of_stock: 409,
14118
+ cart_locked: 409,
14119
+ sku_not_found: 404,
14120
+ category_not_found: 404,
14121
+ amount_mismatch: 422,
14122
+ duplicate_order: 200,
14123
+ order_not_found: 404,
14124
+ order_not_cancellable: 409,
14125
+ cart_not_found: 404,
14126
+ support_ticket_not_found: 404,
14127
+ vip_invite_not_found: 404,
14128
+ vip_cart_conflict: 409,
14129
+ vip_invite_mismatch: 409,
14130
+ size_chart_not_found: 404,
14131
+ forbidden: 403,
14132
+ invalid_transition: 409,
14133
+ rate_limited: 429,
14134
+ server_error: 500
14135
+ };
14136
+ exports.ApiErrorBody = zod_1.z.object({
14137
+ code: exports.ErrorCode,
14138
+ message: zod_1.z.string(),
14139
+ details: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional()
14140
+ });
14141
+ exports.ErrorResponse = zod_1.z.object({
14142
+ error: exports.ApiErrorBody,
14143
+ request_id: zod_1.z.string()
14144
+ });
14145
+ })(errors);
14146
+ return errors;
14147
+ }
14148
+ var events = {};
14149
+ var hasRequiredEvents;
14150
+ function requireEvents() {
14151
+ if (hasRequiredEvents) return events;
14152
+ hasRequiredEvents = 1;
14153
+ (function(exports) {
14154
+ Object.defineProperty(exports, "__esModule", {
14155
+ value: true
14156
+ });
14157
+ exports.Event = exports.EventEnvelope = exports.EVENT_DATA_SCHEMAS = exports.ReturnStatusChangedData = exports.SupportTicketCreatedData = exports.BackInStockData = exports.InventoryChangedData = exports.PriceUpdatedData = exports.ProductUpdatedData = exports.InventoryThresholdData = exports.PaymentRefundedData = exports.OrderCancelledData = exports.ShipmentDeliveredData = exports.ShipmentDispatchedData = exports.OrderStatusChangedData = exports.EventType = exports.OrderStatus = void 0;
14158
+ const zod_1 = requireZod();
14159
+ const money_1 = requireMoney();
14160
+ const ids_1 = requireIds();
14161
+ const common_1 = requireCommon();
14162
+ const order_tracking_1 = requireOrderTracking();
14163
+ exports.OrderStatus = zod_1.z.enum(["confirmed", "packed", "shipped", "delivered", "cancelled", "refunded"]);
14164
+ exports.EventType = zod_1.z.enum(["order.status_changed", "shipment.dispatched", "shipment.delivered", "order.cancelled", "payment.refunded", "inventory.low_stock", "inventory.out_of_stock", "product.updated", "price.updated", "inventory.changed", "stock.back_in_stock", "support.ticket_created", "return.status_changed"]);
14165
+ exports.OrderStatusChangedData = zod_1.z.object({
14166
+ order_ref: zod_1.z.string(),
14167
+ status: exports.OrderStatus,
14168
+ timestamp: common_1.Timestamp,
14169
+ tracking: order_tracking_1.OrderTracking.optional()
14170
+ });
14171
+ exports.ShipmentDispatchedData = zod_1.z.object({
14172
+ order_ref: zod_1.z.string(),
14173
+ courier: zod_1.z.string(),
14174
+ tracking_number: zod_1.z.string(),
14175
+ timestamp: common_1.Timestamp
14176
+ });
14177
+ exports.ShipmentDeliveredData = zod_1.z.object({
14178
+ order_ref: zod_1.z.string(),
14179
+ timestamp: common_1.Timestamp
14180
+ });
14181
+ exports.OrderCancelledData = zod_1.z.object({
14182
+ order_ref: zod_1.z.string(),
14183
+ reason: zod_1.z.string(),
14184
+ timestamp: common_1.Timestamp
14185
+ });
14186
+ exports.PaymentRefundedData = zod_1.z.object({
14187
+ order_ref: zod_1.z.string(),
14188
+ amount: money_1.Money,
14189
+ timestamp: common_1.Timestamp
14190
+ });
14191
+ exports.InventoryThresholdData = zod_1.z.object({
14192
+ sku: common_1.Sku,
14193
+ remaining_qty: zod_1.z.number().int().nonnegative(),
14194
+ threshold: zod_1.z.number().int().nonnegative()
14195
+ });
14196
+ exports.ProductUpdatedData = zod_1.z.object({
14197
+ sku: common_1.Sku
14198
+ });
14199
+ exports.PriceUpdatedData = zod_1.z.object({
14200
+ sku: common_1.Sku,
14201
+ price: money_1.Money
14202
+ });
14203
+ exports.InventoryChangedData = zod_1.z.object({
14204
+ sku: common_1.Sku,
14205
+ available: zod_1.z.number().int().nonnegative()
14206
+ });
14207
+ exports.BackInStockData = zod_1.z.object({
14208
+ sku: common_1.Sku,
14209
+ product_sku: common_1.Sku,
14210
+ customer_ref: zod_1.z.string(),
14211
+ email: zod_1.z.string().email().optional(),
14212
+ available: zod_1.z.number().int().nonnegative(),
14213
+ timestamp: common_1.Timestamp
14214
+ });
14215
+ exports.SupportTicketCreatedData = zod_1.z.object({
14216
+ reference: zod_1.z.string(),
14217
+ dazn_user_id: zod_1.z.string(),
14218
+ email: zod_1.z.string().email(),
14219
+ category: zod_1.z.string(),
14220
+ description: zod_1.z.string(),
14221
+ image_url: zod_1.z.string().url().optional(),
14222
+ timestamp: common_1.Timestamp
14223
+ });
14224
+ exports.ReturnStatusChangedData = zod_1.z.object({
14225
+ return_ref: zod_1.z.string(),
14226
+ status: order_tracking_1.ReturnStatus,
14227
+ outcome: order_tracking_1.ReturnOutcome.optional(),
14228
+ outcome_note: zod_1.z.string().optional(),
14229
+ lines: zod_1.z.array(zod_1.z.object({
14230
+ line_ref: zod_1.z.string(),
14231
+ outcome: order_tracking_1.ReturnOutcome
14232
+ })).optional(),
14233
+ timestamp: common_1.Timestamp
14234
+ });
14235
+ exports.EVENT_DATA_SCHEMAS = {
14236
+ "order.status_changed": exports.OrderStatusChangedData,
14237
+ "shipment.dispatched": exports.ShipmentDispatchedData,
14238
+ "shipment.delivered": exports.ShipmentDeliveredData,
14239
+ "order.cancelled": exports.OrderCancelledData,
14240
+ "payment.refunded": exports.PaymentRefundedData,
14241
+ "inventory.low_stock": exports.InventoryThresholdData,
14242
+ "inventory.out_of_stock": exports.InventoryThresholdData,
14243
+ "product.updated": exports.ProductUpdatedData,
14244
+ "price.updated": exports.PriceUpdatedData,
14245
+ "inventory.changed": exports.InventoryChangedData,
14246
+ "stock.back_in_stock": exports.BackInStockData,
14247
+ "support.ticket_created": exports.SupportTicketCreatedData,
14248
+ "return.status_changed": exports.ReturnStatusChangedData
14249
+ };
14250
+ exports.EventEnvelope = zod_1.z.object({
14251
+ event_id: ids_1.EventId,
14252
+ type: exports.EventType,
14253
+ created_at: common_1.Timestamp,
14254
+ data: zod_1.z.unknown()
14255
+ });
14256
+ const eventMember = (type) => zod_1.z.object({
14257
+ event_id: ids_1.EventId,
14258
+ type: zod_1.z.literal(type),
14259
+ created_at: common_1.Timestamp,
14260
+ data: exports.EVENT_DATA_SCHEMAS[type]
14261
+ });
14262
+ exports.Event = zod_1.z.discriminatedUnion("type", [eventMember("order.status_changed"), eventMember("shipment.dispatched"), eventMember("shipment.delivered"), eventMember("order.cancelled"), eventMember("payment.refunded"), eventMember("inventory.low_stock"), eventMember("inventory.out_of_stock"), eventMember("product.updated"), eventMember("price.updated"), eventMember("inventory.changed"), eventMember("stock.back_in_stock"), eventMember("support.ticket_created")]);
14263
+ })(events);
14264
+ return events;
14265
+ }
14266
+ var utils = {};
14267
+ var hasRequiredUtils;
14268
+ function requireUtils() {
14269
+ if (hasRequiredUtils) return utils;
14270
+ hasRequiredUtils = 1;
14271
+ Object.defineProperty(utils, "__esModule", {
14272
+ value: true
14273
+ });
14274
+ utils.parseOr = parseOr;
14275
+ utils.is = is;
14276
+ function parseOr(schema, value2, fallback) {
14277
+ const result = schema.safeParse(value2);
14278
+ return result.success ? result.data : fallback;
14279
+ }
14280
+ function is(schema, value2) {
14281
+ return schema.safeParse(value2).success;
14282
+ }
14283
+ return utils;
14284
+ }
14285
+ var client = {};
14286
+ var hasRequiredClient;
14287
+ function requireClient() {
14288
+ if (hasRequiredClient) return client;
14289
+ hasRequiredClient = 1;
14290
+ Object.defineProperty(client, "__esModule", {
14291
+ value: true
14292
+ });
14293
+ client.DaznApiError = void 0;
14294
+ client.createClient = createClient;
14295
+ const catalog_1 = requireCatalog();
14296
+ const content_1 = requireContent();
14297
+ const storefront_config_1 = requireStorefrontConfig();
14298
+ const inventory_1 = requireInventory();
14299
+ const cart_1 = requireCart();
14300
+ const session_1 = requireSession();
14301
+ const order_tracking_1 = requireOrderTracking();
14302
+ const stock_alerts_1 = requireStockAlerts();
14303
+ const support_1 = requireSupport();
14304
+ const vip_1 = requireVip();
14305
+ const errors_1 = requireErrors();
14306
+ class DaznApiError extends Error {
14307
+ status;
14308
+ code;
14309
+ requestId;
14310
+ body;
14311
+ constructor(status, parsed) {
14312
+ super(parsed?.error.message ?? `DAZN API error (HTTP ${status})`);
14313
+ this.name = "DaznApiError";
14314
+ this.status = status;
14315
+ this.code = parsed?.error.code;
14316
+ this.requestId = parsed?.request_id;
14317
+ this.body = parsed?.error;
14318
+ }
14319
+ }
14320
+ client.DaznApiError = DaznApiError;
14321
+ function buildQuery(query) {
14322
+ if (!query) return "";
14323
+ const params = new URLSearchParams();
14324
+ for (const [key, value2] of Object.entries(query)) {
14325
+ if (value2 !== void 0) params.set(key, String(value2));
14326
+ }
14327
+ const qs = params.toString();
14328
+ return qs ? `?${qs}` : "";
14329
+ }
14330
+ function createClient(options2) {
14331
+ const doFetch = options2.fetch ?? globalThis.fetch;
14332
+ if (!doFetch) {
14333
+ throw new Error("No fetch implementation available; pass options.fetch");
14334
+ }
14335
+ const base = options2.baseUrl.replace(/\/$/, "");
14336
+ function market(query) {
14337
+ return {
14338
+ ...options2.market,
14339
+ ...query
14340
+ };
14341
+ }
14342
+ async function request(config) {
14343
+ const token = await options2.getToken?.();
14344
+ const headers = {
14345
+ accept: "application/json",
14346
+ ...options2.defaultHeaders,
14347
+ ...config.headers
14348
+ };
14349
+ const body3 = config.body === void 0 && config.method === "POST" ? {} : config.body;
14350
+ if (body3 !== void 0) headers["content-type"] = "application/json";
14351
+ if (token) headers["authorization"] = `Bearer ${token}`;
14352
+ const res = await doFetch(`${base}${config.path}${buildQuery(config.query)}`, {
14353
+ method: config.method,
14354
+ headers,
14355
+ credentials: options2.credentials ?? "include",
14356
+ body: body3 !== void 0 ? JSON.stringify(body3) : void 0
14357
+ });
14358
+ if (!res.ok) {
14359
+ let parsed;
14360
+ try {
14361
+ parsed = errors_1.ErrorResponse.parse(await res.json());
14362
+ } catch {
14363
+ parsed = void 0;
14364
+ }
14365
+ throw new DaznApiError(res.status, parsed);
14366
+ }
14367
+ return config.schema.parse(await res.json());
14368
+ }
14369
+ async function upload(path, file, schema) {
14370
+ const token = await options2.getToken?.();
14371
+ const headers = {
14372
+ accept: "application/json",
14373
+ ...options2.defaultHeaders
14374
+ };
14375
+ if (token) headers["authorization"] = `Bearer ${token}`;
14376
+ const form = new FormData();
14377
+ form.append("file", file);
14378
+ const res = await doFetch(`${base}${path}`, {
14379
+ method: "POST",
14380
+ headers,
14381
+ credentials: options2.credentials ?? "include",
14382
+ body: form
14383
+ });
14384
+ if (!res.ok) {
14385
+ let parsed;
14386
+ try {
14387
+ parsed = errors_1.ErrorResponse.parse(await res.json());
14388
+ } catch {
14389
+ parsed = void 0;
14390
+ }
14391
+ throw new DaznApiError(res.status, parsed);
14392
+ }
14393
+ return schema.parse(await res.json());
14394
+ }
14395
+ return {
14396
+ catalog: {
14397
+ listProducts: (query = {}) => request({
14398
+ method: "GET",
14399
+ path: "/catalog/products",
14400
+ query,
14401
+ schema: catalog_1.ProductListResponse
14402
+ }),
14403
+ getProduct: (sku, query = {}) => request({
14404
+ method: "GET",
14405
+ path: `/catalog/products/${encodeURIComponent(sku)}`,
14406
+ query,
14407
+ schema: catalog_1.Product
14408
+ }),
14409
+ getRecommendations: (sku, query = {}) => request({
14410
+ method: "GET",
14411
+ path: `/catalog/products/${encodeURIComponent(sku)}/recommendations`,
14412
+ query,
14413
+ schema: catalog_1.RecommendationsResponse
14414
+ }),
14415
+ getCategoryPage: (code, query = {}) => request({
14416
+ method: "GET",
14417
+ path: "/catalog/categories/page",
14418
+ query: {
14419
+ ...query,
14420
+ code
14421
+ },
14422
+ schema: content_1.CategoryPage
14423
+ })
14424
+ },
14425
+ content: {
14426
+ home: () => request({
14427
+ method: "GET",
14428
+ path: "/content/home",
14429
+ schema: content_1.HomeContent
14430
+ })
14431
+ },
14432
+ storefrontConfig: {
14433
+ get: () => request({
14434
+ method: "GET",
14435
+ path: "/storefront-config",
14436
+ schema: storefront_config_1.StorefrontConfig
14437
+ })
14438
+ },
14439
+ inventory: {
14440
+ get: (sku) => request({
14441
+ method: "GET",
14442
+ path: `/inventory/${encodeURIComponent(sku)}`,
14443
+ schema: inventory_1.Inventory
14444
+ })
14445
+ },
14446
+ cart: {
14447
+ create: (query = {}) => request({
14448
+ method: "POST",
14449
+ path: "/cart",
14450
+ query: market(query),
14451
+ schema: cart_1.Cart
14452
+ }),
14453
+ get: (query = {}) => request({
14454
+ method: "GET",
14455
+ path: "/cart",
14456
+ query: market(query),
14457
+ schema: cart_1.Cart
14458
+ }),
14459
+ addItem: (body3, query = {}) => request({
14460
+ method: "POST",
14461
+ path: "/cart/items",
14462
+ body: body3,
14463
+ query: market(query),
14464
+ schema: cart_1.Cart
14465
+ }),
14466
+ updateItem: (sku, body3, query = {}) => request({
14467
+ method: "PATCH",
14468
+ path: `/cart/items/${encodeURIComponent(sku)}`,
14469
+ body: body3,
14470
+ query: market(query),
14471
+ schema: cart_1.Cart
14472
+ }),
14473
+ removeItem: (sku, query = {}) => request({
14474
+ method: "DELETE",
14475
+ path: `/cart/items/${encodeURIComponent(sku)}`,
14476
+ query: market(query),
14477
+ schema: cart_1.Cart
14478
+ }),
14479
+ handoff: (query = {}) => request({
14480
+ query: market(query),
14481
+ method: "POST",
14482
+ path: "/cart/handoff",
14483
+ schema: cart_1.CartHandoffResponse
14484
+ })
14485
+ },
14486
+ stockAlerts: {
14487
+ create: (body3, query = {}) => request({
14488
+ method: "POST",
14489
+ path: "/stock-alerts",
14490
+ body: body3,
14491
+ query: market(query),
14492
+ schema: stock_alerts_1.StockAlert
14493
+ })
14494
+ },
14495
+ orders: {
14496
+ list: () => request({
14497
+ method: "GET",
14498
+ path: "/orders",
14499
+ schema: order_tracking_1.OrderList
14500
+ }),
14501
+ get: (orderRef) => request({
14502
+ method: "GET",
14503
+ path: `/orders/${encodeURIComponent(orderRef)}`,
14504
+ schema: order_tracking_1.OrderDetail
14505
+ }),
14506
+ requestCancellation: (orderRef, body3) => request({
14507
+ method: "POST",
14508
+ path: `/orders/${encodeURIComponent(orderRef)}/cancellation`,
14509
+ body: body3,
14510
+ schema: order_tracking_1.OrderDetail
14511
+ }),
14512
+ createReturn: (orderRef, body3) => request({
14513
+ method: "POST",
14514
+ path: `/orders/${encodeURIComponent(orderRef)}/returns`,
14515
+ body: body3,
14516
+ schema: order_tracking_1.ReturnDetail
14517
+ })
14518
+ },
14519
+ returns: {
14520
+ get: (returnRef) => request({
14521
+ method: "GET",
14522
+ path: `/returns/${encodeURIComponent(returnRef)}`,
14523
+ schema: order_tracking_1.ReturnDetail
14524
+ })
14525
+ },
14526
+ support: {
14527
+ uploadAttachment: (file) => upload("/support/attachments", file, support_1.SupportAttachment),
14528
+ createTicket: (body3) => request({
14529
+ method: "POST",
14530
+ path: "/support/tickets",
14531
+ body: body3,
14532
+ schema: support_1.SupportTicket
14533
+ })
14534
+ },
14535
+ vip: {
14536
+ resolve: (locator, query = {}) => request({
14537
+ method: "POST",
14538
+ path: "/vip/resolve",
14539
+ body: typeof locator === "string" ? {
14540
+ token: locator
14541
+ } : locator,
14542
+ query: market(query),
14543
+ schema: vip_1.VipInviteView
14544
+ }),
14545
+ addToCart: (body3, query = {}) => request({
14546
+ method: "POST",
14547
+ path: "/vip/cart/items",
14548
+ body: body3,
14549
+ query: market(query),
14550
+ schema: cart_1.Cart
14551
+ })
14552
+ },
14553
+ auth: {
14554
+ exchangeSession: (body3) => request({
14555
+ method: "POST",
14556
+ path: "/auth/session",
14557
+ body: body3,
14558
+ schema: session_1.SessionExchangeResponse
14559
+ }),
14560
+ redeemShopSession: (body3) => request({
14561
+ method: "POST",
14562
+ path: "/auth/shop-session",
14563
+ body: body3,
14564
+ schema: session_1.ShopSessionResponse
14565
+ })
14566
+ }
14567
+ };
14568
+ }
14569
+ return client;
14570
+ }
14571
+ var hasRequiredDist;
14572
+ function requireDist() {
14573
+ if (hasRequiredDist) return dist;
14574
+ hasRequiredDist = 1;
14575
+ (function(exports) {
14576
+ var __createBinding = dist && dist.__createBinding || (Object.create ? function(o, m, k, k2) {
14577
+ if (k2 === void 0) k2 = k;
14578
+ var desc = Object.getOwnPropertyDescriptor(m, k);
14579
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14580
+ desc = {
14581
+ enumerable: true,
14582
+ get: function() {
14583
+ return m[k];
14584
+ }
14585
+ };
14586
+ }
14587
+ Object.defineProperty(o, k2, desc);
14588
+ } : function(o, m, k, k2) {
14589
+ if (k2 === void 0) k2 = k;
14590
+ o[k2] = m[k];
14591
+ });
14592
+ var __exportStar = dist && dist.__exportStar || function(m, exports2) {
14593
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
14594
+ };
14595
+ Object.defineProperty(exports, "__esModule", {
14596
+ value: true
14597
+ });
14598
+ exports.API_VERSION = void 0;
14599
+ __exportStar(requireMoney(), exports);
14600
+ __exportStar(requireIds(), exports);
14601
+ __exportStar(requireCommon(), exports);
14602
+ __exportStar(requireSession(), exports);
14603
+ __exportStar(requireCatalog(), exports);
14604
+ __exportStar(requireContent(), exports);
14605
+ __exportStar(requireInventory(), exports);
14606
+ __exportStar(requireCart(), exports);
14607
+ __exportStar(requireOrders(), exports);
14608
+ __exportStar(requireOrderTracking(), exports);
14609
+ __exportStar(requireDeliveryOptions(), exports);
14610
+ __exportStar(requireHealth(), exports);
14611
+ __exportStar(requireStockAlerts(), exports);
14612
+ __exportStar(requireSupport(), exports);
14613
+ __exportStar(requireVip(), exports);
14614
+ __exportStar(requireStorefrontConfig(), exports);
14615
+ __exportStar(requireErrors(), exports);
14616
+ __exportStar(requireEvents(), exports);
14617
+ __exportStar(requireUtils(), exports);
14618
+ __exportStar(requireClient(), exports);
14619
+ exports.API_VERSION = "v1";
14620
+ })(dist);
14621
+ return dist;
14622
+ }
14623
+ var distExports = requireDist();
14624
+ const hero$1 = "_hero_dctyt_1";
14625
+ const image$1 = "_image_dctyt_11";
14626
+ const foot = "_foot_dctyt_34";
14627
+ const text$1 = "_text_dctyt_40";
14628
+ const logo$1 = "_logo_dctyt_48";
14629
+ const copy$1 = "_copy_dctyt_53";
14630
+ const headline = "_headline_dctyt_62";
14631
+ const body = "_body_dctyt_70";
14632
+ const cta$2 = "_cta_dctyt_79";
14633
+ const video = "_video_dctyt_83";
14634
+ const desktopOnly = "_desktopOnly_dctyt_87";
14635
+ const phoneOnly$1 = "_phoneOnly_dctyt_97";
14636
+ const hero$2 = {
14637
+ hero: hero$1,
14638
+ image: image$1,
14639
+ foot,
14640
+ text: text$1,
14641
+ logo: logo$1,
14642
+ copy: copy$1,
14643
+ headline,
14644
+ body,
14645
+ cta: cta$2,
14646
+ video,
14647
+ desktopOnly,
14648
+ phoneOnly: phoneOnly$1
14649
+ };
14650
+ function VipHero({ hero: hero2, onContinue }) {
14651
+ const t = useT();
14652
+ const assetUrl = useAssetUrl();
14653
+ const ref = useRef(null);
14654
+ useTopOffset(ref, "--vip-hero-top");
14655
+ const desktopImage = hero2.desktop_image ?? null;
14656
+ const desktopVideo = hero2.desktop_video ?? null;
14657
+ const wide2 = desktopImage !== null || desktopVideo !== null;
14658
+ return jsx(ShopSurface, {
14659
+ tone: "dark",
14660
+ fill: true,
14661
+ "data-shop-layout": "wide",
14662
+ children: jsxs("section", {
14663
+ ref,
14664
+ className: hero$2.hero,
14665
+ children: [hero2.image && jsx("div", {
14666
+ className: [hero$2.image, wide2 ? hero$2.phoneOnly : ""].join(" "),
14667
+ children: jsx(ShopImage, {
14668
+ src: hero2.image,
14669
+ alt: "",
14670
+ fill: true,
14671
+ sizes: "(max-width: 480px) 100vw, 480px",
14672
+ priority: true
14673
+ })
14674
+ }), wide2 && jsxs("div", {
14675
+ className: [hero$2.image, hero$2.desktopOnly].join(" "),
14676
+ children: [desktopImage && jsx(ShopImage, {
14677
+ src: desktopImage,
14678
+ alt: "",
14679
+ fill: true,
14680
+ sizes: "100vw"
14681
+ }), desktopVideo && jsx(ShopVideo, {
14682
+ src: desktopVideo,
14683
+ ...desktopImage ? {
14684
+ poster: desktopImage
14685
+ } : {},
14686
+ fill: true,
14687
+ className: hero$2.video
14688
+ })]
13213
14689
  }), jsxs("div", {
13214
14690
  className: hero$2.foot,
13215
14691
  children: [jsxs("div", {
@@ -13363,27 +14839,43 @@ function VipBreadcrumb({ title: title2, trail: trail2 = [], onHome }) {
13363
14839
  }
13364
14840
  const INVITE_REF = /^vip_[A-Za-z0-9._-]+$/;
13365
14841
  function locatorOf(segment) {
13366
- return INVITE_REF.test(segment) && segment.length !== 43 ? {
13367
- invite_ref: segment
13368
- } : {
14842
+ if (INVITE_REF.test(segment) && segment.length !== 43) {
14843
+ return {
14844
+ invite_ref: segment
14845
+ };
14846
+ }
14847
+ if (distExports.VIP_TOKEN_PATTERN.test(segment)) return {
13369
14848
  token: segment
13370
14849
  };
14850
+ return null;
13371
14851
  }
14852
+ const INVALID_LINK = /* @__PURE__ */ new Set(["invalid_request", "vip_invite_not_found", "vip_invite_mismatch"]);
13372
14853
  function VipLandingView({ token, onUnavailable }) {
13373
14854
  const t = useT();
13374
14855
  const { api, emit } = useShop();
13375
- const [load, setLoad] = useState({
14856
+ const locator = locatorOf(token);
14857
+ const [load, setLoad] = useState(locator ? {
13376
14858
  status: "loading"
14859
+ } : {
14860
+ status: "invalid"
13377
14861
  });
14862
+ const [attempt, setAttempt] = useState(0);
13378
14863
  const emitRef = useRef(emit);
13379
14864
  emitRef.current = emit;
13380
14865
  useSetScreenTitle(t("DAZN Shop"), "none");
13381
14866
  useEffect(() => {
14867
+ const target = locatorOf(token);
14868
+ if (!target) {
14869
+ setLoad({
14870
+ status: "invalid"
14871
+ });
14872
+ return void 0;
14873
+ }
13382
14874
  let live = true;
13383
14875
  setLoad({
13384
14876
  status: "loading"
13385
14877
  });
13386
- api.vip.resolve(locatorOf(token)).then((invite2) => {
14878
+ api.vip.resolve(target).then((invite2) => {
13387
14879
  if (live) setLoad({
13388
14880
  status: "done",
13389
14881
  invite: invite2
@@ -13396,7 +14888,9 @@ function VipLandingView({ token, onUnavailable }) {
13396
14888
  code,
13397
14889
  scope: "vip.resolve"
13398
14890
  });
13399
- setLoad({
14891
+ setLoad(code && INVALID_LINK.has(code) ? {
14892
+ status: "invalid"
14893
+ } : {
13400
14894
  status: "error",
13401
14895
  code
13402
14896
  });
@@ -13404,19 +14898,18 @@ function VipLandingView({ token, onUnavailable }) {
13404
14898
  return () => {
13405
14899
  live = false;
13406
14900
  };
13407
- }, [api, token]);
14901
+ }, [api, token, attempt]);
14902
+ if (load.status === "invalid") return jsx(VipInviteInvalid, {});
13408
14903
  if (load.status === "loading") return jsx(ScreenSkeleton, {
13409
14904
  tone: "light"
13410
14905
  });
13411
14906
  if (load.status === "error") {
13412
- if (load.code === "vip_invite_not_found" || load.code === "vip_invite_mismatch") {
13413
- return jsx(VipInviteInvalid, {});
13414
- }
13415
14907
  return jsx(ShopSurface, {
13416
14908
  tone: "light",
13417
14909
  fill: true,
13418
14910
  children: jsx(ErrorState, {
13419
- code: load.code
14911
+ code: load.code,
14912
+ onRetry: () => setAttempt((n) => n + 1)
13420
14913
  })
13421
14914
  });
13422
14915
  }
@@ -13460,8 +14953,10 @@ function ActiveLanding({ token, invite }) {
13460
14953
  if (current2?.vip?.invite_ref === invite.invite_ref) {
13461
14954
  for (const line2 of current2.items) await api.cart.removeItem(line2.sku);
13462
14955
  }
14956
+ const target = locatorOf(token);
14957
+ if (!target) throw new Error("invalid invite link");
13463
14958
  const cart2 = await api.vip.addToCart({
13464
- ...locatorOf(token),
14959
+ ...target,
13465
14960
  sku: variantSku,
13466
14961
  qty: 1
13467
14962
  });
@@ -13524,31 +15019,33 @@ function ActiveLanding({ token, invite }) {
13524
15019
  })
13525
15020
  });
13526
15021
  }
13527
- const showcase = "_showcase_6kghy_14";
13528
- const panel = "_panel_6kghy_40";
13529
- const image = "_image_6kghy_93";
13530
- const desktopArt = "_desktopArt_6kghy_98";
13531
- const hero = "_hero_6kghy_137";
13532
- const heroContent = "_heroContent_6kghy_228";
13533
- const heroText = "_heroText_6kghy_252";
13534
- const logo = "_logo_6kghy_261";
13535
- const heroTitle = "_heroTitle_6kghy_281";
13536
- const heroSub = "_heroSub_6kghy_305";
13537
- const swipe = "_swipe_6kghy_324";
13538
- const swipeLabel = "_swipeLabel_6kghy_331";
13539
- const chevron$1 = "_chevron_6kghy_337";
13540
- const overlay$1 = "_overlay_6kghy_11";
13541
- const copy = "_copy_6kghy_372";
13542
- const title$2 = "_title_6kghy_377";
13543
- const subtitle$1 = "_subtitle_6kghy_384";
13544
- const cta = "_cta_6kghy_390";
13545
- const mosaic = "_mosaic_6kghy_434";
13546
- const info = "_info_6kghy_446";
13547
- const products = "_products_6kghy_450";
13548
- const wideOnly = "_wideOnly_6kghy_451";
13549
- const phoneOnly = "_phoneOnly_6kghy_456";
13550
- const phoneArt = "_phoneArt_6kghy_457";
13551
- const desktopFocal = "_desktopFocal_6kghy_466";
15022
+ const showcase = "_showcase_nmp6h_14";
15023
+ const panel = "_panel_nmp6h_40";
15024
+ const image = "_image_nmp6h_93";
15025
+ const desktopArt = "_desktopArt_nmp6h_98";
15026
+ const hero = "_hero_nmp6h_137";
15027
+ const heroContent = "_heroContent_nmp6h_228";
15028
+ const heroText = "_heroText_nmp6h_252";
15029
+ const logo = "_logo_nmp6h_261";
15030
+ const heroTitle = "_heroTitle_nmp6h_281";
15031
+ const heroSub = "_heroSub_nmp6h_305";
15032
+ const swipe = "_swipe_nmp6h_324";
15033
+ const swipeLabel = "_swipeLabel_nmp6h_331";
15034
+ const chevron$1 = "_chevron_nmp6h_337";
15035
+ const overlay$1 = "_overlay_nmp6h_11";
15036
+ const copy = "_copy_nmp6h_374";
15037
+ const title$2 = "_title_nmp6h_386";
15038
+ const subtitle$1 = "_subtitle_nmp6h_395";
15039
+ const cta = "_cta_nmp6h_403";
15040
+ const mosaic = "_mosaic_nmp6h_447";
15041
+ const info = "_info_nmp6h_459";
15042
+ const band = "_band_nmp6h_463";
15043
+ const bandTitle = "_bandTitle_nmp6h_472";
15044
+ const products = "_products_nmp6h_484";
15045
+ const wideOnly = "_wideOnly_nmp6h_504";
15046
+ const phoneOnly = "_phoneOnly_nmp6h_530";
15047
+ const phoneArt = "_phoneArt_nmp6h_531";
15048
+ const desktopFocal = "_desktopFocal_nmp6h_540";
13552
15049
  const styles$3 = {
13553
15050
  showcase,
13554
15051
  panel,
@@ -13570,6 +15067,8 @@ const styles$3 = {
13570
15067
  cta,
13571
15068
  mosaic,
13572
15069
  info,
15070
+ band,
15071
+ bandTitle,
13573
15072
  products,
13574
15073
  wideOnly,
13575
15074
  phoneOnly,
@@ -13588,9 +15087,18 @@ function useDocumentSnap(ref, enabled = true) {
13588
15087
  root2.style.scrollPaddingTop = "0px";
13589
15088
  let snapping = false;
13590
15089
  let awaitingTouch = false;
15090
+ const layoutOf = () => {
15091
+ let top22 = 0;
15092
+ for (let node = el; node; node = node.offsetParent) {
15093
+ top22 += node.offsetTop;
15094
+ }
15095
+ return `${root2.scrollHeight}:${top22}`;
15096
+ };
15097
+ let snappedLayout = "";
13591
15098
  const snapOn = () => {
13592
15099
  root2.style.scrollSnapType = "y mandatory";
13593
15100
  snapping = true;
15101
+ snappedLayout = layoutOf();
13594
15102
  };
13595
15103
  const snapOff = () => {
13596
15104
  root2.style.scrollSnapType = "none";
@@ -13616,6 +15124,7 @@ function useDocumentSnap(ref, enabled = true) {
13616
15124
  };
13617
15125
  let at = TOP;
13618
15126
  let returning = false;
15127
+ let restoring = false;
13619
15128
  let holding = false;
13620
15129
  const settle = () => {
13621
15130
  returning = false;
@@ -13632,19 +15141,26 @@ function useDocumentSnap(ref, enabled = true) {
13632
15141
  release();
13633
15142
  const back = returnOffset(here());
13634
15143
  returning = back !== null;
15144
+ restoring = returning;
13635
15145
  at = back ?? TOP;
13636
15146
  holding = true;
13637
15147
  if (frame2 !== null && typeof window.cancelAnimationFrame === "function") {
13638
15148
  window.cancelAnimationFrame(frame2);
13639
15149
  }
13640
- snapOff();
15150
+ if (restoring) snapOn();
15151
+ else snapOff();
13641
15152
  top2();
13642
15153
  frame2 = typeof window.requestAnimationFrame === "function" ? window.requestAnimationFrame(() => {
13643
15154
  top2();
13644
15155
  snapOn();
13645
15156
  }) : null;
13646
15157
  release = anchorTop(() => {
13647
- if (snapping) {
15158
+ if (snapping && !restoring) {
15159
+ const layout = layoutOf();
15160
+ if (layout !== snappedLayout) {
15161
+ snappedLayout = layout;
15162
+ return true;
15163
+ }
13648
15164
  snapOff();
13649
15165
  snapOnAtTouch();
13650
15166
  }
@@ -13731,15 +15247,17 @@ const FALLBACK_PANELS = [{
13731
15247
  image: "/figma/home/tshirts-poster.jpg",
13732
15248
  desktopImage: BAND_DESKTOP
13733
15249
  }];
13734
- function useBandProducts(target, enabled) {
15250
+ const BAND_LIMIT = 20;
15251
+ const WIDE_BAND = 3;
15252
+ function useBandProducts(target) {
13735
15253
  const shop2 = useShopOptional();
13736
15254
  const [loaded, setLoaded] = useState(null);
13737
15255
  useEffect(() => {
13738
- if (!enabled || !target || !shop2) return;
15256
+ if (!target || !shop2) return;
13739
15257
  let live = true;
13740
15258
  void shop2.api.catalog.listProducts({
13741
15259
  category: target,
13742
- limit: 3,
15260
+ limit: BAND_LIMIT,
13743
15261
  ...shop2.market ?? {}
13744
15262
  }).then((res) => {
13745
15263
  const products2 = res.data;
@@ -13753,12 +15271,13 @@ function useBandProducts(target, enabled) {
13753
15271
  return () => {
13754
15272
  live = false;
13755
15273
  };
13756
- }, [enabled, target, shop2]);
13757
- return loaded && loaded.target === target ? loaded.products.slice(0, 3) : [];
15274
+ }, [target, shop2]);
15275
+ return loaded && loaded.target === target ? loaded.products : [];
13758
15276
  }
13759
15277
  function CategoryPanel({ panel: panel2, wide: wide2 }) {
13760
15278
  const t = useT();
13761
- const products2 = useBandProducts(panel2.target, wide2);
15279
+ const all = useBandProducts(panel2.target);
15280
+ const products2 = wide2 ? all.slice(0, WIDE_BAND) : all;
13762
15281
  return jsxs("section", {
13763
15282
  className: styles$3.panel,
13764
15283
  "aria-label": t(panel2.title),
@@ -13808,13 +15327,19 @@ function CategoryPanel({ panel: panel2, wide: wide2 }) {
13808
15327
  "aria-label": `${t(panel2.title)} — ${t(panel2.cta)}`,
13809
15328
  children: t(panel2.cta)
13810
15329
  })]
13811
- }), products2.length > 0 && jsx("ul", {
13812
- className: styles$3.products,
13813
- children: products2.map((product) => jsx("li", {
13814
- children: jsx(ProductTile, {
13815
- product
13816
- })
13817
- }, product.sku))
15330
+ }), products2.length > 0 && jsxs("div", {
15331
+ className: styles$3.band,
15332
+ children: [jsx("h3", {
15333
+ className: styles$3.bandTitle,
15334
+ children: t("Limited edition")
15335
+ }), jsx("ul", {
15336
+ className: styles$3.products,
15337
+ children: products2.map((product) => jsx("li", {
15338
+ children: jsx(ProductTile, {
15339
+ product
15340
+ })
15341
+ }, product.sku))
15342
+ })]
13818
15343
  })]
13819
15344
  })]
13820
15345
  });