@zonos/elements 1.3.50 → 1.3.52
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-65376e00.js +40 -0
- package/dist/cjs/{cart-688d674d.js → cart-61a8983d.js} +238 -370
- package/dist/cjs/{createCustomEvent-01bacaea.js → createCustomEvent-228027b5.js} +3 -2
- package/dist/cjs/handleFetch-842c95b0.js +322 -0
- package/dist/cjs/index.cjs.js +75 -35
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-ce1516ba.js → paypal-f1eb6621.js} +16 -16
- package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
- package/dist/cjs/{zonos-cart-items_12.cjs.entry.js → zonos-badge_13.cjs.entry.js} +41 -9
- package/dist/cjs/zonos-checkout.cjs.entry.js +75 -174
- package/dist/cjs/zonos-controller.cjs.entry.js +27 -25
- 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-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +11 -11
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +9 -9
- package/dist/cjs/zonos-tooltip.cjs.entry.js +27 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +5 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +44 -20
- package/dist/collection/components/store/checkout/cart.js +14 -2
- package/dist/collection/components/store/checkout/stripe.js +9 -4
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -3
- package/dist/collection/components/store/translationStore/strings.base.js +3 -3
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -3
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -3
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -3
- package/dist/collection/components/store/translationStore/strings.french.js +3 -3
- package/dist/collection/components/store/translationStore/strings.german.js +3 -3
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -3
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -3
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -3
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -3
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -3
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -3
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -3
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -3
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -3
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -3
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -3
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -3
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -3
- package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +14 -14
- package/dist/collection/components/utils/api/calculateLandedCostNormalized.js +28 -0
- package/dist/collection/components/utils/api/cartCalculateLandedCost.js +19 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +65 -0
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +2 -2
- package/dist/collection/components/utils/checkout/initCheckout.js +4 -2
- package/dist/collection/components/utils/handleFetch.js +6 -1
- package/dist/collection/environment.js +1 -1
- package/dist/collection/scripts/_getNextFallbackUrl.js +1 -0
- package/dist/collection/scripts/_getTempCartById.js +14 -0
- package/dist/collection/scripts/_zonosBase.js +39 -10
- package/dist/collection/scripts/cart/_getCartIdFromParam.js +9 -0
- package/dist/collection/scripts/cart/_setupCartData.js +18 -0
- package/dist/collection/types/checkout/CheckoutConfig.js +2 -1
- package/dist/collection/types/generated/graphql.customer.types.js +12 -0
- package/dist/collection/utils/formattedCloudflareApiUrl.js +8 -2
- package/dist/collection/utils/generateCloudflareDeployUrl.js +3 -0
- package/dist/esm/CheckoutConfig-57350b28.js +36 -0
- package/dist/esm/{cart-4f300fcb.js → cart-45d2861f.js} +194 -323
- package/dist/esm/{createCustomEvent-c5ed9070.js → createCustomEvent-3fcc948a.js} +2 -1
- package/dist/esm/handleFetch-37cea185.js +315 -0
- package/dist/esm/index.js +56 -17
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-70caf283.js → paypal-ee310945.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +2 -2
- package/dist/esm/{zonos-cart-items_12.entry.js → zonos-badge_13.entry.js} +40 -9
- package/dist/esm/zonos-checkout.entry.js +61 -160
- package/dist/esm/zonos-controller.entry.js +6 -4
- 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-elements.js +1 -1
- 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/zonos-notification_3.entry.js +3 -3
- package/dist/esm/zonos-tooltip.entry.js +23 -0
- package/dist/esm-es5/CheckoutConfig-57350b28.js +1 -0
- package/dist/esm-es5/cart-45d2861f.js +1 -0
- package/dist/esm-es5/{createCustomEvent-c5ed9070.js → createCustomEvent-3fcc948a.js} +1 -1
- package/dist/esm-es5/handleFetch-37cea185.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-70caf283.js → paypal-ee310945.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_13.entry.js +1 -0
- 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-elements.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/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -0
- package/dist/scripts/index.d.ts +74 -87
- 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/checkout/zonos-checkout/zonos-checkout.d.ts +0 -2
- package/dist/types/components/store/checkout/cart.d.ts +13 -3
- package/dist/types/components/store/checkout/stripe.d.ts +3 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -3
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -3
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/buildCartItemsByTempCart.d.ts +8 -3
- package/dist/types/components/utils/api/calculateLandedCostNormalized.d.ts +2 -0
- package/dist/types/components/utils/api/cartCalculateLandedCost.d.ts +5 -0
- package/dist/types/components/utils/api/prepCalculateLandedCost.d.ts +5 -1
- package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
- package/dist/types/scripts/_getNextFallbackUrl.d.ts +1 -0
- package/dist/types/scripts/_getTempCartById.d.ts +8 -0
- package/dist/types/scripts/_zonosBase.d.ts +15 -12
- package/dist/types/scripts/cart/_getCartIdFromParam.d.ts +4 -0
- package/dist/types/scripts/cart/_setupCartData.d.ts +7 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +18 -3
- package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +42 -1
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +37 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +249 -2
- package/dist/types/types/generated/graphql.customer.types.ts +251 -3
- package/dist/types/utils/formattedCloudflareApiUrl.d.ts +2 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-042c466d.system.entry.js +1 -0
- package/dist/zonos-elements/p-10cb0064.entry.js +1 -0
- package/dist/zonos-elements/{p-fe198a6c.entry.js → p-259ccf8d.entry.js} +1 -1
- package/dist/zonos-elements/p-2a47d2cc.system.entry.js +1 -0
- package/dist/zonos-elements/{p-89b1f4a5.entry.js → p-31eb835c.entry.js} +1 -1
- package/dist/zonos-elements/{p-4849604d.entry.js → p-36360905.entry.js} +1 -1
- package/dist/zonos-elements/{p-322600aa.system.entry.js → p-3703b814.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4146feec.js +1 -0
- package/dist/zonos-elements/p-446c8f02.system.entry.js +1 -0
- package/dist/zonos-elements/{p-31905b60.system.js → p-5590f90c.system.js} +1 -1
- package/dist/zonos-elements/p-588396df.js +1 -0
- package/dist/zonos-elements/{p-124e3426.js → p-6e59c6e4.js} +2 -2
- package/dist/zonos-elements/p-6eedc3f8.entry.js +1 -0
- package/dist/zonos-elements/p-747eed39.entry.js +1 -0
- package/dist/zonos-elements/{p-d1cd0a5f.system.entry.js → p-8228e87c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-827868e6.entry.js +1 -0
- package/dist/zonos-elements/{p-a67578ae.entry.js → p-88005b94.entry.js} +1 -1
- package/dist/zonos-elements/p-895fdefb.js +1 -0
- package/dist/zonos-elements/p-8f7773b0.system.js +1 -0
- package/dist/zonos-elements/{p-480a6094.entry.js → p-8fa49d94.entry.js} +1 -1
- package/dist/zonos-elements/p-a74a7afa.system.js +1 -0
- package/dist/zonos-elements/p-b1861e64.system.js +1 -0
- package/dist/zonos-elements/{p-ec31cd17.system.entry.js → p-b842b96a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1719bedd.entry.js → p-bb186075.entry.js} +1 -1
- package/dist/zonos-elements/{p-8af4a9e7.system.entry.js → p-c008648a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-22e8d4ad.system.entry.js → p-cd4ad1be.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7e73693.system.entry.js → p-d62e6bb0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-40d52dd6.system.entry.js → p-dc12f30a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-eb2aedd0.js +1 -0
- package/dist/zonos-elements/{p-ceb8b836.system.js → p-f124e459.system.js} +2 -2
- package/dist/zonos-elements/p-f527cd5b.entry.js +1 -0
- package/dist/zonos-elements/p-f826b979.system.entry.js +1 -0
- package/dist/zonos-elements/p-f87a635b.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +2 -1
- package/dist/cjs/logError-4e2f2020.js +0 -58
- package/dist/cjs/zonos-badge_2.cjs.entry.js +0 -57
- package/dist/collection/components/utils/api/tempCartItem/getAttributes.js +0 -66
- package/dist/collection/components/utils/api/tempCartItem/getMeasurements.js +0 -58
- package/dist/esm/logError-c456c092.js +0 -55
- package/dist/esm/zonos-badge_2.entry.js +0 -52
- package/dist/esm-es5/cart-4f300fcb.js +0 -1
- package/dist/esm-es5/logError-c456c092.js +0 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +0 -1
- package/dist/types/components/utils/api/tempCartItem/getAttributes.d.ts +0 -11
- package/dist/types/components/utils/api/tempCartItem/getMeasurements.d.ts +0 -7
- package/dist/types/types/checkout/api/TempCart.d.ts +0 -80
- package/dist/zonos-elements/p-00f219bd.entry.js +0 -1
- package/dist/zonos-elements/p-05dff37f.js +0 -1
- package/dist/zonos-elements/p-1f2db2ff.entry.js +0 -1
- package/dist/zonos-elements/p-2018969a.js +0 -1
- package/dist/zonos-elements/p-27f2e8af.system.entry.js +0 -1
- package/dist/zonos-elements/p-4452dddc.entry.js +0 -1
- package/dist/zonos-elements/p-47c72c50.system.entry.js +0 -1
- package/dist/zonos-elements/p-595d406e.entry.js +0 -1
- package/dist/zonos-elements/p-5beccdce.system.entry.js +0 -1
- package/dist/zonos-elements/p-6013e370.entry.js +0 -1
- package/dist/zonos-elements/p-63db40b9.system.js +0 -1
- package/dist/zonos-elements/p-6ab615e6.system.js +0 -1
- package/dist/zonos-elements/p-81540fd6.system.js +0 -1
- package/dist/zonos-elements/p-d709ad28.system.entry.js +0 -1
- package/dist/zonos-elements/p-eaa335e1.js +0 -1
- /package/dist/collection/types/checkout/api/{TempCart.js → NormalizedTempCart.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-473f4654.js';
|
|
2
|
-
import {
|
|
2
|
+
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, j as jsonParse } from './handleFetch-37cea185.js';
|
|
3
3
|
import { i as isDarkColor } from './isDarkColor-c927f77d.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-23398fc6.js';
|
|
5
5
|
|
|
@@ -73,6 +73,9 @@ const stringsArabic = {
|
|
|
73
73
|
'Delivery options': {
|
|
74
74
|
value: 'خيارات التوصيل',
|
|
75
75
|
},
|
|
76
|
+
Discounts: {
|
|
77
|
+
value: 'خصومات',
|
|
78
|
+
},
|
|
76
79
|
"Don't close": {
|
|
77
80
|
value: 'لا تغلق',
|
|
78
81
|
},
|
|
@@ -151,9 +154,6 @@ const stringsArabic = {
|
|
|
151
154
|
'Nothing due at the door': {
|
|
152
155
|
value: 'لا شيء مستحق عند الباب',
|
|
153
156
|
},
|
|
154
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
155
|
-
value: 'الطلبية أعلى من الحد الأدنى لكل من الرسوم والضرائب',
|
|
156
|
-
},
|
|
157
157
|
'Order total': {
|
|
158
158
|
value: 'إجمالي الطلبية',
|
|
159
159
|
},
|
|
@@ -427,6 +427,9 @@ const stringsBase = {
|
|
|
427
427
|
'Delivery options': {
|
|
428
428
|
value: 'Delivery options',
|
|
429
429
|
},
|
|
430
|
+
Discounts: {
|
|
431
|
+
value: 'Discounts',
|
|
432
|
+
},
|
|
430
433
|
"Don't close": {
|
|
431
434
|
value: "Don't close",
|
|
432
435
|
},
|
|
@@ -505,9 +508,6 @@ const stringsBase = {
|
|
|
505
508
|
'Nothing due at the door': {
|
|
506
509
|
value: 'Nothing due at the door',
|
|
507
510
|
},
|
|
508
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
509
|
-
value: 'Order is over the de minimis threshold for both duty and tax',
|
|
510
|
-
},
|
|
511
511
|
'Order total': {
|
|
512
512
|
value: 'Order total',
|
|
513
513
|
},
|
|
@@ -781,6 +781,9 @@ const stringsChinese = {
|
|
|
781
781
|
'Delivery options': {
|
|
782
782
|
value: '送货选项',
|
|
783
783
|
},
|
|
784
|
+
Discounts: {
|
|
785
|
+
value: '折扣',
|
|
786
|
+
},
|
|
784
787
|
"Don't close": {
|
|
785
788
|
value: '不要关',
|
|
786
789
|
},
|
|
@@ -859,9 +862,6 @@ const stringsChinese = {
|
|
|
859
862
|
'Nothing due at the door': {
|
|
860
863
|
value: '门口无需付款',
|
|
861
864
|
},
|
|
862
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
863
|
-
value: '订单超过关税和税款的最低征税门槛',
|
|
864
|
-
},
|
|
865
865
|
'Order total': {
|
|
866
866
|
value: '订单总计',
|
|
867
867
|
},
|
|
@@ -1135,6 +1135,9 @@ const stringsDanish = {
|
|
|
1135
1135
|
'Delivery options': {
|
|
1136
1136
|
value: 'Leveringsmuligheder',
|
|
1137
1137
|
},
|
|
1138
|
+
Discounts: {
|
|
1139
|
+
value: 'Rabat',
|
|
1140
|
+
},
|
|
1138
1141
|
"Don't close": {
|
|
1139
1142
|
value: 'Luk ikke',
|
|
1140
1143
|
},
|
|
@@ -1213,9 +1216,6 @@ const stringsDanish = {
|
|
|
1213
1216
|
'Nothing due at the door': {
|
|
1214
1217
|
value: 'Intet at betale ved døren',
|
|
1215
1218
|
},
|
|
1216
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
1217
|
-
value: 'Ordre er over de minimis-grænsen for både told og skat',
|
|
1218
|
-
},
|
|
1219
1219
|
'Order total': {
|
|
1220
1220
|
value: 'Ordresum',
|
|
1221
1221
|
},
|
|
@@ -1489,6 +1489,9 @@ const stringsDutch = {
|
|
|
1489
1489
|
'Delivery options': {
|
|
1490
1490
|
value: 'Bezorgopties',
|
|
1491
1491
|
},
|
|
1492
|
+
Discounts: {
|
|
1493
|
+
value: 'Kortingen',
|
|
1494
|
+
},
|
|
1492
1495
|
"Don't close": {
|
|
1493
1496
|
value: 'Niet sluiten',
|
|
1494
1497
|
},
|
|
@@ -1567,9 +1570,6 @@ const stringsDutch = {
|
|
|
1567
1570
|
'Nothing due at the door': {
|
|
1568
1571
|
value: 'Niets te betalen aan de deur',
|
|
1569
1572
|
},
|
|
1570
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
1571
|
-
value: 'Bestelling overschrijdt de minimale drempel voor zowel heffing als belasting',
|
|
1572
|
-
},
|
|
1573
1573
|
'Order total': {
|
|
1574
1574
|
value: 'Totaal bestelling',
|
|
1575
1575
|
},
|
|
@@ -1843,6 +1843,9 @@ const stringsFrench = {
|
|
|
1843
1843
|
'Delivery options': {
|
|
1844
1844
|
value: 'Options de livraison',
|
|
1845
1845
|
},
|
|
1846
|
+
Discounts: {
|
|
1847
|
+
value: 'Réductions',
|
|
1848
|
+
},
|
|
1846
1849
|
"Don't close": {
|
|
1847
1850
|
value: 'Ne pas fermer',
|
|
1848
1851
|
},
|
|
@@ -1921,9 +1924,6 @@ const stringsFrench = {
|
|
|
1921
1924
|
'Nothing due at the door': {
|
|
1922
1925
|
value: 'Rien à payer à la porte',
|
|
1923
1926
|
},
|
|
1924
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
1925
|
-
value: 'La commande dépasse le seuil de minimis pour les droits et les taxes',
|
|
1926
|
-
},
|
|
1927
1927
|
'Order total': {
|
|
1928
1928
|
value: 'Total de la commande',
|
|
1929
1929
|
},
|
|
@@ -2197,6 +2197,9 @@ const stringsGerman = {
|
|
|
2197
2197
|
'Delivery options': {
|
|
2198
2198
|
value: 'Lieferoptionen',
|
|
2199
2199
|
},
|
|
2200
|
+
Discounts: {
|
|
2201
|
+
value: 'Rabatte',
|
|
2202
|
+
},
|
|
2200
2203
|
"Don't close": {
|
|
2201
2204
|
value: 'Nicht schließen',
|
|
2202
2205
|
},
|
|
@@ -2275,9 +2278,6 @@ const stringsGerman = {
|
|
|
2275
2278
|
'Nothing due at the door': {
|
|
2276
2279
|
value: 'An der Tür nichts zu bezahlen',
|
|
2277
2280
|
},
|
|
2278
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
2279
|
-
value: 'Bestellung überschreitet Mindestgrenze sowohl für Zoll als auch Steuer',
|
|
2280
|
-
},
|
|
2281
2281
|
'Order total': {
|
|
2282
2282
|
value: 'Bestellsumme',
|
|
2283
2283
|
},
|
|
@@ -2551,6 +2551,9 @@ const stringsHebrew = {
|
|
|
2551
2551
|
'Delivery options': {
|
|
2552
2552
|
value: 'אפשרויות משלוח',
|
|
2553
2553
|
},
|
|
2554
|
+
Discounts: {
|
|
2555
|
+
value: 'הנחות',
|
|
2556
|
+
},
|
|
2554
2557
|
"Don't close": {
|
|
2555
2558
|
value: 'אל תסגור',
|
|
2556
2559
|
},
|
|
@@ -2629,9 +2632,6 @@ const stringsHebrew = {
|
|
|
2629
2632
|
'Nothing due at the door': {
|
|
2630
2633
|
value: 'אין כלום לשלם בדלת',
|
|
2631
2634
|
},
|
|
2632
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
2633
|
-
value: 'ההזמנה חורגת מסף המינימום גם למכס וגם למס',
|
|
2634
|
-
},
|
|
2635
2635
|
'Order total': {
|
|
2636
2636
|
value: 'סה"כ ההזמנה',
|
|
2637
2637
|
},
|
|
@@ -2905,6 +2905,9 @@ const stringsIndonesian = {
|
|
|
2905
2905
|
'Delivery options': {
|
|
2906
2906
|
value: 'Opsi pengiriman',
|
|
2907
2907
|
},
|
|
2908
|
+
Discounts: {
|
|
2909
|
+
value: 'Diskon',
|
|
2910
|
+
},
|
|
2908
2911
|
"Don't close": {
|
|
2909
2912
|
value: 'Jangan tutup',
|
|
2910
2913
|
},
|
|
@@ -2983,9 +2986,6 @@ const stringsIndonesian = {
|
|
|
2983
2986
|
'Nothing due at the door': {
|
|
2984
2987
|
value: 'Tidak ada yang harus dibayar di pintu',
|
|
2985
2988
|
},
|
|
2986
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
2987
|
-
value: 'Pesanan melebihi ambang batas de minimis untuk bea masuk dan pajak',
|
|
2988
|
-
},
|
|
2989
2989
|
'Order total': {
|
|
2990
2990
|
value: 'Total pesanan',
|
|
2991
2991
|
},
|
|
@@ -3259,6 +3259,9 @@ const stringsItalian = {
|
|
|
3259
3259
|
'Delivery options': {
|
|
3260
3260
|
value: 'Opzioni di consegna',
|
|
3261
3261
|
},
|
|
3262
|
+
Discounts: {
|
|
3263
|
+
value: 'Sconti',
|
|
3264
|
+
},
|
|
3262
3265
|
"Don't close": {
|
|
3263
3266
|
value: 'Non chiudere',
|
|
3264
3267
|
},
|
|
@@ -3337,9 +3340,6 @@ const stringsItalian = {
|
|
|
3337
3340
|
'Nothing due at the door': {
|
|
3338
3341
|
value: 'Nulla da pagare alla porta',
|
|
3339
3342
|
},
|
|
3340
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
3341
|
-
value: "L'ordine supera la soglia di minimis sia per i dazi che per le tasse",
|
|
3342
|
-
},
|
|
3343
3343
|
'Order total': {
|
|
3344
3344
|
value: 'Totale ordine',
|
|
3345
3345
|
},
|
|
@@ -3613,6 +3613,9 @@ const stringsJapanese = {
|
|
|
3613
3613
|
'Delivery options': {
|
|
3614
3614
|
value: '配送オプション',
|
|
3615
3615
|
},
|
|
3616
|
+
Discounts: {
|
|
3617
|
+
value: '割引',
|
|
3618
|
+
},
|
|
3616
3619
|
"Don't close": {
|
|
3617
3620
|
value: '閉めないでください',
|
|
3618
3621
|
},
|
|
@@ -3691,9 +3694,6 @@ const stringsJapanese = {
|
|
|
3691
3694
|
'Nothing due at the door': {
|
|
3692
3695
|
value: 'ドアでの支払いはありません',
|
|
3693
3696
|
},
|
|
3694
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
3695
|
-
value: '注文が関税と税金のデミニマス閾値を超えています',
|
|
3696
|
-
},
|
|
3697
3697
|
'Order total': {
|
|
3698
3698
|
value: 'ご注文合計',
|
|
3699
3699
|
},
|
|
@@ -3967,6 +3967,9 @@ const stringsKorean = {
|
|
|
3967
3967
|
'Delivery options': {
|
|
3968
3968
|
value: '배송 옵션',
|
|
3969
3969
|
},
|
|
3970
|
+
Discounts: {
|
|
3971
|
+
value: '할인',
|
|
3972
|
+
},
|
|
3970
3973
|
"Don't close": {
|
|
3971
3974
|
value: '닫지 마세요',
|
|
3972
3975
|
},
|
|
@@ -4045,9 +4048,6 @@ const stringsKorean = {
|
|
|
4045
4048
|
'Nothing due at the door': {
|
|
4046
4049
|
value: '문 앞에 납부할 것이 없습니다',
|
|
4047
4050
|
},
|
|
4048
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
4049
|
-
value: '주문 금액이 관세와 세금의 최저 임계값을 초과합니다',
|
|
4050
|
-
},
|
|
4051
4051
|
'Order total': {
|
|
4052
4052
|
value: '주문 총액',
|
|
4053
4053
|
},
|
|
@@ -4321,6 +4321,9 @@ const stringsNorwegian = {
|
|
|
4321
4321
|
'Delivery options': {
|
|
4322
4322
|
value: 'Leveringsalternativer',
|
|
4323
4323
|
},
|
|
4324
|
+
Discounts: {
|
|
4325
|
+
value: 'Rabatter',
|
|
4326
|
+
},
|
|
4324
4327
|
"Don't close": {
|
|
4325
4328
|
value: 'Ikke lukk',
|
|
4326
4329
|
},
|
|
@@ -4399,9 +4402,6 @@ const stringsNorwegian = {
|
|
|
4399
4402
|
'Nothing due at the door': {
|
|
4400
4403
|
value: 'Ingenting å betale ved døren',
|
|
4401
4404
|
},
|
|
4402
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
4403
|
-
value: 'Bestillingen er over minstegrensen for både avgift og skatt',
|
|
4404
|
-
},
|
|
4405
4405
|
'Order total': {
|
|
4406
4406
|
value: 'Totalt beløp',
|
|
4407
4407
|
},
|
|
@@ -4675,6 +4675,9 @@ const stringsPolish = {
|
|
|
4675
4675
|
'Delivery options': {
|
|
4676
4676
|
value: 'Opcje dostawy',
|
|
4677
4677
|
},
|
|
4678
|
+
Discounts: {
|
|
4679
|
+
value: 'Zniżki',
|
|
4680
|
+
},
|
|
4678
4681
|
"Don't close": {
|
|
4679
4682
|
value: 'Nie zamykaj',
|
|
4680
4683
|
},
|
|
@@ -4753,9 +4756,6 @@ const stringsPolish = {
|
|
|
4753
4756
|
'Nothing due at the door': {
|
|
4754
4757
|
value: 'Nic do zapłacenia przy drzwiach',
|
|
4755
4758
|
},
|
|
4756
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
4757
|
-
value: 'Zamówienie przekracza próg minimalny zarówno dla cła, jak i podatku',
|
|
4758
|
-
},
|
|
4759
4759
|
'Order total': {
|
|
4760
4760
|
value: 'Łączna kwota zamówienia',
|
|
4761
4761
|
},
|
|
@@ -5029,6 +5029,9 @@ const stringsPortuguese = {
|
|
|
5029
5029
|
'Delivery options': {
|
|
5030
5030
|
value: 'Opções de entrega',
|
|
5031
5031
|
},
|
|
5032
|
+
Discounts: {
|
|
5033
|
+
value: 'Descontos',
|
|
5034
|
+
},
|
|
5032
5035
|
"Don't close": {
|
|
5033
5036
|
value: 'Não fechar',
|
|
5034
5037
|
},
|
|
@@ -5107,9 +5110,6 @@ const stringsPortuguese = {
|
|
|
5107
5110
|
'Nothing due at the door': {
|
|
5108
5111
|
value: 'Nada a pagar na porta',
|
|
5109
5112
|
},
|
|
5110
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
5111
|
-
value: 'O pedido ultrapassa o limite de isenção tanto para impostos quanto para taxas',
|
|
5112
|
-
},
|
|
5113
5113
|
'Order total': {
|
|
5114
5114
|
value: 'Total do pedido',
|
|
5115
5115
|
},
|
|
@@ -5383,6 +5383,9 @@ const stringsRussian = {
|
|
|
5383
5383
|
'Delivery options': {
|
|
5384
5384
|
value: 'Варианты доставки',
|
|
5385
5385
|
},
|
|
5386
|
+
Discounts: {
|
|
5387
|
+
value: 'Скидки',
|
|
5388
|
+
},
|
|
5386
5389
|
"Don't close": {
|
|
5387
5390
|
value: 'Не закрывайте',
|
|
5388
5391
|
},
|
|
@@ -5461,9 +5464,6 @@ const stringsRussian = {
|
|
|
5461
5464
|
'Nothing due at the door': {
|
|
5462
5465
|
value: 'На двери ничего не должно',
|
|
5463
5466
|
},
|
|
5464
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
5465
|
-
value: 'Заказ превышает минимальный порог как для пошлины, так и для налога',
|
|
5466
|
-
},
|
|
5467
5467
|
'Order total': {
|
|
5468
5468
|
value: 'Итого',
|
|
5469
5469
|
},
|
|
@@ -5737,6 +5737,9 @@ const stringsSpanish = {
|
|
|
5737
5737
|
'Delivery options': {
|
|
5738
5738
|
value: 'Opciones de entrega',
|
|
5739
5739
|
},
|
|
5740
|
+
Discounts: {
|
|
5741
|
+
value: 'Descuentos',
|
|
5742
|
+
},
|
|
5740
5743
|
"Don't close": {
|
|
5741
5744
|
value: 'No cerrar',
|
|
5742
5745
|
},
|
|
@@ -5815,9 +5818,6 @@ const stringsSpanish = {
|
|
|
5815
5818
|
'Nothing due at the door': {
|
|
5816
5819
|
value: 'Nada debido en la puerta',
|
|
5817
5820
|
},
|
|
5818
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
5819
|
-
value: 'El pedido supera el umbral mínimo tanto para impuestos como para aranceles',
|
|
5820
|
-
},
|
|
5821
5821
|
'Order total': {
|
|
5822
5822
|
value: 'Total del pedido',
|
|
5823
5823
|
},
|
|
@@ -6091,6 +6091,9 @@ const stringsSwedish = {
|
|
|
6091
6091
|
'Delivery options': {
|
|
6092
6092
|
value: 'Leveransalternativ',
|
|
6093
6093
|
},
|
|
6094
|
+
Discounts: {
|
|
6095
|
+
value: 'Rabatter',
|
|
6096
|
+
},
|
|
6094
6097
|
"Don't close": {
|
|
6095
6098
|
value: 'Stäng inte',
|
|
6096
6099
|
},
|
|
@@ -6169,9 +6172,6 @@ const stringsSwedish = {
|
|
|
6169
6172
|
'Nothing due at the door': {
|
|
6170
6173
|
value: 'Ingenting att betala vid dörren',
|
|
6171
6174
|
},
|
|
6172
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
6173
|
-
value: 'Beställningen överstiger minimibeloppet för både tull och skatt',
|
|
6174
|
-
},
|
|
6175
6175
|
'Order total': {
|
|
6176
6176
|
value: 'Totalt belopp för beställningen',
|
|
6177
6177
|
},
|
|
@@ -6445,6 +6445,9 @@ const stringsTurkish = {
|
|
|
6445
6445
|
'Delivery options': {
|
|
6446
6446
|
value: 'Teslimat seçenekleri',
|
|
6447
6447
|
},
|
|
6448
|
+
Discounts: {
|
|
6449
|
+
value: 'İndirimler',
|
|
6450
|
+
},
|
|
6448
6451
|
"Don't close": {
|
|
6449
6452
|
value: 'Kapatma',
|
|
6450
6453
|
},
|
|
@@ -6523,9 +6526,6 @@ const stringsTurkish = {
|
|
|
6523
6526
|
'Nothing due at the door': {
|
|
6524
6527
|
value: 'Kapıda ödenecek bir şey yok',
|
|
6525
6528
|
},
|
|
6526
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
6527
|
-
value: 'Sipariş hem gümrük hem vergi için minimum sınırın üzerinde',
|
|
6528
|
-
},
|
|
6529
6529
|
'Order total': {
|
|
6530
6530
|
value: 'Sipariş toplamı',
|
|
6531
6531
|
},
|
|
@@ -6799,6 +6799,9 @@ const stringsVietnamese = {
|
|
|
6799
6799
|
'Delivery options': {
|
|
6800
6800
|
value: 'Tùy chọn giao hàng',
|
|
6801
6801
|
},
|
|
6802
|
+
Discounts: {
|
|
6803
|
+
value: 'Giảm giá',
|
|
6804
|
+
},
|
|
6802
6805
|
"Don't close": {
|
|
6803
6806
|
value: 'Đừng đóng',
|
|
6804
6807
|
},
|
|
@@ -6877,9 +6880,6 @@ const stringsVietnamese = {
|
|
|
6877
6880
|
'Nothing due at the door': {
|
|
6878
6881
|
value: 'Không có gì phải trả tại cửa',
|
|
6879
6882
|
},
|
|
6880
|
-
'Order is over the de minimis threshold for both duty and tax': {
|
|
6881
|
-
value: 'Đơn hàng vượt ngưỡng miễn thuế cho cả thuế nhập khẩu và thuế',
|
|
6882
|
-
},
|
|
6883
6883
|
'Order total': {
|
|
6884
6884
|
value: 'Tổng đơn hàng',
|
|
6885
6885
|
},
|
|
@@ -7171,261 +7171,6 @@ const translate = (...[key, replacement]) => {
|
|
|
7171
7171
|
return ((_b = translationStore.translatedChunks[key]) === null || _b === void 0 ? void 0 : _b.value) || key;
|
|
7172
7172
|
};
|
|
7173
7173
|
|
|
7174
|
-
const fallbackApiType = ['cloudflare', 'vercel'];
|
|
7175
|
-
const MAIN_BASE_API_TYPE = fallbackApiType[0];
|
|
7176
|
-
const fallbackApiList = {
|
|
7177
|
-
cloudflare: "https://route.elements.zonos.com",
|
|
7178
|
-
vercel: "https://v1.route.js.zonos.com",
|
|
7179
|
-
};
|
|
7180
|
-
const MAIN_BASE_API = fallbackApiList[MAIN_BASE_API_TYPE];
|
|
7181
|
-
/**
|
|
7182
|
-
* Next available fallback api type
|
|
7183
|
-
*/
|
|
7184
|
-
const getNextFallbackApiType = (currentApiType = MAIN_BASE_API_TYPE) => {
|
|
7185
|
-
const currentIndex = fallbackApiType.indexOf(currentApiType);
|
|
7186
|
-
const nextFallbackApiType = fallbackApiType[currentIndex + 1];
|
|
7187
|
-
if (!nextFallbackApiType) {
|
|
7188
|
-
return null;
|
|
7189
|
-
}
|
|
7190
|
-
return nextFallbackApiType;
|
|
7191
|
-
};
|
|
7192
|
-
|
|
7193
|
-
const jsonParse = (_data) => {
|
|
7194
|
-
if (typeof _data === 'string') {
|
|
7195
|
-
try {
|
|
7196
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
7197
|
-
const json = JSON.parse(_data);
|
|
7198
|
-
return json;
|
|
7199
|
-
}
|
|
7200
|
-
catch (_error) {
|
|
7201
|
-
return null;
|
|
7202
|
-
}
|
|
7203
|
-
}
|
|
7204
|
-
return null;
|
|
7205
|
-
};
|
|
7206
|
-
|
|
7207
|
-
/**
|
|
7208
|
-
* This is the time in milliseconds after release time that we will start sending error logs to the new API
|
|
7209
|
-
* @default 1 hour
|
|
7210
|
-
*/
|
|
7211
|
-
const postReleaseReportingDuration = 1 * 3600 * 1000; // 1 hour
|
|
7212
|
-
const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostReleaseErrorReporting, }) => {
|
|
7213
|
-
if (shouldPostReleaseErrorReporting) {
|
|
7214
|
-
// We only want to report errors that happened if current time is less than 2 hours after release time
|
|
7215
|
-
const releaseTime = Number(window.Zonos.releaseDate);
|
|
7216
|
-
const currentTime = new Date().getTime();
|
|
7217
|
-
if (currentTime - releaseTime > postReleaseReportingDuration) {
|
|
7218
|
-
return;
|
|
7219
|
-
}
|
|
7220
|
-
}
|
|
7221
|
-
const userAgentData = 'userAgentData' in window.navigator
|
|
7222
|
-
? // userAgentData is not yet supported in all browsers
|
|
7223
|
-
window.navigator.userAgentData
|
|
7224
|
-
: null;
|
|
7225
|
-
const errorObject = {
|
|
7226
|
-
endpoint,
|
|
7227
|
-
errors,
|
|
7228
|
-
metadata: Object.assign({ href: window.location.href, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
7229
|
-
? userAgentData
|
|
7230
|
-
: window.navigator.userAgent }, metadata),
|
|
7231
|
-
};
|
|
7232
|
-
try {
|
|
7233
|
-
// use native fetch because in handleFetch also calls sendErrorLog and it will possibly cause circular dependencies issue
|
|
7234
|
-
void fetch(`${MAIN_BASE_API}/api/zonos-elements/log-error`, {
|
|
7235
|
-
body: JSON.stringify(errorObject),
|
|
7236
|
-
method: 'POST',
|
|
7237
|
-
});
|
|
7238
|
-
}
|
|
7239
|
-
catch (_err) {
|
|
7240
|
-
const nextFallbackApi = getNextFallbackApiType();
|
|
7241
|
-
if (!nextFallbackApi) {
|
|
7242
|
-
return;
|
|
7243
|
-
}
|
|
7244
|
-
// request to the fallback API if the first one fails
|
|
7245
|
-
void fetch(`${fallbackApiList[nextFallbackApi]}/api/zonos-elements/log-error`, {
|
|
7246
|
-
body: JSON.stringify(errorObject),
|
|
7247
|
-
method: 'POST',
|
|
7248
|
-
});
|
|
7249
|
-
}
|
|
7250
|
-
};
|
|
7251
|
-
|
|
7252
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
7253
|
-
var t = {};
|
|
7254
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7255
|
-
t[p] = s[p];
|
|
7256
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7257
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7258
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7259
|
-
t[p[i]] = s[p[i]];
|
|
7260
|
-
}
|
|
7261
|
-
return t;
|
|
7262
|
-
};
|
|
7263
|
-
const getResponseBody = async ({ response, shouldLog = true, shouldThrow = false, }) => {
|
|
7264
|
-
try {
|
|
7265
|
-
const json = await response.json();
|
|
7266
|
-
return json;
|
|
7267
|
-
}
|
|
7268
|
-
catch (e) {
|
|
7269
|
-
if (shouldThrow) {
|
|
7270
|
-
throw e;
|
|
7271
|
-
}
|
|
7272
|
-
if (shouldLog) {
|
|
7273
|
-
// eslint-disable-next-line
|
|
7274
|
-
console.error(e);
|
|
7275
|
-
}
|
|
7276
|
-
return null;
|
|
7277
|
-
}
|
|
7278
|
-
};
|
|
7279
|
-
const encodeString = (text) => {
|
|
7280
|
-
try {
|
|
7281
|
-
// encode the string, remove the "=" at the end of the encoded string
|
|
7282
|
-
const encodedString = btoa(text).replace(/=/g, '');
|
|
7283
|
-
return encodedString;
|
|
7284
|
-
}
|
|
7285
|
-
catch (error) {
|
|
7286
|
-
// return the reverse string if the encoding failed
|
|
7287
|
-
return text
|
|
7288
|
-
.replace(/[^A-Za-z0-9]/g, '')
|
|
7289
|
-
.split('')
|
|
7290
|
-
.reverse()
|
|
7291
|
-
.join('');
|
|
7292
|
-
}
|
|
7293
|
-
};
|
|
7294
|
-
const handleRequest = async ({ basePathType, options, path, }) => {
|
|
7295
|
-
let response;
|
|
7296
|
-
// fallback to the main base API if the passed in base path is not available
|
|
7297
|
-
const baseUrl = fallbackApiList[basePathType] || MAIN_BASE_API_TYPE;
|
|
7298
|
-
const url = baseUrl + path;
|
|
7299
|
-
// adding random encoded token to the url so that the request will be cached differently for each store
|
|
7300
|
-
const modifiedUrl = new URL(url);
|
|
7301
|
-
modifiedUrl.searchParams.set('zToken', encodeString(window.location.hostname));
|
|
7302
|
-
try {
|
|
7303
|
-
response = await fetch(modifiedUrl.toString(), options);
|
|
7304
|
-
}
|
|
7305
|
-
catch (e) {
|
|
7306
|
-
if (e instanceof Error) {
|
|
7307
|
-
return {
|
|
7308
|
-
baseUrl,
|
|
7309
|
-
errors: [{ message: e.message, type: 'unknown' }],
|
|
7310
|
-
json: null,
|
|
7311
|
-
response: null,
|
|
7312
|
-
zonosMode: null,
|
|
7313
|
-
};
|
|
7314
|
-
}
|
|
7315
|
-
const message = 'Fail to fetch';
|
|
7316
|
-
return {
|
|
7317
|
-
baseUrl,
|
|
7318
|
-
errors: [{ message, type: 'unknown' }],
|
|
7319
|
-
json: null,
|
|
7320
|
-
response: null,
|
|
7321
|
-
zonosMode: null,
|
|
7322
|
-
};
|
|
7323
|
-
}
|
|
7324
|
-
const zonosMode = response.headers.get('Zonos-Mode');
|
|
7325
|
-
const usingZonosPreview = window.Zonos.zonosQaUrl;
|
|
7326
|
-
// We only want to alert once if the user is in preview mode and it's also using production environment
|
|
7327
|
-
if (!window.Zonos.modeAlerted && zonosMode && usingZonosPreview) {
|
|
7328
|
-
window.Zonos.modeAlerted = true;
|
|
7329
|
-
}
|
|
7330
|
-
if (response.ok) {
|
|
7331
|
-
const data = await getResponseBody({ response });
|
|
7332
|
-
return {
|
|
7333
|
-
baseUrl,
|
|
7334
|
-
errors: [],
|
|
7335
|
-
json: data,
|
|
7336
|
-
response,
|
|
7337
|
-
zonosMode,
|
|
7338
|
-
};
|
|
7339
|
-
}
|
|
7340
|
-
const status = response.status.toString();
|
|
7341
|
-
try {
|
|
7342
|
-
const data = await getResponseBody({
|
|
7343
|
-
response,
|
|
7344
|
-
shouldThrow: true,
|
|
7345
|
-
});
|
|
7346
|
-
const message = JSON.stringify(data);
|
|
7347
|
-
return {
|
|
7348
|
-
baseUrl,
|
|
7349
|
-
errors: [{ message, type: status }],
|
|
7350
|
-
json: null,
|
|
7351
|
-
response,
|
|
7352
|
-
zonosMode,
|
|
7353
|
-
};
|
|
7354
|
-
}
|
|
7355
|
-
catch (e) {
|
|
7356
|
-
const message = 'Unknown error';
|
|
7357
|
-
return {
|
|
7358
|
-
baseUrl,
|
|
7359
|
-
errors: [{ message: `${status}: ${message}`, type: status }],
|
|
7360
|
-
json: null,
|
|
7361
|
-
response: null,
|
|
7362
|
-
zonosMode,
|
|
7363
|
-
};
|
|
7364
|
-
}
|
|
7365
|
-
};
|
|
7366
|
-
const handleRequestWithFallback = async ({ basePathType, options, path, }) => {
|
|
7367
|
-
var _a, _b;
|
|
7368
|
-
const _c = await handleRequest({
|
|
7369
|
-
basePathType,
|
|
7370
|
-
options,
|
|
7371
|
-
path,
|
|
7372
|
-
}), { errors, response } = _c, rest = __rest(_c, ["errors", "response"]);
|
|
7373
|
-
const nextFallbackApiType = getNextFallbackApiType(basePathType);
|
|
7374
|
-
const unknownError = errors.find(({ type }) => type === 'unknown');
|
|
7375
|
-
const isUnknownError = !!unknownError || (response === null || response === void 0 ? void 0 : response.status) === 404;
|
|
7376
|
-
const shouldCallFallback =
|
|
7377
|
-
// If next fallback is available, and the error is unknown (fail to fetch) or 404
|
|
7378
|
-
nextFallbackApiType && isUnknownError;
|
|
7379
|
-
// Should log the error if it's unknown error
|
|
7380
|
-
if (isUnknownError) {
|
|
7381
|
-
void sendErrorLog({
|
|
7382
|
-
endpoint: fallbackApiList[basePathType] + path,
|
|
7383
|
-
errors: errors.map(({ message }) => message),
|
|
7384
|
-
metadata: {
|
|
7385
|
-
currentBasePath: basePathType,
|
|
7386
|
-
nextFallbackApiType,
|
|
7387
|
-
requestHeaders: options === null || options === void 0 ? void 0 : options.headers,
|
|
7388
|
-
requestPayload: jsonParse((_a = options === null || options === void 0 ? void 0 : options.body) === null || _a === void 0 ? void 0 : _a.toString()) || ((_b = options === null || options === void 0 ? void 0 : options.body) === null || _b === void 0 ? void 0 : _b.toString()),
|
|
7389
|
-
status: response === null || response === void 0 ? void 0 : response.status,
|
|
7390
|
-
statusText: response === null || response === void 0 ? void 0 : response.statusText,
|
|
7391
|
-
},
|
|
7392
|
-
// When the error is unknown, error reporting should be enabled for period of time after release, so we can monitor the error.
|
|
7393
|
-
shouldPostReleaseErrorReporting: true,
|
|
7394
|
-
});
|
|
7395
|
-
}
|
|
7396
|
-
if (shouldCallFallback) {
|
|
7397
|
-
log(`=== "${path}" failed to fetch, trying next fallback ${nextFallbackApiType}`);
|
|
7398
|
-
return handleRequestWithFallback({
|
|
7399
|
-
basePathType: nextFallbackApiType,
|
|
7400
|
-
options,
|
|
7401
|
-
path,
|
|
7402
|
-
});
|
|
7403
|
-
}
|
|
7404
|
-
// No more fallbacks, just return the result
|
|
7405
|
-
return Object.assign({ errors, response }, rest);
|
|
7406
|
-
};
|
|
7407
|
-
/**
|
|
7408
|
-
* Fetch request and will request to fallback API when the first one fails
|
|
7409
|
-
* @param path Path name of the request (e.g. /api/something/com).
|
|
7410
|
-
* @param _opts fetch options
|
|
7411
|
-
*/
|
|
7412
|
-
const handleFetch = async (path, _opts) => {
|
|
7413
|
-
const opts = __rest(_opts || {}, []);
|
|
7414
|
-
const body = opts.body ? JSON.stringify(opts.body) : undefined;
|
|
7415
|
-
const method = opts.method || 'GET';
|
|
7416
|
-
// headers content type
|
|
7417
|
-
const headers = Object.assign({ 'Content-Type': 'application/json', 'Zonos-Is-BigCommerce': window.Zonos.isBigCommerce.toString(), 'Zonos-Referer': window.location.hostname, 'Zonos-Version': window.Zonos.version, credentialtoken: window.Zonos.zonosApiKey || 'Empty credential token from zonos-elements' }, opts.headers);
|
|
7418
|
-
const options = Object.assign(Object.assign({}, opts), { body: method === 'GET' ? undefined : body, headers,
|
|
7419
|
-
method });
|
|
7420
|
-
// This is for testing fallback API, set fallback API type to start with
|
|
7421
|
-
const useFallbackApi = new URLSearchParams(window.location.search).get('useFallbackApi');
|
|
7422
|
-
return handleRequestWithFallback({
|
|
7423
|
-
basePathType: useFallbackApi || MAIN_BASE_API_TYPE,
|
|
7424
|
-
options,
|
|
7425
|
-
path,
|
|
7426
|
-
});
|
|
7427
|
-
};
|
|
7428
|
-
|
|
7429
7174
|
const getCountries = async () => {
|
|
7430
7175
|
try {
|
|
7431
7176
|
const { errors, json } = await handleFetch('/api/zonos-elements/get-countries', {
|
|
@@ -8038,6 +7783,71 @@ const getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
|
|
|
8038
7783
|
state: ((_f = translatedAddress.state) === null || _f === void 0 ? void 0 : _f[state]) || state,
|
|
8039
7784
|
};
|
|
8040
7785
|
};
|
|
7786
|
+
/**
|
|
7787
|
+
* Similar to prepCalculateLandedCost except it only uses
|
|
7788
|
+
*/
|
|
7789
|
+
const prepCartCalculateLandedCost = (cartId) => {
|
|
7790
|
+
var _a;
|
|
7791
|
+
// maybe we don't need email now for prefetch the landed cost
|
|
7792
|
+
const stripeLinkData = stripeStore.stripeLinkEventData;
|
|
7793
|
+
const stripeAddressData = stripeStore.stripeAddressEventData;
|
|
7794
|
+
const stripeBillingAddressData = stripeStore.stripeShippingSameAsBilling
|
|
7795
|
+
? stripeStore.stripeAddressEventData
|
|
7796
|
+
: stripeStore.stripeBillingAddressEventData;
|
|
7797
|
+
if (!(stripeAddressData === null || stripeAddressData === void 0 ? void 0 : stripeAddressData.complete) || !(stripeBillingAddressData === null || stripeBillingAddressData === void 0 ? void 0 : stripeBillingAddressData.complete)) {
|
|
7798
|
+
throw new Error('Missing stripe address data');
|
|
7799
|
+
}
|
|
7800
|
+
// Attempt to get translated address if available
|
|
7801
|
+
const translatedShippingAddress = getTranslatedAddress({
|
|
7802
|
+
currentAddress: stripeAddressData,
|
|
7803
|
+
translatedAddress: stripeStore.translatedAddress.address,
|
|
7804
|
+
});
|
|
7805
|
+
const shippingFirstName = translatedShippingAddress.name.split(' ')[0] || '';
|
|
7806
|
+
const shippingLastName = translatedShippingAddress.name.split(' ').splice(1).join(' ') || '';
|
|
7807
|
+
const translatedBillingAddress = getTranslatedAddress({
|
|
7808
|
+
currentAddress: stripeBillingAddressData,
|
|
7809
|
+
translatedAddress: stripeStore.translatedAddress.address,
|
|
7810
|
+
});
|
|
7811
|
+
const billingFirstName = translatedBillingAddress.name.split(' ')[0] || '';
|
|
7812
|
+
const billingLastName = translatedBillingAddress.name.split(' ').splice(1).join(' ') || '';
|
|
7813
|
+
return {
|
|
7814
|
+
billingAddress: {
|
|
7815
|
+
addressLine1: translatedBillingAddress.line1,
|
|
7816
|
+
addressLine2: translatedBillingAddress.line2 || '',
|
|
7817
|
+
city: translatedBillingAddress.city,
|
|
7818
|
+
country: translatedBillingAddress.country,
|
|
7819
|
+
postalCode: translatedBillingAddress.postal_code,
|
|
7820
|
+
state: translatedBillingAddress.state,
|
|
7821
|
+
},
|
|
7822
|
+
billingContact: {
|
|
7823
|
+
// firstName and lastName should be valid now since stripe only mark
|
|
7824
|
+
// the address as complete when both fields are filled.
|
|
7825
|
+
firstName: billingFirstName,
|
|
7826
|
+
lastName: billingLastName,
|
|
7827
|
+
phone: translatedBillingAddress.phone,
|
|
7828
|
+
},
|
|
7829
|
+
// Use the first item's currency code
|
|
7830
|
+
cartCurrencyCode: (_a = cartStore.items[0]) === null || _a === void 0 ? void 0 : _a.currencyCode,
|
|
7831
|
+
cartId,
|
|
7832
|
+
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
7833
|
+
contact: {
|
|
7834
|
+
email: stripeLinkData === null || stripeLinkData === void 0 ? void 0 : stripeLinkData.value.email,
|
|
7835
|
+
// firstName and lastName should be valid now since stripe only mark
|
|
7836
|
+
// the address as complete when both fields are filled.
|
|
7837
|
+
firstName: shippingFirstName,
|
|
7838
|
+
lastName: shippingLastName,
|
|
7839
|
+
phone: translatedShippingAddress.phone,
|
|
7840
|
+
},
|
|
7841
|
+
shippingAddress: {
|
|
7842
|
+
addressLine1: translatedShippingAddress.line1,
|
|
7843
|
+
addressLine2: translatedShippingAddress.line2,
|
|
7844
|
+
city: translatedShippingAddress.city,
|
|
7845
|
+
country: translatedShippingAddress.country,
|
|
7846
|
+
postalCode: translatedShippingAddress.postal_code,
|
|
7847
|
+
state: translatedShippingAddress.state,
|
|
7848
|
+
},
|
|
7849
|
+
};
|
|
7850
|
+
};
|
|
8041
7851
|
const prepCalculateLandedCost = () => {
|
|
8042
7852
|
// maybe we don't need email now for prefetch the landed cost
|
|
8043
7853
|
const stripeLinkData = stripeStore.stripeLinkEventData;
|
|
@@ -8107,7 +7917,7 @@ const triggerBuildLandedCost = async (buildLandedCost) => {
|
|
|
8107
7917
|
checkoutSessionId: data.checkoutSessionId,
|
|
8108
7918
|
contact: data.contact,
|
|
8109
7919
|
shippingAddress: data.shippingAddress,
|
|
8110
|
-
zonosApiRoute:
|
|
7920
|
+
zonosApiRoute: fallbackApiList['vercel'],
|
|
8111
7921
|
});
|
|
8112
7922
|
if (!landedCost || ((_a = landedCost.errors) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
8113
7923
|
throw new Error(`Failed to build landed cost: ${((_c = (_b = landedCost === null || landedCost === void 0 ? void 0 : landedCost.errors) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.message) || 'Unknown error'}`);
|
|
@@ -8150,6 +7960,50 @@ const calculateLandedCost = async (abortController) => {
|
|
|
8150
7960
|
return json;
|
|
8151
7961
|
};
|
|
8152
7962
|
|
|
7963
|
+
const cartCalculateLandedCost = async ({ abortController, cartId, }) => {
|
|
7964
|
+
var _a;
|
|
7965
|
+
// request to get landed cost info
|
|
7966
|
+
const { errors, json } = await handleFetch('/api/zonos-elements/cart-calculate-landed-cost', {
|
|
7967
|
+
body: prepCartCalculateLandedCost(cartId),
|
|
7968
|
+
method: 'POST',
|
|
7969
|
+
signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal,
|
|
7970
|
+
});
|
|
7971
|
+
if (errors.length || !json) {
|
|
7972
|
+
const isAbortedRequest = ((_a = errors[0]) === null || _a === void 0 ? void 0 : _a.message) === 'The user aborted a request.';
|
|
7973
|
+
const errorMessage = isAbortedRequest
|
|
7974
|
+
? 'The landed cost calculation request was aborted to initiate a new one.'
|
|
7975
|
+
: 'Failed to calculate landed cost';
|
|
7976
|
+
throw new Error(errorMessage);
|
|
7977
|
+
}
|
|
7978
|
+
return json;
|
|
7979
|
+
};
|
|
7980
|
+
|
|
7981
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
7982
|
+
var t = {};
|
|
7983
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
7984
|
+
t[p] = s[p];
|
|
7985
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7986
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7987
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
7988
|
+
t[p[i]] = s[p[i]];
|
|
7989
|
+
}
|
|
7990
|
+
return t;
|
|
7991
|
+
};
|
|
7992
|
+
const calculateLandedCostNormalized = async (abortController) => {
|
|
7993
|
+
const cartId = window.Zonos.cartId;
|
|
7994
|
+
// Calculate landed cost as usual if no cartId is available
|
|
7995
|
+
if (!cartId) {
|
|
7996
|
+
const landedCostResult = await calculateLandedCost(abortController);
|
|
7997
|
+
return landedCostResult;
|
|
7998
|
+
}
|
|
7999
|
+
// Calculate landed cost using cartId
|
|
8000
|
+
const _a = await cartCalculateLandedCost({
|
|
8001
|
+
abortController,
|
|
8002
|
+
cartId,
|
|
8003
|
+
}), { cartWorkflow } = _a, rest = __rest(_a, ["cartWorkflow"]);
|
|
8004
|
+
return Object.assign(Object.assign({}, rest), { itemCreateWorkflow: cartWorkflow.items });
|
|
8005
|
+
};
|
|
8006
|
+
|
|
8153
8007
|
/**
|
|
8154
8008
|
* This function generates an object that contains the fields of an address that have invalid characters.
|
|
8155
8009
|
*
|
|
@@ -8490,13 +8344,13 @@ const stripeStorePrefetchLandedCost = async () => {
|
|
|
8490
8344
|
stripeStore.fetchingLandedCostAbordController = abortController;
|
|
8491
8345
|
// Reset cart items to non-restricted state and restricted item list
|
|
8492
8346
|
cartStoreResetCartItems();
|
|
8493
|
-
const { checkoutSessionWorkflow, itemCreateWorkflow, landedCostCalculateWorkflow, shipmentRatingCalculateWorkflow, } = await
|
|
8347
|
+
const { checkoutSessionWorkflow, itemCreateWorkflow, landedCostCalculateWorkflow, shipmentRatingCalculateWorkflow, } = await calculateLandedCostNormalized(abortController);
|
|
8494
8348
|
// reset abort controller after we are done
|
|
8495
8349
|
stripeStore.fetchingLandedCostAbordController = null;
|
|
8496
8350
|
// update cart store with landed cost info
|
|
8497
8351
|
cartStore.landedCostData =
|
|
8498
8352
|
(checkoutSessionWorkflow === null || checkoutSessionWorkflow === void 0 ? void 0 : checkoutSessionWorkflow.map(checkoutSession => {
|
|
8499
|
-
const foundLandedCost = landedCostCalculateWorkflow === null || landedCostCalculateWorkflow === void 0 ? void 0 : landedCostCalculateWorkflow.find(item =>
|
|
8353
|
+
const foundLandedCost = landedCostCalculateWorkflow === null || landedCostCalculateWorkflow === void 0 ? void 0 : landedCostCalculateWorkflow.find(item => (item === null || item === void 0 ? void 0 : item.id) === checkoutSession.landedCostId);
|
|
8500
8354
|
if (!foundLandedCost) {
|
|
8501
8355
|
return null;
|
|
8502
8356
|
}
|
|
@@ -8514,6 +8368,7 @@ const stripeStorePrefetchLandedCost = async () => {
|
|
|
8514
8368
|
if (subtotals) {
|
|
8515
8369
|
// prefetch landed cost will not update shipping and taxes since we haven't selected shipping method yet
|
|
8516
8370
|
cartStoreApplySubtotals({
|
|
8371
|
+
adjustments: subtotals.adjustments,
|
|
8517
8372
|
exchangeRate: subtotals.exchangeRate,
|
|
8518
8373
|
items: subtotals.items,
|
|
8519
8374
|
landedCostTotal: 0,
|
|
@@ -8654,6 +8509,8 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
8654
8509
|
stripeStore.isFetchingSession = true;
|
|
8655
8510
|
const { errors, json } = await handleFetch('/api/zonos-elements/create-checkout-session', {
|
|
8656
8511
|
body: {
|
|
8512
|
+
adjustmentAmount: cartStore.adjustments.reduce((prev, adj) => prev + adj.amount, 0),
|
|
8513
|
+
cartId: window.Zonos.cartId,
|
|
8657
8514
|
currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
|
|
8658
8515
|
itemsAmount: total,
|
|
8659
8516
|
metadata: [{ key: 'language', value: localizationStore.selectedLocale }],
|
|
@@ -8678,11 +8535,13 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
8678
8535
|
/**
|
|
8679
8536
|
* Update checkout session. Use for updating amount with landed cost id, or update session when cart items change
|
|
8680
8537
|
*/
|
|
8681
|
-
const stripeStoreUpdateCheckoutSession = async ({ currency, id, itemsAmount, landedCostId, presentmentCountryCode, }) => {
|
|
8538
|
+
const stripeStoreUpdateCheckoutSession = async ({ adjustmentAmount, cartId, currency, id, itemsAmount, landedCostId, presentmentCountryCode, }) => {
|
|
8682
8539
|
// No need to set loading state here because this function will be called under the hood to update
|
|
8683
8540
|
// landed cost id for the section.
|
|
8684
8541
|
const { errors, json } = await handleFetch('/api/zonos-elements/update-checkout-session', {
|
|
8685
8542
|
body: {
|
|
8543
|
+
adjustmentAmount,
|
|
8544
|
+
cartId,
|
|
8686
8545
|
currency,
|
|
8687
8546
|
id,
|
|
8688
8547
|
itemsAmount,
|
|
@@ -8843,6 +8702,8 @@ const getDaysDifference = (targetDate) => {
|
|
|
8843
8702
|
};
|
|
8844
8703
|
|
|
8845
8704
|
const { onChange, reset, state: cartStore, } = createStore(() => ({
|
|
8705
|
+
adjustmentTotal: 0,
|
|
8706
|
+
adjustments: [],
|
|
8846
8707
|
checkoutSessionId: sessionStorage.getItem('zonos--checkout-session-id') || null,
|
|
8847
8708
|
checkoutSessionTimeoutShow: false,
|
|
8848
8709
|
checkoutTimeoutInterval: null,
|
|
@@ -8963,6 +8824,7 @@ const cartStoreUpdateToErrorState = ({ messages, title, }) => {
|
|
|
8963
8824
|
const cartStoreApplySubtotals = (subtotals) => {
|
|
8964
8825
|
// update exchange rate so we can use it to display cart items
|
|
8965
8826
|
cartStore.exchangeRate = subtotals.exchangeRate;
|
|
8827
|
+
cartStore.adjustmentTotal = subtotals.adjustments;
|
|
8966
8828
|
cartStore.dutiesTaxFees = subtotals.landedCostTotal;
|
|
8967
8829
|
cartStore.subtotal = subtotals.items;
|
|
8968
8830
|
cartStore.total = subtotals.total;
|
|
@@ -8978,7 +8840,7 @@ const cartStoreHasOneEligibleItem = () => {
|
|
|
8978
8840
|
// if there is no item restricted found => all items are restricted
|
|
8979
8841
|
return !!checkItems.find(item => !item.isRestricted);
|
|
8980
8842
|
};
|
|
8981
|
-
const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId, }) => {
|
|
8843
|
+
const cartStoreReCalculateTotal = async ({ adjustmentAmount, cartId, currency, itemsAmount, landedCostId, }) => {
|
|
8982
8844
|
if (landedCostId && cartStore.selectedLandedCost) {
|
|
8983
8845
|
// update cart total right away if we have landed cost id to avoid order total flickering
|
|
8984
8846
|
const subtotals = cartStore.selectedLandedCost.subtotals;
|
|
@@ -8991,6 +8853,8 @@ const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId,
|
|
|
8991
8853
|
return false;
|
|
8992
8854
|
}
|
|
8993
8855
|
const { errors, json } = await stripeStoreUpdateCheckoutSession({
|
|
8856
|
+
adjustmentAmount,
|
|
8857
|
+
cartId,
|
|
8994
8858
|
currency,
|
|
8995
8859
|
id: cartStore.checkoutSessionId,
|
|
8996
8860
|
itemsAmount,
|
|
@@ -9047,6 +8911,8 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption) =>
|
|
|
9047
8911
|
cartStore.isSelectedShippingGuarantee = isGuarantee;
|
|
9048
8912
|
// update session with selected landed cost
|
|
9049
8913
|
const updateCalulateStatus = await cartStoreReCalculateTotal({
|
|
8914
|
+
adjustmentAmount: cartStore.adjustmentTotal,
|
|
8915
|
+
cartId: window.Zonos.cartId,
|
|
9050
8916
|
landedCostId: (_e = selectedLandedCost.landedCost) === null || _e === void 0 ? void 0 : _e.id,
|
|
9051
8917
|
});
|
|
9052
8918
|
return updateCalulateStatus;
|
|
@@ -9086,13 +8952,16 @@ const cartStoreResetCartItems = () => {
|
|
|
9086
8952
|
cartStore.items = cartStore.items.map(item => (Object.assign(Object.assign({}, item), { isRestricted: false })));
|
|
9087
8953
|
cartStore.restrictedItems = [];
|
|
9088
8954
|
};
|
|
9089
|
-
const cartStoreUpdateItems = async (cartItems) => {
|
|
8955
|
+
const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
9090
8956
|
var _a;
|
|
8957
|
+
// Update adjustments and items
|
|
8958
|
+
cartStore.adjustments = adjustments;
|
|
9091
8959
|
cartStore.items = getCartItemToUse(cartItems);
|
|
9092
8960
|
const currency = (_a = cartItems.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode;
|
|
9093
8961
|
const total = cartItems.reduce((amt, item) => {
|
|
9094
8962
|
return amt + item.amount * item.quantity;
|
|
9095
8963
|
}, 0);
|
|
8964
|
+
const adjustmenTotal = adjustments.reduce((amt, adjustment) => amt + adjustment.amount, 0);
|
|
9096
8965
|
if (!currency || !total) {
|
|
9097
8966
|
// do nothing if we can't get currency or total
|
|
9098
8967
|
return;
|
|
@@ -9101,6 +8970,8 @@ const cartStoreUpdateItems = async (cartItems) => {
|
|
|
9101
8970
|
// set loading state here because this is first load checkout session when we already have checkout session id stored
|
|
9102
8971
|
stripeStore.isFetchingSession = true;
|
|
9103
8972
|
await cartStoreReCalculateTotal({
|
|
8973
|
+
adjustmentAmount: adjustmenTotal,
|
|
8974
|
+
cartId: window.Zonos.cartId,
|
|
9104
8975
|
currency: currency,
|
|
9105
8976
|
itemsAmount: total,
|
|
9106
8977
|
});
|
|
@@ -9138,4 +9009,4 @@ const cartStoreResetTabItems = () => {
|
|
|
9138
9009
|
cartStoreResetSelectedShippingOption();
|
|
9139
9010
|
};
|
|
9140
9011
|
|
|
9141
|
-
export {
|
|
9012
|
+
export { currencyDisplay as A, currencyConvertAndFormat as B, currencyConvert as C, currencyFormat as D, cartStoreHasOneEligibleItem as E, stripeStoreRetrievePayment as F, stripeStoreMessageBasedOnStatus as G, stripeStoreTranslateAddressToLatin as H, cartStoreUpdateSelectedShippingOption as I, cartStoreGetShippingTransitInfo as J, localizationStoreUpdateSelectedLocale as K, localizationStoreUpdateSelectedCountryCode as a, stripeStoreCleanupDomesticShippingSession as b, stripeStoreSaveDomesticShippingSession as c, cartStore as d, cartStoreUpdateItems as e, cartStoreReset as f, cartStoreResetTabItems as g, cartStoreClearCheckoutInterval as h, initStripeElements as i, stripeStore as j, stripeStoreInitCheckoutSession as k, localizationStore as l, cartStoreStartCheckoutInterval as m, cartStoreUpdateToErrorState as n, stripeStorePrefetchLandedCost as o, cartStoreNextStep as p, stripeStoreHandleInventoryCheck as q, stripeStoreConfirmPayment as r, stripeStoreGetDomesticShippingSession as s, translate as t, stripeStoreReset as u, localizationStoreOnUpdate as v, isValidSelector as w, initLocalizationStore as x, getZCountryUrlParam as y, setZCountryUrlParam as z };
|