@zonos/elements 1.3.159 → 1.3.161

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.
Files changed (80) hide show
  1. package/dist/cjs/{cart-d9aa5af3.js → cart-934a8aef.js} +3 -2
  2. package/dist/cjs/index.cjs.js +7 -7
  3. package/dist/cjs/{paypal-9908b383.js → paypal-dddeb76e.js} +1 -1
  4. package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
  6. package/dist/cjs/zonos-checkout.cjs.entry.js +5 -2
  7. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  8. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  14. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -0
  15. package/dist/collection/components/store/checkout/cart.js +1 -0
  16. package/dist/collection/components/store/checkout/stripe.js +2 -2
  17. package/dist/collection/types/generated/graphql.internal.types.js +7 -3
  18. package/dist/esm/{cart-8afb3277.js → cart-41bdd9fb.js} +3 -2
  19. package/dist/esm/index.js +7 -7
  20. package/dist/esm/{paypal-02c4e5d3.js → paypal-c81fb5ee.js} +1 -1
  21. package/dist/esm/zonos-address_8.entry.js +1 -1
  22. package/dist/esm/zonos-cart-items_13.entry.js +2 -2
  23. package/dist/esm/zonos-checkout.entry.js +5 -2
  24. package/dist/esm/zonos-controller.entry.js +1 -1
  25. package/dist/esm/zonos-country-flag.entry.js +1 -1
  26. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  27. package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
  28. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  29. package/dist/esm/zonos-hello.entry.js +1 -1
  30. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  31. package/dist/esm-es5/{cart-8afb3277.js → cart-41bdd9fb.js} +1 -1
  32. package/dist/esm-es5/index.js +1 -1
  33. package/dist/esm-es5/{paypal-02c4e5d3.js → paypal-c81fb5ee.js} +1 -1
  34. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  35. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  36. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  37. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  38. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  39. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  40. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  41. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  42. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  43. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  44. package/dist/scripts/index.js +1 -1
  45. package/dist/scripts/loadZonos.js +1 -1
  46. package/dist/scripts/zonos.js +1 -1
  47. package/dist/types/components/utils/api/placeTestOrder.d.ts +1 -1
  48. package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +10 -4
  49. package/dist/types/types/generated/graphql.internal.types.d.ts +14 -7
  50. package/dist/types/types/generated/graphql.internal.types.ts +24 -15
  51. package/dist/zonos-elements/index.esm.js +1 -1
  52. package/dist/zonos-elements/{p-d696a3c2.system.js → p-15d4d606.system.js} +1 -1
  53. package/dist/zonos-elements/{p-f9789c28.entry.js → p-1921fe51.entry.js} +1 -1
  54. package/dist/zonos-elements/{p-1570b95c.entry.js → p-22e190af.entry.js} +1 -1
  55. package/dist/zonos-elements/p-23021792.js +17 -0
  56. package/dist/zonos-elements/{p-047b3313.entry.js → p-2f6bbd3b.entry.js} +1 -1
  57. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
  58. package/dist/zonos-elements/{p-c1f1818a.entry.js → p-4968aa73.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-04122105.system.entry.js → p-7b76c844.system.entry.js} +1 -1
  60. package/dist/zonos-elements/{p-0b178c5a.system.entry.js → p-7c536f5a.system.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-b336b4ec.entry.js → p-7cb5e4b8.entry.js} +1 -1
  62. package/dist/zonos-elements/{p-aced2fc6.system.entry.js → p-95aa4518.system.entry.js} +1 -1
  63. package/dist/zonos-elements/{p-8213ee19.entry.js → p-983c8c5f.entry.js} +1 -1
  64. package/dist/zonos-elements/{p-c5808c2d.system.entry.js → p-9cbe0e06.system.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-062c81c9.js → p-a0efb02e.js} +1 -1
  66. package/dist/zonos-elements/{p-748c7aca.system.entry.js → p-a23fb562.system.entry.js} +1 -1
  67. package/dist/zonos-elements/{p-3a531aec.system.js → p-a9a29cf6.system.js} +1 -1
  68. package/dist/zonos-elements/{p-3e6e4646.system.js → p-b5d1fb0e.system.js} +1 -1
  69. package/dist/zonos-elements/{p-de23f355.entry.js → p-bbc11b58.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-8f4bf7e6.entry.js → p-c522ddf2.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-aa5e39e8.system.entry.js → p-d8406c80.system.entry.js} +1 -1
  72. package/dist/zonos-elements/{p-f84593ad.system.entry.js → p-d9940c47.system.entry.js} +1 -1
  73. package/dist/zonos-elements/{p-1f720612.system.entry.js → p-daa0dcb4.system.entry.js} +1 -1
  74. package/dist/zonos-elements/{p-a62d60d1.entry.js → p-e300d1ed.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-98d0ff1b.system.entry.js → p-e611b266.system.entry.js} +1 -1
  76. package/dist/zonos-elements/{p-6b8b5fc5.system.entry.js → p-e6bbea1e.system.entry.js} +1 -1
  77. package/dist/zonos-elements/{p-417b2afd.entry.js → p-f06559c1.entry.js} +1 -1
  78. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  79. package/package.json +1 -1
  80. package/dist/zonos-elements/p-a349636e.js +0 -17
@@ -10998,8 +10998,9 @@ const initStripeElements = async (props) => {
10998
10998
  stripeStore.stripeElementsForBillingAddress.update(stripeOptions);
10999
10999
  // save stripe elements options for later comparison
11000
11000
  stripeStore.stripeElementsOptions = stripeOptions;
11001
+ void stripeStore.stripeElements.fetchUpdates();
11001
11002
  }
11002
- handleFetch.log('Stripe elements initialized');
11003
+ handleFetch.log('Stripe elements updated');
11003
11004
  };
11004
11005
  const stripeStoreReset = () => {
11005
11006
  // clean clientSecret so that we can start the new one.
@@ -11506,7 +11507,6 @@ const stripeStoreInitCheckoutSession = async () => {
11506
11507
  const result = json.checkoutSessionCreate;
11507
11508
  // update cart store with updated information
11508
11509
  cartStoreSetCheckoutSession(result);
11509
- stripeStore.clientSecret = result.clientSecret;
11510
11510
  cartStoreApplySubtotals({
11511
11511
  method: ((_a = result.landedCost) === null || _a === void 0 ? void 0 : _a.method) || 'DDP',
11512
11512
  subtotals: result.subtotals,
@@ -11877,6 +11877,7 @@ const cartStoreHasOneEligibleItem = () => {
11877
11877
  };
11878
11878
  const cartStoreSetCheckoutSession = (checkoutSession) => {
11879
11879
  var _a, _b, _c, _d, _e;
11880
+ stripeStore.clientSecret = checkoutSession.clientSecret;
11880
11881
  cartStore.checkoutSession = checkoutSession;
11881
11882
  cartStore.checkoutSessionId = checkoutSession.id;
11882
11883
  // Check if there is a redirect URL in the metadata to override
@@ -129,7 +129,7 @@ const getZonosQaUrl = () => {
129
129
  return null;
130
130
  }
131
131
  const qaUrl = extractZonosQaUrl(window.location.href);
132
- const cdnUrl = "https://v1.3.159.js.zonos.com";
132
+ const cdnUrl = "https://v1.3.161.js.zonos.com";
133
133
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
134
134
  if (!qaUrl &&
135
135
  (cdnUrl.includes('test.') ||
@@ -313,10 +313,10 @@ const zonosLoadUrl = (() => {
313
313
  }
314
314
  return null;
315
315
  })();
316
- const ZONOS_URL = "https://v1.3.159.js.zonos.com";
317
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.159";
318
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.159";
319
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.159";
316
+ const ZONOS_URL = "https://v1.3.161.js.zonos.com";
317
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.161";
318
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.161";
319
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.161";
320
320
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
321
321
  const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
322
322
  class Zonos {
@@ -330,7 +330,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
330
330
  !!window.location.search.match(/\?.*(&*)zonosConversionTest/);
331
331
  Zonos._paypalMockResponse = null;
332
332
  Zonos.isBigCommerce = false;
333
- Zonos.releaseDate = "1739308202396";
333
+ Zonos.releaseDate = "1739578573828";
334
334
  Zonos.isLegacyCheckout = false;
335
335
  Zonos.domain = typeof window !== 'undefined'
336
336
  ? // domain that embeds the iframe
@@ -346,7 +346,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
346
346
  Zonos.isNpm = true;
347
347
  Zonos.zonosQaUrl = null;
348
348
  Zonos.zonosQaUrlApi = null;
349
- Zonos.version = `v${"1.3.159"}`;
349
+ Zonos.version = `v${"1.3.161"}`;
350
350
  Zonos.modeAlerted = false;
351
351
  Zonos.cartData = null;
352
352
  Zonos.paypal = null;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-7975e4b6.js');
4
- const cart = require('./cart-d9aa5af3.js');
4
+ const cart = require('./cart-934a8aef.js');
5
5
  const handleFetch = require('./handleFetch-3673a0c2.js');
6
6
  const isDarkColor = require('./isDarkColor-08d92ed7.js');
7
7
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
6
+ const cart = require('./cart-934a8aef.js');
7
7
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
8
8
  const handleFetch = require('./handleFetch-3673a0c2.js');
9
9
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
6
+ const cart = require('./cart-934a8aef.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const paypal = require('./paypal-9908b383.js');
8
+ const paypal = require('./paypal-dddeb76e.js');
9
9
  const zonosStore = require('./zonosStore-7975e4b6.js');
10
10
  const handleFetch = require('./handleFetch-3673a0c2.js');
11
11
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
7
- const paypal = require('./paypal-9908b383.js');
6
+ const cart = require('./cart-934a8aef.js');
7
+ const paypal = require('./paypal-dddeb76e.js');
8
8
  const zonosStore = require('./zonosStore-7975e4b6.js');
9
9
  const handleFetch = require('./handleFetch-3673a0c2.js');
10
10
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
@@ -1117,6 +1117,9 @@ const ZonosCheckout = class {
1117
1117
  cart.stripeStoreReset();
1118
1118
  }
1119
1119
  handleClientSecretChange() {
1120
+ handleFetch.log('=== Client secret changed', 'info', {
1121
+ clientSecret: cart.stripeStore.clientSecret,
1122
+ });
1120
1123
  // apply theme to stripe elements
1121
1124
  void this.applyStripeTheme();
1122
1125
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
6
+ const cart = require('./cart-934a8aef.js');
7
7
  const zonosStore = require('./zonosStore-7975e4b6.js');
8
8
  const handleFetch = require('./handleFetch-3673a0c2.js');
9
9
  require('./isDarkColor-08d92ed7.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
6
+ const cart = require('./cart-934a8aef.js');
7
7
  const zonosStore = require('./zonosStore-7975e4b6.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  require('./handleFetch-3673a0c2.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
6
+ const cart = require('./cart-934a8aef.js');
7
7
  const zonosStore = require('./zonosStore-7975e4b6.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
9
  const isDarkColor = require('./isDarkColor-08d92ed7.js');
@@ -6,9 +6,9 @@ const index = require('./index-2f90486e.js');
6
6
  const zonosStore = require('./zonosStore-7975e4b6.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  const getBorderRadius = require('./getBorderRadius-d184b623.js');
9
- const cart = require('./cart-d9aa5af3.js');
9
+ const cart = require('./cart-934a8aef.js');
10
10
  const handleFetch = require('./handleFetch-3673a0c2.js');
11
- const paypal = require('./paypal-9908b383.js');
11
+ const paypal = require('./paypal-dddeb76e.js');
12
12
  require('./isDarkColor-08d92ed7.js');
13
13
 
14
14
  const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
6
+ const cart = require('./cart-934a8aef.js');
7
7
  const zonosStore = require('./zonosStore-7975e4b6.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
6
  const zonosStore = require('./zonosStore-7975e4b6.js');
7
- const cart = require('./cart-d9aa5af3.js');
7
+ const cart = require('./cart-934a8aef.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const handleFetch = require('./handleFetch-3673a0c2.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-2f90486e.js');
6
- const cart = require('./cart-d9aa5af3.js');
6
+ const cart = require('./cart-934a8aef.js');
7
7
  const zonosStore = require('./zonosStore-7975e4b6.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
9
  require('./handleFetch-3673a0c2.js');
@@ -908,6 +908,9 @@ export class ZonosCheckout {
908
908
  stripeStoreReset();
909
909
  }
910
910
  handleClientSecretChange() {
911
+ log('=== Client secret changed', 'info', {
912
+ clientSecret: stripeStore.clientSecret,
913
+ });
911
914
  // apply theme to stripe elements
912
915
  void this.applyStripeTheme();
913
916
  }
@@ -167,6 +167,7 @@ const cartStoreHasOneEligibleItem = () => {
167
167
  };
168
168
  const cartStoreSetCheckoutSession = (checkoutSession) => {
169
169
  var _a, _b, _c, _d, _e;
170
+ stripeStore.clientSecret = checkoutSession.clientSecret;
170
171
  cartStore.checkoutSession = checkoutSession;
171
172
  cartStore.checkoutSessionId = checkoutSession.id;
172
173
  // Check if there is a redirect URL in the metadata to override
@@ -137,8 +137,9 @@ const initStripeElements = async (props) => {
137
137
  stripeStore.stripeElementsForBillingAddress.update(stripeOptions);
138
138
  // save stripe elements options for later comparison
139
139
  stripeStore.stripeElementsOptions = stripeOptions;
140
+ void stripeStore.stripeElements.fetchUpdates();
140
141
  }
141
- log('Stripe elements initialized');
142
+ log('Stripe elements updated');
142
143
  };
143
144
  const stripeStoreReset = () => {
144
145
  // clean clientSecret so that we can start the new one.
@@ -645,7 +646,6 @@ const stripeStoreInitCheckoutSession = async () => {
645
646
  const result = json.checkoutSessionCreate;
646
647
  // update cart store with updated information
647
648
  cartStoreSetCheckoutSession(result);
648
- stripeStore.clientSecret = result.clientSecret;
649
649
  cartStoreApplySubtotals({
650
650
  method: ((_a = result.landedCost) === null || _a === void 0 ? void 0 : _a.method) || 'DDP',
651
651
  subtotals: result.subtotals,
@@ -2180,6 +2180,10 @@ export const processingStatusCode = {
2180
2180
  Processed: 'PROCESSED',
2181
2181
  Voided: 'VOIDED',
2182
2182
  };
2183
+ export const processorCode = {
2184
+ Paypal: 'PAYPAL',
2185
+ Stripe: 'STRIPE',
2186
+ };
2183
2187
  export const proofOfDeliveryType = {
2184
2188
  Document: 'DOCUMENT',
2185
2189
  NoSignatureRequired: 'NO_SIGNATURE_REQUIRED',
@@ -2631,6 +2635,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
2631
2635
  checkoutSessionCreate(variables, requestHeaders) {
2632
2636
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'checkoutSessionCreate', 'mutation');
2633
2637
  },
2638
+ checkoutSessionOrderCreate(variables, requestHeaders) {
2639
+ return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'checkoutSessionOrderCreate', 'mutation');
2640
+ },
2634
2641
  checkoutSessionPaymentIntentCreate(variables, requestHeaders) {
2635
2642
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'checkoutSessionPaymentIntentCreate', 'mutation');
2636
2643
  },
@@ -2679,9 +2686,6 @@ export function getSdk(client, withWrapper = defaultWrapper) {
2679
2686
  onlineStoreSettings(variables, requestHeaders) {
2680
2687
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'onlineStoreSettings', 'query');
2681
2688
  },
2682
- orderCreate(variables, requestHeaders) {
2683
- return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'orderCreate', 'mutation');
2684
- },
2685
2689
  orderUpdateAccountOrderNumber(variables, requestHeaders) {
2686
2690
  return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'orderUpdateAccountOrderNumber', 'mutation');
2687
2691
  },
@@ -10996,8 +10996,9 @@ const initStripeElements = async (props) => {
10996
10996
  stripeStore.stripeElementsForBillingAddress.update(stripeOptions);
10997
10997
  // save stripe elements options for later comparison
10998
10998
  stripeStore.stripeElementsOptions = stripeOptions;
10999
+ void stripeStore.stripeElements.fetchUpdates();
10999
11000
  }
11000
- log('Stripe elements initialized');
11001
+ log('Stripe elements updated');
11001
11002
  };
11002
11003
  const stripeStoreReset = () => {
11003
11004
  // clean clientSecret so that we can start the new one.
@@ -11504,7 +11505,6 @@ const stripeStoreInitCheckoutSession = async () => {
11504
11505
  const result = json.checkoutSessionCreate;
11505
11506
  // update cart store with updated information
11506
11507
  cartStoreSetCheckoutSession(result);
11507
- stripeStore.clientSecret = result.clientSecret;
11508
11508
  cartStoreApplySubtotals({
11509
11509
  method: ((_a = result.landedCost) === null || _a === void 0 ? void 0 : _a.method) || 'DDP',
11510
11510
  subtotals: result.subtotals,
@@ -11875,6 +11875,7 @@ const cartStoreHasOneEligibleItem = () => {
11875
11875
  };
11876
11876
  const cartStoreSetCheckoutSession = (checkoutSession) => {
11877
11877
  var _a, _b, _c, _d, _e;
11878
+ stripeStore.clientSecret = checkoutSession.clientSecret;
11878
11879
  cartStore.checkoutSession = checkoutSession;
11879
11880
  cartStore.checkoutSessionId = checkoutSession.id;
11880
11881
  // Check if there is a redirect URL in the metadata to override
package/dist/esm/index.js CHANGED
@@ -126,7 +126,7 @@ const getZonosQaUrl = () => {
126
126
  return null;
127
127
  }
128
128
  const qaUrl = extractZonosQaUrl(window.location.href);
129
- const cdnUrl = "https://v1.3.159.js.zonos.com";
129
+ const cdnUrl = "https://v1.3.161.js.zonos.com";
130
130
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
131
131
  if (!qaUrl &&
132
132
  (cdnUrl.includes('test.') ||
@@ -310,10 +310,10 @@ const zonosLoadUrl = (() => {
310
310
  }
311
311
  return null;
312
312
  })();
313
- const ZONOS_URL = "https://v1.3.159.js.zonos.com";
314
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.159";
315
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.159";
316
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.159";
313
+ const ZONOS_URL = "https://v1.3.161.js.zonos.com";
314
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.161";
315
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.161";
316
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.161";
317
317
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
318
318
  const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
319
319
  class Zonos {
@@ -327,7 +327,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
327
327
  !!window.location.search.match(/\?.*(&*)zonosConversionTest/);
328
328
  Zonos._paypalMockResponse = null;
329
329
  Zonos.isBigCommerce = false;
330
- Zonos.releaseDate = "1739308202396";
330
+ Zonos.releaseDate = "1739578573828";
331
331
  Zonos.isLegacyCheckout = false;
332
332
  Zonos.domain = typeof window !== 'undefined'
333
333
  ? // domain that embeds the iframe
@@ -343,7 +343,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
343
343
  Zonos.isNpm = true;
344
344
  Zonos.zonosQaUrl = null;
345
345
  Zonos.zonosQaUrlApi = null;
346
- Zonos.version = `v${"1.3.159"}`;
346
+ Zonos.version = `v${"1.3.161"}`;
347
347
  Zonos.modeAlerted = false;
348
348
  Zonos.cartData = null;
349
349
  Zonos.paypal = null;
@@ -1,5 +1,5 @@
1
1
  import { z as zonosStore, c as createStore } from './zonosStore-71d7e02f.js';
2
- import { F as validateCheckoutSession, f as stripeStore, e as cartStore, z as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-8afb3277.js';
2
+ import { F as validateCheckoutSession, f as stripeStore, e as cartStore, z as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-41bdd9fb.js';
3
3
  import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-b4633675.js';
4
4
  import { t as tinycolor } from './isDarkColor-2f59d721.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-d82f06f2.js';
2
- import { f as stripeStore, V as getFallbackDefaultCountryCode, l as localizationStore, r as translate, e as cartStore } from './cart-8afb3277.js';
2
+ import { f as stripeStore, V as getFallbackDefaultCountryCode, l as localizationStore, r as translate, e as cartStore } from './cart-41bdd9fb.js';
3
3
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
4
4
  import { b as logError, l as log } from './handleFetch-b4633675.js';
5
5
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-d82f06f2.js';
2
- import { e as cartStore, E as currencyFormat, r as translate, M as cartStoreHasOneEligibleItem, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, f as stripeStore, C as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, l as localizationStore, x as cartStoreNextStep, R as stripeStoreTranslateAddressToLatin, S as cartStoreUpdateSelectedShippingOption, T as cartStoreGetShippingTransitInfo, U as sortServiceLevelOptionsByAmount } from './cart-8afb3277.js';
2
+ import { e as cartStore, E as currencyFormat, r as translate, M as cartStoreHasOneEligibleItem, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, f as stripeStore, C as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, l as localizationStore, x as cartStoreNextStep, R as stripeStoreTranslateAddressToLatin, S as cartStoreUpdateSelectedShippingOption, T as cartStoreGetShippingTransitInfo, U as sortServiceLevelOptionsByAmount } from './cart-41bdd9fb.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-02c4e5d3.js';
4
+ import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-c81fb5ee.js';
5
5
  import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-71d7e02f.js';
6
6
  import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, b as logError, a as getIsStagingMode } from './handleFetch-b4633675.js';
7
7
  import { c as createCustomEvent } from './createCustomEvent-58159025.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host, F as Fragment } from './index-d82f06f2.js';
2
- import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as stripeStoreGetPaymentIntent, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, p as getCheckoutSessionBody, q as cartStoreUpdateToErrorState, r as translate, u as getZCountryUrlParam, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as stripeStoreUpdateCheckoutSessionBaseCurrency, z as stripeStoreHandleInventoryCheck, A as stripeStoreConfirmPayment, B as stripeStoreHandleInventoryRefund, C as stripeStoreReset, D as localizationStoreOnUpdate, E as currencyFormat } from './cart-8afb3277.js';
3
- import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-02c4e5d3.js';
2
+ import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as stripeStoreGetPaymentIntent, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, p as getCheckoutSessionBody, q as cartStoreUpdateToErrorState, r as translate, u as getZCountryUrlParam, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as stripeStoreUpdateCheckoutSessionBaseCurrency, z as stripeStoreHandleInventoryCheck, A as stripeStoreConfirmPayment, B as stripeStoreHandleInventoryRefund, C as stripeStoreReset, D as localizationStoreOnUpdate, E as currencyFormat } from './cart-41bdd9fb.js';
3
+ import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-c81fb5ee.js';
4
4
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-71d7e02f.js';
5
5
  import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, g as getIsTestMode, j as jsonParse, a as getIsStagingMode } from './handleFetch-b4633675.js';
6
6
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
@@ -1113,6 +1113,9 @@ const ZonosCheckout = class {
1113
1113
  stripeStoreReset();
1114
1114
  }
1115
1115
  handleClientSecretChange() {
1116
+ log('=== Client secret changed', 'info', {
1117
+ clientSecret: stripeStore.clientSecret,
1118
+ });
1116
1119
  // apply theme to stripe elements
1117
1120
  void this.applyStripeTheme();
1118
1121
  }
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-d82f06f2.js';
2
- import { G as isValidSelector, f as stripeStore, H as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-8afb3277.js';
2
+ import { G as isValidSelector, f as stripeStore, H as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-41bdd9fb.js';
3
3
  import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-71d7e02f.js';
4
4
  import { h as handleFetch, b as logError, l as log } from './handleFetch-b4633675.js';
5
5
  import './isDarkColor-2f59d721.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
2
- import { l as localizationStore } from './cart-8afb3277.js';
2
+ import { l as localizationStore } from './cart-41bdd9fb.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-71d7e02f.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import './handleFetch-b4633675.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
2
- import { a as localizationStoreUpdateSelectedCountryCode, r as translate, l as localizationStore } from './cart-8afb3277.js';
2
+ import { a as localizationStoreUpdateSelectedCountryCode, r as translate, l as localizationStore } from './cart-41bdd9fb.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-71d7e02f.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
5
  import { i as isDarkColor } from './isDarkColor-2f59d721.js';
@@ -2,9 +2,9 @@ import { r as registerInstance, h, H as Host, d as getElement, c as createEvent
2
2
  import { d as zonosStoreFontFamily } from './zonosStore-71d7e02f.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
  import { g as getBorderRadius } from './getBorderRadius-740610fb.js';
5
- import { f as stripeStore } from './cart-8afb3277.js';
5
+ import { f as stripeStore } from './cart-41bdd9fb.js';
6
6
  import { b as logError, l as log } from './handleFetch-b4633675.js';
7
- import { d as paypalStoreInitButtons } from './paypal-02c4e5d3.js';
7
+ import { d as paypalStoreInitButtons } from './paypal-c81fb5ee.js';
8
8
  import './isDarkColor-2f59d721.js';
9
9
 
10
10
  const PaymentEmptyStateDarkIcon = `<svg width="536" height="200" viewBox="0 0 536 200" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-d82f06f2.js';
2
- import { r as translate, l as localizationStore, E as currencyFormat } from './cart-8afb3277.js';
2
+ import { r as translate, l as localizationStore, E as currencyFormat } from './cart-41bdd9fb.js';
3
3
  import { z as zonosStore } from './zonosStore-71d7e02f.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-d82f06f2.js';
2
2
  import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-71d7e02f.js';
3
- import { l as localizationStore, G as isValidSelector, r as translate, u as getZCountryUrlParam, I as setZCountryUrlParam, J as currencyDisplay, K as currencyConvertAndFormat, L as currencyConvert, E as currencyFormat } from './cart-8afb3277.js';
3
+ import { l as localizationStore, G as isValidSelector, r as translate, u as getZCountryUrlParam, I as setZCountryUrlParam, J as currencyDisplay, K as currencyConvertAndFormat, L as currencyConvert, E as currencyFormat } from './cart-41bdd9fb.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { h as handleFetch, b as logError, l as log } from './handleFetch-b4633675.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-d82f06f2.js';
2
- import { W as localizationStoreUpdateSelectedLocale, r as translate, l as localizationStore } from './cart-8afb3277.js';
2
+ import { W as localizationStoreUpdateSelectedLocale, r as translate, l as localizationStore } from './cart-41bdd9fb.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-71d7e02f.js';
4
4
  import { l as languages } from './ILanguage-cd6acb72.js';
5
5
  import './handleFetch-b4633675.js';