@zonos/elements 1.5.1 → 1.5.3
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/_isBigCommerceNativeCheckout-3-xbKbAO.js +133 -0
- package/dist/cjs/{cart-CiXlehwQ.js → cart-C39TMSgB.js} +27 -13
- package/dist/cjs/{collect-Drr8fY-q.js → collect-lF9DenLk.js} +4 -4
- package/dist/cjs/{getMissingRequiredShippingFields-DI6qF1z3.js → getMissingRequiredShippingFields-svcnpumn.js} +1 -1
- package/dist/cjs/{handleFetch-DQLhurnE.js → handleFetch-DVfjFTYO.js} +181 -71
- package/dist/cjs/{hasInclusivePrice-84KS94yH.js → hasInclusivePrice-CEPf3_FG.js} +1 -1
- package/dist/cjs/index.cjs.js +158 -47
- package/dist/cjs/{invoice-5hVfSXpb.js → invoice-BD3pCr8P.js} +3 -3
- package/dist/cjs/{localization-B2mjW0Xa.js → localization-BhNVhLZs.js} +24 -48
- package/dist/cjs/{paypal-pd8Nz_R_.js → paypal-Bd1qmwiv.js} +4 -4
- package/dist/cjs/{placeTestOrder-DrI8rD9o.js → placeTestOrder-BMQRvX2q.js} +3 -3
- package/dist/cjs/{renderCheckoutCurrency-u5q8YdUb.js → renderCheckoutCurrency-DE2p8CT8.js} +2 -2
- package/dist/cjs/{shouldShowLanguageSelect-gBg4KeTQ.js → shouldShowLanguageSelect-NOVWOU53.js} +1 -1
- package/dist/cjs/{submitGtag-Rc-S3PnH.js → submitGtag-D4sB7w4z.js} +1 -1
- package/dist/cjs/{taxIdFields-BrIaPTcd.js → taxIdFields-BKbk2bhi.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-d0IKpwW8.js → updateCheckoutSessionAttributes-KxwcsKhM.js} +1 -1
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +6 -6
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card_5.cjs.entry.js +5 -5
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +18 -18
- package/dist/cjs/zonos-checkout.cjs.entry.js +48 -22
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +9 -9
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +65 -40
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +9 -9
- package/dist/cjs/zonos-invoice.cjs.entry.js +6 -6
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +8 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +14 -4
- package/dist/collection/components/main/mountCheckoutWithoutStripe.js +12 -0
- package/dist/collection/components/main/zonos-controller.js +26 -10
- package/dist/collection/components/store/checkout/cart.js +3 -2
- package/dist/collection/components/store/checkout/stripe.js +23 -10
- package/dist/collection/components/store/storageStore.js +7 -6
- package/dist/collection/components/utils/__tests__/helpers/blockStorage.js +24 -0
- package/dist/collection/components/utils/api/getExchangeRate.js +2 -1
- package/dist/collection/components/utils/checkout/isBigCommerceCheckoutBypassEnabled.js +2 -1
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +32 -12
- package/dist/collection/components/utils/handleFetch.js +19 -9
- package/dist/collection/components/utils/hello/countryOverrideStorage.js +17 -40
- package/dist/collection/components/utils/logging/installConstructorCapture.js +58 -0
- package/dist/collection/components/utils/logging/reportBlockedStorage.js +34 -0
- package/dist/collection/components/utils/logging/sendErrorLog.js +8 -1
- package/dist/collection/components/utils/logging/startZonosInit.js +35 -0
- package/dist/collection/components/utils/logging/thrownMessage.js +16 -0
- package/dist/collection/components/utils/safeStorage.js +39 -0
- package/dist/collection/scripts/_bigcommerceCheckoutPath.js +16 -0
- package/dist/collection/scripts/_detectBigCommerceHost.js +12 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +3 -2
- package/dist/collection/scripts/_isBigCommerceNativeCheckout.js +107 -0
- package/dist/collection/scripts/_loadStripe.js +15 -4
- package/dist/collection/scripts/_zonosBase.js +46 -33
- package/dist/collection/types/generated/graphql.frontend.types.js +0 -16
- package/dist/collection/types/generated/graphql.internal.types.js +215 -1
- package/dist/esm/_isBigCommerceNativeCheckout-Bb90IMVt.js +128 -0
- package/dist/esm/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +26 -14
- package/dist/esm/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +4 -4
- package/dist/esm/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +1 -1
- package/dist/esm/{handleFetch-D5GYDF-O.js → handleFetch-BFVO7oAR.js} +178 -72
- package/dist/esm/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm/index.js +158 -47
- package/dist/esm/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +3 -3
- package/dist/esm/{localization-DHM91diu.js → localization-B5CRzthT.js} +25 -49
- package/dist/esm/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +4 -4
- package/dist/esm/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +3 -3
- package/dist/esm/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +2 -2
- package/dist/esm/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
- package/dist/esm/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +6 -6
- package/dist/esm/zonos-address-display_2.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +4 -4
- package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
- package/dist/esm/zonos-card_5.entry.js +5 -5
- package/dist/esm/zonos-cart-items_12.entry.js +18 -18
- package/dist/esm/zonos-checkout.entry.js +48 -22
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +9 -9
- package/dist/esm/zonos-collect.entry.js +6 -6
- package/dist/esm/zonos-controller.entry.js +65 -40
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +3 -3
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
- package/dist/esm/zonos-invoice-finish_5.entry.js +9 -9
- package/dist/esm/zonos-invoice.entry.js +6 -6
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
- package/dist/esm-es5/_isBigCommerceNativeCheckout-Bb90IMVt.js +40 -0
- package/dist/esm-es5/{cart-DmJkjiDE.js → cart-b84n0nhi.js} +59 -59
- package/dist/esm-es5/{collect-BV5GTPmh.js → collect-B_AEVONL.js} +2 -2
- package/dist/esm-es5/{getMissingRequiredShippingFields-DljgpDZe.js → getMissingRequiredShippingFields-EY10c34-.js} +3 -3
- package/dist/esm-es5/handleFetch-BFVO7oAR.js +73 -0
- package/dist/esm-es5/{hasInclusivePrice-DhGXpH2D.js → hasInclusivePrice-DfEiyzw7.js} +1 -1
- package/dist/esm-es5/index.js +94 -65
- package/dist/esm-es5/{invoice-CO-iqlni.js → invoice-dQ0ONK5Q.js} +1 -1
- package/dist/esm-es5/{localization-DHM91diu.js → localization-B5CRzthT.js} +7 -10
- package/dist/esm-es5/{paypal-BfW5aLJw.js → paypal-CF_oM0B6.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-CyWUFhxD.js → placeTestOrder-BTpfyqPL.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-B31ZNkUv.js → renderCheckoutCurrency-CpeuDWx-.js} +5 -5
- package/dist/esm-es5/{shouldShowLanguageSelect-DwSfSHar.js → shouldShowLanguageSelect-CJinx9-m.js} +1 -1
- package/dist/esm-es5/{submitGtag-BEFrutel.js → submitGtag-C5xzFHjG.js} +1 -1
- package/dist/esm-es5/{taxIdFields-ByEYfsO5.js → taxIdFields-BCyXnc9O.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-B0bQH0uw.js → updateCheckoutSessionAttributes-C9bMKTjz.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2 -2
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +6 -6
- package/dist/esm-es5/zonos-cart-items_12.entry.js +127 -127
- package/dist/esm-es5/zonos-checkout.entry.js +22 -11
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +21 -12
- 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 +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +3 -3
- 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/scripts/index.d.ts +22 -0
- 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/main/mountCheckoutWithoutStripe.d.ts +8 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -1
- package/dist/types/components/utils/__tests__/helpers/blockStorage.d.ts +3 -0
- package/dist/types/components/utils/logging/installConstructorCapture.d.ts +20 -0
- package/dist/types/components/utils/logging/reportBlockedStorage.d.ts +16 -0
- package/dist/types/components/utils/logging/startZonosInit.d.ts +5 -0
- package/dist/types/components/utils/logging/thrownMessage.d.ts +1 -0
- package/dist/types/components/utils/safeStorage.d.ts +4 -0
- package/dist/types/scripts/_bigcommerceCheckoutPath.d.ts +12 -0
- package/dist/types/scripts/_detectBigCommerceHost.d.ts +5 -0
- package/dist/types/scripts/_isBigCommerceNativeCheckout.d.ts +21 -0
- package/dist/types/scripts/_zonosBase.d.ts +16 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +0 -22
- package/dist/types/types/generated/graphql.frontend.types.ts +0 -51
- package/dist/types/types/generated/graphql.internal.types.d.ts +270 -1
- package/dist/types/types/generated/graphql.internal.types.ts +341 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-8fa6cfff.entry.js → p-02faff47.entry.js} +1 -1
- package/dist/zonos-elements/{p-216a908d.system.entry.js → p-0c68cbbb.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-vTIygnHq.system.js → p-1OG3IJgY.system.js} +1 -1
- package/dist/zonos-elements/{p-960070d0.system.entry.js → p-1cd2d097.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-1e6db427.entry.js → p-255e411a.entry.js} +1 -1
- package/dist/zonos-elements/p-2c_UqKJL.system.js +7 -0
- package/dist/zonos-elements/{p-DprOoI2W.system.js → p-3AUMK-5E.system.js} +154 -154
- package/dist/zonos-elements/{p-d3345b2c.entry.js → p-3ee87d8b.entry.js} +1 -1
- package/dist/zonos-elements/{p-cccaad60.system.entry.js → p-42fa5694.system.entry.js} +10 -10
- package/dist/zonos-elements/p-49eaaab8.entry.js +1 -0
- package/dist/zonos-elements/{p-fda89981.system.entry.js → p-4ce4c49f.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-f3d9a380.system.entry.js → p-5622fc50.system.entry.js} +263 -252
- package/dist/zonos-elements/{p-5585db86.system.entry.js → p-59457fd9.system.entry.js} +73 -64
- package/dist/zonos-elements/{p-65817880.entry.js → p-66398133.entry.js} +1 -1
- package/dist/zonos-elements/{p-d8f375da.system.entry.js → p-674323ac.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-678b9214.entry.js → p-71d9a5b7.entry.js} +1 -1
- package/dist/zonos-elements/{p-189cc594.system.entry.js → p-81780f8f.system.entry.js} +2 -2
- package/dist/zonos-elements/{p-6e691736.entry.js → p-821b83a2.entry.js} +1 -1
- package/dist/zonos-elements/{p-1fda4aec.system.entry.js → p-877a82d2.system.entry.js} +94 -94
- package/dist/zonos-elements/p-8daec112.entry.js +1 -0
- package/dist/zonos-elements/{p-46a839d2.system.entry.js → p-93bc75fd.system.entry.js} +13 -13
- package/dist/zonos-elements/{p-2ca826b9.system.entry.js → p-976b3bf3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84e76348.entry.js → p-9a4947a5.entry.js} +1 -1
- package/dist/zonos-elements/p-9f7693bf.entry.js +1 -0
- package/dist/zonos-elements/p-BIJM2Kj-.js +1 -0
- package/dist/zonos-elements/p-BJFa5RwX.js +1 -0
- package/dist/zonos-elements/{p-6vSUiBfr.system.js → p-BOh4ifdL.system.js} +51 -54
- package/dist/zonos-elements/p-BZAX-HmS.js +1 -0
- package/dist/zonos-elements/p-Bb90IMVt.js +1 -0
- package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
- package/dist/zonos-elements/{p-CbhN65lj.system.js → p-BvoPE_nb.system.js} +1 -1
- package/dist/zonos-elements/{p-iAIzUA4k.js → p-C3E55OqH.js} +1 -1
- package/dist/zonos-elements/{p-CBUz18kA.system.js → p-C3gF3UV5.system.js} +23 -23
- package/dist/zonos-elements/{p-XoQH3S7Z.system.js → p-CD2ahEZn.system.js} +1 -1
- package/dist/zonos-elements/p-CEBBLbvF.js +1 -0
- package/dist/zonos-elements/{p-CGNVm52g.system.js → p-CEV0O_IQ.system.js} +5 -5
- package/dist/zonos-elements/{p-D1e9zNDA.js → p-CJmWr75U.js} +1 -1
- package/dist/zonos-elements/{p-DgUrB-1a.system.js → p-CZ-uYiCo.system.js} +1 -1
- package/dist/zonos-elements/p-Cn2xE-9t.system.js +256 -0
- package/dist/zonos-elements/p-CtvXi9wL.system.js +41 -0
- package/dist/zonos-elements/{p-BrQ8n8NS.system.js → p-Cw_Qnyow.system.js} +3 -3
- package/dist/zonos-elements/p-CzXNXgyI.js +1 -0
- package/dist/zonos-elements/p-D0DkOoAw.system.js +73 -0
- package/dist/zonos-elements/p-D9OPKqLg.js +1 -0
- package/dist/zonos-elements/{p-ojtNq-r5.system.js → p-DXlojp_Y.system.js} +1 -1
- package/dist/zonos-elements/{p-DpwmHU8R.js → p-Df62LRNs.js} +2 -2
- package/dist/zonos-elements/{p-CHKKvuiz.js → p-Lsqrpzc5.js} +1 -1
- package/dist/zonos-elements/{p-C9XLkmmb.system.js → p-YQFbWtjn.system.js} +1 -1
- package/dist/zonos-elements/p-a27f48e4.entry.js +1 -0
- package/dist/zonos-elements/{p-941a95a1.system.entry.js → p-a6bb296c.system.entry.js} +7 -7
- package/dist/zonos-elements/{p-2b63865a.system.entry.js → p-abb85879.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-12b24ebb.entry.js → p-b8653024.entry.js} +1 -1
- package/dist/zonos-elements/p-b9d7a3b6.entry.js +1 -0
- package/dist/zonos-elements/{p-f5f95990.system.entry.js → p-be067e12.system.entry.js} +15 -15
- package/dist/zonos-elements/p-bmrOH9oh.js +1 -0
- package/dist/zonos-elements/p-c185bc23.entry.js +1 -0
- package/dist/zonos-elements/{p-2d513aa3.entry.js → p-c6e78de2.entry.js} +1 -1
- package/dist/zonos-elements/{p-55813e9f.system.entry.js → p-ca97a1cd.system.entry.js} +3 -3
- package/dist/zonos-elements/{p-3e705c9b.entry.js → p-cbb96382.entry.js} +1 -1
- package/dist/zonos-elements/{p-53eac12f.system.entry.js → p-dbf4d156.system.entry.js} +14 -14
- package/dist/zonos-elements/{p-6410fa11.system.entry.js → p-df240119.system.entry.js} +16 -16
- package/dist/zonos-elements/{p-1cc42a98.system.entry.js → p-e16e4db6.system.entry.js} +17 -17
- package/dist/zonos-elements/{p-064d8829.system.entry.js → p-eb016dd8.system.entry.js} +20 -20
- package/dist/zonos-elements/{p-1199baef.system.entry.js → p-eb5c67a0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ef5344ea.entry.js → p-ed8a7a7f.entry.js} +1 -1
- package/dist/zonos-elements/{p-4917b74d.entry.js → p-ef932fda.entry.js} +1 -1
- package/dist/zonos-elements/{p-e7fdb2c9.entry.js → p-f792ba5f.entry.js} +1 -1
- package/dist/zonos-elements/{p-DiMEP3mh.js → p-fZcKMzE-.js} +1 -1
- package/dist/zonos-elements/{p-CMo3ZweU.js → p-fdritVtG.js} +1 -1
- package/dist/zonos-elements/p-fffe6376.entry.js +1 -0
- package/dist/zonos-elements/p-gEViRqvf.js +1 -0
- package/dist/zonos-elements/{p-Dtu_Japy.system.js → p-v8IEjQ2z.system.js} +39 -39
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +10 -10
- package/dist/esm-es5/handleFetch-D5GYDF-O.js +0 -60
- package/dist/zonos-elements/p-107f287b.entry.js +0 -1
- package/dist/zonos-elements/p-25eb99d4.entry.js +0 -1
- package/dist/zonos-elements/p-46b9f0cf.entry.js +0 -1
- package/dist/zonos-elements/p-636b71d4.entry.js +0 -1
- package/dist/zonos-elements/p-7dc7f328.entry.js +0 -1
- package/dist/zonos-elements/p-8f9d8795.entry.js +0 -1
- package/dist/zonos-elements/p-BMPYH-LT.js +0 -1
- package/dist/zonos-elements/p-C70h5mKA.js +0 -1
- package/dist/zonos-elements/p-CTiqplrr.js +0 -1
- package/dist/zonos-elements/p-Ch1w0Lr7.js +0 -1
- package/dist/zonos-elements/p-D1SmY_fZ.js +0 -1
- package/dist/zonos-elements/p-D6xXnsM_.js +0 -1
- package/dist/zonos-elements/p-DE4a-QD5.js +0 -1
- package/dist/zonos-elements/p-DQrMfUzi.system.js +0 -227
- package/dist/zonos-elements/p-DZdkJHK9.system.js +0 -7
- package/dist/zonos-elements/p-U33isUJG.js +0 -1
- package/dist/zonos-elements/p-ebe157b5.entry.js +0 -1
- package/dist/zonos-elements/p-zVLAvre1.system.js +0 -60
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o}from"./p-D9OPKqLg.js";const r="gkjqw123",v="Kq93wqw3",i=()=>{var i;return null===(i=o.inclusivePricingConfigurations)||void 0===i?void 0:i.some((o=>{var i,l;return"ENABLED"===(null===(i=o.configurations[r])||void 0===i?void 0:i.status)||"ENABLED"===(null===(l=o.configurations[v])||void 0===l?void 0:l.status)}))};export{r as D,v as T,i as h}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as t,a as s,g as i}from"./p-_lt63o7c.js";import{l as n}from"./p-D9OPKqLg.js";import{a as e}from"./p-CqB9AfBf.js";import{c as a}from"./p-BJHSB96f.js";import"./p-gEViRqvf.js";import"./p-BJmZPrZl.js";const h=class{constructor(t){o(this,t),this.countryCode=n.selectedCountryCode}render(){if(!this.el.shadowRoot||!this.countryCode)return null;const o=`https://assets.zonos.com/images/elements-flags/${this.countryCode}.svg`,i=e();return t(s,{class:"zonos--elements",style:this.size?{"--zonos--font-family":i,height:`${this.size}px`,width:`${this.size}px`}:{"--zonos--font-family":i}},t("div",{class:a(["flag-container"])},t("div",{class:"flag-icon",style:{backgroundImage:`url(${o})`}})))}get el(){return i(this)}};h.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";export{h as zonos_country_flag}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as s,a as e,d as t}from"./p-_lt63o7c.js";import{t as i,l as n}from"./p-
|
|
1
|
+
import{r as o,h as s,a as e,d as t}from"./p-_lt63o7c.js";import{t as i,l as n}from"./p-D9OPKqLg.js";import{i as a}from"./p-C04AWRC2.js";import{a as d}from"./p-CqB9AfBf.js";import{c as l}from"./p-BJHSB96f.js";import{g as r}from"./p-r-YGHhLa.js";import"./p-gEViRqvf.js";import"./p-BJmZPrZl.js";const h=class{constructor(s){o(this,s)}render(){var o,t;const{city:d,country:l,email:r,line1:h,line2:c,name:f,phone:m,postal_code:p,state:z}=this.currentAddress,g=(null===(o=n.allCountries)||void 0===o?void 0:o[l])||(null===(t=n.shippingZoneCountries)||void 0===t?void 0:t[l]),x=({bold:o,content:e})=>{const t=a(e)?"red-600":"gray-1000";return s("zonos-text",{textColor:t,type:o?"boldLabel":"body"},e)};return s(e,{class:"zonos--address-form zonos--elements"},s("div",{class:"zonos--title"},s("zonos-text",{textColor:"gray-700",type:"smallHeader"},i("shipping"===this.addressType?"Shipping":"Billing"))),s("div",{class:"zonos--address-group"},f&&s("div",{class:"zonos--address-line"},x({bold:!0,content:f})),r&&s("div",{class:"zonos--address-line"},x({content:r})),m&&s("div",{class:"zonos--address-line"},x({content:m})),h&&s("div",{class:"zonos--address-line"},x({content:h})),c&&s("div",{class:"zonos--address-line"},x({content:c})),s("div",{class:"zonos--address-line"},d&&x({content:d}),z&&x({content:z}),p&&x({content:p})),g&&s("div",{class:"zonos--address-line"},s("zonos-country-flag",{class:"zonos--country-flag",countryCode:g.code})," ",x({content:g.displayName}))))}};h.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--title{margin-bottom:12px}:host .zonos--address-group{display:-ms-flexbox;display:flex;gap:4px;-ms-flex-direction:column;flex-direction:column}:host .zonos--address-line{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .zonos--address-line zonos-text+zonos-text::before{content:", ";color:var(--zonos-elements-gray-1000);margin-right:4px}:host .zonos--country-flag{width:20px;height:14px;border-radius:2px;margin:1px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);margin-right:8px;z-index:10;justify-self:center}';const c=class{constructor(s){o(this,s),this.closeDialog=t(this,"closeDialog",3),this.open=!1,this.headerText="",this.width="460px",this.noHeader=!1,this.noBodyPadding=!1,this.noBorder=!1,this.noCloseButton=!1,this.noClickOutside=!1,this.mobile=!1,this.isLoading=!0,this.isMobile=!1,this.isMobileMode=()=>this.mobile||window.innerWidth<=768,this.closeButtonHandler=()=>{this.open&&this.closeDialog.emit()},this.clickOutsideDialogHandler=o=>{o.target!==o.currentTarget||this.noClickOutside||this.closeDialog.emit()}}handleWindowResize(){this.isMobile=this.isMobileMode()}handleKeyDown(o){"Escape"===o.key&&this.closeButtonHandler()}componentDidLoad(){this.isMobile=this.isMobileMode()}render(){const o=r({overrideBorderStyle:this.borderStyle});return s(e,{key:"73740b7d8c127367bbc2c621d036288920b3801d",class:l(["zonos--elements",this.open&&"open",this.isLoading&&"is-loading",this.noBorder&&"no-border",this.isMobile&&"mobile"]),style:{"--zonos--border-radius":o,"--zonos--font-family":d(),"--zonos--height":this.height||"initial","--zonos--min-height":this.minHeight||"500px","--zonos--width":this.width}},s("div",{key:"441c6b5c503a431909f52699ee60992609dea232",class:"zonos--backdrop"}),s("div",{key:"94fb4689581ae2d781cae264740bbf9dbd42deac",class:"zonos--dialog-layout",inert:!this.open,onClick:this.clickOutsideDialogHandler},s("div",{key:"ba788097f52ca80229d16ce910071b56647061f9",class:"zonos--dialog"},this.isLoading&&s("div",{key:"47bfe052272192a74aeed3a5ddbed802ae27bc16",class:"zonos--loading"},s("zonos-spinner",{key:"49168e9057d08233654abfa0ca36138d205ca283",size:30}),this.loadingTitle&&s("zonos-text",{key:"ed89b9b21e30b0e670b296306ed9b797f2baa75e",class:"zonos--loading-title",size:"l",weight:700},this.loadingTitle),this.loadingText&&s("zonos-text",{key:"7770dbdcf4e1fb630e0ed6c08dc4830edf00d1f0",class:"zonos--loading-text"},this.loadingText)),(this.headerText||!this.noCloseButton)&&s("div",{key:"c171e207af502ef02de35803c480d927edea3ce4",class:"zonos--header"},this.headerText&&s("h3",{key:"03999b1441d3a0dc983fed2e64680211f4a59793",class:"zonos--header-text"},this.headerText),!this.noCloseButton&&s("zonos-button",{key:"e2954d9326195df3029c0771481881e6485fae05",class:"zonos--close-button",icon:s("zonos-icon",{"aria-label":"Close dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:this.closeButtonHandler,title:"Close dialog",variant:"subtle"})),s("div",{key:"ba456d3747bd51ada021ed909a41e5768ceed4ab",class:l(["zonos--body",this.noBodyPadding&&"zonos--no-body-padding"])},s("slot",{key:"81e4de1e59970996607f7d0f2f2aef7937f82c43"})),s("slot",{key:"3fcd369711a347b9e2d2840fc708e928e17d5da1",name:"dialog-footer"}))))}static get assetsDirs(){return["assets"]}};c.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:4px;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--loading-text,:host .zonos--loading-title{max-width:100%;padding:0 32px;text-align:center}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";export{h as zonos_address_display,c as zonos_dialog}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
System.register(["./p-CIevpRv_.system.js","./p-
|
|
1
|
+
System.register(["./p-CIevpRv_.system.js","./p-BOh4ifdL.system.js","./p-DTgUqgwV.system.js","./p-D0DkOoAw.system.js","./p-BbgqQIHv.system.js"],(function(e){"use strict";var o,t,n,s,a,l,i,c;return{setters:[function(e){o=e.r;t=e.h;n=e.a},function(e){s=e.D;a=e.t;l=e.A;i=e.l},function(e){c=e.a},null,null],execute:function(){var r='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var d=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}"};var h=e("zonos_language_select",/** @class */function(){function e(e){var t=this;o(this,e);
|
|
2
2
|
/**
|
|
3
3
|
* Function to close the language select
|
|
4
4
|
* @default () => {}
|
|
5
5
|
*/this.handleOnClose=function(){};this.languageSelected=function(e){
|
|
6
6
|
// mutate the selected language code in store
|
|
7
|
-
void s(e);t.handleOnClose()}}e.prototype.render=function(){var e=this;var o=i.selectedLocale;return t(n,{key:"b557082e699209af33ab25715d5cb23fb8a20f56",class:"zonos--elements",style:{"--zonos--font-family":
|
|
7
|
+
void s(e);t.handleOnClose()}}e.prototype.render=function(){var e=this;var o=i.selectedLocale;return t(n,{key:"b557082e699209af33ab25715d5cb23fb8a20f56",class:"zonos--elements",style:{"--zonos--font-family":c()}},t("div",{key:"f5fa8a8163aa46589d67df8d7b69a9b60c7c3994",class:"zonos--language-select"},t("zonos-select-dialog-header",{key:"7ffc14b7fab4014352361424de6ea6e2fc8d7f6c",handleOnClose:function(){return e.handleOnClose()},label:a("Select a language")}),t("div",{key:"ab06dd27d199ef7223ce4421ab4d4e7a5816e402",class:"zonos--language-select-content"},l().map((function(n){return t("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(n.code)}},t("zonos-text",{textColor:"gray-800"},n.translatedLabel),n.code===o&&t("zonos-icon",{content:r,size:16}))})))))};return e}());h.style=d();var f='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var g=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}"};var u=e("zonos_select_dialog_header",/** @class */function(){function e(e){o(this,e);
|
|
8
8
|
/**
|
|
9
9
|
* Callback to do something on close
|
|
10
10
|
* @default () => {}
|
|
11
11
|
*/this.handleOnClose=function(){};
|
|
12
12
|
/**
|
|
13
13
|
* The label for the select dialog
|
|
14
|
-
*/this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"2c3fe65b8226875d1e543d87d622a2356c975bae",class:"zonos--elements",style:{"--zonos--font-family":
|
|
14
|
+
*/this.label=""}e.prototype.render=function(){var e=this;return t(n,{key:"2c3fe65b8226875d1e543d87d622a2356c975bae",class:"zonos--elements",style:{"--zonos--font-family":c()}},t("zonos-v-stack",{key:"7e065cce508376405350d8cf0b90437c5bbbd6e9",class:"zonos--select-dialog-header-wrapper",spacing:8},t("div",{key:"363ff8e4b18b50497b904af45bcf62ae374f90de",class:"zonos--select-dialog-header"},t("zonos-text",{key:"5b3833d7186579859d067c205ab3cb70bf01ed99",type:"boldLabel"},this.label),t("zonos-button",{key:"7dd27337e33c3d97544696a8d850204296474f5e",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close select dialog",content:f,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),t("slot",{key:"a5f6b16ecc6a1fb8c24bd783f0384d3506656f01"})))};return e}());u.style=g()}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,d as e,h as t,F as s,a as i}from"./p-_lt63o7c.js";import{l as n,t as l,j as a}from"./p-CTiqplrr.js";import{z as r}from"./p-CqB9AfBf.js";import{c as d}from"./p-BJHSB96f.js";import{f as h}from"./p-zRjRcLMp.js";import{h as c,T as m,D as g}from"./p-Ch1w0Lr7.js";import{g as u}from"./p-DAscqB23.js";import{e as f}from"./p-DMIgN_sT.js";import"./p-DE4a-QD5.js";import"./p-BJmZPrZl.js";import"./p-BxAHnL5J.js";const p=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`;var b='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';const x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=n.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isDomesticCountry=()=>{var o,e;const{selectedCountryCode:t}=n;return!!t&&!!(null===(e=null===(o=r.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===e?void 0:e.includes(t))},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(o),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const o=n.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return l("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?a({amount:o.dutyDeminimus}):null;return e?l("Spend up to [threshold] duty free.",{threshold:e}):l("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=n;if(this.isDomesticCountry())return null;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return l("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?a({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?l("Spend up to [threshold] tax free.",{threshold:e}):l("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${l("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:l("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${l("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:l("Learn more.")})}`]:[l("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:a({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${l("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:l("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${l("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:l("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${l("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:l("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${l("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${p({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:l("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=n.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:l("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:l("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:l("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:o,inclusivePriceMessage:e,taxDeMinimisMessage:i})=>{if(c()&&e)switch(e.inclusiveType){case"DUTIES_FEES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},e.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},e.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:b}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,e.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:b}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(n.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(n.countryLandedCost);default:return f.includes(n.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(n.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o,e;const{selectedCountryCode:s}=n,a=this.getAdditionalDutyTaxMessage(),c=null!==(o=this.animateFromLeftOverride)&&void 0!==o?o:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:g}=n,f=l("Welcome to [storeName]",{storeName:r.organizationName}),p=(null===(e=g.find((o=>"hello_default"===o.pageName)))||void 0===e?void 0:e.message)||l("Know about duties and taxes before you buy. Shop with confidence!"),b=h(p),v=this.getCurrentPageEnum(),z=g.filter((o=>o.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"4e9a8cb8064ba558d21a45675c3165621e44b1fa",class:"zonos--elements"},t("div",{key:"ab9428c38706dc0e908786a1d8965db4773bc9a4",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"8cb7b88b669c208f0cb46c1e2a3c6a2c953c4f15"},t("div",{key:"9f7cb8f8146479fa2e3cad74deec1eef039dd7fc",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"cdec0506fd5f4a8fd4ab152ed79946e0af4ae05e",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"d16e6a8caea049e7d253c9d25e86bb761af1b209",spacing:24},t("zonos-country-flag",{key:"b5f8a405697b45383e3f79787dd6c8dbc05b5c79",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"781c5dddeb71d07792727e31e9b18631792c49ea",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"43eb83b2f31824cee858edb805d7fc1d7ffe6043",type:"boldSubheader"},f),t("zonos-text",{key:"6d77de6b476ff69a8f397060f6b0cf351c116dee",innerHTML:b,textColor:"gray-800"})),t("zonos-v-stack",{key:"0bb7f48528f1890e13c12e739c93a8cd82456f7b",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),(x||w||C||!!(null==a?void 0:a.length))&&t("zonos-card",{key:"3c3b6e2b3bc79cc2d2771253df1b1e63078ab5eb",spacing:"12px"},t("zonos-v-stack",{key:"15c26e6682006159018d52fb608dfed31a6298b0",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==a?void 0:a.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"85b7a06c12465363e5c658603e197f65c9d8d64a",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"343554a61f2ce5b011ea7b896e52bec5c9c1a2fd"},t("zonos-country-select",{key:"9cea5cded20ca68c0e6ed4ca89df776acd08e1b1",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"6e6d43b3fb6961b0968355fc8cf5dd2ff7a54ca6"},t("zonos-language-select",{key:"42b784a64350f9816bf15906f73e009ac14052d9",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:[{isOpenHandler:0}]}}};x.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
|
|
1
|
+
import{r as o,d as e,h as t,F as s,a as i}from"./p-_lt63o7c.js";import{l as n,t as l,j as a}from"./p-D9OPKqLg.js";import{z as r}from"./p-CqB9AfBf.js";import{c as d}from"./p-BJHSB96f.js";import{f as h}from"./p-zRjRcLMp.js";import{h as c,T as m,D as g}from"./p-bmrOH9oh.js";import{g as u}from"./p-DAscqB23.js";import{e as f}from"./p-DMIgN_sT.js";import"./p-gEViRqvf.js";import"./p-BJmZPrZl.js";import"./p-BxAHnL5J.js";const b=({href:o,text:e})=>`<zonos-link href="${o}" target="_blank" rel="noopener noreferrer">${e}</zonos-link>`;var p='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M9.35028 11.5744C9.05738 11.2815 8.58251 11.2815 8.28962 11.5744C7.99672 11.8673 7.99672 12.3422 8.28962 12.635L11.2917 15.6372C11.6823 16.0277 12.3154 16.0277 12.7059 15.6372L15.708 12.6351C16.0009 12.3422 16.0009 11.8674 15.708 11.5745C15.4151 11.2816 14.9402 11.2816 14.6473 11.5745L12.7488 13.4729V4.68005C12.7488 4.26584 12.413 3.93005 11.9988 3.93005C11.5846 3.93005 11.2488 4.26584 11.2488 4.68005L11.2488 13.4729L9.35028 11.5744Z" fill="#4D505A"/>\n<path d="M20 14C20 13.5858 19.6642 13.25 19.25 13.25C18.8358 13.25 18.5 13.5858 18.5 14L18.5 17.25C18.5 17.9404 17.9404 18.5 17.25 18.5L6.75 18.5C6.05964 18.5 5.5 17.9404 5.5 17.25L5.5 14C5.5 13.5858 5.16421 13.25 4.75 13.25C4.33579 13.25 4 13.5858 4 14V17.25C4 18.7688 5.23122 20 6.75 20H17.25C18.7688 20 20 18.7688 20 17.25L20 14Z" fill="#4D505A"/>\n</svg>\n',v='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M4.04505 6.64123C2.19006 8.49622 2.19006 11.5038 4.04505 13.3587L11.2929 20.6066C11.6834 20.9971 12.3166 20.9971 12.7071 20.6066L19.955 13.3587C21.8099 11.5038 21.8099 8.49622 19.955 6.64123L17.8336 4.51991C17.4431 4.12939 16.8099 4.12939 16.4194 4.51991L13.5241 7.41527C12.5864 6.86157 11.4136 6.86157 10.4759 7.41527L7.58059 4.51991C7.19006 4.12939 6.5569 4.12939 6.16637 4.51991L4.04505 6.64123ZM5.10571 12.2981C3.83651 11.0289 3.83651 8.9711 5.10571 7.70189L6.87348 5.93413L9.70191 8.76255C10.1056 9.16622 10.6991 9.12 11.0641 8.82749C11.6091 8.39083 12.3909 8.39082 12.9359 8.82749C13.301 9.12 13.8944 9.16622 14.2981 8.76255L17.1265 5.93413L18.8943 7.70189C20.1635 8.9711 20.1635 11.0289 18.8943 12.2981L12 19.1924L5.10571 12.2981Z"\n fill="#0F1015" />\n <path\n d="M10.0333 3.28075C9.63566 3.39679 9.40739 3.8132 9.52343 4.21083C9.63947 4.60846 10.0559 4.83673 10.4535 4.72069C11.4618 4.42644 12.5383 4.42644 13.5466 4.72069C13.9442 4.83673 14.3606 4.60846 14.4766 4.21083C14.5927 3.81321 14.3644 3.39679 13.9668 3.28075C12.6841 2.90642 11.316 2.90642 10.0333 3.28075Z"\n fill="#0F1015" />\n</svg>',z='<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>\n</svg>\n';const x=class{constructor(i){o(this,i),this.closeDialog=e(this,"closeDialog",7),this.isOpen=!1,this.setIsOpen=()=>{},this.restrictedItems=[],this.welcomeMessage="Welcome to our Demo App!",this.showCountrySelect=!1,this.showLanguageSelect=!1,this.clickOutsideDialogHandler=o=>{!o.composedPath().includes(this.dialogRef)&&this.isOpen&&this.setIsOpen(!1)},this.getCurrentPageEnum=()=>{switch(r.currentHelloPage){case"home":return"hello_homepage";case"cart":return"hello_cart";case"productList":return"hello_item_list";case"productDetail":return"hello_item_details";default:return null}},this.setShowCountrySelect=async o=>{this.showCountrySelect=o},this.setShowLanguageSelect=async o=>{this.showLanguageSelect=o},this.hasTaxId=()=>{var o;return null===(o=n.countryLandedCost)||void 0===o?void 0:o.hasTaxId},this.isDomesticCountry=()=>{var o,e;const{selectedCountryCode:t}=n;return!!t&&!!(null===(e=null===(o=r.genericSettings)||void 0===o?void 0:o.domesticCountries)||void 0===e?void 0:e.includes(t))},this.isNoThresholdCountry=o=>!(!o||!this.hasTaxId())&&["AU","NZ","GB","NO","SG",...f].includes(o),this.getDutyMessage=()=>{if(this.isDomesticCountry())return null;const o=n.countryLandedCost;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return l("Duties will apply to all orders.");const e=(null==o?void 0:o.dutyDeminimus)?a({amount:o.dutyDeminimus}):null;return e?l("Spend up to [threshold] duty free.",{threshold:e}):l("Duties will apply to all orders.")},this.getTaxMessage=()=>{const{countryLandedCost:o}=n;if(this.isDomesticCountry())return null;if(!(null==o?void 0:o.allowLowValueOrders)&&"GB"===(null==o?void 0:o.countryCode))return l("Taxes will apply to all orders.");const e=(null==o?void 0:o.vatTaxDeminimus)?a({amount:o.vatTaxDeminimus}):null;return e&&!this.isNoThresholdCountry(null==o?void 0:o.countryCode)?l("Spend up to [threshold] tax free.",{threshold:e}):l("Taxes will apply to all orders.")},this.getEuDutyTaxMessage=o=>[`${l("Due to the IOSS tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:l("Learn more.")})}`],this.getUkDutyTaxMessage=o=>o.allowLowValueOrders?[`${l("Due to the UK tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/european-ioss",text:l("Learn more.")})}`]:[l("Orders to [countryName] must be over [threshold] to ship.",{countryName:"United Kingdom",threshold:a({amount:o.dutyDeminimus})})],this.getAustraliaDutyTaxMessage=o=>c()?[]:[`${l("Due to the Australia tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst",text:l("Learn more.")})}`],this.getNewZealandDutyTaxMessge=o=>c()?null:[`${l("Due to the New Zealand tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/new-zealand/new-zealand-import-taxes",text:l("Learn more.")})}`],this.getNorwayDutyTaxMessage=o=>c()?null:[`${l("Due to the VOEC tax law, all orders will be assessed at [percentage] VAT regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/guides/country-guides/norway-voec-scheme",text:l("Learn more.")})}`],this.getSingaporeDutyTaxMessage=o=>c()?null:[`${l("Due to the Singapore tax law, all orders will be assessed at [percentage] GST regardless of order total.",{percentage:100*o.vatTaxRate+"%"})} ${b({href:"https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/singapore-gst-settings",text:l("Learn more.")})}`],this.getInclusivePriceMessage=()=>{const o=n.inclusivePricingConfigurations,e=null==o?void 0:o.find(Boolean),t=null==e?void 0:e.configurations[m],s=null==e?void 0:e.configurations[g];return"DISABLED"===(null==t?void 0:t.status)&&"DISABLED"===(null==s?void 0:s.status)?null:"ENABLED"===(null==s?void 0:s.status)&&"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"DUTIES_TAXES_AND_FEES",message:l("Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.")}:"ENABLED"===(null==s?void 0:s.status)?{inclusiveType:"DUTIES_FEES",message:l("Product prices already include duties and fees. No additional duties or fees will be added at checkout.")}:"ENABLED"===(null==t?void 0:t.status)?{inclusiveType:"TAXES",message:l("Product prices already include taxes. No additional taxes will be added at checkout.")}:null},this.renderHelloMessage=({dutyDeMinimisMessage:o,inclusivePriceMessage:e,taxDeMinimisMessage:i})=>{if(c()&&e)switch(e.inclusiveType){case"DUTIES_FEES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Duty inclusive pricing message"},e.message)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)));case"TAXES":return t(s,null,e.message&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax inclusive pricing icon",content:v}),t("zonos-text",{"aria-label":"Tax inclusive pricing message"},e.message)),o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)));default:return t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis",content:v}),t("zonos-text",null,e.message))}return t(s,null,o&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Duty de minimis icon",content:p}),t("zonos-text",{"aria-label":"Duty de minimis message"},o)),i&&t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Tax de minimis icon",content:z}),t("zonos-text",{"aria-label":"Tax de minimis message"},i)))},this.getAdditionalDutyTaxMessage=()=>{if(!n.countryLandedCost)return null;if(this.isDomesticCountry())return null;if(!this.hasTaxId())return null;switch(n.countryLandedCost.countryCode){case"GB":return this.getUkDutyTaxMessage(n.countryLandedCost);case"AU":return this.getAustraliaDutyTaxMessage(n.countryLandedCost);case"NZ":return this.getNewZealandDutyTaxMessge(n.countryLandedCost);case"NO":return this.getNorwayDutyTaxMessage(n.countryLandedCost);case"SG":return this.getSingaporeDutyTaxMessage(n.countryLandedCost);default:return f.includes(n.countryLandedCost.countryCode)?this.getEuDutyTaxMessage(n.countryLandedCost):null}}}globalClickHandler(o){this.clickOutsideDialogHandler(o)}isOpenHandler(o){o||(this.setShowCountrySelect(!1),this.setShowLanguageSelect(!1))}render(){var o,e;const{selectedCountryCode:s}=n,a=this.getAdditionalDutyTaxMessage(),c=null!==(o=this.animateFromLeftOverride)&&void 0!==o?o:this.dialogRef&&u(this.dialogRef),m=this.dialogRef&&(()=>{const o=this.dialogRef.getBoundingClientRect();return o.top>=window.innerHeight-o.bottom})(),{customMessages:g}=n,f=l("Welcome to [storeName]",{storeName:r.organizationName}),b=(null===(e=g.find((o=>"hello_default"===o.pageName)))||void 0===e?void 0:e.message)||l("Know about duties and taxes before you buy. Shop with confidence!"),p=h(b),v=this.getCurrentPageEnum(),z=g.filter((o=>o.pageName===v)),x=this.getDutyMessage(),w=this.getTaxMessage(),C=this.getInclusivePriceMessage();return t(i,{key:"4e9a8cb8064ba558d21a45675c3165621e44b1fa",class:"zonos--elements"},t("div",{key:"ab9428c38706dc0e908786a1d8965db4773bc9a4",class:d(["zonos--hello-dialog",c&&"zonos--hello-dialog-animate-from-left",m&&"zonos--hello-dialog-animate-from-bottom",!!this.mobileLocationOverride&&"zonos--hello-dialog-mobile-override",this.isOpen&&"zonos--hello-dialog-open"]),inert:!this.isOpen,ref:o=>o&&(this.dialogRef=o)},!this.showCountrySelect&&!this.showLanguageSelect&&t("div",{key:"8cb7b88b669c208f0cb46c1e2a3c6a2c953c4f15"},t("div",{key:"9f7cb8f8146479fa2e3cad74deec1eef039dd7fc",class:"zonos--hello-dialog-content"},t("zonos-button",{key:"cdec0506fd5f4a8fd4ab152ed79946e0af4ae05e",class:"zonos--close-button",icon:t("zonos-icon",{"aria-label":"Close Zonos Hello dialog",content:'<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>'}),noBackground:!0,onClick:()=>this.setIsOpen(!1)}),t("zonos-v-stack",{key:"d16e6a8caea049e7d253c9d25e86bb761af1b209",spacing:24},t("zonos-country-flag",{key:"b5f8a405697b45383e3f79787dd6c8dbc05b5c79",class:"zonos--hello-country-flag",countryCode:s}),t("zonos-v-stack",{key:"781c5dddeb71d07792727e31e9b18631792c49ea",class:"zonos--hello-dialog-header",spacing:4},t("zonos-text",{key:"43eb83b2f31824cee858edb805d7fc1d7ffe6043",type:"boldSubheader"},f),t("zonos-text",{key:"6d77de6b476ff69a8f397060f6b0cf351c116dee",innerHTML:p,textColor:"gray-800"})),t("zonos-v-stack",{key:"0bb7f48528f1890e13c12e739c93a8cd82456f7b",spacing:8},this.restrictedItems.map((o=>{var e;return o&&t("zonos-banner",{bannerTitle:o.name,intent:"error"},null===(e=o.itemRestrictions)||void 0===e?void 0:e.map((o=>t("zonos-text",{textColor:"red-800"},null==o?void 0:o.note))))})),(x||w||C||!!(null==a?void 0:a.length))&&t("zonos-card",{key:"3c3b6e2b3bc79cc2d2771253df1b1e63078ab5eb",spacing:"12px"},t("zonos-v-stack",{key:"15c26e6682006159018d52fb608dfed31a6298b0",spacing:12},this.renderHelloMessage({dutyDeMinimisMessage:x,inclusivePriceMessage:C,taxDeMinimisMessage:w}),null==a?void 0:a.map((o=>t("div",{class:"zonos--flex-message"},t("zonos-icon",{"aria-label":"Additional information for buying goods from selected country icon",content:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>\n</svg>\n'}),t("zonos-text",{"aria-label":"Additional information for buying goods from selected country message",innerHTML:o})))))),z.map((o=>t("zonos-custom-message",{icon:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n',message:o.message})))))),t("zonos-hello-dialog-footer",{key:"85b7a06c12465363e5c658603e197f65c9d8d64a",appearanceSettings:this.appearanceSettings,setShowCountrySelect:o=>this.setShowCountrySelect(o),setShowLanguageSelect:o=>this.setShowLanguageSelect(o)})),this.showCountrySelect&&t("div",{key:"343554a61f2ce5b011ea7b896e52bec5c9c1a2fd"},t("zonos-country-select",{key:"9cea5cded20ca68c0e6ed4ca89df776acd08e1b1",handleOnClose:()=>this.setShowCountrySelect(!1)})),this.showLanguageSelect&&t("div",{key:"6e6d43b3fb6961b0968355fc8cf5dd2ff7a54ca6"},t("zonos-language-select",{key:"42b784a64350f9816bf15906f73e009ac14052d9",handleOnClose:()=>this.setShowLanguageSelect(!1)}))))}static get assetsDirs(){return["assets"]}static get watchers(){return{isOpen:[{isOpenHandler:0}]}}};x.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--zonos-elements-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--zonos-elements-radius-12);outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:2147483647}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom{-webkit-transform-origin:bottom right;transform-origin:bottom right;bottom:0;top:unset}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-bottom.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom left;transform-origin:bottom left}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:8px;top:8px;width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--zonos-elements-hover-color);border-radius:var(--zonos-elements-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:16px}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:12px}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}@media (max-height: 600px){:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{max-height:80vh}}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:500px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}}@media (max-width: 768px) and (max-height: 600px){:host .zonos--hello-dialog{max-height:80vh}}@media (max-width: 768px){:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";export{x as zonos_hello_dialog}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(o,n,e,i){function s(o){return o instanceof e?o:new e((function(n){n(o)}))}return new(e||(e=Promise))((function(e,t){function c(o){try{a(i.next(o))}catch(o){t(o)}}function r(o){try{a(i["throw"](o))}catch(o){t(o)}}function a(o){o.done?e(o.value):s(o.value).then(c,r)}a((i=i.apply(o,n||[])).next())}))};var __generator=this&&this.__generator||function(o,n){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},i,s,t,c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=r(0),c["throw"]=r(1),c["return"]=r(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function r(o){return function(n){return a([o,n])}}function a(r){if(i)throw new TypeError("Generator is already executing.");while(c&&(c=0,r[0]&&(e=0)),e)try{if(i=1,s&&(t=r[0]&2?s["return"]:r[0]?s["throw"]||((t=s["return"])&&t.call(s),0):s.next)&&!(t=t.call(s,r[1])).done)return t;if(s=0,t)r=[r[0]&2,t.value];switch(r[0]){case 0:case 1:t=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(t=e.trys,t=t.length>0&&t[t.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!t||r[1]>t[0]&&r[1]<t[3])){e.label=r[1];break}if(r[0]===6&&e.label<t[1]){e.label=t[1];t=r;break}if(t&&e.label<t[2]){e.label=t[2];e.ops.push(r);break}if(t[2])e.ops.pop();e.trys.pop();continue}r=n.call(o,e)}catch(o){r=[6,o];s=0}finally{i=t=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-DprOoI2W.system.js","./p-CbhN65lj.system.js","./p-Dtu_Japy.system.js","./p-6vSUiBfr.system.js","./p-DTgUqgwV.system.js","./p-BDopxBpR.system.js","./p-zVLAvre1.system.js","./p-CLDnjFm5.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js","./p-CzKlS3E-.system.js","./p-DsBuZ6ob.system.js","./p-DW-fW8yR.system.js","./p-zsTASoh2.system.js","./p-B3GRrRtL.system.js","./p-ojtNq-r5.system.js"],(function(o){"use strict";var n,e,i,s,t,c,r,a,l,v,z,d,h,u,f,m,p,g,b,w,x,y,k,_,C,I,j,S,O,T,D,L,E,U,N,P,A,B,R;return{setters:[function(o){n=o.r;e=o.h;i=o.a;s=o.F},function(o){t=o.b;c=o.i;r=o.c;a=o.d;l=o.r;v=o.e;z=o.k;d=o.l;h=o.z;u=o.E;f=o.J;m=o.H;p=o.f},function(o){g=o.i;b=o.a;w=o.b;x=o.c},function(o){y=o.p;k=o.a},function(o){_=o.s;C=o.t;I=o.h;j=o.j;S=o.k;O=o.l},function(o){T=o.z},function(o){D=o.b},function(o){L=o.h;E=o.s;U=o.l;N=o.g},function(o){P=o.i;A=o.a},function(o){B=o.c},function(o){R=o.l},null,null,null,null,null,null],execute:function(){var V='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var F=function(){return".sc-zonos-invoice-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-h *.sc-zonos-invoice{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-h img.sc-zonos-invoice{max-width:100%}.sc-zonos-invoice-h dl.sc-zonos-invoice,.sc-zonos-invoice-h dd.sc-zonos-invoice,.sc-zonos-invoice-h h1.sc-zonos-invoice,.sc-zonos-invoice-h h2.sc-zonos-invoice,.sc-zonos-invoice-h h3.sc-zonos-invoice,.sc-zonos-invoice-h h4.sc-zonos-invoice,.sc-zonos-invoice-h h5.sc-zonos-invoice,.sc-zonos-invoice-h h6.sc-zonos-invoice,.sc-zonos-invoice-h hr.sc-zonos-invoice,.sc-zonos-invoice-h figure.sc-zonos-invoice,.sc-zonos-invoice-h p.sc-zonos-invoice,.sc-zonos-invoice-h pre.sc-zonos-invoice{margin:0}.sc-zonos-invoice-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h *.sc-zonos-invoice{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar{width:10px}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--header.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--logo.sc-zonos-invoice{margin-bottom:0}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice zonos-checkout-finish.sc-zonos-invoice{-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{padding:0 8px 8px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--payment-error-banner.sc-zonos-invoice{margin-top:24px}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice .zonos--order-details-container.sc-zonos-invoice{overflow:auto}.sc-zonos-invoice-h .zonos--wrapper.sc-zonos-invoice{overflow:auto;max-height:100%;position:relative}.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice>*.sc-zonos-invoice{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-invoice-h .zonos--header-right.sc-zonos-invoice{display:none}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice img.sc-zonos-invoice{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-invoice-h .zonos--invoice-container.sc-zonos-invoice{overflow:visible}.mobile.sc-zonos-invoice-h,.tablet.sc-zonos-invoice-h{min-width:auto}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding-bottom:0}}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice{margin-bottom:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice{margin-top:8px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{max-height:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:auto}.mobile.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice{margin:0}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px;padding:0 16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{overflow:visible;width:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{gap:32px}.mobile.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{margin-top:0}.mobile.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:56px;top:-56px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--header-right.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:28px;top:-28px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar{width:10px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open.sc-zonos-invoice{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{-ms-scroll-chaining:chained;overscroll-behavior:auto}"};var q=o("zonos_invoice",/** @class */function(){function o(o){var e=this;n(this,o);this.storeUnsubscribeList=[];
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(o,n,e,i){function s(o){return o instanceof e?o:new e((function(n){n(o)}))}return new(e||(e=Promise))((function(e,t){function c(o){try{a(i.next(o))}catch(o){t(o)}}function r(o){try{a(i["throw"](o))}catch(o){t(o)}}function a(o){o.done?e(o.value):s(o.value).then(c,r)}a((i=i.apply(o,n||[])).next())}))};var __generator=this&&this.__generator||function(o,n){var e={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},i,s,t,c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=r(0),c["throw"]=r(1),c["return"]=r(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function r(o){return function(n){return a([o,n])}}function a(r){if(i)throw new TypeError("Generator is already executing.");while(c&&(c=0,r[0]&&(e=0)),e)try{if(i=1,s&&(t=r[0]&2?s["return"]:r[0]?s["throw"]||((t=s["return"])&&t.call(s),0):s.next)&&!(t=t.call(s,r[1])).done)return t;if(s=0,t)r=[r[0]&2,t.value];switch(r[0]){case 0:case 1:t=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;s=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(t=e.trys,t=t.length>0&&t[t.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!t||r[1]>t[0]&&r[1]<t[3])){e.label=r[1];break}if(r[0]===6&&e.label<t[1]){e.label=t[1];t=r;break}if(t&&e.label<t[2]){e.label=t[2];e.ops.push(r);break}if(t[2])e.ops.pop();e.trys.pop();continue}r=n.call(o,e)}catch(o){r=[6,o];s=0}finally{i=t=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-CIevpRv_.system.js","./p-3AUMK-5E.system.js","./p-BvoPE_nb.system.js","./p-v8IEjQ2z.system.js","./p-BOh4ifdL.system.js","./p-DTgUqgwV.system.js","./p-BDopxBpR.system.js","./p-D0DkOoAw.system.js","./p-CLDnjFm5.system.js","./p-C2j7R11h.system.js","./p-BbgqQIHv.system.js","./p-CzKlS3E-.system.js","./p-DsBuZ6ob.system.js","./p-DW-fW8yR.system.js","./p-zsTASoh2.system.js","./p-B3GRrRtL.system.js","./p-DXlojp_Y.system.js"],(function(o){"use strict";var n,e,i,s,t,c,r,a,l,v,z,d,h,u,f,m,p,g,b,w,x,y,k,_,C,I,j,S,O,E,T,D,L,U,P,A,B,N,R;return{setters:[function(o){n=o.r;e=o.h;i=o.a;s=o.F},function(o){t=o.e;c=o.i;r=o.f;a=o.h;l=o.w;v=o.j;z=o.n;d=o.o;h=o.B;u=o.G;f=o.L;m=o.J;p=o.k},function(o){g=o.i;b=o.a;w=o.b;x=o.c},function(o){y=o.p;k=o.a},function(o){_=o.s;C=o.t;I=o.h;j=o.j;S=o.k;O=o.l},function(o){E=o.z},function(o){T=o.b},function(o){D=o.h;L=o.s;U=o.l;P=o.g},function(o){A=o.i;B=o.a},function(o){N=o.c},function(o){R=o.l},null,null,null,null,null,null],execute:function(){var F='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var V=function(){return".sc-zonos-invoice-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-h *.sc-zonos-invoice{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-h img.sc-zonos-invoice{max-width:100%}.sc-zonos-invoice-h dl.sc-zonos-invoice,.sc-zonos-invoice-h dd.sc-zonos-invoice,.sc-zonos-invoice-h h1.sc-zonos-invoice,.sc-zonos-invoice-h h2.sc-zonos-invoice,.sc-zonos-invoice-h h3.sc-zonos-invoice,.sc-zonos-invoice-h h4.sc-zonos-invoice,.sc-zonos-invoice-h h5.sc-zonos-invoice,.sc-zonos-invoice-h h6.sc-zonos-invoice,.sc-zonos-invoice-h hr.sc-zonos-invoice,.sc-zonos-invoice-h figure.sc-zonos-invoice,.sc-zonos-invoice-h p.sc-zonos-invoice,.sc-zonos-invoice-h pre.sc-zonos-invoice{margin:0}.sc-zonos-invoice-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h *.sc-zonos-invoice{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar{width:10px}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--header.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--logo.sc-zonos-invoice{margin-bottom:0}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice zonos-checkout-finish.sc-zonos-invoice{-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{padding:0 8px 8px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--payment-error-banner.sc-zonos-invoice{margin-top:24px}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice .zonos--order-details-container.sc-zonos-invoice{overflow:auto}.sc-zonos-invoice-h .zonos--wrapper.sc-zonos-invoice{overflow:auto;max-height:100%;position:relative}.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice>*.sc-zonos-invoice{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-invoice-h .zonos--header-right.sc-zonos-invoice{display:none}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice img.sc-zonos-invoice{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-invoice-h .zonos--invoice-container.sc-zonos-invoice{overflow:visible}.mobile.sc-zonos-invoice-h,.tablet.sc-zonos-invoice-h{min-width:auto}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding-bottom:0}}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice{margin-bottom:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice{margin-top:8px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{max-height:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:auto}.mobile.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice{margin:0}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px;padding:0 16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{overflow:visible;width:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{gap:32px}.mobile.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{margin-top:0}.mobile.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:56px;top:-56px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--header-right.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:28px;top:-28px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar{width:10px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open.sc-zonos-invoice{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{-ms-scroll-chaining:chained;overscroll-behavior:auto}"};var H=o("zonos_invoice",/** @class */function(){function o(o){var e=this;n(this,o);this.storeUnsubscribeList=[];
|
|
2
2
|
/**
|
|
3
3
|
* Listener for locale change in localization store
|
|
4
4
|
*/this.onChangeLocaleListener=function(){};
|
|
@@ -41,9 +41,9 @@ this.isOverlayLoading=true;
|
|
|
41
41
|
*/this.clientSecret=t.clientSecret;
|
|
42
42
|
/**
|
|
43
43
|
* Client secret value of customer session (use to load saved payment method and render saved consent)
|
|
44
|
-
*/this.stripeCustomerSessionClientSecret=t.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=a.selectedLandedCost;if(!o){return null}var n=o.landedCost.amountSubtotals;if(!n){return null}var e=(n.discounts||0)+n.items+n.landedCostTotal+n.shipping;return{settlementAmount:e}};this.applyStripeTheme=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(n){switch(n.label){case 0:o=
|
|
44
|
+
*/this.stripeCustomerSessionClientSecret=t.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=a.selectedLandedCost;if(!o){return null}var n=o.landedCost.amountSubtotals;if(!n){return null}var e=(n.discounts||0)+n.items+n.landedCostTotal+n.shipping;return{settlementAmount:e}};this.applyStripeTheme=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(n){switch(n.label){case 0:o=E.appearance.theme;return[4/*yield*/,c({
|
|
45
45
|
// only override theme or theme from appearance if it's mobile
|
|
46
|
-
overrideTheme:this.isMobile?o:undefined,paypalEnabled:y()})];case 1:n.sent();return[2/*return*/]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(e,void 0,void 0,(function(){var n;return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,
|
|
46
|
+
overrideTheme:this.isMobile?o:undefined,paypalEnabled:y()})];case 1:n.sent();return[2/*return*/]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(e,void 0,void 0,(function(){var n;return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,D("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:n=e.sent().json;return[2/*return*/,n]}}))}))};
|
|
47
47
|
/**
|
|
48
48
|
* Check if stripe payment intent is succeeded or in a good state to move forward
|
|
49
49
|
*/this.checkStripePaymentIntentStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o,n,e,i,s,c,a,l,v,z;return __generator(this,(function(d){switch(d.label){case 0:n=!!window.Zonos.cartData;e=new URL(window.location.href).searchParams;i=e.get("payment_intent_client_secret");s=e.get("zonosCheckoutSessionId");R("Payment intent exist, checking stripe payment intent status");
|
|
@@ -51,26 +51,26 @@ overrideTheme:this.isMobile?o:undefined,paypalEnabled:y()})];case 1:n.sent();ret
|
|
|
51
51
|
if(!i){R("No stripe client secret found in the URL, proceed to order if cart data is available");return[2/*return*/,{shouldAllowOrder:n}]}return[4/*yield*/,r({clientSecret:i})];case 1:c=d.sent(),a=c.error,l=c.status;v=new URLSearchParams(window.location.search).get("redirect_status");if(!(v&&s))return[3/*break*/,3];if(!a){R("Payment intent is succeeded or in a good state to move forward, show success screen")}else{R("Payment intent failed, show status from error")}return[4/*yield*/,this.fetchCheckoutSession(s)];case 2:z=d.sent();this.confirmationId=((o=z===null||z===void 0?void 0:z.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;_.checkoutSessionId=s;t.clientSecret=i;void this.setToFinishStep(l);return[2/*return*/,{shouldAllowOrder:false}];case 3:if(!n){R("Cart data is not available, only check payment intent status, skip order.");return[2/*return*/,{shouldAllowOrder:false}]}R("Payment intent is not succeeded, proceed to order");return[2/*return*/,{shouldAllowOrder:true}]}}))}))}}
|
|
52
52
|
/**
|
|
53
53
|
* Listen to resize event to update the isMobile state
|
|
54
|
-
*/o.prototype.resizeListener=function(){this.isMobile=
|
|
54
|
+
*/o.prototype.resizeListener=function(){this.isMobile=A(this.mobile);this.isTablet=B(this.tablet)};
|
|
55
55
|
/**
|
|
56
56
|
* For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
|
|
57
|
-
*/o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){t.stripe=window.Zonos.stripe;a.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2/*return*/]}))}))};o.prototype.initInvoiceCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,n,e,i,s,t,c,h,u,f,m,p,w,x,y,k,I,j,S,O,
|
|
57
|
+
*/o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){t.stripe=window.Zonos.stripe;a.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2/*return*/]}))}))};o.prototype.initInvoiceCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,n,e,i,s,t,c,h,u,f,m,p,w,x,y,k,I,j,S,O,D,P,A;return __generator(this,(function(B){switch(B.label){case 0:
|
|
58
58
|
// Should not happen since we will throw error way earlier if cartData is not available
|
|
59
|
-
if(!window.Zonos.cartData){return[2/*return*/]}p=(n=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||n===void 0?void 0:n.currencyCode;if(p){a.currency=p}w=(i=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.references)===null||i===void 0?void 0:i.checkoutSessionId;x=(t=(s=window.Zonos.cartData)===null||s===void 0?void 0:s.references)===null||t===void 0?void 0:t.landedCostId;if(!x){l({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:
|
|
59
|
+
if(!window.Zonos.cartData){return[2/*return*/]}p=(n=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||n===void 0?void 0:n.currencyCode;if(p){a.currency=p}w=(i=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.references)===null||i===void 0?void 0:i.checkoutSessionId;x=(t=(s=window.Zonos.cartData)===null||s===void 0?void 0:s.references)===null||t===void 0?void 0:t.landedCostId;if(!x){l({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:E.organizationName})],title:C("Invalid session")});return[2/*return*/]}
|
|
60
60
|
// Override checkout session id for invoice if we found one in the cart reference
|
|
61
|
-
if(w){R("Setting checkout session id from cart reference","info",w);_.checkoutSessionId=w}else{R("Clear checkout session id from storage so we start from a fresh session for the invoice cart");_.checkoutSessionId=null}return[4/*yield*/,this.checkStripePaymentIntentStatus()];case 1:y=
|
|
61
|
+
if(w){R("Setting checkout session id from cart reference","info",w);_.checkoutSessionId=w}else{R("Clear checkout session id from storage so we start from a fresh session for the invoice cart");_.checkoutSessionId=null}return[4/*yield*/,this.checkStripePaymentIntentStatus()];case 1:y=B.sent().shouldAllowOrder;if(!y){return[2/*return*/]}B.label=2;case 2:B.trys.push([2,11,,12]);k=T(window.Zonos.cartData),I=k.adjustments,j=k.cartItems;return[4/*yield*/,v({adjustments:I,cartItems:j,landedCostId:x,
|
|
62
62
|
// No need to init session on failure since we will always create a new one if there is no checkout session id in the cart references
|
|
63
|
-
shouldInitSessionOnFailure:false})];case 3:
|
|
63
|
+
shouldInitSessionOnFailure:false})];case 3:B.sent();if(!(!_.checkoutSessionId&&!w))return[3/*break*/,5];return[4/*yield*/,z()];case 4:S=B.sent();R("stripeStoreInitCheckoutSession: ".concat(S));if(!S){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential")}B.label=5;case 5:if(!((!a.checkoutSession||((c=a.checkoutSession)===null||c===void 0?void 0:c.completedAt))&&w))return[3/*break*/,9];return[4/*yield*/,this.fetchCheckoutSession(w)];case 6:O=B.sent();
|
|
64
64
|
// Some merchants use landed cost id as the confirmation id
|
|
65
65
|
this.confirmationId=((h=O===null||O===void 0?void 0:O.checkoutSession.landedCost)===null||h===void 0?void 0:h.shortId)||null;
|
|
66
66
|
// If checkout session is already completed, set to finish step
|
|
67
67
|
if(!!(O===null||O===void 0?void 0:O.checkoutSession.completedAt)&&
|
|
68
68
|
// For invoice that's set to expired, we set completedAt but no order attached. In that case should not set to finish step
|
|
69
|
-
!!O.checkoutSession.order){void this.setToFinishStep("succeeded");return[2/*return*/]}if(!(O===null||O===void 0?void 0:O.checkoutSession.clientSecret))return[3/*break*/,8];return[4/*yield*/,r({clientSecret:O.checkoutSession.clientSecret})];case 7:
|
|
69
|
+
!!O.checkoutSession.order){void this.setToFinishStep("succeeded");return[2/*return*/]}if(!(O===null||O===void 0?void 0:O.checkoutSession.clientSecret))return[3/*break*/,8];return[4/*yield*/,r({clientSecret:O.checkoutSession.clientSecret})];case 7:D=B.sent().status;
|
|
70
70
|
// If payment intent is still processing or succeeded, set to finish step
|
|
71
|
-
if(
|
|
71
|
+
if(D==="processing"||D==="succeeded"){void this.setToFinishStep(D);return[2/*return*/]}B.label=8;case 8:void L({endpoint:"INVALID_INVOICE_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:w,cartId:(u=window.Zonos.cartData)===null||u===void 0?void 0:u.id,cartLandedCostId:x}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!a.checkoutSession){void L({endpoint:"FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this invoice cart"],metadata:{cartCheckoutSessionId:w||"N/A",cartId:(f=window.Zonos.cartData)===null||f===void 0?void 0:f.id,cartLandedCostId:x||"N/A"}});throw new Error("Could not update/create checkout session for this invoice cart")}
|
|
72
72
|
// const checkoutSessionId = storageStore.checkoutSessionId;
|
|
73
|
-
void d();
|
|
73
|
+
void d();P=(m=a.checkoutSession)===null||m===void 0?void 0:m.landedCost;if(!P){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4/*yield*/,g(Object.assign(Object.assign({},a.checkoutSession),{id:_.checkoutSessionId||""}))];case 10:B.sent();void b({landedCostId:P.id});void this.applyStripeTheme();return[3/*break*/,12];case 11:A=B.sent();U(A);l({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:E.organizationName})],title:C("Invalid session")});return[3/*break*/,12];case 12:this.isOverlayLoading=false;return[2/*return*/]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,n,e,i,s,c,r,l,v;return __generator(this,(function(z){switch(z.label){case 0:
|
|
74
74
|
// Attempt to get the value of the billing address element to validate the form
|
|
75
75
|
void((o=t.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());
|
|
76
76
|
// If the email is not complete, scroll to the link authentication section
|
|
@@ -108,8 +108,8 @@ this.clientSecret=t.clientSecret;
|
|
|
108
108
|
// Only set and update stripeCustomerSession state if it's available, since it would only be available at the time checkout session is created, afterward access checkout session the value would be `null`.
|
|
109
109
|
if(t.stripeCustomerSessionClientSecret){
|
|
110
110
|
// Set stripe customer session client secret so that we can add this to @Watch listener
|
|
111
|
-
this.stripeCustomerSessionClientSecret=t.stripeCustomerSessionClientSecret}var n=this.getBaseCurrencySettlementInfo();var c=
|
|
111
|
+
this.stripeCustomerSessionClientSecret=t.stripeCustomerSessionClientSecret}var n=this.getBaseCurrencySettlementInfo();var c=E.appearance,r=c.logoUrl,l=c.theme;var v=function(){
|
|
112
112
|
// add timestamp to logo url so browser won't cache it on the dashboard setting
|
|
113
|
-
var o="".concat(r,"?timestamp=").concat(Date.now());return e("div",{class:"zonos--logo"},o&&e("img",{alt:"".concat(
|
|
113
|
+
var o="".concat(r,"?timestamp=").concat(Date.now());return e("div",{class:"zonos--logo"},o&&e("img",{alt:"".concat(E.organizationName," logo"),src:o}))};var z=P();var d=function(){var n;var i=new URLSearchParams(window.location.search);var t=i.get("zonosQaUrl");var c=i.get("zonosDebug");var r=(n=S.find((function(o){return o.code===O.selectedLocale})))===null||n===void 0?void 0:n.label;return e(s,null,e("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},e("div",{class:"zonos--logo-wrapper"},v(),z&&e("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),c==="1"&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t)),e("div",{class:"zonos--header-right"},e("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},r,e("zonos-icon",{"aria-label":"Language select",content:F,iconColor:"gray-1200"})),e("div",{class:N(["zonos--invoice-language-dialog",o.showLanguageDialogMobile&&"zonos--invoice-language-dialog-open"])},e("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))))};var h=function(){if(o.isOverlayLoading||t.isFetchingSession){return null}return e("div",{class:"zonos--content"},a.step!=="finish"&&a.step!=="error"&&e(s,null,(o.isMobile||o.isTablet)&&d(),e("div",{class:"zonos--left","data-theme":l},!o.isMobile&&!o.isTablet&&d(),e("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},C("Billing info")),e("zonos-v-stack",{spacing:16},e("zonos-link-authentication",{titleText:""}),e("zonos-address",{titleText:"",type:"billing"})),e("zonos-invoice-payment",{class:N(["zonos--invoice-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4/*yield*/,this.handleStripePaymentContinue()];case 1:o.sent();return[2/*return*/]}}))}))}})),e("div",{class:"zonos--right","data-theme":l},!o.isMobile&&e("zonos-invoice-review",{mobile:o.isMobile,tablet:o.isTablet}),e("div",{class:"zonos--order-details-container"},!o.isMobile&&e("zonos-invoice-cart-items",null),o.isMobile&&e("zonos-invoice-order-details",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReviewMobile=!o.collapseReviewMobile}})),e("div",{class:"flex--wrapper"},!o.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-invoice-subtotal",null)),!o.isMobile&&!o.isTablet&&e("zonos-invoice-footer",{"data-theme":l,mobile:o.isMobile,tablet:o.isTablet})))),(a.step==="finish"||a.step==="error")&&e("div",{class:"zonos--done","data-theme":l},e("div",{class:"zonos--header"},v()),e("zonos-invoice-finish",{confirmationId:o.confirmationId,overrideNotification:a.step==="error"&&!!a.error?Object.assign(Object.assign({},a.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||a.step==="finish"||a.step==="error")&&e("zonos-invoice-footer",{"data-theme":l,mobile:o.isMobile,tablet:o.isTablet}))};return e(i,{class:N(["zonos--invoice zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":l},h(),n&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:C("Cancel"),dialogConfirmBtnText:C("Pay [orderTotal]",{orderTotal:j({amount:n.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:C("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:C("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},
|
|
114
114
|
// Mark user selected confirm to continue with payment
|
|
115
|
-
onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),e("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());
|
|
115
|
+
onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),e("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}());H.style=V()}}}));
|