@zonos/elements 1.3.92 → 1.3.93

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 (93) hide show
  1. package/dist/cjs/{CheckoutConfig-850071ae.js → CheckoutConfig-8e8a0d1c.js} +1 -1
  2. package/dist/cjs/{cart-d456e0b8.js → cart-9d0ced11.js} +13 -4
  3. package/dist/cjs/{createCustomEvent-94c259c7.js → createCustomEvent-f6317809.js} +2 -2
  4. package/dist/cjs/{handleFetch-45e76490.js → handleFetch-5a16f2bc.js} +1 -1
  5. package/dist/cjs/index.cjs.js +9 -9
  6. package/dist/cjs/{paypal-5c5f8d32.js → paypal-a6ddcfaf.js} +2 -2
  7. package/dist/cjs/zonos-address_7.cjs.entry.js +2 -2
  8. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-checkout.cjs.entry.js +42 -39
  10. package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
  11. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  12. package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  16. package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
  17. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +37 -34
  18. package/dist/collection/components/store/checkout/cart.js +6 -1
  19. package/dist/collection/components/store/checkout/stripe.js +6 -2
  20. package/dist/collection/components/utils/logging/log.js +1 -1
  21. package/dist/esm/{CheckoutConfig-c0ec120d.js → CheckoutConfig-c54d23b8.js} +1 -1
  22. package/dist/esm/{cart-1083aa3b.js → cart-ef2e2eec.js} +13 -4
  23. package/dist/esm/{createCustomEvent-a45228e7.js → createCustomEvent-73760da0.js} +2 -2
  24. package/dist/esm/{handleFetch-0133265e.js → handleFetch-ce924688.js} +1 -1
  25. package/dist/esm/index.js +10 -10
  26. package/dist/esm/{paypal-a2399ed3.js → paypal-cce03d02.js} +2 -2
  27. package/dist/esm/zonos-address_7.entry.js +2 -2
  28. package/dist/esm/zonos-cart-items_12.entry.js +4 -4
  29. package/dist/esm/zonos-checkout.entry.js +42 -39
  30. package/dist/esm/zonos-controller.entry.js +2 -2
  31. package/dist/esm/zonos-country-flag.entry.js +2 -2
  32. package/dist/esm/zonos-country-select_4.entry.js +2 -2
  33. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  34. package/dist/esm/zonos-hello.entry.js +2 -2
  35. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  36. package/dist/esm/zonos-notification_3.entry.js +3 -3
  37. package/dist/esm-es5/{CheckoutConfig-c0ec120d.js → CheckoutConfig-c54d23b8.js} +1 -1
  38. package/dist/esm-es5/{cart-1083aa3b.js → cart-ef2e2eec.js} +1 -1
  39. package/dist/esm-es5/createCustomEvent-73760da0.js +1 -0
  40. package/dist/esm-es5/index.js +1 -1
  41. package/dist/esm-es5/{paypal-a2399ed3.js → paypal-cce03d02.js} +1 -1
  42. package/dist/esm-es5/zonos-address_7.entry.js +1 -1
  43. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  44. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  45. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  46. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  47. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  48. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  49. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  50. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  51. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  52. package/dist/scripts/index.js +1 -1
  53. package/dist/scripts/loadZonos.js +1 -1
  54. package/dist/scripts/zonos.js +1 -1
  55. package/dist/zonos-elements/index.esm.js +1 -1
  56. package/dist/zonos-elements/{p-95b4ea5e.js → p-021c2035.js} +1 -1
  57. package/dist/zonos-elements/{p-340408f2.system.entry.js → p-205d1fd0.system.entry.js} +1 -1
  58. package/dist/zonos-elements/{p-dbe8a5de.entry.js → p-3242242f.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-8aad6abd.system.js → p-332ccd38.system.js} +1 -1
  60. package/dist/zonos-elements/{p-f13738a1.entry.js → p-36050826.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-ba0aef88.system.entry.js → p-517444c0.system.entry.js} +1 -1
  62. package/dist/zonos-elements/p-52542b33.system.js +1 -0
  63. package/dist/zonos-elements/{p-7995965e.entry.js → p-52b7a342.entry.js} +1 -1
  64. package/dist/zonos-elements/{p-3d6a7efd.entry.js → p-55534ab4.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-1560ee37.entry.js → p-6037f297.entry.js} +1 -1
  66. package/dist/zonos-elements/{p-57aa09e7.system.js → p-606e0443.system.js} +1 -1
  67. package/dist/zonos-elements/p-609209fe.entry.js +1 -0
  68. package/dist/zonos-elements/{p-e8c3387c.system.entry.js → p-61c43b0c.system.entry.js} +1 -1
  69. package/dist/zonos-elements/{p-362bd7de.js → p-7141699d.js} +1 -1
  70. package/dist/zonos-elements/{p-d8a3b001.system.entry.js → p-832535b5.system.entry.js} +1 -1
  71. package/dist/zonos-elements/{p-b8e85bf5.js → p-9a13b43f.js} +1 -1
  72. package/dist/zonos-elements/{p-8e4348e9.entry.js → p-a8fb9ec4.entry.js} +1 -1
  73. package/dist/zonos-elements/{p-4e3d23ad.system.entry.js → p-a92ea268.system.entry.js} +1 -1
  74. package/dist/zonos-elements/{p-b53f9c25.system.js → p-acb212b2.system.js} +1 -1
  75. package/dist/zonos-elements/{p-8dc1342e.js → p-ad8b87ec.js} +1 -1
  76. package/dist/zonos-elements/{p-c39c3ed6.entry.js → p-c6950e78.entry.js} +1 -1
  77. package/dist/zonos-elements/{p-52fdf52d.system.entry.js → p-c6f848d6.system.entry.js} +1 -1
  78. package/dist/zonos-elements/p-c78dd680.system.js +1 -1
  79. package/dist/zonos-elements/{p-cf28a962.entry.js → p-c990f553.entry.js} +1 -1
  80. package/dist/zonos-elements/{p-1f1aaf73.system.entry.js → p-d42d729b.system.entry.js} +1 -1
  81. package/dist/zonos-elements/{p-460cc134.system.entry.js → p-d8c3540c.system.entry.js} +1 -1
  82. package/dist/zonos-elements/{p-ded2ae47.system.entry.js → p-dbc57aea.system.entry.js} +1 -1
  83. package/dist/zonos-elements/{p-ed276123.system.entry.js → p-e11d7951.system.entry.js} +1 -1
  84. package/dist/zonos-elements/{p-e9ee2062.entry.js → p-e2bbd294.entry.js} +1 -1
  85. package/dist/zonos-elements/{p-4854c65b.system.js → p-e3432dca.system.js} +1 -1
  86. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  87. package/package.json +1 -1
  88. package/dist/esm-es5/createCustomEvent-a45228e7.js +0 -1
  89. package/dist/zonos-elements/p-403b3460.entry.js +0 -1
  90. package/dist/zonos-elements/p-8c0ff373.system.js +0 -1
  91. /package/dist/esm-es5/{handleFetch-0133265e.js → handleFetch-ce924688.js} +0 -0
  92. /package/dist/zonos-elements/{p-197c5707.system.js → p-480556ea.system.js} +0 -0
  93. /package/dist/zonos-elements/{p-ad7ce197.js → p-539cc913.js} +0 -0
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { l as log, a as logError } from './handleFetch-0133265e.js';
2
- import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-c0ec120d.js';
3
- export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-c0ec120d.js';
1
+ import { l as log, a as logError } from './handleFetch-ce924688.js';
2
+ import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-c54d23b8.js';
3
+ export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-c54d23b8.js';
4
4
 
5
5
  /**
6
6
  * Get the load version and url based on the loadScriptSrc and version
@@ -94,7 +94,7 @@ const getZonosQaUrl = () => {
94
94
  return null;
95
95
  }
96
96
  const qaUrl = extractZonosQaUrl(window.location.href);
97
- const cdnUrl = "https://v1.3.92.js.zonos.com";
97
+ const cdnUrl = "https://v1.3.93.js.zonos.com";
98
98
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
99
99
  if (!qaUrl &&
100
100
  (cdnUrl.includes('test.') ||
@@ -278,10 +278,10 @@ const zonosLoadUrl = (() => {
278
278
  }
279
279
  return null;
280
280
  })();
281
- const ZONOS_URL = "https://v1.3.92.js.zonos.com";
282
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.92";
283
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.92";
284
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.92";
281
+ const ZONOS_URL = "https://v1.3.93.js.zonos.com";
282
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.93";
283
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.93";
284
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.93";
285
285
  const INTER_FONT_URL = 'https://rsms.me';
286
286
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
287
287
  const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
@@ -296,7 +296,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
296
296
  !!window.location.search.match(/\?.*(&*)zonosConversionTest/);
297
297
  Zonos._paypalMockResponse = null;
298
298
  Zonos.isBigCommerce = false;
299
- Zonos.releaseDate = "1728934623320";
299
+ Zonos.releaseDate = "1729003957102";
300
300
  Zonos.isLegacyCheckout = false;
301
301
  /**
302
302
  * By default, the package will load from npm
@@ -304,7 +304,7 @@ Zonos.isLegacyCheckout = false;
304
304
  Zonos.isNpm = true;
305
305
  Zonos.zonosQaUrl = null;
306
306
  Zonos.zonosQaUrlApi = null;
307
- Zonos.version = `v${"1.3.92"}`;
307
+ Zonos.version = `v${"1.3.93"}`;
308
308
  Zonos.modeAlerted = false;
309
309
  Zonos.cartData = null;
310
310
  Zonos.paypal = null;
@@ -1,6 +1,6 @@
1
1
  import { z as zonosStore, c as createStore } from './zonosStore-0dc7a947.js';
2
- import { d as cartStore, u as stripeStoreHandleInventoryCheck, t as translate, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-1083aa3b.js';
3
- import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-0133265e.js';
2
+ import { d as cartStore, u as stripeStoreHandleInventoryCheck, t as translate, r as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-ef2e2eec.js';
3
+ import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-ce924688.js';
4
4
  import { t as tinycolor } from './isDarkColor-b3afa948.js';
5
5
 
6
6
  /*!
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { j as stripeStore, P as getFallbackDefaultCountryCode, l as localizationStore, t as translate } from './cart-1083aa3b.js';
2
+ import { j as stripeStore, P as getFallbackDefaultCountryCode, l as localizationStore, t as translate } from './cart-ef2e2eec.js';
3
3
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
4
- import { a as logError, l as log } from './handleFetch-0133265e.js';
4
+ import { a as logError, l as log } from './handleFetch-ce924688.js';
5
5
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
6
6
  import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
7
7
  import { c as classes } from './classes-0d95c529.js';
@@ -1,11 +1,11 @@
1
1
  import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
2
- import { d as cartStore, t as translate, E as currencyFormat, F as cartStoreHasOneEligibleItem, G as stripeStoreApplyPromoCode, H as stripeStoreRemovePromoCode, w as stripeStoreReset, j as stripeStore, I as stripeStoreRetrievePayment, J as stripeStoreMessageBasedOnStatus, K as stripeStoreResetPromoCode, l as localizationStore, L as stripeStoreTranslateAddressToLatin, M as cartStoreUpdateSelectedShippingOption, N as cartStoreGetShippingTransitInfo, O as sortServiceLevelOptionsByAmount } from './cart-1083aa3b.js';
2
+ import { d as cartStore, t as translate, E as currencyFormat, F as cartStoreHasOneEligibleItem, G as stripeStoreApplyPromoCode, H as stripeStoreRemovePromoCode, w as stripeStoreReset, j as stripeStore, I as stripeStoreRetrievePayment, J as stripeStoreMessageBasedOnStatus, K as stripeStoreResetPromoCode, l as localizationStore, L as stripeStoreTranslateAddressToLatin, M as cartStoreUpdateSelectedShippingOption, N as cartStoreGetShippingTransitInfo, O as sortServiceLevelOptionsByAmount } from './cart-ef2e2eec.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { s as submitGtag, a as paypalStore, b as paypalStoreReset, i as isContrastColor } from './paypal-a2399ed3.js';
4
+ import { s as submitGtag, a as paypalStore, b as paypalStoreReset, i as isContrastColor } from './paypal-cce03d02.js';
5
5
  import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
6
- import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-a45228e7.js';
6
+ import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-73760da0.js';
7
7
  import { g as getBorderRadius } from './getBorderRadius-cff1e39b.js';
8
- import { h as handleFetch, s as sendErrorLog } from './handleFetch-0133265e.js';
8
+ import { h as handleFetch, s as sendErrorLog } from './handleFetch-ce924688.js';
9
9
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
10
10
  import { l as languages } from './ILanguage-cd6acb72.js';
11
11
  import { i as isDarkColor, t as tinycolor } from './isDarkColor-b3afa948.js';
@@ -1,14 +1,14 @@
1
1
  import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
2
- import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as getZCountryUrlParam, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreHandleInventoryCheck, v as stripeStoreConfirmPayment, w as stripeStoreReset, x as localizationStoreOnUpdate } from './cart-1083aa3b.js';
3
- import { s as submitGtag, p as paypalInitScript } from './paypal-a2399ed3.js';
2
+ import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as getZCountryUrlParam, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreHandleInventoryCheck, v as stripeStoreConfirmPayment, w as stripeStoreReset, x as localizationStoreOnUpdate } from './cart-ef2e2eec.js';
3
+ import { s as submitGtag, p as paypalInitScript } from './paypal-cce03d02.js';
4
4
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-0dc7a947.js';
5
- import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-a45228e7.js';
5
+ import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-73760da0.js';
6
6
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
7
- import { l as log, a as logError, s as sendErrorLog, b as allLogs } from './handleFetch-0133265e.js';
7
+ import { l as log, a as logError, s as sendErrorLog, b as allLogs } from './handleFetch-ce924688.js';
8
8
  import { c as classes } from './classes-0d95c529.js';
9
9
  import { g as getBorderRadius } from './getBorderRadius-cff1e39b.js';
10
10
  import { i as isDarkColor } from './isDarkColor-b3afa948.js';
11
- import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-c0ec120d.js';
11
+ import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-c54d23b8.js';
12
12
  import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
13
13
 
14
14
  /**
@@ -376,12 +376,6 @@ const ZonosCheckout = class {
376
376
  catch (err) {
377
377
  // stop loading
378
378
  stripeStore.isFetchingSession = false;
379
- cartStoreUpdateToErrorState({
380
- messages: [
381
- translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists"),
382
- ],
383
- title: translate('Error creating Checkout'),
384
- });
385
379
  // We want to log the error anytime we fail to create a checkout session
386
380
  void sendErrorLog({
387
381
  endpoint: 'Error creating Checkout',
@@ -393,6 +387,12 @@ const ZonosCheckout = class {
393
387
  storeBaseUrl: (_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.storeBaseUrl,
394
388
  },
395
389
  });
390
+ cartStoreUpdateToErrorState({
391
+ messages: [
392
+ translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists"),
393
+ ],
394
+ title: translate('Error creating Checkout'),
395
+ });
396
396
  }
397
397
  }, {
398
398
  // Trigger this event before any other event
@@ -431,6 +431,7 @@ const ZonosCheckout = class {
431
431
  */
432
432
  useLegacyQueryParams() {
433
433
  const urlParams = new URLSearchParams(window.location.search);
434
+ log('legacy urlParams', 'info', Object.fromEntries(urlParams.entries()));
434
435
  const getParam = (param) => {
435
436
  const value = urlParams.get(param);
436
437
  if (!value || value === 'undefined') {
@@ -438,40 +439,42 @@ const ZonosCheckout = class {
438
439
  }
439
440
  return value;
440
441
  };
441
- const legacyShippingInfo = {
442
- country:
443
- // fallback to selected country code if country is not provided
444
- getZCountryUrlParam(urlParams) || localizationStore.selectedCountryCode,
445
- customerAddress1: getParam('customerAddress1'),
446
- customerAddress2: getParam('customerAddress2'),
447
- customerCity: getParam('customerCity'),
448
- customerEmail: getParam('customerEmail'),
449
- customerName: getParam('customerName'),
450
- customerPhone: getParam('customerPhone'),
451
- customerState: getParam('customerState'),
452
- customerZip: getParam('customerZip'),
453
- };
442
+ const country =
443
+ // fallback to selected country code if country is not provided
444
+ getZCountryUrlParam(urlParams) || localizationStore.selectedCountryCode;
445
+ const city = getParam('customerCity');
446
+ const email = getParam('customerEmail') || '';
447
+ const line1 = getParam('customerAddress1');
448
+ const line2 = getParam('customerAddress2') || '';
449
+ const name = getParam('customerName');
450
+ const phone = getParam('customerPhone');
451
+ const postal_code = getParam('customerZip') || '';
452
+ const state = getParam('customerState') || '';
454
453
  // if one of the value is null, no need to preset the default address
455
- if (!legacyShippingInfo.customerAddress1 ||
456
- !legacyShippingInfo.customerCity ||
457
- !legacyShippingInfo.customerName ||
458
- !legacyShippingInfo.customerPhone ||
459
- !legacyShippingInfo.country) {
460
- log('Missing some query params so it can not be prefilled', 'info', legacyShippingInfo);
454
+ if (!line1 || !city || !name || !phone || !country) {
455
+ log('Missing required query params so it can not be prefilled', 'info', [
456
+ !line1 && 'line1',
457
+ !city && 'city',
458
+ !name && 'name',
459
+ !phone && 'phone',
460
+ !country && 'country',
461
+ ]
462
+ .filter(Boolean)
463
+ .join(', '));
461
464
  return;
462
465
  }
463
466
  this.defaultAddress = {
464
467
  address: {
465
- city: legacyShippingInfo.customerCity,
466
- country: legacyShippingInfo.country,
467
- line1: legacyShippingInfo.customerAddress1,
468
- line2: legacyShippingInfo.customerAddress2 || '',
469
- postal_code: legacyShippingInfo.customerZip || '',
470
- state: legacyShippingInfo.customerState || '',
468
+ city,
469
+ country,
470
+ line1,
471
+ line2,
472
+ postal_code,
473
+ state,
471
474
  },
472
- email: legacyShippingInfo.customerEmail || '',
473
- name: legacyShippingInfo.customerName,
474
- phone: legacyShippingInfo.customerPhone,
475
+ email,
476
+ name,
477
+ phone,
475
478
  };
476
479
  }
477
480
  /**
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
2
- import { y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-1083aa3b.js';
2
+ import { y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-ef2e2eec.js';
3
3
  import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
4
- import { h as handleFetch, a as logError, l as log } from './handleFetch-0133265e.js';
4
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-ce924688.js';
5
5
  import './isDarkColor-b3afa948.js';
6
6
  import './getBorderRadius-cff1e39b.js';
7
7
 
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { l as localizationStore } from './cart-1083aa3b.js';
2
+ import { l as localizationStore } from './cart-ef2e2eec.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import './handleFetch-0133265e.js';
5
+ import './handleFetch-ce924688.js';
6
6
  import './isDarkColor-b3afa948.js';
7
7
  import './getBorderRadius-cff1e39b.js';
8
8
 
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
2
- import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-1083aa3b.js';
2
+ import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-ef2e2eec.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
5
  import { i as isDarkColor } from './isDarkColor-b3afa948.js';
6
6
  import { l as languages } from './ILanguage-cd6acb72.js';
7
- import './handleFetch-0133265e.js';
7
+ import './handleFetch-ce924688.js';
8
8
  import './getBorderRadius-cff1e39b.js';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
2
- import { t as translate, l as localizationStore, E as currencyFormat } from './cart-1083aa3b.js';
2
+ import { t as translate, l as localizationStore, E as currencyFormat } from './cart-ef2e2eec.js';
3
3
  import { z as zonosStore } from './zonosStore-0dc7a947.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
7
- import './handleFetch-0133265e.js';
7
+ import './handleFetch-ce924688.js';
8
8
  import './isDarkColor-b3afa948.js';
9
9
  import './getBorderRadius-cff1e39b.js';
10
10
 
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-86b8247e.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-0dc7a947.js';
3
- import { l as localizationStore, y as isValidSelector, t as translate, o as getZCountryUrlParam, A as setZCountryUrlParam, B as currencyDisplay, C as currencyConvertAndFormat, D as currencyConvert, E as currencyFormat } from './cart-1083aa3b.js';
3
+ import { l as localizationStore, y as isValidSelector, t as translate, o as getZCountryUrlParam, A as setZCountryUrlParam, B as currencyDisplay, C as currencyConvertAndFormat, D as currencyConvert, E as currencyFormat } from './cart-ef2e2eec.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
- import { h as handleFetch, a as logError, l as log } from './handleFetch-0133265e.js';
5
+ import { h as handleFetch, a as logError, l as log } from './handleFetch-ce924688.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
7
7
  import './isDarkColor-b3afa948.js';
8
8
  import './getBorderRadius-cff1e39b.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
2
- import { Q as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-1083aa3b.js';
2
+ import { Q as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-ef2e2eec.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
4
4
  import { l as languages } from './ILanguage-cd6acb72.js';
5
- import './handleFetch-0133265e.js';
5
+ import './handleFetch-ce924688.js';
6
6
  import './isDarkColor-b3afa948.js';
7
7
  import './getBorderRadius-cff1e39b.js';
8
8
 
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement, c as createEvent } from './index-86b8247e.js';
2
2
  import { d as zonosStoreFontFamily } from './zonosStore-0dc7a947.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { j as stripeStore } from './cart-1083aa3b.js';
5
- import { a as logError, l as log } from './handleFetch-0133265e.js';
6
- import { c as paypalStoreInitButtons } from './paypal-a2399ed3.js';
4
+ import { j as stripeStore } from './cart-ef2e2eec.js';
5
+ import { a as logError, l as log } from './handleFetch-ce924688.js';
6
+ import { c as paypalStoreInitButtons } from './paypal-cce03d02.js';
7
7
  import './isDarkColor-b3afa948.js';
8
8
  import './getBorderRadius-cff1e39b.js';
9
9
 
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):o(t.value).then(i,c)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(r=0)),r)try{if(n=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;o=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1];a=c;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=e.call(t,r)}catch(t){c=[6,t];o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-0133265e.js";var getTempCartById=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,r,n;return __generator(this,(function(o){switch(o.label){case 0:return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:e=o.sent(),r=e.errors,n=e.json;if(!n||r.length){return[2,null]}return[2,n]}}))}))};var setupCartData=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,getTempCartById(t)];case 1:e=r.sent();log("[ZONOS - loadZonos] getting temp cart data","info",e);if(!e){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:e.cartData,storeFavicon:e.storeFaviconUrl,storeId:e.cartData.storeId,storeLogo:e.storeLogoUrl,zonosApiKey:e.cartData.credentialToken}]}}))}))};var checkoutHiddenBtnSelector="zonos--checkout-hidden-button";var domesticRedirectedBtnSelector="zonos--domestic-redirected-checkout-button";export{checkoutHiddenBtnSelector as c,domesticRedirectedBtnSelector as d,setupCartData as s};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,r,n){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n["throw"](t))}catch(t){a(t)}}function u(t){t.done?r(t.value):o(t.value).then(i,c)}u((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(t){return function(e){return u([t,e])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(r=0)),r)try{if(n=1,o&&(a=c[0]&2?o["return"]:c[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:r.label++;return{value:c[1],done:false};case 5:r.label++;o=c[1];c=[0];continue;case 7:c=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1];a=c;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=e.call(t,r)}catch(t){c=[6,t];o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{h as handleFetch,l as log,a as logError}from"./handleFetch-ce924688.js";var getTempCartById=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,r,n;return __generator(this,(function(o){switch(o.label){case 0:return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{tempCartUUID:t},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:e=o.sent(),r=e.errors,n=e.json;if(!n||r.length){return[2,null]}return[2,n]}}))}))};var setupCartData=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:return[4,getTempCartById(t)];case 1:e=r.sent();log("[ZONOS - loadZonos] getting temp cart data","info",e);if(!e){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}return[2,{cartData:e.cartData,storeFavicon:e.storeFaviconUrl,storeId:e.cartData.storeId,storeLogo:e.storeLogoUrl,zonosApiKey:e.cartData.credentialToken}]}}))}))};var checkoutHiddenBtnSelector="zonos--checkout-hidden-button";var domesticRedirectedBtnSelector="zonos--domestic-redirected-checkout-button";export{checkoutHiddenBtnSelector as c,domesticRedirectedBtnSelector as d,setupCartData as s};