@zonos/elements 1.3.288 → 1.3.289
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/{cart-CV4buPlT.js → cart-WLQb2hbe.js} +1 -1
- package/dist/cjs/{collect-jzWKzrV7.js → collect-B92uIdsY.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-r5vYIqoX.js → getMissingRequiredShippingFields-5w62gTIB.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-BZMQohG9.js → hasInclusivePrice-hmV0Inld.js} +1 -1
- package/dist/cjs/index.cjs.js +8 -9
- package/dist/cjs/{invoice-CHw-mJdS.js → invoice-Bal1mqYR.js} +2 -2
- package/dist/cjs/{localization-CxXsmxs5.js → localization-C5HPlCNK.js} +191 -68
- package/dist/cjs/{paypal-BLuHeOJH.js → paypal-o164C26_.js} +2 -2
- package/dist/cjs/{placeTestOrder-VK_CMeq0.js → placeTestOrder-C7tAipav.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-CC4CAy-a.js → renderCheckoutCurrency-Bpx-vrTQ.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-Bj_jKWPK.js → shouldShowLanguageSelect-CtwkMt8b.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +7 -7
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +9 -9
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +8 -8
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +8 -8
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +1 -1
- package/dist/collection/components/main/zonos-controller.js +2 -2
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -2
- package/dist/collection/components/store/hello/localization.js +69 -34
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -3
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +0 -1
- package/dist/collection/components/utils/api/getLocalization.js +2 -2
- package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -4
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +1 -0
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +2 -0
- package/dist/collection/components/utils/formatDate.js +1 -3
- package/dist/collection/components/utils/getOverridenZCountry.js +3 -5
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +49 -0
- package/dist/collection/components/utils/hello/getZCountryUrlParam.js +5 -9
- package/dist/collection/components/utils/hello/isCountryCode.js +1 -0
- package/dist/collection/components/utils/hello/isCountryInShippingZone.js +8 -0
- package/dist/collection/components/utils/hello/reconcileRememberedCountryOverride.js +37 -0
- package/dist/collection/components/utils/hello/shouldShowHelloWidget.js +27 -20
- package/dist/collection/environment.js +0 -1
- package/dist/collection/scripts/_stripe.js +0 -2
- package/dist/collection/scripts/_zonosBase.js +1 -1
- package/dist/collection/types/generated/graphql.frontend.types.js +218 -63
- package/dist/collection/types/generated/graphql.internal.types.js +643 -147
- package/dist/collection/utils/formattedCloudflareApiUrl.js +1 -0
- package/dist/collection/utils/generateCloudflareDeployUrl.js +5 -2
- package/dist/esm/{cart-ekBk_gxV.js → cart-BDc4RTBJ.js} +1 -1
- package/dist/esm/{collect-33rMINDo.js → collect-NRCK3t-M.js} +2 -2
- package/dist/esm/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-D-B-N1NH.js} +1 -1
- package/dist/esm/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-Bti4iudO.js} +1 -1
- package/dist/esm/index.js +8 -9
- package/dist/esm/{invoice-BNDWuVsD.js → invoice-DsvQvu4a.js} +2 -2
- package/dist/esm/{localization-AOqYXGdP.js → localization-Bs6hVcKV.js} +191 -69
- package/dist/esm/{paypal-CW1D2XqZ.js → paypal-BqyEZS_u.js} +2 -2
- package/dist/esm/{placeTestOrder-nhmsLLOA.js → placeTestOrder-x3xwMAnW.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-DIBdWKN1.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-Bb9sbQ41.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +7 -7
- package/dist/esm/zonos-address-display_2.entry.js +1 -1
- package/dist/esm/zonos-address_4.entry.js +4 -4
- package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +4 -4
- package/dist/esm/zonos-cart-items_12.entry.js +9 -9
- package/dist/esm/zonos-checkout.entry.js +6 -6
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +8 -8
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +4 -4
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +8 -8
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/{cart-ekBk_gxV.js → cart-BDc4RTBJ.js} +1 -1
- package/dist/esm-es5/{collect-33rMINDo.js → collect-NRCK3t-M.js} +1 -1
- package/dist/esm-es5/{getMissingRequiredShippingFields-u1nhQzJ1.js → getMissingRequiredShippingFields-D-B-N1NH.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-CAVXi310.js → hasInclusivePrice-Bti4iudO.js} +1 -1
- package/dist/esm-es5/index.js +6 -8
- package/dist/esm-es5/{invoice-BNDWuVsD.js → invoice-DsvQvu4a.js} +1 -1
- package/dist/esm-es5/{localization-AOqYXGdP.js → localization-Bs6hVcKV.js} +74 -68
- package/dist/esm-es5/{paypal-CW1D2XqZ.js → paypal-BqyEZS_u.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-nhmsLLOA.js → placeTestOrder-x3xwMAnW.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-BQANmZyM.js → renderCheckoutCurrency-DIBdWKN1.js} +1 -1
- package/dist/esm-es5/{shouldShowLanguageSelect-BQFCXouB.js → shouldShowLanguageSelect-Bb9sbQ41.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +3 -3
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +2 -2
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +2 -2
- package/dist/esm-es5/zonos-cart-items_12.entry.js +2 -2
- package/dist/esm-es5/zonos-checkout.entry.js +4 -4
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +2 -2
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +3 -3
- 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-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +2 -2
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- 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/store/hello/localization.d.ts +2 -1
- package/dist/types/components/utils/api/getLocalization.d.ts +3 -1
- package/dist/types/components/utils/getOverridenZCountry.d.ts +2 -3
- package/dist/types/components/utils/hello/countryOverrideStorage.d.ts +5 -0
- package/dist/types/components/utils/hello/isCountryCode.d.ts +2 -0
- package/dist/types/components/utils/hello/isCountryInShippingZone.d.ts +2 -0
- package/dist/types/components/utils/hello/reconcileRememberedCountryOverride.d.ts +18 -0
- package/dist/types/components/utils/hello/shouldShowHelloWidget.d.ts +8 -4
- package/dist/types/types/generated/graphql.frontend.types.d.ts +41 -52
- package/dist/types/types/generated/graphql.frontend.types.ts +226 -114
- package/dist/types/types/generated/graphql.internal.types.d.ts +231 -94
- package/dist/types/types/generated/graphql.internal.types.ts +712 -245
- package/dist/types/utils/formattedCloudflareApiUrl.d.ts +1 -0
- package/dist/types/utils/generateCloudflareDeployUrl.d.ts +5 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-02628b9f.entry.js +1 -0
- package/dist/zonos-elements/{p-04cc0dac.system.entry.js → p-02ff6f8b.system.entry.js} +38 -38
- package/dist/zonos-elements/p-037d3688.entry.js +1 -0
- package/dist/zonos-elements/{p-02ef0f99.system.entry.js → p-03fbe813.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a631080.system.entry.js → p-0ff26236.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f2cedbcd.system.entry.js → p-163b81c0.system.entry.js} +6 -6
- package/dist/zonos-elements/{p-e9320825.entry.js → p-18021e6b.entry.js} +1 -1
- package/dist/zonos-elements/{p-dcdbc610.system.entry.js → p-22fab1ba.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b14819ab.system.entry.js → p-2466b5f0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-daf9fa07.system.entry.js → p-317d4665.system.entry.js} +19 -19
- package/dist/zonos-elements/{p-d55b9664.system.entry.js → p-36559431.system.entry.js} +17 -17
- package/dist/zonos-elements/{p-f27317d3.system.entry.js → p-3cc27e0e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-891b47d7.entry.js → p-3d536086.entry.js} +1 -1
- package/dist/zonos-elements/{p-a38e62cc.entry.js → p-3e59d41c.entry.js} +1 -1
- package/dist/zonos-elements/{p-64e7bc5b.entry.js → p-4625058a.entry.js} +1 -1
- package/dist/zonos-elements/{p-5024df2d.system.entry.js → p-56159b7c.system.entry.js} +60 -60
- package/dist/zonos-elements/p-5e074243.entry.js +1 -0
- package/dist/zonos-elements/{p-9818f823.entry.js → p-5eb82be3.entry.js} +1 -1
- package/dist/zonos-elements/{p-cf5688f7.entry.js → p-628a0f7f.entry.js} +1 -1
- package/dist/zonos-elements/{p-5d3079e8.entry.js → p-635341d6.entry.js} +1 -1
- package/dist/zonos-elements/{p-d4c4a00e.entry.js → p-68e0180a.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b0afaa7.entry.js → p-6c6c65f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-04bfcd72.system.entry.js → p-72b6a006.system.entry.js} +18 -18
- package/dist/zonos-elements/{p-4973f8d8.system.entry.js → p-8cac7911.system.entry.js} +8 -8
- package/dist/zonos-elements/p-97f848f6.entry.js +1 -0
- package/dist/zonos-elements/p-9H2p9XKE.js +1 -0
- package/dist/zonos-elements/{p-CJCoACvU.js → p-B6X55m0b.js} +2 -2
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-D31lQiWo.system.js → p-BybDGrH4.system.js} +4 -4
- package/dist/zonos-elements/{p-DTgv0QpG.js → p-CGkdA4pY.js} +1 -1
- package/dist/zonos-elements/{p-D5AtAlJx.system.js → p-CH6tsv9B.system.js} +1 -1
- package/dist/zonos-elements/{p-CYdt69j5.system.js → p-CQyFoOXW.system.js} +23 -23
- package/dist/zonos-elements/{p-B2EZRfoq.system.js → p-CVQ7-7E2.system.js} +18 -18
- package/dist/zonos-elements/{p-DIJaXkiE.system.js → p-Cd9xIgx7.system.js} +111 -105
- package/dist/zonos-elements/{p-CQqNJo0D.system.js → p-ClUEwqZW.system.js} +4 -4
- package/dist/zonos-elements/{p-DkpYo2Fs.js → p-CpvnCfKt.js} +1 -1
- package/dist/zonos-elements/p-CtKp6AQ4.js +1 -0
- package/dist/zonos-elements/{p-DGsEWFDU.system.js → p-CuhGrJBA.system.js} +1 -1
- package/dist/zonos-elements/{p-D-DawUYF.system.js → p-D2fOB4Wn.system.js} +1 -1
- package/dist/zonos-elements/{p-BtMauqj_.system.js → p-D4WI0B6-.system.js} +6 -8
- package/dist/zonos-elements/{p-CKTIJ2Gr.js → p-DdpeA8cH.js} +1 -1
- package/dist/zonos-elements/p-DkirvyAh.js +1 -0
- package/dist/zonos-elements/{p-DHwpNxG9.js → p-DqEtY53c.js} +1 -1
- package/dist/zonos-elements/{p-DjuFsKLG.js → p-MHVIIOVE.js} +1 -1
- package/dist/zonos-elements/{p-DPW1yXt9.system.js → p-NL_Eiq6m.system.js} +65 -65
- package/dist/zonos-elements/{p-Dj-O6VfM.system.js → p-UM1aYZBV.system.js} +2 -2
- package/dist/zonos-elements/p-a6354d15.entry.js +1 -0
- package/dist/zonos-elements/{p-8cd3f1e2.entry.js → p-b78bab27.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6ba59f6.system.entry.js → p-b88e521e.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-450ed170.system.entry.js → p-b96666ca.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-39c8a898.entry.js → p-c090cc60.entry.js} +1 -1
- package/dist/zonos-elements/{p-cadf6b63.system.entry.js → p-c4713ff1.system.entry.js} +10 -10
- package/dist/zonos-elements/{p-ea8790aa.entry.js → p-c5f17bad.entry.js} +1 -1
- package/dist/zonos-elements/{p-f57495dc.entry.js → p-cc17a230.entry.js} +1 -1
- package/dist/zonos-elements/{p-7ae48e31.entry.js → p-cf53f67a.entry.js} +1 -1
- package/dist/zonos-elements/{p-7a5d2211.system.entry.js → p-d261f27c.system.entry.js} +15 -15
- package/dist/zonos-elements/{p-e101d722.system.entry.js → p-d451d5bc.system.entry.js} +4 -4
- package/dist/zonos-elements/{p-d33dfc78.system.entry.js → p-d9527bd7.system.entry.js} +35 -35
- package/dist/zonos-elements/{p-f6e0aeba.system.entry.js → p-e126e9bd.system.entry.js} +176 -176
- package/dist/zonos-elements/{p-e284d329.entry.js → p-e582ae2a.entry.js} +1 -1
- package/dist/zonos-elements/{p-5562a955.system.entry.js → p-e9a3bc27.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-844a743a.entry.js → p-f44631d5.entry.js} +1 -1
- package/dist/zonos-elements/{p-5836d426.system.entry.js → p-fcfac62f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-opB7B9YB.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +12 -11
- package/dist/zonos-elements/p-2ba738ec.entry.js +0 -1
- package/dist/zonos-elements/p-4a54f664.entry.js +0 -1
- package/dist/zonos-elements/p-6f742021.entry.js +0 -1
- package/dist/zonos-elements/p-89ddab88.entry.js +0 -1
- package/dist/zonos-elements/p-C19J2XSh.js +0 -1
- package/dist/zonos-elements/p-LypTHRUC.js +0 -1
- package/dist/zonos-elements/p-adfee3a3.entry.js +0 -1
- package/dist/zonos-elements/p-lGLcGvEA.js +0 -1
- package/dist/zonos-elements/p-pfIceXbY.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
2
|
import { t as throttle } from './throttle-D5GyA3yr.js';
|
|
3
|
-
import { U as extractName, w as stripeStorePrefetchLandedCost, b as stripeStore, t as trackConversionEvent, J as stripeStoreOnChange, d as cartStore } from './cart-
|
|
4
|
-
import { s as storageStore, l as localizationStore,
|
|
3
|
+
import { U as extractName, w as stripeStorePrefetchLandedCost, b as stripeStore, t as trackConversionEvent, J as stripeStoreOnChange, d as cartStore } from './cart-BDc4RTBJ.js';
|
|
4
|
+
import { s as storageStore, l as localizationStore, C as getFallbackDefaultCountryCode, t as translate, z as storageStoreOnChange } from './localization-Bs6hVcKV.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
6
6
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-D5GYDF-O.js';
|
|
7
7
|
import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-CKyZ6Zni.js';
|
|
@@ -414,11 +414,11 @@ const ZonosAddress = class {
|
|
|
414
414
|
this.isAddressFilled = true;
|
|
415
415
|
}
|
|
416
416
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
417
|
-
return (h(Host, { key: '
|
|
417
|
+
return (h(Host, { key: '302dafde973c4bf2d847640d8f0e064d88f350f8', class: classes([
|
|
418
418
|
'zonos--address',
|
|
419
419
|
'zonos--elements',
|
|
420
420
|
`zonos--${this.type}-address`,
|
|
421
|
-
]) }, this.titleText && (h("zonos-text", { key: '
|
|
421
|
+
]) }, this.titleText && (h("zonos-text", { key: '706204604ad32eed710e38adbe8133b3384044eb', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '0edc4c5d6c3ff965be6edbf680acaed892c71a16', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: '6aa6e4e86a76f1081c5af1f2b5f3282dfd91f3c5', class: "zonos--address-component" })));
|
|
422
422
|
}
|
|
423
423
|
get el() { return getElement(this); }
|
|
424
424
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-
|
|
3
|
-
import { d as cartStore } from './cart-
|
|
4
|
-
import {
|
|
2
|
+
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-NRCK3t-M.js';
|
|
3
|
+
import { d as cartStore } from './cart-BDc4RTBJ.js';
|
|
4
|
+
import { h as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-Bs6hVcKV.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-DrIOAz4M.js';
|
|
6
6
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
7
7
|
import { l as logError } from './handleFetch-D5GYDF-O.js';
|
|
@@ -2,10 +2,10 @@ import { r as registerInstance, h, a as Host, g as getElement, d as createEvent
|
|
|
2
2
|
import { a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
3
3
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-HwG64EKM.js';
|
|
5
|
-
import { b as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
5
|
+
import { b as stripeStore, t as trackConversionEvent } from './cart-BDc4RTBJ.js';
|
|
6
|
+
import { s as storageStore } from './localization-Bs6hVcKV.js';
|
|
7
7
|
import { l as logError } from './handleFetch-D5GYDF-O.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-BqyEZS_u.js';
|
|
9
9
|
import { l as log } from './VarianceTest-BJmZPrZl.js';
|
|
10
10
|
import './isDarkColor-YdrG78th.js';
|
|
11
11
|
import './TaxId-Cye-evFK.js';
|
|
@@ -323,7 +323,7 @@ const ZonosPaypalPayment = class {
|
|
|
323
323
|
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
324
324
|
}
|
|
325
325
|
render() {
|
|
326
|
-
return (h(Host, { key: '
|
|
326
|
+
return (h(Host, { key: '50cc936c450fb9afeaf488bfce6b15c2b1c29532', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: '5a5f49d4486acb938d4dcffbbc41c15720201f0e', class: "zonos--payment-paypal-container" })));
|
|
327
327
|
}
|
|
328
328
|
get el() { return getElement(this); }
|
|
329
329
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { d as cartStore, L as cartStoreHasOneEligibleItem, M as isEuDapRemittance, m as cartStoreIsOrderModificationPaymentOnlySession, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, b as stripeStore, H as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, R as storeCreditStore, S as storeCreditStoreReset, B as storeCreditStoreCoversFullAmount, y as isPolicyConsentRequired, G as policyConsentStore, T as stripeStoreRecordPolicyConsent, x as cartStoreNextStep, U as extractName, V as stripeStoreTranslateAddressToLatin, I as cartStoreOnChange, W as getCountryField, X as stripeStoreAsyncAddressUpdate, Y as cartStoreUpdateSelectedShippingOption, Z as cartStoreGetShippingTransitInfo, _ as cartStoreGetMethod, $ as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate, l as localizationStore, s as storageStore,
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { d as cartStore, L as cartStoreHasOneEligibleItem, M as isEuDapRemittance, m as cartStoreIsOrderModificationPaymentOnlySession, N as stripeStoreApplyPromoCode, O as stripeStoreRemovePromoCode, b as stripeStore, H as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, Q as stripeStoreMessageBasedOnStatus, R as storeCreditStore, S as storeCreditStoreReset, B as storeCreditStoreCoversFullAmount, y as isPolicyConsentRequired, G as policyConsentStore, T as stripeStoreRecordPolicyConsent, x as cartStoreNextStep, U as extractName, V as stripeStoreTranslateAddressToLatin, I as cartStoreOnChange, W as getCountryField, X as stripeStoreAsyncAddressUpdate, Y as cartStoreUpdateSelectedShippingOption, Z as cartStoreGetShippingTransitInfo, _ as cartStoreGetMethod, $ as sortServiceLevelOptionsByAmount } from './cart-BDc4RTBJ.js';
|
|
3
|
+
import { t as translate, l as localizationStore, s as storageStore, k as languages, w as getExchangeRate, x as numberFormat, h as localizationStoreOnChange } from './localization-Bs6hVcKV.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-DIBdWKN1.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.js';
|
|
6
6
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
7
7
|
import { z as zonosStore, c as createStore, d as zonosStoreOnChange, g as getZonosStoreTheme, a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
8
|
-
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-
|
|
8
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-Bti4iudO.js';
|
|
9
9
|
import { i as isSameHostCheckoutLink } from './isSameHostCheckoutLink-BxAHnL5J.js';
|
|
10
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-
|
|
10
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-BqyEZS_u.js';
|
|
11
11
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode, l as logError } from './handleFetch-D5GYDF-O.js';
|
|
12
12
|
import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
|
|
13
13
|
import { g as getBorderRadius } from './getBorderRadius-HwG64EKM.js';
|
|
14
14
|
import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
15
|
-
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-
|
|
16
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
15
|
+
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-Bb9sbQ41.js';
|
|
16
|
+
import { p as placeTestOrder } from './placeTestOrder-x3xwMAnW.js';
|
|
17
17
|
import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
|
|
18
18
|
import { g as getContrastColor } from './getContrastColor-CfCPlW9U.js';
|
|
19
19
|
import { i as isColorVariable } from './isColorVariable-DXXUq2Lv.js';
|
|
20
20
|
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-eRSqdC74.js';
|
|
21
|
-
import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-
|
|
21
|
+
import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-D-B-N1NH.js';
|
|
22
22
|
import { c as containsNonLatinChars } from './containsNonLatinChars-C04AWRC2.js';
|
|
23
23
|
import { s as shouldRenderShortAddressCodeInput, a as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-CKyZ6Zni.js';
|
|
24
24
|
import { e as euCountryCodes } from './TaxId-Cye-evFK.js';
|
|
@@ -1360,7 +1360,7 @@ const ZonosCheckoutPayment = class {
|
|
|
1360
1360
|
document.body.appendChild(hiddenTextarea);
|
|
1361
1361
|
hiddenTextarea.select();
|
|
1362
1362
|
// Have to use deprecated method execCommand because it's the only way to copy to the clipboard in the iframe
|
|
1363
|
-
// eslint-disable-next-line
|
|
1363
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1364
1364
|
document.execCommand('copy');
|
|
1365
1365
|
document.body.removeChild(hiddenTextarea);
|
|
1366
1366
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, g as getCheckoutSession, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, p as policyConsentStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreIsOrderModificationPaymentOnlySession, n as stripeStoreHandleInventoryCheck, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, q as getCheckoutSessionBody, r as cartStoreUpdateToErrorState, u as stripeStoreCleanupDomesticShippingSession, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as isPolicyConsentRequired, z as stripeStoreUpdateCheckoutSessionBaseCurrency, A as storeCreditStoreApplyCredit, B as storeCreditStoreCoversFullAmount, C as validateCheckoutSession, D as storeCreditStoreCreateOrder, E as stripeStoreConfirmPayment, F as stripeStoreHandleInventoryRefund, G as policyConsentStore, H as stripeStoreReset, I as cartStoreOnChange, J as stripeStoreOnChange, K as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION,
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, g as getCheckoutSession, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, p as policyConsentStoreReset, h as cartStoreResetTabItems, j as cartStoreClearCheckoutInterval, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, m as cartStoreIsOrderModificationPaymentOnlySession, n as stripeStoreHandleInventoryCheck, o as cartStoreStartCheckoutInterval, t as trackConversionEvent, q as getCheckoutSessionBody, r as cartStoreUpdateToErrorState, u as stripeStoreCleanupDomesticShippingSession, v as cartStoreSetCheckoutSession, w as stripeStorePrefetchLandedCost, x as cartStoreNextStep, y as isPolicyConsentRequired, z as stripeStoreUpdateCheckoutSessionBaseCurrency, A as storeCreditStoreApplyCredit, B as storeCreditStoreCoversFullAmount, C as validateCheckoutSession, D as storeCreditStoreCreateOrder, E as stripeStoreConfirmPayment, F as stripeStoreHandleInventoryRefund, G as policyConsentStore, H as stripeStoreReset, I as cartStoreOnChange, J as stripeStoreOnChange, K as storeCreditStoreGetEffectiveAmount } from './cart-BDc4RTBJ.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-BqyEZS_u.js';
|
|
4
|
+
import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as isCountryInShippingZone, d as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, e as storageStoreSetEnabledVariantTestKeys, t as translate, h as localizationStoreOnChange, j as currencyFormat } from './localization-Bs6hVcKV.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-DrIOAz4M.js';
|
|
6
6
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
|
|
7
7
|
import { h as handleFetch, g as getIsTestMode, j as jsonParse, l as logError, b as getAdditionalLogMetadata, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-D5GYDF-O.js';
|
|
@@ -678,13 +678,11 @@ const isShippableCountry = (showLog = true,
|
|
|
678
678
|
* If provided, will check if the country is shippable based on the provided country code instead of the Hello selected country code
|
|
679
679
|
*/
|
|
680
680
|
providedCountryCode) => {
|
|
681
|
-
var _a;
|
|
682
681
|
if (!localizationStore.localizationLoaded) {
|
|
683
682
|
return false;
|
|
684
683
|
}
|
|
685
684
|
if (providedCountryCode) {
|
|
686
|
-
const isProvidedCountryCodeShippableCountry =
|
|
687
|
-
!zonosStore.disabledCountries.includes(providedCountryCode);
|
|
685
|
+
const isProvidedCountryCodeShippableCountry = isCountryInShippingZone(providedCountryCode);
|
|
688
686
|
if (showLog && !isProvidedCountryCodeShippableCountry) {
|
|
689
687
|
log(`Checkout: ${providedCountryCode} is not a shippable country: ${isProvidedCountryCodeShippableCountry}`);
|
|
690
688
|
}
|
|
@@ -772,6 +770,7 @@ const checkLoggedInUserShippingAddress = async ({ onInternationalCheckoutSelecte
|
|
|
772
770
|
localizationStoreUpdateSelectedCountryCode({
|
|
773
771
|
isInitializing: false,
|
|
774
772
|
newSelectedCountryCode: countryCode,
|
|
773
|
+
persistOverride: false,
|
|
775
774
|
});
|
|
776
775
|
// Save the shipping address to session storage for the international checkout
|
|
777
776
|
stripeStoreSaveDomesticShippingSession({
|
|
@@ -855,6 +854,7 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
|
|
|
855
854
|
localizationStoreUpdateSelectedCountryCode({
|
|
856
855
|
isInitializing: false,
|
|
857
856
|
newSelectedCountryCode: shippingCountry,
|
|
857
|
+
persistOverride: false,
|
|
858
858
|
});
|
|
859
859
|
const shippingAddress = {
|
|
860
860
|
address1: '',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { d as cartStore } from './cart-
|
|
2
|
+
import { d as cartStore } from './cart-BDc4RTBJ.js';
|
|
3
3
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-ByGDytaN.js';
|
|
4
4
|
import { a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
5
5
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
6
6
|
import { s as styles } from './styles-BTIeCf3T.js';
|
|
7
|
-
import './localization-
|
|
7
|
+
import './localization-Bs6hVcKV.js';
|
|
8
8
|
import './handleFetch-D5GYDF-O.js';
|
|
9
9
|
import './VarianceTest-BJmZPrZl.js';
|
|
10
10
|
import './isDarkColor-YdrG78th.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-
|
|
3
|
-
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-
|
|
4
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
5
|
-
import { t as translate, s as storageStore,
|
|
2
|
+
import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, e as airwallexStoreIsPaidStatus, k as airwallexStoreReset, c as collectStore } from './collect-NRCK3t-M.js';
|
|
3
|
+
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-BDc4RTBJ.js';
|
|
4
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-BqyEZS_u.js';
|
|
5
|
+
import { t as translate, s as storageStore, k as languages, l as localizationStore, y as translationStoreOnChange } from './localization-Bs6hVcKV.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-DrIOAz4M.js';
|
|
7
7
|
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-D5GYDF-O.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
|
|
@@ -10,9 +10,9 @@ import { g as getBorderRadius } from './getBorderRadius-HwG64EKM.js';
|
|
|
10
10
|
import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
11
11
|
import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-DGlnuxEX.js';
|
|
12
12
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
13
|
-
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-
|
|
14
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
15
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
13
|
+
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-Bb9sbQ41.js';
|
|
14
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-DIBdWKN1.js';
|
|
15
|
+
import { p as placeTestOrder } from './placeTestOrder-x3xwMAnW.js';
|
|
16
16
|
import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
|
|
17
17
|
import './isDarkColor-YdrG78th.js';
|
|
18
18
|
import './TaxId-Cye-evFK.js';
|
|
@@ -631,7 +631,7 @@ const ZonosCollectPayment = class {
|
|
|
631
631
|
document.body.appendChild(hiddenTextarea);
|
|
632
632
|
hiddenTextarea.select();
|
|
633
633
|
// Have to use deprecated method execCommand because it's the only way to copy to the clipboard in the iframe
|
|
634
|
-
// eslint-disable-next-line
|
|
634
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
635
635
|
document.execCommand('copy');
|
|
636
636
|
document.body.removeChild(hiddenTextarea);
|
|
637
637
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, F as Fragment } from './index-_lt63o7c.js';
|
|
2
|
-
import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-
|
|
3
|
-
import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
5
|
-
import { s as storageStore, t as translate,
|
|
2
|
+
import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-NRCK3t-M.js';
|
|
3
|
+
import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-BDc4RTBJ.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-BqyEZS_u.js';
|
|
5
|
+
import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-Bs6hVcKV.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-DrIOAz4M.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
|
|
8
8
|
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-D5GYDF-O.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as stripeStore } from './cart-
|
|
3
|
-
import {
|
|
2
|
+
import { b as stripeStore } from './cart-BDc4RTBJ.js';
|
|
3
|
+
import { m as getOverridenZCountry, n as isValidSelector, o as initLocalizationStore, s as storageStore, d as localizationStoreUpdateSelectedCountryCode } from './localization-Bs6hVcKV.js';
|
|
4
4
|
import { z as zonosStore, a as zonosStoreFontFamily, b as zonosStoreInitSetting } from './zonosStore-DrIOAz4M.js';
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-HeAZDwVW.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-D5GYDF-O.js';
|
|
@@ -787,7 +787,7 @@ const ZonosController = class {
|
|
|
787
787
|
return;
|
|
788
788
|
}
|
|
789
789
|
const hasCartCallback =
|
|
790
|
-
// eslint-disable-next-line
|
|
790
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- gating Stripe load also honors the legacy callback
|
|
791
791
|
typeof ((_e = zonosStore.checkoutSettings) === null || _e === void 0 ? void 0 : _e.buildCartDetail) === 'function' ||
|
|
792
792
|
typeof ((_f = zonosStore.checkoutSettings) === null || _f === void 0 ? void 0 : _f.createCartId) === 'function';
|
|
793
793
|
// Checkout also runs without merchant cart callbacks when a cart is
|
|
@@ -858,7 +858,7 @@ const ZonosController = class {
|
|
|
858
858
|
zonosStore.organizationName = organizationName;
|
|
859
859
|
}
|
|
860
860
|
render() {
|
|
861
|
-
return h(Host, { key: '
|
|
861
|
+
return h(Host, { key: '1714865012d806892f03e03896ee2f04aa1a729d', class: "zonos--elements" });
|
|
862
862
|
}
|
|
863
863
|
};
|
|
864
864
|
ZonosController.style = zonosControllerCss();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { l as localizationStore } from './localization-
|
|
2
|
+
import { l as localizationStore } from './localization-Bs6hVcKV.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
4
4
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
5
5
|
import './handleFetch-D5GYDF-O.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import {
|
|
2
|
+
import { d as localizationStoreUpdateSelectedCountryCode, l as localizationStore, t as translate, k as languages } from './localization-Bs6hVcKV.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-BcMPqGl0.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-YdrG78th.js';
|
|
6
|
-
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-
|
|
6
|
+
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-Bb9sbQ41.js';
|
|
7
7
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
8
8
|
import './handleFetch-D5GYDF-O.js';
|
|
9
9
|
import './VarianceTest-BJmZPrZl.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { l as localizationStore, t as translate,
|
|
2
|
+
import { l as localizationStore, t as translate, j as currencyFormat } from './localization-Bs6hVcKV.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-DrIOAz4M.js';
|
|
4
4
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-BcMPqGl0.js';
|
|
6
|
-
import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-
|
|
6
|
+
import { h as hasInclusivePrice, T as TAXES_KEY, D as DUTY_KEY } from './hasInclusivePrice-Bti4iudO.js';
|
|
7
7
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-DAscqB23.js';
|
|
8
8
|
import { e as euCountryCodes } from './TaxId-Cye-evFK.js';
|
|
9
9
|
import './handleFetch-D5GYDF-O.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
2
|
import { d as debounce } from './debounce-DWPsxJsW.js';
|
|
3
|
-
import { l as localizationStore,
|
|
3
|
+
import { l as localizationStore, n as isValidSelector, t as translate, g as getZCountryUrlParam, p as setZCountryUrlParam, q as currencyDisplay, r as currencyConvertAndFormat, u as currencyConvert, j as currencyFormat, v as shouldShowHelloWidget } from './localization-Bs6hVcKV.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-DrIOAz4M.js';
|
|
5
5
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-D5GYDF-O.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import { d as cartStore } from './cart-
|
|
3
|
-
import { t as translate } from './localization-
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { d as cartStore } from './cart-BDc4RTBJ.js';
|
|
3
|
+
import { t as translate } from './localization-Bs6hVcKV.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-DIBdWKN1.js';
|
|
5
5
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
6
|
-
import { c as invoiceStore } from './invoice-
|
|
6
|
+
import { c as invoiceStore } from './invoice-DsvQvu4a.js';
|
|
7
7
|
import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
|
|
8
8
|
import './zonosStore-DrIOAz4M.js';
|
|
9
9
|
import './VarianceTest-BJmZPrZl.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-
|
|
3
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { t as translate, s as storageStore,
|
|
2
|
+
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, H as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, x as cartStoreNextStep, I as cartStoreOnChange } from './cart-BDc4RTBJ.js';
|
|
3
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-BqyEZS_u.js';
|
|
4
|
+
import { t as translate, s as storageStore, k as languages, l as localizationStore } from './localization-Bs6hVcKV.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-DrIOAz4M.js';
|
|
6
6
|
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-D5GYDF-O.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-XQfWgQLB.js';
|
|
@@ -9,10 +9,10 @@ import { g as getBorderRadius } from './getBorderRadius-HwG64EKM.js';
|
|
|
9
9
|
import { l as log, b as allLogs } from './VarianceTest-BJmZPrZl.js';
|
|
10
10
|
import { i as isInvoiceMobile, a as isInvoiceTablet } from './isInvoiceMobileTablet-Clej0Ffe.js';
|
|
11
11
|
import { c as classes } from './classes-BJHSB96f.js';
|
|
12
|
-
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-
|
|
13
|
-
import { c as invoiceStore } from './invoice-
|
|
14
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
15
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
12
|
+
import { s as shouldShowLanguageSelect } from './shouldShowLanguageSelect-Bb9sbQ41.js';
|
|
13
|
+
import { c as invoiceStore } from './invoice-DsvQvu4a.js';
|
|
14
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-DIBdWKN1.js';
|
|
15
|
+
import { p as placeTestOrder } from './placeTestOrder-x3xwMAnW.js';
|
|
16
16
|
import { r as renderFallback } from './renderFallback-Cy03ZcWE.js';
|
|
17
17
|
import './isDarkColor-YdrG78th.js';
|
|
18
18
|
import './TaxId-Cye-evFK.js';
|
|
@@ -504,7 +504,7 @@ const ZonosInvoicePayment = class {
|
|
|
504
504
|
document.body.appendChild(hiddenTextarea);
|
|
505
505
|
hiddenTextarea.select();
|
|
506
506
|
// Have to use deprecated method execCommand because it's the only way to copy to the clipboard in the iframe
|
|
507
|
-
// eslint-disable-next-line
|
|
507
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
508
508
|
document.execCommand('copy');
|
|
509
509
|
document.body.removeChild(hiddenTextarea);
|
|
510
510
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, F as Fragment } from './index-_lt63o7c.js';
|
|
2
|
-
import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-
|
|
3
|
-
import { i as invoiceStoreUpdateSelectedShippingOption, a as invoiceStoreInitShippingInfo, b as invoiceStoreAsyncAddressUpdate, c as invoiceStore } from './invoice-
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
5
|
-
import { s as storageStore, t as translate,
|
|
2
|
+
import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, r as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, k as stripeStoreInitCheckoutSession, l as stripeStoreGetPaymentIntent, z as stripeStoreUpdateCheckoutSessionBaseCurrency, E as stripeStoreConfirmPayment, J as stripeStoreOnChange, H as stripeStoreReset, f as cartStoreReset } from './cart-BDc4RTBJ.js';
|
|
3
|
+
import { i as invoiceStoreUpdateSelectedShippingOption, a as invoiceStoreInitShippingInfo, b as invoiceStoreAsyncAddressUpdate, c as invoiceStore } from './invoice-DsvQvu4a.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-BqyEZS_u.js';
|
|
5
|
+
import { s as storageStore, t as translate, h as localizationStoreOnChange, j as currencyFormat, k as languages, l as localizationStore } from './localization-Bs6hVcKV.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-DrIOAz4M.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-BycjkdlE.js';
|
|
8
8
|
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-D5GYDF-O.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host } from './index-_lt63o7c.js';
|
|
2
|
-
import {
|
|
2
|
+
import { D as localizationStoreUpdateSelectedLocale, t as translate, A as getSupportedLanguages, l as localizationStore } from './localization-Bs6hVcKV.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
4
4
|
import './handleFetch-D5GYDF-O.js';
|
|
5
5
|
import './VarianceTest-BJmZPrZl.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, a as Host, g as getElement } from './index-_lt63o7c.js';
|
|
2
|
-
import { a1 as getEnabledPolicies, G as policyConsentStore, a2 as storeCreditStoreSetEnabled, a3 as storeCreditStoreSetUseFullBalance, a4 as cartStoreUpdateStoreCredit, R as storeCreditStore, a5 as storeCreditStoreSetAmount, a6 as storeCreditStoreRefreshBalance, K as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { l as localizationStore, t as translate } from './localization-
|
|
2
|
+
import { a1 as getEnabledPolicies, G as policyConsentStore, a2 as storeCreditStoreSetEnabled, a3 as storeCreditStoreSetUseFullBalance, a4 as cartStoreUpdateStoreCredit, R as storeCreditStore, a5 as storeCreditStoreSetAmount, a6 as storeCreditStoreRefreshBalance, K as storeCreditStoreGetEffectiveAmount } from './cart-BDc4RTBJ.js';
|
|
3
|
+
import { l as localizationStore, t as translate } from './localization-Bs6hVcKV.js';
|
|
4
4
|
import { z as zonosStore, a as zonosStoreFontFamily } from './zonosStore-DrIOAz4M.js';
|
|
5
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
5
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-DIBdWKN1.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-HwG64EKM.js';
|
|
7
7
|
import './VarianceTest-BJmZPrZl.js';
|
|
8
8
|
import './handleFetch-D5GYDF-O.js';
|
|
@@ -94,7 +94,7 @@ const ZonosStripeInput = class {
|
|
|
94
94
|
this.inputChange.emit(input.value);
|
|
95
95
|
this.el.inputValue = input.value;
|
|
96
96
|
this.el.dispatchEvent(new Event('change'));
|
|
97
|
-
}, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), h("div", { key: '
|
|
97
|
+
}, placeholder: this.inputPlaceholder || '', required: this.required, type: "text", value: this.internalValue })), h("div", { key: '881ab6448981da5870e6ed067e37b649ca8b55bf', class: "zonos--floated-label" }, h("label", { key: 'ad9b22d2370eb3b6494eab4ea2ecda4f8f28e79a', htmlFor: this.inputId }, this.inputLabel))), this.error && (h("zonos-text", { key: '7dd0d63348393d08286a5ce34a384539fe3dacf4', textColor: "red-600", type: "caption" }, this.error))));
|
|
98
98
|
}
|
|
99
99
|
get el() { return getElement(this); }
|
|
100
100
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.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:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=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++;n=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];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++){if(i||!(o in t)){if(!i)i=Array.prototype.slice.call(t,0,o);i[o]=t[o]}}return e.concat(i||Array.prototype.slice.call(t))};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{s as storageStore,t as translate,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.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:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=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++;n=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];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++){if(i||!(o in t)){if(!i)i=Array.prototype.slice.call(t,0,o);i[o]=t[o]}}return e.concat(i||Array.prototype.slice.call(t))};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{s as storageStore,t as translate,m as getOverridenZCountry,l as localizationStore,f as filterValidTests,e as storageStoreSetEnabledVariantTestKeys}from"./localization-Bs6hVcKV.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{h as handleFetch,l as logError,f as fallbackApiList,g as getIsTestMode,a as getIsStagingMode,s as sendErrorLog,j as jsonParse}from"./handleFetch-D5GYDF-O.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import{e as euCountryCodes}from"./TaxId-Cye-evFK.js";var getCheckoutSession=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:if(!storageStore.checkoutSessionId){return[2/*return*/,{errors:[{message:"No checkout session id found"}],json:null}]}e=new URLSearchParams;e.set("checkoutSessionId",storageStore.checkoutSessionId);return[4/*yield*/,handleFetch("/api/zonos-elements/get-checkout-session?".concat(e.toString()))];case 1:t=n.sent(),r=t.errors,o=t.json;return[2/*return*/,{errors:r,json:o}]}}))}))};var _o=createStore((function(){return{amountToApply:null,appliedAmount:null,availableBalance:null,error:null,isApplying:false,isEnabled:false,orderIdCreated:null,remainingBalance:null,useFullBalance:true}})),reset$2=_o.reset,storeCreditStore=_o.state;
|
|
2
2
|
/**
|
|
3
3
|
* Reset store credit store to initial state
|
|
4
4
|
*/var storeCreditStoreReset=function(){reset$2()};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,r,t,n){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?t(e.value):i(e.value).then(a,s)}u((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return u([e,r])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1];o=s;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(s);break}if(o[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{t as translate,l as localizationStore,s as storageStore}from"./localization-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,r,t,n){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n["throw"](e))}catch(e){o(e)}}function u(e){e.done?t(e.value):i(e.value).then(a,s)}u((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(r){return u([e,r])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(t=0)),t)try{if(n=1,i&&(o=s[0]&2?i["return"]:s[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;if(i=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1];o=s;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(s);break}if(o[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];i=0}finally{n=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{t as translate,l as localizationStore,s as storageStore}from"./localization-Bs6hVcKV.js";import{l as logError$1,h as handleFetch,s as sendErrorLog}from"./handleFetch-D5GYDF-O.js";import{l as log,b as allLogs}from"./VarianceTest-BJmZPrZl.js";import{d as cartStore,Y as cartStoreUpdateSelectedShippingOption,b as stripeStore,a0 as stripeStoreBuildAddressForPartyCreate}from"./cart-BDc4RTBJ.js";
|
|
2
2
|
// src/constant/common.ts
|
|
3
3
|
function _array_like_to_array(e,r){if(r==null||r>e.length)r=e.length;for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,r,t,n,i,o,a){try{var s=e[o](a);var u=s.value}catch(e){t(e);return}if(s.done){r(u)}else{Promise.resolve(u).then(n,i)}}function _async_to_generator(e){return function(){var r=this,t=arguments;return new Promise((function(n,i){var o=e.apply(r,t);function a(e){asyncGeneratorStep(o,n,i,a,s,"next",e)}function s(e){asyncGeneratorStep(o,n,i,a,s,"throw",e)}a(undefined)}))}}function _class_call_check(e,r){if(!(e instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(e,n.key,n)}}function _create_class(e,r,t){if(r)_defineProperties(e.prototype,r);return e}function _define_property(e,r,t){if(r in e){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:true})}else{e[r]=t}return e}function _instanceof(e,r){if(r!=null&&typeof Symbol!=="undefined"&&r[Symbol.hasInstance]){return!!r[Symbol.hasInstance](e)}else{return e instanceof r}}function _iterable_to_array(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _iterable_to_array_limit(e,r){var t=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(t==null)return;var n=[];var i=true;var o=false;var a,s;try{for(t=t.call(e);!(i=(a=t.next()).done);i=true){n.push(a.value);if(n.length===r)break}}catch(e){o=true;s=e}finally{try{if(!i&&t["return"]!=null)t["return"]()}finally{if(o)throw s}}return n}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};var n=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))}n.forEach((function(r){_define_property(e,r,t[r])}))}return e}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}function _object_spread_props(e,r){r=r!=null?r:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(r))}else{ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _sliced_to_array(e,r){return _array_with_holes(e)||_iterable_to_array_limit(e,r)||_unsupported_iterable_to_array(e,r)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,r){if(!e)return;if(typeof e==="string")return _array_like_to_array(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor)t=e.constructor.name;if(t==="Map"||t==="Set")return Array.from(t);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _array_like_to_array(e,r)}function _ts_generator(e,r){var t,n,i,o,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};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(r){return u([e,r])}}function u(o){if(t)throw new TypeError("Generator is already executing.");while(a)try{if(t=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(o[0]===6&&a.label<i[1]){a.label=i[1];i=o;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(o);break}if(i[2])a.ops.pop();a.trys.pop();continue}o=r.call(e,a)}catch(e){o=[6,e];n=0}finally{t=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}}var Environment=function(e){e["production"]="prod";e["demo"]="demo";e["staging"]="staging";return e}(Environment||{});
|
|
4
4
|
// src/constant/config.ts
|
package/dist/esm-es5/index.js
CHANGED
|
@@ -54,7 +54,7 @@ var n=new URL(e).searchParams;var o=n.get("zonosQaUrl");if(!o){return null}var t
|
|
|
54
54
|
* When developing, if the script load is from `dev.elements.zonos.com`,
|
|
55
55
|
* it would load script from that same domain instead of loading from cdn
|
|
56
56
|
*/
|
|
57
|
-
var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=extractZonosQaUrl(window.location.href);var o="https://v1.3.
|
|
57
|
+
var e=window&&window.location.href.includes("forceLoadCdn");if(typeof window==="undefined"||e){return null}var n=extractZonosQaUrl(window.location.href);var o="https://v1.3.289.js.zonos.com";
|
|
58
58
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
59
59
|
if(!n&&(o.includes("test.")||
|
|
60
60
|
// Vercel git domain
|
|
@@ -79,9 +79,7 @@ var e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");var n=w
|
|
|
79
79
|
if(stripePromise$1!==null){return stripePromise$1}stripePromise$1=new Promise((function(n,o){if(typeof window==="undefined"||typeof document==="undefined"){
|
|
80
80
|
// Resolve to null when imported server side. This makes the module
|
|
81
81
|
// safe to import in an isomorphic code base.
|
|
82
|
-
n(null);return}if(window.Stripe){n(window.Stripe);return}try{var t=zonosStripeFindScript();if(t&&e){console.warn(EXISTING_SCRIPT_MESSAGE)}else if(!t){t=injectScript()}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){n(window.Stripe)}else{o(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){o(new Error("Failed to load Stripe.js"))}))}catch(e){o(e);return}}));return stripePromise$1};
|
|
83
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
84
|
-
var registerWrapper=function(e,n){if(!e||!e._registerWrapper){return}e._registerWrapper({name:"stripe-js",startTime:n})};var initStripe=function(e,n,o){if(e===null){return null}var t=e.apply(undefined,n);registerWrapper(t,o);return t};
|
|
82
|
+
n(null);return}if(window.Stripe){n(window.Stripe);return}try{var t=zonosStripeFindScript();if(t&&e){console.warn(EXISTING_SCRIPT_MESSAGE)}else if(!t){t=injectScript()}t===null||t===void 0?void 0:t.addEventListener("load",(function(){if(window.Stripe){n(window.Stripe)}else{o(new Error("Stripe.js not available"))}}));t===null||t===void 0?void 0:t.addEventListener("error",(function(){o(new Error("Failed to load Stripe.js"))}))}catch(e){o(e);return}}));return stripePromise$1};var registerWrapper=function(e,n){if(!e||!e._registerWrapper){return}e._registerWrapper({name:"stripe-js",startTime:n})};var initStripe=function(e,n,o){if(e===null){return null}var t=e.apply(undefined,n);registerWrapper(t,o);return t};
|
|
85
83
|
// Execute our own script injection after a tick to give users time to do their
|
|
86
84
|
// own script injection.
|
|
87
85
|
var hasCheckoutCartCallback=function(){var e,n;return typeof window!=="undefined"&&(typeof((e=window.Zonos)===null||e===void 0?void 0:e.createCartId)==="function"||typeof((n=window.Zonos)===null||n===void 0?void 0:n.buildCartDetail)==="function")};var stripePromise=Promise.resolve().then((function(){
|
|
@@ -99,19 +97,19 @@ return[4/*yield*/,new Promise((function(e){return setTimeout(e,500)}))];case 2:
|
|
|
99
97
|
e.sent();return[2/*return*/,getCartInfoById({cartId:d,retries:l-1})];case 3:if(c){return[2/*return*/,null]}return[2/*return*/,Object.assign(Object.assign({},s),{zonosMode:u})]}}))}))};var setupCartDataWithSettings=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r;return __generator(this,(function(i){switch(i.label){case 0:n=_getIsValidCartId(e),o=n.isDgsCartId,t=n.isLegacyCartId;if(!t&&!o){logError("[ZONOS - loadZonos] invalid cart id");return[2/*return*/,null]}return[4/*yield*/,getCartInfoById({cartId:e,retries:5})];case 1:r=i.sent();log("[ZONOS - loadZonos] getting temp cart data","info",r);if(!r){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2/*return*/,null]}window.Zonos.storeId=r.cartData.storeId;window.Zonos.zonosApiKey=r.cartData.credentialToken;window.Zonos.zonosMode=r.zonosMode;return[2/*return*/,{cartData:r.cartData,settings:r.settings,storeFavicon:r.storeFaviconUrl,storeId:r.cartData.storeId,storeLogo:r.storeLogoUrl,zonosApiKey:r.cartData.credentialToken}]}}))}))};var _a;
|
|
100
98
|
/**
|
|
101
99
|
* Get the load version and url based on the loadScriptSrc, if the domain that used to load `zonos.js` is in white listed domains, use currentLoadScriptUrl as the load url instead, if zonosQaUrl exists, it would also fall under the white listed domain
|
|
102
|
-
*/var zonosLoadUrl=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=checkIfLoadVersionDomain({loadScriptSrc:e===null||e===void 0?void 0:e.src}),o=n.currentLoadScriptUrl,t=n.isWhiteListed;if(t){return o}return null}();var startLoadTime=Date.now();var ZONOS_URL="https://v1.3.
|
|
100
|
+
*/var zonosLoadUrl=function(){if(typeof document==="undefined"){return null}var e=document.querySelector('script[src*="/zonos.js"]');var n=checkIfLoadVersionDomain({loadScriptSrc:e===null||e===void 0?void 0:e.src}),o=n.currentLoadScriptUrl,t=n.isWhiteListed;if(t){return o}return null}();var startLoadTime=Date.now();var ZONOS_URL="https://v1.3.289.js.zonos.com";var JS_DELIVR_ZONOS_URL=zonosLoadUrl||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.289";var UNPKG_ZONOS_URL="https://unpkg.com/@zonos/elements@1.3.289";var CDNJS_ZONOS_URL="https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.289";var GOOGLE_FONT_URL="https://fonts.googleapis.com";var GOOGLE_FONT_REGEX=/^https:\/\/fonts\.googleapis\.com/;var Zonos=/** @class */function(){function e(){}return e}();_a=Zonos;Zonos.doneInit=false;Zonos.cartSettings=null;
|
|
103
101
|
// if query 'zonosDebug=1' param from url, debug mode is on
|
|
104
|
-
Zonos.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);Zonos.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);Zonos._paypalMockResponse=null;Zonos.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;Zonos.isBigCommerce=false;Zonos.releaseDate="
|
|
102
|
+
Zonos.debug=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/);Zonos.zonosConversionTest=typeof window!=="undefined"&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/);Zonos._paypalMockResponse=null;Zonos.iframeLogType=typeof window!=="undefined"?new URLSearchParams(window.location.search).get("iframeLogType"):null;Zonos.isBigCommerce=false;Zonos.releaseDate="1790008861725";Zonos.isLegacyCheckout=false;Zonos.googleAnalyticId=null;Zonos.googleAnalyticReady=false;Zonos.facebookPixelId=null;Zonos.facebookPixelReady=false;Zonos.startLoadTime=startLoadTime;Zonos.domain=typeof window!=="undefined"?// domain that embeds the iframe
|
|
105
103
|
window.location!=window.parent.location&&document.referrer||
|
|
106
104
|
// current domain
|
|
107
105
|
document.location.hostname:"";Zonos.showBaseForeign=typeof window!=="undefined"&&window.location.search.includes("zonosShowBaseForeign");Zonos.overrideUseCustomAddressForm=false;Zonos.isCollect=false;Zonos.isInvoice=false;
|
|
108
106
|
/**
|
|
109
107
|
* By default, the package will load from npm
|
|
110
|
-
*/Zonos.isNpm=true;Zonos.zonosQaUrl=null;Zonos.zonosQaUrlApi=null;Zonos.trackEventLogs=[];Zonos.version="v".concat("1.3.
|
|
108
|
+
*/Zonos.isNpm=true;Zonos.zonosQaUrl=null;Zonos.zonosQaUrlApi=null;Zonos.trackEventLogs=[];Zonos.version="v".concat("1.3.289");Zonos.modeAlerted=false;Zonos.cartData=null;Zonos.paypal=null;Zonos.zonosMode=null;Zonos.IframeService=IframeService;Zonos.getCurrentTimestamp=function(){return(new Date).getTime()};Zonos.zonosController=null;Zonos.loadTimeApiInfoList=[];Zonos.logIntervalId=null;Zonos.init=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n,o,t,r,i,a,s,u,c,d,l,f,v,m,_;return __generator(this,(function(p){switch(p.label){case 0:n=e.appearance,o=e.checkoutSettings,t=e.currencyConverter,r=e.helloSettings,i=e.onCountryChange,a=e.overrideCurrencyFormat,s=e.storeId,u=e.zonosApiKey;_a.cartId=getCartIdFromQueryParam();
|
|
111
109
|
// Expose the checkout cart callbacks on the global so Stripe loading can be
|
|
112
110
|
// gated on whether at least one of them is configured.
|
|
113
111
|
_a.createCartId=o===null||o===void 0?void 0:o.createCartId;
|
|
114
|
-
// eslint-disable-next-line
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- intentionally mirror the (deprecated) callback so Stripe loading can be gated on it
|
|
115
113
|
_a.buildCartDetail=o===null||o===void 0?void 0:o.buildCartDetail;if(_a.doneInit){
|
|
116
114
|
// do nothing if zonos is already initialized
|
|
117
115
|
return[2/*return*/]}log("====== ZONOS DEBUG MODE: on (".concat(_a.version,") ======"));_a.zonosApiKey=u;_a.storeId=s;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.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:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=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++;n=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];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{d as cartStore,Y as cartStoreUpdateSelectedShippingOption,b as stripeStore,a0 as stripeStoreBuildAddressForPartyCreate}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.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:[]},o,n,i,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=s(0),a["throw"]=s(1),a["return"]=s(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=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++;n=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];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{d as cartStore,Y as cartStoreUpdateSelectedShippingOption,b as stripeStore,a0 as stripeStoreBuildAddressForPartyCreate}from"./cart-BDc4RTBJ.js";import{s as storageStore}from"./localization-Bs6hVcKV.js";import{h as handleFetch,s as sendErrorLog,l as logError}from"./handleFetch-D5GYDF-O.js";import{b as allLogs}from"./VarianceTest-BJmZPrZl.js";var invoiceStore=createStore((function(){return{amountTotalDue:null,isFetchingPayorInfo:true,landedCostShortId:null,partyBillingId:null,payorAddress:null}})).state;var invoiceStoreInitShippingInfo=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i;var a=e.landedCostId,s=e.retries,d=s===void 0?5:s;return __generator(this,(function(e){switch(e.label){case 0:invoiceStore.isFetchingPayorInfo=true;return[4/*yield*/,handleFetch("/api/zonos-elements/invoice/get-payor-info-by-lc-id",{body:{landedCostId:a},method:"POST"})];case 1:n=e.sent();if(!n.errors.length)return[3/*break*/,4];if(!(d>0))return[3/*break*/,3];
|
|
2
2
|
// Wait for 1 second before retrying
|
|
3
3
|
return[4/*yield*/,new Promise((function(e){return setTimeout(e,1e3)}))];case 2:
|
|
4
4
|
// Wait for 1 second before retrying
|