@zonos/elements 1.3.173 → 1.3.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{CheckoutConfig-c5943bbf.js → CheckoutConfig-fb59baa3.js} +1 -1
- package/dist/cjs/{cart-d9052930.js → cart-93ed3002.js} +1 -1
- package/dist/cjs/{handleFetch-ff25db40.js → handleFetch-969d05d8.js} +36 -13
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/{paypal-31477331.js → paypal-8b49ef07.js} +2 -2
- package/dist/cjs/zonos-address_7.cjs.entry.js +3 -4
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +7 -8
- package/dist/cjs/zonos-checkout.cjs.entry.js +13 -11
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/collection/components/utils/logging/getAdditionalLogMetadata.js +1 -1
- package/dist/collection/components/utils/logging/prepLoadTimeApiLog.js +30 -12
- package/dist/collection/components/utils/logging/sendBulkLoadTimeApiLog.js +6 -3
- package/dist/collection/types/generated/graphql.frontend.types.js +3 -9
- package/dist/collection/types/generated/graphql.internal.types.js +1 -6
- package/dist/esm/{CheckoutConfig-75af3742.js → CheckoutConfig-63b3ed06.js} +1 -1
- package/dist/esm/{cart-fff4f4a4.js → cart-54d84646.js} +1 -1
- package/dist/esm/{handleFetch-0109fb78.js → handleFetch-621e45bc.js} +36 -14
- package/dist/esm/index.js +10 -10
- package/dist/esm/{paypal-087fbd16.js → paypal-17a320c8.js} +2 -2
- package/dist/esm/zonos-address_7.entry.js +2 -3
- package/dist/esm/zonos-cart-items_13.entry.js +3 -4
- package/dist/esm/zonos-checkout.entry.js +10 -8
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-empty-state-payment_4.entry.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm-es5/{CheckoutConfig-75af3742.js → CheckoutConfig-63b3ed06.js} +1 -1
- package/dist/esm-es5/{cart-fff4f4a4.js → cart-54d84646.js} +1 -1
- package/dist/esm-es5/handleFetch-621e45bc.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-087fbd16.js → paypal-17a320c8.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +20 -12
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/utils/logging/getAdditionalLogMetadata.d.ts +4 -1
- package/dist/types/components/utils/logging/prepLoadTimeApiLog.d.ts +2 -4
- package/dist/types/types/LogLoadScript.d.ts +22 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +12 -93
- package/dist/types/types/generated/graphql.frontend.types.ts +22 -107
- package/dist/types/types/generated/graphql.internal.types.d.ts +1 -29
- package/dist/types/types/generated/graphql.internal.types.ts +1 -46
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-0db19b02.entry.js → p-0ee9b22a.entry.js} +1 -1
- package/dist/zonos-elements/p-0fc02cde.js +1 -0
- package/dist/zonos-elements/{p-514431e9.system.entry.js → p-19ac0f84.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1be7b435.system.entry.js → p-1b6d0895.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1b75aa35.system.js +1 -0
- package/dist/zonos-elements/p-28dcd7bb.entry.js +1 -0
- package/dist/zonos-elements/{p-ada6e691.system.entry.js → p-3d169241.system.entry.js} +1 -1
- package/dist/zonos-elements/p-416ac901.entry.js +1 -0
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-7862da71.entry.js → p-4a87a92c.entry.js} +1 -1
- package/dist/zonos-elements/{p-a9d7746a.entry.js → p-4c6dfe2e.entry.js} +1 -1
- package/dist/zonos-elements/p-6612e6f9.system.entry.js +1 -0
- package/dist/zonos-elements/{p-bfd6e156.js → p-75b771cf.js} +1 -1
- package/dist/zonos-elements/{p-73a7b89b.entry.js → p-78a95cee.entry.js} +1 -1
- package/dist/zonos-elements/{p-38f6f6fd.system.js → p-84dd312c.system.js} +1 -1
- package/dist/zonos-elements/{p-1c488ecf.js → p-869bbedc.js} +1 -1
- package/dist/zonos-elements/{p-78b81404.system.js → p-8964d8f8.system.js} +1 -1
- package/dist/zonos-elements/{p-5275b7ca.system.entry.js → p-8e436df2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-31ce9143.system.entry.js → p-9f8b820e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-759a654a.system.js → p-a1d54022.system.js} +1 -1
- package/dist/zonos-elements/p-b86b82eb.entry.js +1 -0
- package/dist/zonos-elements/p-c67f6666.system.entry.js +1 -0
- package/dist/zonos-elements/p-d22c15be.entry.js +1 -0
- package/dist/zonos-elements/p-d74ab632.system.entry.js +1 -0
- package/dist/zonos-elements/{p-67ca7373.entry.js → p-d9779ea7.entry.js} +1 -1
- package/dist/zonos-elements/{p-a83370c6.system.entry.js → p-d98fa14c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2ebb4fa7.system.js → p-e0d3aeae.system.js} +1 -1
- package/dist/zonos-elements/{p-0078362c.system.entry.js → p-e11eecbf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-407a96d2.entry.js → p-ed8a8a44.entry.js} +1 -1
- package/dist/zonos-elements/{p-cbd2bd33.js → p-f80f24a0.js} +2 -2
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/isCheckoutMobile-f491ca7c.js +0 -8
- package/dist/esm/isCheckoutMobile-8846dccb.js +0 -6
- package/dist/esm-es5/handleFetch-0109fb78.js +0 -1
- package/dist/esm-es5/isCheckoutMobile-8846dccb.js +0 -1
- package/dist/zonos-elements/p-033817e3.system.entry.js +0 -1
- package/dist/zonos-elements/p-04c38987.system.js +0 -1
- package/dist/zonos-elements/p-1b5a2714.system.entry.js +0 -1
- package/dist/zonos-elements/p-427c2766.entry.js +0 -1
- package/dist/zonos-elements/p-5edc11be.system.entry.js +0 -1
- package/dist/zonos-elements/p-81a54668.js +0 -1
- package/dist/zonos-elements/p-839448c3.js +0 -1
- package/dist/zonos-elements/p-8b33c3b7.entry.js +0 -1
- package/dist/zonos-elements/p-aed0098c.system.js +0 -1
- package/dist/zonos-elements/p-ef9fdf45.entry.js +0 -1
- package/dist/zonos-elements/p-f6c0da8b.entry.js +0 -1
|
@@ -124,6 +124,11 @@ const jsonParse = (_data) => {
|
|
|
124
124
|
return null;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
|
+
const checkoutBreakpoint = 890;
|
|
128
|
+
const isCheckoutMobile = (isMobile) => {
|
|
129
|
+
return isMobile || window.innerWidth < checkoutBreakpoint;
|
|
130
|
+
};
|
|
131
|
+
|
|
127
132
|
const getNavigatorConnection = () => {
|
|
128
133
|
const connection = 'connection' in window.navigator
|
|
129
134
|
? // connection is not yet supported in all browsers
|
|
@@ -154,7 +159,7 @@ const getAdditionalLogMetadata = () => {
|
|
|
154
159
|
connectionSaveData: baseConnection === null || baseConnection === void 0 ? void 0 : baseConnection.saveData,
|
|
155
160
|
isHostedCheckout: window.Zonos.isLegacyCheckout,
|
|
156
161
|
screenHeight: window.screen.height,
|
|
157
|
-
screenWidth: window.
|
|
162
|
+
screenWidth: window.innerWidth,
|
|
158
163
|
userAgent: userAgentData && userAgentData.brands.length > 0
|
|
159
164
|
? userAgentData
|
|
160
165
|
: window.navigator.userAgent,
|
|
@@ -163,7 +168,7 @@ const getAdditionalLogMetadata = () => {
|
|
|
163
168
|
|
|
164
169
|
const blackListPaths = [
|
|
165
170
|
'/api/zonos-elements/log-script-load',
|
|
166
|
-
'/api/zonos-elements/log-bulk-load',
|
|
171
|
+
'/api/zonos-elements/log-bulk-load-data',
|
|
167
172
|
];
|
|
168
173
|
/**
|
|
169
174
|
* Prepares the load time api log for the given API call to send to the server later
|
|
@@ -174,20 +179,37 @@ const prepLoadTimeApiLog = ({ apiPath, apiType, loadTimeInternal, loadTimeTotal,
|
|
|
174
179
|
if (blackListPaths.includes(apiPath)) {
|
|
175
180
|
return;
|
|
176
181
|
}
|
|
182
|
+
const loadTimeBrowserApi = loadTimeTotal - loadTimeInternal;
|
|
183
|
+
// No need to record if the browser API load time is negative (cached)
|
|
184
|
+
if (loadTimeBrowserApi < 0) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
// e.g. /api/zonos-elements/log-script-load?zonosDebug=1 -> /api/zonos-elements/log-script-load
|
|
177
188
|
const apiPathWithoutParams = apiPath.split('?')[0] || apiPath;
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
189
|
+
const additionalLogMetadata = getAdditionalLogMetadata();
|
|
190
|
+
const isMobileAgent = typeof additionalLogMetadata.userAgent === 'object' &&
|
|
191
|
+
additionalLogMetadata.userAgent.mobile;
|
|
192
|
+
const bulkLoadLogBody = {
|
|
193
|
+
apiType,
|
|
194
|
+
connectionType: additionalLogMetadata.connectionEffectiveType,
|
|
183
195
|
href: apiPathWithoutParams,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
196
|
+
isHostedCheckout: window.Zonos.isLegacyCheckout,
|
|
197
|
+
// Use the isMobileAgent to determine if the checkout is mobile, if it's not availabe, use the logic from isCheckoutMobile
|
|
198
|
+
isMobile: isCheckoutMobile(isMobileAgent),
|
|
199
|
+
loadTimeBrowserApi,
|
|
200
|
+
loadTimeInternal,
|
|
201
|
+
loadTimeTotal,
|
|
202
|
+
metadata: Object.assign({}, additionalLogMetadata),
|
|
203
|
+
screenHeight: additionalLogMetadata.screenHeight,
|
|
204
|
+
screenWidth: additionalLogMetadata.screenWidth,
|
|
205
|
+
userAgent: typeof additionalLogMetadata.userAgent === 'string'
|
|
206
|
+
? additionalLogMetadata.userAgent
|
|
207
|
+
: additionalLogMetadata.userAgent['brands']
|
|
208
|
+
.map(brand => brand.brand)
|
|
209
|
+
.filter(brand => !/Not.*A.*Brand.*/.test(brand))
|
|
210
|
+
.join(','),
|
|
189
211
|
};
|
|
190
|
-
window.Zonos.loadTimeApiInfoList.push(
|
|
212
|
+
window.Zonos.loadTimeApiInfoList.push(bulkLoadLogBody);
|
|
191
213
|
};
|
|
192
214
|
|
|
193
215
|
/**
|
|
@@ -466,4 +488,4 @@ const handleFetch = async (path, _opts) => {
|
|
|
466
488
|
});
|
|
467
489
|
};
|
|
468
490
|
|
|
469
|
-
export { getIsStagingMode as a, logError as b, getElapsedTime as c, allLogs as d, getAdditionalLogMetadata as e, fallbackApiList as f, getIsTestMode as g, handleFetch as h, jsonParse as j, log as l, sendErrorLog as s };
|
|
491
|
+
export { getIsStagingMode as a, logError as b, getElapsedTime as c, allLogs as d, getAdditionalLogMetadata as e, fallbackApiList as f, getIsTestMode as g, handleFetch as h, isCheckoutMobile as i, jsonParse as j, log as l, sendErrorLog as s };
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getIsTestMode, a as getIsStagingMode, l as log, h as handleFetch, b as logError } from './handleFetch-
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { g as getIsTestMode, a as getIsStagingMode, l as log, h as handleFetch, b as logError } from './handleFetch-621e45bc.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-63b3ed06.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-63b3ed06.js';
|
|
4
4
|
export { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-915ef042.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -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.
|
|
129
|
+
const cdnUrl = "https://v1.3.174.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.
|
|
314
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
315
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
316
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
313
|
+
const ZONOS_URL = "https://v1.3.174.js.zonos.com";
|
|
314
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.174";
|
|
315
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.174";
|
|
316
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.174";
|
|
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 = "
|
|
330
|
+
Zonos.releaseDate = "1742827810410";
|
|
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.
|
|
346
|
+
Zonos.version = `v${"1.3.174"}`;
|
|
347
347
|
Zonos.modeAlerted = false;
|
|
348
348
|
Zonos.cartData = null;
|
|
349
349
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-d3c5a0a5.js';
|
|
2
|
-
import { t as trackConversionEvent, F as validateCheckoutSession, f as stripeStore, e as cartStore, z as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-
|
|
3
|
-
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { t as trackConversionEvent, F as validateCheckoutSession, f as stripeStore, e as cartStore, z as stripeStoreHandleInventoryCheck, r as translate, x as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-54d84646.js';
|
|
3
|
+
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-621e45bc.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-446fccb7.js';
|
|
5
5
|
|
|
6
6
|
/*!
|
|
@@ -1,8 +1,7 @@
|
|
|
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, t as trackConversionEvent, V as getFallbackDefaultCountryCode, r as translate, l as localizationStore, e as cartStore } from './cart-
|
|
2
|
+
import { f as stripeStore, t as trackConversionEvent, V as getFallbackDefaultCountryCode, r as translate, l as localizationStore, e as cartStore } from './cart-54d84646.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-d3c5a0a5.js';
|
|
4
|
-
import { i as isCheckoutMobile } from './
|
|
5
|
-
import { b as logError, l as log } from './handleFetch-0109fb78.js';
|
|
4
|
+
import { b as logError, l as log, i as isCheckoutMobile } from './handleFetch-621e45bc.js';
|
|
6
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
7
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
8
7
|
import { R as RemoveIcon$1 } from './RemoveIcon-9dc5dd1a.js';
|
|
@@ -1,12 +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-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-
|
|
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-54d84646.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-
|
|
4
|
+
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-17a320c8.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-d3c5a0a5.js';
|
|
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-
|
|
6
|
+
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, i as isCheckoutMobile, b as logError, a as getIsStagingMode } from './handleFetch-621e45bc.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
8
8
|
import { g as getBorderRadius } from './getBorderRadius-ada3ccad.js';
|
|
9
|
-
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
10
9
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
11
10
|
import { i as isDarkColor, t as tinycolor } from './isDarkColor-446fccb7.js';
|
|
12
11
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
@@ -1,15 +1,14 @@
|
|
|
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-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-
|
|
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-54d84646.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-17a320c8.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-d3c5a0a5.js';
|
|
5
|
-
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, e as getAdditionalLogMetadata, g as getIsTestMode, j as jsonParse, a as getIsStagingMode } from './handleFetch-
|
|
6
|
-
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
5
|
+
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, e as getAdditionalLogMetadata, g as getIsTestMode, j as jsonParse, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-621e45bc.js';
|
|
7
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
8
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
9
8
|
import { g as getBorderRadius } from './getBorderRadius-ada3ccad.js';
|
|
10
9
|
import { i as isDarkColor } from './isDarkColor-446fccb7.js';
|
|
11
10
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
12
|
-
import { c as checkoutHiddenBtnSelector, s as setupCartData, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
11
|
+
import { c as checkoutHiddenBtnSelector, s as setupCartData, d as domesticRedirectedBtnSelector } from './CheckoutConfig-63b3ed06.js';
|
|
13
12
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -190,17 +189,20 @@ const sendBulkLoadTimeApiLog = async () => {
|
|
|
190
189
|
loadTimeApiInfoList: window.Zonos.loadTimeApiInfoList,
|
|
191
190
|
});
|
|
192
191
|
// Clone the list so we can clear it after sending the log
|
|
193
|
-
const loadTimeApiInfoListArray =
|
|
192
|
+
const loadTimeApiInfoListArray = {
|
|
193
|
+
data: [...window.Zonos.loadTimeApiInfoList],
|
|
194
|
+
storeId: window.Zonos.storeId || 0,
|
|
195
|
+
};
|
|
194
196
|
// Clear the list after sending the log successfully
|
|
195
197
|
window.Zonos.loadTimeApiInfoList.length = 0;
|
|
196
198
|
// Clear the list after sending the log successfully
|
|
197
|
-
const { errors } = await handleFetch('/api/zonos-elements/log-bulk-load', {
|
|
199
|
+
const { errors } = await handleFetch('/api/zonos-elements/log-bulk-load-data', {
|
|
198
200
|
body: loadTimeApiInfoListArray,
|
|
199
201
|
method: 'POST',
|
|
200
202
|
});
|
|
201
203
|
if (errors.length) {
|
|
202
204
|
// If there are errors, add the logs back to the list so we can try again later
|
|
203
|
-
window.Zonos.loadTimeApiInfoList.push(...loadTimeApiInfoListArray);
|
|
205
|
+
window.Zonos.loadTimeApiInfoList.push(...loadTimeApiInfoListArray.data);
|
|
204
206
|
numberOfFailures++;
|
|
205
207
|
if (numberOfFailures > 5 && window.Zonos.logIntervalId) {
|
|
206
208
|
// If there are more than 3 failures, stop the interval
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
2
|
+
import { G as isValidSelector, f as stripeStore, H as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-54d84646.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-d3c5a0a5.js';
|
|
4
|
-
import { h as handleFetch, b as logError, l as log } from './handleFetch-
|
|
4
|
+
import { h as handleFetch, b as logError, l as log } from './handleFetch-621e45bc.js';
|
|
5
5
|
import './isDarkColor-446fccb7.js';
|
|
6
6
|
import './getBorderRadius-ada3ccad.js';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-54d84646.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-d3c5a0a5.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-621e45bc.js';
|
|
6
6
|
import './isDarkColor-446fccb7.js';
|
|
7
7
|
import './getBorderRadius-ada3ccad.js';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, r as translate, l as localizationStore } from './cart-54d84646.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-d3c5a0a5.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-446fccb7.js';
|
|
6
6
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
7
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-621e45bc.js';
|
|
8
8
|
import './getBorderRadius-ada3ccad.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -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-d3c5a0a5.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-ada3ccad.js';
|
|
5
|
-
import { f as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { b as logError, l as log } from './handleFetch-
|
|
7
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
5
|
+
import { f as stripeStore, t as trackConversionEvent } from './cart-54d84646.js';
|
|
6
|
+
import { b as logError, l as log } from './handleFetch-621e45bc.js';
|
|
7
|
+
import { d as paypalStoreInitButtons } from './paypal-17a320c8.js';
|
|
8
8
|
import './isDarkColor-446fccb7.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,10 +1,10 @@
|
|
|
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-
|
|
2
|
+
import { r as translate, l as localizationStore, E as currencyFormat } from './cart-54d84646.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-d3c5a0a5.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-
|
|
7
|
+
import './handleFetch-621e45bc.js';
|
|
8
8
|
import './isDarkColor-446fccb7.js';
|
|
9
9
|
import './getBorderRadius-ada3ccad.js';
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
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-d3c5a0a5.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-
|
|
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-54d84646.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { h as handleFetch, b as logError, l as log } from './handleFetch-
|
|
5
|
+
import { h as handleFetch, b as logError, l as log } from './handleFetch-621e45bc.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
7
|
import './isDarkColor-446fccb7.js';
|
|
8
8
|
import './getBorderRadius-ada3ccad.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
2
|
+
import { W as localizationStoreUpdateSelectedLocale, r as translate, l as localizationStore } from './cart-54d84646.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-d3c5a0a5.js';
|
|
4
4
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-621e45bc.js';
|
|
6
6
|
import './isDarkColor-446fccb7.js';
|
|
7
7
|
import './getBorderRadius-ada3ccad.js';
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n["throw"](e))}catch(e){i(e)}}function c(e){e.done?r(e.value):a(e.value).then(o,s)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(n=1,a&&(i=s[0]&2?a["return"]:s[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;if(a=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{g as getIsTestMode,h as handleFetch,l as log,b as logError}from"./handleFetch-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n["throw"](e))}catch(e){i(e)}}function c(e){e.done?r(e.value):a(e.value).then(o,s)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(n=1,a&&(i=s[0]&2?a["return"]:s[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;if(a=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];a=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{g as getIsTestMode,h as handleFetch,l as log,b as logError}from"./handleFetch-621e45bc.js";var getTempCartById=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,n,a,i;var o=e.cartId,s=e.retries;return __generator(this,(function(e){switch(e.label){case 0:t=getIsTestMode();return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:true},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:r=e.sent(),n=r.errors,a=r.json;i=!a||n.length;if(!(i&&s))return[3,3];log("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:s});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,getTempCartById({cartId:o,retries:s-1})];case 3:if(i){return[2,null]}return[2,a]}}))}))};var baseRe=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/;var uuidRe=new RegExp("^".concat(baseRe.source,"$"));var cartUuidRe=new RegExp("^cart_".concat(baseRe.source,"$"));var tsidRe=/^[a-zA-Z0-9]{2,}$/;var cartTsidRe=/^cart_[a-zA-Z0-9]{2,}$/;var _getIsValidCartId=function(e){if(!e){return{isDgsCartId:false,isLegacyCartId:false}}if(e.includes("undefined")){return{isDgsCartId:false,isLegacyCartId:false}}if(cartTsidRe.test(e)){return{isDgsCartId:true,isLegacyCartId:false}}if(tsidRe.test(e)){return{isDgsCartId:false,isLegacyCartId:true}}if(cartUuidRe.test(e)){return{isDgsCartId:true,isLegacyCartId:false}}if(uuidRe.test(e)){return{isDgsCartId:false,isLegacyCartId:true}}return{isDgsCartId:false,isLegacyCartId:false}};var setupCartData=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,n,a;return __generator(this,(function(i){switch(i.label){case 0:t=_getIsValidCartId(e),r=t.isDgsCartId,n=t.isLegacyCartId;if(!n&&!r){logError("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,getTempCartById({cartId:e,retries:5})];case 1:a=i.sent();log("[ZONOS - loadZonos] getting temp cart data","info",a);if(!a){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=a.cartData.storeId;window.Zonos.zonosApiKey=a.cartData.credentialToken;return[2,{cartData:a.cartData,storeFavicon:a.storeFaviconUrl,storeId:a.cartData.storeId,storeLogo:a.storeLogoUrl,zonosApiKey:a.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};
|